nfets 0.0.45 → 0.0.47
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/build/addons/win32-x64/wincrypt_certificate_store.node +0 -0
- package/build/addons/win32-x64/winhttp_ssl_client.node +0 -0
- package/build/addons/win32-x64/xml_validator.node +0 -0
- package/dist/chunk-NIXT5RTQ.mjs +20 -0
- package/dist/chunk-Q47VIRPG.mjs +277 -0
- package/dist/core/index.cjs +86 -79
- package/dist/core/index.d.cts +11 -6
- package/dist/core/index.d.ts +11 -6
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +101 -82
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +100 -81
- package/dist/nfe/index.d.cts +126 -2
- package/dist/nfe/index.d.ts +126 -2
- package/dist/nfe/index.mjs +1 -1
- package/dist/{xml-signer-BmpwXTKY.d.cts → xml-signer-Cu3OlWV1.d.cts} +7 -4
- package/dist/{xml-signer-BmpwXTKY.d.ts → xml-signer-Cu3OlWV1.d.ts} +7 -4
- package/package.json +2 -1
- package/dist/chunk-XGHTJXFZ.mjs +0 -270
- package/dist/chunk-ZRYCG7PM.mjs +0 -8
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as o,b as Je,d as re,e as iY,f as Hl}from"./chunk-W6MRGYXP.mjs";var zt=re((ove,dk)=>{"use strict";dk.exports={options:{usePureJavaScript:!1}}});var vk=re((uve,gk)=>{"use strict";var MN={};gk.exports=MN;var mk={};MN.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=tQ(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};MN.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=mk[e];if(!t){t=mk[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 tQ(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(tQ,"_encodeWithByteBuffer")});var hr=re((lve,Sk)=>{"use strict";var yk=zt(),xk=vk(),oe=Sk.exports=yk.util=yk.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 Sg(r){if(!(r===8||r===16||r===24||r===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+r)}o(Sg,"_checkBitsParam");oe.ByteBuffer=qN;function qN(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 qN||typeof r=="object"&&typeof r.data=="string"&&typeof r.read=="number")&&(this.data=r.data,this.read=r.read);this._constructedStringLength=0}o(qN,"ByteStringBuffer");oe.ByteStringBuffer=qN;var rQ=4096;oe.ByteStringBuffer.prototype._optimizeConstructedString=function(r){this._constructedStringLength+=r,this._constructedStringLength>rQ&&(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){Sg(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){Sg(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 nQ(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(nQ,"DataBuffer");oe.DataBuffer=nQ;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){Sg(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 Sg(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){Sg(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 Hu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ku=[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],wk="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+=Hu.charAt(s>>2),t+=Hu.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=Hu.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":Hu.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=Ku[r.charCodeAt(a++)-43],n=Ku[r.charCodeAt(a++)-43],s=Ku[r.charCodeAt(a++)-43],i=Ku[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:xk.encode,decode:xk.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+=Hu.charAt(s>>2),t+=Hu.charAt((s&3)<<4|i>>4),isNaN(i)?t+="==":(t+=Hu.charAt((i&15)<<2|a>>6),t+=isNaN(a)?"=":Hu.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=Ku[r.charCodeAt(c++)-43],i=Ku[r.charCodeAt(c++)-43],a=Ku[r.charCodeAt(c++)-43],u=Ku[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,wk,e)};oe.binary.base58.decode=function(r,e){return oe.binary.baseN.decode(r,wk,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 HN=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"),KN=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"),sQ=o(function(r,e,t,n){var s=KN(r,e);s===null&&(s={}),s[t]=n,HN(r,e,s)},"_setItem"),iQ=o(function(r,e,t){var n=KN(r,e);return n!==null&&(n=t in n?n[t]:null),n},"_getItem"),aQ=o(function(r,e,t){var n=KN(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),HN(r,e,n)}},"_removeItem"),oQ=o(function(r,e){HN(r,e,null)},"_clearItems"),zw=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){zw(sQ,arguments,s)};oe.getItem=function(r,e,t,n){return zw(iQ,arguments,n)};oe.removeItem=function(r,e,t,n){zw(aQ,arguments,n)};oe.clearItems=function(r,e,t){zw(oQ,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,S){return Math.max(v,S.length)},0)}o(i,"reduce")}});var Jw=re((hve,Ek)=>{"use strict";var Pn=zt();hr();Ek.exports=Pn.cipher=Pn.cipher||{};Pn.cipher.algorithms=Pn.cipher.algorithms||{};Pn.cipher.createCipher=function(r,e){var t=r;if(typeof t=="string"&&(t=Pn.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new Pn.cipher.BlockCipher({algorithm:t,key:e,decrypt:!1})};Pn.cipher.createDecipher=function(r,e){var t=r;if(typeof t=="string"&&(t=Pn.cipher.getAlgorithm(t),t&&(t=t())),!t)throw new Error("Unsupported algorithm: "+r);return new Pn.cipher.BlockCipher({algorithm:t,key:e,decrypt:!0})};Pn.cipher.registerAlgorithm=function(r,e){r=r.toUpperCase(),Pn.cipher.algorithms[r]=e};Pn.cipher.getAlgorithm=function(r){return r=r.toUpperCase(),r in Pn.cipher.algorithms?Pn.cipher.algorithms[r]:null};var $N=Pn.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)};$N.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=Pn.util.createBuffer(),this.output=r.output||Pn.util.createBuffer(),this.mode.start(e)};$N.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()};$N.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 XN=re((pve,bk)=>{"use strict";var kn=zt();hr();kn.cipher=kn.cipher||{};var er=bk.exports=kn.cipher.modes=kn.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=Yw(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=kn.util.createBuffer(),this._partialBytes=0};er.cfb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=Yw(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=kn.util.createBuffer(),this._partialBytes=0};er.ofb.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=Yw(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=kn.util.createBuffer(),this._partialBytes=0};er.ctr.prototype.start=function(r){if(!("iv"in r))throw new Error("Invalid IV parameter.");this._iv=Yw(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}Qw(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=kn.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=kn.util.createBuffer(r.iv);this._cipherLength=0;var t;if("additionalData"in r?t=kn.util.createBuffer(r.additionalData):t=kn.util.createBuffer(),"tagLength"in r?this._tagLength=r.tagLength:this._tagLength=128,this._tag=null,r.decrypt&&(this._tag=kn.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(GN(n*8)))}this._inBlock=this._j0.slice(0),Qw(this._inBlock),this._partialBytes=0,t=kn.util.createBuffer(t),this._aDataLength=GN(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),Qw(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),Qw(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=kn.util.createBuffer();var n=this._aDataLength.concat(GN(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 Yw(r,e){if(typeof r=="string"&&(r=kn.util.createBuffer(r)),kn.util.isArray(r)&&r.length>4){var t=r;r=kn.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(!kn.util.isArray(r)){for(var s=[],i=e/4,n=0;n<i;++n)s.push(r.getInt32());r=s}return r}o(Yw,"transformIV");function Qw(r){r[r.length-1]=r[r.length-1]+1&4294967295}o(Qw,"inc32");function GN(r){return[r/4294967296|0,r&4294967295]}o(GN,"from64To32")});var $u=re((mve,Tk)=>{"use strict";var kr=zt();Jw();XN();hr();Tk.exports=kr.aes=kr.aes||{};kr.aes.startEncrypting=function(r,e,t,n){var s=Zw({key:r,output:t,decrypt:!1,mode:n});return s.start(e),s};kr.aes.createEncryptionCipher=function(r,e){return Zw({key:r,output:null,decrypt:!1,mode:e})};kr.aes.startDecrypting=function(r,e,t,n){var s=Zw({key:r,output:t,decrypt:!0,mode:n});return s.start(e),s};kr.aes.createDecryptionCipher=function(r,e){return Zw({key:r,output:null,decrypt:!0,mode:e})};kr.aes.Algorithm=function(r,e){JN||Ck();var t=this;t.name=r,t.mode=new e({blockSize:16,cipher:{encrypt:o(function(n,s){return zN(t._w,n,s,!1)},"encrypt"),decrypt:o(function(n,s){return zN(t._w,n,s,!0)},"decrypt")}}),t._init=!1};kr.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=kr.util.createBuffer(e);else if(kr.util.isArray(e)&&(e.length===16||e.length===24||e.length===32)){t=e,e=kr.util.createBuffer();for(var n=0;n<t.length;++n)e.putByte(t[n])}if(!kr.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(!kr.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=Nk(e,r.decrypt&&!a),this._init=!0}};kr.aes._expandKey=function(r,e){return JN||Ck(),Nk(r,e)};kr.aes._updateBlock=zN;Np("AES-ECB",kr.cipher.modes.ecb);Np("AES-CBC",kr.cipher.modes.cbc);Np("AES-CFB",kr.cipher.modes.cfb);Np("AES-OFB",kr.cipher.modes.ofb);Np("AES-CTR",kr.cipher.modes.ctr);Np("AES-GCM",kr.cipher.modes.gcm);function Np(r,e){var t=o(function(){return new kr.aes.Algorithm(r,e)},"factory");kr.cipher.registerAlgorithm(r,t)}o(Np,"registerAlgorithm");var JN=!1,Cp=4,bs,WN,Ak,Kl,aa;function Ck(){JN=!0,Ak=[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;bs=new Array(256),WN=new Array(256),Kl=new Array(4),aa=new Array(4);for(var e=0;e<4;++e)Kl[e]=new Array(256),aa[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,bs[t]=u,WN[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)Kl[m][t]=l,aa[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(Ck,"initialize");function Nk(r,e){for(var t=r.slice(0),n,s=1,i=t.length,a=i+6+1,u=Cp*a,c=i;c<u;++c)n=t[c-1],c%i===0?(n=bs[n>>>16&255]<<24^bs[n>>>8&255]<<16^bs[n&255]<<8^bs[n>>>24]^Ak[s]<<24,s++):i>6&&c%i===4&&(n=bs[n>>>24]<<24^bs[n>>>16&255]<<16^bs[n>>>8&255]<<8^bs[n&255]),t[c]=t[c-i]^n;if(e){var l,h=aa[0],m=aa[1],g=aa[2],y=aa[3],v=t.slice(0);u=t.length;for(var c=0,S=u-Cp;c<u;c+=Cp,S-=Cp)if(c===0||c===u-Cp)v[c]=t[S],v[c+1]=t[S+3],v[c+2]=t[S+2],v[c+3]=t[S+1];else for(var w=0;w<Cp;++w)l=t[S+w],v[c+(3&-w)]=h[bs[l>>>24]]^m[bs[l>>>16&255]]^g[bs[l>>>8&255]]^y[bs[l&255]];t=v}return t}o(Nk,"_expandKey");function zN(r,e,t,n){var s=r.length/4-1,i,a,u,c,l;n?(i=aa[0],a=aa[1],u=aa[2],c=aa[3],l=WN):(i=Kl[0],a=Kl[1],u=Kl[2],c=Kl[3],l=bs);var h,m,g,y,v,S,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],S=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=S,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(zN,"_updateBlock");function Zw(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="AES-"+e,n;r.decrypt?n=kr.cipher.createDecipher(t,r.key):n=kr.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof kr.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(Zw,"_createCipher")});var Gu=re((vve,Ik)=>{"use strict";var Eg=zt();Eg.pki=Eg.pki||{};var YN=Ik.exports=Eg.pki.oids=Eg.oids=Eg.oids||{};function Ke(r,e){YN[r]=e,YN[e]=r}o(Ke,"_IN");function Er(r,e){YN[r]=e}o(Er,"_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");Er("2.5.29.1","authorityKeyIdentifier");Er("2.5.29.2","keyAttributes");Er("2.5.29.3","certificatePolicies");Er("2.5.29.4","keyUsageRestriction");Er("2.5.29.5","policyMapping");Er("2.5.29.6","subtreesConstraint");Er("2.5.29.7","subjectAltName");Er("2.5.29.8","issuerAltName");Er("2.5.29.9","subjectDirectoryAttributes");Er("2.5.29.10","basicConstraints");Er("2.5.29.11","nameConstraints");Er("2.5.29.12","policyConstraints");Er("2.5.29.13","basicConstraints");Ke("2.5.29.14","subjectKeyIdentifier");Ke("2.5.29.15","keyUsage");Er("2.5.29.16","privateKeyUsagePeriod");Ke("2.5.29.17","subjectAltName");Ke("2.5.29.18","issuerAltName");Ke("2.5.29.19","basicConstraints");Er("2.5.29.20","cRLNumber");Er("2.5.29.21","cRLReason");Er("2.5.29.22","expirationDate");Er("2.5.29.23","instructionCode");Er("2.5.29.24","invalidityDate");Er("2.5.29.25","cRLDistributionPoints");Er("2.5.29.26","issuingDistributionPoint");Er("2.5.29.27","deltaCRLIndicator");Er("2.5.29.28","issuingDistributionPoint");Er("2.5.29.29","certificateIssuer");Er("2.5.29.30","nameConstraints");Ke("2.5.29.31","cRLDistributionPoints");Ke("2.5.29.32","certificatePolicies");Er("2.5.29.33","policyMappings");Er("2.5.29.34","policyConstraints");Ke("2.5.29.35","authorityKeyIdentifier");Er("2.5.29.36","policyConstraints");Ke("2.5.29.37","extKeyUsage");Er("2.5.29.46","freshestCRL");Er("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 oa=re((xve,Dk)=>{"use strict";var Hr=zt();hr();Gu();var nt=Dk.exports=Hr.asn1=Hr.asn1||{};nt.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};nt.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};nt.create=function(r,e,t,n,s){if(Hr.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||Hr.util.isArray(n),value:n};return s&&"bitStringContents"in s&&(u.bitStringContents=s.bitStringContents,u.original=nt.copy(u)),u};nt.copy=function(r,e){var t;if(Hr.util.isArray(r)){t=[];for(var n=0;n<r.length;++n)t.push(nt.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:nt.copy(r.value,e)},e&&!e.excludeBitStringContents&&(t.bitStringContents=r.bitStringContents),t)};nt.equals=function(r,e,t){if(Hr.util.isArray(r)){if(!Hr.util.isArray(e)||r.length!==e.length)return!1;for(var n=0;n<r.length;++n)if(!nt.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&&nt.equals(r.value,e.value);return t&&t.includeBitStringContents&&(s=s&&r.bitStringContents===e.bitStringContents),s};nt.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 bg(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(bg,"_checkBufferLength");var uQ=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;bg(r,e,i),n=r.getInt(i<<3)}if(n<0)throw new Error("Negative length: "+n);return n}},"_getValueLength");nt.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),typeof r=="string"&&(r=Hr.util.createBuffer(r));var t=r.length(),n=eS(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 eS(r,e,t,n){var s;bg(r,e,2);var i=r.getByte();e--;var a=i&192,u=i&31;s=r.length();var c=uQ(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(bg(r,e,2),r.bytes(2)==="\0\0"){r.getBytes(2),e-=2;break}s=r.length(),h.push(eS(r,e,t+1,n)),e-=s-r.length()}else for(;c>0;)s=r.length(),h.push(eS(r,c,t+1,n)),e-=s-r.length(),c-=s-r.length();if(h===void 0&&a===nt.Class.UNIVERSAL&&u===nt.Type.BITSTRING&&(m=r.bytes(c)),h===void 0&&n.decodeBitStrings&&a===nt.Class.UNIVERSAL&&u===nt.Type.BITSTRING&&c>1){var y=r.read,v=e,S=0;if(u===nt.Type.BITSTRING&&(bg(r,e,1),S=r.getByte(),e--),S===0)try{s=r.length();var w={strict:!0,decodeBitStrings:!0},C=eS(r,e,t+1,w),_=s-r.length();e-=_,u==nt.Type.BITSTRING&&_++;var b=C.tagClass;_===c&&(b===nt.Class.UNIVERSAL||b===nt.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===nt.Type.BMPSTRING)for(h="";c>0;c-=2)bg(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 nt.create(a,u,g,h,A)}o(eS,"_fromDer");nt.toDer=function(r){var e=Hr.util.createBuffer(),t=r.tagClass|r.type,n=Hr.util.createBuffer(),s=!1;if("bitStringContents"in r&&(s=!0,r.original&&(s=nt.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(nt.toDer(r.value[i]))}else if(r.type===nt.Type.BMPSTRING)for(var i=0;i<r.value.length;++i)n.putInt16(r.value.charCodeAt(i));else r.type===nt.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};nt.oidToDer=function(r){var e=r.split("."),t=Hr.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){n=!0,s=[],i=parseInt(e[u],10);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};nt.derToOid=function(r){var e;typeof r=="string"&&(r=Hr.util.createBuffer(r));var t=r.getByte();e=Math.floor(t/40)+"."+t%40;for(var n=0;r.length()>0;)t=r.getByte(),n=n<<7,t&128?n+=t&127:(e+="."+(n+t),n=0);return e};nt.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};nt.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};nt.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};nt.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};nt.integerToDer=function(r){var e=Hr.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};nt.derToInteger=function(r){typeof r=="string"&&(r=Hr.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)};nt.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&&Hr.util.isArray(e.value))for(var i=0,a=0;s&&a<e.value.length;++a)s=e.value[a].optional||!1,r.value[i]&&(s=nt.validate(r.value[i],e.value[a],t,n),s?++i:e.value[a].optional&&(s=!0)),!s&&n&&n.push("["+e.name+'] Tag class "'+e.tagClass+'", type "'+e.type+'" expected value length "'+e.value.length+'", got "'+r.value.length+'"');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 u;if(r.bitStringContents.length<2)t[e.captureBitStringValue]="";else{var c=r.bitStringContents.charCodeAt(0);if(c!==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 _k=/[^\\u0000-\\u00ff]/;nt.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 nt.Class.UNIVERSAL:n+="Universal:";break;case nt.Class.APPLICATION:n+="Application:";break;case nt.Class.CONTEXT_SPECIFIC:n+="Context-Specific:";break;case nt.Class.PRIVATE:n+="Private:";break}if(r.tagClass===nt.Class.UNIVERSAL)switch(n+=r.type,r.type){case nt.Type.NONE:n+=" (None)";break;case nt.Type.BOOLEAN:n+=" (Boolean)";break;case nt.Type.INTEGER:n+=" (Integer)";break;case nt.Type.BITSTRING:n+=" (Bit string)";break;case nt.Type.OCTETSTRING:n+=" (Octet string)";break;case nt.Type.NULL:n+=" (Null)";break;case nt.Type.OID:n+=" (Object Identifier)";break;case nt.Type.ODESC:n+=" (Object Descriptor)";break;case nt.Type.EXTERNAL:n+=" (External or Instance of)";break;case nt.Type.REAL:n+=" (Real)";break;case nt.Type.ENUMERATED:n+=" (Enumerated)";break;case nt.Type.EMBEDDED:n+=" (Embedded PDV)";break;case nt.Type.UTF8:n+=" (UTF8)";break;case nt.Type.ROID:n+=" (Relative Object Identifier)";break;case nt.Type.SEQUENCE:n+=" (Sequence)";break;case nt.Type.SET:n+=" (Set)";break;case nt.Type.PRINTABLESTRING:n+=" (Printable String)";break;case nt.Type.IA5String:n+=" (IA5String (ASCII))";break;case nt.Type.UTCTIME:n+=" (UTC time)";break;case nt.Type.GENERALIZEDTIME:n+=" (Generalized time)";break;case nt.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+=nt.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===nt.Type.OID){var c=nt.derToOid(r.value);n+=c,Hr.pki&&Hr.pki.oids&&c in Hr.pki.oids&&(n+=" ("+Hr.pki.oids[c]+") ")}if(r.type===nt.Type.INTEGER)try{n+=nt.derToInteger(r.value)}catch{n+="0x"+Hr.util.bytesToHex(r.value)}else if(r.type===nt.Type.BITSTRING){if(r.value.length>1?n+="0x"+Hr.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===nt.Type.OCTETSTRING)_k.test(r.value)||(n+="("+r.value+") "),n+="0x"+Hr.util.bytesToHex(r.value);else if(r.type===nt.Type.UTF8)try{n+=Hr.util.decodeUtf8(r.value)}catch(h){if(h.message==="URI malformed")n+="0x"+Hr.util.bytesToHex(r.value)+" (malformed UTF8)";else throw h}else r.type===nt.Type.PRINTABLESTRING||r.type===nt.Type.IA5String?n+=r.value:_k.test(r.value)?n+="0x"+Hr.util.bytesToHex(r.value):r.value.length===0?n+="[null]":n+=r.value}return n}});var Ua=re((Sve,Bk)=>{"use strict";var tS=zt();Bk.exports=tS.md=tS.md||{};tS.md.algorithms=tS.md.algorithms||{}});var Tp=re((Eve,Rk)=>{"use strict";var Vo=zt();Ua();hr();var cQ=Rk.exports=Vo.hmac=Vo.hmac||{};cQ.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 Vo.md.algorithms)e=Vo.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=Vo.util.createBuffer(a);else if(Vo.util.isArray(a)){var u=a;a=Vo.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=Vo.util.createBuffer(),n=Vo.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 nS=re((bve,Lk)=>{"use strict";var ja=zt();Ua();hr();var Pk=Lk.exports=ja.md5=ja.md5||{};ja.md.md5=ja.md.algorithms.md5=Pk;Pk.create=function(){kk||lQ();var r=null,e=ja.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=ja.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=ja.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),Ok(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=ja.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(QN.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};Ok(h,t,s);var m=ja.util.createBuffer();return m.putInt32Le(h.h0),m.putInt32Le(h.h1),m.putInt32Le(h.h2),m.putInt32Le(h.h3),m},n};var QN=null,rS=null,Ag=null,Ip=null,kk=!1;function lQ(){QN="\x80",QN+=ja.util.fillString("\0",64),rS=[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],Ag=[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],Ip=new Array(64);for(var r=0;r<64;++r)Ip[r]=Math.floor(Math.abs(Math.sin(r+1))*4294967296);kk=!0}o(lQ,"_init");function Ok(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+Ip[h]+e[h],l=Ag[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+Ip[h]+e[rS[h]],l=Ag[h],s=u,u=a,a=i,i+=n<<l|n>>>32-l;for(;h<48;++h)c=i^a^u,n=s+c+Ip[h]+e[rS[h]],l=Ag[h],s=u,u=a,a=i,i+=n<<l|n>>>32-l;for(;h<64;++h)c=a^(i|~u),n=s+c+Ip[h]+e[rS[h]],l=Ag[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(Ok,"_update")});var $l=re((Cve,Uk)=>{"use strict";var iS=zt();hr();var Vk=Uk.exports=iS.pem=iS.pem||{};Vk.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+=sS(n)),r.contentDomain&&(n={name:"Content-Domain",values:[r.contentDomain]},t+=sS(n)),r.dekInfo&&(n={name:"DEK-Info",values:[r.dekInfo.algorithm]},r.dekInfo.parameters&&n.values.push(r.dekInfo.parameters),t+=sS(n)),r.headers)for(var s=0;s<r.headers.length;++s)t+=sS(r.headers[s]);return r.procType&&(t+=`\r
|
|
10
|
+
`),t+=iS.util.encode64(r.body,e.maxline||64)+`\r
|
|
11
|
+
`,t+="-----END "+r.type+`-----\r
|
|
12
|
+
`,t};Vk.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:iS.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(","),S=0;S<v.length;++S)y.values.push(fQ(v[S]));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 sS(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(sS,"foldHeader");function fQ(r){return r.replace(/^\s+/,"")}o(fQ,"ltrim")});var Cg=re((Tve,Fk)=>{"use strict";var Xr=zt();Jw();XN();hr();Fk.exports=Xr.des=Xr.des||{};Xr.des.startEncrypting=function(r,e,t,n){var s=aS({key:r,output:t,decrypt:!1,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};Xr.des.createEncryptionCipher=function(r,e){return aS({key:r,output:null,decrypt:!1,mode:e})};Xr.des.startDecrypting=function(r,e,t,n){var s=aS({key:r,output:t,decrypt:!0,mode:n||(e===null?"ECB":"CBC")});return s.start(e),s};Xr.des.createDecryptionCipher=function(r,e){return aS({key:r,output:null,decrypt:!0,mode:e})};Xr.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};Xr.des.Algorithm.prototype.initialize=function(r){if(!this._init){var e=Xr.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=wQ(e),this._init=!0}};Fa("DES-ECB",Xr.cipher.modes.ecb);Fa("DES-CBC",Xr.cipher.modes.cbc);Fa("DES-CFB",Xr.cipher.modes.cfb);Fa("DES-OFB",Xr.cipher.modes.ofb);Fa("DES-CTR",Xr.cipher.modes.ctr);Fa("3DES-ECB",Xr.cipher.modes.ecb);Fa("3DES-CBC",Xr.cipher.modes.cbc);Fa("3DES-CFB",Xr.cipher.modes.cfb);Fa("3DES-OFB",Xr.cipher.modes.ofb);Fa("3DES-CTR",Xr.cipher.modes.ctr);function Fa(r,e){var t=o(function(){return new Xr.des.Algorithm(r,e)},"factory");Xr.cipher.registerAlgorithm(r,t)}o(Fa,"registerAlgorithm");var hQ=[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],pQ=[-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],dQ=[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],mQ=[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],gQ=[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],vQ=[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],yQ=[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],xQ=[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 wQ(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],S=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<S;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(wQ,"_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^(pQ[y>>>24&63]|mQ[y>>>16&63]|vQ[y>>>8&63]|xQ[y&63]|hQ[v>>>24&63]|dQ[v>>>16&63]|gQ[v>>>8&63]|yQ[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 aS(r){r=r||{};var e=(r.mode||"CBC").toUpperCase(),t="DES-"+e,n;r.decrypt?n=Xr.cipher.createDecipher(t,r.key):n=Xr.cipher.createCipher(t,r.key);var s=n.start;return n.start=function(i,a){var u=null;a instanceof Xr.util.ByteBuffer&&(u=a,a={}),a=a||{},a.output=u,a.iv=i,s.call(n,a)},n}o(aS,"_createCipher")});var oS=re((_ve,Mk)=>{"use strict";var As=zt();Tp();Ua();hr();var SQ=As.pkcs5=As.pkcs5||{},Uo;As.util.isNodejs&&!As.options.usePureJavaScript&&(Uo=Je("crypto"));Mk.exports=As.pbkdf2=SQ.pbkdf2=function(r,e,t,n,s,i){if(typeof s=="function"&&(i=s,s=null),As.util.isNodejs&&!As.options.usePureJavaScript&&Uo.pbkdf2&&(s===null||typeof s!="object")&&(Uo.pbkdf2Sync.length>4||!s||s==="sha1"))return typeof s!="string"&&(s="sha1"),r=Buffer.from(r,"binary"),e=Buffer.from(e,"binary"),i?Uo.pbkdf2Sync.length===4?Uo.pbkdf2(r,e,t,n,function(b,A){if(b)return i(b);i(null,A.toString("binary"))}):Uo.pbkdf2(r,e,t,n,s,function(b,A){if(b)return i(b);i(null,A.toString("binary"))}):Uo.pbkdf2Sync.length===4?Uo.pbkdf2Sync(r,e,t,n).toString("binary"):Uo.pbkdf2Sync(r,e,t,n,s).toString("binary");if((typeof s>"u"||s===null)&&(s="sha1"),typeof s=="string"){if(!(s in As.md.algorithms))throw new Error("Unknown hash algorithm: "+s);s=As.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=As.hmac.create();h.start(s,r);var m="",g,y,v;if(!i){for(var S=1;S<=c;++S){h.start(null,null),h.update(e),h.update(As.util.int32ToBytes(S)),g=v=h.digest().getBytes();for(var w=2;w<=t;++w)h.start(null,null),h.update(v),y=h.digest().getBytes(),g=As.util.xorBytes(g,y,a),v=y;m+=S<c?g:g.substr(0,l)}return m}var S=1,w;function C(){if(S>c)return i(null,m);h.start(null,null),h.update(e),h.update(As.util.int32ToBytes(S)),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=As.util.xorBytes(g,y,a),v=y,++w,As.util.setImmediate(_);m+=S<c?g:g.substr(0,l),++S,C()}o(_,"inner"),C()}});var eT=re((Bve,Gk)=>{"use strict";var Ma=zt();Ua();hr();var Hk=Gk.exports=Ma.sha256=Ma.sha256||{};Ma.md.sha256=Ma.md.algorithms.sha256=Hk;Hk.create=function(){Kk||EQ();var r=null,e=Ma.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=Ma.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=Ma.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),qk(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=Ma.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(ZN.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};qk(m,t,s);var g=Ma.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 ZN=null,Kk=!1,$k=null;function EQ(){ZN="\x80",ZN+=Ma.util.fillString("\0",64),$k=[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],Kk=!0}o(EQ,"_init");function qk(r,e,t){for(var n,s,i,a,u,c,l,h,m,g,y,v,S,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,S=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&(S^w),i=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),c=h&m|g&(h^m),n=C+a+u+$k[l]+e[l],s=i+c,C=w,w=S,S=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+S|0,r.h6=r.h6+w|0,r.h7=r.h7+C|0,_-=64}}o(qk,"_update")});var tT=re((Ove,Xk)=>{"use strict";var qa=zt();hr();var uS=null;qa.util.isNodejs&&!qa.options.usePureJavaScript&&!process.versions["node-webkit"]&&(uS=Je("crypto"));var bQ=Xk.exports=qa.prng=qa.prng||{};bQ.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,S=qa.util.createBuffer();e.key=null,w();function w(C){if(C)return h(C);if(S.length()>=l)return h(null,S.getBytes(l));if(e.generated>1048575&&(e.key=null),e.key===null)return qa.util.nextTick(function(){i(w)});var _=m(e.key,e.seed);e.generated+=_.length,S.putBytes(_),e.key=y(m(e.key,g(e.seed))),e.seed=v(m(e.key,e.seed)),qa.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=qa.util.createBuffer();v.length()<l;){e.generated>1048575&&(e.key=null),e.key===null&&a();var S=h(e.key,e.seed);e.generated+=S.length,v.putBytes(S),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=qa.util.globalScope,g=m.crypto||m.msCrypto;g&&g.getRandomValues&&(h=o(function(T){return g.getRandomValues(T)},"getRandomValues"));var y=qa.util.createBuffer();if(h)for(;y.length()<l;){var v=Math.max(1,Math.min(l-y.length(),65536)/4),S=new Uint32Array(Math.floor(v));try{h(S);for(var w=0;w<S.length;++w)y.putInt32(S[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"),uS?(e.seedFile=function(l,h){uS.randomBytes(l,function(m,g){if(m)return h(m);h(null,g.toString())})},e.seedFileSync=function(l){return uS.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 S=v.data;S.forge&&S.forge.prng&&(self.removeEventListener("message",y),g(S.forge.prng.err,S.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 _i=re((kve,rT)=>{"use strict";var Ln=zt();$u();eT();tT();hr();(function(){if(Ln.random&&Ln.random.getBytes){rT.exports=Ln.random;return}(function(r){var e={},t=new Array(4),n=Ln.util.createBuffer();e.formatKey=function(m){var g=Ln.util.createBuffer(m);return m=new Array(4),m[0]=g.getInt32(),m[1]=g.getInt32(),m[2]=g.getInt32(),m[3]=g.getInt32(),Ln.aes._expandKey(m,!1)},e.formatSeed=function(m){var g=Ln.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 Ln.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=Ln.md.sha256;function s(){var m=Ln.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=Ln.util.globalScope,c=u.crypto||u.msCrypto;if(c&&c.getRandomValues&&(a=o(function(m){return c.getRandomValues(m)},"getRandomValues")),Ln.options.usePureJavaScript||!Ln.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(!Ln.random)Ln.random=i;else for(var h in i)Ln.random[h]=i[h];Ln.random.createInstance=s,rT.exports=Ln.random})(typeof jQuery<"u"?jQuery:null)})()});var sT=re((Vve,Jk)=>{"use strict";var Ls=zt();hr();var nT=[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],Wk=[1,2,3,5],AQ=o(function(r,e){return r<<e&65535|(r&65535)>>16-e},"rol"),CQ=o(function(r,e){return(r&65535)>>e|r<<16-e&65535},"ror");Jk.exports=Ls.rc2=Ls.rc2||{};Ls.rc2.expandKey=function(r,e){typeof r=="string"&&(r=Ls.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(nT[t.at(u-1)+t.at(u-n)&255]);for(t.setAt(128-i,nT[t.at(128-i)&a]),u=127-i;u>=0;u--)t.setAt(u,nT[t.at(u+1)^t.at(u+i)]);return t};var zk=o(function(r,e,t){var n=!1,s=null,i=null,a=null,u,c,l,h,m=[];for(r=Ls.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]=AQ(v[l],Wk[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]=CQ(v[l],Wk[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 S=[];for(l=0;l<4;l++){var w=s.getInt16Le();a!==null&&(t?w^=a.getInt16Le():a.putInt16Le(w)),S.push(w&65535)}h=t?0:63;for(var C=0;C<v.length;C++)for(var _=0;_<v[C][0];_++)v[C][1](S);for(l=0;l<4;l++)a!==null&&(t?a.putInt16Le(S[l]):S[l]^=a.getInt16Le()),i.putInt16Le(S[l])},"runPlan"),y=null;return y={start:o(function(v,S){v&&typeof v=="string"&&(v=Ls.util.createBuffer(v)),n=!1,s=Ls.util.createBuffer(),i=S||new Ls.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 S=!0;if(t)if(v)S=v(8,s,!t);else{var w=s.length()===8?8:8-s.length();s.fillWithByte(w,w)}if(S&&(n=!0,y.update()),!t&&(S=s.length()===0,S))if(v)S=v(8,i,!t);else{var C=i.length(),_=i.at(C-1);_>C?S=!1:i.truncate(_)}return S},"finish")},y},"createCipher");Ls.rc2.startEncrypting=function(r,e,t){var n=Ls.rc2.createEncryptionCipher(r,128);return n.start(e,t),n};Ls.rc2.createEncryptionCipher=function(r,e){return zk(r,e,!0)};Ls.rc2.startDecrypting=function(r,e,t){var n=Ls.rc2.createDecryptionCipher(r,128);return n.start(e,t),n};Ls.rc2.createDecryptionCipher=function(r,e){return zk(r,e,!1)}});var Tg=re((jve,s4)=>{"use strict";var iT=zt();s4.exports=iT.jsbn=iT.jsbn||{};var jo,NQ=0xdeadbeefcafe,Yk=(NQ&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");iT.jsbn.BigInteger=Ue;function pr(){return new Ue(null)}o(pr,"nbi");function TQ(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(TQ,"am1");function IQ(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(IQ,"am2");function Qk(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(Qk,"am3");typeof navigator>"u"?(Ue.prototype.am=Qk,jo=28):Yk&&navigator.appName=="Microsoft Internet Explorer"?(Ue.prototype.am=IQ,jo=30):Yk&&navigator.appName!="Netscape"?(Ue.prototype.am=TQ,jo=26):(Ue.prototype.am=Qk,jo=28);Ue.prototype.DB=jo;Ue.prototype.DM=(1<<jo)-1;Ue.prototype.DV=1<<jo;var aT=52;Ue.prototype.FV=Math.pow(2,aT);Ue.prototype.F1=aT-jo;Ue.prototype.F2=2*jo-aT;var _Q="0123456789abcdefghijklmnopqrstuvwxyz",cS=new Array,_p,Di;_p=48;for(Di=0;Di<=9;++Di)cS[_p++]=Di;_p=97;for(Di=10;Di<36;++Di)cS[_p++]=Di;_p=65;for(Di=10;Di<36;++Di)cS[_p++]=Di;function Zk(r){return _Q.charAt(r)}o(Zk,"int2char");function e4(r,e){var t=cS[r.charCodeAt(e)];return t??-1}o(e4,"intAt");function DQ(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(DQ,"bnpCopyTo");function BQ(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(BQ,"bnpFromInt");function Xu(r){var e=pr();return e.fromInt(r),e}o(Xu,"nbv");function RQ(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:e4(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(RQ,"bnpFromString");function OQ(){for(var r=this.s&this.DM;this.t>0&&this.data[this.t-1]==r;)--this.t}o(OQ,"bnpClamp");function PQ(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=Zk(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+=Zk(n));return s?i:"0"}o(PQ,"bnToString");function kQ(){var r=pr();return Ue.ZERO.subTo(this,r),r}o(kQ,"bnNegate");function LQ(){return this.s<0?this.negate():this}o(LQ,"bnAbs");function VQ(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(VQ,"bnCompareTo");function lS(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(lS,"nbits");function UQ(){return this.t<=0?0:this.DB*(this.t-1)+lS(this.data[this.t-1]^this.s&this.DM)}o(UQ,"bnBitLength");function jQ(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(jQ,"bnpDLShiftTo");function FQ(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(FQ,"bnpDRShiftTo");function MQ(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(MQ,"bnpLShiftTo");function qQ(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(qQ,"bnpRShiftTo");function HQ(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(HQ,"bnpSubTo");function KQ(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(KQ,"bnpMultiplyTo");function $Q(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($Q,"bnpSquareTo");function GQ(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=pr());var i=pr(),a=this.s,u=r.s,c=this.DB-lS(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,S=t.t,w=S-l,C=e??pr();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[--S]==h?this.DM:Math.floor(t.data[S]*g+(t.data[S-1]+v)*y);if((t.data[S]+=i.am(0,_,t,w,0,l))<_)for(i.dlShiftTo(w,C),t.subTo(C,t);t.data[S]<--_;)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(GQ,"bnpDivRemTo");function XQ(r){var e=pr();return this.abs().divRemTo(r,null,e),this.s<0&&e.compareTo(Ue.ZERO)>0&&r.subTo(e,e),e}o(XQ,"bnMod");function Gl(r){this.m=r}o(Gl,"Classic");function WQ(r){return r.s<0||r.compareTo(this.m)>=0?r.mod(this.m):r}o(WQ,"cConvert");function zQ(r){return r}o(zQ,"cRevert");function JQ(r){r.divRemTo(this.m,null,r)}o(JQ,"cReduce");function YQ(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(YQ,"cMulTo");function QQ(r,e){r.squareTo(e),this.reduce(e)}o(QQ,"cSqrTo");Gl.prototype.convert=WQ;Gl.prototype.revert=zQ;Gl.prototype.reduce=JQ;Gl.prototype.mulTo=YQ;Gl.prototype.sqrTo=QQ;function ZQ(){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(ZQ,"bnpInvDigit");function Xl(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(Xl,"Montgomery");function eZ(r){var e=pr();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(eZ,"montConvert");function tZ(r){var e=pr();return r.copyTo(e),this.reduce(e),e}o(tZ,"montRevert");function rZ(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(rZ,"montReduce");function nZ(r,e){r.squareTo(e),this.reduce(e)}o(nZ,"montSqrTo");function sZ(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(sZ,"montMulTo");Xl.prototype.convert=eZ;Xl.prototype.revert=tZ;Xl.prototype.reduce=rZ;Xl.prototype.mulTo=sZ;Xl.prototype.sqrTo=nZ;function iZ(){return(this.t>0?this.data[0]&1:this.s)==0}o(iZ,"bnpIsEven");function aZ(r,e){if(r>4294967295||r<1)return Ue.ONE;var t=pr(),n=pr(),s=e.convert(this),i=lS(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(aZ,"bnpExp");function oZ(r,e){var t;return r<256||e.isEven()?t=new Gl(e):t=new Xl(e),this.exp(r,t)}o(oZ,"bnModPowInt");Ue.prototype.copyTo=DQ;Ue.prototype.fromInt=BQ;Ue.prototype.fromString=RQ;Ue.prototype.clamp=OQ;Ue.prototype.dlShiftTo=jQ;Ue.prototype.drShiftTo=FQ;Ue.prototype.lShiftTo=MQ;Ue.prototype.rShiftTo=qQ;Ue.prototype.subTo=HQ;Ue.prototype.multiplyTo=KQ;Ue.prototype.squareTo=$Q;Ue.prototype.divRemTo=GQ;Ue.prototype.invDigit=ZQ;Ue.prototype.isEven=iZ;Ue.prototype.exp=aZ;Ue.prototype.toString=PQ;Ue.prototype.negate=kQ;Ue.prototype.abs=LQ;Ue.prototype.compareTo=VQ;Ue.prototype.bitLength=UQ;Ue.prototype.mod=XQ;Ue.prototype.modPowInt=oZ;Ue.ZERO=Xu(0);Ue.ONE=Xu(1);function uZ(){var r=pr();return this.copyTo(r),r}o(uZ,"bnClone");function cZ(){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(cZ,"bnIntValue");function lZ(){return this.t==0?this.s:this.data[0]<<24>>24}o(lZ,"bnByteValue");function fZ(){return this.t==0?this.s:this.data[0]<<16>>16}o(fZ,"bnShortValue");function hZ(r){return Math.floor(Math.LN2*this.DB/Math.log(r))}o(hZ,"bnpChunkSize");function pZ(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}o(pZ,"bnSigNum");function dZ(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=Xu(t),s=pr(),i=pr(),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(dZ,"bnpToRadix");function mZ(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=e4(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(mZ,"bnpFromRadix");function gZ(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),oT,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(gZ,"bnpFromNumber");function vZ(){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(vZ,"bnToByteArray");function yZ(r){return this.compareTo(r)==0}o(yZ,"bnEquals");function xZ(r){return this.compareTo(r)<0?this:r}o(xZ,"bnMin");function wZ(r){return this.compareTo(r)>0?this:r}o(wZ,"bnMax");function SZ(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(SZ,"bnpBitwiseTo");function EZ(r,e){return r&e}o(EZ,"op_and");function bZ(r){var e=pr();return this.bitwiseTo(r,EZ,e),e}o(bZ,"bnAnd");function oT(r,e){return r|e}o(oT,"op_or");function AZ(r){var e=pr();return this.bitwiseTo(r,oT,e),e}o(AZ,"bnOr");function t4(r,e){return r^e}o(t4,"op_xor");function CZ(r){var e=pr();return this.bitwiseTo(r,t4,e),e}o(CZ,"bnXor");function r4(r,e){return r&~e}o(r4,"op_andnot");function NZ(r){var e=pr();return this.bitwiseTo(r,r4,e),e}o(NZ,"bnAndNot");function TZ(){for(var r=pr(),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(TZ,"bnNot");function IZ(r){var e=pr();return r<0?this.rShiftTo(-r,e):this.lShiftTo(r,e),e}o(IZ,"bnShiftLeft");function _Z(r){var e=pr();return r<0?this.lShiftTo(-r,e):this.rShiftTo(r,e),e}o(_Z,"bnShiftRight");function DZ(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(DZ,"lbit");function BZ(){for(var r=0;r<this.t;++r)if(this.data[r]!=0)return r*this.DB+DZ(this.data[r]);return this.s<0?this.t*this.DB:-1}o(BZ,"bnGetLowestSetBit");function RZ(r){for(var e=0;r!=0;)r&=r-1,++e;return e}o(RZ,"cbit");function OZ(){for(var r=0,e=this.s&this.DM,t=0;t<this.t;++t)r+=RZ(this.data[t]^e);return r}o(OZ,"bnBitCount");function PZ(r){var e=Math.floor(r/this.DB);return e>=this.t?this.s!=0:(this.data[e]&1<<r%this.DB)!=0}o(PZ,"bnTestBit");function kZ(r,e){var t=Ue.ONE.shiftLeft(r);return this.bitwiseTo(t,e,t),t}o(kZ,"bnpChangeBit");function LZ(r){return this.changeBit(r,oT)}o(LZ,"bnSetBit");function VZ(r){return this.changeBit(r,r4)}o(VZ,"bnClearBit");function UZ(r){return this.changeBit(r,t4)}o(UZ,"bnFlipBit");function jZ(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(jZ,"bnpAddTo");function FZ(r){var e=pr();return this.addTo(r,e),e}o(FZ,"bnAdd");function MZ(r){var e=pr();return this.subTo(r,e),e}o(MZ,"bnSubtract");function qZ(r){var e=pr();return this.multiplyTo(r,e),e}o(qZ,"bnMultiply");function HZ(r){var e=pr();return this.divRemTo(r,e,null),e}o(HZ,"bnDivide");function KZ(r){var e=pr();return this.divRemTo(r,null,e),e}o(KZ,"bnRemainder");function $Z(r){var e=pr(),t=pr();return this.divRemTo(r,e,t),new Array(e,t)}o($Z,"bnDivideAndRemainder");function GZ(r){this.data[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()}o(GZ,"bnpDMultiply");function XZ(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(XZ,"bnpDAddOffset");function Ng(){}o(Ng,"NullExp");function n4(r){return r}o(n4,"nNop");function WZ(r,e,t){r.multiplyTo(e,t)}o(WZ,"nMulTo");function zZ(r,e){r.squareTo(e)}o(zZ,"nSqrTo");Ng.prototype.convert=n4;Ng.prototype.revert=n4;Ng.prototype.mulTo=WZ;Ng.prototype.sqrTo=zZ;function JZ(r){return this.exp(r,new Ng)}o(JZ,"bnPow");function YZ(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(YZ,"bnpMultiplyLowerTo");function QZ(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(QZ,"bnpMultiplyUpperTo");function Dp(r){this.r2=pr(),this.q3=pr(),Ue.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r),this.m=r}o(Dp,"Barrett");function ZZ(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=pr();return r.copyTo(e),this.reduce(e),e}o(ZZ,"barrettConvert");function eee(r){return r}o(eee,"barrettRevert");function tee(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(tee,"barrettReduce");function ree(r,e){r.squareTo(e),this.reduce(e)}o(ree,"barrettSqrTo");function nee(r,e,t){r.multiplyTo(e,t),this.reduce(t)}o(nee,"barrettMulTo");Dp.prototype.convert=ZZ;Dp.prototype.revert=eee;Dp.prototype.reduce=tee;Dp.prototype.mulTo=nee;Dp.prototype.sqrTo=ree;function see(r,e){var t=r.bitLength(),n,s=Xu(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 Gl(e):e.isEven()?i=new Dp(e):i=new Xl(e);var a=new Array,u=3,c=n-1,l=(1<<n)-1;if(a[1]=i.convert(this),n>1){var h=pr();for(i.sqrTo(a[1],h);u<=l;)a[u]=pr(),i.mulTo(h,a[u-2],a[u]),u+=2}var m=r.t-1,g,y=!0,v=pr(),S;for(t=lS(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):(S=s,s=v,v=S),i.mulTo(v,a[g],s)}for(;m>=0&&(r.data[m]&1<<t)==0;)i.sqrTo(s,v),S=s,s=v,v=S,--t<0&&(t=this.DB-1,--m)}return i.revert(s)}o(see,"bnModPow");function iee(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(iee,"bnGCD");function aee(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(aee,"bnpModInt");function oee(r){var e=r.isEven();if(this.isEven()&&e||r.signum()==0)return Ue.ZERO;for(var t=r.clone(),n=this.clone(),s=Xu(1),i=Xu(0),a=Xu(0),u=Xu(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(oee,"bnModInverse");var ua=[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],uee=(1<<26)/ua[ua.length-1];function cee(r){var e,t=this.abs();if(t.t==1&&t.data[0]<=ua[ua.length-1]){for(e=0;e<ua.length;++e)if(t.data[0]==ua[e])return!0;return!1}if(t.isEven())return!1;for(e=1;e<ua.length;){for(var n=ua[e],s=e+1;s<ua.length&&n<uee;)n*=ua[s++];for(n=t.modInt(n);e<s;)if(n%ua[e++]==0)return!1}return t.millerRabin(r)}o(cee,"bnIsProbablePrime");function lee(r){var e=this.subtract(Ue.ONE),t=e.getLowestSetBit();if(t<=0)return!1;for(var n=e.shiftRight(t),s=fee(),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(lee,"bnpMillerRabin");function fee(){return{nextBytes:o(function(r){for(var e=0;e<r.length;++e)r[e]=Math.floor(Math.random()*256)},"nextBytes")}}o(fee,"bnGetPrng");Ue.prototype.chunkSize=hZ;Ue.prototype.toRadix=dZ;Ue.prototype.fromRadix=mZ;Ue.prototype.fromNumber=gZ;Ue.prototype.bitwiseTo=SZ;Ue.prototype.changeBit=kZ;Ue.prototype.addTo=jZ;Ue.prototype.dMultiply=GZ;Ue.prototype.dAddOffset=XZ;Ue.prototype.multiplyLowerTo=YZ;Ue.prototype.multiplyUpperTo=QZ;Ue.prototype.modInt=aee;Ue.prototype.millerRabin=lee;Ue.prototype.clone=uZ;Ue.prototype.intValue=cZ;Ue.prototype.byteValue=lZ;Ue.prototype.shortValue=fZ;Ue.prototype.signum=pZ;Ue.prototype.toByteArray=vZ;Ue.prototype.equals=yZ;Ue.prototype.min=xZ;Ue.prototype.max=wZ;Ue.prototype.and=bZ;Ue.prototype.or=AZ;Ue.prototype.xor=CZ;Ue.prototype.andNot=NZ;Ue.prototype.not=TZ;Ue.prototype.shiftLeft=IZ;Ue.prototype.shiftRight=_Z;Ue.prototype.getLowestSetBit=BZ;Ue.prototype.bitCount=OZ;Ue.prototype.testBit=PZ;Ue.prototype.setBit=LZ;Ue.prototype.clearBit=VZ;Ue.prototype.flipBit=UZ;Ue.prototype.add=FZ;Ue.prototype.subtract=MZ;Ue.prototype.multiply=qZ;Ue.prototype.divide=HZ;Ue.prototype.remainder=KZ;Ue.prototype.divideAndRemainder=$Z;Ue.prototype.modPow=see;Ue.prototype.modInverse=oee;Ue.prototype.pow=JZ;Ue.prototype.gcd=iee;Ue.prototype.isProbablePrime=cee});var Bp=re((Mve,u4)=>{"use strict";var Ha=zt();Ua();hr();var a4=u4.exports=Ha.sha1=Ha.sha1||{};Ha.md.sha1=Ha.md.algorithms.sha1=a4;a4.create=function(){o4||hee();var r=null,e=Ha.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=Ha.util.createBuffer(),r={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},n},n.start(),n.update=function(s,i){i==="utf8"&&(s=Ha.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),i4(r,t,e),(e.read>2048||e.length()===0)&&e.compact(),n},n.digest=function(){var s=Ha.util.createBuffer();s.putBytes(e.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,a=i&n.blockLength-1;s.putBytes(uT.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};i4(m,t,s);var g=Ha.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 uT=null,o4=!1;function hee(){uT="\x80",uT+=Ha.util.fillString("\0",64),o4=!0}o(hee,"_init");function i4(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(i4,"_update")});var cT=re((Hve,l4)=>{"use strict";var Ka=zt();hr();_i();Bp();var c4=l4.exports=Ka.pkcs1=Ka.pkcs1||{};c4.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=Ka.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=Ka.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 S=fS(s,u-i.digestLength-1,a),w=Ka.util.xorBytes(v,S,v.length),C=fS(w,i.digestLength,a),_=Ka.util.xorBytes(s,C,s.length);return"\0"+_+w};c4.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=Ka.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=fS(h,s.digestLength,i),g=Ka.util.xorBytes(l,m,l.length),y=fS(g,a-s.digestLength-1,i),v=Ka.util.xorBytes(h,y,h.length),S=v.substring(0,s.digestLength),w=c!=="\0",C=0;C<s.digestLength;++C)w|=u.charAt(C)!==S.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 fS(r,e,t){t||(t=Ka.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(fS,"rsa_mgf1")});var fT=re(($ve,lT)=>{"use strict";var Wu=zt();hr();Tg();_i();(function(){if(Wu.prime){lT.exports=Wu.prime;return}var r=lT.exports=Wu.prime=Wu.prime||{},e=Wu.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 S=g.prng||Wu.random,w={nextBytes:o(function(C){for(var _=S.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 S=l(m,g),w=0,C=h(S.bitLength());"millerRabinTests"in y&&(C=y.millerRabinTests);var _=10;"maxBlockTime"in y&&(_=y.maxBlockTime),u(S,m,g,w,C,_,v)}o(a,"primeincFindPrimeWithoutWorkers");function u(m,g,y,v,S,w,C){var _=+new Date;do{if(m.bitLength()>g&&(m=l(g,y)),m.isProbablePrime(S))return C(null,m);m.dAddOffset(t[v++%8],0)}while(w<0||+new Date-_<w);Wu.util.setImmediate(function(){u(m,g,y,v,S,w,C)})}o(u,"_primeinc");function c(m,g,y,v){if(typeof Worker>"u")return a(m,g,y,v);var S=l(m,g),w=y.workers,C=y.workLoad||100,_=C*30/8,b=y.workerScript||"forge/prime.worker.js";if(w===-1)return Wu.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))}S.bitLength()>m&&(S=l(m,g));var he=S.toString(16);K.target.postMessage({hex:he,workLoad:C}),S.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 Ig=re((Xve,v4)=>{"use strict";var wt=zt();oa();Tg();Gu();cT();fT();_i();hr();typeof ur>"u"&&(ur=wt.jsbn.BigInteger);var ur,hT=wt.util.isNodejs?Je("crypto"):null,ge=wt.asn1,Bi=wt.util;wt.pki=wt.pki||{};v4.exports=wt.pki.rsa=wt.rsa=wt.rsa||{};var Mt=wt.pki,pee=[6,4,2,4,2,4,6,2],dee={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"}]},mee={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"}]},gee={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"}]},vee=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"}]}]},yee={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"}]},xee=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"),m4=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=g4(r,e,t)):(s=wt.util.createBuffer(),s.putBytes(r));for(var a=new ur(s.toHex(),16),u=m4(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=m4(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?hS(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(See(r.num.bitLength()))?++r.pqState:r.num.dAddOffset(pee[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(f4("generateKeyPair"))return hT.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(h4("generateKey")&&h4("exportKey"))return Bi.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:d4(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(u){return Bi.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(p4("generateKey")&&p4("exportKey")){var s=Bi.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:r,publicExponent:d4(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);s.oncomplete=function(u){var c=u.target.result,l=Bi.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(f4("generateKeyPairSync")){var i=hT.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;wee(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 g4(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=hS(l,t,!0);var h=ge.fromDer(l,{parseAllBytes:a._parseAllDigestBytes}),m={},g=[];if(!ge.validate(h,yee,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 identifer NULL parameters.");return c===m.digest},"verify")}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:o(function(c,l){return l=hS(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:hS};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:xee},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,dee,e,t)&&(r=ge.fromDer(wt.util.createBuffer(e.privateKey))),e={},t=[],!ge.validate(r,mee,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,$a(r.n)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,$a(r.e)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,$a(r.d)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,$a(r.p)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,$a(r.q)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,$a(r.dP)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,$a(r.dQ)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,$a(r.qInv))])};Mt.publicKeyFromAsn1=function(r){var e={},t=[];if(ge.validate(r,vee,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,gee,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,$a(r.n)),ge.create(ge.Class.UNIVERSAL,ge.Type.INTEGER,!1,$a(r.e))])};function g4(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(g4,"_encodePkcs1_v1_5");function hS(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(hS,"_decodePkcs1_v1_5");function wee(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(wee,"_generateKeyPair");function $a(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($a,"_bnToBytes");function See(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(See,"_getMillerRabinTests");function f4(r){return wt.util.isNodejs&&typeof hT[r]=="function"}o(f4,"_detectNodeCrypto");function h4(r){return typeof Bi.globalScope<"u"&&typeof Bi.globalScope.crypto=="object"&&typeof Bi.globalScope.crypto.subtle=="object"&&typeof Bi.globalScope.crypto.subtle[r]=="function"}o(h4,"_detectSubtleCrypto");function p4(r){return typeof Bi.globalScope<"u"&&typeof Bi.globalScope.msCrypto=="object"&&typeof Bi.globalScope.msCrypto.subtle=="object"&&typeof Bi.globalScope.msCrypto.subtle[r]=="function"}o(p4,"_detectSubtleMsCrypto");function d4(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(d4,"_intToUint8Array")});var pT=re((zve,E4)=>{"use strict";var ct=zt();$u();oa();Cg();Ua();Gu();oS();$l();_i();sT();Ig();hr();typeof y4>"u"&&(y4=ct.jsbn.BigInteger);var y4,Ne=ct.asn1,$t=ct.pki=ct.pki||{};E4.exports=$t.pbe=ct.pbe=ct.pbe||{};var Wl=$t.oids,Eee={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"}]},bee={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"}]}]},Aee={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=Wl["aes128-CBC"],m=ct.aes.createEncryptionCipher;break;case"aes192":a=24,l=16,h=Wl["aes192-CBC"],m=ct.aes.createEncryptionCipher;break;case"aes256":a=32,l=16,h=Wl["aes256-CBC"],m=ct.aes.createEncryptionCipher;break;case"des":a=8,l=8,h=Wl.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=S4(y),S=ct.pkcs5.pbkdf2(e,n,s,a,v),w=ct.random.getBytesSync(l),C=m(S);C.start(w),C.update(Ne.toDer(r)),C.finish(),c=C.output.getBytes();var _=Cee(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(Wl.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(Wl.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),S=$t.pbe.generatePkcs12Key(e,b,1,s,a),w=$t.pbe.generatePkcs12Key(e,b,2,s,a),C=ct.des.createEncryptionCipher(S);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(Wl["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,Eee,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 S=l*Math.ceil(y/l),w=new ct.util.ByteBuffer;for(u=0;u<S;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,bee,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=w4(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,Aee,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(S,w){var C=ct.rc2.createDecryptionCipher(S,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=w4(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=[x4(n,r+e)],i=16,a=1;i<t;++a,i+=16)s.push(x4(n,s[a-1]+r+e));return s.join("").substr(0,t)};function x4(r,e){return r.start().update(e).digest().getBytes()}o(x4,"hash");function w4(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 S4(e)}o(w4,"prfOidToMessageDigest");function S4(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(S4,"prfAlgorithmToMessageDigest");function Cee(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(Cee,"createPbkdf2Params")});var dT=re((Yve,C4)=>{"use strict";var Rp=zt();oa();hr();var at=Rp.asn1,Op=C4.exports=Rp.pkcs7asn1=Rp.pkcs7asn1||{};Rp.pkcs7=Rp.pkcs7||{};Rp.pkcs7.asn1=Op;var b4={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"}]};Op.contentInfoValidator=b4;var A4={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"}]};Op.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(A4)};Op.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(A4)};var Nee={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"}]};Op.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"},b4,{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:[Nee]}]};Op.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 mT=re((Qve,N4)=>{"use strict";var zl=zt();hr();zl.mgf=zl.mgf||{};var Tee=N4.exports=zl.mgf.mgf1=zl.mgf1=zl.mgf1||{};Tee.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 I4=re((e1e,T4)=>{"use strict";var pS=zt();mT();T4.exports=pS.mgf=pS.mgf||{};pS.mgf.mgf1=pS.mgf1});var dS=re((t1e,_4)=>{"use strict";var Jl=zt();_i();hr();var Iee=_4.exports=Jl.pss=Jl.pss||{};Iee.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=Jl.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||Jl.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 S=new Jl.util.ByteBuffer;S.fillWithByte(0,8),S.putBytes(y),S.putBytes(v),e.start(),e.update(S.getBytes());var w=e.digest().getBytes(),C=new Jl.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,S=l.substr(0,v),w=l.substr(v,n),C=65280>>8*y-g&255;if((S.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(S.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 Jl.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 vS=re((r1e,P4)=>{"use strict";var St=zt();$u();oa();Cg();Ua();I4();Gu();$l();dS();Ig();hr();var L=St.asn1,We=P4.exports=St.pki=St.pki||{},cr=We.oids,an={};an.CN=cr.commonName;an.commonName="CN";an.C=cr.countryName;an.countryName="C";an.L=cr.localityName;an.localityName="L";an.ST=cr.stateOrProvinceName;an.stateOrProvinceName="ST";an.O=cr.organizationName;an.organizationName="O";an.OU=cr.organizationalUnitName;an.organizationalUnitName="OU";an.E=cr.emailAddress;an.emailAddress="E";var B4=St.pki.rsa.publicKeyValidator,_ee={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"},B4,{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"}]},Dee={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"}]}]},Bee={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"},B4,{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}]}]}]},Ree={name:"CertificationRequest",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[Bee,{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"}]};We.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 an&&(i.shortName=an[i.name])),e&&(e.update(i.type),e.update(i.value)),t.push(i)}return t};We.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 an&&(u.shortName=an[u.name])),u.type===cr.extensionRequest){u.extensions=[];for(var c=0;c<u.value.length;++c)u.extensions.push(We.certificateExtensionFromAsn1(u.value[c]))}e.push(u)}return e};function zu(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(zu,"_getAttribute");var mS=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,Dee,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"),gS=o(function(r){switch(cr[r.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return St.md.sha1.create();case"md5WithRSAEncryption":return St.md.md5.create();case"sha256WithRSAEncryption":return St.md.sha256.create();case"sha384WithRSAEncryption":return St.md.sha384.create();case"sha512WithRSAEncryption":return St.md.sha512.create();case"RSASSA-PSS":return St.md.sha256.create();default:var e=new Error("Could not compute "+r.type+" digest. Unknown signature OID.");throw e.signatureOid=r.signatureOid,e}},"_createSignatureDigest"),R4=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||St.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||St.mgf[s]===void 0){var i=new Error("Unsupported MGF function.");throw i.oid=e.signatureParameters.mgf.algorithmOid,i.name=s,i}if(s=St.mgf[s].create(St.md[n].create()),n=cr[e.signatureParameters.hash.algorithmOid],n===void 0||St.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=St.pss.create(St.md[n].create(),s,e.signatureParameters.saltLength);break}return e.publicKey.verify(r.md.digest().getBytes(),r.signature,t)},"_verifySignature");We.certificateFromPem=function(r,e,t){var n=St.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 We.certificateFromAsn1(i,e)};We.certificateToPem=function(r,e){var t={type:"CERTIFICATE",body:L.toDer(We.certificateToAsn1(r)).getBytes()};return St.pem.encode(t,{maxline:e})};We.publicKeyFromPem=function(r){var e=St.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 We.publicKeyFromAsn1(n)};We.publicKeyToPem=function(r,e){var t={type:"PUBLIC KEY",body:L.toDer(We.publicKeyToAsn1(r)).getBytes()};return St.pem.encode(t,{maxline:e})};We.publicKeyToRSAPublicKeyPem=function(r,e){var t={type:"RSA PUBLIC KEY",body:L.toDer(We.publicKeyToRSAPublicKey(r)).getBytes()};return St.pem.encode(t,{maxline:e})};We.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||St.md.sha1.create(),n=e.type||"RSAPublicKey",s;switch(n){case"RSAPublicKey":s=L.toDer(We.publicKeyToRSAPublicKey(r)).getBytes();break;case"SubjectPublicKeyInfo":s=L.toDer(We.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};We.certificationRequestFromPem=function(r,e,t){var n=St.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 We.certificationRequestFromAsn1(i,e)};We.certificationRequestToPem=function(r,e){var t={type:"CERTIFICATE REQUEST",body:L.toDer(We.certificationRequestToAsn1(r)).getBytes()};return St.pem.encode(t,{maxline:e})};We.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 zu(r.issuer,e)},r.issuer.addField=function(e){Ri([e]),r.issuer.attributes.push(e)},r.issuer.attributes=[],r.issuer.hash=null,r.subject={},r.subject.getField=function(e){return zu(r.subject,e)},r.subject.addField=function(e){Ri([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){Ri(e),r.subject.attributes=e,delete r.subject.uniqueId,t&&(r.subject.uniqueId=t),r.subject.hash=null},r.setIssuer=function(e,t){Ri(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)O4(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||St.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=We.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=gS({signatureOid:e.signatureOid,type:"certificate"});var u=e.tbsCertificate||We.getTBSCertificate(e),c=L.toDer(u);a.update(c.getBytes())}return a!==null&&(t=R4({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 We.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 St.util.hexToBytes(n.subjectKeyIdentifier)===s}}return!1},r};We.certificateFromAsn1=function(r,e){var t={},n=[];if(!L.validate(r,_ee,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!==We.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=We.createCertificate();a.version=t.certVersion?t.certVersion.charCodeAt(0):0;var u=St.util.createBuffer(t.certSerialNumber);a.serialNumber=u.toHex(),a.signatureOid=St.asn1.derToOid(t.certSignatureOid),a.signatureParameters=mS(a.signatureOid,t.certSignatureParams,!0),a.siginfo.algorithmOid=St.asn1.derToOid(t.certinfoSignatureOid),a.siginfo.parameters=mS(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=gS({signatureOid:a.signatureOid,type:"certificate"});var l=L.toDer(a.tbsCertificate);a.md.update(l.getBytes())}var h=St.md.sha1.create(),m=L.toDer(t.certIssuer);h.update(m.getBytes()),a.issuer.getField=function(v){return zu(a.issuer,v)},a.issuer.addField=function(v){Ri([v]),a.issuer.attributes.push(v)},a.issuer.attributes=We.RDNAttributesAsArray(t.certIssuer),t.certIssuerUniqueId&&(a.issuer.uniqueId=t.certIssuerUniqueId),a.issuer.hash=h.digest().toHex();var g=St.md.sha1.create(),y=L.toDer(t.certSubject);return g.update(y.getBytes()),a.subject.getField=function(v){return zu(a.subject,v)},a.subject.addField=function(v){Ri([v]),a.subject.attributes.push(v)},a.subject.attributes=We.RDNAttributesAsArray(t.certSubject),t.certSubjectUniqueId&&(a.subject.uniqueId=t.certSubjectUniqueId),a.subject.hash=g.digest().toHex(),t.certExtensions?a.extensions=We.certificateExtensionsFromAsn1(t.certExtensions):a.extensions=[],a.publicKey=We.publicKeyFromAsn1(t.subjectPublicKeyInfo),a};We.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(We.certificateExtensionFromAsn1(n.value[s]));return e};We.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=St.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=St.util.bytesToHex(t.value)}}return e};We.certificationRequestFromAsn1=function(r,e){var t={},n=[];if(!L.validate(r,Ree,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!==We.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=We.createCertificationRequest();if(a.version=t.csrVersion?t.csrVersion.charCodeAt(0):0,a.signatureOid=St.asn1.derToOid(t.csrSignatureOid),a.signatureParameters=mS(a.signatureOid,t.csrSignatureParams,!0),a.siginfo.algorithmOid=St.asn1.derToOid(t.csrSignatureOid),a.siginfo.parameters=mS(a.siginfo.algorithmOid,t.csrSignatureParams,!1),a.signature=t.csrSignature,a.certificationRequestInfo=t.certificationRequestInfo,e){a.md=gS({signatureOid:a.signatureOid,type:"certification request"});var u=L.toDer(a.certificationRequestInfo);a.md.update(u.getBytes())}var c=St.md.sha1.create();return a.subject.getField=function(l){return zu(a.subject,l)},a.subject.addField=function(l){Ri([l]),a.subject.attributes.push(l)},a.subject.attributes=We.RDNAttributesAsArray(t.certificationRequestInfoSubject,c),a.subject.hash=c.digest().toHex(),a.publicKey=We.publicKeyFromAsn1(t.subjectPublicKeyInfo),a.getAttribute=function(l){return zu(a,l)},a.addAttribute=function(l){Ri([l]),a.attributes.push(l)},a.attributes=We.CRIAttributesAsArray(t.certificationRequestInfoAttributes||[]),a};We.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 zu(r.subject,e)},r.subject.addField=function(e){Ri([e]),r.subject.attributes.push(e)},r.subject.attributes=[],r.subject.hash=null,r.publicKey=null,r.attributes=[],r.getAttribute=function(e){return zu(r,e)},r.addAttribute=function(e){Ri([e]),r.attributes.push(e)},r.md=null,r.setSubject=function(e){Ri(e),r.subject.attributes=e,r.subject.hash=null},r.setAttributes=function(e){Ri(e),r.attributes=e},r.sign=function(e,t){r.md=t||St.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=We.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=gS({signatureOid:r.signatureOid,type:"certification request"});var n=r.certificationRequestInfo||We.getCertificationRequestInfo(r),s=L.toDer(n);t.update(s.getBytes())}return t!==null&&(e=R4({certificate:r,md:t,signature:r.signature})),e},r};function Pp(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=St.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(Pp,"_dnToAsn1");function Ri(r){for(var e,t=0;t<r.length;++t){if(e=r[t],typeof e.name>"u"&&(e.type&&e.type in We.oids?e.name=We.oids[e.type]:e.shortName&&e.shortName in an&&(e.name=We.oids[an[e.shortName]])),typeof e.type>"u")if(e.name&&e.name in We.oids)e.type=We.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 an&&(e.shortName=an[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(We.certificateExtensionToAsn1(O4(e.extensions[s])))}if(typeof e.value>"u"){var n=new Error("Attribute value not specified.");throw n.attribute=e,n}}}o(Ri,"_fillMissingFields");function O4(r,e){if(e=e||{},typeof r.name>"u"&&r.id&&r.id in We.oids&&(r.name=We.oids[r.id]),typeof r.id>"u")if(r.name&&r.name in We.oids)r.id=We.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=St.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,[Pp(r.authorityCertIssuer===!0?e.cert.issuer:r.authorityCertIssuer)])];u.push(L.create(L.Class.CONTEXT_SPECIFIC,1,!0,y))}if(r.serialNumber){var v=St.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,S=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=St.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))}S.value.push(L.create(L.Class.CONTEXT_SPECIFIC,0,!0,[w])),u.push(S)}if(typeof r.value>"u"){var t=new Error("Extension value not specified.");throw t.extension=r,t}return r}o(O4,"_fillMissingExtensionFields");function gT(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(gT,"_signatureParametersToAsn1");function Oee(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=St.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(Oee,"_CRIAttributesToAsn1");var Pee=new Date("1950-01-01T00:00:00Z"),kee=new Date("2050-01-01T00:00:00Z");function D4(r){return r>=Pee&&r<kee?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(D4,"_dateToAsn1");We.getTBSCertificate=function(r){var e=D4(r.validity.notBefore),t=D4(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,St.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()),gT(r.siginfo.algorithmOid,r.siginfo.parameters)]),Pp(r.issuer),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[e,t]),Pp(r.subject),We.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(We.certificateExtensionsToAsn1(r.extensions)),n};We.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()),Pp(r.subject),We.publicKeyToAsn1(r.publicKey),Oee(r)]);return e};We.distinguishedNameToAsn1=function(r){return Pp(r)};We.certificateToAsn1=function(r){var e=r.tbsCertificate||We.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()),gT(r.signatureOid,r.signatureParameters)]),L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.signature)])};We.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(We.certificateExtensionToAsn1(r[n]));return e};We.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};We.certificationRequestToAsn1=function(r){var e=r.certificationRequestInfo||We.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()),gT(r.signatureOid,r.signatureParameters)]),L.create(L.Class.UNIVERSAL,L.Type.BITSTRING,!1,"\0"+r.signature)])};We.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=St.pki.certificateFromPem(a)),n(a.subject),!e.hasCertificate(a))if(a.subject.hash in e.certs){var u=e.certs[a.subject.hash];St.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=St.pki.certificateFromPem(a));var u=t(a.subject);if(!u)return!1;St.util.isArray(u)||(u=[u]);for(var c=L.toDer(We.certificateToAsn1(a)).getBytes(),l=0;l<u.length;++l){var h=L.toDer(We.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(!St.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=St.pki.certificateFromPem(a)),n(a.subject),!e.hasCertificate(a))return null;var c=t(a.subject);if(!St.util.isArray(c))return u=e.certs[a.subject.hash],delete e.certs[a.subject.hash],u;for(var l=L.toDer(We.certificateToAsn1(a)).getBytes(),h=0;h<c.length;++h){var m=L.toDer(We.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=St.md.sha1.create();a.attributes=We.RDNAttributesAsArray(Pp(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};We.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"};We.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:We.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;St.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:We.certificateError.bad_certificate})}a===null&&(!l||h)&&!r.hasCertificate(c)&&(a={message:"Certificate is not trusted.",error:We.certificateError.unknown_ca})}if(a===null&&l&&!c.isIssuer(l)&&(a={message:"Certificate issuer is invalid.",error:We.certificateError.bad_certificate}),a===null)for(var y={keyUsage:!0,basicConstraints:!0},v=0;a===null&&v<c.extensions.length;++v){var S=c.extensions[v];S.critical&&!(S.name in y)&&(a={message:"Certificate has an unsupported critical extension.",error:We.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:We.certificateError.bad_certificate}),a===null&&w!==null&&!w.cA&&(a={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:We.certificateError.bad_certificate}),a===null&&C!==null&&"pathLenConstraint"in w){var _=u-1;_>w.pathLenConstraint&&(a={message:"Certificate basicConstraints pathLenConstraint violated.",error:We.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:We.certificateError.bad_certificate}),(A||A===0)&&(typeof A=="object"&&!St.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 yT=re((s1e,L4)=>{"use strict";var Lr=zt();oa();Tp();Gu();dT();pT();_i();Ig();Bp();hr();vS();var ee=Lr.asn1,tr=Lr.pki,Dg=L4.exports=Lr.pkcs12=Lr.pkcs12||{},k4={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"}]},Lee={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"},k4,{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",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"}]}]},Vee={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"}]},Uee={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"}]},jee={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 _g(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(_g,"_getBagsByAttribute");Dg.pkcs12FromAsn1=function(r,e,t){typeof e=="string"?(t=e,e=!0):e===void 0&&(e=!0);var n={},s=[];if(!ee.validate(r,Lee,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&&(_=Lr.util.hexToBytes(w.localKeyIdHex)),_===void 0&&!("friendlyName"in w)&&"bagType"in w&&(C[w.bagType]=_g(a.safeContents,null,null,w.bagType)),_!==void 0&&(C.localKeyId=_g(a.safeContents,"localKeyId",_,w.bagType)),"friendlyName"in w&&(C.friendlyName=_g(a.safeContents,"friendlyName",w.friendlyName,w.bagType)),C},"getBags"),getBagsByFriendlyName:o(function(w,C){return _g(a.safeContents,"friendlyName",w,C)},"getBagsByFriendlyName"),getBagsByLocalKeyId:o(function(w,C){return _g(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=vT(u),n.mac){var c=null,l=0,h=ee.derToOid(n.macAlgorithm);switch(h){case tr.oids.sha1:c=Lr.md.sha1.create(),l=20;break;case tr.oids.sha256:c=Lr.md.sha256.create(),l=32;break;case tr.oids.sha384:c=Lr.md.sha384.create(),l=48;break;case tr.oids.sha512:c=Lr.md.sha512.create(),l=64;break;case tr.oids.md5:c=Lr.md.md5.create(),l=16;break}if(c===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+h);var m=new Lr.util.ByteBuffer(n.macSalt),g="macIterations"in n?parseInt(Lr.util.bytesToHex(n.macIterations),16):1,y=Dg.generateKey(t,m,3,g,l,c),v=Lr.hmac.create();v.start(c,y),v.update(u.value);var S=v.getMac();if(S.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return Fee(a,u.value,e,t),a};function vT(r){if(r.composed||r.constructed){for(var e=Lr.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(vT,"_decodePkcs7Data");function Fee(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,k4,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=vT(m).value;break;case tr.oids.encryptedData:h=Mee(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=qee(h,t,n),r.safeContents.push(l)}}o(Fee,"_decodeAuthenticatedSafe");function Mee(r,e){var t={},n=[];if(!ee.validate(r,Lr.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=vT(t.encryptedContentAsn1),c=Lr.util.createBuffer(u.value);if(a.update(c),!a.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return a.output.getBytes()}o(Mee,"_decryptSafeContents");function qee(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,Vee,a,u)){var c=new Error("Cannot read SafeBag.");throw c.errors=u,c}var l={type:ee.derToOid(a.bagId),attributes:Hee(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=jee,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 S=ee.fromDer(a.cert,e);try{l.cert=tr.certificateFromAsn1(S,!0)}catch{l.cert=null,l.asn1=S}},"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(qee,"_decodeSafeContents");function Hee(r){var e={};if(r!==void 0)for(var t=0;t<r.length;++t){var n={},s=[];if(!ee.validate(r[t],Uee,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(Hee,"_decodeBagAttributes");Dg.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=Lr.util.hexToBytes(s);else if(n.generateLocalKeyId)if(e){var a=Lr.util.isArray(e)?e[0]:e;typeof a=="string"&&(a=tr.certificateFromPem(a));var u=Lr.md.sha1.create();u.update(ee.toDer(tr.certificateToAsn1(a)).getBytes()),s=u.digest().getBytes()}else s=Lr.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&&(Lr.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),S=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(S)}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=Lr.md.sha1.create(),I=new Lr.util.ByteBuffer(Lr.random.getBytes(n.saltSize)),H=n.count,r=Dg.generateKey(t,I,3,H,20),K=Lr.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])};Dg.generateKey=Lr.pbe.generatePkcs12Key});var wT=re((a1e,V4)=>{"use strict";var Ju=zt();oa();Gu();pT();$l();oS();yT();dS();Ig();hr();vS();var xT=Ju.asn1,kp=V4.exports=Ju.pki=Ju.pki||{};kp.pemToDer=function(r){var e=Ju.pem.decode(r)[0];if(e.procType&&e.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Ju.util.createBuffer(e.body)};kp.privateKeyFromPem=function(r){var e=Ju.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=xT.fromDer(e.body);return kp.privateKeyFromAsn1(n)};kp.privateKeyToPem=function(r,e){var t={type:"RSA PRIVATE KEY",body:xT.toDer(kp.privateKeyToAsn1(r)).getBytes()};return Ju.pem.encode(t,{maxline:e})};kp.privateKeyInfoToPem=function(r,e){var t={type:"PRIVATE KEY",body:xT.toDer(r).getBytes()};return Ju.pem.encode(t,{maxline:e})}});var NT=re((o1e,$4)=>{"use strict";var je=zt();oa();Tp();nS();$l();wT();_i();Bp();hr();var SS=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 S=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),S.putBuffer(h.digest());return s.putBytes(je.util.xorBytes(y.getBytes(),S.getBytes(),n)),s},"prf_TLS1"),Kee=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"),$ee=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"),Gee=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"),ui=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"),Oi=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:ui(i,1),extensions:[]},s?(n.cipher_suite=i.getBytes(2),n.compression_method=i.getByte()):(n.cipher_suites=ui(i,2),n.compression_methods=ui(i,1)),a=t-(a-i.length()),a>0){for(var u=ui(i,2);u.length()>0;)n.extensions.push({type:[u.getByte(),u.getByte()],data:ui(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=ui(l.data,2);h.length()>0;){var m=h.getByte();if(m!==0)break;r.session.extensions.server_name.serverNameList.push(ui(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=F4,r.session.resuming=!0,r.session.sp.server_random=n.random.bytes()):(r.expect=Wee,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=AT,r.session.resuming=!0,r.session.sp.client_random=n.random.bytes()):(r.expect=r.verifyClient!==!1?tte:bT,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:ui(n,3)},i,a,u=[];try{for(;s.certificate_list.length()>0;)i=ui(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?U4:bT:(c?r.session.serverCertificate=u[0]:r.session.clientCertificate=u[0],j.verifyCertificateChain(r,u)&&(r.expect=c?U4:bT)),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=zee,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:ui(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=AT,r.session.clientCertificate!==null&&(r.expect=rte),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:ui(n,1),certificate_authorities:ui(n,2)};r.session.certificateRequest=s,r.expect=Jee,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:ui(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=AT,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=Zee;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=F4,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?Yee:nte,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=SS;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?Qee:ste,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 wS[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)),wS[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 Xee=0,Wee=1,U4=2,zee=3,Jee=4,F4=5,Yee=6,Qee=7,Zee=8,ete=0,tte=1,bT=2,rte=3,AT=4,nte=5,ste=6,U=j.handleUnexpected,M4=j.handleChangeCipherSpec,zn=j.handleAlert,Cs=j.handleHandshake,q4=j.handleApplicationData,Jn=j.handleHeartbeat,CT=[];CT[j.ConnectionEnd.client]=[[U,zn,Cs,U,Jn],[U,zn,Cs,U,Jn],[U,zn,Cs,U,Jn],[U,zn,Cs,U,Jn],[U,zn,Cs,U,Jn],[M4,zn,U,U,Jn],[U,zn,Cs,U,Jn],[U,zn,Cs,q4,Jn],[U,zn,Cs,U,Jn]];CT[j.ConnectionEnd.server]=[[U,zn,Cs,U,Jn],[U,zn,Cs,U,Jn],[U,zn,Cs,U,Jn],[U,zn,Cs,U,Jn],[M4,zn,U,U,Jn],[U,zn,Cs,U,Jn],[U,zn,Cs,q4,Jn],[U,zn,Cs,U,Jn]];var Yu=j.handleHelloRequest,ite=j.handleServerHello,H4=j.handleCertificate,j4=j.handleServerKeyExchange,ST=j.handleCertificateRequest,yS=j.handleServerHelloDone,K4=j.handleFinished,wS=[];wS[j.ConnectionEnd.client]=[[U,U,ite,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[Yu,U,U,U,U,U,U,U,U,U,U,H4,j4,ST,yS,U,U,U,U,U,U],[Yu,U,U,U,U,U,U,U,U,U,U,U,j4,ST,yS,U,U,U,U,U,U],[Yu,U,U,U,U,U,U,U,U,U,U,U,U,ST,yS,U,U,U,U,U,U],[Yu,U,U,U,U,U,U,U,U,U,U,U,U,U,yS,U,U,U,U,U,U],[Yu,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[Yu,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,K4],[Yu,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U],[Yu,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U]];var ate=j.handleClientHello,ote=j.handleClientKeyExchange,ute=j.handleCertificateVerify;wS[j.ConnectionEnd.server]=[[U,ate,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,H4,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,ote,U,U,U,U],[U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,ute,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,K4],[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=SS,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=Gee,n.write.compressFunction=$ee;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),Oi(l,2,je.util.createBuffer(r.virtualHost));var h=je.util.createBuffer();Oi(h,2,l),Oi(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),Oi(v,1,je.util.createBuffer(g)),Oi(v,2,e),Oi(v,1,i),m>0&&Oi(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),Oi(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();Oi(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),Oi(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),Oi(c,1,e),Oi(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=SS,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 ET=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"),cte=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=ET(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=cte(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:ET(i)}}),"send"in s||(s.send=!0),"alert"in s||(s.alert={level:j.Alert.Level.fatal,description:ET(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?Xee:ete,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=CT[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};$4.exports=je.tls=je.tls||{};for(xS in j)typeof j[xS]!="function"&&(je.tls[xS]=j[xS]);var xS;je.tls.prf_tls1=SS;je.tls.hmac_sha1=Kee;je.tls.createSessionCache=j.createSessionCache;je.tls.createConnection=j.createConnection});var W4=re((c1e,X4)=>{"use strict";var Qu=zt();$u();NT();var Pi=X4.exports=Qu.tls;Pi.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=Pi.BulkCipherAlgorithm.aes,r.cipher_type=Pi.CipherType.block,r.enc_key_length=16,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=Pi.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},"initSecurityParameters"),initConnectionState:G4};Pi.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=Pi.BulkCipherAlgorithm.aes,r.cipher_type=Pi.CipherType.block,r.enc_key_length=32,r.block_length=16,r.fixed_iv_length=16,r.record_iv_length=16,r.mac_algorithm=Pi.MACAlgorithm.hmac_sha1,r.mac_length=20,r.mac_key_length=20},"initSecurityParameters"),initConnectionState:G4};function G4(r,e,t){var n=e.entity===Qu.tls.ConnectionEnd.client;r.read.cipherState={init:!1,cipher:Qu.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:Qu.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=pte,r.write.cipherFunction=lte,r.read.macLength=r.write.macLength=t.mac_length,r.read.macFunction=r.write.macFunction=Pi.hmac_sha1}o(G4,"initConnectionState");function lte(r,e){var t=!1,n=e.macFunction(e.macKey,e.sequenceNumber,r);r.fragment.putBytes(n),e.updateSequenceNumber();var s;r.version.minor===Pi.Versions.TLS_1_0.minor?s=e.cipherState.init?null:e.cipherState.iv:s=Qu.random.getBytesSync(16),e.cipherState.init=!0;var i=e.cipherState.cipher;return i.start({iv:s}),r.version.minor>=Pi.Versions.TLS_1_1.minor&&i.output.putBytes(s),i.update(r.fragment),i.finish(fte)&&(r.fragment=i.output,r.length=r.fragment.length(),t=!0),t}o(lte,"encrypt_aes_cbc_sha1");function fte(r,e,t){if(!t){var n=r-e.length()%r;e.fillWithByte(n-1,n)}return!0}o(fte,"encrypt_aes_cbc_sha1_padding");function hte(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(hte,"decrypt_aes_cbc_sha1_padding");function pte(r,e){var t=!1,n;r.version.minor===Pi.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(hte);var i=e.macLength,a=Qu.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=Qu.util.createBuffer(r.fragment),r.length=r.fragment.length();var c=e.macFunction(e.macKey,e.sequenceNumber,r);return e.updateSequenceNumber(),t=dte(e.macKey,a,c)&&t,t}o(pte,"decrypt_aes_cbc_sha1");function dte(r,e,t){var n=Qu.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(dte,"compareMacs")});var _T=re((f1e,Q4)=>{"use strict";var Kr=zt();Ua();hr();var Bg=Q4.exports=Kr.sha512=Kr.sha512||{};Kr.md.sha512=Kr.md.algorithms.sha512=Bg;var J4=Kr.sha384=Kr.sha512.sha384=Kr.sha512.sha384||{};J4.create=function(){return Bg.create("SHA-384")};Kr.md.sha384=Kr.md.algorithms.sha384=J4;Kr.sha512.sha256=Kr.sha512.sha256||{create:o(function(){return Bg.create("SHA-512/256")},"create")};Kr.md["sha512/256"]=Kr.md.algorithms["sha512/256"]=Kr.sha512.sha256;Kr.sha512.sha224=Kr.sha512.sha224||{create:o(function(){return Bg.create("SHA-512/224")},"create")};Kr.md["sha512/224"]=Kr.md.algorithms["sha512/224"]=Kr.sha512.sha224;Bg.create=function(r){if(Y4||mte(),typeof r>"u"&&(r="SHA-512"),!(r in Yl))throw new Error("Invalid SHA-512 algorithm: "+r);for(var e=Yl[r],t=null,n=Kr.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=Kr.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=Kr.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),z4(t,s,n),(n.read>2048||n.length()===0)&&n.compact(),u},u.digest=function(){var c=Kr.util.createBuffer();c.putBytes(n.bytes());var l=u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize,h=l&u.blockLength-1;c.putBytes(TT.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 S=new Array(t.length),v=0;v<t.length;++v)S[v]=t[v].slice(0);z4(S,s,c);var w=Kr.util.createBuffer(),C;r==="SHA-512"?C=S.length:r==="SHA-384"?C=S.length-2:C=S.length-4;for(var v=0;v<C;++v)w.putInt32(S[v][0]),(v!==C-1||r!=="SHA-512/224")&&w.putInt32(S[v][1]);return w},u};var TT=null,Y4=!1,IT=null,Yl=null;function mte(){TT="\x80",TT+=Kr.util.fillString("\0",128),IT=[[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]],Yl={},Yl["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],Yl["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],Yl["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],Yl["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],Y4=!0}o(mte,"_init");function z4(r,e,t){for(var n,s,i,a,u,c,l,h,m,g,y,v,S,w,C,_,b,A,T,B,M,I,H,K,q,W,he,pe,ue,Y,ve,Oe,ze,ne,Z,Ee=t.length();Ee>=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,ze=e[ue-7],Z=e[ue-16],ve=s+ze[1]+a+Z[1],e[ue][0]=n+ze[0]+i+Z[0]+(ve/4294967296>>>0)>>>0,e[ue][1]=ve>>>0;for(S=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=((S>>>28|w<<4)^(w>>>2|S<<30)^(w>>>7|S<<25))>>>0,c=((S<<4|w>>>28)^(w<<30|S>>>2)^(w<<25|S>>>7))>>>0,y=(S&C|b&(S^C))>>>0,v=(w&_|A&(w^_))>>>0,ve=pe+h+g+IT[ue][1]+e[ue][1],n=he+l+m+IT[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=S,_=w,ve=s+a,S=n+i+(ve/4294967296>>>0)>>>0,w=ve>>>0;ve=r[0][1]+w,r[0][0]=r[0][0]+S+(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,Ee-=128}}o(z4,"_update")});var Z4=re(DT=>{"use strict";var gte=zt();oa();var Vn=gte.asn1;DT.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Vn.Class.UNIVERSAL,type:Vn.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Vn.Class.UNIVERSAL,type:Vn.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Vn.Class.UNIVERSAL,type:Vn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Vn.Class.UNIVERSAL,type:Vn.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Vn.Class.UNIVERSAL,type:Vn.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};DT.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Vn.Class.UNIVERSAL,type:Vn.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Vn.Class.UNIVERSAL,type:Vn.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Vn.Class.UNIVERSAL,type:Vn.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Vn.Class.UNIVERSAL,type:Vn.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var hL=re((d1e,fL)=>{"use strict";var Yn=zt();Tg();_i();_T();hr();var iL=Z4(),vte=iL.publicKeyValidator,yte=iL.privateKeyValidator;typeof eL>"u"&&(eL=Yn.jsbn.BigInteger);var eL,OT=Yn.util.ByteBuffer,Vs=typeof Buffer>"u"?Uint8Array:Buffer;Yn.pki=Yn.pki||{};fL.exports=Yn.pki.ed25519=Yn.ed25519=Yn.ed25519||{};var rr=Yn.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=Yn.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=Fo({message:e,encoding:"binary"});for(var t=new Vs(rr.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Vs(rr.constants.PRIVATE_KEY_BYTE_LENGTH),s=0;s<32;++s)n[s]=e[s];return Ete(t,n),{publicKey:t,privateKey:n}};rr.privateKeyFromAsn1=function(r){var e={},t=[],n=Yn.asn1.validate(r,yte,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Yn.asn1.derToOid(e.privateKeyOid),a=Yn.oids.EdDSA25519;if(i!==a)throw new Error('Invalid OID "'+i+'"; OID must be "'+a+'".');var u=e.privateKey,c=Fo({message:Yn.asn1.fromDer(u).value,encoding:"binary"});return{privateKeyBytes:c}};rr.publicKeyFromAsn1=function(r){var e={},t=[],n=Yn.asn1.validate(r,vte,e,t);if(!n){var s=new Error("Invalid Key.");throw s.errors=t,s}var i=Yn.asn1.derToOid(e.publicKeyOid),a=Yn.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 Fo({message:u,encoding:"binary"})};rr.publicKeyFromPrivateKey=function(r){r=r||{};var e=Fo({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 Vs(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=Fo(r),t=Fo({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 Vs(rr.constants.SIGN_BYTE_LENGTH+e.length);bte(s,e,e.length,t);for(var i=new Vs(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=Fo(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=Fo({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=Fo({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 Vs(rr.constants.SIGN_BYTE_LENGTH+e.length),i=new Vs(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 Ate(i,s,s.length,n)>=0};function Fo(r){var e=r.message;if(e instanceof Uint8Array||e instanceof Vs)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 OT(e,t)}else if(!(e instanceof OT))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 Vs(e.length()),s=0;s<n.length;++s)n[s]=e.at(s);return n}o(Fo,"messageToNativeBuffer");var PT=Dt(),ES=Dt([1]),xte=Dt([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),wte=Dt([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),tL=Dt([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),rL=Dt([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),BT=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]),Ste=Dt([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Rg(r,e){var t=Yn.md.sha512.create(),n=new OT(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 Vs(rr.constants.HASH_BYTE_LENGTH),a=0;a<64;++a)i[a]=s.charCodeAt(a);return i}o(Rg,"sha512");function Ete(r,e){var t=[Dt(),Dt(),Dt(),Dt()],n,s=Rg(e,32);for(s[0]&=248,s[31]&=127,s[31]|=64,UT(t,s),VT(r,t),n=0;n<32;++n)e[n+32]=r[n];return 0}o(Ete,"crypto_sign_keypair");function bte(r,e,t,n){var s,i,a=new Float64Array(64),u=[Dt(),Dt(),Dt(),Dt()],c=Rg(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=Rg(r.subarray(32),t+32);for(kT(h),UT(u,h),VT(r,u),s=32;s<64;++s)r[s]=n[s];var m=Rg(r,t+64);for(kT(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 aL(r.subarray(32),a),l}o(bte,"crypto_sign");function Ate(r,e,t,n){var s,i,a=new Vs(32),u=[Dt(),Dt(),Dt(),Dt()],c=[Dt(),Dt(),Dt(),Dt()];if(i=-1,t<64||Cte(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=Rg(r,t);if(kT(l),cL(u,c,l),UT(c,e.subarray(32)),LT(u,c),VT(a,u),t-=64,oL(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(Ate,"crypto_sign_open");function aL(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]*BT[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)*BT[s],t=e[s]>>8,e[s]&=255;for(s=0;s<32;++s)e[s]-=t*BT[s];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,r[n]=e[n]&255}o(aL,"modL");function kT(r){for(var e=new Float64Array(64),t=0;t<64;++t)e[t]=r[t],r[t]=0;aL(r,e)}o(kT,"reduce");function LT(r,e){var t=Dt(),n=Dt(),s=Dt(),i=Dt(),a=Dt(),u=Dt(),c=Dt(),l=Dt(),h=Dt();Vp(t,r[1],r[0]),Vp(h,e[1],e[0]),Rr(t,t,h),Lp(n,r[0],r[1]),Lp(h,e[0],e[1]),Rr(n,n,h),Rr(s,r[3],e[3]),Rr(s,s,wte),Rr(i,r[2],e[2]),Lp(i,i,i),Vp(a,n,t),Vp(u,i,s),Lp(c,i,s),Lp(l,n,t),Rr(r[0],a,u),Rr(r[1],l,c),Rr(r[2],c,u),Rr(r[3],a,l)}o(LT,"add");function nL(r,e,t){for(var n=0;n<4;++n)lL(r[n],e[n],t)}o(nL,"cswap");function VT(r,e){var t=Dt(),n=Dt(),s=Dt();_te(s,e[2]),Rr(t,e[0],s),Rr(n,e[1],s),bS(r,n),r[31]^=uL(t)<<7}o(VT,"pack");function bS(r,e){var t,n,s,i=Dt(),a=Dt();for(t=0;t<16;++t)a[t]=e[t];for(RT(a),RT(a),RT(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,lL(a,i,1-s)}for(t=0;t<16;t++)r[2*t]=a[t]&255,r[2*t+1]=a[t]>>8}o(bS,"pack25519");function Cte(r,e){var t=Dt(),n=Dt(),s=Dt(),i=Dt(),a=Dt(),u=Dt(),c=Dt();return Zu(r[2],ES),Nte(r[1],e),Ql(s,r[1]),Rr(i,s,xte),Vp(s,s,r[2]),Lp(i,r[2],i),Ql(a,i),Ql(u,a),Rr(c,u,a),Rr(t,c,s),Rr(t,t,i),Tte(t,t),Rr(t,t,s),Rr(t,t,i),Rr(t,t,i),Rr(r[0],t,i),Ql(n,r[0]),Rr(n,n,i),sL(n,s)&&Rr(r[0],r[0],Ste),Ql(n,r[0]),Rr(n,n,i),sL(n,s)?-1:(uL(r[0])===e[31]>>7&&Vp(r[0],PT,r[0]),Rr(r[3],r[0],r[1]),0)}o(Cte,"unpackneg");function Nte(r,e){var t;for(t=0;t<16;++t)r[t]=e[2*t]+(e[2*t+1]<<8);r[15]&=32767}o(Nte,"unpack25519");function Tte(r,e){var t=Dt(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=250;n>=0;--n)Ql(t,t),n!==1&&Rr(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(Tte,"pow2523");function sL(r,e){var t=new Vs(32),n=new Vs(32);return bS(t,r),bS(n,e),oL(t,0,n,0)}o(sL,"neq25519");function oL(r,e,t,n){return Ite(r,e,t,n,32)}o(oL,"crypto_verify_32");function Ite(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(Ite,"vn");function uL(r){var e=new Vs(32);return bS(e,r),e[0]&1}o(uL,"par25519");function cL(r,e,t){var n,s;for(Zu(r[0],PT),Zu(r[1],ES),Zu(r[2],ES),Zu(r[3],PT),s=255;s>=0;--s)n=t[s/8|0]>>(s&7)&1,nL(r,e,n),LT(e,r),LT(r,r),nL(r,e,n)}o(cL,"scalarmult");function UT(r,e){var t=[Dt(),Dt(),Dt(),Dt()];Zu(t[0],tL),Zu(t[1],rL),Zu(t[2],ES),Rr(t[3],tL,rL),cL(r,t,e)}o(UT,"scalarbase");function Zu(r,e){var t;for(t=0;t<16;t++)r[t]=e[t]|0}o(Zu,"set25519");function _te(r,e){var t=Dt(),n;for(n=0;n<16;++n)t[n]=e[n];for(n=253;n>=0;--n)Ql(t,t),n!==2&&n!==4&&Rr(t,t,e);for(n=0;n<16;++n)r[n]=t[n]}o(_te,"inv25519");function RT(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(RT,"car25519");function lL(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(lL,"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 Lp(r,e,t){for(var n=0;n<16;++n)r[n]=e[n]+t[n]}o(Lp,"A");function Vp(r,e,t){for(var n=0;n<16;++n)r[n]=e[n]-t[n]}o(Vp,"Z");function Ql(r,e){Rr(r,e,e)}o(Ql,"S");function Rr(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,S=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,ze=0,ne=t[0],Z=t[1],Ee=t[2],He=t[3],Le=t[4],tt=t[5],N=t[6],E=t[7],G=t[8],P=t[9],Se=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*Ee,c+=n*He,l+=n*Le,h+=n*tt,m+=n*N,g+=n*E,y+=n*G,v+=n*P,S+=n*Se,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*Ee,l+=n*He,h+=n*Le,m+=n*tt,g+=n*N,y+=n*E,v+=n*G,S+=n*P,w+=n*Se,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*Ee,h+=n*He,m+=n*Le,g+=n*tt,y+=n*N,v+=n*E,S+=n*G,w+=n*P,C+=n*Se,_+=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*Ee,m+=n*He,g+=n*Le,y+=n*tt,v+=n*N,S+=n*E,w+=n*G,C+=n*P,_+=n*Se,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*Ee,g+=n*He,y+=n*Le,v+=n*tt,S+=n*N,w+=n*E,C+=n*G,_+=n*P,b+=n*Se,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*Ee,y+=n*He,v+=n*Le,S+=n*tt,w+=n*N,C+=n*E,_+=n*G,b+=n*P,A+=n*Se,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*Ee,v+=n*He,S+=n*Le,w+=n*tt,C+=n*N,_+=n*E,b+=n*G,A+=n*P,T+=n*Se,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*Ee,S+=n*He,w+=n*Le,C+=n*tt,_+=n*N,b+=n*E,A+=n*G,T+=n*P,B+=n*Se,M+=n*Ce,I+=n*Ae,H+=n*Ye,K+=n*Tt,q+=n*Me,n=e[8],y+=n*ne,v+=n*Z,S+=n*Ee,w+=n*He,C+=n*Le,_+=n*tt,b+=n*N,A+=n*E,T+=n*G,B+=n*P,M+=n*Se,I+=n*Ce,H+=n*Ae,K+=n*Ye,q+=n*Tt,W+=n*Me,n=e[9],v+=n*ne,S+=n*Z,w+=n*Ee,C+=n*He,_+=n*Le,b+=n*tt,A+=n*N,T+=n*E,B+=n*G,M+=n*P,I+=n*Se,H+=n*Ce,K+=n*Ae,q+=n*Ye,W+=n*Tt,he+=n*Me,n=e[10],S+=n*ne,w+=n*Z,C+=n*Ee,_+=n*He,b+=n*Le,A+=n*tt,T+=n*N,B+=n*E,M+=n*G,I+=n*P,H+=n*Se,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*Ee,b+=n*He,A+=n*Le,T+=n*tt,B+=n*N,M+=n*E,I+=n*G,H+=n*P,K+=n*Se,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*Ee,A+=n*He,T+=n*Le,B+=n*tt,M+=n*N,I+=n*E,H+=n*G,K+=n*P,q+=n*Se,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*Ee,T+=n*He,B+=n*Le,M+=n*tt,I+=n*N,H+=n*E,K+=n*G,q+=n*P,W+=n*Se,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*Ee,B+=n*He,M+=n*Le,I+=n*tt,H+=n*N,K+=n*E,q+=n*G,W+=n*P,he+=n*Se,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*Ee,M+=n*He,I+=n*Le,H+=n*tt,K+=n*N,q+=n*E,W+=n*G,he+=n*P,pe+=n*Se,ue+=n*Ce,Y+=n*Ae,ve+=n*Ye,Oe+=n*Tt,ze+=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,S+=38*ue,w+=38*Y,C+=38*ve,_+=38*Oe,b+=38*ze,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=S+s+65535,s=Math.floor(n/65536),S=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=S+s+65535,s=Math.floor(n/65536),S=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]=S,r[11]=w,r[12]=C,r[13]=_,r[14]=b,r[15]=A}o(Rr,"M")});var gL=re((g1e,mL)=>{"use strict";var ci=zt();hr();_i();Tg();mL.exports=ci.kem=ci.kem||{};var pL=ci.jsbn.BigInteger;ci.kem.rsa={};ci.kem.rsa.create=function(r,e){e=e||{};var t=e.prng||ci.random,n={};return n.encrypt=function(s,i){var a=Math.ceil(s.n.bitLength()/8),u;do u=new pL(ci.util.bytesToHex(t.getBytesSync(a)),16).mod(s.n);while(u.compareTo(pL.ONE)<=0);u=ci.util.hexToBytes(u.toString(16));var c=a-u.length;c>0&&(u=ci.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};ci.kem.kdf1=function(r,e){dL(this,r,0,e||r.digestLength)};ci.kem.kdf2=function(r,e){dL(this,r,1,e||r.digestLength)};function dL(r,e,t,n){r.generate=function(s,i){for(var a=new ci.util.ByteBuffer,u=Math.ceil(i/n)+t,c=new ci.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(dL,"_createKDF")});var wL=re((y1e,xL)=>{"use strict";var ar=zt();hr();xL.exports=ar.log=ar.log||{};ar.log.levels=["none","error","warning","info","debug","verbose","max"];var AS={},MT=[],Pg=null;ar.log.LEVEL_LOCKED=2;ar.log.NO_LEVEL_CHECK=4;ar.log.INTERPOLATE=8;for(Ga=0;Ga<ar.log.levels.length;++Ga)jT=ar.log.levels[Ga],AS[jT]={index:Ga,name:jT.toUpperCase()};var jT,Ga;ar.log.logMessage=function(r){for(var e=AS[r.level].index,t=0;t<MT.length;++t){var n=MT[t];if(n.flags&ar.log.NO_LEVEL_CHECK)n.f(r);else{var s=AS[n.level].index;e<=s&&n.f(n,r)}}};ar.log.prepareStandard=function(r){"standard"in r||(r.standard=AS[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(FT=["error","warning","info","debug","verbose"],Ga=0;Ga<FT.length;++Ga)(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)}})(FT[Ga]);var FT,Ga;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){MT.push(r)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(vL={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},kg=o(function(r,e){ar.log.prepareStandard(e);var t=vL[e.level],n=[e.standard];n=n.concat(e.arguments.slice()),t.apply(console,n)},"f"),Up=ar.log.makeLogger(kg)):(kg=o(function(e,t){ar.log.prepareStandardFull(t),console.log(t.standardFull)},"f"),Up=ar.log.makeLogger(kg)),ar.log.setLevel(Up,"debug"),ar.log.addLogger(Up),Pg=Up):console={log:o(function(){},"log")};var Up,vL,kg;Pg!==null&&typeof window<"u"&&window.location&&(Og=new URL(window.location.href).searchParams,Og.has("console.level")&&ar.log.setLevel(Pg,Og.get("console.level").slice(-1)[0]),Og.has("console.lock")&&(yL=Og.get("console.lock").slice(-1)[0],yL=="true"&&ar.log.lock(Pg)));var Og,yL;ar.log.consoleLogger=Pg});var EL=re((w1e,SL)=>{"use strict";SL.exports=Ua();nS();Bp();eT();_T()});var CL=re((S1e,AL)=>{"use strict";var Ze=zt();$u();oa();Cg();Gu();$l();dT();_i();hr();vS();var se=Ze.asn1,Ns=AL.exports=Ze.pkcs7=Ze.pkcs7||{};Ns.messageFromPem=function(r){var e=Ze.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 Ns.messageFromAsn1(n)};Ns.messageToPem=function(r,e){var t={type:"PKCS7",body:se.toDer(r.toAsn1()).getBytes()};return Ze.pem.encode(t,{maxline:e})};Ns.messageFromAsn1=function(r){var e={},t=[];if(!se.validate(r,Ns.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 Ze.pki.oids.envelopedData:i=Ns.createEnvelopedData();break;case Ze.pki.oids.encryptedData:i=Ns.createEncryptedData();break;case Ze.pki.oids.signedData:i=Ns.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};Ns.createSignedData=function(){var r=null;return r={type:Ze.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:o(function(n){if(HT(r,n,Ns.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(Ze.pki.certificateFromAsn1(s[i]))},"fromAsn1"),toAsn1:o(function(){r.contentInfo||r.sign();for(var n=[],s=0;s<r.certificates.length;++s)n.push(Ze.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=Ze.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=Ze.pki.privateKeyFromPem(u));var c=n.digestAlgorithm||Ze.pki.oids.sha1;switch(c){case Ze.pki.oids.sha1:case Ze.pki.oids.sha256:case Ze.pki.oids.sha384:case Ze.pki.oids.sha512:case Ze.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===Ze.pki.oids.contentType){if(h=!0,m)break;continue}if(!m&&y.type===Ze.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:Ze.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(Ze.pki.oids.data).getBytes())]),"content"in r)){var s;r.content instanceof Ze.util.ByteBuffer?s=r.content.bytes():typeof r.content=="string"&&(s=Ze.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=Ze.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]=Ze.md[Ze.pki.oids[a]].create()),i.authenticatedAttributes.length===0?i.md=n[a]:i.md=Ze.md[Ze.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!==Ze.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===Ze.pki.oids.messageDigest?y.value=n[h.digestAlgorithm].digest():y.type===Ze.pki.oids.signingTime&&(y.value||(y.value=c)),m.value.push(qT(y)),h.authenticatedAttributesAsn1.value.push(qT(y))}a=se.toDer(m).getBytes(),h.md.start().update(a)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}r.signerInfos=kte(r.signers)}o(t,"addSignerInfos")};Ns.createEncryptedData=function(){var r=null;return r={type:Ze.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:Ze.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){HT(r,e,Ns.asn1.encryptedDataValidator)},"fromAsn1"),decrypt:o(function(e){e!==void 0&&(r.encryptedContent.key=e),bL(r)},"decrypt")},r};Ns.createEnvelopedData=function(){var r=null;return r={type:Ze.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:Ze.pki.oids["aes256-CBC"]},fromAsn1:o(function(e){var t=HT(r,e,Ns.asn1.envelopedDataValidator);r.recipients=Rte(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,Ote(r.recipients)),se.create(se.Class.UNIVERSAL,se.Type.SEQUENCE,!0,Lte(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 Ze.pki.oids.rsaEncryption:case Ze.pki.oids.desCBC:var n=t.decrypt(e.encryptedContent.content);r.encryptedContent.key=Ze.util.createBuffer(n);break;default:throw new Error("Unsupported asymmetric cipher, OID "+e.encryptedContent.algorithm)}bL(r)},"decrypt"),addRecipient:o(function(e){r.recipients.push({version:0,issuer:e.issuer.attributes,serialNumber:e.serialNumber,encryptedContent:{algorithm:Ze.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 Ze.pki.oids["aes128-CBC"]:n=16,s=16,i=Ze.aes.createEncryptionCipher;break;case Ze.pki.oids["aes192-CBC"]:n=24,s=16,i=Ze.aes.createEncryptionCipher;break;case Ze.pki.oids["aes256-CBC"]:n=32,s=16,i=Ze.aes.createEncryptionCipher;break;case Ze.pki.oids["des-EDE3-CBC"]:n=24,s=8,i=Ze.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+t)}if(e===void 0)e=Ze.util.createBuffer(Ze.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=Ze.util.createBuffer(Ze.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 Ze.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 Dte(r){var e={},t=[];if(!se.validate(r,Ns.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:Ze.pki.RDNAttributesAsArray(e.issuer),serialNumber:Ze.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:se.derToOid(e.encAlgorithm),parameter:e.encParameter?e.encParameter.value:void 0,content:e.encKey}}}o(Dte,"_recipientFromAsn1");function Bte(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,[Ze.pki.distinguishedNameToAsn1({attributes:r.issuer}),se.create(se.Class.UNIVERSAL,se.Type.INTEGER,!1,Ze.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(Bte,"_recipientToAsn1");function Rte(r){for(var e=[],t=0;t<r.length;++t)e.push(Dte(r[t]));return e}o(Rte,"_recipientsFromAsn1");function Ote(r){for(var e=[],t=0;t<r.length;++t)e.push(Bte(r[t]));return e}o(Ote,"_recipientsToAsn1");function Pte(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,[Ze.pki.distinguishedNameToAsn1({attributes:r.issuer}),se.create(se.Class.UNIVERSAL,se.Type.INTEGER,!1,Ze.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(qT(s))}e.value.push(t)}return e}o(Pte,"_signerToAsn1");function kte(r){for(var e=[],t=0;t<r.length;++t)e.push(Pte(r[t]));return e}o(kte,"_signersToAsn1");function qT(r){var e;if(r.type===Ze.pki.oids.contentType)e=se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(r.value).getBytes());else if(r.type===Ze.pki.oids.messageDigest)e=se.create(se.Class.UNIVERSAL,se.Type.OCTETSTRING,!1,r.value.bytes());else if(r.type===Ze.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(qT,"_attributeToAsn1");function Lte(r){return[se.create(se.Class.UNIVERSAL,se.Type.OID,!1,se.oidToDer(Ze.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(Lte,"_encryptedContentToAsn1");function HT(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!==Ze.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(n.encryptedContent){var u="";if(Ze.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:Ze.util.createBuffer(n.encParameter.value),content:Ze.util.createBuffer(u)}}if(n.content){var u="";if(Ze.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=Ze.util.createBuffer(u)}return r.version=n.version.charCodeAt(0),r.rawCapture=n,n}o(HT,"_fromAsn1");function bL(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 Ze.pki.oids["aes128-CBC"]:case Ze.pki.oids["aes192-CBC"]:case Ze.pki.oids["aes256-CBC"]:e=Ze.aes.createDecryptionCipher(r.encryptedContent.key);break;case Ze.pki.oids.desCBC:case Ze.pki.oids["des-EDE3-CBC"]:e=Ze.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(bL,"_decryptContent")});var TL=re((b1e,NL)=>{"use strict";var xn=zt();$u();Tp();nS();Bp();hr();var NS=NL.exports=xn.ssh=xn.ssh||{};NS.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=xn.util.createBuffer();jp(a,n),Xa(a,r.e),Xa(a,r.n);var u=xn.util.encode64(a.bytes(),64),c=Math.floor(u.length/66)+1;i+="Public-Lines: "+c+`\r
|
|
19
|
+
`,i+=u;var l=xn.util.createBuffer();Xa(l,r.d),Xa(l,r.p),Xa(l,r.q),Xa(l,r.qInv);var h;if(!e)h=xn.util.encode64(l.bytes(),64);else{var m=l.length()+16-1;m-=m%16;var g=CS(l.bytes());g.truncate(g.length()-m+l.length()),l.putBuffer(g);var y=xn.util.createBuffer();y.putBuffer(CS("\0\0\0\0",e)),y.putBuffer(CS("\0\0\0",e));var v=xn.aes.createEncryptionCipher(y.truncate(8),"CBC");v.start(xn.util.createBuffer().fillWithByte(0,16)),v.update(l.copy()),v.finish();var S=v.output;S.truncate(16),h=xn.util.encode64(S.bytes(),64)}c=Math.floor(h.length/66)+1,i+=`\r
|
|
20
|
+
Private-Lines: `+c+`\r
|
|
21
|
+
`,i+=h;var w=CS("putty-private-key-file-mac-key",e),C=xn.util.createBuffer();jp(C,n),jp(C,s),jp(C,t),C.putInt32(a.length()),C.putBuffer(a),C.putInt32(l.length()),C.putBuffer(l);var _=xn.hmac.create();return _.start("sha1",w),_.update(C.bytes()),i+=`\r
|
|
22
|
+
Private-MAC: `+_.digest().toHex()+`\r
|
|
23
|
+
`,i};NS.publicKeyToOpenSSH=function(r,e){var t="ssh-rsa";e=e||"";var n=xn.util.createBuffer();return jp(n,t),Xa(n,r.e),Xa(n,r.n),t+" "+xn.util.encode64(n.bytes())+" "+e};NS.privateKeyToOpenSSH=function(r,e){return e?xn.pki.encryptRsaPrivateKey(r,e,{legacy:!0,algorithm:"aes128"}):xn.pki.privateKeyToPem(r)};NS.getPublicKeyFingerprint=function(r,e){e=e||{};var t=e.md||xn.md.md5.create(),n="ssh-rsa",s=xn.util.createBuffer();jp(s,n),Xa(s,r.e),Xa(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 Xa(r,e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var n=xn.util.hexToBytes(t);r.putInt32(n.length),r.putBytes(n)}o(Xa,"_addBigIntegerToBuffer");function jp(r,e){r.putInt32(e.length),r.putString(e)}o(jp,"_addStringToBuffer");function CS(){for(var r=xn.md.sha1.create(),e=arguments.length,t=0;t<e;++t)r.update(arguments[t]);return r.digest()}o(CS,"_sha1")});var _L=re((C1e,IL)=>{"use strict";IL.exports=zt();$u();W4();oa();Jw();Cg();hL();Tp();gL();wL();EL();mT();oS();$l();cT();yT();CL();wT();fT();tT();dS();_i();sT();TL();NT();hr()});var BL=re((D1e,DL)=>{"use strict";var Fp=1e3,Mp=Fp*60,qp=Mp*60,ef=qp*24,Ute=ef*7,jte=ef*365.25;DL.exports=function(r,e){e=e||{};var t=typeof r;if(t==="string"&&r.length>0)return Fte(r);if(t==="number"&&isFinite(r))return e.long?qte(r):Mte(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function Fte(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*jte;case"weeks":case"week":case"w":return t*Ute;case"days":case"day":case"d":return t*ef;case"hours":case"hour":case"hrs":case"hr":case"h":return t*qp;case"minutes":case"minute":case"mins":case"min":case"m":return t*Mp;case"seconds":case"second":case"secs":case"sec":case"s":return t*Fp;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}o(Fte,"parse");function Mte(r){var e=Math.abs(r);return e>=ef?Math.round(r/ef)+"d":e>=qp?Math.round(r/qp)+"h":e>=Mp?Math.round(r/Mp)+"m":e>=Fp?Math.round(r/Fp)+"s":r+"ms"}o(Mte,"fmtShort");function qte(r){var e=Math.abs(r);return e>=ef?TS(r,e,ef,"day"):e>=qp?TS(r,e,qp,"hour"):e>=Mp?TS(r,e,Mp,"minute"):e>=Fp?TS(r,e,Fp,"second"):r+" ms"}o(qte,"fmtLong");function TS(r,e,t,n){var s=e>=t*1.5;return Math.round(r/t)+" "+n+(s?"s":"")}o(TS,"plural")});var KT=re((R1e,RL)=>{"use strict";function Hte(r){t.debug=t,t.default=t,t.coerce=c,t.disable=a,t.enable=s,t.enabled=u,t.humanize=BL(),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 S(...w){if(!S.enabled)return;let C=S,_=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(S,"debug"),S.namespace=h,S.useColors=t.useColors(),S.color=t.selectColor(h),S.extend=n,S.destroy=t.destroy,Object.defineProperty(S,"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(S),S}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,S=0;for(;g<h.length;)if(y<m.length&&(m[y]===h[g]||m[y]==="*"))m[y]==="*"?(v=y,S=g,y++):(g++,y++);else if(v!==-1)y=v+1,S++,g=S;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(Hte,"setup");RL.exports=Hte});var OL=re((Us,IS)=>{"use strict";Us.formatArgs=$te;Us.save=Gte;Us.load=Xte;Us.useColors=Kte;Us.storage=Wte();Us.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`."))}})();Us.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 Kte(){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(Kte,"useColors");function $te(r){if(r[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+r[0]+(this.useColors?"%c ":" ")+"+"+IS.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($te,"formatArgs");Us.log=console.debug||console.log||(()=>{});function Gte(r){try{r?Us.storage.setItem("debug",r):Us.storage.removeItem("debug")}catch{}}o(Gte,"save");function Xte(){let r;try{r=Us.storage.getItem("debug")||Us.storage.getItem("DEBUG")}catch{}return!r&&typeof process<"u"&&"env"in process&&(r=process.env.DEBUG),r}o(Xte,"load");function Wte(){try{return localStorage}catch{}}o(Wte,"localstorage");IS.exports=KT()(Us);var{formatters:zte}=IS.exports;zte.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var kL=re((k1e,PL)=>{"use strict";PL.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 UL=re((L1e,VL)=>{"use strict";var Jte=Je("os"),LL=Je("tty"),ki=kL(),{env:Un}=process,ec;ki("no-color")||ki("no-colors")||ki("color=false")||ki("color=never")?ec=0:(ki("color")||ki("colors")||ki("color=true")||ki("color=always"))&&(ec=1);"FORCE_COLOR"in Un&&(Un.FORCE_COLOR==="true"?ec=1:Un.FORCE_COLOR==="false"?ec=0:ec=Un.FORCE_COLOR.length===0?1:Math.min(parseInt(Un.FORCE_COLOR,10),3));function $T(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}o($T,"translateLevel");function GT(r,e){if(ec===0)return 0;if(ki("color=16m")||ki("color=full")||ki("color=truecolor"))return 3;if(ki("color=256"))return 2;if(r&&!e&&ec===void 0)return 0;let t=ec||0;if(Un.TERM==="dumb")return t;if(process.platform==="win32"){let n=Jte.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Un)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Un)||Un.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in Un)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Un.TEAMCITY_VERSION)?1:0;if(Un.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Un){let n=parseInt((Un.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Un.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Un.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Un.TERM)||"COLORTERM"in Un?1:t}o(GT,"supportsColor");function Yte(r){let e=GT(r,r&&r.isTTY);return $T(e)}o(Yte,"getSupportLevel");VL.exports={supportsColor:Yte,stdout:$T(GT(!0,LL.isatty(1))),stderr:$T(GT(!0,LL.isatty(2)))}});var FL=re((jn,DS)=>{"use strict";var Qte=Je("tty"),_S=Je("util");jn.init=ire;jn.log=rre;jn.formatArgs=ere;jn.save=nre;jn.load=sre;jn.useColors=Zte;jn.destroy=_S.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");jn.colors=[6,2,3,4,5,1];try{let r=UL();r&&(r.stderr||r).level>=2&&(jn.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{}jn.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 Zte(){return"colors"in jn.inspectOpts?!!jn.inspectOpts.colors:Qte.isatty(process.stderr.fd)}o(Zte,"useColors");function ere(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+"+DS.exports.humanize(this.diff)+"\x1B[0m")}else r[0]=tre()+e+" "+r[0]}o(ere,"formatArgs");function tre(){return jn.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(tre,"getDate");function rre(...r){return process.stderr.write(_S.formatWithOptions(jn.inspectOpts,...r)+`
|
|
26
|
+
`)}o(rre,"log");function nre(r){r?process.env.DEBUG=r:delete process.env.DEBUG}o(nre,"save");function sre(){return process.env.DEBUG}o(sre,"load");function ire(r){r.inspectOpts={};let e=Object.keys(jn.inspectOpts);for(let t=0;t<e.length;t++)r.inspectOpts[e[t]]=jn.inspectOpts[e[t]]}o(ire,"init");DS.exports=KT()(jn);var{formatters:jL}=DS.exports;jL.o=function(r){return this.inspectOpts.colors=this.useColors,_S.inspect(r,this.inspectOpts).split(`
|
|
27
|
+
`).map(e=>e.trim()).join(" ")};jL.O=function(r){return this.inspectOpts.colors=this.useColors,_S.inspect(r,this.inspectOpts)}});var Hp=re((j1e,XT)=>{"use strict";typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?XT.exports=OL():XT.exports=FL()});var qL=re((F1e,ML)=>{"use strict";var{PassThrough:are}=Je("stream");ML.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 are({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 KL=re((q1e,Lg)=>{"use strict";var{constants:ore}=Je("buffer"),ure=Je("stream"),{promisify:cre}=Je("util"),lre=qL(),fre=cre(ure.pipeline),HL=class extends Error{static{o(this,"MaxBufferError")}constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function WT(r,e){if(!r)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:t}=e,n=lre(e);return await new Promise((s,i)=>{let a=o(u=>{u&&n.getBufferedLength()<=ore.MAX_LENGTH&&(u.bufferedData=n.getBufferedValue()),i(u)},"rejectPromise");(async()=>{try{await fre(r,n),s()}catch(u){a(u)}})(),n.on("data",()=>{n.getBufferedLength()>t&&a(new HL)})}),n.getBufferedValue()}o(WT,"getStream");Lg.exports=WT;Lg.exports.buffer=(r,e)=>WT(r,{...e,encoding:"buffer"});Lg.exports.array=(r,e)=>WT(r,{...e,array:!0});Lg.exports.MaxBufferError=HL});var Mo=re((Kp,Vg)=>{"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,S=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,ze=4294967295,ne=ze-1,Z=ze>>>1,Ee=[["ary",T],["bind",v],["bindKey",S],["curry",C],["curryRight",_],["flip",M],["partial",b],["partialRight",A],["rearg",B]],He="[object Arguments]",Le="[object Array]",tt="[object AsyncFunction]",N="[object Boolean]",E="[object Date]",G="[object DOMException]",P="[object Error]",Se="[object Function]",Ce="[object GeneratorFunction]",Ae="[object Map]",Ye="[object Number]",Tt="[object Null]",Me="[object Object]",Et="[object Promise]",zr="[object Proxy]",Qe="[object RegExp]",_r="[object Set]",$r="[object String]",Cn="[object Symbol]",Ds="[object Undefined]",vs="[object WeakMap]",gt="[object WeakSet]",st="[object ArrayBuffer]",$n="[object DataView]",ys="[object Float32Array]",Da="[object Float64Array]",Ba="[object Int8Array]",Lt="[object Int16Array]",ip="[object Int32Array]",ap="[object Uint8Array]",Ol="[object Uint8ClampedArray]",tg="[object Uint16Array]",ti="[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)\]/,Gn=/^\w*$/,xi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fr=/[\\^$.*+?()[\]{}|]/g,Ra=RegExp(fr.source),rg=/^\s+/,zx=/\s/,g2=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,v2=/\{\n\/\* \[wrapped with (.+)\] \*/,y2=/,? & /,x2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ge=/[()=,{}\[\]\/\s]/,sr=/\\(\\)?/g,as=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ea=/\w*$/,w2=/^[-+]0x[0-9a-f]+$/i,GH=/^0b[01]+$/i,XH=/^\[object .+?Constructor\]$/,WH=/^0o[0-7]+$/i,zH=/^(?:0|[1-9]\d*)$/,JH=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jx=/($^)/,YH=/['\n\r\u2028\u2029\\]/g,Yx="\\ud800-\\udfff",QH="\\u0300-\\u036f",ZH="\\ufe20-\\ufe2f",eK="\\u20d0-\\u20ff",SO=QH+ZH+eK,EO="\\u2700-\\u27bf",bO="a-z\\xdf-\\xf6\\xf8-\\xff",tK="\\xac\\xb1\\xd7\\xf7",rK="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",nK="\\u2000-\\u206f",sK=" \\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",AO="A-Z\\xc0-\\xd6\\xd8-\\xde",CO="\\ufe0e\\ufe0f",NO=tK+rK+nK+sK,S2="['\u2019]",iK="["+Yx+"]",TO="["+NO+"]",Qx="["+SO+"]",IO="\\d+",aK="["+EO+"]",_O="["+bO+"]",DO="[^"+Yx+NO+IO+EO+bO+AO+"]",E2="\\ud83c[\\udffb-\\udfff]",oK="(?:"+Qx+"|"+E2+")",BO="[^"+Yx+"]",b2="(?:\\ud83c[\\udde6-\\uddff]){2}",A2="[\\ud800-\\udbff][\\udc00-\\udfff]",op="["+AO+"]",RO="\\u200d",OO="(?:"+_O+"|"+DO+")",uK="(?:"+op+"|"+DO+")",PO="(?:"+S2+"(?:d|ll|m|re|s|t|ve))?",kO="(?:"+S2+"(?:D|LL|M|RE|S|T|VE))?",LO=oK+"?",VO="["+CO+"]?",cK="(?:"+RO+"(?:"+[BO,b2,A2].join("|")+")"+VO+LO+")*",lK="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fK="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",UO=VO+LO+cK,hK="(?:"+[aK,b2,A2].join("|")+")"+UO,pK="(?:"+[BO+Qx+"?",Qx,b2,A2,iK].join("|")+")",dK=RegExp(S2,"g"),mK=RegExp(Qx,"g"),C2=RegExp(E2+"(?="+E2+")|"+pK+UO,"g"),gK=RegExp([op+"?"+_O+"+"+PO+"(?="+[TO,op,"$"].join("|")+")",uK+"+"+kO+"(?="+[TO,op+OO,"$"].join("|")+")",op+"?"+OO+"+"+PO,op+"+"+kO,fK,lK,IO,hK].join("|"),"g"),vK=RegExp("["+RO+Yx+SO+CO+"]"),yK=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xK=["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"],wK=-1,qr={};qr[ys]=qr[Da]=qr[Ba]=qr[Lt]=qr[ip]=qr[ap]=qr[Ol]=qr[tg]=qr[ti]=!0,qr[He]=qr[Le]=qr[st]=qr[N]=qr[$n]=qr[E]=qr[P]=qr[Se]=qr[Ae]=qr[Ye]=qr[Me]=qr[Qe]=qr[_r]=qr[$r]=qr[vs]=!1;var Pr={};Pr[He]=Pr[Le]=Pr[st]=Pr[$n]=Pr[N]=Pr[E]=Pr[ys]=Pr[Da]=Pr[Ba]=Pr[Lt]=Pr[ip]=Pr[Ae]=Pr[Ye]=Pr[Me]=Pr[Qe]=Pr[_r]=Pr[$r]=Pr[Cn]=Pr[ap]=Pr[Ol]=Pr[tg]=Pr[ti]=!0,Pr[P]=Pr[Se]=Pr[vs]=!1;var SK={\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"},EK={"&":"&","<":"<",">":">",'"':""","'":"'"},bK={"&":"&","<":"<",">":">",""":'"',"'":"'"},AK={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},CK=parseFloat,NK=parseInt,jO=typeof global=="object"&&global&&global.Object===Object&&global,TK=typeof self=="object"&&self&&self.Object===Object&&self,Rn=jO||TK||Function("return this")(),N2=typeof Kp=="object"&&Kp&&!Kp.nodeType&&Kp,Pl=N2&&typeof Vg=="object"&&Vg&&!Vg.nodeType&&Vg,FO=Pl&&Pl.exports===N2,T2=FO&&jO.process,wi=(function(){try{var ce=Pl&&Pl.require&&Pl.require("util").types;return ce||T2&&T2.binding&&T2.binding("util")}catch{}})(),MO=wi&&wi.isArrayBuffer,qO=wi&&wi.isDate,HO=wi&&wi.isMap,KO=wi&&wi.isRegExp,$O=wi&&wi.isSet,GO=wi&&wi.isTypedArray;function ri(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(ri,"apply");function IK(ce,Ie,be,pt){for(var Vt=-1,wr=ce==null?0:ce.length;++Vt<wr;){var Nn=ce[Vt];Ie(pt,Nn,be(Nn),ce)}return pt}o(IK,"arrayAggregator");function Si(ce,Ie){for(var be=-1,pt=ce==null?0:ce.length;++be<pt&&Ie(ce[be],be,ce)!==!1;);return ce}o(Si,"arrayEach");function _K(ce,Ie){for(var be=ce==null?0:ce.length;be--&&Ie(ce[be],be,ce)!==!1;);return ce}o(_K,"arrayEachRight");function XO(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(XO,"arrayEvery");function Iu(ce,Ie){for(var be=-1,pt=ce==null?0:ce.length,Vt=0,wr=[];++be<pt;){var Nn=ce[be];Ie(Nn,be,ce)&&(wr[Vt++]=Nn)}return wr}o(Iu,"arrayFilter");function Zx(ce,Ie){var be=ce==null?0:ce.length;return!!be&&up(ce,Ie,0)>-1}o(Zx,"arrayIncludes");function I2(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(I2,"arrayIncludesWith");function Gr(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(Gr,"arrayMap");function _u(ce,Ie){for(var be=-1,pt=Ie.length,Vt=ce.length;++be<pt;)ce[Vt+be]=Ie[be];return ce}o(_u,"arrayPush");function _2(ce,Ie,be,pt){var Vt=-1,wr=ce==null?0:ce.length;for(pt&&wr&&(be=ce[++Vt]);++Vt<wr;)be=Ie(be,ce[Vt],Vt,ce);return be}o(_2,"arrayReduce");function DK(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(DK,"arrayReduceRight");function D2(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(D2,"arraySome");var BK=B2("length");function RK(ce){return ce.split("")}o(RK,"asciiToArray");function OK(ce){return ce.match(x2)||[]}o(OK,"asciiWords");function WO(ce,Ie,be){var pt;return be(ce,function(Vt,wr,Nn){if(Ie(Vt,wr,Nn))return pt=wr,!1}),pt}o(WO,"baseFindKey");function ew(ce,Ie,be,pt){for(var Vt=ce.length,wr=be+(pt?1:-1);pt?wr--:++wr<Vt;)if(Ie(ce[wr],wr,ce))return wr;return-1}o(ew,"baseFindIndex");function up(ce,Ie,be){return Ie===Ie?$K(ce,Ie,be):ew(ce,zO,be)}o(up,"baseIndexOf");function PK(ce,Ie,be,pt){for(var Vt=be-1,wr=ce.length;++Vt<wr;)if(pt(ce[Vt],Ie))return Vt;return-1}o(PK,"baseIndexOfWith");function zO(ce){return ce!==ce}o(zO,"baseIsNaN");function JO(ce,Ie){var be=ce==null?0:ce.length;return be?O2(ce,Ie)/be:Oe}o(JO,"baseMean");function B2(ce){return function(Ie){return Ie==null?r:Ie[ce]}}o(B2,"baseProperty");function R2(ce){return function(Ie){return ce==null?r:ce[Ie]}}o(R2,"basePropertyOf");function YO(ce,Ie,be,pt,Vt){return Vt(ce,function(wr,Nn,Dr){be=pt?(pt=!1,wr):Ie(be,wr,Nn,Dr)}),be}o(YO,"baseReduce");function kK(ce,Ie){var be=ce.length;for(ce.sort(Ie);be--;)ce[be]=ce[be].value;return ce}o(kK,"baseSortBy");function O2(ce,Ie){for(var be,pt=-1,Vt=ce.length;++pt<Vt;){var wr=Ie(ce[pt]);wr!==r&&(be=be===r?wr:be+wr)}return be}o(O2,"baseSum");function P2(ce,Ie){for(var be=-1,pt=Array(ce);++be<ce;)pt[be]=Ie(be);return pt}o(P2,"baseTimes");function LK(ce,Ie){return Gr(Ie,function(be){return[be,ce[be]]})}o(LK,"baseToPairs");function QO(ce){return ce&&ce.slice(0,rP(ce)+1).replace(rg,"")}o(QO,"baseTrim");function ni(ce){return function(Ie){return ce(Ie)}}o(ni,"baseUnary");function k2(ce,Ie){return Gr(Ie,function(be){return ce[be]})}o(k2,"baseValues");function ng(ce,Ie){return ce.has(Ie)}o(ng,"cacheHas");function ZO(ce,Ie){for(var be=-1,pt=ce.length;++be<pt&&up(Ie,ce[be],0)>-1;);return be}o(ZO,"charsStartIndex");function eP(ce,Ie){for(var be=ce.length;be--&&up(Ie,ce[be],0)>-1;);return be}o(eP,"charsEndIndex");function VK(ce,Ie){for(var be=ce.length,pt=0;be--;)ce[be]===Ie&&++pt;return pt}o(VK,"countHolders");var UK=R2(SK),jK=R2(EK);function FK(ce){return"\\"+AK[ce]}o(FK,"escapeStringChar");function MK(ce,Ie){return ce==null?r:ce[Ie]}o(MK,"getValue");function cp(ce){return vK.test(ce)}o(cp,"hasUnicode");function qK(ce){return yK.test(ce)}o(qK,"hasUnicodeWord");function HK(ce){for(var Ie,be=[];!(Ie=ce.next()).done;)be.push(Ie.value);return be}o(HK,"iteratorToArray");function L2(ce){var Ie=-1,be=Array(ce.size);return ce.forEach(function(pt,Vt){be[++Ie]=[Vt,pt]}),be}o(L2,"mapToArray");function tP(ce,Ie){return function(be){return ce(Ie(be))}}o(tP,"overArg");function Du(ce,Ie){for(var be=-1,pt=ce.length,Vt=0,wr=[];++be<pt;){var Nn=ce[be];(Nn===Ie||Nn===c)&&(ce[be]=c,wr[Vt++]=be)}return wr}o(Du,"replaceHolders");function tw(ce){var Ie=-1,be=Array(ce.size);return ce.forEach(function(pt){be[++Ie]=pt}),be}o(tw,"setToArray");function KK(ce){var Ie=-1,be=Array(ce.size);return ce.forEach(function(pt){be[++Ie]=[pt,pt]}),be}o(KK,"setToPairs");function $K(ce,Ie,be){for(var pt=be-1,Vt=ce.length;++pt<Vt;)if(ce[pt]===Ie)return pt;return-1}o($K,"strictIndexOf");function GK(ce,Ie,be){for(var pt=be+1;pt--;)if(ce[pt]===Ie)return pt;return pt}o(GK,"strictLastIndexOf");function lp(ce){return cp(ce)?WK(ce):BK(ce)}o(lp,"stringSize");function ta(ce){return cp(ce)?zK(ce):RK(ce)}o(ta,"stringToArray");function rP(ce){for(var Ie=ce.length;Ie--&&zx.test(ce.charAt(Ie)););return Ie}o(rP,"trimmedEndIndex");var XK=R2(bK);function WK(ce){for(var Ie=C2.lastIndex=0;C2.test(ce);)++Ie;return Ie}o(WK,"unicodeSize");function zK(ce){return ce.match(C2)||[]}o(zK,"unicodeToArray");function JK(ce){return ce.match(gK)||[]}o(JK,"unicodeWords");var YK=o(function ce(Ie){Ie=Ie==null?Rn:Bu.defaults(Rn.Object(),Ie,Bu.pick(Rn,xK));var be=Ie.Array,pt=Ie.Date,Vt=Ie.Error,wr=Ie.Function,Nn=Ie.Math,Dr=Ie.Object,V2=Ie.RegExp,QK=Ie.String,Ei=Ie.TypeError,rw=be.prototype,ZK=wr.prototype,fp=Dr.prototype,nw=Ie["__core-js_shared__"],sw=ZK.toString,Ar=fp.hasOwnProperty,e$=0,nP=(function(){var f=/[^.]+$/.exec(nw&&nw.keys&&nw.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""})(),iw=fp.toString,t$=sw.call(Dr),r$=Rn._,n$=V2("^"+sw.call(Ar).replace(fr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),aw=FO?Ie.Buffer:r,Ru=Ie.Symbol,ow=Ie.Uint8Array,sP=aw?aw.allocUnsafe:r,uw=tP(Dr.getPrototypeOf,Dr),iP=Dr.create,aP=fp.propertyIsEnumerable,cw=rw.splice,oP=Ru?Ru.isConcatSpreadable:r,sg=Ru?Ru.iterator:r,kl=Ru?Ru.toStringTag:r,lw=(function(){try{var f=Fl(Dr,"defineProperty");return f({},"",{}),f}catch{}})(),s$=Ie.clearTimeout!==Rn.clearTimeout&&Ie.clearTimeout,i$=pt&&pt.now!==Rn.Date.now&&pt.now,a$=Ie.setTimeout!==Rn.setTimeout&&Ie.setTimeout,fw=Nn.ceil,hw=Nn.floor,U2=Dr.getOwnPropertySymbols,o$=aw?aw.isBuffer:r,uP=Ie.isFinite,u$=rw.join,c$=tP(Dr.keys,Dr),Tn=Nn.max,os=Nn.min,l$=pt.now,f$=Ie.parseInt,cP=Nn.random,h$=rw.reverse,j2=Fl(Ie,"DataView"),ig=Fl(Ie,"Map"),F2=Fl(Ie,"Promise"),hp=Fl(Ie,"Set"),ag=Fl(Ie,"WeakMap"),og=Fl(Dr,"create"),pw=ag&&new ag,pp={},p$=Ml(j2),d$=Ml(ig),m$=Ml(F2),g$=Ml(hp),v$=Ml(ag),dw=Ru?Ru.prototype:r,ug=dw?dw.valueOf:r,lP=dw?dw.toString:r;function F(f){if(nn(f)&&!Ft(f)&&!(f instanceof ir)){if(f instanceof bi)return f;if(Ar.call(f,"__wrapped__"))return f3(f)}return new bi(f)}o(F,"lodash");var dp=(function(){function f(){}return o(f,"object"),function(p){if(!Jr(p))return{};if(iP)return iP(p);f.prototype=p;var x=new f;return f.prototype=r,x}})();function mw(){}o(mw,"baseLodash");function bi(f,p){this.__wrapped__=f,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=r}o(bi,"LodashWrapper"),F.templateSettings={escape:jt,evaluate:Qt,interpolate:it,variable:"",imports:{_:F}},F.prototype=mw.prototype,F.prototype.constructor=F,bi.prototype=dp(mw.prototype),bi.prototype.constructor=bi;function ir(f){this.__wrapped__=f,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ze,this.__views__=[]}o(ir,"LazyWrapper");function y$(){var f=new ir(this.__wrapped__);return f.__actions__=Bs(this.__actions__),f.__dir__=this.__dir__,f.__filtered__=this.__filtered__,f.__iteratees__=Bs(this.__iteratees__),f.__takeCount__=this.__takeCount__,f.__views__=Bs(this.__views__),f}o(y$,"lazyClone");function x$(){if(this.__filtered__){var f=new ir(this);f.__dir__=-1,f.__filtered__=!0}else f=this.clone(),f.__dir__*=-1;return f}o(x$,"lazyReverse");function w$(){var f=this.__wrapped__.value(),p=this.__dir__,x=Ft(f),D=p<0,k=x?f.length:0,$=RG(0,k,this.__views__),Q=$.start,te=$.end,me=te-Q,_e=D?te:Q-1,Pe=this.__iteratees__,Fe=Pe.length,rt=0,mt=os(me,this.__takeCount__);if(!x||!D&&k==me&&mt==me)return PP(f,this.__actions__);var It=[];e:for(;me--&&rt<mt;){_e+=p;for(var Wt=-1,_t=f[_e];++Wt<Fe;){var Zt=Pe[Wt],or=Zt.iteratee,ai=Zt.type,Ss=or(_t);if(ai==he)_t=Ss;else if(!Ss){if(ai==W)continue e;break e}}It[rt++]=_t}return It}o(w$,"lazyValue"),ir.prototype=dp(mw.prototype),ir.prototype.constructor=ir;function Ll(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(Ll,"Hash");function S$(){this.__data__=og?og(null):{},this.size=0}o(S$,"hashClear");function E$(f){var p=this.has(f)&&delete this.__data__[f];return this.size-=p?1:0,p}o(E$,"hashDelete");function b$(f){var p=this.__data__;if(og){var x=p[f];return x===a?r:x}return Ar.call(p,f)?p[f]:r}o(b$,"hashGet");function A$(f){var p=this.__data__;return og?p[f]!==r:Ar.call(p,f)}o(A$,"hashHas");function C$(f,p){var x=this.__data__;return this.size+=this.has(f)?0:1,x[f]=og&&p===r?a:p,this}o(C$,"hashSet"),Ll.prototype.clear=S$,Ll.prototype.delete=E$,Ll.prototype.get=b$,Ll.prototype.has=A$,Ll.prototype.set=C$;function To(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(To,"ListCache");function N$(){this.__data__=[],this.size=0}o(N$,"listCacheClear");function T$(f){var p=this.__data__,x=gw(p,f);if(x<0)return!1;var D=p.length-1;return x==D?p.pop():cw.call(p,x,1),--this.size,!0}o(T$,"listCacheDelete");function I$(f){var p=this.__data__,x=gw(p,f);return x<0?r:p[x][1]}o(I$,"listCacheGet");function _$(f){return gw(this.__data__,f)>-1}o(_$,"listCacheHas");function D$(f,p){var x=this.__data__,D=gw(x,f);return D<0?(++this.size,x.push([f,p])):x[D][1]=p,this}o(D$,"listCacheSet"),To.prototype.clear=N$,To.prototype.delete=T$,To.prototype.get=I$,To.prototype.has=_$,To.prototype.set=D$;function Io(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(Io,"MapCache");function B$(){this.size=0,this.__data__={hash:new Ll,map:new(ig||To),string:new Ll}}o(B$,"mapCacheClear");function R$(f){var p=Iw(this,f).delete(f);return this.size-=p?1:0,p}o(R$,"mapCacheDelete");function O$(f){return Iw(this,f).get(f)}o(O$,"mapCacheGet");function P$(f){return Iw(this,f).has(f)}o(P$,"mapCacheHas");function k$(f,p){var x=Iw(this,f),D=x.size;return x.set(f,p),this.size+=x.size==D?0:1,this}o(k$,"mapCacheSet"),Io.prototype.clear=B$,Io.prototype.delete=R$,Io.prototype.get=O$,Io.prototype.has=P$,Io.prototype.set=k$;function Vl(f){var p=-1,x=f==null?0:f.length;for(this.__data__=new Io;++p<x;)this.add(f[p])}o(Vl,"SetCache");function L$(f){return this.__data__.set(f,a),this}o(L$,"setCacheAdd");function V$(f){return this.__data__.has(f)}o(V$,"setCacheHas"),Vl.prototype.add=Vl.prototype.push=L$,Vl.prototype.has=V$;function ra(f){var p=this.__data__=new To(f);this.size=p.size}o(ra,"Stack");function U$(){this.__data__=new To,this.size=0}o(U$,"stackClear");function j$(f){var p=this.__data__,x=p.delete(f);return this.size=p.size,x}o(j$,"stackDelete");function F$(f){return this.__data__.get(f)}o(F$,"stackGet");function M$(f){return this.__data__.has(f)}o(M$,"stackHas");function q$(f,p){var x=this.__data__;if(x instanceof To){var D=x.__data__;if(!ig||D.length<t-1)return D.push([f,p]),this.size=++x.size,this;x=this.__data__=new Io(D)}return x.set(f,p),this.size=x.size,this}o(q$,"stackSet"),ra.prototype.clear=U$,ra.prototype.delete=j$,ra.prototype.get=F$,ra.prototype.has=M$,ra.prototype.set=q$;function fP(f,p){var x=Ft(f),D=!x&&ql(f),k=!x&&!D&&Vu(f),$=!x&&!D&&!k&&yp(f),Q=x||D||k||$,te=Q?P2(f.length,QK):[],me=te.length;for(var _e in f)(p||Ar.call(f,_e))&&!(Q&&(_e=="length"||k&&(_e=="offset"||_e=="parent")||$&&(_e=="buffer"||_e=="byteLength"||_e=="byteOffset")||Ro(_e,me)))&&te.push(_e);return te}o(fP,"arrayLikeKeys");function hP(f){var p=f.length;return p?f[Y2(0,p-1)]:r}o(hP,"arraySample");function H$(f,p){return _w(Bs(f),Ul(p,0,f.length))}o(H$,"arraySampleSize");function K$(f){return _w(Bs(f))}o(K$,"arrayShuffle");function M2(f,p,x){(x!==r&&!na(f[p],x)||x===r&&!(p in f))&&_o(f,p,x)}o(M2,"assignMergeValue");function cg(f,p,x){var D=f[p];(!(Ar.call(f,p)&&na(D,x))||x===r&&!(p in f))&&_o(f,p,x)}o(cg,"assignValue");function gw(f,p){for(var x=f.length;x--;)if(na(f[x][0],p))return x;return-1}o(gw,"assocIndexOf");function $$(f,p,x,D){return Ou(f,function(k,$,Q){p(D,k,x(k),Q)}),D}o($$,"baseAggregator");function pP(f,p){return f&&Pa(p,On(p),f)}o(pP,"baseAssign");function G$(f,p){return f&&Pa(p,Os(p),f)}o(G$,"baseAssignIn");function _o(f,p,x){p=="__proto__"&&lw?lw(f,p,{configurable:!0,enumerable:!0,value:x,writable:!0}):f[p]=x}o(_o,"baseAssignValue");function q2(f,p){for(var x=-1,D=p.length,k=be(D),$=f==null;++x<D;)k[x]=$?r:EN(f,p[x]);return k}o(q2,"baseAt");function Ul(f,p,x){return f===f&&(x!==r&&(f=f<=x?f:x),p!==r&&(f=f>=p?f:p)),f}o(Ul,"baseClamp");function Ai(f,p,x,D,k,$){var Q,te=p&l,me=p&h,_e=p&m;if(x&&(Q=k?x(f,D,k,$):x(f)),Q!==r)return Q;if(!Jr(f))return f;var Pe=Ft(f);if(Pe){if(Q=PG(f),!te)return Bs(f,Q)}else{var Fe=us(f),rt=Fe==Se||Fe==Ce;if(Vu(f))return VP(f,te);if(Fe==Me||Fe==He||rt&&!k){if(Q=me||rt?{}:r3(f),!te)return me?bG(f,G$(Q,f)):EG(f,pP(Q,f))}else{if(!Pr[Fe])return k?f:{};Q=kG(f,Fe,te)}}$||($=new ra);var mt=$.get(f);if(mt)return mt;$.set(f,Q),B3(f)?f.forEach(function(_t){Q.add(Ai(_t,p,x,_t,f,$))}):_3(f)&&f.forEach(function(_t,Zt){Q.set(Zt,Ai(_t,p,x,Zt,f,$))});var It=_e?me?uN:oN:me?Os:On,Wt=Pe?r:It(f);return Si(Wt||f,function(_t,Zt){Wt&&(Zt=_t,_t=f[Zt]),cg(Q,Zt,Ai(_t,p,x,Zt,f,$))}),Q}o(Ai,"baseClone");function X$(f){var p=On(f);return function(x){return dP(x,f,p)}}o(X$,"baseConforms");function dP(f,p,x){var D=x.length;if(f==null)return!D;for(f=Dr(f);D--;){var k=x[D],$=p[k],Q=f[k];if(Q===r&&!(k in f)||!$(Q))return!1}return!0}o(dP,"baseConformsTo");function mP(f,p,x){if(typeof f!="function")throw new Ei(s);return gg(function(){f.apply(r,x)},p)}o(mP,"baseDelay");function lg(f,p,x,D){var k=-1,$=Zx,Q=!0,te=f.length,me=[],_e=p.length;if(!te)return me;x&&(p=Gr(p,ni(x))),D?($=I2,Q=!1):p.length>=t&&($=ng,Q=!1,p=new Vl(p));e:for(;++k<te;){var Pe=f[k],Fe=x==null?Pe:x(Pe);if(Pe=D||Pe!==0?Pe:0,Q&&Fe===Fe){for(var rt=_e;rt--;)if(p[rt]===Fe)continue e;me.push(Pe)}else $(p,Fe,D)||me.push(Pe)}return me}o(lg,"baseDifference");var Ou=qP(Oa),gP=qP(K2,!0);function W$(f,p){var x=!0;return Ou(f,function(D,k,$){return x=!!p(D,k,$),x}),x}o(W$,"baseEvery");function vw(f,p,x){for(var D=-1,k=f.length;++D<k;){var $=f[D],Q=p($);if(Q!=null&&(te===r?Q===Q&&!ii(Q):x(Q,te)))var te=Q,me=$}return me}o(vw,"baseExtremum");function z$(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:O3(D);x<D;)f[x++]=p;return f}o(z$,"baseFill");function vP(f,p){var x=[];return Ou(f,function(D,k,$){p(D,k,$)&&x.push(D)}),x}o(vP,"baseFilter");function Xn(f,p,x,D,k){var $=-1,Q=f.length;for(x||(x=VG),k||(k=[]);++$<Q;){var te=f[$];p>0&&x(te)?p>1?Xn(te,p-1,x,D,k):_u(k,te):D||(k[k.length]=te)}return k}o(Xn,"baseFlatten");var H2=HP(),yP=HP(!0);function Oa(f,p){return f&&H2(f,p,On)}o(Oa,"baseForOwn");function K2(f,p){return f&&yP(f,p,On)}o(K2,"baseForOwnRight");function yw(f,p){return Iu(p,function(x){return Oo(f[x])})}o(yw,"baseFunctions");function jl(f,p){p=ku(p,f);for(var x=0,D=p.length;f!=null&&x<D;)f=f[ka(p[x++])];return x&&x==D?f:r}o(jl,"baseGet");function xP(f,p,x){var D=p(f);return Ft(f)?D:_u(D,x(f))}o(xP,"baseGetAllKeys");function xs(f){return f==null?f===r?Ds:Tt:kl&&kl in Dr(f)?BG(f):KG(f)}o(xs,"baseGetTag");function $2(f,p){return f>p}o($2,"baseGt");function J$(f,p){return f!=null&&Ar.call(f,p)}o(J$,"baseHas");function Y$(f,p){return f!=null&&p in Dr(f)}o(Y$,"baseHasIn");function Q$(f,p,x){return f>=os(p,x)&&f<Tn(p,x)}o(Q$,"baseInRange");function G2(f,p,x){for(var D=x?I2:Zx,k=f[0].length,$=f.length,Q=$,te=be($),me=1/0,_e=[];Q--;){var Pe=f[Q];Q&&p&&(Pe=Gr(Pe,ni(p))),me=os(Pe.length,me),te[Q]=!x&&(p||k>=120&&Pe.length>=120)?new Vl(Q&&Pe):r}Pe=f[0];var Fe=-1,rt=te[0];e:for(;++Fe<k&&_e.length<me;){var mt=Pe[Fe],It=p?p(mt):mt;if(mt=x||mt!==0?mt:0,!(rt?ng(rt,It):D(_e,It,x))){for(Q=$;--Q;){var Wt=te[Q];if(!(Wt?ng(Wt,It):D(f[Q],It,x)))continue e}rt&&rt.push(It),_e.push(mt)}}return _e}o(G2,"baseIntersection");function Z$(f,p,x,D){return Oa(f,function(k,$,Q){p(D,x(k),$,Q)}),D}o(Z$,"baseInverter");function fg(f,p,x){p=ku(p,f),f=a3(f,p);var D=f==null?f:f[ka(Ni(p))];return D==null?r:ri(D,f,x)}o(fg,"baseInvoke");function wP(f){return nn(f)&&xs(f)==He}o(wP,"baseIsArguments");function eG(f){return nn(f)&&xs(f)==st}o(eG,"baseIsArrayBuffer");function tG(f){return nn(f)&&xs(f)==E}o(tG,"baseIsDate");function hg(f,p,x,D,k){return f===p?!0:f==null||p==null||!nn(f)&&!nn(p)?f!==f&&p!==p:rG(f,p,x,D,hg,k)}o(hg,"baseIsEqual");function rG(f,p,x,D,k,$){var Q=Ft(f),te=Ft(p),me=Q?Le:us(f),_e=te?Le:us(p);me=me==He?Me:me,_e=_e==He?Me:_e;var Pe=me==Me,Fe=_e==Me,rt=me==_e;if(rt&&Vu(f)){if(!Vu(p))return!1;Q=!0,Pe=!1}if(rt&&!Pe)return $||($=new ra),Q||yp(f)?ZP(f,p,x,D,k,$):_G(f,p,me,x,D,k,$);if(!(x&g)){var mt=Pe&&Ar.call(f,"__wrapped__"),It=Fe&&Ar.call(p,"__wrapped__");if(mt||It){var Wt=mt?f.value():f,_t=It?p.value():p;return $||($=new ra),k(Wt,_t,x,D,$)}}return rt?($||($=new ra),DG(f,p,x,D,k,$)):!1}o(rG,"baseIsEqualDeep");function nG(f){return nn(f)&&us(f)==Ae}o(nG,"baseIsMap");function X2(f,p,x,D){var k=x.length,$=k,Q=!D;if(f==null)return!$;for(f=Dr(f);k--;){var te=x[k];if(Q&&te[2]?te[1]!==f[te[0]]:!(te[0]in f))return!1}for(;++k<$;){te=x[k];var me=te[0],_e=f[me],Pe=te[1];if(Q&&te[2]){if(_e===r&&!(me in f))return!1}else{var Fe=new ra;if(D)var rt=D(_e,Pe,me,f,p,Fe);if(!(rt===r?hg(Pe,_e,g|y,D,Fe):rt))return!1}}return!0}o(X2,"baseIsMatch");function SP(f){if(!Jr(f)||jG(f))return!1;var p=Oo(f)?n$:XH;return p.test(Ml(f))}o(SP,"baseIsNative");function sG(f){return nn(f)&&xs(f)==Qe}o(sG,"baseIsRegExp");function iG(f){return nn(f)&&us(f)==_r}o(iG,"baseIsSet");function aG(f){return nn(f)&&kw(f.length)&&!!qr[xs(f)]}o(aG,"baseIsTypedArray");function EP(f){return typeof f=="function"?f:f==null?Ps:typeof f=="object"?Ft(f)?CP(f[0],f[1]):AP(f):K3(f)}o(EP,"baseIteratee");function W2(f){if(!mg(f))return c$(f);var p=[];for(var x in Dr(f))Ar.call(f,x)&&x!="constructor"&&p.push(x);return p}o(W2,"baseKeys");function oG(f){if(!Jr(f))return HG(f);var p=mg(f),x=[];for(var D in f)D=="constructor"&&(p||!Ar.call(f,D))||x.push(D);return x}o(oG,"baseKeysIn");function z2(f,p){return f<p}o(z2,"baseLt");function bP(f,p){var x=-1,D=Rs(f)?be(f.length):[];return Ou(f,function(k,$,Q){D[++x]=p(k,$,Q)}),D}o(bP,"baseMap");function AP(f){var p=lN(f);return p.length==1&&p[0][2]?s3(p[0][0],p[0][1]):function(x){return x===f||X2(x,f,p)}}o(AP,"baseMatches");function CP(f,p){return hN(f)&&n3(p)?s3(ka(f),p):function(x){var D=EN(x,f);return D===r&&D===p?bN(x,f):hg(p,D,g|y)}}o(CP,"baseMatchesProperty");function xw(f,p,x,D,k){f!==p&&H2(p,function($,Q){if(k||(k=new ra),Jr($))uG(f,p,Q,x,xw,D,k);else{var te=D?D(dN(f,Q),$,Q+"",f,p,k):r;te===r&&(te=$),M2(f,Q,te)}},Os)}o(xw,"baseMerge");function uG(f,p,x,D,k,$,Q){var te=dN(f,x),me=dN(p,x),_e=Q.get(me);if(_e){M2(f,x,_e);return}var Pe=$?$(te,me,x+"",f,p,Q):r,Fe=Pe===r;if(Fe){var rt=Ft(me),mt=!rt&&Vu(me),It=!rt&&!mt&&yp(me);Pe=me,rt||mt||It?Ft(te)?Pe=te:pn(te)?Pe=Bs(te):mt?(Fe=!1,Pe=VP(me,!0)):It?(Fe=!1,Pe=UP(me,!0)):Pe=[]:vg(me)||ql(me)?(Pe=te,ql(te)?Pe=P3(te):(!Jr(te)||Oo(te))&&(Pe=r3(me))):Fe=!1}Fe&&(Q.set(me,Pe),k(Pe,me,D,$,Q),Q.delete(me)),M2(f,x,Pe)}o(uG,"baseMergeDeep");function NP(f,p){var x=f.length;if(x)return p+=p<0?x:0,Ro(p,x)?f[p]:r}o(NP,"baseNth");function TP(f,p,x){p.length?p=Gr(p,function($){return Ft($)?function(Q){return jl(Q,$.length===1?$[0]:$)}:$}):p=[Ps];var D=-1;p=Gr(p,ni(At()));var k=bP(f,function($,Q,te){var me=Gr(p,function(_e){return _e($)});return{criteria:me,index:++D,value:$}});return kK(k,function($,Q){return SG($,Q,x)})}o(TP,"baseOrderBy");function cG(f,p){return IP(f,p,function(x,D){return bN(f,D)})}o(cG,"basePick");function IP(f,p,x){for(var D=-1,k=p.length,$={};++D<k;){var Q=p[D],te=jl(f,Q);x(te,Q)&&pg($,ku(Q,f),te)}return $}o(IP,"basePickBy");function lG(f){return function(p){return jl(p,f)}}o(lG,"basePropertyDeep");function J2(f,p,x,D){var k=D?PK:up,$=-1,Q=p.length,te=f;for(f===p&&(p=Bs(p)),x&&(te=Gr(f,ni(x)));++$<Q;)for(var me=0,_e=p[$],Pe=x?x(_e):_e;(me=k(te,Pe,me,D))>-1;)te!==f&&cw.call(te,me,1),cw.call(f,me,1);return f}o(J2,"basePullAll");function _P(f,p){for(var x=f?p.length:0,D=x-1;x--;){var k=p[x];if(x==D||k!==$){var $=k;Ro(k)?cw.call(f,k,1):eN(f,k)}}return f}o(_P,"basePullAt");function Y2(f,p){return f+hw(cP()*(p-f+1))}o(Y2,"baseRandom");function fG(f,p,x,D){for(var k=-1,$=Tn(fw((p-f)/(x||1)),0),Q=be($);$--;)Q[D?$:++k]=f,f+=x;return Q}o(fG,"baseRange");function Q2(f,p){var x="";if(!f||p<1||p>Y)return x;do p%2&&(x+=f),p=hw(p/2),p&&(f+=f);while(p);return x}o(Q2,"baseRepeat");function Yt(f,p){return mN(i3(f,p,Ps),f+"")}o(Yt,"baseRest");function hG(f){return hP(xp(f))}o(hG,"baseSample");function pG(f,p){var x=xp(f);return _w(x,Ul(p,0,x.length))}o(pG,"baseSampleSize");function pg(f,p,x,D){if(!Jr(f))return f;p=ku(p,f);for(var k=-1,$=p.length,Q=$-1,te=f;te!=null&&++k<$;){var me=ka(p[k]),_e=x;if(me==="__proto__"||me==="constructor"||me==="prototype")return f;if(k!=Q){var Pe=te[me];_e=D?D(Pe,me,te):r,_e===r&&(_e=Jr(Pe)?Pe:Ro(p[k+1])?[]:{})}cg(te,me,_e),te=te[me]}return f}o(pg,"baseSet");var DP=pw?function(f,p){return pw.set(f,p),f}:Ps,dG=lw?function(f,p){return lw(f,"toString",{configurable:!0,enumerable:!1,value:CN(p),writable:!0})}:Ps;function mG(f){return _w(xp(f))}o(mG,"baseShuffle");function Ci(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(Ci,"baseSlice");function gG(f,p){var x;return Ou(f,function(D,k,$){return x=p(D,k,$),!x}),!!x}o(gG,"baseSome");function ww(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&&!ii(Q)&&(x?Q<=p:Q<p)?D=$+1:k=$}return k}return Z2(f,p,Ps,x)}o(ww,"baseSortedIndex");function Z2(f,p,x,D){var k=0,$=f==null?0:f.length;if($===0)return 0;p=x(p);for(var Q=p!==p,te=p===null,me=ii(p),_e=p===r;k<$;){var Pe=hw((k+$)/2),Fe=x(f[Pe]),rt=Fe!==r,mt=Fe===null,It=Fe===Fe,Wt=ii(Fe);if(Q)var _t=D||It;else _e?_t=It&&(D||rt):te?_t=It&&rt&&(D||!mt):me?_t=It&&rt&&!mt&&(D||!Wt):mt||Wt?_t=!1:_t=D?Fe<=p:Fe<p;_t?k=Pe+1:$=Pe}return os($,ne)}o(Z2,"baseSortedIndexBy");function BP(f,p){for(var x=-1,D=f.length,k=0,$=[];++x<D;){var Q=f[x],te=p?p(Q):Q;if(!x||!na(te,me)){var me=te;$[k++]=Q===0?0:Q}}return $}o(BP,"baseSortedUniq");function RP(f){return typeof f=="number"?f:ii(f)?Oe:+f}o(RP,"baseToNumber");function si(f){if(typeof f=="string")return f;if(Ft(f))return Gr(f,si)+"";if(ii(f))return lP?lP.call(f):"";var p=f+"";return p=="0"&&1/f==-ue?"-0":p}o(si,"baseToString");function Pu(f,p,x){var D=-1,k=Zx,$=f.length,Q=!0,te=[],me=te;if(x)Q=!1,k=I2;else if($>=t){var _e=p?null:TG(f);if(_e)return tw(_e);Q=!1,k=ng,me=new Vl}else me=p?[]:te;e:for(;++D<$;){var Pe=f[D],Fe=p?p(Pe):Pe;if(Pe=x||Pe!==0?Pe:0,Q&&Fe===Fe){for(var rt=me.length;rt--;)if(me[rt]===Fe)continue e;p&&me.push(Fe),te.push(Pe)}else k(me,Fe,x)||(me!==te&&me.push(Fe),te.push(Pe))}return te}o(Pu,"baseUniq");function eN(f,p){return p=ku(p,f),f=a3(f,p),f==null||delete f[ka(Ni(p))]}o(eN,"baseUnset");function OP(f,p,x,D){return pg(f,p,x(jl(f,p)),D)}o(OP,"baseUpdate");function Sw(f,p,x,D){for(var k=f.length,$=D?k:-1;(D?$--:++$<k)&&p(f[$],$,f););return x?Ci(f,D?0:$,D?$+1:k):Ci(f,D?$+1:0,D?k:$)}o(Sw,"baseWhile");function PP(f,p){var x=f;return x instanceof ir&&(x=x.value()),_2(p,function(D,k){return k.func.apply(k.thisArg,_u([D],k.args))},x)}o(PP,"baseWrapperValue");function tN(f,p,x){var D=f.length;if(D<2)return D?Pu(f[0]):[];for(var k=-1,$=be(D);++k<D;)for(var Q=f[k],te=-1;++te<D;)te!=k&&($[k]=lg($[k]||Q,f[te],p,x));return Pu(Xn($,1),p,x)}o(tN,"baseXor");function kP(f,p,x){for(var D=-1,k=f.length,$=p.length,Q={};++D<k;){var te=D<$?p[D]:r;x(Q,f[D],te)}return Q}o(kP,"baseZipObject");function rN(f){return pn(f)?f:[]}o(rN,"castArrayLikeObject");function nN(f){return typeof f=="function"?f:Ps}o(nN,"castFunction");function ku(f,p){return Ft(f)?f:hN(f,p)?[f]:l3(Sr(f))}o(ku,"castPath");var vG=Yt;function Lu(f,p,x){var D=f.length;return x=x===r?D:x,!p&&x>=D?f:Ci(f,p,x)}o(Lu,"castSlice");var LP=s$||function(f){return Rn.clearTimeout(f)};function VP(f,p){if(p)return f.slice();var x=f.length,D=sP?sP(x):new f.constructor(x);return f.copy(D),D}o(VP,"cloneBuffer");function sN(f){var p=new f.constructor(f.byteLength);return new ow(p).set(new ow(f)),p}o(sN,"cloneArrayBuffer");function yG(f,p){var x=p?sN(f.buffer):f.buffer;return new f.constructor(x,f.byteOffset,f.byteLength)}o(yG,"cloneDataView");function xG(f){var p=new f.constructor(f.source,ea.exec(f));return p.lastIndex=f.lastIndex,p}o(xG,"cloneRegExp");function wG(f){return ug?Dr(ug.call(f)):{}}o(wG,"cloneSymbol");function UP(f,p){var x=p?sN(f.buffer):f.buffer;return new f.constructor(x,f.byteOffset,f.length)}o(UP,"cloneTypedArray");function jP(f,p){if(f!==p){var x=f!==r,D=f===null,k=f===f,$=ii(f),Q=p!==r,te=p===null,me=p===p,_e=ii(p);if(!te&&!_e&&!$&&f>p||$&&Q&&me&&!te&&!_e||D&&Q&&me||!x&&me||!k)return 1;if(!D&&!$&&!_e&&f<p||_e&&x&&k&&!D&&!$||te&&x&&k||!Q&&k||!me)return-1}return 0}o(jP,"compareAscending");function SG(f,p,x){for(var D=-1,k=f.criteria,$=p.criteria,Q=k.length,te=x.length;++D<Q;){var me=jP(k[D],$[D]);if(me){if(D>=te)return me;var _e=x[D];return me*(_e=="desc"?-1:1)}}return f.index-p.index}o(SG,"compareMultiple");function FP(f,p,x,D){for(var k=-1,$=f.length,Q=x.length,te=-1,me=p.length,_e=Tn($-Q,0),Pe=be(me+_e),Fe=!D;++te<me;)Pe[te]=p[te];for(;++k<Q;)(Fe||k<$)&&(Pe[x[k]]=f[k]);for(;_e--;)Pe[te++]=f[k++];return Pe}o(FP,"composeArgs");function MP(f,p,x,D){for(var k=-1,$=f.length,Q=-1,te=x.length,me=-1,_e=p.length,Pe=Tn($-te,0),Fe=be(Pe+_e),rt=!D;++k<Pe;)Fe[k]=f[k];for(var mt=k;++me<_e;)Fe[mt+me]=p[me];for(;++Q<te;)(rt||k<$)&&(Fe[mt+x[Q]]=f[k++]);return Fe}o(MP,"composeArgsRight");function Bs(f,p){var x=-1,D=f.length;for(p||(p=be(D));++x<D;)p[x]=f[x];return p}o(Bs,"copyArray");function Pa(f,p,x,D){var k=!x;x||(x={});for(var $=-1,Q=p.length;++$<Q;){var te=p[$],me=D?D(x[te],f[te],te,x,f):r;me===r&&(me=f[te]),k?_o(x,te,me):cg(x,te,me)}return x}o(Pa,"copyObject");function EG(f,p){return Pa(f,fN(f),p)}o(EG,"copySymbols");function bG(f,p){return Pa(f,e3(f),p)}o(bG,"copySymbolsIn");function Ew(f,p){return function(x,D){var k=Ft(x)?IK:$$,$=p?p():{};return k(x,f,At(D,2),$)}}o(Ew,"createAggregator");function mp(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&&ws(x[0],x[1],Q)&&($=k<3?r:$,k=1),p=Dr(p);++D<k;){var te=x[D];te&&f(p,te,D,$)}return p})}o(mp,"createAssigner");function qP(f,p){return function(x,D){if(x==null)return x;if(!Rs(x))return f(x,D);for(var k=x.length,$=p?k:-1,Q=Dr(x);(p?$--:++$<k)&&D(Q[$],$,Q)!==!1;);return x}}o(qP,"createBaseEach");function HP(f){return function(p,x,D){for(var k=-1,$=Dr(p),Q=D(p),te=Q.length;te--;){var me=Q[f?te:++k];if(x($[me],me,$)===!1)break}return p}}o(HP,"createBaseFor");function AG(f,p,x){var D=p&v,k=dg(f);function $(){var Q=this&&this!==Rn&&this instanceof $?k:f;return Q.apply(D?x:this,arguments)}return o($,"wrapper"),$}o(AG,"createBind");function KP(f){return function(p){p=Sr(p);var x=cp(p)?ta(p):r,D=x?x[0]:p.charAt(0),k=x?Lu(x,1).join(""):p.slice(1);return D[f]()+k}}o(KP,"createCaseFirst");function gp(f){return function(p){return _2(q3(M3(p).replace(dK,"")),f,"")}}o(gp,"createCompounder");function dg(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=dp(f.prototype),D=f.apply(x,p);return Jr(D)?D:x}}o(dg,"createCtor");function CG(f,p,x){var D=dg(f);function k(){for(var $=arguments.length,Q=be($),te=$,me=vp(k);te--;)Q[te]=arguments[te];var _e=$<3&&Q[0]!==me&&Q[$-1]!==me?[]:Du(Q,me);if($-=_e.length,$<x)return zP(f,p,bw,k.placeholder,r,Q,_e,r,r,x-$);var Pe=this&&this!==Rn&&this instanceof k?D:f;return ri(Pe,this,Q)}return o(k,"wrapper"),k}o(CG,"createCurry");function $P(f){return function(p,x,D){var k=Dr(p);if(!Rs(p)){var $=At(x,3);p=On(p),x=o(function(te){return $(k[te],te,k)},"predicate")}var Q=f(p,x,D);return Q>-1?k[$?p[Q]:Q]:r}}o($P,"createFind");function GP(f){return Bo(function(p){var x=p.length,D=x,k=bi.prototype.thru;for(f&&p.reverse();D--;){var $=p[D];if(typeof $!="function")throw new Ei(s);if(k&&!Q&&Tw($)=="wrapper")var Q=new bi([],!0)}for(D=Q?D:x;++D<x;){$=p[D];var te=Tw($),me=te=="wrapper"?cN($):r;me&&pN(me[0])&&me[1]==(T|C|b|B)&&!me[4].length&&me[9]==1?Q=Q[Tw(me[0])].apply(Q,me[3]):Q=$.length==1&&pN($)?Q[te]():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,rt=x?p[Fe].apply(this,_e):Pe;++Fe<x;)rt=p[Fe].call(this,rt);return rt}})}o(GP,"createFlow");function bw(f,p,x,D,k,$,Q,te,me,_e){var Pe=p&T,Fe=p&v,rt=p&S,mt=p&(C|_),It=p&M,Wt=rt?r:dg(f);function _t(){for(var Zt=arguments.length,or=be(Zt),ai=Zt;ai--;)or[ai]=arguments[ai];if(mt)var Ss=vp(_t),oi=VK(or,Ss);if(D&&(or=FP(or,D,k,mt)),$&&(or=MP(or,$,Q,mt)),Zt-=oi,mt&&Zt<_e){var dn=Du(or,Ss);return zP(f,p,bw,_t.placeholder,x,or,dn,te,me,_e-Zt)}var sa=Fe?x:this,ko=rt?sa[f]:f;return Zt=or.length,te?or=$G(or,te):It&&Zt>1&&or.reverse(),Pe&&me<Zt&&(or.length=me),this&&this!==Rn&&this instanceof _t&&(ko=Wt||dg(ko)),ko.apply(sa,or)}return o(_t,"wrapper"),_t}o(bw,"createHybrid");function XP(f,p){return function(x,D){return Z$(x,f,p(D),{})}}o(XP,"createInverter");function Aw(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=si(x),D=si(D)):(x=RP(x),D=RP(D)),k=f(x,D)}return k}}o(Aw,"createMathOperation");function iN(f){return Bo(function(p){return p=Gr(p,ni(At())),Yt(function(x){var D=this;return f(p,function(k){return ri(k,D,x)})})})}o(iN,"createOver");function Cw(f,p){p=p===r?" ":si(p);var x=p.length;if(x<2)return x?Q2(p,f):p;var D=Q2(p,fw(f/lp(p)));return cp(p)?Lu(ta(D),0,f).join(""):D.slice(0,f)}o(Cw,"createPadding");function NG(f,p,x,D){var k=p&v,$=dg(f);function Q(){for(var te=-1,me=arguments.length,_e=-1,Pe=D.length,Fe=be(Pe+me),rt=this&&this!==Rn&&this instanceof Q?$:f;++_e<Pe;)Fe[_e]=D[_e];for(;me--;)Fe[_e++]=arguments[++te];return ri(rt,k?x:this,Fe)}return o(Q,"wrapper"),Q}o(NG,"createPartial");function WP(f){return function(p,x,D){return D&&typeof D!="number"&&ws(p,x,D)&&(x=D=r),p=Po(p),x===r?(x=p,p=0):x=Po(x),D=D===r?p<x?1:-1:Po(D),fG(p,x,D,f)}}o(WP,"createRange");function Nw(f){return function(p,x){return typeof p=="string"&&typeof x=="string"||(p=Ti(p),x=Ti(x)),f(p,x)}}o(Nw,"createRelationalOperation");function zP(f,p,x,D,k,$,Q,te,me,_e){var Pe=p&C,Fe=Pe?Q:r,rt=Pe?r:Q,mt=Pe?$:r,It=Pe?r:$;p|=Pe?b:A,p&=~(Pe?A:b),p&w||(p&=~(v|S));var Wt=[f,p,k,mt,Fe,It,rt,te,me,_e],_t=x.apply(r,Wt);return pN(f)&&o3(_t,Wt),_t.placeholder=D,u3(_t,f,p)}o(zP,"createRecurry");function aN(f){var p=Nn[f];return function(x,D){if(x=Ti(x),D=D==null?0:os(Kt(D),292),D&&uP(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(aN,"createRound");var TG=hp&&1/tw(new hp([,-0]))[1]==ue?function(f){return new hp(f)}:IN;function JP(f){return function(p){var x=us(p);return x==Ae?L2(p):x==_r?KK(p):LK(p,f(p))}}o(JP,"createToPairs");function Do(f,p,x,D,k,$,Q,te){var me=p&S;if(!me&&typeof f!="function")throw new Ei(s);var _e=D?D.length:0;if(_e||(p&=~(b|A),D=k=r),Q=Q===r?Q:Tn(Kt(Q),0),te=te===r?te:Kt(te),_e-=k?k.length:0,p&A){var Pe=D,Fe=k;D=k=r}var rt=me?r:cN(f),mt=[f,p,x,D,k,Pe,Fe,$,Q,te];if(rt&&qG(mt,rt),f=mt[0],p=mt[1],x=mt[2],D=mt[3],k=mt[4],te=mt[9]=mt[9]===r?me?0:f.length:Tn(mt[9]-_e,0),!te&&p&(C|_)&&(p&=~(C|_)),!p||p==v)var It=AG(f,p,x);else p==C||p==_?It=CG(f,p,te):(p==b||p==(v|b))&&!k.length?It=NG(f,p,x,D):It=bw.apply(r,mt);var Wt=rt?DP:o3;return u3(Wt(It,mt),f,p)}o(Do,"createWrap");function YP(f,p,x,D){return f===r||na(f,fp[x])&&!Ar.call(D,x)?p:f}o(YP,"customDefaultsAssignIn");function QP(f,p,x,D,k,$){return Jr(f)&&Jr(p)&&($.set(p,f),xw(f,p,r,QP,$),$.delete(p)),f}o(QP,"customDefaultsMerge");function IG(f){return vg(f)?r:f}o(IG,"customOmitClone");function ZP(f,p,x,D,k,$){var Q=x&g,te=f.length,me=p.length;if(te!=me&&!(Q&&me>te))return!1;var _e=$.get(f),Pe=$.get(p);if(_e&&Pe)return _e==p&&Pe==f;var Fe=-1,rt=!0,mt=x&y?new Vl:r;for($.set(f,p),$.set(p,f);++Fe<te;){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;rt=!1;break}if(mt){if(!D2(p,function(Zt,or){if(!ng(mt,or)&&(It===Zt||k(It,Zt,x,D,$)))return mt.push(or)})){rt=!1;break}}else if(!(It===Wt||k(It,Wt,x,D,$))){rt=!1;break}}return $.delete(f),$.delete(p),rt}o(ZP,"equalArrays");function _G(f,p,x,D,k,$,Q){switch(x){case $n: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 ow(f),new ow(p)));case N:case E:case Ye:return na(+f,+p);case P:return f.name==p.name&&f.message==p.message;case Qe:case $r:return f==p+"";case Ae:var te=L2;case _r:var me=D&g;if(te||(te=tw),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=ZP(te(f),te(p),D,k,$,Q);return Q.delete(f),Pe;case Cn:if(ug)return ug.call(f)==ug.call(p)}return!1}o(_G,"equalByTag");function DG(f,p,x,D,k,$){var Q=x&g,te=oN(f),me=te.length,_e=oN(p),Pe=_e.length;if(me!=Pe&&!Q)return!1;for(var Fe=me;Fe--;){var rt=te[Fe];if(!(Q?rt in p:Ar.call(p,rt)))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;){rt=te[Fe];var Zt=f[rt],or=p[rt];if(D)var ai=Q?D(or,Zt,rt,p,f,$):D(Zt,or,rt,f,p,$);if(!(ai===r?Zt===or||k(Zt,or,x,D,$):ai)){Wt=!1;break}_t||(_t=rt=="constructor")}if(Wt&&!_t){var Ss=f.constructor,oi=p.constructor;Ss!=oi&&"constructor"in f&&"constructor"in p&&!(typeof Ss=="function"&&Ss instanceof Ss&&typeof oi=="function"&&oi instanceof oi)&&(Wt=!1)}return $.delete(f),$.delete(p),Wt}o(DG,"equalObjects");function Bo(f){return mN(i3(f,r,d3),f+"")}o(Bo,"flatRest");function oN(f){return xP(f,On,fN)}o(oN,"getAllKeys");function uN(f){return xP(f,Os,e3)}o(uN,"getAllKeysIn");var cN=pw?function(f){return pw.get(f)}:IN;function Tw(f){for(var p=f.name+"",x=pp[p],D=Ar.call(pp,p)?x.length:0;D--;){var k=x[D],$=k.func;if($==null||$==f)return k.name}return p}o(Tw,"getFuncName");function vp(f){var p=Ar.call(F,"placeholder")?F:f;return p.placeholder}o(vp,"getHolder");function At(){var f=F.iteratee||NN;return f=f===NN?EP:f,arguments.length?f(arguments[0],arguments[1]):f}o(At,"getIteratee");function Iw(f,p){var x=f.__data__;return UG(p)?x[typeof p=="string"?"string":"hash"]:x.map}o(Iw,"getMapData");function lN(f){for(var p=On(f),x=p.length;x--;){var D=p[x],k=f[D];p[x]=[D,k,n3(k)]}return p}o(lN,"getMatchData");function Fl(f,p){var x=MK(f,p);return SP(x)?x:r}o(Fl,"getNative");function BG(f){var p=Ar.call(f,kl),x=f[kl];try{f[kl]=r;var D=!0}catch{}var k=iw.call(f);return D&&(p?f[kl]=x:delete f[kl]),k}o(BG,"getRawTag");var fN=U2?function(f){return f==null?[]:(f=Dr(f),Iu(U2(f),function(p){return aP.call(f,p)}))}:_N,e3=U2?function(f){for(var p=[];f;)_u(p,fN(f)),f=uw(f);return p}:_N,us=xs;(j2&&us(new j2(new ArrayBuffer(1)))!=$n||ig&&us(new ig)!=Ae||F2&&us(F2.resolve())!=Et||hp&&us(new hp)!=_r||ag&&us(new ag)!=vs)&&(us=o(function(f){var p=xs(f),x=p==Me?f.constructor:r,D=x?Ml(x):"";if(D)switch(D){case p$:return $n;case d$:return Ae;case m$:return Et;case g$:return _r;case v$:return vs}return p},"getTag"));function RG(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=os(p,f+Q);break;case"takeRight":f=Tn(f,p-Q);break}}return{start:f,end:p}}o(RG,"getView");function OG(f){var p=f.match(v2);return p?p[1].split(y2):[]}o(OG,"getWrapDetails");function t3(f,p,x){p=ku(p,f);for(var D=-1,k=p.length,$=!1;++D<k;){var Q=ka(p[D]);if(!($=f!=null&&x(f,Q)))break;f=f[Q]}return $||++D!=k?$:(k=f==null?0:f.length,!!k&&kw(k)&&Ro(Q,k)&&(Ft(f)||ql(f)))}o(t3,"hasPath");function PG(f){var p=f.length,x=new f.constructor(p);return p&&typeof f[0]=="string"&&Ar.call(f,"index")&&(x.index=f.index,x.input=f.input),x}o(PG,"initCloneArray");function r3(f){return typeof f.constructor=="function"&&!mg(f)?dp(uw(f)):{}}o(r3,"initCloneObject");function kG(f,p,x){var D=f.constructor;switch(p){case st:return sN(f);case N:case E:return new D(+f);case $n:return yG(f,x);case ys:case Da:case Ba:case Lt:case ip:case ap:case Ol:case tg:case ti:return UP(f,x);case Ae:return new D;case Ye:case $r:return new D(f);case Qe:return xG(f);case _r:return new D;case Cn:return wG(f)}}o(kG,"initCloneByTag");function LG(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(g2,`{
|
|
28
|
+
/* [wrapped with `+p+`] */
|
|
29
|
+
`)}o(LG,"insertWrapDetails");function VG(f){return Ft(f)||ql(f)||!!(oP&&f&&f[oP])}o(VG,"isFlattenable");function Ro(f,p){var x=typeof f;return p=p??Y,!!p&&(x=="number"||x!="symbol"&&zH.test(f))&&f>-1&&f%1==0&&f<p}o(Ro,"isIndex");function ws(f,p,x){if(!Jr(x))return!1;var D=typeof p;return(D=="number"?Rs(x)&&Ro(p,x.length):D=="string"&&p in x)?na(x[p],f):!1}o(ws,"isIterateeCall");function hN(f,p){if(Ft(f))return!1;var x=typeof f;return x=="number"||x=="symbol"||x=="boolean"||f==null||ii(f)?!0:Gn.test(f)||!Pt.test(f)||p!=null&&f in Dr(p)}o(hN,"isKey");function UG(f){var p=typeof f;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?f!=="__proto__":f===null}o(UG,"isKeyable");function pN(f){var p=Tw(f),x=F[p];if(typeof x!="function"||!(p in ir.prototype))return!1;if(f===x)return!0;var D=cN(x);return!!D&&f===D[0]}o(pN,"isLaziable");function jG(f){return!!nP&&nP in f}o(jG,"isMasked");var FG=nw?Oo:DN;function mg(f){var p=f&&f.constructor,x=typeof p=="function"&&p.prototype||fp;return f===x}o(mg,"isPrototype");function n3(f){return f===f&&!Jr(f)}o(n3,"isStrictComparable");function s3(f,p){return function(x){return x==null?!1:x[f]===p&&(p!==r||f in Dr(x))}}o(s3,"matchesStrictComparable");function MG(f){var p=Ow(f,function(D){return x.size===u&&x.clear(),D}),x=p.cache;return p}o(MG,"memoizeCapped");function qG(f,p){var x=f[1],D=p[1],k=x|D,$=k<(v|S|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 te=p[3];if(te){var me=f[3];f[3]=me?FP(me,te,p[4]):te,f[4]=me?Du(f[3],c):p[4]}return te=p[5],te&&(me=f[5],f[5]=me?MP(me,te,p[6]):te,f[6]=me?Du(f[5],c):p[6]),te=p[7],te&&(f[7]=te),D&T&&(f[8]=f[8]==null?p[8]:os(f[8],p[8])),f[9]==null&&(f[9]=p[9]),f[0]=p[0],f[1]=k,f}o(qG,"mergeData");function HG(f){var p=[];if(f!=null)for(var x in Dr(f))p.push(x);return p}o(HG,"nativeKeysIn");function KG(f){return iw.call(f)}o(KG,"objectToString");function i3(f,p,x){return p=Tn(p===r?f.length-1:p,0),function(){for(var D=arguments,k=-1,$=Tn(D.length-p,0),Q=be($);++k<$;)Q[k]=D[p+k];k=-1;for(var te=be(p+1);++k<p;)te[k]=D[k];return te[p]=x(Q),ri(f,this,te)}}o(i3,"overRest");function a3(f,p){return p.length<2?f:jl(f,Ci(p,0,-1))}o(a3,"parent");function $G(f,p){for(var x=f.length,D=os(p.length,x),k=Bs(f);D--;){var $=p[D];f[D]=Ro($,x)?k[$]:r}return f}o($G,"reorder");function dN(f,p){if(!(p==="constructor"&&typeof f[p]=="function")&&p!="__proto__")return f[p]}o(dN,"safeGet");var o3=c3(DP),gg=a$||function(f,p){return Rn.setTimeout(f,p)},mN=c3(dG);function u3(f,p,x){var D=p+"";return mN(f,LG(D,GG(OG(D),x)))}o(u3,"setWrapToString");function c3(f){var p=0,x=0;return function(){var D=l$(),k=q-(D-x);if(x=D,k>0){if(++p>=K)return arguments[0]}else p=0;return f.apply(r,arguments)}}o(c3,"shortOut");function _w(f,p){var x=-1,D=f.length,k=D-1;for(p=p===r?D:p;++x<p;){var $=Y2(x,k),Q=f[$];f[$]=f[x],f[x]=Q}return f.length=p,f}o(_w,"shuffleSelf");var l3=MG(function(f){var p=[];return f.charCodeAt(0)===46&&p.push(""),f.replace(xi,function(x,D,k,$){p.push(k?$.replace(sr,"$1"):D||x)}),p});function ka(f){if(typeof f=="string"||ii(f))return f;var p=f+"";return p=="0"&&1/f==-ue?"-0":p}o(ka,"toKey");function Ml(f){if(f!=null){try{return sw.call(f)}catch{}try{return f+""}catch{}}return""}o(Ml,"toSource");function GG(f,p){return Si(Ee,function(x){var D="_."+x[0];p&x[1]&&!Zx(f,D)&&f.push(D)}),f.sort()}o(GG,"updateWrapDetails");function f3(f){if(f instanceof ir)return f.clone();var p=new bi(f.__wrapped__,f.__chain__);return p.__actions__=Bs(f.__actions__),p.__index__=f.__index__,p.__values__=f.__values__,p}o(f3,"wrapperClone");function XG(f,p,x){(x?ws(f,p,x):p===r)?p=1:p=Tn(Kt(p),0);var D=f==null?0:f.length;if(!D||p<1)return[];for(var k=0,$=0,Q=be(fw(D/p));k<D;)Q[$++]=Ci(f,k,k+=p);return Q}o(XG,"chunk");function WG(f){for(var p=-1,x=f==null?0:f.length,D=0,k=[];++p<x;){var $=f[p];$&&(k[D++]=$)}return k}o(WG,"compact");function zG(){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 _u(Ft(x)?Bs(x):[x],Xn(p,1))}o(zG,"concat");var JG=Yt(function(f,p){return pn(f)?lg(f,Xn(p,1,pn,!0)):[]}),YG=Yt(function(f,p){var x=Ni(p);return pn(x)&&(x=r),pn(f)?lg(f,Xn(p,1,pn,!0),At(x,2)):[]}),QG=Yt(function(f,p){var x=Ni(p);return pn(x)&&(x=r),pn(f)?lg(f,Xn(p,1,pn,!0),r,x):[]});function ZG(f,p,x){var D=f==null?0:f.length;return D?(p=x||p===r?1:Kt(p),Ci(f,p<0?0:p,D)):[]}o(ZG,"drop");function eX(f,p,x){var D=f==null?0:f.length;return D?(p=x||p===r?1:Kt(p),p=D-p,Ci(f,0,p<0?0:p)):[]}o(eX,"dropRight");function tX(f,p){return f&&f.length?Sw(f,At(p,3),!0,!0):[]}o(tX,"dropRightWhile");function rX(f,p){return f&&f.length?Sw(f,At(p,3),!0):[]}o(rX,"dropWhile");function nX(f,p,x,D){var k=f==null?0:f.length;return k?(x&&typeof x!="number"&&ws(f,p,x)&&(x=0,D=k),z$(f,p,x,D)):[]}o(nX,"fill");function h3(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=Tn(D+k,0)),ew(f,At(p,3),k)}o(h3,"findIndex");function p3(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?Tn(D+k,0):os(k,D-1)),ew(f,At(p,3),k,!0)}o(p3,"findLastIndex");function d3(f){var p=f==null?0:f.length;return p?Xn(f,1):[]}o(d3,"flatten");function sX(f){var p=f==null?0:f.length;return p?Xn(f,ue):[]}o(sX,"flattenDeep");function iX(f,p){var x=f==null?0:f.length;return x?(p=p===r?1:Kt(p),Xn(f,p)):[]}o(iX,"flattenDepth");function aX(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(aX,"fromPairs");function m3(f){return f&&f.length?f[0]:r}o(m3,"head");function oX(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=Tn(D+k,0)),up(f,p,k)}o(oX,"indexOf");function uX(f){var p=f==null?0:f.length;return p?Ci(f,0,-1):[]}o(uX,"initial");var cX=Yt(function(f){var p=Gr(f,rN);return p.length&&p[0]===f[0]?G2(p):[]}),lX=Yt(function(f){var p=Ni(f),x=Gr(f,rN);return p===Ni(x)?p=r:x.pop(),x.length&&x[0]===f[0]?G2(x,At(p,2)):[]}),fX=Yt(function(f){var p=Ni(f),x=Gr(f,rN);return p=typeof p=="function"?p:r,p&&x.pop(),x.length&&x[0]===f[0]?G2(x,r,p):[]});function hX(f,p){return f==null?"":u$.call(f,p)}o(hX,"join");function Ni(f){var p=f==null?0:f.length;return p?f[p-1]:r}o(Ni,"last");function pX(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?Tn(D+k,0):os(k,D-1)),p===p?GK(f,p,k):ew(f,zO,k,!0)}o(pX,"lastIndexOf");function dX(f,p){return f&&f.length?NP(f,Kt(p)):r}o(dX,"nth");var mX=Yt(g3);function g3(f,p){return f&&f.length&&p&&p.length?J2(f,p):f}o(g3,"pullAll");function gX(f,p,x){return f&&f.length&&p&&p.length?J2(f,p,At(x,2)):f}o(gX,"pullAllBy");function vX(f,p,x){return f&&f.length&&p&&p.length?J2(f,p,r,x):f}o(vX,"pullAllWith");var yX=Bo(function(f,p){var x=f==null?0:f.length,D=q2(f,p);return _P(f,Gr(p,function(k){return Ro(k,x)?+k:k}).sort(jP)),D});function xX(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 _P(f,k),x}o(xX,"remove");function gN(f){return f==null?f:h$.call(f)}o(gN,"reverse");function wX(f,p,x){var D=f==null?0:f.length;return D?(x&&typeof x!="number"&&ws(f,p,x)?(p=0,x=D):(p=p==null?0:Kt(p),x=x===r?D:Kt(x)),Ci(f,p,x)):[]}o(wX,"slice");function SX(f,p){return ww(f,p)}o(SX,"sortedIndex");function EX(f,p,x){return Z2(f,p,At(x,2))}o(EX,"sortedIndexBy");function bX(f,p){var x=f==null?0:f.length;if(x){var D=ww(f,p);if(D<x&&na(f[D],p))return D}return-1}o(bX,"sortedIndexOf");function AX(f,p){return ww(f,p,!0)}o(AX,"sortedLastIndex");function CX(f,p,x){return Z2(f,p,At(x,2),!0)}o(CX,"sortedLastIndexBy");function NX(f,p){var x=f==null?0:f.length;if(x){var D=ww(f,p,!0)-1;if(na(f[D],p))return D}return-1}o(NX,"sortedLastIndexOf");function TX(f){return f&&f.length?BP(f):[]}o(TX,"sortedUniq");function IX(f,p){return f&&f.length?BP(f,At(p,2)):[]}o(IX,"sortedUniqBy");function _X(f){var p=f==null?0:f.length;return p?Ci(f,1,p):[]}o(_X,"tail");function DX(f,p,x){return f&&f.length?(p=x||p===r?1:Kt(p),Ci(f,0,p<0?0:p)):[]}o(DX,"take");function BX(f,p,x){var D=f==null?0:f.length;return D?(p=x||p===r?1:Kt(p),p=D-p,Ci(f,p<0?0:p,D)):[]}o(BX,"takeRight");function RX(f,p){return f&&f.length?Sw(f,At(p,3),!1,!0):[]}o(RX,"takeRightWhile");function OX(f,p){return f&&f.length?Sw(f,At(p,3)):[]}o(OX,"takeWhile");var PX=Yt(function(f){return Pu(Xn(f,1,pn,!0))}),kX=Yt(function(f){var p=Ni(f);return pn(p)&&(p=r),Pu(Xn(f,1,pn,!0),At(p,2))}),LX=Yt(function(f){var p=Ni(f);return p=typeof p=="function"?p:r,Pu(Xn(f,1,pn,!0),r,p)});function VX(f){return f&&f.length?Pu(f):[]}o(VX,"uniq");function UX(f,p){return f&&f.length?Pu(f,At(p,2)):[]}o(UX,"uniqBy");function jX(f,p){return p=typeof p=="function"?p:r,f&&f.length?Pu(f,r,p):[]}o(jX,"uniqWith");function vN(f){if(!(f&&f.length))return[];var p=0;return f=Iu(f,function(x){if(pn(x))return p=Tn(x.length,p),!0}),P2(p,function(x){return Gr(f,B2(x))})}o(vN,"unzip");function v3(f,p){if(!(f&&f.length))return[];var x=vN(f);return p==null?x:Gr(x,function(D){return ri(p,r,D)})}o(v3,"unzipWith");var FX=Yt(function(f,p){return pn(f)?lg(f,p):[]}),MX=Yt(function(f){return tN(Iu(f,pn))}),qX=Yt(function(f){var p=Ni(f);return pn(p)&&(p=r),tN(Iu(f,pn),At(p,2))}),HX=Yt(function(f){var p=Ni(f);return p=typeof p=="function"?p:r,tN(Iu(f,pn),r,p)}),KX=Yt(vN);function $X(f,p){return kP(f||[],p||[],cg)}o($X,"zipObject");function GX(f,p){return kP(f||[],p||[],pg)}o(GX,"zipObjectDeep");var XX=Yt(function(f){var p=f.length,x=p>1?f[p-1]:r;return x=typeof x=="function"?(f.pop(),x):r,v3(f,x)});function y3(f){var p=F(f);return p.__chain__=!0,p}o(y3,"chain");function WX(f,p){return p(f),f}o(WX,"tap");function Dw(f,p){return p(f)}o(Dw,"thru");var zX=Bo(function(f){var p=f.length,x=p?f[0]:0,D=this.__wrapped__,k=o(function($){return q2($,f)},"interceptor");return p>1||this.__actions__.length||!(D instanceof ir)||!Ro(x)?this.thru(k):(D=D.slice(x,+x+(p?1:0)),D.__actions__.push({func:Dw,args:[k],thisArg:r}),new bi(D,this.__chain__).thru(function($){return p&&!$.length&&$.push(r),$}))});function JX(){return y3(this)}o(JX,"wrapperChain");function YX(){return new bi(this.value(),this.__chain__)}o(YX,"wrapperCommit");function QX(){this.__values__===r&&(this.__values__=R3(this.value()));var f=this.__index__>=this.__values__.length,p=f?r:this.__values__[this.__index__++];return{done:f,value:p}}o(QX,"wrapperNext");function ZX(){return this}o(ZX,"wrapperToIterator");function eW(f){for(var p,x=this;x instanceof mw;){var D=f3(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(eW,"wrapperPlant");function tW(){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:Dw,args:[gN],thisArg:r}),new bi(p,this.__chain__)}return this.thru(gN)}o(tW,"wrapperReverse");function rW(){return PP(this.__wrapped__,this.__actions__)}o(rW,"wrapperValue");var nW=Ew(function(f,p,x){Ar.call(f,x)?++f[x]:_o(f,x,1)});function sW(f,p,x){var D=Ft(f)?XO:W$;return x&&ws(f,p,x)&&(p=r),D(f,At(p,3))}o(sW,"every");function iW(f,p){var x=Ft(f)?Iu:vP;return x(f,At(p,3))}o(iW,"filter");var aW=$P(h3),oW=$P(p3);function uW(f,p){return Xn(Bw(f,p),1)}o(uW,"flatMap");function cW(f,p){return Xn(Bw(f,p),ue)}o(cW,"flatMapDeep");function lW(f,p,x){return x=x===r?1:Kt(x),Xn(Bw(f,p),x)}o(lW,"flatMapDepth");function x3(f,p){var x=Ft(f)?Si:Ou;return x(f,At(p,3))}o(x3,"forEach");function w3(f,p){var x=Ft(f)?_K:gP;return x(f,At(p,3))}o(w3,"forEachRight");var fW=Ew(function(f,p,x){Ar.call(f,x)?f[x].push(p):_o(f,x,[p])});function hW(f,p,x,D){f=Rs(f)?f:xp(f),x=x&&!D?Kt(x):0;var k=f.length;return x<0&&(x=Tn(k+x,0)),Lw(f)?x<=k&&f.indexOf(p,x)>-1:!!k&&up(f,p,x)>-1}o(hW,"includes");var pW=Yt(function(f,p,x){var D=-1,k=typeof p=="function",$=Rs(f)?be(f.length):[];return Ou(f,function(Q){$[++D]=k?ri(p,Q,x):fg(Q,p,x)}),$}),dW=Ew(function(f,p,x){_o(f,x,p)});function Bw(f,p){var x=Ft(f)?Gr:bP;return x(f,At(p,3))}o(Bw,"map");function mW(f,p,x,D){return f==null?[]:(Ft(p)||(p=p==null?[]:[p]),x=D?r:x,Ft(x)||(x=x==null?[]:[x]),TP(f,p,x))}o(mW,"orderBy");var gW=Ew(function(f,p,x){f[x?0:1].push(p)},function(){return[[],[]]});function vW(f,p,x){var D=Ft(f)?_2:YO,k=arguments.length<3;return D(f,At(p,4),x,k,Ou)}o(vW,"reduce");function yW(f,p,x){var D=Ft(f)?DK:YO,k=arguments.length<3;return D(f,At(p,4),x,k,gP)}o(yW,"reduceRight");function xW(f,p){var x=Ft(f)?Iu:vP;return x(f,Pw(At(p,3)))}o(xW,"reject");function wW(f){var p=Ft(f)?hP:hG;return p(f)}o(wW,"sample");function SW(f,p,x){(x?ws(f,p,x):p===r)?p=1:p=Kt(p);var D=Ft(f)?H$:pG;return D(f,p)}o(SW,"sampleSize");function EW(f){var p=Ft(f)?K$:mG;return p(f)}o(EW,"shuffle");function bW(f){if(f==null)return 0;if(Rs(f))return Lw(f)?lp(f):f.length;var p=us(f);return p==Ae||p==_r?f.size:W2(f).length}o(bW,"size");function AW(f,p,x){var D=Ft(f)?D2:gG;return x&&ws(f,p,x)&&(p=r),D(f,At(p,3))}o(AW,"some");var CW=Yt(function(f,p){if(f==null)return[];var x=p.length;return x>1&&ws(f,p[0],p[1])?p=[]:x>2&&ws(p[0],p[1],p[2])&&(p=[p[0]]),TP(f,Xn(p,1),[])}),Rw=i$||function(){return Rn.Date.now()};function NW(f,p){if(typeof p!="function")throw new Ei(s);return f=Kt(f),function(){if(--f<1)return p.apply(this,arguments)}}o(NW,"after");function S3(f,p,x){return p=x?r:p,p=f&&p==null?f.length:p,Do(f,T,r,r,r,r,p)}o(S3,"ary");function E3(f,p){var x;if(typeof p!="function")throw new Ei(s);return f=Kt(f),function(){return--f>0&&(x=p.apply(this,arguments)),f<=1&&(p=r),x}}o(E3,"before");var yN=Yt(function(f,p,x){var D=v;if(x.length){var k=Du(x,vp(yN));D|=b}return Do(f,D,p,x,k)}),b3=Yt(function(f,p,x){var D=v|S;if(x.length){var k=Du(x,vp(b3));D|=b}return Do(p,D,f,x,k)});function A3(f,p,x){p=x?r:p;var D=Do(f,C,r,r,r,r,r,p);return D.placeholder=A3.placeholder,D}o(A3,"curry");function C3(f,p,x){p=x?r:p;var D=Do(f,_,r,r,r,r,r,p);return D.placeholder=C3.placeholder,D}o(C3,"curryRight");function N3(f,p,x){var D,k,$,Q,te,me,_e=0,Pe=!1,Fe=!1,rt=!0;if(typeof f!="function")throw new Ei(s);p=Ti(p)||0,Jr(x)&&(Pe=!!x.leading,Fe="maxWait"in x,$=Fe?Tn(Ti(x.maxWait)||0,p):$,rt="trailing"in x?!!x.trailing:rt);function mt(dn){var sa=D,ko=k;return D=k=r,_e=dn,Q=f.apply(ko,sa),Q}o(mt,"invokeFunc");function It(dn){return _e=dn,te=gg(Zt,p),Pe?mt(dn):Q}o(It,"leadingEdge");function Wt(dn){var sa=dn-me,ko=dn-_e,$3=p-sa;return Fe?os($3,$-ko):$3}o(Wt,"remainingWait");function _t(dn){var sa=dn-me,ko=dn-_e;return me===r||sa>=p||sa<0||Fe&&ko>=$}o(_t,"shouldInvoke");function Zt(){var dn=Rw();if(_t(dn))return or(dn);te=gg(Zt,Wt(dn))}o(Zt,"timerExpired");function or(dn){return te=r,rt&&D?mt(dn):(D=k=r,Q)}o(or,"trailingEdge");function ai(){te!==r&&LP(te),_e=0,D=me=k=te=r}o(ai,"cancel");function Ss(){return te===r?Q:or(Rw())}o(Ss,"flush");function oi(){var dn=Rw(),sa=_t(dn);if(D=arguments,k=this,me=dn,sa){if(te===r)return It(me);if(Fe)return LP(te),te=gg(Zt,p),mt(me)}return te===r&&(te=gg(Zt,p)),Q}return o(oi,"debounced"),oi.cancel=ai,oi.flush=Ss,oi}o(N3,"debounce");var TW=Yt(function(f,p){return mP(f,1,p)}),IW=Yt(function(f,p,x){return mP(f,Ti(p)||0,x)});function _W(f){return Do(f,M)}o(_W,"flip");function Ow(f,p){if(typeof f!="function"||p!=null&&typeof p!="function")throw new Ei(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(Ow.Cache||Io),x}o(Ow,"memoize"),Ow.Cache=Io;function Pw(f){if(typeof f!="function")throw new Ei(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(Pw,"negate");function DW(f){return E3(2,f)}o(DW,"once");var BW=vG(function(f,p){p=p.length==1&&Ft(p[0])?Gr(p[0],ni(At())):Gr(Xn(p,1),ni(At()));var x=p.length;return Yt(function(D){for(var k=-1,$=os(D.length,x);++k<$;)D[k]=p[k].call(this,D[k]);return ri(f,this,D)})}),xN=Yt(function(f,p){var x=Du(p,vp(xN));return Do(f,b,r,p,x)}),T3=Yt(function(f,p){var x=Du(p,vp(T3));return Do(f,A,r,p,x)}),RW=Bo(function(f,p){return Do(f,B,r,r,r,p)});function OW(f,p){if(typeof f!="function")throw new Ei(s);return p=p===r?p:Kt(p),Yt(f,p)}o(OW,"rest");function PW(f,p){if(typeof f!="function")throw new Ei(s);return p=p==null?0:Tn(Kt(p),0),Yt(function(x){var D=x[p],k=Lu(x,0,p);return D&&_u(k,D),ri(f,this,k)})}o(PW,"spread");function kW(f,p,x){var D=!0,k=!0;if(typeof f!="function")throw new Ei(s);return Jr(x)&&(D="leading"in x?!!x.leading:D,k="trailing"in x?!!x.trailing:k),N3(f,p,{leading:D,maxWait:p,trailing:k})}o(kW,"throttle");function LW(f){return S3(f,1)}o(LW,"unary");function VW(f,p){return xN(nN(p),f)}o(VW,"wrap");function UW(){if(!arguments.length)return[];var f=arguments[0];return Ft(f)?f:[f]}o(UW,"castArray");function jW(f){return Ai(f,m)}o(jW,"clone");function FW(f,p){return p=typeof p=="function"?p:r,Ai(f,m,p)}o(FW,"cloneWith");function MW(f){return Ai(f,l|m)}o(MW,"cloneDeep");function qW(f,p){return p=typeof p=="function"?p:r,Ai(f,l|m,p)}o(qW,"cloneDeepWith");function HW(f,p){return p==null||dP(f,p,On(p))}o(HW,"conformsTo");function na(f,p){return f===p||f!==f&&p!==p}o(na,"eq");var KW=Nw($2),$W=Nw(function(f,p){return f>=p}),ql=wP((function(){return arguments})())?wP:function(f){return nn(f)&&Ar.call(f,"callee")&&!aP.call(f,"callee")},Ft=be.isArray,GW=MO?ni(MO):eG;function Rs(f){return f!=null&&kw(f.length)&&!Oo(f)}o(Rs,"isArrayLike");function pn(f){return nn(f)&&Rs(f)}o(pn,"isArrayLikeObject");function XW(f){return f===!0||f===!1||nn(f)&&xs(f)==N}o(XW,"isBoolean");var Vu=o$||DN,WW=qO?ni(qO):tG;function zW(f){return nn(f)&&f.nodeType===1&&!vg(f)}o(zW,"isElement");function JW(f){if(f==null)return!0;if(Rs(f)&&(Ft(f)||typeof f=="string"||typeof f.splice=="function"||Vu(f)||yp(f)||ql(f)))return!f.length;var p=us(f);if(p==Ae||p==_r)return!f.size;if(mg(f))return!W2(f).length;for(var x in f)if(Ar.call(f,x))return!1;return!0}o(JW,"isEmpty");function YW(f,p){return hg(f,p)}o(YW,"isEqual");function QW(f,p,x){x=typeof x=="function"?x:r;var D=x?x(f,p):r;return D===r?hg(f,p,r,x):!!D}o(QW,"isEqualWith");function wN(f){if(!nn(f))return!1;var p=xs(f);return p==P||p==G||typeof f.message=="string"&&typeof f.name=="string"&&!vg(f)}o(wN,"isError");function ZW(f){return typeof f=="number"&&uP(f)}o(ZW,"isFinite");function Oo(f){if(!Jr(f))return!1;var p=xs(f);return p==Se||p==Ce||p==tt||p==zr}o(Oo,"isFunction");function I3(f){return typeof f=="number"&&f==Kt(f)}o(I3,"isInteger");function kw(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=Y}o(kw,"isLength");function Jr(f){var p=typeof f;return f!=null&&(p=="object"||p=="function")}o(Jr,"isObject");function nn(f){return f!=null&&typeof f=="object"}o(nn,"isObjectLike");var _3=HO?ni(HO):nG;function ez(f,p){return f===p||X2(f,p,lN(p))}o(ez,"isMatch");function tz(f,p,x){return x=typeof x=="function"?x:r,X2(f,p,lN(p),x)}o(tz,"isMatchWith");function rz(f){return D3(f)&&f!=+f}o(rz,"isNaN");function nz(f){if(FG(f))throw new Vt(n);return SP(f)}o(nz,"isNative");function sz(f){return f===null}o(sz,"isNull");function iz(f){return f==null}o(iz,"isNil");function D3(f){return typeof f=="number"||nn(f)&&xs(f)==Ye}o(D3,"isNumber");function vg(f){if(!nn(f)||xs(f)!=Me)return!1;var p=uw(f);if(p===null)return!0;var x=Ar.call(p,"constructor")&&p.constructor;return typeof x=="function"&&x instanceof x&&sw.call(x)==t$}o(vg,"isPlainObject");var SN=KO?ni(KO):sG;function az(f){return I3(f)&&f>=-Y&&f<=Y}o(az,"isSafeInteger");var B3=$O?ni($O):iG;function Lw(f){return typeof f=="string"||!Ft(f)&&nn(f)&&xs(f)==$r}o(Lw,"isString");function ii(f){return typeof f=="symbol"||nn(f)&&xs(f)==Cn}o(ii,"isSymbol");var yp=GO?ni(GO):aG;function oz(f){return f===r}o(oz,"isUndefined");function uz(f){return nn(f)&&us(f)==vs}o(uz,"isWeakMap");function cz(f){return nn(f)&&xs(f)==gt}o(cz,"isWeakSet");var lz=Nw(z2),fz=Nw(function(f,p){return f<=p});function R3(f){if(!f)return[];if(Rs(f))return Lw(f)?ta(f):Bs(f);if(sg&&f[sg])return HK(f[sg]());var p=us(f),x=p==Ae?L2:p==_r?tw:xp;return x(f)}o(R3,"toArray");function Po(f){if(!f)return f===0?f:0;if(f=Ti(f),f===ue||f===-ue){var p=f<0?-1:1;return p*ve}return f===f?f:0}o(Po,"toFinite");function Kt(f){var p=Po(f),x=p%1;return p===p?x?p-x:p:0}o(Kt,"toInteger");function O3(f){return f?Ul(Kt(f),0,ze):0}o(O3,"toLength");function Ti(f){if(typeof f=="number")return f;if(ii(f))return Oe;if(Jr(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=Jr(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=QO(f);var x=GH.test(f);return x||WH.test(f)?NK(f.slice(2),x?2:8):w2.test(f)?Oe:+f}o(Ti,"toNumber");function P3(f){return Pa(f,Os(f))}o(P3,"toPlainObject");function hz(f){return f?Ul(Kt(f),-Y,Y):f===0?f:0}o(hz,"toSafeInteger");function Sr(f){return f==null?"":si(f)}o(Sr,"toString");var pz=mp(function(f,p){if(mg(p)||Rs(p)){Pa(p,On(p),f);return}for(var x in p)Ar.call(p,x)&&cg(f,x,p[x])}),k3=mp(function(f,p){Pa(p,Os(p),f)}),Vw=mp(function(f,p,x,D){Pa(p,Os(p),f,D)}),dz=mp(function(f,p,x,D){Pa(p,On(p),f,D)}),mz=Bo(q2);function gz(f,p){var x=dp(f);return p==null?x:pP(x,p)}o(gz,"create");var vz=Yt(function(f,p){f=Dr(f);var x=-1,D=p.length,k=D>2?p[2]:r;for(k&&ws(p[0],p[1],k)&&(D=1);++x<D;)for(var $=p[x],Q=Os($),te=-1,me=Q.length;++te<me;){var _e=Q[te],Pe=f[_e];(Pe===r||na(Pe,fp[_e])&&!Ar.call(f,_e))&&(f[_e]=$[_e])}return f}),yz=Yt(function(f){return f.push(r,QP),ri(L3,r,f)});function xz(f,p){return WO(f,At(p,3),Oa)}o(xz,"findKey");function wz(f,p){return WO(f,At(p,3),K2)}o(wz,"findLastKey");function Sz(f,p){return f==null?f:H2(f,At(p,3),Os)}o(Sz,"forIn");function Ez(f,p){return f==null?f:yP(f,At(p,3),Os)}o(Ez,"forInRight");function bz(f,p){return f&&Oa(f,At(p,3))}o(bz,"forOwn");function Az(f,p){return f&&K2(f,At(p,3))}o(Az,"forOwnRight");function Cz(f){return f==null?[]:yw(f,On(f))}o(Cz,"functions");function Nz(f){return f==null?[]:yw(f,Os(f))}o(Nz,"functionsIn");function EN(f,p,x){var D=f==null?r:jl(f,p);return D===r?x:D}o(EN,"get");function Tz(f,p){return f!=null&&t3(f,p,J$)}o(Tz,"has");function bN(f,p){return f!=null&&t3(f,p,Y$)}o(bN,"hasIn");var Iz=XP(function(f,p,x){p!=null&&typeof p.toString!="function"&&(p=iw.call(p)),f[p]=x},CN(Ps)),_z=XP(function(f,p,x){p!=null&&typeof p.toString!="function"&&(p=iw.call(p)),Ar.call(f,p)?f[p].push(x):f[p]=[x]},At),Dz=Yt(fg);function On(f){return Rs(f)?fP(f):W2(f)}o(On,"keys");function Os(f){return Rs(f)?fP(f,!0):oG(f)}o(Os,"keysIn");function Bz(f,p){var x={};return p=At(p,3),Oa(f,function(D,k,$){_o(x,p(D,k,$),D)}),x}o(Bz,"mapKeys");function Rz(f,p){var x={};return p=At(p,3),Oa(f,function(D,k,$){_o(x,k,p(D,k,$))}),x}o(Rz,"mapValues");var Oz=mp(function(f,p,x){xw(f,p,x)}),L3=mp(function(f,p,x,D){xw(f,p,x,D)}),Pz=Bo(function(f,p){var x={};if(f==null)return x;var D=!1;p=Gr(p,function($){return $=ku($,f),D||(D=$.length>1),$}),Pa(f,uN(f),x),D&&(x=Ai(x,l|h|m,IG));for(var k=p.length;k--;)eN(x,p[k]);return x});function kz(f,p){return V3(f,Pw(At(p)))}o(kz,"omitBy");var Lz=Bo(function(f,p){return f==null?{}:cG(f,p)});function V3(f,p){if(f==null)return{};var x=Gr(uN(f),function(D){return[D]});return p=At(p),IP(f,x,function(D,k){return p(D,k[0])})}o(V3,"pickBy");function Vz(f,p,x){p=ku(p,f);var D=-1,k=p.length;for(k||(k=1,f=r);++D<k;){var $=f==null?r:f[ka(p[D])];$===r&&(D=k,$=x),f=Oo($)?$.call(f):$}return f}o(Vz,"result");function Uz(f,p,x){return f==null?f:pg(f,p,x)}o(Uz,"set");function jz(f,p,x,D){return D=typeof D=="function"?D:r,f==null?f:pg(f,p,x,D)}o(jz,"setWith");var U3=JP(On),j3=JP(Os);function Fz(f,p,x){var D=Ft(f),k=D||Vu(f)||yp(f);if(p=At(p,4),x==null){var $=f&&f.constructor;k?x=D?new $:[]:Jr(f)?x=Oo($)?dp(uw(f)):{}:x={}}return(k?Si:Oa)(f,function(Q,te,me){return p(x,Q,te,me)}),x}o(Fz,"transform");function Mz(f,p){return f==null?!0:eN(f,p)}o(Mz,"unset");function qz(f,p,x){return f==null?f:OP(f,p,nN(x))}o(qz,"update");function Hz(f,p,x,D){return D=typeof D=="function"?D:r,f==null?f:OP(f,p,nN(x),D)}o(Hz,"updateWith");function xp(f){return f==null?[]:k2(f,On(f))}o(xp,"values");function Kz(f){return f==null?[]:k2(f,Os(f))}o(Kz,"valuesIn");function $z(f,p,x){return x===r&&(x=p,p=r),x!==r&&(x=Ti(x),x=x===x?x:0),p!==r&&(p=Ti(p),p=p===p?p:0),Ul(Ti(f),p,x)}o($z,"clamp");function Gz(f,p,x){return p=Po(p),x===r?(x=p,p=0):x=Po(x),f=Ti(f),Q$(f,p,x)}o(Gz,"inRange");function Xz(f,p,x){if(x&&typeof x!="boolean"&&ws(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=Po(f),p===r?(p=f,f=0):p=Po(p)),f>p){var D=f;f=p,p=D}if(x||f%1||p%1){var k=cP();return os(f+k*(p-f+CK("1e-"+((k+"").length-1))),p)}return Y2(f,p)}o(Xz,"random");var Wz=gp(function(f,p,x){return p=p.toLowerCase(),f+(x?F3(p):p)});function F3(f){return AN(Sr(f).toLowerCase())}o(F3,"capitalize");function M3(f){return f=Sr(f),f&&f.replace(JH,UK).replace(mK,"")}o(M3,"deburr");function zz(f,p,x){f=Sr(f),p=si(p);var D=f.length;x=x===r?D:Ul(Kt(x),0,D);var k=x;return x-=p.length,x>=0&&f.slice(x,k)==p}o(zz,"endsWith");function Jz(f){return f=Sr(f),f&&ut.test(f)?f.replace(le,jK):f}o(Jz,"escape");function Yz(f){return f=Sr(f),f&&Ra.test(f)?f.replace(fr,"\\$&"):f}o(Yz,"escapeRegExp");var Qz=gp(function(f,p,x){return f+(x?"-":"")+p.toLowerCase()}),Zz=gp(function(f,p,x){return f+(x?" ":"")+p.toLowerCase()}),eJ=KP("toLowerCase");function tJ(f,p,x){f=Sr(f),p=Kt(p);var D=p?lp(f):0;if(!p||D>=p)return f;var k=(p-D)/2;return Cw(hw(k),x)+f+Cw(fw(k),x)}o(tJ,"pad");function rJ(f,p,x){f=Sr(f),p=Kt(p);var D=p?lp(f):0;return p&&D<p?f+Cw(p-D,x):f}o(rJ,"padEnd");function nJ(f,p,x){f=Sr(f),p=Kt(p);var D=p?lp(f):0;return p&&D<p?Cw(p-D,x)+f:f}o(nJ,"padStart");function sJ(f,p,x){return x||p==null?p=0:p&&(p=+p),f$(Sr(f).replace(rg,""),p||0)}o(sJ,"parseInt1");function iJ(f,p,x){return(x?ws(f,p,x):p===r)?p=1:p=Kt(p),Q2(Sr(f),p)}o(iJ,"repeat");function aJ(){var f=arguments,p=Sr(f[0]);return f.length<3?p:p.replace(f[1],f[2])}o(aJ,"replace");var oJ=gp(function(f,p,x){return f+(x?"_":"")+p.toLowerCase()});function uJ(f,p,x){return x&&typeof x!="number"&&ws(f,p,x)&&(p=x=r),x=x===r?ze:x>>>0,x?(f=Sr(f),f&&(typeof p=="string"||p!=null&&!SN(p))&&(p=si(p),!p&&cp(f))?Lu(ta(f),0,x):f.split(p,x)):[]}o(uJ,"split");var cJ=gp(function(f,p,x){return f+(x?" ":"")+AN(p)});function lJ(f,p,x){return f=Sr(f),x=x==null?0:Ul(Kt(x),0,f.length),p=si(p),f.slice(x,x+p.length)==p}o(lJ,"startsWith");function fJ(f,p,x){var D=F.templateSettings;x&&ws(f,p,x)&&(p=r),f=Sr(f),p=Vw({},p,D,YP);var k=Vw({},p.imports,D.imports,YP),$=On(k),Q=k2(k,$),te,me,_e=0,Pe=p.interpolate||Jx,Fe="__p += '",rt=V2((p.escape||Jx).source+"|"+Pe.source+"|"+(Pe===it?as:Jx).source+"|"+(p.evaluate||Jx).source+"|$","g"),mt="//# sourceURL="+(Ar.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++wK+"]")+`
|
|
30
|
+
`;f.replace(rt,function(_t,Zt,or,ai,Ss,oi){return or||(or=ai),Fe+=f.slice(_e,oi).replace(YH,FK),Zt&&(te=!0,Fe+=`' +
|
|
31
|
+
__e(`+Zt+`) +
|
|
32
|
+
'`),Ss&&(me=!0,Fe+=`';
|
|
33
|
+
`+Ss+`;
|
|
34
|
+
__p += '`),or&&(Fe+=`' +
|
|
35
|
+
((__t = (`+or+`)) == null ? '' : __t) +
|
|
36
|
+
'`),_e=oi+_t.length,_t}),Fe+=`';
|
|
37
|
+
`;var It=Ar.call(p,"variable")&&p.variable;if(!It)Fe=`with (obj) {
|
|
38
|
+
`+Fe+`
|
|
39
|
+
}
|
|
40
|
+
`;else if(Ge.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 = ''"+(te?", __e = _.escape":"")+(me?`, __j = Array.prototype.join;
|
|
43
|
+
function print() { __p += __j.call(arguments, '') }
|
|
44
|
+
`:`;
|
|
45
|
+
`)+Fe+`return __p
|
|
46
|
+
}`;var Wt=H3(function(){return wr($,mt+"return "+Fe).apply(r,Q)});if(Wt.source=Fe,wN(Wt))throw Wt;return Wt}o(fJ,"template");function hJ(f){return Sr(f).toLowerCase()}o(hJ,"toLower");function pJ(f){return Sr(f).toUpperCase()}o(pJ,"toUpper");function dJ(f,p,x){if(f=Sr(f),f&&(x||p===r))return QO(f);if(!f||!(p=si(p)))return f;var D=ta(f),k=ta(p),$=ZO(D,k),Q=eP(D,k)+1;return Lu(D,$,Q).join("")}o(dJ,"trim");function mJ(f,p,x){if(f=Sr(f),f&&(x||p===r))return f.slice(0,rP(f)+1);if(!f||!(p=si(p)))return f;var D=ta(f),k=eP(D,ta(p))+1;return Lu(D,0,k).join("")}o(mJ,"trimEnd");function gJ(f,p,x){if(f=Sr(f),f&&(x||p===r))return f.replace(rg,"");if(!f||!(p=si(p)))return f;var D=ta(f),k=ZO(D,ta(p));return Lu(D,k).join("")}o(gJ,"trimStart");function vJ(f,p){var x=I,D=H;if(Jr(p)){var k="separator"in p?p.separator:k;x="length"in p?Kt(p.length):x,D="omission"in p?si(p.omission):D}f=Sr(f);var $=f.length;if(cp(f)){var Q=ta(f);$=Q.length}if(x>=$)return f;var te=x-lp(D);if(te<1)return D;var me=Q?Lu(Q,0,te).join(""):f.slice(0,te);if(k===r)return me+D;if(Q&&(te+=me.length-te),SN(k)){if(f.slice(te).search(k)){var _e,Pe=me;for(k.global||(k=V2(k.source,Sr(ea.exec(k))+"g")),k.lastIndex=0;_e=k.exec(Pe);)var Fe=_e.index;me=me.slice(0,Fe===r?te:Fe)}}else if(f.indexOf(si(k),te)!=te){var rt=me.lastIndexOf(k);rt>-1&&(me=me.slice(0,rt))}return me+D}o(vJ,"truncate");function yJ(f){return f=Sr(f),f&&z.test(f)?f.replace(ae,XK):f}o(yJ,"unescape");var xJ=gp(function(f,p,x){return f+(x?" ":"")+p.toUpperCase()}),AN=KP("toUpperCase");function q3(f,p,x){return f=Sr(f),p=x?r:p,p===r?qK(f)?JK(f):OK(f):f.match(p)||[]}o(q3,"words");var H3=Yt(function(f,p){try{return ri(f,r,p)}catch(x){return wN(x)?x:new Vt(x)}}),wJ=Bo(function(f,p){return Si(p,function(x){x=ka(x),_o(f,x,yN(f[x],f))}),f});function SJ(f){var p=f==null?0:f.length,x=At();return f=p?Gr(f,function(D){if(typeof D[1]!="function")throw new Ei(s);return[x(D[0]),D[1]]}):[],Yt(function(D){for(var k=-1;++k<p;){var $=f[k];if(ri($[0],this,D))return ri($[1],this,D)}})}o(SJ,"cond");function EJ(f){return X$(Ai(f,l))}o(EJ,"conforms");function CN(f){return function(){return f}}o(CN,"constant");function bJ(f,p){return f==null||f!==f?p:f}o(bJ,"defaultTo");var AJ=GP(),CJ=GP(!0);function Ps(f){return f}o(Ps,"identity");function NN(f){return EP(typeof f=="function"?f:Ai(f,l))}o(NN,"iteratee");function NJ(f){return AP(Ai(f,l))}o(NJ,"matches");function TJ(f,p){return CP(f,Ai(p,l))}o(TJ,"matchesProperty");var IJ=Yt(function(f,p){return function(x){return fg(x,f,p)}}),_J=Yt(function(f,p){return function(x){return fg(f,x,p)}});function TN(f,p,x){var D=On(p),k=yw(p,D);x==null&&!(Jr(p)&&(k.length||!D.length))&&(x=p,p=f,f=this,k=yw(p,On(p)));var $=!(Jr(x)&&"chain"in x)||!!x.chain,Q=Oo(f);return Si(k,function(te){var me=p[te];f[te]=me,Q&&(f.prototype[te]=function(){var _e=this.__chain__;if($||_e){var Pe=f(this.__wrapped__),Fe=Pe.__actions__=Bs(this.__actions__);return Fe.push({func:me,args:arguments,thisArg:f}),Pe.__chain__=_e,Pe}return me.apply(f,_u([this.value()],arguments))})}),f}o(TN,"mixin");function DJ(){return Rn._===this&&(Rn._=r$),this}o(DJ,"noConflict");function IN(){}o(IN,"noop");function BJ(f){return f=Kt(f),Yt(function(p){return NP(p,f)})}o(BJ,"nthArg");var RJ=iN(Gr),OJ=iN(XO),PJ=iN(D2);function K3(f){return hN(f)?B2(ka(f)):lG(f)}o(K3,"property");function kJ(f){return function(p){return f==null?r:jl(f,p)}}o(kJ,"propertyOf");var LJ=WP(),VJ=WP(!0);function _N(){return[]}o(_N,"stubArray");function DN(){return!1}o(DN,"stubFalse");function UJ(){return{}}o(UJ,"stubObject");function jJ(){return""}o(jJ,"stubString");function FJ(){return!0}o(FJ,"stubTrue");function MJ(f,p){if(f=Kt(f),f<1||f>Y)return[];var x=ze,D=os(f,ze);p=At(p),f-=ze;for(var k=P2(D,p);++x<f;)p(x);return k}o(MJ,"times");function qJ(f){return Ft(f)?Gr(f,ka):ii(f)?[f]:Bs(l3(Sr(f)))}o(qJ,"toPath");function HJ(f){var p=++e$;return Sr(f)+p}o(HJ,"uniqueId");var KJ=Aw(function(f,p){return f+p},0),$J=aN("ceil"),GJ=Aw(function(f,p){return f/p},1),XJ=aN("floor");function WJ(f){return f&&f.length?vw(f,Ps,$2):r}o(WJ,"max");function zJ(f,p){return f&&f.length?vw(f,At(p,2),$2):r}o(zJ,"maxBy");function JJ(f){return JO(f,Ps)}o(JJ,"mean");function YJ(f,p){return JO(f,At(p,2))}o(YJ,"meanBy");function QJ(f){return f&&f.length?vw(f,Ps,z2):r}o(QJ,"min");function ZJ(f,p){return f&&f.length?vw(f,At(p,2),z2):r}o(ZJ,"minBy");var eY=Aw(function(f,p){return f*p},1),tY=aN("round"),rY=Aw(function(f,p){return f-p},0);function nY(f){return f&&f.length?O2(f,Ps):0}o(nY,"sum");function sY(f,p){return f&&f.length?O2(f,At(p,2)):0}return o(sY,"sumBy"),F.after=NW,F.ary=S3,F.assign=pz,F.assignIn=k3,F.assignInWith=Vw,F.assignWith=dz,F.at=mz,F.before=E3,F.bind=yN,F.bindAll=wJ,F.bindKey=b3,F.castArray=UW,F.chain=y3,F.chunk=XG,F.compact=WG,F.concat=zG,F.cond=SJ,F.conforms=EJ,F.constant=CN,F.countBy=nW,F.create=gz,F.curry=A3,F.curryRight=C3,F.debounce=N3,F.defaults=vz,F.defaultsDeep=yz,F.defer=TW,F.delay=IW,F.difference=JG,F.differenceBy=YG,F.differenceWith=QG,F.drop=ZG,F.dropRight=eX,F.dropRightWhile=tX,F.dropWhile=rX,F.fill=nX,F.filter=iW,F.flatMap=uW,F.flatMapDeep=cW,F.flatMapDepth=lW,F.flatten=d3,F.flattenDeep=sX,F.flattenDepth=iX,F.flip=_W,F.flow=AJ,F.flowRight=CJ,F.fromPairs=aX,F.functions=Cz,F.functionsIn=Nz,F.groupBy=fW,F.initial=uX,F.intersection=cX,F.intersectionBy=lX,F.intersectionWith=fX,F.invert=Iz,F.invertBy=_z,F.invokeMap=pW,F.iteratee=NN,F.keyBy=dW,F.keys=On,F.keysIn=Os,F.map=Bw,F.mapKeys=Bz,F.mapValues=Rz,F.matches=NJ,F.matchesProperty=TJ,F.memoize=Ow,F.merge=Oz,F.mergeWith=L3,F.method=IJ,F.methodOf=_J,F.mixin=TN,F.negate=Pw,F.nthArg=BJ,F.omit=Pz,F.omitBy=kz,F.once=DW,F.orderBy=mW,F.over=RJ,F.overArgs=BW,F.overEvery=OJ,F.overSome=PJ,F.partial=xN,F.partialRight=T3,F.partition=gW,F.pick=Lz,F.pickBy=V3,F.property=K3,F.propertyOf=kJ,F.pull=mX,F.pullAll=g3,F.pullAllBy=gX,F.pullAllWith=vX,F.pullAt=yX,F.range=LJ,F.rangeRight=VJ,F.rearg=RW,F.reject=xW,F.remove=xX,F.rest=OW,F.reverse=gN,F.sampleSize=SW,F.set=Uz,F.setWith=jz,F.shuffle=EW,F.slice=wX,F.sortBy=CW,F.sortedUniq=TX,F.sortedUniqBy=IX,F.split=uJ,F.spread=PW,F.tail=_X,F.take=DX,F.takeRight=BX,F.takeRightWhile=RX,F.takeWhile=OX,F.tap=WX,F.throttle=kW,F.thru=Dw,F.toArray=R3,F.toPairs=U3,F.toPairsIn=j3,F.toPath=qJ,F.toPlainObject=P3,F.transform=Fz,F.unary=LW,F.union=PX,F.unionBy=kX,F.unionWith=LX,F.uniq=VX,F.uniqBy=UX,F.uniqWith=jX,F.unset=Mz,F.unzip=vN,F.unzipWith=v3,F.update=qz,F.updateWith=Hz,F.values=xp,F.valuesIn=Kz,F.without=FX,F.words=q3,F.wrap=VW,F.xor=MX,F.xorBy=qX,F.xorWith=HX,F.zip=KX,F.zipObject=$X,F.zipObjectDeep=GX,F.zipWith=XX,F.entries=U3,F.entriesIn=j3,F.extend=k3,F.extendWith=Vw,TN(F,F),F.add=KJ,F.attempt=H3,F.camelCase=Wz,F.capitalize=F3,F.ceil=$J,F.clamp=$z,F.clone=jW,F.cloneDeep=MW,F.cloneDeepWith=qW,F.cloneWith=FW,F.conformsTo=HW,F.deburr=M3,F.defaultTo=bJ,F.divide=GJ,F.endsWith=zz,F.eq=na,F.escape=Jz,F.escapeRegExp=Yz,F.every=sW,F.find=aW,F.findIndex=h3,F.findKey=xz,F.findLast=oW,F.findLastIndex=p3,F.findLastKey=wz,F.floor=XJ,F.forEach=x3,F.forEachRight=w3,F.forIn=Sz,F.forInRight=Ez,F.forOwn=bz,F.forOwnRight=Az,F.get=EN,F.gt=KW,F.gte=$W,F.has=Tz,F.hasIn=bN,F.head=m3,F.identity=Ps,F.includes=hW,F.indexOf=oX,F.inRange=Gz,F.invoke=Dz,F.isArguments=ql,F.isArray=Ft,F.isArrayBuffer=GW,F.isArrayLike=Rs,F.isArrayLikeObject=pn,F.isBoolean=XW,F.isBuffer=Vu,F.isDate=WW,F.isElement=zW,F.isEmpty=JW,F.isEqual=YW,F.isEqualWith=QW,F.isError=wN,F.isFinite=ZW,F.isFunction=Oo,F.isInteger=I3,F.isLength=kw,F.isMap=_3,F.isMatch=ez,F.isMatchWith=tz,F.isNaN=rz,F.isNative=nz,F.isNil=iz,F.isNull=sz,F.isNumber=D3,F.isObject=Jr,F.isObjectLike=nn,F.isPlainObject=vg,F.isRegExp=SN,F.isSafeInteger=az,F.isSet=B3,F.isString=Lw,F.isSymbol=ii,F.isTypedArray=yp,F.isUndefined=oz,F.isWeakMap=uz,F.isWeakSet=cz,F.join=hX,F.kebabCase=Qz,F.last=Ni,F.lastIndexOf=pX,F.lowerCase=Zz,F.lowerFirst=eJ,F.lt=lz,F.lte=fz,F.max=WJ,F.maxBy=zJ,F.mean=JJ,F.meanBy=YJ,F.min=QJ,F.minBy=ZJ,F.stubArray=_N,F.stubFalse=DN,F.stubObject=UJ,F.stubString=jJ,F.stubTrue=FJ,F.multiply=eY,F.nth=dX,F.noConflict=DJ,F.noop=IN,F.now=Rw,F.pad=tJ,F.padEnd=rJ,F.padStart=nJ,F.parseInt=sJ,F.random=Xz,F.reduce=vW,F.reduceRight=yW,F.repeat=iJ,F.replace=aJ,F.result=Vz,F.round=tY,F.runInContext=ce,F.sample=wW,F.size=bW,F.snakeCase=oJ,F.some=AW,F.sortedIndex=SX,F.sortedIndexBy=EX,F.sortedIndexOf=bX,F.sortedLastIndex=AX,F.sortedLastIndexBy=CX,F.sortedLastIndexOf=NX,F.startCase=cJ,F.startsWith=lJ,F.subtract=rY,F.sum=nY,F.sumBy=sY,F.template=fJ,F.times=MJ,F.toFinite=Po,F.toInteger=Kt,F.toLength=O3,F.toLower=hJ,F.toNumber=Ti,F.toSafeInteger=hz,F.toString=Sr,F.toUpper=pJ,F.trim=dJ,F.trimEnd=mJ,F.trimStart=gJ,F.truncate=vJ,F.unescape=yJ,F.uniqueId=HJ,F.upperCase=xJ,F.upperFirst=AN,F.each=x3,F.eachRight=w3,F.first=m3,TN(F,(function(){var f={};return Oa(F,function(p,x){Ar.call(F.prototype,x)||(f[x]=p)}),f})(),{chain:!1}),F.VERSION=e,Si(["bind","bindKey","curry","curryRight","partial","partialRight"],function(f){F[f].placeholder=F}),Si(["drop","take"],function(f,p){ir.prototype[f]=function(x){x=x===r?1:Tn(Kt(x),0);var D=this.__filtered__&&!p?new ir(this):this.clone();return D.__filtered__?D.__takeCount__=os(x,D.__takeCount__):D.__views__.push({size:os(x,ze),type:f+(D.__dir__<0?"Right":"")}),D},ir.prototype[f+"Right"]=function(x){return this.reverse()[f](x).reverse()}}),Si(["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,$}}),Si(["head","last"],function(f,p){var x="take"+(p?"Right":"");ir.prototype[f]=function(){return this[x](1).value()[0]}}),Si(["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(Ps)},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 fg(x,f,p)})}),ir.prototype.reject=function(f){return this.filter(Pw(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(ze)},Oa(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__,te=D?[1]:arguments,me=Q instanceof ir,_e=te[0],Pe=me||Ft(Q),Fe=o(function(Zt){var or=k.apply(F,_u([Zt],te));return D&&rt?or[0]:or},"interceptor");Pe&&x&&typeof _e=="function"&&_e.length!=1&&(me=Pe=!1);var rt=this.__chain__,mt=!!this.__actions__.length,It=$&&!rt,Wt=me&&!mt;if(!$&&Pe){Q=Wt?Q:new ir(this);var _t=f.apply(Q,te);return _t.__actions__.push({func:Dw,args:[Fe],thisArg:r}),new bi(_t,rt)}return It&&Wt?f.apply(this,te):(_t=this.thru(Fe),It?D?_t.value()[0]:_t.value():_t)})}),Si(["pop","push","shift","sort","splice","unshift"],function(f){var p=rw[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)})}}),Oa(ir.prototype,function(f,p){var x=F[p];if(x){var D=x.name+"";Ar.call(pp,D)||(pp[D]=[]),pp[D].push({name:p,func:x})}}),pp[bw(r,S).name]=[{name:"wrapper",func:r}],ir.prototype.clone=y$,ir.prototype.reverse=x$,ir.prototype.value=w$,F.prototype.at=zX,F.prototype.chain=JX,F.prototype.commit=YX,F.prototype.next=QX,F.prototype.plant=eW,F.prototype.reverse=tW,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=rW,F.prototype.first=F.prototype.head,sg&&(F.prototype[sg]=ZX),F},"runInContext"),Bu=YK();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Rn._=Bu,define(function(){return Bu})):Pl?((Pl.exports=Bu)._=Bu,N2._=Bu):Rn._=Bu}).call(Kp)});var XL=re(($1e,GL)=>{"use strict";var $L=Je("stream").Stream,hre=Je("util");GL.exports=ca;function ca(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}o(ca,"DelayedStream");hre.inherits(ca,$L);ca.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(ca.prototype,"readable",{configurable:!0,enumerable:!0,get:o(function(){return this.source.readable},"get")});ca.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};ca.prototype.resume=function(){this._released||this.release(),this.source.resume()};ca.prototype.pause=function(){this.source.pause()};ca.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach((function(r){this.emit.apply(this,r)}).bind(this)),this._bufferedEvents=[]};ca.prototype.pipe=function(){var r=$L.prototype.pipe.apply(this,arguments);return this.resume(),r};ca.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)};ca.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 YL=re((X1e,JL)=>{"use strict";var pre=Je("util"),zL=Je("stream").Stream,WL=XL();JL.exports=on;function on(){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(on,"CombinedStream");pre.inherits(on,zL);on.create=function(r){var e=new this;r=r||{};for(var t in r)e[t]=r[t];return e};on.isStreamLike=function(r){return typeof r!="function"&&typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"&&!Buffer.isBuffer(r)};on.prototype.append=function(r){var e=on.isStreamLike(r);if(e){if(!(r instanceof WL)){var t=WL.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};on.prototype.pipe=function(r,e){return zL.prototype.pipe.call(this,r,e),this.resume(),r};on.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}};on.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=on.isStreamLike(t);n&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),this._pipeNext(t)}).bind(this))};on.prototype._pipeNext=function(r){this._currentStream=r;var e=on.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()};on.prototype._handleErrors=function(r){var e=this;r.on("error",function(t){e._emitError(t)})};on.prototype.write=function(r){this.emit("data",r)};on.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};on.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")};on.prototype.end=function(){this._reset(),this.emit("end")};on.prototype.destroy=function(){this._reset(),this.emit("close")};on.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};on.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var r="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(r))}};on.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)};on.prototype._emitError=function(r){this._reset(),this.emit("error",r)}});var QL=re((z1e,dre)=>{dre.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 e8=re((J1e,ZL)=>{"use strict";ZL.exports=QL()});var n8=re(js=>{"use strict";var BS=e8(),mre=Je("path").extname,t8=/^\s*([^;\s]*)(?:;|\s|$)/,gre=/^text\//i;js.charset=r8;js.charsets={lookup:r8};js.contentType=vre;js.extension=yre;js.extensions=Object.create(null);js.lookup=xre;js.types=Object.create(null);wre(js.extensions,js.types);function r8(r){if(!r||typeof r!="string")return!1;var e=t8.exec(r),t=e&&BS[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&gre.test(e[1])?"UTF-8":!1}o(r8,"charset");function vre(r){if(!r||typeof r!="string")return!1;var e=r.indexOf("/")===-1?js.lookup(r):r;if(!e)return!1;if(e.indexOf("charset")===-1){var t=js.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}o(vre,"contentType");function yre(r){if(!r||typeof r!="string")return!1;var e=t8.exec(r),t=e&&js.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}o(yre,"extension");function xre(r){if(!r||typeof r!="string")return!1;var e=mre("x."+r).toLowerCase().substr(1);return e&&js.types[e]||!1}o(xre,"lookup");function wre(r,e){var t=["nginx","apache",void 0,"iana"];Object.keys(BS).forEach(o(function(s){var i=BS[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(BS[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(wre,"populateMaps")});var i8=re((Z1e,s8)=>{"use strict";s8.exports=Sre;function Sre(r){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(r):setTimeout(r,0)}o(Sre,"defer")});var zT=re((tye,o8)=>{"use strict";var a8=i8();o8.exports=Ere;function Ere(r){var e=!1;return a8(function(){e=!0}),o(function(n,s){e?r(n,s):a8(o(function(){r(n,s)},"nextTick_callback"))},"async_callback")}o(Ere,"async")});var JT=re((nye,u8)=>{"use strict";u8.exports=bre;function bre(r){Object.keys(r.jobs).forEach(Are.bind(r)),r.jobs={}}o(bre,"abort");function Are(r){typeof this.jobs[r]=="function"&&this.jobs[r]()}o(Are,"clean")});var YT=re((iye,l8)=>{"use strict";var c8=zT(),Cre=JT();l8.exports=Nre;function Nre(r,e,t,n){var s=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[s]=Tre(e,s,r[s],function(i,a){s in t.jobs&&(delete t.jobs[s],i?Cre(t):t.results[s]=a,n(i,t.results))})}o(Nre,"iterate");function Tre(r,e,t,n){var s;return r.length==2?s=r(t,c8(n)):s=r(t,e,c8(n)),s}o(Tre,"runJob")});var QT=re((oye,f8)=>{"use strict";f8.exports=Ire;function Ire(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(Ire,"state")});var ZT=re((cye,h8)=>{"use strict";var _re=JT(),Dre=zT();h8.exports=Bre;function Bre(r){Object.keys(this.jobs).length&&(this.index=this.size,_re(this),Dre(r)(null,this.results))}o(Bre,"terminator")});var d8=re((fye,p8)=>{"use strict";var Rre=YT(),Ore=QT(),Pre=ZT();p8.exports=kre;function kre(r,e,t){for(var n=Ore(r);n.index<(n.keyedList||r).length;)Rre(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 Pre.bind(n,t)}o(kre,"parallel")});var eI=re((pye,RS)=>{"use strict";var m8=YT(),Lre=QT(),Vre=ZT();RS.exports=Ure;RS.exports.ascending=g8;RS.exports.descending=jre;function Ure(r,e,t,n){var s=Lre(r,t);return m8(r,e,s,o(function i(a,u){if(a){n(a,u);return}if(s.index++,s.index<(s.keyedList||r).length){m8(r,e,s,i);return}n(null,s.results)},"iteratorHandler")),Vre.bind(s,n)}o(Ure,"serialOrdered");function g8(r,e){return r<e?-1:r>e?1:0}o(g8,"ascending");function jre(r,e){return-1*g8(r,e)}o(jre,"descending")});var y8=re((mye,v8)=>{"use strict";var Fre=eI();v8.exports=Mre;function Mre(r,e,t){return Fre(r,e,null,t)}o(Mre,"serial")});var w8=re((vye,x8)=>{"use strict";x8.exports={parallel:d8(),serial:y8(),serialOrdered:eI()}});var tI=re((yye,S8)=>{"use strict";S8.exports=Object});var b8=re((xye,E8)=>{"use strict";E8.exports=Error});var C8=re((wye,A8)=>{"use strict";A8.exports=EvalError});var T8=re((Sye,N8)=>{"use strict";N8.exports=RangeError});var _8=re((Eye,I8)=>{"use strict";I8.exports=ReferenceError});var B8=re((bye,D8)=>{"use strict";D8.exports=SyntaxError});var OS=re((Aye,R8)=>{"use strict";R8.exports=TypeError});var P8=re((Cye,O8)=>{"use strict";O8.exports=URIError});var L8=re((Nye,k8)=>{"use strict";k8.exports=Math.abs});var U8=re((Tye,V8)=>{"use strict";V8.exports=Math.floor});var F8=re((Iye,j8)=>{"use strict";j8.exports=Math.max});var q8=re((_ye,M8)=>{"use strict";M8.exports=Math.min});var K8=re((Dye,H8)=>{"use strict";H8.exports=Math.pow});var G8=re((Bye,$8)=>{"use strict";$8.exports=Math.round});var W8=re((Rye,X8)=>{"use strict";X8.exports=Number.isNaN||o(function(e){return e!==e},"isNaN")});var J8=re((Pye,z8)=>{"use strict";var qre=W8();z8.exports=o(function(e){return qre(e)||e===0?e:e<0?-1:1},"sign")});var Q8=re((Lye,Y8)=>{"use strict";Y8.exports=Object.getOwnPropertyDescriptor});var rI=re((Vye,Z8)=>{"use strict";var PS=Q8();if(PS)try{PS([],"length")}catch{PS=null}Z8.exports=PS});var t5=re((Uye,e5)=>{"use strict";var kS=Object.defineProperty||!1;if(kS)try{kS({},"a",{value:1})}catch{kS=!1}e5.exports=kS});var nI=re((jye,r5)=>{"use strict";r5.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 i5=re((Mye,s5)=>{"use strict";var n5=typeof Symbol<"u"&&Symbol,Hre=nI();s5.exports=o(function(){return typeof n5!="function"||typeof Symbol!="function"||typeof n5("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Hre()},"hasNativeSymbols")});var sI=re((Hye,a5)=>{"use strict";a5.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var iI=re((Kye,o5)=>{"use strict";var Kre=tI();o5.exports=Kre.getPrototypeOf||null});var l5=re(($ye,c5)=>{"use strict";var $re="Function.prototype.bind called on incompatible ",Gre=Object.prototype.toString,Xre=Math.max,Wre="[object Function]",u5=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"),zre=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"),Jre=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");c5.exports=o(function(e){var t=this;if(typeof t!="function"||Gre.apply(t)!==Wre)throw new TypeError($re+t);for(var n=zre(arguments,1),s,i=o(function(){if(this instanceof s){var h=t.apply(this,u5(n,arguments));return Object(h)===h?h:this}return t.apply(e,u5(n,arguments))},"binder"),a=Xre(0,t.length-n.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(s=Function("binder","return function ("+Jre(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 Ug=re((Xye,f5)=>{"use strict";var Yre=l5();f5.exports=Function.prototype.bind||Yre});var LS=re((Wye,h5)=>{"use strict";h5.exports=Function.prototype.call});var aI=re((zye,p5)=>{"use strict";p5.exports=Function.prototype.apply});var m5=re((Jye,d5)=>{"use strict";d5.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var v5=re((Yye,g5)=>{"use strict";var Qre=Ug(),Zre=aI(),ene=LS(),tne=m5();g5.exports=tne||Qre.call(ene,Zre)});var x5=re((Qye,y5)=>{"use strict";var rne=Ug(),nne=OS(),sne=LS(),ine=v5();y5.exports=o(function(e){if(e.length<1||typeof e[0]!="function")throw new nne("a function is required");return ine(rne,sne,e)},"callBindBasic")});var C5=re((exe,A5)=>{"use strict";var ane=x5(),w5=rI(),E5;try{E5=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var oI=!!E5&&w5&&w5(Object.prototype,"__proto__"),b5=Object,S5=b5.getPrototypeOf;A5.exports=oI&&typeof oI.get=="function"?ane([oI.get]):typeof S5=="function"?o(function(e){return S5(e==null?e:b5(e))},"getDunder"):!1});var D5=re((rxe,_5)=>{"use strict";var N5=sI(),T5=iI(),I5=C5();_5.exports=N5?o(function(e){return N5(e)},"getProto"):T5?o(function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return T5(e)},"getProto"):I5?o(function(e){return I5(e)},"getProto"):null});var VS=re((sxe,B5)=>{"use strict";var one=Function.prototype.call,une=Object.prototype.hasOwnProperty,cne=Ug();B5.exports=cne.call(one,une)});var U5=re((ixe,V5)=>{"use strict";var nr,lne=tI(),fne=b8(),hne=C8(),pne=T8(),dne=_8(),Wp=B8(),Xp=OS(),mne=P8(),gne=L8(),vne=U8(),yne=F8(),xne=q8(),wne=K8(),Sne=G8(),Ene=J8(),k5=Function,uI=o(function(r){try{return k5('"use strict"; return ('+r+").constructor;")()}catch{}},"getEvalledConstructor"),jg=rI(),bne=t5(),cI=o(function(){throw new Xp},"throwTypeError"),Ane=jg?(function(){try{return arguments.callee,cI}catch{try{return jg(arguments,"callee").get}catch{return cI}}})():cI,$p=i5()(),Fn=D5(),Cne=iI(),Nne=sI(),L5=aI(),Fg=LS(),Gp={},Tne=typeof Uint8Array>"u"||!Fn?nr:Fn(Uint8Array),tf={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?nr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?nr:ArrayBuffer,"%ArrayIteratorPrototype%":$p&&Fn?Fn([][Symbol.iterator]()):nr,"%AsyncFromSyncIteratorPrototype%":nr,"%AsyncFunction%":Gp,"%AsyncGenerator%":Gp,"%AsyncGeneratorFunction%":Gp,"%AsyncIteratorPrototype%":Gp,"%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%":fne,"%eval%":eval,"%EvalError%":hne,"%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%":k5,"%GeneratorFunction%":Gp,"%Int8Array%":typeof Int8Array>"u"?nr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?nr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?nr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$p&&Fn?Fn(Fn([][Symbol.iterator]())):nr,"%JSON%":typeof JSON=="object"?JSON:nr,"%Map%":typeof Map>"u"?nr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$p||!Fn?nr:Fn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":lne,"%Object.getOwnPropertyDescriptor%":jg,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?nr:Promise,"%Proxy%":typeof Proxy>"u"?nr:Proxy,"%RangeError%":pne,"%ReferenceError%":dne,"%Reflect%":typeof Reflect>"u"?nr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?nr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$p||!Fn?nr:Fn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?nr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$p&&Fn?Fn(""[Symbol.iterator]()):nr,"%Symbol%":$p?Symbol:nr,"%SyntaxError%":Wp,"%ThrowTypeError%":Ane,"%TypedArray%":Tne,"%TypeError%":Xp,"%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%":mne,"%WeakMap%":typeof WeakMap>"u"?nr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?nr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?nr:WeakSet,"%Function.prototype.call%":Fg,"%Function.prototype.apply%":L5,"%Object.defineProperty%":bne,"%Object.getPrototypeOf%":Cne,"%Math.abs%":gne,"%Math.floor%":vne,"%Math.max%":yne,"%Math.min%":xne,"%Math.pow%":wne,"%Math.round%":Sne,"%Math.sign%":Ene,"%Reflect.getPrototypeOf%":Nne};if(Fn)try{null.error}catch(r){R5=Fn(Fn(r)),tf["%Error.prototype%"]=R5}var R5,Ine=o(function r(e){var t;if(e==="%AsyncFunction%")t=uI("async function () {}");else if(e==="%GeneratorFunction%")t=uI("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=uI("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=r("%AsyncGenerator%");s&&Fn&&(t=Fn(s.prototype))}return tf[e]=t,t},"doEval"),O5={__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"]},Mg=Ug(),US=VS(),_ne=Mg.call(Fg,Array.prototype.concat),Dne=Mg.call(L5,Array.prototype.splice),P5=Mg.call(Fg,String.prototype.replace),jS=Mg.call(Fg,String.prototype.slice),Bne=Mg.call(Fg,RegExp.prototype.exec),Rne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,One=/\\(\\)?/g,Pne=o(function(e){var t=jS(e,0,1),n=jS(e,-1);if(t==="%"&&n!=="%")throw new Wp("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Wp("invalid intrinsic syntax, expected opening `%`");var s=[];return P5(e,Rne,function(i,a,u,c){s[s.length]=u?P5(c,One,"$1"):a||i}),s},"stringToPath"),kne=o(function(e,t){var n=e,s;if(US(O5,n)&&(s=O5[n],n="%"+s[0]+"%"),US(tf,n)){var i=tf[n];if(i===Gp&&(i=Ine(n)),typeof i>"u"&&!t)throw new Xp("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:i}}throw new Wp("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");V5.exports=o(function(e,t){if(typeof e!="string"||e.length===0)throw new Xp("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Xp('"allowMissing" argument must be a boolean');if(Bne(/^%?[^%]*%?$/,e)===null)throw new Wp("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Pne(e),s=n.length>0?n[0]:"",i=kne("%"+s+"%",t),a=i.name,u=i.value,c=!1,l=i.alias;l&&(s=l[0],Dne(n,_ne([0,1],l)));for(var h=1,m=!0;h<n.length;h+=1){var g=n[h],y=jS(g,0,1),v=jS(g,-1);if((y==='"'||y==="'"||y==="`"||v==='"'||v==="'"||v==="`")&&y!==v)throw new Wp("property names with quotes must have matching quotes");if((g==="constructor"||!m)&&(c=!0),s+="."+g,a="%"+s+"%",US(tf,a))u=tf[a];else if(u!=null){if(!(g in u)){if(!t)throw new Xp("base intrinsic for "+e+" exists, but the property is not available.");return}if(jg&&h+1>=n.length){var S=jg(u,g);m=!!S,m&&"get"in S&&!("originalValue"in S.get)?u=S.get:u=u[g]}else m=US(u,g),u=u[g];m&&!c&&(tf[a]=u)}}return u},"GetIntrinsic")});var F5=re((oxe,j5)=>{"use strict";var Lne=nI();j5.exports=o(function(){return Lne()&&!!Symbol.toStringTag},"hasToStringTagShams")});var H5=re((cxe,q5)=>{"use strict";var Vne=U5(),M5=Vne("%Object.defineProperty%",!0),Une=F5()(),jne=VS(),Fne=OS(),FS=Une?Symbol.toStringTag:null;q5.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 Fne("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");FS&&(n||!jne(e,FS))&&(M5?M5(e,FS,{configurable:!s,enumerable:!1,value:t,writable:!1}):e[FS]=t)},"setToStringTag")});var $5=re((fxe,K5)=>{"use strict";K5.exports=function(r,e){return Object.keys(e).forEach(function(t){r[t]=r[t]||e[t]}),r}});var dI=re((hxe,G5)=>{"use strict";var pI=YL(),Mne=Je("util"),lI=Je("path"),qne=Je("http"),Hne=Je("https"),Kne=Je("url").parse,$ne=Je("fs"),Gne=Je("stream").Stream,Xne=Je("crypto"),fI=n8(),Wne=w8(),zne=H5(),tc=VS(),hI=$5();function lr(r){if(!(this instanceof lr))return new lr(r);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],pI.call(this),r=r||{};for(var e in r)this[e]=r[e]}o(lr,"FormData");Mne.inherits(lr,pI);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=pI.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&&tc(e,"httpVersion"))&&!(e instanceof Gne))&&(t.knownLength||this._valuesToMeasure.push(e))};lr.prototype._lengthRetriever=function(r,e){tc(r,"fd")?r.end!=null&&r.end!=1/0&&r.start!=null?e(null,r.end+1-(r.start?r.start:0)):$ne.stat(r.path,function(t,n){if(t){e(t);return}var s=n.size-(r.start?r.start:0);e(null,s)}):tc(r,"httpVersion")?e(null,Number(r.headers["content-length"])):tc(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"&&hI(a,t.header);var u;for(var c in a)if(tc(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=lI.normalize(e.filepath).replace(/\\/g,"/"):e.filename||r&&(r.name||r.path)?t=lI.basename(e.filename||r&&(r.name||r.path)):r&&r.readable&&tc(r,"httpVersion")&&(t=lI.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=fI.lookup(r.name)),!t&&r&&r.path&&(t=fI.lookup(r.path)),!t&&r&&r.readable&&tc(r,"httpVersion")&&(t=r.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=fI.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)tc(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="--------------------------"+Xne.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}Wne.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=Kne(r),n=hI({port:r.port,path:r.pathname,host:r.hostname,protocol:r.protocol},s)):(n=hI(r,s),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(r.headers),n.protocol==="https:"?t=Hne.request(n):t=qne.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]"};zne(lr,"FormData");G5.exports=lr});var mI=re(X5=>{"use strict";var Jne=Je("url").parse,Yne={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Qne=String.prototype.endsWith||function(r){return r.length<=this.length&&this.indexOf(r,this.length-r.length)!==-1};function Zne(r){var e=typeof r=="string"?Jne(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)||Yne[t]||0,!ese(n,s)))return"";var i=zp("npm_config_"+t+"_proxy")||zp(t+"_proxy")||zp("npm_config_proxy")||zp("all_proxy");return i&&i.indexOf("://")===-1&&(i=t+"://"+i),i}o(Zne,"getProxyForUrl");function ese(r,e){var t=(zp("npm_config_no_proxy")||zp("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)),!Qne.call(r,i)):r!==i}):!0}o(ese,"shouldProxy");function zp(r){return process.env[r.toLowerCase()]||process.env[r.toUpperCase()]||""}o(zp,"getEnv");X5.getProxyForUrl=Zne});var z5=re((gxe,W5)=>{"use strict";var qg;W5.exports=function(){if(!qg){try{qg=Hp()("follow-redirects")}catch{}typeof qg!="function"&&(qg=o(function(){},"debug"))}qg.apply(null,arguments)}});var II=re((yxe,TI)=>{"use strict";var Kg=Je("url"),Hg=Kg.URL,tse=Je("http"),rse=Je("https"),wI=Je("stream").Writable,SI=Je("assert"),J5=z5();o((function(){var e=typeof process<"u",t=typeof window<"u"&&typeof document<"u",n=nf(Error.captureStackTrace);!e&&(t||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")}),"detectUnsupportedEnvironment")();var EI=!1;try{SI(new Hg(""))}catch(r){EI=r.code==="ERR_INVALID_URL"}var nse=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],bI=["abort","aborted","connect","error","socket","timeout"],AI=Object.create(null);bI.forEach(function(r){AI[r]=function(e,t,n){this._redirectable.emit(r,e,t,n)}});var vI=$g("ERR_INVALID_URL","Invalid URL",TypeError),yI=$g("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),sse=$g("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",yI),ise=$g("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),ase=$g("ERR_STREAM_WRITE_AFTER_END","write after end"),ose=wI.prototype.destroy||Q5;function Fs(r,e){wI.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 yI?s:new yI({cause:s}))}},this._performRequest()}o(Fs,"RedirectableRequest");Fs.prototype=Object.create(wI.prototype);Fs.prototype.abort=function(){NI(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Fs.prototype.destroy=function(r){return NI(this._currentRequest,r),ose.call(this,r),this};Fs.prototype.write=function(r,e,t){if(this._ending)throw new ase;if(!rf(r)&&!lse(r))throw new TypeError("data should be a string, Buffer or Uint8Array");if(nf(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 ise),this.abort())};Fs.prototype.end=function(r,e,t){if(nf(r)?(t=r,r=e=null):nf(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}};Fs.prototype.setHeader=function(r,e){this._options.headers[r]=e,this._currentRequest.setHeader(r,e)};Fs.prototype.removeHeader=function(r){delete this._options.headers[r],this._currentRequest.removeHeader(r)};Fs.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){Fs.prototype[r]=function(e,t){return this._currentRequest[r](e,t)}});["aborted","connection","socket"].forEach(function(r){Object.defineProperty(Fs.prototype,r,{get:o(function(){return this._currentRequest[r]},"get")})});Fs.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))}};Fs.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 bI)n.on(s,AI[s]);if(this._currentUrl=/^\//.test(this._options.path)?Kg.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")()}};Fs.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(NI(this._currentRequest),r.destroy(),++this._redirectCount>this._options.maxRedirects)throw new sse;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=[],gI(/^content-/i,this._options.headers));var a=gI(/^host$/i,this._options.headers),u=CI(this._currentUrl),c=a||u.host,l=/^\w+:/.test(t)?this._currentUrl:Kg.format(Object.assign(u,{host:c})),h=use(t,l);if(J5("redirecting to",h.href),this._isRedirect=!0,xI(h,this._options),(h.protocol!==u.protocol&&h.protocol!=="https:"||h.host!==c&&!cse(h.host,c))&&gI(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),nf(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 Y5(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 fse(l)?l=xI(l):rf(l)?l=xI(CI(l)):(m=h,h=Z5(l),l={protocol:s}),nf(h)&&(m=h,h=null),h=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,h),h.nativeProtocols=t,!rf(h.host)&&!rf(h.hostname)&&(h.hostname="::1"),SI.equal(h.protocol,s,"protocol mismatch"),J5("options",h),new Fs(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(Y5,"wrap");function Q5(){}o(Q5,"noop");function CI(r){var e;if(EI)e=new Hg(r);else if(e=Z5(Kg.parse(r)),!rf(e.protocol))throw new vI({input:r});return e}o(CI,"parseUrl");function use(r,e){return EI?new Hg(r,e):CI(Kg.resolve(e,r))}o(use,"resolveUrl");function Z5(r){if(/^\[/.test(r.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(r.hostname))throw new vI({input:r.href||r});if(/^\[/.test(r.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(r.host))throw new vI({input:r.href||r});return r}o(Z5,"validateUrl");function xI(r,e){var t=e||{};for(var n of nse)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(xI,"spreadUrlObject");function gI(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(gI,"removeMatchingHeaders");function $g(r,e,t){function n(s){nf(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($g,"createErrorType");function NI(r,e){for(var t of bI)r.removeListener(t,AI[t]);r.on("error",Q5),r.destroy(e)}o(NI,"destroyRequest");function cse(r,e){SI(rf(r)&&rf(e));var t=r.length-e.length-1;return t>0&&r[t]==="."&&r.endsWith(e)}o(cse,"isSubdomain");function rf(r){return typeof r=="string"||r instanceof String}o(rf,"isString");function nf(r){return typeof r=="function"}o(nf,"isFunction");function lse(r){return typeof r=="object"&&"length"in r}o(lse,"isBuffer");function fse(r){return Hg&&r instanceof Hg}o(fse,"isURL");TI.exports=Y5({http:tse,https:rse});TI.exports.wrap=Y5});var ZI=re((wxe,WV)=>{"use strict";var hse=dI(),pse=Je("crypto"),dse=Je("url"),mse=mI(),gse=Je("http"),vse=Je("https"),yse=Je("http2"),xse=Je("util"),wse=II(),Sse=Je("zlib"),EV=Je("stream"),Ese=Je("events");function la(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}o(la,"_interopDefaultLegacy");var bV=la(hse),bse=la(pse),Ase=la(dse),Cse=la(mse),Nse=la(gse),Tse=la(vse),AV=la(yse),KI=la(xse),Ise=la(wse),rc=la(Sse),za=la(EV);function CV(r,e){return o(function(){return r.apply(e,arguments)},"wrap")}o(CV,"bind");var{toString:_se}=Object.prototype,{getPrototypeOf:$I}=Object,{iterator:zS,toStringTag:NV}=Symbol,JS=(r=>e=>{let t=_se.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),fa=o(r=>(r=r.toLowerCase(),e=>JS(e)===r),"kindOfTest"),YS=o(r=>e=>typeof e===r,"typeOfTest"),{isArray:td}=Array,Yp=YS("undefined");function Wg(r){return r!==null&&!Yp(r)&&r.constructor!==null&&!Yp(r.constructor)&&Ms(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}o(Wg,"isBuffer");var TV=fa("ArrayBuffer");function Dse(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&TV(r.buffer),e}o(Dse,"isArrayBufferView");var Bse=YS("string"),Ms=YS("function"),IV=YS("number"),zg=o(r=>r!==null&&typeof r=="object","isObject"),Rse=o(r=>r===!0||r===!1,"isBoolean"),qS=o(r=>{if(JS(r)!=="object")return!1;let e=$I(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(NV in r)&&!(zS in r)},"isPlainObject"),Ose=o(r=>{if(!zg(r)||Wg(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},"isEmptyObject"),Pse=fa("Date"),kse=fa("File"),Lse=fa("Blob"),Vse=fa("FileList"),Use=o(r=>zg(r)&&Ms(r.pipe),"isStream"),jse=o(r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Ms(r.append)&&((e=JS(r))==="formdata"||e==="object"&&Ms(r.toString)&&r.toString()==="[object FormData]"))},"isFormData"),Fse=fa("URLSearchParams"),[Mse,qse,Hse,Kse]=["ReadableStream","Request","Response","Headers"].map(fa),$se=o(r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function Jg(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),td(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(Wg(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(Jg,"forEach");function _V(r,e){if(Wg(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(_V,"findKey");var sf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,DV=o(r=>!Yp(r)&&r!==sf,"isContextDefined");function PI(){let{caseless:r,skipUndefined:e}=DV(this)&&this||{},t={},n=o((s,i)=>{let a=r&&_V(t,i)||i;qS(t[a])&&qS(s)?t[a]=PI(t[a],s):qS(s)?t[a]=PI({},s):td(s)?t[a]=s.slice():(!e||!Yp(s))&&(t[a]=s)},"assignValue");for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Jg(arguments[s],n);return t}o(PI,"merge");var Gse=o((r,e,t,{allOwnKeys:n}={})=>(Jg(e,(s,i)=>{t&&Ms(s)?r[i]=CV(s,t):r[i]=s},{allOwnKeys:n}),r),"extend"),Xse=o(r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),"stripBOM"),Wse=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"),zse=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&&$I(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},"toFlatObject"),Jse=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"),Yse=o(r=>{if(!r)return null;if(td(r))return r;let e=r.length;if(!IV(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},"toArray"),Qse=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&$I(Uint8Array)),Zse=o((r,e)=>{let n=(r&&r[zS]).call(r),s;for(;(s=n.next())&&!s.done;){let i=s.value;e.call(r,i[0],i[1])}},"forEachEntry"),eie=o((r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},"matchAll"),tie=fa("HTMLFormElement"),rie=o(r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,o(function(t,n,s){return n.toUpperCase()+s},"replacer")),"toCamelCase"),eV=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),nie=fa("RegExp"),BV=o((r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};Jg(t,(s,i)=>{let a;(a=e(s,i,r))!==!1&&(n[i]=a||s)}),Object.defineProperties(r,n)},"reduceDescriptors"),sie=o(r=>{BV(r,(e,t)=>{if(Ms(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(Ms(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"),iie=o((r,e)=>{let t={},n=o(s=>{s.forEach(i=>{t[i]=!0})},"define");return td(r)?n(r):n(String(r).split(e)),t},"toObjectSet"),aie=o(()=>{},"noop"),oie=o((r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,"toFiniteNumber");function uie(r){return!!(r&&Ms(r.append)&&r[NV]==="FormData"&&r[zS])}o(uie,"isSpecCompliantForm");var cie=o(r=>{let e=new Array(10),t=o((n,s)=>{if(zg(n)){if(e.indexOf(n)>=0)return;if(Wg(n))return n;if(!("toJSON"in n)){e[s]=n;let i=td(n)?[]:{};return Jg(n,(a,u)=>{let c=t(a,s+1);!Yp(c)&&(i[u]=c)}),e[s]=void 0,i}}return n},"visit");return t(r,0)},"toJSONObject"),lie=fa("AsyncFunction"),fie=o(r=>r&&(zg(r)||Ms(r))&&Ms(r.then)&&Ms(r.catch),"isThenable"),RV=((r,e)=>r?setImmediate:e?((t,n)=>(sf.addEventListener("message",({source:s,data:i})=>{s===sf&&i===t&&n.length&&n.shift()()},!1),s=>{n.push(s),sf.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ms(sf.postMessage)),hie=typeof queueMicrotask<"u"?queueMicrotask.bind(sf):typeof process<"u"&&process.nextTick||RV,pie=o(r=>r!=null&&Ms(r[zS]),"isIterable"),de={isArray:td,isArrayBuffer:TV,isBuffer:Wg,isFormData:jse,isArrayBufferView:Dse,isString:Bse,isNumber:IV,isBoolean:Rse,isObject:zg,isPlainObject:qS,isEmptyObject:Ose,isReadableStream:Mse,isRequest:qse,isResponse:Hse,isHeaders:Kse,isUndefined:Yp,isDate:Pse,isFile:kse,isBlob:Lse,isRegExp:nie,isFunction:Ms,isStream:Use,isURLSearchParams:Fse,isTypedArray:Qse,isFileList:Vse,forEach:Jg,merge:PI,extend:Gse,trim:$se,stripBOM:Xse,inherits:Wse,toFlatObject:zse,kindOf:JS,kindOfTest:fa,endsWith:Jse,toArray:Yse,forEachEntry:Zse,matchAll:eie,isHTMLForm:tie,hasOwnProperty:eV,hasOwnProp:eV,reduceDescriptors:BV,freezeMethods:sie,toObjectSet:iie,toCamelCase:rie,noop:aie,toFiniteNumber:oie,findKey:_V,global:sf,isContextDefined:DV,isSpecCompliantForm:uie,toJSONObject:cie,isAsyncFn:lie,isThenable:fie,setImmediate:RV,asap:hie,isIterable:pie};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 OV=lt.prototype,PV={};["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=>{PV[r]={value:r}});Object.defineProperties(lt,PV);Object.defineProperty(OV,"isAxiosError",{value:!0});lt.from=(r,e,t,n,s,i)=>{let a=Object.create(OV);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 kI(r){return de.isPlainObject(r)||de.isArray(r)}o(kI,"isVisitable");function kV(r){return de.endsWith(r,"[]")?r.slice(0,-2):r}o(kV,"removeBrackets");function tV(r,e,t){return r?r.concat(e).map(o(function(s,i){return s=kV(s),!t&&i?"["+s+"]":s},"each")).join(t?".":""):e}o(tV,"renderKey");function die(r){return de.isArray(r)&&!r.some(kI)}o(die,"isFlatArray");var mie=de.toFlatObject(de,{},null,o(function(e){return/^is[A-Z]/.test(e)},"filter"));function QS(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(S,w){return!de.isUndefined(w[S])},"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,S,w){let C=v;if(v&&!w&&typeof v=="object"){if(de.endsWith(S,"{}"))S=n?S:S.slice(0,-2),v=JSON.stringify(v);else if(de.isArray(v)&&die(v)||(de.isFileList(v)||de.endsWith(S,"[]"))&&(C=de.toArray(v)))return S=kV(S),C.forEach(o(function(b,A){!(de.isUndefined(b)||b===null)&&e.append(a===!0?tV([S],A,i):a===null?S:S+"[]",l(b))},"each")),!1}return kI(v)?!0:(e.append(tV(w,S,i),l(v)),!1)}o(h,"defaultVisitor");let m=[],g=Object.assign(mie,{defaultVisitor:h,convertValue:l,isVisitable:kI});function y(v,S){if(!de.isUndefined(v)){if(m.indexOf(v)!==-1)throw Error("Circular reference detected in "+S.join("."));m.push(v),de.forEach(v,o(function(C,_){(!(de.isUndefined(C)||C===null)&&s.call(e,C,de.isString(_)?_.trim():_,S,g))===!0&&y(C,S?S.concat(_):[_])},"each")),m.pop()}}if(o(y,"build"),!de.isObject(r))throw new TypeError("data must be an object");return y(r),e}o(QS,"toFormData");function rV(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(rV,"encode$1");function LV(r,e){this._pairs=[],r&&QS(r,this,e)}o(LV,"AxiosURLSearchParams");var VV=LV.prototype;VV.append=o(function(e,t){this._pairs.push([e,t])},"append");VV.toString=o(function(e){let t=e?function(n){return e.call(this,n,rV)}:rV;return this._pairs.map(o(function(s){return t(s[0])+"="+t(s[1])},"each"),"").join("&")},"toString");function gie(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}o(gie,"encode");function GI(r,e,t){if(!e)return r;let n=t&&t.encode||gie;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 LV(e,t).toString(n),i){let a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r}o(GI,"buildURL");var LI=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"))}},nV=LI,XI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vie=Ase.default.URLSearchParams,_I="abcdefghijklmnopqrstuvwxyz",sV="0123456789",UV={DIGIT:sV,ALPHA:_I,ALPHA_DIGIT:_I+_I.toUpperCase()+sV},yie=o((r=16,e=UV.ALPHA_DIGIT)=>{let t="",{length:n}=e,s=new Uint32Array(r);bse.default.randomFillSync(s);for(let i=0;i<r;i++)t+=e[s[i]%n];return t},"generateString"),xie={isNode:!0,classes:{URLSearchParams:vie,FormData:bV.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:UV,generateString:yie,protocols:["http","https","file","data"]},WI=typeof window<"u"&&typeof document<"u",VI=typeof navigator=="object"&&navigator||void 0,wie=WI&&(!VI||["ReactNative","NativeScript","NS"].indexOf(VI.product)<0),Sie=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Eie=WI&&window.location.href||"http://localhost",bie=Object.freeze({__proto__:null,hasBrowserEnv:WI,hasStandardBrowserWebWorkerEnv:Sie,hasStandardBrowserEnv:wie,navigator:VI,origin:Eie}),un={...bie,...xie};function Aie(r,e){return QS(r,new un.classes.URLSearchParams,{visitor:o(function(t,n,s,i){return un.isNode&&de.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},"visitor"),...e})}o(Aie,"toURLEncodedForm");function Cie(r){return de.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}o(Cie,"parsePropPath");function Nie(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(Nie,"arrayToObject");function jV(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]=Nie(s[a])),!u)}if(o(e,"buildPath"),de.isFormData(r)&&de.isFunction(r.entries)){let t={};return de.forEachEntry(r,(n,s)=>{e(Cie(n),s,t,0)}),t}return null}o(jV,"formDataToJSON");function Tie(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(Tie,"stringifySafely");var zI={transitional:XI,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(jV(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 Aie(e,this.formSerializer).toString();if((u=de.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return QS(u?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),Tie(e)):e},"transformRequest")],transformResponse:[o(function(e){let t=this.transitional||zI.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:un.classes.FormData,Blob:un.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=>{zI.headers[r]={}});var JI=zI,Iie=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"]),_ie=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]&&Iie[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)},"parser")),e},"parseHeaders"),iV=Symbol("internals");function Gg(r){return r&&String(r).trim().toLowerCase()}o(Gg,"normalizeHeader");function HS(r){return r===!1||r==null?r:de.isArray(r)?r.map(HS):String(r)}o(HS,"normalizeValue");function Die(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(Die,"parseTokens");var Bie=o(r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim()),"isValidHeaderName");function DI(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(DI,"matchHeaderValue");function Rie(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}o(Rie,"formatHeader");function Oie(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(Oie,"buildAccessors");var Qp=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=Gg(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]=HS(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())&&!Bie(e))a(_ie(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=Gg(e),e){let n=de.findKey(this,e);if(n){let s=this[n];if(!t)return s;if(t===!0)return Die(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=Gg(e),e){let n=de.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||DI(this,this[n],n,t)))}return!1}delete(e,t){let n=this,s=!1;function i(a){if(a=Gg(a),a){let u=de.findKey(n,a);u&&(!t||DI(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||DI(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]=HS(s),delete t[i];return}let u=e?Rie(i):String(i).trim();u!==i&&delete t[i],t[u]=HS(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[iV]=this[iV]={accessors:{}}).accessors,s=this.prototype;function i(a){let u=Gg(a);n[u]||(Oie(s,a),n[u]=!0)}return o(i,"defineAccessor"),de.isArray(e)?e.forEach(i):i(e),this}};Qp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(Qp.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:o(()=>r,"get"),set(n){this[t]=n}}});de.freezeMethods(Qp);var qs=Qp;function BI(r,e){let t=this||JI,n=e||t,s=qs.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(BI,"transformData");function FV(r){return!!(r&&r.__CANCEL__)}o(FV,"isCancel");function nc(r,e,t){lt.call(this,r??"canceled",lt.ERR_CANCELED,e,t),this.name="CanceledError"}o(nc,"CanceledError");de.inherits(nc,lt,{__CANCEL__:!0});function Jp(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(Jp,"settle");function Pie(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}o(Pie,"isAbsoluteURL");function kie(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}o(kie,"combineURLs");function YI(r,e,t){let n=!Pie(e);return r&&(n||t==!1)?kie(r,e):e}o(YI,"buildFullPath");var GS="1.13.2";function MV(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}o(MV,"parseProtocol");var Lie=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Vie(r,e,t){let n=t&&t.Blob||un.classes.Blob,s=MV(r);if(e===void 0&&n&&(e=!0),s==="data"){r=s.length?r.slice(s.length+1):r;let i=Lie.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(Vie,"fromDataURI");var RI=Symbol("internals"),UI=class extends za.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[RI]={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[RI];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let s=this[RI],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 S=Buffer.byteLength(y);s.bytesSeen+=S,s.bytes+=S,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 S=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&&S>C&&S-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,S){if(v)return n(v);S?g(S,y):n(null)},"transformNextChunk"))}},aV=UI,{asyncIterator:oV}=Symbol,Uie=o(async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[oV]?yield*r[oV]():yield r},"readBlob"),qV=Uie,jie=un.ALPHABET.ALPHA_DIGIT+"-_",Xg=typeof TextEncoder=="function"?new TextEncoder:new KI.default.TextEncoder,af=`\r
|
|
50
|
+
`,Fie=Xg.encode(af),Mie=2,jI=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)}"`:""}${af}`;s?t=Xg.encode(String(t).replace(/\r?\n|\r\n?/g,af)):i+=`Content-Type: ${t.type||"application/octet-stream"}${af}`,this.headers=Xg.encode(i+af),this.contentLength=s?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+Mie,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;de.isTypedArray(e)?yield e:yield*qV(e),yield Fie}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},qie=o((r,e,t)=>{let{tag:n="form-data-boundary",size:s=25,boundary:i=n+"-"+un.generateString(s,jie)}=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=Xg.encode("--"+i+af),u=Xg.encode("--"+i+"--"+af),c=u.byteLength,l=Array.from(r.entries()).map(([m,g])=>{let y=new jI(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),EV.Readable.from((async function*(){for(let m of l)yield a,yield*m.encode();yield u})())},"formDataToStream"),Hie=qie,FI=class extends za.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)}},Kie=FI,$ie=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"),Gie=$ie;function Xie(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(Xie,"speedometer");function Wie(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(Wie,"throttle");var Zp=o((r,e,t=3)=>{let n=0,s=Xie(50,250);return Wie(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"),XS=o((r,e)=>{let t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},"progressEventDecorator"),WS=o(r=>(...e)=>de.asap(()=>r(...e)),"asyncDecorator");function zie(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(zie,"estimateDataURLDecodedBytes");var uV={flush:rc.default.constants.Z_SYNC_FLUSH,finishFlush:rc.default.constants.Z_SYNC_FLUSH},Jie={flush:rc.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:rc.default.constants.BROTLI_OPERATION_FLUSH},cV=de.isFunction(rc.default.createBrotliDecompress),{http:Yie,https:Qie}=Ise.default,Zie=/https:?/,lV=un.protocols.map(r=>r+":"),fV=o((r,[e,t])=>(r.on("end",t).on("error",t),e),"flushOnFinish"),MI=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&&KI.default.isDeepStrictEqual(y,t))return g}}let s=AV.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}},eae=new MI;function tae(r,e){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,e)}o(tae,"dispatchBeforeRedirect");function HV(r,e,t){let n=e;if(!n&&n!==!1){let s=Cse.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){HV(i,e,i.href)},"beforeRedirect")}o(HV,"setProxy");var rae=typeof process<"u"&&de.kindOf(process)==="process",nae=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"),sae=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"),hV=o((r,e)=>sae(de.isObject(r)?r:{address:r,family:e}),"buildAddressEntry"),iae={request(r,e){let t=r.protocol+"//"+r.hostname+":"+(r.port||80),{http2Options:n,headers:s}=r,i=eae.getSession(t,n),{HTTP2_HEADER_SCHEME:a,HTTP2_HEADER_METHOD:u,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=AV.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}},aae=rae&&o(function(e){return nae(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,S=!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=Gie(u,Z=>de.isArray(Z)?Z:[Z]);u=o((Z,Ee,He)=>{ne(Z,Ee,(Le,tt,N)=>{if(Le)return He(Le);let E=de.isArray(tt)?tt.map(G=>hV(G)):[hV(tt,N)];Ee.all?He(Le,E):He(Le,E[0].address,E[0].family)})},"lookup")}let _=new Ese.EventEmitter;function b(ne){try{_.emit("abort",!ne||ne.type?new nc(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){S=!0,A();return}let{data:Ee}=ne;if(Ee instanceof za.default.Readable||Ee instanceof za.default.Duplex){let He=za.default.finished(Ee,()=>{He(),A()})}else A()});let T=YI(e.baseURL,e.url,e.allowAbsoluteUrls),B=new URL(T,un.hasBrowserEnv?un.origin:void 0),M=B.protocol||lV[0];if(M==="data:"){if(e.maxContentLength>-1){let Z=String(e.url||T||"");if(zie(Z)>e.maxContentLength)return s(new lt("maxContentLength size of "+e.maxContentLength+" exceeded",lt.ERR_BAD_RESPONSE,e))}let ne;if(y!=="GET")return Jp(n,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{ne=Vie(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=za.default.Readable.from(ne)),Jp(n,s,{data:ne,status:200,statusText:"OK",headers:new qs,config:e})}if(lV.indexOf(M)===-1)return s(new lt("Unsupported protocol "+M,lt.ERR_BAD_REQUEST,e));let I=qs.from(e.headers).normalize();I.set("User-Agent","axios/"+GS,!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=Hie(a,Z=>{I.set(Z)},{tag:`axios-${GS}-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 KI.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=za.default.Readable.from(qV(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=za.default.Readable.from(a,{objectMode:!1})),a=za.default.pipeline([a,new aV({maxRate:de.toFiniteNumber(W)})],de.noop),H&&a.on("progress",fV(a,XS(pe,Zp(WS(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=GI(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"+(cV?", 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:tae,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,HV(ve,e.proxy,M+"//"+B.hostname+(B.port?":"+B.port:"")+ve.path));let Oe,ze=Zie.test(ve.protocol);if(ve.agent=ze?e.httpsAgent:e.httpAgent,C?Oe=iae:e.transport?Oe=e.transport:e.maxRedirects===0?Oe=ze?Tse.default:Nse.default:(e.maxRedirects&&(ve.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ve.beforeRedirects.config=e.beforeRedirect),Oe=ze?Qie:Yie),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 Ee=[Z],He=de.toFiniteNumber(Z.headers["content-length"]);if(K||he){let E=new aV({maxRate:de.toFiniteNumber(he)});K&&E.on("progress",fV(E,XS(He,Zp(WS(K),!0,3)))),Ee.push(E)}let Le=Z,tt=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":Ee.push(rc.default.createUnzip(uV)),delete Z.headers["content-encoding"];break;case"deflate":Ee.push(new Kie),Ee.push(rc.default.createUnzip(uV)),delete Z.headers["content-encoding"];break;case"br":cV&&(Ee.push(rc.default.createBrotliDecompress(Jie)),delete Z.headers["content-encoding"])}Le=Ee.length>1?za.default.pipeline(Ee,de.noop):Ee[0];let N={status:Z.statusCode,statusText:Z.statusMessage,headers:new qs(Z.headers),config:e,request:tt};if(m==="stream")N.data=Le,Jp(n,s,N);else{let E=[],G=0;Le.on("data",o(function(Se){E.push(Se),G+=Se.length,e.maxContentLength>-1&&G>e.maxContentLength&&(S=!0,Le.destroy(),b(new lt("maxContentLength size of "+e.maxContentLength+" exceeded",lt.ERR_BAD_RESPONSE,e,tt)))},"handleStreamData")),Le.on("aborted",o(function(){if(S)return;let Se=new lt("stream has been aborted",lt.ERR_BAD_RESPONSE,e,tt);Le.destroy(Se),s(Se)},"handlerStreamAborted")),Le.on("error",o(function(Se){w.destroyed||s(lt.from(Se,null,e,tt))},"handleStreamError")),Le.on("end",o(function(){try{let Se=E.length===1?E[0]:Buffer.concat(E);m!=="arraybuffer"&&(Se=Se.toString(g),(!g||g==="utf8")&&(Se=de.stripBOM(Se))),N.data=Se}catch(Se){return s(lt.from(Se,null,e,N.request,N))}Jp(n,s,N)},"handleStreamEnd"))}_.once("abort",E=>{Le.destroyed||(Le.emit("error",E),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 Ee=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",He=e.transitional||XI;e.timeoutErrorMessage&&(Ee=e.timeoutErrorMessage),b(new lt(Ee,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",Ee=>{Z=!0,w.destroy(Ee)}),a.on("close",()=>{!ne&&!Z&&b(new nc("Request stream has been aborted",e,w))}),a.pipe(w)}else a&&w.write(a),w.end()},"dispatchHttpRequest"))},"httpAdapter"),oae=un.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,un.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(un.origin),un.navigator&&/(msie|trident)/i.test(un.navigator.userAgent)):()=>!0,uae=un.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(){}},pV=o(r=>r instanceof qs?{...r}:r,"headersToObject");function of(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(pV(l),pV(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(of,"mergeConfig");var KV=o(r=>{let e=of({},r),{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:u}=e;if(e.headers=a=qs.from(a),e.url=GI(YI(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(un.hasStandardBrowserEnv||un.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(un.hasStandardBrowserEnv&&(n&&de.isFunction(n)&&(n=n(e)),n||n!==!1&&oae(e.url))){let c=s&&i&&uae.read(i);c&&a.set(s,c)}return e},"resolveConfig"),cae=typeof XMLHttpRequest<"u",lae=cae&&function(r){return new Promise(o(function(t,n){let s=KV(r),i=s.data,a=qs.from(s.headers).normalize(),{responseType:u,onUploadProgress:c,onDownloadProgress:l}=s,h,m,g,y,v;function S(){y&&y(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}o(S,"done");let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function C(){if(!w)return;let b=qs.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};Jp(o(function(M){t(M),S()},"_resolve"),o(function(M){n(M),S()},"_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||XI;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]=Zp(l,!0),w.addEventListener("progress",g)),c&&w.upload&&([m,y]=Zp(c),w.upload.addEventListener("progress",m),w.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(h=o(b=>{w&&(n(!b||b.type?new nc(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 _=MV(s.url);if(_&&un.protocols.indexOf(_)===-1){n(new lt("Unsupported protocol "+_+":",lt.ERR_BAD_REQUEST,r));return}w.send(i||null)},"dispatchXhrRequest"))},fae=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 nc(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"),hae=fae,pae=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"),dae=o(async function*(r,e){for await(let t of mae(r))yield*pae(t,e)},"readBytes"),mae=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"),dV=o((r,e,t,n)=>{let s=dae(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"),mV=64*1024,{isFunction:MS}=de,gae=(({Request:r,Response:e})=>({Request:r,Response:e}))(de.global),{ReadableStream:gV,TextEncoder:vV}=de.global,yV=o((r,...e)=>{try{return!!r(...e)}catch{return!1}},"test"),vae=o(r=>{r=de.merge.call({skipUndefined:!0},gae,r);let{fetch:e,Request:t,Response:n}=r,s=e?MS(e):typeof fetch=="function",i=MS(t),a=MS(n);if(!s)return!1;let u=s&&MS(gV),c=s&&(typeof vV=="function"?(v=>S=>v.encode(S))(new vV):async v=>new Uint8Array(await new t(v).arrayBuffer())),l=i&&u&&yV(()=>{let v=!1,S=new t(un.origin,{body:new gV,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!S}),h=a&&u&&yV(()=>de.isReadableStream(new n("").body)),m={stream:h&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!m[v]&&(m[v]=(S,w)=>{let C=S&&S[v];if(C)return C.call(S);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(un.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,S)=>{let w=de.toFiniteNumber(v.getContentLength());return w??g(S)},"resolveBodyLength");return async v=>{let{url:S,method:w,data:C,signal:_,cancelToken:b,timeout:A,onDownloadProgress:T,onUploadProgress:B,responseType:M,headers:I,withCredentials:H="same-origin",fetchOptions:K}=KV(v),q=e||fetch;M=M?(M+"").toLowerCase():"text";let W=hae([_,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(S,{method:"POST",body:C,duplex:"half"}),Ee;if(de.isFormData(C)&&(Ee=Z.headers.get("content-type"))&&I.setContentType(Ee),Z.body){let[He,Le]=XS(ue,Zp(WS(B)));C=dV(Z.body,mV,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(S,ve);let Oe=await(i?q(he,K):q(S,ve)),ze=h&&(M==="stream"||M==="response");if(h&&(T||ze&&pe)){let Z={};["status","statusText","headers"].forEach(tt=>{Z[tt]=Oe[tt]});let Ee=de.toFiniteNumber(Oe.headers.get("content-length")),[He,Le]=T&&XS(Ee,Zp(WS(T),!0))||[];Oe=new n(dV(Oe.body,mV,He,()=>{Le&&Le(),pe&&pe()}),Z)}M=M||"text";let ne=await m[de.findKey(m,M)||"text"](Oe,v);return!ze&&pe&&pe(),await new Promise((Z,Ee)=>{Jp(Z,Ee,{data:ne,headers:qs.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"),yae=new Map,$V=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=yae;for(;u--;)c=i[u],l=h.get(c),l===void 0&&h.set(c,l=u?new Map:vae(e)),h=l;return l},"getFetch");$V();var QI={http:aae,xhr:lae,fetch:{get:$V}};de.forEach(QI,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var xV=o(r=>`- ${r}`,"renderReason"),xae=o(r=>de.isFunction(r)||r===null||r===!1,"isResolvedHandle");function wae(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,!xae(n)&&(s=QI[(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(xV).join(`
|
|
52
|
+
`):" "+xV(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(wae,"getAdapter");var GV={getAdapter:wae,adapters:QI};function OI(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new nc(null,r)}o(OI,"throwIfCancellationRequested");function wV(r){return OI(r),r.headers=qs.from(r.headers),r.data=BI.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),GV.getAdapter(r.adapter||JI.adapter,r)(r).then(o(function(n){return OI(r),n.data=BI.call(r,r.transformResponse,n),n.headers=qs.from(n.headers),n},"onAdapterResolution"),o(function(n){return FV(n)||(OI(r),n&&n.response&&(n.response.data=BI.call(r,r.transformResponse,n.response),n.response.headers=qs.from(n.response.headers))),Promise.reject(n)},"onAdapterRejection"))}o(wV,"dispatchRequest");var ZS={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{ZS[r]=o(function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r},"validator")});var SV={};ZS.transitional=o(function(e,t,n){function s(i,a){return"[Axios v"+GS+"] 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&&!SV[a]&&(SV[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");ZS.spelling=o(function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)},"spelling");function Sae(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(Sae,"assertOptions");var KS={assertOptions:Sae,validators:ZS},Wa=KS.validators,ed=class{static{o(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new nV,response:new nV}}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=of(this.defaults,t);let{transitional:n,paramsSerializer:s,headers:i}=t;n!==void 0&&KS.assertOptions(n,{silentJSONParsing:Wa.transitional(Wa.boolean),forcedJSONParsing:Wa.transitional(Wa.boolean),clarifyTimeoutError:Wa.transitional(Wa.boolean)},!1),s!=null&&(de.isFunction(s)?t.paramsSerializer={serialize:s}:KS.assertOptions(s,{encode:Wa.function,serialize:Wa.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),KS.assertOptions(t,{baseUrl:Wa.spelling("baseURL"),withXsrfToken:Wa.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=qs.concat(a,i);let u=[],c=!0;this.interceptors.request.forEach(o(function(S){typeof S.runWhen=="function"&&S.runWhen(t)===!1||(c=c&&S.synchronous,u.unshift(S.fulfilled,S.rejected))},"unshiftRequestInterceptors"));let l=[];this.interceptors.response.forEach(o(function(S){l.push(S.fulfilled,S.rejected)},"pushResponseInterceptors"));let h,m=0,g;if(!c){let v=[wV.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++],S=u[m++];try{y=v(y)}catch(w){S.call(this,w);break}}try{h=wV.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=of(this.defaults,e);let t=YI(e.baseURL,e.url,e.allowAbsoluteUrls);return GI(t,e.params,e.paramsSerializer)}};de.forEach(["delete","get","head","options"],o(function(e){ed.prototype[e]=function(t,n){return this.request(of(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(of(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))},"httpMethod")}o(t,"generateHTTPMethod"),ed.prototype[e]=t(),ed.prototype[e+"Form"]=t(!0)},"forEachMethodWithData"));var $S=ed,qI=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 nc(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}}},Eae=qI;function bae(r){return o(function(t){return r.apply(null,t)},"wrap")}o(bae,"spread");function Aae(r){return de.isObject(r)&&r.isAxiosError===!0}o(Aae,"isAxiosError");var HI={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(HI).forEach(([r,e])=>{HI[e]=r});var Cae=HI;function XV(r){let e=new $S(r),t=CV($S.prototype.request,e);return de.extend(t,$S.prototype,e,{allOwnKeys:!0}),de.extend(t,e,null,{allOwnKeys:!0}),t.create=o(function(s){return XV(of(r,s))},"create"),t}o(XV,"createInstance");var wn=XV(JI);wn.Axios=$S;wn.CanceledError=nc;wn.CancelToken=Eae;wn.isCancel=FV;wn.VERSION=GS;wn.toFormData=QS;wn.AxiosError=lt;wn.Cancel=wn.CanceledError;wn.all=o(function(e){return Promise.all(e)},"all");wn.spread=bae;wn.isAxiosError=Aae;wn.mergeConfig=of;wn.AxiosHeaders=qs;wn.formToJSON=r=>jV(de.isHTMLForm(r)?new FormData(r):r);wn.getAdapter=GV.getAdapter;wn.HttpStatusCode=Cae;wn.default=wn;WV.exports=wn});var zV=re((Exe,Vr)=>{"use strict";Vr.exports.NTLMFLAG_NEGOTIATE_UNICODE=1;Vr.exports.NTLMFLAG_NEGOTIATE_OEM=2;Vr.exports.NTLMFLAG_REQUEST_TARGET=4;Vr.exports.NTLMFLAG_NEGOTIATE_SIGN=16;Vr.exports.NTLMFLAG_NEGOTIATE_SEAL=32;Vr.exports.NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE=64;Vr.exports.NTLMFLAG_NEGOTIATE_LM_KEY=128;Vr.exports.NTLMFLAG_NEGOTIATE_NETWARE=256;Vr.exports.NTLMFLAG_NEGOTIATE_NTLM_KEY=512;Vr.exports.NTLMFLAG_NEGOTIATE_ANONYMOUS=2048;Vr.exports.NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED=4096;Vr.exports.NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED=8192;Vr.exports.NTLMFLAG_NEGOTIATE_LOCAL_CALL=16384;Vr.exports.NTLMFLAG_NEGOTIATE_ALWAYS_SIGN=32768;Vr.exports.NTLMFLAG_TARGET_TYPE_DOMAIN=65536;Vr.exports.NTLMFLAG_TARGET_TYPE_SERVER=1<<17;Vr.exports.NTLMFLAG_TARGET_TYPE_SHARE=1<<18;Vr.exports.NTLMFLAG_NEGOTIATE_NTLM2_KEY=1<<19;Vr.exports.NTLMFLAG_REQUEST_INIT_RESPONSE=1<<20;Vr.exports.NTLMFLAG_REQUEST_ACCEPT_RESPONSE=1<<21;Vr.exports.NTLMFLAG_REQUEST_NONNT_SESSION_KEY=1<<22;Vr.exports.NTLMFLAG_NEGOTIATE_TARGET_INFO=1<<23;Vr.exports.NTLMFLAG_NEGOTIATE_128=1<<29;Vr.exports.NTLMFLAG_NEGOTIATE_KEY_EXCHANGE=1<<30;Vr.exports.NTLMFLAG_NEGOTIATE_56=1<<31});var e_=re(Li=>{"use strict";Li.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");Li.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");Li.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");Li.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");Li.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");Li.r28shl=o(function(e,t){return e<<t&268435455|e>>>28-t},"r28shl");var eE=[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];Li.pc2=o(function(e,t,n,s){for(var i=0,a=0,u=eE.length>>>1,c=0;c<u;c++)i<<=1,i|=e>>>eE[c]&1;for(var c=u;c<eE.length;c++)a<<=1,a|=t>>>eE[c]&1;n[s+0]=i>>>0,n[s+1]=a>>>0},"pc2");Li.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 JV=[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];Li.substitute=o(function(e,t){for(var n=0,s=0;s<4;s++){var i=e>>>18-s*6&63,a=JV[s*64+i];n<<=4,n|=a}for(var s=0;s<4;s++){var i=t>>>18-s*6&63,a=JV[256+s*64+i];n<<=4,n|=a}return n>>>0},"substitute");var YV=[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];Li.permute=o(function(e){for(var t=0,n=0;n<YV.length;n++)t<<=1,t|=e>>>YV[n]&1;return t>>>0},"permute");Li.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 Yg=re((Cxe,ZV)=>{"use strict";ZV.exports=QV;function QV(r,e){if(!r)throw new Error(e||"Assertion failed")}o(QV,"assert");QV.equal=o(function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)},"assertEqual")});var tE=re((Txe,eU)=>{"use strict";var Nae=Yg();function Vi(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(Vi,"Cipher");eU.exports=Vi;Vi.prototype._init=o(function(){},"_init");Vi.prototype.update=o(function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)},"update");Vi.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");Vi.prototype._flushBuffer=o(function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},"_flushBuffer");Vi.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");Vi.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");Vi.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");Vi.prototype._pad=o(function(e,t){if(t===0)return!1;for(;t<e.length;)e[t++]=0;return!0},"_pad");Vi.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");Vi.prototype._unpad=o(function(e){return e},"_unpad");Vi.prototype._finalDecrypt=o(function(){Nae.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 tU=re((_xe,t_)=>{"use strict";typeof Object.create=="function"?t_.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"):t_.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 rE=re((Bxe,n_)=>{"use strict";try{if(r_=Je("util"),typeof r_.inherits!="function")throw"";n_.exports=r_.inherits}catch{n_.exports=tU()}var r_});var s_=re((Rxe,sU)=>{"use strict";var rU=Yg(),Tae=rE(),_n=e_(),nU=tE();function Iae(){this.tmp=new Array(2),this.keys=null}o(Iae,"DESState");function Ja(r){nU.call(this,r);var e=new Iae;this._desState=e,this.deriveKeys(e,r.key)}o(Ja,"DES");Tae(Ja,nU);sU.exports=Ja;Ja.create=o(function(e){return new Ja(e)},"create");var _ae=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Ja.prototype.deriveKeys=o(function(e,t){e.keys=new Array(32),rU.equal(t.length,this.blockSize,"Invalid key length");var n=_n.readUInt32BE(t,0),s=_n.readUInt32BE(t,4);_n.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=_ae[i>>>1];n=_n.r28shl(n,a),s=_n.r28shl(s,a),_n.pc2(n,s,e.keys,i)}},"deriveKeys");Ja.prototype._update=o(function(e,t,n,s){var i=this._desState,a=_n.readUInt32BE(e,t),u=_n.readUInt32BE(e,t+4);_n.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],_n.writeUInt32BE(n,a,s),_n.writeUInt32BE(n,u,s+4)},"_update");Ja.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");Ja.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++)rU.equal(e[n],t);return e.slice(0,e.length-t)},"_unpad");Ja.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];_n.expand(u,e.tmp,0),l^=e.tmp[0],h^=e.tmp[1];var m=_n.substitute(l,h),g=_n.permute(m),y=u;u=(a^g)>>>0,a=y}_n.rip(u,a,s,i)},"_encrypt");Ja.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];_n.expand(a,e.tmp,0),l^=e.tmp[0],h^=e.tmp[1];var m=_n.substitute(l,h),g=_n.permute(m),y=a;a=(u^g)>>>0,u=y}_n.rip(a,u,s,i)},"_decrypt")});var aU=re(iU=>{"use strict";var Dae=Yg(),Bae=rE(),nE={};function Rae(r){Dae.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(Rae,"CBCState");function Oae(r){function e(i){r.call(this,i),this._cbcInit()}o(e,"CBC"),Bae(e,r);for(var t=Object.keys(nE),n=0;n<t.length;n++){var s=t[n];e.prototype[s]=nE[s]}return e.create=o(function(a){return new e(a)},"create"),e}o(Oae,"instantiate");iU.instantiate=Oae;nE._cbcInit=o(function(){var e=new Rae(this.options.iv);this._cbcState=e},"_cbcInit");nE._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 cU=re((Lxe,uU)=>{"use strict";var Pae=Yg(),kae=rE(),oU=tE(),sc=s_();function Lae(r,e){Pae.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=[sc.create({type:"encrypt",key:t}),sc.create({type:"decrypt",key:n}),sc.create({type:"encrypt",key:s})]:this.ciphers=[sc.create({type:"decrypt",key:s}),sc.create({type:"encrypt",key:n}),sc.create({type:"decrypt",key:t})]}o(Lae,"EDEState");function uf(r){oU.call(this,r);var e=new Lae(this.type,this.options.key);this._edeState=e}o(uf,"EDE");kae(uf,oU);uU.exports=uf;uf.create=o(function(e){return new uf(e)},"create");uf.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");uf.prototype._pad=sc.prototype._pad;uf.prototype._unpad=sc.prototype._unpad});var lU=re(rd=>{"use strict";rd.utils=e_();rd.Cipher=tE();rd.DES=s_();rd.CBC=aU();rd.EDE=cU()});var fU=re((jxe,sE)=>{"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 sE=="object"&&sE.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 S(!0).update(_)[C]()}},"createOutputMethod"),y=o(function(){var C=g("hex");e&&(C=v(C)),C.create=function(){return new S},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 _=Je("crypto"),b=Je("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 S(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(S,"Md4"),S.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}},S.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()}},S.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)},S.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]},S.prototype.toString=S.prototype.hex,S.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]},S.prototype.array=S.prototype.digest,S.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},S.prototype.buffer=S.prototype.arrayBuffer;var w=y();t?sE.exports=w:(r.md4=w,n&&define(function(){return w}))})()});var dU=re((qxe,pU)=>{"use strict";var i_=Je("crypto"),Mxe=lU(),Vae=fU();function Uae(r,e){var t=new Buffer.alloc(24),n=new Buffer.alloc(21).fill(0);return e.copy(n),ic(n.slice(0,7),r).copy(t),ic(n.slice(7,14),r).copy(t,8),ic(n.slice(14),r).copy(t,16),t}o(Uae,"createLMResponse");function jae(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([ic(t.slice(0,7),n),ic(t.slice(7),n)]))}o(jae,"createLMHash");function ic(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(ic,"calculateDES");function Fae(r,e){var t=new Buffer.alloc(24),n=new Buffer.alloc(21).fill(0);return e.copy(n),ic(n.slice(0,7),r).copy(t),ic(n.slice(7,14),r).copy(t,8),ic(n.slice(14),r).copy(t,16),t}o(Fae,"createNTLMResponse");function Mae(r){var e=Vae.create();return e.update(new Buffer.from(r,"ucs2")),e.buffer()}o(Mae,"createNTLMHash");function hU(r,e,t){var n=i_.createHmac("md5",r);return n.update(new Buffer.from(e.toUpperCase()+t,"ucs2")),n.digest()}o(hU,"createNTLMv2Hash");function qae(r,e,t,n,s){var i=new Buffer.alloc(24),a=hU(t,e,s),u=i_.createHmac("md5",a);r.challenge.copy(i,8),i.write(n||a_(16),16,"hex"),u.update(i.slice(8));var c=u.digest();return c.copy(i),i}o(qae,"createLMv2Response");function Hae(r,e,t,n,s){var i=new Buffer.alloc(48+r.targetInfo.buffer.length),a=hU(t,e,s),u=i_.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||a_(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(Hae,"createNTLMv2Response");function a_(r){for(var e="";e.length<r;)e+=Math.floor(Math.random()*16).toString(16);return e}o(a_,"createPseudoRandomValue");pU.exports={createLMHash:jae,createNTLMHash:Mae,createLMResponse:Uae,createNTLMResponse:Fae,createLMv2Response:qae,createNTLMv2Response:Hae,createPseudoRandomValue:a_}});var vU=re((Kxe,gU)=>{"use strict";var mU=Je("os"),oc=zV(),ac=dU(),uc="NTLMSSP\0";function Kae(r,e){var t=32,n=0,s=new Buffer.alloc(1024);return r=r===void 0?mU.hostname():r,e=e===void 0?"":e,s.write(uc,n,uc.length,"ascii"),n+=uc.length,s.writeUInt32LE(1,n),n+=4,s.writeUInt32LE(oc.NTLMFLAG_NEGOTIATE_OEM|oc.NTLMFLAG_REQUEST_TARGET|oc.NTLMFLAG_NEGOTIATE_NTLM_KEY|oc.NTLMFLAG_NEGOTIATE_NTLM2_KEY|oc.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(Kae,"createType1Message");function $ae(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,uc.length)!==uc)throw new Error("Invalid message signature: "+r);if(t.readUInt32LE(uc.length)!==2)throw new Error("Invalid message type (no type 2)");return n.flags=t.readUInt32LE(20),n.encoding=n.flags&oc.NTLMFLAG_NEGOTIATE_OEM?"ascii":"ucs2",n.version=n.flags&oc.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&oc.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($ae,"decodeType2Message");function Gae(r,e,t,n,s){var i=52,a=new Buffer.alloc(1024);if(n===void 0&&(n=mU.hostname()),s===void 0&&(s=r.targetName),a.write(uc,0,uc.length,"ascii"),a.writeUInt32LE(3,8),r.version===2){i=64;var u=ac.createNTLMHash(t),c=ac.createPseudoRandomValue(16),l=ac.createLMv2Response(r,e,u,c,s),h=ac.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=ac.createLMHash(t),u=ac.createNTLMHash(t),g=ac.createLMResponse(r.challenge,m),y=ac.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(Gae,"createType3Message");gU.exports={createType1Message:Kae,decodeType2Message:$ae,createType3Message:Gae}});var SU=re((Gxe,wU)=>{"use strict";var Xae=Je("util"),Wae=Je("stream"),yU=Wae.Writable,xU=xU||function(r){setTimeout(r,0)};wU.exports=Qg;Xae.inherits(Qg,yU);function Qg(r){if(!(this instanceof Qg))return new Qg(r);r=r||{},yU.call(this,r)}o(Qg,"DevNull");Qg.prototype._write=function(r,e,t){xU(t)}});var bU=re(Qn=>{"use strict";var zae=Qn&&Qn.__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]}),Jae=Qn&&Qn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),iE=Qn&&Qn.__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"&&zae(t,e,n[s]);return Jae(t,e),t}})(),Yae=Qn&&Qn.__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())})},Qae=Qn&&Qn.__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}}},Zae=Qn&&Qn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.AxiosError=void 0;Qn.NtlmClient=noe;var EU=iE(ZI());Object.defineProperty(Qn,"AxiosError",{enumerable:!0,get:o(function(){return EU.AxiosError},"get")});var o_=iE(vU()),eoe=iE(Je("https")),toe=iE(Je("http")),roe=Zae(SU());function noe(r,e){var t=this,n=e??{};n.httpAgent||(n.httpAgent=new toe.Agent({keepAlive:!0})),n.httpsAgent||(n.httpsAgent=new eoe.Agent({keepAlive:!0}));var s=EU.default.create(n);return s.interceptors.response.use(function(i){return i},function(i){return Yae(t,void 0,void 0,function(){var a,u,c,l,h,m,g,y;return Qae(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(S){return S.match(/ *NTLM/)}))===null||g===void 0?void 0:g.trim())||"",a.config.headers||(a.config.headers={}),u.length<50?(c=o_.createType1Message(r.workstation,r.domain),a.config.headers.Authorization=c):(l=o_.decodeType2Message((u.match(/^NTLM\s+(.+?)(,|\s+|$)/)||[])[1]),h=o_.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(S){m.pipe((0,roe.default)()),m.once("close",S)})]:[3,2])):[3,3];case 1:v.sent(),v.label=2;case 2:return[2,s(a.config)];case 3:throw i}})})}),s}o(noe,"NtlmClient")});var Zg=re(cc=>{"use strict";cc.removeLeadingAndTrailingHTTPWhitespace=r=>r.replace(/^[ \t\n\r]+/u,"").replace(/[ \t\n\r]+$/u,"");cc.removeTrailingHTTPWhitespace=r=>r.replace(/[ \t\n\r]+$/u,"");cc.isHTTPWhitespaceChar=r=>r===" "||r===" "||r===`
|
|
54
|
+
`||r==="\r";cc.solelyContainsHTTPTokenCodePoints=r=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/u.test(r);cc.soleyContainsHTTPQuotedStringTokenCodePoints=r=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/u.test(r);cc.asciiLowercase=r=>r.replace(/[A-Z]/ug,e=>e.toLowerCase());cc.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 CU=re((Qxe,AU)=>{"use strict";var{asciiLowercase:aE,solelyContainsHTTPTokenCodePoints:soe,soleyContainsHTTPQuotedStringTokenCodePoints:ioe}=Zg();AU.exports=class{static{o(this,"MIMETypeParameters")}constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=aE(String(e)),this._map.get(e)}has(e){return e=aE(String(e)),this._map.has(e)}set(e,t){if(e=aE(String(e)),t=String(t),!soe(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!ioe(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=aE(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 IU=re((ewe,TU)=>{"use strict";var{removeLeadingAndTrailingHTTPWhitespace:aoe,removeTrailingHTTPWhitespace:NU,isHTTPWhitespaceChar:ooe,solelyContainsHTTPTokenCodePoints:u_,soleyContainsHTTPQuotedStringTokenCodePoints:uoe,asciiLowercase:c_,collectAnHTTPQuotedString:coe}=Zg();TU.exports=r=>{r=aoe(r);let e=0,t="";for(;e<r.length&&r[e]!=="/";)t+=r[e],++e;if(t.length===0||!u_(t)||e>=r.length)return null;++e;let n="";for(;e<r.length&&r[e]!==";";)n+=r[e],++e;if(n=NU(n),n.length===0||!u_(n))return null;let s={type:c_(t),subtype:c_(n),parameters:new Map};for(;e<r.length;){for(++e;ooe(r[e]);)++e;let i="";for(;e<r.length&&r[e]!==";"&&r[e]!=="=";)i+=r[e],++e;if(i=c_(i),e<r.length){if(r[e]===";")continue;++e}let a=null;if(r[e]==='"')for([a,e]=coe(r,e);e<r.length&&r[e]!==";";)++e;else{for(a="";e<r.length&&r[e]!==";";)a+=r[e],++e;if(a=NU(a),a==="")continue}i.length>0&&u_(i)&&uoe(a)&&!s.parameters.has(i)&&s.parameters.set(i,a)}return s}});var DU=re((twe,_U)=>{"use strict";var{solelyContainsHTTPTokenCodePoints:loe}=Zg();_U.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+="=",(!loe(n)||n.length===0)&&(n=n.replace(/(["\\])/ug,"\\$1"),n=`"${n}"`),e+=n;return e}});var PU=re((nwe,OU)=>{"use strict";var foe=CU(),hoe=IU(),poe=DU(),{asciiLowercase:BU,solelyContainsHTTPTokenCodePoints:RU}=Zg();OU.exports=class{static{o(this,"MIMEType")}constructor(e){e=String(e);let t=hoe(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 foe(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=BU(String(e)),e.length===0)throw new Error("Invalid type: must be a non-empty string");if(!RU(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=BU(String(e)),e.length===0)throw new Error("Invalid subtype: must be a non-empty string");if(!RU(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return poe(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 lc=re(Sn=>{"use strict";var doe=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]}),moe=Sn&&Sn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),goe=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"&&doe(t,e,n[s]);return moe(t,e),t}})();Object.defineProperty(Sn,"__esModule",{value:!0});Sn.wsdlCacheSingleton=Sn.TNS_PREFIX=void 0;Sn.passwordDigest=yoe;Sn.findPrefix=xoe;Sn.splitQName=woe;Sn.xmlEscape=Soe;Sn.parseMTOMResp=Eoe;var voe=goe(Je("crypto"));function yoe(r,e,t){let n=voe.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(yoe,"passwordDigest");Sn.TNS_PREFIX="__tns__";function xoe(r,e){for(let t in r)if(t!==Sn.TNS_PREFIX&&r[t]===e)return t}o(xoe,"findPrefix");function woe(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(woe,"splitQName");function Soe(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(Soe,"xmlEscape");function Eoe(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(Eoe,"parseMTOMResp");var boe=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 boe});var kU=re((uwe,Aoe)=>{Aoe.exports={name:"soap",version:"1.6.1",description:"A minimal node SOAP client",engines:{node:">=14.17.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:"^11.0.3",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 oE=re(Ui=>{"use strict";var Coe=Ui&&Ui.__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]}),Noe=Ui&&Ui.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),UU=Ui&&Ui.__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"&&Coe(t,e,n[s]);return Noe(t,e),t}})(),jU=Ui&&Ui.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.HttpClient=void 0;var Toe=UU(ZI()),Ioe=bU(),LU=Je("crypto"),_oe=jU(Hp()),Doe=UU(Je("url")),Boe=jU(PU()),Roe=Je("zlib"),Ooe=lc(),VU=(0,_oe.default)("node-soap"),Poe=kU(),koe=class{static{o(this,"HttpClient")}constructor(e){e=e||{},this.options=e,this._request=e.request||Toe.create()}buildRequest(e,t,n,s={}){let i=Doe.parse(e),a=t?"POST":"GET",u=i.hostname,c=parseInt(i.port,10),l={"User-Agent":"node-soap/"+Poe.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 S in n)l[S]=n[S];let v={url:i.href,method:a,headers:l,transformResponse:o(S=>S,"transformResponse")};if(s.ntlm||(v.validateStatus=null),s.forceMTOM||y.length>0){let S=(0,LU.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,LU.randomUUID)();l["Content-Type"]='multipart/related; type="application/xop+xml"; start="<'+S+'>"; 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":"<"+S+">",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,Roe.gzipSync)(v.data),v.headers["Accept-Encoding"]="gzip,deflate",v.headers["Content-Encoding"]="gzip");for(let S in g)if(h.indexOf(S)!==-1)for(let w in s[S])v[S][w]=s[S][w];else v[S]=s[S];return VU("Http request: %j",v),v}handleResponse(e,t,n){if(VU("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,Ioe.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=Boe.default.parse(l.headers["content-type"]);return y&&(g=y.parameters.get("boundary")),g?(0,Ooe.parseMTOMResp)(l.data,g,(v,S)=>{if(v)return n(v);let w=S.parts.shift();return!w||!w.body?n(new Error("Cannot parse multipart response")):(l.mtomResponseAttachments=S,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}};Ui.HttpClient=koe});var l_=re(ji=>{"use strict";var Loe=ji&&ji.__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]}),Voe=ji&&ji.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),HU=ji&&ji.__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"&&Loe(t,e,n[s]);return Voe(t,e),t}})(),KU=ji&&ji.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ji,"__esModule",{value:!0});ji.Client=void 0;var FU=HU(Je("assert")),Uoe=Je("crypto"),joe=KU(Hp()),Foe=Je("events"),Moe=KU(KL()),MU=HU(Mo()),qoe=oE(),Hoe=lc(),Koe=(0,joe.default)("node-soap"),qU=/[^a-z$_0-9]/i,$oe=class extends Foe.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 qoe.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(qU,"_"):u;if(this[c]=a[u],!qU.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,S="",w="",C=null,_,b=(0,Hoe.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){Koe("Response element is not present. Unable to convert response xml to json.");let Y=MU.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)?(FU.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"&&(S='soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" ')):(FU.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" '+S+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,Uoe.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=MU.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,Moe.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)}};ji.Client=$oe});var GU=re(Ya=>{"use strict";var Goe=Ya&&Ya.__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]}),Xoe=Ya&&Ya.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Woe=Ya&&Ya.__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"&&Goe(t,e,n[s]);return Xoe(t,e),t}})();Object.defineProperty(Ya,"__esModule",{value:!0});Ya.BasicAuthSecurity=void 0;var $U=Woe(Mo()),zoe=class{static{o(this,"BasicAuthSecurity")}constructor(e,t,n){this._username=e,this._password=t,this.defaults={},$U.merge(this.defaults,n)}addHeaders(e){e.Authorization="Basic "+Buffer.from(this._username+":"+this._password||"").toString("base64")}toXML(){return""}addOptions(e){$U.merge(e,this.defaults)}};Ya.BasicAuthSecurity=zoe});var WU=re(Qa=>{"use strict";var Joe=Qa&&Qa.__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]}),Yoe=Qa&&Qa.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Qoe=Qa&&Qa.__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"&&Joe(t,e,n[s]);return Yoe(t,e),t}})();Object.defineProperty(Qa,"__esModule",{value:!0});Qa.BearerSecurity=void 0;var XU=Qoe(Mo()),Zoe=class{static{o(this,"BearerSecurity")}constructor(e,t){this._token=e,this.defaults={},XU.merge(this.defaults,t)}addHeaders(e){e.Authorization="Bearer "+this._token}toXML(){return""}addOptions(e){XU.merge(e,this.defaults)}};Qa.BearerSecurity=Zoe});var YU=re(Za=>{"use strict";var eue=Za&&Za.__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=Za&&Za.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),h_=Za&&Za.__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 tue(t,e),t}})();Object.defineProperty(Za,"__esModule",{value:!0});Za.ClientSSLSecurity=void 0;var f_=h_(Je("fs")),zU=h_(Je("https")),JU=h_(Mo()),rue=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=f_.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=f_.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=f_.readFileSync(n):(s=n,this.ca=null)),this.defaults={},JU.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,JU.merge(e,this.defaults),e.forever?(this.agent||(e.keepAlive=!0,this.agent=new zU.Agent(e)),t=this.agent):t=new zU.Agent(e),e.httpsAgent=t}};Za.ClientSSLSecurity=rue});var ZU=re(eo=>{"use strict";var nue=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]}),sue=eo&&eo.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),p_=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"&&nue(t,e,n[s]);return sue(t,e),t}})();Object.defineProperty(eo,"__esModule",{value:!0});eo.ClientSSLSecurityPFX=void 0;var iue=p_(Je("fs")),aue=p_(Je("https")),QU=p_(Mo()),oue=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=iue.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={},QU.merge(this.defaults,n)}toXML(){return""}addOptions(e){e.pfx=this.pfx,this.passphrase&&(e.passphrase=this.passphrase),QU.merge(e,this.defaults),e.httpsAgent=new aue.Agent(e)}};eo.ClientSSLSecurityPFX=oue});var e6=re(to=>{"use strict";var uue=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]}),cue=to&&to.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),lue=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"&&uue(t,e,n[s]);return cue(t,e),t}})();Object.defineProperty(to,"__esModule",{value:!0});to.NTLMSecurity=void 0;var fue=lue(Mo()),hue=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){fue.merge(e,this.defaults)}};to.NTLMSecurity=hue});var t6=re(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}),mue=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.WSSecurity=void 0;var gue=mue(Je("crypto")),d_=lc(),vue=["PasswordDigest","PasswordText"],yue=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",vue.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=gue.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,d_.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,d_.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,d_.xmlEscape)(this._username)+"</wsse:Username>"+i+(this._hasTokenCreated?"<wsu:Created>"+n+"</wsu:Created>":"")+"</wsse:UsernameToken>"+this._appendElement+"</wsse:Security>"}};ro.WSSecurity=yue});var uE=re(m_=>{"use strict";var xue=typeof m_>"u"?{}:m_;(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 S={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 ze(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,E.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 tt(!0,[])},this.reduceActions[44]=function(d){return d[1].absolute=!0,d[1]},this.reduceActions[46]=function(d){return new tt(!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"?E.commentTest:d[0]=="text"?E.textTest:d[0]=="processing-instruction"?E.anyPiTest:d[0]=="node"?E.nodeTest:new E(-1,void 0)},this.reduceActions[60]=function(d){return new E.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,E.nodeTest,[])),d[1]},this.reduceActions[64]=function(d){return d[0].steps.push(new N(N.DESCENDANTORSELF,E.nodeTest,[])),d[0].steps.push(d[2]),d[0]},this.reduceActions[65]=function(d){return new N(N.SELF,E.nodeTest,[])},this.reduceActions[66]=function(d){return new N(N.PARENT,E.nodeTest,[])},this.reduceActions[67]=function(d){return new G(d[1])},this.reduceActions[68]=function(d){return E.nameTestAny},this.reduceActions[69]=function(d){return new E.NameTestPrefixAny(d[0].split(":")[0])},this.reduceActions[70]=function(d){return new E.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 $n.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 Gn=w.productions[w.actionTableNumber[Qt].charCodeAt(it-1)-32][1],xi=[],fr=0;fr<Gn;fr++)ut.pop(),xi.unshift(jt.pop()),z.pop();var Ra=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(xi[0]):jt.push(this.reduceActions[w.actionTableNumber[Qt].charCodeAt(it-1)-32](xi)),z.push(w.gotoTable[Ra].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()+")"},ze.prototype=new B,ze.prototype.constructor=ze,ze.superclass=B.prototype;function ze(d,R){arguments.length>0&&this.init(d,R)}o(ze,"ModOperation"),ze.prototype.init=function(d,R){ze.superclass.init.call(this,d,R)},ze.prototype.evaluate=function(d){return this.lhs.evaluate(d).number().mod(this.rhs.evaluate(d).number())},ze.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 Ee(d){for(;d&&d.parentNode;)d=d.parentNode;return d}o(Ee,"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===S.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==S.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==S.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 fr=[R.contextNode.firstChild];fr.length>0;)for(var z=fr.pop();z!=null;)d.nodeTest.matches(z,R)&&le.push(z),z.firstChild!=null?(fr.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 fr=[R.contextNode.firstChild];fr.length>0;)for(var z=fr.pop();z!=null;)d.nodeTest.matches(z,R)&&le.push(z),z.firstChild!=null?(fr.push(z.nextSibling),z=z.firstChild):z=z.nextSibling;break;case N.FOLLOWING:if(R.contextNode===R.virtualRoot)break;var fr=[];R.contextNode.firstChild!=null?fr.unshift(R.contextNode.firstChild):fr.unshift(R.contextNode.nextSibling);for(var z=R.contextNode.parentNode;z!=null&&z.nodeType!=S.DOCUMENT_NODE&&z!==R.virtualRoot;z=z.parentNode)fr.unshift(z.nextSibling);do for(var z=fr.pop();z!=null;)d.nodeTest.matches(z,R)&&le.push(z),z.firstChild!=null?(fr.push(z.nextSibling),z=z.firstChild):z=z.nextSibling;while(fr.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==S.ELEMENT_NODE){Qt.xml=C.XML_NAMESPACE_URI,Qt.xmlns=C.XMLNS_NAMESPACE_URI;for(var z=R.contextNode;z!=null&&z.nodeType==S.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 Gn=Pt.substring(6,Pt.length);Qt[Gn]==null&&(Qt[Gn]=it.value)}}for(var Gn in Qt){var xi=new _r(Gn,Qt[Gn],R.contextNode);d.nodeTest.matches(xi,R)&&le.push(xi)}}break;case N.PARENT:z=null,R.contextNode!==R.virtualRoot&&(R.contextNode.nodeType==S.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 fr;R.virtualRoot!=null?fr=[R.virtualRoot]:fr=[Ee(R.contextNode)];e:for(;fr.length>0;)for(var z=fr.pop();z!=null;){if(z==R.contextNode)break e;d.nodeTest.matches(z,R)&&le.unshift(z),z.firstChild!=null?(fr.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 $r,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==S.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},tt.prototype=new Object,tt.prototype.constructor=tt,tt.superclass=Object.prototype;function tt(d,R){arguments.length>0&&this.init(d,R)}o(tt,"LocationPath"),tt.prototype.init=function(d,R){this.absolute=d,this.steps=R},tt.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"]]),E.prototype=new Object,E.prototype.constructor=E,E.superclass=Object.prototype;function E(d,R){arguments.length>0&&this.init(d,R)}o(E,"NodeTest"),E.prototype.init=function(d,R){this.type=d,this.value=R},E.prototype.toString=function(){return"<unknown nodetest type>"},E.prototype.matches=function(d,R){console.warn("unknown node test type")},E.NAMETESTANY=0,E.NAMETESTPREFIXANY=1,E.NAMETESTQNAME=2,E.COMMENT=3,E.TEXT=4,E.PI=5,E.NODE=6,E.isNodeType=function(d){return function(R){return a(d,R.nodeType)}},E.makeNodeTestType=function(d,R,X){var ae=X||function(){};return ae.prototype=new E(d),ae.prototype.constructor=ae,v(ae.prototype,R),ae},E.makeNodeTypeTest=function(d,R,X){return new(E.makeNodeTestType(d,{matches:E.isNodeType(R),toString:u(X)}))},E.hasPrefix=function(d){return d.prefix||(d.nodeName||d.tagName).indexOf(":")!==-1},E.isElementOrAttribute=E.isNodeType([1,2]),E.nameSpaceMatches=function(d,R,X){var ae=X.namespaceURI||"";if(!d)return!ae||R.allowAnyNamespaceForNoPrefix&&!E.hasPrefix(X);var le=R.namespaceResolver.getNamespace(d,R.expressionContextNode);if(le==null)throw new Error("Cannot resolve QName "+d);return le===ae},E.localNameMatches=function(d,R,X){var ae=X.localName||X.nodeName;return R.caseInsensitive?d.toLowerCase()===ae.toLowerCase():d===ae},E.NameTestPrefixAny=E.makeNodeTestType(E.NAMETESTPREFIXANY,{matches:o(function(d,R){return E.isElementOrAttribute(d)&&E.nameSpaceMatches(this.prefix,R,d)},"matches"),toString:o(function(){return this.prefix+":*"},"toString")},o(function(R){this.prefix=R},"NameTestPrefixAny")),E.NameTestQName=E.makeNodeTestType(E.NAMETESTQNAME,{matches:o(function(d,R){return E.isNodeType([S.ELEMENT_NODE,S.ATTRIBUTE_NODE,_r.XPATH_NAMESPACE_NODE])(d)&&E.nameSpaceMatches(this.prefix,R,d)&&E.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")),E.PITest=E.makeNodeTestType(E.PI,{matches:o(function(d,R){return E.isNodeType([S.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}),E.nameTestAny=E.makeNodeTypeTest(E.NAMETESTANY,[S.ELEMENT_NODE,S.ATTRIBUTE_NODE,_r.XPATH_NAMESPACE_NODE],"*"),E.textTest=E.makeNodeTypeTest(E.TEXT,[S.TEXT_NODE,S.CDATA_SECTION_NODE],"text()"),E.commentTest=E.makeNodeTypeTest(E.COMMENT,[S.COMMENT_NODE],"comment()"),E.nodeTest=E.makeNodeTypeTest(E.NODE,[S.ELEMENT_NODE,S.ATTRIBUTE_NODE,S.TEXT_NODE,S.CDATA_SECTION_NODE,S.PROCESSING_INSTRUCTION_NODE,S.COMMENT_NODE,S.DOCUMENT_NODE],"node()"),E.anyPiTest=E.makeNodeTypeTest(E.PI,[S.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 $n.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=Ds.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 Se=new Object;Se.equals=function(d,R){return d.equals(R)},Se.notequal=function(d,R){return d.notequal(R)},Se.lessthan=function(d,R){return d.lessthan(R)},Se.greaterthan=function(d,R){return d.greaterthan(R)},Se.lessthanorequal=function(d,R){return d.lessthanorequal(R)},Se.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,Se.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,Se.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,Se.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,Se.notequal):new Me(this.num!=d.num)},Ae.prototype.lessthan=function(d){return st.instance_of(d,Qe)?d.compareWithNumber(this,Se.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,Se.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,Se.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,Se.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,Se.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,Se.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),Et.prototype=new Object,Et.prototype.constructor=Et,Et.superclass=Object.prototype;function Et(d){this.init(d)}o(Et,"AVLTree"),Et.prototype.init=function(d){this.left=null,this.right=null,this.node=d,this.depth=1},Et.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()}},Et.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()},Et.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()},Et.prototype.updateInNewLocation=function(){this.getDepthFromChildren()},Et.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 zr(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 Gn=it?jt.attributes:jt.childNodes,xi=Gn.length,fr=0;fr<xi;fr+=1){var Ra=Gn[fr];if(Ra===d)return-1;if(Ra===R)return 1}throw new Error("Unexpected: could not determine node order")}o(zr,"nodeOrder"),Et.prototype.add=function(d){if(d===this.node)return!1;var R=zr(d,this.node),X=!1;return R==-1?this.left==null?(this.left=new Et(d),X=!0):(X=this.left.add(d),X&&this.balance()):R==1&&(this.right==null?(this.right=new Et(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==S.DOCUMENT_NODE||d.nodeType==S.ELEMENT_NODE||d.nodeType===S.DOCUMENT_FRAGMENT_NODE?this.stringForContainerNode(d):d.nodeType===S.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 Et(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(Se.equals),Qe.prototype.notequal=Qe.compareWith(Se.notequal),Qe.prototype.lessthan=Qe.compareWith(Se.lessthan),Qe.prototype.greaterthan=Qe.compareWith(Se.greaterthan),Qe.prototype.lessthanorequal=Qe.compareWith(Se.lessthanorequal),Qe.prototype.greaterthanorequal=Qe.compareWith(Se.greaterthanorequal),Qe.prototype.union=function(d){var R=new Qe;return R.addArray(this.toUnsortedArray()),R.addArray(d.toUnsortedArray()),R},_r.prototype=new Object,_r.prototype.constructor=_r,_r.superclass=Object.prototype;function _r(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=_r.XPATH_NAMESPACE_NODE}o(_r,"XPathNamespace"),_r.prototype.toString=function(){return'{ "'+this.prefix+'", "'+this.namespaceURI+'" }'},$r.prototype=new Object,$r.prototype.constructor=$r,$r.superclass=Object.prototype;function $r(d,R,X){this.variableResolver=d??new Cn,this.namespaceResolver=R??new vs,this.functionResolver=X??new Ds}o($r,"XPathContext"),$r.prototype.extend=function(d){return v(new $r,this,d)},Cn.prototype=new Object,Cn.prototype.constructor=Cn,Cn.superclass=Object.prototype;function Cn(){}o(Cn,"VariableResolver"),Cn.prototype.getVariable=function(d,R){return null},Ds.prototype=new Object,Ds.prototype.constructor=Ds,Ds.superclass=Object.prototype;function Ds(d){this.thisArg=d??gt,this.functions=new Object,this.addStandardFunctions()}o(Ds,"FunctionResolver"),Ds.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},Ds.prototype.addFunction=function(d,R,X){this.functions["{"+d+"}"+R]=X},Ds.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])},Ds.prototype.getFunction=function(d,R){return this.functions["{"+R+"}"+d]},vs.prototype=new Object,vs.prototype.constructor=vs,vs.superclass=Object.prototype;function vs(){}o(vs,"NamespaceResolver"),vs.prototype.getNamespace=function(d,R){if(d=="xml")return C.XML_NAMESPACE_URI;if(d=="xmlns")return C.XMLNS_NAMESPACE_URI;for(R.nodeType==S.DOCUMENT_NODE?R=R.documentElement:R.nodeType==S.ATTRIBUTE_NODE?R=Z.getOwnerElement(R):R.nodeType!=S.ELEMENT_NODE&&(R=R.parentNode);R!=null&&R.nodeType==S.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==S.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==S.ELEMENT_NODE?new Ce(R.nodeName):R.nodeType==S.ATTRIBUTE_NODE?new Ce(R.name||R.nodeName):R.nodeType===S.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,Gn){return Pt in it||(it[Pt]=Gn>ut.length?"":ut[Gn]),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!=S.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===S.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==S.TEXT_NODE||R.nodeType==S.CDATA_SECTION_NODE){var X=R.nodeValue,ae=R;for(R=R.nextSibling;R!=null&&(R.nodeType==S.TEXT_NODE||R.nodeType==S.CDATA_SECTION_NODE);){X+=R.nodeValue;var le=R;R=R.nextSibling,le.parentNode.removeChild(le)}if(ae.nodeType==S.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==S.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==S.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 $n=(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})();ys.prototype={},ys.prototype.constructor=ys,ys.superclass=Object.prototype;function ys(d,R,X){this.xpath=X.parse(d),this.context=new $r,this.context.namespaceResolver=new Da(R)}o(ys,"XPathExpression"),ys.getOwnerDocument=function(d){return d.nodeType===S.DOCUMENT_NODE?d:d.ownerDocument},ys.detectHtmlDom=function(d){if(!d)return!1;var R=ys.getOwnerDocument(d);try{return R.implementation.hasFeature("HTML","2.0")}catch{return!0}},ys.prototype.evaluate=function(d,R,X){this.context.expressionContextNode=d,this.context.caseInsensitive=ys.detectHtmlDom(d);var ae=this.xpath.evaluate(this.context);return new Lt(ae,R)},Da.prototype={},Da.prototype.constructor=Da,Da.superclass=Object.prototype;function Da(d){this.xpathNSResolver=d}o(Da,"XPathNSResolverWrapper"),Da.prototype.getNamespace=function(d,R){return this.xpathNSResolver==null?null:this.xpathNSResolver.lookupNamespaceURI(d)},Ba.prototype={},Ba.prototype.constructor=Ba,Ba.superclass=Object.prototype;function Ba(d){this.node=d,this.namespaceResolver=new vs}o(Ba,"NodeXPathNSResolver"),Ba.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 $n($n.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 $n($n.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 $n($n.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 ip(d,R){d.createExpression=function(X,ae){try{return new ys(X,ae,R)}catch(le){throw new $n($n.INVALID_EXPRESSION_ERR,le)}},d.createNSResolver=function(X){return new Ba(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(ip,"installDOM3XPathSupport");try{var ap=!0;try{document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)&&(ap=!1)}catch{}ap&&ip(document,new w)}catch{}ip(r,new w),(function(){var d=new w,R=new vs,X=new Ds,ae=new Cn;function le(Ge){return{getNamespace:o(function(sr,as){var ea=Ge(sr,as);return ea||R.getNamespace(sr,as)},"getNamespace")}}o(le,"makeNSResolverFromFunction");function z(Ge){return le(Ge.getNamespace.bind(Ge))}o(z,"makeNSResolverFromObject");function ut(Ge){return le(function(sr){return Ge[sr]})}o(ut,"makeNSResolverFromMap");function jt(Ge){return Ge&&typeof Ge.getNamespace=="function"?z(Ge):typeof Ge=="function"?le(Ge):typeof Ge=="object"?ut(Ge):R}o(jt,"makeNSResolver");function Qt(Ge){if(Ge===null||typeof Ge>"u"||Ge instanceof Ce||Ge instanceof Me||Ge instanceof Ae||Ge instanceof Qe)return Ge;switch(typeof Ge){case"string":return new Ce(Ge);case"boolean":return new Me(Ge);case"number":return new Ae(Ge)}var sr=new Qe;return sr.addArray([].concat(Ge)),sr}o(Qt,"convertValue");function it(Ge){return function(sr){var as=Array.prototype.slice.call(arguments,1).map(function(w2){return w2.evaluate(sr)}),ea=Ge.apply(this,[].concat(sr,as));return Qt(ea)}}o(it,"makeEvaluator");function Pt(Ge){return{getFunction:o(function(sr,as){var ea=Ge(sr,as);return ea?it(ea):X.getFunction(sr,as)},"getFunction")}}o(Pt,"makeFunctionResolverFromFunction");function Gn(Ge){return Pt(Ge.getFunction.bind(Ge))}o(Gn,"makeFunctionResolverFromObject");function xi(Ge){return Pt(function(sr){return Ge[sr]})}o(xi,"makeFunctionResolverFromMap");function fr(Ge){return Ge&&typeof Ge.getFunction=="function"?Gn(Ge):typeof Ge=="function"?Pt(Ge):typeof Ge=="object"?xi(Ge):X}o(fr,"makeFunctionResolver");function Ra(Ge){return{getVariable:o(function(sr,as){var ea=Ge(sr,as);return Qt(ea)},"getVariable")}}o(Ra,"makeVariableResolverFromFunction");function rg(Ge){if(Ge){if(typeof Ge.getVariable=="function")return Ra(Ge.getVariable.bind(Ge));if(typeof Ge=="function")return Ra(Ge);if(typeof Ge=="object")return Ra(function(sr){return Ge[sr]})}return ae}o(rg,"makeVariableResolver");function zx(Ge,sr,as){Ge in as&&(sr[Ge]=as[Ge])}o(zx,"copyIfPresent");function g2(Ge){var sr=new $r;return Ge?(sr.namespaceResolver=jt(Ge.namespaces),sr.functionResolver=fr(Ge.functions),sr.variableResolver=rg(Ge.variables),sr.expressionContextNode=Ge.node,zx("allowAnyNamespaceForNoPrefix",sr,Ge),zx("isHtml",sr,Ge)):sr.namespaceResolver=R,sr}o(g2,"makeContext");function v2(Ge,sr){var as=g2(sr);return Ge.evaluate(as)}o(v2,"evaluate");var y2={evaluate:o(function(Ge){return v2(this.expression,Ge)},"evaluate"),evaluateNumber:o(function(Ge){return this.evaluate(Ge).numberValue()},"evaluateNumber"),evaluateString:o(function(Ge){return this.evaluate(Ge).stringValue()},"evaluateString"),evaluateBoolean:o(function(Ge){return this.evaluate(Ge).booleanValue()},"evaluateBoolean"),evaluateNodeSet:o(function(Ge){return this.evaluate(Ge).nodeset()},"evaluateNodeSet"),select:o(function(Ge){return this.evaluateNodeSet(Ge).toArray()},"select"),select1:o(function(Ge){return this.select(Ge)[0]},"select1")};function x2(Ge){var sr=d.parse(Ge);return Object.create(y2,{expression:{value:sr}})}o(x2,"parse"),r.parse=x2})(),v(r,{XPath:C,XPathParser:w,XPathResult:Lt,Step:N,PathExpr:Z,NodeTest:E,LocationPath:tt,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:ze,UnaryMinusOperation:T,FunctionCall:P,VariableReference:G,XPathContext:$r,XNodeSet:Qe,XBoolean:Me,XString:Ce,XNumber:Ae,NamespaceResolver:vs,FunctionResolver:Ds,VariableResolver:Cn,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 ys(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 Ol=o(function(d){return d&&typeof d.nodeType=="number"&&Number.isInteger(d.nodeType)&&d.nodeType>=1&&d.nodeType<=11&&typeof d.nodeName=="string"},"isNodeLike"),tg=o(function(d){return Array.isArray(d)&&d.every(Ol)},"isArrayOfNodes"),ti=o(function(d){return function(R){return Ol(R)&&R.nodeType===d}},"isNodeOfType");v(r,{isNodeLike:Ol,isArrayOfNodes:tg,isElement:ti(S.ELEMENT_NODE),isAttribute:ti(S.ATTRIBUTE_NODE),isTextNode:ti(S.TEXT_NODE),isCDATASection:ti(S.CDATA_SECTION_NODE),isProcessingInstruction:ti(S.PROCESSING_INSTRUCTION_NODE),isComment:ti(S.COMMENT_NODE),isDocumentNode:ti(S.DOCUMENT_NODE),isDocumentTypeNode:ti(S.DOCUMENT_TYPE_NODE),isDocumentFragment:ti(S.DOCUMENT_FRAGMENT_NODE)})})(xue)});var nd=re(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 cn;(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"})(cn||(Rt.NodeTypes=cn={}));function cE(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(cE,"isNodeLike");Rt.isNodeLike=cE;function wue(r){if(!cE(r))throw new Error(`Value is not a Node-like object. Received: ${r}`)}o(wue,"assertIsNodeLike");Rt.assertIsNodeLike=wue;function r6(r){return Array.isArray(r)&&r.every(cE)}o(r6,"isArrayOfNodes");Rt.isArrayOfNodes=r6;function Sue(r){if(!r6(r))throw new Error("Value is not an array of Nodes")}o(Sue,"assertIsArrayOfNodes");Rt.assertIsArrayOfNodes=Sue;function no(r,e){return cE(e)&&e.nodeType===r}o(no,"isNodeOfType");function qo(r,e){let t=Object.keys(cn).find(n=>cn[n]===r);if(!no(r,e))throw new Error(`Value is not of type ${t}`)}o(qo,"assertIsNodeOfType");var Eue=o(r=>no(cn.ELEMENT_NODE,r),"isElementNode");Rt.isElementNode=Eue;var bue=o(r=>no(cn.ATTRIBUTE_NODE,r),"isAttributeNode");Rt.isAttributeNode=bue;var Aue=o(r=>no(cn.TEXT_NODE,r),"isTextNode");Rt.isTextNode=Aue;var Cue=o(r=>no(cn.CDATA_SECTION_NODE,r),"isCDATASectionNode");Rt.isCDATASectionNode=Cue;var Nue=o(r=>no(cn.PROCESSING_INSTRUCTION_NODE,r),"isProcessingInstructionNode");Rt.isProcessingInstructionNode=Nue;var Tue=o(r=>no(cn.COMMENT_NODE,r),"isCommentNode");Rt.isCommentNode=Tue;var Iue=o(r=>no(cn.DOCUMENT_NODE,r),"isDocumentNode");Rt.isDocumentNode=Iue;var _ue=o(r=>no(cn.DOCUMENT_TYPE_NODE,r),"isDocumentTypeNode");Rt.isDocumentTypeNode=_ue;var Due=o(r=>no(cn.DOCUMENT_FRAGMENT_NODE,r),"isDocumentFragmentNode");Rt.isDocumentFragmentNode=Due;var Bue=o(r=>{qo(cn.ELEMENT_NODE,r)},"assertIsElementNode");Rt.assertIsElementNode=Bue;var Rue=o(r=>qo(cn.ATTRIBUTE_NODE,r),"assertIsAttributeNode");Rt.assertIsAttributeNode=Rue;var Oue=o(r=>qo(cn.TEXT_NODE,r),"assertIsTextNode");Rt.assertIsTextNode=Oue;var Pue=o(r=>qo(cn.CDATA_SECTION_NODE,r),"assertIsCDATASectionNode");Rt.assertIsCDATASectionNode=Pue;var kue=o(r=>qo(cn.PROCESSING_INSTRUCTION_NODE,r),"assertIsProcessingInstructionNode");Rt.assertIsProcessingInstructionNode=kue;var Lue=o(r=>qo(cn.COMMENT_NODE,r),"assertIsCommentNode");Rt.assertIsCommentNode=Lue;var Vue=o(r=>qo(cn.DOCUMENT_NODE,r),"assertIsDocumentNode");Rt.assertIsDocumentNode=Vue;var Uue=o(r=>qo(cn.DOCUMENT_TYPE_NODE,r),"assertIsDocumentTypeNode");Rt.assertIsDocumentTypeNode=Uue;var jue=o(r=>qo(cn.DOCUMENT_FRAGMENT_NODE,r),"assertIsDocumentFragmentNode");Rt.assertIsDocumentFragmentNode=jue});var ev=re(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.validateDigestValue=dr.findAncestorNs=dr.derToPem=dr.pemToDer=dr.normalizePem=dr.BASE64_REGEX=dr.EXTRACT_X509_CERTS=dr.PEM_FORMAT_REGEX=dr.encodeSpecialCharactersInText=dr.encodeSpecialCharactersInAttribute=dr.findChilds=dr.findChildren=dr.findAttr=dr.isArrayHasLength=void 0;var Fue=uE(),v_=nd();function n6(r){return Array.isArray(r)&&r.length>0}o(n6,"isArrayHasLength");dr.isArrayHasLength=n6;function Mue(r,e,t){return r.localName===e&&(r.namespaceURI===t||t==null)}o(Mue,"attrEqualsExplicitly");function que(r,e,t,n){return r.localName===e&&(!r.namespaceURI&&n?.namespaceURI===t||t==null)}o(que,"attrEqualsImplicitly");function Hue(r,e,t){for(let n=0;n<r.attributes.length;n++){let s=r.attributes[n];if(Mue(s,e,t)||que(s,e,t,r))return s}return null}o(Hue,"findAttr");dr.findAttr=Hue;function s6(r,e,t){let n=r.documentElement??r,s=[];for(let i=0;i<n.childNodes.length;i++){let a=n.childNodes[i];v_.isElementNode(a)&&a.localName===e&&(a.namespaceURI===t||t==null)&&s.push(a)}return s}o(s6,"findChildren");dr.findChildren=s6;function Kue(r,e,t){return s6(r,e,t)}o(Kue,"findChilds");dr.findChilds=Kue;var $ue={"&":"&","<":"<",'"':""","\r":"
","\n":"
"," ":"	"},Gue={"&":"&","<":"<",">":">","\r":"
"};function Xue(r){return r.replace(/([&<"\r\n\t])/g,function(e,t){return $ue[t]})}o(Xue,"encodeSpecialCharactersInAttribute");dr.encodeSpecialCharactersInAttribute=Xue;function Wue(r){return r.replace(/([&<>\r])/g,function(e,t){return Gue[t]})}o(Wue,"encodeSpecialCharactersInText");dr.encodeSpecialCharactersInText=Wue;dr.PEM_FORMAT_REGEX=new RegExp("^-----BEGIN [A-Z ]{1,48}-----([^-]*)-----END [A-Z ]{1,48}-----$","s");dr.EXTRACT_X509_CERTS=new RegExp("-----BEGIN CERTIFICATE-----[^-]*-----END CERTIFICATE-----","g");dr.BASE64_REGEX=new RegExp("^(?:[A-Za-z0-9\\+\\/]{4}\\n{0,1})*(?:[A-Za-z0-9\\+\\/]{2}==|[A-Za-z0-9\\+\\/]{3}=)?$","s");function g_(r){return`${(r.trim().replace(/(\r\n|\r)/g,`
|
|
61
|
+
`).match(/.{1,64}/g)??[]).join(`
|
|
62
|
+
`)}
|
|
63
|
+
`}o(g_,"normalizePem");dr.normalizePem=g_;function zue(r){if(!dr.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(zue,"pemToDer");dr.pemToDer=zue;function Jue(r,e){let t=Buffer.isBuffer(r)?r.toString("base64").trim():r.replace(/(\r\n|\r)/g,"").trim();if(dr.PEM_FORMAT_REGEX.test(t))return g_(t);if(dr.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 g_(n)}throw new Error("Unknown DER format.")}o(Jue,"derToPem");dr.derToPem=Jue;function i6(r,e=[]){if(!v_.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 i6(t,e)}o(i6,"collectAncestorNamespaces");function Yue(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(Yue,"findNSPrefix");function Que(r){return r.every(e=>v_.isElementNode(e))}o(Que,"isElementSubset");function Zue(r,e,t){if(e==null)return[];let n=Fue.selectWithResolver(e,r,t);if(!n6(n))return[];if(!Que(n))throw new Error("Document subset must be list of elements");let s=i6(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=Yue(n[0]);for(let c of i)c.prefix!==u&&a.push(c);return a}o(Zue,"findAncestorNs");dr.findAncestorNs=Zue;function ece(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(ece,"validateDigestValue");dr.validateDigestValue=ece});var x_=re(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});sd.C14nCanonicalizationWithComments=sd.C14nCanonicalization=void 0;var lE=ev(),y_=nd(),a6=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(y_.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}="${lE.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(lE.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(y_.isCommentNode(e))return this.renderComment(e);if(e.data)return lE.encodeSpecialCharactersInText(e.data);if(y_.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=lE.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"}};sd.C14nCanonicalization=a6;var tce=class extends a6{static{o(this,"C14nCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"}};sd.C14nCanonicalizationWithComments=tce});var E_=re(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.ExclusiveCanonicalizationWithComments=id.ExclusiveCanonicalization=void 0;var cf=ev(),w_=nd();function S_(r,e,t){let n=!1;return r.forEach(function(s){s.prefix===e&&s.namespaceURI===t&&(n=!0)}),n}o(S_,"isPrefixInScope");var o6=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(w_.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,'="',cf.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?S_(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&&!S_(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&&!S_(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(w_.isCommentNode(e))return this.renderComment(e);if(e.data)return cf.encodeSpecialCharactersInText(e.data);if(w_.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=cf.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(!cf.isArrayHasLength(n)){let c=cf.findChildren(e,"CanonicalizationMethod");if(c.length!==0){let l=cf.findChildren(c[0],"InclusiveNamespaces");l.length!==0&&(n=(l[0].getAttribute("PrefixList")||"").split(" "))}}return cf.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#"}};id.ExclusiveCanonicalization=o6;var rce=class extends o6{static{o(this,"ExclusiveCanonicalizationWithComments")}constructor(){super(),this.includeComments=!0}getAlgorithmName(){return"http://www.w3.org/2001/10/xml-exc-c14n#WithComments"}};id.ExclusiveCanonicalizationWithComments=rce});var tv=re(ad=>{"use strict";function nce(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(nce,"find");function b_(r,e){return e===void 0&&(e=Object),e&&typeof e.freeze=="function"?e.freeze(r):r}o(b_,"freeze");function sce(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(sce,"assign");var u6=b_({HTML:"text/html",isHTML:o(function(r){return r===u6.HTML},"isHTML"),XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),c6=b_({HTML:"http://www.w3.org/1999/xhtml",isHTML:o(function(r){return r===c6.HTML},"isHTML"),SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});ad.assign=sce;ad.find=nce;ad.freeze=b_;ad.MIME_TYPE=u6;ad.NAMESPACE=c6});var P_=re(fc=>{"use strict";var v6=tv(),so=v6.find,rv=v6.NAMESPACE;function ice(r){return r!==""}o(ice,"notEmptyString");function ace(r){return r?r.split(/[\t\n\f\r ]+/).filter(ice):[]}o(ace,"splitOnASCIIWhitespace");function oce(r,e){return r.hasOwnProperty(e)||(r[e]=!0),r}o(oce,"orderedSetReducer");function l6(r){if(!r)return[];var e=ace(r);return Object.keys(e.reduce(oce,{}))}o(l6,"toOrderedSet");function uce(r){return function(e){return r&&r.indexOf(e)!==-1}}o(uce,"arrayIncludes");function iv(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(iv,"copy");function Ks(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,iv(t,s),r.prototype=t=s}t.constructor!=r&&(typeof r!="function"&&console.error("unknown Class:"+r),t.constructor=r)}o(Ks,"_extends");var $s={},Fi=$s.ELEMENT_NODE=1,ud=$s.ATTRIBUTE_NODE=2,fE=$s.TEXT_NODE=3,y6=$s.CDATA_SECTION_NODE=4,x6=$s.ENTITY_REFERENCE_NODE=5,cce=$s.ENTITY_NODE=6,w6=$s.PROCESSING_INSTRUCTION_NODE=7,S6=$s.COMMENT_NODE=8,E6=$s.DOCUMENT_NODE=9,b6=$s.DOCUMENT_TYPE_NODE=10,Ko=$s.DOCUMENT_FRAGMENT_NODE=11,lce=$s.NOTATION_NODE=12,ls={},Mn={},zwe=ls.INDEX_SIZE_ERR=(Mn[1]="Index size error",1),Jwe=ls.DOMSTRING_SIZE_ERR=(Mn[2]="DOMString size error",2),Hs=ls.HIERARCHY_REQUEST_ERR=(Mn[3]="Hierarchy request error",3),Ywe=ls.WRONG_DOCUMENT_ERR=(Mn[4]="Wrong document",4),Qwe=ls.INVALID_CHARACTER_ERR=(Mn[5]="Invalid character",5),Zwe=ls.NO_DATA_ALLOWED_ERR=(Mn[6]="No data allowed",6),eSe=ls.NO_MODIFICATION_ALLOWED_ERR=(Mn[7]="No modification allowed",7),A6=ls.NOT_FOUND_ERR=(Mn[8]="Not found",8),tSe=ls.NOT_SUPPORTED_ERR=(Mn[9]="Not supported",9),f6=ls.INUSE_ATTRIBUTE_ERR=(Mn[10]="Attribute in use",10),rSe=ls.INVALID_STATE_ERR=(Mn[11]="Invalid state",11),nSe=ls.SYNTAX_ERR=(Mn[12]="Syntax error",12),sSe=ls.INVALID_MODIFICATION_ERR=(Mn[13]="Invalid modification",13),iSe=ls.NAMESPACE_ERR=(Mn[14]="Invalid namespace",14),aSe=ls.INVALID_ACCESS_ERR=(Mn[15]="Invalid access",15);function mn(r,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,Mn[r]),this.message=Mn[r],Error.captureStackTrace&&Error.captureStackTrace(this,mn);return t.code=r,e&&(this.message=this.message+": "+e),t}o(mn,"DOMException");mn.prototype=Error.prototype;iv(ls,mn);function Ho(){}o(Ho,"NodeList");Ho.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++)od(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 cd(r,e){this._node=r,this._refresh=e,N_(this)}o(cd,"LiveNodeList");function N_(r){var e=r._node._inc||r._node.ownerDocument._inc;if(r._inc!==e){var t=r._refresh(r._node);if(L6(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];iv(t,r),r._inc=e}}o(N_,"_updateLiveList");cd.prototype.item=function(r){return N_(this),this[r]||null};Ks(cd,Ho);function hE(){}o(hE,"NamedNodeMap");function C6(r,e){for(var t=r.length;t--;)if(r[t]===e)return t}o(C6,"_findNodeIndex");function h6(r,e,t,n){if(n?e[C6(e,n)]=t:e[e.length++]=t,r){t.ownerElement=r;var s=r.ownerDocument;s&&(n&&I6(s,r,n),fce(s,r,t))}}o(h6,"_addNamedNode");function p6(r,e,t){var n=C6(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&&(I6(i,r,t),t.ownerElement=null)}}else throw new mn(A6,new Error(r.tagName+"@"+t))}o(p6,"_removeNamedNode");hE.prototype={length:0,item:Ho.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 mn(f6);var t=this.getNamedItem(r.nodeName);return h6(this._ownerElement,this,r,t),t},"setNamedItem"),setNamedItemNS:o(function(r){var e=r.ownerElement,t;if(e&&e!=this._ownerElement)throw new mn(f6);return t=this.getNamedItemNS(r.namespaceURI,r.localName),h6(this._ownerElement,this,r,t),t},"setNamedItemNS"),removeNamedItem:o(function(r){var e=this.getNamedItem(r);return p6(this._ownerElement,this,e),e},"removeNamedItem"),removeNamedItemNS:o(function(r,e){var t=this.getNamedItemNS(r,e);return p6(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 N6(){}o(N6,"DOMImplementation");N6.prototype={hasFeature:o(function(r,e){return!0},"hasFeature"),createDocument:o(function(r,e,t){var n=new av;if(n.implementation=this,n.childNodes=new Ho,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 mE;return n.name=r,n.nodeName=r,n.publicId=e||"",n.systemId=t||"",n},"createDocumentType")};function Nr(){}o(Nr,"Node");Nr.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 pE(this,r,e)},"insertBefore"),replaceChild:o(function(r,e){pE(this,r,e,D6),e&&this.removeChild(e)},"replaceChild"),removeChild:o(function(r){return _6(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 C_(this.ownerDocument||this,this,r)},"cloneNode"),normalize:o(function(){for(var r=this.firstChild;r;){var e=r.nextSibling;e&&e.nodeType==fE&&r.nodeType==fE?(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==ud?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==ud?e.ownerDocument:e.parentNode}return null},"lookupNamespaceURI"),isDefaultNamespace:o(function(r){var e=this.lookupPrefix(r);return e==null},"isDefaultNamespace")};function T6(r){return r=="<"&&"<"||r==">"&&">"||r=="&"&&"&"||r=='"'&&"""||"&#"+r.charCodeAt()+";"}o(T6,"_xmlEncoder");iv($s,Nr);iv($s,Nr.prototype);function nv(r,e){if(e(r))return!0;if(r=r.firstChild)do if(nv(r,e))return!0;while(r=r.nextSibling)}o(nv,"_visitNode");function av(){this.ownerDocument=this}o(av,"Document");function fce(r,e,t){r&&r._inc++;var n=t.namespaceURI;n===rv.XMLNS&&(e._nsMap[t.prefix?t.localName:""]=t.value)}o(fce,"_onAddAttribute");function I6(r,e,t,n){r&&r._inc++;var s=t.namespaceURI;s===rv.XMLNS&&delete e._nsMap[t.prefix?t.localName:""]}o(I6,"_onRemoveAttribute");function T_(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(T_,"_onUpdateChild");function _6(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,T_(r.ownerDocument,r),e}o(_6,"_removeChild");function hce(r){return r&&(r.nodeType===Nr.DOCUMENT_NODE||r.nodeType===Nr.DOCUMENT_FRAGMENT_NODE||r.nodeType===Nr.ELEMENT_NODE)}o(hce,"hasValidParentNodeType");function pce(r){return r&&(io(r)||I_(r)||$o(r)||r.nodeType===Nr.DOCUMENT_FRAGMENT_NODE||r.nodeType===Nr.COMMENT_NODE||r.nodeType===Nr.PROCESSING_INSTRUCTION_NODE)}o(pce,"hasInsertableNodeType");function $o(r){return r&&r.nodeType===Nr.DOCUMENT_TYPE_NODE}o($o,"isDocTypeNode");function io(r){return r&&r.nodeType===Nr.ELEMENT_NODE}o(io,"isElementNode");function I_(r){return r&&r.nodeType===Nr.TEXT_NODE}o(I_,"isTextNode");function d6(r,e){var t=r.childNodes||[];if(so(t,io)||$o(e))return!1;var n=so(t,$o);return!(e&&n&&t.indexOf(n)>t.indexOf(e))}o(d6,"isElementInsertionPossible");function m6(r,e){var t=r.childNodes||[];function n(i){return io(i)&&i!==e}if(o(n,"hasElementChildThatIsNotChild"),so(t,n))return!1;var s=so(t,$o);return!(e&&s&&t.indexOf(s)>t.indexOf(e))}o(m6,"isElementReplacementPossible");function dce(r,e,t){if(!hce(r))throw new mn(Hs,"Unexpected parent node type "+r.nodeType);if(t&&t.parentNode!==r)throw new mn(A6,"child not in parent");if(!pce(e)||$o(e)&&r.nodeType!==Nr.DOCUMENT_NODE)throw new mn(Hs,"Unexpected node type "+e.nodeType+" for parent node type "+r.nodeType)}o(dce,"assertPreInsertionValidity1to5");function mce(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===Nr.DOCUMENT_FRAGMENT_NODE){var i=s.filter(io);if(i.length>1||so(s,I_))throw new mn(Hs,"More than one element or text in fragment");if(i.length===1&&!d6(r,t))throw new mn(Hs,"Element in fragment can not be inserted before doctype")}if(io(e)&&!d6(r,t))throw new mn(Hs,"Only one element can be added and only after doctype");if($o(e)){if(so(n,$o))throw new mn(Hs,"Only one doctype is allowed");var a=so(n,io);if(t&&n.indexOf(a)<n.indexOf(t))throw new mn(Hs,"Doctype can only be inserted before an element");if(!t&&a)throw new mn(Hs,"Doctype can not be appended since element is present")}}o(mce,"assertPreInsertionValidityInDocument");function D6(r,e,t){var n=r.childNodes||[],s=e.childNodes||[];if(e.nodeType===Nr.DOCUMENT_FRAGMENT_NODE){var i=s.filter(io);if(i.length>1||so(s,I_))throw new mn(Hs,"More than one element or text in fragment");if(i.length===1&&!m6(r,t))throw new mn(Hs,"Element in fragment can not be inserted before doctype")}if(io(e)&&!m6(r,t))throw new mn(Hs,"Only one element can be added and only after doctype");if($o(e)){let c=function(l){return $o(l)&&l!==t};var u=c;if(o(c,"hasDoctypeChildThatIsNotChild"),so(n,c))throw new mn(Hs,"Only one doctype is allowed");var a=so(n,io);if(t&&n.indexOf(a)<n.indexOf(t))throw new mn(Hs,"Doctype can only be inserted before an element")}}o(D6,"assertPreReplacementValidityInDocument");function pE(r,e,t,n){dce(r,e,t),r.nodeType===Nr.DOCUMENT_NODE&&(n||mce)(r,e,t);var s=e.parentNode;if(s&&s.removeChild(e),e.nodeType===Ko){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;sv(i,c)}while(i!==a&&(i=i.nextSibling));return T_(r.ownerDocument||r,r),e.nodeType==Ko&&(e.firstChild=e.lastChild=null),e}o(pE,"_insertBefore");function sv(r,e){if(r.ownerDocument!==e){if(r.ownerDocument=e,r.nodeType===Fi&&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;)sv(s,e),s=s.nextSibling}}o(sv,"_updateOwnerDocument");function gce(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,T_(r.ownerDocument,r,e);var t=r.ownerDocument||r;return sv(e,t),e}o(gce,"_appendSingleChild");av.prototype={nodeName:"#document",nodeType:E6,doctype:null,documentElement:null,_inc:1,insertBefore:o(function(r,e){if(r.nodeType==Ko){for(var t=r.firstChild;t;){var n=t.nextSibling;this.insertBefore(t,e),t=n}return r}return pE(this,r,e),sv(r,this),this.documentElement===null&&r.nodeType===Fi&&(this.documentElement=r),r},"insertBefore"),removeChild:o(function(r){return this.documentElement==r&&(this.documentElement=null),_6(this,r)},"removeChild"),replaceChild:o(function(r,e){pE(this,r,e,D6),sv(r,this),e&&this.removeChild(e),io(r)&&(this.documentElement=r)},"replaceChild"),importNode:o(function(r,e){return k6(this,r,e)},"importNode"),getElementById:o(function(r){var e=null;return nv(this.documentElement,function(t){if(t.nodeType==Fi&&t.getAttribute("id")==r)return e=t,!0}),e},"getElementById"),getElementsByClassName:o(function(r){var e=l6(r);return new cd(this,function(t){var n=[];return e.length>0&&nv(t.documentElement,function(s){if(s!==t&&s.nodeType===Fi){var i=s.getAttribute("class");if(i){var a=r===i;if(!a){var u=l6(i);a=e.every(uce(u))}a&&n.push(s)}}}),n})},"getElementsByClassName"),createElement:o(function(r){var e=new lf;e.ownerDocument=this,e.nodeName=r,e.tagName=r,e.localName=r,e.childNodes=new Ho;var t=e.attributes=new hE;return t._ownerElement=e,e},"createElement"),createDocumentFragment:o(function(){var r=new gE;return r.ownerDocument=this,r.childNodes=new Ho,r},"createDocumentFragment"),createTextNode:o(function(r){var e=new __;return e.ownerDocument=this,e.appendData(r),e},"createTextNode"),createComment:o(function(r){var e=new D_;return e.ownerDocument=this,e.appendData(r),e},"createComment"),createCDATASection:o(function(r){var e=new B_;return e.ownerDocument=this,e.appendData(r),e},"createCDATASection"),createProcessingInstruction:o(function(r,e){var t=new O_;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 dE;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 R_;return e.ownerDocument=this,e.nodeName=r,e},"createEntityReference"),createElementNS:o(function(r,e){var t=new lf,n=e.split(":"),s=t.attributes=new hE;return t.childNodes=new Ho,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 dE,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")};Ks(av,Nr);function lf(){this._nsMap={}}o(lf,"Element");lf.prototype={nodeType:Fi,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===Ko?this.insertBefore(r,null):gce(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 cd(this,function(e){var t=[];return nv(e,function(n){n!==e&&n.nodeType==Fi&&(r==="*"||n.tagName==r)&&t.push(n)}),t})},"getElementsByTagName"),getElementsByTagNameNS:o(function(r,e){return new cd(this,function(t){var n=[];return nv(t,function(s){s!==t&&s.nodeType===Fi&&(r==="*"||s.namespaceURI===r)&&(e==="*"||s.localName==e)&&n.push(s)}),n})},"getElementsByTagNameNS")};av.prototype.getElementsByTagName=lf.prototype.getElementsByTagName;av.prototype.getElementsByTagNameNS=lf.prototype.getElementsByTagNameNS;Ks(lf,Nr);function dE(){}o(dE,"Attr");dE.prototype.nodeType=ud;Ks(dE,Nr);function ov(){}o(ov,"CharacterData");ov.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(Mn[Hs])},"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")};Ks(ov,Nr);function __(){}o(__,"Text");__.prototype={nodeName:"#text",nodeType:fE,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")};Ks(__,ov);function D_(){}o(D_,"Comment");D_.prototype={nodeName:"#comment",nodeType:S6};Ks(D_,ov);function B_(){}o(B_,"CDATASection");B_.prototype={nodeName:"#cdata-section",nodeType:y6};Ks(B_,ov);function mE(){}o(mE,"DocumentType");mE.prototype.nodeType=b6;Ks(mE,Nr);function B6(){}o(B6,"Notation");B6.prototype.nodeType=lce;Ks(B6,Nr);function R6(){}o(R6,"Entity");R6.prototype.nodeType=cce;Ks(R6,Nr);function R_(){}o(R_,"EntityReference");R_.prototype.nodeType=x6;Ks(R_,Nr);function gE(){}o(gE,"DocumentFragment");gE.prototype.nodeName="#document-fragment";gE.prototype.nodeType=Ko;Ks(gE,Nr);function O_(){}o(O_,"ProcessingInstruction");O_.prototype.nodeType=w6;Ks(O_,Nr);function O6(){}o(O6,"XMLSerializer");O6.prototype.serializeToString=function(r,e,t){return P6.call(r,e,t)};Nr.prototype.toString=P6;function P6(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 od(this,t,r,e,a),t.join("")}o(P6,"nodeSerializeToString");function g6(r,e,t){var n=r.prefix||"",s=r.namespaceURI;if(!s||n==="xml"&&s===rv.XML||s===rv.XMLNS)return!1;for(var i=t.length;i--;){var a=t[i];if(a.prefix===n)return a.namespace!==s}return!0}o(g6,"needNamespaceDefine");function A_(r,e,t){r.push(" ",e,'="',t.replace(/[<>&"\t\n\r]/g,T6),'"')}o(A_,"addSerializedAttribute");function od(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 Fi:var i=r.attributes,a=i.length,C=r.firstChild,u=r.tagName;t=rv.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(g6(v,t,s)){var S=v.prefix||"",w=v.namespaceURI;A_(e,S?"xmlns:"+S:"xmlns",w),s.push({prefix:S,namespace:w})}od(v,e,t,n,s)}if(u===c&&g6(r,t,s)){var S=r.prefix||"",w=r.namespaceURI;A_(e,S?"xmlns:"+S:"xmlns",w),s.push({prefix:S,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):od(C,e,t,n,s.slice()),C=C.nextSibling;else for(;C;)od(C,e,t,n,s.slice()),C=C.nextSibling;e.push("</",c,">")}else e.push("/>");return;case E6:case Ko:for(var C=r.firstChild;C;)od(C,e,t,n,s.slice()),C=C.nextSibling;return;case ud:return A_(e,r.name,r.value);case fE:return e.push(r.data.replace(/[<&>]/g,T6));case y6:return e.push("<![CDATA[",r.data,"]]>");case S6: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 w6:return e.push("<?",r.target," ",r.data,"?>");case x6:return e.push("&",r.nodeName,";");default:e.push("??",r.nodeName)}}o(od,"serializeToString");function k6(r,e,t){var n;switch(e.nodeType){case Fi:n=e.cloneNode(!1),n.ownerDocument=r;case Ko:break;case ud:t=!0;break}if(n||(n=e.cloneNode(!1)),n.ownerDocument=r,n.parentNode=null,t)for(var s=e.firstChild;s;)n.appendChild(k6(r,s,t)),s=s.nextSibling;return n}o(k6,"importNode");function C_(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 Ho),n.ownerDocument=r,n.nodeType){case Fi:var a=e.attributes,u=n.attributes=new hE,c=a.length;u._ownerElement=n;for(var l=0;l<c;l++)n.setAttributeNode(C_(r,a.item(l),!0));break;case ud:t=!0}if(t)for(var h=e.firstChild;h;)n.appendChild(C_(r,h,t)),h=h.nextSibling;return n}o(C_,"cloneNode");function L6(r,e,t){r[e]=t}o(L6,"__set__");try{if(Object.defineProperty){let r=function(e){switch(e.nodeType){case Fi:case Ko: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}};vce=r,o(r,"getTextContent"),Object.defineProperty(cd.prototype,"length",{get:o(function(){return N_(this),this.$$length},"get")}),Object.defineProperty(Nr.prototype,"textContent",{get:o(function(){return r(this)},"get"),set:o(function(e){switch(this.nodeType){case Fi:case Ko: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")}),L6=o(function(e,t,n){e["$$"+t]=n},"__set__")}}catch{}var vce;fc.DocumentType=mE;fc.DOMException=mn;fc.DOMImplementation=N6;fc.Element=lf;fc.Node=Nr;fc.NodeList=Ho;fc.XMLSerializer=O6});var U6=re(uv=>{"use strict";var V6=tv().freeze;uv.XML_ENTITIES=V6({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});uv.HTML_ENTITIES=V6({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"});uv.entityMap=uv.HTML_ENTITIES});var G6=re(L_=>{"use strict";var hv=tv().NAMESPACE,k_=/[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]/,j6=new RegExp("[\\-\\.0-9"+k_.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),F6=new RegExp("^"+k_.source+j6.source+"*(?::"+k_.source+j6.source+"*)?$"),cv=0,hc=1,ld=2,lv=3,fd=4,hd=5,fv=6,vE=7;function pd(r,e){this.message=r,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,pd)}o(pd,"ParseError");pd.prototype=new Error;pd.prototype.name=pd.name;function H6(){}o(H6,"XMLReader");H6.prototype={parse:o(function(r,e,t){var n=this.domBuilder;n.startDocument(),K6(e,e={}),yce(r,e,t,n,this.errorHandler),n.endDocument()},"parse")};function yce(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>S){var ve=r.substring(S,Y).replace(/&#?\w+;/g,a);g&&c(S),n.characters(ve,0,Y-S),S=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={},S=0;;){try{var w=r.indexOf("<",S);if(w<0){if(!r.substr(S).match(/^\s*$/)){var C=n.doc,_=C.createTextNode(r.substr(S));C.appendChild(_),n.currentElement=_}return}switch(w>S&&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=bce(r,w,n);break;case"!":g&&c(w),q=Ece(r,w,n,s);break;default:g&&c(w);var H=new $6,K=y[y.length-1].currentNSMap,q=xce(r,w,H,K,a,s),W=H.length;if(!H.closed&&Sce(r,q,H.tagName,v)&&(H.closed=!0,t.nbsp||s.warning("unclosed xml attribute")),g&&W){for(var he=M6(g,{}),pe=0;pe<W;pe++){var ue=H[pe];c(ue.offset),ue.locator=M6(g,{})}n.locator=he,q6(H,n,K)&&y.push(H),n.locator=g}else q6(H,n,K)&&y.push(H);hv.isHTML(H.uri)&&!H.closed?q=wce(r,q,H.tagName,a,n):q++}}catch(Y){if(Y instanceof pd)throw Y;s.error("element parse error: "+Y),q=-1}q>S?S=q:u(Math.max(w,S)+1)}}o(yce,"parse");function M6(r,e){return e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber,e}o(M6,"copyLocator");function xce(r,e,t,n,s,i){function a(y,v,S){t.attributeNames.hasOwnProperty(y)&&i.fatalError("Attribute "+y+" redefined"),t.addValue(y,v.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),S)}o(a,"addAttribute");for(var u,c,l=++e,h=cv;;){var m=r.charAt(l);switch(m){case"=":if(h===hc)u=r.slice(e,l),h=lv;else if(h===ld)h=lv;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(h===lv||h===hc)if(h===hc&&(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=hd;else throw new Error("attribute value no end '"+m+"' match");else if(h==fd)c=r.slice(e,l),a(u,c,e),i.warning('attribute "'+u+'" missed start quot('+m+")!!"),e=l+1,h=hd;else throw new Error('attribute value must after "="');break;case"/":switch(h){case cv:t.setTagName(r.slice(e,l));case hd:case fv:case vE:h=vE,t.closed=!0;case fd:case hc:break;case ld:t.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),h==cv&&t.setTagName(r.slice(e,l)),l;case">":switch(h){case cv:t.setTagName(r.slice(e,l));case hd:case fv:case vE:break;case fd:case hc:c=r.slice(e,l),c.slice(-1)==="/"&&(t.closed=!0,c=c.slice(0,-1));case ld:h===ld&&(c=u),h==fd?(i.warning('attribute "'+c+'" missed quot(")!'),a(u,c,e)):((!hv.isHTML(n[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),a(c,c,e));break;case lv:throw new Error("attribute value missed!!")}return l;case"\x80":m=" ";default:if(m<=" ")switch(h){case cv:t.setTagName(r.slice(e,l)),h=fv;break;case hc:u=r.slice(e,l),h=ld;break;case fd:var c=r.slice(e,l);i.warning('attribute "'+c+'" missed quot(")!!'),a(u,c,e);case hd:h=fv;break}else switch(h){case ld:var g=t.tagName;(!hv.isHTML(n[""])||!u.match(/^(?:disabled|checked|selected)$/i))&&i.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),a(u,u,e),e=l,h=hc;break;case hd:i.warning('attribute space is required"'+u+'"!!');case fv:h=hc,e=l;break;case lv:h=fd,e=l;break;case vE:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}o(xce,"parseElementStartPart");function q6(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={},K6(t,t={})),t[h]=s[h]=u,i.uri=hv.XMLNS,e.startPrefixMapping(h,u))}for(var m=r.length;m--;){i=r[m];var c=i.prefix;c&&(c==="xml"&&(i.uri=hv.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(q6,"appendElement");function wce(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(wce,"parseHtmlSpecialContent");function Sce(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(Sce,"fixSelfClosed");function K6(r,e){for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}o(K6,"_copy");function Ece(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=Ace(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(Ece,"parseDCC");function bce(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(bce,"parseInstruction");function $6(){this.attributeNames={}}o($6,"ElementAttributes");$6.prototype={setTagName:o(function(r){if(!F6.test(r))throw new Error("invalid tagName:"+r);this.tagName=r},"setTagName"),addValue:o(function(r,e,t){if(!F6.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 Ace(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(Ace,"split");L_.XMLReader=H6;L_.ParseError=pd});var Z6=re(xE=>{"use strict";var Cce=tv(),Nce=P_(),X6=U6(),J6=G6(),Tce=Nce.DOMImplementation,W6=Cce.NAMESPACE,Ice=J6.ParseError,_ce=J6.XMLReader;function Y6(r){return r.replace(/\r[\n\u0085]/g,`
|
|
71
|
+
`).replace(/[\r\u0085\u2028]/g,`
|
|
72
|
+
`)}o(Y6,"normalizeLineEndings");function Q6(r){this.options=r||{locator:{}}}o(Q6,"DOMParser");Q6.prototype.parseFromString=function(r,e){var t=this.options,n=new _ce,s=t.domBuilder||new pv,i=t.errorHandler,a=t.locator,u=t.xmlns||{},c=/\/x?html?$/.test(e),l=c?X6.HTML_ENTITIES:X6.XML_ENTITIES;a&&s.setDocumentLocator(a),n.errorHandler=Dce(i,s,a),n.domBuilder=t.domBuilder||s,c&&(u[""]=W6.HTML),u.xml=u.xml||W6.XML;var h=t.normalizeLineEndings||Y6;return r&&typeof r=="string"?n.parse(h(r),u,l):n.errorHandler.error("invalid doc source"),s.doc};function Dce(r,e,t){if(!r){if(e instanceof pv)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+V_(t))}||function(){}}return o(i,"build"),i("warning"),i("error"),i("fatalError"),n}o(Dce,"buildErrorHandler");function pv(){this.cdata=!1}o(pv,"DOMHandler");function dd(r,e){e.lineNumber=r.lineNumber,e.columnNumber=r.columnNumber}o(dd,"position");pv.prototype={startDocument:o(function(){this.doc=new Tce().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;yE(this,i),this.currentElement=i,this.locator&&dd(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&&dd(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&&dd(this.locator,t),yE(this,t)},"processingInstruction"),ignorableWhitespace:o(function(r,e,t){},"ignorableWhitespace"),characters:o(function(r,e,t){if(r=z6.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&&dd(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=z6.apply(this,arguments);var n=this.doc.createComment(r);this.locator&&dd(this.locator,n),yE(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&&dd(this.locator,s),yE(this,s),this.doc.doctype=s}},"startDTD"),warning:o(function(r){console.warn("[xmldom warning] "+r,V_(this.locator))},"warning"),error:o(function(r){console.error("[xmldom error] "+r,V_(this.locator))},"error"),fatalError:o(function(r){throw new Ice(r,this.locator)},"fatalError")};function V_(r){if(r)return`
|
|
73
|
+
@`+(r.systemId||"")+"#[line:"+r.lineNumber+",col:"+r.columnNumber+"]"}o(V_,"_locator");function z6(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(z6,"_toString");"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(r){pv.prototype[r]=function(){return null}});function yE(r,e){r.currentElement?r.currentElement.appendChild(e):r.doc.appendChild(e)}o(yE,"appendElement");xE.__DOMHandler=pv;xE.normalizeLineEndings=Y6;xE.DOMParser=Q6});var U_=re(wE=>{"use strict";var ej=P_();wE.DOMImplementation=ej.DOMImplementation;wE.XMLSerializer=ej.XMLSerializer;wE.DOMParser=Z6().DOMParser});var tj=re(EE=>{"use strict";Object.defineProperty(EE,"__esModule",{value:!0});EE.EnvelopedSignature=void 0;var SE=uE(),j_=nd(),Bce=class{static{o(this,"EnvelopedSignature")}constructor(){this.includeComments=!1,this.includeComments=!1}process(e,t){if(t.signatureNode==null){let i=SE.select1("./*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);return j_.isNodeLike(i)&&i.parentNode&&i.parentNode.removeChild(i),e}let n=t.signatureNode,s=SE.select1(".//*[local-name(.)='SignatureValue']/text()",n);if(j_.isTextNode(s)){let i=s.data,a=SE.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=SE.select1(".//*[local-name(.)='SignatureValue']/text()",u);if(j_.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"}};EE.EnvelopedSignature=Bce});var rj=re(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.Sha512=pc.Sha256=pc.Sha1=void 0;var F_=Je("crypto"),Rce=class{static{o(this,"Sha1")}constructor(){this.getHash=function(e){let t=F_.createHash("sha1");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2000/09/xmldsig#sha1"}}};pc.Sha1=Rce;var Oce=class{static{o(this,"Sha256")}constructor(){this.getHash=function(e){let t=F_.createHash("sha256");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha256"}}};pc.Sha256=Oce;var Pce=class{static{o(this,"Sha512")}constructor(){this.getHash=function(e){let t=F_.createHash("sha512");return t.update(e,"utf8"),t.digest("base64")},this.getAlgorithmName=function(){return"http://www.w3.org/2001/04/xmlenc#sha512"}}};pc.Sha512=Pce});var M_=re(bE=>{"use strict";Object.defineProperty(bE,"__esModule",{value:!0});bE.createOptionalCallbackFunction=void 0;function kce(r){return typeof r=="function"}o(kce,"isErrorFirstCallback");function Lce(r){return(...e)=>{let t=e[e.length-1];if(kce(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(Lce,"createOptionalCallbackFunction");bE.createOptionalCallbackFunction=Lce});var nj=re(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.HmacSha1=ao.RsaSha512=ao.RsaSha256=ao.RsaSha1=void 0;var dc=Je("crypto"),mc=M_(),Vce=class{static{o(this,"RsaSha1")}constructor(){this.getSignature=(0,mc.createOptionalCallbackFunction)((e,t)=>{let n=dc.createSign("RSA-SHA1");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,mc.createOptionalCallbackFunction)((e,t,n)=>{let s=dc.createVerify("RSA-SHA1");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2000/09/xmldsig#rsa-sha1"}};ao.RsaSha1=Vce;var Uce=class{static{o(this,"RsaSha256")}constructor(){this.getSignature=(0,mc.createOptionalCallbackFunction)((e,t)=>{let n=dc.createSign("RSA-SHA256");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,mc.createOptionalCallbackFunction)((e,t,n)=>{let s=dc.createVerify("RSA-SHA256");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"}};ao.RsaSha256=Uce;var jce=class{static{o(this,"RsaSha512")}constructor(){this.getSignature=(0,mc.createOptionalCallbackFunction)((e,t)=>{let n=dc.createSign("RSA-SHA512");return n.update(e),n.sign(t,"base64")}),this.verifySignature=(0,mc.createOptionalCallbackFunction)((e,t,n)=>{let s=dc.createVerify("RSA-SHA512");return s.update(e),s.verify(t,n,"base64")}),this.getAlgorithmName=()=>"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"}};ao.RsaSha512=jce;var Fce=class{static{o(this,"HmacSha1")}constructor(){this.getSignature=(0,mc.createOptionalCallbackFunction)((e,t)=>{let n=dc.createHmac("SHA1",t);return n.update(e),n.digest("base64")}),this.verifySignature=(0,mc.createOptionalCallbackFunction)((e,t,n)=>{let s=dc.createHmac("SHA1",t);return s.update(e),s.digest("base64")===n}),this.getAlgorithmName=()=>"http://www.w3.org/2000/09/xmldsig#hmac-sha1"}};ao.HmacSha1=Fce});var aj=re(CE=>{"use strict";Object.defineProperty(CE,"__esModule",{value:!0});CE.SignedXml=void 0;var li=nd(),ff=U_(),Mce=Je("util"),Mi=uE(),sj=x_(),qce=tj(),ij=E_(),q_=rj(),AE=nj(),vr=ev(),H_=class md{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=md.getKeyInfoContent,this.getCertFromKeyInfo=md.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":sj.C14nCanonicalization,"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments":sj.C14nCanonicalizationWithComments,"http://www.w3.org/2001/10/xml-exc-c14n#":ij.ExclusiveCanonicalization,"http://www.w3.org/2001/10/xml-exc-c14n#WithComments":ij.ExclusiveCanonicalizationWithComments,"http://www.w3.org/2000/09/xmldsig#enveloped-signature":qce.EnvelopedSignature},this.HashAlgorithms={"http://www.w3.org/2000/09/xmldsig#sha1":q_.Sha1,"http://www.w3.org/2001/04/xmlenc#sha256":q_.Sha256,"http://www.w3.org/2001/04/xmlenc#sha512":q_.Sha512},this.SignatureAlgorithms={"http://www.w3.org/2000/09/xmldsig#rsa-sha1":AE.RsaSha1,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256":AE.RsaSha256,"http://www.w3.org/2001/04/xmldsig-more#rsa-sha512":AE.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(" "):vr.isArrayHasLength(c)&&(this.inclusiveNamespacesPrefixList=c),this.implicitTransforms=l??this.implicitTransforms,this.keyInfoAttributes=h??this.keyInfoAttributes,this.getKeyInfoContent=m??this.getKeyInfoContent,this.getCertFromKeyInfo=g??md.noop,this.CanonicalizationAlgorithms,this.HashAlgorithms,this.SignatureAlgorithms}enableHMAC(){this.SignatureAlgorithms={"http://www.w3.org/2000/09/xmldsig#hmac-sha1":AE.HmacSha1},this.getKeyInfoContent=md.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(vr.EXTRACT_X509_CERTS)||[]),s.length>0&&(n=s.map(i=>`<${t}X509Certificate>${vr.pemToDer(i).toString("base64")}</${t}X509Certificate>`).join("")),`<${t}X509Data>${n}</${t}X509Data>`}static getCertFromKeyInfo(e){if(e!=null){let t=Mi.select1(".//*[local-name(.)='X509Certificate']",e);if(li.isNodeLike(t))return vr.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 ff.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 ff.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=vr.findChildren(a,"Reference");if(!vr.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=vr.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:vr.findAncestorNs(e,"//*[local-name()='SignedInfo']")};return this.getCanonXml([this.canonicalizationAlgorithm],t[0],s)}getCanonReferenceXml(e,t,n){Array.isArray(t.transforms)&&(t.ancestorNamespaces=vr.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=Mi.select1(e,t);li.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(vr.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=Mi.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=Mi.select(h,t);if(vr.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,Mce.deprecate)(c=>{if(c=c||e.xpath,typeof c!="string"||e.validationError!=null)return null;let l=Mi.select1(c,t);return li.isNodeLike(l)?l:null},"`ref.getValidatedNode()` is deprecated and insecure. Use `ref.signedReference` or `this.getSignedReferences()` instead."),!li.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(!vr.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=Mi.select("//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']",e);return li.isArrayOfNodes(t)?t:[]}loadSignature(e){typeof e=="string"?this.signatureNode=e=new ff.DOMParser().parseFromString(e):this.signatureNode=e,this.signatureXml=e.toString();let t=Mi.select1(".//*[local-name(.)='CanonicalizationMethod']/@Algorithm",e);if(!li.isNodeLike(t))throw new Error("could not find CanonicalizationMethod/@Algorithm element");li.isAttributeNode(t)&&(this.canonicalizationAlgorithm=t.value);let n=Mi.select1(".//*[local-name(.)='SignatureMethod']/@Algorithm",e);li.isAttributeNode(n)&&(this.signatureAlgorithm=n.value);let s=vr.findChildren(this.signatureNode,"SignedInfo");if(!vr.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 ff.DOMParser().parseFromString(a,"text/xml").documentElement;this.references=[];let l=vr.findChildren(c,"Reference");if(!vr.isArrayHasLength(l))throw new Error("could not find any Reference elements");for(let g of l)this.loadReference(g);let h=Mi.select1(".//*[local-name(.)='SignatureValue']/text()",e);li.isTextNode(h)&&(this.signatureValue=h.data.replace(/\r?\n/g,""));let m=Mi.select1(".//*[local-name(.)='KeyInfo']",e);li.isNodeLike(m)&&(this.keyInfo=m)}loadReference(e){let t=vr.findChildren(e,"DigestMethod");if(t.length===0)throw new Error(`could not find DigestMethod in reference ${e.toString()}`);let n=t[0],s=vr.findAttr(n,"Algorithm");if(!s)throw new Error(`could not find Algorithm attribute in node ${n.toString()}`);let i=s.value;if(t=vr.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=vr.findChildren(e,"Transforms"),t.length!==0){let h=t[0],m=vr.findChildren(h,"Transform");for(let y of m){let v=vr.findAttr(y,"Algorithm");v&&u.push(v.value)}let g=vr.findChildren(m[m.length-1],"InclusiveNamespaces");vr.isArrayHasLength(g)&&(c=g.flatMap(y=>(y.getAttribute("PrefixList")??"").split(" ")).filter(y=>y.length>0))}vr.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=li.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(!vr.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 ff.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 S="";Object.keys(y).forEach(function(B){S+=`xmlns:${B}="${y[B]}" `});let w=`<Dummy ${S}>${v}</Dummy>`,_=new ff.DOMParser().parseFromString(w).documentElement.firstChild,b=Mi.select1(g.reference,i);if(!li.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=vr.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=Mi.selectWithResolver(s.xpath??"",e,this.namespaceResolver);if(!vr.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()}"`,vr.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??md.defaultNsForPrefix,n.signatureNode=this.signatureNode;let i=t.cloneNode(!0);return e.forEach(a=>{li.isNodeLike(i)&&(i=this.findCanonicalizationAlgorithm(a).process(i,n))}),i.toString()}ensureHasId(e){let t;if(this.idMode==="wssecurity"?t=vr.findAttr(e,"Id","http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"):this.idAttributes.some(s=>(t=vr.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()}"`,vr.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 ff.DOMParser().parseFromString(s).documentElement.firstChild}getSignatureXml(){return this.signatureXml}getOriginalXmlWithIds(){return this.originalXmlWithIds}getSignedXml(){return this.signedXml}};CE.SignedXml=H_;H_.defaultNsForPrefix={ds:"http://www.w3.org/2000/09/xmldsig#"};H_.noop=()=>null});var K_=re(qn=>{"use strict";var Hce=qn&&qn.__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]}),oj=qn&&qn.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Hce(e,r,t)};Object.defineProperty(qn,"__esModule",{value:!0});qn.SignedXml=qn.ExclusiveCanonicalizationWithComments=qn.ExclusiveCanonicalization=qn.C14nCanonicalizationWithComments=qn.C14nCanonicalization=void 0;var uj=x_();Object.defineProperty(qn,"C14nCanonicalization",{enumerable:!0,get:o(function(){return uj.C14nCanonicalization},"get")});Object.defineProperty(qn,"C14nCanonicalizationWithComments",{enumerable:!0,get:o(function(){return uj.C14nCanonicalizationWithComments},"get")});var cj=E_();Object.defineProperty(qn,"ExclusiveCanonicalization",{enumerable:!0,get:o(function(){return cj.ExclusiveCanonicalization},"get")});Object.defineProperty(qn,"ExclusiveCanonicalizationWithComments",{enumerable:!0,get:o(function(){return cj.ExclusiveCanonicalizationWithComments},"get")});var Kce=aj();Object.defineProperty(qn,"SignedXml",{enumerable:!0,get:o(function(){return Kce.SignedXml},"get")});oj(M_(),qn);oj(ev(),qn)});var hj=re(TE=>{"use strict";Object.defineProperty(TE,"__esModule",{value:!0});TE.WSSecurityCert=void 0;var $ce=Je("crypto"),Gce=K_();function Xce(r,e){return new Date(r.getTime()+e*6e4)}o(Xce,"addMinutes");function lj(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(lj,"dateStringForSOAP");function Wce(){return lj(new Date)}o(Wce,"generateCreated");function zce(){return lj(Xce(new Date,10))}o(zce,"generateExpires");function NE(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(NE,"insertStr");function Jce(){return(0,$ce.randomUUID)().replace(/-/gm,"")}o(Jce,"generateId");function Yce(r,e){for(let t of r)t.xpath===fj&&(t.xpath=e)}o(Yce,"resolvePlaceholderInReferences");var gc="http://docs.oasis-open.org/wss/2004/01",fj="[[bodyXpath]]",Qce=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 Gce.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:fj,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=`${gc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`)}else this.signerOptions={existingPrefixes:{wsse:`${gc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`}};this.signer.privateKey={key:e,passphrase:n},this.x509Id=`x509-${Jce()}`,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="${gc}/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference>`}postProcess(e,t){this.created=Wce(),this.expires=zce();let n="";this.hasTimeStamp&&(n=`<Timestamp xmlns="${gc}/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Created>${this.created}</Created><Expires>${this.expires}</Expires></Timestamp>`);let s=`<wsse:BinarySecurityToken EncodingType="${gc}/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="${gc}/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="${this.x509Id}">${this.publicP12PEM}</wsse:BinarySecurityToken>`+n+this.appendElement,i,a=`xmlns:wsse="${gc}/oasis-200401-wss-wssecurity-secext-1.0.xsd"`,u=`xmlns:wsu="${gc}/oasis-200401-wss-wssecurity-utility-1.0.xsd"`,c=e.indexOf("</wsse:Security>");if(c>-1){let v=/<wsse:Security( [^>]*)?>/,S=e.match(v),w="";S[0].includes(` ${t}:mustUnderstand="`)||(w+=`${t}:mustUnderstand="1" `),S[0].includes(a.substring(0,a.indexOf("=")))||(w+=`${a} `),S[0].includes(u.substring(0,a.indexOf("=")))||(w+=`${u} `);let C="<wsse:Security ",_=e.indexOf(C);e=NE(s,e,c),i=NE(w,e,_+C.length)}else{let v=`<wsse:Security ${a} ${u} ${t}:mustUnderstand="1">`+s+"</wsse:Security>";i=NE(v,e,e.indexOf(`</${t}:Header>`))}let l=this.signatureTransformations,h=`//*[name(.)='${t}:Body']`;Yce(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 S=`//*[name(.)='${v}']`;!this.excludeReferencesFromSigning.some(w=>w===v)&&!(this.signer.references.filter(w=>w.xpath===S).length>0)&&this.signer.addReference({xpath:S,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 NE(y,g,g.indexOf("</wsse:Security>"))}};TE.WSSecurityCert=Qce});var gj=re(IE=>{"use strict";Object.defineProperty(IE,"__esModule",{value:!0});IE.WSSecurityCertWithToken=void 0;var Zce=Je("crypto"),ele=K_();function tle(r,e){return new Date(r.getTime()+e*6e4)}o(tle,"addMinutes");function dj(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(dj,"dateStringForSOAP");function rle(){return dj(new Date)}o(rle,"generateCreated");function nle(){return dj(tle(new Date,10))}o(nle,"generateExpires");function pj(r,e,t){return[e.slice(0,t),r,e.slice(t)].join("")}o(pj,"insertStr");function sle(){return(0,Zce.randomUUID)().replace(/-/gm,"")}o(sle,"generateId");function ile(r,e){for(let t of r)t.xpath===mj&&(t.xpath=e)}o(ile,"resolvePlaceholderInReferences");var vc="http://docs.oasis-open.org/wss/2004/01",mj="[[bodyXpath]]",ale=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 ele.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:mj,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=`${vc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`)}else this.signerOptions={existingPrefixes:{wsse:`${vc}/oasis-200401-wss-wssecurity-secext-1.0.xsd`}};this.signer.privateKey={key:e.privateKey,passphrase:e.keyPassword},this.x509Id=`x509-${sle()}`,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="${vc}/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference>`}postProcess(e,t){this.created=rle(),this.expires=nle();let n="";this.hasTimeStamp&&(n=`<Timestamp xmlns="${vc}/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="${vc}/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="${vc}/oasis-200401-wss-wssecurity-utility-1.0.xsd" ${t}:mustUnderstand="1"><wsse:BinarySecurityToken EncodingType="${vc}/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="${vc}/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="${this.x509Id}">${this.publicP12PEM}</wsse:BinarySecurityToken>`+s+n+this.appendElement+"</wsse:Security>",a=pj(i,e,e.indexOf(`</${t}:Header>`)),u=this.signatureTransformations,c=`//*[name(.)='${t}:Body']`;ile(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),pj(this.signer.getSignatureXml(),a,a.indexOf("</wsse:Security>"))}};IE.WSSecurityCertWithToken=ale});var vj=re(_E=>{"use strict";Object.defineProperty(_E,"__esModule",{value:!0});_E.WSSecurityPlusCert=void 0;var ole=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)}};_E.WSSecurityPlusCert=ole});var $_=re(Ts=>{"use strict";var ule=Ts&&Ts.__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]}),Go=Ts&&Ts.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&ule(e,r,t)};Object.defineProperty(Ts,"__esModule",{value:!0});Go(GU(),Ts);Go(WU(),Ts);Go(YU(),Ts);Go(ZU(),Ts);Go(e6(),Ts);Go(t6(),Ts);Go(hj(),Ts);Go(gj(),Ts);Go(vj(),Ts)});var G_=re(qi=>{"use strict";var cle=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]}),lle=qi&&qi.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),fle=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"&&cle(t,e,n[s]);return lle(t,e),t}})(),hle=qi&&qi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qi,"__esModule",{value:!0});qi.Server=void 0;var ple=Je("events"),DE=fle(Je("url")),dle=hle(Je("zlib"));function mle(r){return typeof r.route=="function"&&typeof r.use=="function"}o(mle,"isExpress");function yj(r){return!!r&&typeof r.then=="function"}o(yj,"isPromiseLike");function xj(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(xj,"getDateString");var gle=class extends ple.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(mle(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=DE.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=DE.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=dle.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=DE.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"),S=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=DE.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,S):this._executeMethod({serviceName:m,portName:g,methodName:h,outputName:b.outputName,args:u[_],headers:c,style:"document"},t,n,S,y)}catch(C){if(C.Fault!==void 0)return this._sendError(C.Fault,S,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},S,y);if(typeof A=="boolean")if(A===!0)try{w()}catch(T){return T.Fault!==void 0?this._sendError(T.Fault,S,y):this._sendError({Code:{Value:"SOAP-ENV:Server",Subcode:{Value:"InternalServerError"}},Reason:{Text:T.toString()},statusCode:500},S,y)}else return this._sendError({Code:{Value:"SOAP-ENV:Client",Subcode:{Value:"AuthenticationFailure"}},Reason:{Text:"Invalid username or password"},statusCode:401},S,y)}},"processAuthResult"),b=v(a.Header&&a.Header.Security,_,t,a);yj(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,S=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(S==="rpc")u=this.wsdl.objectToRpcXML(y,T,"",this.wsdl.definitions.$targetNamespace);else if(S==="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"&&(yj(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=xj(c),h=xj(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)}};qi.Server=gle});var wj=re(BE=>{"use strict";(function(r){r.parser=function(N,E){return new t(N,E)},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,E){if(!(this instanceof t))return new t(N,E);var G=this;s(G),G.q=G.c="",G.bufferCheckPosition=r.MAX_BUFFER_LENGTH,G.opt=E||{},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 E(){}o(E,"F"),E.prototype=N;var G=new E;return G}),Object.keys||(Object.keys=function(N){var E=[];for(var G in N)N.hasOwnProperty(G)&&E.push(G);return E});function n(N){for(var E=Math.max(r.MAX_BUFFER_LENGTH,10),G=0,P=0,Se=e.length;P<Se;P++){var Ce=N[e[P]].length;if(Ce>E)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 E=0,G=e.length;E<G;E++)N[e[E]]=""}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:tt,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=Je("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,E){return new l(N,E)}o(c,"createStream");function l(N,E){if(!(this instanceof l))return new l(N,E);a.apply(this),this._parser=new t(N,E),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(Se){if(!Se)return G.removeAllListeners(P),G._parser["on"+P]=Se,Se;G.on(P,Se)},"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 E=Je("string_decoder").StringDecoder;this._decoder=new E("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,E){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,E)};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},S=/[:_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,E){return N.test(E)}o(B,"isMatch");function M(N,E){return!B(N,E)}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 E=r.ENTITIES[N],G=typeof E=="number"?String.fromCharCode(E):E;r.ENTITIES[N]=G});for(var H in r.STATE)r.STATE[r.STATE[H]]=H;I=r.STATE;function K(N,E,G){N[E]&&N[E](G)}o(K,"emit");function q(N,E,G){N.textNode&&W(N),K(N,E,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,E){return N.trim&&(E=E.trim()),N.normalize&&(E=E.replace(/\s+/g," ")),E}o(he,"textopts");function pe(N,E){return W(N),N.trackPosition&&(E+=`
|
|
77
|
+
Line: `+N.line+`
|
|
78
|
+
Column: `+N.column+`
|
|
79
|
+
Char: `+N.c),E=new Error(E),N.error=E,K(N,"onerror",E),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,E){if(typeof N!="object"||!(N instanceof t))throw new Error("bad call to strictFail");N.strict&&pe(N,E)}o(Y,"strictFail");function ve(N){N.strict||(N.tagName=N.tagName[N.looseCase]());var E=N.tags[N.tags.length-1]||N,G=N.tag={name:N.tagName,attributes:{}};N.opt.xmlns&&(G.ns=E.ns),N.attribList.length=0,q(N,"onopentagstart",G)}o(ve,"newTag");function Oe(N,E){var G=N.indexOf(":"),P=G<0?["",N]:N.split(":"),Se=P[0],Ce=P[1];return E&&N==="xmlns"&&(Se="xmlns",Ce=""),{prefix:Se,local:Ce}}o(Oe,"qname");function ze(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 E=Oe(N.attribName,!0),G=E.prefix,P=E.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 Se=N.tag,Ce=N.tags[N.tags.length-1]||N;Se.ns===Ce.ns&&(Se.ns=Object.create(Ce.ns)),Se.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(ze,"attrib");function ne(N,E){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 Se=N.tags[N.tags.length-1]||N;G.ns&&Se.ns!==G.ns&&Object.keys(G.ns).forEach(function(Cn){q(N,"onopennamespace",{prefix:Cn,uri:G.ns[Cn]})});for(var Ce=0,Ae=N.attribList.length;Ce<Ae;Ce++){var Ye=N.attribList[Ce],Tt=Ye[0],Me=Ye[1],Et=Oe(Tt,!0),zr=Et.prefix,Qe=Et.local,_r=zr===""?"":G.ns[zr]||"",$r={name:Tt,value:Me,prefix:zr,local:Qe,uri:_r};zr&&zr!=="xmlns"&&!_r&&(Y(N,"Unbound namespace prefix: "+JSON.stringify(zr)),$r.uri=zr),N.tag.attributes[Tt]=$r,q(N,"onattribute",$r)}N.attribList.length=0}N.tag.isSelfClosing=!!E,N.sawRoot=!0,N.tags.push(N.tag),q(N,"onopentag",N.tag),E||(!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 E=N.tags.length,G=N.tagName;N.strict||(G=G[N.looseCase]());for(var P=G;E--;){var Se=N.tags[E];if(Se.name!==P)Y(N,"Unexpected close tag");else break}if(E<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-- >E;){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(Et){var zr=Ae.ns[Et];q(N,"onclosenamespace",{prefix:Et,uri:zr})})}E===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=I.TEXT}o(Z,"closeTag");function Ee(N){var E=N.entity,G=E.toLowerCase(),P,Se="";return N.ENTITIES[E]?N.ENTITIES[E]:N.ENTITIES[G]?N.ENTITIES[G]:(E=G,E.charAt(0)==="#"&&(E.charAt(1)==="x"?(E=E.slice(2),P=parseInt(E,16),Se=P.toString(16)):(E=E.slice(1),P=parseInt(E,10),Se=P.toString(10))),E=E.replace(/^0+/,""),isNaN(P)||Se.toLowerCase()!==E||P<0||P>1114111?(Y(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(P))}o(Ee,"parseEntity");function He(N,E){E==="<"?(N.state=I.OPEN_WAKA,N.startTagPosition=N.position):b(E)||(Y(N,"Non-whitespace before first tag."),N.textNode=E,N.state=I.TEXT)}o(He,"beginWhiteSpace");function Le(N,E){var G="";return E<N.length&&(G=N.charAt(E)),G}o(Le,"charAt");function tt(N){var E=this;if(this.error)throw this.error;if(E.closed)return pe(E,"Cannot write after close. Assign an onready handler.");if(N===null)return ue(E);typeof N=="object"&&(N=N.toString());for(var G=0,P="";P=Le(N,G++),E.c=P,!!P;)switch(E.trackPosition&&(E.position++,P===`
|
|
82
|
+
`?(E.line++,E.column=0):E.column++),E.state){case I.BEGIN:if(E.state=I.BEGIN_WHITESPACE,P==="\uFEFF")continue;He(E,P);continue;case I.BEGIN_WHITESPACE:He(E,P);continue;case I.TEXT:if(E.sawRoot&&!E.closedRoot){for(var Ce=G-1;P&&P!=="<"&&P!=="&";)P=Le(N,G++),P&&E.trackPosition&&(E.position++,P===`
|
|
83
|
+
`?(E.line++,E.column=0):E.column++);E.textNode+=N.substring(Ce,G-1)}P==="<"&&!(E.sawRoot&&E.closedRoot&&!E.strict)?(E.state=I.OPEN_WAKA,E.startTagPosition=E.position):(!b(P)&&(!E.sawRoot||E.closedRoot)&&Y(E,"Text data outside of root node."),P==="&"?E.state=I.TEXT_ENTITY:E.textNode+=P);continue;case I.SCRIPT:P==="<"?E.state=I.SCRIPT_ENDING:E.script+=P;continue;case I.SCRIPT_ENDING:P==="/"?E.state=I.CLOSE_TAG:(E.script+="<"+P,E.state=I.SCRIPT);continue;case I.OPEN_WAKA:if(P==="!")E.state=I.SGML_DECL,E.sgmlDecl="";else if(!b(P))if(B(S,P))E.state=I.OPEN_TAG,E.tagName=P;else if(P==="/")E.state=I.CLOSE_TAG,E.tagName="";else if(P==="?")E.state=I.PROC_INST,E.procInstName=E.procInstBody="";else{if(Y(E,"Unencoded <"),E.startTagPosition+1<E.position){var Se=E.position-E.startTagPosition;P=new Array(Se).join(" ")+P}E.textNode+="<"+P,E.state=I.TEXT}continue;case I.SGML_DECL:if(E.sgmlDecl+P==="--"){E.state=I.COMMENT,E.comment="",E.sgmlDecl="";continue}E.doctype&&E.doctype!==!0&&E.sgmlDecl?(E.state=I.DOCTYPE_DTD,E.doctype+="<!"+E.sgmlDecl+P,E.sgmlDecl=""):(E.sgmlDecl+P).toUpperCase()===h?(q(E,"onopencdata"),E.state=I.CDATA,E.sgmlDecl="",E.cdata=""):(E.sgmlDecl+P).toUpperCase()===m?(E.state=I.DOCTYPE,(E.doctype||E.sawRoot)&&Y(E,"Inappropriately located doctype declaration"),E.doctype="",E.sgmlDecl=""):P===">"?(q(E,"onsgmldeclaration",E.sgmlDecl),E.sgmlDecl="",E.state=I.TEXT):(A(P)&&(E.state=I.SGML_DECL_QUOTED),E.sgmlDecl+=P);continue;case I.SGML_DECL_QUOTED:P===E.q&&(E.state=I.SGML_DECL,E.q=""),E.sgmlDecl+=P;continue;case I.DOCTYPE:P===">"?(E.state=I.TEXT,q(E,"ondoctype",E.doctype),E.doctype=!0):(E.doctype+=P,P==="["?E.state=I.DOCTYPE_DTD:A(P)&&(E.state=I.DOCTYPE_QUOTED,E.q=P));continue;case I.DOCTYPE_QUOTED:E.doctype+=P,P===E.q&&(E.q="",E.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:P==="]"?(E.doctype+=P,E.state=I.DOCTYPE):P==="<"?(E.state=I.OPEN_WAKA,E.startTagPosition=E.position):A(P)?(E.doctype+=P,E.state=I.DOCTYPE_DTD_QUOTED,E.q=P):E.doctype+=P;continue;case I.DOCTYPE_DTD_QUOTED:E.doctype+=P,P===E.q&&(E.state=I.DOCTYPE_DTD,E.q="");continue;case I.COMMENT:P==="-"?E.state=I.COMMENT_ENDING:E.comment+=P;continue;case I.COMMENT_ENDING:P==="-"?(E.state=I.COMMENT_ENDED,E.comment=he(E.opt,E.comment),E.comment&&q(E,"oncomment",E.comment),E.comment=""):(E.comment+="-"+P,E.state=I.COMMENT);continue;case I.COMMENT_ENDED:P!==">"?(Y(E,"Malformed comment"),E.comment+="--"+P,E.state=I.COMMENT):E.doctype&&E.doctype!==!0?E.state=I.DOCTYPE_DTD:E.state=I.TEXT;continue;case I.CDATA:for(var Ce=G-1;P&&P!=="]";)P=Le(N,G++),P&&E.trackPosition&&(E.position++,P===`
|
|
84
|
+
`?(E.line++,E.column=0):E.column++);E.cdata+=N.substring(Ce,G-1),P==="]"&&(E.state=I.CDATA_ENDING);continue;case I.CDATA_ENDING:P==="]"?E.state=I.CDATA_ENDING_2:(E.cdata+="]"+P,E.state=I.CDATA);continue;case I.CDATA_ENDING_2:P===">"?(E.cdata&&q(E,"oncdata",E.cdata),q(E,"onclosecdata"),E.cdata="",E.state=I.TEXT):P==="]"?E.cdata+="]":(E.cdata+="]]"+P,E.state=I.CDATA);continue;case I.PROC_INST:P==="?"?E.state=I.PROC_INST_ENDING:b(P)?E.state=I.PROC_INST_BODY:E.procInstName+=P;continue;case I.PROC_INST_BODY:if(!E.procInstBody&&b(P))continue;P==="?"?E.state=I.PROC_INST_ENDING:E.procInstBody+=P;continue;case I.PROC_INST_ENDING:P===">"?(q(E,"onprocessinginstruction",{name:E.procInstName,body:E.procInstBody}),E.procInstName=E.procInstBody="",E.state=I.TEXT):(E.procInstBody+="?"+P,E.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:B(w,P)?E.tagName+=P:(ve(E),P===">"?ne(E):P==="/"?E.state=I.OPEN_TAG_SLASH:(b(P)||Y(E,"Invalid character in tag name"),E.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:P===">"?(ne(E,!0),Z(E)):(Y(E,"Forward-slash in opening tag not followed by >"),E.state=I.ATTRIB);continue;case I.ATTRIB:if(b(P))continue;P===">"?ne(E):P==="/"?E.state=I.OPEN_TAG_SLASH:B(S,P)?(E.attribName=P,E.attribValue="",E.state=I.ATTRIB_NAME):Y(E,"Invalid attribute name");continue;case I.ATTRIB_NAME:P==="="?E.state=I.ATTRIB_VALUE:P===">"?(Y(E,"Attribute without value"),E.attribValue=E.attribName,ze(E),ne(E)):b(P)?E.state=I.ATTRIB_NAME_SAW_WHITE:B(w,P)?E.attribName+=P:Y(E,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(P==="=")E.state=I.ATTRIB_VALUE;else{if(b(P))continue;Y(E,"Attribute without value"),E.tag.attributes[E.attribName]="",E.attribValue="",q(E,"onattribute",{name:E.attribName,value:""}),E.attribName="",P===">"?ne(E):B(S,P)?(E.attribName=P,E.state=I.ATTRIB_NAME):(Y(E,"Invalid attribute name"),E.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(b(P))continue;A(P)?(E.q=P,E.state=I.ATTRIB_VALUE_QUOTED):(E.opt.unquotedAttributeValues||pe(E,"Unquoted attribute value"),E.state=I.ATTRIB_VALUE_UNQUOTED,E.attribValue=P);continue;case I.ATTRIB_VALUE_QUOTED:if(P!==E.q){P==="&"?E.state=I.ATTRIB_VALUE_ENTITY_Q:E.attribValue+=P;continue}ze(E),E.q="",E.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:b(P)?E.state=I.ATTRIB:P===">"?ne(E):P==="/"?E.state=I.OPEN_TAG_SLASH:B(S,P)?(Y(E,"No whitespace between attributes"),E.attribName=P,E.attribValue="",E.state=I.ATTRIB_NAME):Y(E,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!T(P)){P==="&"?E.state=I.ATTRIB_VALUE_ENTITY_U:E.attribValue+=P;continue}ze(E),P===">"?ne(E):E.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(E.tagName)P===">"?Z(E):B(w,P)?E.tagName+=P:E.script?(E.script+="</"+E.tagName,E.tagName="",E.state=I.SCRIPT):(b(P)||Y(E,"Invalid tagname in closing tag"),E.state=I.CLOSE_TAG_SAW_WHITE);else{if(b(P))continue;M(S,P)?E.script?(E.script+="</"+P,E.state=I.SCRIPT):Y(E,"Invalid tagname in closing tag."):E.tagName=P}continue;case I.CLOSE_TAG_SAW_WHITE:if(b(P))continue;P===">"?Z(E):Y(E,"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(E.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=Ee(E);E.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(Tt)?(E.entity="",E.state=Ae,E.write(Tt)):(E[Ye]+=Tt,E.entity="",E.state=Ae)}else B(E.entity.length?_:C,P)?E.entity+=P:(Y(E,"Invalid character in entity name"),E[Ye]+="&"+E.entity+P,E.entity="",E.state=Ae);continue;default:throw new Error(E,"Unknown state: "+E.state)}return E.position>=E.bufferCheckPosition&&n(E),E}o(tt,"write");String.fromCodePoint||(function(){var N=String.fromCharCode,E=Math.floor,G=o(function(){var P=16384,Se=[],Ce,Ae,Ye=-1,Tt=arguments.length;if(!Tt)return"";for(var Me="";++Ye<Tt;){var Et=Number(arguments[Ye]);if(!isFinite(Et)||Et<0||Et>1114111||E(Et)!==Et)throw RangeError("Invalid code point: "+Et);Et<=65535?Se.push(Et):(Et-=65536,Ce=(Et>>10)+55296,Ae=Et%1024+56320,Se.push(Ce,Ae)),(Ye+1===Tt||Se.length>P)&&(Me+=N.apply(null,Se),Se.length=0)}return Me},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:G,configurable:!0,writable:!0}):String.fromCodePoint=G})()})(typeof BE>"u"?BE.sax={}:BE)});var Ej=re((YSe,Sj)=>{"use strict";Sj.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=re(RE=>{"use strict";Object.defineProperty(RE,"__esModule",{value:!0});RE.NamespaceContext=void 0;var vle=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}}},yle=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 vle(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}};RE.NamespaceContext=yle});var Pj=re(ft=>{"use strict";var xle=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]}),wle=ft&&ft.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Sle=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"&&xle(t,e,n[s]);return wle(t,e),t}})(),Ele=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 X_=Je("assert"),ble=Ele(Hp()),ha=Sle(Mo()),fs=lc(),Ale=(0,ble.default)("node-soap"),OE={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},yr=class{static{o(this,"Element")}constructor(e,t,n,s){this.allowedChildren={},this.children=[];let i=(0,fs.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]:fs.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[fs.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,fs.splitQName)(t).name];if(a==null&&!this.strict&&(a=Aj),a){let u=new a(t,n,s,i);u.init();let c=e[0];c instanceof nD&&(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]&&(ha.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=yr;var Aj=class Cj extends yr{static{o(this,"UnexpectedElement")}startElement(e,t,n,s,i){let a=new Cj(t,n,s,i);a.init(),e.push(a)}};ft.UnexpectedElement=Aj;var W_=class extends yr{static{o(this,"ElementElement")}constructor(){super(...arguments),this.allowedChildren=gn(["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[fs.TNS_PREFIX]&&(this.$targetNamespace=t[fs.TNS_PREFIX]);let c=this.$type||this.$ref;if(c){c=(0,fs.splitQName)(c);let l=c.name,h=!!yc(c.prefix,this.definitionsXmlns,e.xmlns)||!!yc(this.targetNSAlias,this.definitionsXmlns,e.xmlns)||this.forceUseSchemaXmlns,m=yc(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;if(m&&e.schemas[m]&&(t=e.schemas[m].xmlns),y&&!(l in OE))if(l in v)if(this.$ref)if(u){let S=l+"[]";v[S]=v[l],n[S]=v[S]}else n=v[l];else n[s]=v[l];else{let S={};v[l]=S,u&&"maxOccurs"in y&&(y.maxOccurs=this.$maxOccurs),this.$minOccurs&&"minOccurs"in y&&(y.minOccurs=this.$minOccurs);let w=y.description(e,t);if(typeof w=="string")S=w;else{Object.keys(w).forEach(_=>{S[_]=w[_]});let C=w[pa.Symbol];C&&(S[pa.Symbol]=C)}this.$ref?n=S:n[s]=S,typeof S=="object"&&(S.targetNSAlias=c.prefix,S.targetNamespace=m),v[l]=S}else n[s]=this.$type}else{let l=this.children;n[s]={};for(let h of l)(h instanceof UE||h instanceof kE)&&(n[s]=h.description(e,t))}return n}};ft.ElementElement=W_;var PE=class extends yr{static{o(this,"AnyElement")}};ft.AnyElement=PE;var Nj=class extends yr{static{o(this,"InputElement")}constructor(){super(...arguments),this.allowedChildren=gn(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof jE&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};ft.InputElement=Nj;var Tj=class extends yr{static{o(this,"OutputElement")}constructor(){super(...arguments),this.allowedChildren=gn(["body","documentation","header","SecuritySpecRef"])}addChild(e){e instanceof jE&&(this.use=e.$use,this.use==="encoded"&&(this.encodingStyle=e.$encodingStyle),this.children.pop())}};ft.OutputElement=Tj;var kE=class extends yr{static{o(this,"SimpleTypeElement")}constructor(){super(...arguments),this.allowedChildren=gn(["restriction"])}description(e){for(let t of this.children)if(t instanceof LE)return[this.$name,t.description()].filter(Boolean).join("|");return{}}};ft.SimpleTypeElement=kE;var LE=class extends yr{static{o(this,"RestrictionElement")}constructor(){super(...arguments),this.allowedChildren=gn(["all","choice","enumeration","sequence","attribute"])}description(e,t){let n=this.children,s,i=!1,a={};for(let c of n){if(c instanceof pa){a[c.$name]=c.description(e);continue}!i&&(c instanceof gv||c instanceof mv)&&(i=!0,s=c.description(e,t))}if(Object.keys(a).length>0&&(s=s??{},s[pa.Symbol]=a),s&&this.$base){let c=(0,fs.splitQName)(this.$base),l=c.name,h=yc(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[pa.Symbol]&&ha.defaults(a,y[pa.Symbol]),s=ha.defaults(s,y)}return s}let u=this.children.map(c=>c.description()).join(",");return[this.$base,u].filter(Boolean).join("|")}};ft.RestrictionElement=LE;var VE=class extends yr{static{o(this,"ExtensionElement")}constructor(){super(...arguments),this.allowedChildren=gn(["all","choice","sequence"])}description(e,t){let n={};for(let s of this.children)(s instanceof gv||s instanceof mv)&&(n=s.description(e,t));if(this.$base){let s=(0,fs.splitQName)(this.$base),i=s.name,a=yc(s.prefix,t,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(i in OE)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:ha.defaults(l,n)}}}return n}};ft.ExtensionElement=VE;var mv=class extends yr{static{o(this,"ChoiceElement")}constructor(){super(...arguments),this.allowedChildren=gn(["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=mv;var Ij=class extends yr{static{o(this,"EnumerationElement")}description(){return this[this.valueKey]}};ft.EnumerationElement=Ij;var UE=class extends yr{static{o(this,"ComplexTypeElement")}constructor(){super(...arguments),this.allowedChildren=gn(["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 pa){i[u.$name]=u.description(e);continue}!s&&(u instanceof mv||u instanceof gv||u instanceof Y_||u instanceof J_||u instanceof z_)&&(s=!0,n=u.description(e,t))}return Object.keys(i).length>0&&(n[pa.Symbol]=i),n}};ft.ComplexTypeElement=UE;var z_=class extends yr{static{o(this,"ComplexContentElement")}constructor(){super(...arguments),this.allowedChildren=gn(["extension","restriction"])}description(e,t){for(let n of this.children)if(n instanceof VE||n instanceof LE)return n.description(e,t);return{}}};ft.ComplexContentElement=z_;var J_=class extends yr{static{o(this,"SimpleContentElement")}constructor(){super(...arguments),this.allowedChildren=gn(["extension"])}description(e,t){for(let n of this.children)if(n instanceof VE)return n.description(e,t);return{}}};ft.SimpleContentElement=J_;var gv=class extends yr{static{o(this,"SequenceElement")}constructor(){super(...arguments),this.allowedChildren=gn(["any","choice","element","sequence"])}description(e,t){let n={};for(let s of this.children){if(s instanceof PE)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ft.SequenceElement=gv;var pa=class extends yr{static{o(this,"AttributeElement")}description(e){return{type:this.$type,required:this.$use==="required"}}};ft.AttributeElement=pa;pa.Symbol=Symbol("$attributes");var Y_=class extends yr{static{o(this,"AllElement")}constructor(){super(...arguments),this.allowedChildren=gn(["choice","element"])}description(e,t){let n={};for(let s of this.children){if(s instanceof PE)continue;let i=s.description(e,t);for(let a in i)n[a]=i[a]}return n}};ft.AllElement=Y_;var Q_=class extends yr{static{o(this,"MessageElement")}constructor(){super(...arguments),this.allowedChildren=gn(["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,fs.splitQName)(t.$element),a=yc(i.prefix,this.definitionsXmlns,e.xmlns),u=e.schemas[a];if(this.element=u.elements[i.name],!this.element){Ale(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,fs.splitQName)(this.element.$type),h=yc(l.prefix,u.xmlns,this.definitionsXmlns,e.xmlns);if(h&&!(l.name in OE)){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,X_.ok)(i.name==="part","Expected part element");let a=(0,fs.splitQName)(i.$type),u=yc(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,fs.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=Q_;var _j=class extends yr{static{o(this,"DocumentationElement")}};ft.DocumentationElement=_j;var dv=class Dj extends yr{static{o(this,"SchemaElement")}constructor(){super(...arguments),this.allowedChildren=gn(["complexType","element","import","include","simpleType"]),this.complexTypes={},this.types={},this.elements={},this.includes=[]}merge(e){return(0,X_.ok)(e instanceof Dj),ha.merge(this.complexTypes,e.complexTypes),ha.merge(this.types,e.types),ha.merge(this.elements,e.elements),ha.merge(this.xmlns,e.xmlns),ha.merge(this,ha.pickBy(e,(t,n)=>n.startsWith("$")&&!Object.hasOwnProperty.call(this,n))),this}addChild(e){if(!(e.$name in OE)){if(e instanceof sD||e instanceof iD){let t=e.$schemaLocation||e.$location;t&&this.includes.push({namespace:e.$namespace||e.$targetNamespace||this.$targetNamespace,location:t})}else e instanceof UE?this.complexTypes[e.$name]=e:e instanceof W_?this.elements[e.$name]=e:e instanceof kE&&(this.types[e.$name]=e);this.children.pop()}}};ft.SchemaElement=dv;var Z_=class extends yr{static{o(this,"TypesElement")}constructor(){super(...arguments),this.allowedChildren=gn(["documentation","schema"]),this.schemas={}}addChild(e){(0,X_.ok)(e instanceof dv);let t=e.includes.find(i=>Object.hasOwnProperty.call(i,"namespace")),n=typeof t<"u"&&Object.hasOwnProperty.call(t,"namespace")&&e instanceof dv?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=Z_;var Bj=class Rj extends yr{static{o(this,"OperationElement")}constructor(){super(...arguments),this.allowedChildren=gn(["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 Rj&&(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,fs.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=Bj;var eD=class extends yr{static{o(this,"PortTypeElement")}constructor(){super(...arguments),this.allowedChildren=gn(["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=eD;var tD=class extends yr{static{o(this,"BindingElement")}constructor(){super(...arguments),this.allowedChildren=gn(["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,fs.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=tD;var Oj=class extends yr{static{o(this,"PortElement")}constructor(){super(...arguments),this.allowedChildren=gn(["address","documentation"]),this.location=null}addChild(e){e.name==="address"&&typeof e.$location<"u"&&(this.location=e.$location)}};ft.PortElement=Oj;var rD=class extends yr{static{o(this,"ServiceElement")}constructor(){super(...arguments),this.allowedChildren=gn(["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,fs.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=rD;var nD=class extends yr{static{o(this,"DefinitionsElement")}constructor(){super(...arguments),this.allowedChildren=gn(["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 Z_)ha.merge(this.schemas,e.schemas);else if(e instanceof Q_)this.messages[e.$name]=e;else if(e.name==="import"){let t=new dv(e.$namespace,{});t.init(),this.schemas[e.$namespace]=t,this.schemas[e.$namespace].addChild(e)}else e instanceof eD?this.portTypes[e.$name]=e:e instanceof tD?(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 rD&&(this.services[e.$name]=e);this.children.pop()}};ft.DefinitionsElement=nD;var jE=class extends yr{static{o(this,"BodyElement")}};ft.BodyElement=jE;var sD=class extends yr{static{o(this,"IncludeElement")}};ft.IncludeElement=sD;var iD=class extends yr{static{o(this,"ImportElement")}};ft.ImportElement=iD;var Cle={all:Y_,any:PE,binding:tD,body:jE,choice:mv,complexContent:z_,complexType:UE,definitions:nD,documentation:_j,element:W_,enumeration:Ij,extension:VE,fault:yr,import:iD,include:sD,input:Nj,message:Q_,operation:Bj,output:Tj,port:Oj,portType:eD,restriction:LE,schema:dv,sequence:gv,service:rD,simpleContent:J_,simpleType:kE,types:Z_,attribute:pa};function gn(r){let e={};for(let t of r)e[t.replace(/^_/,"")]=Cle[t]||yr;return e}o(gn,"buildAllowedChildren");function yc(r,...e){for(let t of e)if(t?.[r])return t[r]}o(yc,"findNs")});var uD=re(Gs=>{"use strict";var Nle=Gs&&Gs.__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]}),Tle=Gs&&Gs.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),gd=Gs&&Gs.__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"&&Nle(t,e,n[s]);return Tle(t,e),t}})(),Uj=Gs&&Gs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.WSDL=void 0;Gs.trim=oD;Gs.open_wsdl=jj;var Ile=Je("assert"),_le=Uj(Hp()),Dle=gd(Je("fs")),kj=gd(Mo()),vv=gd(Je("path")),FE=gd(wj()),Ble=Uj(Ej()),Rle=gd(Je("url")),Ole=oE(),Ple=bj(),Or=lc(),hf=gd(Pj()),Lj=(0,_le.default)("node-soap"),Vj="http://www.w3.org/2001/XMLSchema-instance",kle="http://schemas.xmlsoap.org/soap/envelope/";function oD(r){return r.trim()}o(oD,"trim");function ME(r){return r&&r.charAt(r.length-1)!==":"?r+":":r}o(ME,"appendColon");function aD(r){return r&&r.charAt(r.length-1)===":"?r.substring(0,r.length-1):r}o(aD,"noColonNameSpace");var qE=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,Ble.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 S=g[v].input.$name,w="";g[v].output&&(w=g[v].output.$name),y[S]={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=FE.createStream(!0,null);return e.pipe(t),t}xmlToObject(e,t){let n=typeof t=="function"?{}:FE.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,S=y.attributes,w=(0,Or.splitQName)(v).name,C,_=u[u.length-1],b=_.schema,A={},T=!1,B=!1,M={},I=w;if(S.href){let q=S.href.substr(1);m[q]||(m[q]={hrefs:[],obj:null}),m[q].hrefs.push({par:_.object,key:w,obj:M})}S.id&&(m[S.id]||(m[S.id]={hrefs:[],obj:null}));for(C in S){let q=S[C];if(/^xmlns:|^xmlns$/.test(C)){let W=(0,Or.splitQName)(C).name;h[W]=q,q===Vj&&c.set(W,q),q===kle&&(l=W);continue}T=!0,A[C]=q}for(C in A){let q=(0,Or.splitQName)(C);if(q.name==="nil"&&h[q.prefix]===Vj&&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,Or.splitQName)(K),W;q.prefix===Or.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:S.id,nil:B})},n.onclosetag=y=>{let v=u.pop(),S=v.object,w=u[u.length-1],C=w.object,_=w.schema,b=(0,Or.splitQName)(y).name;if(typeof v.schema=="string"&&(v.schema==="string"||v.schema.split(":")[1]==="string")&&typeof S=="object"&&Object.keys(S).length===0&&(S=v.object=this.options.preserveWhitespace&&v.text||""),v.nil===!0)if(this.options.handleNilAsNull)S=null;else return;kj.isPlainObject(S)&&!Object.keys(S).length&&(S=null),_&&_[b+"[]"]?(C[b]||(C[b]=[]),C[b].push(S)):b in C?(Array.isArray(C[b])||(C[b]=[C[b]]),C[b].push(S)):C[b]=S,v.id&&(m[v.id].obj=S)},n.oncdata=y=>{let v=y;if(y=oD(y),!!y.length)if(/<\?xml[\s\S]+\?>/.test(y)){let S=u[u.length-1],w=this.xmlToObject(y);S.object[this.options.attributesKey]?S.object[this.options.valueKey]=w:S.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],S=y;if(y=oD(y),!y.length){this.options.preserveWhitespace&&(v.text=(v.text||"")+S);return}let w=(0,Or.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=S),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=FE.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(S){return t(S)}t(null,v)});return}return n.write(e).close(),g();function g(){for(let y in m){let v=m[y];for(let S of v.hrefs)Object.assign(S.obj,v.obj)}if(i.Envelope){let y=i.Envelope.Body;if(y&&y.Fault){let v=y.Fault,S=v.faultcode&&v.faultcode.$value,w=v.faultstring&&v.faultstring.$value,C=v.detail&&v.detail.$value;S=S||v.faultcode,w=w||v.faultstring,C=C||v.detail,S=S||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(S+": "+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,Or.findPrefix)(u.xmlns,s),s=s||u.xmlns[n],n=n===Or.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,Or.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=aD(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=aD(h),this.isIgnoredNameSpace(h)&&(h="");let m=!l,g=l&&l.$elementFormDefault==="qualified",y=[],v=(n||g)&&n!==Or.TNS_PREFIX,S="";s&&i&&(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes?this.options.overrideRootElement.xmlnsAttributes.forEach(b=>{S+=" "+b.name+'="'+b.value+'"'}):(v&&!this.isIgnoredNameSpace(n)&&(S+=" xmlns:"+n+'="'+s+'"'),(g||m)&&(S+=' xmlns="'+s+'"'))),c?c.pushContext():(c=new Ple.NamespaceContext,c.declareNamespace(n,s)),a&&!(this.options.overrideRootElement&&this.options.overrideRootElement.xmlnsAttributes)&&(S=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,S];A||(K=["<",ME(I),t,M,S]),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(["</",ME(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,Or.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,Or.splitQName)(Y),he=Y.name,Y.prefix===Or.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+'"',S.includes(W)||(b=ue,S+=ue))}let ve;if(q.$type){let Oe=(0,Or.splitQName)(q.$type),ze=q.$baseNameSpace||Oe.prefix,ne=l.xmlns[ze]||this.definitions.xmlns[ze];pe=ne,ne!=="http://www.w3.org/2001/XMLSchema"&&ze!==Or.TNS_PREFIX&&c.addNamespace(ze,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=aD(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?"":ME(M||w),t,T,S,A===null?' xsi:nil="true"':"",K?" />":">"].join("")),K||(y.push(B),Array.isArray(A)||y.push(["</",I?"":ME(M||w),t,">"].join("")))}}else e!==void 0&&y.push(this.options.escapeXML?(0,Or.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,Or.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,Or.splitQName)(u.$ref),a.name===t))return u;let c;if(u.$type&&n.length===1){let l=(0,Or.splitQName)(u.$type);l.prefix===Or.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,Or.splitQName)(u.$base);c=e.$targetNamespace,l.prefix!==Or.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,Or.splitQName)(l.$base),m=h.prefix===Or.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=vv.resolve(vv.dirname(this.uri),vv.parse(n.location).base):s=vv.resolve(vv.dirname(this.uri),n.location):s=Rle.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)}Lle(s,i,(a,u)=>{if(a)return t(a);if(this._includesWsdl.push(u),u.definitions instanceof hf.DefinitionsElement)kj.mergeWith(this.definitions,u.definitions,(c,l)=>c instanceof hf.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=FE.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,Or.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 hf.Element(h,m,c,u))}else if(y==="definitions")s=new hf.DefinitionsElement(h,m,c),n.push(s);else if(y==="schema")s=new hf.DefinitionsElement("definitions",{},{}),i=new hf.TypesElement("types",{},{}),a=new hf.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,Ile.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===Or.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}};Gs.WSDL=qE;function Lle(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):jj(r,n,s)}o(Lle,"open_wsdl_recursive");function jj(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 qE(r,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s)):/^https?:/i.test(r)?(Lj("Reading url: %s",r),(n.httpClient||new Ole.HttpClient(n)).request(r,null,(h,m,g)=>{h?s(h):m&&m.status===200?(c=new qE(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)):(Lj("Reading file: %s",r),Dle.readFile(r,"utf8",(l,h)=>{l?s(l):(c=new qE(h,r,n),i[r]=c,c.WSDL_CACHE=i,c.onReady(s))})),c}o(jj,"open_wsdl")});var Mj=re(Fj=>{"use strict";Object.defineProperty(Fj,"__esModule",{value:!0})});var $j=re(Ut=>{"use strict";var qj=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]}),Vle=Ut&&Ut.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Ule=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"&&qj(t,e,n[s]);return Vle(t,e),t}})(),jle=Ut&&Ut.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&qj(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=Kj;Ut.createClientAsync=Yle;Ut.listen=Qle;var Fle=l_(),Mle=Ule($_()),qle=G_(),Hle=lc(),Hj=uD();Ut.security=Mle;var Kle=l_();Object.defineProperty(Ut,"Client",{enumerable:!0,get:o(function(){return Kle.Client},"get")});var $le=oE();Object.defineProperty(Ut,"HttpClient",{enumerable:!0,get:o(function(){return $le.HttpClient},"get")});var Xo=$_();Object.defineProperty(Ut,"BasicAuthSecurity",{enumerable:!0,get:o(function(){return Xo.BasicAuthSecurity},"get")});Object.defineProperty(Ut,"BearerSecurity",{enumerable:!0,get:o(function(){return Xo.BearerSecurity},"get")});Object.defineProperty(Ut,"ClientSSLSecurity",{enumerable:!0,get:o(function(){return Xo.ClientSSLSecurity},"get")});Object.defineProperty(Ut,"ClientSSLSecurityPFX",{enumerable:!0,get:o(function(){return Xo.ClientSSLSecurityPFX},"get")});Object.defineProperty(Ut,"NTLMSecurity",{enumerable:!0,get:o(function(){return Xo.NTLMSecurity},"get")});Object.defineProperty(Ut,"WSSecurity",{enumerable:!0,get:o(function(){return Xo.WSSecurity},"get")});Object.defineProperty(Ut,"WSSecurityCert",{enumerable:!0,get:o(function(){return Xo.WSSecurityCert},"get")});Object.defineProperty(Ut,"WSSecurityPlusCert",{enumerable:!0,get:o(function(){return Xo.WSSecurityPlusCert},"get")});Object.defineProperty(Ut,"WSSecurityCertWithToken",{enumerable:!0,get:o(function(){return Xo.WSSecurityCertWithToken},"get")});var Gle=G_();Object.defineProperty(Ut,"Server",{enumerable:!0,get:o(function(){return Gle.Server},"get")});var Xle=lc();Object.defineProperty(Ut,"passwordDigest",{enumerable:!0,get:o(function(){return Xle.passwordDigest},"get")});jle(Mj(),Ut);var Wle=uD();Object.defineProperty(Ut,"WSDL",{enumerable:!0,get:o(function(){return Wle.WSDL},"get")});function zle(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(zle,"getFromCache");function Jle(r,e,t){typeof e=="function"&&(t=e,e={});let n=o(s=>{(0,Hj.open_wsdl)(r,e,s)},"openWsdl");if(e.disableCache===!0)n(t);else{let s;e.wsdlCache?s=e.wsdlCache:s=Hle.wsdlCacheSingleton,zle(r,s,n,t)}}o(Jle,"_requestWSDL");function Kj(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,Jle(r,a,(u,c)=>{i(u,c&&new Fle.Client(c,s,a))})}o(Kj,"createClient");function Yle(r,e,t){return typeof e>"u"&&(e={}),new Promise((n,s)=>{Kj(r,e,(i,a)=>{i&&s(i),n(a)},t)})}o(Yle,"createClientAsync");function Qle(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 Hj.WSDL(n||t,u,i);return new qle.Server(r,a,t,c,i)}o(Qle,"listen")});var ub=re(kD=>{"use strict";(function(){kD.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:`
|
|
89
|
+
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(kD)});var co=re((rM,Ec)=>{"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"),Ec.exports.assign=r,Ec.exports.isFunction=s,Ec.exports.isObject=i,Ec.exports.isArray=t,Ec.exports.isEmpty=n,Ec.exports.isPlainObject=a,Ec.exports.getValue=e}).call(rM)});var LD=re((nM,sM)=>{"use strict";(function(){var r;sM.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(nM)});var oM=re((iM,aM)=>{"use strict";(function(){var r;aM.exports=r=(function(){function e(){}return o(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(t){throw new Error(t)},e})()}).call(iM)});var lM=re((uM,cM)=>{"use strict";(function(){var r;cM.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(uM)});var pM=re((fM,hM)=>{"use strict";(function(){var r,e,t;e=oM(),t=lM(),hM.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(fM)});var vn=re((dM,mM)=>{"use strict";(function(){mM.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(dM)});var VD=re((gM,vM)=>{"use strict";(function(){var r,e,t;r=vn(),t=hi(),vM.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(gM)});var cb=re((yM,xM)=>{"use strict";(function(){var r;xM.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(yM)});var lb=re((wM,SM)=>{"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=co(),u=c.isObject,a=c.isFunction,i=c.getValue,s=hi(),r=vn(),e=VD(),n=cb(),SM.exports=t=(function(m){l(g,m);function g(y,v,S){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,S!=null&&this.attribute(S),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,S,w;S=Object.create(this),S.isRoot&&(S.documentObject=null),S.attribs={},w=this.attribs;for(v in w)h.call(w,v)&&(y=w[v],S.attribs[v]=y.clone());return S.children=[],this.children.forEach(function(C){var _;return _=C.clone(),_.parent=S,S.children.push(_)}),S},g.prototype.attribute=function(y,v){var S,w;if(y!=null&&(y=i(y)),u(y))for(S in y)h.call(y,S)&&(w=y[S],this.attribute(S,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,S,w;if(y==null)throw new Error("Missing attribute name. "+this.debugInfo());if(y=i(y),Array.isArray(y))for(S=0,w=y.length;S<w;S++)v=y[S],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,S){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,S){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,S,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=S=0,w=this.attribs.length-1;0<=w?S<=w:S>=w;v=0<=w?++S:--S)if(!this.attribs[v].isEqualNode(y.attribs[v]))return!1;return!0},g})(s)}).call(wM)});var Bv=re((EM,bM)=>{"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=hi(),bM.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(EM)});var fb=re((AM,CM)=>{"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=vn(),t=Bv(),CM.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(AM)});var hb=re((NM,TM)=>{"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=vn(),e=Bv(),TM.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(NM)});var pb=re((IM,_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=co().isObject,t=hi(),r=vn(),_M.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(IM)});var db=re((DM,BM)=>{"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=hi(),r=vn(),BM.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(DM)});var mb=re((RM,OM)=>{"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=co().isObject,t=hi(),r=vn(),OM.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(RM)});var gb=re((PM,kM)=>{"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=hi(),r=vn(),kM.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(PM)});var vb=re((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;t=hi(),r=vn(),VM.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(LM)});var yb=re((UM,jM)=>{"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=co().isObject,u=hi(),r=vn(),e=db(),n=mb(),t=gb(),s=vb(),a=cb(),jM.exports=i=(function(m){l(g,m);function g(y,v,S){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,S=A.sysID),S==null&&(T=[v,S],S=T[0],v=T[1]),v!=null&&(this.pubID=this.stringify.dtdPubID(v)),S!=null&&(this.sysID=this.stringify.dtdSysID(S))}return o(g,"XMLDocType"),Object.defineProperty(g.prototype,"entities",{get:o(function(){var y,v,S,w,C;for(w={},C=this.children,v=0,S=C.length;v<S;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,S,w,C;for(w={},C=this.children,v=0,S=C.length;v<S;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 S;return S=new t(this,y,v),this.children.push(S),this},g.prototype.attList=function(y,v,S,w,C){var _;return _=new e(this,y,v,S,w,C),this.children.push(_),this},g.prototype.entity=function(y,v){var S;return S=new n(this,!1,y,v),this.children.push(S),this},g.prototype.pEntity=function(y,v){var S;return S=new n(this,!0,y,v),this.children.push(S),this},g.prototype.notation=function(y,v){var S;return S=new s(this,y,v),this.children.push(S),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,S,w,C){return this.attList(y,v,S,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(UM)});var xb=re((FM,MM)=>{"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=vn(),e=hi(),MM.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(FM)});var wb=re((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;r=vn(),e=Bv(),HM.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(qM)});var Sb=re((KM,$M)=>{"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=vn(),e=Bv(),$M.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(KM)});var UD=re((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=hi(),r=vn(),XM.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(GM)});var JM=re((WM,zM)=>{"use strict";(function(){var r;zM.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(WM)});var ZM=re((YM,QM)=>{"use strict";(function(){QM.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(YM)});var hi=re((e9,t9)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l,h,m,g,y,v,S,w,C,_,b={}.hasOwnProperty;_=co(),C=_.isObject,w=_.isFunction,S=_.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,t9.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=lb(),t=fb(),n=hb(),s=pb(),i=yb(),g=xb(),y=wb(),m=Sb(),a=UD(),e=vn(),h=JM(),c=cb(),r=ZM())}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)&&S(Oe))he=this.dummy();else if(C(Oe)&&S(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(e9)});var jD=re((r9,n9)=>{"use strict";(function(){var r,e=o(function(n,s){return function(){return n.apply(s,arguments)}},"bind"),t={}.hasOwnProperty;n9.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(r9)});var Rv=re((s9,i9)=>{"use strict";(function(){i9.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(s9)});var FD=re((a9,o9)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l,h,m,g,y,v,S,w,C={}.hasOwnProperty;w=co().assign,r=vn(),c=pb(),l=yb(),t=fb(),n=hb(),m=lb(),y=xb(),v=wb(),g=Sb(),h=UD(),s=db(),i=gb(),a=mb(),u=vb(),e=Rv(),o9.exports=S=(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:`
|
|
90
|
+
`,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,ze;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,ze=b.children,q=0,he=ze.length;q<he;q++)M=ze[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(a9)});var Eb=re((u9,c9)=>{"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=FD(),c9.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(u9)});var MD=re((l9,f9)=>{"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=co().isPlainObject,t=LD(),e=pM(),s=hi(),r=vn(),a=jD(),i=Eb(),f9.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,S;for(S=this.children,y=0,v=S.length;y<v;y++)if(g=S[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(l9)});var d9=re((h9,p9)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l,h,m,g,y,v,S,w,C,_,b,A,T,B,M,I={}.hasOwnProperty;M=co(),T=M.isObject,A=M.isFunction,B=M.isPlainObject,b=M.getValue,r=vn(),m=MD(),y=lb(),n=fb(),s=hb(),S=xb(),_=wb(),v=Sb(),l=pb(),h=yb(),i=db(),u=mb(),a=gb(),c=vb(),t=VD(),C=jD(),w=Eb(),e=Rv(),p9.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 S(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(h9)});var v9=re((m9,g9)=>{"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=vn(),n=FD(),e=Rv(),g9.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,S,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,S=C.length;y<S;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,S,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,S=0,w=A.length;S<w;S++)g=A[S],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(m9)});var x9=re((y9,bc)=>{"use strict";(function(){var r,e,t,n,s,i,a,u,c,l;l=co(),u=l.assign,c=l.isFunction,t=LD(),n=MD(),s=d9(),a=Eb(),i=v9(),r=vn(),e=Rv(),bc.exports.create=function(h,m,g,y){var v,S;if(h==null)throw new Error("Root element needs a name.");return y=u({},m,g,y),v=new n(y),S=v.element(h),y.headless||(v.declaration(y),(y.pubID!=null||y.sysID!=null)&&v.dtd(y)),S},bc.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)},bc.exports.stringWriter=function(h){return new a(h)},bc.exports.streamWriter=function(h,m){return new i(h,m)},bc.exports.implementation=new t,bc.exports.nodeType=r,bc.exports.writerState=e}).call(y9)});var w9=re(qD=>{"use strict";(function(){"use strict";var r,e,t,n,s,i={}.hasOwnProperty;r=x9(),e=ub().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,S){var w,C,_,b,A,T;if(typeof S!="object")y.options.cdata&&n(S)?v.raw(s(S)):v.txt(S);else if(Array.isArray(S)){for(b in S)if(i.call(S,b)){C=S[b];for(A in C)_=C[A],v=h(v.ele(A),_).up()}}else for(A in S)if(i.call(S,A))if(C=S[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 S9=re(bb=>{"use strict";(function(r){r.parser=function(N,E){return new t(N,E)},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,E){if(!(this instanceof t))return new t(N,E);var G=this;s(G),G.q=G.c="",G.bufferCheckPosition=r.MAX_BUFFER_LENGTH,G.opt=E||{},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 E(){}o(E,"F"),E.prototype=N;var G=new E;return G}),Object.keys||(Object.keys=function(N){var E=[];for(var G in N)N.hasOwnProperty(G)&&E.push(G);return E});function n(N){for(var E=Math.max(r.MAX_BUFFER_LENGTH,10),G=0,P=0,Se=e.length;P<Se;P++){var Ce=N[e[P]].length;if(Ce>E)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 E=0,G=e.length;E<G;E++)N[e[E]]=""}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:tt,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=Je("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,E){return new l(N,E)}o(c,"createStream");function l(N,E){if(!(this instanceof l))return new l(N,E);a.apply(this),this._parser=new t(N,E),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(Se){if(!Se)return G.removeAllListeners(P),G._parser["on"+P]=Se,Se;G.on(P,Se)},"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 E=Je("string_decoder").StringDecoder;this._decoder=new E("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,E){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,E)};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},S=/[:_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===`
|
|
91
|
+
`||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,E){return N.test(E)}o(B,"isMatch");function M(N,E){return!B(N,E)}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 E=r.ENTITIES[N],G=typeof E=="number"?String.fromCharCode(E):E;r.ENTITIES[N]=G});for(var H in r.STATE)r.STATE[r.STATE[H]]=H;I=r.STATE;function K(N,E,G){N[E]&&N[E](G)}o(K,"emit");function q(N,E,G){N.textNode&&W(N),K(N,E,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,E){return N.trim&&(E=E.trim()),N.normalize&&(E=E.replace(/\s+/g," ")),E}o(he,"textopts");function pe(N,E){return W(N),N.trackPosition&&(E+=`
|
|
92
|
+
Line: `+N.line+`
|
|
93
|
+
Column: `+N.column+`
|
|
94
|
+
Char: `+N.c),E=new Error(E),N.error=E,K(N,"onerror",E),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,E){if(typeof N!="object"||!(N instanceof t))throw new Error("bad call to strictFail");N.strict&&pe(N,E)}o(Y,"strictFail");function ve(N){N.strict||(N.tagName=N.tagName[N.looseCase]());var E=N.tags[N.tags.length-1]||N,G=N.tag={name:N.tagName,attributes:{}};N.opt.xmlns&&(G.ns=E.ns),N.attribList.length=0,q(N,"onopentagstart",G)}o(ve,"newTag");function Oe(N,E){var G=N.indexOf(":"),P=G<0?["",N]:N.split(":"),Se=P[0],Ce=P[1];return E&&N==="xmlns"&&(Se="xmlns",Ce=""),{prefix:Se,local:Ce}}o(Oe,"qname");function ze(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 E=Oe(N.attribName,!0),G=E.prefix,P=E.local;if(G==="xmlns")if(P==="xml"&&N.attribValue!==g)Y(N,"xml: prefix must be bound to "+g+`
|
|
95
|
+
Actual: `+N.attribValue);else if(P==="xmlns"&&N.attribValue!==y)Y(N,"xmlns: prefix must be bound to "+y+`
|
|
96
|
+
Actual: `+N.attribValue);else{var Se=N.tag,Ce=N.tags[N.tags.length-1]||N;Se.ns===Ce.ns&&(Se.ns=Object.create(Ce.ns)),Se.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(ze,"attrib");function ne(N,E){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 Se=N.tags[N.tags.length-1]||N;G.ns&&Se.ns!==G.ns&&Object.keys(G.ns).forEach(function(Cn){q(N,"onopennamespace",{prefix:Cn,uri:G.ns[Cn]})});for(var Ce=0,Ae=N.attribList.length;Ce<Ae;Ce++){var Ye=N.attribList[Ce],Tt=Ye[0],Me=Ye[1],Et=Oe(Tt,!0),zr=Et.prefix,Qe=Et.local,_r=zr===""?"":G.ns[zr]||"",$r={name:Tt,value:Me,prefix:zr,local:Qe,uri:_r};zr&&zr!=="xmlns"&&!_r&&(Y(N,"Unbound namespace prefix: "+JSON.stringify(zr)),$r.uri=zr),N.tag.attributes[Tt]=$r,q(N,"onattribute",$r)}N.attribList.length=0}N.tag.isSelfClosing=!!E,N.sawRoot=!0,N.tags.push(N.tag),q(N,"onopentag",N.tag),E||(!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 E=N.tags.length,G=N.tagName;N.strict||(G=G[N.looseCase]());for(var P=G;E--;){var Se=N.tags[E];if(Se.name!==P)Y(N,"Unexpected close tag");else break}if(E<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-- >E;){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(Et){var zr=Ae.ns[Et];q(N,"onclosenamespace",{prefix:Et,uri:zr})})}E===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=I.TEXT}o(Z,"closeTag");function Ee(N){var E=N.entity,G=E.toLowerCase(),P,Se="";return N.ENTITIES[E]?N.ENTITIES[E]:N.ENTITIES[G]?N.ENTITIES[G]:(E=G,E.charAt(0)==="#"&&(E.charAt(1)==="x"?(E=E.slice(2),P=parseInt(E,16),Se=P.toString(16)):(E=E.slice(1),P=parseInt(E,10),Se=P.toString(10))),E=E.replace(/^0+/,""),isNaN(P)||Se.toLowerCase()!==E?(Y(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(P))}o(Ee,"parseEntity");function He(N,E){E==="<"?(N.state=I.OPEN_WAKA,N.startTagPosition=N.position):b(E)||(Y(N,"Non-whitespace before first tag."),N.textNode=E,N.state=I.TEXT)}o(He,"beginWhiteSpace");function Le(N,E){var G="";return E<N.length&&(G=N.charAt(E)),G}o(Le,"charAt");function tt(N){var E=this;if(this.error)throw this.error;if(E.closed)return pe(E,"Cannot write after close. Assign an onready handler.");if(N===null)return ue(E);typeof N=="object"&&(N=N.toString());for(var G=0,P="";P=Le(N,G++),E.c=P,!!P;)switch(E.trackPosition&&(E.position++,P===`
|
|
97
|
+
`?(E.line++,E.column=0):E.column++),E.state){case I.BEGIN:if(E.state=I.BEGIN_WHITESPACE,P==="\uFEFF")continue;He(E,P);continue;case I.BEGIN_WHITESPACE:He(E,P);continue;case I.TEXT:if(E.sawRoot&&!E.closedRoot){for(var Se=G-1;P&&P!=="<"&&P!=="&";)P=Le(N,G++),P&&E.trackPosition&&(E.position++,P===`
|
|
98
|
+
`?(E.line++,E.column=0):E.column++);E.textNode+=N.substring(Se,G-1)}P==="<"&&!(E.sawRoot&&E.closedRoot&&!E.strict)?(E.state=I.OPEN_WAKA,E.startTagPosition=E.position):(!b(P)&&(!E.sawRoot||E.closedRoot)&&Y(E,"Text data outside of root node."),P==="&"?E.state=I.TEXT_ENTITY:E.textNode+=P);continue;case I.SCRIPT:P==="<"?E.state=I.SCRIPT_ENDING:E.script+=P;continue;case I.SCRIPT_ENDING:P==="/"?E.state=I.CLOSE_TAG:(E.script+="<"+P,E.state=I.SCRIPT);continue;case I.OPEN_WAKA:if(P==="!")E.state=I.SGML_DECL,E.sgmlDecl="";else if(!b(P))if(B(S,P))E.state=I.OPEN_TAG,E.tagName=P;else if(P==="/")E.state=I.CLOSE_TAG,E.tagName="";else if(P==="?")E.state=I.PROC_INST,E.procInstName=E.procInstBody="";else{if(Y(E,"Unencoded <"),E.startTagPosition+1<E.position){var Ce=E.position-E.startTagPosition;P=new Array(Ce).join(" ")+P}E.textNode+="<"+P,E.state=I.TEXT}continue;case I.SGML_DECL:if(E.sgmlDecl+P==="--"){E.state=I.COMMENT,E.comment="",E.sgmlDecl="";continue}E.doctype&&E.doctype!==!0&&E.sgmlDecl?(E.state=I.DOCTYPE_DTD,E.doctype+="<!"+E.sgmlDecl+P,E.sgmlDecl=""):(E.sgmlDecl+P).toUpperCase()===h?(q(E,"onopencdata"),E.state=I.CDATA,E.sgmlDecl="",E.cdata=""):(E.sgmlDecl+P).toUpperCase()===m?(E.state=I.DOCTYPE,(E.doctype||E.sawRoot)&&Y(E,"Inappropriately located doctype declaration"),E.doctype="",E.sgmlDecl=""):P===">"?(q(E,"onsgmldeclaration",E.sgmlDecl),E.sgmlDecl="",E.state=I.TEXT):(A(P)&&(E.state=I.SGML_DECL_QUOTED),E.sgmlDecl+=P);continue;case I.SGML_DECL_QUOTED:P===E.q&&(E.state=I.SGML_DECL,E.q=""),E.sgmlDecl+=P;continue;case I.DOCTYPE:P===">"?(E.state=I.TEXT,q(E,"ondoctype",E.doctype),E.doctype=!0):(E.doctype+=P,P==="["?E.state=I.DOCTYPE_DTD:A(P)&&(E.state=I.DOCTYPE_QUOTED,E.q=P));continue;case I.DOCTYPE_QUOTED:E.doctype+=P,P===E.q&&(E.q="",E.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:P==="]"?(E.doctype+=P,E.state=I.DOCTYPE):P==="<"?(E.state=I.OPEN_WAKA,E.startTagPosition=E.position):A(P)?(E.doctype+=P,E.state=I.DOCTYPE_DTD_QUOTED,E.q=P):E.doctype+=P;continue;case I.DOCTYPE_DTD_QUOTED:E.doctype+=P,P===E.q&&(E.state=I.DOCTYPE_DTD,E.q="");continue;case I.COMMENT:P==="-"?E.state=I.COMMENT_ENDING:E.comment+=P;continue;case I.COMMENT_ENDING:P==="-"?(E.state=I.COMMENT_ENDED,E.comment=he(E.opt,E.comment),E.comment&&q(E,"oncomment",E.comment),E.comment=""):(E.comment+="-"+P,E.state=I.COMMENT);continue;case I.COMMENT_ENDED:P!==">"?(Y(E,"Malformed comment"),E.comment+="--"+P,E.state=I.COMMENT):E.doctype&&E.doctype!==!0?E.state=I.DOCTYPE_DTD:E.state=I.TEXT;continue;case I.CDATA:P==="]"?E.state=I.CDATA_ENDING:E.cdata+=P;continue;case I.CDATA_ENDING:P==="]"?E.state=I.CDATA_ENDING_2:(E.cdata+="]"+P,E.state=I.CDATA);continue;case I.CDATA_ENDING_2:P===">"?(E.cdata&&q(E,"oncdata",E.cdata),q(E,"onclosecdata"),E.cdata="",E.state=I.TEXT):P==="]"?E.cdata+="]":(E.cdata+="]]"+P,E.state=I.CDATA);continue;case I.PROC_INST:P==="?"?E.state=I.PROC_INST_ENDING:b(P)?E.state=I.PROC_INST_BODY:E.procInstName+=P;continue;case I.PROC_INST_BODY:if(!E.procInstBody&&b(P))continue;P==="?"?E.state=I.PROC_INST_ENDING:E.procInstBody+=P;continue;case I.PROC_INST_ENDING:P===">"?(q(E,"onprocessinginstruction",{name:E.procInstName,body:E.procInstBody}),E.procInstName=E.procInstBody="",E.state=I.TEXT):(E.procInstBody+="?"+P,E.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:B(w,P)?E.tagName+=P:(ve(E),P===">"?ne(E):P==="/"?E.state=I.OPEN_TAG_SLASH:(b(P)||Y(E,"Invalid character in tag name"),E.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:P===">"?(ne(E,!0),Z(E)):(Y(E,"Forward-slash in opening tag not followed by >"),E.state=I.ATTRIB);continue;case I.ATTRIB:if(b(P))continue;P===">"?ne(E):P==="/"?E.state=I.OPEN_TAG_SLASH:B(S,P)?(E.attribName=P,E.attribValue="",E.state=I.ATTRIB_NAME):Y(E,"Invalid attribute name");continue;case I.ATTRIB_NAME:P==="="?E.state=I.ATTRIB_VALUE:P===">"?(Y(E,"Attribute without value"),E.attribValue=E.attribName,ze(E),ne(E)):b(P)?E.state=I.ATTRIB_NAME_SAW_WHITE:B(w,P)?E.attribName+=P:Y(E,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(P==="=")E.state=I.ATTRIB_VALUE;else{if(b(P))continue;Y(E,"Attribute without value"),E.tag.attributes[E.attribName]="",E.attribValue="",q(E,"onattribute",{name:E.attribName,value:""}),E.attribName="",P===">"?ne(E):B(S,P)?(E.attribName=P,E.state=I.ATTRIB_NAME):(Y(E,"Invalid attribute name"),E.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(b(P))continue;A(P)?(E.q=P,E.state=I.ATTRIB_VALUE_QUOTED):(E.opt.unquotedAttributeValues||pe(E,"Unquoted attribute value"),E.state=I.ATTRIB_VALUE_UNQUOTED,E.attribValue=P);continue;case I.ATTRIB_VALUE_QUOTED:if(P!==E.q){P==="&"?E.state=I.ATTRIB_VALUE_ENTITY_Q:E.attribValue+=P;continue}ze(E),E.q="",E.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:b(P)?E.state=I.ATTRIB:P===">"?ne(E):P==="/"?E.state=I.OPEN_TAG_SLASH:B(S,P)?(Y(E,"No whitespace between attributes"),E.attribName=P,E.attribValue="",E.state=I.ATTRIB_NAME):Y(E,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!T(P)){P==="&"?E.state=I.ATTRIB_VALUE_ENTITY_U:E.attribValue+=P;continue}ze(E),P===">"?ne(E):E.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(E.tagName)P===">"?Z(E):B(w,P)?E.tagName+=P:E.script?(E.script+="</"+E.tagName,E.tagName="",E.state=I.SCRIPT):(b(P)||Y(E,"Invalid tagname in closing tag"),E.state=I.CLOSE_TAG_SAW_WHITE);else{if(b(P))continue;M(S,P)?E.script?(E.script+="</"+P,E.state=I.SCRIPT):Y(E,"Invalid tagname in closing tag."):E.tagName=P}continue;case I.CLOSE_TAG_SAW_WHITE:if(b(P))continue;P===">"?Z(E):Y(E,"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(E.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=Ee(E);E.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(Tt)?(E.entity="",E.state=Ae,E.write(Tt)):(E[Ye]+=Tt,E.entity="",E.state=Ae)}else B(E.entity.length?_:C,P)?E.entity+=P:(Y(E,"Invalid character in entity name"),E[Ye]+="&"+E.entity+P,E.entity="",E.state=Ae);continue;default:throw new Error(E,"Unknown state: "+E.state)}return E.position>=E.bufferCheckPosition&&n(E),E}o(tt,"write");String.fromCodePoint||(function(){var N=String.fromCharCode,E=Math.floor,G=o(function(){var P=16384,Se=[],Ce,Ae,Ye=-1,Tt=arguments.length;if(!Tt)return"";for(var Me="";++Ye<Tt;){var Et=Number(arguments[Ye]);if(!isFinite(Et)||Et<0||Et>1114111||E(Et)!==Et)throw RangeError("Invalid code point: "+Et);Et<=65535?Se.push(Et):(Et-=65536,Ce=(Et>>10)+55296,Ae=Et%1024+56320,Se.push(Ce,Ae)),(Ye+1===Tt||Se.length>P)&&(Me+=N.apply(null,Se),Se.length=0)}return Me},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:G,configurable:!0,writable:!0}):String.fromCodePoint=G})()})(typeof bb>"u"?bb.sax={}:bb)});var E9=re(HD=>{"use strict";(function(){"use strict";HD.stripBOM=function(r){return r[0]==="\uFEFF"?r.substring(1):r}}).call(HD)});var KD=re(yf=>{"use strict";(function(){"use strict";var r;r=new RegExp(/(?!xmlns)^.*:/),yf.normalize=function(e){return e.toLowerCase()},yf.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},yf.stripPrefix=function(e){return e.replace(r,"")},yf.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},yf.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(yf)});var b9=re(zo=>{"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 S(){this.constructor=g}return o(S,"ctor"),S.prototype=y.prototype,g.prototype=new S,g.__super__=y.prototype,g},"extend"),m={}.hasOwnProperty;u=S9(),n=Je("events"),r=E9(),a=KD(),c=Je("timers").setImmediate,e=ub().defaults,s=o(function(g){return typeof g=="object"&&g!=null&&Object.keys(g).length===0},"isEmpty"),i=o(function(g,y,v){var S,w,C;for(S=0,w=g.length;S<w;S++)C=g[S],y=C(y,v);return y},"processItem"),t=o(function(g,y,v){var S;return S=Object.create(null),S.value=v,S.writable=!0,S.enumerable=!0,S.configurable=!0,Object.defineProperty(g,y,S)},"defineProperty"),zo.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 S,w,C;if(!(this instanceof zo.Parser))return new zo.Parser(v);this.options={},w=e["0.2"];for(S in w)m.call(w,S)&&(C=w[S],this.options[S]=C);for(S in v)m.call(v,S)&&(C=v[S],this.options[S]=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,S;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(S=w,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(S)}},y.prototype.assignOrPush=function(v,S,w){return S in v?(v[S]instanceof Array||t(v,S,[v[S]]),v[S].push(w)):this.options.explicitArray?t(v,S,[w]):t(v,S,w)},y.prototype.reset=function(){var v,S,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,S=this.options.charkey,this.saxParser.onopentag=(function(_){return function(b){var A,T,B,M,I;if(B={},B[S]="",!_.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[S].match(/^\s*$/)&&!b?(A=I[S],delete I[S]):(_.options.trim&&(I[S]=I[S].trim()),_.options.normalize&&(I[S]=I[S].replace(/\s{2,}/g," ").trim()),I[S]=_.options.valueProcessors?i(_.options.valueProcessors,I[S],M):I[S],Object.keys(I).length===1&&S in I&&!_.EXPLICIT_CHARKEY&&(I=I[S])),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&&S in I&&!_.EXPLICIT_CHARKEY&&(I=I[S])}}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[S]+=b,_.options.explicitChildren&&_.options.preserveChildrenOrder&&_.options.charsAsChildren&&(_.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(T[_.options.childkey]=T[_.options.childkey]||[],A={"#name":"__text__"},A[S]=b,_.options.normalize&&(A[S]=A[S].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,S){var w;S!=null&&typeof S=="function"&&(this.on("end",function(C){return this.reset(),S(null,C)}),this.on("error",function(C){return this.reset(),S(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(S){return function(w,C){return S.parseString(v,function(_,b){return _?C(_):w(b)})}})(this))},y})(n),zo.parseString=function(g,y,v){var S,w,C;return v!=null?(typeof v=="function"&&(S=v),typeof y=="object"&&(w=y)):(typeof y=="function"&&(S=y),w={}),C=new zo.Parser(w),C.parseString(g,S)},zo.parseStringPromise=function(g,y){var v,S;return typeof y=="object"&&(v=y),S=new zo.Parser(v),S.parseStringPromise(g)}}).call(zo)});var A9=re(Jo=>{"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=ub(),r=w9(),t=b9(),n=KD(),Jo.defaults=e.defaults,Jo.processors=n,Jo.ValidationError=(function(a){s(u,a);function u(c){this.message=c}return o(u,"ValidationError"),u})(Error),Jo.Builder=r.Builder,Jo.Parser=t.Parser,Jo.parseString=t.parseString,Jo.parseStringPromise=t.parseStringPromise}).call(Jo)});var BN="http://www.w3.org/2000/09/xmldsig#",G3="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",RN=(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})({}),Uu=(function(r){return r.SHA1="sha1",r.SHA256="sha256",r})({}),ON=(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 Cr={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"},oge=Object.keys(Cr);var cge={Production:"1",Homolog:"2"};var sn=class extends Error{static{o(this,"NFeTsError")}};var X3=class extends sn{static{o(this,"ValidationError")}};var yg={includeComments:!1,exclusive:!0};var PN=o(r=>{throw new sn("Didn't expect to get here")},"unreachable");var wp=class{static{o(this,"Signer")}toolkit;certificateRepository;algorithm;canonical;constructor(e,t,n=Uu.SHA1,s=yg){this.toolkit=e,this.certificateRepository=t,this.algorithm=n,this.canonical=s}assemble(e,t,n){let s=this.certificateRepository.getStringCertificate(n);return{$:{xmlns:BN},SignedInfo:e,SignatureValue:t,KeyInfo:{X509Data:{X509Certificate:s}}}}signedInfo(e,t){return{CanonicalizationMethod:{$:{Algorithm:G3}},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:BN},...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 Uu.SHA256:return ON.SHA256;case Uu.SHA1:return ON.SHA1;default:return PN(this.algorithm)}}get signatureMethod(){switch(this.algorithm){case Uu.SHA256:return RN.RSA_SHA256;case Uu.SHA1:return RN.RSA_SHA1;default:return PN(this.algorithm)}}};var kN=class{static{o(this,"Left")}value;constructor(e){this.value=e}isLeft(){return!0}isRight(){return!1}},Uw=class{static{o(this,"Right")}value;constructor(e){this.value=e}isLeft(){return!1}isRight(){return!0}},Es=o(r=>new kN(r),"left"),Ii=o(r=>r===void 0?new Uw(void 0):new Uw(r),"right");var W3=class extends wp{static{o(this,"EntitySigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{certificate:a}=n;if(!e[s])return Es(new sn(`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),Ii(h)}ns(e,t){let n=e.$?.xmlns,{$:s,...i}=e[t],{xmlns:a,...u}=s??{};return{$:{xmlns:n,...u},...i}}};var z3=class extends wp{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 Es(new sn(`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 Ii(this.toolkit.appendNode(e,h))}};import"reflect-metadata";var xg="__SkipValidation__",Uge=o(()=>(r,e)=>{Reflect.defineMetadata(xg,!0,r,e.toString())},"SkipValidation"),jge=o(()=>r=>{Reflect.defineMetadata(xg,!0,r)},"SkipAllValidations");import{plainToInstance as aY}from"class-transformer";var jw=o(r=>{for(let[e,t]of Object.entries(r))typeof t>"u"&&delete r[e],t===""&&delete r[e],t&&typeof t=="object"&&jw(t)},"clearEmptyValues"),J3=o((r,e,t={})=>{let n=aY(e,r);return t.clearEmptyValues&&jw(n),n},"plainToInstance");import"reflect-metadata";import{validateSync as oY}from"class-validator";var Y3="__ValidateErrors__",Q3=o((r,e)=>r.reduce((t,n)=>{if(n.children?.length)return t.concat(Q3(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"),zge=o(r=>(e,t,n)=>{let s=n.value;n.value=function(...i){let a=Reflect.getMetadata(xg,this.constructor);if(Reflect.getMetadata(xg,this.constructor.prototype,t.toString())===!0||a===!0)return s?.apply(this,i);let[c,...l]=i,h=J3(c,r),m=oY(h,{whitelist:!0});if(jw(h),m.length){let g=Reflect.getMetadata(Y3,this)??[];Reflect.defineMetadata(Y3,g.concat(Q3(m,s?.name)),this)}return s?.apply(this,[h,...l])}},"Validates");var Sp=9e15,qu=1e9,LN="0123456789abcdef",qw="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Hw="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",VN={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Sp,maxE:Sp,crypto:!1},rk,Lo,Ot=!0,$w="[DecimalError] ",Mu=$w+"Invalid argument: ",nk=$w+"Precision limit exceeded",sk=$w+"crypto unavailable",ik="[object Decimal]",cs=Math.floor,In=Math.pow,uY=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,cY=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,lY=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ak=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ia=1e7,Ct=7,fY=9007199254740991,hY=qw.length-1,UN=Hw.length-1,Ve={toStringTag:ik};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(Mu+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=pY(n,fk(n,t)),n.precision=r,n.rounding=e,yt(Lo==2||Lo==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*In(h.s*h,1/3),!i||Math.abs(i)==1/0?(t=Wn(h.d),r=h.e,(i=(r-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=In(t,1/3),r=cs((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=Br(l.plus(h).times(u),l.plus(c),a+2,1),Wn(u.d).slice(0,a)===(t=Wn(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-cs(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 Br(this,new this.constructor(r))};Ve.dividedToIntegerBy=Ve.divToInt=function(r){var e=this,t=e.constructor;return yt(Br(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/Xw(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),i=Ep(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=Ep(i,2,s,s,!0);else{r=1.4*Math.sqrt(n),r=r>16?16:r|0,s=s.times(1/Xw(5,r)),s=Ep(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,Br(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()?La(e,n,s):new e(0):new e(NaN):r.isZero()?La(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=Br(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=La(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<=UN)return a=La(h,m+4,g).times(.25),a.s=l.s,a}else{if(!l.s)return new h(NaN);if(m+4<=UN)return a=La(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&&cs(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=Fu(l,u),n=e?Kw(h,u+10):Fu(r,u),c=Br(a,n,u,1),wg(c.d,s=m,g))do if(u+=10,a=Fu(l,u),n=e?Kw(h,u+10):Fu(r,u),c=Br(a,n,u,1),!i){+Wn(c.d).slice(s+1,s+15)+1==1e14&&(c=yt(c,m+1,0));break}while(wg(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=cs(r.e/Ct),h=cs(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]=ia-1;--l[s],l[n]+=ia}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=Gw(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=Br(t,r.abs(),0,3,1),e.s*=r.s):e=Br(t,r,0,n.modulo,1),e=e.times(r),Ot=!0,t.minus(e))};Ve.naturalExponential=Ve.exp=function(){return jN(this)};Ve.naturalLogarithm=Ve.ln=function(){return Fu(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=cs(m.e/Ct),n=cs(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)/ia|0,l[s]%=ia;for(e&&(l.unshift(e),++n),a=l.length;l[--a]==0;)l.pop();return r.d=l,r.e=Gw(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(Mu+r);return t.d?(e=ok(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=mY(n,fk(n,t)),n.precision=r,n.rounding=e,yt(Lo>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=Wn(u),(e.length+c)%2==0&&(e+="0"),l=Math.sqrt(e),c=cs((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(Br(a,i,t+2,1)).times(.5),Wn(i.d).slice(0,t)===(e=Wn(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=Br(t,new n(1).minus(t.times(t)).sqrt(),r+10,0),n.precision=r,n.rounding=e,yt(Lo==2||Lo==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=cs(h.e/Ct)+cs(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%ia|0,e=u/ia|0;i[s]=(i[s]+e)%ia|0}for(;!i[--a];)i.pop();return e?++t:i.shift(),r.d=i,r.e=Gw(i,t),Ot?yt(r,m.precision,m.rounding):r};Ve.toBinary=function(r,e){return FN(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:(ks(r,0,qu),e===void 0?e=n.rounding:ks(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=Va(n,!0):(ks(r,0,qu),e===void 0?e=s.rounding:ks(e,0,8),n=yt(new s(n),r+1,e),t=Va(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=Va(s):(ks(r,0,qu),e===void 0?e=i.rounding:ks(e,0,8),n=yt(new i(s),r+s.e+1,e),t=Va(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,S=y.constructor;if(!v)return new S(y);if(l=t=new S(1),n=c=new S(0),e=new S(n),i=e.e=ok(v)-y.e-1,a=i%Ct,e.d[0]=In(10,a<0?Ct+a:a),r==null)r=i>0?e:l;else{if(u=new S(r),!u.isInt()||u.lt(l))throw Error(Mu+u);r=u.gt(e)?i>0?e:l:u}for(Ot=!1,u=new S(Wn(v)),h=S.precision,S.precision=i=v.length*Ct*2;m=Br(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=Br(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=Br(l,n,i,1).minus(y).abs().cmp(Br(c,t,i,1).minus(y).abs())<1?[l,n]:[c,t],S.precision=h,Ot=!0,g};Ve.toHexadecimal=Ve.toHex=function(r,e){return FN(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:ks(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=Br(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 FN(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(In(+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=cs(r.e/Ct),e>=r.d.length-1&&(t=l<0?-l:l)<=fY)return s=uk(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=In(+u,l),e=t==0||!isFinite(t)?cs(l*(Math.log("0."+Wn(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=jN(r.times(Fu(u,n+t)),n),s.d&&(s=yt(s,n+5,1),wg(s.d,n,i)&&(e=n+10,s=yt(jN(r.times(Fu(u,e+t)),e),e+5,1),+Wn(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=Va(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(ks(r,1,qu),e===void 0?e=s.rounding:ks(e,0,8),n=yt(new s(n),r,e),t=Va(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):(ks(r,1,qu),e===void 0?e=n.rounding:ks(e,0,8)),yt(new n(t),r,e)};Ve.toString=function(){var r=this,e=r.constructor,t=Va(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=Va(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function Wn(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+=ju(t)),i+=n;a=r[e],n=a+"",t=Ct-n.length,t&&(i+=ju(t))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}o(Wn,"digitsToString");function ks(r,e,t){if(r!==~~r||r<e||r>t)throw Error(Mu+r)}o(ks,"checkInt32");function wg(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=In(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)==In(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)==In(10,e-3)-1,a}o(wg,"checkRoundingDigits");function Fw(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]+=LN.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(Fw,"convertBase");function pY(r,e){var t,n,s;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),s=(1/Xw(4,t)).toString()):(t=16,s="2.3283064365386962890625e-10"),r.precision+=t,e=Ep(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(pY,"cosine");var Br=(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,S,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=ia,y=Ct,h=cs(n.e/y)-cs(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),S=r(Y,g,c),w=S.length,A=b.length,l=e(S,b,w,A),l==1&&(g--,t(S,q<w?W:Y,w,c))):(g==0&&(l=g=1),S=Y.slice()),w=S.length,w<A&&S.unshift(0),t(b,S,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,rk=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/In(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/In(10,s-a-1)%10|0}if(n=n||e<0||m[g+1]!==void 0||(a<0?h:h%In(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/In(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]=In(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=In(10,Ct-i),m[g]=a>0?(h/In(10,s-a)%In(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]==ia&&(m[0]=1));break}else{if(m[g]+=u,m[g]!=ia)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 Va(r,e,t){if(!r.isFinite())return lk(r);var n,s=r.e,i=Wn(r.d),a=i.length;return e?(t&&(n=t-a)>0?i=i.charAt(0)+"."+i.slice(1)+ju(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(r.e<0?"e":"e+")+r.e):s<0?(i="0."+ju(-s-1)+i,t&&(n=t-a)>0&&(i+=ju(n))):s>=a?(i+=ju(s+1-a),t&&(n=t-s-1)>0&&(i=i+"."+ju(n))):((n=s+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-a)>0&&(s+1===a&&(i+="."),i+=ju(n))),i}o(Va,"finiteToString");function Gw(r,e){var t=r[0];for(e*=Ct;t>=10;t/=10)e++;return e}o(Gw,"getBase10Exponent");function Kw(r,e,t){if(e>hY)throw Ot=!0,t&&(r.precision=t),Error(nk);return yt(new r(qw),e,1,!0)}o(Kw,"getLn10");function La(r,e,t){if(e>UN)throw Error(nk);return yt(new r(Hw),e,t,!0)}o(La,"getPi");function ok(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(ok,"getPrecision");function ju(r){for(var e="";r--;)e+="0";return e}o(ju,"getZeroString");function uk(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),ek(i.d,a)&&(s=!0)),t=cs(t/2),t===0){t=i.d.length-1,s&&i.d[t]===0&&++i.d[t];break}e=e.times(e),ek(e.d,a)}return Ot=!0,i}o(uk,"intPow");function Z3(r){return r.d[r.d.length-1]&1}o(Z3,"isOdd");function ck(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(ck,"maxOrMin");function jN(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(In(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(Br(i,t,c,1)),Wn(u.d).slice(0,c)===Wn(a.d).slice(0,c)){for(s=m;s--;)a=yt(a.times(a),c,1);if(e==null)if(l<3&&wg(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(jN,"naturalExponential");function Fu(r,e){var t,n,s,i,a,u,c,l,h,m,g,y=1,v=10,S=r,w=S.d,C=S.constructor,_=C.rounding,b=C.precision;if(S.s<0||!w||!w[0]||!S.e&&w[0]==1&&w.length==1)return new C(w&&!w[0]?-1/0:S.s!=1?NaN:w?0:S);if(e==null?(Ot=!1,h=b):h=e,C.precision=h+=v,t=Wn(w),n=t.charAt(0),Math.abs(i=S.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)S=S.times(r),t=Wn(S.d),n=t.charAt(0),y++;i=S.e,n>1?(S=new C("0."+t),i++):S=new C(n+"."+t.slice(1))}else return l=Kw(C,h+2,b).times(i+""),S=Fu(new C(n+"."+t.slice(1)),h-v).plus(l),C.precision=b,e==null?yt(S,b,_,Ot=!0):S;for(m=S,c=a=S=Br(S.minus(1),S.plus(1),h,1),g=yt(S.times(S),h,1),s=3;;){if(a=yt(a.times(g),h,1),l=c.plus(Br(a,new C(s),h,1)),Wn(l.d).slice(0,h)===Wn(c.d).slice(0,h))if(c=c.times(2),i!==0&&(c=c.plus(Kw(C,h+2,b).times(i+""))),c=Br(c,new C(y),h,1),e==null)if(wg(c.d,h-v,_,u))C.precision=h+=v,l=a=S=Br(m.minus(1),m.plus(1),h,1),g=yt(S.times(S),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(Fu,"naturalLogarithm");function lk(r){return String(r.s*r.s/0)}o(lk,"nonFiniteToString");function Mw(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(Mw,"parseDecimal");function dY(r,e){var t,n,s,i,a,u,c,l,h;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),ak.test(e))return Mw(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(cY.test(e))t=16,e=e.toLowerCase();else if(uY.test(e))t=2;else if(lY.test(e))t=8;else throw Error(Mu+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=uk(n,new n(t),i,i*2)),l=Fw(e,t,ia),h=l.length-1,i=h;l[i]===0;--i)l.pop();return i<0?new n(r.s*0):(r.e=Gw(l,h),r.d=l,Ot=!1,a&&(r=Br(r,s,u*4)),c&&(r=r.times(Math.abs(c)<54?In(2,c):bp.pow(2,c))),Ot=!0,r)}o(dY,"parseOther");function mY(r,e){var t,n=e.d.length;if(n<3)return e.isZero()?e:Ep(r,2,e,e);t=1.4*Math.sqrt(n),t=t>16?16:t|0,e=e.times(1/Xw(5,t)),e=Ep(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(mY,"sine");function Ep(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=Br(u.times(c),new r(e++*e++),h,1),u=s?n.plus(a):n.minus(a),n=Br(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(Ep,"taylorSeries");function Xw(r,e){for(var t=r;--e;)t*=r;return t}o(Xw,"tinyPow");function fk(r,e){var t,n=e.s<0,s=La(r,r.precision,1),i=s.times(.5);if(e=e.abs(),e.lte(i))return Lo=n?4:1,e;if(t=e.divToInt(s),t.isZero())Lo=n?3:2;else{if(e=e.minus(t.times(s)),e.lte(i))return Lo=Z3(t)?n?2:3:n?4:1,e;Lo=Z3(t)?n?1:4:n?3:2}return e.minus(s).abs()}o(fk,"toLessThanHalfPi");function FN(r,e,t,n){var s,i,a,u,c,l,h,m,g,y=r.constructor,v=t!==void 0;if(v?(ks(t,1,qu),n===void 0?n=y.rounding:ks(n,0,8)):(t=y.precision,n=y.rounding),!r.isFinite())h=lk(r);else{for(h=Va(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=Fw(Va(g),10,s),g.e=g.d.length),m=Fw(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=Br(r,g,t,n,0,s),m=r.d,i=r.e,l=rk),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+=LN.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=Fw(h,s,e),c=m.length;!m[c-1];--c);for(a=1,h="1.";a<c;a++)h+=LN.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(FN,"toStringBinary");function ek(r,e){if(r.length>e)return r.length=e,!0}o(ek,"truncate");function gY(r){return new this(r).abs()}o(gY,"abs");function vY(r){return new this(r).acos()}o(vY,"acos");function yY(r){return new this(r).acosh()}o(yY,"acosh");function xY(r,e){return new this(r).plus(e)}o(xY,"add");function wY(r){return new this(r).asin()}o(wY,"asin");function SY(r){return new this(r).asinh()}o(SY,"asinh");function EY(r){return new this(r).atan()}o(EY,"atan");function bY(r){return new this(r).atanh()}o(bY,"atanh");function AY(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=La(this,i,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?La(this,n,s):new this(0),t.s=r.s):!r.d||e.isZero()?(t=La(this,i,1).times(.5),t.s=r.s):e.s<0?(this.precision=i,this.rounding=1,t=this.atan(Br(r,e,i,1)),e=La(this,i,1),this.precision=n,this.rounding=s,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(Br(r,e,i,1)),t}o(AY,"atan2");function CY(r){return new this(r).cbrt()}o(CY,"cbrt");function NY(r){return yt(r=new this(r),r.e+1,2)}o(NY,"ceil");function TY(r,e,t){return new this(r).clamp(e,t)}o(TY,"clamp");function IY(r){if(!r||typeof r!="object")throw Error($w+"Object expected");var e,t,n,s=r.defaults===!0,i=["precision",1,qu,"rounding",0,8,"toExpNeg",-Sp,0,"toExpPos",0,Sp,"maxE",0,Sp,"minE",-Sp,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(t=i[e],s&&(this[t]=VN[t]),(n=r[t])!==void 0)if(cs(n)===n&&n>=i[e+1]&&n<=i[e+2])this[t]=n;else throw Error(Mu+t+": "+n);if(t="crypto",s&&(this[t]=VN[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(sk);else this[t]=!1;else throw Error(Mu+t+": "+n);return this}o(IY,"config");function _Y(r){return new this(r).cos()}o(_Y,"cos");function DY(r){return new this(r).cosh()}o(DY,"cosh");function hk(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,tk(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 Mw(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),ak.test(i)?Mw(l,i):dY(l,i);if(c==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,Mw(l,i.toString());throw Error(Mu+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=IY,s.clone=hk,s.isDecimal=tk,s.abs=gY,s.acos=vY,s.acosh=yY,s.add=xY,s.asin=wY,s.asinh=SY,s.atan=EY,s.atanh=bY,s.atan2=AY,s.cbrt=CY,s.ceil=NY,s.clamp=TY,s.cos=_Y,s.cosh=DY,s.div=BY,s.exp=RY,s.floor=OY,s.hypot=PY,s.ln=kY,s.log=LY,s.log10=UY,s.log2=VY,s.max=jY,s.min=FY,s.mod=MY,s.mul=qY,s.pow=HY,s.random=KY,s.round=$Y,s.sign=GY,s.sin=XY,s.sinh=WY,s.sqrt=zY,s.sub=JY,s.sum=YY,s.tan=QY,s.tanh=ZY,s.trunc=eQ,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(hk,"clone");function BY(r,e){return new this(r).div(e)}o(BY,"div");function RY(r){return new this(r).exp()}o(RY,"exp");function OY(r){return yt(r=new this(r),r.e+1,3)}o(OY,"floor");function PY(){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(PY,"hypot");function tk(r){return r instanceof bp||r&&r.toStringTag===ik||!1}o(tk,"isDecimalInstance");function kY(r){return new this(r).ln()}o(kY,"ln");function LY(r,e){return new this(r).log(e)}o(LY,"log");function VY(r){return new this(r).log(2)}o(VY,"log2");function UY(r){return new this(r).log(10)}o(UY,"log10");function jY(){return ck(this,arguments,-1)}o(jY,"max");function FY(){return ck(this,arguments,1)}o(FY,"min");function MY(r,e){return new this(r).mod(e)}o(MY,"mod");function qY(r,e){return new this(r).mul(e)}o(qY,"mul");function HY(r,e){return new this(r).pow(e)}o(HY,"pow");function KY(r){var e,t,n,s,i=0,a=new this(1),u=[];if(r===void 0?r=this.precision:ks(r,1,qu),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(sk);else for(;i<n;)u[i++]=Math.random()*1e7|0;for(n=u[--i],r%=Ct,n&&r&&(s=In(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(KY,"random");function $Y(r){return yt(r=new this(r),r.e+1,this.rounding)}o($Y,"round");function GY(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}o(GY,"sign");function XY(r){return new this(r).sin()}o(XY,"sin");function WY(r){return new this(r).sinh()}o(WY,"sinh");function zY(r){return new this(r).sqrt()}o(zY,"sqrt");function JY(r,e){return new this(r).sub(e)}o(JY,"sub");function YY(){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(YY,"sum");function QY(r){return new this(r).tan()}o(QY,"tan");function ZY(r){return new this(r).tanh()}o(ZY,"tanh");function eQ(r){return yt(r=new this(r),r.e+1,1)}o(eQ,"trunc");Ve[Symbol.for("nodejs.util.inspect.custom")]=Ve.toString;Ve[Symbol.toStringTag]="Decimal";var bp=Ve.constructor=hk(VN);qw=new bp(qw);Hw=new bp(Hw);var Ap=class r extends bp{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)}};var pk=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 Ww=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 Rl=Hl(_L(),1);import KH from"fs";import ige from"path";import m2 from"crypto";var Vte=o(r=>!!r&&typeof r=="object"&&"message"in r,"hasMessageInRecord"),Zl=o(r=>typeof r=="string"?Es(new sn(r)):r instanceof Error?Es(new sn(r.message,{cause:r.cause})):Vte(r)?Es(new sn(r.message)):Es(new sn("unexpected error")),"leftFromError");import"reflect-metadata";var eM=Hl($j(),1);import epe from"os";import{constants as tpe}from"crypto";import{Agent as PD}from"https";function yv(r,e){return o(function(){return r.apply(e,arguments)},"wrap")}o(yv,"bind");var{toString:Zle}=Object.prototype,{getPrototypeOf:lD}=Object,{iterator:KE,toStringTag:Xj}=Symbol,$E=(r=>e=>{let t=Zle.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),da=o(r=>(r=r.toLowerCase(),e=>$E(e)===r),"kindOfTest"),GE=o(r=>e=>typeof e===r,"typeOfTest"),{isArray:yd}=Array,vd=GE("undefined");function xv(r){return r!==null&&!vd(r)&&r.constructor!==null&&!vd(r.constructor)&&Xs(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}o(xv,"isBuffer");var Wj=da("ArrayBuffer");function efe(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&Wj(r.buffer),e}o(efe,"isArrayBufferView");var tfe=GE("string"),Xs=GE("function"),zj=GE("number"),wv=o(r=>r!==null&&typeof r=="object","isObject"),rfe=o(r=>r===!0||r===!1,"isBoolean"),HE=o(r=>{if($E(r)!=="object")return!1;let e=lD(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Xj in r)&&!(KE in r)},"isPlainObject"),nfe=o(r=>{if(!wv(r)||xv(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},"isEmptyObject"),sfe=da("Date"),ife=da("File"),afe=da("Blob"),ofe=da("FileList"),ufe=o(r=>wv(r)&&Xs(r.pipe),"isStream"),cfe=o(r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||Xs(r.append)&&((e=$E(r))==="formdata"||e==="object"&&Xs(r.toString)&&r.toString()==="[object FormData]"))},"isFormData"),lfe=da("URLSearchParams"),[ffe,hfe,pfe,dfe]=["ReadableStream","Request","Response","Headers"].map(da),mfe=o(r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function Sv(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),yd(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(xv(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(Sv,"forEach");function Jj(r,e){if(xv(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(Jj,"findKey");var pf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yj=o(r=>!vd(r)&&r!==pf,"isContextDefined");function cD(){let{caseless:r,skipUndefined:e}=Yj(this)&&this||{},t={},n=o((s,i)=>{let a=r&&Jj(t,i)||i;HE(t[a])&&HE(s)?t[a]=cD(t[a],s):HE(s)?t[a]=cD({},s):yd(s)?t[a]=s.slice():(!e||!vd(s))&&(t[a]=s)},"assignValue");for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Sv(arguments[s],n);return t}o(cD,"merge");var gfe=o((r,e,t,{allOwnKeys:n}={})=>(Sv(e,(s,i)=>{t&&Xs(s)?r[i]=yv(s,t):r[i]=s},{allOwnKeys:n}),r),"extend"),vfe=o(r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),"stripBOM"),yfe=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"),xfe=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&&lD(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},"toFlatObject"),wfe=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"),Sfe=o(r=>{if(!r)return null;if(yd(r))return r;let e=r.length;if(!zj(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},"toArray"),Efe=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&lD(Uint8Array)),bfe=o((r,e)=>{let n=(r&&r[KE]).call(r),s;for(;(s=n.next())&&!s.done;){let i=s.value;e.call(r,i[0],i[1])}},"forEachEntry"),Afe=o((r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},"matchAll"),Cfe=da("HTMLFormElement"),Nfe=o(r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,o(function(t,n,s){return n.toUpperCase()+s},"replacer")),"toCamelCase"),Gj=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),Tfe=da("RegExp"),Qj=o((r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};Sv(t,(s,i)=>{let a;(a=e(s,i,r))!==!1&&(n[i]=a||s)}),Object.defineProperties(r,n)},"reduceDescriptors"),Ife=o(r=>{Qj(r,(e,t)=>{if(Xs(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(Xs(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"),_fe=o((r,e)=>{let t={},n=o(s=>{s.forEach(i=>{t[i]=!0})},"define");return yd(r)?n(r):n(String(r).split(e)),t},"toObjectSet"),Dfe=o(()=>{},"noop"),Bfe=o((r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,"toFiniteNumber");function Rfe(r){return!!(r&&Xs(r.append)&&r[Xj]==="FormData"&&r[KE])}o(Rfe,"isSpecCompliantForm");var Ofe=o(r=>{let e=new Array(10),t=o((n,s)=>{if(wv(n)){if(e.indexOf(n)>=0)return;if(xv(n))return n;if(!("toJSON"in n)){e[s]=n;let i=yd(n)?[]:{};return Sv(n,(a,u)=>{let c=t(a,s+1);!vd(c)&&(i[u]=c)}),e[s]=void 0,i}}return n},"visit");return t(r,0)},"toJSONObject"),Pfe=da("AsyncFunction"),kfe=o(r=>r&&(wv(r)||Xs(r))&&Xs(r.then)&&Xs(r.catch),"isThenable"),Zj=((r,e)=>r?setImmediate:e?((t,n)=>(pf.addEventListener("message",({source:s,data:i})=>{s===pf&&i===t&&n.length&&n.shift()()},!1),s=>{n.push(s),pf.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Xs(pf.postMessage)),Lfe=typeof queueMicrotask<"u"?queueMicrotask.bind(pf):typeof process<"u"&&process.nextTick||Zj,Vfe=o(r=>r!=null&&Xs(r[KE]),"isIterable"),ie={isArray:yd,isArrayBuffer:Wj,isBuffer:xv,isFormData:cfe,isArrayBufferView:efe,isString:tfe,isNumber:zj,isBoolean:rfe,isObject:wv,isPlainObject:HE,isEmptyObject:nfe,isReadableStream:ffe,isRequest:hfe,isResponse:pfe,isHeaders:dfe,isUndefined:vd,isDate:sfe,isFile:ife,isBlob:afe,isRegExp:Tfe,isFunction:Xs,isStream:ufe,isURLSearchParams:lfe,isTypedArray:Efe,isFileList:ofe,forEach:Sv,merge:cD,extend:gfe,trim:mfe,stripBOM:vfe,inherits:yfe,toFlatObject:xfe,kindOf:$E,kindOfTest:da,endsWith:wfe,toArray:Sfe,forEachEntry:bfe,matchAll:Afe,isHTMLForm:Cfe,hasOwnProperty:Gj,hasOwnProp:Gj,reduceDescriptors:Qj,freezeMethods:Ife,toObjectSet:_fe,toCamelCase:Nfe,noop:Dfe,toFiniteNumber:Bfe,findKey:Jj,global:pf,isContextDefined:Yj,isSpecCompliantForm:Rfe,toJSONObject:Ofe,isAsyncFn:Pfe,isThenable:kfe,setImmediate:Zj,asap:Lfe,isIterable:Vfe};function xd(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(xd,"AxiosError");ie.inherits(xd,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:ie.toJSONObject(this.config),code:this.code,status:this.status}},"toJSON")});var eF=xd.prototype,tF={};["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=>{tF[r]={value:r}});Object.defineProperties(xd,tF);Object.defineProperty(eF,"isAxiosError",{value:!0});xd.from=(r,e,t,n,s,i)=>{let a=Object.create(eF);ie.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 xd.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};var et=xd;var rF=Hl(dI(),1),XE=rF.default;function fD(r){return ie.isPlainObject(r)||ie.isArray(r)}o(fD,"isVisitable");function sF(r){return ie.endsWith(r,"[]")?r.slice(0,-2):r}o(sF,"removeBrackets");function nF(r,e,t){return r?r.concat(e).map(o(function(s,i){return s=sF(s),!t&&i?"["+s+"]":s},"each")).join(t?".":""):e}o(nF,"renderKey");function Ufe(r){return ie.isArray(r)&&!r.some(fD)}o(Ufe,"isFlatArray");var jfe=ie.toFlatObject(ie,{},null,o(function(e){return/^is[A-Z]/.test(e)},"filter"));function Ffe(r,e,t){if(!ie.isObject(r))throw new TypeError("target must be an object");e=e||new(XE||FormData),t=ie.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,o(function(S,w){return!ie.isUndefined(w[S])},"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 et("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,S,w){let C=v;if(v&&!w&&typeof v=="object"){if(ie.endsWith(S,"{}"))S=n?S:S.slice(0,-2),v=JSON.stringify(v);else if(ie.isArray(v)&&Ufe(v)||(ie.isFileList(v)||ie.endsWith(S,"[]"))&&(C=ie.toArray(v)))return S=sF(S),C.forEach(o(function(b,A){!(ie.isUndefined(b)||b===null)&&e.append(a===!0?nF([S],A,i):a===null?S:S+"[]",l(b))},"each")),!1}return fD(v)?!0:(e.append(nF(w,S,i),l(v)),!1)}o(h,"defaultVisitor");let m=[],g=Object.assign(jfe,{defaultVisitor:h,convertValue:l,isVisitable:fD});function y(v,S){if(!ie.isUndefined(v)){if(m.indexOf(v)!==-1)throw Error("Circular reference detected in "+S.join("."));m.push(v),ie.forEach(v,o(function(C,_){(!(ie.isUndefined(C)||C===null)&&s.call(e,C,ie.isString(_)?_.trim():_,S,g))===!0&&y(C,S?S.concat(_):[_])},"each")),m.pop()}}if(o(y,"build"),!ie.isObject(r))throw new TypeError("data must be an object");return y(r),e}o(Ffe,"toFormData");var xc=Ffe;function iF(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(iF,"encode");function aF(r,e){this._pairs=[],r&&xc(r,this,e)}o(aF,"AxiosURLSearchParams");var oF=aF.prototype;oF.append=o(function(e,t){this._pairs.push([e,t])},"append");oF.toString=o(function(e){let t=e?function(n){return e.call(this,n,iF)}:iF;return this._pairs.map(o(function(s){return t(s[0])+"="+t(s[1])},"each"),"").join("&")},"toString");var uF=aF;function Mfe(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}o(Mfe,"encode");function df(r,e,t){if(!e)return r;let n=t&&t.encode||Mfe;ie.isFunction(t)&&(t={serialize:t});let s=t&&t.serialize,i;if(s?i=s(e,t):i=ie.isURLSearchParams(e)?e.toString():new uF(e,t).toString(n),i){let a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r}o(df,"buildURL");var qfe=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"))}},hD=qfe;var wd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};import Kfe from"crypto";import Hfe from"url";var cF=Hfe.URLSearchParams;var pD="abcdefghijklmnopqrstuvwxyz",lF="0123456789",fF={DIGIT:lF,ALPHA:pD,ALPHA_DIGIT:pD+pD.toUpperCase()+lF},$fe=o((r=16,e=fF.ALPHA_DIGIT)=>{let t="",{length:n}=e,s=new Uint32Array(r);Kfe.randomFillSync(s);for(let i=0;i<r;i++)t+=e[s[i]%n];return t},"generateString"),hF={isNode:!0,classes:{URLSearchParams:cF,FormData:XE,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:fF,generateString:$fe,protocols:["http","https","file","data"]};var gD={};iY(gD,{hasBrowserEnv:()=>mD,hasStandardBrowserEnv:()=>Gfe,hasStandardBrowserWebWorkerEnv:()=>Xfe,navigator:()=>dD,origin:()=>Wfe});var mD=typeof window<"u"&&typeof document<"u",dD=typeof navigator=="object"&&navigator||void 0,Gfe=mD&&(!dD||["ReactNative","NativeScript","NS"].indexOf(dD.product)<0),Xfe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wfe=mD&&window.location.href||"http://localhost";var xr={...gD,...hF};function vD(r,e){return xc(r,new xr.classes.URLSearchParams,{visitor:o(function(t,n,s,i){return xr.isNode&&ie.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},"visitor"),...e})}o(vD,"toURLEncodedForm");function zfe(r){return ie.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}o(zfe,"parsePropPath");function Jfe(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(Jfe,"arrayToObject");function Yfe(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]=Jfe(s[a])),!u)}if(o(e,"buildPath"),ie.isFormData(r)&&ie.isFunction(r.entries)){let t={};return ie.forEachEntry(r,(n,s)=>{e(zfe(n),s,t,0)}),t}return null}o(Yfe,"formDataToJSON");var WE=Yfe;function Qfe(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(Qfe,"stringifySafely");var yD={transitional:wd,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(WE(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 vD(e,this.formSerializer).toString();if((u=ie.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return xc(u?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),Qfe(e)):e},"transformRequest")],transformResponse:[o(function(e){let t=this.transitional||yD.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"?et.from(u,et.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:xr.classes.FormData,Blob:xr.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=>{yD.headers[r]={}});var Sd=yD;var Zfe=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"]),pF=o((r=>{let e={},t,n,s;return r&&r.split(`
|
|
99
|
+
`).forEach(o(function(a){s=a.indexOf(":"),t=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!t||e[t]&&Zfe[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 dF=Symbol("internals");function Ev(r){return r&&String(r).trim().toLowerCase()}o(Ev,"normalizeHeader");function zE(r){return r===!1||r==null?r:ie.isArray(r)?r.map(zE):String(r)}o(zE,"normalizeValue");function ehe(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(ehe,"parseTokens");var the=o(r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim()),"isValidHeaderName");function xD(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(xD,"matchHeaderValue");function rhe(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}o(rhe,"formatHeader");function nhe(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(nhe,"buildAccessors");var JE=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=Ev(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]=zE(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())&&!the(e))a(pF(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=Ev(e),e){let n=ie.findKey(this,e);if(n){let s=this[n];if(!t)return s;if(t===!0)return ehe(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=Ev(e),e){let n=ie.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||xD(this,this[n],n,t)))}return!1}delete(e,t){let n=this,s=!1;function i(a){if(a=Ev(a),a){let u=ie.findKey(n,a);u&&(!t||xD(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||xD(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]=zE(s),delete t[i];return}let u=e?rhe(i):String(i).trim();u!==i&&delete t[i],t[u]=zE(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(`
|
|
100
|
+
`)}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[dF]=this[dF]={accessors:{}}).accessors,s=this.prototype;function i(a){let u=Ev(a);n[u]||(nhe(s,a),n[u]=!0)}return o(i,"defineAccessor"),ie.isArray(e)?e.forEach(i):i(e),this}};JE.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ie.reduceDescriptors(JE.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:o(()=>r,"get"),set(n){this[t]=n}}});ie.freezeMethods(JE);var Yr=JE;function bv(r,e){let t=this||Sd,n=e||t,s=Yr.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(bv,"transformData");function Av(r){return!!(r&&r.__CANCEL__)}o(Av,"isCancel");function mF(r,e,t){et.call(this,r??"canceled",et.ERR_CANCELED,e,t),this.name="CanceledError"}o(mF,"CanceledError");ie.inherits(mF,et,{__CANCEL__:!0});var fi=mF;function oo(r,e,t){let n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new et("Request failed with status code "+t.status,[et.ERR_BAD_REQUEST,et.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}o(oo,"settle");function wD(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}o(wD,"isAbsoluteURL");function SD(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}o(SD,"combineURLs");function mf(r,e,t){let n=!wD(e);return r&&(n||t==!1)?SD(r,e):e}o(mf,"buildFullPath");var TF=Hl(mI(),1),DF=Hl(II(),1);import whe from"http";import She from"https";import IF from"http2";import _F from"util";import Sc from"zlib";var gf="1.13.2";function Cv(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}o(Cv,"parseProtocol");var she=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function ED(r,e,t){let n=t&&t.Blob||xr.classes.Blob,s=Cv(r);if(e===void 0&&n&&(e=!0),s==="data"){r=s.length?r.slice(s.length+1):r;let i=she.exec(r);if(!i)throw new et("Invalid URL",et.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 et("Blob is not supported",et.ERR_NOT_SUPPORT);return new n([l],{type:a})}return l}throw new et("Unsupported protocol "+s,et.ERR_NOT_SUPPORT)}o(ED,"fromDataURI");import wc from"stream";import ihe from"stream";var bD=Symbol("internals"),ahe=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[bD]={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[bD];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let s=this[bD],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 S=Buffer.byteLength(y);s.bytesSeen+=S,s.bytes+=S,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 S=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&&S>C&&S-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,S){if(v)return n(v);S?g(S,y):n(null)},"transformNextChunk"))}},AD=ahe;import{EventEmitter as Ehe}from"events";import uhe from"util";import{Readable as che}from"stream";var{asyncIterator:gF}=Symbol,ohe=o(async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[gF]?yield*r[gF]():yield r},"readBlob"),YE=ohe;var lhe=xr.ALPHABET.ALPHA_DIGIT+"-_",Nv=typeof TextEncoder=="function"?new TextEncoder:new uhe.TextEncoder,vf=`\r
|
|
101
|
+
`,fhe=Nv.encode(vf),hhe=2,phe=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)}"`:""}${vf}`;s?t=Nv.encode(String(t).replace(/\r?\n|\r\n?/g,vf)):i+=`Content-Type: ${t.type||"application/octet-stream"}${vf}`,this.headers=Nv.encode(i+vf),this.contentLength=s?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+hhe,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;ie.isTypedArray(e)?yield e:yield*YE(e),yield fhe}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},dhe=o((r,e,t)=>{let{tag:n="form-data-boundary",size:s=25,boundary:i=n+"-"+xr.generateString(s,lhe)}=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=Nv.encode("--"+i+vf),u=Nv.encode("--"+i+"--"+vf),c=u.byteLength,l=Array.from(r.entries()).map(([m,g])=>{let y=new phe(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),che.from((async function*(){for(let m of l)yield a,yield*m.encode();yield u})())},"formDataToStream"),vF=dhe;import mhe from"stream";var ghe=class extends mhe.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)}},yF=ghe;var vhe=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"),xF=vhe;function yhe(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(yhe,"speedometer");var wF=yhe;function xhe(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(xhe,"throttle");var SF=xhe;var Wo=o((r,e,t=3)=>{let n=0,s=wF(50,250);return SF(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"),Ed=o((r,e)=>{let t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},"progressEventDecorator"),bd=o(r=>(...e)=>ie.asap(()=>r(...e)),"asyncDecorator");function CD(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(CD,"estimateDataURLDecodedBytes");var EF={flush:Sc.constants.Z_SYNC_FLUSH,finishFlush:Sc.constants.Z_SYNC_FLUSH},bhe={flush:Sc.constants.BROTLI_OPERATION_FLUSH,finishFlush:Sc.constants.BROTLI_OPERATION_FLUSH},bF=ie.isFunction(Sc.createBrotliDecompress),{http:Ahe,https:Che}=DF.default,Nhe=/https:?/,AF=xr.protocols.map(r=>r+":"),CF=o((r,[e,t])=>(r.on("end",t).on("error",t),e),"flushOnFinish"),The=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&&_F.isDeepStrictEqual(y,t))return g}}let s=IF.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}},Ihe=new The;function _he(r,e){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,e)}o(_he,"dispatchBeforeRedirect");function BF(r,e,t){let n=e;if(!n&&n!==!1){let s=TF.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){BF(i,e,i.href)},"beforeRedirect")}o(BF,"setProxy");var Dhe=typeof process<"u"&&ie.kindOf(process)==="process",Bhe=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"),Rhe=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"),NF=o((r,e)=>Rhe(ie.isObject(r)?r:{address:r,family:e}),"buildAddressEntry"),Ohe={request(r,e){let t=r.protocol+"//"+r.hostname+":"+(r.port||80),{http2Options:n,headers:s}=r,i=Ihe.getSession(t,n),{HTTP2_HEADER_SCHEME:a,HTTP2_HEADER_METHOD:u,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=IF.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}},RF=Dhe&&o(function(e){return Bhe(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,S=!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=xF(u,Z=>ie.isArray(Z)?Z:[Z]);u=o((Z,Ee,He)=>{ne(Z,Ee,(Le,tt,N)=>{if(Le)return He(Le);let E=ie.isArray(tt)?tt.map(G=>NF(G)):[NF(tt,N)];Ee.all?He(Le,E):He(Le,E[0].address,E[0].family)})},"lookup")}let _=new Ehe;function b(ne){try{_.emit("abort",!ne||ne.type?new fi(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){S=!0,A();return}let{data:Ee}=ne;if(Ee instanceof wc.Readable||Ee instanceof wc.Duplex){let He=wc.finished(Ee,()=>{He(),A()})}else A()});let T=mf(e.baseURL,e.url,e.allowAbsoluteUrls),B=new URL(T,xr.hasBrowserEnv?xr.origin:void 0),M=B.protocol||AF[0];if(M==="data:"){if(e.maxContentLength>-1){let Z=String(e.url||T||"");if(CD(Z)>e.maxContentLength)return s(new et("maxContentLength size of "+e.maxContentLength+" exceeded",et.ERR_BAD_RESPONSE,e))}let ne;if(y!=="GET")return oo(n,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{ne=ED(e.url,m==="blob",{Blob:e.env&&e.env.Blob})}catch(Z){throw et.from(Z,et.ERR_BAD_REQUEST,e)}return m==="text"?(ne=ne.toString(g),(!g||g==="utf8")&&(ne=ie.stripBOM(ne))):m==="stream"&&(ne=wc.Readable.from(ne)),oo(n,s,{data:ne,status:200,statusText:"OK",headers:new Yr,config:e})}if(AF.indexOf(M)===-1)return s(new et("Unsupported protocol "+M,et.ERR_BAD_REQUEST,e));let I=Yr.from(e.headers).normalize();I.set("User-Agent","axios/"+gf,!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=vF(a,Z=>{I.set(Z)},{tag:`axios-${gf}-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 _F.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=wc.Readable.from(YE(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 et("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",et.ERR_BAD_REQUEST,e));if(I.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return s(new et("Request body larger than maxBodyLength limit",et.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=wc.Readable.from(a,{objectMode:!1})),a=wc.pipeline([a,new AD({maxRate:ie.toFiniteNumber(W)})],ie.noop),H&&a.on("progress",CF(a,Ed(pe,Wo(bd(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=df(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"+(bF?", 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:_he,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,BF(ve,e.proxy,M+"//"+B.hostname+(B.port?":"+B.port:"")+ve.path));let Oe,ze=Nhe.test(ve.protocol);if(ve.agent=ze?e.httpsAgent:e.httpAgent,C?Oe=Ohe:e.transport?Oe=e.transport:e.maxRedirects===0?Oe=ze?She:whe:(e.maxRedirects&&(ve.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ve.beforeRedirects.config=e.beforeRedirect),Oe=ze?Che:Ahe),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 Ee=[Z],He=ie.toFiniteNumber(Z.headers["content-length"]);if(K||he){let E=new AD({maxRate:ie.toFiniteNumber(he)});K&&E.on("progress",CF(E,Ed(He,Wo(bd(K),!0,3)))),Ee.push(E)}let Le=Z,tt=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":Ee.push(Sc.createUnzip(EF)),delete Z.headers["content-encoding"];break;case"deflate":Ee.push(new yF),Ee.push(Sc.createUnzip(EF)),delete Z.headers["content-encoding"];break;case"br":bF&&(Ee.push(Sc.createBrotliDecompress(bhe)),delete Z.headers["content-encoding"])}Le=Ee.length>1?wc.pipeline(Ee,ie.noop):Ee[0];let N={status:Z.statusCode,statusText:Z.statusMessage,headers:new Yr(Z.headers),config:e,request:tt};if(m==="stream")N.data=Le,oo(n,s,N);else{let E=[],G=0;Le.on("data",o(function(Se){E.push(Se),G+=Se.length,e.maxContentLength>-1&&G>e.maxContentLength&&(S=!0,Le.destroy(),b(new et("maxContentLength size of "+e.maxContentLength+" exceeded",et.ERR_BAD_RESPONSE,e,tt)))},"handleStreamData")),Le.on("aborted",o(function(){if(S)return;let Se=new et("stream has been aborted",et.ERR_BAD_RESPONSE,e,tt);Le.destroy(Se),s(Se)},"handlerStreamAborted")),Le.on("error",o(function(Se){w.destroyed||s(et.from(Se,null,e,tt))},"handleStreamError")),Le.on("end",o(function(){try{let Se=E.length===1?E[0]:Buffer.concat(E);m!=="arraybuffer"&&(Se=Se.toString(g),(!g||g==="utf8")&&(Se=ie.stripBOM(Se))),N.data=Se}catch(Se){return s(et.from(Se,null,e,N.request,N))}oo(n,s,N)},"handleStreamEnd"))}_.once("abort",E=>{Le.destroyed||(Le.emit("error",E),Le.destroy())})},"handleResponse")),_.once("abort",ne=>{w.close?w.close():w.destroy(ne)}),w.on("error",o(function(Z){s(et.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 et("error trying to parse `config.timeout` to int",et.ERR_BAD_OPTION_VALUE,e,w));return}w.setTimeout(ne,o(function(){if(v)return;let Ee=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",He=e.transitional||wd;e.timeoutErrorMessage&&(Ee=e.timeoutErrorMessage),b(new et(Ee,He.clarifyTimeoutError?et.ETIMEDOUT:et.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",Ee=>{Z=!0,w.destroy(Ee)}),a.on("close",()=>{!ne&&!Z&&b(new fi("Request stream has been aborted",e,w))}),a.pipe(w)}else a&&w.write(a),w.end()},"dispatchHttpRequest"))},"httpAdapter");var OF=xr.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,xr.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(xr.origin),xr.navigator&&/(msie|trident)/i.test(xr.navigator.userAgent)):()=>!0;var PF=xr.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 kF=o(r=>r instanceof Yr?{...r}:r,"headersToObject");function ma(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(kF(l),kF(h),m,!0),"headers")};return ie.forEach(Object.keys({...r,...e}),o(function(h){let m=c[h]||s,g=m(r[h],e[h],h);ie.isUndefined(g)&&m!==u||(t[h]=g)},"computeConfigValue")),t}o(ma,"mergeConfig");var QE=o((r=>{let e=ma({},r),{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:u}=e;if(e.headers=a=Yr.from(a),e.url=df(mf(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(xr.hasStandardBrowserEnv||xr.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(xr.hasStandardBrowserEnv&&(n&&ie.isFunction(n)&&(n=n(e)),n||n!==!1&&OF(e.url))){let c=s&&i&&PF.read(i);c&&a.set(s,c)}return e}),"default");var Phe=typeof XMLHttpRequest<"u",LF=Phe&&function(r){return new Promise(o(function(t,n){let s=QE(r),i=s.data,a=Yr.from(s.headers).normalize(),{responseType:u,onUploadProgress:c,onDownloadProgress:l}=s,h,m,g,y,v;function S(){y&&y(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}o(S,"done");let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function C(){if(!w)return;let b=Yr.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};oo(o(function(M){t(M),S()},"_resolve"),o(function(M){n(M),S()},"_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 et("Request aborted",et.ECONNABORTED,r,w)),w=null)},"handleAbort"),w.onerror=o(function(A){let T=A&&A.message?A.message:"Network Error",B=new et(T,et.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||wd;s.timeoutErrorMessage&&(A=s.timeoutErrorMessage),n(new et(A,T.clarifyTimeoutError?et.ETIMEDOUT:et.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]=Wo(l,!0),w.addEventListener("progress",g)),c&&w.upload&&([m,y]=Wo(c),w.upload.addEventListener("progress",m),w.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(h=o(b=>{w&&(n(!b||b.type?new fi(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 _=Cv(s.url);if(_&&xr.protocols.indexOf(_)===-1){n(new et("Unsupported protocol "+_+":",et.ERR_BAD_REQUEST,r));return}w.send(i||null)},"dispatchXhrRequest"))};var khe=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 et?h:new fi(h instanceof Error?h.message:h))}},"onabort"),a=e&&setTimeout(()=>{a=null,i(new et(`timeout ${e} of ms exceeded`,et.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"),VF=khe;var Lhe=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"),Vhe=o(async function*(r,e){for await(let t of Uhe(r))yield*Lhe(t,e)},"readBytes"),Uhe=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"),ND=o((r,e,t,n)=>{let s=Vhe(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 UF=64*1024,{isFunction:ZE}=ie,jhe=(({Request:r,Response:e})=>({Request:r,Response:e}))(ie.global),{ReadableStream:jF,TextEncoder:FF}=ie.global,MF=o((r,...e)=>{try{return!!r(...e)}catch{return!1}},"test"),Fhe=o(r=>{r=ie.merge.call({skipUndefined:!0},jhe,r);let{fetch:e,Request:t,Response:n}=r,s=e?ZE(e):typeof fetch=="function",i=ZE(t),a=ZE(n);if(!s)return!1;let u=s&&ZE(jF),c=s&&(typeof FF=="function"?(v=>S=>v.encode(S))(new FF):async v=>new Uint8Array(await new t(v).arrayBuffer())),l=i&&u&&MF(()=>{let v=!1,S=new t(xr.origin,{body:new jF,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!S}),h=a&&u&&MF(()=>ie.isReadableStream(new n("").body)),m={stream:h&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!m[v]&&(m[v]=(S,w)=>{let C=S&&S[v];if(C)return C.call(S);throw new et(`Response type '${v}' is not supported`,et.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(xr.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,S)=>{let w=ie.toFiniteNumber(v.getContentLength());return w??g(S)},"resolveBodyLength");return async v=>{let{url:S,method:w,data:C,signal:_,cancelToken:b,timeout:A,onDownloadProgress:T,onUploadProgress:B,responseType:M,headers:I,withCredentials:H="same-origin",fetchOptions:K}=QE(v),q=e||fetch;M=M?(M+"").toLowerCase():"text";let W=VF([_,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(S,{method:"POST",body:C,duplex:"half"}),Ee;if(ie.isFormData(C)&&(Ee=Z.headers.get("content-type"))&&I.setContentType(Ee),Z.body){let[He,Le]=Ed(ue,Wo(bd(B)));C=ND(Z.body,UF,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(S,ve);let Oe=await(i?q(he,K):q(S,ve)),ze=h&&(M==="stream"||M==="response");if(h&&(T||ze&&pe)){let Z={};["status","statusText","headers"].forEach(tt=>{Z[tt]=Oe[tt]});let Ee=ie.toFiniteNumber(Oe.headers.get("content-length")),[He,Le]=T&&Ed(Ee,Wo(bd(T),!0))||[];Oe=new n(ND(Oe.body,UF,He,()=>{Le&&Le(),pe&&pe()}),Z)}M=M||"text";let ne=await m[ie.findKey(m,M)||"text"](Oe,v);return!ze&&pe&&pe(),await new Promise((Z,Ee)=>{oo(Z,Ee,{data:ne,headers:Yr.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 et("Network Error",et.ERR_NETWORK,v,he),{cause:Y.cause||Y}):et.from(Y,Y&&Y.code,v,he)}}},"factory"),Mhe=new Map,TD=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=Mhe;for(;u--;)c=i[u],l=h.get(c),l===void 0&&h.set(c,l=u?new Map:Fhe(e)),h=l;return l},"getFetch"),x2e=TD();var ID={http:RF,xhr:LF,fetch:{get:TD}};ie.forEach(ID,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var qF=o(r=>`- ${r}`,"renderReason"),Hhe=o(r=>ie.isFunction(r)||r===null||r===!1,"isResolvedHandle");function Khe(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,!Hhe(n)&&(s=ID[(u=String(n)).toLowerCase()],s===void 0))throw new et(`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 :
|
|
102
|
+
`+a.map(qF).join(`
|
|
103
|
+
`):" "+qF(a[0]):"as no adapter specified";throw new et("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return s}o(Khe,"getAdapter");var eb={getAdapter:Khe,adapters:ID};function _D(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new fi(null,r)}o(_D,"throwIfCancellationRequested");function tb(r){return _D(r),r.headers=Yr.from(r.headers),r.data=bv.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),eb.getAdapter(r.adapter||Sd.adapter,r)(r).then(o(function(n){return _D(r),n.data=bv.call(r,r.transformResponse,n),n.headers=Yr.from(n.headers),n},"onAdapterResolution"),o(function(n){return Av(n)||(_D(r),n&&n.response&&(n.response.data=bv.call(r,r.transformResponse,n.response),n.response.headers=Yr.from(n.response.headers))),Promise.reject(n)},"onAdapterRejection"))}o(tb,"dispatchRequest");var rb={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{rb[r]=o(function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r},"validator")});var HF={};rb.transitional=o(function(e,t,n){function s(i,a){return"[Axios v"+gf+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return o(s,"formatMessage"),(i,a,u)=>{if(e===!1)throw new et(s(a," has been removed"+(t?" in "+t:"")),et.ERR_DEPRECATED);return t&&!HF[a]&&(HF[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");rb.spelling=o(function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)},"spelling");function $he(r,e,t){if(typeof r!="object")throw new et("options must be an object",et.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 et("option "+i+" must be "+c,et.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new et("Unknown option "+i,et.ERR_BAD_OPTION)}}o($he,"assertOptions");var Tv={assertOptions:$he,validators:rb};var uo=Tv.validators,nb=class{static{o(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new hD,response:new hD}}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+=`
|
|
104
|
+
`+i):n.stack=i}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=ma(this.defaults,t);let{transitional:n,paramsSerializer:s,headers:i}=t;n!==void 0&&Tv.assertOptions(n,{silentJSONParsing:uo.transitional(uo.boolean),forcedJSONParsing:uo.transitional(uo.boolean),clarifyTimeoutError:uo.transitional(uo.boolean)},!1),s!=null&&(ie.isFunction(s)?t.paramsSerializer={serialize:s}:Tv.assertOptions(s,{encode:uo.function,serialize:uo.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Tv.assertOptions(t,{baseUrl:uo.spelling("baseURL"),withXsrfToken:uo.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=Yr.concat(a,i);let u=[],c=!0;this.interceptors.request.forEach(o(function(S){typeof S.runWhen=="function"&&S.runWhen(t)===!1||(c=c&&S.synchronous,u.unshift(S.fulfilled,S.rejected))},"unshiftRequestInterceptors"));let l=[];this.interceptors.response.forEach(o(function(S){l.push(S.fulfilled,S.rejected)},"pushResponseInterceptors"));let h,m=0,g;if(!c){let v=[tb.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++],S=u[m++];try{y=v(y)}catch(w){S.call(this,w);break}}try{h=tb.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=ma(this.defaults,e);let t=mf(e.baseURL,e.url,e.allowAbsoluteUrls);return df(t,e.params,e.paramsSerializer)}};ie.forEach(["delete","get","head","options"],o(function(e){nb.prototype[e]=function(t,n){return this.request(ma(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(ma(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))},"httpMethod")}o(t,"generateHTTPMethod"),nb.prototype[e]=t(),nb.prototype[e+"Form"]=t(!0)},"forEachMethodWithData"));var Iv=nb;var Ghe=class KF{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 fi(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 KF(o(function(s){e=s},"executor")),cancel:e}}},$F=Ghe;function DD(r){return o(function(t){return r.apply(null,t)},"wrap")}o(DD,"spread");function BD(r){return ie.isObject(r)&&r.isAxiosError===!0}o(BD,"isAxiosError");var RD={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(RD).forEach(([r,e])=>{RD[e]=r});var GF=RD;function XF(r){let e=new Iv(r),t=yv(Iv.prototype.request,e);return ie.extend(t,Iv.prototype,e,{allOwnKeys:!0}),ie.extend(t,e,null,{allOwnKeys:!0}),t.create=o(function(s){return XF(ma(r,s))},"create"),t}o(XF,"createInstance");var En=XF(Sd);En.Axios=Iv;En.CanceledError=fi;En.CancelToken=$F;En.isCancel=Av;En.VERSION=gf;En.toFormData=xc;En.AxiosError=et;En.Cancel=En.CanceledError;En.all=o(function(e){return Promise.all(e)},"all");En.spread=DD;En.isAxiosError=BD;En.mergeConfig=ma;En.AxiosHeaders=Yr;En.formToJSON=r=>WE(ie.isHTMLForm(r)?new FormData(r):r);En.getAdapter=eb.getAdapter;En.HttpStatusCode=GF;En.default=En;var sb=En;var{Axios:CNe,AxiosError:NNe,CanceledError:TNe,isCancel:INe,CancelToken:_Ne,VERSION:DNe,all:BNe,Cancel:RNe,isAxiosError:ONe,spread:PNe,toFormData:kNe,AxiosHeaders:LNe,HttpStatusCode:VNe,formToJSON:UNe,getAdapter:jNe,mergeConfig:FNe}=sb;import Zhe from"os";import{arch as Jhe,platform as Yhe}from"os";import{join as _v,dirname as OD,resolve as Qhe}from"path";import{existsSync as ib}from"fs";import{resolve as zF}from"path";import{createRequire as WF}from"module";import{fileURLToPath as Xhe,pathToFileURL as Whe}from"url";var zhe=typeof jest<"u"||process.env.JEST_WORKER_ID!==void 0,Ad,JF=o(()=>{if(Ad!==void 0)return Ad;if(zhe){Ad=void 0;return}try{Ad=new Function("try { return import.meta.url; } catch { return undefined; }")()}catch{Ad=void 0}return Ad},"getImportMetaUrl"),YF=o(()=>{if(typeof Je<"u")return Je;let r=JF();if(r)return WF(r);let e=Whe(zF(process.cwd(),"package.json")).href;return WF(e)},"getRequireFn"),QF=o(()=>{if(typeof __filename<"u")return __filename;let r=JF();return r?Xhe(r):zF(process.cwd())},"getCurrentFile");var Dv=o(r=>YF()(r),"exportRequireModule"),ab=o(r=>{r=`${r}.node`;let e=`${Yhe()}-${Jhe()}`;if(process.env.NFETS_ADDONS_DIR)return Dv(_v(process.env.NFETS_ADDONS_DIR,r));let t=QF(),n=Qhe(t,"../../../../"),s=_v(n,"build","addons",e,r);if(ib(s))return Dv(s);let i=t;for(let a=0;a<5;a++){let u=_v(i,"build","addons",e,r);if(ib(u))return Dv(u);let c=OD(i);if(c===i)break;i=c}i=t;for(let a=0;a<5;a++){let u=_v(i,"node_modules","nfets","build","addons",e,r);if(ib(u))return Dv(u);let c=OD(i);if(c===i)break;i=c}i=t;for(let a=0;a<5;a++){let u=_v(i,"build","Release",r);if(ib(u))return Dv(u);let c=OD(i);if(c===i)break;i=c}throw new Error(`Addon ${e}/${r} not found`)},"addon");var ob=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(Zhe.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
|
|
105
|
+
`).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=ab("winhttp_ssl_client"),{CN:i}=new Cd().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 ZF=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:tpe.SSL_OP_LEGACY_SERVER_CONNECT};if(!this.certificate)return new PD({...e});let{ca:t,password:n,certificate:s,privateKey:i}=this.certificate;return i?new PD({passphrase:n,cert:s.toString(),ca:t.map(a=>a.toString()),key:this.certificateRepository.getStringPrivateKey(i),...e}):new PD({...e})}get defaultSoapHeaders(){return{"Content-Type":"application/soap+xml; charset=utf-8"}}getDefaultRequest(){let e=sb.create();return e.defaults.httpsAgent=this.httpsAgent,e}get request(){if(epe.platform()==="win32")try{return this.certificate?ob.create(this.certificate):this.getDefaultRequest()}catch{return this.getDefaultRequest()}return this.getDefaultRequest()}async send(e){try{let t=this.request,n=await(0,eM.createClientAsync)(`${e.url}?wsdl`,{request:t,attributesKey:"$",wsdl_options:{request:t}});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 Ii(c)}catch(t){return Zl(t)}}};var rpe=ab("xml_validator"),tM=rpe;var Q0e=Hl(A9(),1);import Y0e from"crypto";var C9="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 npe(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(npe,"SelectNodesEx");function spe(r,e){let t=Nd("xpath").select;return t(e,r)}o(spe,"SelectNodesNode");var N9=typeof self<"u"?npe:spe;function Hi(r){r=r.replace(/\r\n/g,`
|
|
106
|
+
`).replace(/\r/g,`
|
|
107
|
+
`);let e;return typeof DOMParser<"u"?e=DOMParser:e=Nd("DOMParser"),new e().parseFromString(r,C9)}o(Hi,"Parse");function lo(r){let e;return typeof XMLSerializer<"u"?e=XMLSerializer:e=Nd("XMLSerializer"),new e().serializeToString(r)}o(lo,"Stringify");function Ab(r,e){let t=N9(r,e);return t&&t.length>0?t[0]:null}o(Ab,"SelectSingleNode");function T9(r,e){return r&&r.nodeType===e}o(T9,"isNodeType");function pi(r){return T9(r,qt.Element)}o(pi,"isElement");function xf(r){return T9(r,qt.Document)}o(xf,"isDocument");var I9=new Map;function _9(r){for(let e in r)I9.set(e,r[e])}o(_9,"setNodeDependencies");function Nd(r){let e=I9.get(r);if(!e)throw new Error(`Node dependency not found: ${r}. Please use 'setNodeDependencies' to register it.`);return e}o(Nd,"getNodeDependency");var Ov="element",Pv="attribute",Cb="content";var ipe=1e9;function $D(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($D,"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=$D({},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=$D({},n.items)),n.target=e;let i;r.parser?i={parser:r.parser,required:r.required||!1,maxOccurs:r.maxOccurs||ipe,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:Ov},B9(e,s,r)}}o(Jt,"XmlChildElement");function Ur(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=$D({},n.items)),n.target=e;let i=n.items;i[t]=r,i[t].type=Pv,B9(e,s,r)}}o(Ur,"XmlAttribute");function B9(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(B9,"defineProperty");var Ac=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 ape(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(ape,"printf");function ope(r,e){let t=r+"";for(;t.length<e;)t="0"+t;return t}o(ope,"padNum");var $e=class{static{o(this,"XmlError")}constructor(e,...t){this.prefix="XMLJS",this.code=e,this.name=this.constructor.name;let n=ape(yn[e],...t);this.message=`${this.prefix}${ope(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 yn={};yn[De.NONE]="No description";yn[De.NULL_REFERENCE]="Null reference";yn[De.NULL_PARAM]="'%1' has empty '%2' object";yn[De.DECORATOR_NULL_PARAM]="Decorator '%1' has empty '%2' parameter";yn[De.COLLECTION_LIMIT]="Collection of '%1' in element '%2' has wrong amount of items";yn[De.METHOD_NOT_IMPLEMENTED]="Method is not implemented";yn[De.METHOD_NOT_SUPPORTED]="Method is not supported";yn[De.PARAM_REQUIRED]="Required parameter is missing '%1'";yn[De.CONVERTER_UNSUPPORTED]="Converter is not supported";yn[De.ELEMENT_MALFORMED]="Malformed element '%1'";yn[De.ELEMENT_MISSING]="Element '%1' is missing in '%2'";yn[De.ATTRIBUTE_MISSING]="Attribute '%1' is missing in '%2'";yn[De.CONTENT_MISSING]="Content is missing in '%1'";yn[De.CRYPTOGRAPHIC]="Cryptographic error: %1";yn[De.CRYPTOGRAPHIC_NO_MODULE]="WebCrypto module is not found";yn[De.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM]="Unknown transform %1";yn[De.ALGORITHM_NOT_SUPPORTED]="Algorithm is not supported '%1'";yn[De.ALGORITHM_WRONG_NAME]="Algorithm wrong name in use '%1'";yn[De.XML_EXCEPTION]="XML exception: %1";yn[De.KEY_INFO_CLAUSE_NOT_SUPPORTED]="KeyInfoClause type '%1' is not supported";var br=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 Ki={get:o(r=>{if(r)return br.ToBase64(r)},"get"),set:o(r=>br.FromBase64(r),"set")},kv={get:o(r=>r?r.toString():"0","get"),set:o(r=>Number(r),"set")};var upe="xml_root",Ws=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 xf(e)&&(n=e.getElementById(t)),n==null&&(n=Ab(e,`//*[@*[local-name()='Id']='${t}']`),n==null&&(n=Ab(e,`//*[@*[local-name()='ID']='${t}']`),n==null&&(n=Ab(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 Hi(`<${u}${a}></${u}>`)}static GetChildren(e,t,n){e=xf(e)?e.documentElement:e;let s=[];for(let i=0;i<e.childNodes.length;i++){let a=e.childNodes[i];pi(a)&&a.localName===t&&(a.namespaceURI===n||!n)&&s.push(a)}return s}static GetFirstChild(e,t,n){e=xf(e)?e.documentElement:e;for(let s=0;s<e.childNodes.length;s++){let i=e.childNodes[s];if(pi(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(pi(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 Cb:{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 Pv:{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 Ov:{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 S=0;S<m.childNodes.length;S++){let w=m.childNodes.item(S);pi(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(S=>s.appendChild(S.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=Hi(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 Cb:{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 Pv:{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 Ov:{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 Td))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(!pi(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?lo(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 Td=class extends Ws{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 Ac(this.GetIterator().map(e))}Filter(e){return new Ac(this.GetIterator().filter(e))}Sort(e){return new Ac(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(!(pi(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 Id=class extends Ac{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 cpe="[object ArrayBuffer]",vt=class WD{static{o(this,"BufferSourceConverter")}static isArrayBuffer(e){return Object.prototype.toString.call(e)===cpe}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=WD.toUint8Array(e),s=WD.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}},XD="string",lpe=/^[0-9a-f\s]+$/i,fpe=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,hpe=/^[a-zA-Z0-9-_]+$/,R9=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))}},fo=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 _d{static{o(this,"Convert")}static isHex(e){return typeof e===XD&&lpe.test(e)}static isBase64(e){return typeof e===XD&&fpe.test(e)}static isBase64Url(e){return typeof e===XD&&hpe.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 fo.toString(n,!0);case"utf16":case"utf16be":return fo.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 fo.fromString(e,!0);case"utf16":case"utf16be":return fo.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(!_d.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(!_d.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=_d.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.FromBinary(e);case"utf8":return R9.fromString(e);case"utf16":case"utf16be":return fo.fromString(e);case"utf16le":case"usc2":return fo.fromString(e,!0);default:throw new Error(`Unknown type of encoding '${t}'`)}}static ToUtf8String(e,t=_d.DEFAULT_UTF8_ENCODING){switch(t){case"ascii":return this.ToBinary(e);case"utf8":return R9.toString(e);case"utf16":case"utf16be":return fo.toString(e);case"utf16le":case"usc2":return fo.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(!_d.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 fo.toString(e,t)}static FromUtf16String(e,t=!1){return fo.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 Nb(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(Nb,"bufferToHexCodes");function Yo(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(Yo,"utilFromBase");function ga(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(ga,"utilToBase");function wf(...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(wf,"utilConcatBuf");function Tb(...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(Tb,"utilConcatView");function zD(){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=Yo(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,Yo(i,8)-n}o(zD,"utilDecodeTC");function P9(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=ga(a,8,n),c=new Uint8Array(u);return c[0]|=128,u}let s=ga(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(P9,"utilEncodeTC");function Cc(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(Cc,"isEqualBuffer");function zs(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(zs,"padNumber");var k9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",L9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=";function Ib(r,e=!1,t=!1,n=!1){let s=0,i=0,a=0,u="",c=e?L9:k9;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,S=m&63;i===1?v=S=64:a===1&&(S=64),t?v===64?u+=`${c.charAt(g)}${c.charAt(y)}`:S===64?u+=`${c.charAt(g)}${c.charAt(y)}${c.charAt(v)}`:u+=`${c.charAt(g)}${c.charAt(y)}${c.charAt(v)}${c.charAt(S)}`:u+=`${c.charAt(g)}${c.charAt(y)}${c.charAt(v)}${c.charAt(S)}`}return u}o(Ib,"toBase64");function Dd(r,e=!1,t=!1){let n=e?L9:k9;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(Dd,"fromBase64");function Lv(r){let e="",t=new Uint8Array(r);for(let n of t)e+=String.fromCharCode(n);return e}o(Lv,"arrayBufferToString");function Sf(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(Sf,"stringToArrayBuffer");var ppe=Math.log(2);function V9(r){let e=Math.log(r)/ppe,t=Math.floor(e),n=Math.round(e);return t===n?t:n}o(V9,"nearestPowerOf2");function ke(r,e){for(let t of e)delete r[t]}o(ke,"clearProps");function _b(){if(typeof BigInt>"u")throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}o(_b,"assertBigInt");function ZD(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(ZD,"concat");function Qo(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(Qo,"checkBufferParams");var eB=class{static{o(this,"ViewWriter")}constructor(){this.items=[]}write(e){this.items.push(e)}final(){return ZD(this.items)}},Vv=[new Uint8Array([1])],j9="0123456789",JD="name",F9="valueHexView",dpe="isHexOnly",mpe="idBlock",gpe="tagClass",vpe="tagNumber",ype="isConstructed",xpe="fromBER",wpe="toBER",Spe="local",Js="",va=new ArrayBuffer(0),Db=new Uint8Array(0),jv="EndOfContent",q9="OCTET STRING",H9="BIT STRING";function Zo(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):Db}fromBER(n,s,i){let a=n instanceof ArrayBuffer?new Uint8Array(n):n;if(!Qo(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",va)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:Nt.ToHex(this.valueHexView)}}},e.NAME="hexBlock",e}o(Zo,"HexBlock");var Ef=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=Js,warnings:n=[],valueBeforeDecode:s=Db}={}){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)}}};Ef.NAME="baseBlock";var Ys=class extends Ef{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'")}};Ys.NAME="valueBlock";var K9=class extends Zo(Ef){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):Db,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",va}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=ga(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(!Qo(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=Yo(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}}};K9.NAME="identificationBlock";var $9=class extends Ef{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(!Qo(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=Yo(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=ga(this.length,8);if(s.byteLength>127)return this.error="Too big length",va;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}}};$9.NAME="lengthBlock";var ht={},Is=class extends Ef{static{o(this,"BaseBlock")}constructor({name:e=Js,optional:t=!1,primitiveSchema:n,...s}={},i){super(s),this.name=e,this.optional=t,n&&(this.primitiveSchema=n),this.idBlock=new K9(s),this.lenBlock=new $9(s),this.valueBlock=i?new i(s):new Ys(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 eB;t||G9(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?va: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 Cc(t,n)}};Is.NAME="BaseBlock";function G9(r){var e;if(r instanceof ht.Constructed)for(let t of r.valueBlock.value)G9(t)&&(r.lenBlock.isIndefiniteForm=!0);return!!(!((e=r.lenBlock)===null||e===void 0)&&e.isIndefiniteForm)}o(G9,"prepareIndefiniteForm");var X9=class extends Is{static{o(this,"BaseStringBlock")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor({value:e=Js,...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}'`}};X9.NAME="BaseStringBlock";var W9=class extends Zo(Ys){static{o(this,"LocalPrimitiveValueBlock")}constructor({isHexOnly:e=!0,...t}={}){super(t),this.isHexOnly=e}};W9.NAME="PrimitiveValueBlock";var z9,xt=class extends Is{static{o(this,"Primitive")}constructor(e={}){super(e,W9),this.idBlock.isConstructed=!1}};z9=xt;ht.Primitive=z9;xt.NAME="PRIMITIVE";function Epe(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(Epe,"localChangeType");function Fv(r,e=0,t=r.length){let n=e,s=new Is({},Ys),i=new Ef;if(!Qo(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=Is;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=Epe(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(Fv,"localFromBER");function Qr(r){if(!r.byteLength){let e=new Is({},Ys);return e.error="Input buffer has zero length",{offset:-1,result:e}}return Fv(vt.toUint8Array(r).slice(),0,r.byteLength)}o(Qr,"fromBER");function bpe(r,e){return r?1:e}o(bpe,"checkLen");var Nc=class extends Ys{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(!Qo(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(;bpe(this.isIndefiniteForm,n)>0;){let a=Fv(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===jv)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===jv?this.value.pop():this.warnings.push("No EndOfContent block encoded")),i}toBER(e,t){let n=t||new eB;for(let s=0;s<this.value.length;s++)this.value[s].toBER(e,n);return t?va:n.final()}toJSON(){let e={...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,value:[]};for(let t of this.value)e.value.push(t.toJSON());return e}};Nc.NAME="ConstructedValueBlock";var J9,fe=class extends Is{static{o(this,"Constructed")}constructor(e={}){super(e,Nc),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(`
|
|
108
|
+
`).map(s=>` ${s}`).join(`
|
|
109
|
+
`));let t=this.idBlock.tagClass===3?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return e.length?`${t} :
|
|
110
|
+
${e.join(`
|
|
111
|
+
`)}`:`${t} :`}};J9=fe;ht.Constructed=J9;fe.NAME="CONSTRUCTED";var Y9=class extends Ys{static{o(this,"LocalEndOfContentValueBlock")}fromBER(e,t,n){return t}toBER(e){return va}};Y9.override="EndOfContentValueBlock";var Q9,Z9=class extends Is{static{o(this,"EndOfContent")}constructor(e={}){super(e,Y9),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}};Q9=Z9;ht.EndOfContent=Q9;Z9.NAME=jv;var eq,Zr=class extends Is{static{o(this,"Null")}constructor(e={}){super(e,Ys),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}`}};eq=Zr;ht.Null=eq;Zr.NAME="NULL";var tq=class extends Zo(Ys){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 Qo(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,zD.call(this),this.blockLength=n,t+n):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}};tq.NAME="BooleanValueBlock";var rq,ya=class extends Is{static{o(this,"Boolean")}getValue(){return this.valueBlock.value}setValue(e){this.valueBlock.value=e}constructor(e={}){super(e,tq),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}};rq=ya;ht.Boolean=rq;ya.NAME="BOOLEAN";var nq=class extends Zo(Nc){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=Nc.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===jv){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1}if(a!==q9)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?Nc.prototype.toBER.call(this,e,t):e?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),isConstructed:this.isConstructed}}};nq.NAME="OctetStringValueBlock";var tB,qe=class extends Is{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},nq),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=Fv(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 tB&&e.push(t.valueBlock.valueHexView);return vt.concat(e)}};tB=qe;ht.OctetString=tB;qe.NAME=q9;var sq=class extends Zo(Nc){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=Nc.prototype.fromBER.call(this,e,t,n),s===-1)return s;for(let u of this.value){let c=u.constructor.NAME;if(c===jv){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(c!==H9)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(!Qo(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=Fv(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 Nc.prototype.toBER.call(this,e,t);if(e)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength)return va;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}}};sq.NAME="BitStringValueBlock";var iq,Gt=class extends Is{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},sq),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}`}}};iq=Gt;ht.BitString=iq;Gt.NAME=H9;var aq;function Ape(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=Tb(new Uint8Array([l%10]),i);break;default:i[a-m]=l%10}}return t[0]>0&&(i=Tb(t,i)),i}o(Ape,"viewAdd");function M9(r){if(r>=Vv.length)for(let e=Vv.length;e<=r;e++){let t=new Uint8Array([0]),n=Vv[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=Tb(t,n)),Vv.push(n)}return Vv[r]}o(M9,"power2");function Cpe(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(Cpe,"viewSub");var rB=class extends Zo(Ys){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=zD.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(P9(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=Cpe(M9(n),t),a="-";break;default:t=Ape(t,M9(n))}n++,s>>=1}}for(let c=0;c<t.length;c++)t[c]&&(u=!0),u&&(a+=j9.charAt(t[c]));return u===!1&&(a+=j9.charAt(0)),a}};aq=rB;rB.NAME="IntegerValueBlock";Object.defineProperty(aq.prototype,"valueHex",{set:o(function(r){this.valueHexView=new Uint8Array(r),this.setValueHex()},"set"),get:o(function(){return this.valueHexView.slice().buffer},"get")});var Uv,xe=class extends Is{static{o(this,"Integer")}constructor(e={}){super(e,rB),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return _b(),BigInt(this.valueBlock.toString())}static fromBigInt(e){_b();let t=BigInt(e),n=new eB,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 Uv({valueHex:n.final()})}convertToDER(){let e=new Uv({valueHex:this.valueBlock.valueHexView});return e.valueBlock.toDER(),e}convertFromDER(){return new Uv({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}};Uv=xe;ht.Integer=Uv;xe.NAME="INTEGER";var oq,Tc=class extends xe{static{o(this,"Enumerated")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}};oq=Tc;ht.Enumerated=oq;Tc.NAME="ENUMERATED";var YD=class extends Zo(Ys){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(!Qo(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=Yo(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),t+this.blockLength)}set valueBigInt(e){_b();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=ga(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",va;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}}};YD.NAME="sidBlock";var uq=class extends Ys{static{o(this,"LocalObjectIdentifierValueBlock")}constructor({value:e=Js,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new YD;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,va;t.push(s)}return ZD(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 YD;if(s>Number.MAX_SAFE_INTEGER){_b();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}};uq.NAME="ObjectIdentifierValueBlock";var cq,ot=class extends Is{static{o(this,"ObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,uq),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};cq=ot;ht.ObjectIdentifier=cq;ot.NAME="OBJECT IDENTIFIER";var QD=class extends Zo(Ef){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(!Qo(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=Yo(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=ga(this.valueDec,7);if(t.byteLength===0)return this.error="Error during encoding SID value",va;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}}};QD.NAME="relativeSidBlock";var lq=class extends Ys{static{o(this,"LocalRelativeObjectIdentifierValueBlock")}constructor({value:e=Js,...t}={}){super(t),this.value=[],e&&this.fromString(e)}fromBER(e,t,n){let s=t;for(;n>0;){let i=new QD;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,va;n.push(i)}return ZD(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 QD;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}};lq.NAME="RelativeObjectIdentifierValueBlock";var fq,hq=class extends Is{static{o(this,"RelativeObjectIdentifier")}getValue(){return this.valueBlock.toString()}setValue(e){this.valueBlock.fromString(e)}constructor(e={}){super(e,lq),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};fq=hq;ht.RelativeObjectIdentifier=fq;hq.NAME="RelativeObjectIdentifier";var pq,J=class extends fe{static{o(this,"Sequence")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}};pq=J;ht.Sequence=pq;J.NAME="SEQUENCE";var dq,en=class extends fe{static{o(this,"Set")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}};dq=en;ht.Set=dq;en.NAME="SET";var mq=class extends Zo(Ys){static{o(this,"LocalStringValueBlock")}constructor({...e}={}){super(e),this.isHexOnly=!0,this.value=Js}toJSON(){return{...super.toJSON(),value:this.value}}};mq.NAME="StringValueBlock";var gq=class extends mq{static{o(this,"LocalSimpleStringValueBlock")}};gq.NAME="SimpleStringValueBlock";var di=class extends X9{static{o(this,"LocalSimpleStringBlock")}constructor({...e}={}){super(e,gq)}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}};di.NAME="SIMPLE STRING";var vq=class extends di{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}};vq.NAME="Utf8StringValueBlock";var yq,$i=class extends vq{static{o(this,"Utf8String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}};yq=$i;ht.Utf8String=yq;$i.NAME="UTF8String";var xq=class extends di{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))}};xq.NAME="BmpStringValueBlock";var wq,Bd=class extends xq{static{o(this,"BmpString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}};wq=Bd;ht.BmpString=wq;Bd.NAME="BMPString";var Sq=class extends di{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=ga(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}};Sq.NAME="UniversalStringValueBlock";var Eq,Rd=class extends Sq{static{o(this,"UniversalString")}constructor({...e}={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}};Eq=Rd;ht.UniversalString=Eq;Rd.NAME="UniversalString";var bq,bf=class extends di{static{o(this,"NumericString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}};bq=bf;ht.NumericString=bq;bf.NAME="NumericString";var Aq,Gi=class extends di{static{o(this,"PrintableString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}};Aq=Gi;ht.PrintableString=Aq;Gi.NAME="PrintableString";var Cq,Od=class extends di{static{o(this,"TeletexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}};Cq=Od;ht.TeletexString=Cq;Od.NAME="TeletexString";var Nq,Bb=class extends di{static{o(this,"VideotexString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}};Nq=Bb;ht.VideotexString=Nq;Bb.NAME="VideotexString";var Tq,Mv=class extends di{static{o(this,"IA5String")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}};Tq=Mv;ht.IA5String=Tq;Mv.NAME="IA5String";var Iq,Rb=class extends di{static{o(this,"GraphicString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}};Iq=Rb;ht.GraphicString=Iq;Rb.NAME="GraphicString";var _q,qv=class extends di{static{o(this,"VisibleString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}};_q=qv;ht.VisibleString=_q;qv.NAME="VisibleString";var Dq,Ob=class extends di{static{o(this,"GeneralString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}};Dq=Ob;ht.GeneralString=Dq;Ob.NAME="GeneralString";var Bq,Pb=class extends di{static{o(this,"CharacterString")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}};Bq=Pb;ht.CharacterString=Bq;Pb.NAME="CharacterString";var Rq,Af=class extends qv{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]=zs(this.year<2e3?this.year-1900:this.year-2e3,2),t[1]=zs(this.month,2),t[2]=zs(this.day,2),t[3]=zs(this.hour,2),t[4]=zs(this.minute,2),t[5]=zs(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}}};Rq=Af;ht.UTCTime=Rq;Af.NAME="UTCTime";var Oq,jr=class extends Af{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(zs(this.year,4)),t.push(zs(this.month,2)),t.push(zs(this.day,2)),t.push(zs(this.hour,2)),t.push(zs(this.minute,2)),t.push(zs(this.second,2)),this.millisecond!==0&&(t.push("."),t.push(zs(this.millisecond,3))),t.push("Z"),t.join("")}return super.toString(e)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}};Oq=jr;ht.GeneralizedTime=Oq;jr.NAME="GeneralizedTime";var Pq,kq=class extends $i{static{o(this,"DATE")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}};Pq=kq;ht.DATE=Pq;kq.NAME="DATE";var Lq,Vq=class extends $i{static{o(this,"TimeOfDay")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}};Lq=Vq;ht.TimeOfDay=Lq;Vq.NAME="TimeOfDay";var Uq,jq=class extends $i{static{o(this,"DateTime")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}};Uq=jq;ht.DateTime=Uq;jq.NAME="DateTime";var Fq,Mq=class extends $i{static{o(this,"Duration")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}};Fq=Mq;ht.Duration=Fq;Mq.NAME="Duration";var qq,Hq=class extends $i{static{o(this,"TIME")}constructor(e={}){super(e),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}};qq=Hq;ht.TIME=qq;Hq.NAME="TIME";var bt=class{static{o(this,"Any")}constructor({name:e=Js,optional:t=!1}={}){this.name=e,this.optional=t}},Fr=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}},Hv=class{static{o(this,"RawData")}get data(){return this.dataView.slice().buffer}set data(e){this.dataView=vt.toUint8Array(e)}constructor({data:e=Db}={}){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 Fr){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(JD)&&(i.name=t.name),i}}if(t instanceof bt)return t.hasOwnProperty(JD)&&(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(!(mpe in t))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(xpe in t.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(wpe 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(vpe)===!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(ype)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(t.idBlock.isConstructed!==e.idBlock.isConstructed)return{verified:!1,result:r};if(!(dpe 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(!(F9 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,Js),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,Js),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,Js),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,Js),t.name&&delete r[t.name]),a;if(JD in t.valueBlock.value[0]&&t.valueBlock.value[0].name.length>0){let l={};Spe 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,Js),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,Js),t.name&&(delete r[t.name],c.name=t.name)),c}return{verified:!0,result:r}}if(t.primitiveSchema&&F9 in e.valueBlock){let i=Fv(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,Js),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 Zn=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 Npe=16777216,eu=class r{static{o(this,"SeqStream")}constructor(e={}){this._stream=new Zn,this._length=0,this._start=0,this.backward=!1,this.appendBlock=0,this.prevLength=0,this.prevStart=0,"view"in e?this.stream=new Zn({view:e.view}):"buffer"in e?this.stream=new Zn({buffer:e.buffer}):"string"in e?this.stream=new Zn({string:e.string}):"hexstring"in e?this.stream=new Zn({hexstring:e.hexstring}):"stream"in e?this.stream=e.stream.slice():this.stream=new Zn,"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 Zn}}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 Zn};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 Zn}}else if(s.position>this._start+s.value.length+n)return{position:-1,value:new Zn};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]*Npe+(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))}};eu.APPEND_BLOCK=1e3;function Ipe(r){return r instanceof Uint8Array||r!=null&&typeof r=="object"&&r.constructor.name==="Uint8Array"}o(Ipe,"isBytes");function nB(r,...e){if(!Ipe(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(nB,"bytes");function sB(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(sB,"exists");function $q(r,e){nB(r);let t=e.outputLen;if(r.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}o($q,"output");var Lb=o(r=>new DataView(r.buffer,r.byteOffset,r.byteLength),"createView"),xa=o((r,e)=>r<<32-e|r>>>e,"rotr"),Vb=o((r,e)=>r<<e|r>>>32-e>>>0,"rotl"),CDe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function _pe(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}o(_pe,"utf8ToBytes");function iB(r){return typeof r=="string"&&(r=_pe(r)),nB(r),r}o(iB,"toBytes");var kb=class{static{o(this,"Hash")}clone(){return this._cloneInto()}},NDe={}.toString;function Cf(r){let e=o(n=>r().update(iB(n)).digest(),"hashC"),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}o(Cf,"wrapConstructor");function Dpe(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(Dpe,"setBigUint64");var Ub=o((r,e,t)=>r&e^~r&t,"Chi"),jb=o((r,e,t)=>r&e^r&t^e&t,"Maj"),Ic=class extends kb{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=Lb(this.buffer)}update(e){sB(this);let{view:t,buffer:n,blockLen:s}=this;e=iB(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=Lb(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){sB(this),$q(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;Dpe(n,s-8,BigInt(this.length*8),i),this.process(n,0);let u=Lb(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 Kv=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),_c=new Uint32Array(80),Bpe=class extends Ic{static{o(this,"SHA1")}constructor(){super(64,20,8,!1),this.A=Kv[0]|0,this.B=Kv[1]|0,this.C=Kv[2]|0,this.D=Kv[3]|0,this.E=Kv[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)_c[c]=e.getUint32(t,!1);for(let c=16;c<80;c++)_c[c]=Vb(_c[c-3]^_c[c-8]^_c[c-14]^_c[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=Ub(s,i,a),h=1518500249):c<40?(l=s^i^a,h=1859775393):c<60?(l=jb(s,i,a),h=2400959708):(l=s^i^a,h=3395469782);let m=Vb(n,5)+l+u+h+_c[c]|0;u=a,a=i,i=Vb(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(){_c.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}},Gq=Cf(()=>new Bpe);var Rpe=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]),Dc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Bc=new Uint32Array(64),Ope=class extends Ic{static{o(this,"SHA256")}constructor(){super(64,32,8,!1),this.A=Dc[0]|0,this.B=Dc[1]|0,this.C=Dc[2]|0,this.D=Dc[3]|0,this.E=Dc[4]|0,this.F=Dc[5]|0,this.G=Dc[6]|0,this.H=Dc[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)Bc[m]=e.getUint32(t,!1);for(let m=16;m<64;m++){let g=Bc[m-15],y=Bc[m-2],v=xa(g,7)^xa(g,18)^g>>>3,S=xa(y,17)^xa(y,19)^y>>>10;Bc[m]=S+Bc[m-7]+v+Bc[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=xa(u,6)^xa(u,11)^xa(u,25),y=h+g+Ub(u,c,l)+Rpe[m]+Bc[m]|0,S=(xa(n,2)^xa(n,13)^xa(n,22))+jb(n,s,i)|0;h=l,l=c,c=u,u=a+y|0,a=i,i=s,s=n,n=y+S|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(){Bc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var aB=Cf(()=>new Ope);var Fb=BigInt(4294967295),oB=BigInt(32);function Xq(r,e=!1){return e?{h:Number(r&Fb),l:Number(r>>oB&Fb)}:{h:Number(r>>oB&Fb)|0,l:Number(r&Fb)|0}}o(Xq,"fromBig");function Ppe(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}=Xq(r[s],e);[t[s],n[s]]=[i,a]}return[t,n]}o(Ppe,"split");var kpe=o((r,e)=>BigInt(r>>>0)<<oB|BigInt(e>>>0),"toBig"),Lpe=o((r,e,t)=>r>>>t,"shrSH"),Vpe=o((r,e,t)=>r<<32-t|e>>>t,"shrSL"),Upe=o((r,e,t)=>r>>>t|e<<32-t,"rotrSH"),jpe=o((r,e,t)=>r<<32-t|e>>>t,"rotrSL"),Fpe=o((r,e,t)=>r<<64-t|e>>>t-32,"rotrBH"),Mpe=o((r,e,t)=>r>>>t-32|e<<64-t,"rotrBL"),qpe=o((r,e)=>e,"rotr32H"),Hpe=o((r,e)=>r,"rotr32L"),Kpe=o((r,e,t)=>r<<t|e>>>32-t,"rotlSH"),$pe=o((r,e,t)=>e<<t|r>>>32-t,"rotlSL"),Gpe=o((r,e,t)=>e<<t-32|r>>>64-t,"rotlBH"),Xpe=o((r,e,t)=>r<<t-32|e>>>64-t,"rotlBL");function Wpe(r,e,t,n){let s=(e>>>0)+(n>>>0);return{h:r+t+(s/2**32|0)|0,l:s|0}}o(Wpe,"add");var zpe=o((r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),"add3L"),Jpe=o((r,e,t,n)=>e+t+n+(r/2**32|0)|0,"add3H"),Ype=o((r,e,t,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0),"add4L"),Qpe=o((r,e,t,n,s)=>e+t+n+s+(r/2**32|0)|0,"add4H"),Zpe=o((r,e,t,n,s)=>(r>>>0)+(e>>>0)+(t>>>0)+(n>>>0)+(s>>>0),"add5L"),ede=o((r,e,t,n,s,i)=>e+t+n+s+i+(r/2**32|0)|0,"add5H");var tde={fromBig:Xq,split:Ppe,toBig:kpe,shrSH:Lpe,shrSL:Vpe,rotrSH:Upe,rotrSL:jpe,rotrBH:Fpe,rotrBL:Mpe,rotr32H:qpe,rotr32L:Hpe,rotlSH:Kpe,rotlSL:$pe,rotlBH:Gpe,rotlBL:Xpe,add:Wpe,add3L:zpe,add3H:Jpe,add4L:Ype,add4H:Qpe,add5H:ede,add5L:Zpe},Xt=tde;var[rde,nde]=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))),Rc=new Uint32Array(80),Oc=new Uint32Array(80),Mb=class extends Ic{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:S,Hl:w}=this;return[e,t,n,s,i,a,u,c,l,h,m,g,y,v,S,w]}set(e,t,n,s,i,a,u,c,l,h,m,g,y,v,S,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=S|0,this.Hl=w|0}process(e,t){for(let b=0;b<16;b++,t+=4)Rc[b]=e.getUint32(t),Oc[b]=e.getUint32(t+=4);for(let b=16;b<80;b++){let A=Rc[b-15]|0,T=Oc[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=Rc[b-2]|0,H=Oc[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,Oc[b-7],Oc[b-16]),he=Xt.add4H(W,B,K,Rc[b-7],Rc[b-16]);Rc[b]=he|0,Oc[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:S,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&S,M=g&v^~g&w,I=Xt.add5L(_,T,M,nde[b],Oc[b]),H=Xt.add5H(I,C,A,B,rde[b],Rc[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=S|0,_=w|0,S=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:S,l:w}=Xt.add(this.Gh|0,this.Gl|0,S|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,S,w,C,_)}roundClean(){Rc.fill(0),Oc.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 sde=class extends Mb{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}},uB=Cf(()=>new Mb);var cB=Cf(()=>new sde);var ln=new ArrayBuffer(0),V="",Tr=class jB extends TypeError{static{o(this,"ArgumentError")}constructor(){super(...arguments),this.name=jB.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 jB(`Parameter '${t}' is not of type ${s.length>1?`(${s.join(" or ")})`:s[0]}`)}};Tr.NAME="ArgumentError";var mr=class dA 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)),Tr.assert(n,"parameters","object");for(let i of s){let a=n[i];if(a==null)throw new dA(i,t)}}static assertEmpty(e,t,n){if(e==null)throw new dA(t,n)}constructor(e,t=null,n){super(),this.name=dA.NAME,this.field=e,t&&(this.target=t),n?this.message=n:this.message=`Absent mandatory parameter '${e}' ${t?` in '${t}'`:V}`}};mr.NAME="ParameterError";var Te=class y7 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 y7(`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=Qr(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 Nl(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(Nl,"stringPrep");var $v="type",lB="value",FB=class s1 extends Re{static{o(this,"AttributeTypeAndValue")}constructor(e={}){super(),this.type=O(e,$v,s1.defaultValues($v)),this.value=O(e,lB,s1.defaultValues(lB)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case $v:return V;case lB: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,[$v,"typeValue"]);let t=Be(e,e,s1.schema({names:{type:$v,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=[$i.blockName(),Bd.blockName(),Rd.blockName(),bf.blockName(),Gi.blockName(),Od.blockName(),Bb.blockName(),Mv.blockName(),Rb.blockName(),qv.blockName(),Ob.blockName(),Pb.blockName()];if(e instanceof ArrayBuffer)return vt.isEqual(this.value.valueBeforeDecodeView,e);if(e.constructor.blockName()===s1.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=Nl(this.value.valueBlock.value),u=Nl(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}};FB.CLASS_NAME="AttributeTypeAndValue";var Nf="typesAndValues",qb="valueBeforeDecode",Wq="RDN",Mr=class i1 extends Re{static{o(this,"RelativeDistinguishedNames")}constructor(e={}){super(),this.typesAndValues=O(e,Nf,i1.defaultValues(Nf)),this.valueBeforeDecode=O(e,qb,i1.defaultValues(qb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nf:return[];case qb:return ln;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Nf:return t.length===0;case qb: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 en({value:[new Bt({name:t.repeatedSet||V,value:FB.schema(t.typeAndValue||{})})]})})]})}fromSchema(e){ke(e,[Wq,Nf]);let t=Be(e,e,i1.schema({names:{blockName:Wq,repeatedSet:Nf}}));Te.assertSchema(t,this.className),Nf in t.result&&(this.typesAndValues=Array.from(t.result.typesAndValues,n=>new FB({schema:n}))),this.valueBeforeDecode=t.result.RDN.valueBeforeDecodeView.slice().buffer}toSchema(){if(this.valueBeforeDecode.byteLength===0)return new J({value:[new en({value:Array.from(this.typesAndValues,t=>t.toSchema())})]});let e=Qr(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 i1){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?Cc(this.valueBeforeDecode,e):!1}};Mr.CLASS_NAME="RelativeDistinguishedNames";var a1="type",o1="value";function ide(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 Fr({value:[new bf,new Gi]})]}),new fe({optional:!0,idBlock:{tagClass:2,tagNumber:2},name:t.administration_domain_name||V,value:[new Fr({value:[new bf,new Gi]})]}),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 Fr({value:[new bf,new Gi]})]}),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 Gi})]})]})}o(ide,"builtInStandardAttributes");function ade(r=!1){return new J({optional:r,value:[new Gi,new Gi]})}o(ade,"builtInDomainDefinedAttributes");function ode(r=!1){return new en({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(ode,"extensionAttributes");var Ir=class Md extends Re{static{o(this,"GeneralName")}constructor(e={}){super(),this.type=O(e,a1,Md.defaultValues(a1)),this.value=O(e,o1,Md.defaultValues(o1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case a1:return 9;case o1:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case a1:return t===Md.defaultValues(e);case o1:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Fr({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:[ide(t.builtInStandardAttributes||{},!1),ade(!0),ode(!0)]}),new fe({idBlock:{tagClass:3,tagNumber:4},name:t.blockName||V,value:[Mr.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 Fr({value:[new Od,new Gi,new Rd,new $i,new Bd]})]}),new fe({idBlock:{tagClass:3,tagNumber:1},value:[new Fr({value:[new Od,new Gi,new Rd,new $i,new Bd]})]})]}),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,Md.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=Qr(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 Mr({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=Qr(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 Mv({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 Md.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}};Ir.CLASS_NAME="GeneralName";var u1="accessMethod",c1="accessLocation",ude=[u1,c1],MB=class mA extends Re{static{o(this,"AccessDescription")}constructor(e={}){super(),this.accessMethod=O(e,u1,mA.defaultValues(u1)),this.accessLocation=O(e,c1,mA.defaultValues(c1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case u1:return V;case c1:return new Ir;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}),Ir.schema(t.accessLocation||{})]})}fromSchema(e){ke(e,ude);let t=Be(e,e,mA.schema({names:{accessMethod:u1,accessLocation:{names:{blockName:c1}}}}));Te.assertSchema(t,this.className),this.accessMethod=t.result.accessMethod.valueBlock.toString(),this.accessLocation=new Ir({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()}}};MB.CLASS_NAME="AccessDescription";var kc="seconds",Lc="millis",Vc="micros",Df=class qd extends Re{static{o(this,"Accuracy")}constructor(e={}){super(),kc in e&&(this.seconds=O(e,kc,qd.defaultValues(kc))),Lc in e&&(this.millis=O(e,Lc,qd.defaultValues(Lc))),Vc in e&&(this.micros=O(e,Vc,qd.defaultValues(Vc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case kc:case Lc:case Vc:return 0;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case kc:case Lc:case Vc:return t===qd.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,[kc,Lc,Vc]);let t=Be(e,e,qd.schema({names:{seconds:kc,millis:Lc,micros:Vc}}));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}};Df.CLASS_NAME="Accuracy";var Hb="algorithmId",Gv="algorithmParams",x7="algorithm",qB="params",cde=[x7,qB],we=class l1 extends Re{static{o(this,"AlgorithmIdentifier")}constructor(e={}){super(),this.algorithmId=O(e,Hb,l1.defaultValues(Hb)),Gv in e&&(this.algorithmParams=O(e,Gv,l1.defaultValues(Gv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Hb:return V;case Gv:return new bt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Hb:return t===V;case Gv: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,cde);let t=Be(e,e,l1.schema({names:{algorithmIdentifier:x7,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 l1)||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 Hd="altNames",lde=[Hd],HB=class KB extends Re{static{o(this,"AltName")}constructor(e={}){super(),this.altNames=O(e,Hd,KB.defaultValues(Hd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Hd: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:Ir.schema()})]})}fromSchema(e){ke(e,lde);let t=Be(e,e,KB.schema({names:{altNames:Hd}}));Te.assertSchema(t,this.className),Hd in t.result&&(this.altNames=Array.from(t.result.altNames,n=>new Ir({schema:n})))}toSchema(){return new J({value:Array.from(this.altNames,e=>e.toSchema())})}toJSON(){return{altNames:Array.from(this.altNames,e=>e.toJSON())}}};HB.CLASS_NAME="AltName";var Kd="type",$d="values",fde=[Kd,$d],hn=class gA extends Re{static{o(this,"Attribute")}constructor(e={}){super(),this.type=O(e,Kd,gA.defaultValues(Kd)),this.values=O(e,$d,gA.defaultValues($d)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Kd:return V;case $d:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Kd:return t===V;case $d: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 en({name:t.setName||V,value:[new Bt({name:t.values||V,value:new bt})]})]})}fromSchema(e){ke(e,fde);let t=Be(e,e,gA.schema({names:{type:Kd,values:$d}}));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 en({value:this.values})]})}toJSON(){return{type:this.type,values:Array.from(this.values,e=>e.toJSON())}}};hn.CLASS_NAME="Attribute";var f1="notBeforeTime",h1="notAfterTime",hde=[f1,h1],$h=class vA extends Re{static{o(this,"AttCertValidityPeriod")}constructor(e={}){super(),this.notBeforeTime=O(e,f1,vA.defaultValues(f1)),this.notAfterTime=O(e,h1,vA.defaultValues(h1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case f1:case h1: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 jr({name:t.notBeforeTime||V}),new jr({name:t.notAfterTime||V})]})}fromSchema(e){ke(e,hde);let t=Be(e,e,vA.schema({names:{notBeforeTime:f1,notAfterTime:h1}}));Te.assertSchema(t,this.className),this.notBeforeTime=t.result.notBeforeTime.toDate(),this.notAfterTime=t.result.notAfterTime.toDate()}toSchema(){return new J({value:[new jr({valueDate:this.notBeforeTime}),new jr({valueDate:this.notAfterTime})]})}toJSON(){return{notBeforeTime:this.notBeforeTime,notAfterTime:this.notAfterTime}}};$h.CLASS_NAME="AttCertValidityPeriod";var Xv="names",zq="generalNames",es=class $B extends Re{static{o(this,"GeneralNames")}constructor(e={}){super(),this.names=O(e,Xv,$B.defaultValues(Xv)),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,Xv,{});return new J({optional:t,name:n.blockName||V,value:[new Bt({name:n.generalNames||V,value:Ir.schema()})]})}fromSchema(e){ke(e,[Xv,zq]);let t=Be(e,e,$B.schema({names:{blockName:Xv,generalNames:zq}}));Te.assertSchema(t,this.className),this.names=Array.from(t.result.generalNames,n=>new Ir({schema:n}))}toSchema(){return new J({value:Array.from(this.names,e=>e.toSchema())})}toJSON(){return{names:Array.from(this.names,e=>e.toJSON())}}};es.CLASS_NAME="GeneralNames";var pde="2.5.29.9",dde="2.5.29.14",mde="2.5.29.15",gde="2.5.29.16",w7="2.5.29.17",S7="2.5.29.18",GR="2.5.29.19",vde="2.5.29.20",yde="2.5.29.27",xde="2.5.29.21",wde="2.5.29.24",E7="2.5.29.28",b7="2.5.29.29",A7="2.5.29.30",C7="2.5.29.31",XR="2.5.29.46",N7="2.5.29.32",Xi="2.5.29.32.0",Sde="1.3.6.1.4.1.311.21.10",T7="2.5.29.33",WR="2.5.29.35",I7="2.5.29.36",Ede="2.5.29.37",bde="2.5.29.54",zR="1.3.6.1.5.5.7.1.1",Ade="1.3.6.1.5.5.7.1.11",Cde="1.3.6.1.4.1.11129.2.4.2";var Nde="1.3.6.1.4.1.311.21.7",Tde="1.3.6.1.4.1.311.21.1",Ide="1.3.6.1.5.5.7.1.3",JR="1.2.840.113549.1.7.1",_7="1.2.840.113549.1.7.2",D7="1.2.840.113549.1.7.3",B7="1.2.840.113549.1.7.6",_de="1.2.840.113549.1.9.16.1.4",Jq="1.2.840.113549.1.9.22.1",Dde="1.2.840.113549.1.9.22.2",Yq="1.2.840.113549.1.9.22.3",Qq="1.2.840.113549.1.9.23.1",Bde="1.3.6.1.5.5.7",YR=`${Bde}.48`,yA=`${YR}.1.1`,oBe=`${YR}.2`,uBe=`${YR}.1`;var Bf="keyIdentifier",Rf="authorityCertIssuer",Of="authorityCertSerialNumber",Rde=[Bf,Rf,Of],QR=class p1 extends Re{static{o(this,"AuthorityKeyIdentifier")}constructor(e={}){super(),Bf in e&&(this.keyIdentifier=O(e,Bf,p1.defaultValues(Bf))),Rf in e&&(this.authorityCertIssuer=O(e,Rf,p1.defaultValues(Rf))),Of in e&&(this.authorityCertSerialNumber=O(e,Of,p1.defaultValues(Of))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bf:return new qe;case Rf:return[];case Of: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:Ir.schema()})]}),new xt({name:t.authorityCertSerialNumber||V,optional:!0,idBlock:{tagClass:3,tagNumber:2}})]})}fromSchema(e){ke(e,Rde);let t=Be(e,e,p1.schema({names:{keyIdentifier:Bf,authorityCertIssuer:Rf,authorityCertSerialNumber:Of}}));Te.assertSchema(t,this.className),Bf in t.result&&(this.keyIdentifier=new qe({valueHex:t.result.keyIdentifier.valueBlock.valueHex})),Rf in t.result&&(this.authorityCertIssuer=Array.from(t.result.authorityCertIssuer,n=>new Ir({schema:n}))),Of 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}};QR.CLASS_NAME="AuthorityKeyIdentifier";var Tf="pathLenConstraint",If="cA",ZR=class xA extends Re{static{o(this,"BasicConstraints")}constructor(e={}){super(),this.cA=O(e,If,!1),Tf in e&&(this.pathLenConstraint=O(e,Tf,0)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case If:return!1;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new ya({optional:!0,name:t.cA||V}),new xe({optional:!0,name:t.pathLenConstraint||V})]})}fromSchema(e){ke(e,[If,Tf]);let t=Be(e,e,xA.schema({names:{cA:If,pathLenConstraint:Tf}}));Te.assertSchema(t,this.className),If in t.result&&(this.cA=t.result.cA.valueBlock.value),Tf 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!==xA.defaultValues(If)&&e.push(new ya({value:this.cA})),Tf 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!==xA.defaultValues(If)&&(e.cA=this.cA),Tf in this&&(this.pathLenConstraint instanceof xe?e.pathLenConstraint=this.pathLenConstraint.toJSON():e.pathLenConstraint=this.pathLenConstraint),e}};ZR.CLASS_NAME="BasicConstraints";var fB="certificateIndex",hB="keyIndex",R7=class GB extends Re{static{o(this,"CAVersion")}constructor(e={}){super(),this.certificateIndex=O(e,fB,GB.defaultValues(fB)),this.keyIndex=O(e,hB,GB.defaultValues(hB)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fB:case hB: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:wf(i,e)})}toJSON(){return{certificateIndex:this.certificateIndex,keyIndex:this.keyIndex}}};R7.CLASS_NAME="CAVersion";var d1="policyQualifierId",m1="qualifier",Ode=[d1,m1],XB=class wA extends Re{static{o(this,"PolicyQualifierInfo")}constructor(e={}){super(),this.policyQualifierId=O(e,d1,wA.defaultValues(d1)),this.qualifier=O(e,m1,wA.defaultValues(m1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case d1:return V;case m1: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,Ode);let t=Be(e,e,wA.schema({names:{policyQualifierId:d1,qualifier:m1}}));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()}}};XB.CLASS_NAME="PolicyQualifierInfo";var g1="policyIdentifier",Pf="policyQualifiers",Pde=[g1,Pf],WB=class SA extends Re{static{o(this,"PolicyInformation")}constructor(e={}){super(),this.policyIdentifier=O(e,g1,SA.defaultValues(g1)),Pf in e&&(this.policyQualifiers=O(e,Pf,SA.defaultValues(Pf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case g1:return V;case Pf: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:XB.schema()})]})]})}fromSchema(e){ke(e,Pde);let t=Be(e,e,SA.schema({names:{policyIdentifier:g1,policyQualifiers:Pf}}));Te.assertSchema(t,this.className),this.policyIdentifier=t.result.policyIdentifier.valueBlock.toString(),Pf in t.result&&(this.policyQualifiers=Array.from(t.result.policyQualifiers,n=>new XB({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}};WB.CLASS_NAME="PolicyInformation";var v1="certificatePolicies",kde=[v1],zB=class JB extends Re{static{o(this,"CertificatePolicies")}constructor(e={}){super(),this.certificatePolicies=O(e,v1,JB.defaultValues(v1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case v1: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:WB.schema()})]})}fromSchema(e){ke(e,kde);let t=Be(e,e,JB.schema({names:{certificatePolicies:v1}}));Te.assertSchema(t,this.className),this.certificatePolicies=Array.from(t.result.certificatePolicies,n=>new WB({schema:n}))}toSchema(){return new J({value:Array.from(this.certificatePolicies,e=>e.toSchema())})}toJSON(){return{certificatePolicies:Array.from(this.certificatePolicies,e=>e.toJSON())}}};zB.CLASS_NAME="CertificatePolicies";var y1="templateID",ru="templateMajorVersion",nu="templateMinorVersion",Lde=[y1,ru,nu],Vde=class x1 extends Re{static{o(this,"CertificateTemplate")}constructor(e={}){super(),this.templateID=O(e,y1,x1.defaultValues(y1)),ru in e&&(this.templateMajorVersion=O(e,ru,x1.defaultValues(ru))),nu in e&&(this.templateMinorVersion=O(e,nu,x1.defaultValues(nu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case y1:return V;case ru:case nu: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,Lde);let t=Be(e,e,x1.schema({names:{templateID:y1,templateMajorVersion:ru,templateMinorVersion:nu}}));Te.assertSchema(t,this.className),this.templateID=t.result.templateID.valueBlock.toString(),ru in t.result&&(this.templateMajorVersion=t.result.templateMajorVersion.valueBlock.valueDec),nu in t.result&&(this.templateMinorVersion=t.result.templateMinorVersion.valueBlock.valueDec)}toSchema(){let e=[];return e.push(new ot({value:this.templateID})),ru in this&&e.push(new xe({value:this.templateMajorVersion})),nu in this&&e.push(new xe({value:this.templateMinorVersion})),new J({value:e})}toJSON(){let e={templateID:this.templateID};return ru in this&&(e.templateMajorVersion=this.templateMajorVersion),nu in this&&(e.templateMinorVersion=this.templateMinorVersion),e}},kf="distributionPoint",O7="distributionPointNames",Lf="reasons",Vf="cRLIssuer",P7="cRLIssuerNames",Ude=[kf,O7,Lf,Vf,P7],YB=class w1 extends Re{static{o(this,"DistributionPoint")}constructor(e={}){super(),kf in e&&(this.distributionPoint=O(e,kf,w1.defaultValues(kf))),Lf in e&&(this.reasons=O(e,Lf,w1.defaultValues(Lf))),Vf in e&&(this.cRLIssuer=O(e,Vf,w1.defaultValues(Vf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case kf:return[];case Lf:return new Gt;case Vf: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 Fr({value:[new fe({name:t.distributionPoint||V,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({name:t.distributionPointNames||V,value:Ir.schema()})]}),new fe({name:t.distributionPoint||V,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Mr.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:Ir.schema()})]})]})}fromSchema(e){ke(e,Ude);let t=Be(e,e,w1.schema({names:{distributionPoint:kf,distributionPointNames:O7,reasons:Lf,cRLIssuer:Vf,cRLIssuerNames:P7}}));Te.assertSchema(t,this.className),kf in t.result&&(t.result.distributionPoint.idBlock.tagNumber===0&&(this.distributionPoint=Array.from(t.result.distributionPointNames,n=>new Ir({schema:n}))),t.result.distributionPoint.idBlock.tagNumber===1&&(this.distributionPoint=new Mr({schema:new J({value:t.result.distributionPoint.valueBlock.value})}))),Lf in t.result&&(this.reasons=new Gt({valueHex:t.result.reasons.valueBlock.valueHex})),Vf in t.result&&(this.cRLIssuer=Array.from(t.result.cRLIssuerNames,n=>new Ir({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}};YB.CLASS_NAME="DistributionPoint";var S1="distributionPoints",jde=[S1],QB=class ZB extends Re{static{o(this,"CRLDistributionPoints")}constructor(e={}){super(),this.distributionPoints=O(e,S1,ZB.defaultValues(S1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case S1: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:YB.schema()})]})}fromSchema(e){ke(e,jde);let t=Be(e,e,ZB.schema({names:{distributionPoints:S1}}));Te.assertSchema(t,this.className),this.distributionPoints=Array.from(t.result.distributionPoints,n=>new YB({schema:n}))}toSchema(){return new J({value:Array.from(this.distributionPoints,e=>e.toSchema())})}toJSON(){return{distributionPoints:Array.from(this.distributionPoints,e=>e.toJSON())}}};QB.CLASS_NAME="CRLDistributionPoints";var E1="keyPurposes",Fde=[E1],k7=class eR extends Re{static{o(this,"ExtKeyUsage")}constructor(e={}){super(),this.keyPurposes=O(e,E1,eR.defaultValues(E1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case E1: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,Fde);let t=Be(e,e,eR.schema({names:{keyPurposes:E1}}));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)}}};k7.CLASS_NAME="ExtKeyUsage";var Wv="accessDescriptions",tR=class rR extends Re{static{o(this,"InfoAccess")}constructor(e={}){super(),this.accessDescriptions=O(e,Wv,rR.defaultValues(Wv)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wv: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:MB.schema()})]})}fromSchema(e){ke(e,[Wv]);let t=Be(e,e,rR.schema({names:{accessDescriptions:Wv}}));Te.assertSchema(t,this.className),this.accessDescriptions=Array.from(t.result.accessDescriptions,n=>new MB({schema:n}))}toSchema(){return new J({value:Array.from(this.accessDescriptions,e=>e.toSchema())})}toJSON(){return{accessDescriptions:Array.from(this.accessDescriptions,e=>e.toJSON())}}};tR.CLASS_NAME="InfoAccess";var Uf="distributionPoint",L7="distributionPointNames",Uc="onlyContainsUserCerts",jc="onlyContainsCACerts",Fc="onlySomeReasons",Mc="indirectCRL",qc="onlyContainsAttributeCerts",Mde=[Uf,L7,Uc,jc,Fc,Mc,qc],V7=class ps extends Re{static{o(this,"IssuingDistributionPoint")}constructor(e={}){super(),Uf in e&&(this.distributionPoint=O(e,Uf,ps.defaultValues(Uf))),this.onlyContainsUserCerts=O(e,Uc,ps.defaultValues(Uc)),this.onlyContainsCACerts=O(e,jc,ps.defaultValues(jc)),Fc in e&&(this.onlySomeReasons=O(e,Fc,ps.defaultValues(Fc))),this.indirectCRL=O(e,Mc,ps.defaultValues(Mc)),this.onlyContainsAttributeCerts=O(e,qc,ps.defaultValues(qc)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Uf:return[];case Uc:return!1;case jc:return!1;case Fc:return 0;case Mc:return!1;case qc: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 Fr({value:[new fe({name:t.distributionPoint||V,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({name:t.distributionPointNames||V,value:Ir.schema()})]}),new fe({name:t.distributionPoint||V,idBlock:{tagClass:3,tagNumber:1},value:Mr.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,Mde);let t=Be(e,e,ps.schema({names:{distributionPoint:Uf,distributionPointNames:L7,onlyContainsUserCerts:Uc,onlyContainsCACerts:jc,onlySomeReasons:Fc,indirectCRL:Mc,onlyContainsAttributeCerts:qc}}));if(Te.assertSchema(t,this.className),Uf in t.result)switch(!0){case t.result.distributionPoint.idBlock.tagNumber===0:this.distributionPoint=Array.from(t.result.distributionPointNames,n=>new Ir({schema:n}));break;case t.result.distributionPoint.idBlock.tagNumber===1:this.distributionPoint=new Mr({schema:new J({value:t.result.distributionPoint.valueBlock.value})});break;default:throw new Error("Unknown tagNumber for distributionPoint: {$asn1.result.distributionPoint.idBlock.tagNumber}")}if(Uc in t.result){let n=new Uint8Array(t.result.onlyContainsUserCerts.valueBlock.valueHex);this.onlyContainsUserCerts=n[0]!==0}if(jc in t.result){let n=new Uint8Array(t.result.onlyContainsCACerts.valueBlock.valueHex);this.onlyContainsCACerts=n[0]!==0}if(Fc in t.result){let n=new Uint8Array(t.result.onlySomeReasons.valueBlock.valueHex);this.onlySomeReasons=n[0]}if(Mc in t.result){let n=new Uint8Array(t.result.indirectCRL.valueBlock.valueHex);this.indirectCRL=n[0]!==0}if(qc 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!==ps.defaultValues(Uc)&&e.push(new xt({idBlock:{tagClass:3,tagNumber:1},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsCACerts!==ps.defaultValues(jc)&&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!==ps.defaultValues(Mc)&&e.push(new xt({idBlock:{tagClass:3,tagNumber:4},valueHex:new Uint8Array([255]).buffer})),this.onlyContainsAttributeCerts!==ps.defaultValues(qc)&&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!==ps.defaultValues(Uc)&&(e.onlyContainsUserCerts=this.onlyContainsUserCerts),this.onlyContainsCACerts!==ps.defaultValues(jc)&&(e.onlyContainsCACerts=this.onlyContainsCACerts),Fc in this&&(e.onlySomeReasons=this.onlySomeReasons),this.indirectCRL!==ps.defaultValues(Mc)&&(e.indirectCRL=this.indirectCRL),this.onlyContainsAttributeCerts!==ps.defaultValues(qc)&&(e.onlyContainsAttributeCerts=this.onlyContainsAttributeCerts),e}};V7.CLASS_NAME="IssuingDistributionPoint";var b1="base",Gd="minimum",Hc="maximum",qde=[b1,Gd,Hc],A1=class C1 extends Re{static{o(this,"GeneralSubtree")}constructor(e={}){super(),this.base=O(e,b1,C1.defaultValues(b1)),this.minimum=O(e,Gd,C1.defaultValues(Gd)),Hc in e&&(this.maximum=O(e,Hc,C1.defaultValues(Hc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case b1:return new Ir;case Gd:return 0;case Hc:return 0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[Ir.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,qde);let t=Be(e,e,C1.schema({names:{base:{names:{blockName:b1}},minimum:Gd,maximum:Hc}}));Te.assertSchema(t,this.className),this.base=new Ir({schema:t.result.base}),Gd in t.result&&(t.result.minimum.valueBlock.isHexOnly?this.minimum=t.result.minimum:this.minimum=t.result.minimum.valueBlock.valueDec),Hc 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(Hc 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}};A1.CLASS_NAME="GeneralSubtree";var jf="permittedSubtrees",Ff="excludedSubtrees",Hde=[jf,Ff],U7=class EA extends Re{static{o(this,"NameConstraints")}constructor(e={}){super(),jf in e&&(this.permittedSubtrees=O(e,jf,EA.defaultValues(jf))),Ff in e&&(this.excludedSubtrees=O(e,Ff,EA.defaultValues(Ff))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case jf:case Ff: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:A1.schema()})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Bt({name:t.excludedSubtrees||V,value:A1.schema()})]})]})}fromSchema(e){ke(e,Hde);let t=Be(e,e,EA.schema({names:{permittedSubtrees:jf,excludedSubtrees:Ff}}));Te.assertSchema(t,this.className),jf in t.result&&(this.permittedSubtrees=Array.from(t.result.permittedSubtrees,n=>new A1({schema:n}))),Ff in t.result&&(this.excludedSubtrees=Array.from(t.result.excludedSubtrees,n=>new A1({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}};U7.CLASS_NAME="NameConstraints";var su="requireExplicitPolicy",iu="inhibitPolicyMapping",Kde=[su,iu],j7=class bA extends Re{static{o(this,"PolicyConstraints")}constructor(e={}){super(),su in e&&(this.requireExplicitPolicy=O(e,su,bA.defaultValues(su))),iu in e&&(this.inhibitPolicyMapping=O(e,iu,bA.defaultValues(iu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case su:return 0;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 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,Kde);let t=Be(e,e,bA.schema({names:{requireExplicitPolicy:su,inhibitPolicyMapping:iu}}));if(Te.assertSchema(t,this.className),su in t.result){let n=t.result.requireExplicitPolicy;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=Qr(s);Te.assert(i,"Integer"),this.requireExplicitPolicy=i.result.valueBlock.valueDec}if(iu in t.result){let n=t.result.inhibitPolicyMapping;n.idBlock.tagClass=1,n.idBlock.tagNumber=2;let s=n.toBER(!1),i=Qr(s);Te.assert(i,"Integer"),this.inhibitPolicyMapping=i.result.valueBlock.valueDec}}toSchema(){let e=[];if(su in this){let t=new xe({value:this.requireExplicitPolicy});t.idBlock.tagClass=3,t.idBlock.tagNumber=0,e.push(t)}if(iu 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 su in this&&(e.requireExplicitPolicy=this.requireExplicitPolicy),iu in this&&(e.inhibitPolicyMapping=this.inhibitPolicyMapping),e}};j7.CLASS_NAME="PolicyConstraints";var N1="issuerDomainPolicy",T1="subjectDomainPolicy",$de=[N1,T1],nR=class AA extends Re{static{o(this,"PolicyMapping")}constructor(e={}){super(),this.issuerDomainPolicy=O(e,N1,AA.defaultValues(N1)),this.subjectDomainPolicy=O(e,T1,AA.defaultValues(T1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case N1:return V;case T1: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,$de);let t=Be(e,e,AA.schema({names:{issuerDomainPolicy:N1,subjectDomainPolicy:T1}}));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}}};nR.CLASS_NAME="PolicyMapping";var I1="mappings",Gde=[I1],F7=class sR extends Re{static{o(this,"PolicyMappings")}constructor(e={}){super(),this.mappings=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={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Bt({name:t.mappings||V,value:nR.schema()})]})}fromSchema(e){ke(e,Gde);let t=Be(e,e,sR.schema({names:{mappings:I1}}));Te.assertSchema(t,this.className),this.mappings=Array.from(t.result.mappings,n=>new nR({schema:n}))}toSchema(){return new J({value:Array.from(this.mappings,e=>e.toSchema())})}toJSON(){return{mappings:Array.from(this.mappings,e=>e.toJSON())}}};F7.CLASS_NAME="PolicyMappings";var Kc="notBefore",$c="notAfter",Xde=[Kc,$c],M7=class CA extends Re{static{o(this,"PrivateKeyUsagePeriod")}constructor(e={}){super(),Kc in e&&(this.notBefore=O(e,Kc,CA.defaultValues(Kc))),$c in e&&(this.notAfter=O(e,$c,CA.defaultValues($c))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Kc:return new Date;case $c: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,Xde);let t=Be(e,e,CA.schema({names:{notBefore:Kc,notAfter:$c}}));if(Te.assertSchema(t,this.className),Kc in t.result){let n=new jr;n.fromBuffer(t.result.notBefore.valueBlock.valueHex),this.notBefore=n.toDate()}if($c in t.result){let n=new jr({valueHex:t.result.notAfter.valueBlock.valueHex});n.fromBuffer(t.result.notAfter.valueBlock.valueHex),this.notAfter=n.toDate()}}toSchema(){let e=[];return Kc in this&&e.push(new xt({idBlock:{tagClass:3,tagNumber:0},valueHex:new jr({valueDate:this.notBefore}).valueBlock.valueHexView})),$c in this&&e.push(new xt({idBlock:{tagClass:3,tagNumber:1},valueHex:new jr({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}};M7.CLASS_NAME="PrivateKeyUsagePeriod";var Xd="id",au="type",Wd="values",Wde=[Xd,au],zde=[Wd],iR=class NA extends Re{static{o(this,"QCStatement")}constructor(e={}){super(),this.id=O(e,Xd,NA.defaultValues(Xd)),au in e&&(this.type=O(e,au,NA.defaultValues(au))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Xd:return V;case au:return new Zr;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Xd:return t===V;case au:return t instanceof Zr;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,Wde);let t=Be(e,e,NA.schema({names:{id:Xd,type:au}}));Te.assertSchema(t,this.className),this.id=t.result.id.valueBlock.toString(),au in t.result&&(this.type=t.result.type)}toSchema(){let e=[new ot({value:this.id})];return au 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}};iR.CLASS_NAME="QCStatement";var q7=class aR extends Re{static{o(this,"QCStatements")}constructor(e={}){super(),this.values=O(e,Wd,aR.defaultValues(Wd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Wd: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:iR.schema(t.value||{})})]})}fromSchema(e){ke(e,zde);let t=Be(e,e,aR.schema({names:{values:Wd}}));Te.assertSchema(t,this.className),this.values=Array.from(t.result.values,n=>new iR({schema:n}))}toSchema(){return new J({value:Array.from(this.values,e=>e.toSchema())})}toJSON(){return{values:Array.from(this.values,e=>e.toJSON())}}};q7.CLASS_NAME="QCStatements";var Mf,Il=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}};Mf=Il;Il.namedCurves={};Mf.register("P-256","1.2.840.10045.3.1.7",32),Mf.register("P-384","1.3.132.0.34",48),Mf.register("P-521","1.3.132.0.35",66),Mf.register("brainpoolP256r1","1.3.36.3.3.2.8.1.1.7",32),Mf.register("brainpoolP384r1","1.3.36.3.3.2.8.1.1.11",48),Mf.register("brainpoolP512r1","1.3.36.3.3.2.8.1.1.13",64);var Kb="x",$b="y",Gb="namedCurve",wu=class zd extends Re{static{o(this,"ECPublicKey")}constructor(e={}){super(),this.x=O(e,Kb,zd.defaultValues(Kb)),this.y=O(e,$b,zd.defaultValues($b)),this.namedCurve=O(e,Gb,zd.defaultValues(Gb)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Kb:case $b:return ln;case Gb:return V;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Kb:case $b:return t instanceof ArrayBuffer&&Cc(t,zd.defaultValues(e));case Gb:return typeof t=="string"&&t===zd.defaultValues(e);default:return super.defaultValues(e)}}static schema(){return new Hv}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=Il.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 Hv({data:wf(new Uint8Array([4]).buffer,this.x,this.y)})}toJSON(){let e=Il.find(this.namedCurve);return{crv:e?e.name:this.namedCurve,x:Ib(Lv(this.x),!0,!0,!1),y:Ib(Lv(this.y),!0,!0,!1)}}fromJSON(e){mr.assert("json",e,"crv","x","y");let t=0,n=Il.find(e.crv);n&&(this.namedCurve=n.id,t=n.size);let s=Sf(Dd(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=Sf(Dd(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)}};wu.CLASS_NAME="ECPublicKey";var _1="modulus",D1="publicExponent",Jde=[_1,D1],oR=class TA extends Re{static{o(this,"RSAPublicKey")}constructor(e={}){super(),this.modulus=O(e,_1,TA.defaultValues(_1)),this.publicExponent=O(e,D1,TA.defaultValues(D1)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _1:return new xe;case D1: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,Jde);let t=Be(e,e,TA.schema({names:{modulus:_1,publicExponent:D1}}));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){mr.assert("json",e,"n","e");let t=Sf(Dd(e.n,!0));this.modulus=new xe({valueHex:t.slice(0,Math.pow(2,V9(t.byteLength)))}),this.publicExponent=new xe({valueHex:Sf(Dd(e.e,!0)).slice(0,3)})}};oR.CLASS_NAME="RSAPublicKey";var B1="algorithm",R1="subjectPublicKey",Yde=[B1,R1],Ta=class IA 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 wu({namedCurve:this.algorithm.algorithmParams.valueBlock.toString(),schema:this.subjectPublicKey.valueBlock.valueHexView})}catch{}break;case"1.2.840.113549.1.1.1":{let e=Qr(this.subjectPublicKey.valueBlock.valueHexView);if(e.offset!==-1)try{this._parsedKey=new oR({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,B1,IA.defaultValues(B1)),this.subjectPublicKey=O(e,R1,IA.defaultValues(R1));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 B1:return new we;case R1: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,Yde);let t=Be(e,e,IA.schema({names:{algorithm:{names:{blockName:B1}},subjectPublicKey:R1}}));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 wu({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 oR({json:e}),this.algorithm=new we({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new Zr});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=Qr(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}`)}}};Ta.CLASS_NAME="PublicKeyInfo";var Jd="version",Yd="privateKey",wa="namedCurve",Gc="publicKey",Qde=[Jd,Yd,wa,Gc],uR=class ou extends Re{static{o(this,"ECPrivateKey")}constructor(e={}){super(),this.version=O(e,Jd,ou.defaultValues(Jd)),this.privateKey=O(e,Yd,ou.defaultValues(Yd)),wa in e&&(this.namedCurve=O(e,wa,ou.defaultValues(wa))),Gc in e&&(this.publicKey=O(e,Gc,ou.defaultValues(Gc))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Jd:return 1;case Yd:return new qe;case wa:return V;case Gc:return new wu;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Jd:return t===ou.defaultValues(e);case Yd:return t.isEqual(ou.defaultValues(e));case wa:return t===V;case Gc:return wu.compareWithDefault(wa,t.namedCurve)&&wu.compareWithDefault("x",t.x)&&wu.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,Qde);let t=Be(e,e,ou.schema({names:{version:Jd,privateKey:Yd,namedCurve:wa,publicKey:Gc}}));if(Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.privateKey=t.result.privateKey,wa in t.result&&(this.namedCurve=t.result.namedCurve.valueBlock.toString()),Gc in t.result){let n={schema:t.result.publicKey.valueBlock.valueHex};wa in this&&(n.namedCurve=this.namedCurve),this.publicKey=new wu(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||ou.compareWithDefault(wa,this.namedCurve))throw new Error('Not enough information for making JSON: absent "namedCurve" value');let e=Il.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){mr.assert("json",e,"crv","d");let t=0,n=Il.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 wu({json:e}))}};uR.CLASS_NAME="ECPrivateKey";var O1="prime",P1="exponent",k1="coefficient",Zde=[O1,P1,k1],_A=class L1 extends Re{static{o(this,"OtherPrimeInfo")}constructor(e={}){super(),this.prime=O(e,O1,L1.defaultValues(O1)),this.exponent=O(e,P1,L1.defaultValues(P1)),this.coefficient=O(e,k1,L1.defaultValues(k1)),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case O1:return new xe;case P1:return new xe;case k1: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,Zde);let t=Be(e,e,L1.schema({names:{prime:O1,exponent:P1,coefficient:k1}}));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){mr.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)})}};_A.CLASS_NAME="OtherPrimeInfo";var V1="version",U1="modulus",j1="publicExponent",F1="privateExponent",M1="prime1",q1="prime2",H1="exponent1",K1="exponent2",$1="coefficient",qf="otherPrimeInfos",eme=[V1,U1,j1,F1,M1,q1,H1,K1,$1,qf],cR=class Wi extends Re{static{o(this,"RSAPrivateKey")}constructor(e={}){super(),this.version=O(e,V1,Wi.defaultValues(V1)),this.modulus=O(e,U1,Wi.defaultValues(U1)),this.publicExponent=O(e,j1,Wi.defaultValues(j1)),this.privateExponent=O(e,F1,Wi.defaultValues(F1)),this.prime1=O(e,M1,Wi.defaultValues(M1)),this.prime2=O(e,q1,Wi.defaultValues(q1)),this.exponent1=O(e,H1,Wi.defaultValues(H1)),this.exponent2=O(e,K1,Wi.defaultValues(K1)),this.coefficient=O(e,$1,Wi.defaultValues($1)),qf in e&&(this.otherPrimeInfos=O(e,qf,Wi.defaultValues(qf))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case V1:return 0;case U1:return new xe;case j1:return new xe;case F1:return new xe;case M1:return new xe;case q1:return new xe;case H1:return new xe;case K1:return new xe;case $1:return new xe;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 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:_A.schema(t.otherPrimeInfo||{})})]})]})}fromSchema(e){ke(e,eme);let t=Be(e,e,Wi.schema({names:{version:V1,modulus:U1,publicExponent:j1,privateExponent:F1,prime1:M1,prime2:q1,exponent1:H1,exponent2:K1,coefficient:$1,otherPrimeInfo:{names:{blockName:qf}}}}));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),qf in t.result&&(this.otherPrimeInfos=Array.from(t.result.otherPrimeInfos,n=>new _A({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){mr.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 _A({json:t})))}};cR.CLASS_NAME="RSAPrivateKey";var G1="version",X1="privateKeyAlgorithm",W1="privateKey",Hf="attributes",Xb="parsedKey",tme=[G1,X1,W1,Hf],kx=class Kf extends Re{static{o(this,"PrivateKeyInfo")}constructor(e={}){super(),this.version=O(e,G1,Kf.defaultValues(G1)),this.privateKeyAlgorithm=O(e,X1,Kf.defaultValues(X1)),this.privateKey=O(e,W1,Kf.defaultValues(W1)),Hf in e&&(this.attributes=O(e,Hf,Kf.defaultValues(Hf))),Xb in e&&(this.parsedKey=O(e,Xb,Kf.defaultValues(Xb))),e.json&&this.fromJSON(e.json),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case G1:return 0;case X1:return new we;case W1:return new qe;case Hf:return[];case Xb: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:hn.schema()})]})]})}fromSchema(e){ke(e,tme);let t=Be(e,e,Kf.schema({names:{version:G1,privateKeyAlgorithm:{names:{blockName:X1}},privateKey:W1,attributes:Hf}}));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,Hf in t.result&&(this.attributes=Array.from(t.result.attributes,n=>new hn({schema:n}))),this.privateKeyAlgorithm.algorithmId){case"1.2.840.113549.1.1.1":{let n=Qr(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new cR({schema:n.result}))}break;case"1.2.840.10045.2.1":if("algorithmParams"in this.privateKeyAlgorithm&&this.privateKeyAlgorithm.algorithmParams instanceof ot){let n=Qr(this.privateKey.valueBlock.valueHexView);n.offset!==-1&&(this.parsedKey=new uR({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 uR({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 cR({json:e}),this.privateKeyAlgorithm=new we({algorithmId:"1.2.840.113549.1.1.1",algorithmParams:new Zr});break;default:throw new Error(`Invalid value for "kty" parameter: ${e.kty}`)}this.privateKey=new qe({valueHex:this.parsedKey.toSchema().toBER(!1)})}}};kx.CLASS_NAME="PrivateKeyInfo";var Qd="contentType",Zd="contentEncryptionAlgorithm",$f="encryptedContent",rme=[Qd,Zd,$f],Zq=1024,ds=class z1 extends Re{static{o(this,"EncryptedContentInfo")}constructor(e={}){if(super(),this.contentType=O(e,Qd,z1.defaultValues(Qd)),this.contentEncryptionAlgorithm=O(e,Zd,z1.defaultValues(Zd)),$f 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+Zq>s.byteLength?s.byteLength-n:Zq),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 Qd:return V;case Zd:return new we;case $f:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Qd:return t===V;case Zd:return t.algorithmId===V&&!("algorithmParams"in t);case $f:return t.isEqual(z1.defaultValues($f));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 Fr({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,z1.schema({names:{contentType:Qd,contentEncryptionAlgorithm:{names:{blockName:Zd}},encryptedContent:$f}}));Te.assertSchema(t,this.className),this.contentType=t.result.contentType.valueBlock.toString(),this.contentEncryptionAlgorithm=new we({schema:t.result.contentEncryptionAlgorithm}),$f 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)}};ds.CLASS_NAME="EncryptedContentInfo";var Xc="hashAlgorithm",Wc="maskGenAlgorithm",zc="saltLength",Jc="trailerField",nme=[Xc,Wc,zc,Jc],DA=class Qs extends Re{static{o(this,"RSASSAPSSParams")}constructor(e={}){super(),this.hashAlgorithm=O(e,Xc,Qs.defaultValues(Xc)),this.maskGenAlgorithm=O(e,Wc,Qs.defaultValues(Wc)),this.saltLength=O(e,zc,Qs.defaultValues(zc)),this.trailerField=O(e,Jc,Qs.defaultValues(Jc)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Xc:return new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new Zr});case Wc:return new we({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new Zr}).toSchema()});case zc:return 20;case Jc: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,nme);let t=Be(e,e,Qs.schema({names:{hashAlgorithm:{names:{blockName:Xc}},maskGenAlgorithm:{names:{blockName:Wc}},saltLength:zc,trailerField:Jc}}));Te.assertSchema(t,this.className),Xc in t.result&&(this.hashAlgorithm=new we({schema:t.result.hashAlgorithm})),Wc in t.result&&(this.maskGenAlgorithm=new we({schema:t.result.maskGenAlgorithm})),zc in t.result&&(this.saltLength=t.result.saltLength.valueBlock.valueDec),Jc in t.result&&(this.trailerField=t.result.trailerField.valueBlock.valueDec)}toSchema(){let e=[];return this.hashAlgorithm.isEqual(Qs.defaultValues(Xc))||e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual(Qs.defaultValues(Wc))||e.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.saltLength!==Qs.defaultValues(zc)&&e.push(new fe({idBlock:{tagClass:3,tagNumber:2},value:[new xe({value:this.saltLength})]})),this.trailerField!==Qs.defaultValues(Jc)&&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(Qs.defaultValues(Xc))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual(Qs.defaultValues(Wc))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.saltLength!==Qs.defaultValues(zc)&&(e.saltLength=this.saltLength),this.trailerField!==Qs.defaultValues(Jc)&&(e.trailerField=this.trailerField),e}};DA.CLASS_NAME="RSASSAPSSParams";var em="salt",J1="iterationCount",Sa="keyLength",uu="prf",sme=[em,J1,Sa,uu],w0=class ho extends Re{static{o(this,"PBKDF2Params")}constructor(e={}){super(),this.salt=O(e,em,ho.defaultValues(em)),this.iterationCount=O(e,J1,ho.defaultValues(J1)),Sa in e&&(this.keyLength=O(e,Sa,ho.defaultValues(Sa))),uu in e&&(this.prf=O(e,uu,ho.defaultValues(uu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case em:return{};case J1:return-1;case Sa:return 0;case uu:return new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new Zr});default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[new Fr({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,sme);let t=Be(e,e,ho.schema({names:{saltPrimitive:em,saltConstructed:{names:{blockName:em}},iterationCount:J1,keyLength:Sa,prf:{names:{blockName:uu,optional:!0}}}}));Te.assertSchema(t,this.className),this.salt=t.result.salt,this.iterationCount=t.result.iterationCount.valueBlock.valueDec,Sa in t.result&&(this.keyLength=t.result.keyLength.valueBlock.valueDec),uu 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})),Sa in this&&ho.defaultValues(Sa)!==this.keyLength&&e.push(new xe({value:this.keyLength})),this.prf&&ho.defaultValues(uu).isEqual(this.prf)===!1&&e.push(this.prf.toSchema()),new J({value:e})}toJSON(){let e={salt:this.salt.toJSON(),iterationCount:this.iterationCount};return Sa in this&&ho.defaultValues(Sa)!==this.keyLength&&(e.keyLength=this.keyLength),this.prf&&ho.defaultValues(uu).isEqual(this.prf)===!1&&(e.prf=this.prf.toJSON()),e}};w0.CLASS_NAME="PBKDF2Params";var Y1="keyDerivationFunc",Q1="encryptionScheme",ime=[Y1,Q1],lR=class BA extends Re{static{o(this,"PBES2Params")}constructor(e={}){super(),this.keyDerivationFunc=O(e,Y1,BA.defaultValues(Y1)),this.encryptionScheme=O(e,Q1,BA.defaultValues(Q1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Y1:return new we;case Q1: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,ime);let t=Be(e,e,BA.schema({names:{keyDerivationFunc:{names:{blockName:Y1}},encryptionScheme:{names:{blockName:Q1}}}}));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()}}};lR.CLASS_NAME="PBES2Params";var ame=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 e7(r,e,t,n,s){let i,a,u;switch(r.toUpperCase()){case"SHA-1":i=20,a=64,u=Gq;break;case"SHA-256":i=32,a=64,u=aB;break;case"SHA-384":i=48,a=128,u=cB;break;case"SHA-512":i=64,a=128,u=uB;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),S=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(S.length+w.length);C.set(S),C.set(w,S.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(e7,"makePKCS12B2Key");function H7(r){let e=typeof r=="string"?{name:r}:r;return"hash"in e?{...e,hash:H7(e.hash)}:e}o(H7,"prepareAlgorithm");var E0=class extends ame{static{o(this,"CryptoEngine")}async importKey(e,t,n,s,i){var a,u,c,l,h,m;let g={},y=H7(n);switch(e.toLowerCase()){case"raw":return this.subtle.importKey("raw",t,n,s,i);case"spki":{let v=Qr(vt.toArrayBuffer(t));Te.assert(v,"keyData");let S=new Ta;try{S.fromSchema(v.result)}catch{throw new Tr("Incorrect keyData")}switch(y.name.toUpperCase()){case"RSA-PSS":{if(!y.hash)throw new mr("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,S.algorithm.algorithmId!=="1.2.840.113549.1.1.1")throw new Error(`Incorrect public key algorithm: ${S.algorithm.algorithmId}`);if(!g.alg){if(!y.hash)throw new mr("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=S.toJSON();Object.assign(g,w)}break;case"ECDSA":i=["verify"];case"ECDH":{if(g={kty:"EC",ext:s,key_ops:i},S.algorithm.algorithmId!=="1.2.840.10045.2.1")throw new Error(`Incorrect public key algorithm: ${S.algorithm.algorithmId}`);let w=S.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 mr("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=S.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=S.toJSON();Object.assign(g,w)}break;default:throw new Error(`Incorrect algorithm name: ${y.name.toUpperCase()}`)}}break;case"pkcs8":{let v=new kx,S=Qr(vt.toArrayBuffer(t));Te.assert(S,"keyData");try{v.fromSchema(S.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",Sf(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(Lv(n))),e.toLowerCase()){case"raw":return this.subtle.exportKey("raw",t);case"spki":{let s=new Ta;try{s.fromJSON(n)}catch{throw new Error("Incorrect key data")}return s.toSchema().toBER(!1)}case"pkcs8":{let s=new kx;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 DA({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){mr.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 w0({salt:new qe({valueHex:u}),iterationCount:e.iterationCount,prf:new we({algorithmId:s,algorithmParams:new Zr})}),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),S=new lR({keyDerivationFunc:new we({algorithmId:n,algorithmParams:h.toSchema()}),encryptionScheme:new we({algorithmId:t,algorithmParams:new qe({valueHex:i})})});return new ds({contentType:e.contentType,contentEncryptionAlgorithm:new we({algorithmId:"1.2.840.113549.1.5.13",algorithmParams:S.toSchema()}),encryptedContent:new qe({valueHex:v})})}async decryptEncryptedContentInfo(e){if(mr.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 lR({schema:e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams})}catch{throw new Error('Incorrectly encoded "pbes2Parameters"')}let n;try{n=new w0({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"');mr.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 e7(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){mr.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 e7(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 Zr}),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 DA(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=Il.find(a.algorithm.namedCurve);if(!l)throw new Error("Unsupported named curve in use");let h=Qr(c);Te.assert(h,"Signature value"),c=cme(h.result,l.size)}if(a.algorithm.name==="RSA-PSS"){let l=new DA({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)}},K7={name:"none",crypto:null};function t7(r){return!!(r&&typeof r=="object"&&"crypto"in r)}o(t7,"isCryptoEngine");function IC(r,...e){let t=null;if(e.length<2)e.length?t=e[0]:t=typeof self<"u"&&self.crypto?new E0({name:"browser",crypto:self.crypto}):null;else{let n=e[0],s=e[1];t7(s)?t=s:t7(n)?t=n:"subtle"in n&&"getRandomValues"in n&&(t=new E0({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 K7={name:r,crypto:t}}o(IC,"setEngine");function ome(){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 K7}o(ome,"getEngine");function kt(r=!1){let e=ome();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 ln;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 cme(r,e){if(!(r instanceof J&&r.valueBlock.value.length===2&&r.valueBlock.value[0]instanceof xe&&r.valueBlock.value[1]instanceof xe))return ln;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(cme,"createECDSASignatureFromCMS");async function lme(r,e,t,n,s){switch(r.toUpperCase()){case"SHA-1":case"SHA-256":case"SHA-384":case"SHA-512":break;default:throw new Tr(`Unknown hash function: ${r}`)}if(Tr.assert(e,"zBuffer","ArrayBuffer"),e.byteLength===0)throw new Tr("'zBuffer' has zero length, error");if(Tr.assert(n,"SharedInfo","ArrayBuffer"),t>255)throw new Tr("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=ln;u=wf(u,e),u=wf(u,i),u=wf(u,n);let c=await s.digest({name:r},u);return{counter:t,result:c}}o(lme,"kdfWithCounter");async function r7(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 Tr(`Unknown hash function: ${r}`)}if(Tr.assert(e,"Zbuffer","ArrayBuffer"),e.byteLength===0)throw new Tr("'Zbuffer' has zero length, error");Tr.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 lme(r,e,g,n,s));let l=ln,h=1,m=!0;for(;m;){m=!1;for(let g of c)if(g.counter===h){l=wf(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 S=0;S<t;S++)y[S]=v[S];return g}return l}o(r7,"kdf");var pB="version",dB="logID",mB="extensions",gB="timestamp",vB="hashAlgorithm",yB="signatureAlgorithm",xB="signature",n7="none",s7="md5",i7="sha1",a7="sha224",o7="sha256",u7="sha384",c7="sha512",l7="anonymous",f7="rsa",h7="dsa",p7="ecdsa",$7=class Yc extends Re{static{o(this,"SignedCertificateTimestamp")}constructor(e={}){super(),this.version=O(e,pB,Yc.defaultValues(pB)),this.logID=O(e,dB,Yc.defaultValues(dB)),this.timestamp=O(e,gB,Yc.defaultValues(gB)),this.extensions=O(e,mB,Yc.defaultValues(mB)),this.hashAlgorithm=O(e,vB,Yc.defaultValues(vB)),this.signatureAlgorithm=O(e,yB,Yc.defaultValues(yB)),this.signature=O(e,xB,Yc.defaultValues(xB)),"stream"in e&&e.stream&&this.fromStream(e.stream),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case pB:return 0;case dB:case mB:return ln;case gB:return new Date(0);case vB:case yB:return V;case xB:return ln;default:return super.defaultValues(e)}}fromSchema(e){if(!(e instanceof Hv))throw new Error("Object's schema was not verified against input data for SignedCertificateTimestamp");let t=new eu({stream:new Zn({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(Yo(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=n7;break;case 1:this.hashAlgorithm=s7;break;case 2:this.hashAlgorithm=i7;break;case 3:this.hashAlgorithm=a7;break;case 4:this.hashAlgorithm=o7;break;case 5:this.hashAlgorithm=u7;break;case 6:this.hashAlgorithm=c7;break;default:throw new Error("Object's stream was not correct for SignedCertificateTimestamp")}switch(e.getBlock(1)[0]){case 0:this.signatureAlgorithm=l7;break;case 1:this.signatureAlgorithm=f7;break;case 2:this.signatureAlgorithm=h7;break;case 3:this.signatureAlgorithm=p7;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 Hv({data:e.stream.buffer})}toStream(){let e=new eu;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=ga(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 n7:i=0;break;case s7:i=1;break;case i7:i=2;break;case a7:i=3;break;case o7:i=4;break;case u7:i=5;break;case c7:i=6;break;default:throw new Error(`Incorrect data for hashAlgorithm: ${this.hashAlgorithm}`)}e.appendChar(i);let a;switch(this.signatureAlgorithm.toLowerCase()){case l7:a=0;break;case f7:a=1;break;case h7:a=2;break;case p7: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:Nb(this.logID),timestamp:this.timestamp,extensions:Nb(this.extensions),hashAlgorithm:this.hashAlgorithm,signatureAlgorithm:this.signatureAlgorithm,signature:Nb(this.signature)}}async verify(e,t,n=0,s=kt(!0)){let i=Ib(Lv(this.logID)),a=null,u=new eu;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=Sf(Dd(a)),l=Ta.fromBER(c);u.appendChar(0),u.appendChar(0);let h=new ArrayBuffer(8),m=new Uint8Array(h),g=ga(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")}};$7.CLASS_NAME="SignedCertificateTimestamp";var Wb="timestamps",G7=class X7 extends Re{static{o(this,"SignedCertificateTimestampList")}constructor(e={}){super(),this.timestamps=O(e,Wb,X7.defaultValues(Wb)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wb:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Wb: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 eu({stream:new Zn({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 $7({stream:t}))}toSchema(){let e=new eu,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())}}};G7.CLASS_NAME="SignedCertificateTimestampList";var Z1="attributes",fme=[Z1],W7=class fR extends Re{static{o(this,"SubjectDirectoryAttributes")}constructor(e={}){super(),this.attributes=O(e,Z1,fR.defaultValues(Z1)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Z1: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:hn.schema()})]})}fromSchema(e){ke(e,fme);let t=Be(e,e,fR.schema({names:{attributes:Z1}}));Te.assertSchema(t,this.className),this.attributes=Array.from(t.result.attributes,n=>new hn({schema:n}))}toSchema(){return new J({value:Array.from(this.attributes,e=>e.toSchema())})}toJSON(){return{attributes:Array.from(this.attributes,e=>e.toJSON())}}};W7.CLASS_NAME="SubjectDirectoryAttributes";var hme=class tn{static{o(this,"ExtensionValueFactory")}static getItems(){return this.types||(this.types={},tn.register(w7,"SubjectAltName",HB),tn.register(S7,"IssuerAltName",HB),tn.register(WR,"AuthorityKeyIdentifier",QR),tn.register(GR,"BasicConstraints",ZR),tn.register(Tde,"MicrosoftCaVersion",R7),tn.register(N7,"CertificatePolicies",zB),tn.register(Sde,"CertificatePoliciesMicrosoft",zB),tn.register(Nde,"MicrosoftCertTemplateV2",Vde),tn.register(C7,"CRLDistributionPoints",QB),tn.register(XR,"FreshestCRL",QB),tn.register(Ede,"ExtKeyUsage",k7),tn.register(b7,"CertificateIssuer",es),tn.register(zR,"AuthorityInfoAccess",tR),tn.register(Ade,"SubjectInfoAccess",tR),tn.register(E7,"IssuingDistributionPoint",V7),tn.register(A7,"NameConstraints",U7),tn.register(I7,"PolicyConstraints",j7),tn.register(T7,"PolicyMappings",F7),tn.register(gde,"PrivateKeyUsagePeriod",M7),tn.register(Ide,"QCStatements",q7),tn.register(Cde,"SignedCertificateTimestampList",G7),tn.register(pde,"SubjectDirectoryAttributes",W7)),this.types}static fromBER(e,t){let n=Qr(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}}},ey="extnID",Qc="critical",ty="extnValue",zb="parsedValue",pme=[ey,Qc,ty],Yi=class Zc extends Re{static{o(this,"Extension")}get parsedValue(){if(this._parsedValue===void 0){let e=hme.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,ey,Zc.defaultValues(ey)),this.critical=O(e,Qc,Zc.defaultValues(Qc)),ty in e?this.extnValue=new qe({valueHex:e.extnValue}):this.extnValue=Zc.defaultValues(ty),zb in e&&(this.parsedValue=O(e,zb,Zc.defaultValues(zb))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ey:return V;case Qc:return!1;case ty:return new qe;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 ot({name:t.extnID||V}),new ya({name:t.critical||V,optional:!0}),new qe({name:t.extnValue||V})]})}fromSchema(e){ke(e,pme);let t=Be(e,e,Zc.schema({names:{extnID:ey,critical:Qc,extnValue:ty}}));Te.assertSchema(t,this.className),this.extnID=t.result.extnID.valueBlock.toString(),Qc 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!==Zc.defaultValues(Qc)&&e.push(new ya({value:this.critical})),e.push(this.extnValue),new J({value:e})}toJSON(){let e={extnID:this.extnID,extnValue:this.extnValue.toJSON()};return this.critical!==Zc.defaultValues(Qc)&&(e.critical=this.critical),this.parsedValue&&this.parsedValue.toJSON&&(e.parsedValue=this.parsedValue.toJSON()),e}};Yi.CLASS_NAME="Extension";var ry="extensions",dme=[ry],Bn=class hR extends Re{static{o(this,"Extensions")}constructor(e={}){super(),this.extensions=O(e,ry,hR.defaultValues(ry)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ry: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:Yi.schema(n.extension||{})})]})}fromSchema(e){ke(e,dme);let t=Be(e,e,hR.schema({names:{extensions:ry}}));Te.assertSchema(t,this.className),this.extensions=Array.from(t.result.extensions,n=>new Yi({schema:n}))}toSchema(){return new J({value:Array.from(this.extensions,e=>e.toSchema())})}toJSON(){return{extensions:this.extensions.map(e=>e.toJSON())}}};Bn.CLASS_NAME="Extensions";var ny="issuer",sy="serialNumber",Gf="issuerUID",mme=[ny,sy,Gf],xo=class iy extends Re{static{o(this,"IssuerSerial")}constructor(e={}){super(),this.issuer=O(e,ny,iy.defaultValues(ny)),this.serialNumber=O(e,sy,iy.defaultValues(sy)),Gf in e&&(this.issuerUID=O(e,Gf,iy.defaultValues(Gf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ny:return new es;case sy:return new xe;case Gf:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[es.schema(t.issuer||{}),new xe({name:t.serialNumber||V}),new Gt({optional:!0,name:t.issuerUID||V})]})}fromSchema(e){ke(e,mme);let t=Be(e,e,iy.schema({names:{issuer:{names:{blockName:ny}},serialNumber:sy,issuerUID:Gf}}));Te.assertSchema(t,this.className),this.issuer=new es({schema:t.result.issuer}),this.serialNumber=t.result.serialNumber,Gf 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}};xo.CLASS_NAME="IssuerSerial";var ay="version",Xf="baseCertificateID",Wf="subjectName",oy="issuer",uy="signature",cy="serialNumber",ly="attrCertValidityPeriod",fy="attributes",zf="issuerUniqueID",Jf="extensions",gme=[ay,Xf,Wf,oy,uy,cy,ly,fy,zf,Jf],RA=class zi extends Re{static{o(this,"AttributeCertificateInfoV1")}constructor(e={}){super(),this.version=O(e,ay,zi.defaultValues(ay)),Xf in e&&(this.baseCertificateID=O(e,Xf,zi.defaultValues(Xf))),Wf in e&&(this.subjectName=O(e,Wf,zi.defaultValues(Wf))),this.issuer=O(e,oy,zi.defaultValues(oy)),this.signature=O(e,uy,zi.defaultValues(uy)),this.serialNumber=O(e,cy,zi.defaultValues(cy)),this.attrCertValidityPeriod=O(e,ly,zi.defaultValues(ly)),this.attributes=O(e,fy,zi.defaultValues(fy)),zf in e&&(this.issuerUniqueID=O(e,zf,zi.defaultValues(zf))),Jf in e&&(this.extensions=O(e,Jf,zi.defaultValues(Jf))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ay:return 0;case Xf:return new xo;case Wf:return new es;case oy:return new es;case uy:return new we;case cy:return new xe;case ly:return new $h;case fy:return[];case zf:return new Gt;case Jf:return new Bn;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 Fr({value:[new fe({name:t.baseCertificateID||V,idBlock:{tagClass:3,tagNumber:0},value:xo.schema().valueBlock.value}),new fe({name:t.subjectName||V,idBlock:{tagClass:3,tagNumber:1},value:es.schema().valueBlock.value})]}),es.schema({names:{blockName:t.issuer||V}}),we.schema(t.signature||{}),new xe({name:t.serialNumber||V}),$h.schema(t.attrCertValidityPeriod||{}),new J({name:t.attributes||V,value:[new Bt({value:hn.schema()})]}),new Gt({optional:!0,name:t.issuerUniqueID||V}),Bn.schema(t.extensions||{},!0)]})}fromSchema(e){ke(e,gme);let t=Be(e,e,zi.schema({names:{version:ay,baseCertificateID:Xf,subjectName:Wf,issuer:oy,signature:{names:{blockName:uy}},serialNumber:cy,attrCertValidityPeriod:{names:{blockName:ly}},attributes:fy,issuerUniqueID:zf,extensions:{names:{blockName:Jf}}}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,Xf in t.result&&(this.baseCertificateID=new xo({schema:new J({value:t.result.baseCertificateID.valueBlock.value})})),Wf in t.result&&(this.subjectName=new es({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 $h({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new hn({schema:n})),zf in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),Jf in t.result&&(this.extensions=new Bn({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}};RA.CLASS_NAME="AttributeCertificateInfoV1";var hy="acinfo",py="signatureAlgorithm",dy="signatureValue",vme=[hy,dy,py],_C=class my extends Re{static{o(this,"AttributeCertificateV1")}constructor(e={}){super(),this.acinfo=O(e,hy,my.defaultValues(hy)),this.signatureAlgorithm=O(e,py,my.defaultValues(py)),this.signatureValue=O(e,dy,my.defaultValues(dy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case hy:return new RA;case py:return new we;case dy:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[RA.schema(t.acinfo||{}),we.schema(t.signatureAlgorithm||{}),new Gt({name:t.signatureValue||V})]})}fromSchema(e){ke(e,vme);let t=Be(e,e,my.schema({names:{acinfo:{names:{blockName:hy}},signatureAlgorithm:{names:{blockName:py}},signatureValue:dy}}));Te.assertSchema(t,this.className),this.acinfo=new RA({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()}}};_C.CLASS_NAME="AttributeCertificateV1";var gy="digestedObjectType",Yf="otherObjectTypeID",vy="digestAlgorithm",yy="objectDigest",yme=[gy,Yf,vy,yy],Gh=class tm extends Re{static{o(this,"ObjectDigestInfo")}constructor(e={}){super(),this.digestedObjectType=O(e,gy,tm.defaultValues(gy)),Yf in e&&(this.otherObjectTypeID=O(e,Yf,tm.defaultValues(Yf))),this.digestAlgorithm=O(e,vy,tm.defaultValues(vy)),this.objectDigest=O(e,yy,tm.defaultValues(yy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case gy:return new Tc;case Yf:return new ot;case vy:return new we;case yy: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 Tc({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,yme);let t=Be(e,e,tm.schema({names:{digestedObjectType:gy,otherObjectTypeID:Yf,digestAlgorithm:{names:{blockName:vy}},objectDigest:yy}}));Te.assertSchema(t,this.className),this.digestedObjectType=t.result.digestedObjectType,Yf 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}};Gh.CLASS_NAME="ObjectDigestInfo";var Qf="issuerName",Zf="baseCertificateID",eh="objectDigestInfo",xme=[Qf,Zf,eh],pR=class xy extends Re{static{o(this,"V2Form")}constructor(e={}){super(),Qf in e&&(this.issuerName=O(e,Qf,xy.defaultValues(Qf))),Zf in e&&(this.baseCertificateID=O(e,Zf,xy.defaultValues(Zf))),eh in e&&(this.objectDigestInfo=O(e,eh,xy.defaultValues(eh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Qf:return new es;case Zf:return new xo;case eh:return new Gh;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[es.schema({names:{blockName:t.issuerName}},!0),new fe({optional:!0,name:t.baseCertificateID||V,idBlock:{tagClass:3,tagNumber:0},value:xo.schema().valueBlock.value}),new fe({optional:!0,name:t.objectDigestInfo||V,idBlock:{tagClass:3,tagNumber:1},value:Gh.schema().valueBlock.value})]})}fromSchema(e){ke(e,xme);let t=Be(e,e,xy.schema({names:{issuerName:Qf,baseCertificateID:Zf,objectDigestInfo:eh}}));Te.assertSchema(t,this.className),Qf in t.result&&(this.issuerName=new es({schema:t.result.issuerName})),Zf in t.result&&(this.baseCertificateID=new xo({schema:new J({value:t.result.baseCertificateID.valueBlock.value})})),eh in t.result&&(this.objectDigestInfo=new Gh({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}};pR.CLASS_NAME="V2Form";var th="baseCertificateID",rh="entityName",nh="objectDigestInfo",wme=[th,rh,nh],OA=class wy extends Re{static{o(this,"Holder")}constructor(e={}){super(),th in e&&(this.baseCertificateID=O(e,th,wy.defaultValues(th))),rh in e&&(this.entityName=O(e,rh,wy.defaultValues(rh))),nh in e&&(this.objectDigestInfo=O(e,nh,wy.defaultValues(nh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case th:return new xo;case rh:return new es;case nh:return new Gh;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:xo.schema().valueBlock.value}),new fe({optional:!0,name:t.entityName||V,idBlock:{tagClass:3,tagNumber:1},value:es.schema().valueBlock.value}),new fe({optional:!0,name:t.objectDigestInfo||V,idBlock:{tagClass:3,tagNumber:2},value:Gh.schema().valueBlock.value})]})}fromSchema(e){ke(e,wme);let t=Be(e,e,wy.schema({names:{baseCertificateID:th,entityName:rh,objectDigestInfo:nh}}));Te.assertSchema(t,this.className),th in t.result&&(this.baseCertificateID=new xo({schema:new J({value:t.result.baseCertificateID.valueBlock.value})})),rh in t.result&&(this.entityName=new es({schema:new J({value:t.result.entityName.valueBlock.value})})),nh in t.result&&(this.objectDigestInfo=new Gh({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}};OA.CLASS_NAME="Holder";var Sy="version",Ey="holder",by="issuer",Ay="signature",Cy="serialNumber",Ny="attrCertValidityPeriod",Ty="attributes",sh="issuerUniqueID",ih="extensions",Sme=[Sy,Ey,by,Ay,Cy,Ny,Ty,sh,ih],PA=class Ea extends Re{static{o(this,"AttributeCertificateInfoV2")}constructor(e={}){super(),this.version=O(e,Sy,Ea.defaultValues(Sy)),this.holder=O(e,Ey,Ea.defaultValues(Ey)),this.issuer=O(e,by,Ea.defaultValues(by)),this.signature=O(e,Ay,Ea.defaultValues(Ay)),this.serialNumber=O(e,Cy,Ea.defaultValues(Cy)),this.attrCertValidityPeriod=O(e,Ny,Ea.defaultValues(Ny)),this.attributes=O(e,Ty,Ea.defaultValues(Ty)),sh in e&&(this.issuerUniqueID=O(e,sh,Ea.defaultValues(sh))),ih in e&&(this.extensions=O(e,ih,Ea.defaultValues(ih))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sy:return 1;case Ey:return new OA;case by:return{};case Ay:return new we;case Cy:return new xe;case Ny:return new $h;case Ty:return[];case sh:return new Gt;case ih:return new Bn;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}),OA.schema(t.holder||{}),new Fr({value:[es.schema({names:{blockName:t.issuer||V}}),new fe({name:t.issuer||V,idBlock:{tagClass:3,tagNumber:0},value:pR.schema().valueBlock.value})]}),we.schema(t.signature||{}),new xe({name:t.serialNumber||V}),$h.schema(t.attrCertValidityPeriod||{}),new J({name:t.attributes||V,value:[new Bt({value:hn.schema()})]}),new Gt({optional:!0,name:t.issuerUniqueID||V}),Bn.schema(t.extensions||{},!0)]})}fromSchema(e){ke(e,Sme);let t=Be(e,e,Ea.schema({names:{version:Sy,holder:{names:{blockName:Ey}},issuer:by,signature:{names:{blockName:Ay}},serialNumber:Cy,attrCertValidityPeriod:{names:{blockName:Ny}},attributes:Ty,issuerUniqueID:sh,extensions:{names:{blockName:ih}}}}));switch(Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.holder=new OA({schema:t.result.holder}),t.result.issuer.idBlock.tagClass){case 3:this.issuer=new pR({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 $h({schema:t.result.attrCertValidityPeriod}),this.attributes=Array.from(t.result.attributes.valueBlock.value,n=>new hn({schema:n})),sh in t.result&&(this.issuerUniqueID=t.result.issuerUniqueID),ih in t.result&&(this.extensions=new Bn({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}};PA.CLASS_NAME="AttributeCertificateInfoV2";var Iy="acinfo",_y="signatureAlgorithm",Dy="signatureValue",Eme=[Iy,_y,Dy],Tl=class By extends Re{static{o(this,"AttributeCertificateV2")}constructor(e={}){super(),this.acinfo=O(e,Iy,By.defaultValues(Iy)),this.signatureAlgorithm=O(e,_y,By.defaultValues(_y)),this.signatureValue=O(e,Dy,By.defaultValues(Dy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Iy:return new PA;case _y:return new we;case Dy: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,Eme);let t=Be(e,e,By.schema({names:{acinfo:{names:{blockName:Iy}},signatureAlgorithm:{names:{blockName:_y}},signatureValue:Dy}}));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()}}};Tl.CLASS_NAME="AttributeCertificateV2";var ah="contentType",rm="content",bme=[ah,rm],rn=class kA extends Re{static{o(this,"ContentInfo")}constructor(e={}){super(),this.contentType=O(e,ah,kA.defaultValues(ah)),this.content=O(e,rm,kA.defaultValues(rm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ah:return V;case rm:return new bt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ah:return typeof t=="string"&&t===this.defaultValues(ah);case rm: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||ah}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[new bt({name:t.content||rm})]})]})}fromSchema(e){ke(e,bme);let t=Be(e,e,kA.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}};rn.CLASS_NAME="ContentInfo";rn.DATA=JR;rn.SIGNED_DATA=_7;rn.ENVELOPED_DATA=D7;rn.ENCRYPTED_DATA=B7;var wB="type",SB="value",dR="utcTimeName",mR="generalTimeName",Ame=[dR,mR],d7;(function(r){r[r.UTCTime=0]="UTCTime",r[r.GeneralizedTime=1]="GeneralizedTime",r[r.empty=2]="empty"})(d7||(d7={}));var ts=class LA extends Re{static{o(this,"Time")}constructor(e={}){super(),this.type=O(e,wB,LA.defaultValues(wB)),this.value=O(e,SB,LA.defaultValues(SB)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case wB:return 0;case SB:return new Date(0,0,0);default:return super.defaultValues(e)}}static schema(e={},t=!1){let n=O(e,"names",{});return new Fr({optional:t,value:[new Af({name:n.utcTimeName||V}),new jr({name:n.generalTimeName||V})]})}fromSchema(e){ke(e,Ame);let t=Be(e,e,LA.schema({names:{utcTimeName:dR,generalTimeName:mR}}));Te.assertSchema(t,this.className),dR in t.result&&(this.type=0,this.value=t.result.utcTimeName.toDate()),mR in t.result&&(this.type=1,this.value=t.result.generalTimeName.toDate())}toSchema(){return this.type===0?new Af({valueDate:this.value}):this.type===1?new jr({valueDate:this.value}):{}}toJSON(){return{type:this.type,value:this.value}}};ts.CLASS_NAME="Time";var EB="tbs",el="version",VA="serialNumber",UA="signature",jA="issuer",FA="notBefore",MA="notAfter",qA="subject",HA="subjectPublicKeyInfo",Ry="issuerUniqueID",Oy="subjectUniqueID",Py="extensions",ky="signatureAlgorithm",Ly="signatureValue",gi="tbsCertificate",DC=`${gi}.${el}`,eO=`${gi}.${VA}`,tO=`${gi}.${UA}`,rO=`${gi}.${jA}`,BC=`${gi}.${FA}`,RC=`${gi}.${MA}`,nO=`${gi}.${qA}`,sO=`${gi}.${HA}`,OC=`${gi}.${Ry}`,PC=`${gi}.${Oy}`,Ix=`${gi}.${Py}`,Cme=[gi,DC,eO,tO,rO,BC,RC,nO,sO,OC,PC,Ix,ky,Ly];function Nme(r={}){let e=O(r,"names",{});return new J({name:e.blockName||gi,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new xe({name:e.tbsCertificateVersion||DC})]}),new xe({name:e.tbsCertificateSerialNumber||eO}),we.schema(e.signature||{names:{blockName:tO}}),Mr.schema(e.issuer||{names:{blockName:rO}}),new J({name:e.tbsCertificateValidity||"tbsCertificate.validity",value:[ts.schema(e.notBefore||{names:{utcTimeName:BC,generalTimeName:BC}}),ts.schema(e.notAfter||{names:{utcTimeName:RC,generalTimeName:RC}})]}),Mr.schema(e.subject||{names:{blockName:nO}}),Ta.schema(e.subjectPublicKeyInfo||{names:{blockName:sO}}),new xt({name:e.tbsCertificateIssuerUniqueID||OC,optional:!0,idBlock:{tagClass:3,tagNumber:1}}),new xt({name:e.tbsCertificateSubjectUniqueID||PC,optional:!0,idBlock:{tagClass:3,tagNumber:2}}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:3},value:[Bn.schema(e.extensions||{names:{blockName:Ix}})]})]})}o(Nme,"tbsCertificate");var ms=class Dn 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,EB,Dn.defaultValues(EB))),this.version=O(e,el,Dn.defaultValues(el)),this.serialNumber=O(e,VA,Dn.defaultValues(VA)),this.signature=O(e,UA,Dn.defaultValues(UA)),this.issuer=O(e,jA,Dn.defaultValues(jA)),this.notBefore=O(e,FA,Dn.defaultValues(FA)),this.notAfter=O(e,MA,Dn.defaultValues(MA)),this.subject=O(e,qA,Dn.defaultValues(qA)),this.subjectPublicKeyInfo=O(e,HA,Dn.defaultValues(HA)),Ry in e&&(this.issuerUniqueID=O(e,Ry,Dn.defaultValues(Ry))),Oy in e&&(this.subjectUniqueID=O(e,Oy,Dn.defaultValues(Oy))),Py in e&&(this.extensions=O(e,Py,Dn.defaultValues(Py))),this.signatureAlgorithm=O(e,ky,Dn.defaultValues(ky)),this.signatureValue=O(e,Ly,Dn.defaultValues(Ly)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case EB:return ln;case el:return 0;case VA:return new xe;case UA:return new we;case jA:return new Mr;case FA:return new ts;case MA:return new ts;case qA:return new Mr;case HA:return new Ta;case Ry:return ln;case Oy:return ln;case Py:return[];case ky:return new we;case Ly:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[Nme(t.tbsCertificate),we.schema(t.signatureAlgorithm||{names:{blockName:ky}}),new Gt({name:t.signatureValue||Ly})]})}fromSchema(e){ke(e,Cme);let t=Be(e,e,Dn.schema({names:{tbsCertificate:{names:{extensions:{names:{extensions:Ix}}}}}}));Te.assertSchema(t,this.className),this.tbsView=t.result.tbsCertificate.valueBeforeDecodeView,DC in t.result&&(this.version=t.result[DC].valueBlock.valueDec),this.serialNumber=t.result[eO],this.signature=new we({schema:t.result[tO]}),this.issuer=new Mr({schema:t.result[rO]}),this.notBefore=new ts({schema:t.result[BC]}),this.notAfter=new ts({schema:t.result[RC]}),this.subject=new Mr({schema:t.result[nO]}),this.subjectPublicKeyInfo=new Ta({schema:t.result[sO]}),OC in t.result&&(this.issuerUniqueID=t.result[OC].valueBlock.valueHex),PC in t.result&&(this.subjectUniqueID=t.result[PC].valueBlock.valueHex),Ix in t.result&&(this.extensions=Array.from(t.result[Ix],n=>new Yi({schema:n}))),this.signatureAlgorithm=new we({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return el in this&&this.version!==Dn.defaultValues(el)&&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 Dn.schema().value[0];let n=Qr(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 el in this&&this.version!==Dn.defaultValues(el)&&(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 Ta))throw new Error("Please provide issuer certificate as a parameter");return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};ms.CLASS_NAME="Certificate";function z7(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===GR&&n.parsedValue instanceof ZR&&n.parsedValue.cA){t=!0;break}}return t?r:null}o(z7,"checkCA");var nm="certId",sm="certValue",Pd="parsedValue",Tme=[nm,sm],J7=class Vy extends Re{static{o(this,"CertBag")}constructor(e={}){super(),this.certId=O(e,nm,Vy.defaultValues(nm)),this.certValue=O(e,sm,Vy.defaultValues(sm)),Pd in e&&(this.parsedValue=O(e,Pd,Vy.defaultValues(Pd))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case nm:return V;case sm:return new bt;case Pd:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case nm:return t===V;case sm:return t instanceof bt;case Pd: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,Tme);let t=Be(e,e,Vy.schema({names:{id:nm,value:sm}}));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 Jq:try{this.parsedValue=ms.fromBER(n)}catch{Tl.fromBER(n)}break;case Yq:this.parsedValue=Tl.fromBER(n);break;case Dde:default:throw new Error(`Incorrect CERT_ID value in CertBag: ${this.certId}`)}}toSchema(){return Pd in this&&("acinfo"in this.parsedValue?this.certId=Yq:this.certId=Jq,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()}}};J7.CLASS_NAME="CertBag";var Uy="userCertificate",im="revocationDate",oh="crlEntryExtensions",Ime=[Uy,im,oh],Y7=class jy extends Re{static{o(this,"RevokedCertificate")}constructor(e={}){super(),this.userCertificate=O(e,Uy,jy.defaultValues(Uy)),this.revocationDate=O(e,im,jy.defaultValues(im)),oh in e&&(this.crlEntryExtensions=O(e,oh,jy.defaultValues(oh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Uy:return new xe;case im:return new ts;case oh:return new Bn;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||Uy}),ts.schema({names:{utcTimeName:t.revocationDate||im,generalTimeName:t.revocationDate||im}}),Bn.schema({names:{blockName:t.crlEntryExtensions||oh}},!0)]})}fromSchema(e){ke(e,Ime);let t=Be(e,e,jy.schema());Te.assertSchema(t,this.className),this.userCertificate=t.result.userCertificate,this.revocationDate=new ts({schema:t.result.revocationDate}),oh in t.result&&(this.crlEntryExtensions=new Bn({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}};Y7.CLASS_NAME="RevokedCertificate";var bB="tbs",zv="version",AB="signature",CB="issuer",NB="thisUpdate",Jb="nextUpdate",Yb="revokedCertificates",Qb="crlExtensions",Fy="signatureAlgorithm",My="signatureValue",Su="tbsCertList",kC=`${Su}.version`,iO=`${Su}.signature`,aO=`${Su}.issuer`,LC=`${Su}.thisUpdate`,Lx=`${Su}.nextUpdate`,VC=`${Su}.revokedCertificates`,UC=`${Su}.extensions`,_me=[Su,kC,iO,aO,LC,Lx,VC,UC,Fy,My];function Dme(r={}){let e=O(r,"names",{});return new J({name:e.blockName||Su,value:[new xe({optional:!0,name:e.tbsCertListVersion||kC,value:2}),we.schema(e.signature||{names:{blockName:iO}}),Mr.schema(e.issuer||{names:{blockName:aO}}),ts.schema(e.tbsCertListThisUpdate||{names:{utcTimeName:LC,generalTimeName:LC}}),ts.schema(e.tbsCertListNextUpdate||{names:{utcTimeName:Lx,generalTimeName:Lx}},!0),new J({optional:!0,value:[new Bt({name:e.tbsCertListRevokedCertificates||VC,value:new J({value:[new xe,ts.schema(),Bn.schema({},!0)]})})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Bn.schema(e.crlExtensions||{names:{blockName:UC}})]})]})}o(Dme,"tbsCertList");var Bme=[WR,S7,vde,yde,E7,XR,zR,xde,wde,b7],Vx=class _s 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,bB,_s.defaultValues(bB))),this.version=O(e,zv,_s.defaultValues(zv)),this.signature=O(e,AB,_s.defaultValues(AB)),this.issuer=O(e,CB,_s.defaultValues(CB)),this.thisUpdate=O(e,NB,_s.defaultValues(NB)),Jb in e&&(this.nextUpdate=O(e,Jb,_s.defaultValues(Jb))),Yb in e&&(this.revokedCertificates=O(e,Yb,_s.defaultValues(Yb))),Qb in e&&(this.crlExtensions=O(e,Qb,_s.defaultValues(Qb))),this.signatureAlgorithm=O(e,Fy,_s.defaultValues(Fy)),this.signatureValue=O(e,My,_s.defaultValues(My)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case bB:return ln;case zv:return 0;case AB:return new we;case CB:return new Mr;case NB:return new ts;case Jb:return new ts;case Yb:return[];case Qb:return new Bn;case Fy:return new we;case My:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||"CertificateList",value:[Dme(e),we.schema(t.signatureAlgorithm||{names:{blockName:Fy}}),new Gt({name:t.signatureValue||My})]})}fromSchema(e){ke(e,_me);let t=Be(e,e,_s.schema());Te.assertSchema(t,this.className),this.tbsView=t.result.tbsCertList.valueBeforeDecodeView,kC in t.result&&(this.version=t.result[kC].valueBlock.valueDec),this.signature=new we({schema:t.result[iO]}),this.issuer=new Mr({schema:t.result[aO]}),this.thisUpdate=new ts({schema:t.result[LC]}),Lx in t.result&&(this.nextUpdate=new ts({schema:t.result[Lx]})),VC in t.result&&(this.revokedCertificates=Array.from(t.result[VC],n=>new Y7({schema:n}))),UC in t.result&&(this.crlExtensions=new Bn({schema:t.result[UC]})),this.signatureAlgorithm=new we({schema:t.result.signatureAlgorithm}),this.signatureValue=t.result.signatureValue}encodeTBS(){let e=[];return this.version!==_s.defaultValues(zv)&&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 _s.schema();let n=Qr(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!==_s.defaultValues(zv)&&(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&&!Bme.includes(s.extnID))return!1}return t.verifyWithPublicKey(this.tbsView,this.signatureValue,n,this.signatureAlgorithm)}};Vx.CLASS_NAME="CertificateRevocationList";var am="crlId",om="crlValue",Jv="parsedValue",Rme=[am,om],Q7=class qy extends Re{static{o(this,"CRLBag")}constructor(e={}){super(),this.crlId=O(e,am,qy.defaultValues(am)),this.crlValue=O(e,om,qy.defaultValues(om)),Jv in e&&(this.parsedValue=O(e,Jv,qy.defaultValues(Jv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case am:return V;case om:return new bt;case Jv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case am:return t===V;case om:return t instanceof bt;case Jv: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,Rme);let t=Be(e,e,qy.schema({names:{id:am,value:om}}));switch(Te.assertSchema(t,this.className),this.crlId=t.result.crlId.valueBlock.toString(),this.crlValue=t.result.crlValue,this.crlId){case Qq:this.parsedValue=Vx.fromBER(this.certValue.valueBlock.valueHex);break;default:throw new Error(`Incorrect CRL_ID value in CRLBag: ${this.crlId}`)}}toSchema(){return this.parsedValue&&(this.crlId=Qq,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()}}};Q7.CLASS_NAME="CRLBag";var um="version",cm="encryptedContentInfo",tl="unprotectedAttrs",Ome=[um,cm,tl],Ux=class Hy extends Re{static{o(this,"EncryptedData")}constructor(e={}){super(),this.version=O(e,um,Hy.defaultValues(um)),this.encryptedContentInfo=O(e,cm,Hy.defaultValues(cm)),tl in e&&(this.unprotectedAttrs=O(e,tl,Hy.defaultValues(tl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case um:return 0;case cm:return new ds;case tl:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case um:return t===0;case cm:return ds.compareWithDefault("contentType",t.contentType)&&ds.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&ds.compareWithDefault("encryptedContent",t.encryptedContent);case tl: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}),ds.schema(t.encryptedContentInfo||{}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Bt({name:t.unprotectedAttrs||V,value:hn.schema()})]})]})}fromSchema(e){ke(e,Ome);let t=Be(e,e,Hy.schema({names:{version:um,encryptedContentInfo:{names:{blockName:cm}},unprotectedAttrs:tl}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.encryptedContentInfo=new ds({schema:t.result.encryptedContentInfo}),tl in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new hn({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)){Tr.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)){Tr.assert(e,"parameters","object");let n={...e,encryptedContentInfo:this.encryptedContentInfo};return t.decryptEncryptedContentInfo(n)}};Ux.CLASS_NAME="EncryptedData";var uh="encryptionAlgorithm",rl="encryptedData",Yv="parsedValue",Pme=[uh,rl],Z7=class lm extends Re{static{o(this,"PKCS8ShroudedKeyBag")}constructor(e={}){super(),this.encryptionAlgorithm=O(e,uh,lm.defaultValues(uh)),this.encryptedData=O(e,rl,lm.defaultValues(rl)),Yv in e&&(this.parsedValue=O(e,Yv,lm.defaultValues(Yv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case uh:return new we;case rl:return new qe;case Yv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case uh:return we.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case rl:return t.isEqual(lm.defaultValues(e));case Yv: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:uh}}),new Fr({value:[new qe({name:t.encryptedData||rl}),new qe({idBlock:{isConstructed:!0},name:t.encryptedData||rl})]})]})}fromSchema(e){ke(e,Pme);let t=Be(e,e,lm.schema({names:{encryptionAlgorithm:{names:{blockName:uh}},encryptedData:rl}}));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 Ux({encryptedContentInfo:new ds({contentEncryptionAlgorithm:this.encryptionAlgorithm,encryptedContent:this.encryptedData})}).decrypt(e,t);this.parsedValue=kx.fromBER(s)}async makeInternalValues(e,t=kt(!0)){if(!this.parsedValue)throw new Error('Please initialize "parsedValue" first');let n=new Ux,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}};Z7.CLASS_NAME="PKCS8ShroudedKeyBag";var fm="secretTypeId",hm="secretValue",kme=[fm,hm],eH=class KA extends Re{static{o(this,"SecretBag")}constructor(e={}){super(),this.secretTypeId=O(e,fm,KA.defaultValues(fm)),this.secretValue=O(e,hm,KA.defaultValues(hm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fm:return V;case hm:return new bt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case fm:return t===V;case hm: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,kme);let t=Be(e,e,KA.schema({names:{id:fm,value:hm}}));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()}}};eH.CLASS_NAME="SecretBag";var Lme=class ch{static{o(this,"SafeBagValueFactory")}static getItems(){return this.items||(this.items={},ch.register("1.2.840.113549.1.12.10.1.1",kx),ch.register("1.2.840.113549.1.12.10.1.2",Z7),ch.register("1.2.840.113549.1.12.10.1.3",J7),ch.register("1.2.840.113549.1.12.10.1.4",Q7),ch.register("1.2.840.113549.1.12.10.1.5",eH),ch.register("1.2.840.113549.1.12.10.1.6",x0)),this.items}static register(e,t){this.getItems()[e]=t}static find(e){return this.getItems()[e]||null}},lh="bagId",fh="bagValue",cu="bagAttributes",Vme=[lh,fh,cu],gR=class Ky extends Re{static{o(this,"SafeBag")}constructor(e={}){super(),this.bagId=O(e,lh,Ky.defaultValues(lh)),this.bagValue=O(e,fh,Ky.defaultValues(fh)),cu in e&&(this.bagAttributes=O(e,cu,Ky.defaultValues(cu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case lh:return V;case fh:return new bt;case cu:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case lh:return t===V;case fh:return t instanceof bt;case cu: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||lh}),new fe({idBlock:{tagClass:3,tagNumber:0},value:[new bt({name:t.bagValue||fh})]}),new en({optional:!0,value:[new Bt({name:t.bagAttributes||cu,value:hn.schema()})]})]})}fromSchema(e){ke(e,Vme);let t=Be(e,e,Ky.schema({names:{bagId:lh,bagValue:fh,bagAttributes:cu}}));Te.assertSchema(t,this.className),this.bagId=t.result.bagId.valueBlock.toString();let n=Lme.find(this.bagId);if(!n)throw new Error(`Invalid BAG_ID for SafeBag: ${this.bagId}`);this.bagValue=new n({schema:t.result.bagValue}),cu in t.result&&(this.bagAttributes=Array.from(t.result.bagAttributes,s=>new hn({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 en({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}};gR.CLASS_NAME="SafeBag";var kd="safeBags",x0=class vR extends Re{static{o(this,"SafeContents")}constructor(e={}){super(),this.safeBags=O(e,kd,vR.defaultValues(kd)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case kd:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case kd: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:gR.schema()})]})}fromSchema(e){ke(e,[kd]);let t=Be(e,e,vR.schema({names:{safeBags:kd}}));Te.assertSchema(t,this.className),this.safeBags=Array.from(t.result.safeBags,n=>new gR({schema:n}))}toSchema(){return new J({value:Array.from(this.safeBags,e=>e.toSchema())})}toJSON(){return{safeBags:Array.from(this.safeBags,e=>e.toJSON())}}};x0.CLASS_NAME="SafeContents";var $y="otherCertFormat",Gy="otherCert",Ume=[$y,Gy],$A=class GA extends Re{static{o(this,"OtherCertificateFormat")}constructor(e={}){super(),this.otherCertFormat=O(e,$y,GA.defaultValues($y)),this.otherCert=O(e,Gy,GA.defaultValues(Gy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case $y:return V;case Gy: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||$y}),new bt({name:t.otherCert||Gy})]})}fromSchema(e){ke(e,Ume);let t=Be(e,e,GA.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}},Xy="certificates",jme=[Xy],Xh=class yR extends Re{static{o(this,"CertificateSet")}constructor(e={}){super(),this.certificates=O(e,Xy,yR.defaultValues(Xy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Xy:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new en({name:t.blockName||V,value:[new Bt({name:t.certificates||Xy,value:new Fr({value:[ms.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:Tl.schema().valueBlock.value}),new fe({idBlock:{tagClass:3,tagNumber:3},value:$A.schema().valueBlock.value})]})})]})}fromSchema(e){ke(e,jme);let t=Be(e,e,yR.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 ms({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 Tl({schema:i}):new _C({schema:i});case 2:return new Tl({schema:i});case 3:return new $A({schema:i})}return n})}toSchema(){return new en({value:Array.from(this.certificates,e=>{switch(!0){case e instanceof ms:return e.toSchema();case e instanceof _C:return new fe({idBlock:{tagClass:3,tagNumber:1},value:e.toSchema().valueBlock.value});case e instanceof Tl:return new fe({idBlock:{tagClass:3,tagNumber:2},value:e.toSchema().valueBlock.value});case e instanceof $A: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())}}};Xh.CLASS_NAME="CertificateSet";var Wy="otherRevInfoFormat",zy="otherRevInfo",Fme=[Wy,zy],_x=class XA extends Re{static{o(this,"OtherRevocationInfoFormat")}constructor(e={}){super(),this.otherRevInfoFormat=O(e,Wy,XA.defaultValues(Wy)),this.otherRevInfo=O(e,zy,XA.defaultValues(zy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Wy:return V;case zy: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||Wy}),new bt({name:t.otherRevInfo||zy})]})}fromSchema(e){ke(e,Fme);let t=Be(e,e,XA.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}};_x.CLASS_NAME="OtherRevocationInfoFormat";var Jy="crls",TB="otherRevocationInfos",Mme=[Jy],Dx=class WA extends Re{static{o(this,"RevocationInfoChoices")}constructor(e={}){super(),this.crls=O(e,Jy,WA.defaultValues(Jy)),this.otherRevocationInfos=O(e,TB,WA.defaultValues(TB)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Jy:return[];case TB:return[];default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new en({name:t.blockName||V,value:[new Bt({name:t.crls||V,value:new Fr({value:[Vx.schema(),new fe({idBlock:{tagClass:3,tagNumber:1},value:[new ot,new bt]})]})})]})}fromSchema(e){ke(e,Mme);let t=Be(e,e,WA.schema({names:{crls:Jy}}));if(Te.assertSchema(t,this.className),t.result.crls)for(let n of t.result.crls)n.idBlock.tagClass===1?this.crls.push(new Vx({schema:n})):this.otherRevocationInfos.push(new _x({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 en({value:e})}toJSON(){return{crls:Array.from(this.crls,e=>e.toJSON()),otherRevocationInfos:Array.from(this.otherRevocationInfos,e=>e.toJSON())}}};Dx.CLASS_NAME="RevocationInfoChoices";var Yy="certs",hh="crls",qme=[Yy,hh],zA=class xR extends Re{static{o(this,"OriginatorInfo")}constructor(e={}){super(),this.crls=O(e,hh,xR.defaultValues(hh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Yy:return new Xh;case hh:return new Dx;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Yy:return t.certificates.length===0;case hh: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:Xh.schema().valueBlock.value}),new fe({name:t.crls||V,optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Dx.schema().valueBlock.value})]})}fromSchema(e){ke(e,qme);let t=Be(e,e,xR.schema({names:{certs:Yy,crls:hh}}));Te.assertSchema(t,this.className),Yy in t.result&&(this.certs=new Xh({schema:new en({value:t.result.certs.valueBlock.value})})),hh in t.result&&(this.crls=new Dx({schema:new en({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}};zA.CLASS_NAME="OriginatorInfo";var Qy="issuer",Zy="serialNumber",Hme=[Qy,Zy],rs=class JA extends Re{static{o(this,"IssuerAndSerialNumber")}constructor(e={}){super(),this.issuer=O(e,Qy,JA.defaultValues(Qy)),this.serialNumber=O(e,Zy,JA.defaultValues(Zy)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Qy:return new Mr;case Zy:return new xe;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[Mr.schema(t.issuer||{}),new xe({name:t.serialNumber||V})]})}fromSchema(e){ke(e,Hme);let t=Be(e,e,JA.schema({names:{issuer:{names:{blockName:Qy}},serialNumber:Zy}}));Te.assertSchema(t,this.className),this.issuer=new Mr({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()}}};rs.CLASS_NAME="IssuerAndSerialNumber";var Zb="variant",Qv="value",Kme=["blockName"],tH=class YA extends Re{static{o(this,"RecipientIdentifier")}constructor(e={}){super(),this.variant=O(e,Zb,YA.defaultValues(Zb)),Qv in e&&(this.value=O(e,Qv,YA.defaultValues(Qv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Zb:return-1;case Qv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Zb:return t===-1;case Qv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Fr({value:[rs.schema({names:{blockName:t.blockName||V}}),new xt({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:0}})]})}fromSchema(e){ke(e,Kme);let t=Be(e,e,YA.schema({names:{blockName:"blockName"}}));Te.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new rs({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 rs))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}};tH.CLASS_NAME="RecipientIdentifier";var ph="version",pm="rid",dm="keyEncryptionAlgorithm",mm="encryptedKey",eA="recipientCertificate",$me=[ph,pm,dm,mm],jC=class lu extends Re{static{o(this,"KeyTransRecipientInfo")}constructor(e={}){super(),this.version=O(e,ph,lu.defaultValues(ph)),this.rid=O(e,pm,lu.defaultValues(pm)),this.keyEncryptionAlgorithm=O(e,dm,lu.defaultValues(dm)),this.encryptedKey=O(e,mm,lu.defaultValues(mm)),this.recipientCertificate=O(e,eA,lu.defaultValues(eA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ph:return-1;case pm:return{};case dm:return new we;case mm:return new qe;case eA:return new ms;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ph:return t===lu.defaultValues(ph);case pm:return Object.keys(t).length===0;case dm:case mm:return t.isEqual(lu.defaultValues(e));case eA: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}),tH.schema(t.rid||{}),we.schema(t.keyEncryptionAlgorithm||{}),new qe({name:t.encryptedKey||V})]})}fromSchema(e){ke(e,$me);let t=Be(e,e,lu.schema({names:{version:ph,rid:{names:{blockName:pm}},keyEncryptionAlgorithm:{names:{blockName:dm}},encryptedKey:mm}}));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 rs({schema:t.result.rid}),this.keyEncryptionAlgorithm=new we({schema:t.result.keyEncryptionAlgorithm}),this.encryptedKey=t.result.encryptedKey}toSchema(){let e=[];return this.rid instanceof rs?(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()}}};jC.CLASS_NAME="KeyTransRecipientInfo";var gm="algorithm",vm="publicKey",Gme=[gm,vm],FC=class ex extends Re{static{o(this,"OriginatorPublicKey")}constructor(e={}){super(),this.algorithm=O(e,gm,ex.defaultValues(gm)),this.publicKey=O(e,vm,ex.defaultValues(vm)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case gm:return new we;case vm:return new Gt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case gm:case vm:return t.isEqual(ex.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,Gme);let t=Be(e,e,ex.schema({names:{algorithm:{names:{blockName:gm}},publicKey:vm}}));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()}}};FC.CLASS_NAME="OriginatorPublicKey";var tA="variant",Zv="value",Xme=["blockName"],Bx=class QA extends Re{static{o(this,"OriginatorIdentifierOrKey")}constructor(e={}){super(),this.variant=O(e,tA,QA.defaultValues(tA)),Zv in e&&(this.value=O(e,Zv,QA.defaultValues(Zv))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case tA:return-1;case Zv:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case tA:return t===-1;case Zv:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Fr({value:[rs.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:FC.schema().valueBlock.value})]})}fromSchema(e){ke(e,Xme);let t=Be(e,e,QA.schema({names:{blockName:"blockName"}}));Te.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1?(this.variant=1,this.value=new rs({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 FC({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}};Bx.CLASS_NAME="OriginatorIdentifierOrKey";var ym="keyAttrId",po="keyAttr",Wme=[ym,po],Wh=class ZA extends Re{static{o(this,"OtherKeyAttribute")}constructor(e={}){super(),this.keyAttrId=O(e,ym,ZA.defaultValues(ym)),po in e&&(this.keyAttr=O(e,po,ZA.defaultValues(po))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case ym:return V;case po:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case ym:return typeof t=="string"&&t===V;case po: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,Wme);let t=Be(e,e,ZA.schema({names:{keyAttrId:ym,keyAttr:po}}));Te.assertSchema(t,this.className),this.keyAttrId=t.result.keyAttrId.valueBlock.toString(),po in t.result&&(this.keyAttr=t.result.keyAttr)}toSchema(){let e=[];return e.push(new ot({value:this.keyAttrId})),po in this&&e.push(this.keyAttr),new J({value:e})}toJSON(){let e={keyAttrId:this.keyAttrId};return po in this&&(e.keyAttr=this.keyAttr.toJSON()),e}};Wh.CLASS_NAME="OtherKeyAttribute";var dh="subjectKeyIdentifier",nl="date",sl="other",zme=[dh,nl,sl],MC=class xm extends Re{static{o(this,"RecipientKeyIdentifier")}constructor(e={}){super(),this.subjectKeyIdentifier=O(e,dh,xm.defaultValues(dh)),nl in e&&(this.date=O(e,nl,xm.defaultValues(nl))),sl in e&&(this.other=O(e,sl,xm.defaultValues(sl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case dh:return new qe;case nl:return new jr;case sl:return new Wh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case dh:return t.isEqual(xm.defaultValues(dh));case nl:return t.year===0&&t.month===0&&t.day===0&&t.hour===0&&t.minute===0&&t.second===0&&t.millisecond===0;case sl: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 jr({optional:!0,name:t.date||V}),Wh.schema(t.other||{})]})}fromSchema(e){ke(e,zme);let t=Be(e,e,xm.schema({names:{subjectKeyIdentifier:dh,date:nl,other:{names:{blockName:sl}}}}));Te.assertSchema(t,this.className),this.subjectKeyIdentifier=t.result.subjectKeyIdentifier,nl in t.result&&(this.date=t.result.date),sl in t.result&&(this.other=new Wh({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}};MC.CLASS_NAME="RecipientKeyIdentifier";var rA="variant",nA="value",Jme=["blockName"],S0=class eC extends Re{static{o(this,"KeyAgreeRecipientIdentifier")}constructor(e={}){super(),this.variant=O(e,rA,eC.defaultValues(rA)),this.value=O(e,nA,eC.defaultValues(nA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case rA:return-1;case nA:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case rA:return t===-1;case nA:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Fr({value:[rs.schema(t.issuerAndSerialNumber||{names:{blockName:t.blockName||V}}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:0},value:MC.schema(t.rKeyId||{names:{blockName:t.blockName||V}}).valueBlock.value})]})}fromSchema(e){ke(e,Jme);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 rs({schema:t.result.blockName})):(this.variant=2,this.value=new MC({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}};S0.CLASS_NAME="KeyAgreeRecipientIdentifier";var wm="rid",mh="encryptedKey",Yme=[wm,mh],qC=class tx extends Re{static{o(this,"RecipientEncryptedKey")}constructor(e={}){super(),this.rid=O(e,wm,tx.defaultValues(wm)),this.encryptedKey=O(e,mh,tx.defaultValues(mh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case wm:return new S0;case mh:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case wm:return t.variant===-1&&!("value"in t);case mh:return t.isEqual(tx.defaultValues(mh));default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[S0.schema(t.rid||{}),new qe({name:t.encryptedKey||V})]})}fromSchema(e){ke(e,Yme);let t=Be(e,e,tx.schema({names:{rid:{names:{blockName:wm}},encryptedKey:mh}}));Te.assertSchema(t,this.className),this.rid=new S0({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()}}};qC.CLASS_NAME="RecipientEncryptedKey";var sA="encryptedKeys",rH="RecipientEncryptedKeys",Qme=[rH],Rx=class wR extends Re{static{o(this,"RecipientEncryptedKeys")}constructor(e={}){super(),this.encryptedKeys=O(e,sA,wR.defaultValues(sA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case sA:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case sA: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:qC.schema()})]})}fromSchema(e){ke(e,Qme);let t=Be(e,e,wR.schema({names:{RecipientEncryptedKeys:rH}}));Te.assertSchema(t,this.className),this.encryptedKeys=Array.from(t.result.RecipientEncryptedKeys,n=>new qC({schema:n}))}toSchema(){return new J({value:Array.from(this.encryptedKeys,e=>e.toSchema())})}toJSON(){return{encryptedKeys:Array.from(this.encryptedKeys,e=>e.toJSON())}}};Rx.CLASS_NAME="RecipientEncryptedKeys";var Sm="version",Em="originator",fu="ukm",bm="keyEncryptionAlgorithm",Am="recipientEncryptedKeys",iA="recipientCertificate",aA="recipientPublicKey",Zme=[Sm,Em,fu,bm,Am],HC=class mo extends Re{static{o(this,"KeyAgreeRecipientInfo")}constructor(e={}){super(),this.version=O(e,Sm,mo.defaultValues(Sm)),this.originator=O(e,Em,mo.defaultValues(Em)),fu in e&&(this.ukm=O(e,fu,mo.defaultValues(fu))),this.keyEncryptionAlgorithm=O(e,bm,mo.defaultValues(bm)),this.recipientEncryptedKeys=O(e,Am,mo.defaultValues(Am)),this.recipientCertificate=O(e,iA,mo.defaultValues(iA)),this.recipientPublicKey=O(e,aA,mo.defaultValues(aA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sm:return 0;case Em:return new Bx;case fu:return new qe;case bm:return new we;case Am:return new Rx;case iA:return new ms;case aA:return null;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sm:return t===0;case Em:return t.variant===-1&&!("value"in t);case fu:return t.isEqual(mo.defaultValues(fu));case bm:return t.algorithmId===V&&!("algorithmParams"in t);case Am:return t.encryptedKeys.length===0;case iA:return!1;case aA: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:[Bx.schema(t.originator||{})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new qe({name:t.ukm||V})]}),we.schema(t.keyEncryptionAlgorithm||{}),Rx.schema(t.recipientEncryptedKeys||{})]})}fromSchema(e){ke(e,Zme);let t=Be(e,e,mo.schema({names:{version:Sm,originator:{names:{blockName:Em}},ukm:fu,keyEncryptionAlgorithm:{names:{blockName:bm}},recipientEncryptedKeys:{names:{blockName:Am}}}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.originator=new Bx({schema:t.result.originator}),fu in t.result&&(this.ukm=t.result.ukm),this.keyEncryptionAlgorithm=new we({schema:t.result.keyEncryptionAlgorithm}),this.recipientEncryptedKeys=new Rx({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}};HC.CLASS_NAME="KeyAgreeRecipientInfo";var gh="keyIdentifier",il="date",al="other",e0e=[gh,il,al],Ox=class Cm extends Re{static{o(this,"KEKIdentifier")}constructor(e={}){super(),this.keyIdentifier=O(e,gh,Cm.defaultValues(gh)),il in e&&(this.date=O(e,il,Cm.defaultValues(il))),al in e&&(this.other=O(e,al,Cm.defaultValues(al))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case gh:return new qe;case il:return new jr;case al:return new Wh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case gh:return t.isEqual(Cm.defaultValues(gh));case il:return t.year===0&&t.month===0&&t.day===0&&t.hour===0&&t.minute===0&&t.second===0&&t.millisecond===0;case al: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 jr({optional:!0,name:t.date||V}),Wh.schema(t.other||{})]})}fromSchema(e){ke(e,e0e);let t=Be(e,e,Cm.schema({names:{keyIdentifier:gh,date:il,other:{names:{blockName:al}}}}));Te.assertSchema(t,this.className),this.keyIdentifier=t.result.keyIdentifier,il in t.result&&(this.date=t.result.date),al in t.result&&(this.other=new Wh({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}};Ox.CLASS_NAME="KEKIdentifier";var Nm="version",Tm="kekid",Im="keyEncryptionAlgorithm",vh="encryptedKey",oA="preDefinedKEK",t0e=[Nm,Tm,Im,vh],KC=class hu extends Re{static{o(this,"KEKRecipientInfo")}constructor(e={}){super(),this.version=O(e,Nm,hu.defaultValues(Nm)),this.kekid=O(e,Tm,hu.defaultValues(Tm)),this.keyEncryptionAlgorithm=O(e,Im,hu.defaultValues(Im)),this.encryptedKey=O(e,vh,hu.defaultValues(vh)),this.preDefinedKEK=O(e,oA,hu.defaultValues(oA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nm:return 0;case Tm:return new Ox;case Im:return new we;case vh:return new qe;case oA:return ln;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"KEKRecipientInfo":return t===hu.defaultValues(Nm);case Tm:return t.compareWithDefault("keyIdentifier",t.keyIdentifier)&&!("date"in t)&&!("other"in t);case Im:return t.algorithmId===V&&!("algorithmParams"in t);case vh:return t.isEqual(hu.defaultValues(vh));case oA: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}),Ox.schema(t.kekid||{}),we.schema(t.keyEncryptionAlgorithm||{}),new qe({name:t.encryptedKey||V})]})}fromSchema(e){ke(e,t0e);let t=Be(e,e,hu.schema({names:{version:Nm,kekid:{names:{blockName:Tm}},keyEncryptionAlgorithm:{names:{blockName:Im}},encryptedKey:vh}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.kekid=new Ox({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()}}};KC.CLASS_NAME="KEKRecipientInfo";var _m="version",ol="keyDerivationAlgorithm",Dm="keyEncryptionAlgorithm",yh="encryptedKey",uA="password",r0e=[_m,ol,Dm,yh],$C=class ul extends Re{static{o(this,"PasswordRecipientinfo")}constructor(e={}){super(),this.version=O(e,_m,ul.defaultValues(_m)),ol in e&&(this.keyDerivationAlgorithm=O(e,ol,ul.defaultValues(ol))),this.keyEncryptionAlgorithm=O(e,Dm,ul.defaultValues(Dm)),this.encryptedKey=O(e,yh,ul.defaultValues(yh)),this.password=O(e,uA,ul.defaultValues(uA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _m:return-1;case ol:return new we;case Dm:return new we;case yh:return new qe;case uA:return ln;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case _m:return t===-1;case ol:case Dm:return t.algorithmId===V&&!("algorithmParams"in t);case yh:return t.isEqual(ul.defaultValues(yh));case uA: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,ul.schema({names:{version:_m,keyDerivationAlgorithm:ol,keyEncryptionAlgorithm:{names:{blockName:Dm}},encryptedKey:yh}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,ol 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}};$C.CLASS_NAME="PasswordRecipientInfo";var Bm="oriType",xh="oriValue",n0e=[Bm,xh],SR=class rx extends Re{static{o(this,"OtherRecipientInfo")}constructor(e={}){super(),this.oriType=O(e,Bm,rx.defaultValues(Bm)),this.oriValue=O(e,xh,rx.defaultValues(xh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Bm:return V;case xh:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Bm:return t===V;case xh: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,n0e);let t=Be(e,e,rx.schema({names:{oriType:Bm,oriValue:xh}}));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 rx.compareWithDefault(xh,this.oriValue)||(e.oriValue=this.oriValue.toJSON()),e}};SR.CLASS_NAME="OtherRecipientInfo";var cA="variant",e1="value",s0e=["blockName"],wh=class nx extends Re{static{o(this,"RecipientInfo")}constructor(e={}){super(),this.variant=O(e,cA,nx.defaultValues(cA)),e1 in e&&(this.value=O(e,e1,nx.defaultValues(e1))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cA:return-1;case e1:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case cA:return t===nx.defaultValues(e);case e1:return Object.keys(t).length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new Fr({value:[jC.schema({names:{blockName:t.blockName||V}}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:1},value:HC.schema().valueBlock.value}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:2},value:KC.schema().valueBlock.value}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:3},value:$C.schema().valueBlock.value}),new fe({name:t.blockName||V,idBlock:{tagClass:3,tagNumber:4},value:SR.schema().valueBlock.value})]})}fromSchema(e){ke(e,s0e);let t=Be(e,e,nx.schema({names:{blockName:"blockName"}}));if(Te.assertSchema(t,this.className),t.result.blockName.idBlock.tagClass===1)this.variant=1,this.value=new jC({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 HC({schema:n});break;case 2:this.variant=3,this.value=new KC({schema:n});break;case 3:this.variant=4,this.value=new $C({schema:n});break;case 4:this.variant=5,this.value=new SR({schema:n});break;default:throw new Error("Incorrect structure of RecipientInfo block")}}}toSchema(){mr.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}};wh.CLASS_NAME="RecipientInfo";var cl="hashAlgorithm",ll="maskGenAlgorithm",fl="pSourceAlgorithm",i0e=[cl,ll,fl],tC=class ba extends Re{static{o(this,"RSAESOAEPParams")}constructor(e={}){super(),this.hashAlgorithm=O(e,cl,ba.defaultValues(cl)),this.maskGenAlgorithm=O(e,ll,ba.defaultValues(ll)),this.pSourceAlgorithm=O(e,fl,ba.defaultValues(fl)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case cl:return new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new Zr});case ll:return new we({algorithmId:"1.2.840.113549.1.1.8",algorithmParams:new we({algorithmId:"1.3.14.3.2.26",algorithmParams:new Zr}).toSchema()});case fl: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,i0e);let t=Be(e,e,ba.schema({names:{hashAlgorithm:{names:{blockName:cl}},maskGenAlgorithm:{names:{blockName:ll}},pSourceAlgorithm:{names:{blockName:fl}}}}));Te.assertSchema(t,this.className),cl in t.result&&(this.hashAlgorithm=new we({schema:t.result.hashAlgorithm})),ll in t.result&&(this.maskGenAlgorithm=new we({schema:t.result.maskGenAlgorithm})),fl in t.result&&(this.pSourceAlgorithm=new we({schema:t.result.pSourceAlgorithm}))}toSchema(){let e=[];return this.hashAlgorithm.isEqual(ba.defaultValues(cl))||e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[this.hashAlgorithm.toSchema()]})),this.maskGenAlgorithm.isEqual(ba.defaultValues(ll))||e.push(new fe({idBlock:{tagClass:3,tagNumber:1},value:[this.maskGenAlgorithm.toSchema()]})),this.pSourceAlgorithm.isEqual(ba.defaultValues(fl))||e.push(new fe({idBlock:{tagClass:3,tagNumber:2},value:[this.pSourceAlgorithm.toSchema()]})),new J({value:e})}toJSON(){let e={};return this.hashAlgorithm.isEqual(ba.defaultValues(cl))||(e.hashAlgorithm=this.hashAlgorithm.toJSON()),this.maskGenAlgorithm.isEqual(ba.defaultValues(ll))||(e.maskGenAlgorithm=this.maskGenAlgorithm.toJSON()),this.pSourceAlgorithm.isEqual(ba.defaultValues(fl))||(e.pSourceAlgorithm=this.pSourceAlgorithm.toJSON()),e}};tC.CLASS_NAME="RSAESOAEPParams";var Rm="keyInfo",hl="entityUInfo",Om="suppPubInfo",a0e=[Rm,hl,Om],ER=class Pm extends Re{static{o(this,"ECCCMSSharedInfo")}constructor(e={}){super(),this.keyInfo=O(e,Rm,Pm.defaultValues(Rm)),hl in e&&(this.entityUInfo=O(e,hl,Pm.defaultValues(hl))),this.suppPubInfo=O(e,Om,Pm.defaultValues(Om)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Rm:return new we;case hl:return new qe;case Om:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Rm:case hl:case Om:return t.isEqual(Pm.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,a0e);let t=Be(e,e,Pm.schema({names:{keyInfo:{names:{blockName:Rm}},entityUInfo:hl,suppPubInfo:Om}}));Te.assertSchema(t,this.className),this.keyInfo=new we({schema:t.result.keyInfo}),hl 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}};ER.CLASS_NAME="ECCCMSSharedInfo";var km="version",pl="originatorInfo",Lm="recipientInfos",Vm="encryptedContentInfo",dl="unprotectedAttrs",o0e=[km,pl,Lm,Vm,dl],m7={kdfAlgorithm:"SHA-512",kekEncryptionLength:256},u0e={"P-256":256,"P-384":384,"P-521":528},bR=class ml extends Re{static{o(this,"EnvelopedData")}constructor(e={}){super(),this.version=O(e,km,ml.defaultValues(km)),pl in e&&(this.originatorInfo=O(e,pl,ml.defaultValues(pl))),this.recipientInfos=O(e,Lm,ml.defaultValues(Lm)),this.encryptedContentInfo=O(e,Vm,ml.defaultValues(Vm)),dl in e&&(this.unprotectedAttrs=O(e,dl,ml.defaultValues(dl))),this.policy={disableSplit:!!e.disableSplit},e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case km:return 0;case pl:return new zA;case Lm:return[];case Vm:return new ds;case dl:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case km:return t===ml.defaultValues(e);case pl:return t.certs.certificates.length===0&&t.crls.crls.length===0;case Lm:case dl:return t.length===0;case Vm:return ds.compareWithDefault("contentType",t.contentType)&&ds.compareWithDefault("contentEncryptionAlgorithm",t.contentEncryptionAlgorithm)&&ds.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:zA.schema().valueBlock.value}),new en({value:[new Bt({name:t.recipientInfos||V,value:wh.schema()})]}),ds.schema(t.encryptedContentInfo||{}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Bt({name:t.unprotectedAttrs||V,value:hn.schema()})]})]})}fromSchema(e){ke(e,o0e);let t=Be(e,e,ml.schema({names:{version:km,originatorInfo:pl,recipientInfos:Lm,encryptedContentInfo:{names:{blockName:Vm}},unprotectedAttrs:dl}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,pl in t.result&&(this.originatorInfo=new zA({schema:new J({value:t.result.originatorInfo.valueBlock.value})})),this.recipientInfos=Array.from(t.result.recipientInfos,n=>new wh({schema:n})),this.encryptedContentInfo=new ds({schema:t.result.encryptedContentInfo}),dl in t.result&&(this.unprotectedAttrs=Array.from(t.result.unprotectedAttrs,n=>new hn({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 en({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"},m7,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 Zr});u=new tC({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 Zr}let c=new jC({version:0,rid:new rs({issuer:e.issuer,serialNumber:e.serialNumber}),keyEncryptionAlgorithm:new we({algorithmId:a,algorithmParams:u}),recipientCertificate:e});this.recipientInfos.push(new wh({variant:1,value:c}))}break;case 2:{let a=new S0({variant:1,value:new rs({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(Tr.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 Zr),n){case 1:{let i=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),a=new KC({version:4,kekid:new Ox({keyIdentifier:new qe({valueHex:t.keyIdentifier})}),keyEncryptionAlgorithm:new we({algorithmId:i,algorithmParams:t.keyEncryptionAlgorithmParams}),preDefinedKEK:e});this.recipientInfos.push(new wh({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 w0({salt:new qe({valueHex:a}),iterationCount:t.iterationCount,prf:new we({algorithmId:c,algorithmParams:new Zr})}),h=s.getOIDByAlgorithm(t.keyEncryptionAlgorithm,!0,"keyEncryptionAlgorithm"),m=new $C({version:0,keyDerivationAlgorithm:new we({algorithmId:i,algorithmParams:l.toSchema()}),keyEncryptionAlgorithm:new we({algorithmId:h,algorithmParams:t.keyEncryptionAlgorithmParams}),password:e});this.recipientInfos.push(new wh({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({},m7,n||{}),a=new S0({variant:2,value:new MC({subjectKeyIdentifier:new qe({valueHex:t})})});this._addKeyAgreeRecipientInfo(a,i,{recipientPublicKey:e},s)}_addKeyAgreeRecipientInfo(e,t,n,s=kt(!0)){let i=new qC({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 Rx({encryptedKeys:[i]})},g=new HC(Object.assign(m,n));this.recipientInfos.push(new wh({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 ds({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 ER({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 r7(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"}),ze=new Bx;return ze.variant=3,ze.value=FC.fromBER(B),C.originator=ze,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 tC({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 w0({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"),S=[];for(let w=0;w<this.recipientInfos.length;w++)switch(this.recipientInfos[w].variant){case 1:S.push(await g(w));break;case 2:S.push(await m(w));break;case 3:S.push(await y(w));break;case 4:S.push(await v(w));break;default:throw new Error(`Unknown recipient type in array with index ${w}`)}return S}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 S=>{let w=this.recipientInfos[S].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 ${S}`);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 ${S}`);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 ${S}`)}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,ze=new ArrayBuffer(4),ne=new Uint8Array(ze);for(let tt=3;tt>=0;tt--)ne[tt]=Oe,Oe>>=8;let Z={algorithmId:Y.algorithmId};ue&&(Z.algorithmParams=new Zr);let He=new ER({keyInfo:new we(Z),entityUInfo:w.ukm,suppPubInfo:new qe({valueHex:ze})}).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 r7(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 S=>{let w=this.recipientInfos[S].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 tC({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 S=>{let w=this.recipientInfos[S].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 S=>{let w=this.recipientInfos[S].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 w0({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)}};bR.CLASS_NAME="EnvelopedData";var Ld="safeContents",t1="parsedValue",g7="contentInfos",AR=class rC extends Re{static{o(this,"AuthenticatedSafe")}constructor(e={}){super(),this.safeContents=O(e,Ld,rC.defaultValues(Ld)),t1 in e&&(this.parsedValue=O(e,t1,rC.defaultValues(t1))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ld:return[];case t1:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ld:return t.length===0;case t1: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:rn.schema()})]})}fromSchema(e){ke(e,[g7]);let t=Be(e,e,rC.schema({names:{contentInfos:g7}}));Te.assertSchema(t,this.className),this.safeContents=Array.from(t.result.contentInfos,n=>new rn({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(mr.assert(e,Ld),Tr.assert(e.safeContents,Ld,"Array"),e.safeContents.length!==this.safeContents.length)throw new Tr('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 JR:{Tr.assert(s.content,"this.safeContents[j].content",qe);let u=s.content.getValue();this.parsedValue.safeContents.push({privacyMode:0,value:x0.fromBER(u)})}break;case D7:{let u=new bR({schema:s.content});mr.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:x0.fromBER(m)})}break;case B7:{let u=new Ux({schema:s.content});mr.assert(a,i,"password");let c=i.password,l=await u.decrypt({password:c},t);this.parsedValue.safeContents.push({privacyMode:1,value:x0.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(Tr.assert(this.parsedValue,"this.parsedValue","object"),Tr.assert(this.parsedValue.safeContents,"this.parsedValue.safeContents","Array"),Tr.assert(e,"parameters","object"),mr.assert(e,"safeContents"),Tr.assert(e.safeContents,"parameters.safeContents","Array"),e.safeContents.length!==this.parsedValue.safeContents.length)throw new Tr('Length of "parameters.safeContents" must be equal to "this.parsedValue.safeContents"');this.safeContents=[];for(let[n,s]of this.parsedValue.safeContents.entries())switch(mr.assert("content",s,"privacyMode","value"),Tr.assert(s.value,"content.value",x0),s.privacyMode){case 0:{let i=s.value.toSchema().toBER(!1);this.safeContents.push(new rn({contentType:"1.2.840.113549.1.7.1",content:new qe({valueHex:i})}))}break;case 1:{let i=new Ux,a=e.safeContents[n];a.contentToEncrypt=s.value.toSchema().toBER(!1),await i.encrypt(a,t),this.safeContents.push(new rn({contentType:"1.2.840.113549.1.7.6",content:i.toSchema()}))}break;case 2:{let i=new bR,a=s.value.toSchema().toBER(!1),u=e.safeContents[n];switch(mr.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 rn({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}};AR.CLASS_NAME="AuthenticatedSafe";var Sh="hashAlgorithm",Um="issuerNameHash",jm="issuerKeyHash",Eh="serialNumber",c0e=[Sh,Um,jm,Eh],mi=class gl extends Re{static{o(this,"CertID")}static async create(e,t,n=kt(!0)){let s=new gl;return await s.createForCertificate(e,t,n),s}constructor(e={}){super(),this.hashAlgorithm=O(e,Sh,gl.defaultValues(Sh)),this.issuerNameHash=O(e,Um,gl.defaultValues(Um)),this.issuerKeyHash=O(e,jm,gl.defaultValues(jm)),this.serialNumber=O(e,Eh,gl.defaultValues(Eh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Sh:return new we;case Um:case jm:return new qe;case Eh:return new xe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Sh:return t.algorithmId===V&&!("algorithmParams"in t);case Um:case jm:case Eh:return t.isEqual(gl.defaultValues(Eh));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,c0e);let t=Be(e,e,gl.schema({names:{hashAlgorithm:Sh,issuerNameHash:Um,issuerKeyHash:jm,serialNumber:Eh}}));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)){mr.assert(t,Sh,"issuerCertificate");let s=n.getOIDByAlgorithm({name:t.hashAlgorithm},!0,"hashAlgorithm");this.hashAlgorithm=new we({algorithmId:s,algorithmParams:new Zr});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})}};mi.CLASS_NAME="CertID";var Fm="certID",Mm="certStatus",qm="thisUpdate",vl="nextUpdate",bh="singleExtensions",l0e=[Fm,Mm,qm,vl,bh],CR=class yl extends Re{static{o(this,"SingleResponse")}constructor(e={}){super(),this.certID=O(e,Fm,yl.defaultValues(Fm)),this.certStatus=O(e,Mm,yl.defaultValues(Mm)),this.thisUpdate=O(e,qm,yl.defaultValues(qm)),vl in e&&(this.nextUpdate=O(e,vl,yl.defaultValues(vl))),bh in e&&(this.singleExtensions=O(e,bh,yl.defaultValues(bh))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fm:return new mi;case Mm:return{};case qm:case vl:return new Date(0,0,0);case bh:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Fm:return mi.compareWithDefault("hashAlgorithm",t.hashAlgorithm)&&mi.compareWithDefault("issuerNameHash",t.issuerNameHash)&&mi.compareWithDefault("issuerKeyHash",t.issuerKeyHash)&&mi.compareWithDefault("serialNumber",t.serialNumber);case Mm:return Object.keys(t).length===0;case qm:case vl:return t===yl.defaultValues(e);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||V,value:[mi.schema(t.certID||{}),new Fr({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 jr,new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Tc]})]}),new xt({name:t.certStatus||V,idBlock:{tagClass:3,tagNumber:2},lenBlock:{length:1}})]}),new jr({name:t.thisUpdate||V}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new jr({name:t.nextUpdate||V})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Bn.schema(t.singleExtensions||{})]})]})}fromSchema(e){ke(e,l0e);let t=Be(e,e,yl.schema({names:{certID:{names:{blockName:Fm}},certStatus:Mm,thisUpdate:qm,nextUpdate:vl,singleExtensions:{names:{blockName:bh}}}}));Te.assertSchema(t,this.className),this.certID=new mi({schema:t.result.certID}),this.certStatus=t.result.certStatus,this.thisUpdate=t.result.thisUpdate.toDate(),vl in t.result&&(this.nextUpdate=t.result.nextUpdate.toDate()),bh in t.result&&(this.singleExtensions=Array.from(t.result.singleExtensions.valueBlock.value,n=>new Yi({schema:n})))}toSchema(){let e=[];return e.push(this.certID.toSchema()),e.push(this.certStatus),e.push(new jr({valueDate:this.thisUpdate})),this.nextUpdate&&e.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[new jr({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}};CR.CLASS_NAME="SingleResponse";var lA="tbs",Ah="version",sx="responderID",ix="producedAt",ax="responses",Hm="responseExtensions",zh="ResponseData",nC=`${zh}.${Ah}`,Km=`${zh}.${sx}`,NR=`${zh}.${ix}`,TR=`${zh}.${ax}`,sC=`${zh}.${Hm}`,f0e=[zh,nC,Km,NR,TR,sC],pu=class go 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,lA,go.defaultValues(lA))),Ah in e&&(this.version=O(e,Ah,go.defaultValues(Ah))),this.responderID=O(e,sx,go.defaultValues(sx)),this.producedAt=O(e,ix,go.defaultValues(ix)),this.responses=O(e,ax,go.defaultValues(ax)),Hm in e&&(this.responseExtensions=O(e,Hm,go.defaultValues(Hm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ah:return 0;case lA:return ln;case sx:return{};case ix:return new Date(0,0,0);case ax:case Hm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case lA:return t.byteLength===0;case sx:return Object.keys(t).length===0;case ix:return t===go.defaultValues(e);case ax:case Hm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||zh,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new xe({name:t.version||nC})]}),new Fr({value:[new fe({name:t.responderID||Km,idBlock:{tagClass:3,tagNumber:1},value:[Mr.schema(t.ResponseDataByName||{names:{blockName:"ResponseData.byName"}})]}),new fe({name:t.responderID||Km,idBlock:{tagClass:3,tagNumber:2},value:[new qe({name:t.ResponseDataByKey||"ResponseData.byKey"})]})]}),new jr({name:t.producedAt||NR}),new J({value:[new Bt({name:TR,value:CR.schema(t.response||{})})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Bn.schema(t.extensions||{names:{blockName:sC}})]})]})}fromSchema(e){ke(e,f0e);let t=Be(e,e,go.schema());Te.assertSchema(t,this.className),this.tbsView=t.result.ResponseData.valueBeforeDecodeView,nC in t.result&&(this.version=t.result[nC].valueBlock.valueDec),t.result[Km].idBlock.tagNumber===1?this.responderID=new Mr({schema:t.result[Km].valueBlock.value[0]}):this.responderID=t.result[Km].valueBlock.value[0],this.producedAt=t.result[NR].toDate(),this.responses=Array.from(t.result[TR],n=>new CR({schema:n})),sC in t.result&&(this.responseExtensions=Array.from(t.result[sC].valueBlock.value,n=>new Yi({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(!this.tbsView.byteLength)return go.schema();let n=Qr(this.tbsView);Te.assert(n,"TBS Response Data"),t=n.result}else{let n=[];Ah in this&&n.push(new fe({idBlock:{tagClass:3,tagNumber:0},value:[new xe({value:this.version})]})),this.responderID instanceof Mr?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 jr({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 Ah 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}};pu.CLASS_NAME="ResponseData";var IB="trustedCerts",_B="certs",DB="crls",BB="ocsps",RB="checkDate",OB="findOrigin",PB="findIssuer",Fh;(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"})(Fh||(Fh={}));var $m=class nH extends Error{static{o(this,"ChainValidationError")}constructor(e,t){super(t),this.name=nH.NAME,this.code=e,this.message=t}};$m.NAME="ChainValidationError";function h0e(r,e){for(let t=0;t<e.length;t++)if(vt.isEqual(r.tbsView,e[t].tbsView))return!0;return!1}o(h0e,"isTrusted");var sH=class iH{static{o(this,"CertificateChainValidationEngine")}constructor(e={}){this.trustedCerts=O(e,IB,this.defaultValues(IB)),this.certs=O(e,_B,this.defaultValues(_B)),this.crls=O(e,DB,this.defaultValues(DB)),this.ocsps=O(e,BB,this.defaultValues(BB)),this.checkDate=O(e,RB,this.defaultValues(RB)),this.findOrigin=O(e,OB,this.defaultValues(OB)),this.findIssuer=O(e,PB,this.defaultValues(PB))}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===WR&&l.parsedValue instanceof QR){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===dde&&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 IB:return[];case _B:return[];case DB:return[];case BB:return[];case RB:return new Date;case OB:return iH.defaultFindOrigin;case PB: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,S)=>{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"),h0e(v,this.trustedCerts))return[[v]];let _=await this.findIssuer(v,this,S);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],S);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 S=[],w=[],C=[];if(S.push(...n.filter(_=>v.issuer.isEqual(_.subject))),S.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<S.length;A++)try{if(await w[_].verify({issuerCertificate:S[A]},t)){C.push({crl:w[_],certificate:S[A]});break}}catch{}}return C.length?{status:0,statusMessage:V,result:C}:{status:3,statusMessage:"No valid CRLs found"}},"findCRL"),a=o(async(v,S)=>{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,S,t);if(b.isForCertificate)return b.status===0?0:1}return 2},"findOCSP");async function u(v,S=!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===mde){_=!0;let B=new Uint8Array(T.parsedValue.valueBlock.valueHex);(B[0]&4)===4&&(C=!0),(B[0]&2)===2&&(b=!0)}T.extnID===GR&&"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&&S&&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,S)=>{for(let w=0;w<v.length;w++)if(v[w].notBefore.value>S||v[w].notAfter.value<S)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 $m(Fh.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 C7:case XR:case zR:A=!0;break}if(A)throw new $m(Fh.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 S=0;S<n.length;S++)if(v!==S&&vt.isEqual(n[v].tbsView,n[S].tbsView)){n.splice(S,1),v=0;break}let l=n[n.length-1],h,m=[l];if(h=await s(l,t),h.length===0)throw new $m(Fh.noPath,"Unable to find certificate path");for(let v=h.length-1;v>=0;v--){let S=!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)){S=!0;break}if(S)break}S||h.splice(v,1)}if(h.length===0)throw new $m(Fh.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=Nl(c),m=Nl(l),g=h.split("."),y=m.split("."),v=g.length,S=y.length;if(v===0||S===0||v<S)return!1;for(let w=0;w<v;w++)if(g[w].length===0)return!1;for(let w=0;w<S;w++)if(y[w].length===0){if(w===0){if(S===1)return!1;continue}return!1}for(let w=0;w<S;w++)if(y[S-1-w].length!==0&&g[v-1-w].localeCompare(y[S-1-w])!==0)return!1;return!0}o(n,"compareDNSName");function s(c,l){let h=Nl(c),m=Nl(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 S=g[1].split("."),w=y[0].split(".");return w[0].length===0?!0:S.length===w.length}return!1}return h.localeCompare(m)===0}o(s,"compareRFC822Name");function i(c,l){let h=Nl(c),m=Nl(l),g=h.split("/");if(m.split("/").length>1)return!1;if(g.length>1){for(let S=0;S<g.length;S++)if(g[S].length>0&&g[S].charAt(g[S].length-1)!==":"){h=g[S].split(":")[0];break}}if(n(h,m)){let S=h.split("."),w=m.split(".");return w[0].length===0?!0:S.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||[Xi],h=e.initialExplicitPolicy||!1,m=e.initialPolicyMappingInhibit||!1,g=e.initialInhibitPolicy||!1,y=e.initialPermittedSubtreesSet||[],v=e.initialExcludedSubtreesSet||[],S=e.initialRequiredNameForms||[],w=h,C=m,_=g,b=[!1,!1,!1],A=0,T=0,B=0,M=y,I=v,H=S,K=1;this.certs=await this.sort(c,t);let q=[];q.push(Xi);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 Ee=0;Ee<Z.extensions.length;Ee++){let He=Z.extensions[Ee];if(He.extnID===N7){ue[ne]=He.parsedValue;for(let Le=0;Le<q.length;Le++)if(q[Le]===Xi){delete W[Le][ne];break}for(let Le=0;Le<He.parsedValue.certificatePolicies.length;Le++){let tt=-1,N=He.parsedValue.certificatePolicies[Le].policyIdentifier;for(let E=0;E<q.length;E++)if(N===q[E]){tt=E;break}if(tt===-1){q.push(N);let E=new Array(this.certs.length-1);E[ne]=!0,W.push(E)}else W[tt][ne]=!0}}if(He.extnID===T7){if(C)return{result:!1,resultCode:98,resultMessage:"Policy mapping prohibited"};pe[ne]=He.parsedValue}He.extnID===I7&&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===bde&&_===!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 Ee=-1;for(let He=0;He<q.length;He++)if(q[He]===Xi){Ee=He;break}Ee!==-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===Xi||pe[ne+1].mappings[Z].subjectDomainPolicy===Xi)return{result:!1,resultCode:99,resultMessage:'The "anyPolicy" should not be a part of policy mapping scheme'};let Ee=-1,He=-1;for(let Le=0;Le<q.length;Le++)q[Le]===pe[ne+1].mappings[Z].issuerDomainPolicy&&(Ee=Le),q[Le]===pe[ne+1].mappings[Z].subjectDomainPolicy&&(He=Le);typeof W[Ee][ne]<"u"&&delete W[Ee][ne];for(let Le=0;Le<ue[ne].certificatePolicies.length;Le++)if(pe[ne+1].mappings[Z].subjectDomainPolicy===ue[ne].certificatePolicies[Le].policyIdentifier&&Ee!==-1&&He!==-1)for(let tt=0;tt<=ne;tt++)typeof W[He][tt]<"u"&&(W[Ee][tt]=!0,delete W[He][tt])}for(let ne=0;ne<q.length;ne++)if(q[ne]===Xi)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 Ee=0;Ee<this.certs.length-1;Ee++){let He=!1;if(Ee<Y&&q[ne]===Xi&&q.length>1){Z=!1;break}if(typeof W[ne][Ee]>"u"){if(Ee>=Y){for(let Le=0;Le<q.length;Le++)if(q[Le]===Xi){W[Le][Ee]===!0&&(He=!0);break}}if(!He){Z=!1;break}}}Z===!0&&ve.push(q[ne])}let Oe=[];if(l.length===1&&l[0]===Xi&&w===!1)Oe=l;else if(ve.length===1&&ve[0]===Xi)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]===Xi){Oe.push(ve[ne]);break}let ze={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||ze.result===!1)return ze;K=1;for(let ne=this.certs.length-2;ne>=0;ne--,K++){let Z=this.certs[ne],Ee=[],He=[],Le=[];if(Z.extensions)for(let G=0;G<Z.extensions.length;G++){let P=Z.extensions[G];P.extnID===A7&&("permittedSubtrees"in P.parsedValue&&(He=He.concat(P.parsedValue.permittedSubtrees)),"excludedSubtrees"in P.parsedValue&&(Le=Le.concat(P.parsedValue.excludedSubtrees))),P.extnID===w7&&(Ee=Ee.concat(P.parsedValue.altNames))}let tt=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;tt=!0;for(let P=0;P<Z.subject.typesAndValues.length;P++)if(Z.subject.typesAndValues[P].type!==H[G].base.value.typesAndValues[P].type){tt=!1;break}if(tt===!0)break}break;default:}if(tt===!1)throw ze.result=!1,ze.resultCode=21,ze.resultMessage="No necessary name form found",ze;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,Se=!1,Ce=N[G];for(let Ae=0;Ae<Ce.length;Ae++){switch(G){case 0:if(Ee.length>0)for(let Ye=0;Ye<Ee.length;Ye++)Ee[Ye].type===1&&(Se=!0,P=P||s(Ee[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")&&(Se=!0,P=P||s(Z.subject.typesAndValues[Ye].value.valueBlock.value,Ce[Ae].base.value));break;case 1:if(Ee.length>0)for(let Ye=0;Ye<Ee.length;Ye++)Ee[Ye].type===2&&(Se=!0,P=P||n(Ee[Ye].value,Ce[Ae].base.value));break;case 2:Se=!0,P=u(Z.subject,Ce[Ae].base.value);break;case 3:if(Ee.length>0)for(let Ye=0;Ye<Ee.length;Ye++)Ee[Ye].type===6&&(Se=!0,P=P||i(Ee[Ye].value,Ce[Ae].base.value));break;case 4:if(Ee.length>0)for(let Ye=0;Ye<Ee.length;Ye++)Ee[Ye].type===7&&(Se=!0,P=P||a(Ee[Ye].value,Ce[Ae].base.value));break;default:}if(P)break}if(P===!1&&Ce.length>0&&Se)throw ze.result=!1,ze.resultCode=41,ze.resultMessage='Failed to meet "permitted sub-trees" name constraint',ze}let E=!1;for(let G=0;G<I.length;G++){switch(I[G].base.type){case 1:if(Ee.length>=0)for(let P=0;P<Ee.length;P++)Ee[P].type===1&&(E=E||s(Ee[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")&&(E=E||s(Z.subject.typesAndValues[P].value.valueBlock.value,I[G].base.value));break;case 2:if(Ee.length>0)for(let P=0;P<Ee.length;P++)Ee[P].type===2&&(E=E||n(Ee[P].value,I[G].base.value));break;case 4:E=E||u(Z.subject,I[G].base.value);break;case 6:if(Ee.length>0)for(let P=0;P<Ee.length;P++)Ee[P].type===6&&(E=E||i(Ee[P].value,I[G].base.value));break;case 7:if(Ee.length>0)for(let P=0;P<Ee.length;P++)Ee[P].type===7&&(E=E||a(Ee[P].value,I[G].base.value));break;default:}if(E)break}if(E===!0)throw ze.result=!1,ze.resultCode=42,ze.resultMessage='Failed to meet "excluded sub-trees" name constraint',ze;M=M.concat(He),I=I.concat(Le)}return ze}catch(c){return c instanceof Error?c instanceof $m?{result:!1,resultCode:c.code,resultMessage:c.message,error:c}:{result:!1,resultCode:Fh.unknown,resultMessage:c.message,error:c}:c&&typeof c=="object"&&"resultMessage"in c?c:{result:!1,resultCode:-1,resultMessage:`${c}`}}}},iC="tbsResponseData",ox="signatureAlgorithm",ux="signature",Gm="certs",jx="BasicOCSPResponse",IR=`${jx}.${iC}`,_R=`${jx}.${ox}`,DR=`${jx}.${ux}`,aC=`${jx}.${Gm}`,p0e=[IR,_R,DR,aC],Px=class Ch extends Re{static{o(this,"BasicOCSPResponse")}constructor(e={}){super(),this.tbsResponseData=O(e,iC,Ch.defaultValues(iC)),this.signatureAlgorithm=O(e,ox,Ch.defaultValues(ox)),this.signature=O(e,ux,Ch.defaultValues(ux)),Gm in e&&(this.certs=O(e,Gm,Ch.defaultValues(Gm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case iC:return new pu;case ox:return new we;case ux:return new Gt;case Gm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case"type":{let n=pu.compareWithDefault("tbs",t.tbs)&&pu.compareWithDefault("responderID",t.responderID)&&pu.compareWithDefault("producedAt",t.producedAt)&&pu.compareWithDefault("responses",t.responses);return"responseExtensions"in t&&(n=n&&pu.compareWithDefault("responseExtensions",t.responseExtensions)),n}case ox:return t.algorithmId===V&&!("algorithmParams"in t);case ux:return t.isEqual(Ch.defaultValues(e));case Gm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||jx,value:[pu.schema(t.tbsResponseData||{names:{blockName:IR}}),we.schema(t.signatureAlgorithm||{names:{blockName:_R}}),new Gt({name:t.signature||DR}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new J({value:[new Bt({name:aC,value:ms.schema(t.certs||{})})]})]})]})}fromSchema(e){ke(e,p0e);let t=Be(e,e,Ch.schema());Te.assertSchema(t,this.className),this.tbsResponseData=new pu({schema:t.result[IR]}),this.signatureAlgorithm=new we({schema:t.result[_R]}),this.signature=t.result[DR],aC in t.result&&(this.certs=Array.from(t.result[aC],n=>new ms({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 mi;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 Mr: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(Cc(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 z7(l,n);h&&a.push(h)}if(!(await new sH({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)}};Px.CLASS_NAME="BasicOCSPResponse";var kB="tbs",LB="version",VB="subject",UB="subjectPublicKeyInfo",Vd="attributes",cx="signatureAlgorithm",lx="signatureValue",A0="CertificationRequestInfo",oO=`${A0}.version`,uO=`${A0}.subject`,cO=`${A0}.subjectPublicKeyInfo`,GC=`${A0}.attributes`,d0e=[A0,oO,uO,cO,GC,cx,lx];function m0e(r={}){let e=O(r,"names",{});return new J({name:e.CertificationRequestInfo||A0,value:[new xe({name:e.CertificationRequestInfoVersion||oO}),Mr.schema(e.subject||{names:{blockName:uO}}),Ta.schema({names:{blockName:cO}}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({optional:!0,name:e.CertificationRequestInfoAttributes||GC,value:hn.schema(e.attributes||{})})]})]})}o(m0e,"CertificationRequestInfo");var g0e=class vo 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,kB,vo.defaultValues(kB))),this.version=O(e,LB,vo.defaultValues(LB)),this.subject=O(e,VB,vo.defaultValues(VB)),this.subjectPublicKeyInfo=O(e,UB,vo.defaultValues(UB)),Vd in e&&(this.attributes=O(e,Vd,vo.defaultValues(Vd))),this.signatureAlgorithm=O(e,cx,vo.defaultValues(cx)),this.signatureValue=O(e,lx,vo.defaultValues(lx)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case kB:return ln;case LB:return 0;case VB:return new Mr;case UB:return new Ta;case Vd:return[];case cx:return new we;case lx:return new Gt;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({value:[m0e(t.certificationRequestInfo||{}),new J({name:t.signatureAlgorithm||cx,value:[new ot,new bt({optional:!0})]}),new Gt({name:t.signatureValue||lx})]})}fromSchema(e){ke(e,d0e);let t=Be(e,e,vo.schema());Te.assertSchema(t,this.className),this.tbsView=t.result.CertificationRequestInfo.valueBeforeDecodeView,this.version=t.result[oO].valueBlock.valueDec,this.subject=new Mr({schema:t.result[uO]}),this.subjectPublicKeyInfo=new Ta({schema:t.result[cO]}),GC in t.result&&(this.attributes=Array.from(t.result[GC],n=>new hn({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 Vd 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 vo.schema();let n=Qr(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 Vd 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 Nh="digestAlgorithm",Th="digest",v0e=[Nh,Th],Mh=class fx extends Re{static{o(this,"DigestInfo")}constructor(e={}){super(),this.digestAlgorithm=O(e,Nh,fx.defaultValues(Nh)),this.digest=O(e,Th,fx.defaultValues(Th)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nh:return new we;case Th:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Nh:return we.compareWithDefault("algorithmId",t.algorithmId)&&!("algorithmParams"in t);case Th:return t.isEqual(fx.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:Nh}}),new qe({name:t.digest||Th})]})}fromSchema(e){ke(e,v0e);let t=Be(e,e,fx.schema({names:{digestAlgorithm:{names:{blockName:Nh}},digest:Th}}));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()}}};Mh.CLASS_NAME="DigestInfo";var Xm="eContentType",Aa="eContent",y0e=[Xm,Aa],qh=class Ih extends Re{static{o(this,"EncapsulatedContentInfo")}constructor(e={}){if(super(),this.eContentType=O(e,Xm,Ih.defaultValues(Xm)),Aa in e&&(this.eContent=O(e,Aa,Ih.defaultValues(Aa)),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 Xm:return V;case Aa:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Xm:return t===V;case Aa:return t.idBlock.tagClass===1&&t.idBlock.tagNumber===4?t.isEqual(Ih.defaultValues(Aa)):!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,y0e);let t=Be(e,e,Ih.schema({names:{eContentType:Xm,eContent:Aa}}));Te.assertSchema(t,this.className),this.eContentType=t.result.eContentType.valueBlock.toString(),Aa in t.result&&(this.eContent=t.result.eContent)}toSchema(){let e=[];return e.push(new ot({value:this.eContentType})),this.eContent&&Ih.compareWithDefault(Aa,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&&Ih.compareWithDefault(Aa,this.eContent)===!1&&(e.eContent=this.eContent.toJSON()),e}};qh.CLASS_NAME="EncapsulatedContentInfo";var _h="mac",Dh="macSalt",du="iterations",x0e=[_h,Dh,du],xl=class Bh extends Re{static{o(this,"MacData")}constructor(e={}){super(),this.mac=O(e,_h,Bh.defaultValues(_h)),this.macSalt=O(e,Dh,Bh.defaultValues(Dh)),du in e&&(this.iterations=O(e,du,Bh.defaultValues(du))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _h:return new Mh;case Dh:return new qe;case du:return 1;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case _h:return Mh.compareWithDefault("digestAlgorithm",t.digestAlgorithm)&&Mh.compareWithDefault("digest",t.digest);case Dh:return t.isEqual(Bh.defaultValues(e));case du:return t===Bh.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:[Mh.schema(t.mac||{names:{blockName:_h}}),new qe({name:t.macSalt||Dh}),new xe({optional:!0,name:t.iterations||du})]})}fromSchema(e){ke(e,x0e);let t=Be(e,e,Bh.schema({names:{mac:{names:{blockName:_h}},macSalt:Dh,iterations:du}}));Te.assertSchema(t,this.className),this.mac=new Mh({schema:t.result.mac}),this.macSalt=t.result.macSalt,du 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}};xl.CLASS_NAME="MacData";var Hh="hashAlgorithm",Kh="hashedMessage",w0e=[Hh,Kh],Na=class Wm 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 Wm({hashAlgorithm:new we({algorithmId:s,algorithmParams:new Zr}),hashedMessage:new qe({valueHex:i})})}constructor(e={}){super(),this.hashAlgorithm=O(e,Hh,Wm.defaultValues(Hh)),this.hashedMessage=O(e,Kh,Wm.defaultValues(Kh)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Hh:return new we;case Kh:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Hh:return t.algorithmId===V&&!("algorithmParams"in t);case Kh:return t.isEqual(Wm.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,w0e);let t=Be(e,e,Wm.schema({names:{hashAlgorithm:{names:{blockName:Hh}},hashedMessage:Kh}}));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()}}};Na.CLASS_NAME="MessageImprint";var zm="reqCert",wl="singleRequestExtensions",S0e=[zm,wl],XC=class hx extends Re{static{o(this,"Request")}constructor(e={}){super(),this.reqCert=O(e,zm,hx.defaultValues(zm)),wl in e&&(this.singleRequestExtensions=O(e,wl,hx.defaultValues(wl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case zm:return new mi;case wl:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case zm:return t.isEqual(hx.defaultValues(e));case wl: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:[mi.schema(t.reqCert||{}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Bn.schema(t.extensions||{names:{blockName:t.singleRequestExtensions||V}})]})]})}fromSchema(e){ke(e,S0e);let t=Be(e,e,hx.schema({names:{reqCert:{names:{blockName:zm}},extensions:{names:{blockName:wl}}}}));Te.assertSchema(t,this.className),this.reqCert=new mi({schema:t.result.reqCert}),wl in t.result&&(this.singleRequestExtensions=Array.from(t.result.singleRequestExtensions.valueBlock.value,n=>new Yi({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}};XC.CLASS_NAME="Request";var fA="tbs",Jm="version",Ym="requestorName",hA="requestList",Qm="requestExtensions",C0="TBSRequest",oC=`${C0}.${Jm}`,uC=`${C0}.${Ym}`,BR=`${C0}.requests`,cC=`${C0}.${Qm}`,E0e=[C0,oC,uC,BR,cC],mu=class gu 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,fA,gu.defaultValues(fA))),Jm in e&&(this.version=O(e,Jm,gu.defaultValues(Jm))),Ym in e&&(this.requestorName=O(e,Ym,gu.defaultValues(Ym))),this.requestList=O(e,hA,gu.defaultValues(hA)),Qm in e&&(this.requestExtensions=O(e,Qm,gu.defaultValues(Qm))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case fA:return ln;case Jm:return 0;case Ym:return new Ir;case hA:case Qm:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case fA:return t.byteLength===0;case Jm:return t===gu.defaultValues(e);case Ym:return t.type===Ir.defaultValues("type")&&Object.keys(t.value).length===0;case hA:case Qm:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||C0,value:[new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new xe({name:t.TBSRequestVersion||oC})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[Ir.schema(t.requestorName||{names:{blockName:uC}})]}),new J({name:t.requestList||"TBSRequest.requestList",value:[new Bt({name:t.requests||BR,value:XC.schema(t.requestNames||{})})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:2},value:[Bn.schema(t.extensions||{names:{blockName:t.requestExtensions||cC}})]})]})}fromSchema(e){ke(e,E0e);let t=Be(e,e,gu.schema());Te.assertSchema(t,this.className),this.tbsView=t.result.TBSRequest.valueBeforeDecodeView,oC in t.result&&(this.version=t.result[oC].valueBlock.valueDec),uC in t.result&&(this.requestorName=new Ir({schema:t.result[uC]})),this.requestList=Array.from(t.result[BR],n=>new XC({schema:n})),cC in t.result&&(this.requestExtensions=Array.from(t.result[cC].valueBlock.value,n=>new Yi({schema:n})))}toSchema(e=!1){let t;if(e===!1){if(this.tbsView.byteLength===0)return gu.schema();let n=Qr(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}};mu.CLASS_NAME="TBSRequest";var Ud="signatureAlgorithm",jd="signature",Pc="certs",Rh=class Zm extends Re{static{o(this,"Signature")}constructor(e={}){super(),this.signatureAlgorithm=O(e,Ud,Zm.defaultValues(Ud)),this.signature=O(e,jd,Zm.defaultValues(jd)),Pc in e&&(this.certs=O(e,Pc,Zm.defaultValues(Pc))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Ud:return new we;case jd:return new Gt;case Pc:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Ud:return t.algorithmId===V&&!("algorithmParams"in t);case jd:return t.isEqual(Zm.defaultValues(e));case Pc: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:ms.schema({})})]})]})]})}fromSchema(e){ke(e,[Ud,jd,Pc]);let t=Be(e,e,Zm.schema({names:{signatureAlgorithm:{names:{blockName:Ud}},signature:jd,certs:Pc}}));Te.assertSchema(t,this.className),this.signatureAlgorithm=new we({schema:t.result.signatureAlgorithm}),this.signature=t.result.signature,Pc in t.result&&(this.certs=Array.from(t.result.certs,n=>new ms({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}};Rh.CLASS_NAME="Signature";var e0="tbsRequest",Sl="optionalSignature",b0e=[e0,Sl],A0e=class lC extends Re{static{o(this,"OCSPRequest")}constructor(e={}){super(),this.tbsRequest=O(e,e0,lC.defaultValues(e0)),Sl in e&&(this.optionalSignature=O(e,Sl,lC.defaultValues(Sl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case e0:return new mu;case Sl:return new Rh;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case e0:return mu.compareWithDefault("tbs",t.tbs)&&mu.compareWithDefault("version",t.version)&&mu.compareWithDefault("requestorName",t.requestorName)&&mu.compareWithDefault("requestList",t.requestList)&&mu.compareWithDefault("requestExtensions",t.requestExtensions);case Sl:return Rh.compareWithDefault("signatureAlgorithm",t.signatureAlgorithm)&&Rh.compareWithDefault("signature",t.signature)&&Rh.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:[mu.schema(t.tbsRequest||{names:{blockName:e0}}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Rh.schema(t.optionalSignature||{names:{blockName:Sl}})]})]})}fromSchema(e){ke(e,b0e);let t=Be(e,e,lC.schema());Te.assertSchema(t,this.className),this.tbsRequest=new mu({schema:t.result.tbsRequest}),Sl in t.result&&(this.optionalSignature=new Rh({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 mi;await s.createForCertificate(e,t,n),this.tbsRequest.requestList.push(new XC({reqCert:s}))}async sign(e,t="SHA-1",n=kt(!0)){if(mr.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(){}};A0e.CLASS_NAME="OCSPRequest";var t0="responseType",r0="response",C0e=[t0,r0],n0=class px extends Re{static{o(this,"ResponseBytes")}constructor(e={}){super(),this.responseType=O(e,t0,px.defaultValues(t0)),this.response=O(e,r0,px.defaultValues(r0)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case t0:return V;case r0:return new qe;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case t0:return t===V;case r0:return t.isEqual(px.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,C0e);let t=Be(e,e,px.schema({names:{responseType:t0,response:r0}}));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()}}};n0.CLASS_NAME="ResponseBytes";var Fd="responseStatus",tu="responseBytes",N0e=class dx extends Re{static{o(this,"OCSPResponse")}constructor(e={}){super(),this.responseStatus=O(e,Fd,dx.defaultValues(Fd)),tu in e&&(this.responseBytes=O(e,tu,dx.defaultValues(tu))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Fd:return new Tc;case tu:return new n0;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Fd:return t.isEqual(dx.defaultValues(e));case tu:return n0.compareWithDefault("responseType",t.responseType)&&n0.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 Tc({name:t.responseStatus||Fd}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[n0.schema(t.responseBytes||{names:{blockName:tu}})]})]})}fromSchema(e){ke(e,[Fd,tu]);let t=Be(e,e,dx.schema());Te.assertSchema(t,this.className),this.responseStatus=t.result.responseStatus,tu in t.result&&(this.responseBytes=new n0({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!==yA)return i;try{let a=Qr(this.responseBytes.response.valueBlock.valueHexView);Te.assert(a,"Basic OCSP response"),s=new Px({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===yA)return Px.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(!(tu in this))throw new Error("Empty ResponseBytes field");if(this.responseBytes&&this.responseBytes.responseType===yA){let s=Px.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"}`)}};N0e.CLASS_NAME="OCSPResponse";var _f="type",vu="attributes",pA="encodedValue",T0e=[vu],ei=class yo extends Re{static{o(this,"SignedAndUnsignedAttributes")}constructor(e={}){super(),this.type=O(e,_f,yo.defaultValues(_f)),this.attributes=O(e,vu,yo.defaultValues(vu)),this.encodedValue=O(e,pA,yo.defaultValues(pA)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case _f:return-1;case vu:return[];case pA:return ln;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case _f:return t===yo.defaultValues(_f);case vu:return t.length===0;case pA: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:hn.schema()})]})}fromSchema(e){ke(e,T0e);let t=Be(e,e,yo.schema({names:{tagNumber:this.type,attributes:vu}}));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,!(vu in t.result)){if(this.type===0)throw new Error("Wrong structure of SignedUnsignedAttributes");return}this.attributes=Array.from(t.result.attributes,s=>new hn({schema:s}))}toSchema(){if(yo.compareWithDefault(_f,this.type)||yo.compareWithDefault(vu,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(yo.compareWithDefault(_f,this.type)||yo.compareWithDefault(vu,this.attributes))throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class');return{type:this.type,attributes:Array.from(this.attributes,e=>e.toJSON())}}};ei.CLASS_NAME="SignedAndUnsignedAttributes";var s0="version",Oh="sid",i0="digestAlgorithm",El="signedAttrs",a0="signatureAlgorithm",mx="signature",bl="unsignedAttrs",_l="SignerInfo",RR=`${_l}.${s0}`,gx=`${_l}.${Oh}`,OR=`${_l}.${i0}`,fC=`${_l}.${El}`,PR=`${_l}.${a0}`,kR=`${_l}.${mx}`,hC=`${_l}.${bl}`,I0e=[RR,gx,OR,fC,PR,kR,hC],WC=class Hn extends Re{static{o(this,"SignerInfo")}constructor(e={}){super(),this.version=O(e,s0,Hn.defaultValues(s0)),this.sid=O(e,Oh,Hn.defaultValues(Oh)),this.digestAlgorithm=O(e,i0,Hn.defaultValues(i0)),El in e&&(this.signedAttrs=O(e,El,Hn.defaultValues(El))),this.signatureAlgorithm=O(e,a0,Hn.defaultValues(a0)),this.signature=O(e,mx,Hn.defaultValues(mx)),bl in e&&(this.unsignedAttrs=O(e,bl,Hn.defaultValues(bl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case s0:return 0;case Oh:return new bt;case i0:return new we;case El:return new ei({type:0});case a0:return new we;case mx:return new qe;case bl:return new ei({type:1});default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case s0:return Hn.defaultValues(s0)===t;case Oh:return t instanceof bt;case i0:return t instanceof we?t.isEqual(Hn.defaultValues(i0)):!1;case El:return ei.compareWithDefault("type",t.type)&&ei.compareWithDefault("attributes",t.attributes)&&ei.compareWithDefault("encodedValue",t.encodedValue);case a0:return t instanceof we?t.isEqual(Hn.defaultValues(a0)):!1;case mx:case bl:return ei.compareWithDefault("type",t.type)&&ei.compareWithDefault("attributes",t.attributes)&&ei.compareWithDefault("encodedValue",t.encodedValue);default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:_l,value:[new xe({name:t.version||RR}),new Fr({value:[rs.schema(t.sidSchema||{names:{blockName:gx}}),new Fr({value:[new fe({optional:!0,name:t.sid||gx,idBlock:{tagClass:3,tagNumber:0},value:[new qe]}),new xt({optional:!0,name:t.sid||gx,idBlock:{tagClass:3,tagNumber:0}})]})]}),we.schema(t.digestAlgorithm||{names:{blockName:OR}}),ei.schema(t.signedAttrs||{names:{blockName:fC,tagNumber:0}}),we.schema(t.signatureAlgorithm||{names:{blockName:PR}}),new qe({name:t.signature||kR}),ei.schema(t.unsignedAttrs||{names:{blockName:hC,tagNumber:1}})]})}fromSchema(e){ke(e,I0e);let t=Be(e,e,Hn.schema());Te.assertSchema(t,this.className),this.version=t.result[RR].valueBlock.valueDec;let n=t.result[gx];n.idBlock.tagClass===1?this.sid=new rs({schema:n}):this.sid=n,this.digestAlgorithm=new we({schema:t.result[OR]}),fC in t.result&&(this.signedAttrs=new ei({type:0,schema:t.result[fC]})),this.signatureAlgorithm=new we({schema:t.result[PR]}),this.signature=t.result[kR],hC in t.result&&(this.unsignedAttrs=new ei({type:1,schema:t.result[hC]}))}toSchema(){if(Hn.compareWithDefault(Oh,this.sid))throw new Error('Incorrectly initialized "SignerInfo" class');let e=[];return e.push(new xe({value:this.version})),this.sid instanceof rs?e.push(this.sid.toSchema()):e.push(this.sid),e.push(this.digestAlgorithm.toSchema()),this.signedAttrs&&Hn.compareWithDefault(El,this.signedAttrs)===!1&&e.push(this.signedAttrs.toSchema()),e.push(this.signatureAlgorithm.toSchema()),e.push(this.signature),this.unsignedAttrs&&Hn.compareWithDefault(bl,this.unsignedAttrs)===!1&&e.push(this.unsignedAttrs.toSchema()),new J({value:e})}toJSON(){if(Hn.compareWithDefault(Oh,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&&Hn.compareWithDefault(El,this.signedAttrs)===!1&&(e.signedAttrs=this.signedAttrs.toJSON()),this.unsignedAttrs&&Hn.compareWithDefault(bl,this.unsignedAttrs)===!1&&(e.unsignedAttrs=this.unsignedAttrs.toJSON()),e}};WC.CLASS_NAME="SignerInfo";var vx="version",yx="policy",xx="messageImprint",wx="serialNumber",Sx="genTime",Ph="ordering",kh="nonce",o0="accuracy",u0="tsa",c0="extensions",Ia="TSTInfo",LR=`${Ia}.${vx}`,VR=`${Ia}.${yx}`,UR=`${Ia}.${xx}`,jR=`${Ia}.${wx}`,FR=`${Ia}.${Sx}`,pC=`${Ia}.${o0}`,dC=`${Ia}.${Ph}`,mC=`${Ia}.${kh}`,gC=`${Ia}.${u0}`,vC=`${Ia}.${c0}`,_0e=[LR,VR,UR,jR,FR,pC,dC,mC,gC,vC],aH=class Zs extends Re{static{o(this,"TSTInfo")}constructor(e={}){super(),this.version=O(e,vx,Zs.defaultValues(vx)),this.policy=O(e,yx,Zs.defaultValues(yx)),this.messageImprint=O(e,xx,Zs.defaultValues(xx)),this.serialNumber=O(e,wx,Zs.defaultValues(wx)),this.genTime=O(e,Sx,Zs.defaultValues(Sx)),o0 in e&&(this.accuracy=O(e,o0,Zs.defaultValues(o0))),Ph in e&&(this.ordering=O(e,Ph,Zs.defaultValues(Ph))),kh in e&&(this.nonce=O(e,kh,Zs.defaultValues(kh))),u0 in e&&(this.tsa=O(e,u0,Zs.defaultValues(u0))),c0 in e&&(this.extensions=O(e,c0,Zs.defaultValues(c0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case vx:return 0;case yx:return V;case xx:return new Na;case wx:return new xe;case Sx:return new Date(0,0,0);case o0:return new Df;case Ph:return!1;case kh:return new xe;case u0:return new Ir;case c0:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case vx:case yx:case Sx:case Ph:return t===Zs.defaultValues(Ph);case xx:return Na.compareWithDefault(Hh,t.hashAlgorithm)&&Na.compareWithDefault(Kh,t.hashedMessage);case wx:case kh:return t.isEqual(Zs.defaultValues(kh));case o0:return Df.compareWithDefault(kc,t.seconds)&&Df.compareWithDefault(Lc,t.millis)&&Df.compareWithDefault(Vc,t.micros);case u0:return Ir.compareWithDefault(a1,t.type)&&Ir.compareWithDefault(o1,t.value);case c0:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||Ia,value:[new xe({name:t.version||LR}),new ot({name:t.policy||VR}),Na.schema(t.messageImprint||{names:{blockName:UR}}),new xe({name:t.serialNumber||jR}),new jr({name:t.genTime||FR}),Df.schema(t.accuracy||{names:{blockName:pC}}),new ya({name:t.ordering||dC,optional:!0}),new xe({name:t.nonce||mC,optional:!0}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[Ir.schema(t.tsa||{names:{blockName:gC}})]}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:[new Bt({name:t.extensions||vC,value:Yi.schema(t.extension||{})})]})]})}fromSchema(e){ke(e,_0e);let t=Be(e,e,Zs.schema());Te.assertSchema(t,this.className),this.version=t.result[LR].valueBlock.valueDec,this.policy=t.result[VR].valueBlock.toString(),this.messageImprint=new Na({schema:t.result[UR]}),this.serialNumber=t.result[jR],this.genTime=t.result[FR].toDate(),pC in t.result&&(this.accuracy=new Df({schema:t.result[pC]})),dC in t.result&&(this.ordering=t.result[dC].valueBlock.value),mC in t.result&&(this.nonce=t.result[mC]),gC in t.result&&(this.tsa=new Ir({schema:t.result[gC]})),vC in t.result&&(this.extensions=Array.from(t.result[vC],n=>new Yi({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 jr({valueDate:this.genTime})),this.accuracy&&e.push(this.accuracy.toSchema()),this.ordering!==void 0&&e.push(new ya({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)}};aH.CLASS_NAME="TSTInfo";var l0="version",Ex="digestAlgorithms",bx="encapContentInfo",f0="certificates",h0="crls",Ax="signerInfos",r1="ocsps",Jh="SignedData",MR=`${Jh}.${l0}`,yC=`${Jh}.${Ex}`,qR=`${Jh}.${bx}`,xC=`${Jh}.${f0}`,wC=`${Jh}.${h0}`,SC=`${Jh}.${Ax}`,D0e=[MR,yC,qR,xC,wC,SC],hs=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}},b0=class Ca extends Re{static{o(this,"SignedData")}constructor(e={}){super(),this.version=O(e,l0,Ca.defaultValues(l0)),this.digestAlgorithms=O(e,Ex,Ca.defaultValues(Ex)),this.encapContentInfo=O(e,bx,Ca.defaultValues(bx)),f0 in e&&(this.certificates=O(e,f0,Ca.defaultValues(f0))),h0 in e&&(this.crls=O(e,h0,Ca.defaultValues(h0))),r1 in e&&(this.ocsps=O(e,r1,Ca.defaultValues(r1))),this.signerInfos=O(e,Ax,Ca.defaultValues(Ax)),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case l0:return 0;case Ex:return[];case bx:return new qh;case f0:return[];case h0:return[];case r1:return[];case Ax:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case l0:return t===Ca.defaultValues(l0);case bx:return qh.compareWithDefault("eContentType",t.eContentType)&&qh.compareWithDefault("eContent",t.eContent);case Ex:case f0:case h0:case r1:case Ax: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||Jh,optional:t.optional,value:[new xe({name:t.version||MR}),new en({value:[new Bt({name:t.digestAlgorithms||yC,value:we.schema()})]}),qh.schema(t.encapContentInfo||{names:{blockName:qR}}),new fe({name:t.certificates||xC,optional:!0,idBlock:{tagClass:3,tagNumber:0},value:Xh.schema().valueBlock.value}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:1},value:Dx.schema(t.crls||{names:{crls:wC}}).valueBlock.value}),new en({value:[new Bt({name:t.signerInfos||SC,value:WC.schema()})]})]})}fromSchema(e){ke(e,D0e);let t=Be(e,e,Ca.schema());if(Te.assertSchema(t,this.className),this.version=t.result[MR].valueBlock.valueDec,yC in t.result&&(this.digestAlgorithms=Array.from(t.result[yC],n=>new we({schema:n}))),this.encapContentInfo=new qh({schema:t.result[qR]}),xC in t.result){let n=new Xh({schema:new en({value:t.result[xC].valueBlock.value})});this.certificates=n.certificates.slice(0)}wC in t.result&&(this.crls=Array.from(t.result[wC],n=>n.idBlock.tagClass===1?new Vx({schema:n}):(n.idBlock.tagClass=1,n.idBlock.tagNumber=16,new _x({schema:n})))),SC in t.result&&(this.signerInfos=Array.from(t.result[SC],n=>new WC({schema:n})))}toSchema(e=!1){let t=[];if(this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof $A)||this.crls&&this.crls.length&&this.crls.some(n=>n instanceof _x)?this.version=5:this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof Tl)?this.version=4:this.certificates&&this.certificates.length&&this.certificates.some(n=>n instanceof _C)||this.signerInfos.some(n=>n.version===3)||this.encapContentInfo.eContentType!==Ca.ID_DATA?this.version=3:this.version=1,t.push(new xe({value:this.version})),t.push(new en({value:Array.from(this.digestAlgorithms,n=>n.toSchema())})),t.push(this.encapContentInfo.toSchema()),this.certificates){let s=new Xh({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 _x){let s=n.toSchema();return s.idBlock.tagClass=3,s.idBlock.tagNumber=1,s}return n.toSchema(e)})})),t.push(new en({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=ln,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=ln,v=V,S=[],w=this.signerInfos[e];if(!w)throw new hs({date:s,code:1,message:"Unable to get signer by supplied index"});if(!this.certificates)throw new hs({date:s,code:2,message:"No certificates attached to this signed data"});if(w.sid instanceof rs){for(let A of this.certificates)if(A instanceof ms&&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 ms))continue;let M=await h.digest({name:"sha-1"},B.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView);if(Cc(M,T)){m=B;break}}}if(!m)throw new hs({date:s,code:3,message:"Unable to find signer certificate"});if(this.encapContentInfo.eContentType===_de){if(!this.encapContentInfo.eContent)throw new hs({date:s,code:15,message:"Error during verification: TSTInfo eContent is empty",signatureVerified:null,signerCertificate:m,timestampSerial:g,signerCertificateVerified:!0});let A;try{A=aH.fromBER(this.encapContentInfo.eContent.valueBlock.valueHexView)}catch{throw new hs({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 hs({date:s,code:4,message:"Missed detached data input array"});if(!await A.verify({data:t},h))throw new hs({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 ms&&!!z7(I,m)),T={checkDate:s,certs:A,trustedCerts:n};l&&(T.findIssuer=l),c&&(T.findOrigin=c);let B=new sH(T);if(B.certs.push(m),this.crls)for(let I of this.crls)"thisUpdate"in I?B.crls.push(I):I.otherRevInfoFormat===yA&&B.ocsps.push(new Px({schema:I.otherRevInfo}));this.ocsps&&B.ocsps.push(...this.ocsps);let M=await B.verify({passedWhenNotRevValues:a},h).catch(I=>{throw new hs({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&&(S=M.certificatePath),!M.result)throw new hs({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 hs({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 hs({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 hs({date:s,code:9,message:'Attribute "content-type" is a mandatory attribute for "signed attributes"',signerCertificate:m,signerCertificateVerified:!0});if(T===!1)throw new hs({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(!Cc(A,y))throw new hs({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:S}:b}catch(y){throw y instanceof hs?y:new hs({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=ln,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 Zr})),u.digestAlgorithm=new we({algorithmId:c,algorithmParams:new Zr});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})}};b0.CLASS_NAME="SignedData";b0.ID_DATA=JR;var Lh="version",Vh="authSafe",yu="macData",n1="parsedValue",B0e=[Lh,Vh,yu],R0e=class Uh extends Re{static{o(this,"PFX")}constructor(e={}){super(),this.version=O(e,Lh,Uh.defaultValues(Lh)),this.authSafe=O(e,Vh,Uh.defaultValues(Vh)),yu in e&&(this.macData=O(e,yu,Uh.defaultValues(yu))),n1 in e&&(this.parsedValue=O(e,n1,Uh.defaultValues(n1))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Lh:return 3;case Vh:return new rn;case yu:return new xl;case n1:return{};default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Lh:return t===Uh.defaultValues(e);case Vh:return rn.compareWithDefault("contentType",t.contentType)&&rn.compareWithDefault("content",t.content);case yu:return xl.compareWithDefault("mac",t.mac)&&xl.compareWithDefault("macSalt",t.macSalt)&&xl.compareWithDefault("iterations",t.iterations);case n1: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||Lh}),rn.schema(t.authSafe||{names:{blockName:Vh}}),xl.schema(t.macData||{names:{blockName:yu,optional:!0}})]})}fromSchema(e){ke(e,B0e);let t=Be(e,e,Uh.schema({names:{version:Lh,authSafe:{names:{blockName:Vh}},macData:{names:{blockName:yu}}}}));Te.assertSchema(t,this.className),this.version=t.result.version.valueBlock.valueDec,this.authSafe=new rn({schema:t.result.authSafe}),yu in t.result&&(this.macData=new xl({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(Tr.assert(e,"parameters","object"),!this.parsedValue)throw new Error('Please call "parseValues" function first in order to make "parsedValue" data');switch(mr.assertEmpty(this.parsedValue.integrityMode,"integrityMode","parsedValue"),mr.assertEmpty(this.parsedValue.authenticatedSafe,"authenticatedSafe","parsedValue"),this.parsedValue.integrityMode){case 0:{if(!("iterations"in e))throw new mr("iterations");mr.assertEmpty(e.pbkdf2HashAlgorithm,"pbkdf2HashAlgorithm"),mr.assertEmpty(e.hmacHashAlgorithm,"hmacHashAlgorithm"),mr.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 rn({contentType:rn.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 xl({mac:new Mh({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 mr("signingCertificate");mr.assertEmpty(e.privateKey,"privateKey"),mr.assertEmpty(e.hashAlgorithm,"hashAlgorithm");let n=this.parsedValue.authenticatedSafe.toSchema().toBER(!1),s=new b0({version:1,encapContentInfo:new qh({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 hn({type:"1.2.840.113549.1.9.3",values:[new ot({value:"1.2.840.113549.1.7.1"})]})),a.push(new hn({type:"1.2.840.113549.1.9.5",values:[new Af({valueDate:new Date})]})),a.push(new hn({type:"1.2.840.113549.1.9.4",values:[new qe({valueHex:i})]})),s.signerInfos.push(new WC({version:1,sid:new rs({issuer:e.signingCertificate.issuer,serialNumber:e.signingCertificate.serialNumber}),signedAttrs:new ei({type:0,attributes:a})})),await s.sign(e.privateKey,0,e.hashAlgorithm,void 0,t),this.authSafe=new rn({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(Tr.assert(e,"parameters","object"),e.checkIntegrity===void 0&&(e.checkIntegrity=!0),this.parsedValue={},this.authSafe.contentType){case rn.DATA:{mr.assertEmpty(e.password,"password"),this.parsedValue.integrityMode=0,Tr.assert(this.authSafe.content,"authSafe.content",qe);let n=this.authSafe.content.getValue();if(this.parsedValue.authenticatedSafe=AR.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 rn.SIGNED_DATA:{this.parsedValue.integrityMode=1;let n=new b0({schema:this.authSafe.content}),s=n.encapContentInfo.eContent;mr.assert(s,"eContent","cmsSigned.encapContentInfo"),Tr.assert(s,"eContent",qe);let i=s.getValue();if(this.parsedValue.authenticatedSafe=AR.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}`)}}};R0e.CLASS_NAME="PFX";var p0="status",Al="statusStrings",Cl="failInfo",O0e=[p0,Al,Cl],v7;(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"})(v7||(v7={}));var Cx=class jh extends Re{static{o(this,"PKIStatusInfo")}constructor(e={}){super(),this.status=O(e,p0,jh.defaultValues(p0)),Al in e&&(this.statusStrings=O(e,Al,jh.defaultValues(Al))),Cl in e&&(this.failInfo=O(e,Cl,jh.defaultValues(Cl))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case p0:return 2;case Al:return[];case Cl:return new Gt;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case p0:return t===jh.defaultValues(e);case Al:return t.length===0;case Cl:return t.isEqual(jh.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 $i})]}),new Gt({name:t.failInfo||V,optional:!0})]})}fromSchema(e){ke(e,O0e);let t=Be(e,e,jh.schema({names:{status:p0,statusStrings:Al,failInfo:Cl}}));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,Al in t.result&&(this.statusStrings=t.result.statusStrings),Cl 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}};Cx.CLASS_NAME="PKIStatusInfo";var Nx="version",Tx="messageImprint",d0="reqPolicy",m0="nonce",xu="certReq",g0="extensions",Yh="TimeStampReq",HR=`${Yh}.${Nx}`,KR=`${Yh}.${Tx}`,EC=`${Yh}.${d0}`,bC=`${Yh}.${m0}`,AC=`${Yh}.${xu}`,CC=`${Yh}.${g0}`,P0e=[HR,KR,EC,bC,AC,CC],k0e=class Ji extends Re{static{o(this,"TimeStampReq")}constructor(e={}){super(),this.version=O(e,Nx,Ji.defaultValues(Nx)),this.messageImprint=O(e,Tx,Ji.defaultValues(Tx)),d0 in e&&(this.reqPolicy=O(e,d0,Ji.defaultValues(d0))),m0 in e&&(this.nonce=O(e,m0,Ji.defaultValues(m0))),xu in e&&(this.certReq=O(e,xu,Ji.defaultValues(xu))),g0 in e&&(this.extensions=O(e,g0,Ji.defaultValues(g0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case Nx:return 0;case Tx:return new Na;case d0:return V;case m0:return new xe;case xu:return!1;case g0:return[];default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case Nx:case d0:case xu:return t===Ji.defaultValues(e);case Tx:return Na.compareWithDefault("hashAlgorithm",t.hashAlgorithm)&&Na.compareWithDefault("hashedMessage",t.hashedMessage);case m0:return t.isEqual(Ji.defaultValues(e));case g0:return t.length===0;default:return super.defaultValues(e)}}static schema(e={}){let t=O(e,"names",{});return new J({name:t.blockName||Yh,value:[new xe({name:t.version||HR}),Na.schema(t.messageImprint||{names:{blockName:KR}}),new ot({name:t.reqPolicy||EC,optional:!0}),new xe({name:t.nonce||bC,optional:!0}),new ya({name:t.certReq||AC,optional:!0}),new fe({optional:!0,idBlock:{tagClass:3,tagNumber:0},value:[new Bt({name:t.extensions||CC,value:Yi.schema()})]})]})}fromSchema(e){ke(e,P0e);let t=Be(e,e,Ji.schema());Te.assertSchema(t,this.className),this.version=t.result[HR].valueBlock.valueDec,this.messageImprint=new Na({schema:t.result[KR]}),EC in t.result&&(this.reqPolicy=t.result[EC].valueBlock.toString()),bC in t.result&&(this.nonce=t.result[bC]),AC in t.result&&(this.certReq=t.result[AC].valueBlock.value),CC in t.result&&(this.extensions=Array.from(t.result[CC],n=>new Yi({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),xu in this&&Ji.compareWithDefault(xu,this.certReq)===!1&&e.push(new ya({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&&Ji.compareWithDefault(xu,this.certReq)===!1&&(e.certReq=this.certReq),this.extensions&&(e.extensions=Array.from(this.extensions,t=>t.toJSON())),e}};k0e.CLASS_NAME="TimeStampReq";var v0="status",y0="timeStampToken",lO="TimeStampResp",$R=`${lO}.${v0}`,NC=`${lO}.${y0}`,L0e=[$R,NC],V0e=class TC extends Re{static{o(this,"TimeStampResp")}constructor(e={}){super(),this.status=O(e,v0,TC.defaultValues(v0)),y0 in e&&(this.timeStampToken=O(e,y0,TC.defaultValues(y0))),e.schema&&this.fromSchema(e.schema)}static defaultValues(e){switch(e){case v0:return new Cx;case y0:return new rn;default:return super.defaultValues(e)}}static compareWithDefault(e,t){switch(e){case v0:return Cx.compareWithDefault(v0,t.status)&&!("statusStrings"in t)&&!("failInfo"in t);case y0: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||lO,value:[Cx.schema(t.status||{names:{blockName:$R}}),rn.schema(t.timeStampToken||{names:{blockName:NC,optional:!0}})]})}fromSchema(e){ke(e,L0e);let t=Be(e,e,TC.schema());Te.assertSchema(t,this.className),this.status=new Cx({schema:t.result[$R]}),NC in t.result&&(this.timeStampToken=new rn({schema:t.result[NC]}))}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 b0({schema:this.timeStampToken.content}).sign(e,0,t,void 0,n)}async verify(e={signer:0,trustedCerts:[],data:ln},t=kt(!0)){return this.assertContentType(),new b0({schema:this.timeStampToken.content}).verify(e,t)}assertContentType(){if(!this.timeStampToken)throw new Error("timeStampToken is absent in TSP response");if(this.timeStampToken.contentType!==_7)throw new Error(`Wrong format of timeStampToken: ${this.timeStampToken.contentType}`)}};V0e.CLASS_NAME="TimeStampResp";function U0e(){if(typeof globalThis<"u"&&"crypto"in globalThis){let r="webcrypto";"webkitSubtle"in globalThis.crypto&&(r="safari"),IC(r,new E0({name:r,crypto:globalThis.crypto}))}else if(typeof crypto<"u"&&"webcrypto"in crypto){let r="NodeJS ^15",e=crypto.webcrypto;IC(r,new E0({name:r,crypto:e}))}}o(U0e,"initCryptoEngine");U0e();var fO=null,bn=class{static{o(this,"Application")}static setEngine(e,t){fO=Object.assign(t,{name:e}),IC(e,new E0({name:e,crypto:t}))}static get crypto(){if(!fO)throw new $e(De.CRYPTOGRAPHIC_NO_MODULE);return fO}static isNodePlugin(){return typeof self>"u"&&typeof window>"u"}};function j0e(){bn.isNodePlugin()||bn.setEngine("W3 WebCrypto module",self.crypto)}o(j0e,"init");j0e();var zC=class{static{o(this,"XmlAlgorithm")}getAlgorithmName(){return this.namespaceURI}},Qh=class extends zC{static{o(this,"HashAlgorithm")}async Digest(e){let t;if(typeof e=="string")t=br.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=lo(e);t=br.FromString(s,"utf8")}let n=await bn.crypto.subtle.digest(this.algorithm,t);return new Uint8Array(n)}},An=class extends zC{static{o(this,"SignatureAlgorithm")}async Sign(e,t,n){let s=br.FromString(e,"utf8");return bn.crypto.subtle.sign(n,t,s)}async Verify(e,t,n){let s=this.algorithm,i=br.FromString(e,"utf8");return bn.crypto.subtle.verify(s,t,n,i)}};var Kn="SHA-1",ns="SHA-256",ss="SHA-384",is="SHA-512",N0="http://www.w3.org/2000/09/xmldsig#sha1",T0="http://www.w3.org/2001/04/xmlenc#sha256",I0="http://www.w3.org/2001/04/xmldsig-more#sha384",_0="http://www.w3.org/2001/04/xmlenc#sha512",JC=class extends Qh{static{o(this,"Sha1")}constructor(){super(...arguments),this.algorithm={name:Kn},this.namespaceURI=N0}},Fx=class extends Qh{static{o(this,"Sha256")}constructor(){super(...arguments),this.algorithm={name:ns},this.namespaceURI=T0}},YC=class extends Qh{static{o(this,"Sha384")}constructor(){super(...arguments),this.algorithm={name:ss},this.namespaceURI=I0}},QC=class extends Qh{static{o(this,"Sha512")}constructor(){super(...arguments),this.algorithm={name:is},this.namespaceURI=_0}};var Eu="ECDSA",ZC="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1",e2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256",t2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384",r2="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512";function n2(r){if(r.name.toUpperCase()===Eu.toUpperCase())switch(r.hash.name.toUpperCase()){case Kn:return new D0;case ns:return new B0;case ss:return new R0;case is:return new O0}return null}o(n2,"fromAlgorithm");var D0=class extends An{static{o(this,"EcdsaSha1")}constructor(){super(...arguments),this.algorithm={name:Eu,hash:{name:Kn}},this.namespaceURI=ZC}static fromAlgorithm(e){return n2(e)}},B0=class extends An{static{o(this,"EcdsaSha256")}constructor(){super(...arguments),this.algorithm={name:Eu,hash:{name:ns}},this.namespaceURI=e2}static fromAlgorithm(e){return n2(e)}},R0=class extends An{static{o(this,"EcdsaSha384")}constructor(){super(...arguments),this.algorithm={name:Eu,hash:{name:ss}},this.namespaceURI=t2}static fromAlgorithm(e){return n2(e)}},O0=class extends An{static{o(this,"EcdsaSha512")}constructor(){super(...arguments),this.algorithm={name:Eu,hash:{name:is}},this.namespaceURI=r2}static fromAlgorithm(e){return n2(e)}};var P0="HMAC",hO="http://www.w3.org/2000/09/xmldsig#hmac-sha1",pO="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256",dO="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384",mO="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512";function s2(r){if(r.name.toUpperCase()===P0.toUpperCase())switch(r.hash.name.toUpperCase()){case Kn:return new Mx;case ns:return new qx;case ss:return new Hx;case is:return new Kx}return null}o(s2,"fromAlgorithm");var Mx=class extends An{static{o(this,"HmacSha1")}constructor(){super(...arguments),this.algorithm={name:P0,hash:{name:Kn}},this.namespaceURI=hO}static fromAlgorithm(e){return s2(e)}},qx=class extends An{static{o(this,"HmacSha256")}constructor(){super(...arguments),this.algorithm={name:P0,hash:{name:ns}},this.namespaceURI=pO}static fromAlgorithm(e){return s2(e)}},Hx=class extends An{static{o(this,"HmacSha384")}constructor(){super(...arguments),this.algorithm={name:P0,hash:{name:ss}},this.namespaceURI=dO}static fromAlgorithm(e){return s2(e)}},Kx=class extends An{static{o(this,"HmacSha512")}constructor(){super(...arguments),this.algorithm={name:P0,hash:{name:is}},this.namespaceURI=mO}static fromAlgorithm(e){return s2(e)}};var bu="RSASSA-PKCS1-v1_5",i2="http://www.w3.org/2000/09/xmldsig#rsa-sha1",a2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",o2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384",u2="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512";function c2(r){if(r.name.toUpperCase()===bu.toUpperCase())switch(r.hash.name.toUpperCase()){case Kn:return new k0;case ns:return new L0;case ss:return new V0;case is:return new U0}return null}o(c2,"fromAlgorithm");var k0=class extends An{static{o(this,"RsaPkcs1Sha1")}constructor(){super(...arguments),this.algorithm={name:bu,hash:{name:Kn}},this.namespaceURI=i2}static fromAlgorithm(e){return c2(e)}},L0=class extends An{static{o(this,"RsaPkcs1Sha256")}constructor(){super(...arguments),this.algorithm={name:bu,hash:{name:ns}},this.namespaceURI=a2}static fromAlgorithm(e){return c2(e)}},V0=class extends An{static{o(this,"RsaPkcs1Sha384")}constructor(){super(...arguments),this.algorithm={name:bu,hash:{name:ss}},this.namespaceURI=o2}static fromAlgorithm(e){return c2(e)}},U0=class extends An{static{o(this,"RsaPkcs1Sha512")}constructor(){super(...arguments),this.algorithm={name:bu,hash:{name:is}},this.namespaceURI=u2}static fromAlgorithm(e){return c2(e)}};function Xe(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(Xe,"__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 Wr=class extends Ws{static{o(this,"XmlSignatureObject")}};Wr=Xe([Ht({localName:"xmldsig",namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix})],Wr);var Qi=class extends Td{static{o(this,"XmlSignatureCollection")}};Qi=Xe([Ht({localName:"xmldsig_collection",namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix})],Qi);var Zi=class extends Wr{static{o(this,"DigestMethod")}constructor(e){super(),e&&(this.Algorithm=e)}};Xe([Ur({localName:ye.AttributeNames.Algorithm,required:!0,defaultValue:ye.DefaultDigestMethod}),dt("design:type",String)],Zi.prototype,"Algorithm",void 0);Zi=Xe([Ht({localName:ye.ElementNames.DigestMethod}),dt("design:paramtypes",[String])],Zi);var vi=class extends Wr{static{o(this,"KeyInfoClause")}static canImportCryptoKey(e){return!1}};var F0e={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},j0=class extends vi{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===bu.toUpperCase()||t===Zh.toUpperCase()}async importKey(e){let t=e.algorithm.name?e.algorithm.name.toUpperCase():"";if(t!==bu.toUpperCase()&&t!==Zh.toUpperCase())throw new $e(De.ALGORITHM_WRONG_NAME,e.algorithm.name);this.key=e;let n=await bn.crypto.subtle.exportKey("jwk",e);return this.jwk=n,this.Modulus=br.FromBase64Url(n.n||""),this.Exponent=br.FromBase64Url(n.e||""),this.keyUsage=e.usages,this}async exportKey(e=F0e){if(this.key)return this.key;if(!this.Modulus)throw new $e(De.CRYPTOGRAPHIC,"RsaKeyValue has no Modulus");let t=br.ToBase64Url(this.Modulus);if(!this.Exponent)throw new $e(De.CRYPTOGRAPHIC,"RsaKeyValue has no Exponent");let n=br.ToBase64Url(this.Exponent),s;switch(e.name.toUpperCase()){case bu.toUpperCase():s="R";break;case Zh.toUpperCase():s="P";break;default:throw new $e(De.ALGORITHM_NOT_SUPPORTED,e.name)}switch(e.hash.name.toUpperCase()){case Kn:s+="S1";break;case ns:s+="S256";break;case ss:s+="S384";break;case is:s+="S512";break}let i={kty:"RSA",alg:s,n:t,e:n,ext:!0};return bn.crypto.subtle.importKey("jwk",i,e,!0,this.keyUsage)}LoadXml(e){super.LoadXml(e),this.keyUsage=["verify"]}};Xe([Jt({localName:ye.ElementNames.Modulus,prefix:ye.DefaultPrefix,namespaceURI:ye.NamespaceURI,required:!0,converter:Ki}),dt("design:type",Object)],j0.prototype,"Modulus",void 0);Xe([Jt({localName:ye.ElementNames.Exponent,prefix:ye.DefaultPrefix,namespaceURI:ye.NamespaceURI,required:!0,converter:Ki}),dt("design:type",Object)],j0.prototype,"Exponent",void 0);j0=Xe([Ht({localName:ye.ElementNames.RSAKeyValue})],j0);var gO="http://www.w3.org/2007/05/xmldsig-more#",vO="pss",F0=class extends Ws{static{o(this,"MaskGenerationFunction")}};Xe([Jt({parser:Zi}),dt("design:type",Zi)],F0.prototype,"DigestMethod",void 0);Xe([Ur({localName:ye.AttributeNames.Algorithm,defaultValue:"http://www.w3.org/2007/05/xmldsig-more#MGF1"}),dt("design:type",String)],F0.prototype,"Algorithm",void 0);F0=Xe([Ht({localName:ye.ElementNames.MaskGenerationFunction,prefix:vO,namespaceURI:gO})],F0);var _a=class extends Ws{static{o(this,"PssAlgorithmParams")}};Xe([Jt({parser:Zi}),dt("design:type",Zi)],_a.prototype,"DigestMethod",void 0);Xe([Jt({parser:F0}),dt("design:type",F0)],_a.prototype,"MGF",void 0);Xe([Jt({converter:kv,prefix:vO,namespaceURI:gO}),dt("design:type",Number)],_a.prototype,"SaltLength",void 0);Xe([Jt({converter:kv}),dt("design:type",Number)],_a.prototype,"TrailerField",void 0);_a=Xe([Ht({localName:ye.ElementNames.RSAPSSParams,prefix:vO,namespaceURI:gO})],_a);var Zh="RSA-PSS",yO="http://www.w3.org/2007/05/xmldsig-more#rsa-pss",l2=class r extends An{static{o(this,"RsaPssWithParams")}constructor(){super(...arguments),this.algorithm={name:Zh,hash:{name:Kn}},this.namespaceURI=yO}static fromAlgorithm(e){let t=null;if(e.name.toUpperCase()===Zh.toUpperCase()){switch(e.hash.name.toUpperCase()){case Kn:t=new r;break;case ns:t=new r;break;case ss:t=new r;break;case is: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 _a){switch(t.DigestMethod.Algorithm.toLowerCase()){case N0:this.algorithm.hash.name=Kn;break;case T0:this.algorithm.hash.name=ns;break;case I0:this.algorithm.hash.name=ss;break;case _0:this.algorithm.hash.name=is;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 _a;switch(this.algorithm.hash.name.toUpperCase()){case Kn:t.DigestMethod.Algorithm=N0;break;case ns:t.DigestMethod.Algorithm=T0;break;case ss:t.DigestMethod.Algorithm=I0;break;case is:t.DigestMethod.Algorithm=_0;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 yi;(function(r){r[r.BeforeDocElement=0]="BeforeDocElement",r[r.InsideDocElement=1]="InsideDocElement",r[r.AfterDocElement=2]="AfterDocElement"})(yi||(yi={}));var wo=class{static{o(this,"XmlCanonicalizer")}constructor(e,t,n=new Id){this.propagatedNamespaces=new Id,this.result=[],this.visibleNamespaces=new Id,this.inclusiveNamespacesPrefixList=[],this.state=yi.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:xf(e.parentNode)||this.WriteTextNode(e);break;case qt.Whitespace:this.state===yi.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=yi.BeforeDocElement;for(let t=e.firstChild;t!=null;t=t.nextSibling)this.WriteNode(t)}WriteCommentNode(e){this.withComments&&(this.state===yi.AfterDocElement?this.result.push(`
|
|
112
|
+
<!--`):this.result.push("<!--"),this.result.push(this.NormalizeString(e.nodeValue,qt.Comment)),this.state===yi.BeforeDocElement?this.result.push(`-->
|
|
113
|
+
`):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===yi.AfterDocElement?this.result.push(`
|
|
114
|
+
<?`):this.result.push("<?"),this.result.push(t),e.nodeValue&&(this.result.push(" "),this.result.push(this.NormalizeString(e.nodeValue,qt.ProcessingInstruction))),this.state===yi.BeforeDocElement?this.result.push(`?>
|
|
115
|
+
`):this.result.push("?>"))}WriteElementNode(e){let t=this.state;this.state===yi.BeforeDocElement&&(this.state=yi.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===yi.BeforeDocElement&&(this.state=yi.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(!xO(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=oH(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(q0e);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];xO(s)||t.push(s)}t.sort(H0e),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===`
|
|
116
|
+
`&&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 q0e(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(q0e,"XmlDsigC14NTransformNamespacesComparer");function H0e(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(H0e,"XmlDsigC14NTransformAttributesComparer");function oH(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(!xO(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=oH(s,e,t);if(s.nodeType===qt.Element&&a)return++t+a}return t}o(oH,"IsNamespaceUsed");function xO(r){let e=/xmlns:/;return!!(r!==null&&r.nodeType===qt.Attribute&&(r.nodeName==="xmlns"||e.test(r.nodeName)))}o(xO,"IsNamespaceNode");var f2=class extends Qi{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=_a;break;default:break}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};f2=Xe([Ht({localName:"Other"})],f2);var So=class extends Wr{static{o(this,"SignatureMethod")}};Xe([Ur({localName:ye.AttributeNames.Algorithm,required:!0,defaultValue:""}),dt("design:type",String)],So.prototype,"Algorithm",void 0);Xe([Jt({localName:ye.ElementNames.HMACOutputLength,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,converter:kv}),dt("design:type",Number)],So.prototype,"HMACOutputLength",void 0);Xe([Jt({parser:f2,noRoot:!0,minOccurs:0}),dt("design:type",f2)],So.prototype,"Any",void 0);So=Xe([Ht({localName:ye.ElementNames.SignatureMethod})],So);var M0=class extends Wr{static{o(this,"CanonicalizationMethod")}};Xe([Ur({localName:ye.AttributeNames.Algorithm,required:!0,defaultValue:ye.DefaultCanonMethod}),dt("design:type",String)],M0.prototype,"Algorithm",void 0);M0=Xe([Ht({localName:ye.ElementNames.CanonicalizationMethod})],M0);var q0=class extends Wr{static{o(this,"DataObject")}};Xe([Ur({localName:ye.AttributeNames.Id,defaultValue:""}),dt("design:type",String)],q0.prototype,"Id",void 0);Xe([Ur({localName:ye.AttributeNames.MimeType,defaultValue:""}),dt("design:type",String)],q0.prototype,"MimeType",void 0);Xe([Ur({localName:ye.AttributeNames.Encoding,defaultValue:""}),dt("design:type",String)],q0.prototype,"Encoding",void 0);q0=Xe([Ht({localName:ye.ElementNames.Object})],q0);var $x=class extends Qi{static{o(this,"DataObjects")}};$x=Xe([Ht({localName:"xmldsig_objects",parser:q0})],$x);var gs=class extends Wr{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}};Xe([Ur({localName:ye.AttributeNames.Algorithm,defaultValue:""}),dt("design:type",String)],gs.prototype,"Algorithm",void 0);Xe([Jt({localName:ye.ElementNames.XPath,defaultValue:""}),dt("design:type",String)],gs.prototype,"XPath",void 0);gs=Xe([Ht({localName:ye.ElementNames.Transform})],gs);var Au=class extends gs{static{o(this,"XmlDsigBase64Transform")}constructor(){super(...arguments),this.Algorithm=ye.AlgorithmNamespaces.XmlDsigBase64Transform}GetOutput(){if(!this.innerXml)throw new $e(De.PARAM_REQUIRED,"innerXml");return br.FromString(this.innerXml.textContent||"","base64")}};var Eo=class extends gs{static{o(this,"XmlDsigC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",this.xmlCanonicalizer=new wo(!1,!1)}GetOutput(){if(!this.innerXml)throw new $e(De.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}},bo=class extends Eo{static{o(this,"XmlDsigC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",this.xmlCanonicalizer=new wo(!0,!1)}};var Cu=class extends gs{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;)pi(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 Ao=class extends gs{static{o(this,"XmlDsigExcC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#",this.xmlCanonicalizer=new wo(!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)}},Co=class extends Ao{static{o(this,"XmlDsigExcC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments",this.xmlCanonicalizer=new wo(!0,!0)}};function uH(r){return r.parentNode?uH(r.parentNode):r}o(uH,"lookupParentNode");var H0=class extends gs{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(uH(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:Nd("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"?Nd("xpath"):self;return!n.evaluate(a,e,{lookupNamespaceURI:o(l=>i.lookupNamespaceURI(l),"lookupNamespaceURI")},u.XPathResult.ANY_TYPE,null).booleanValue}catch{return!1}}};Xe([Jt({localName:ye.ElementNames.XPath,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0}),dt("design:type",String)],H0.prototype,"XPath",void 0);var K0=class extends Qi{static{o(this,"Transforms")}OnLoadXml(e){super.OnLoadXml(e),this.items=this.GetIterator().map(t=>{switch(t.Algorithm){case ye.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:return ep(t,Cu);case ye.AlgorithmNamespaces.XmlDsigC14NTransform:return ep(t,Eo);case ye.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:return ep(t,bo);case ye.AlgorithmNamespaces.XmlDsigExcC14NTransform:return ep(t,Ao);case ye.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:return ep(t,Co);case ye.AlgorithmNamespaces.XmlDsigBase64Transform:return ep(t,Au);case ye.AlgorithmNamespaces.XmlDsigXPathTransform:return ep(t,H0);default:try{let n=Gx.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)}}})}};K0=Xe([Ht({localName:ye.ElementNames.Transforms,parser:gs})],K0);function ep(r,e){let t=new e;if(!r.Element)throw new Error("Transform element is not defined");return t.LoadXml(r.Element),t}o(ep,"ChangeTransform");var No=class extends Wr{static{o(this,"Reference")}constructor(e){super(),this.DigestMethod=new Zi,e&&(this.Uri=e)}};Xe([Ur({defaultValue:""}),dt("design:type",String)],No.prototype,"Id",void 0);Xe([Ur({localName:ye.AttributeNames.URI}),dt("design:type",String)],No.prototype,"Uri",void 0);Xe([Ur({localName:ye.AttributeNames.Type,defaultValue:""}),dt("design:type",String)],No.prototype,"Type",void 0);Xe([Jt({parser:K0}),dt("design:type",K0)],No.prototype,"Transforms",void 0);Xe([Jt({required:!0,parser:Zi}),dt("design:type",Zi)],No.prototype,"DigestMethod",void 0);Xe([Jt({required:!0,localName:ye.ElementNames.DigestValue,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,converter:Ki}),dt("design:type",Uint8Array)],No.prototype,"DigestValue",void 0);No=Xe([Ht({localName:ye.ElementNames.Reference}),dt("design:paramtypes",[String])],No);var $0=class extends Qi{static{o(this,"References")}};$0=Xe([Ht({localName:"References",parser:No})],$0);var Nu=class extends Wr{static{o(this,"SignedInfo")}};Xe([Ur({localName:ye.AttributeNames.Id,defaultValue:""}),dt("design:type",String)],Nu.prototype,"Id",void 0);Xe([Jt({parser:M0,required:!0}),dt("design:type",M0)],Nu.prototype,"CanonicalizationMethod",void 0);Xe([Jt({parser:So,required:!0}),dt("design:type",So)],Nu.prototype,"SignatureMethod",void 0);Xe([Jt({parser:$0,minOccurs:1,noRoot:!0}),dt("design:type",$0)],Nu.prototype,"References",void 0);Nu=Xe([Ht({localName:ye.ElementNames.SignedInfo})],Nu);var z0="http://www.w3.org/2001/04/xmldsig-more#",J0="ecdsa",tp=class extends Ws{static{o(this,"EcdsaPublicKey")}};Xe([Jt({localName:ye.ElementNames.X,namespaceURI:z0,prefix:J0,required:!0,converter:Ki}),dt("design:type",Uint8Array)],tp.prototype,"X",void 0);Xe([Jt({localName:ye.ElementNames.Y,namespaceURI:z0,prefix:J0,required:!0,converter:Ki}),dt("design:type",Uint8Array)],tp.prototype,"Y",void 0);tp=Xe([Ht({localName:ye.ElementNames.PublicKey,namespaceURI:z0,prefix:J0})],tp);var G0=class extends Ws{static{o(this,"NamedCurve")}};Xe([Ur({localName:ye.AttributeNames.URI,required:!0}),dt("design:type",String)],G0.prototype,"Uri",void 0);G0=Xe([Ht({localName:ye.ElementNames.NamedCurve,namespaceURI:z0,prefix:J0})],G0);var X0=class extends Ws{static{o(this,"DomainParameters")}};Xe([Jt({parser:G0}),dt("design:type",G0)],X0.prototype,"NamedCurve",void 0);X0=Xe([Ht({localName:ye.ElementNames.DomainParameters,namespaceURI:z0,prefix:J0})],X0);var W0=class extends vi{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()===Eu.toUpperCase()}get NamedCurve(){return lH(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 bn.crypto.subtle.exportKey("jwk",e);return this.key=e,this.jwk=t,this.PublicKey=new tp,this.PublicKey.X=br.FromString(t.x||"","base64url"),this.PublicKey.Y=br.FromString(t.y||"","base64url"),this.DomainParameters||(this.DomainParameters=new X0),this.DomainParameters.NamedCurve||(this.DomainParameters.NamedCurve=new G0),this.DomainParameters.NamedCurve.Uri=lH(t.crv||""),this.keyUsage=e.usages,this}async exportKey(e){if(this.key)return this.key;let t=br.ToBase64Url(this.PublicKey.X),n=br.ToBase64Url(this.PublicKey.Y),s=K0e(this.DomainParameters.NamedCurve.Uri),i={kty:"EC",crv:s,x:t,y:n,ext:!0};this.keyUsage=["verify"];let a=await bn.crypto.subtle.importKey("jwk",i,{name:"ECDSA",namedCurve:s},!0,this.keyUsage);return this.key=a,this.key}};Xe([Jt({parser:X0}),dt("design:type",X0)],W0.prototype,"DomainParameters",void 0);Xe([Jt({parser:tp,required:!0}),dt("design:type",tp)],W0.prototype,"PublicKey",void 0);W0=Xe([Ht({localName:ye.ElementNames.ECDSAKeyValue,namespaceURI:z0,prefix:J0})],W0);function lH(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(lH,"GetNamedCurveOid");function K0e(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(K0e,"GetNamedCurveFromOid");var $0e=class extends Map{static{o(this,"KeyInfoClauseRegistry")}},Dl=new $0e;Dl.set(ye.ElementNames.RSAKeyValue,j0);Dl.set(ye.ElementNames.ECDSAKeyValue,W0);var h2=class{static{o(this,"KeyInfoClauseFactory")}static create(e){let t=Dl.get(e);if(!t)throw new $e(De.KEY_INFO_CLAUSE_NOT_SUPPORTED,e);return new t}};var Xx=class extends vi{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 Dl)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(pi(n))try{let s=n.localName,i=h2.create(s);i.LoadXml(n),this.value=i;return}catch{}}throw new $e(De.CRYPTOGRAPHIC,"Unsupported KeyValue in use")}};Xx=Xe([Ht({localName:ye.ElementNames.KeyValue}),dt("design:paramtypes",[vi])],Xx);var G0e={"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"}},Y0=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 bn.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()===Eu){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=G0e[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=Qr(this.raw.buffer);this.simpl=new ms({schema:t.result})}isHashedAlgorithm(e){return!!e.hash}};var p2=class extends Wr{static{o(this,"X509IssuerSerial")}};Xe([Jt({localName:ye.ElementNames.X509IssuerName,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0}),dt("design:type",String)],p2.prototype,"X509IssuerName",void 0);Xe([Jt({localName:ye.ElementNames.X509SerialNumber,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0}),dt("design:type",String)],p2.prototype,"X509SerialNumber",void 0);p2=Xe([Ht({localName:ye.ElementNames.X509IssuerSerial})],p2);var rp;(function(r){r[r.None=0]="None",r[r.EndCertOnly=1]="EndCertOnly",r[r.ExcludeRoot=2]="ExcludeRoot",r[r.WholeChain=3]="WholeChain"})(rp||(rp={}));var Q0=class extends vi{static{o(this,"KeyInfoX509Data")}constructor(e,t=rp.None){if(super(),this.x509crl=null,this.SubjectKeyIdList=[],e){if(e instanceof Uint8Array)this.AddCertificate(new Y0(e));else if(e instanceof Y0)switch(t){case rp.None:case rp.EndCertOnly:this.AddCertificate(e);break;case rp.ExcludeRoot:this.AddCertificatesChainFrom(e,!1);break;case rp.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=br.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=br.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=br.ToBase64(s.GetRaw()),t.appendChild(i)}),this.x509crl!=null){let s=e.createElementNS(ye.NamespaceURI,n+ye.ElementNames.X509CRL);s.textContent=br.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=Wr.GetChild(s,ye.ElementNames.X509IssuerName,ye.NamespaceURI,!0),a=Wr.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=br.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=br.FromBase64(s.textContent);this.AddCertificate(new Y0(i))}});let n=this.GetChild(ye.ElementNames.X509CRL,!1);n&&n.textContent&&(this.x509crl=br.FromBase64(n.textContent))}AddCertificatesChainFrom(e,t){}};Q0=Xe([Ht({localName:ye.ElementNames.X509Data}),dt("design:paramtypes",[Object,Object])],Q0);var Wx=class extends vi{static{o(this,"SPKIData")}async importKey(e){let t=await bn.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 bn.crypto.subtle.importKey("spki",this.SPKIexp,e,!0,["verify"]);return this.Key=t,t}};Xe([Jt({localName:ye.ElementNames.SPKIexp,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0,converter:Ki}),dt("design:type",Object)],Wx.prototype,"SPKIexp",void 0);Wx=Xe([Ht({localName:ye.ElementNames.SPKIData})],Wx);var np=class extends Qi{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=Xx;break;case ye.ElementNames.X509Data:s=Q0;break;case ye.ElementNames.SPKIData:s=Wx;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)}}}};Xe([Ur({localName:ye.AttributeNames.Id,defaultValue:""}),dt("design:type",String)],np.prototype,"Id",void 0);np=Xe([Ht({localName:ye.ElementNames.KeyInfo})],np);var Bl=class extends Wr{static{o(this,"Signature")}};Xe([Ur({localName:ye.AttributeNames.Id,defaultValue:""}),dt("design:type",String)],Bl.prototype,"Id",void 0);Xe([Jt({parser:Nu,required:!0}),dt("design:type",Nu)],Bl.prototype,"SignedInfo",void 0);Xe([Jt({localName:ye.ElementNames.SignatureValue,namespaceURI:ye.NamespaceURI,prefix:ye.DefaultPrefix,required:!0,converter:Ki,defaultValue:null}),dt("design:type",Object)],Bl.prototype,"SignatureValue",void 0);Xe([Jt({parser:np}),dt("design:type",np)],Bl.prototype,"KeyInfo",void 0);Xe([Jt({parser:$x,noRoot:!0}),dt("design:type",$x)],Bl.prototype,"ObjectList",void 0);Bl=Xe([Ht({localName:ye.ElementNames.Signature})],Bl);var W0e=class extends Map{static{o(this,"AlgorithmRegistry")}},gr=new W0e;gr.set(i2,{type:"signature",algorithm:k0});gr.set(a2,{type:"signature",algorithm:L0});gr.set(o2,{type:"signature",algorithm:V0});gr.set(u2,{type:"signature",algorithm:U0});gr.set(i2,{type:"signature",algorithm:k0});gr.set(a2,{type:"signature",algorithm:L0});gr.set(o2,{type:"signature",algorithm:V0});gr.set(u2,{type:"signature",algorithm:U0});gr.set(yO,{type:"signature",algorithm:l2});gr.set(ZC,{type:"signature",algorithm:D0});gr.set(e2,{type:"signature",algorithm:B0});gr.set(t2,{type:"signature",algorithm:R0});gr.set(r2,{type:"signature",algorithm:O0});gr.set(ZC.toUpperCase(),{type:"signature",algorithm:D0});gr.set(e2.toUpperCase(),{type:"signature",algorithm:B0});gr.set(t2.toUpperCase(),{type:"signature",algorithm:R0});gr.set(r2.toUpperCase(),{type:"signature",algorithm:O0});gr.set(hO,{type:"signature",algorithm:Mx});gr.set(pO,{type:"signature",algorithm:qx});gr.set(dO,{type:"signature",algorithm:Hx});gr.set(mO,{type:"signature",algorithm:Kx});gr.set(N0,{type:"hash",algorithm:JC});gr.set(T0,{type:"hash",algorithm:Fx});gr.set(I0,{type:"hash",algorithm:YC});gr.set(_0,{type:"hash",algorithm:QC});var sp=class{static{o(this,"AlgorithmFactory")}static createHashAlgorithmFromNamespace(e){for(let[t,{type:n,algorithm:s}]of gr)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 gr)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 gr)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 gr)if(t==="signature"){let s=n.fromAlgorithm(e);if(s)return s}throw new $e(De.ALGORITHM_NOT_SUPPORTED,e.name)}};var z0e=class extends Map{static{o(this,"TransformRegistry")}},Tu=new z0e;Tu.set(ye.AlgorithmNamespaces.XmlDsigBase64Transform,Au);Tu.set(ye.AlgorithmNamespaces.XmlDsigC14NTransform,Eo);Tu.set(ye.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform,bo);Tu.set(ye.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform,Cu);Tu.set(ye.AlgorithmNamespaces.XmlDsigExcC14NTransform,Ao);Tu.set(ye.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform,Co);var Gx=class{static{o(this,"CryptoConfig")}static CreateFromName(e){if(!e)throw new $e(De.PARAM_REQUIRED,"name");let t=Tu.get(e);if(t)return new t;let n;switch(e){case ye.AlgorithmNamespaces.XmlDsigBase64Transform:n=new Au;break;case ye.AlgorithmNamespaces.XmlDsigC14NTransform:n=new Eo;break;case ye.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:n=new bo;break;case ye.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:n=new Cu;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 Ao;break;case ye.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:n=new Co;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 sp.createSignatureAlgorithmFromMethod(e)}static CreateHashAlgorithm(e){return sp.createHashAlgorithmFromNamespace(e)}static GetHashAlgorithm(e){let t=typeof e=="string"?{name:e}:e;return sp.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}),sp.createSignatureAlgorithmFromAlgorithm(t)}static CreateSignatureMethod(e){let t=new So;return t.Algorithm=e.namespaceURI,e.toMethod&&e.toMethod(t),t}static RegisterSignatureAlgorithm(e,t){gr.set(e,{type:"signature",algorithm:t})}static RegisterHashAlgorithm(e,t){gr.set(e,{type:"hash",algorithm:t})}static RegisterKeyInfoClause(e,t){Dl.set(e,t)}static RegisterTransform(e,t){Tu.set(e,t)}};var d2=Hl(U_(),1);var fH={xmldec:{version:"1.0",encoding:"UTF-8",standalone:void 0}};var hH={explicitArray:!1,explicitRoot:!1,preserveChildrenOrder:!0};var Jke={[Cr.AC]:"America/Rio_Branco",[Cr.AL]:"America/Maceio",[Cr.AM]:"America/Manaus",[Cr.AP]:"America/Belem",[Cr.BA]:"America/Bahia",[Cr.CE]:"America/Fortaleza",[Cr.DF]:"America/Sao_Paulo",[Cr.ES]:"America/Sao_Paulo",[Cr.GO]:"America/Sao_Paulo",[Cr.MA]:"America/Fortaleza",[Cr.MG]:"America/Sao_Paulo",[Cr.MS]:"America/Campo_Grande",[Cr.MT]:"America/Cuiaba",[Cr.PA]:"America/Belem",[Cr.PB]:"America/Fortaleza",[Cr.PE]:"America/Recife",[Cr.PI]:"America/Fortaleza",[Cr.PR]:"America/Sao_Paulo",[Cr.RJ]:"America/Sao_Paulo",[Cr.RN]:"America/Fortaleza",[Cr.RO]:"America/Porto_Velho",[Cr.RR]:"America/Boa_Vista",[Cr.RS]:"America/Sao_Paulo",[Cr.SC]:"America/Sao_Paulo",[Cr.SE]:"America/Maceio",[Cr.SP]:"America/Sao_Paulo",[Cr.TO]:"America/Araguaina"};var pH=class{static{o(this,"Xml2JsToolkit")}xml2js;constructor(e=Q0e){this.xml2js=e,_9({XMLSerializer:d2.default.XMLSerializer,DOMParser:d2.default.DOMParser,DOMImplementation:d2.default.DOMImplementation})}async validate(e,t){if(!e||e.trim().length===0)return Es(new sn("Please provide a valid xml content"));if(!t||t.trim().length===0)return Es(new sn("Please provide a valid existing xsd path"));try{return await tM.validate(e,t),Ii()}catch(n){return Zl(n)}}parse(e,t){return new Promise((n,s)=>new this.xml2js.Parser({...hH,...t}).parseString(e,(i,a)=>i?s(i):n(a)))}build(e,t){return Promise.resolve(new this.xml2js.Builder({...fH,...t}).buildObject(e))}digest(e,t,n=yg){return this.hash(this.canonicalize(e,n),t)}canonicalize(e,t=yg){let n=Hi(this.clear(e));return new wo(t.includeComments,t.exclusive).Canonicalize(n)}getNode(e,t){let s=Hi(e).documentElement.getElementsByTagName(t).item(0);return s?this.clear(lo(s)):null}getFirstNode(e){let n=Hi(e).documentElement.firstChild;return n?this.clear(lo(n)):null}getAttribute(e,t){return Hi(e).documentElement.getAttribute(t)}appendNode(e,t){let n=Hi(e),{documentElement:s}=Hi(t);return n.documentElement.appendChild(s),this.clear(lo(n))}hash(e,t){return Y0e.createHash(t).update(e,"utf8").digest().toString("base64")}clear(e){return['xmlns:default="http://www.w3.org/2000/09/xmldsig#"',' standalone="no"',"default:",":default",`
|
|
117
|
+
`,"\r"," "].reduce((n,s)=>n.replace(s,""),e.replace(/(>)\s*(<)/gm,"$1$2"))}};import{registerDecorator as Z0e}from"class-validator";var dH=o(r=>(e,t)=>{Z0e({name:"isDecimal",target:e.constructor,propertyName:t,options:r,validator:{validate(n){return n instanceof Ap?!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 mH}from"class-validator";var Z0=Symbol("choice"),eg=o(r=>r==null||r==="","isEmpty"),L4e=o(r=>e=>{let{properties:t,required:n=!1,...s}=r,i=Reflect.getMetadata(Z0,e)??[],a={properties:t,required:n};i.push(a),Reflect.defineMetadata(Z0,i,e);for(let u of t)mH({name:"choice",target:e,propertyName:u,options:s,validator:{validate(c,l){let h=l.object,m=l.property,g=Reflect.getMetadata(Z0,e);if(!g)return!0;let y=g.find(v=>v.properties.includes(m));if(!y||eg(c))return!0;for(let v of y.properties){if(v===m)continue;let S=h[v];if(!eg(S))return!1}for(let v of g)if(v!==y)for(let S of v.properties){let w=h[S];if(!eg(w))return!1}return!0},defaultMessage(c){let l=Reflect.getMetadata(Z0,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(!eg(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(!eg(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)mH({name:"choiceGroupRequired",target:e,propertyName:u,options:{...s,always:!0},validator:{validate(c,l){let h=l.object,m=Reflect.getMetadata(Z0,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(!eg(v))return!0}return l.property!==g.properties[0]},defaultMessage(c){let l=Reflect.getMetadata(Z0,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 ege}from"class-transformer";var H4e=o(({fixed:r,...e}={fixed:2})=>(t,n)=>{dH(e)(t,n),ege(({value:s})=>Ap.newOrUndefined(s)?.toFixed(r))(t,n)},"TransformDecimal");import{Transform as nge}from"class-transformer";import{IsDateString as sge}from"class-validator";import wO from"dayjs";import tge from"dayjs/plugin/utc.js";import rge from"dayjs/plugin/timezone.js";wO.extend(tge);wO.extend(rge);var gH=wO;var Z4e=o((r={})=>(e,t)=>{nge(({value:n})=>{let s=n instanceof Date?n.toISOString():n;return s?gH(s).tz("America/Sao_Paulo").format(r.format):void 0})(e,t),sge()(e,t)},"TransformDateString");var vH=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,S,w)=>v+S*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,S,w)=>v+S*h[w],0)%11,y=g===0||g===1?0:11-g;return s===l&&i===y}};var yH=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 xH=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 wH=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 SH=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(S=>parseInt(S,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 S=0;S<i.length;S++)a+=n[S]*i[S];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(S=>parseInt(S,10)),m=t.length===8?[8,7,6,5,4,3,2]:[9,8,7,6,5,4,3,2],g=0;for(let S=0;S<m.length;S++)g+=h[S]*m[S];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 EH=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 bH=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 AH=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 CH=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 NH=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 TH=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,S=(parseInt(s[y])*v).toString();i+=S.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 IH=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 _H=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 DH=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 BH=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 RH=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 OH=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 PH=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 kH=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 LH=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 VH=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 UH=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 jH=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 FH=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 MH=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 qH=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 HH=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 Cd=class{static{o(this,"ASN1")}extractCertificateInfo(e){let n=e.subject.split(`
|
|
118
|
+
`).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 S=g.subarray(-y).toString("utf8");return S.substring(Buffer.from(S).findIndex((w,C)=>S.charCodeAt(C)>=32&&S.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 $H=class{static{o(this,"NativeCertificateRepository")}httpClient;signer;cache;constructor(e,t,n=new Ww){this.httpClient=e,this.signer=t,this.cache=n}async read(e){try{let{password:t}=e,n=await this.getPfxBuffer(e);if(n.isLeft())return n;let s=Rl.default.asn1.fromDer(n.value.toString("binary")),i=Rl.default.pkcs12.pkcs12FromAsn1(s,t),{certBag:a}=Rl.default.pki.oids,c=i.getBags({bagType:a})[a];if(!c?.length)return Es(new sn("Cannot read certificate"));let[{cert:l},...h]=c;if(!l)return Es(new sn("Issuer Certificate not found"));let m=h.reduce((y,{cert:v})=>(v&&y.push(new m2.X509Certificate(Rl.default.pki.certificateToPem(v))),y),[]),g=new m2.X509Certificate(Rl.default.pki.certificateToPem(l));return Ii({ca:m,password:t,certificate:g,privateKey:this.getPrivateKey(i)})}catch(t){return Zl(t)}}getPrivateKey(e){let{pkcs8ShroudedKeyBag:t}=Rl.default.pki.oids,s=e.getBags({bagType:t})[t]?.[0]?.key;if(s)return m2.createPrivateKey(Rl.default.pki.privateKeyToPem(s))}async sign(e,t,n=Uu.SHA1){return this.signer.sign(e,t,n)}getCertificateInfo(e){return new Cd().extractCertificateInfo(e)}getStringCertificate(e){return e.raw.toString("base64")}getStringPrivateKey(e){try{return e.export({type:"pkcs8",format:"pem"})}catch{throw new sn("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 Ii(i);if(ige.isAbsolute(t)||KH.existsSync(t))return this.hitBufferOnCache(s,KH.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 Zl(a)}return this.hitBufferOnCache(s,Buffer.from(t,"base64"))}getCacheKey(e,t){return m2.createHash("sha256").update(`${e}.${t}`).digest("hex")}async hitBufferOnCache(e,t){return await this.cache.set(e,t),Ii(t)}isValidRemoteUrl(e){try{return new URL(e),!0}catch{return!1}}};export{BN as a,G3 as b,RN as c,Uu as d,ON as e,Cr as f,oge as g,cge as h,Jke as i,sn as j,X3 as k,PN as l,wp as m,Es as n,Ii as o,W3 as p,z3 as q,xg as r,Uge as s,jge as t,jw as u,J3 as v,Y3 as w,Q3 as x,zge as y,Ap as z,pk as A,Zl as B,Ww as C,$H as D,sb as E,QF as F,ZF as G,pH as H,dH as I,L4e as J,H4e as K,gH as L,Z4e as M,vH as N,yH as O,xH as P,wH as Q,SH as R,EH as S,bH as T,AH as U,CH as V,NH as W,TH as X,IH as Y,_H as Z,DH as _,BH as $,RH as aa,OH as ba,PH as ca,kH as da,LH as ea,VH as fa,UH as ga,jH as ha,FH as ia,MH as ja,qH as ka,HH as la,Cd as ma};
|
|
119
|
+
/*! Bundled license information:
|
|
120
|
+
|
|
121
|
+
lodash/lodash.js:
|
|
122
|
+
(**
|
|
123
|
+
* @license
|
|
124
|
+
* Lodash <https://lodash.com/>
|
|
125
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
126
|
+
* Released under MIT license <https://lodash.com/license>
|
|
127
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
128
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
129
|
+
*)
|
|
130
|
+
|
|
131
|
+
mime-db/index.js:
|
|
132
|
+
(*!
|
|
133
|
+
* mime-db
|
|
134
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
135
|
+
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
136
|
+
* MIT Licensed
|
|
137
|
+
*)
|
|
138
|
+
|
|
139
|
+
mime-types/index.js:
|
|
140
|
+
(*!
|
|
141
|
+
* mime-types
|
|
142
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
143
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
144
|
+
* MIT Licensed
|
|
145
|
+
*)
|
|
146
|
+
|
|
147
|
+
axios/dist/node/axios.cjs:
|
|
148
|
+
(*! Axios v1.13.2 Copyright (c) 2025 Matt Zabriskie and contributors *)
|
|
149
|
+
|
|
150
|
+
js-md4/src/md4.js:
|
|
151
|
+
(**
|
|
152
|
+
* [js-md4]{@link https://github.com/emn178/js-md4}
|
|
153
|
+
*
|
|
154
|
+
* @namespace md4
|
|
155
|
+
* @version 0.3.2
|
|
156
|
+
* @author Yi-Cyuan Chen [emn178@gmail.com]
|
|
157
|
+
* @copyright Yi-Cyuan Chen 2015-2027
|
|
158
|
+
* @license MIT
|
|
159
|
+
*)
|
|
160
|
+
|
|
161
|
+
sax/lib/sax.js:
|
|
162
|
+
sax/lib/sax.js:
|
|
163
|
+
(*! http://mths.be/fromcodepoint v0.1.0 by @mathias *)
|
|
164
|
+
|
|
165
|
+
decimal.js/decimal.mjs:
|
|
166
|
+
(*!
|
|
167
|
+
* decimal.js v10.6.0
|
|
168
|
+
* An arbitrary-precision Decimal type for JavaScript.
|
|
169
|
+
* https://github.com/MikeMcl/decimal.js
|
|
170
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
171
|
+
* MIT Licence
|
|
172
|
+
*)
|
|
173
|
+
|
|
174
|
+
pvtsutils/build/index.es.js:
|
|
175
|
+
(*!
|
|
176
|
+
* MIT License
|
|
177
|
+
*
|
|
178
|
+
* Copyright (c) 2017-2024 Peculiar Ventures, LLC
|
|
179
|
+
*
|
|
180
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
181
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
182
|
+
* in the Software without restriction, including without limitation the rights
|
|
183
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
184
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
185
|
+
* furnished to do so, subject to the following conditions:
|
|
186
|
+
*
|
|
187
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
188
|
+
* copies or substantial portions of the Software.
|
|
189
|
+
*
|
|
190
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
191
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
192
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
193
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
194
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
195
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
196
|
+
* SOFTWARE.
|
|
197
|
+
*
|
|
198
|
+
*)
|
|
199
|
+
|
|
200
|
+
pvutils/build/utils.es.js:
|
|
201
|
+
(*!
|
|
202
|
+
Copyright (c) Peculiar Ventures, LLC
|
|
203
|
+
*)
|
|
204
|
+
|
|
205
|
+
asn1js/build/index.es.js:
|
|
206
|
+
(*!
|
|
207
|
+
* Copyright (c) 2014, GMO GlobalSign
|
|
208
|
+
* Copyright (c) 2015-2022, Peculiar Ventures
|
|
209
|
+
* All rights reserved.
|
|
210
|
+
*
|
|
211
|
+
* Author 2014-2019, Yury Strozhevsky
|
|
212
|
+
*
|
|
213
|
+
* Redistribution and use in source and binary forms, with or without modification,
|
|
214
|
+
* are permitted provided that the following conditions are met:
|
|
215
|
+
*
|
|
216
|
+
* * Redistributions of source code must retain the above copyright notice, this
|
|
217
|
+
* list of conditions and the following disclaimer.
|
|
218
|
+
*
|
|
219
|
+
* * Redistributions in binary form must reproduce the above copyright notice, this
|
|
220
|
+
* list of conditions and the following disclaimer in the documentation and/or
|
|
221
|
+
* other materials provided with the distribution.
|
|
222
|
+
*
|
|
223
|
+
* * Neither the name of the copyright holder nor the names of its
|
|
224
|
+
* contributors may be used to endorse or promote products derived from
|
|
225
|
+
* this software without specific prior written permission.
|
|
226
|
+
*
|
|
227
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
228
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
229
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
230
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
231
|
+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
232
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
233
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
234
|
+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
235
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
236
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
237
|
+
*
|
|
238
|
+
*)
|
|
239
|
+
|
|
240
|
+
@noble/hashes/esm/utils.js:
|
|
241
|
+
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
242
|
+
|
|
243
|
+
pkijs/build/index.es.js:
|
|
244
|
+
(*!
|
|
245
|
+
* Copyright (c) 2014, GlobalSign
|
|
246
|
+
* Copyright (c) 2015-2019, Peculiar Ventures
|
|
247
|
+
* All rights reserved.
|
|
248
|
+
*
|
|
249
|
+
* Author 2014-2019, Yury Strozhevsky
|
|
250
|
+
*
|
|
251
|
+
* Redistribution and use in source and binary forms, with or without modification,
|
|
252
|
+
* are permitted provided that the following conditions are met:
|
|
253
|
+
*
|
|
254
|
+
* * Redistributions of source code must retain the above copyright notice, this
|
|
255
|
+
* list of conditions and the following disclaimer.
|
|
256
|
+
*
|
|
257
|
+
* * Redistributions in binary form must reproduce the above copyright notice, this
|
|
258
|
+
* list of conditions and the following disclaimer in the documentation and/or
|
|
259
|
+
* other materials provided with the distribution.
|
|
260
|
+
*
|
|
261
|
+
* * Neither the name of the {organization} nor the names of its
|
|
262
|
+
* contributors may be used to endorse or promote products derived from
|
|
263
|
+
* this software without specific prior written permission.
|
|
264
|
+
*
|
|
265
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
266
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
267
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
268
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
269
|
+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
270
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
271
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
272
|
+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
273
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
274
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
275
|
+
*
|
|
276
|
+
*)
|
|
277
|
+
*/
|