@wix/cli-app 1.1.36 → 1.1.37
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/{CreateVersionCommand-GJYJMFS6.js → CreateVersionCommand-6EC4JSXM.js} +2 -2
- package/build/{CreateVersionCommand-GJYJMFS6.js.map → CreateVersionCommand-6EC4JSXM.js.map} +1 -1
- package/build/DevCommand-X6EMKMNL.js +4 -0
- package/build/DevCommand-X6EMKMNL.js.map +1 -0
- package/build/{GenerateCommand-YTAYOWLN.js → GenerateCommand-OMONJKBI.js} +22 -22
- package/build/GenerateCommand-OMONJKBI.js.map +1 -0
- package/build/{LogsCommand-ZWIIAJI6.js → LogsCommand-J2FI7ZFQ.js} +2 -2
- package/build/LogsCommand-J2FI7ZFQ.js.map +1 -0
- package/build/PreviewCommand-62VXVRKG.js +4 -0
- package/build/{ServeCommand-ZJMRR4ES.js → ServeCommand-MITPYVYW.js} +2 -2
- package/build/ServeCommand-MITPYVYW.js.map +1 -0
- package/build/{build-6EB3DE3E.js → build-QYESI24D.js} +2 -2
- package/build/{chunk-ZTMLHHUQ.js → chunk-22T5OFY2.js} +2 -2
- package/build/chunk-22T5OFY2.js.map +1 -0
- package/build/{chunk-E7IQZNJ7.js → chunk-2M3UC7RV.js} +2 -2
- package/build/{chunk-HNY5L6XA.js → chunk-7DTNPXX6.js} +2 -2
- package/build/{chunk-3UAIFRQA.js → chunk-CKCOR335.js} +2 -2
- package/build/chunk-CKCOR335.js.map +1 -0
- package/build/{chunk-JPGXKQXP.js → chunk-CXOD6WQ4.js} +1 -1
- package/build/chunk-CXOD6WQ4.js.map +1 -0
- package/build/{chunk-5POS3EQI.js → chunk-E6KVS4MA.js} +2 -2
- package/build/{chunk-I24C7SNY.js → chunk-EQUG3BNW.js} +2 -2
- package/build/{chunk-3ACKBLKR.js → chunk-FVAP6LIO.js} +2 -2
- package/build/{chunk-6N3YP4CO.js → chunk-HDM7FXQ2.js} +2 -2
- package/build/{chunk-TSKFLGBO.js → chunk-HMROXS2Y.js} +5 -5
- package/build/{chunk-TSKFLGBO.js.map → chunk-HMROXS2Y.js.map} +1 -1
- package/build/{chunk-OMZB4UKG.js → chunk-JA2XJ7LG.js} +2 -2
- package/build/{chunk-OOIZVKTY.js → chunk-KEE43HZL.js} +2 -2
- package/build/chunk-KEE43HZL.js.map +1 -0
- package/build/{chunk-KX7T4WP2.js → chunk-PVYYLEXH.js} +2 -2
- package/build/chunk-PVYYLEXH.js.map +1 -0
- package/build/chunk-QCRAQWKR.js +11 -0
- package/build/chunk-QCRAQWKR.js.map +1 -0
- package/build/{chunk-3EO7KOOF.js → chunk-RPHPWNCA.js} +2 -2
- package/build/chunk-T3M3WLBF.js +4 -0
- package/build/chunk-T3M3WLBF.js.map +1 -0
- package/build/chunk-U6DFVNFC.js +4 -0
- package/build/chunk-U6DFVNFC.js.map +1 -0
- package/build/chunk-XFE6VTSD.js +233 -0
- package/build/chunk-XFE6VTSD.js.map +1 -0
- package/build/{chunk-PQFAL6B4.js → chunk-XMBKXITX.js} +2 -2
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/platform-sdk/editor.js +2 -2
- package/build/platform-sdk/editor.js.map +1 -1
- package/build/platform-sdk/site.js +1 -1
- package/build/platform-sdk/site.js.map +1 -1
- package/build/preview-YWEFS3GP.js +4 -0
- package/build/{preview-OUDOPVIF.js.map → preview-YWEFS3GP.js.map} +1 -1
- package/build/render-command-QQQFQTR7.js +4 -0
- package/build/render-command-QQQFQTR7.js.map +1 -0
- package/package.json +7 -4
- package/templates/custom-element/dependencies.json +1 -2
- package/templates/custom-element/files/element.tsx.ejs +8 -5
- package/templates/custom-element/files/panel.tsx.ejs +26 -32
- package/templates/dashboard-modal/dependencies.json +2 -3
- package/templates/dashboard-modal/files/modal.tsx.ejs +11 -16
- package/templates/dashboard-page/dependencies.json +1 -3
- package/templates/dashboard-page/files/page.tsx.ejs +7 -11
- package/templates/dashboard-plugin/dependencies.json +1 -3
- package/templates/dashboard-plugin/files/plugin.tsx.ejs +6 -10
- package/build/DevCommand-UJ56EKIV.js +0 -4
- package/build/DevCommand-UJ56EKIV.js.map +0 -1
- package/build/GenerateCommand-YTAYOWLN.js.map +0 -1
- package/build/LogsCommand-ZWIIAJI6.js.map +0 -1
- package/build/PreviewCommand-7JJAW5Y4.js +0 -4
- package/build/ServeCommand-ZJMRR4ES.js.map +0 -1
- package/build/chunk-3UAIFRQA.js.map +0 -1
- package/build/chunk-5GXRNUOR.js +0 -201
- package/build/chunk-5GXRNUOR.js.map +0 -1
- package/build/chunk-AXFFV5MU.js +0 -4
- package/build/chunk-AXFFV5MU.js.map +0 -1
- package/build/chunk-DAPZQSXG.js +0 -11
- package/build/chunk-DAPZQSXG.js.map +0 -1
- package/build/chunk-JPGXKQXP.js.map +0 -1
- package/build/chunk-KX7T4WP2.js.map +0 -1
- package/build/chunk-OOIZVKTY.js.map +0 -1
- package/build/chunk-SLG2HQYB.js +0 -4
- package/build/chunk-SLG2HQYB.js.map +0 -1
- package/build/chunk-ZTMLHHUQ.js.map +0 -1
- package/build/preview-OUDOPVIF.js +0 -4
- package/build/render-command-URXJKFYN.js +0 -4
- package/build/render-command-URXJKFYN.js.map +0 -1
- /package/build/{PreviewCommand-7JJAW5Y4.js.map → PreviewCommand-62VXVRKG.js.map} +0 -0
- /package/build/{build-6EB3DE3E.js.map → build-QYESI24D.js.map} +0 -0
- /package/build/{chunk-E7IQZNJ7.js.map → chunk-2M3UC7RV.js.map} +0 -0
- /package/build/{chunk-HNY5L6XA.js.map → chunk-7DTNPXX6.js.map} +0 -0
- /package/build/{chunk-5POS3EQI.js.map → chunk-E6KVS4MA.js.map} +0 -0
- /package/build/{chunk-I24C7SNY.js.map → chunk-EQUG3BNW.js.map} +0 -0
- /package/build/{chunk-3ACKBLKR.js.map → chunk-FVAP6LIO.js.map} +0 -0
- /package/build/{chunk-6N3YP4CO.js.map → chunk-HDM7FXQ2.js.map} +0 -0
- /package/build/{chunk-OMZB4UKG.js.map → chunk-JA2XJ7LG.js.map} +0 -0
- /package/build/{chunk-3EO7KOOF.js.map → chunk-RPHPWNCA.js.map} +0 -0
- /package/build/{chunk-PQFAL6B4.js.map → chunk-XMBKXITX.js.map} +0 -0
package/build/chunk-5GXRNUOR.js
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { createRequire as _createRequire } from 'node:module';
|
|
2
|
-
const require = _createRequire(import.meta.url);
|
|
3
|
-
import{$a as lo,Za as oo,_a as uo,bb as cn,ca as io,db as Ai,eb as Ci,fb as fn,ga as ao,gb as co,h as eo,ha as no,hb as fo,i as to,q as ro,ua as so,xa as yi,ya as ln,za as mi}from"./chunk-TSKFLGBO.js";import{b as Zs,d as Gr,e as jr}from"./chunk-JPGXKQXP.js";import{a as Le,c as F,e as ra,h as S}from"./chunk-V4TR6DCM.js";var Et=F(mn=>{"use strict";S();mn.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((i,r)=>{e.call(this,...t,(a,n)=>a!=null?r(a):i(n))})},"name",{value:e.name})};mn.fromPromise=function(e){return Object.defineProperty(function(...t){let i=t[t.length-1];if(typeof i!="function")return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(r=>i(null,r),i)},"name",{value:e.name})}});var Ao=F((_A,mo)=>{"use strict";S();var hr=Le("constants"),yh=process.cwd,na=null,mh=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return na||(na=yh.call(process)),na};try{process.cwd()}catch{}typeof process.chdir=="function"&&(An=process.chdir,process.chdir=function(e){na=null,An.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,An));var An;mo.exports=Ah;function Ah(e){hr.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||i(e),e.chown=n(e.chown),e.fchown=n(e.fchown),e.lchown=n(e.lchown),e.chmod=r(e.chmod),e.fchmod=r(e.fchmod),e.lchmod=r(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(c,f,p){p&&process.nextTick(p)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(c,f,p,m){m&&process.nextTick(m)},e.lchownSync=function(){}),mh==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(c){function f(p,m,v){var C=Date.now(),E=0;c(p,m,function B(w){if(w&&(w.code==="EACCES"||w.code==="EPERM"||w.code==="EBUSY")&&Date.now()-C<6e4){setTimeout(function(){e.stat(m,function(T,U){T&&T.code==="ENOENT"?c(p,m,B):v(w)})},E),E<100&&(E+=10);return}v&&v(w)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,c),f}(e.rename)),e.read=typeof e.read!="function"?e.read:function(c){function f(p,m,v,C,E,B){var w;if(B&&typeof B=="function"){var T=0;w=function(U,P,Q){if(U&&U.code==="EAGAIN"&&T<10)return T++,c.call(e,p,m,v,C,E,w);B.apply(this,arguments)}}return c.call(e,p,m,v,C,E,w)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,c),f}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(c){return function(f,p,m,v,C){for(var E=0;;)try{return c.call(e,f,p,m,v,C)}catch(B){if(B.code==="EAGAIN"&&E<10){E++;continue}throw B}}}(e.readSync);function t(c){c.lchmod=function(f,p,m){c.open(f,hr.O_WRONLY|hr.O_SYMLINK,p,function(v,C){if(v){m&&m(v);return}c.fchmod(C,p,function(E){c.close(C,function(B){m&&m(E||B)})})})},c.lchmodSync=function(f,p){var m=c.openSync(f,hr.O_WRONLY|hr.O_SYMLINK,p),v=!0,C;try{C=c.fchmodSync(m,p),v=!1}finally{if(v)try{c.closeSync(m)}catch{}else c.closeSync(m)}return C}}function i(c){hr.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(f,p,m,v){c.open(f,hr.O_SYMLINK,function(C,E){if(C){v&&v(C);return}c.futimes(E,p,m,function(B){c.close(E,function(w){v&&v(B||w)})})})},c.lutimesSync=function(f,p,m){var v=c.openSync(f,hr.O_SYMLINK),C,E=!0;try{C=c.futimesSync(v,p,m),E=!1}finally{if(E)try{c.closeSync(v)}catch{}else c.closeSync(v)}return C}):c.futimes&&(c.lutimes=function(f,p,m,v){v&&process.nextTick(v)},c.lutimesSync=function(){})}function r(c){return c&&function(f,p,m){return c.call(e,f,p,function(v){l(v)&&(v=null),m&&m.apply(this,arguments)})}}function a(c){return c&&function(f,p){try{return c.call(e,f,p)}catch(m){if(!l(m))throw m}}}function n(c){return c&&function(f,p,m,v){return c.call(e,f,p,m,function(C){l(C)&&(C=null),v&&v.apply(this,arguments)})}}function s(c){return c&&function(f,p,m){try{return c.call(e,f,p,m)}catch(v){if(!l(v))throw v}}}function o(c){return c&&function(f,p,m){typeof p=="function"&&(m=p,p=null);function v(C,E){E&&(E.uid<0&&(E.uid+=4294967296),E.gid<0&&(E.gid+=4294967296)),m&&m.apply(this,arguments)}return p?c.call(e,f,p,v):c.call(e,f,v)}}function u(c){return c&&function(f,p){var m=p?c.call(e,f,p):c.call(e,f);return m&&(m.uid<0&&(m.uid+=4294967296),m.gid<0&&(m.gid+=4294967296)),m}}function l(c){if(!c||c.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var xo=F((kA,Eo)=>{"use strict";S();var Co=Le("stream").Stream;Eo.exports=Ch;function Ch(e){return{ReadStream:t,WriteStream:i};function t(r,a){if(!(this instanceof t))return new t(r,a);Co.call(this);var n=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var s=Object.keys(a),o=0,u=s.length;o<u;o++){var l=s[o];this[l]=a[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){n._read()});return}e.open(this.path,this.flags,this.mode,function(c,f){if(c){n.emit("error",c),n.readable=!1;return}n.fd=f,n.emit("open",f),n._read()})}function i(r,a){if(!(this instanceof i))return new i(r,a);Co.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var n=Object.keys(a),s=0,o=n.length;s<o;s++){var u=n[s];this[u]=a[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Io=F((RA,So)=>{"use strict";S();So.exports=xh;var Eh=Object.getPrototypeOf||function(e){return e.__proto__};function xh(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Eh(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}});var dt=F((PA,xn)=>{"use strict";S();var Qe=Le("fs"),Sh=Ao(),Ih=xo(),Bh=Io(),sa=Le("util"),Je,ua;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Je=Symbol.for("graceful-fs.queue"),ua=Symbol.for("graceful-fs.previous")):(Je="___graceful-fs.queue",ua="___graceful-fs.previous");function bh(){}function To(e,t){Object.defineProperty(e,Je,{get:function(){return t}})}var Rr=bh;sa.debuglog?Rr=sa.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Rr=function(){var e=sa.format.apply(sa,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
4
|
-
GFS4: `),console.error(e)});Qe[Je]||(Bo=global[Je]||[],To(Qe,Bo),Qe.close=function(e){function t(i,r){return e.call(Qe,i,function(a){a||bo(),typeof r=="function"&&r.apply(this,arguments)})}return Object.defineProperty(t,ua,{value:e}),t}(Qe.close),Qe.closeSync=function(e){function t(i){e.apply(Qe,arguments),bo()}return Object.defineProperty(t,ua,{value:e}),t}(Qe.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Rr(Qe[Je]),Le("assert").equal(Qe[Je].length,0)}));var Bo;global[Je]||To(global,Qe[Je]);xn.exports=Cn(Bh(Qe));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Qe.__patched&&(xn.exports=Cn(Qe),Qe.__patched=!0);function Cn(e){Sh(e),e.gracefulify=Cn,e.createReadStream=P,e.createWriteStream=Q;var t=e.readFile;e.readFile=i;function i(H,z,Y){return typeof z=="function"&&(Y=z,z=null),re(H,z,Y);function re(ye,Ee,$,ie){return t(ye,Ee,function(V){V&&(V.code==="EMFILE"||V.code==="ENFILE")?zr([re,[ye,Ee,$],V,ie||Date.now(),Date.now()]):typeof $=="function"&&$.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=a;function a(H,z,Y,re){return typeof Y=="function"&&(re=Y,Y=null),ye(H,z,Y,re);function ye(Ee,$,ie,V,_e){return r(Ee,$,ie,function(xe){xe&&(xe.code==="EMFILE"||xe.code==="ENFILE")?zr([ye,[Ee,$,ie,V],xe,_e||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}var n=e.appendFile;n&&(e.appendFile=s);function s(H,z,Y,re){return typeof Y=="function"&&(re=Y,Y=null),ye(H,z,Y,re);function ye(Ee,$,ie,V,_e){return n(Ee,$,ie,function(xe){xe&&(xe.code==="EMFILE"||xe.code==="ENFILE")?zr([ye,[Ee,$,ie,V],xe,_e||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}var o=e.copyFile;o&&(e.copyFile=u);function u(H,z,Y,re){return typeof Y=="function"&&(re=Y,Y=0),ye(H,z,Y,re);function ye(Ee,$,ie,V,_e){return o(Ee,$,ie,function(xe){xe&&(xe.code==="EMFILE"||xe.code==="ENFILE")?zr([ye,[Ee,$,ie,V],xe,_e||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}var l=e.readdir;e.readdir=f;var c=/^v[0-5]\./;function f(H,z,Y){typeof z=="function"&&(Y=z,z=null);var re=c.test(process.version)?function($,ie,V,_e){return l($,ye($,ie,V,_e))}:function($,ie,V,_e){return l($,ie,ye($,ie,V,_e))};return re(H,z,Y);function ye(Ee,$,ie,V){return function(_e,xe){_e&&(_e.code==="EMFILE"||_e.code==="ENFILE")?zr([re,[Ee,$,ie],_e,V||Date.now(),Date.now()]):(xe&&xe.sort&&xe.sort(),typeof ie=="function"&&ie.call(this,_e,xe))}}}if(process.version.substr(0,4)==="v0.8"){var p=Ih(e);B=p.ReadStream,T=p.WriteStream}var m=e.ReadStream;m&&(B.prototype=Object.create(m.prototype),B.prototype.open=w);var v=e.WriteStream;v&&(T.prototype=Object.create(v.prototype),T.prototype.open=U),Object.defineProperty(e,"ReadStream",{get:function(){return B},set:function(H){B=H},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return T},set:function(H){T=H},enumerable:!0,configurable:!0});var C=B;Object.defineProperty(e,"FileReadStream",{get:function(){return C},set:function(H){C=H},enumerable:!0,configurable:!0});var E=T;Object.defineProperty(e,"FileWriteStream",{get:function(){return E},set:function(H){E=H},enumerable:!0,configurable:!0});function B(H,z){return this instanceof B?(m.apply(this,arguments),this):B.apply(Object.create(B.prototype),arguments)}function w(){var H=this;ne(H.path,H.flags,H.mode,function(z,Y){z?(H.autoClose&&H.destroy(),H.emit("error",z)):(H.fd=Y,H.emit("open",Y),H.read())})}function T(H,z){return this instanceof T?(v.apply(this,arguments),this):T.apply(Object.create(T.prototype),arguments)}function U(){var H=this;ne(H.path,H.flags,H.mode,function(z,Y){z?(H.destroy(),H.emit("error",z)):(H.fd=Y,H.emit("open",Y))})}function P(H,z){return new e.ReadStream(H,z)}function Q(H,z){return new e.WriteStream(H,z)}var te=e.open;e.open=ne;function ne(H,z,Y,re){return typeof Y=="function"&&(re=Y,Y=null),ye(H,z,Y,re);function ye(Ee,$,ie,V,_e){return te(Ee,$,ie,function(xe,Oe){xe&&(xe.code==="EMFILE"||xe.code==="ENFILE")?zr([ye,[Ee,$,ie,V],xe,_e||Date.now(),Date.now()]):typeof V=="function"&&V.apply(this,arguments)})}}return e}function zr(e){Rr("ENQUEUE",e[0].name,e[1]),Qe[Je].push(e),En()}var oa;function bo(){for(var e=Date.now(),t=0;t<Qe[Je].length;++t)Qe[Je][t].length>2&&(Qe[Je][t][3]=e,Qe[Je][t][4]=e);En()}function En(){if(clearTimeout(oa),oa=void 0,Qe[Je].length!==0){var e=Qe[Je].shift(),t=e[0],i=e[1],r=e[2],a=e[3],n=e[4];if(a===void 0)Rr("RETRY",t.name,i),t.apply(null,i);else if(Date.now()-a>=6e4){Rr("TIMEOUT",t.name,i);var s=i.pop();typeof s=="function"&&s.call(null,r)}else{var o=Date.now()-n,u=Math.max(n-a,1),l=Math.min(u*1.2,100);o>=l?(Rr("RETRY",t.name,i),t.apply(null,i.concat([a]))):Qe[Je].push(e)}oa===void 0&&(oa=setTimeout(En,0))}}});var Dr=F(pr=>{"use strict";S();var wo=Et().fromCallback,xt=dt(),Th=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof xt[e]=="function");Object.assign(pr,xt);Th.forEach(e=>{pr[e]=wo(xt[e])});pr.exists=function(e,t){return typeof t=="function"?xt.exists(e,t):new Promise(i=>xt.exists(e,i))};pr.read=function(e,t,i,r,a,n){return typeof n=="function"?xt.read(e,t,i,r,a,n):new Promise((s,o)=>{xt.read(e,t,i,r,a,(u,l,c)=>{if(u)return o(u);s({bytesRead:l,buffer:c})})})};pr.write=function(e,t,...i){return typeof i[i.length-1]=="function"?xt.write(e,t,...i):new Promise((r,a)=>{xt.write(e,t,...i,(n,s,o)=>{if(n)return a(n);r({bytesWritten:s,buffer:o})})})};typeof xt.writev=="function"&&(pr.writev=function(e,t,...i){return typeof i[i.length-1]=="function"?xt.writev(e,t,...i):new Promise((r,a)=>{xt.writev(e,t,...i,(n,s,o)=>{if(n)return a(n);r({bytesWritten:s,buffers:o})})})});typeof xt.realpath.native=="function"?pr.realpath.native=wo(xt.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var No=F((VA,_o)=>{"use strict";S();var wh=Le("path");_o.exports.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(wh.parse(t).root,""))){let r=new Error(`Path contains invalid characters: ${t}`);throw r.code="EINVAL",r}}});var Do=F((MA,Sn)=>{"use strict";S();var ko=Dr(),{checkPath:Lo}=No(),Ro=e=>{let t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};Sn.exports.makeDir=async(e,t)=>(Lo(e),ko.mkdir(e,{mode:Ro(t),recursive:!0}));Sn.exports.makeDirSync=(e,t)=>(Lo(e),ko.mkdirSync(e,{mode:Ro(t),recursive:!0}))});var Mt=F((KA,Po)=>{"use strict";S();var _h=Et().fromPromise,{makeDir:Nh,makeDirSync:In}=Do(),Bn=_h(Nh);Po.exports={mkdirs:Bn,mkdirsSync:In,mkdirp:Bn,mkdirpSync:In,ensureDir:Bn,ensureDirSync:In}});var dr=F((GA,Uo)=>{"use strict";S();var kh=Et().fromPromise,Qo=Dr();function Lh(e){return Qo.access(e).then(()=>!0).catch(()=>!1)}Uo.exports={pathExists:kh(Lh),pathExistsSync:Qo.existsSync}});var bn=F((YA,Oo)=>{"use strict";S();var Jr=dt();function Rh(e,t,i,r){Jr.open(e,"r+",(a,n)=>{if(a)return r(a);Jr.futimes(n,t,i,s=>{Jr.close(n,o=>{r&&r(s||o)})})})}function Dh(e,t,i){let r=Jr.openSync(e,"r+");return Jr.futimesSync(r,t,i),Jr.closeSync(r)}Oo.exports={utimesMillis:Rh,utimesMillisSync:Dh}});var Pr=F((JA,Mo)=>{"use strict";S();var Wr=Dr(),Ke=Le("path"),Ph=Le("util");function Qh(e,t,i){let r=i.dereference?a=>Wr.stat(a,{bigint:!0}):a=>Wr.lstat(a,{bigint:!0});return Promise.all([r(e),r(t).catch(a=>{if(a.code==="ENOENT")return null;throw a})]).then(([a,n])=>({srcStat:a,destStat:n}))}function Uh(e,t,i){let r,a=i.dereference?s=>Wr.statSync(s,{bigint:!0}):s=>Wr.lstatSync(s,{bigint:!0}),n=a(e);try{r=a(t)}catch(s){if(s.code==="ENOENT")return{srcStat:n,destStat:null};throw s}return{srcStat:n,destStat:r}}function Oh(e,t,i,r,a){Ph.callbackify(Qh)(e,t,r,(n,s)=>{if(n)return a(n);let{srcStat:o,destStat:u}=s;if(u){if(Bi(o,u)){let l=Ke.basename(e),c=Ke.basename(t);return i==="move"&&l!==c&&l.toLowerCase()===c.toLowerCase()?a(null,{srcStat:o,destStat:u,isChangingCase:!0}):a(new Error("Source and destination must not be the same."))}if(o.isDirectory()&&!u.isDirectory())return a(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!o.isDirectory()&&u.isDirectory())return a(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return o.isDirectory()&&Tn(e,t)?a(new Error(la(e,t,i))):a(null,{srcStat:o,destStat:u})})}function Vh(e,t,i,r){let{srcStat:a,destStat:n}=Uh(e,t,r);if(n){if(Bi(a,n)){let s=Ke.basename(e),o=Ke.basename(t);if(i==="move"&&s!==o&&s.toLowerCase()===o.toLowerCase())return{srcStat:a,destStat:n,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!n.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&n.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&Tn(e,t))throw new Error(la(e,t,i));return{srcStat:a,destStat:n}}function Vo(e,t,i,r,a){let n=Ke.resolve(Ke.dirname(e)),s=Ke.resolve(Ke.dirname(i));if(s===n||s===Ke.parse(s).root)return a();Wr.stat(s,{bigint:!0},(o,u)=>o?o.code==="ENOENT"?a():a(o):Bi(t,u)?a(new Error(la(e,i,r))):Vo(e,t,s,r,a))}function Fo(e,t,i,r){let a=Ke.resolve(Ke.dirname(e)),n=Ke.resolve(Ke.dirname(i));if(n===a||n===Ke.parse(n).root)return;let s;try{s=Wr.statSync(n,{bigint:!0})}catch(o){if(o.code==="ENOENT")return;throw o}if(Bi(t,s))throw new Error(la(e,i,r));return Fo(e,t,n,r)}function Bi(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Tn(e,t){let i=Ke.resolve(e).split(Ke.sep).filter(a=>a),r=Ke.resolve(t).split(Ke.sep).filter(a=>a);return i.reduce((a,n,s)=>a&&r[s]===n,!0)}function la(e,t,i){return`Cannot ${i} '${e}' to a subdirectory of itself, '${t}'.`}Mo.exports={checkPaths:Oh,checkPathsSync:Vh,checkParentPaths:Vo,checkParentPathsSync:Fo,isSrcSubdir:Tn,areIdentical:Bi}});var Jo=F((XA,zo)=>{"use strict";S();var St=dt(),bi=Le("path"),Fh=Mt().mkdirs,Mh=dr().pathExists,qh=bn().utimesMillis,Ti=Pr();function Kh(e,t,i,r){typeof i=="function"&&!r?(r=i,i={}):typeof i=="function"&&(i={filter:i}),r=r||function(){},i=i||{},i.clobber="clobber"in i?!!i.clobber:!0,i.overwrite="overwrite"in i?!!i.overwrite:i.clobber,i.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
5
|
-
|
|
6
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),Ti.checkPaths(e,t,"copy",i,(a,n)=>{if(a)return r(a);let{srcStat:s,destStat:o}=n;Ti.checkParentPaths(e,s,t,"copy",u=>u?r(u):i.filter?Ho(qo,o,e,t,i,r):qo(o,e,t,i,r))})}function qo(e,t,i,r,a){let n=bi.dirname(i);Mh(n,(s,o)=>{if(s)return a(s);if(o)return ca(e,t,i,r,a);Fh(n,u=>u?a(u):ca(e,t,i,r,a))})}function Ho(e,t,i,r,a,n){Promise.resolve(a.filter(i,r)).then(s=>s?e(t,i,r,a,n):n(),s=>n(s))}function Hh(e,t,i,r,a){return r.filter?Ho(ca,e,t,i,r,a):ca(e,t,i,r,a)}function ca(e,t,i,r,a){(r.dereference?St.stat:St.lstat)(t,(s,o)=>s?a(s):o.isDirectory()?Xh(o,e,t,i,r,a):o.isFile()||o.isCharacterDevice()||o.isBlockDevice()?Gh(o,e,t,i,r,a):o.isSymbolicLink()?ep(e,t,i,r,a):o.isSocket()?a(new Error(`Cannot copy a socket file: ${t}`)):o.isFIFO()?a(new Error(`Cannot copy a FIFO pipe: ${t}`)):a(new Error(`Unknown file: ${t}`)))}function Gh(e,t,i,r,a,n){return t?jh(e,i,r,a,n):Go(e,i,r,a,n)}function jh(e,t,i,r,a){if(r.overwrite)St.unlink(i,n=>n?a(n):Go(e,t,i,r,a));else return r.errorOnExist?a(new Error(`'${i}' already exists`)):a()}function Go(e,t,i,r,a){St.copyFile(t,i,n=>n?a(n):r.preserveTimestamps?Yh(e.mode,t,i,a):fa(i,e.mode,a))}function Yh(e,t,i,r){return zh(e)?Jh(i,e,a=>a?r(a):Ko(e,t,i,r)):Ko(e,t,i,r)}function zh(e){return(e&128)===0}function Jh(e,t,i){return fa(e,t|128,i)}function Ko(e,t,i,r){Wh(t,i,a=>a?r(a):fa(i,e,r))}function fa(e,t,i){return St.chmod(e,t,i)}function Wh(e,t,i){St.stat(e,(r,a)=>r?i(r):qh(t,a.atime,a.mtime,i))}function Xh(e,t,i,r,a,n){return t?jo(i,r,a,n):$h(e.mode,i,r,a,n)}function $h(e,t,i,r,a){St.mkdir(i,n=>{if(n)return a(n);jo(t,i,r,s=>s?a(s):fa(i,e,a))})}function jo(e,t,i,r){St.readdir(e,(a,n)=>a?r(a):Yo(n,e,t,i,r))}function Yo(e,t,i,r,a){let n=e.pop();return n?Zh(e,n,t,i,r,a):a()}function Zh(e,t,i,r,a,n){let s=bi.join(i,t),o=bi.join(r,t);Ti.checkPaths(s,o,"copy",a,(u,l)=>{if(u)return n(u);let{destStat:c}=l;Hh(c,s,o,a,f=>f?n(f):Yo(e,i,r,a,n))})}function ep(e,t,i,r,a){St.readlink(t,(n,s)=>{if(n)return a(n);if(r.dereference&&(s=bi.resolve(process.cwd(),s)),e)St.readlink(i,(o,u)=>o?o.code==="EINVAL"||o.code==="UNKNOWN"?St.symlink(s,i,a):a(o):(r.dereference&&(u=bi.resolve(process.cwd(),u)),Ti.isSrcSubdir(s,u)?a(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${u}'.`)):e.isDirectory()&&Ti.isSrcSubdir(u,s)?a(new Error(`Cannot overwrite '${u}' with '${s}'.`)):tp(s,i,a)));else return St.symlink(s,i,a)})}function tp(e,t,i){St.unlink(t,r=>r?i(r):St.symlink(e,t,i))}zo.exports=Kh});var eu=F((ZA,Zo)=>{"use strict";S();var pt=dt(),wi=Le("path"),rp=Mt().mkdirsSync,ip=bn().utimesMillisSync,_i=Pr();function ap(e,t,i){typeof i=="function"&&(i={filter:i}),i=i||{},i.clobber="clobber"in i?!!i.clobber:!0,i.overwrite="overwrite"in i?!!i.overwrite:i.clobber,i.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
7
|
-
|
|
8
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:r,destStat:a}=_i.checkPathsSync(e,t,"copy",i);return _i.checkParentPathsSync(e,r,t,"copy"),np(a,e,t,i)}function np(e,t,i,r){if(r.filter&&!r.filter(t,i))return;let a=wi.dirname(i);return pt.existsSync(a)||rp(a),Wo(e,t,i,r)}function sp(e,t,i,r){if(!(r.filter&&!r.filter(t,i)))return Wo(e,t,i,r)}function Wo(e,t,i,r){let n=(r.dereference?pt.statSync:pt.lstatSync)(t);if(n.isDirectory())return pp(n,e,t,i,r);if(n.isFile()||n.isCharacterDevice()||n.isBlockDevice())return op(n,e,t,i,r);if(n.isSymbolicLink())return vp(e,t,i,r);throw n.isSocket()?new Error(`Cannot copy a socket file: ${t}`):n.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}function op(e,t,i,r,a){return t?up(e,i,r,a):Xo(e,i,r,a)}function up(e,t,i,r){if(r.overwrite)return pt.unlinkSync(i),Xo(e,t,i,r);if(r.errorOnExist)throw new Error(`'${i}' already exists`)}function Xo(e,t,i,r){return pt.copyFileSync(t,i),r.preserveTimestamps&&lp(e.mode,t,i),wn(i,e.mode)}function lp(e,t,i){return cp(e)&&fp(i,e),hp(t,i)}function cp(e){return(e&128)===0}function fp(e,t){return wn(e,t|128)}function wn(e,t){return pt.chmodSync(e,t)}function hp(e,t){let i=pt.statSync(e);return ip(t,i.atime,i.mtime)}function pp(e,t,i,r,a){return t?$o(i,r,a):dp(e.mode,i,r,a)}function dp(e,t,i,r){return pt.mkdirSync(i),$o(t,i,r),wn(i,e)}function $o(e,t,i){pt.readdirSync(e).forEach(r=>gp(r,e,t,i))}function gp(e,t,i,r){let a=wi.join(t,e),n=wi.join(i,e),{destStat:s}=_i.checkPathsSync(a,n,"copy",r);return sp(s,a,n,r)}function vp(e,t,i,r){let a=pt.readlinkSync(t);if(r.dereference&&(a=wi.resolve(process.cwd(),a)),e){let n;try{n=pt.readlinkSync(i)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return pt.symlinkSync(a,i);throw s}if(r.dereference&&(n=wi.resolve(process.cwd(),n)),_i.isSrcSubdir(a,n))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${n}'.`);if(pt.statSync(i).isDirectory()&&_i.isSrcSubdir(n,a))throw new Error(`Cannot overwrite '${n}' with '${a}'.`);return yp(a,i)}else return pt.symlinkSync(a,i)}function yp(e,t){return pt.unlinkSync(t),pt.symlinkSync(e,t)}Zo.exports=ap});var ha=F((t1,tu)=>{"use strict";S();var mp=Et().fromCallback;tu.exports={copy:mp(Jo()),copySync:eu()}});var cu=F((i1,lu)=>{"use strict";S();var ru=dt(),su=Le("path"),Be=Le("assert"),Ni=process.platform==="win32";function ou(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(i=>{e[i]=e[i]||ru[i],i=i+"Sync",e[i]=e[i]||ru[i]}),e.maxBusyTries=e.maxBusyTries||3}function _n(e,t,i){let r=0;typeof t=="function"&&(i=t,t={}),Be(e,"rimraf: missing path"),Be.strictEqual(typeof e,"string","rimraf: path should be a string"),Be.strictEqual(typeof i,"function","rimraf: callback function required"),Be(t,"rimraf: invalid options argument provided"),Be.strictEqual(typeof t,"object","rimraf: options should be object"),ou(t),iu(e,t,function a(n){if(n){if((n.code==="EBUSY"||n.code==="ENOTEMPTY"||n.code==="EPERM")&&r<t.maxBusyTries){r++;let s=r*100;return setTimeout(()=>iu(e,t,a),s)}n.code==="ENOENT"&&(n=null)}i(n)})}function iu(e,t,i){Be(e),Be(t),Be(typeof i=="function"),t.lstat(e,(r,a)=>{if(r&&r.code==="ENOENT")return i(null);if(r&&r.code==="EPERM"&&Ni)return au(e,t,r,i);if(a&&a.isDirectory())return pa(e,t,r,i);t.unlink(e,n=>{if(n){if(n.code==="ENOENT")return i(null);if(n.code==="EPERM")return Ni?au(e,t,n,i):pa(e,t,n,i);if(n.code==="EISDIR")return pa(e,t,n,i)}return i(n)})})}function au(e,t,i,r){Be(e),Be(t),Be(typeof r=="function"),t.chmod(e,438,a=>{a?r(a.code==="ENOENT"?null:i):t.stat(e,(n,s)=>{n?r(n.code==="ENOENT"?null:i):s.isDirectory()?pa(e,t,i,r):t.unlink(e,r)})})}function nu(e,t,i){let r;Be(e),Be(t);try{t.chmodSync(e,438)}catch(a){if(a.code==="ENOENT")return;throw i}try{r=t.statSync(e)}catch(a){if(a.code==="ENOENT")return;throw i}r.isDirectory()?da(e,t,i):t.unlinkSync(e)}function pa(e,t,i,r){Be(e),Be(t),Be(typeof r=="function"),t.rmdir(e,a=>{a&&(a.code==="ENOTEMPTY"||a.code==="EEXIST"||a.code==="EPERM")?Ap(e,t,r):a&&a.code==="ENOTDIR"?r(i):r(a)})}function Ap(e,t,i){Be(e),Be(t),Be(typeof i=="function"),t.readdir(e,(r,a)=>{if(r)return i(r);let n=a.length,s;if(n===0)return t.rmdir(e,i);a.forEach(o=>{_n(su.join(e,o),t,u=>{if(!s){if(u)return i(s=u);--n===0&&t.rmdir(e,i)}})})})}function uu(e,t){let i;t=t||{},ou(t),Be(e,"rimraf: missing path"),Be.strictEqual(typeof e,"string","rimraf: path should be a string"),Be(t,"rimraf: missing options"),Be.strictEqual(typeof t,"object","rimraf: options should be object");try{i=t.lstatSync(e)}catch(r){if(r.code==="ENOENT")return;r.code==="EPERM"&&Ni&&nu(e,t,r)}try{i&&i.isDirectory()?da(e,t,null):t.unlinkSync(e)}catch(r){if(r.code==="ENOENT")return;if(r.code==="EPERM")return Ni?nu(e,t,r):da(e,t,r);if(r.code!=="EISDIR")throw r;da(e,t,r)}}function da(e,t,i){Be(e),Be(t);try{t.rmdirSync(e)}catch(r){if(r.code==="ENOTDIR")throw i;if(r.code==="ENOTEMPTY"||r.code==="EEXIST"||r.code==="EPERM")Cp(e,t);else if(r.code!=="ENOENT")throw r}}function Cp(e,t){if(Be(e),Be(t),t.readdirSync(e).forEach(i=>uu(su.join(e,i),t)),Ni){let i=Date.now();do try{return t.rmdirSync(e,t)}catch{}while(Date.now()-i<500)}else return t.rmdirSync(e,t)}lu.exports=_n;_n.sync=uu});var ki=F((n1,hu)=>{"use strict";S();var ga=dt(),Ep=Et().fromCallback,fu=cu();function xp(e,t){if(ga.rm)return ga.rm(e,{recursive:!0,force:!0},t);fu(e,t)}function Sp(e){if(ga.rmSync)return ga.rmSync(e,{recursive:!0,force:!0});fu.sync(e)}hu.exports={remove:Ep(xp),removeSync:Sp}});var Cu=F((o1,Au)=>{"use strict";S();var Ip=Et().fromPromise,gu=Dr(),vu=Le("path"),yu=Mt(),mu=ki(),pu=Ip(async function(t){let i;try{i=await gu.readdir(t)}catch{return yu.mkdirs(t)}return Promise.all(i.map(r=>mu.remove(vu.join(t,r))))});function du(e){let t;try{t=gu.readdirSync(e)}catch{return yu.mkdirsSync(e)}t.forEach(i=>{i=vu.join(e,i),mu.removeSync(i)})}Au.exports={emptyDirSync:du,emptydirSync:du,emptyDir:pu,emptydir:pu}});var Iu=F((l1,Su)=>{"use strict";S();var Bp=Et().fromCallback,Eu=Le("path"),gr=dt(),xu=Mt();function bp(e,t){function i(){gr.writeFile(e,"",r=>{if(r)return t(r);t()})}gr.stat(e,(r,a)=>{if(!r&&a.isFile())return t();let n=Eu.dirname(e);gr.stat(n,(s,o)=>{if(s)return s.code==="ENOENT"?xu.mkdirs(n,u=>{if(u)return t(u);i()}):t(s);o.isDirectory()?i():gr.readdir(n,u=>{if(u)return t(u)})})})}function Tp(e){let t;try{t=gr.statSync(e)}catch{}if(t&&t.isFile())return;let i=Eu.dirname(e);try{gr.statSync(i).isDirectory()||gr.readdirSync(i)}catch(r){if(r&&r.code==="ENOENT")xu.mkdirsSync(i);else throw r}gr.writeFileSync(e,"")}Su.exports={createFile:Bp(bp),createFileSync:Tp}});var _u=F((f1,wu)=>{"use strict";S();var wp=Et().fromCallback,Bu=Le("path"),vr=dt(),bu=Mt(),_p=dr().pathExists,{areIdentical:Tu}=Pr();function Np(e,t,i){function r(a,n){vr.link(a,n,s=>{if(s)return i(s);i(null)})}vr.lstat(t,(a,n)=>{vr.lstat(e,(s,o)=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),i(s);if(n&&Tu(o,n))return i(null);let u=Bu.dirname(t);_p(u,(l,c)=>{if(l)return i(l);if(c)return r(e,t);bu.mkdirs(u,f=>{if(f)return i(f);r(e,t)})})})})}function kp(e,t){let i;try{i=vr.lstatSync(t)}catch{}try{let n=vr.lstatSync(e);if(i&&Tu(n,i))return}catch(n){throw n.message=n.message.replace("lstat","ensureLink"),n}let r=Bu.dirname(t);return vr.existsSync(r)||bu.mkdirsSync(r),vr.linkSync(e,t)}wu.exports={createLink:wp(Np),createLinkSync:kp}});var ku=F((p1,Nu)=>{"use strict";S();var yr=Le("path"),Li=dt(),Lp=dr().pathExists;function Rp(e,t,i){if(yr.isAbsolute(e))return Li.lstat(e,r=>r?(r.message=r.message.replace("lstat","ensureSymlink"),i(r)):i(null,{toCwd:e,toDst:e}));{let r=yr.dirname(t),a=yr.join(r,e);return Lp(a,(n,s)=>n?i(n):s?i(null,{toCwd:a,toDst:e}):Li.lstat(e,o=>o?(o.message=o.message.replace("lstat","ensureSymlink"),i(o)):i(null,{toCwd:e,toDst:yr.relative(r,e)})))}}function Dp(e,t){let i;if(yr.isAbsolute(e)){if(i=Li.existsSync(e),!i)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{let r=yr.dirname(t),a=yr.join(r,e);if(i=Li.existsSync(a),i)return{toCwd:a,toDst:e};if(i=Li.existsSync(e),!i)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:yr.relative(r,e)}}}Nu.exports={symlinkPaths:Rp,symlinkPathsSync:Dp}});var Du=F((g1,Ru)=>{"use strict";S();var Lu=dt();function Pp(e,t,i){if(i=typeof t=="function"?t:i,t=typeof t=="function"?!1:t,t)return i(null,t);Lu.lstat(e,(r,a)=>{if(r)return i(null,"file");t=a&&a.isDirectory()?"dir":"file",i(null,t)})}function Qp(e,t){let i;if(t)return t;try{i=Lu.lstatSync(e)}catch{return"file"}return i&&i.isDirectory()?"dir":"file"}Ru.exports={symlinkType:Pp,symlinkTypeSync:Qp}});var qu=F((y1,Mu)=>{"use strict";S();var Up=Et().fromCallback,Qu=Le("path"),qt=Dr(),Uu=Mt(),Op=Uu.mkdirs,Vp=Uu.mkdirsSync,Ou=ku(),Fp=Ou.symlinkPaths,Mp=Ou.symlinkPathsSync,Vu=Du(),qp=Vu.symlinkType,Kp=Vu.symlinkTypeSync,Hp=dr().pathExists,{areIdentical:Fu}=Pr();function Gp(e,t,i,r){r=typeof i=="function"?i:r,i=typeof i=="function"?!1:i,qt.lstat(t,(a,n)=>{!a&&n.isSymbolicLink()?Promise.all([qt.stat(e),qt.stat(t)]).then(([s,o])=>{if(Fu(s,o))return r(null);Pu(e,t,i,r)}):Pu(e,t,i,r)})}function Pu(e,t,i,r){Fp(e,t,(a,n)=>{if(a)return r(a);e=n.toDst,qp(n.toCwd,i,(s,o)=>{if(s)return r(s);let u=Qu.dirname(t);Hp(u,(l,c)=>{if(l)return r(l);if(c)return qt.symlink(e,t,o,r);Op(u,f=>{if(f)return r(f);qt.symlink(e,t,o,r)})})})})}function jp(e,t,i){let r;try{r=qt.lstatSync(t)}catch{}if(r&&r.isSymbolicLink()){let o=qt.statSync(e),u=qt.statSync(t);if(Fu(o,u))return}let a=Mp(e,t);e=a.toDst,i=Kp(a.toCwd,i);let n=Qu.dirname(t);return qt.existsSync(n)||Vp(n),qt.symlinkSync(e,t,i)}Mu.exports={createSymlink:Up(Gp),createSymlinkSync:jp}});var Wu=F((A1,Ju)=>{"use strict";S();var{createFile:Ku,createFileSync:Hu}=Iu(),{createLink:Gu,createLinkSync:ju}=_u(),{createSymlink:Yu,createSymlinkSync:zu}=qu();Ju.exports={createFile:Ku,createFileSync:Hu,ensureFile:Ku,ensureFileSync:Hu,createLink:Gu,createLinkSync:ju,ensureLink:Gu,ensureLinkSync:ju,createSymlink:Yu,createSymlinkSync:zu,ensureSymlink:Yu,ensureSymlinkSync:zu}});var va=F((E1,Xu)=>{"use strict";S();function Yp(e,{EOL:t=`
|
|
9
|
-
`,finalEOL:i=!0,replacer:r=null,spaces:a}={}){let n=i?t:"";return JSON.stringify(e,r,a).replace(/\n/g,t)+n}function zp(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}Xu.exports={stringify:Yp,stripBom:zp}});var tl=F((S1,el)=>{"use strict";S();var Xr;try{Xr=dt()}catch{Xr=Le("fs")}var ya=Et(),{stringify:$u,stripBom:Zu}=va();async function Jp(e,t={}){typeof t=="string"&&(t={encoding:t});let i=t.fs||Xr,r="throws"in t?t.throws:!0,a=await ya.fromCallback(i.readFile)(e,t);a=Zu(a);let n;try{n=JSON.parse(a,t?t.reviver:null)}catch(s){if(r)throw s.message=`${e}: ${s.message}`,s;return null}return n}var Wp=ya.fromPromise(Jp);function Xp(e,t={}){typeof t=="string"&&(t={encoding:t});let i=t.fs||Xr,r="throws"in t?t.throws:!0;try{let a=i.readFileSync(e,t);return a=Zu(a),JSON.parse(a,t.reviver)}catch(a){if(r)throw a.message=`${e}: ${a.message}`,a;return null}}async function $p(e,t,i={}){let r=i.fs||Xr,a=$u(t,i);await ya.fromCallback(r.writeFile)(e,a,i)}var Zp=ya.fromPromise($p);function ed(e,t,i={}){let r=i.fs||Xr,a=$u(t,i);return r.writeFileSync(e,a,i)}var td={readFile:Wp,readFileSync:Xp,writeFile:Zp,writeFileSync:ed};el.exports=td});var il=F((B1,rl)=>{"use strict";S();var ma=tl();rl.exports={readJson:ma.readFile,readJsonSync:ma.readFileSync,writeJson:ma.writeFile,writeJsonSync:ma.writeFileSync}});var Aa=F((T1,sl)=>{"use strict";S();var rd=Et().fromCallback,Ri=dt(),al=Le("path"),nl=Mt(),id=dr().pathExists;function ad(e,t,i,r){typeof i=="function"&&(r=i,i="utf8");let a=al.dirname(e);id(a,(n,s)=>{if(n)return r(n);if(s)return Ri.writeFile(e,t,i,r);nl.mkdirs(a,o=>{if(o)return r(o);Ri.writeFile(e,t,i,r)})})}function nd(e,...t){let i=al.dirname(e);if(Ri.existsSync(i))return Ri.writeFileSync(e,...t);nl.mkdirsSync(i),Ri.writeFileSync(e,...t)}sl.exports={outputFile:rd(ad),outputFileSync:nd}});var ul=F((_1,ol)=>{"use strict";S();var{stringify:sd}=va(),{outputFile:od}=Aa();async function ud(e,t,i={}){let r=sd(t,i);await od(e,r,i)}ol.exports=ud});var cl=F((k1,ll)=>{"use strict";S();var{stringify:ld}=va(),{outputFileSync:cd}=Aa();function fd(e,t,i){let r=ld(t,i);cd(e,r,i)}ll.exports=fd});var hl=F((R1,fl)=>{"use strict";S();var hd=Et().fromPromise,gt=il();gt.outputJson=hd(ul());gt.outputJsonSync=cl();gt.outputJSON=gt.outputJson;gt.outputJSONSync=gt.outputJsonSync;gt.writeJSON=gt.writeJson;gt.writeJSONSync=gt.writeJsonSync;gt.readJSON=gt.readJson;gt.readJSONSync=gt.readJsonSync;fl.exports=gt});var yl=F((P1,vl)=>{"use strict";S();var pd=dt(),kn=Le("path"),dd=ha().copy,gl=ki().remove,gd=Mt().mkdirp,vd=dr().pathExists,pl=Pr();function yd(e,t,i,r){typeof i=="function"&&(r=i,i={}),i=i||{};let a=i.overwrite||i.clobber||!1;pl.checkPaths(e,t,"move",i,(n,s)=>{if(n)return r(n);let{srcStat:o,isChangingCase:u=!1}=s;pl.checkParentPaths(e,o,t,"move",l=>{if(l)return r(l);if(md(t))return dl(e,t,a,u,r);gd(kn.dirname(t),c=>c?r(c):dl(e,t,a,u,r))})})}function md(e){let t=kn.dirname(e);return kn.parse(t).root===t}function dl(e,t,i,r,a){if(r)return Nn(e,t,i,a);if(i)return gl(t,n=>n?a(n):Nn(e,t,i,a));vd(t,(n,s)=>n?a(n):s?a(new Error("dest already exists.")):Nn(e,t,i,a))}function Nn(e,t,i,r){pd.rename(e,t,a=>a?a.code!=="EXDEV"?r(a):Ad(e,t,i,r):r())}function Ad(e,t,i,r){dd(e,t,{overwrite:i,errorOnExist:!0},n=>n?r(n):gl(e,r))}vl.exports=yd});var xl=F((U1,El)=>{"use strict";S();var Al=dt(),Rn=Le("path"),Cd=ha().copySync,Cl=ki().removeSync,Ed=Mt().mkdirpSync,ml=Pr();function xd(e,t,i){i=i||{};let r=i.overwrite||i.clobber||!1,{srcStat:a,isChangingCase:n=!1}=ml.checkPathsSync(e,t,"move",i);return ml.checkParentPathsSync(e,a,t,"move"),Sd(t)||Ed(Rn.dirname(t)),Id(e,t,r,n)}function Sd(e){let t=Rn.dirname(e);return Rn.parse(t).root===t}function Id(e,t,i,r){if(r)return Ln(e,t,i);if(i)return Cl(t),Ln(e,t,i);if(Al.existsSync(t))throw new Error("dest already exists.");return Ln(e,t,i)}function Ln(e,t,i){try{Al.renameSync(e,t)}catch(r){if(r.code!=="EXDEV")throw r;return Bd(e,t,i)}}function Bd(e,t,i){return Cd(e,t,{overwrite:i,errorOnExist:!0}),Cl(e)}El.exports=xd});var Il=F((V1,Sl)=>{"use strict";S();var bd=Et().fromCallback;Sl.exports={move:bd(yl()),moveSync:xl()}});var bl=F((M1,Bl)=>{"use strict";S();Bl.exports={...Dr(),...ha(),...Cu(),...Wu(),...hl(),...Mt(),...Il(),...Aa(),...dr(),...ki()}});var oe=F((_C,Qc)=>{"use strict";S();Qc.exports={options:{usePureJavaScript:!1}}});var Vc=F((kC,Oc)=>{"use strict";S();var Jn={};Oc.exports=Jn;var Uc={};Jn.encode=function(e,t,i){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(i!==void 0&&typeof i!="number")throw new TypeError('"maxline" must be a number.');var r="";if(!(e instanceof Uint8Array))r=vg(e,t);else{var a=0,n=t.length,s=t.charAt(0),o=[0];for(a=0;a<e.length;++a){for(var u=0,l=e[a];u<o.length;++u)l+=o[u]<<8,o[u]=l%n,l=l/n|0;for(;l>0;)o.push(l%n),l=l/n|0}for(a=0;e[a]===0&&a<e.length-1;++a)r+=s;for(a=o.length-1;a>=0;--a)r+=t[o[a]]}if(i){var c=new RegExp(".{1,"+i+"}","g");r=r.match(c).join(`\r
|
|
10
|
-
`)}return r};Jn.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var i=Uc[t];if(!i){i=Uc[t]=[];for(var r=0;r<t.length;++r)i[t.charCodeAt(r)]=r}e=e.replace(/\s/g,"");for(var a=t.length,n=t.charAt(0),s=[0],r=0;r<e.length;r++){var o=i[e.charCodeAt(r)];if(o===void 0)return;for(var u=0,l=o;u<s.length;++u)l+=s[u]*a,s[u]=l&255,l>>=8;for(;l>0;)s.push(l&255),l>>=8}for(var c=0;e[c]===n&&c<e.length-1;++c)s.push(0);return typeof Buffer<"u"?Buffer.from(s.reverse()):new Uint8Array(s.reverse())};function vg(e,t){var i=0,r=t.length,a=t.charAt(0),n=[0];for(i=0;i<e.length();++i){for(var s=0,o=e.at(i);s<n.length;++s)o+=n[s]<<8,n[s]=o%r,o=o/r|0;for(;o>0;)n.push(o%r),o=o/r|0}var u="";for(i=0;e.at(i)===0&&i<e.length()-1;++i)u+=a;for(i=n.length-1;i>=0;--i)u+=t[n[i]];return u}});var Ae=F((RC,Kc)=>{"use strict";S();var Fc=oe(),Mc=Vc(),I=Kc.exports=Fc.util=Fc.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){I.nextTick=process.nextTick,typeof setImmediate=="function"?I.setImmediate=setImmediate:I.setImmediate=I.nextTick;return}if(typeof setImmediate=="function"){I.setImmediate=function(){return setImmediate.apply(void 0,arguments)},I.nextTick=function(o){return setImmediate(o)};return}if(I.setImmediate=function(o){setTimeout(o,0)},typeof window<"u"&&typeof window.postMessage=="function"){let o=function(u){if(u.source===window&&u.data===e){u.stopPropagation();var l=t.slice();t.length=0,l.forEach(function(c){c()})}};var s=o,e="forge.setImmediate",t=[];I.setImmediate=function(u){t.push(u),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",o,!0)}if(typeof MutationObserver<"u"){var i=Date.now(),r=!0,a=document.createElement("div"),t=[];new MutationObserver(function(){var u=t.slice();t.length=0,u.forEach(function(l){l()})}).observe(a,{attributes:!0});var n=I.setImmediate;I.setImmediate=function(u){Date.now()-i>15?(i=Date.now(),n(u)):(t.push(u),t.length===1&&a.setAttribute("a",r=!r))}}I.nextTick=I.setImmediate})();I.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;I.globalScope=function(){return I.isNodejs?global:typeof self>"u"?window:self}();I.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};I.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer};I.isArrayBufferView=function(e){return e&&I.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function Mi(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}I.ByteBuffer=Wn;function Wn(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(I.isArrayBuffer(e)||I.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var i=0;i<t.length;++i)this.putByte(t[i])}}else(e instanceof Wn||typeof e=="object"&&typeof e.data=="string"&&typeof e.read=="number")&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}I.ByteStringBuffer=Wn;var yg=4096;I.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>yg&&(this.data.substr(0,1),this._constructedStringLength=0)};I.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};I.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};I.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))};I.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var i=this.data;t>0;)t&1&&(i+=e),t>>>=1,t>0&&(e+=e);return this.data=i,this._optimizeConstructedString(t),this};I.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this};I.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(I.encodeUtf8(e))};I.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};I.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};I.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};I.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))};I.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))};I.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))};I.ByteStringBuffer.prototype.putInt=function(e,t){Mi(t);var i="";do t-=8,i+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(i)};I.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)};I.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())};I.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};I.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e};I.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e};I.ByteStringBuffer.prototype.getInt32=function(){var e=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,e};I.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e};I.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e};I.ByteStringBuffer.prototype.getInt32Le=function(){var e=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,e};I.ByteStringBuffer.prototype.getInt=function(e){Mi(e);var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),e-=8;while(e>0);return t};I.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),i=2<<e-2;return t>=i&&(t-=i<<1),t};I.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};I.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};I.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};I.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this};I.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};I.ByteStringBuffer.prototype.copy=function(){var e=I.createBuffer(this.data);return e.read=this.read,e};I.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};I.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};I.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this};I.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var i=this.data.charCodeAt(t);i<16&&(e+="0"),e+=i.toString(16)}return e};I.ByteStringBuffer.prototype.toString=function(){return I.decodeUtf8(this.bytes())};function mg(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var i=I.isArrayBuffer(e),r=I.isArrayBufferView(e);if(i||r){i?this.data=new DataView(e):this.data=new DataView(e.buffer,e.byteOffset,e.byteLength),this.write="writeOffset"in t?t.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,e!=null&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)}I.DataBuffer=mg;I.DataBuffer.prototype.length=function(){return this.write-this.read};I.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};I.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var i=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(i),this.data=new DataView(r.buffer),this};I.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this};I.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var i=0;i<t;++i)this.data.setUint8(e);return this};I.DataBuffer.prototype.putBytes=function(e,t){if(I.isArrayBufferView(e)){var i=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=i.byteLength-i.byteOffset;this.accommodate(r);var a=new Uint8Array(this.data.buffer,this.write);return a.set(i),this.write+=r,this}if(I.isArrayBuffer(e)){var i=new Uint8Array(e);this.accommodate(i.byteLength);var a=new Uint8Array(this.data.buffer);return a.set(i,this.write),this.write+=i.byteLength,this}if(e instanceof I.DataBuffer||typeof e=="object"&&typeof e.read=="number"&&typeof e.write=="number"&&I.isArrayBufferView(e.data)){var i=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(i.byteLength);var a=new Uint8Array(e.data.byteLength,this.write);return a.set(i),this.write+=i.byteLength,this}if(e instanceof I.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary",typeof e=="string"){var n;if(t==="hex")return this.accommodate(Math.ceil(e.length/2)),n=new Uint8Array(this.data.buffer,this.write),this.write+=I.binary.hex.decode(e,n,this.write),this;if(t==="base64")return this.accommodate(Math.ceil(e.length/4)*3),n=new Uint8Array(this.data.buffer,this.write),this.write+=I.binary.base64.decode(e,n,this.write),this;if(t==="utf8"&&(e=I.encodeUtf8(e),t="binary"),t==="binary"||t==="raw")return this.accommodate(e.length),n=new Uint8Array(this.data.buffer,this.write),this.write+=I.binary.raw.decode(n),this;if(t==="utf16")return this.accommodate(e.length*2),n=new Uint16Array(this.data.buffer,this.write),this.write+=I.text.utf16.encode(n),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)};I.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this};I.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")};I.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this};I.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this};I.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this};I.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this};I.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this};I.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this};I.DataBuffer.prototype.putInt=function(e,t){Mi(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this};I.DataBuffer.prototype.putSignedInt=function(e,t){return Mi(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)};I.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};I.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e};I.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e};I.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e};I.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e};I.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e};I.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e};I.DataBuffer.prototype.getInt=function(e){Mi(e);var t=0;do t=(t<<8)+this.data.getInt8(this.read++),e-=8;while(e>0);return t};I.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),i=2<<e-2;return t>=i&&(t-=i<<1),t};I.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};I.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};I.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)};I.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this};I.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};I.DataBuffer.prototype.copy=function(){return new I.DataBuffer(this)};I.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this};I.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};I.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this};I.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var i=this.data.getUint8(t);i<16&&(e+="0"),e+=i.toString(16)}return e};I.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if(e=e||"utf8",e==="binary"||e==="raw")return I.binary.raw.encode(t);if(e==="hex")return I.binary.hex.encode(t);if(e==="base64")return I.binary.base64.encode(t);if(e==="utf8")return I.text.utf8.decode(t);if(e==="utf16")return I.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)};I.createBuffer=function(e,t){return t=t||"raw",e!==void 0&&t==="utf8"&&(e=I.encodeUtf8(e)),new I.ByteBuffer(e)};I.fillString=function(e,t){for(var i="";t>0;)t&1&&(i+=e),t>>>=1,t>0&&(e+=e);return i};I.xorBytes=function(e,t,i){for(var r="",a="",n="",s=0,o=0;i>0;--i,++s)a=e.charCodeAt(s)^t.charCodeAt(s),o>=10&&(r+=n,n="",o=0),n+=String.fromCharCode(a),++o;return r+=n,r};I.hexToBytes=function(e){var t="",i=0;for(e.length&!0&&(i=1,t+=String.fromCharCode(parseInt(e[0],16)));i<e.length;i+=2)t+=String.fromCharCode(parseInt(e.substr(i,2),16));return t};I.bytesToHex=function(e){return I.createBuffer(e).toHex()};I.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var xr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Sr=[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],qc="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";I.encode64=function(e,t){for(var i="",r="",a,n,s,o=0;o<e.length;)a=e.charCodeAt(o++),n=e.charCodeAt(o++),s=e.charCodeAt(o++),i+=xr.charAt(a>>2),i+=xr.charAt((a&3)<<4|n>>4),isNaN(n)?i+="==":(i+=xr.charAt((n&15)<<2|s>>6),i+=isNaN(s)?"=":xr.charAt(s&63)),t&&i.length>t&&(r+=i.substr(0,t)+`\r
|
|
11
|
-
`,i=i.substr(t));return r+=i,r};I.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",i,r,a,n,s=0;s<e.length;)i=Sr[e.charCodeAt(s++)-43],r=Sr[e.charCodeAt(s++)-43],a=Sr[e.charCodeAt(s++)-43],n=Sr[e.charCodeAt(s++)-43],t+=String.fromCharCode(i<<2|r>>4),a!==64&&(t+=String.fromCharCode((r&15)<<4|a>>2),n!==64&&(t+=String.fromCharCode((a&3)<<6|n)));return t};I.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};I.decodeUtf8=function(e){return decodeURIComponent(escape(e))};I.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:Mc.encode,decode:Mc.decode}};I.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)};I.binary.raw.decode=function(e,t,i){var r=t;r||(r=new Uint8Array(e.length)),i=i||0;for(var a=i,n=0;n<e.length;++n)r[a++]=e.charCodeAt(n);return t?a-i:r};I.binary.hex.encode=I.bytesToHex;I.binary.hex.decode=function(e,t,i){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/2))),i=i||0;var a=0,n=i;for(e.length&1&&(a=1,r[n++]=parseInt(e[0],16));a<e.length;a+=2)r[n++]=parseInt(e.substr(a,2),16);return t?n-i:r};I.binary.base64.encode=function(e,t){for(var i="",r="",a,n,s,o=0;o<e.byteLength;)a=e[o++],n=e[o++],s=e[o++],i+=xr.charAt(a>>2),i+=xr.charAt((a&3)<<4|n>>4),isNaN(n)?i+="==":(i+=xr.charAt((n&15)<<2|s>>6),i+=isNaN(s)?"=":xr.charAt(s&63)),t&&i.length>t&&(r+=i.substr(0,t)+`\r
|
|
12
|
-
`,i=i.substr(t));return r+=i,r};I.binary.base64.decode=function(e,t,i){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),i=i||0;for(var a,n,s,o,u=0,l=i;u<e.length;)a=Sr[e.charCodeAt(u++)-43],n=Sr[e.charCodeAt(u++)-43],s=Sr[e.charCodeAt(u++)-43],o=Sr[e.charCodeAt(u++)-43],r[l++]=a<<2|n>>4,s!==64&&(r[l++]=(n&15)<<4|s>>2,o!==64&&(r[l++]=(s&3)<<6|o));return t?l-i:r.subarray(0,l)};I.binary.base58.encode=function(e,t){return I.binary.baseN.encode(e,qc,t)};I.binary.base58.decode=function(e,t){return I.binary.baseN.decode(e,qc,t)};I.text={utf8:{},utf16:{}};I.text.utf8.encode=function(e,t,i){e=I.encodeUtf8(e);var r=t;r||(r=new Uint8Array(e.length)),i=i||0;for(var a=i,n=0;n<e.length;++n)r[a++]=e.charCodeAt(n);return t?a-i:r};I.text.utf8.decode=function(e){return I.decodeUtf8(String.fromCharCode.apply(null,e))};I.text.utf16.encode=function(e,t,i){var r=t;r||(r=new Uint8Array(e.length*2));var a=new Uint16Array(r.buffer);i=i||0;for(var n=i,s=i,o=0;o<e.length;++o)a[s++]=e.charCodeAt(o),n+=2;return t?n-i:r};I.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))};I.deflate=function(e,t,i){if(t=I.decode64(e.deflate(I.encode64(t)).rval),i){var r=2,a=t.charCodeAt(1);a&32&&(r=6),t=t.substring(r,t.length-4)}return t};I.inflate=function(e,t,i){var r=e.inflate(I.encode64(t)).rval;return r===null?null:I.decode64(r)};var Xn=function(e,t,i){if(!e)throw new Error("WebStorage not available.");var r;if(i===null?r=e.removeItem(t):(i=I.encode64(JSON.stringify(i)),r=e.setItem(t,i)),typeof r<"u"&&r.rval!==!0){var a=new Error(r.error.message);throw a.id=r.error.id,a.name=r.error.name,a}},$n=function(e,t){if(!e)throw new Error("WebStorage not available.");var i=e.getItem(t);if(e.init)if(i.rval===null){if(i.error){var r=new Error(i.error.message);throw r.id=i.error.id,r.name=i.error.name,r}i=null}else i=i.rval;return i!==null&&(i=JSON.parse(I.decode64(i))),i},Ag=function(e,t,i,r){var a=$n(e,t);a===null&&(a={}),a[i]=r,Xn(e,t,a)},Cg=function(e,t,i){var r=$n(e,t);return r!==null&&(r=i in r?r[i]:null),r},Eg=function(e,t,i){var r=$n(e,t);if(r!==null&&i in r){delete r[i];var a=!0;for(var n in r){a=!1;break}a&&(r=null),Xn(e,t,r)}},xg=function(e,t){Xn(e,t,null)},Na=function(e,t,i){var r=null;typeof i>"u"&&(i=["web","flash"]);var a,n=!1,s=null;for(var o in i){a=i[o];try{if(a==="flash"||a==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");r=e.apply(this,t),n=a==="flash"}(a==="web"||a==="both")&&(t[0]=localStorage,r=e.apply(this,t),n=!0)}catch(u){s=u}if(n)break}if(!n)throw s;return r};I.setItem=function(e,t,i,r,a){Na(Ag,arguments,a)};I.getItem=function(e,t,i,r){return Na(Cg,arguments,r)};I.removeItem=function(e,t,i,r){Na(Eg,arguments,r)};I.clearItems=function(e,t,i){Na(xg,arguments,i)};I.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0};I.format=function(e){for(var t=/%./g,i,r,a=0,n=[],s=0;i=t.exec(e);){r=e.substring(s,t.lastIndex-2),r.length>0&&n.push(r),s=t.lastIndex;var o=i[0][1];switch(o){case"s":case"o":a<arguments.length?n.push(arguments[a+++1]):n.push("<?>");break;case"%":n.push("%");break;default:n.push("<%"+o+"?>")}}return n.push(e.substring(s)),n.join("")};I.formatNumber=function(e,t,i,r){var a=e,n=isNaN(t=Math.abs(t))?2:t,s=i===void 0?",":i,o=r===void 0?".":r,u=a<0?"-":"",l=parseInt(a=Math.abs(+a||0).toFixed(n),10)+"",c=l.length>3?l.length%3:0;return u+(c?l.substr(0,c)+o:"")+l.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+o)+(n?s+Math.abs(a-l).toFixed(n).slice(2):"")};I.formatSize=function(e){return e>=1073741824?e=I.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=I.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=I.formatNumber(e/1024,0)+" KiB":e=I.formatNumber(e,0)+" bytes",e};I.bytesFromIP=function(e){return e.indexOf(".")!==-1?I.bytesFromIPv4(e):e.indexOf(":")!==-1?I.bytesFromIPv6(e):null};I.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=I.createBuffer(),i=0;i<e.length;++i){var r=parseInt(e[i],10);if(isNaN(r))return null;t.putByte(r)}return t.getBytes()};I.bytesFromIPv6=function(e){var t=0;e=e.split(":").filter(function(s){return s.length===0&&++t,!0});for(var i=(8-e.length+t)*2,r=I.createBuffer(),a=0;a<8;++a){if(!e[a]||e[a].length===0){r.fillWithByte(0,i),i=0;continue}var n=I.hexToBytes(e[a]);n.length<2&&r.putByte(0),r.putBytes(n)}return r.getBytes()};I.bytesToIP=function(e){return e.length===4?I.bytesToIPv4(e):e.length===16?I.bytesToIPv6(e):null};I.bytesToIPv4=function(e){if(e.length!==4)return null;for(var t=[],i=0;i<e.length;++i)t.push(e.charCodeAt(i));return t.join(".")};I.bytesToIPv6=function(e){if(e.length!==16)return null;for(var t=[],i=[],r=0,a=0;a<e.length;a+=2){for(var n=I.bytesToHex(e[a]+e[a+1]);n[0]==="0"&&n!=="0";)n=n.substr(1);if(n==="0"){var s=i[i.length-1],o=t.length;!s||o!==s.end+1?i.push({start:o,end:o}):(s.end=o,s.end-s.start>i[r].end-i[r].start&&(r=i.length-1))}t.push(n)}if(i.length>0){var u=i[r];u.end-u.start>0&&(t.splice(u.start,u.end-u.start+1,""),u.start===0&&t.unshift(""),u.end===7&&t.push(""))}return t.join(":")};I.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in I&&!e.update)return t(null,I.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return I.cores=navigator.hardwareConcurrency,t(null,I.cores);if(typeof Worker>"u")return I.cores=1,t(null,I.cores);if(typeof Blob>"u")return I.cores=2,t(null,I.cores);var i=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(s){for(var o=Date.now(),u=o+4;Date.now()<u;);self.postMessage({st:o,et:u})})}.toString(),")()"],{type:"application/javascript"}));r([],5,16);function r(s,o,u){if(o===0){var l=Math.floor(s.reduce(function(c,f){return c+f},0)/s.length);return I.cores=Math.max(1,l),URL.revokeObjectURL(i),t(null,I.cores)}a(u,function(c,f){s.push(n(u,f)),r(s,o-1,u)})}function a(s,o){for(var u=[],l=[],c=0;c<s;++c){var f=new Worker(i);f.addEventListener("message",function(p){if(l.push(p.data),l.length===s){for(var m=0;m<s;++m)u[m].terminate();o(null,l)}}),u.push(f)}for(var c=0;c<s;++c)u[c].postMessage(c)}function n(s,o){for(var u=[],l=0;l<s;++l)for(var c=o[l],f=u[l]=[],p=0;p<s;++p)if(l!==p){var m=o[p];(c.st>m.st&&c.st<m.et||m.st>c.st&&m.st<c.et)&&f.push(p)}return u.reduce(function(v,C){return Math.max(v,C.length)},0)}}});var ka=F((PC,Hc)=>{"use strict";S();var He=oe();Ae();Hc.exports=He.cipher=He.cipher||{};He.cipher.algorithms=He.cipher.algorithms||{};He.cipher.createCipher=function(e,t){var i=e;if(typeof i=="string"&&(i=He.cipher.getAlgorithm(i),i&&(i=i())),!i)throw new Error("Unsupported algorithm: "+e);return new He.cipher.BlockCipher({algorithm:i,key:t,decrypt:!1})};He.cipher.createDecipher=function(e,t){var i=e;if(typeof i=="string"&&(i=He.cipher.getAlgorithm(i),i&&(i=i())),!i)throw new Error("Unsupported algorithm: "+e);return new He.cipher.BlockCipher({algorithm:i,key:t,decrypt:!0})};He.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),He.cipher.algorithms[e]=t};He.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in He.cipher.algorithms?He.cipher.algorithms[e]:null};var Zn=He.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};Zn.prototype.start=function(e){e=e||{};var t={};for(var i in e)t[i]=e[i];t.decrypt=this._decrypt,this._finish=!1,this._input=He.util.createBuffer(),this.output=e.output||He.util.createBuffer(),this.mode.start(t)};Zn.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};Zn.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(i){return e(this.blockSize,i,!1)},this.mode.unpad=function(i){return e(this.blockSize,i,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))}});var ts=F((UC,Gc)=>{"use strict";S();var Ge=oe();Ae();Ge.cipher=Ge.cipher||{};var le=Gc.exports=Ge.cipher.modes=Ge.cipher.modes||{};le.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};le.ecb.prototype.start=function(e){};le.ecb.prototype.encrypt=function(e,t,i){if(e.length()<this.blockSize&&!(i&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])};le.ecb.prototype.decrypt=function(e,t,i){if(e.length()<this.blockSize&&!(i&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])};le.ecb.prototype.pad=function(e,t){var i=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(i,i),!0};le.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var i=e.length(),r=e.at(i-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)};le.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};le.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=La(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};le.cbc.prototype.encrypt=function(e,t,i){if(e.length()<this.blockSize&&!(i&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=this._prev[r]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r]);this._prev=this._outBlock};le.cbc.prototype.decrypt=function(e,t,i){if(e.length()<this.blockSize&&!(i&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._prev[r]^this._outBlock[r]);this._prev=this._inBlock.slice(0)};le.cbc.prototype.pad=function(e,t){var i=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(i,i),!0};le.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var i=e.length(),r=e.at(i-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)};le.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Ge.util.createBuffer(),this._partialBytes=0};le.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=La(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};le.cfb.prototype.encrypt=function(e,t,i){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var a=0;a<this._ints;++a)this._inBlock[a]=e.getInt32()^this._outBlock[a],t.putInt32(this._inBlock[a]);return}var n=(this.blockSize-r)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var a=0;a<this._ints;++a)this._partialBlock[a]=e.getInt32()^this._outBlock[a],this._partialOutput.putInt32(this._partialBlock[a]);if(n>0)e.read-=this.blockSize;else for(var a=0;a<this._ints;++a)this._inBlock[a]=this._partialBlock[a];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};le.cfb.prototype.decrypt=function(e,t,i){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var a=0;a<this._ints;++a)this._inBlock[a]=e.getInt32(),t.putInt32(this._inBlock[a]^this._outBlock[a]);return}var n=(this.blockSize-r)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var a=0;a<this._ints;++a)this._partialBlock[a]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[a]^this._outBlock[a]);if(n>0)e.read-=this.blockSize;else for(var a=0;a<this._ints;++a)this._inBlock[a]=this._partialBlock[a];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};le.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ge.util.createBuffer(),this._partialBytes=0};le.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=La(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};le.ofb.prototype.encrypt=function(e,t,i){var r=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var a=0;a<this._ints;++a)t.putInt32(e.getInt32()^this._outBlock[a]),this._inBlock[a]=this._outBlock[a];return}var n=(this.blockSize-r)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var a=0;a<this._ints;++a)this._partialOutput.putInt32(e.getInt32()^this._outBlock[a]);if(n>0)e.read-=this.blockSize;else for(var a=0;a<this._ints;++a)this._inBlock[a]=this._outBlock[a];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0};le.ofb.prototype.decrypt=le.ofb.prototype.encrypt;le.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Ge.util.createBuffer(),this._partialBytes=0};le.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=La(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};le.ctr.prototype.encrypt=function(e,t,i){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize)for(var a=0;a<this._ints;++a)t.putInt32(e.getInt32()^this._outBlock[a]);else{var n=(this.blockSize-r)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var a=0;a<this._ints;++a)this._partialOutput.putInt32(e.getInt32()^this._outBlock[a]);if(n>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}Ra(this._inBlock)};le.ctr.prototype.decrypt=le.ctr.prototype.encrypt;le.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Ge.util.createBuffer(),this._partialBytes=0,this._R=3774873600};le.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=Ge.util.createBuffer(e.iv);this._cipherLength=0;var i;if("additionalData"in e?i=Ge.util.createBuffer(e.additionalData):i=Ge.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=Ge.util.createBuffer(e.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 r=t.length();if(r===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(es(r*8)))}this._inBlock=this._j0.slice(0),Ra(this._inBlock),this._partialBytes=0,i=Ge.util.createBuffer(i),this._aDataLength=es(i.length()*8);var a=i.length()%this.blockSize;for(a&&i.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];i.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[i.getInt32(),i.getInt32(),i.getInt32(),i.getInt32()])};le.gcm.prototype.encrypt=function(e,t,i){var r=e.length();if(r===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&r>=this.blockSize){for(var a=0;a<this._ints;++a)t.putInt32(this._outBlock[a]^=e.getInt32());this._cipherLength+=this.blockSize}else{var n=(this.blockSize-r)%this.blockSize;n>0&&(n=this.blockSize-n),this._partialOutput.clear();for(var a=0;a<this._ints;++a)this._partialOutput.putInt32(e.getInt32()^this._outBlock[a]);if(n<=0||i){if(i){var s=r%this.blockSize;this._cipherLength+=s,this._partialOutput.truncate(this.blockSize-s)}else this._cipherLength+=this.blockSize;for(var a=0;a<this._ints;++a)this._outBlock[a]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),n>0&&!i)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=n,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),Ra(this._inBlock)};le.gcm.prototype.decrypt=function(e,t,i){var r=e.length();if(r<this.blockSize&&!(i&&r>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),Ra(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var a=0;a<this._ints;++a)t.putInt32(this._outBlock[a]^this._hashBlock[a]);r<this.blockSize?this._cipherLength+=r%this.blockSize:this._cipherLength+=this.blockSize};le.gcm.prototype.afterFinish=function(e,t){var i=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=Ge.util.createBuffer();var r=this._aDataLength.concat(es(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,r);var a=[];this.cipher.encrypt(this._j0,a);for(var n=0;n<this._ints;++n)this.tag.putInt32(this._s[n]^a[n]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(i=!1),i};le.gcm.prototype.multiply=function(e,t){for(var i=[0,0,0,0],r=t.slice(0),a=0;a<128;++a){var n=e[a/32|0]&1<<31-a%32;n&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),this.pow(r,r)}return i};le.gcm.prototype.pow=function(e,t){for(var i=e[3]&1,r=3;r>0;--r)t[r]=e[r]>>>1|(e[r-1]&1)<<31;t[0]=e[0]>>>1,i&&(t[0]^=this._R)};le.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],i=0;i<32;++i){var r=i/8|0,a=e[r]>>>(7-i%8)*4&15,n=this._m[i][a];t[0]^=n[0],t[1]^=n[1],t[2]^=n[2],t[3]^=n[3]}return t};le.gcm.prototype.ghash=function(e,t,i){return t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3],this.tableMultiply(t)};le.gcm.prototype.generateHashTable=function(e,t){for(var i=8/t,r=4*i,a=16*i,n=new Array(a),s=0;s<a;++s){var o=[0,0,0,0],u=s/r|0,l=(r-1-s%r)*t;o[u]=1<<t-1<<l,n[s]=this.generateSubHashTable(this.multiply(o,e),t)}return n};le.gcm.prototype.generateSubHashTable=function(e,t){var i=1<<t,r=i>>>1,a=new Array(i);a[r]=e.slice(0);for(var n=r>>>1;n>0;)this.pow(a[2*n],a[n]=[]),n>>=1;for(n=2;n<r;){for(var s=1;s<n;++s){var o=a[n],u=a[s];a[n+s]=[o[0]^u[0],o[1]^u[1],o[2]^u[2],o[3]^u[3]]}n*=2}for(a[0]=[0,0,0,0],n=r+1;n<i;++n){var l=a[n^r];a[n]=[e[0]^l[0],e[1]^l[1],e[2]^l[2],e[3]^l[3]]}return a};function La(e,t){if(typeof e=="string"&&(e=Ge.util.createBuffer(e)),Ge.util.isArray(e)&&e.length>4){var i=e;e=Ge.util.createBuffer();for(var r=0;r<i.length;++r)e.putByte(i[r])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!Ge.util.isArray(e)){for(var a=[],n=t/4,r=0;r<n;++r)a.push(e.getInt32());e=a}return e}function Ra(e){e[e.length-1]=e[e.length-1]+1&4294967295}function es(e){return[e/4294967296|0,e&4294967295]}});var Ir=F((VC,Jc)=>{"use strict";S();var Te=oe();ka();ts();Ae();Jc.exports=Te.aes=Te.aes||{};Te.aes.startEncrypting=function(e,t,i,r){var a=Da({key:e,output:i,decrypt:!1,mode:r});return a.start(t),a};Te.aes.createEncryptionCipher=function(e,t){return Da({key:e,output:null,decrypt:!1,mode:t})};Te.aes.startDecrypting=function(e,t,i,r){var a=Da({key:e,output:i,decrypt:!0,mode:r});return a.start(t),a};Te.aes.createDecryptionCipher=function(e,t){return Da({key:e,output:null,decrypt:!0,mode:t})};Te.aes.Algorithm=function(e,t){as||Yc();var i=this;i.name=e,i.mode=new t({blockSize:16,cipher:{encrypt:function(r,a){return is(i._w,r,a,!1)},decrypt:function(r,a){return is(i._w,r,a,!0)}}}),i._init=!1};Te.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,i;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=Te.util.createBuffer(t);else if(Te.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){i=t,t=Te.util.createBuffer();for(var r=0;r<i.length;++r)t.putByte(i[r])}if(!Te.util.isArray(t)){i=t,t=[];var a=i.length();if(a===16||a===24||a===32){a=a>>>2;for(var r=0;r<a;++r)t.push(i.getInt32())}}if(!Te.util.isArray(t)||!(t.length===4||t.length===6||t.length===8))throw new Error("Invalid key parameter.");var n=this.mode.name,s=["CFB","OFB","CTR","GCM"].indexOf(n)!==-1;this._w=zc(t,e.decrypt&&!s),this._init=!0}};Te.aes._expandKey=function(e,t){return as||Yc(),zc(e,t)};Te.aes._updateBlock=is;ii("AES-ECB",Te.cipher.modes.ecb);ii("AES-CBC",Te.cipher.modes.cbc);ii("AES-CFB",Te.cipher.modes.cfb);ii("AES-OFB",Te.cipher.modes.ofb);ii("AES-CTR",Te.cipher.modes.ctr);ii("AES-GCM",Te.cipher.modes.gcm);function ii(e,t){var i=function(){return new Te.aes.Algorithm(e,t)};Te.cipher.registerAlgorithm(e,i)}var as=!1,ri=4,yt,rs,jc,Qr,Ht;function Yc(){as=!0,jc=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;yt=new Array(256),rs=new Array(256),Qr=new Array(4),Ht=new Array(4);for(var t=0;t<4;++t)Qr[t]=new Array(256),Ht[t]=new Array(256);for(var i=0,r=0,a,n,s,o,u,l,c,t=0;t<256;++t){o=r^r<<1^r<<2^r<<3^r<<4,o=o>>8^o&255^99,yt[i]=o,rs[o]=i,u=e[o],a=e[i],n=e[a],s=e[n],l=u<<24^o<<16^o<<8^(o^u),c=(a^n^s)<<24^(i^s)<<16^(i^n^s)<<8^(i^a^s);for(var f=0;f<4;++f)Qr[f][i]=l,Ht[f][o]=c,l=l<<24|l>>>8,c=c<<24|c>>>8;i===0?i=r=1:(i=a^e[e[e[a^s]]],r^=e[e[r]])}}function zc(e,t){for(var i=e.slice(0),r,a=1,n=i.length,s=n+6+1,o=ri*s,u=n;u<o;++u)r=i[u-1],u%n===0?(r=yt[r>>>16&255]<<24^yt[r>>>8&255]<<16^yt[r&255]<<8^yt[r>>>24]^jc[a]<<24,a++):n>6&&u%n===4&&(r=yt[r>>>24]<<24^yt[r>>>16&255]<<16^yt[r>>>8&255]<<8^yt[r&255]),i[u]=i[u-n]^r;if(t){var l,c=Ht[0],f=Ht[1],p=Ht[2],m=Ht[3],v=i.slice(0);o=i.length;for(var u=0,C=o-ri;u<o;u+=ri,C-=ri)if(u===0||u===o-ri)v[u]=i[C],v[u+1]=i[C+3],v[u+2]=i[C+2],v[u+3]=i[C+1];else for(var E=0;E<ri;++E)l=i[C+E],v[u+(3&-E)]=c[yt[l>>>24]]^f[yt[l>>>16&255]]^p[yt[l>>>8&255]]^m[yt[l&255]];i=v}return i}function is(e,t,i,r){var a=e.length/4-1,n,s,o,u,l;r?(n=Ht[0],s=Ht[1],o=Ht[2],u=Ht[3],l=rs):(n=Qr[0],s=Qr[1],o=Qr[2],u=Qr[3],l=yt);var c,f,p,m,v,C,E;c=t[0]^e[0],f=t[r?3:1]^e[1],p=t[2]^e[2],m=t[r?1:3]^e[3];for(var B=3,w=1;w<a;++w)v=n[c>>>24]^s[f>>>16&255]^o[p>>>8&255]^u[m&255]^e[++B],C=n[f>>>24]^s[p>>>16&255]^o[m>>>8&255]^u[c&255]^e[++B],E=n[p>>>24]^s[m>>>16&255]^o[c>>>8&255]^u[f&255]^e[++B],m=n[m>>>24]^s[c>>>16&255]^o[f>>>8&255]^u[p&255]^e[++B],c=v,f=C,p=E;i[0]=l[c>>>24]<<24^l[f>>>16&255]<<16^l[p>>>8&255]<<8^l[m&255]^e[++B],i[r?3:1]=l[f>>>24]<<24^l[p>>>16&255]<<16^l[m>>>8&255]<<8^l[c&255]^e[++B],i[2]=l[p>>>24]<<24^l[m>>>16&255]<<16^l[c>>>8&255]<<8^l[f&255]^e[++B],i[r?1:3]=l[m>>>24]<<24^l[c>>>16&255]<<16^l[f>>>8&255]<<8^l[p&255]^e[++B]}function Da(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),i="AES-"+t,r;e.decrypt?r=Te.cipher.createDecipher(i,e.key):r=Te.cipher.createCipher(i,e.key);var a=r.start;return r.start=function(n,s){var o=null;s instanceof Te.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=n,a.call(r,s)},r}});var Br=F((MC,Wc)=>{"use strict";S();var qi=oe();qi.pki=qi.pki||{};var ns=Wc.exports=qi.pki.oids=qi.oids=qi.oids||{};function D(e,t){ns[e]=t,ns[t]=e}function Se(e,t){ns[e]=t}D("1.2.840.113549.1.1.1","rsaEncryption");D("1.2.840.113549.1.1.4","md5WithRSAEncryption");D("1.2.840.113549.1.1.5","sha1WithRSAEncryption");D("1.2.840.113549.1.1.7","RSAES-OAEP");D("1.2.840.113549.1.1.8","mgf1");D("1.2.840.113549.1.1.9","pSpecified");D("1.2.840.113549.1.1.10","RSASSA-PSS");D("1.2.840.113549.1.1.11","sha256WithRSAEncryption");D("1.2.840.113549.1.1.12","sha384WithRSAEncryption");D("1.2.840.113549.1.1.13","sha512WithRSAEncryption");D("1.3.101.112","EdDSA25519");D("1.2.840.10040.4.3","dsa-with-sha1");D("1.3.14.3.2.7","desCBC");D("1.3.14.3.2.26","sha1");D("1.3.14.3.2.29","sha1WithRSASignature");D("2.16.840.1.101.3.4.2.1","sha256");D("2.16.840.1.101.3.4.2.2","sha384");D("2.16.840.1.101.3.4.2.3","sha512");D("2.16.840.1.101.3.4.2.4","sha224");D("2.16.840.1.101.3.4.2.5","sha512-224");D("2.16.840.1.101.3.4.2.6","sha512-256");D("1.2.840.113549.2.2","md2");D("1.2.840.113549.2.5","md5");D("1.2.840.113549.1.7.1","data");D("1.2.840.113549.1.7.2","signedData");D("1.2.840.113549.1.7.3","envelopedData");D("1.2.840.113549.1.7.4","signedAndEnvelopedData");D("1.2.840.113549.1.7.5","digestedData");D("1.2.840.113549.1.7.6","encryptedData");D("1.2.840.113549.1.9.1","emailAddress");D("1.2.840.113549.1.9.2","unstructuredName");D("1.2.840.113549.1.9.3","contentType");D("1.2.840.113549.1.9.4","messageDigest");D("1.2.840.113549.1.9.5","signingTime");D("1.2.840.113549.1.9.6","counterSignature");D("1.2.840.113549.1.9.7","challengePassword");D("1.2.840.113549.1.9.8","unstructuredAddress");D("1.2.840.113549.1.9.14","extensionRequest");D("1.2.840.113549.1.9.20","friendlyName");D("1.2.840.113549.1.9.21","localKeyId");D("1.2.840.113549.1.9.22.1","x509Certificate");D("1.2.840.113549.1.12.10.1.1","keyBag");D("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");D("1.2.840.113549.1.12.10.1.3","certBag");D("1.2.840.113549.1.12.10.1.4","crlBag");D("1.2.840.113549.1.12.10.1.5","secretBag");D("1.2.840.113549.1.12.10.1.6","safeContentsBag");D("1.2.840.113549.1.5.13","pkcs5PBES2");D("1.2.840.113549.1.5.12","pkcs5PBKDF2");D("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");D("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");D("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");D("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");D("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");D("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");D("1.2.840.113549.2.7","hmacWithSHA1");D("1.2.840.113549.2.8","hmacWithSHA224");D("1.2.840.113549.2.9","hmacWithSHA256");D("1.2.840.113549.2.10","hmacWithSHA384");D("1.2.840.113549.2.11","hmacWithSHA512");D("1.2.840.113549.3.7","des-EDE3-CBC");D("2.16.840.1.101.3.4.1.2","aes128-CBC");D("2.16.840.1.101.3.4.1.22","aes192-CBC");D("2.16.840.1.101.3.4.1.42","aes256-CBC");D("2.5.4.3","commonName");D("2.5.4.4","surname");D("2.5.4.5","serialNumber");D("2.5.4.6","countryName");D("2.5.4.7","localityName");D("2.5.4.8","stateOrProvinceName");D("2.5.4.9","streetAddress");D("2.5.4.10","organizationName");D("2.5.4.11","organizationalUnitName");D("2.5.4.12","title");D("2.5.4.13","description");D("2.5.4.15","businessCategory");D("2.5.4.17","postalCode");D("2.5.4.42","givenName");D("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");D("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");D("2.16.840.1.113730.1.1","nsCertType");D("2.16.840.1.113730.1.13","nsComment");Se("2.5.29.1","authorityKeyIdentifier");Se("2.5.29.2","keyAttributes");Se("2.5.29.3","certificatePolicies");Se("2.5.29.4","keyUsageRestriction");Se("2.5.29.5","policyMapping");Se("2.5.29.6","subtreesConstraint");Se("2.5.29.7","subjectAltName");Se("2.5.29.8","issuerAltName");Se("2.5.29.9","subjectDirectoryAttributes");Se("2.5.29.10","basicConstraints");Se("2.5.29.11","nameConstraints");Se("2.5.29.12","policyConstraints");Se("2.5.29.13","basicConstraints");D("2.5.29.14","subjectKeyIdentifier");D("2.5.29.15","keyUsage");Se("2.5.29.16","privateKeyUsagePeriod");D("2.5.29.17","subjectAltName");D("2.5.29.18","issuerAltName");D("2.5.29.19","basicConstraints");Se("2.5.29.20","cRLNumber");Se("2.5.29.21","cRLReason");Se("2.5.29.22","expirationDate");Se("2.5.29.23","instructionCode");Se("2.5.29.24","invalidityDate");Se("2.5.29.25","cRLDistributionPoints");Se("2.5.29.26","issuingDistributionPoint");Se("2.5.29.27","deltaCRLIndicator");Se("2.5.29.28","issuingDistributionPoint");Se("2.5.29.29","certificateIssuer");Se("2.5.29.30","nameConstraints");D("2.5.29.31","cRLDistributionPoints");D("2.5.29.32","certificatePolicies");Se("2.5.29.33","policyMappings");Se("2.5.29.34","policyConstraints");D("2.5.29.35","authorityKeyIdentifier");Se("2.5.29.36","policyConstraints");D("2.5.29.37","extKeyUsage");Se("2.5.29.46","freshestCRL");Se("2.5.29.54","inhibitAnyPolicy");D("1.3.6.1.4.1.11129.2.4.2","timestampList");D("1.3.6.1.5.5.7.1.1","authorityInfoAccess");D("1.3.6.1.5.5.7.3.1","serverAuth");D("1.3.6.1.5.5.7.3.2","clientAuth");D("1.3.6.1.5.5.7.3.3","codeSigning");D("1.3.6.1.5.5.7.3.4","emailProtection");D("1.3.6.1.5.5.7.3.8","timeStamping")});var Gt=F((KC,$c)=>{"use strict";S();var Ne=oe();Ae();Br();var q=$c.exports=Ne.asn1=Ne.asn1||{};q.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};q.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};q.create=function(e,t,i,r,a){if(Ne.util.isArray(r)){for(var n=[],s=0;s<r.length;++s)r[s]!==void 0&&n.push(r[s]);r=n}var o={tagClass:e,type:t,constructed:i,composed:i||Ne.util.isArray(r),value:r};return a&&"bitStringContents"in a&&(o.bitStringContents=a.bitStringContents,o.original=q.copy(o)),o};q.copy=function(e,t){var i;if(Ne.util.isArray(e)){i=[];for(var r=0;r<e.length;++r)i.push(q.copy(e[r],t));return i}return typeof e=="string"?e:(i={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:q.copy(e.value,t)},t&&!t.excludeBitStringContents&&(i.bitStringContents=e.bitStringContents),i)};q.equals=function(e,t,i){if(Ne.util.isArray(e)){if(!Ne.util.isArray(t)||e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!q.equals(e[r],t[r]))return!1;return!0}if(typeof e!=typeof t)return!1;if(typeof e=="string")return e===t;var a=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&q.equals(e.value,t.value);return i&&i.includeBitStringContents&&(a=a&&e.bitStringContents===t.bitStringContents),a};q.getBerValueLength=function(e){var t=e.getByte();if(t!==128){var i,r=t&128;return r?i=e.getInt((t&127)<<3):i=t,i}};function Ki(e,t,i){if(i>t){var r=new Error("Too few bytes to parse DER.");throw r.available=e.length(),r.remaining=t,r.requested=i,r}}var Sg=function(e,t){var i=e.getByte();if(t--,i!==128){var r,a=i&128;if(!a)r=i;else{var n=i&127;Ki(e,t,n),r=e.getInt(n<<3)}if(r<0)throw new Error("Negative length: "+r);return r}};q.fromDer=function(e,t){t===void 0&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof t=="boolean"&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),typeof e=="string"&&(e=Ne.util.createBuffer(e));var i=e.length(),r=Pa(e,e.length(),0,t);if(t.parseAllBytes&&e.length()!==0){var a=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw a.byteCount=i,a.remaining=e.length(),a}return r};function Pa(e,t,i,r){var a;Ki(e,t,2);var n=e.getByte();t--;var s=n&192,o=n&31;a=e.length();var u=Sg(e,t);if(t-=a-e.length(),u!==void 0&&u>t){if(r.strict){var l=new Error("Too few bytes to read ASN.1 value.");throw l.available=e.length(),l.remaining=t,l.requested=u,l}u=t}var c,f,p=(n&32)===32;if(p)if(c=[],u===void 0)for(;;){if(Ki(e,t,2),e.bytes(2)==="\0\0"){e.getBytes(2),t-=2;break}a=e.length(),c.push(Pa(e,t,i+1,r)),t-=a-e.length()}else for(;u>0;)a=e.length(),c.push(Pa(e,u,i+1,r)),t-=a-e.length(),u-=a-e.length();if(c===void 0&&s===q.Class.UNIVERSAL&&o===q.Type.BITSTRING&&(f=e.bytes(u)),c===void 0&&r.decodeBitStrings&&s===q.Class.UNIVERSAL&&o===q.Type.BITSTRING&&u>1){var m=e.read,v=t,C=0;if(o===q.Type.BITSTRING&&(Ki(e,t,1),C=e.getByte(),t--),C===0)try{a=e.length();var E={strict:!0,decodeBitStrings:!0},B=Pa(e,t,i+1,E),w=a-e.length();t-=w,o==q.Type.BITSTRING&&w++;var T=B.tagClass;w===u&&(T===q.Class.UNIVERSAL||T===q.Class.CONTEXT_SPECIFIC)&&(c=[B])}catch{}c===void 0&&(e.read=m,t=v)}if(c===void 0){if(u===void 0){if(r.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");u=t}if(o===q.Type.BMPSTRING)for(c="";u>0;u-=2)Ki(e,t,2),c+=String.fromCharCode(e.getInt16()),t-=2;else c=e.getBytes(u),t-=u}var U=f===void 0?null:{bitStringContents:f};return q.create(s,o,p,c,U)}q.toDer=function(e){var t=Ne.util.createBuffer(),i=e.tagClass|e.type,r=Ne.util.createBuffer(),a=!1;if("bitStringContents"in e&&(a=!0,e.original&&(a=q.equals(e,e.original))),a)r.putBytes(e.bitStringContents);else if(e.composed){e.constructed?i|=32:r.putByte(0);for(var n=0;n<e.value.length;++n)e.value[n]!==void 0&&r.putBuffer(q.toDer(e.value[n]))}else if(e.type===q.Type.BMPSTRING)for(var n=0;n<e.value.length;++n)r.putInt16(e.value.charCodeAt(n));else e.type===q.Type.INTEGER&&e.value.length>1&&(e.value.charCodeAt(0)===0&&!(e.value.charCodeAt(1)&128)||e.value.charCodeAt(0)===255&&(e.value.charCodeAt(1)&128)===128)?r.putBytes(e.value.substr(1)):r.putBytes(e.value);if(t.putByte(i),r.length()<=127)t.putByte(r.length()&127);else{var s=r.length(),o="";do o+=String.fromCharCode(s&255),s=s>>>8;while(s>0);t.putByte(o.length|128);for(var n=o.length-1;n>=0;--n)t.putByte(o.charCodeAt(n))}return t.putBuffer(r),t};q.oidToDer=function(e){var t=e.split("."),i=Ne.util.createBuffer();i.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var r,a,n,s,o=2;o<t.length;++o){r=!0,a=[],n=parseInt(t[o],10);do s=n&127,n=n>>>7,r||(s|=128),a.push(s),r=!1;while(n>0);for(var u=a.length-1;u>=0;--u)i.putByte(a[u])}return i};q.derToOid=function(e){var t;typeof e=="string"&&(e=Ne.util.createBuffer(e));var i=e.getByte();t=Math.floor(i/40)+"."+i%40;for(var r=0;e.length()>0;)i=e.getByte(),r=r<<7,i&128?r+=i&127:(t+="."+(r+i),r=0);return t};q.utcTimeToDate=function(e){var t=new Date,i=parseInt(e.substr(0,2),10);i=i>=50?1900+i:2e3+i;var r=parseInt(e.substr(2,2),10)-1,a=parseInt(e.substr(4,2),10),n=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),o=0;if(e.length>11){var u=e.charAt(10),l=10;u!=="+"&&u!=="-"&&(o=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(i,r,a),t.setUTCHours(n,s,o,0),l&&(u=e.charAt(l),u==="+"||u==="-")){var c=parseInt(e.substr(l+1,2),10),f=parseInt(e.substr(l+4,2),10),p=c*60+f;p*=6e4,u==="+"?t.setTime(+t-p):t.setTime(+t+p)}return t};q.generalizedTimeToDate=function(e){var t=new Date,i=parseInt(e.substr(0,4),10),r=parseInt(e.substr(4,2),10)-1,a=parseInt(e.substr(6,2),10),n=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),u=0,l=0,c=!1;e.charAt(e.length-1)==="Z"&&(c=!0);var f=e.length-5,p=e.charAt(f);if(p==="+"||p==="-"){var m=parseInt(e.substr(f+1,2),10),v=parseInt(e.substr(f+4,2),10);l=m*60+v,l*=6e4,p==="+"&&(l*=-1),c=!0}return e.charAt(14)==="."&&(u=parseFloat(e.substr(14),10)*1e3),c?(t.setUTCFullYear(i,r,a),t.setUTCHours(n,s,o,u),t.setTime(+t+l)):(t.setFullYear(i,r,a),t.setHours(n,s,o,u)),t};q.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",i=[];i.push((""+e.getUTCFullYear()).substr(2)),i.push(""+(e.getUTCMonth()+1)),i.push(""+e.getUTCDate()),i.push(""+e.getUTCHours()),i.push(""+e.getUTCMinutes()),i.push(""+e.getUTCSeconds());for(var r=0;r<i.length;++r)i[r].length<2&&(t+="0"),t+=i[r];return t+="Z",t};q.dateToGeneralizedTime=function(e){if(typeof e=="string")return e;var t="",i=[];i.push(""+e.getUTCFullYear()),i.push(""+(e.getUTCMonth()+1)),i.push(""+e.getUTCDate()),i.push(""+e.getUTCHours()),i.push(""+e.getUTCMinutes()),i.push(""+e.getUTCSeconds());for(var r=0;r<i.length;++r)i[r].length<2&&(t+="0"),t+=i[r];return t+="Z",t};q.integerToDer=function(e){var t=Ne.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var i=new Error("Integer too large; max is 32-bits.");throw i.integer=e,i};q.derToInteger=function(e){typeof e=="string"&&(e=Ne.util.createBuffer(e));var t=e.length()*8;if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)};q.validate=function(e,t,i,r){var a=!1;if((e.tagClass===t.tagClass||typeof t.tagClass>"u")&&(e.type===t.type||typeof t.type>"u"))if(e.constructed===t.constructed||typeof t.constructed>"u"){if(a=!0,t.value&&Ne.util.isArray(t.value))for(var n=0,s=0;a&&s<t.value.length;++s)a=t.value[s].optional||!1,e.value[n]&&(a=q.validate(e.value[n],t.value[s],i,r),a?++n:t.value[s].optional&&(a=!0)),!a&&r&&r.push("["+t.name+'] Tag class "'+t.tagClass+'", type "'+t.type+'" expected value length "'+t.value.length+'", got "'+e.value.length+'"');if(a&&i&&(t.capture&&(i[t.capture]=e.value),t.captureAsn1&&(i[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(i[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)){var o;if(e.bitStringContents.length<2)i[t.captureBitStringValue]="";else{var u=e.bitStringContents.charCodeAt(0);if(u!==0)throw new Error("captureBitStringValue only supported for zero unused bits");i[t.captureBitStringValue]=e.bitStringContents.slice(1)}}}else r&&r.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');else r&&(e.tagClass!==t.tagClass&&r.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&r.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));return a};var Xc=/[^\\u0000-\\u00ff]/;q.prettyPrint=function(e,t,i){var r="";t=t||0,i=i||2,t>0&&(r+=`
|
|
13
|
-
`);for(var a="",n=0;n<t*i;++n)a+=" ";switch(r+=a+"Tag: ",e.tagClass){case q.Class.UNIVERSAL:r+="Universal:";break;case q.Class.APPLICATION:r+="Application:";break;case q.Class.CONTEXT_SPECIFIC:r+="Context-Specific:";break;case q.Class.PRIVATE:r+="Private:";break}if(e.tagClass===q.Class.UNIVERSAL)switch(r+=e.type,e.type){case q.Type.NONE:r+=" (None)";break;case q.Type.BOOLEAN:r+=" (Boolean)";break;case q.Type.INTEGER:r+=" (Integer)";break;case q.Type.BITSTRING:r+=" (Bit string)";break;case q.Type.OCTETSTRING:r+=" (Octet string)";break;case q.Type.NULL:r+=" (Null)";break;case q.Type.OID:r+=" (Object Identifier)";break;case q.Type.ODESC:r+=" (Object Descriptor)";break;case q.Type.EXTERNAL:r+=" (External or Instance of)";break;case q.Type.REAL:r+=" (Real)";break;case q.Type.ENUMERATED:r+=" (Enumerated)";break;case q.Type.EMBEDDED:r+=" (Embedded PDV)";break;case q.Type.UTF8:r+=" (UTF8)";break;case q.Type.ROID:r+=" (Relative Object Identifier)";break;case q.Type.SEQUENCE:r+=" (Sequence)";break;case q.Type.SET:r+=" (Set)";break;case q.Type.PRINTABLESTRING:r+=" (Printable String)";break;case q.Type.IA5String:r+=" (IA5String (ASCII))";break;case q.Type.UTCTIME:r+=" (UTC time)";break;case q.Type.GENERALIZEDTIME:r+=" (Generalized time)";break;case q.Type.BMPSTRING:r+=" (BMP String)";break}else r+=e.type;if(r+=`
|
|
14
|
-
`,r+=a+"Constructed: "+e.constructed+`
|
|
15
|
-
`,e.composed){for(var s=0,o="",n=0;n<e.value.length;++n)e.value[n]!==void 0&&(s+=1,o+=q.prettyPrint(e.value[n],t+1,i),n+1<e.value.length&&(o+=","));r+=a+"Sub values: "+s+o}else{if(r+=a+"Value: ",e.type===q.Type.OID){var u=q.derToOid(e.value);r+=u,Ne.pki&&Ne.pki.oids&&u in Ne.pki.oids&&(r+=" ("+Ne.pki.oids[u]+") ")}if(e.type===q.Type.INTEGER)try{r+=q.derToInteger(e.value)}catch{r+="0x"+Ne.util.bytesToHex(e.value)}else if(e.type===q.Type.BITSTRING){if(e.value.length>1?r+="0x"+Ne.util.bytesToHex(e.value.slice(1)):r+="(none)",e.value.length>0){var l=e.value.charCodeAt(0);l==1?r+=" (1 unused bit shown)":l>1&&(r+=" ("+l+" unused bits shown)")}}else if(e.type===q.Type.OCTETSTRING)Xc.test(e.value)||(r+="("+e.value+") "),r+="0x"+Ne.util.bytesToHex(e.value);else if(e.type===q.Type.UTF8)try{r+=Ne.util.decodeUtf8(e.value)}catch(c){if(c.message==="URI malformed")r+="0x"+Ne.util.bytesToHex(e.value)+" (malformed UTF8)";else throw c}else e.type===q.Type.PRINTABLESTRING||e.type===q.Type.IA5String?r+=e.value:Xc.test(e.value)?r+="0x"+Ne.util.bytesToHex(e.value):e.value.length===0?r+="[null]":r+=e.value}return r}});var Jt=F((GC,Zc)=>{"use strict";S();var Qa=oe();Zc.exports=Qa.md=Qa.md||{};Qa.md.algorithms=Qa.md.algorithms||{}});var ai=F((YC,ef)=>{"use strict";S();var ur=oe();Jt();Ae();var Ig=ef.exports=ur.hmac=ur.hmac||{};Ig.create=function(){var e=null,t=null,i=null,r=null,a={};return a.start=function(n,s){if(n!==null)if(typeof n=="string")if(n=n.toLowerCase(),n in ur.md.algorithms)t=ur.md.algorithms[n].create();else throw new Error('Unknown hash algorithm "'+n+'"');else t=n;if(s===null)s=e;else{if(typeof s=="string")s=ur.util.createBuffer(s);else if(ur.util.isArray(s)){var o=s;s=ur.util.createBuffer();for(var u=0;u<o.length;++u)s.putByte(o[u])}var l=s.length();l>t.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),i=ur.util.createBuffer(),r=ur.util.createBuffer(),l=s.length();for(var u=0;u<l;++u){var o=s.at(u);i.putByte(54^o),r.putByte(92^o)}if(l<t.blockLength)for(var o=t.blockLength-l,u=0;u<o;++u)i.putByte(54),r.putByte(92);e=s,i=i.bytes(),r=r.bytes()}t.start(),t.update(i)},a.update=function(n){t.update(n)},a.getMac=function(){var n=t.digest().bytes();return t.start(),t.update(r),t.update(n),t.digest()},a.digest=a.getMac,a}});var Oa=F((JC,nf)=>{"use strict";S();var Wt=oe();Jt();Ae();var rf=nf.exports=Wt.md5=Wt.md5||{};Wt.md.md5=Wt.md.algorithms.md5=rf;rf.create=function(){af||Bg();var e=null,t=Wt.util.createBuffer(),i=new Array(16),r={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var a=r.messageLengthSize/4,n=0;n<a;++n)r.fullMessageLength.push(0);return t=Wt.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},r},r.start(),r.update=function(a,n){n==="utf8"&&(a=Wt.util.encodeUtf8(a));var s=a.length;r.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=s[1],s[1]=s[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),tf(e,i,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var a=Wt.util.createBuffer();a.putBytes(t.bytes());var n=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,s=n&r.blockLength-1;a.putBytes(ss.substr(0,r.blockLength-s));for(var o,u=0,l=r.fullMessageLength.length-1;l>=0;--l)o=r.fullMessageLength[l]*8+u,u=o/4294967296>>>0,a.putInt32Le(o>>>0);var c={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};tf(c,i,a);var f=Wt.util.createBuffer();return f.putInt32Le(c.h0),f.putInt32Le(c.h1),f.putInt32Le(c.h2),f.putInt32Le(c.h3),f},r};var ss=null,Ua=null,Hi=null,ni=null,af=!1;function Bg(){ss="\x80",ss+=Wt.util.fillString("\0",64),Ua=[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],Hi=[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],ni=new Array(64);for(var e=0;e<64;++e)ni[e]=Math.floor(Math.abs(Math.sin(e+1))*4294967296);af=!0}function tf(e,t,i){for(var r,a,n,s,o,u,l,c,f=i.length();f>=64;){for(a=e.h0,n=e.h1,s=e.h2,o=e.h3,c=0;c<16;++c)t[c]=i.getInt32Le(),u=o^n&(s^o),r=a+u+ni[c]+t[c],l=Hi[c],a=o,o=s,s=n,n+=r<<l|r>>>32-l;for(;c<32;++c)u=s^o&(n^s),r=a+u+ni[c]+t[Ua[c]],l=Hi[c],a=o,o=s,s=n,n+=r<<l|r>>>32-l;for(;c<48;++c)u=n^s^o,r=a+u+ni[c]+t[Ua[c]],l=Hi[c],a=o,o=s,s=n,n+=r<<l|r>>>32-l;for(;c<64;++c)u=s^(n|~o),r=a+u+ni[c]+t[Ua[c]],l=Hi[c],a=o,o=s,s=n,n+=r<<l|r>>>32-l;e.h0=e.h0+a|0,e.h1=e.h1+n|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,f-=64}}});var Ur=F((XC,of)=>{"use strict";S();var Fa=oe();Ae();var sf=of.exports=Fa.pem=Fa.pem||{};sf.encode=function(e,t){t=t||{};var i="-----BEGIN "+e.type+`-----\r
|
|
16
|
-
`,r;if(e.procType&&(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]},i+=Va(r)),e.contentDomain&&(r={name:"Content-Domain",values:[e.contentDomain]},i+=Va(r)),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=Va(r)),e.headers)for(var a=0;a<e.headers.length;++a)i+=Va(e.headers[a]);return e.procType&&(i+=`\r
|
|
17
|
-
`),i+=Fa.util.encode64(e.body,t.maxline||64)+`\r
|
|
18
|
-
`,i+="-----END "+e.type+`-----\r
|
|
19
|
-
`,i};sf.decode=function(e){for(var t=[],i=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,r=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,a=/\r?\n/,n;n=i.exec(e),!!n;){var s=n[1];s==="NEW CERTIFICATE REQUEST"&&(s="CERTIFICATE REQUEST");var o={type:s,procType:null,contentDomain:null,dekInfo:null,headers:[],body:Fa.util.decode64(n[3])};if(t.push(o),!!n[2]){for(var u=n[2].split(a),l=0;n&&l<u.length;){for(var c=u[l].replace(/\s+$/,""),f=l+1;f<u.length;++f){var p=u[f];if(!/\s/.test(p[0]))break;c+=p,l=f}if(n=c.match(r),n){for(var m={name:n[1],values:[]},v=n[2].split(","),C=0;C<v.length;++C)m.values.push(bg(v[C]));if(o.procType)if(!o.contentDomain&&m.name==="Content-Domain")o.contentDomain=v[0]||"";else if(!o.dekInfo&&m.name==="DEK-Info"){if(m.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');o.dekInfo={algorithm:v[0],parameters:v[1]||null}}else o.headers.push(m);else{if(m.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(m.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');o.procType={version:v[0],type:v[1]}}}++l}if(o.procType==="ENCRYPTED"&&!o.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(t.length===0)throw new Error("Invalid PEM formatted message.");return t};function Va(e){for(var t=e.name+": ",i=[],r=function(u,l){return" "+l},a=0;a<e.values.length;++a)i.push(e.values[a].replace(/^(\S+\r\n)/,r));t+=i.join(",")+`\r
|
|
20
|
-
`;for(var n=0,s=-1,a=0;a<t.length;++a,++n)if(n>65&&s!==-1){var o=t[s];o===","?(++s,t=t.substr(0,s)+`\r
|
|
21
|
-
`+t.substr(s)):t=t.substr(0,s)+`\r
|
|
22
|
-
`+o+t.substr(s+1),n=a-s-1,s=-1,++a}else(t[a]===" "||t[a]===" "||t[a]===",")&&(s=a);return t}function bg(e){return e.replace(/^\s+/,"")}});var Gi=F((ZC,lf)=>{"use strict";S();var Pe=oe();ka();ts();Ae();lf.exports=Pe.des=Pe.des||{};Pe.des.startEncrypting=function(e,t,i,r){var a=Ma({key:e,output:i,decrypt:!1,mode:r||(t===null?"ECB":"CBC")});return a.start(t),a};Pe.des.createEncryptionCipher=function(e,t){return Ma({key:e,output:null,decrypt:!1,mode:t})};Pe.des.startDecrypting=function(e,t,i,r){var a=Ma({key:e,output:i,decrypt:!0,mode:r||(t===null?"ECB":"CBC")});return a.start(t),a};Pe.des.createDecryptionCipher=function(e,t){return Ma({key:e,output:null,decrypt:!0,mode:t})};Pe.des.Algorithm=function(e,t){var i=this;i.name=e,i.mode=new t({blockSize:8,cipher:{encrypt:function(r,a){return uf(i._keys,r,a,!1)},decrypt:function(r,a){return uf(i._keys,r,a,!0)}}}),i._init=!1};Pe.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=Pe.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=Pg(t),this._init=!0}};Xt("DES-ECB",Pe.cipher.modes.ecb);Xt("DES-CBC",Pe.cipher.modes.cbc);Xt("DES-CFB",Pe.cipher.modes.cfb);Xt("DES-OFB",Pe.cipher.modes.ofb);Xt("DES-CTR",Pe.cipher.modes.ctr);Xt("3DES-ECB",Pe.cipher.modes.ecb);Xt("3DES-CBC",Pe.cipher.modes.cbc);Xt("3DES-CFB",Pe.cipher.modes.cfb);Xt("3DES-OFB",Pe.cipher.modes.ofb);Xt("3DES-CTR",Pe.cipher.modes.ctr);function Xt(e,t){var i=function(){return new Pe.des.Algorithm(e,t)};Pe.cipher.registerAlgorithm(e,i)}var Tg=[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],wg=[-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],_g=[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],Ng=[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],kg=[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],Lg=[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],Rg=[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],Dg=[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 Pg(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],i=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],n=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],o=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[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],c=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],f=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],p=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],m=[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],C=e.length()>8?3:1,E=[],B=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],w=0,T,U=0;U<C;U++){var P=e.getInt32(),Q=e.getInt32();T=(P>>>4^Q)&252645135,Q^=T,P^=T<<4,T=(Q>>>-16^P)&65535,P^=T,Q^=T<<-16,T=(P>>>2^Q)&858993459,Q^=T,P^=T<<2,T=(Q>>>-16^P)&65535,P^=T,Q^=T<<-16,T=(P>>>1^Q)&1431655765,Q^=T,P^=T<<1,T=(Q>>>8^P)&16711935,P^=T,Q^=T<<8,T=(P>>>1^Q)&1431655765,Q^=T,P^=T<<1,T=P<<8|Q>>>20&240,P=Q<<24|Q<<8&16711680|Q>>>8&65280|Q>>>24&240,Q=T;for(var te=0;te<B.length;++te){B[te]?(P=P<<2|P>>>26,Q=Q<<2|Q>>>26):(P=P<<1|P>>>27,Q=Q<<1|Q>>>27),P&=-15,Q&=-15;var ne=t[P>>>28]|i[P>>>24&15]|r[P>>>20&15]|a[P>>>16&15]|n[P>>>12&15]|s[P>>>8&15]|o[P>>>4&15],H=u[Q>>>28]|l[Q>>>24&15]|c[Q>>>20&15]|f[Q>>>16&15]|p[Q>>>12&15]|m[Q>>>8&15]|v[Q>>>4&15];T=(H>>>16^ne)&65535,E[w++]=ne^T,E[w++]=H^T<<16}}return E}function uf(e,t,i,r){var a=e.length===32?3:9,n;a===3?n=r?[30,-2,-2]:[0,32,2]:n=r?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var s,o=t[0],u=t[1];s=(o>>>4^u)&252645135,u^=s,o^=s<<4,s=(o>>>16^u)&65535,u^=s,o^=s<<16,s=(u>>>2^o)&858993459,o^=s,u^=s<<2,s=(u>>>8^o)&16711935,o^=s,u^=s<<8,s=(o>>>1^u)&1431655765,u^=s,o^=s<<1,o=o<<1|o>>>31,u=u<<1|u>>>31;for(var l=0;l<a;l+=3){for(var c=n[l+1],f=n[l+2],p=n[l];p!=c;p+=f){var m=u^e[p],v=(u>>>4|u<<28)^e[p+1];s=o,o=u,u=s^(wg[m>>>24&63]|Ng[m>>>16&63]|Lg[m>>>8&63]|Dg[m&63]|Tg[v>>>24&63]|_g[v>>>16&63]|kg[v>>>8&63]|Rg[v&63])}s=o,o=u,u=s}o=o>>>1|o<<31,u=u>>>1|u<<31,s=(o>>>1^u)&1431655765,u^=s,o^=s<<1,s=(u>>>8^o)&16711935,o^=s,u^=s<<8,s=(u>>>2^o)&858993459,o^=s,u^=s<<2,s=(o>>>16^u)&65535,u^=s,o^=s<<16,s=(o>>>4^u)&252645135,u^=s,o^=s<<4,i[0]=o,i[1]=u}function Ma(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),i="DES-"+t,r;e.decrypt?r=Pe.cipher.createDecipher(i,e.key):r=Pe.cipher.createCipher(i,e.key);var a=r.start;return r.start=function(n,s){var o=null;s instanceof Pe.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=n,a.call(r,s)},r}});var qa=F((tE,cf)=>{"use strict";S();var mt=oe();ai();Jt();Ae();var Qg=mt.pkcs5=mt.pkcs5||{},lr;mt.util.isNodejs&&!mt.options.usePureJavaScript&&(lr=Le("crypto"));cf.exports=mt.pbkdf2=Qg.pbkdf2=function(e,t,i,r,a,n){if(typeof a=="function"&&(n=a,a=null),mt.util.isNodejs&&!mt.options.usePureJavaScript&&lr.pbkdf2&&(a===null||typeof a!="object")&&(lr.pbkdf2Sync.length>4||!a||a==="sha1"))return typeof a!="string"&&(a="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),n?lr.pbkdf2Sync.length===4?lr.pbkdf2(e,t,i,r,function(T,U){if(T)return n(T);n(null,U.toString("binary"))}):lr.pbkdf2(e,t,i,r,a,function(T,U){if(T)return n(T);n(null,U.toString("binary"))}):lr.pbkdf2Sync.length===4?lr.pbkdf2Sync(e,t,i,r).toString("binary"):lr.pbkdf2Sync(e,t,i,r,a).toString("binary");if((typeof a>"u"||a===null)&&(a="sha1"),typeof a=="string"){if(!(a in mt.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=mt.md[a].create()}var s=a.digestLength;if(r>4294967295*s){var o=new Error("Derived key is too long.");if(n)return n(o);throw o}var u=Math.ceil(r/s),l=r-(u-1)*s,c=mt.hmac.create();c.start(a,e);var f="",p,m,v;if(!n){for(var C=1;C<=u;++C){c.start(null,null),c.update(t),c.update(mt.util.int32ToBytes(C)),p=v=c.digest().getBytes();for(var E=2;E<=i;++E)c.start(null,null),c.update(v),m=c.digest().getBytes(),p=mt.util.xorBytes(p,m,s),v=m;f+=C<u?p:p.substr(0,l)}return f}var C=1,E;function B(){if(C>u)return n(null,f);c.start(null,null),c.update(t),c.update(mt.util.int32ToBytes(C)),p=v=c.digest().getBytes(),E=2,w()}function w(){if(E<=i)return c.start(null,null),c.update(v),m=c.digest().getBytes(),p=mt.util.xorBytes(p,m,s),v=m,++E,mt.util.setImmediate(w);f+=C<u?p:p.substr(0,l),++C,B()}B()}});var us=F((iE,gf)=>{"use strict";S();var $t=oe();Jt();Ae();var hf=gf.exports=$t.sha256=$t.sha256||{};$t.md.sha256=$t.md.algorithms.sha256=hf;hf.create=function(){pf||Ug();var e=null,t=$t.util.createBuffer(),i=new Array(64),r={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var a=r.messageLengthSize/4,n=0;n<a;++n)r.fullMessageLength.push(0);return t=$t.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},r},r.start(),r.update=function(a,n){n==="utf8"&&(a=$t.util.encodeUtf8(a));var s=a.length;r.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=s[1],s[1]=s[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),ff(e,i,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var a=$t.util.createBuffer();a.putBytes(t.bytes());var n=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,s=n&r.blockLength-1;a.putBytes(os.substr(0,r.blockLength-s));for(var o,u,l=r.fullMessageLength[0]*8,c=0;c<r.fullMessageLength.length-1;++c)o=r.fullMessageLength[c+1]*8,u=o/4294967296>>>0,l+=u,a.putInt32(l>>>0),l=o>>>0;a.putInt32(l);var f={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};ff(f,i,a);var p=$t.util.createBuffer();return p.putInt32(f.h0),p.putInt32(f.h1),p.putInt32(f.h2),p.putInt32(f.h3),p.putInt32(f.h4),p.putInt32(f.h5),p.putInt32(f.h6),p.putInt32(f.h7),p},r};var os=null,pf=!1,df=null;function Ug(){os="\x80",os+=$t.util.fillString("\0",64),df=[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],pf=!0}function ff(e,t,i){for(var r,a,n,s,o,u,l,c,f,p,m,v,C,E,B,w=i.length();w>=64;){for(l=0;l<16;++l)t[l]=i.getInt32();for(;l<64;++l)r=t[l-2],r=(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,a=t[l-15],a=(a>>>7|a<<25)^(a>>>18|a<<14)^a>>>3,t[l]=r+t[l-7]+a+t[l-16]|0;for(c=e.h0,f=e.h1,p=e.h2,m=e.h3,v=e.h4,C=e.h5,E=e.h6,B=e.h7,l=0;l<64;++l)s=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),o=E^v&(C^E),n=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),u=c&f|p&(c^f),r=B+s+o+df[l]+t[l],a=n+u,B=E,E=C,C=v,v=m+r>>>0,m=p,p=f,f=c,c=r+a>>>0;e.h0=e.h0+c|0,e.h1=e.h1+f|0,e.h2=e.h2+p|0,e.h3=e.h3+m|0,e.h4=e.h4+v|0,e.h5=e.h5+C|0,e.h6=e.h6+E|0,e.h7=e.h7+B|0,w-=64}}});var ls=F((nE,vf)=>{"use strict";S();var Zt=oe();Ae();var Ka=null;Zt.util.isNodejs&&!Zt.options.usePureJavaScript&&!process.versions["node-webkit"]&&(Ka=Le("crypto"));var Og=vf.exports=Zt.prng=Zt.prng||{};Og.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},i=e.md,r=new Array(32),a=0;a<32;++a)r[a]=i.create();t.pools=r,t.pool=0,t.generate=function(l,c){if(!c)return t.generateSync(l);var f=t.plugin.cipher,p=t.plugin.increment,m=t.plugin.formatKey,v=t.plugin.formatSeed,C=Zt.util.createBuffer();t.key=null,E();function E(B){if(B)return c(B);if(C.length()>=l)return c(null,C.getBytes(l));if(t.generated>1048575&&(t.key=null),t.key===null)return Zt.util.nextTick(function(){n(E)});var w=f(t.key,t.seed);t.generated+=w.length,C.putBytes(w),t.key=m(f(t.key,p(t.seed))),t.seed=v(f(t.key,t.seed)),Zt.util.setImmediate(E)}},t.generateSync=function(l){var c=t.plugin.cipher,f=t.plugin.increment,p=t.plugin.formatKey,m=t.plugin.formatSeed;t.key=null;for(var v=Zt.util.createBuffer();v.length()<l;){t.generated>1048575&&(t.key=null),t.key===null&&s();var C=c(t.key,t.seed);t.generated+=C.length,v.putBytes(C),t.key=p(c(t.key,f(t.seed))),t.seed=m(c(t.key,t.seed))}return v.getBytes(l)};function n(l){if(t.pools[0].messageLength>=32)return o(),l();var c=32-t.pools[0].messageLength<<5;t.seedFile(c,function(f,p){if(f)return l(f);t.collect(p),o(),l()})}function s(){if(t.pools[0].messageLength>=32)return o();var l=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(l)),o()}function o(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var l=t.plugin.md.create();l.update(t.keyBytes);for(var c=1,f=0;f<32;++f)t.reseeds%c===0&&(l.update(t.pools[f].digest().getBytes()),t.pools[f].start()),c=c<<1;t.keyBytes=l.digest().getBytes(),l.start(),l.update(t.keyBytes);var p=l.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(p),t.generated=0}function u(l){var c=null,f=Zt.util.globalScope,p=f.crypto||f.msCrypto;p&&p.getRandomValues&&(c=function(P){return p.getRandomValues(P)});var m=Zt.util.createBuffer();if(c)for(;m.length()<l;){var v=Math.max(1,Math.min(l-m.length(),65536)/4),C=new Uint32Array(Math.floor(v));try{c(C);for(var E=0;E<C.length;++E)m.putInt32(C[E])}catch(P){if(!(typeof QuotaExceededError<"u"&&P instanceof QuotaExceededError))throw P}}if(m.length()<l)for(var B,w,T,U=Math.floor(Math.random()*65536);m.length()<l;){w=16807*(U&65535),B=16807*(U>>16),w+=(B&32767)<<16,w+=B>>15,w=(w&2147483647)+(w>>31),U=w&4294967295;for(var E=0;E<3;++E)T=U>>>(E<<3),T^=Math.floor(Math.random()*256),m.putByte(T&255)}return m.getBytes(l)}return Ka?(t.seedFile=function(l,c){Ka.randomBytes(l,function(f,p){if(f)return c(f);c(null,p.toString())})},t.seedFileSync=function(l){return Ka.randomBytes(l).toString()}):(t.seedFile=function(l,c){try{c(null,u(l))}catch(f){c(f)}},t.seedFileSync=u),t.collect=function(l){for(var c=l.length,f=0;f<c;++f)t.pools[t.pool].update(l.substr(f,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(l,c){for(var f="",p=0;p<c;p+=8)f+=String.fromCharCode(l>>p&255);t.collect(f)},t.registerWorker=function(l){if(l===self)t.seedFile=function(f,p){function m(v){var C=v.data;C.forge&&C.forge.prng&&(self.removeEventListener("message",m),p(C.forge.prng.err,C.forge.prng.bytes))}self.addEventListener("message",m),self.postMessage({forge:{prng:{needed:f}}})};else{var c=function(f){var p=f.data;p.forge&&p.forge.prng&&t.seedFile(p.forge.prng.needed,function(m,v){l.postMessage({forge:{prng:{err:m,bytes:v}}})})};l.addEventListener("message",c)}},t}});var Pt=F((oE,cs)=>{"use strict";S();var je=oe();Ir();us();ls();Ae();(function(){if(je.random&&je.random.getBytes){cs.exports=je.random;return}(function(e){var t={},i=new Array(4),r=je.util.createBuffer();t.formatKey=function(f){var p=je.util.createBuffer(f);return f=new Array(4),f[0]=p.getInt32(),f[1]=p.getInt32(),f[2]=p.getInt32(),f[3]=p.getInt32(),je.aes._expandKey(f,!1)},t.formatSeed=function(f){var p=je.util.createBuffer(f);return f=new Array(4),f[0]=p.getInt32(),f[1]=p.getInt32(),f[2]=p.getInt32(),f[3]=p.getInt32(),f},t.cipher=function(f,p){return je.aes._updateBlock(f,p,i,!1),r.putInt32(i[0]),r.putInt32(i[1]),r.putInt32(i[2]),r.putInt32(i[3]),r.getBytes()},t.increment=function(f){return++f[3],f},t.md=je.md.sha256;function a(){var f=je.prng.create(t);return f.getBytes=function(p,m){return f.generate(p,m)},f.getBytesSync=function(p){return f.generate(p)},f}var n=a(),s=null,o=je.util.globalScope,u=o.crypto||o.msCrypto;if(u&&u.getRandomValues&&(s=function(f){return u.getRandomValues(f)}),je.options.usePureJavaScript||!je.util.isNodejs&&!s){if(typeof window>"u"||window.document,n.collectInt(+new Date,32),typeof navigator<"u"){var l="";for(var c in navigator)try{typeof navigator[c]=="string"&&(l+=navigator[c])}catch{}n.collect(l),l=null}e&&(e().mousemove(function(f){n.collectInt(f.clientX,16),n.collectInt(f.clientY,16)}),e().keypress(function(f){n.collectInt(f.charCode,8)}))}if(!je.random)je.random=n;else for(var c in n)je.random[c]=n[c];je.random.createInstance=a,cs.exports=je.random})(typeof jQuery<"u"?jQuery:null)})()});var hs=F((lE,Af)=>{"use strict";S();var Bt=oe();Ae();var fs=[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],yf=[1,2,3,5],Vg=function(e,t){return e<<t&65535|(e&65535)>>16-t},Fg=function(e,t){return(e&65535)>>t|e<<16-t&65535};Af.exports=Bt.rc2=Bt.rc2||{};Bt.rc2.expandKey=function(e,t){typeof e=="string"&&(e=Bt.util.createBuffer(e)),t=t||128;var i=e,r=e.length(),a=t,n=Math.ceil(a/8),s=255>>(a&7),o;for(o=r;o<128;o++)i.putByte(fs[i.at(o-1)+i.at(o-r)&255]);for(i.setAt(128-n,fs[i.at(128-n)&s]),o=127-n;o>=0;o--)i.setAt(o,fs[i.at(o+1)^i.at(o+n)]);return i};var mf=function(e,t,i){var r=!1,a=null,n=null,s=null,o,u,l,c,f=[];for(e=Bt.rc2.expandKey(e,t),l=0;l<64;l++)f.push(e.getInt16Le());i?(o=function(v){for(l=0;l<4;l++)v[l]+=f[c]+(v[(l+3)%4]&v[(l+2)%4])+(~v[(l+3)%4]&v[(l+1)%4]),v[l]=Vg(v[l],yf[l]),c++},u=function(v){for(l=0;l<4;l++)v[l]+=f[v[(l+3)%4]&63]}):(o=function(v){for(l=3;l>=0;l--)v[l]=Fg(v[l],yf[l]),v[l]-=f[c]+(v[(l+3)%4]&v[(l+2)%4])+(~v[(l+3)%4]&v[(l+1)%4]),c--},u=function(v){for(l=3;l>=0;l--)v[l]-=f[v[(l+3)%4]&63]});var p=function(v){var C=[];for(l=0;l<4;l++){var E=a.getInt16Le();s!==null&&(i?E^=s.getInt16Le():s.putInt16Le(E)),C.push(E&65535)}c=i?0:63;for(var B=0;B<v.length;B++)for(var w=0;w<v[B][0];w++)v[B][1](C);for(l=0;l<4;l++)s!==null&&(i?s.putInt16Le(C[l]):C[l]^=s.getInt16Le()),n.putInt16Le(C[l])},m=null;return m={start:function(v,C){v&&typeof v=="string"&&(v=Bt.util.createBuffer(v)),r=!1,a=Bt.util.createBuffer(),n=C||new Bt.util.createBuffer,s=v,m.output=n},update:function(v){for(r||a.putBuffer(v);a.length()>=8;)p([[5,o],[1,u],[6,o],[1,u],[5,o]])},finish:function(v){var C=!0;if(i)if(v)C=v(8,a,!i);else{var E=a.length()===8?8:8-a.length();a.fillWithByte(E,E)}if(C&&(r=!0,m.update()),!i&&(C=a.length()===0,C))if(v)C=v(8,n,!i);else{var B=n.length(),w=n.at(B-1);w>B?C=!1:n.truncate(w)}return C}},m};Bt.rc2.startEncrypting=function(e,t,i){var r=Bt.rc2.createEncryptionCipher(e,128);return r.start(t,i),r};Bt.rc2.createEncryptionCipher=function(e,t){return mf(e,t,!0)};Bt.rc2.startDecrypting=function(e,t,i){var r=Bt.rc2.createDecryptionCipher(e,128);return r.start(t,i),r};Bt.rc2.createDecryptionCipher=function(e,t){return mf(e,t,!1)}});var Yi=F((fE,Tf)=>{"use strict";S();var ps=oe();Tf.exports=ps.jsbn=ps.jsbn||{};var cr,Mg=0xdeadbeefcafe,Cf=(Mg&16777215)==15715070;function N(e,t,i){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,i):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}ps.jsbn.BigInteger=N;function Ce(){return new N(null)}function qg(e,t,i,r,a,n){for(;--n>=0;){var s=t*this.data[e++]+i.data[r]+a;a=Math.floor(s/67108864),i.data[r++]=s&67108863}return a}function Kg(e,t,i,r,a,n){for(var s=t&32767,o=t>>15;--n>=0;){var u=this.data[e]&32767,l=this.data[e++]>>15,c=o*u+l*s;u=s*u+((c&32767)<<15)+i.data[r]+(a&1073741823),a=(u>>>30)+(c>>>15)+o*l+(a>>>30),i.data[r++]=u&1073741823}return a}function Ef(e,t,i,r,a,n){for(var s=t&16383,o=t>>14;--n>=0;){var u=this.data[e]&16383,l=this.data[e++]>>14,c=o*u+l*s;u=s*u+((c&16383)<<14)+i.data[r]+a,a=(u>>28)+(c>>14)+o*l,i.data[r++]=u&268435455}return a}typeof navigator>"u"?(N.prototype.am=Ef,cr=28):Cf&&navigator.appName=="Microsoft Internet Explorer"?(N.prototype.am=Kg,cr=30):Cf&&navigator.appName!="Netscape"?(N.prototype.am=qg,cr=26):(N.prototype.am=Ef,cr=28);N.prototype.DB=cr;N.prototype.DM=(1<<cr)-1;N.prototype.DV=1<<cr;var ds=52;N.prototype.FV=Math.pow(2,ds);N.prototype.F1=ds-cr;N.prototype.F2=2*cr-ds;var Hg="0123456789abcdefghijklmnopqrstuvwxyz",Ha=new Array,si,Qt;si=48;for(Qt=0;Qt<=9;++Qt)Ha[si++]=Qt;si=97;for(Qt=10;Qt<36;++Qt)Ha[si++]=Qt;si=65;for(Qt=10;Qt<36;++Qt)Ha[si++]=Qt;function xf(e){return Hg.charAt(e)}function Sf(e,t){var i=Ha[e.charCodeAt(t)];return i??-1}function Gg(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function jg(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function br(e){var t=Ce();return t.fromInt(e),t}function Yg(e,t){var i;if(t==16)i=4;else if(t==8)i=3;else if(t==256)i=8;else if(t==2)i=1;else if(t==32)i=5;else if(t==4)i=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var r=e.length,a=!1,n=0;--r>=0;){var s=i==8?e[r]&255:Sf(e,r);if(s<0){e.charAt(r)=="-"&&(a=!0);continue}a=!1,n==0?this.data[this.t++]=s:n+i>this.DB?(this.data[this.t-1]|=(s&(1<<this.DB-n)-1)<<n,this.data[this.t++]=s>>this.DB-n):this.data[this.t-1]|=s<<n,n+=i,n>=this.DB&&(n-=this.DB)}i==8&&e[0]&128&&(this.s=-1,n>0&&(this.data[this.t-1]|=(1<<this.DB-n)-1<<n)),this.clamp(),a&&N.ZERO.subTo(this,this)}function zg(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function Jg(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var i=(1<<t)-1,r,a=!1,n="",s=this.t,o=this.DB-s*this.DB%t;if(s-- >0)for(o<this.DB&&(r=this.data[s]>>o)>0&&(a=!0,n=xf(r));s>=0;)o<t?(r=(this.data[s]&(1<<o)-1)<<t-o,r|=this.data[--s]>>(o+=this.DB-t)):(r=this.data[s]>>(o-=t)&i,o<=0&&(o+=this.DB,--s)),r>0&&(a=!0),a&&(n+=xf(r));return a?n:"0"}function Wg(){var e=Ce();return N.ZERO.subTo(this,e),e}function Xg(){return this.s<0?this.negate():this}function $g(e){var t=this.s-e.s;if(t!=0)return t;var i=this.t;if(t=i-e.t,t!=0)return this.s<0?-t:t;for(;--i>=0;)if((t=this.data[i]-e.data[i])!=0)return t;return 0}function Ga(e){var t=1,i;return(i=e>>>16)!=0&&(e=i,t+=16),(i=e>>8)!=0&&(e=i,t+=8),(i=e>>4)!=0&&(e=i,t+=4),(i=e>>2)!=0&&(e=i,t+=2),(i=e>>1)!=0&&(e=i,t+=1),t}function Zg(){return this.t<=0?0:this.DB*(this.t-1)+Ga(this.data[this.t-1]^this.s&this.DM)}function ev(e,t){var i;for(i=this.t-1;i>=0;--i)t.data[i+e]=this.data[i];for(i=e-1;i>=0;--i)t.data[i]=0;t.t=this.t+e,t.s=this.s}function tv(e,t){for(var i=e;i<this.t;++i)t.data[i-e]=this.data[i];t.t=Math.max(this.t-e,0),t.s=this.s}function rv(e,t){var i=e%this.DB,r=this.DB-i,a=(1<<r)-1,n=Math.floor(e/this.DB),s=this.s<<i&this.DM,o;for(o=this.t-1;o>=0;--o)t.data[o+n+1]=this.data[o]>>r|s,s=(this.data[o]&a)<<i;for(o=n-1;o>=0;--o)t.data[o]=0;t.data[n]=s,t.t=this.t+n+1,t.s=this.s,t.clamp()}function iv(e,t){t.s=this.s;var i=Math.floor(e/this.DB);if(i>=this.t){t.t=0;return}var r=e%this.DB,a=this.DB-r,n=(1<<r)-1;t.data[0]=this.data[i]>>r;for(var s=i+1;s<this.t;++s)t.data[s-i-1]|=(this.data[s]&n)<<a,t.data[s-i]=this.data[s]>>r;r>0&&(t.data[this.t-i-1]|=(this.s&n)<<a),t.t=this.t-i,t.clamp()}function av(e,t){for(var i=0,r=0,a=Math.min(e.t,this.t);i<a;)r+=this.data[i]-e.data[i],t.data[i++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;i<this.t;)r+=this.data[i],t.data[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<e.t;)r-=e.data[i],t.data[i++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t.data[i++]=this.DV+r:r>0&&(t.data[i++]=r),t.t=i,t.clamp()}function nv(e,t){var i=this.abs(),r=e.abs(),a=i.t;for(t.t=a+r.t;--a>=0;)t.data[a]=0;for(a=0;a<r.t;++a)t.data[a+i.t]=i.am(0,r.data[a],t,a,0,i.t);t.s=0,t.clamp(),this.s!=e.s&&N.ZERO.subTo(t,t)}function sv(e){for(var t=this.abs(),i=e.t=2*t.t;--i>=0;)e.data[i]=0;for(i=0;i<t.t-1;++i){var r=t.am(i,t.data[i],e,2*i,0,1);(e.data[i+t.t]+=t.am(i+1,2*t.data[i],e,2*i+1,r,t.t-i-1))>=t.DV&&(e.data[i+t.t]-=t.DV,e.data[i+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(i,t.data[i],e,2*i,0,1)),e.s=0,e.clamp()}function ov(e,t,i){var r=e.abs();if(!(r.t<=0)){var a=this.abs();if(a.t<r.t){t?.fromInt(0),i!=null&&this.copyTo(i);return}i==null&&(i=Ce());var n=Ce(),s=this.s,o=e.s,u=this.DB-Ga(r.data[r.t-1]);u>0?(r.lShiftTo(u,n),a.lShiftTo(u,i)):(r.copyTo(n),a.copyTo(i));var l=n.t,c=n.data[l-1];if(c!=0){var f=c*(1<<this.F1)+(l>1?n.data[l-2]>>this.F2:0),p=this.FV/f,m=(1<<this.F1)/f,v=1<<this.F2,C=i.t,E=C-l,B=t??Ce();for(n.dlShiftTo(E,B),i.compareTo(B)>=0&&(i.data[i.t++]=1,i.subTo(B,i)),N.ONE.dlShiftTo(l,B),B.subTo(n,n);n.t<l;)n.data[n.t++]=0;for(;--E>=0;){var w=i.data[--C]==c?this.DM:Math.floor(i.data[C]*p+(i.data[C-1]+v)*m);if((i.data[C]+=n.am(0,w,i,E,0,l))<w)for(n.dlShiftTo(E,B),i.subTo(B,i);i.data[C]<--w;)i.subTo(B,i)}t!=null&&(i.drShiftTo(l,t),s!=o&&N.ZERO.subTo(t,t)),i.t=l,i.clamp(),u>0&&i.rShiftTo(u,i),s<0&&N.ZERO.subTo(i,i)}}}function uv(e){var t=Ce();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(N.ZERO)>0&&e.subTo(t,t),t}function Or(e){this.m=e}function lv(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function cv(e){return e}function fv(e){e.divRemTo(this.m,null,e)}function hv(e,t,i){e.multiplyTo(t,i),this.reduce(i)}function pv(e,t){e.squareTo(t),this.reduce(t)}Or.prototype.convert=lv;Or.prototype.revert=cv;Or.prototype.reduce=fv;Or.prototype.mulTo=hv;Or.prototype.sqrTo=pv;function dv(){if(this.t<1)return 0;var e=this.data[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Vr(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function gv(e){var t=Ce();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(N.ZERO)>0&&this.m.subTo(t,t),t}function vv(e){var t=Ce();return e.copyTo(t),this.reduce(t),t}function yv(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var i=e.data[t]&32767,r=i*this.mpl+((i*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(i=t+this.m.t,e.data[i]+=this.m.am(0,r,e,t,0,this.m.t);e.data[i]>=e.DV;)e.data[i]-=e.DV,e.data[++i]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function mv(e,t){e.squareTo(t),this.reduce(t)}function Av(e,t,i){e.multiplyTo(t,i),this.reduce(i)}Vr.prototype.convert=gv;Vr.prototype.revert=vv;Vr.prototype.reduce=yv;Vr.prototype.mulTo=Av;Vr.prototype.sqrTo=mv;function Cv(){return(this.t>0?this.data[0]&1:this.s)==0}function Ev(e,t){if(e>4294967295||e<1)return N.ONE;var i=Ce(),r=Ce(),a=t.convert(this),n=Ga(e)-1;for(a.copyTo(i);--n>=0;)if(t.sqrTo(i,r),(e&1<<n)>0)t.mulTo(r,a,i);else{var s=i;i=r,r=s}return t.revert(i)}function xv(e,t){var i;return e<256||t.isEven()?i=new Or(t):i=new Vr(t),this.exp(e,i)}N.prototype.copyTo=Gg;N.prototype.fromInt=jg;N.prototype.fromString=Yg;N.prototype.clamp=zg;N.prototype.dlShiftTo=ev;N.prototype.drShiftTo=tv;N.prototype.lShiftTo=rv;N.prototype.rShiftTo=iv;N.prototype.subTo=av;N.prototype.multiplyTo=nv;N.prototype.squareTo=sv;N.prototype.divRemTo=ov;N.prototype.invDigit=dv;N.prototype.isEven=Cv;N.prototype.exp=Ev;N.prototype.toString=Jg;N.prototype.negate=Wg;N.prototype.abs=Xg;N.prototype.compareTo=$g;N.prototype.bitLength=Zg;N.prototype.mod=uv;N.prototype.modPowInt=xv;N.ZERO=br(0);N.ONE=br(1);function Sv(){var e=Ce();return this.copyTo(e),e}function Iv(){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]}function Bv(){return this.t==0?this.s:this.data[0]<<24>>24}function bv(){return this.t==0?this.s:this.data[0]<<16>>16}function Tv(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function wv(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function _v(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),i=Math.pow(e,t),r=br(i),a=Ce(),n=Ce(),s="";for(this.divRemTo(r,a,n);a.signum()>0;)s=(i+n.intValue()).toString(e).substr(1)+s,a.divRemTo(r,a,n);return n.intValue().toString(e)+s}function Nv(e,t){this.fromInt(0),t==null&&(t=10);for(var i=this.chunkSize(t),r=Math.pow(t,i),a=!1,n=0,s=0,o=0;o<e.length;++o){var u=Sf(e,o);if(u<0){e.charAt(o)=="-"&&this.signum()==0&&(a=!0);continue}s=t*s+u,++n>=i&&(this.dMultiply(r),this.dAddOffset(s,0),n=0,s=0)}n>0&&(this.dMultiply(Math.pow(t,n)),this.dAddOffset(s,0)),a&&N.ZERO.subTo(this,this)}function kv(e,t,i){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,i),this.testBit(e-1)||this.bitwiseTo(N.ONE.shiftLeft(e-1),gs,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(N.ONE.shiftLeft(e-1),this);else{var r=new Array,a=e&7;r.length=(e>>3)+1,t.nextBytes(r),a>0?r[0]&=(1<<a)-1:r[0]=0,this.fromString(r,256)}}function Lv(){var e=this.t,t=new Array;t[0]=this.s;var i=this.DB-e*this.DB%8,r,a=0;if(e-- >0)for(i<this.DB&&(r=this.data[e]>>i)!=(this.s&this.DM)>>i&&(t[a++]=r|this.s<<this.DB-i);e>=0;)i<8?(r=(this.data[e]&(1<<i)-1)<<8-i,r|=this.data[--e]>>(i+=this.DB-8)):(r=this.data[e]>>(i-=8)&255,i<=0&&(i+=this.DB,--e)),r&128&&(r|=-256),a==0&&(this.s&128)!=(r&128)&&++a,(a>0||r!=this.s)&&(t[a++]=r);return t}function Rv(e){return this.compareTo(e)==0}function Dv(e){return this.compareTo(e)<0?this:e}function Pv(e){return this.compareTo(e)>0?this:e}function Qv(e,t,i){var r,a,n=Math.min(e.t,this.t);for(r=0;r<n;++r)i.data[r]=t(this.data[r],e.data[r]);if(e.t<this.t){for(a=e.s&this.DM,r=n;r<this.t;++r)i.data[r]=t(this.data[r],a);i.t=this.t}else{for(a=this.s&this.DM,r=n;r<e.t;++r)i.data[r]=t(a,e.data[r]);i.t=e.t}i.s=t(this.s,e.s),i.clamp()}function Uv(e,t){return e&t}function Ov(e){var t=Ce();return this.bitwiseTo(e,Uv,t),t}function gs(e,t){return e|t}function Vv(e){var t=Ce();return this.bitwiseTo(e,gs,t),t}function If(e,t){return e^t}function Fv(e){var t=Ce();return this.bitwiseTo(e,If,t),t}function Bf(e,t){return e&~t}function Mv(e){var t=Ce();return this.bitwiseTo(e,Bf,t),t}function qv(){for(var e=Ce(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function Kv(e){var t=Ce();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function Hv(e){var t=Ce();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function Gv(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function jv(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+Gv(this.data[e]);return this.s<0?this.t*this.DB:-1}function Yv(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function zv(){for(var e=0,t=this.s&this.DM,i=0;i<this.t;++i)e+=Yv(this.data[i]^t);return e}function Jv(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function Wv(e,t){var i=N.ONE.shiftLeft(e);return this.bitwiseTo(i,t,i),i}function Xv(e){return this.changeBit(e,gs)}function $v(e){return this.changeBit(e,Bf)}function Zv(e){return this.changeBit(e,If)}function ey(e,t){for(var i=0,r=0,a=Math.min(e.t,this.t);i<a;)r+=this.data[i]+e.data[i],t.data[i++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;i<this.t;)r+=this.data[i],t.data[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<e.t;)r+=e.data[i],t.data[i++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t.data[i++]=r:r<-1&&(t.data[i++]=this.DV+r),t.t=i,t.clamp()}function ty(e){var t=Ce();return this.addTo(e,t),t}function ry(e){var t=Ce();return this.subTo(e,t),t}function iy(e){var t=Ce();return this.multiplyTo(e,t),t}function ay(e){var t=Ce();return this.divRemTo(e,t,null),t}function ny(e){var t=Ce();return this.divRemTo(e,null,t),t}function sy(e){var t=Ce(),i=Ce();return this.divRemTo(e,t,i),new Array(t,i)}function oy(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function uy(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function ji(){}function bf(e){return e}function ly(e,t,i){e.multiplyTo(t,i)}function cy(e,t){e.squareTo(t)}ji.prototype.convert=bf;ji.prototype.revert=bf;ji.prototype.mulTo=ly;ji.prototype.sqrTo=cy;function fy(e){return this.exp(e,new ji)}function hy(e,t,i){var r=Math.min(this.t+e.t,t);for(i.s=0,i.t=r;r>0;)i.data[--r]=0;var a;for(a=i.t-this.t;r<a;++r)i.data[r+this.t]=this.am(0,e.data[r],i,r,0,this.t);for(a=Math.min(e.t,t);r<a;++r)this.am(0,e.data[r],i,r,0,t-r);i.clamp()}function py(e,t,i){--t;var r=i.t=this.t+e.t-t;for(i.s=0;--r>=0;)i.data[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)i.data[this.t+r-t]=this.am(t-r,e.data[r],i,0,0,this.t+r-t);i.clamp(),i.drShiftTo(1,i)}function oi(e){this.r2=Ce(),this.q3=Ce(),N.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function dy(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=Ce();return e.copyTo(t),this.reduce(t),t}function gy(e){return e}function vy(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function yy(e,t){e.squareTo(t),this.reduce(t)}function my(e,t,i){e.multiplyTo(t,i),this.reduce(i)}oi.prototype.convert=dy;oi.prototype.revert=gy;oi.prototype.reduce=vy;oi.prototype.mulTo=my;oi.prototype.sqrTo=yy;function Ay(e,t){var i=e.bitLength(),r,a=br(1),n;if(i<=0)return a;i<18?r=1:i<48?r=3:i<144?r=4:i<768?r=5:r=6,i<8?n=new Or(t):t.isEven()?n=new oi(t):n=new Vr(t);var s=new Array,o=3,u=r-1,l=(1<<r)-1;if(s[1]=n.convert(this),r>1){var c=Ce();for(n.sqrTo(s[1],c);o<=l;)s[o]=Ce(),n.mulTo(c,s[o-2],s[o]),o+=2}var f=e.t-1,p,m=!0,v=Ce(),C;for(i=Ga(e.data[f])-1;f>=0;){for(i>=u?p=e.data[f]>>i-u&l:(p=(e.data[f]&(1<<i+1)-1)<<u-i,f>0&&(p|=e.data[f-1]>>this.DB+i-u)),o=r;!(p&1);)p>>=1,--o;if((i-=o)<0&&(i+=this.DB,--f),m)s[p].copyTo(a),m=!1;else{for(;o>1;)n.sqrTo(a,v),n.sqrTo(v,a),o-=2;o>0?n.sqrTo(a,v):(C=a,a=v,v=C),n.mulTo(v,s[p],a)}for(;f>=0&&!(e.data[f]&1<<i);)n.sqrTo(a,v),C=a,a=v,v=C,--i<0&&(i=this.DB-1,--f)}return n.revert(a)}function Cy(e){var t=this.s<0?this.negate():this.clone(),i=e.s<0?e.negate():e.clone();if(t.compareTo(i)<0){var r=t;t=i,i=r}var a=t.getLowestSetBit(),n=i.getLowestSetBit();if(n<0)return t;for(a<n&&(n=a),n>0&&(t.rShiftTo(n,t),i.rShiftTo(n,i));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=i.getLowestSetBit())>0&&i.rShiftTo(a,i),t.compareTo(i)>=0?(t.subTo(i,t),t.rShiftTo(1,t)):(i.subTo(t,i),i.rShiftTo(1,i));return n>0&&i.lShiftTo(n,i),i}function Ey(e){if(e<=0)return 0;var t=this.DV%e,i=this.s<0?e-1:0;if(this.t>0)if(t==0)i=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)i=(t*i+this.data[r])%e;return i}function xy(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return N.ZERO;for(var i=e.clone(),r=this.clone(),a=br(1),n=br(0),s=br(0),o=br(1);i.signum()!=0;){for(;i.isEven();)i.rShiftTo(1,i),t?((!a.isEven()||!n.isEven())&&(a.addTo(this,a),n.subTo(e,n)),a.rShiftTo(1,a)):n.isEven()||n.subTo(e,n),n.rShiftTo(1,n);for(;r.isEven();)r.rShiftTo(1,r),t?((!s.isEven()||!o.isEven())&&(s.addTo(this,s),o.subTo(e,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);i.compareTo(r)>=0?(i.subTo(r,i),t&&a.subTo(s,a),n.subTo(o,n)):(r.subTo(i,r),t&&s.subTo(a,s),o.subTo(n,o))}if(r.compareTo(N.ONE)!=0)return N.ZERO;if(o.compareTo(e)>=0)return o.subtract(e);if(o.signum()<0)o.addTo(e,o);else return o;return o.signum()<0?o.add(e):o}var jt=[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],Sy=(1<<26)/jt[jt.length-1];function Iy(e){var t,i=this.abs();if(i.t==1&&i.data[0]<=jt[jt.length-1]){for(t=0;t<jt.length;++t)if(i.data[0]==jt[t])return!0;return!1}if(i.isEven())return!1;for(t=1;t<jt.length;){for(var r=jt[t],a=t+1;a<jt.length&&r<Sy;)r*=jt[a++];for(r=i.modInt(r);t<a;)if(r%jt[t++]==0)return!1}return i.millerRabin(e)}function By(e){var t=this.subtract(N.ONE),i=t.getLowestSetBit();if(i<=0)return!1;for(var r=t.shiftRight(i),a=by(),n,s=0;s<e;++s){do n=new N(this.bitLength(),a);while(n.compareTo(N.ONE)<=0||n.compareTo(t)>=0);var o=n.modPow(r,this);if(o.compareTo(N.ONE)!=0&&o.compareTo(t)!=0){for(var u=1;u++<i&&o.compareTo(t)!=0;)if(o=o.modPowInt(2,this),o.compareTo(N.ONE)==0)return!1;if(o.compareTo(t)!=0)return!1}}return!0}function by(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}N.prototype.chunkSize=Tv;N.prototype.toRadix=_v;N.prototype.fromRadix=Nv;N.prototype.fromNumber=kv;N.prototype.bitwiseTo=Qv;N.prototype.changeBit=Wv;N.prototype.addTo=ey;N.prototype.dMultiply=oy;N.prototype.dAddOffset=uy;N.prototype.multiplyLowerTo=hy;N.prototype.multiplyUpperTo=py;N.prototype.modInt=Ey;N.prototype.millerRabin=By;N.prototype.clone=Sv;N.prototype.intValue=Iv;N.prototype.byteValue=Bv;N.prototype.shortValue=bv;N.prototype.signum=wv;N.prototype.toByteArray=Lv;N.prototype.equals=Rv;N.prototype.min=Dv;N.prototype.max=Pv;N.prototype.and=Ov;N.prototype.or=Vv;N.prototype.xor=Fv;N.prototype.andNot=Mv;N.prototype.not=qv;N.prototype.shiftLeft=Kv;N.prototype.shiftRight=Hv;N.prototype.getLowestSetBit=jv;N.prototype.bitCount=zv;N.prototype.testBit=Jv;N.prototype.setBit=Xv;N.prototype.clearBit=$v;N.prototype.flipBit=Zv;N.prototype.add=ty;N.prototype.subtract=ry;N.prototype.multiply=iy;N.prototype.divide=ay;N.prototype.remainder=ny;N.prototype.divideAndRemainder=sy;N.prototype.modPow=Ay;N.prototype.modInverse=xy;N.prototype.pow=fy;N.prototype.gcd=Cy;N.prototype.isProbablePrime=Iy});var ui=F((pE,kf)=>{"use strict";S();var er=oe();Jt();Ae();var _f=kf.exports=er.sha1=er.sha1||{};er.md.sha1=er.md.algorithms.sha1=_f;_f.create=function(){Nf||Ty();var e=null,t=er.util.createBuffer(),i=new Array(80),r={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return r.start=function(){r.messageLength=0,r.fullMessageLength=r.messageLength64=[];for(var a=r.messageLengthSize/4,n=0;n<a;++n)r.fullMessageLength.push(0);return t=er.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},r},r.start(),r.update=function(a,n){n==="utf8"&&(a=er.util.encodeUtf8(a));var s=a.length;r.messageLength+=s,s=[s/4294967296>>>0,s>>>0];for(var o=r.fullMessageLength.length-1;o>=0;--o)r.fullMessageLength[o]+=s[1],s[1]=s[0]+(r.fullMessageLength[o]/4294967296>>>0),r.fullMessageLength[o]=r.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),wf(e,i,t),(t.read>2048||t.length()===0)&&t.compact(),r},r.digest=function(){var a=er.util.createBuffer();a.putBytes(t.bytes());var n=r.fullMessageLength[r.fullMessageLength.length-1]+r.messageLengthSize,s=n&r.blockLength-1;a.putBytes(vs.substr(0,r.blockLength-s));for(var o,u,l=r.fullMessageLength[0]*8,c=0;c<r.fullMessageLength.length-1;++c)o=r.fullMessageLength[c+1]*8,u=o/4294967296>>>0,l+=u,a.putInt32(l>>>0),l=o>>>0;a.putInt32(l);var f={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};wf(f,i,a);var p=er.util.createBuffer();return p.putInt32(f.h0),p.putInt32(f.h1),p.putInt32(f.h2),p.putInt32(f.h3),p.putInt32(f.h4),p},r};var vs=null,Nf=!1;function Ty(){vs="\x80",vs+=er.util.fillString("\0",64),Nf=!0}function wf(e,t,i){for(var r,a,n,s,o,u,l,c,f=i.length();f>=64;){for(a=e.h0,n=e.h1,s=e.h2,o=e.h3,u=e.h4,c=0;c<16;++c)r=i.getInt32(),t[c]=r,l=o^n&(s^o),r=(a<<5|a>>>27)+l+u+1518500249+r,u=o,o=s,s=(n<<30|n>>>2)>>>0,n=a,a=r;for(;c<20;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,l=o^n&(s^o),r=(a<<5|a>>>27)+l+u+1518500249+r,u=o,o=s,s=(n<<30|n>>>2)>>>0,n=a,a=r;for(;c<32;++c)r=t[c-3]^t[c-8]^t[c-14]^t[c-16],r=r<<1|r>>>31,t[c]=r,l=n^s^o,r=(a<<5|a>>>27)+l+u+1859775393+r,u=o,o=s,s=(n<<30|n>>>2)>>>0,n=a,a=r;for(;c<40;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,l=n^s^o,r=(a<<5|a>>>27)+l+u+1859775393+r,u=o,o=s,s=(n<<30|n>>>2)>>>0,n=a,a=r;for(;c<60;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,l=n&s|o&(n^s),r=(a<<5|a>>>27)+l+u+2400959708+r,u=o,o=s,s=(n<<30|n>>>2)>>>0,n=a,a=r;for(;c<80;++c)r=t[c-6]^t[c-16]^t[c-28]^t[c-32],r=r<<2|r>>>30,t[c]=r,l=n^s^o,r=(a<<5|a>>>27)+l+u+3395469782+r,u=o,o=s,s=(n<<30|n>>>2)>>>0,n=a,a=r;e.h0=e.h0+a|0,e.h1=e.h1+n|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,e.h4=e.h4+u|0,f-=64}}});var ys=F((gE,Rf)=>{"use strict";S();var tr=oe();Ae();Pt();ui();var Lf=Rf.exports=tr.pkcs1=tr.pkcs1||{};Lf.encode_rsa_oaep=function(e,t,i){var r,a,n,s;typeof i=="string"?(r=i,a=arguments[3]||void 0,n=arguments[4]||void 0):i&&(r=i.label||void 0,a=i.seed||void 0,n=i.md||void 0,i.mgf1&&i.mgf1.md&&(s=i.mgf1.md)),n?n.start():n=tr.md.sha1.create(),s||(s=n);var o=Math.ceil(e.n.bitLength()/8),u=o-2*n.digestLength-2;if(t.length>u){var l=new Error("RSAES-OAEP input message length is too long.");throw l.length=t.length,l.maxLength=u,l}r||(r=""),n.update(r,"raw");for(var c=n.digest(),f="",p=u-t.length,m=0;m<p;m++)f+="\0";var v=c.getBytes()+f+""+t;if(!a)a=tr.random.getBytes(n.digestLength);else if(a.length!==n.digestLength){var l=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw l.seedLength=a.length,l.digestLength=n.digestLength,l}var C=ja(a,o-n.digestLength-1,s),E=tr.util.xorBytes(v,C,v.length),B=ja(E,n.digestLength,s),w=tr.util.xorBytes(a,B,a.length);return"\0"+w+E};Lf.decode_rsa_oaep=function(e,t,i){var r,a,n;typeof i=="string"?(r=i,a=arguments[3]||void 0):i&&(r=i.label||void 0,a=i.md||void 0,i.mgf1&&i.mgf1.md&&(n=i.mgf1.md));var s=Math.ceil(e.n.bitLength()/8);if(t.length!==s){var E=new Error("RSAES-OAEP encoded message length is invalid.");throw E.length=t.length,E.expectedLength=s,E}if(a===void 0?a=tr.md.sha1.create():a.start(),n||(n=a),s<2*a.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");r||(r=""),a.update(r,"raw");for(var o=a.digest().getBytes(),u=t.charAt(0),l=t.substring(1,a.digestLength+1),c=t.substring(1+a.digestLength),f=ja(c,a.digestLength,n),p=tr.util.xorBytes(l,f,l.length),m=ja(p,s-a.digestLength-1,n),v=tr.util.xorBytes(c,m,c.length),C=v.substring(0,a.digestLength),E=u!=="\0",B=0;B<a.digestLength;++B)E|=o.charAt(B)!==C.charAt(B);for(var w=1,T=a.digestLength,U=a.digestLength;U<v.length;U++){var P=v.charCodeAt(U),Q=P&1^1,te=w?65534:0;E|=P&te,w=w&Q,T+=w}if(E||v.charCodeAt(T)!==1)throw new Error("Invalid RSAES-OAEP padding.");return v.substring(T+1)};function ja(e,t,i){i||(i=tr.md.sha1.create());for(var r="",a=Math.ceil(t/i.digestLength),n=0;n<a;++n){var s=String.fromCharCode(n>>24&255,n>>16&255,n>>8&255,n&255);i.start(),i.update(e+s),r+=i.digest().getBytes()}return r.substring(0,t)}});var As=F((yE,ms)=>{"use strict";S();var Tr=oe();Ae();Yi();Pt();(function(){if(Tr.prime){ms.exports=Tr.prime;return}var e=ms.exports=Tr.prime=Tr.prime||{},t=Tr.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],r=new t(null);r.fromInt(30);var a=function(f,p){return f|p};e.generateProbablePrime=function(f,p,m){typeof p=="function"&&(m=p,p={}),p=p||{};var v=p.algorithm||"PRIMEINC";typeof v=="string"&&(v={name:v}),v.options=v.options||{};var C=p.prng||Tr.random,E={nextBytes:function(B){for(var w=C.getBytesSync(B.length),T=0;T<B.length;++T)B[T]=w.charCodeAt(T)}};if(v.name==="PRIMEINC")return n(f,E,v.options,m);throw new Error("Invalid prime generation algorithm: "+v.name)};function n(f,p,m,v){return"workers"in m?u(f,p,m,v):s(f,p,m,v)}function s(f,p,m,v){var C=l(f,p),E=0,B=c(C.bitLength());"millerRabinTests"in m&&(B=m.millerRabinTests);var w=10;"maxBlockTime"in m&&(w=m.maxBlockTime),o(C,f,p,E,B,w,v)}function o(f,p,m,v,C,E,B){var w=+new Date;do{if(f.bitLength()>p&&(f=l(p,m)),f.isProbablePrime(C))return B(null,f);f.dAddOffset(i[v++%8],0)}while(E<0||+new Date-w<E);Tr.util.setImmediate(function(){o(f,p,m,v,C,E,B)})}function u(f,p,m,v){if(typeof Worker>"u")return s(f,p,m,v);var C=l(f,p),E=m.workers,B=m.workLoad||100,w=B*30/8,T=m.workerScript||"forge/prime.worker.js";if(E===-1)return Tr.util.estimateCores(function(P,Q){P&&(Q=2),E=Q-1,U()});U();function U(){E=Math.max(1,E);for(var P=[],Q=0;Q<E;++Q)P[Q]=new Worker(T);for(var te=E,Q=0;Q<E;++Q)P[Q].addEventListener("message",H);var ne=!1;function H(z){if(!ne){--te;var Y=z.data;if(Y.found){for(var re=0;re<P.length;++re)P[re].terminate();return ne=!0,v(null,new t(Y.prime,16))}C.bitLength()>f&&(C=l(f,p));var ye=C.toString(16);z.target.postMessage({hex:ye,workLoad:B}),C.dAddOffset(w,0)}}}}function l(f,p){var m=new t(f,p),v=f-1;return m.testBit(v)||m.bitwiseTo(t.ONE.shiftLeft(v),a,m),m.dAddOffset(31-m.mod(r).byteValue(),0),m}function c(f){return f<=100?27:f<=150?18:f<=200?15:f<=250?12:f<=300?9:f<=350?8:f<=400?7:f<=500?6:f<=600?5:f<=800?4:f<=1250?3:2}})()});var zi=F((AE,Ff)=>{"use strict";S();var W=oe();Gt();Yi();Br();ys();As();Pt();Ae();typeof ge>"u"&&(ge=W.jsbn.BigInteger);var ge,Cs=W.util.isNodejs?Le("crypto"):null,b=W.asn1,Ut=W.util;W.pki=W.pki||{};Ff.exports=W.pki.rsa=W.rsa=W.rsa||{};var ae=W.pki,wy=[6,4,2,4,2,4,6,2],_y={name:"PrivateKeyInfo",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:b.Class.UNIVERSAL,type:b.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:b.Class.UNIVERSAL,type:b.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},Ny={name:"RSAPrivateKey",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},ky={name:"RSAPublicKey",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:b.Class.UNIVERSAL,type:b.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},Ly=W.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:b.Class.UNIVERSAL,type:b.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:b.Class.UNIVERSAL,type:b.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},Ry={name:"DigestInfo",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:b.Class.UNIVERSAL,type:b.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:b.Class.UNIVERSAL,type:b.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:b.Class.UNIVERSAL,type:b.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:b.Class.UNIVERSAL,type:b.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},Dy=function(e){var t;if(e.algorithm in ae.oids)t=ae.oids[e.algorithm];else{var i=new Error("Unknown message digest algorithm.");throw i.algorithm=e.algorithm,i}var r=b.oidToDer(t).getBytes(),a=b.create(b.Class.UNIVERSAL,b.Type.SEQUENCE,!0,[]),n=b.create(b.Class.UNIVERSAL,b.Type.SEQUENCE,!0,[]);n.value.push(b.create(b.Class.UNIVERSAL,b.Type.OID,!1,r)),n.value.push(b.create(b.Class.UNIVERSAL,b.Type.NULL,!1,""));var s=b.create(b.Class.UNIVERSAL,b.Type.OCTETSTRING,!1,e.digest().getBytes());return a.value.push(n),a.value.push(s),b.toDer(a).getBytes()},Of=function(e,t,i){if(i)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(ge.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(ge.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var r;do r=new ge(W.util.bytesToHex(W.random.getBytes(t.n.bitLength()/8)),16);while(r.compareTo(t.n)>=0||!r.gcd(t.n).equals(ge.ONE));e=e.multiply(r.modPow(t.e,t.n)).mod(t.n);for(var a=e.mod(t.p).modPow(t.dP,t.p),n=e.mod(t.q).modPow(t.dQ,t.q);a.compareTo(n)<0;)a=a.add(t.p);var s=a.subtract(n).multiply(t.qInv).mod(t.p).multiply(t.q).add(n);return s=s.multiply(r.modInverse(t.n)).mod(t.n),s};ae.rsa.encrypt=function(e,t,i){var r=i,a,n=Math.ceil(t.n.bitLength()/8);i!==!1&&i!==!0?(r=i===2,a=Vf(e,t,i)):(a=W.util.createBuffer(),a.putBytes(e));for(var s=new ge(a.toHex(),16),o=Of(s,t,r),u=o.toString(16),l=W.util.createBuffer(),c=n-Math.ceil(u.length/2);c>0;)l.putByte(0),--c;return l.putBytes(W.util.hexToBytes(u)),l.getBytes()};ae.rsa.decrypt=function(e,t,i,r){var a=Math.ceil(t.n.bitLength()/8);if(e.length!==a){var n=new Error("Encrypted message length is invalid.");throw n.length=e.length,n.expected=a,n}var s=new ge(W.util.createBuffer(e).toHex(),16);if(s.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var o=Of(s,t,i),u=o.toString(16),l=W.util.createBuffer(),c=a-Math.ceil(u.length/2);c>0;)l.putByte(0),--c;return l.putBytes(W.util.hexToBytes(u)),r!==!1?Ya(l.getBytes(),t,i):l.getBytes()};ae.rsa.createKeyPairGenerationState=function(e,t,i){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,i=i||{};var r=i.prng||W.random,a={nextBytes:function(o){for(var u=r.getBytesSync(o.length),l=0;l<o.length;++l)o[l]=u.charCodeAt(l)}},n=i.algorithm||"PRIMEINC",s;if(n==="PRIMEINC")s={algorithm:n,state:0,bits:e,rng:a,eInt:t||65537,e:new ge(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},s.e.fromInt(s.eInt);else throw new Error("Invalid key generation algorithm: "+n);return s};ae.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var i=new ge(null);i.fromInt(30);for(var r=0,a=function(f,p){return f|p},n=+new Date,s,o=0;e.keys===null&&(t<=0||o<t);){if(e.state===0){var u=e.p===null?e.pBits:e.qBits,l=u-1;e.pqState===0?(e.num=new ge(u,e.rng),e.num.testBit(l)||e.num.bitwiseTo(ge.ONE.shiftLeft(l),a,e.num),e.num.dAddOffset(31-e.num.mod(i).byteValue(),0),r=0,++e.pqState):e.pqState===1?e.num.bitLength()>u?e.pqState=0:e.num.isProbablePrime(Qy(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(wy[r++%8],0):e.pqState===2?e.pqState=e.num.subtract(ge.ONE).gcd(e.e).compareTo(ge.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(ge.ONE),e.q1=e.q.subtract(ge.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(ge.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var c=e.e.modInverse(e.phi);e.keys={privateKey:ae.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:ae.rsa.setPublicKey(e.n,e.e)}}s=+new Date,o+=s-n,n=s}return e.keys!==null};ae.rsa.generateKeyPair=function(e,t,i,r){if(arguments.length===1?typeof e=="object"?(i=e,e=void 0):typeof e=="function"&&(r=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(r=t,t=void 0):typeof t!="number"&&(i=t,t=void 0):(i=e,r=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof i=="function"&&(r=i,i=void 0):(r=i,i=t,t=void 0)),i=i||{},e===void 0&&(e=i.bits||2048),t===void 0&&(t=i.e||65537),!W.options.usePureJavaScript&&!i.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(r){if(Df("generateKeyPair"))return Cs.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(o,u,l){if(o)return r(o);r(null,{privateKey:ae.privateKeyFromPem(l),publicKey:ae.publicKeyFromPem(u)})});if(Pf("generateKey")&&Pf("exportKey"))return Ut.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:Uf(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(o){return Ut.globalScope.crypto.subtle.exportKey("pkcs8",o.privateKey)}).then(void 0,function(o){r(o)}).then(function(o){if(o){var u=ae.privateKeyFromAsn1(b.fromDer(W.util.createBuffer(o)));r(null,{privateKey:u,publicKey:ae.setRsaPublicKey(u.n,u.e)})}});if(Qf("generateKey")&&Qf("exportKey")){var a=Ut.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:Uf(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);a.oncomplete=function(o){var u=o.target.result,l=Ut.globalScope.msCrypto.subtle.exportKey("pkcs8",u.privateKey);l.oncomplete=function(c){var f=c.target.result,p=ae.privateKeyFromAsn1(b.fromDer(W.util.createBuffer(f)));r(null,{privateKey:p,publicKey:ae.setRsaPublicKey(p.n,p.e)})},l.onerror=function(c){r(c)}},a.onerror=function(o){r(o)};return}}else if(Df("generateKeyPairSync")){var n=Cs.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:ae.privateKeyFromPem(n.privateKey),publicKey:ae.publicKeyFromPem(n.publicKey)}}}var s=ae.rsa.createKeyPairGenerationState(e,t,i);if(!r)return ae.rsa.stepKeyPairGenerationState(s,0),s.keys;Py(s,i,r)};ae.setRsaPublicKey=ae.rsa.setPublicKey=function(e,t){var i={n:e,e:t};return i.encrypt=function(r,a,n){if(typeof a=="string"?a=a.toUpperCase():a===void 0&&(a="RSAES-PKCS1-V1_5"),a==="RSAES-PKCS1-V1_5")a={encode:function(o,u,l){return Vf(o,u,2).getBytes()}};else if(a==="RSA-OAEP"||a==="RSAES-OAEP")a={encode:function(o,u){return W.pkcs1.encode_rsa_oaep(u,o,n)}};else if(["RAW","NONE","NULL",null].indexOf(a)!==-1)a={encode:function(o){return o}};else if(typeof a=="string")throw new Error('Unsupported encryption scheme: "'+a+'".');var s=a.encode(r,i,!0);return ae.rsa.encrypt(s,i,!0)},i.verify=function(r,a,n,s){typeof n=="string"?n=n.toUpperCase():n===void 0&&(n="RSASSA-PKCS1-V1_5"),s===void 0&&(s={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in s||(s._parseAllDigestBytes=!0),n==="RSASSA-PKCS1-V1_5"?n={verify:function(u,l){l=Ya(l,i,!0);var c=b.fromDer(l,{parseAllBytes:s._parseAllDigestBytes}),f={},p=[];if(!b.validate(c,Ry,f,p)){var m=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw m.errors=p,m}var v=b.derToOid(f.algorithmIdentifier);if(!(v===W.oids.md2||v===W.oids.md5||v===W.oids.sha1||v===W.oids.sha224||v===W.oids.sha256||v===W.oids.sha384||v===W.oids.sha512||v===W.oids["sha512-224"]||v===W.oids["sha512-256"])){var m=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw m.oid=v,m}if((v===W.oids.md2||v===W.oids.md5)&&!("parameters"in f))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return u===f.digest}}:(n==="NONE"||n==="NULL"||n===null)&&(n={verify:function(u,l){return l=Ya(l,i,!0),u===l}});var o=ae.rsa.decrypt(a,i,!0,!1);return n.verify(r,o,i.n.bitLength())},i};ae.setRsaPrivateKey=ae.rsa.setPrivateKey=function(e,t,i,r,a,n,s,o){var u={n:e,e:t,d:i,p:r,q:a,dP:n,dQ:s,qInv:o};return u.decrypt=function(l,c,f){typeof c=="string"?c=c.toUpperCase():c===void 0&&(c="RSAES-PKCS1-V1_5");var p=ae.rsa.decrypt(l,u,!1,!1);if(c==="RSAES-PKCS1-V1_5")c={decode:Ya};else if(c==="RSA-OAEP"||c==="RSAES-OAEP")c={decode:function(m,v){return W.pkcs1.decode_rsa_oaep(v,m,f)}};else if(["RAW","NONE","NULL",null].indexOf(c)!==-1)c={decode:function(m){return m}};else throw new Error('Unsupported encryption scheme: "'+c+'".');return c.decode(p,u,!1)},u.sign=function(l,c){var f=!1;typeof c=="string"&&(c=c.toUpperCase()),c===void 0||c==="RSASSA-PKCS1-V1_5"?(c={encode:Dy},f=1):(c==="NONE"||c==="NULL"||c===null)&&(c={encode:function(){return l}},f=1);var p=c.encode(l,u.n.bitLength());return ae.rsa.encrypt(p,u,f)},u};ae.wrapRsaPrivateKey=function(e){return b.create(b.Class.UNIVERSAL,b.Type.SEQUENCE,!0,[b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,b.integerToDer(0).getBytes()),b.create(b.Class.UNIVERSAL,b.Type.SEQUENCE,!0,[b.create(b.Class.UNIVERSAL,b.Type.OID,!1,b.oidToDer(ae.oids.rsaEncryption).getBytes()),b.create(b.Class.UNIVERSAL,b.Type.NULL,!1,"")]),b.create(b.Class.UNIVERSAL,b.Type.OCTETSTRING,!1,b.toDer(e).getBytes())])};ae.privateKeyFromAsn1=function(e){var t={},i=[];if(b.validate(e,_y,t,i)&&(e=b.fromDer(W.util.createBuffer(t.privateKey))),t={},i=[],!b.validate(e,Ny,t,i)){var r=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw r.errors=i,r}var a,n,s,o,u,l,c,f;return a=W.util.createBuffer(t.privateKeyModulus).toHex(),n=W.util.createBuffer(t.privateKeyPublicExponent).toHex(),s=W.util.createBuffer(t.privateKeyPrivateExponent).toHex(),o=W.util.createBuffer(t.privateKeyPrime1).toHex(),u=W.util.createBuffer(t.privateKeyPrime2).toHex(),l=W.util.createBuffer(t.privateKeyExponent1).toHex(),c=W.util.createBuffer(t.privateKeyExponent2).toHex(),f=W.util.createBuffer(t.privateKeyCoefficient).toHex(),ae.setRsaPrivateKey(new ge(a,16),new ge(n,16),new ge(s,16),new ge(o,16),new ge(u,16),new ge(l,16),new ge(c,16),new ge(f,16))};ae.privateKeyToAsn1=ae.privateKeyToRSAPrivateKey=function(e){return b.create(b.Class.UNIVERSAL,b.Type.SEQUENCE,!0,[b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,b.integerToDer(0).getBytes()),b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.n)),b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.e)),b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.d)),b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.p)),b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.q)),b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.dP)),b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.dQ)),b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.qInv))])};ae.publicKeyFromAsn1=function(e){var t={},i=[];if(b.validate(e,Ly,t,i)){var r=b.derToOid(t.publicKeyOid);if(r!==ae.oids.rsaEncryption){var a=new Error("Cannot read public key. Unknown OID.");throw a.oid=r,a}e=t.rsaPublicKey}if(i=[],!b.validate(e,ky,t,i)){var a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw a.errors=i,a}var n=W.util.createBuffer(t.publicKeyModulus).toHex(),s=W.util.createBuffer(t.publicKeyExponent).toHex();return ae.setRsaPublicKey(new ge(n,16),new ge(s,16))};ae.publicKeyToAsn1=ae.publicKeyToSubjectPublicKeyInfo=function(e){return b.create(b.Class.UNIVERSAL,b.Type.SEQUENCE,!0,[b.create(b.Class.UNIVERSAL,b.Type.SEQUENCE,!0,[b.create(b.Class.UNIVERSAL,b.Type.OID,!1,b.oidToDer(ae.oids.rsaEncryption).getBytes()),b.create(b.Class.UNIVERSAL,b.Type.NULL,!1,"")]),b.create(b.Class.UNIVERSAL,b.Type.BITSTRING,!1,[ae.publicKeyToRSAPublicKey(e)])])};ae.publicKeyToRSAPublicKey=function(e){return b.create(b.Class.UNIVERSAL,b.Type.SEQUENCE,!0,[b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.n)),b.create(b.Class.UNIVERSAL,b.Type.INTEGER,!1,rr(e.e))])};function Vf(e,t,i){var r=W.util.createBuffer(),a=Math.ceil(t.n.bitLength()/8);if(e.length>a-11){var n=new Error("Message is too long for PKCS#1 v1.5 padding.");throw n.length=e.length,n.max=a-11,n}r.putByte(0),r.putByte(i);var s=a-3-e.length,o;if(i===0||i===1){o=i===0?0:255;for(var u=0;u<s;++u)r.putByte(o)}else for(;s>0;){for(var l=0,c=W.random.getBytes(s),u=0;u<s;++u)o=c.charCodeAt(u),o===0?++l:r.putByte(o);s=l}return r.putByte(0),r.putBytes(e),r}function Ya(e,t,i,r){var a=Math.ceil(t.n.bitLength()/8),n=W.util.createBuffer(e),s=n.getByte(),o=n.getByte();if(s!==0||i&&o!==0&&o!==1||!i&&o!=2||i&&o===0&&typeof r>"u")throw new Error("Encryption block is invalid.");var u=0;if(o===0){u=a-3-r;for(var l=0;l<u;++l)if(n.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(o===1)for(u=0;n.length()>1;){if(n.getByte()!==255){--n.read;break}++u}else if(o===2)for(u=0;n.length()>1;){if(n.getByte()===0){--n.read;break}++u}var c=n.getByte();if(c!==0||u!==a-3-n.length())throw new Error("Encryption block is invalid.");return n.getBytes()}function Py(e,t,i){typeof t=="function"&&(i=t,t={}),t=t||{};var r={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(r.prng=t.prng),a();function a(){n(e.pBits,function(o,u){if(o)return i(o);if(e.p=u,e.q!==null)return s(o,e.q);n(e.qBits,s)})}function n(o,u){W.prime.generateProbablePrime(o,r,u)}function s(o,u){if(o)return i(o);if(e.q=u,e.p.compareTo(e.q)<0){var l=e.p;e.p=e.q,e.q=l}if(e.p.subtract(ge.ONE).gcd(e.e).compareTo(ge.ONE)!==0){e.p=null,a();return}if(e.q.subtract(ge.ONE).gcd(e.e).compareTo(ge.ONE)!==0){e.q=null,n(e.qBits,s);return}if(e.p1=e.p.subtract(ge.ONE),e.q1=e.q.subtract(ge.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(ge.ONE)!==0){e.p=e.q=null,a();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,n(e.qBits,s);return}var c=e.e.modInverse(e.phi);e.keys={privateKey:ae.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:ae.rsa.setPublicKey(e.n,e.e)},i(null,e.keys)}}function rr(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var i=W.util.hexToBytes(t);return i.length>1&&(i.charCodeAt(0)===0&&!(i.charCodeAt(1)&128)||i.charCodeAt(0)===255&&(i.charCodeAt(1)&128)===128)?i.substr(1):i}function Qy(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function Df(e){return W.util.isNodejs&&typeof Cs[e]=="function"}function Pf(e){return typeof Ut.globalScope<"u"&&typeof Ut.globalScope.crypto=="object"&&typeof Ut.globalScope.crypto.subtle=="object"&&typeof Ut.globalScope.crypto.subtle[e]=="function"}function Qf(e){return typeof Ut.globalScope<"u"&&typeof Ut.globalScope.msCrypto=="object"&&typeof Ut.globalScope.msCrypto.subtle=="object"&&typeof Ut.globalScope.msCrypto.subtle[e]=="function"}function Uf(e){for(var t=W.util.hexToBytes(e.toString(16)),i=new Uint8Array(t.length),r=0;r<t.length;++r)i[r]=t.charCodeAt(r);return i}});var Es=F((EE,Gf)=>{"use strict";S();var G=oe();Ir();Gt();Gi();Jt();Br();qa();Ur();Pt();hs();zi();Ae();typeof Mf>"u"&&(Mf=G.jsbn.BigInteger);var Mf,_=G.asn1,se=G.pki=G.pki||{};Gf.exports=se.pbe=G.pbe=G.pbe||{};var Fr=se.oids,Uy={name:"EncryptedPrivateKeyInfo",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:_.Class.UNIVERSAL,type:_.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},Oy={name:"PBES2Algorithms",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:_.Class.UNIVERSAL,type:_.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:_.Class.UNIVERSAL,type:_.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:_.Class.UNIVERSAL,type:_.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:_.Class.UNIVERSAL,type:_.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:_.Class.UNIVERSAL,type:_.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},Vy={name:"pkcs-12PbeParams",tagClass:_.Class.UNIVERSAL,type:_.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:_.Class.UNIVERSAL,type:_.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:_.Class.UNIVERSAL,type:_.Type.INTEGER,constructed:!1,capture:"iterations"}]};se.encryptPrivateKeyInfo=function(e,t,i){i=i||{},i.saltSize=i.saltSize||8,i.count=i.count||2048,i.algorithm=i.algorithm||"aes128",i.prfAlgorithm=i.prfAlgorithm||"sha1";var r=G.random.getBytesSync(i.saltSize),a=i.count,n=_.integerToDer(a),s,o,u;if(i.algorithm.indexOf("aes")===0||i.algorithm==="des"){var l,c,f;switch(i.algorithm){case"aes128":s=16,l=16,c=Fr["aes128-CBC"],f=G.aes.createEncryptionCipher;break;case"aes192":s=24,l=16,c=Fr["aes192-CBC"],f=G.aes.createEncryptionCipher;break;case"aes256":s=32,l=16,c=Fr["aes256-CBC"],f=G.aes.createEncryptionCipher;break;case"des":s=8,l=8,c=Fr.desCBC,f=G.des.createEncryptionCipher;break;default:var p=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw p.algorithm=i.algorithm,p}var m="hmacWith"+i.prfAlgorithm.toUpperCase(),v=Hf(m),C=G.pkcs5.pbkdf2(t,r,a,s,v),E=G.random.getBytesSync(l),B=f(C);B.start(E),B.update(_.toDer(e)),B.finish(),u=B.output.getBytes();var w=Fy(r,n,s,m);o=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(Fr.pkcs5PBES2).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(Fr.pkcs5PBKDF2).getBytes()),w]),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(c).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.OCTETSTRING,!1,E)])])])}else if(i.algorithm==="3des"){s=24;var T=new G.util.ByteBuffer(r),C=se.pbe.generatePkcs12Key(t,T,1,a,s),E=se.pbe.generatePkcs12Key(t,T,2,a,s),B=G.des.createEncryptionCipher(C);B.start(E),B.update(_.toDer(e)),B.finish(),u=B.output.getBytes(),o=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(Fr["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OCTETSTRING,!1,r),_.create(_.Class.UNIVERSAL,_.Type.INTEGER,!1,n.getBytes())])])}else{var p=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw p.algorithm=i.algorithm,p}var U=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[o,_.create(_.Class.UNIVERSAL,_.Type.OCTETSTRING,!1,u)]);return U};se.decryptPrivateKeyInfo=function(e,t){var i=null,r={},a=[];if(!_.validate(e,Uy,r,a)){var n=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw n.errors=a,n}var s=_.derToOid(r.encryptionOid),o=se.pbe.getCipher(s,r.encryptionParams,t),u=G.util.createBuffer(r.encryptedData);return o.update(u),o.finish()&&(i=_.fromDer(o.output)),i};se.encryptedPrivateKeyToPem=function(e,t){var i={type:"ENCRYPTED PRIVATE KEY",body:_.toDer(e).getBytes()};return G.pem.encode(i,{maxline:t})};se.encryptedPrivateKeyFromPem=function(e){var t=G.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var i=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw i.headerType=t.type,i}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return _.fromDer(t.body)};se.encryptRsaPrivateKey=function(e,t,i){if(i=i||{},!i.legacy){var r=se.wrapRsaPrivateKey(se.privateKeyToAsn1(e));return r=se.encryptPrivateKeyInfo(r,t,i),se.encryptedPrivateKeyToPem(r)}var a,n,s,o;switch(i.algorithm){case"aes128":a="AES-128-CBC",s=16,n=G.random.getBytesSync(16),o=G.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",s=24,n=G.random.getBytesSync(16),o=G.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",s=32,n=G.random.getBytesSync(16),o=G.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",s=24,n=G.random.getBytesSync(8),o=G.des.createEncryptionCipher;break;case"des":a="DES-CBC",s=8,n=G.random.getBytesSync(8),o=G.des.createEncryptionCipher;break;default:var u=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+i.algorithm+'".');throw u.algorithm=i.algorithm,u}var l=G.pbe.opensslDeriveBytes(t,n.substr(0,8),s),c=o(l);c.start(n),c.update(_.toDer(se.privateKeyToAsn1(e))),c.finish();var f={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:G.util.bytesToHex(n).toUpperCase()},body:c.output.getBytes()};return G.pem.encode(f)};se.decryptRsaPrivateKey=function(e,t){var i=null,r=G.pem.decode(e)[0];if(r.type!=="ENCRYPTED PRIVATE KEY"&&r.type!=="PRIVATE KEY"&&r.type!=="RSA PRIVATE KEY"){var a=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw a.headerType=a,a}if(r.procType&&r.procType.type==="ENCRYPTED"){var n,s;switch(r.dekInfo.algorithm){case"DES-CBC":n=8,s=G.des.createDecryptionCipher;break;case"DES-EDE3-CBC":n=24,s=G.des.createDecryptionCipher;break;case"AES-128-CBC":n=16,s=G.aes.createDecryptionCipher;break;case"AES-192-CBC":n=24,s=G.aes.createDecryptionCipher;break;case"AES-256-CBC":n=32,s=G.aes.createDecryptionCipher;break;case"RC2-40-CBC":n=5,s=function(f){return G.rc2.createDecryptionCipher(f,40)};break;case"RC2-64-CBC":n=8,s=function(f){return G.rc2.createDecryptionCipher(f,64)};break;case"RC2-128-CBC":n=16,s=function(f){return G.rc2.createDecryptionCipher(f,128)};break;default:var a=new Error('Could not decrypt private key; unsupported encryption algorithm "'+r.dekInfo.algorithm+'".');throw a.algorithm=r.dekInfo.algorithm,a}var o=G.util.hexToBytes(r.dekInfo.parameters),u=G.pbe.opensslDeriveBytes(t,o.substr(0,8),n),l=s(u);if(l.start(o),l.update(G.util.createBuffer(r.body)),l.finish())i=l.output.getBytes();else return i}else i=r.body;return r.type==="ENCRYPTED PRIVATE KEY"?i=se.decryptPrivateKeyInfo(_.fromDer(i),t):i=_.fromDer(i),i!==null&&(i=se.privateKeyFromAsn1(i)),i};se.pbe.generatePkcs12Key=function(e,t,i,r,a,n){var s,o;if(typeof n>"u"||n===null){if(!("sha1"in G.md))throw new Error('"sha1" hash algorithm unavailable.');n=G.md.sha1.create()}var u=n.digestLength,l=n.blockLength,c=new G.util.ByteBuffer,f=new G.util.ByteBuffer;if(e!=null){for(o=0;o<e.length;o++)f.putInt16(e.charCodeAt(o));f.putInt16(0)}var p=f.length(),m=t.length(),v=new G.util.ByteBuffer;v.fillWithByte(i,l);var C=l*Math.ceil(m/l),E=new G.util.ByteBuffer;for(o=0;o<C;o++)E.putByte(t.at(o%m));var B=l*Math.ceil(p/l),w=new G.util.ByteBuffer;for(o=0;o<B;o++)w.putByte(f.at(o%p));var T=E;T.putBuffer(w);for(var U=Math.ceil(a/u),P=1;P<=U;P++){var Q=new G.util.ByteBuffer;Q.putBytes(v.bytes()),Q.putBytes(T.bytes());for(var te=0;te<r;te++)n.start(),n.update(Q.getBytes()),Q=n.digest();var ne=new G.util.ByteBuffer;for(o=0;o<l;o++)ne.putByte(Q.at(o%u));var H=Math.ceil(m/l)+Math.ceil(p/l),z=new G.util.ByteBuffer;for(s=0;s<H;s++){var Y=new G.util.ByteBuffer(T.getBytes(l)),re=511;for(o=ne.length()-1;o>=0;o--)re=re>>8,re+=ne.at(o)+Y.at(o),Y.setAt(o,re&255);z.putBuffer(Y)}T=z,c.putBuffer(Q)}return c.truncate(c.length()-a),c};se.pbe.getCipher=function(e,t,i){switch(e){case se.oids.pkcs5PBES2:return se.pbe.getCipherForPBES2(e,t,i);case se.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case se.oids["pbewithSHAAnd40BitRC2-CBC"]:return se.pbe.getCipherForPKCS12PBE(e,t,i);default:var r=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw r.oid=e,r.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],r}};se.pbe.getCipherForPBES2=function(e,t,i){var r={},a=[];if(!_.validate(t,Oy,r,a)){var n=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw n.errors=a,n}if(e=_.derToOid(r.kdfOid),e!==se.oids.pkcs5PBKDF2){var n=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw n.oid=e,n.supportedOids=["pkcs5PBKDF2"],n}if(e=_.derToOid(r.encOid),e!==se.oids["aes128-CBC"]&&e!==se.oids["aes192-CBC"]&&e!==se.oids["aes256-CBC"]&&e!==se.oids["des-EDE3-CBC"]&&e!==se.oids.desCBC){var n=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw n.oid=e,n.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],n}var s=r.kdfSalt,o=G.util.createBuffer(r.kdfIterationCount);o=o.getInt(o.length()<<3);var u,l;switch(se.oids[e]){case"aes128-CBC":u=16,l=G.aes.createDecryptionCipher;break;case"aes192-CBC":u=24,l=G.aes.createDecryptionCipher;break;case"aes256-CBC":u=32,l=G.aes.createDecryptionCipher;break;case"des-EDE3-CBC":u=24,l=G.des.createDecryptionCipher;break;case"desCBC":u=8,l=G.des.createDecryptionCipher;break}var c=Kf(r.prfOid),f=G.pkcs5.pbkdf2(i,s,o,u,c),p=r.encIv,m=l(f);return m.start(p),m};se.pbe.getCipherForPKCS12PBE=function(e,t,i){var r={},a=[];if(!_.validate(t,Vy,r,a)){var n=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw n.errors=a,n}var s=G.util.createBuffer(r.salt),o=G.util.createBuffer(r.iterations);o=o.getInt(o.length()<<3);var u,l,c;switch(e){case se.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,l=8,c=G.des.startDecrypting;break;case se.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,l=8,c=function(C,E){var B=G.rc2.createDecryptionCipher(C,40);return B.start(E,null),B};break;default:var n=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw n.oid=e,n}var f=Kf(r.prfOid),p=se.pbe.generatePkcs12Key(i,s,1,o,u,f);f.start();var m=se.pbe.generatePkcs12Key(i,s,2,o,l,f);return c(p,m)};se.pbe.opensslDeriveBytes=function(e,t,i,r){if(typeof r>"u"||r===null){if(!("md5"in G.md))throw new Error('"md5" hash algorithm unavailable.');r=G.md.md5.create()}t===null&&(t="");for(var a=[qf(r,e+t)],n=16,s=1;n<i;++s,n+=16)a.push(qf(r,a[s-1]+e+t));return a.join("").substr(0,i)};function qf(e,t){return e.start().update(t).digest().getBytes()}function Kf(e){var t;if(!e)t="hmacWithSHA1";else if(t=se.oids[_.derToOid(e)],!t){var i=new Error("Unsupported PRF OID.");throw i.oid=e,i.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],i}return Hf(t)}function Hf(e){var t=G.md;switch(e){case"hmacWithSHA224":t=G.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var i=new Error("Unsupported PRF algorithm.");throw i.algorithm=e,i.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],i}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function Fy(e,t,i,r){var a=_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OCTETSTRING,!1,e),_.create(_.Class.UNIVERSAL,_.Type.INTEGER,!1,t.getBytes())]);return r!=="hmacWithSHA1"&&a.value.push(_.create(_.Class.UNIVERSAL,_.Type.INTEGER,!1,G.util.hexToBytes(i.toString(16))),_.create(_.Class.UNIVERSAL,_.Type.SEQUENCE,!0,[_.create(_.Class.UNIVERSAL,_.Type.OID,!1,_.oidToDer(se.oids[r]).getBytes()),_.create(_.Class.UNIVERSAL,_.Type.NULL,!1,"")])),a}});var xs=F((SE,zf)=>{"use strict";S();var li=oe();Gt();Ae();var K=li.asn1,ci=zf.exports=li.pkcs7asn1=li.pkcs7asn1||{};li.pkcs7=li.pkcs7||{};li.pkcs7.asn1=ci;var jf={name:"ContentInfo",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:K.Class.UNIVERSAL,type:K.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:K.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};ci.contentInfoValidator=jf;var Yf={name:"EncryptedContentInfo",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:K.Class.UNIVERSAL,type:K.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:K.Class.UNIVERSAL,type:K.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:K.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:K.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};ci.envelopedDataValidator={name:"EnvelopedData",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:K.Class.UNIVERSAL,type:K.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:K.Class.UNIVERSAL,type:K.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(Yf)};ci.encryptedDataValidator={name:"EncryptedData",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:K.Class.UNIVERSAL,type:K.Type.INTEGER,constructed:!1,capture:"version"}].concat(Yf)};var My={name:"SignerInfo",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:K.Class.UNIVERSAL,type:K.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:K.Class.UNIVERSAL,type:K.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:K.Class.UNIVERSAL,type:K.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:K.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:K.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:K.Class.UNIVERSAL,type:K.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:K.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};ci.signedDataValidator={name:"SignedData",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:K.Class.UNIVERSAL,type:K.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:K.Class.UNIVERSAL,type:K.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},jf,{name:"SignedData.Certificates",tagClass:K.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:K.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:K.Class.UNIVERSAL,type:K.Type.SET,capture:"signerInfos",optional:!0,value:[My]}]};ci.recipientInfoValidator={name:"RecipientInfo",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:K.Class.UNIVERSAL,type:K.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:K.Class.UNIVERSAL,type:K.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:K.Class.UNIVERSAL,type:K.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:K.Class.UNIVERSAL,type:K.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:K.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:K.Class.UNIVERSAL,type:K.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var Ss=F((BE,Jf)=>{"use strict";S();var Mr=oe();Ae();Mr.mgf=Mr.mgf||{};var qy=Jf.exports=Mr.mgf.mgf1=Mr.mgf1=Mr.mgf1||{};qy.create=function(e){var t={generate:function(i,r){for(var a=new Mr.util.ByteBuffer,n=Math.ceil(r/e.digestLength),s=0;s<n;s++){var o=new Mr.util.ByteBuffer;o.putInt32(s),e.start(),e.update(i+o.getBytes()),a.putBuffer(e.digest())}return a.truncate(a.length()-r),a.getBytes()}};return t}});var Xf=F((TE,Wf)=>{"use strict";S();var za=oe();Ss();Wf.exports=za.mgf=za.mgf||{};za.mgf.mgf1=za.mgf1});var Ja=F((_E,$f)=>{"use strict";S();var qr=oe();Pt();Ae();var Ky=$f.exports=qr.pss=qr.pss||{};Ky.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,i=e.mgf,r=t.digestLength,a=e.salt||null;typeof a=="string"&&(a=qr.util.createBuffer(a));var n;if("saltLength"in e)n=e.saltLength;else if(a!==null)n=a.length();else throw new Error("Salt length not specified or specific salt not given.");if(a!==null&&a.length()!==n)throw new Error("Given salt length does not match length of given salt.");var s=e.prng||qr.random,o={};return o.encode=function(u,l){var c,f=l-1,p=Math.ceil(f/8),m=u.digest().getBytes();if(p<r+n+2)throw new Error("Message is too long to encrypt.");var v;a===null?v=s.getBytesSync(n):v=a.bytes();var C=new qr.util.ByteBuffer;C.fillWithByte(0,8),C.putBytes(m),C.putBytes(v),t.start(),t.update(C.getBytes());var E=t.digest().getBytes(),B=new qr.util.ByteBuffer;B.fillWithByte(0,p-n-r-2),B.putByte(1),B.putBytes(v);var w=B.getBytes(),T=p-r-1,U=i.generate(E,T),P="";for(c=0;c<T;c++)P+=String.fromCharCode(w.charCodeAt(c)^U.charCodeAt(c));var Q=65280>>8*p-f&255;return P=String.fromCharCode(P.charCodeAt(0)&~Q)+P.substr(1),P+E+"\xBC"},o.verify=function(u,l,c){var f,p=c-1,m=Math.ceil(p/8);if(l=l.substr(-m),m<r+n+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(l.charCodeAt(m-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var v=m-r-1,C=l.substr(0,v),E=l.substr(v,r),B=65280>>8*m-p&255;if(C.charCodeAt(0)&B)throw new Error("Bits beyond keysize not zero as expected.");var w=i.generate(E,v),T="";for(f=0;f<v;f++)T+=String.fromCharCode(C.charCodeAt(f)^w.charCodeAt(f));T=String.fromCharCode(T.charCodeAt(0)&~B)+T.substr(1);var U=m-r-n-2;for(f=0;f<U;f++)if(T.charCodeAt(f)!==0)throw new Error("Leftmost octets not zero as expected");if(T.charCodeAt(U)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var P=T.substr(-n),Q=new qr.util.ByteBuffer;Q.fillWithByte(0,8),Q.putBytes(u),Q.putBytes(P),t.start(),t.update(Q.getBytes());var te=t.digest().getBytes();return E===te},o}});var $a=F((kE,i0)=>{"use strict";S();var X=oe();Ir();Gt();Gi();Jt();Xf();Br();Ur();Ja();zi();Ae();var h=X.asn1,O=i0.exports=X.pki=X.pki||{},ve=O.oids,Ue={};Ue.CN=ve.commonName;Ue.commonName="CN";Ue.C=ve.countryName;Ue.countryName="C";Ue.L=ve.localityName;Ue.localityName="L";Ue.ST=ve.stateOrProvinceName;Ue.stateOrProvinceName="ST";Ue.O=ve.organizationName;Ue.organizationName="O";Ue.OU=ve.organizationalUnitName;Ue.organizationalUnitName="OU";Ue.E=ve.emailAddress;Ue.emailAddress="E";var e0=X.pki.rsa.publicKeyValidator,Hy={name:"Certificate",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:h.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:h.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:h.Class.UNIVERSAL,type:h.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:h.Class.UNIVERSAL,type:h.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:h.Class.UNIVERSAL,type:h.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:h.Class.UNIVERSAL,type:h.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},e0,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:h.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:h.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:h.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:h.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},Gy={name:"rsapss",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:h.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:h.Class.UNIVERSAL,type:h.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:h.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:h.Class.UNIVERSAL,type:h.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:h.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:h.Class.UNIVERSAL,type:h.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:h.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:h.Class.UNIVERSAL,type:h.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},jy={name:"CertificationRequestInfo",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:h.Class.UNIVERSAL,type:h.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},e0,{name:"CertificationRequestInfo.attributes",tagClass:h.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:h.Class.UNIVERSAL,type:h.Type.SET,constructed:!0}]}]}]},Yy={name:"CertificationRequest",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[jy,{name:"CertificationRequest.signatureAlgorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:h.Class.UNIVERSAL,type:h.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:h.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:h.Class.UNIVERSAL,type:h.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};O.RDNAttributesAsArray=function(e,t){for(var i=[],r,a,n,s=0;s<e.value.length;++s){r=e.value[s];for(var o=0;o<r.value.length;++o)n={},a=r.value[o],n.type=h.derToOid(a.value[0].value),n.value=a.value[1].value,n.valueTagClass=a.value[1].type,n.type in ve&&(n.name=ve[n.type],n.name in Ue&&(n.shortName=Ue[n.name])),t&&(t.update(n.type),t.update(n.value)),i.push(n)}return i};O.CRIAttributesAsArray=function(e){for(var t=[],i=0;i<e.length;++i)for(var r=e[i],a=h.derToOid(r.value[0].value),n=r.value[1].value,s=0;s<n.length;++s){var o={};if(o.type=a,o.value=n[s].value,o.valueTagClass=n[s].type,o.type in ve&&(o.name=ve[o.type],o.name in Ue&&(o.shortName=Ue[o.name])),o.type===ve.extensionRequest){o.extensions=[];for(var u=0;u<o.value.length;++u)o.extensions.push(O.certificateExtensionFromAsn1(o.value[u]))}t.push(o)}return t};function wr(e,t){typeof t=="string"&&(t={shortName:t});for(var i=null,r,a=0;i===null&&a<e.attributes.length;++a)r=e.attributes[a],(t.type&&t.type===r.type||t.name&&t.name===r.name||t.shortName&&t.shortName===r.shortName)&&(i=r);return i}var Wa=function(e,t,i){var r={};if(e!==ve["RSASSA-PSS"])return r;i&&(r={hash:{algorithmOid:ve.sha1},mgf:{algorithmOid:ve.mgf1,hash:{algorithmOid:ve.sha1}},saltLength:20});var a={},n=[];if(!h.validate(t,Gy,a,n)){var s=new Error("Cannot read RSASSA-PSS parameter block.");throw s.errors=n,s}return a.hashOid!==void 0&&(r.hash=r.hash||{},r.hash.algorithmOid=h.derToOid(a.hashOid)),a.maskGenOid!==void 0&&(r.mgf=r.mgf||{},r.mgf.algorithmOid=h.derToOid(a.maskGenOid),r.mgf.hash=r.mgf.hash||{},r.mgf.hash.algorithmOid=h.derToOid(a.maskGenHashOid)),a.saltLength!==void 0&&(r.saltLength=a.saltLength.charCodeAt(0)),r},Xa=function(e){switch(ve[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return X.md.sha1.create();case"md5WithRSAEncryption":return X.md.md5.create();case"sha256WithRSAEncryption":return X.md.sha256.create();case"sha384WithRSAEncryption":return X.md.sha384.create();case"sha512WithRSAEncryption":return X.md.sha512.create();case"RSASSA-PSS":return X.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},t0=function(e){var t=e.certificate,i;switch(t.signatureOid){case ve.sha1WithRSAEncryption:case ve.sha1WithRSASignature:break;case ve["RSASSA-PSS"]:var r,a;if(r=ve[t.signatureParameters.mgf.hash.algorithmOid],r===void 0||X.md[r]===void 0){var n=new Error("Unsupported MGF hash function.");throw n.oid=t.signatureParameters.mgf.hash.algorithmOid,n.name=r,n}if(a=ve[t.signatureParameters.mgf.algorithmOid],a===void 0||X.mgf[a]===void 0){var n=new Error("Unsupported MGF function.");throw n.oid=t.signatureParameters.mgf.algorithmOid,n.name=a,n}if(a=X.mgf[a].create(X.md[r].create()),r=ve[t.signatureParameters.hash.algorithmOid],r===void 0||X.md[r]===void 0){var n=new Error("Unsupported RSASSA-PSS hash function.");throw n.oid=t.signatureParameters.hash.algorithmOid,n.name=r,n}i=X.pss.create(X.md[r].create(),a,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,i)};O.certificateFromPem=function(e,t,i){var r=X.pem.decode(e)[0];if(r.type!=="CERTIFICATE"&&r.type!=="X509 CERTIFICATE"&&r.type!=="TRUSTED CERTIFICATE"){var a=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw a.headerType=r.type,a}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var n=h.fromDer(r.body,i);return O.certificateFromAsn1(n,t)};O.certificateToPem=function(e,t){var i={type:"CERTIFICATE",body:h.toDer(O.certificateToAsn1(e)).getBytes()};return X.pem.encode(i,{maxline:t})};O.publicKeyFromPem=function(e){var t=X.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var i=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw i.headerType=t.type,i}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var r=h.fromDer(t.body);return O.publicKeyFromAsn1(r)};O.publicKeyToPem=function(e,t){var i={type:"PUBLIC KEY",body:h.toDer(O.publicKeyToAsn1(e)).getBytes()};return X.pem.encode(i,{maxline:t})};O.publicKeyToRSAPublicKeyPem=function(e,t){var i={type:"RSA PUBLIC KEY",body:h.toDer(O.publicKeyToRSAPublicKey(e)).getBytes()};return X.pem.encode(i,{maxline:t})};O.getPublicKeyFingerprint=function(e,t){t=t||{};var i=t.md||X.md.sha1.create(),r=t.type||"RSAPublicKey",a;switch(r){case"RSAPublicKey":a=h.toDer(O.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":a=h.toDer(O.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}i.start(),i.update(a);var n=i.digest();if(t.encoding==="hex"){var s=n.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return n.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return n};O.certificationRequestFromPem=function(e,t,i){var r=X.pem.decode(e)[0];if(r.type!=="CERTIFICATE REQUEST"){var a=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw a.headerType=r.type,a}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var n=h.fromDer(r.body,i);return O.certificationRequestFromAsn1(n,t)};O.certificationRequestToPem=function(e,t){var i={type:"CERTIFICATE REQUEST",body:h.toDer(O.certificationRequestToAsn1(e)).getBytes()};return X.pem.encode(i,{maxline:t})};O.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return wr(e.issuer,t)},e.issuer.addField=function(t){Ot([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return wr(e.subject,t)},e.subject.addField=function(t){Ot([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,i){Ot(t),e.subject.attributes=t,delete e.subject.uniqueId,i&&(e.subject.uniqueId=i),e.subject.hash=null},e.setIssuer=function(t,i){Ot(t),e.issuer.attributes=t,delete e.issuer.uniqueId,i&&(e.issuer.uniqueId=i),e.issuer.hash=null},e.setExtensions=function(t){for(var i=0;i<t.length;++i)r0(t[i],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var i=null,r,a=0;i===null&&a<e.extensions.length;++a)r=e.extensions[a],(t.id&&r.id===t.id||t.name&&r.name===t.name)&&(i=r);return i},e.sign=function(t,i){e.md=i||X.md.sha1.create();var r=ve[e.md.algorithm+"WithRSAEncryption"];if(!r){var a=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw a.algorithm=e.md.algorithm,a}e.signatureOid=e.siginfo.algorithmOid=r,e.tbsCertificate=O.getTBSCertificate(e);var n=h.toDer(e.tbsCertificate);e.md.update(n.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var i=!1;if(!e.issued(t)){var r=t.issuer,a=e.subject,n=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 n.expectedIssuer=a.attributes,n.actualIssuer=r.attributes,n}var s=t.md;if(s===null){s=Xa({signatureOid:t.signatureOid,type:"certificate"});var o=t.tbsCertificate||O.getTBSCertificate(t),u=h.toDer(o);s.update(u.getBytes())}return s!==null&&(i=t0({certificate:e,md:s,signature:t.signature})),i},e.isIssuer=function(t){var i=!1,r=e.issuer,a=t.subject;if(r.hash&&a.hash)i=r.hash===a.hash;else if(r.attributes.length===a.attributes.length){i=!0;for(var n,s,o=0;i&&o<r.attributes.length;++o)n=r.attributes[o],s=a.attributes[o],(n.type!==s.type||n.value!==s.value)&&(i=!1)}return i},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return O.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=ve.subjectKeyIdentifier,i=0;i<e.extensions.length;++i){var r=e.extensions[i];if(r.id===t){var a=e.generateSubjectKeyIdentifier().getBytes();return X.util.hexToBytes(r.subjectKeyIdentifier)===a}}return!1},e};O.certificateFromAsn1=function(e,t){var i={},r=[];if(!h.validate(e,Hy,i,r)){var a=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw a.errors=r,a}var n=h.derToOid(i.publicKeyOid);if(n!==O.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var s=O.createCertificate();s.version=i.certVersion?i.certVersion.charCodeAt(0):0;var o=X.util.createBuffer(i.certSerialNumber);s.serialNumber=o.toHex(),s.signatureOid=X.asn1.derToOid(i.certSignatureOid),s.signatureParameters=Wa(s.signatureOid,i.certSignatureParams,!0),s.siginfo.algorithmOid=X.asn1.derToOid(i.certinfoSignatureOid),s.siginfo.parameters=Wa(s.siginfo.algorithmOid,i.certinfoSignatureParams,!1),s.signature=i.certSignature;var u=[];if(i.certValidity1UTCTime!==void 0&&u.push(h.utcTimeToDate(i.certValidity1UTCTime)),i.certValidity2GeneralizedTime!==void 0&&u.push(h.generalizedTimeToDate(i.certValidity2GeneralizedTime)),i.certValidity3UTCTime!==void 0&&u.push(h.utcTimeToDate(i.certValidity3UTCTime)),i.certValidity4GeneralizedTime!==void 0&&u.push(h.generalizedTimeToDate(i.certValidity4GeneralizedTime)),u.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(u.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(s.validity.notBefore=u[0],s.validity.notAfter=u[1],s.tbsCertificate=i.tbsCertificate,t){s.md=Xa({signatureOid:s.signatureOid,type:"certificate"});var l=h.toDer(s.tbsCertificate);s.md.update(l.getBytes())}var c=X.md.sha1.create(),f=h.toDer(i.certIssuer);c.update(f.getBytes()),s.issuer.getField=function(v){return wr(s.issuer,v)},s.issuer.addField=function(v){Ot([v]),s.issuer.attributes.push(v)},s.issuer.attributes=O.RDNAttributesAsArray(i.certIssuer),i.certIssuerUniqueId&&(s.issuer.uniqueId=i.certIssuerUniqueId),s.issuer.hash=c.digest().toHex();var p=X.md.sha1.create(),m=h.toDer(i.certSubject);return p.update(m.getBytes()),s.subject.getField=function(v){return wr(s.subject,v)},s.subject.addField=function(v){Ot([v]),s.subject.attributes.push(v)},s.subject.attributes=O.RDNAttributesAsArray(i.certSubject),i.certSubjectUniqueId&&(s.subject.uniqueId=i.certSubjectUniqueId),s.subject.hash=p.digest().toHex(),i.certExtensions?s.extensions=O.certificateExtensionsFromAsn1(i.certExtensions):s.extensions=[],s.publicKey=O.publicKeyFromAsn1(i.subjectPublicKeyInfo),s};O.certificateExtensionsFromAsn1=function(e){for(var t=[],i=0;i<e.value.length;++i)for(var r=e.value[i],a=0;a<r.value.length;++a)t.push(O.certificateExtensionFromAsn1(r.value[a]));return t};O.certificateExtensionFromAsn1=function(e){var t={};if(t.id=h.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===h.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in ve){if(t.name=ve[t.id],t.name==="keyUsage"){var i=h.fromDer(t.value),r=0,a=0;i.value.length>1&&(r=i.value.charCodeAt(1),a=i.value.length>2?i.value.charCodeAt(2):0),t.digitalSignature=(r&128)===128,t.nonRepudiation=(r&64)===64,t.keyEncipherment=(r&32)===32,t.dataEncipherment=(r&16)===16,t.keyAgreement=(r&8)===8,t.keyCertSign=(r&4)===4,t.cRLSign=(r&2)===2,t.encipherOnly=(r&1)===1,t.decipherOnly=(a&128)===128}else if(t.name==="basicConstraints"){var i=h.fromDer(t.value);i.value.length>0&&i.value[0].type===h.Type.BOOLEAN?t.cA=i.value[0].value.charCodeAt(0)!==0:t.cA=!1;var n=null;i.value.length>0&&i.value[0].type===h.Type.INTEGER?n=i.value[0].value:i.value.length>1&&(n=i.value[1].value),n!==null&&(t.pathLenConstraint=h.derToInteger(n))}else if(t.name==="extKeyUsage")for(var i=h.fromDer(t.value),s=0;s<i.value.length;++s){var o=h.derToOid(i.value[s].value);o in ve?t[ve[o]]=!0:t[o]=!0}else if(t.name==="nsCertType"){var i=h.fromDer(t.value),r=0;i.value.length>1&&(r=i.value.charCodeAt(1)),t.client=(r&128)===128,t.server=(r&64)===64,t.email=(r&32)===32,t.objsign=(r&16)===16,t.reserved=(r&8)===8,t.sslCA=(r&4)===4,t.emailCA=(r&2)===2,t.objCA=(r&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var u,i=h.fromDer(t.value),l=0;l<i.value.length;++l){u=i.value[l];var c={type:u.type,value:u.value};switch(t.altNames.push(c),u.type){case 1:case 2:case 6:break;case 7:c.ip=X.util.bytesToIP(u.value);break;case 8:c.oid=h.derToOid(u.value);break;default:}}}else if(t.name==="subjectKeyIdentifier"){var i=h.fromDer(t.value);t.subjectKeyIdentifier=X.util.bytesToHex(i.value)}}return t};O.certificationRequestFromAsn1=function(e,t){var i={},r=[];if(!h.validate(e,Yy,i,r)){var a=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw a.errors=r,a}var n=h.derToOid(i.publicKeyOid);if(n!==O.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var s=O.createCertificationRequest();if(s.version=i.csrVersion?i.csrVersion.charCodeAt(0):0,s.signatureOid=X.asn1.derToOid(i.csrSignatureOid),s.signatureParameters=Wa(s.signatureOid,i.csrSignatureParams,!0),s.siginfo.algorithmOid=X.asn1.derToOid(i.csrSignatureOid),s.siginfo.parameters=Wa(s.siginfo.algorithmOid,i.csrSignatureParams,!1),s.signature=i.csrSignature,s.certificationRequestInfo=i.certificationRequestInfo,t){s.md=Xa({signatureOid:s.signatureOid,type:"certification request"});var o=h.toDer(s.certificationRequestInfo);s.md.update(o.getBytes())}var u=X.md.sha1.create();return s.subject.getField=function(l){return wr(s.subject,l)},s.subject.addField=function(l){Ot([l]),s.subject.attributes.push(l)},s.subject.attributes=O.RDNAttributesAsArray(i.certificationRequestInfoSubject,u),s.subject.hash=u.digest().toHex(),s.publicKey=O.publicKeyFromAsn1(i.subjectPublicKeyInfo),s.getAttribute=function(l){return wr(s,l)},s.addAttribute=function(l){Ot([l]),s.attributes.push(l)},s.attributes=O.CRIAttributesAsArray(i.certificationRequestInfoAttributes||[]),s};O.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return wr(e.subject,t)},e.subject.addField=function(t){Ot([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return wr(e,t)},e.addAttribute=function(t){Ot([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){Ot(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){Ot(t),e.attributes=t},e.sign=function(t,i){e.md=i||X.md.sha1.create();var r=ve[e.md.algorithm+"WithRSAEncryption"];if(!r){var a=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw a.algorithm=e.md.algorithm,a}e.signatureOid=e.siginfo.algorithmOid=r,e.certificationRequestInfo=O.getCertificationRequestInfo(e);var n=h.toDer(e.certificationRequestInfo);e.md.update(n.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,i=e.md;if(i===null){i=Xa({signatureOid:e.signatureOid,type:"certification request"});var r=e.certificationRequestInfo||O.getCertificationRequestInfo(e),a=h.toDer(r);i.update(a.getBytes())}return i!==null&&(t=t0({certificate:e,md:i,signature:e.signature})),t},e};function fi(e){for(var t=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]),i,r,a=e.attributes,n=0;n<a.length;++n){i=a[n];var s=i.value,o=h.Type.PRINTABLESTRING;"valueTagClass"in i&&(o=i.valueTagClass,o===h.Type.UTF8&&(s=X.util.encodeUtf8(s))),r=h.create(h.Class.UNIVERSAL,h.Type.SET,!0,[h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(i.type).getBytes()),h.create(h.Class.UNIVERSAL,o,!1,s)])]),t.value.push(r)}return t}function Ot(e){for(var t,i=0;i<e.length;++i){if(t=e[i],typeof t.name>"u"&&(t.type&&t.type in O.oids?t.name=O.oids[t.type]:t.shortName&&t.shortName in Ue&&(t.name=O.oids[Ue[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in O.oids)t.type=O.oids[t.name];else{var r=new Error("Attribute type not specified.");throw r.attribute=t,r}if(typeof t.shortName>"u"&&t.name&&t.name in Ue&&(t.shortName=Ue[t.name]),t.type===ve.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=h.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var a=0;a<t.extensions.length;++a)t.value.push(O.certificateExtensionToAsn1(r0(t.extensions[a])))}if(typeof t.value>"u"){var r=new Error("Attribute value not specified.");throw r.attribute=t,r}}}function r0(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in O.oids&&(e.name=O.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in O.oids)e.id=O.oids[e.name];else{var i=new Error("Extension ID not specified.");throw i.extension=e,i}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var r=0,a=0,n=0;e.digitalSignature&&(a|=128,r=7),e.nonRepudiation&&(a|=64,r=6),e.keyEncipherment&&(a|=32,r=5),e.dataEncipherment&&(a|=16,r=4),e.keyAgreement&&(a|=8,r=3),e.keyCertSign&&(a|=4,r=2),e.cRLSign&&(a|=2,r=1),e.encipherOnly&&(a|=1,r=0),e.decipherOnly&&(n|=128,r=7);var s=String.fromCharCode(r);n!==0?s+=String.fromCharCode(a)+String.fromCharCode(n):a!==0&&(s+=String.fromCharCode(a)),e.value=h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,s)}else if(e.name==="basicConstraints")e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(h.create(h.Class.UNIVERSAL,h.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in e&&e.value.value.push(h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);var o=e.value.value;for(var u in e)e[u]===!0&&(u in ve?o.push(h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(ve[u]).getBytes())):u.indexOf(".")!==-1&&o.push(h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(u).getBytes())))}else if(e.name==="nsCertType"){var r=0,a=0;e.client&&(a|=128,r=7),e.server&&(a|=64,r=6),e.email&&(a|=32,r=5),e.objsign&&(a|=16,r=4),e.reserved&&(a|=8,r=3),e.sslCA&&(a|=4,r=2),e.emailCA&&(a|=2,r=1),e.objCA&&(a|=1,r=0);var s=String.fromCharCode(r);a!==0&&(s+=String.fromCharCode(a)),e.value=h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,s)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);for(var l,c=0;c<e.altNames.length;++c){l=e.altNames[c];var s=l.value;if(l.type===7&&l.ip){if(s=X.util.bytesFromIP(l.ip),s===null){var i=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw i.extension=e,i}}else l.type===8&&(l.oid?s=h.oidToDer(h.oidToDer(l.oid)):s=h.oidToDer(s));e.value.value.push(h.create(h.Class.CONTEXT_SPECIFIC,l.type,!1,s))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=h.create(h.Class.UNIVERSAL,h.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var f=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=f.toHex(),e.value=h.create(h.Class.UNIVERSAL,h.Type.OCTETSTRING,!1,f.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);var o=e.value.value;if(e.keyIdentifier){var p=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;o.push(h.create(h.Class.CONTEXT_SPECIFIC,0,!1,p))}if(e.authorityCertIssuer){var m=[h.create(h.Class.CONTEXT_SPECIFIC,4,!0,[fi(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];o.push(h.create(h.Class.CONTEXT_SPECIFIC,1,!0,m))}if(e.serialNumber){var v=X.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);o.push(h.create(h.Class.CONTEXT_SPECIFIC,2,!1,v))}}else if(e.name==="cRLDistributionPoints"){e.value=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);for(var o=e.value.value,C=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]),E=h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[]),l,c=0;c<e.altNames.length;++c){l=e.altNames[c];var s=l.value;if(l.type===7&&l.ip){if(s=X.util.bytesFromIP(l.ip),s===null){var i=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw i.extension=e,i}}else l.type===8&&(l.oid?s=h.oidToDer(h.oidToDer(l.oid)):s=h.oidToDer(s));E.value.push(h.create(h.Class.CONTEXT_SPECIFIC,l.type,!1,s))}C.value.push(h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[E])),o.push(C)}if(typeof e.value>"u"){var i=new Error("Extension value not specified.");throw i.extension=e,i}return e}function Is(e,t){switch(e){case ve["RSASSA-PSS"]:var i=[];return t.hash.algorithmOid!==void 0&&i.push(h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(t.hash.algorithmOid).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&i.push(h.create(h.Class.CONTEXT_SPECIFIC,1,!0,[h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(t.mgf.algorithmOid).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(t.mgf.hash.algorithmOid).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&i.push(h.create(h.Class.CONTEXT_SPECIFIC,2,!0,[h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(t.saltLength).getBytes())])),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,i);default:return h.create(h.Class.UNIVERSAL,h.Type.NULL,!1,"")}}function zy(e){var t=h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var i=e.attributes,r=0;r<i.length;++r){var a=i[r],n=a.value,s=h.Type.UTF8;"valueTagClass"in a&&(s=a.valueTagClass),s===h.Type.UTF8&&(n=X.util.encodeUtf8(n));var o=!1;"valueConstructed"in a&&(o=a.valueConstructed);var u=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(a.type).getBytes()),h.create(h.Class.UNIVERSAL,h.Type.SET,!0,[h.create(h.Class.UNIVERSAL,s,o,n)])]);t.value.push(u)}return t}var Jy=new Date("1950-01-01T00:00:00Z"),Wy=new Date("2050-01-01T00:00:00Z");function Zf(e){return e>=Jy&&e<Wy?h.create(h.Class.UNIVERSAL,h.Type.UTCTIME,!1,h.dateToUtcTime(e)):h.create(h.Class.UNIVERSAL,h.Type.GENERALIZEDTIME,!1,h.dateToGeneralizedTime(e))}O.getTBSCertificate=function(e){var t=Zf(e.validity.notBefore),i=Zf(e.validity.notAfter),r=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.CONTEXT_SPECIFIC,0,!0,[h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(e.version).getBytes())]),h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,X.util.hexToBytes(e.serialNumber)),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(e.siginfo.algorithmOid).getBytes()),Is(e.siginfo.algorithmOid,e.siginfo.parameters)]),fi(e.issuer),h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[t,i]),fi(e.subject),O.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&r.value.push(h.create(h.Class.CONTEXT_SPECIFIC,1,!0,[h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,"\0"+e.issuer.uniqueId)])),e.subject.uniqueId&&r.value.push(h.create(h.Class.CONTEXT_SPECIFIC,2,!0,[h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,"\0"+e.subject.uniqueId)])),e.extensions.length>0&&r.value.push(O.certificateExtensionsToAsn1(e.extensions)),r};O.getCertificationRequestInfo=function(e){var t=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.INTEGER,!1,h.integerToDer(e.version).getBytes()),fi(e.subject),O.publicKeyToAsn1(e.publicKey),zy(e)]);return t};O.distinguishedNameToAsn1=function(e){return fi(e)};O.certificateToAsn1=function(e){var t=e.tbsCertificate||O.getTBSCertificate(e);return h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[t,h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(e.signatureOid).getBytes()),Is(e.signatureOid,e.signatureParameters)]),h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,"\0"+e.signature)])};O.certificateExtensionsToAsn1=function(e){var t=h.create(h.Class.CONTEXT_SPECIFIC,3,!0,[]),i=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);t.value.push(i);for(var r=0;r<e.length;++r)i.value.push(O.certificateExtensionToAsn1(e[r]));return t};O.certificateExtensionToAsn1=function(e){var t=h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[]);t.value.push(h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(e.id).getBytes())),e.critical&&t.value.push(h.create(h.Class.UNIVERSAL,h.Type.BOOLEAN,!1,"\xFF"));var i=e.value;return typeof e.value!="string"&&(i=h.toDer(i).getBytes()),t.value.push(h.create(h.Class.UNIVERSAL,h.Type.OCTETSTRING,!1,i)),t};O.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||O.getCertificationRequestInfo(e);return h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[t,h.create(h.Class.UNIVERSAL,h.Type.SEQUENCE,!0,[h.create(h.Class.UNIVERSAL,h.Type.OID,!1,h.oidToDer(e.signatureOid).getBytes()),Is(e.signatureOid,e.signatureParameters)]),h.create(h.Class.UNIVERSAL,h.Type.BITSTRING,!1,"\0"+e.signature)])};O.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(s){var o=i(s.issuer);return o},t.addCertificate=function(s){if(typeof s=="string"&&(s=X.pki.certificateFromPem(s)),r(s.subject),!t.hasCertificate(s))if(s.subject.hash in t.certs){var o=t.certs[s.subject.hash];X.util.isArray(o)||(o=[o]),o.push(s),t.certs[s.subject.hash]=o}else t.certs[s.subject.hash]=s},t.hasCertificate=function(s){typeof s=="string"&&(s=X.pki.certificateFromPem(s));var o=i(s.subject);if(!o)return!1;X.util.isArray(o)||(o=[o]);for(var u=h.toDer(O.certificateToAsn1(s)).getBytes(),l=0;l<o.length;++l){var c=h.toDer(O.certificateToAsn1(o[l])).getBytes();if(u===c)return!0}return!1},t.listAllCertificates=function(){var s=[];for(var o in t.certs)if(t.certs.hasOwnProperty(o)){var u=t.certs[o];if(!X.util.isArray(u))s.push(u);else for(var l=0;l<u.length;++l)s.push(u[l])}return s},t.removeCertificate=function(s){var o;if(typeof s=="string"&&(s=X.pki.certificateFromPem(s)),r(s.subject),!t.hasCertificate(s))return null;var u=i(s.subject);if(!X.util.isArray(u))return o=t.certs[s.subject.hash],delete t.certs[s.subject.hash],o;for(var l=h.toDer(O.certificateToAsn1(s)).getBytes(),c=0;c<u.length;++c){var f=h.toDer(O.certificateToAsn1(u[c])).getBytes();l===f&&(o=u[c],u.splice(c,1))}return u.length===0&&delete t.certs[s.subject.hash],o};function i(s){return r(s),t.certs[s.hash]||null}function r(s){if(!s.hash){var o=X.md.sha1.create();s.attributes=O.RDNAttributesAsArray(fi(s),o),s.hash=o.digest().toHex()}}if(e)for(var a=0;a<e.length;++a){var n=e[a];t.addCertificate(n)}return t};O.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"};O.verifyCertificateChain=function(e,t,i){typeof i=="function"&&(i={verify:i}),i=i||{},t=t.slice(0);var r=t.slice(0),a=i.validityCheckDate;typeof a>"u"&&(a=new Date);var n=!0,s=null,o=0;do{var u=t.shift(),l=null,c=!1;if(a&&(a<u.validity.notBefore||a>u.validity.notAfter)&&(s={message:"Certificate is not valid yet or has expired.",error:O.certificateError.certificate_expired,notBefore:u.validity.notBefore,notAfter:u.validity.notAfter,now:a}),s===null){if(l=t[0]||e.getIssuer(u),l===null&&u.isIssuer(u)&&(c=!0,l=u),l){var f=l;X.util.isArray(f)||(f=[f]);for(var p=!1;!p&&f.length>0;){l=f.shift();try{p=l.verify(u)}catch{}}p||(s={message:"Certificate signature is invalid.",error:O.certificateError.bad_certificate})}s===null&&(!l||c)&&!e.hasCertificate(u)&&(s={message:"Certificate is not trusted.",error:O.certificateError.unknown_ca})}if(s===null&&l&&!u.isIssuer(l)&&(s={message:"Certificate issuer is invalid.",error:O.certificateError.bad_certificate}),s===null)for(var m={keyUsage:!0,basicConstraints:!0},v=0;s===null&&v<u.extensions.length;++v){var C=u.extensions[v];C.critical&&!(C.name in m)&&(s={message:"Certificate has an unsupported critical extension.",error:O.certificateError.unsupported_certificate})}if(s===null&&(!n||t.length===0&&(!l||c))){var E=u.getExtension("basicConstraints"),B=u.getExtension("keyUsage");if(B!==null&&(!B.keyCertSign||E===null)&&(s={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:O.certificateError.bad_certificate}),s===null&&E!==null&&!E.cA&&(s={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:O.certificateError.bad_certificate}),s===null&&B!==null&&"pathLenConstraint"in E){var w=o-1;w>E.pathLenConstraint&&(s={message:"Certificate basicConstraints pathLenConstraint violated.",error:O.certificateError.bad_certificate})}}var T=s===null?!0:s.error,U=i.verify?i.verify(T,o,r):T;if(U===!0)s=null;else throw T===!0&&(s={message:"The application rejected the certificate.",error:O.certificateError.bad_certificate}),(U||U===0)&&(typeof U=="object"&&!X.util.isArray(U)?(U.message&&(s.message=U.message),U.error&&(s.error=U.error)):typeof U=="string"&&(s.error=U)),s;n=!1,++o}while(t.length>0);return!0}});var bs=F((RE,n0)=>{"use strict";S();var we=oe();Gt();ai();Br();xs();Es();Pt();zi();ui();Ae();$a();var A=we.asn1,ce=we.pki,Wi=n0.exports=we.pkcs12=we.pkcs12||{},a0={name:"ContentInfo",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:A.Class.UNIVERSAL,type:A.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:A.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},Xy={name:"PFX",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,capture:"version"},a0,{name:"PFX.macData",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:A.Class.UNIVERSAL,type:A.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:A.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:A.Class.UNIVERSAL,type:A.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:A.Class.UNIVERSAL,type:A.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:A.Class.UNIVERSAL,type:A.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},$y={name:"SafeBag",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:A.Class.UNIVERSAL,type:A.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:A.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:A.Class.UNIVERSAL,type:A.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},Zy={name:"Attribute",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:A.Class.UNIVERSAL,type:A.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:A.Class.UNIVERSAL,type:A.Type.SET,constructed:!0,capture:"values"}]},em={name:"CertBag",tagClass:A.Class.UNIVERSAL,type:A.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:A.Class.UNIVERSAL,type:A.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:A.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:A.Class.UNIVERSAL,type:A.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function Ji(e,t,i,r){for(var a=[],n=0;n<e.length;n++)for(var s=0;s<e[n].safeBags.length;s++){var o=e[n].safeBags[s];if(!(r!==void 0&&o.type!==r)){if(t===null){a.push(o);continue}o.attributes[t]!==void 0&&o.attributes[t].indexOf(i)>=0&&a.push(o)}}return a}Wi.pkcs12FromAsn1=function(e,t,i){typeof t=="string"?(i=t,t=!0):t===void 0&&(t=!0);var r={},a=[];if(!A.validate(e,Xy,r,a)){var n=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw n.errors=n,n}var s={version:r.version.charCodeAt(0),safeContents:[],getBags:function(E){var B={},w;return"localKeyId"in E?w=E.localKeyId:"localKeyIdHex"in E&&(w=we.util.hexToBytes(E.localKeyIdHex)),w===void 0&&!("friendlyName"in E)&&"bagType"in E&&(B[E.bagType]=Ji(s.safeContents,null,null,E.bagType)),w!==void 0&&(B.localKeyId=Ji(s.safeContents,"localKeyId",w,E.bagType)),"friendlyName"in E&&(B.friendlyName=Ji(s.safeContents,"friendlyName",E.friendlyName,E.bagType)),B},getBagsByFriendlyName:function(E,B){return Ji(s.safeContents,"friendlyName",E,B)},getBagsByLocalKeyId:function(E,B){return Ji(s.safeContents,"localKeyId",E,B)}};if(r.version.charCodeAt(0)!==3){var n=new Error("PKCS#12 PFX of version other than 3 not supported.");throw n.version=r.version.charCodeAt(0),n}if(A.derToOid(r.contentType)!==ce.oids.data){var n=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw n.oid=A.derToOid(r.contentType),n}var o=r.content.value[0];if(o.tagClass!==A.Class.UNIVERSAL||o.type!==A.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(o=Bs(o),r.mac){var u=null,l=0,c=A.derToOid(r.macAlgorithm);switch(c){case ce.oids.sha1:u=we.md.sha1.create(),l=20;break;case ce.oids.sha256:u=we.md.sha256.create(),l=32;break;case ce.oids.sha384:u=we.md.sha384.create(),l=48;break;case ce.oids.sha512:u=we.md.sha512.create(),l=64;break;case ce.oids.md5:u=we.md.md5.create(),l=16;break}if(u===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+c);var f=new we.util.ByteBuffer(r.macSalt),p="macIterations"in r?parseInt(we.util.bytesToHex(r.macIterations),16):1,m=Wi.generateKey(i,f,3,p,l,u),v=we.hmac.create();v.start(u,m),v.update(o.value);var C=v.getMac();if(C.getBytes()!==r.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return tm(s,o.value,t,i),s};function Bs(e){if(e.composed||e.constructed){for(var t=we.util.createBuffer(),i=0;i<e.value.length;++i)t.putBytes(e.value[i].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function tm(e,t,i,r){if(t=A.fromDer(t,i),t.tagClass!==A.Class.UNIVERSAL||t.type!==A.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var a=0;a<t.value.length;a++){var n=t.value[a],s={},o=[];if(!A.validate(n,a0,s,o)){var u=new Error("Cannot read ContentInfo.");throw u.errors=o,u}var l={encrypted:!1},c=null,f=s.content.value[0];switch(A.derToOid(s.contentType)){case ce.oids.data:if(f.tagClass!==A.Class.UNIVERSAL||f.type!==A.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");c=Bs(f).value;break;case ce.oids.encryptedData:c=rm(f,r),l.encrypted=!0;break;default:var u=new Error("Unsupported PKCS#12 contentType.");throw u.contentType=A.derToOid(s.contentType),u}l.safeBags=im(c,i,r),e.safeContents.push(l)}}function rm(e,t){var i={},r=[];if(!A.validate(e,we.pkcs7.asn1.encryptedDataValidator,i,r)){var a=new Error("Cannot read EncryptedContentInfo.");throw a.errors=r,a}var n=A.derToOid(i.contentType);if(n!==ce.oids.data){var a=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw a.oid=n,a}n=A.derToOid(i.encAlgorithm);var s=ce.pbe.getCipher(n,i.encParameter,t),o=Bs(i.encryptedContentAsn1),u=we.util.createBuffer(o.value);if(s.update(u),!s.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return s.output.getBytes()}function im(e,t,i){if(!t&&e.length===0)return[];if(e=A.fromDer(e,t),e.tagClass!==A.Class.UNIVERSAL||e.type!==A.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var r=[],a=0;a<e.value.length;a++){var n=e.value[a],s={},o=[];if(!A.validate(n,$y,s,o)){var u=new Error("Cannot read SafeBag.");throw u.errors=o,u}var l={type:A.derToOid(s.bagId),attributes:am(s.bagAttributes)};r.push(l);var c,f,p=s.bagValue.value[0];switch(l.type){case ce.oids.pkcs8ShroudedKeyBag:if(p=ce.decryptPrivateKeyInfo(p,i),p===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case ce.oids.keyBag:try{l.key=ce.privateKeyFromAsn1(p)}catch{l.key=null,l.asn1=p}continue;case ce.oids.certBag:c=em,f=function(){if(A.derToOid(s.certId)!==ce.oids.x509Certificate){var v=new Error("Unsupported certificate type, only X.509 supported.");throw v.oid=A.derToOid(s.certId),v}var C=A.fromDer(s.cert,t);try{l.cert=ce.certificateFromAsn1(C,!0)}catch{l.cert=null,l.asn1=C}};break;default:var u=new Error("Unsupported PKCS#12 SafeBag type.");throw u.oid=l.type,u}if(c!==void 0&&!A.validate(p,c,s,o)){var u=new Error("Cannot read PKCS#12 "+c.name);throw u.errors=o,u}f()}return r}function am(e){var t={};if(e!==void 0)for(var i=0;i<e.length;++i){var r={},a=[];if(!A.validate(e[i],Zy,r,a)){var n=new Error("Cannot read PKCS#12 BagAttribute.");throw n.errors=a,n}var s=A.derToOid(r.oid);if(ce.oids[s]!==void 0){t[ce.oids[s]]=[];for(var o=0;o<r.values.length;++o)t[ce.oids[s]].push(r.values[o].value)}}return t}Wi.toPkcs12Asn1=function(e,t,i,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||r.encAlgorithm||"aes128","useMac"in r||(r.useMac=!0),"localKeyId"in r||(r.localKeyId=null),"generateLocalKeyId"in r||(r.generateLocalKeyId=!0);var a=r.localKeyId,n;if(a!==null)a=we.util.hexToBytes(a);else if(r.generateLocalKeyId)if(t){var s=we.util.isArray(t)?t[0]:t;typeof s=="string"&&(s=ce.certificateFromPem(s));var o=we.md.sha1.create();o.update(A.toDer(ce.certificateToAsn1(s)).getBytes()),a=o.digest().getBytes()}else a=we.random.getBytes(20);var u=[];a!==null&&u.push(A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.localKeyId).getBytes()),A.create(A.Class.UNIVERSAL,A.Type.SET,!0,[A.create(A.Class.UNIVERSAL,A.Type.OCTETSTRING,!1,a)])])),"friendlyName"in r&&u.push(A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.friendlyName).getBytes()),A.create(A.Class.UNIVERSAL,A.Type.SET,!0,[A.create(A.Class.UNIVERSAL,A.Type.BMPSTRING,!1,r.friendlyName)])])),u.length>0&&(n=A.create(A.Class.UNIVERSAL,A.Type.SET,!0,u));var l=[],c=[];t!==null&&(we.util.isArray(t)?c=t:c=[t]);for(var f=[],p=0;p<c.length;++p){t=c[p],typeof t=="string"&&(t=ce.certificateFromPem(t));var m=p===0?n:void 0,v=ce.certificateToAsn1(t),C=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.certBag).getBytes()),A.create(A.Class.CONTEXT_SPECIFIC,0,!0,[A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.x509Certificate).getBytes()),A.create(A.Class.CONTEXT_SPECIFIC,0,!0,[A.create(A.Class.UNIVERSAL,A.Type.OCTETSTRING,!1,A.toDer(v).getBytes())])])]),m]);f.push(C)}if(f.length>0){var E=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,f),B=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.data).getBytes()),A.create(A.Class.CONTEXT_SPECIFIC,0,!0,[A.create(A.Class.UNIVERSAL,A.Type.OCTETSTRING,!1,A.toDer(E).getBytes())])]);l.push(B)}var w=null;if(e!==null){var T=ce.wrapRsaPrivateKey(ce.privateKeyToAsn1(e));i===null?w=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.keyBag).getBytes()),A.create(A.Class.CONTEXT_SPECIFIC,0,!0,[T]),n]):w=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.pkcs8ShroudedKeyBag).getBytes()),A.create(A.Class.CONTEXT_SPECIFIC,0,!0,[ce.encryptPrivateKeyInfo(T,i,r)]),n]);var U=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[w]),P=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.data).getBytes()),A.create(A.Class.CONTEXT_SPECIFIC,0,!0,[A.create(A.Class.UNIVERSAL,A.Type.OCTETSTRING,!1,A.toDer(U).getBytes())])]);l.push(P)}var Q=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,l),te;if(r.useMac){var o=we.md.sha1.create(),ne=new we.util.ByteBuffer(we.random.getBytes(r.saltSize)),H=r.count,e=Wi.generateKey(i,ne,3,H,20),z=we.hmac.create();z.start(o,e),z.update(A.toDer(Q).getBytes());var Y=z.getMac();te=A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.sha1).getBytes()),A.create(A.Class.UNIVERSAL,A.Type.NULL,!1,"")]),A.create(A.Class.UNIVERSAL,A.Type.OCTETSTRING,!1,Y.getBytes())]),A.create(A.Class.UNIVERSAL,A.Type.OCTETSTRING,!1,ne.getBytes()),A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,A.integerToDer(H).getBytes())])}return A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.INTEGER,!1,A.integerToDer(3).getBytes()),A.create(A.Class.UNIVERSAL,A.Type.SEQUENCE,!0,[A.create(A.Class.UNIVERSAL,A.Type.OID,!1,A.oidToDer(ce.oids.data).getBytes()),A.create(A.Class.CONTEXT_SPECIFIC,0,!0,[A.create(A.Class.UNIVERSAL,A.Type.OCTETSTRING,!1,A.toDer(Q).getBytes())])]),te])};Wi.generateKey=we.pbe.generatePkcs12Key});var ws=F((PE,s0)=>{"use strict";S();var _r=oe();Gt();Br();Es();Ur();qa();bs();Ja();zi();Ae();$a();var Ts=_r.asn1,hi=s0.exports=_r.pki=_r.pki||{};hi.pemToDer=function(e){var t=_r.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return _r.util.createBuffer(t.body)};hi.privateKeyFromPem=function(e){var t=_r.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var i=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw i.headerType=t.type,i}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var r=Ts.fromDer(t.body);return hi.privateKeyFromAsn1(r)};hi.privateKeyToPem=function(e,t){var i={type:"RSA PRIVATE KEY",body:Ts.toDer(hi.privateKeyToAsn1(e)).getBytes()};return _r.pem.encode(i,{maxline:t})};hi.privateKeyInfoToPem=function(e,t){var i={type:"PRIVATE KEY",body:Ts.toDer(e).getBytes()};return _r.pem.encode(i,{maxline:t})}});var Ds=F((UE,d0)=>{"use strict";S();var k=oe();Gt();ai();Oa();Ur();ws();Pt();ui();Ae();var rn=function(e,t,i,r){var a=k.util.createBuffer(),n=e.length>>1,s=n+(e.length&1),o=e.substr(0,s),u=e.substr(n,s),l=k.util.createBuffer(),c=k.hmac.create();i=t+i;var f=Math.ceil(r/16),p=Math.ceil(r/20);c.start("MD5",o);var m=k.util.createBuffer();l.putBytes(i);for(var v=0;v<f;++v)c.start(null,null),c.update(l.getBytes()),l.putBuffer(c.digest()),c.start(null,null),c.update(l.bytes()+i),m.putBuffer(c.digest());c.start("SHA1",u);var C=k.util.createBuffer();l.clear(),l.putBytes(i);for(var v=0;v<p;++v)c.start(null,null),c.update(l.getBytes()),l.putBuffer(c.digest()),c.start(null,null),c.update(l.bytes()+i),C.putBuffer(c.digest());return a.putBytes(k.util.xorBytes(m.getBytes(),C.getBytes(),r)),a},nm=function(e,t,i){var r=k.hmac.create();r.start("SHA1",e);var a=k.util.createBuffer();return a.putInt32(t[0]),a.putInt32(t[1]),a.putByte(i.type),a.putByte(i.version.major),a.putByte(i.version.minor),a.putInt16(i.length),a.putBytes(i.fragment.bytes()),r.update(a.getBytes()),r.digest().getBytes()},sm=function(e,t,i){var r=!1;try{var a=e.deflate(t.fragment.getBytes());t.fragment=k.util.createBuffer(a),t.length=a.length,r=!0}catch{}return r},om=function(e,t,i){var r=!1;try{var a=e.inflate(t.fragment.getBytes());t.fragment=k.util.createBuffer(a),t.length=a.length,r=!0}catch{}return r},Tt=function(e,t){var i=0;switch(t){case 1:i=e.getByte();break;case 2:i=e.getInt16();break;case 3:i=e.getInt24();break;case 4:i=e.getInt32();break}return k.util.createBuffer(e.getBytes(i))},Vt=function(e,t,i){e.putInt(i.length(),t<<3),e.putBuffer(i)},g={};g.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};g.SupportedVersions=[g.Versions.TLS_1_1,g.Versions.TLS_1_0];g.Version=g.SupportedVersions[0];g.MaxFragment=15360;g.ConnectionEnd={server:0,client:1};g.PRFAlgorithm={tls_prf_sha256:0};g.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};g.CipherType={stream:0,block:1,aead:2};g.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};g.CompressionMethod={none:0,deflate:1};g.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};g.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};g.Alert={};g.Alert.Level={warning:1,fatal:2};g.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};g.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};g.CipherSuites={};g.getCipherSuite=function(e){var t=null;for(var i in g.CipherSuites){var r=g.CipherSuites[i];if(r.id[0]===e.charCodeAt(0)&&r.id[1]===e.charCodeAt(1)){t=r;break}}return t};g.handleUnexpected=function(e,t){var i=!e.open&&e.entity===g.ConnectionEnd.client;i||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unexpected_message}})};g.handleHelloRequest=function(e,t,i){!e.handshaking&&e.handshakes>0&&(g.queue(e,g.createAlert(e,{level:g.Alert.Level.warning,description:g.Alert.Description.no_renegotiation})),g.flush(e)),e.process()};g.parseHelloMessage=function(e,t,i){var r=null,a=e.entity===g.ConnectionEnd.client;if(i<38)e.error(e,{message:a?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});else{var n=t.fragment,s=n.length();if(r={version:{major:n.getByte(),minor:n.getByte()},random:k.util.createBuffer(n.getBytes(32)),session_id:Tt(n,1),extensions:[]},a?(r.cipher_suite=n.getBytes(2),r.compression_method=n.getByte()):(r.cipher_suites=Tt(n,2),r.compression_methods=Tt(n,1)),s=i-(s-n.length()),s>0){for(var o=Tt(n,2);o.length()>0;)r.extensions.push({type:[o.getByte(),o.getByte()],data:Tt(o,2)});if(!a)for(var u=0;u<r.extensions.length;++u){var l=r.extensions[u];if(l.type[0]===0&&l.type[1]===0)for(var c=Tt(l.data,2);c.length()>0;){var f=c.getByte();if(f!==0)break;e.session.extensions.server_name.serverNameList.push(Tt(c,2).getBytes())}}}if(e.session.version&&(r.version.major!==e.session.version.major||r.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.protocol_version}});if(a)e.session.cipherSuite=g.getCipherSuite(r.cipher_suite);else for(var p=k.util.createBuffer(r.cipher_suites.bytes());p.length()>0&&(e.session.cipherSuite=g.getCipherSuite(p.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.handshake_failure},cipherSuite:k.util.bytesToHex(r.cipher_suite)});a?e.session.compressionMethod=r.compression_method:e.session.compressionMethod=g.CompressionMethod.none}return r};g.createSecurityParameters=function(e,t){var i=e.entity===g.ConnectionEnd.client,r=t.random.bytes(),a=i?e.session.sp.client_random:r,n=i?r:g.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:g.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:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:a,server_random:n}};g.handleServerHello=function(e,t,i){var r=g.parseHelloMessage(e,t,i);if(!e.fail){if(r.version.minor<=e.version.minor)e.version.minor=r.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.protocol_version}});e.session.version=e.version;var a=r.session_id.bytes();a.length>0&&a===e.session.id?(e.expect=l0,e.session.resuming=!0,e.session.sp.server_random=r.random.bytes()):(e.expect=lm,e.session.resuming=!1,g.createSecurityParameters(e,r)),e.session.id=a,e.process()}};g.handleClientHello=function(e,t,i){var r=g.parseHelloMessage(e,t,i);if(!e.fail){var a=r.session_id.bytes(),n=null;if(e.sessionCache&&(n=e.sessionCache.getSession(a),n===null?a="":(n.version.major!==r.version.major||n.version.minor>r.version.minor)&&(n=null,a="")),a.length===0&&(a=k.random.getBytes(32)),e.session.id=a,e.session.clientHelloVersion=r.version,e.session.sp={},n)e.version=e.session.version=n.version,e.session.sp=n.sp;else{for(var s,o=1;o<g.SupportedVersions.length&&(s=g.SupportedVersions[o],!(s.minor<=r.version.minor));++o);e.version={major:s.major,minor:s.minor},e.session.version=e.version}n!==null?(e.expect=Ls,e.session.resuming=!0,e.session.sp.client_random=r.random.bytes()):(e.expect=e.verifyClient!==!1?vm:ks,e.session.resuming=!1,g.createSecurityParameters(e,r)),e.open=!0,g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createServerHello(e)})),e.session.resuming?(g.queue(e,g.createRecord(e,{type:g.ContentType.change_cipher_spec,data:g.createChangeCipherSpec()})),e.state.pending=g.createConnectionState(e),e.state.current.write=e.state.pending.write,g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createFinished(e)}))):(g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createCertificate(e)})),e.fail||(g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createServerKeyExchange(e)})),e.verifyClient!==!1&&g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createCertificateRequest(e)})),g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createServerHelloDone(e)})))),g.flush(e),e.process()}};g.handleCertificate=function(e,t,i){if(i<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var r=t.fragment,a={certificate_list:Tt(r,3)},n,s,o=[];try{for(;a.certificate_list.length()>0;)n=Tt(a.certificate_list,3),s=k.asn1.fromDer(n),n=k.pki.certificateFromAsn1(s,!0),o.push(n)}catch(l){return e.error(e,{message:"Could not parse certificate list.",cause:l,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.bad_certificate}})}var u=e.entity===g.ConnectionEnd.client;(u||e.verifyClient===!0)&&o.length===0?e.error(e,{message:u?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}}):o.length===0?e.expect=u?o0:ks:(u?e.session.serverCertificate=o[0]:e.session.clientCertificate=o[0],g.verifyCertificateChain(e,o)&&(e.expect=u?o0:ks)),e.process()};g.handleServerKeyExchange=function(e,t,i){if(i>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unsupported_certificate}});e.expect=cm,e.process()};g.handleClientKeyExchange=function(e,t,i){if(i<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unsupported_certificate}});var r=t.fragment,a={enc_pre_master_secret:Tt(r,2).getBytes()},n=null;if(e.getPrivateKey)try{n=e.getPrivateKey(e,e.session.serverCertificate),n=k.pki.privateKeyFromPem(n)}catch(u){e.error(e,{message:"Could not get private key.",cause:u,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}})}if(n===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}});try{var s=e.session.sp;s.pre_master_secret=n.decrypt(a.enc_pre_master_secret);var o=e.session.clientHelloVersion;if(o.major!==s.pre_master_secret.charCodeAt(0)||o.minor!==s.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{s.pre_master_secret=k.random.getBytes(48)}e.expect=Ls,e.session.clientCertificate!==null&&(e.expect=ym),e.process()};g.handleCertificateRequest=function(e,t,i){if(i<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var r=t.fragment,a={certificate_types:Tt(r,1),certificate_authorities:Tt(r,2)};e.session.certificateRequest=a,e.expect=fm,e.process()};g.handleCertificateVerify=function(e,t,i){if(i<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var r=t.fragment;r.read-=4;var a=r.bytes();r.read+=4;var n={signature:Tt(r,2).getBytes()},s=k.util.createBuffer();s.putBuffer(e.session.md5.digest()),s.putBuffer(e.session.sha1.digest()),s=s.getBytes();try{var o=e.session.clientCertificate;if(!o.publicKey.verify(s,n.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(a),e.session.sha1.update(a)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.handshake_failure}})}e.expect=Ls,e.process()};g.handleServerHelloDone=function(e,t,i){if(i>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.record_overflow}});if(e.serverCertificate===null){var r={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.insufficient_security}},a=0,n=e.verify(e,r.alert.description,a,[]);if(n!==!0)return(n||n===0)&&(typeof n=="object"&&!k.util.isArray(n)?(n.message&&(r.message=n.message),n.alert&&(r.alert.description=n.alert)):typeof n=="number"&&(r.alert.description=n)),e.error(e,r)}e.session.certificateRequest!==null&&(t=g.createRecord(e,{type:g.ContentType.handshake,data:g.createCertificate(e)}),g.queue(e,t)),t=g.createRecord(e,{type:g.ContentType.handshake,data:g.createClientKeyExchange(e)}),g.queue(e,t),e.expect=dm;var s=function(o,u){o.session.certificateRequest!==null&&o.session.clientCertificate!==null&&g.queue(o,g.createRecord(o,{type:g.ContentType.handshake,data:g.createCertificateVerify(o,u)})),g.queue(o,g.createRecord(o,{type:g.ContentType.change_cipher_spec,data:g.createChangeCipherSpec()})),o.state.pending=g.createConnectionState(o),o.state.current.write=o.state.pending.write,g.queue(o,g.createRecord(o,{type:g.ContentType.handshake,data:g.createFinished(o)})),o.expect=l0,g.flush(o),o.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return s(e,null);g.getClientSignature(e,s)};g.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.illegal_parameter}});var i=e.entity===g.ConnectionEnd.client;(e.session.resuming&&i||!e.session.resuming&&!i)&&(e.state.pending=g.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&i||e.session.resuming&&!i)&&(e.state.pending=null),e.expect=i?hm:mm,e.process()};g.handleFinished=function(e,t,i){var r=t.fragment;r.read-=4;var a=r.bytes();r.read+=4;var n=t.fragment.getBytes();r=k.util.createBuffer(),r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest());var s=e.entity===g.ConnectionEnd.client,o=s?"server finished":"client finished",u=e.session.sp,l=12,c=rn;if(r=c(u.master_secret,o,r.getBytes(),l),r.getBytes()!==n)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.decrypt_error}});e.session.md5.update(a),e.session.sha1.update(a),(e.session.resuming&&s||!e.session.resuming&&!s)&&(g.queue(e,g.createRecord(e,{type:g.ContentType.change_cipher_spec,data:g.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,g.queue(e,g.createRecord(e,{type:g.ContentType.handshake,data:g.createFinished(e)}))),e.expect=s?pm:Am,e.handshaking=!1,++e.handshakes,e.peerCertificate=s?e.session.serverCertificate:e.session.clientCertificate,g.flush(e),e.isConnected=!0,e.connected(e),e.process()};g.handleAlert=function(e,t){var i=t.fragment,r={level:i.getByte(),description:i.getByte()},a;switch(r.description){case g.Alert.Description.close_notify:a="Connection closed.";break;case g.Alert.Description.unexpected_message:a="Unexpected message.";break;case g.Alert.Description.bad_record_mac:a="Bad record MAC.";break;case g.Alert.Description.decryption_failed:a="Decryption failed.";break;case g.Alert.Description.record_overflow:a="Record overflow.";break;case g.Alert.Description.decompression_failure:a="Decompression failed.";break;case g.Alert.Description.handshake_failure:a="Handshake failure.";break;case g.Alert.Description.bad_certificate:a="Bad certificate.";break;case g.Alert.Description.unsupported_certificate:a="Unsupported certificate.";break;case g.Alert.Description.certificate_revoked:a="Certificate revoked.";break;case g.Alert.Description.certificate_expired:a="Certificate expired.";break;case g.Alert.Description.certificate_unknown:a="Certificate unknown.";break;case g.Alert.Description.illegal_parameter:a="Illegal parameter.";break;case g.Alert.Description.unknown_ca:a="Unknown certificate authority.";break;case g.Alert.Description.access_denied:a="Access denied.";break;case g.Alert.Description.decode_error:a="Decode error.";break;case g.Alert.Description.decrypt_error:a="Decrypt error.";break;case g.Alert.Description.export_restriction:a="Export restriction.";break;case g.Alert.Description.protocol_version:a="Unsupported protocol version.";break;case g.Alert.Description.insufficient_security:a="Insufficient security.";break;case g.Alert.Description.internal_error:a="Internal error.";break;case g.Alert.Description.user_canceled:a="User canceled.";break;case g.Alert.Description.no_renegotiation:a="Renegotiation not supported.";break;default:a="Unknown error.";break}if(r.description===g.Alert.Description.close_notify)return e.close();e.error(e,{message:a,send:!1,origin:e.entity===g.ConnectionEnd.client?"server":"client",alert:r}),e.process()};g.handleHandshake=function(e,t){var i=t.fragment,r=i.getByte(),a=i.getInt24();if(a>i.length())return e.fragmented=t,t.fragment=k.util.createBuffer(),i.read-=4,e.process();e.fragmented=null,i.read-=4;var n=i.bytes(a+4);i.read+=4,r in tn[e.entity][e.expect]?(e.entity===g.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:k.md.md5.create(),sha1:k.md.sha1.create()}),r!==g.HandshakeType.hello_request&&r!==g.HandshakeType.certificate_verify&&r!==g.HandshakeType.finished&&(e.session.md5.update(n),e.session.sha1.update(n)),tn[e.entity][e.expect][r](e,t,a)):g.handleUnexpected(e,t)};g.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()};g.handleHeartbeat=function(e,t){var i=t.fragment,r=i.getByte(),a=i.getInt16(),n=i.getBytes(a);if(r===g.HeartbeatMessageType.heartbeat_request){if(e.handshaking||a>n.length)return e.process();g.queue(e,g.createRecord(e,{type:g.ContentType.heartbeat,data:g.createHeartbeat(g.HeartbeatMessageType.heartbeat_response,n)})),g.flush(e)}else if(r===g.HeartbeatMessageType.heartbeat_response){if(n!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,k.util.createBuffer(n))}e.process()};var um=0,lm=1,o0=2,cm=3,fm=4,l0=5,hm=6,pm=7,dm=8,gm=0,vm=1,ks=2,ym=3,Ls=4,mm=5,Am=6,d=g.handleUnexpected,c0=g.handleChangeCipherSpec,We=g.handleAlert,At=g.handleHandshake,f0=g.handleApplicationData,Xe=g.handleHeartbeat,Rs=[];Rs[g.ConnectionEnd.client]=[[d,We,At,d,Xe],[d,We,At,d,Xe],[d,We,At,d,Xe],[d,We,At,d,Xe],[d,We,At,d,Xe],[c0,We,d,d,Xe],[d,We,At,d,Xe],[d,We,At,f0,Xe],[d,We,At,d,Xe]];Rs[g.ConnectionEnd.server]=[[d,We,At,d,Xe],[d,We,At,d,Xe],[d,We,At,d,Xe],[d,We,At,d,Xe],[c0,We,d,d,Xe],[d,We,At,d,Xe],[d,We,At,f0,Xe],[d,We,At,d,Xe]];var Nr=g.handleHelloRequest,Cm=g.handleServerHello,h0=g.handleCertificate,u0=g.handleServerKeyExchange,_s=g.handleCertificateRequest,Za=g.handleServerHelloDone,p0=g.handleFinished,tn=[];tn[g.ConnectionEnd.client]=[[d,d,Cm,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d],[Nr,d,d,d,d,d,d,d,d,d,d,h0,u0,_s,Za,d,d,d,d,d,d],[Nr,d,d,d,d,d,d,d,d,d,d,d,u0,_s,Za,d,d,d,d,d,d],[Nr,d,d,d,d,d,d,d,d,d,d,d,d,_s,Za,d,d,d,d,d,d],[Nr,d,d,d,d,d,d,d,d,d,d,d,d,d,Za,d,d,d,d,d,d],[Nr,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d],[Nr,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,p0],[Nr,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d],[Nr,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d]];var Em=g.handleClientHello,xm=g.handleClientKeyExchange,Sm=g.handleCertificateVerify;tn[g.ConnectionEnd.server]=[[d,Em,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d],[d,d,d,d,d,d,d,d,d,d,d,h0,d,d,d,d,d,d,d,d,d],[d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,xm,d,d,d,d],[d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,Sm,d,d,d,d,d],[d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d],[d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,p0],[d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d],[d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d]];g.generateKeys=function(e,t){var i=rn,r=t.client_random+t.server_random;e.session.resuming||(t.master_secret=i(t.pre_master_secret,"master secret",r,48).bytes(),t.pre_master_secret=null),r=t.server_random+t.client_random;var a=2*t.mac_key_length+2*t.enc_key_length,n=e.version.major===g.Versions.TLS_1_0.major&&e.version.minor===g.Versions.TLS_1_0.minor;n&&(a+=2*t.fixed_iv_length);var s=i(t.master_secret,"key expansion",r,a),o={client_write_MAC_key:s.getBytes(t.mac_key_length),server_write_MAC_key:s.getBytes(t.mac_key_length),client_write_key:s.getBytes(t.enc_key_length),server_write_key:s.getBytes(t.enc_key_length)};return n&&(o.client_write_IV=s.getBytes(t.fixed_iv_length),o.server_write_IV=s.getBytes(t.fixed_iv_length)),o};g.createConnectionState=function(e){var t=e.entity===g.ConnectionEnd.client,i=function(){var n={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(s){return!0},compressionState:null,compressFunction:function(s){return!0},updateSequenceNumber:function(){n.sequenceNumber[1]===4294967295?(n.sequenceNumber[1]=0,++n.sequenceNumber[0]):++n.sequenceNumber[1]}};return n},r={read:i(),write:i()};if(r.read.update=function(n,s){return r.read.cipherFunction(s,r.read)?r.read.compressFunction(n,s,r.read)||n.error(n,{message:"Could not decompress record.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.decompression_failure}}):n.error(n,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.bad_record_mac}}),!n.fail},r.write.update=function(n,s){return r.write.compressFunction(n,s,r.write)?r.write.cipherFunction(s,r.write)||n.error(n,{message:"Could not encrypt record.",send:!1,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}}):n.error(n,{message:"Could not compress record.",send:!1,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}}),!n.fail},e.session){var a=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(a),a.keys=g.generateKeys(e,a),r.read.macKey=t?a.keys.server_write_MAC_key:a.keys.client_write_MAC_key,r.write.macKey=t?a.keys.client_write_MAC_key:a.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(r,e,a),a.compression_algorithm){case g.CompressionMethod.none:break;case g.CompressionMethod.deflate:r.read.compressFunction=om,r.write.compressFunction=sm;break;default:throw new Error("Unsupported compression algorithm.")}}return r};g.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,i=k.util.createBuffer();return i.putInt32(t),i.putBytes(k.random.getBytes(28)),i};g.createRecord=function(e,t){if(!t.data)return null;var i={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return i};g.createAlert=function(e,t){var i=k.util.createBuffer();return i.putByte(t.level),i.putByte(t.description),g.createRecord(e,{type:g.ContentType.alert,data:i})};g.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=k.util.createBuffer(),i=0;i<e.cipherSuites.length;++i){var r=e.cipherSuites[i];t.putByte(r.id[0]),t.putByte(r.id[1])}var a=t.length(),n=k.util.createBuffer();n.putByte(g.CompressionMethod.none);var s=n.length(),o=k.util.createBuffer();if(e.virtualHost){var u=k.util.createBuffer();u.putByte(0),u.putByte(0);var l=k.util.createBuffer();l.putByte(0),Vt(l,2,k.util.createBuffer(e.virtualHost));var c=k.util.createBuffer();Vt(c,2,l),Vt(u,2,c),o.putBuffer(u)}var f=o.length();f>0&&(f+=2);var p=e.session.id,m=p.length+1+2+4+28+2+a+1+s+f,v=k.util.createBuffer();return v.putByte(g.HandshakeType.client_hello),v.putInt24(m),v.putByte(e.version.major),v.putByte(e.version.minor),v.putBytes(e.session.sp.client_random),Vt(v,1,k.util.createBuffer(p)),Vt(v,2,t),Vt(v,1,n),f>0&&Vt(v,2,o),v};g.createServerHello=function(e){var t=e.session.id,i=t.length+1+2+4+28+2+1,r=k.util.createBuffer();return r.putByte(g.HandshakeType.server_hello),r.putInt24(i),r.putByte(e.version.major),r.putByte(e.version.minor),r.putBytes(e.session.sp.server_random),Vt(r,1,k.util.createBuffer(t)),r.putByte(e.session.cipherSuite.id[0]),r.putByte(e.session.cipherSuite.id[1]),r.putByte(e.session.compressionMethod),r};g.createCertificate=function(e){var t=e.entity===g.ConnectionEnd.client,i=null;if(e.getCertificate){var r;t?r=e.session.certificateRequest:r=e.session.extensions.server_name.serverNameList,i=e.getCertificate(e,r)}var a=k.util.createBuffer();if(i!==null)try{k.util.isArray(i)||(i=[i]);for(var n=null,s=0;s<i.length;++s){var o=k.pem.decode(i[s])[0];if(o.type!=="CERTIFICATE"&&o.type!=="X509 CERTIFICATE"&&o.type!=="TRUSTED CERTIFICATE"){var u=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw u.headerType=o.type,u}if(o.procType&&o.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var l=k.util.createBuffer(o.body);n===null&&(n=k.asn1.fromDer(l.bytes(),!1));var c=k.util.createBuffer();Vt(c,3,l),a.putBuffer(c)}i=k.pki.certificateFromAsn1(n),t?e.session.clientCertificate=i:e.session.serverCertificate=i}catch(m){return e.error(e,{message:"Could not send certificate list.",cause:m,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.bad_certificate}})}var f=3+a.length(),p=k.util.createBuffer();return p.putByte(g.HandshakeType.certificate),p.putInt24(f),Vt(p,3,a),p};g.createClientKeyExchange=function(e){var t=k.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(k.random.getBytes(46));var i=e.session.sp;i.pre_master_secret=t.getBytes();var r=e.session.serverCertificate.publicKey;t=r.encrypt(i.pre_master_secret);var a=t.length+2,n=k.util.createBuffer();return n.putByte(g.HandshakeType.client_key_exchange),n.putInt24(a),n.putInt16(t.length),n.putBytes(t),n};g.createServerKeyExchange=function(e){var t=0,i=k.util.createBuffer();return t>0&&(i.putByte(g.HandshakeType.server_key_exchange),i.putInt24(t)),i};g.getClientSignature=function(e,t){var i=k.util.createBuffer();i.putBuffer(e.session.md5.digest()),i.putBuffer(e.session.sha1.digest()),i=i.getBytes(),e.getSignature=e.getSignature||function(r,a,n){var s=null;if(r.getPrivateKey)try{s=r.getPrivateKey(r,r.session.clientCertificate),s=k.pki.privateKeyFromPem(s)}catch(o){r.error(r,{message:"Could not get private key.",cause:o,send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}})}s===null?r.error(r,{message:"No private key set.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.internal_error}}):a=s.sign(a,null),n(r,a)},e.getSignature(e,i,t)};g.createCertificateVerify=function(e,t){var i=t.length+2,r=k.util.createBuffer();return r.putByte(g.HandshakeType.certificate_verify),r.putInt24(i),r.putInt16(t.length),r.putBytes(t),r};g.createCertificateRequest=function(e){var t=k.util.createBuffer();t.putByte(1);var i=k.util.createBuffer();for(var r in e.caStore.certs){var a=e.caStore.certs[r],n=k.pki.distinguishedNameToAsn1(a.subject),s=k.asn1.toDer(n);i.putInt16(s.length()),i.putBuffer(s)}var o=1+t.length()+2+i.length(),u=k.util.createBuffer();return u.putByte(g.HandshakeType.certificate_request),u.putInt24(o),Vt(u,1,t),Vt(u,2,i),u};g.createServerHelloDone=function(e){var t=k.util.createBuffer();return t.putByte(g.HandshakeType.server_hello_done),t.putInt24(0),t};g.createChangeCipherSpec=function(){var e=k.util.createBuffer();return e.putByte(1),e};g.createFinished=function(e){var t=k.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var i=e.entity===g.ConnectionEnd.client,r=e.session.sp,a=12,n=rn,s=i?"client finished":"server finished";t=n(r.master_secret,s,t.getBytes(),a);var o=k.util.createBuffer();return o.putByte(g.HandshakeType.finished),o.putInt24(t.length()),o.putBuffer(t),o};g.createHeartbeat=function(e,t,i){typeof i>"u"&&(i=t.length);var r=k.util.createBuffer();r.putByte(e),r.putInt16(i),r.putBytes(t);var a=r.length(),n=Math.max(16,a-i-3);return r.putBytes(k.random.getBytes(n)),r};g.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===g.ContentType.handshake||t.type===g.ContentType.alert||t.type===g.ContentType.change_cipher_spec))){if(t.type===g.ContentType.handshake){var i=t.fragment.bytes();e.session.md5.update(i),e.session.sha1.update(i),i=null}var r;if(t.fragment.length()<=g.MaxFragment)r=[t];else{r=[];for(var a=t.fragment.bytes();a.length>g.MaxFragment;)r.push(g.createRecord(e,{type:t.type,data:k.util.createBuffer(a.slice(0,g.MaxFragment))})),a=a.slice(g.MaxFragment);a.length>0&&r.push(g.createRecord(e,{type:t.type,data:k.util.createBuffer(a)}))}for(var n=0;n<r.length&&!e.fail;++n){var s=r[n],o=e.state.current.write;o.update(e,s)&&e.records.push(s)}}};g.flush=function(e){for(var t=0;t<e.records.length;++t){var i=e.records[t];e.tlsData.putByte(i.type),e.tlsData.putByte(i.version.major),e.tlsData.putByte(i.version.minor),e.tlsData.putInt16(i.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var Ns=function(e){switch(e){case!0:return!0;case k.pki.certificateError.bad_certificate:return g.Alert.Description.bad_certificate;case k.pki.certificateError.unsupported_certificate:return g.Alert.Description.unsupported_certificate;case k.pki.certificateError.certificate_revoked:return g.Alert.Description.certificate_revoked;case k.pki.certificateError.certificate_expired:return g.Alert.Description.certificate_expired;case k.pki.certificateError.certificate_unknown:return g.Alert.Description.certificate_unknown;case k.pki.certificateError.unknown_ca:return g.Alert.Description.unknown_ca;default:return g.Alert.Description.bad_certificate}},Im=function(e){switch(e){case!0:return!0;case g.Alert.Description.bad_certificate:return k.pki.certificateError.bad_certificate;case g.Alert.Description.unsupported_certificate:return k.pki.certificateError.unsupported_certificate;case g.Alert.Description.certificate_revoked:return k.pki.certificateError.certificate_revoked;case g.Alert.Description.certificate_expired:return k.pki.certificateError.certificate_expired;case g.Alert.Description.certificate_unknown:return k.pki.certificateError.certificate_unknown;case g.Alert.Description.unknown_ca:return k.pki.certificateError.unknown_ca;default:return k.pki.certificateError.bad_certificate}};g.verifyCertificateChain=function(e,t){try{var i={};for(var r in e.verifyOptions)i[r]=e.verifyOptions[r];i.verify=function(n,s,o){var u=Ns(n),l=e.verify(e,n,s,o);if(l!==!0){if(typeof l=="object"&&!k.util.isArray(l)){var c=new Error("The application rejected the certificate.");throw c.send=!0,c.alert={level:g.Alert.Level.fatal,description:g.Alert.Description.bad_certificate},l.message&&(c.message=l.message),l.alert&&(c.alert.description=l.alert),c}l!==n&&(l=Im(l))}return l},k.pki.verifyCertificateChain(e.caStore,t,i)}catch(n){var a=n;(typeof a!="object"||k.util.isArray(a))&&(a={send:!0,alert:{level:g.Alert.Level.fatal,description:Ns(n)}}),"send"in a||(a.send=!0),"alert"in a||(a.alert={level:g.Alert.Level.fatal,description:Ns(a.error)}),e.error(e,a)}return!e.fail};g.createSessionCache=function(e,t){var i=null;if(e&&e.getSession&&e.setSession&&e.order)i=e;else{i={},i.cache=e||{},i.capacity=Math.max(t||100,1),i.order=[];for(var r in e)i.order.length<=t?i.order.push(r):delete e[r];i.getSession=function(a){var n=null,s=null;if(a?s=k.util.bytesToHex(a):i.order.length>0&&(s=i.order[0]),s!==null&&s in i.cache){n=i.cache[s],delete i.cache[s];for(var o in i.order)if(i.order[o]===s){i.order.splice(o,1);break}}return n},i.setSession=function(a,n){if(i.order.length===i.capacity){var s=i.order.shift();delete i.cache[s]}var s=k.util.bytesToHex(a);i.order.push(s),i.cache[s]=n}}return i};g.createConnection=function(e){var t=null;e.caStore?k.util.isArray(e.caStore)?t=k.pki.createCaStore(e.caStore):t=e.caStore:t=k.pki.createCaStore();var i=e.cipherSuites||null;if(i===null){i=[];for(var r in g.CipherSuites)i.push(g.CipherSuites[r])}var a=e.server?g.ConnectionEnd.server:g.ConnectionEnd.client,n=e.sessionCache?g.createSessionCache(e.sessionCache):null,s={version:{major:g.Version.major,minor:g.Version.minor},entity:a,sessionId:e.sessionId,caStore:t,sessionCache:n,cipherSuites:i,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(c,f,p,m){return f},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:k.util.createBuffer(),tlsData:k.util.createBuffer(),data:k.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(c,f){f.origin=f.origin||(c.entity===g.ConnectionEnd.client?"client":"server"),f.send&&(g.queue(c,g.createAlert(c,f.alert)),g.flush(c));var p=f.fatal!==!1;p&&(c.fail=!0),e.error(c,f),p&&c.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};s.reset=function(c){s.version={major:g.Version.major,minor:g.Version.minor},s.record=null,s.session=null,s.peerCertificate=null,s.state={pending:null,current:null},s.expect=s.entity===g.ConnectionEnd.client?um:gm,s.fragmented=null,s.records=[],s.open=!1,s.handshakes=0,s.handshaking=!1,s.isConnected=!1,s.fail=!(c||typeof c>"u"),s.input.clear(),s.tlsData.clear(),s.data.clear(),s.state.current=g.createConnectionState(s)},s.reset();var o=function(c,f){var p=f.type-g.ContentType.change_cipher_spec,m=Rs[c.entity][c.expect];p in m?m[p](c,f):g.handleUnexpected(c,f)},u=function(c){var f=0,p=c.input,m=p.length();if(m<5)f=5-m;else{c.record={type:p.getByte(),version:{major:p.getByte(),minor:p.getByte()},length:p.getInt16(),fragment:k.util.createBuffer(),ready:!1};var v=c.record.version.major===c.version.major;v&&c.session&&c.session.version&&(v=c.record.version.minor===c.version.minor),v||c.error(c,{message:"Incompatible TLS version.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.protocol_version}})}return f},l=function(c){var f=0,p=c.input,m=p.length();if(m<c.record.length)f=c.record.length-m;else{c.record.fragment.putBytes(p.getBytes(c.record.length)),p.compact();var v=c.state.current.read;v.update(c,c.record)&&(c.fragmented!==null&&(c.fragmented.type===c.record.type?(c.fragmented.fragment.putBuffer(c.record.fragment),c.record=c.fragmented):c.error(c,{message:"Invalid fragmented record.",send:!0,alert:{level:g.Alert.Level.fatal,description:g.Alert.Description.unexpected_message}})),c.record.ready=!0)}return f};return s.handshake=function(c){if(s.entity!==g.ConnectionEnd.client)s.error(s,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(s.handshaking)s.error(s,{message:"Handshake already in progress.",fatal:!1});else{s.fail&&!s.open&&s.handshakes===0&&(s.fail=!1),s.handshaking=!0,c=c||"";var f=null;c.length>0&&(s.sessionCache&&(f=s.sessionCache.getSession(c)),f===null&&(c="")),c.length===0&&s.sessionCache&&(f=s.sessionCache.getSession(),f!==null&&(c=f.id)),s.session={id:c,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:k.md.md5.create(),sha1:k.md.sha1.create()},f&&(s.version=f.version,s.session.sp=f.sp),s.session.sp.client_random=g.createRandom().getBytes(),s.open=!0,g.queue(s,g.createRecord(s,{type:g.ContentType.handshake,data:g.createClientHello(s)})),g.flush(s)}},s.process=function(c){var f=0;return c&&s.input.putBytes(c),s.fail||(s.record!==null&&s.record.ready&&s.record.fragment.isEmpty()&&(s.record=null),s.record===null&&(f=u(s)),!s.fail&&s.record!==null&&!s.record.ready&&(f=l(s)),!s.fail&&s.record!==null&&s.record.ready&&o(s,s.record)),f},s.prepare=function(c){return g.queue(s,g.createRecord(s,{type:g.ContentType.application_data,data:k.util.createBuffer(c)})),g.flush(s)},s.prepareHeartbeatRequest=function(c,f){return c instanceof k.util.ByteBuffer&&(c=c.bytes()),typeof f>"u"&&(f=c.length),s.expectedHeartbeatPayload=c,g.queue(s,g.createRecord(s,{type:g.ContentType.heartbeat,data:g.createHeartbeat(g.HeartbeatMessageType.heartbeat_request,c,f)})),g.flush(s)},s.close=function(c){if(!s.fail&&s.sessionCache&&s.session){var f={id:s.session.id,version:s.session.version,sp:s.session.sp};f.sp.keys=null,s.sessionCache.setSession(f.id,f)}s.open&&(s.open=!1,s.input.clear(),(s.isConnected||s.handshaking)&&(s.isConnected=s.handshaking=!1,g.queue(s,g.createAlert(s,{level:g.Alert.Level.warning,description:g.Alert.Description.close_notify})),g.flush(s)),s.closed(s)),s.reset(c)},s};d0.exports=k.tls=k.tls||{};for(en in g)typeof g[en]!="function"&&(k.tls[en]=g[en]);var en;k.tls.prf_tls1=rn;k.tls.hmac_sha1=nm;k.tls.createSessionCache=g.createSessionCache;k.tls.createConnection=g.createConnection});var y0=F((VE,v0)=>{"use strict";S();var kr=oe();Ir();Ds();var Ft=v0.exports=kr.tls;Ft.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Ft.BulkCipherAlgorithm.aes,e.cipher_type=Ft.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Ft.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:g0};Ft.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Ft.BulkCipherAlgorithm.aes,e.cipher_type=Ft.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Ft.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:g0};function g0(e,t,i){var r=t.entity===kr.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:kr.cipher.createDecipher("AES-CBC",r?i.keys.server_write_key:i.keys.client_write_key),iv:r?i.keys.server_write_IV:i.keys.client_write_IV},e.write.cipherState={init:!1,cipher:kr.cipher.createCipher("AES-CBC",r?i.keys.client_write_key:i.keys.server_write_key),iv:r?i.keys.client_write_IV:i.keys.server_write_IV},e.read.cipherFunction=wm,e.write.cipherFunction=Bm,e.read.macLength=e.write.macLength=i.mac_length,e.read.macFunction=e.write.macFunction=Ft.hmac_sha1}function Bm(e,t){var i=!1,r=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(r),t.updateSequenceNumber();var a;e.version.minor===Ft.Versions.TLS_1_0.minor?a=t.cipherState.init?null:t.cipherState.iv:a=kr.random.getBytesSync(16),t.cipherState.init=!0;var n=t.cipherState.cipher;return n.start({iv:a}),e.version.minor>=Ft.Versions.TLS_1_1.minor&&n.output.putBytes(a),n.update(e.fragment),n.finish(bm)&&(e.fragment=n.output,e.length=e.fragment.length(),i=!0),i}function bm(e,t,i){if(!i){var r=e-t.length()%e;t.fillWithByte(r-1,r)}return!0}function Tm(e,t,i){var r=!0;if(i){for(var a=t.length(),n=t.last(),s=a-1-n;s<a-1;++s)r=r&&t.at(s)==n;r&&t.truncate(n+1)}return r}function wm(e,t){var i=!1,r;e.version.minor===Ft.Versions.TLS_1_0.minor?r=t.cipherState.init?null:t.cipherState.iv:r=e.fragment.getBytes(16),t.cipherState.init=!0;var a=t.cipherState.cipher;a.start({iv:r}),a.update(e.fragment),i=a.finish(Tm);var n=t.macLength,s=kr.random.getBytesSync(n),o=a.output.length();o>=n?(e.fragment=a.output.getBytes(o-n),s=a.output.getBytes(n)):e.fragment=a.output.getBytes(),e.fragment=kr.util.createBuffer(e.fragment),e.length=e.fragment.length();var u=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),i=_m(t.macKey,s,u)&&i,i}function _m(e,t,i){var r=kr.hmac.create();return r.start("SHA1",e),r.update(t),t=r.digest().getBytes(),r.start(null,null),r.update(i),i=r.digest().getBytes(),t===i}});var Us=F((ME,E0)=>{"use strict";S();var ke=oe();Jt();Ae();var Xi=E0.exports=ke.sha512=ke.sha512||{};ke.md.sha512=ke.md.algorithms.sha512=Xi;var A0=ke.sha384=ke.sha512.sha384=ke.sha512.sha384||{};A0.create=function(){return Xi.create("SHA-384")};ke.md.sha384=ke.md.algorithms.sha384=A0;ke.sha512.sha256=ke.sha512.sha256||{create:function(){return Xi.create("SHA-512/256")}};ke.md["sha512/256"]=ke.md.algorithms["sha512/256"]=ke.sha512.sha256;ke.sha512.sha224=ke.sha512.sha224||{create:function(){return Xi.create("SHA-512/224")}};ke.md["sha512/224"]=ke.md.algorithms["sha512/224"]=ke.sha512.sha224;Xi.create=function(e){if(C0||Nm(),typeof e>"u"&&(e="SHA-512"),!(e in Kr))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=Kr[e],i=null,r=ke.util.createBuffer(),a=new Array(80),n=0;n<80;++n)a[n]=new Array(2);var s=64;switch(e){case"SHA-384":s=48;break;case"SHA-512/256":s=32;break;case"SHA-512/224":s=28;break}var o={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:s,messageLength:0,fullMessageLength:null,messageLengthSize:16};return o.start=function(){o.messageLength=0,o.fullMessageLength=o.messageLength128=[];for(var u=o.messageLengthSize/4,l=0;l<u;++l)o.fullMessageLength.push(0);r=ke.util.createBuffer(),i=new Array(t.length);for(var l=0;l<t.length;++l)i[l]=t[l].slice(0);return o},o.start(),o.update=function(u,l){l==="utf8"&&(u=ke.util.encodeUtf8(u));var c=u.length;o.messageLength+=c,c=[c/4294967296>>>0,c>>>0];for(var f=o.fullMessageLength.length-1;f>=0;--f)o.fullMessageLength[f]+=c[1],c[1]=c[0]+(o.fullMessageLength[f]/4294967296>>>0),o.fullMessageLength[f]=o.fullMessageLength[f]>>>0,c[0]=c[1]/4294967296>>>0;return r.putBytes(u),m0(i,a,r),(r.read>2048||r.length()===0)&&r.compact(),o},o.digest=function(){var u=ke.util.createBuffer();u.putBytes(r.bytes());var l=o.fullMessageLength[o.fullMessageLength.length-1]+o.messageLengthSize,c=l&o.blockLength-1;u.putBytes(Ps.substr(0,o.blockLength-c));for(var f,p,m=o.fullMessageLength[0]*8,v=0;v<o.fullMessageLength.length-1;++v)f=o.fullMessageLength[v+1]*8,p=f/4294967296>>>0,m+=p,u.putInt32(m>>>0),m=f>>>0;u.putInt32(m);for(var C=new Array(i.length),v=0;v<i.length;++v)C[v]=i[v].slice(0);m0(C,a,u);var E=ke.util.createBuffer(),B;e==="SHA-512"?B=C.length:e==="SHA-384"?B=C.length-2:B=C.length-4;for(var v=0;v<B;++v)E.putInt32(C[v][0]),(v!==B-1||e!=="SHA-512/224")&&E.putInt32(C[v][1]);return E},o};var Ps=null,C0=!1,Qs=null,Kr=null;function Nm(){Ps="\x80",Ps+=ke.util.fillString("\0",128),Qs=[[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]],Kr={},Kr["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],Kr["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],Kr["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],Kr["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],C0=!0}function m0(e,t,i){for(var r,a,n,s,o,u,l,c,f,p,m,v,C,E,B,w,T,U,P,Q,te,ne,H,z,Y,re,ye,Ee,$,ie,V,_e,xe,Oe,Ve,qe=i.length();qe>=128;){for($=0;$<16;++$)t[$][0]=i.getInt32()>>>0,t[$][1]=i.getInt32()>>>0;for(;$<80;++$)_e=t[$-2],ie=_e[0],V=_e[1],r=((ie>>>19|V<<13)^(V>>>29|ie<<3)^ie>>>6)>>>0,a=((ie<<13|V>>>19)^(V<<3|ie>>>29)^(ie<<26|V>>>6))>>>0,Oe=t[$-15],ie=Oe[0],V=Oe[1],n=((ie>>>1|V<<31)^(ie>>>8|V<<24)^ie>>>7)>>>0,s=((ie<<31|V>>>1)^(ie<<24|V>>>8)^(ie<<25|V>>>7))>>>0,xe=t[$-7],Ve=t[$-16],V=a+xe[1]+s+Ve[1],t[$][0]=r+xe[0]+n+Ve[0]+(V/4294967296>>>0)>>>0,t[$][1]=V>>>0;for(C=e[0][0],E=e[0][1],B=e[1][0],w=e[1][1],T=e[2][0],U=e[2][1],P=e[3][0],Q=e[3][1],te=e[4][0],ne=e[4][1],H=e[5][0],z=e[5][1],Y=e[6][0],re=e[6][1],ye=e[7][0],Ee=e[7][1],$=0;$<80;++$)l=((te>>>14|ne<<18)^(te>>>18|ne<<14)^(ne>>>9|te<<23))>>>0,c=((te<<18|ne>>>14)^(te<<14|ne>>>18)^(ne<<23|te>>>9))>>>0,f=(Y^te&(H^Y))>>>0,p=(re^ne&(z^re))>>>0,o=((C>>>28|E<<4)^(E>>>2|C<<30)^(E>>>7|C<<25))>>>0,u=((C<<4|E>>>28)^(E<<30|C>>>2)^(E<<25|C>>>7))>>>0,m=(C&B|T&(C^B))>>>0,v=(E&w|U&(E^w))>>>0,V=Ee+c+p+Qs[$][1]+t[$][1],r=ye+l+f+Qs[$][0]+t[$][0]+(V/4294967296>>>0)>>>0,a=V>>>0,V=u+v,n=o+m+(V/4294967296>>>0)>>>0,s=V>>>0,ye=Y,Ee=re,Y=H,re=z,H=te,z=ne,V=Q+a,te=P+r+(V/4294967296>>>0)>>>0,ne=V>>>0,P=T,Q=U,T=B,U=w,B=C,w=E,V=a+s,C=r+n+(V/4294967296>>>0)>>>0,E=V>>>0;V=e[0][1]+E,e[0][0]=e[0][0]+C+(V/4294967296>>>0)>>>0,e[0][1]=V>>>0,V=e[1][1]+w,e[1][0]=e[1][0]+B+(V/4294967296>>>0)>>>0,e[1][1]=V>>>0,V=e[2][1]+U,e[2][0]=e[2][0]+T+(V/4294967296>>>0)>>>0,e[2][1]=V>>>0,V=e[3][1]+Q,e[3][0]=e[3][0]+P+(V/4294967296>>>0)>>>0,e[3][1]=V>>>0,V=e[4][1]+ne,e[4][0]=e[4][0]+te+(V/4294967296>>>0)>>>0,e[4][1]=V>>>0,V=e[5][1]+z,e[5][0]=e[5][0]+H+(V/4294967296>>>0)>>>0,e[5][1]=V>>>0,V=e[6][1]+re,e[6][0]=e[6][0]+Y+(V/4294967296>>>0)>>>0,e[6][1]=V>>>0,V=e[7][1]+Ee,e[7][0]=e[7][0]+ye+(V/4294967296>>>0)>>>0,e[7][1]=V>>>0,qe-=128}}});var x0=F(Os=>{"use strict";S();var km=oe();Gt();var Ye=km.asn1;Os.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Ye.Class.UNIVERSAL,type:Ye.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Ye.Class.UNIVERSAL,type:Ye.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Ye.Class.UNIVERSAL,type:Ye.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ye.Class.UNIVERSAL,type:Ye.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Ye.Class.UNIVERSAL,type:Ye.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};Os.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Ye.Class.UNIVERSAL,type:Ye.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Ye.Class.UNIVERSAL,type:Ye.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Ye.Class.UNIVERSAL,type:Ye.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Ye.Class.UNIVERSAL,type:Ye.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var P0=F((GE,D0)=>{"use strict";S();var $e=oe();Yi();Pt();Us();Ae();var w0=x0(),Lm=w0.publicKeyValidator,Rm=w0.privateKeyValidator;typeof S0>"u"&&(S0=$e.jsbn.BigInteger);var S0,Ms=$e.util.ByteBuffer,bt=typeof Buffer>"u"?Uint8Array:Buffer;$e.pki=$e.pki||{};D0.exports=$e.pki.ed25519=$e.ed25519=$e.ed25519||{};var fe=$e.ed25519;fe.constants={};fe.constants.PUBLIC_KEY_BYTE_LENGTH=32;fe.constants.PRIVATE_KEY_BYTE_LENGTH=64;fe.constants.SEED_BYTE_LENGTH=32;fe.constants.SIGN_BYTE_LENGTH=64;fe.constants.HASH_BYTE_LENGTH=64;fe.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=$e.random.getBytesSync(fe.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==fe.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+fe.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=fr({message:t,encoding:"binary"});for(var i=new bt(fe.constants.PUBLIC_KEY_BYTE_LENGTH),r=new bt(fe.constants.PRIVATE_KEY_BYTE_LENGTH),a=0;a<32;++a)r[a]=t[a];return Um(i,r),{publicKey:i,privateKey:r}};fe.privateKeyFromAsn1=function(e){var t={},i=[],r=$e.asn1.validate(e,Rm,t,i);if(!r){var a=new Error("Invalid Key.");throw a.errors=i,a}var n=$e.asn1.derToOid(t.privateKeyOid),s=$e.oids.EdDSA25519;if(n!==s)throw new Error('Invalid OID "'+n+'"; OID must be "'+s+'".');var o=t.privateKey,u=fr({message:$e.asn1.fromDer(o).value,encoding:"binary"});return{privateKeyBytes:u}};fe.publicKeyFromAsn1=function(e){var t={},i=[],r=$e.asn1.validate(e,Lm,t,i);if(!r){var a=new Error("Invalid Key.");throw a.errors=i,a}var n=$e.asn1.derToOid(t.publicKeyOid),s=$e.oids.EdDSA25519;if(n!==s)throw new Error('Invalid OID "'+n+'"; OID must be "'+s+'".');var o=t.ed25519PublicKey;if(o.length!==fe.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return fr({message:o,encoding:"binary"})};fe.publicKeyFromPrivateKey=function(e){e=e||{};var t=fr({message:e.privateKey,encoding:"binary"});if(t.length!==fe.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+fe.constants.PRIVATE_KEY_BYTE_LENGTH);for(var i=new bt(fe.constants.PUBLIC_KEY_BYTE_LENGTH),r=0;r<i.length;++r)i[r]=t[32+r];return i};fe.sign=function(e){e=e||{};var t=fr(e),i=fr({message:e.privateKey,encoding:"binary"});if(i.length===fe.constants.SEED_BYTE_LENGTH){var r=fe.generateKeyPair({seed:i});i=r.privateKey}else if(i.length!==fe.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+fe.constants.SEED_BYTE_LENGTH+" or "+fe.constants.PRIVATE_KEY_BYTE_LENGTH);var a=new bt(fe.constants.SIGN_BYTE_LENGTH+t.length);Om(a,t,t.length,i);for(var n=new bt(fe.constants.SIGN_BYTE_LENGTH),s=0;s<n.length;++s)n[s]=a[s];return n};fe.verify=function(e){e=e||{};var t=fr(e);if(e.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var i=fr({message:e.signature,encoding:"binary"});if(i.length!==fe.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+fe.constants.SIGN_BYTE_LENGTH);var r=fr({message:e.publicKey,encoding:"binary"});if(r.length!==fe.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+fe.constants.PUBLIC_KEY_BYTE_LENGTH);var a=new bt(fe.constants.SIGN_BYTE_LENGTH+t.length),n=new bt(fe.constants.SIGN_BYTE_LENGTH+t.length),s;for(s=0;s<fe.constants.SIGN_BYTE_LENGTH;++s)a[s]=i[s];for(s=0;s<t.length;++s)a[s+fe.constants.SIGN_BYTE_LENGTH]=t[s];return Vm(n,a,a.length,r)>=0};function fr(e){var t=e.message;if(t instanceof Uint8Array||t instanceof bt)return t;var i=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),i="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!i)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,i);t=new Ms(t,i)}else if(!(t instanceof Ms))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 r=new bt(t.length()),a=0;a<r.length;++a)r[a]=t.at(a);return r}var qs=Z(),an=Z([1]),Dm=Z([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Pm=Z([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),I0=Z([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),B0=Z([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),Vs=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]),Qm=Z([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function $i(e,t){var i=$e.md.sha512.create(),r=new Ms(e);i.update(r.getBytes(t),"binary");var a=i.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(a,"binary");for(var n=new bt(fe.constants.HASH_BYTE_LENGTH),s=0;s<64;++s)n[s]=a.charCodeAt(s);return n}function Um(e,t){var i=[Z(),Z(),Z(),Z()],r,a=$i(t,32);for(a[0]&=248,a[31]&=127,a[31]|=64,js(i,a),Gs(e,i),r=0;r<32;++r)t[r+32]=e[r];return 0}function Om(e,t,i,r){var a,n,s=new Float64Array(64),o=[Z(),Z(),Z(),Z()],u=$i(r,32);u[0]&=248,u[31]&=127,u[31]|=64;var l=i+64;for(a=0;a<i;++a)e[64+a]=t[a];for(a=0;a<32;++a)e[32+a]=u[32+a];var c=$i(e.subarray(32),i+32);for(Ks(c),js(o,c),Gs(e,o),a=32;a<64;++a)e[a]=r[a];var f=$i(e,i+64);for(Ks(f),a=32;a<64;++a)s[a]=0;for(a=0;a<32;++a)s[a]=c[a];for(a=0;a<32;++a)for(n=0;n<32;n++)s[a+n]+=f[a]*u[n];return _0(e.subarray(32),s),l}function Vm(e,t,i,r){var a,n,s=new bt(32),o=[Z(),Z(),Z(),Z()],u=[Z(),Z(),Z(),Z()];if(n=-1,i<64||Fm(u,r))return-1;for(a=0;a<i;++a)e[a]=t[a];for(a=0;a<32;++a)e[a+32]=r[a];var l=$i(e,i);if(Ks(l),L0(o,u,l),js(u,t.subarray(32)),Hs(o,u),Gs(s,o),i-=64,N0(t,0,s,0)){for(a=0;a<i;++a)e[a]=0;return-1}for(a=0;a<i;++a)e[a]=t[a+64];return n=i,n}function _0(e,t){var i,r,a,n;for(r=63;r>=32;--r){for(i=0,a=r-32,n=r-12;a<n;++a)t[a]+=i-16*t[r]*Vs[a-(r-32)],i=t[a]+128>>8,t[a]-=i*256;t[a]+=i,t[r]=0}for(i=0,a=0;a<32;++a)t[a]+=i-(t[31]>>4)*Vs[a],i=t[a]>>8,t[a]&=255;for(a=0;a<32;++a)t[a]-=i*Vs[a];for(r=0;r<32;++r)t[r+1]+=t[r]>>8,e[r]=t[r]&255}function Ks(e){for(var t=new Float64Array(64),i=0;i<64;++i)t[i]=e[i],e[i]=0;_0(e,t)}function Hs(e,t){var i=Z(),r=Z(),a=Z(),n=Z(),s=Z(),o=Z(),u=Z(),l=Z(),c=Z();di(i,e[1],e[0]),di(c,t[1],t[0]),be(i,i,c),pi(r,e[0],e[1]),pi(c,t[0],t[1]),be(r,r,c),be(a,e[3],t[3]),be(a,a,Pm),be(n,e[2],t[2]),pi(n,n,n),di(s,r,i),di(o,n,a),pi(u,n,a),pi(l,r,i),be(e[0],s,o),be(e[1],l,u),be(e[2],u,o),be(e[3],s,l)}function b0(e,t,i){for(var r=0;r<4;++r)R0(e[r],t[r],i)}function Gs(e,t){var i=Z(),r=Z(),a=Z();Hm(a,t[2]),be(i,t[0],a),be(r,t[1],a),nn(e,r),e[31]^=k0(i)<<7}function nn(e,t){var i,r,a,n=Z(),s=Z();for(i=0;i<16;++i)s[i]=t[i];for(Fs(s),Fs(s),Fs(s),r=0;r<2;++r){for(n[0]=s[0]-65517,i=1;i<15;++i)n[i]=s[i]-65535-(n[i-1]>>16&1),n[i-1]&=65535;n[15]=s[15]-32767-(n[14]>>16&1),a=n[15]>>16&1,n[14]&=65535,R0(s,n,1-a)}for(i=0;i<16;i++)e[2*i]=s[i]&255,e[2*i+1]=s[i]>>8}function Fm(e,t){var i=Z(),r=Z(),a=Z(),n=Z(),s=Z(),o=Z(),u=Z();return Lr(e[2],an),Mm(e[1],t),Hr(a,e[1]),be(n,a,Dm),di(a,a,e[2]),pi(n,e[2],n),Hr(s,n),Hr(o,s),be(u,o,s),be(i,u,a),be(i,i,n),qm(i,i),be(i,i,a),be(i,i,n),be(i,i,n),be(e[0],i,n),Hr(r,e[0]),be(r,r,n),T0(r,a)&&be(e[0],e[0],Qm),Hr(r,e[0]),be(r,r,n),T0(r,a)?-1:(k0(e[0])===t[31]>>7&&di(e[0],qs,e[0]),be(e[3],e[0],e[1]),0)}function Mm(e,t){var i;for(i=0;i<16;++i)e[i]=t[2*i]+(t[2*i+1]<<8);e[15]&=32767}function qm(e,t){var i=Z(),r;for(r=0;r<16;++r)i[r]=t[r];for(r=250;r>=0;--r)Hr(i,i),r!==1&&be(i,i,t);for(r=0;r<16;++r)e[r]=i[r]}function T0(e,t){var i=new bt(32),r=new bt(32);return nn(i,e),nn(r,t),N0(i,0,r,0)}function N0(e,t,i,r){return Km(e,t,i,r,32)}function Km(e,t,i,r,a){var n,s=0;for(n=0;n<a;++n)s|=e[t+n]^i[r+n];return(1&s-1>>>8)-1}function k0(e){var t=new bt(32);return nn(t,e),t[0]&1}function L0(e,t,i){var r,a;for(Lr(e[0],qs),Lr(e[1],an),Lr(e[2],an),Lr(e[3],qs),a=255;a>=0;--a)r=i[a/8|0]>>(a&7)&1,b0(e,t,r),Hs(t,e),Hs(e,e),b0(e,t,r)}function js(e,t){var i=[Z(),Z(),Z(),Z()];Lr(i[0],I0),Lr(i[1],B0),Lr(i[2],an),be(i[3],I0,B0),L0(e,i,t)}function Lr(e,t){var i;for(i=0;i<16;i++)e[i]=t[i]|0}function Hm(e,t){var i=Z(),r;for(r=0;r<16;++r)i[r]=t[r];for(r=253;r>=0;--r)Hr(i,i),r!==2&&r!==4&&be(i,i,t);for(r=0;r<16;++r)e[r]=i[r]}function Fs(e){var t,i,r=1;for(t=0;t<16;++t)i=e[t]+r+65535,r=Math.floor(i/65536),e[t]=i-r*65536;e[0]+=r-1+37*(r-1)}function R0(e,t,i){for(var r,a=~(i-1),n=0;n<16;++n)r=a&(e[n]^t[n]),e[n]^=r,t[n]^=r}function Z(e){var t,i=new Float64Array(16);if(e)for(t=0;t<e.length;++t)i[t]=e[t];return i}function pi(e,t,i){for(var r=0;r<16;++r)e[r]=t[r]+i[r]}function di(e,t,i){for(var r=0;r<16;++r)e[r]=t[r]-i[r]}function Hr(e,t){be(e,t,t)}function be(e,t,i){var r,a,n=0,s=0,o=0,u=0,l=0,c=0,f=0,p=0,m=0,v=0,C=0,E=0,B=0,w=0,T=0,U=0,P=0,Q=0,te=0,ne=0,H=0,z=0,Y=0,re=0,ye=0,Ee=0,$=0,ie=0,V=0,_e=0,xe=0,Oe=i[0],Ve=i[1],qe=i[2],Ze=i[3],et=i[4],tt=i[5],rt=i[6],it=i[7],at=i[8],nt=i[9],st=i[10],ot=i[11],ut=i[12],lt=i[13],ct=i[14],ft=i[15];r=t[0],n+=r*Oe,s+=r*Ve,o+=r*qe,u+=r*Ze,l+=r*et,c+=r*tt,f+=r*rt,p+=r*it,m+=r*at,v+=r*nt,C+=r*st,E+=r*ot,B+=r*ut,w+=r*lt,T+=r*ct,U+=r*ft,r=t[1],s+=r*Oe,o+=r*Ve,u+=r*qe,l+=r*Ze,c+=r*et,f+=r*tt,p+=r*rt,m+=r*it,v+=r*at,C+=r*nt,E+=r*st,B+=r*ot,w+=r*ut,T+=r*lt,U+=r*ct,P+=r*ft,r=t[2],o+=r*Oe,u+=r*Ve,l+=r*qe,c+=r*Ze,f+=r*et,p+=r*tt,m+=r*rt,v+=r*it,C+=r*at,E+=r*nt,B+=r*st,w+=r*ot,T+=r*ut,U+=r*lt,P+=r*ct,Q+=r*ft,r=t[3],u+=r*Oe,l+=r*Ve,c+=r*qe,f+=r*Ze,p+=r*et,m+=r*tt,v+=r*rt,C+=r*it,E+=r*at,B+=r*nt,w+=r*st,T+=r*ot,U+=r*ut,P+=r*lt,Q+=r*ct,te+=r*ft,r=t[4],l+=r*Oe,c+=r*Ve,f+=r*qe,p+=r*Ze,m+=r*et,v+=r*tt,C+=r*rt,E+=r*it,B+=r*at,w+=r*nt,T+=r*st,U+=r*ot,P+=r*ut,Q+=r*lt,te+=r*ct,ne+=r*ft,r=t[5],c+=r*Oe,f+=r*Ve,p+=r*qe,m+=r*Ze,v+=r*et,C+=r*tt,E+=r*rt,B+=r*it,w+=r*at,T+=r*nt,U+=r*st,P+=r*ot,Q+=r*ut,te+=r*lt,ne+=r*ct,H+=r*ft,r=t[6],f+=r*Oe,p+=r*Ve,m+=r*qe,v+=r*Ze,C+=r*et,E+=r*tt,B+=r*rt,w+=r*it,T+=r*at,U+=r*nt,P+=r*st,Q+=r*ot,te+=r*ut,ne+=r*lt,H+=r*ct,z+=r*ft,r=t[7],p+=r*Oe,m+=r*Ve,v+=r*qe,C+=r*Ze,E+=r*et,B+=r*tt,w+=r*rt,T+=r*it,U+=r*at,P+=r*nt,Q+=r*st,te+=r*ot,ne+=r*ut,H+=r*lt,z+=r*ct,Y+=r*ft,r=t[8],m+=r*Oe,v+=r*Ve,C+=r*qe,E+=r*Ze,B+=r*et,w+=r*tt,T+=r*rt,U+=r*it,P+=r*at,Q+=r*nt,te+=r*st,ne+=r*ot,H+=r*ut,z+=r*lt,Y+=r*ct,re+=r*ft,r=t[9],v+=r*Oe,C+=r*Ve,E+=r*qe,B+=r*Ze,w+=r*et,T+=r*tt,U+=r*rt,P+=r*it,Q+=r*at,te+=r*nt,ne+=r*st,H+=r*ot,z+=r*ut,Y+=r*lt,re+=r*ct,ye+=r*ft,r=t[10],C+=r*Oe,E+=r*Ve,B+=r*qe,w+=r*Ze,T+=r*et,U+=r*tt,P+=r*rt,Q+=r*it,te+=r*at,ne+=r*nt,H+=r*st,z+=r*ot,Y+=r*ut,re+=r*lt,ye+=r*ct,Ee+=r*ft,r=t[11],E+=r*Oe,B+=r*Ve,w+=r*qe,T+=r*Ze,U+=r*et,P+=r*tt,Q+=r*rt,te+=r*it,ne+=r*at,H+=r*nt,z+=r*st,Y+=r*ot,re+=r*ut,ye+=r*lt,Ee+=r*ct,$+=r*ft,r=t[12],B+=r*Oe,w+=r*Ve,T+=r*qe,U+=r*Ze,P+=r*et,Q+=r*tt,te+=r*rt,ne+=r*it,H+=r*at,z+=r*nt,Y+=r*st,re+=r*ot,ye+=r*ut,Ee+=r*lt,$+=r*ct,ie+=r*ft,r=t[13],w+=r*Oe,T+=r*Ve,U+=r*qe,P+=r*Ze,Q+=r*et,te+=r*tt,ne+=r*rt,H+=r*it,z+=r*at,Y+=r*nt,re+=r*st,ye+=r*ot,Ee+=r*ut,$+=r*lt,ie+=r*ct,V+=r*ft,r=t[14],T+=r*Oe,U+=r*Ve,P+=r*qe,Q+=r*Ze,te+=r*et,ne+=r*tt,H+=r*rt,z+=r*it,Y+=r*at,re+=r*nt,ye+=r*st,Ee+=r*ot,$+=r*ut,ie+=r*lt,V+=r*ct,_e+=r*ft,r=t[15],U+=r*Oe,P+=r*Ve,Q+=r*qe,te+=r*Ze,ne+=r*et,H+=r*tt,z+=r*rt,Y+=r*it,re+=r*at,ye+=r*nt,Ee+=r*st,$+=r*ot,ie+=r*ut,V+=r*lt,_e+=r*ct,xe+=r*ft,n+=38*P,s+=38*Q,o+=38*te,u+=38*ne,l+=38*H,c+=38*z,f+=38*Y,p+=38*re,m+=38*ye,v+=38*Ee,C+=38*$,E+=38*ie,B+=38*V,w+=38*_e,T+=38*xe,a=1,r=n+a+65535,a=Math.floor(r/65536),n=r-a*65536,r=s+a+65535,a=Math.floor(r/65536),s=r-a*65536,r=o+a+65535,a=Math.floor(r/65536),o=r-a*65536,r=u+a+65535,a=Math.floor(r/65536),u=r-a*65536,r=l+a+65535,a=Math.floor(r/65536),l=r-a*65536,r=c+a+65535,a=Math.floor(r/65536),c=r-a*65536,r=f+a+65535,a=Math.floor(r/65536),f=r-a*65536,r=p+a+65535,a=Math.floor(r/65536),p=r-a*65536,r=m+a+65535,a=Math.floor(r/65536),m=r-a*65536,r=v+a+65535,a=Math.floor(r/65536),v=r-a*65536,r=C+a+65535,a=Math.floor(r/65536),C=r-a*65536,r=E+a+65535,a=Math.floor(r/65536),E=r-a*65536,r=B+a+65535,a=Math.floor(r/65536),B=r-a*65536,r=w+a+65535,a=Math.floor(r/65536),w=r-a*65536,r=T+a+65535,a=Math.floor(r/65536),T=r-a*65536,r=U+a+65535,a=Math.floor(r/65536),U=r-a*65536,n+=a-1+37*(a-1),a=1,r=n+a+65535,a=Math.floor(r/65536),n=r-a*65536,r=s+a+65535,a=Math.floor(r/65536),s=r-a*65536,r=o+a+65535,a=Math.floor(r/65536),o=r-a*65536,r=u+a+65535,a=Math.floor(r/65536),u=r-a*65536,r=l+a+65535,a=Math.floor(r/65536),l=r-a*65536,r=c+a+65535,a=Math.floor(r/65536),c=r-a*65536,r=f+a+65535,a=Math.floor(r/65536),f=r-a*65536,r=p+a+65535,a=Math.floor(r/65536),p=r-a*65536,r=m+a+65535,a=Math.floor(r/65536),m=r-a*65536,r=v+a+65535,a=Math.floor(r/65536),v=r-a*65536,r=C+a+65535,a=Math.floor(r/65536),C=r-a*65536,r=E+a+65535,a=Math.floor(r/65536),E=r-a*65536,r=B+a+65535,a=Math.floor(r/65536),B=r-a*65536,r=w+a+65535,a=Math.floor(r/65536),w=r-a*65536,r=T+a+65535,a=Math.floor(r/65536),T=r-a*65536,r=U+a+65535,a=Math.floor(r/65536),U=r-a*65536,n+=a-1+37*(a-1),e[0]=n,e[1]=s,e[2]=o,e[3]=u,e[4]=l,e[5]=c,e[6]=f,e[7]=p,e[8]=m,e[9]=v,e[10]=C,e[11]=E,e[12]=B,e[13]=w,e[14]=T,e[15]=U}});var V0=F((YE,O0)=>{"use strict";S();var wt=oe();Ae();Pt();Yi();O0.exports=wt.kem=wt.kem||{};var Q0=wt.jsbn.BigInteger;wt.kem.rsa={};wt.kem.rsa.create=function(e,t){t=t||{};var i=t.prng||wt.random,r={};return r.encrypt=function(a,n){var s=Math.ceil(a.n.bitLength()/8),o;do o=new Q0(wt.util.bytesToHex(i.getBytesSync(s)),16).mod(a.n);while(o.compareTo(Q0.ONE)<=0);o=wt.util.hexToBytes(o.toString(16));var u=s-o.length;u>0&&(o=wt.util.fillString("\0",u)+o);var l=a.encrypt(o,"NONE"),c=e.generate(o,n);return{encapsulation:l,key:c}},r.decrypt=function(a,n,s){var o=a.decrypt(n,"NONE");return e.generate(o,s)},r};wt.kem.kdf1=function(e,t){U0(this,e,0,t||e.digestLength)};wt.kem.kdf2=function(e,t){U0(this,e,1,t||e.digestLength)};function U0(e,t,i,r){e.generate=function(a,n){for(var s=new wt.util.ByteBuffer,o=Math.ceil(n/r)+i,u=new wt.util.ByteBuffer,l=i;l<o;++l){u.putInt32(l),t.start(),t.update(a+u.getBytes());var c=t.digest();s.putBytes(c.getBytes(r))}return s.truncate(s.length()-n),s.getBytes()}}});var K0=F((JE,q0)=>{"use strict";S();var pe=oe();Ae();q0.exports=pe.log=pe.log||{};pe.log.levels=["none","error","warning","info","debug","verbose","max"];var sn={},Js=[],ea=null;pe.log.LEVEL_LOCKED=2;pe.log.NO_LEVEL_CHECK=4;pe.log.INTERPOLATE=8;for(ir=0;ir<pe.log.levels.length;++ir)Ys=pe.log.levels[ir],sn[Ys]={index:ir,name:Ys.toUpperCase()};var Ys,ir;pe.log.logMessage=function(e){for(var t=sn[e.level].index,i=0;i<Js.length;++i){var r=Js[i];if(r.flags&pe.log.NO_LEVEL_CHECK)r.f(e);else{var a=sn[r.level].index;t<=a&&r.f(r,e)}}};pe.log.prepareStandard=function(e){"standard"in e||(e.standard=sn[e.level].name+" ["+e.category+"] "+e.message)};pe.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]),e.full=pe.util.format.apply(this,t)}};pe.log.prepareStandardFull=function(e){"standardFull"in e||(pe.log.prepareStandard(e),e.standardFull=e.standard)};for(zs=["error","warning","info","debug","verbose"],ir=0;ir<zs.length;++ir)(function(t){pe.log[t]=function(i,r){var a=Array.prototype.slice.call(arguments).slice(2),n={timestamp:new Date,level:t,category:i,message:r,arguments:a};pe.log.logMessage(n)}})(zs[ir]);var zs,ir;pe.log.makeLogger=function(e){var t={flags:0,f:e};return pe.log.setLevel(t,"none"),t};pe.log.setLevel=function(e,t){var i=!1;if(e&&!(e.flags&pe.log.LEVEL_LOCKED))for(var r=0;r<pe.log.levels.length;++r){var a=pe.log.levels[r];if(t==a){e.level=t,i=!0;break}}return i};pe.log.lock=function(e,t){typeof t>"u"||t?e.flags|=pe.log.LEVEL_LOCKED:e.flags&=~pe.log.LEVEL_LOCKED};pe.log.addLogger=function(e){Js.push(e)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(F0={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},ta=function(e,t){pe.log.prepareStandard(t);var i=F0[t.level],r=[t.standard];r=r.concat(t.arguments.slice()),i.apply(console,r)},gi=pe.log.makeLogger(ta)):(ta=function(t,i){pe.log.prepareStandardFull(i),console.log(i.standardFull)},gi=pe.log.makeLogger(ta)),pe.log.setLevel(gi,"debug"),pe.log.addLogger(gi),ea=gi):console={log:function(){}};var gi,F0,ta;ea!==null&&typeof window<"u"&&window.location&&(Zi=new URL(window.location.href).searchParams,Zi.has("console.level")&&pe.log.setLevel(ea,Zi.get("console.level").slice(-1)[0]),Zi.has("console.lock")&&(M0=Zi.get("console.lock").slice(-1)[0],M0=="true"&&pe.log.lock(ea)));var Zi,M0;pe.log.consoleLogger=ea});var G0=F((XE,H0)=>{"use strict";S();H0.exports=Jt();Oa();ui();us();Us()});var z0=F((ZE,Y0)=>{"use strict";S();var M=oe();Ir();Gt();Gi();Br();Ur();xs();Pt();Ae();$a();var x=M.asn1,Ct=Y0.exports=M.pkcs7=M.pkcs7||{};Ct.messageFromPem=function(e){var t=M.pem.decode(e)[0];if(t.type!=="PKCS7"){var i=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw i.headerType=t.type,i}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var r=x.fromDer(t.body);return Ct.messageFromAsn1(r)};Ct.messageToPem=function(e,t){var i={type:"PKCS7",body:x.toDer(e.toAsn1()).getBytes()};return M.pem.encode(i,{maxline:t})};Ct.messageFromAsn1=function(e){var t={},i=[];if(!x.validate(e,Ct.asn1.contentInfoValidator,t,i)){var r=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw r.errors=i,r}var a=x.derToOid(t.contentType),n;switch(a){case M.pki.oids.envelopedData:n=Ct.createEnvelopedData();break;case M.pki.oids.encryptedData:n=Ct.createEncryptedData();break;case M.pki.oids.signedData:n=Ct.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+a+" is not (yet) supported.")}return n.fromAsn1(t.content.value[0]),n};Ct.createSignedData=function(){var e=null;return e={type:M.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(r){if(Xs(e,r,Ct.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var a=e.rawCapture.certificates.value,n=0;n<a.length;++n)e.certificates.push(M.pki.certificateFromAsn1(a[n]))},toAsn1:function(){e.contentInfo||e.sign();for(var r=[],a=0;a<e.certificates.length;++a)r.push(M.pki.certificateToAsn1(e.certificates[a]));var n=[],s=x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,x.integerToDer(e.version).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return r.length>0&&s.value[0].value.push(x.create(x.Class.CONTEXT_SPECIFIC,0,!0,r)),n.length>0&&s.value[0].value.push(x.create(x.Class.CONTEXT_SPECIFIC,1,!0,n)),s.value[0].value.push(x.create(x.Class.UNIVERSAL,x.Type.SET,!0,e.signerInfos)),x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(e.type).getBytes()),s])},addSigner:function(r){var a=r.issuer,n=r.serialNumber;if(r.certificate){var s=r.certificate;typeof s=="string"&&(s=M.pki.certificateFromPem(s)),a=s.issuer.attributes,n=s.serialNumber}var o=r.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof o=="string"&&(o=M.pki.privateKeyFromPem(o));var u=r.digestAlgorithm||M.pki.oids.sha1;switch(u){case M.pki.oids.sha1:case M.pki.oids.sha256:case M.pki.oids.sha384:case M.pki.oids.sha512:case M.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+u)}var l=r.authenticatedAttributes||[];if(l.length>0){for(var c=!1,f=!1,p=0;p<l.length;++p){var m=l[p];if(!c&&m.type===M.pki.oids.contentType){if(c=!0,f)break;continue}if(!f&&m.type===M.pki.oids.messageDigest){if(f=!0,c)break;continue}}if(!c||!f)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.")}e.signers.push({key:o,version:1,issuer:a,serialNumber:n,digestAlgorithm:u,signatureAlgorithm:M.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:l,unauthenticatedAttributes:[]})},sign:function(r){if(r=r||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(M.pki.oids.data).getBytes())]),"content"in e)){var a;e.content instanceof M.util.ByteBuffer?a=e.content.bytes():typeof e.content=="string"&&(a=M.util.encodeUtf8(e.content)),r.detached?e.detachedContent=x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,a):e.contentInfo.value.push(x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,a)]))}if(e.signers.length!==0){var n=t();i(n)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(r){typeof r=="string"&&(r=M.pki.certificateFromPem(r)),e.certificates.push(r)},addCertificateRevokationList:function(r){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var r={},a=0;a<e.signers.length;++a){var n=e.signers[a],s=n.digestAlgorithm;s in r||(r[s]=M.md[M.pki.oids[s]].create()),n.authenticatedAttributes.length===0?n.md=r[s]:n.md=M.md[M.pki.oids[s]].create()}e.digestAlgorithmIdentifiers=[];for(var s in r)e.digestAlgorithmIdentifiers.push(x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(s).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.NULL,!1,"")]));return r}function i(r){var a;if(e.detachedContent?a=e.detachedContent:(a=e.contentInfo.value[1],a=a.value[0]),!a)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var n=x.derToOid(e.contentInfo.value[0].value),s=x.toDer(a);s.getByte(),x.getBerValueLength(s),s=s.getBytes();for(var o in r)r[o].start().update(s);for(var u=new Date,l=0;l<e.signers.length;++l){var c=e.signers[l];if(c.authenticatedAttributes.length===0){if(n!==M.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{c.authenticatedAttributesAsn1=x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var f=x.create(x.Class.UNIVERSAL,x.Type.SET,!0,[]),p=0;p<c.authenticatedAttributes.length;++p){var m=c.authenticatedAttributes[p];m.type===M.pki.oids.messageDigest?m.value=r[c.digestAlgorithm].digest():m.type===M.pki.oids.signingTime&&(m.value||(m.value=u)),f.value.push(Ws(m)),c.authenticatedAttributesAsn1.value.push(Ws(m))}s=x.toDer(f).getBytes(),c.md.start().update(s)}c.signature=c.key.sign(c.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=Wm(e.signers)}};Ct.createEncryptedData=function(){var e=null;return e={type:M.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:M.pki.oids["aes256-CBC"]},fromAsn1:function(t){Xs(e,t,Ct.asn1.encryptedDataValidator)},decrypt:function(t){t!==void 0&&(e.encryptedContent.key=t),j0(e)}},e};Ct.createEnvelopedData=function(){var e=null;return e={type:M.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:M.pki.oids["aes256-CBC"]},fromAsn1:function(t){var i=Xs(e,t,Ct.asn1.envelopedDataValidator);e.recipients=Ym(i.recipientInfos.value)},toAsn1:function(){return x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(e.type).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,x.integerToDer(e.version).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.SET,!0,zm(e.recipients)),x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,Xm(e.encryptedContent))])])])},findRecipient:function(t){for(var i=t.issuer.attributes,r=0;r<e.recipients.length;++r){var a=e.recipients[r],n=a.issuer;if(a.serialNumber===t.serialNumber&&n.length===i.length){for(var s=!0,o=0;o<i.length;++o)if(n[o].type!==i[o].type||n[o].value!==i[o].value){s=!1;break}if(s)return a}}return null},decrypt:function(t,i){if(e.encryptedContent.key===void 0&&t!==void 0&&i!==void 0)switch(t.encryptedContent.algorithm){case M.pki.oids.rsaEncryption:case M.pki.oids.desCBC:var r=i.decrypt(t.encryptedContent.content);e.encryptedContent.key=M.util.createBuffer(r);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}j0(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:M.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,i){if(e.encryptedContent.content===void 0){i=i||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var r,a,n;switch(i){case M.pki.oids["aes128-CBC"]:r=16,a=16,n=M.aes.createEncryptionCipher;break;case M.pki.oids["aes192-CBC"]:r=24,a=16,n=M.aes.createEncryptionCipher;break;case M.pki.oids["aes256-CBC"]:r=32,a=16,n=M.aes.createEncryptionCipher;break;case M.pki.oids["des-EDE3-CBC"]:r=24,a=8,n=M.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+i)}if(t===void 0)t=M.util.createBuffer(M.random.getBytes(r));else if(t.length()!=r)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+r+".");e.encryptedContent.algorithm=i,e.encryptedContent.key=t,e.encryptedContent.parameter=M.util.createBuffer(M.random.getBytes(a));var s=n(t);if(s.start(e.encryptedContent.parameter.copy()),s.update(e.content),!s.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=s.output}for(var o=0;o<e.recipients.length;++o){var u=e.recipients[o];if(u.encryptedContent.content===void 0)switch(u.encryptedContent.algorithm){case M.pki.oids.rsaEncryption:u.encryptedContent.content=u.encryptedContent.key.encrypt(e.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+u.encryptedContent.algorithm)}}}},e};function Gm(e){var t={},i=[];if(!x.validate(e,Ct.asn1.recipientInfoValidator,t,i)){var r=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw r.errors=i,r}return{version:t.version.charCodeAt(0),issuer:M.pki.RDNAttributesAsArray(t.issuer),serialNumber:M.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:x.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function jm(e){return x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,x.integerToDer(e.version).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[M.pki.distinguishedNameToAsn1({attributes:e.issuer}),x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,M.util.hexToBytes(e.serialNumber))]),x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(e.encryptedContent.algorithm).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.NULL,!1,"")]),x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function Ym(e){for(var t=[],i=0;i<e.length;++i)t.push(Gm(e[i]));return t}function zm(e){for(var t=[],i=0;i<e.length;++i)t.push(jm(e[i]));return t}function Jm(e){var t=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,x.integerToDer(e.version).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[M.pki.distinguishedNameToAsn1({attributes:e.issuer}),x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,M.util.hexToBytes(e.serialNumber))]),x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(e.digestAlgorithm).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(e.signatureAlgorithm).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.NULL,!1,"")])),t.value.push(x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var i=x.create(x.Class.CONTEXT_SPECIFIC,1,!0,[]),r=0;r<e.unauthenticatedAttributes.length;++r){var a=e.unauthenticatedAttributes[r];i.values.push(Ws(a))}t.value.push(i)}return t}function Wm(e){for(var t=[],i=0;i<e.length;++i)t.push(Jm(e[i]));return t}function Ws(e){var t;if(e.type===M.pki.oids.contentType)t=x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(e.value).getBytes());else if(e.type===M.pki.oids.messageDigest)t=x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===M.pki.oids.signingTime){var i=new Date("1950-01-01T00:00:00Z"),r=new Date("2050-01-01T00:00:00Z"),a=e.value;if(typeof a=="string"){var n=Date.parse(a);isNaN(n)?a.length===13?a=x.utcTimeToDate(a):a=x.generalizedTimeToDate(a):a=new Date(n)}a>=i&&a<r?t=x.create(x.Class.UNIVERSAL,x.Type.UTCTIME,!1,x.dateToUtcTime(a)):t=x.create(x.Class.UNIVERSAL,x.Type.GENERALIZEDTIME,!1,x.dateToGeneralizedTime(a))}return x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(e.type).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.SET,!0,[t])])}function Xm(e){return[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(M.pki.oids.data).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(e.algorithm).getBytes()),e.parameter?x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,e.content.getBytes())])]}function Xs(e,t,i){var r={},a=[];if(!x.validate(t,i,r,a)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw n.errors=n,n}var s=x.derToOid(r.contentType);if(s!==M.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(r.encryptedContent){var o="";if(M.util.isArray(r.encryptedContent))for(var u=0;u<r.encryptedContent.length;++u){if(r.encryptedContent[u].type!==x.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");o+=r.encryptedContent[u].value}else o=r.encryptedContent;e.encryptedContent={algorithm:x.derToOid(r.encAlgorithm),parameter:M.util.createBuffer(r.encParameter.value),content:M.util.createBuffer(o)}}if(r.content){var o="";if(M.util.isArray(r.content))for(var u=0;u<r.content.length;++u){if(r.content[u].type!==x.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");o+=r.content[u].value}else o=r.content;e.content=M.util.createBuffer(o)}return e.version=r.version.charCodeAt(0),e.rawCapture=r,r}function j0(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case M.pki.oids["aes128-CBC"]:case M.pki.oids["aes192-CBC"]:case M.pki.oids["aes256-CBC"]:t=M.aes.createDecryptionCipher(e.encryptedContent.key);break;case M.pki.oids.desCBC:case M.pki.oids["des-EDE3-CBC"]:t=M.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}});var W0=F((tx,J0)=>{"use strict";S();var Me=oe();Ir();ai();Oa();ui();Ae();var un=J0.exports=Me.ssh=Me.ssh||{};un.privateKeyToPutty=function(e,t,i){i=i||"",t=t||"";var r="ssh-rsa",a=t===""?"none":"aes256-cbc",n="PuTTY-User-Key-File-2: "+r+`\r
|
|
23
|
-
`;n+="Encryption: "+a+`\r
|
|
24
|
-
`,n+="Comment: "+i+`\r
|
|
25
|
-
`;var s=Me.util.createBuffer();vi(s,r),ar(s,e.e),ar(s,e.n);var o=Me.util.encode64(s.bytes(),64),u=Math.floor(o.length/66)+1;n+="Public-Lines: "+u+`\r
|
|
26
|
-
`,n+=o;var l=Me.util.createBuffer();ar(l,e.d),ar(l,e.p),ar(l,e.q),ar(l,e.qInv);var c;if(!t)c=Me.util.encode64(l.bytes(),64);else{var f=l.length()+16-1;f-=f%16;var p=on(l.bytes());p.truncate(p.length()-f+l.length()),l.putBuffer(p);var m=Me.util.createBuffer();m.putBuffer(on("\0\0\0\0",t)),m.putBuffer(on("\0\0\0",t));var v=Me.aes.createEncryptionCipher(m.truncate(8),"CBC");v.start(Me.util.createBuffer().fillWithByte(0,16)),v.update(l.copy()),v.finish();var C=v.output;C.truncate(16),c=Me.util.encode64(C.bytes(),64)}u=Math.floor(c.length/66)+1,n+=`\r
|
|
27
|
-
Private-Lines: `+u+`\r
|
|
28
|
-
`,n+=c;var E=on("putty-private-key-file-mac-key",t),B=Me.util.createBuffer();vi(B,r),vi(B,a),vi(B,i),B.putInt32(s.length()),B.putBuffer(s),B.putInt32(l.length()),B.putBuffer(l);var w=Me.hmac.create();return w.start("sha1",E),w.update(B.bytes()),n+=`\r
|
|
29
|
-
Private-MAC: `+w.digest().toHex()+`\r
|
|
30
|
-
`,n};un.publicKeyToOpenSSH=function(e,t){var i="ssh-rsa";t=t||"";var r=Me.util.createBuffer();return vi(r,i),ar(r,e.e),ar(r,e.n),i+" "+Me.util.encode64(r.bytes())+" "+t};un.privateKeyToOpenSSH=function(e,t){return t?Me.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):Me.pki.privateKeyToPem(e)};un.getPublicKeyFingerprint=function(e,t){t=t||{};var i=t.md||Me.md.md5.create(),r="ssh-rsa",a=Me.util.createBuffer();vi(a,r),ar(a,e.e),ar(a,e.n),i.start(),i.update(a.getBytes());var n=i.digest();if(t.encoding==="hex"){var s=n.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return n.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return n};function ar(e,t){var i=t.toString(16);i[0]>="8"&&(i="00"+i);var r=Me.util.hexToBytes(i);e.putInt32(r.length),e.putBytes(r)}function vi(e,t){e.putInt32(t.length),e.putString(t)}function on(){for(var e=Me.md.sha1.create(),t=arguments.length,i=0;i<t;++i)e.update(arguments[i]);return e.digest()}});var $0=F((ix,X0)=>{"use strict";S();X0.exports=oe();Ir();y0();Gt();ka();Gi();P0();ai();V0();K0();G0();Ss();qa();Ur();ys();bs();z0();ws();As();ls();Ja();Pt();hs();W0();Ds();Ae()});var th=F(eh=>{"use strict";S();var Ie=$0();function Z0(e){var t=parseInt(e[0],16);return t<8?e:(t-=8,t.toString()+e.substring(1))}function $m(e){switch(e){case"sha256":return Ie.md.sha256.create();default:return Ie.md.sha1.create()}}eh.generate=function(t,i,r){typeof t=="function"?(r=t,t=void 0):typeof i=="function"&&(r=i,i={}),i=i||{};var a=function(o){var u=Ie.pki.createCertificate();u.serialNumber=Z0(Ie.util.bytesToHex(Ie.random.getBytesSync(9))),u.validity.notBefore=i.notBeforeDate||new Date;var l=new Date;u.validity.notAfter=l,u.validity.notAfter.setDate(l.getDate()+(i.days||365)),t=t||[{name:"commonName",value:"example.org"},{name:"countryName",value:"US"},{shortName:"ST",value:"Virginia"},{name:"localityName",value:"Blacksburg"},{name:"organizationName",value:"Test"},{shortName:"OU",value:"Test"}],u.setSubject(t),u.setIssuer(t),u.publicKey=o.publicKey,u.setExtensions(i.extensions||[{name:"basicConstraints",cA:!0},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},{name:"subjectAltName",altNames:[{type:6,value:"http://example.org/webid#me"}]}]),u.sign(o.privateKey,$m(i&&i.algorithm));let c=Ie.md.sha1.create().update(Ie.asn1.toDer(Ie.pki.certificateToAsn1(u)).getBytes()).digest().toHex().match(/.{2}/g).join(":");var f={private:Ie.pki.privateKeyToPem(o.privateKey),public:Ie.pki.publicKeyToPem(o.publicKey),cert:Ie.pki.certificateToPem(u),fingerprint:c};if(i&&i.pkcs7){var p=Ie.pkcs7.createSignedData();p.addCertificate(u),f.pkcs7=Ie.pkcs7.messageToPem(p)}if(i&&i.clientCertificate){var m=Ie.pki.rsa.generateKeyPair(i.clientCertificateKeySize||1024),v=Ie.pki.createCertificate();v.serialNumber=Z0(Ie.util.bytesToHex(Ie.random.getBytesSync(9))),v.validity.notBefore=new Date,v.validity.notAfter=new Date,v.validity.notAfter.setFullYear(v.validity.notBefore.getFullYear()+1);for(var C=JSON.parse(JSON.stringify(t)),E=0;E<C.length;E++)C[E].name==="commonName"&&(i.clientCertificateCN?C[E]={name:"commonName",value:i.clientCertificateCN}:C[E]={name:"commonName",value:"John Doe jdoe123"});if(v.setSubject(C),v.setIssuer(t),v.publicKey=m.publicKey,v.sign(o.privateKey),f.clientprivate=Ie.pki.privateKeyToPem(m.privateKey),f.clientpublic=Ie.pki.publicKeyToPem(m.publicKey),f.clientcert=Ie.pki.certificateToPem(v),i.pkcs7){var B=Ie.pkcs7.createSignedData();B.addCertificate(v),f.clientpkcs7=Ie.pkcs7.messageToPem(B)}}var w=Ie.pki.createCaStore();w.addCertificate(u);try{Ie.pki.verifyCertificateChain(w,[u],function(T,U,P){if(T!==!0)throw new Error("Certificate could not be verified.");return!0})}catch(T){throw new Error(T)}return f},n=i.keySize||1024;if(r)return Ie.pki.rsa.generateKeyPair({bits:n},function(o,u){if(o)return r(o);try{return r(null,a(u))}catch(l){return r(l)}});var s=i.keyPair?{privateKey:Ie.pki.privateKeyFromPem(i.keyPair.privateKey),publicKey:Ie.pki.publicKeyFromPem(i.keyPair.publicKey)}:Ie.pki.rsa.generateKeyPair(n);return a(s)}});S();S();S();S();var fh={},hn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(Ei=0;Ei<hn.length;Ei++)fh[hn.charCodeAt(Ei)]=Ei;var Ei;function ho(e){for(var t=0,i=0,r=0,a=0,n="",s=0;s<e.length;s++){var o=e[s];if(s>0&&(n+=";"),o.length!==0){for(var u=0,l=[],c=0,f=o;c<f.length;c++){var p=f[c],m=xi(p[0]-u);u=p[0],p.length>1&&(m+=xi(p[1]-t)+xi(p[2]-i)+xi(p[3]-r),t=p[1],i=p[2],r=p[3]),p.length===5&&(m+=xi(p[4]-a),a=p[4]),l.push(m)}n+=l.join(",")}}return n}function xi(e){var t="";e=e<0?-e<<1|1:e<<1;do{var i=e&31;e>>>=5,e>0&&(i|=32),t+=hn[i]}while(e>0);return t}var ia=function e(t){this.bits=t instanceof e?t.bits.slice():[]};ia.prototype.add=function(t){this.bits[t>>5]|=1<<(t&31)};ia.prototype.has=function(t){return!!(this.bits[t>>5]&1<<(t&31))};var ze=function(t,i,r){this.start=t,this.end=i,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=!1,this.edited=!1,Object.defineProperties(this,{previous:{writable:!0,value:null},next:{writable:!0,value:null}})};ze.prototype.appendLeft=function(t){this.outro+=t};ze.prototype.appendRight=function(t){this.intro=this.intro+t};ze.prototype.clone=function(){var t=new ze(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t};ze.prototype.contains=function(t){return this.start<t&&t<this.end};ze.prototype.eachNext=function(t){for(var i=this;i;)t(i),i=i.next};ze.prototype.eachPrevious=function(t){for(var i=this;i;)t(i),i=i.previous};ze.prototype.edit=function(t,i,r){return this.content=t,r||(this.intro="",this.outro=""),this.storeName=i,this.edited=!0,this};ze.prototype.prependLeft=function(t){this.outro=t+this.outro};ze.prototype.prependRight=function(t){this.intro=t+this.intro};ze.prototype.split=function(t){var i=t-this.start,r=this.original.slice(0,i),a=this.original.slice(i);this.original=r;var n=new ze(t,this.end,a);return n.outro=this.outro,this.outro="",this.end=t,this.edited?(n.edit("",!1),this.content=""):this.content=r,n.next=this.next,n.next&&(n.next.previous=n),n.previous=this,this.next=n,n};ze.prototype.toString=function(){return this.intro+this.content+this.outro};ze.prototype.trimEnd=function(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;var i=this.content.replace(t,"");if(i.length)return i!==this.content&&this.split(this.start+i.length).edit("",void 0,!0),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0};ze.prototype.trimStart=function(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;var i=this.content.replace(t,"");if(i.length)return i!==this.content&&(this.split(this.end-i.length),this.edit("",void 0,!0)),!0;if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0};var pn=function(){throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};typeof window<"u"&&typeof window.btoa=="function"?pn=function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer=="function"&&(pn=function(e){return Buffer.from(e,"utf-8").toString("base64")});var aa=function(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=ho(t.mappings)};aa.prototype.toString=function(){return JSON.stringify(this)};aa.prototype.toUrl=function(){return"data:application/json;charset=utf-8;base64,"+pn(this.toString())};function hh(e){var t=e.split(`
|
|
31
|
-
`),i=t.filter(function(n){return/^\t+/.test(n)}),r=t.filter(function(n){return/^ {2,}/.test(n)});if(i.length===0&&r.length===0)return null;if(i.length>=r.length)return" ";var a=r.reduce(function(n,s){var o=/^ +/.exec(s)[0].length;return Math.min(o,n)},1/0);return new Array(a+1).join(" ")}function go(e,t){var i=e.split(/[/\\]/),r=t.split(/[/\\]/);for(i.pop();i[0]===r[0];)i.shift(),r.shift();if(i.length)for(var a=i.length;a--;)i[a]="..";return i.concat(r).join("/")}var ph=Object.prototype.toString;function vo(e){return ph.call(e)==="[object Object]"}function dn(e){for(var t=e.split(`
|
|
32
|
-
`),i=[],r=0,a=0;r<t.length;r++)i.push(a),a+=t[r].length+1;return function(s){for(var o=0,u=i.length;o<u;){var l=o+u>>1;s<i[l]?u=l:o=l+1}var c=o-1,f=s-i[c];return{line:c,column:f}}}var Ii=function(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null};Ii.prototype.addEdit=function(t,i,r,a){if(i.length){var n=[this.generatedCodeColumn,t,r.line,r.column];a>=0&&n.push(a),this.rawSegments.push(n)}else this.pending&&this.rawSegments.push(this.pending);this.advance(i),this.pending=null};Ii.prototype.addUneditedChunk=function(t,i,r,a,n){for(var s=i.start,o=!0;s<i.end;)(this.hires||o||n.has(s))&&this.rawSegments.push([this.generatedCodeColumn,t,a.line,a.column]),r[s]===`
|
|
33
|
-
`?(a.line+=1,a.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0):(a.column+=1,this.generatedCodeColumn+=1,o=!1),s+=1;this.pending=null};Ii.prototype.advance=function(t){if(t){var i=t.split(`
|
|
34
|
-
`);if(i.length>1){for(var r=0;r<i.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=i[i.length-1].length}};var Si=`
|
|
35
|
-
`,Yr={insertLeft:!1,insertRight:!1,storeName:!1},ue=function(t,i){i===void 0&&(i={});var r=new ze(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:r},lastChunk:{writable:!0,value:r},lastSearchedChunk:{writable:!0,value:r},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:i.filename},indentExclusionRanges:{writable:!0,value:i.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new ia},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:hh(t)}}),this.byStart[0]=r,this.byEnd[t.length]=r};ue.prototype.addSourcemapLocation=function(t){this.sourcemapLocations.add(t)};ue.prototype.append=function(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this};ue.prototype.appendLeft=function(t,i){if(typeof i!="string")throw new TypeError("inserted content must be a string");this._split(t);var r=this.byEnd[t];return r?r.appendLeft(i):this.intro+=i,this};ue.prototype.appendRight=function(t,i){if(typeof i!="string")throw new TypeError("inserted content must be a string");this._split(t);var r=this.byStart[t];return r?r.appendRight(i):this.outro+=i,this};ue.prototype.clone=function(){for(var t=new ue(this.original,{filename:this.filename}),i=this.firstChunk,r=t.firstChunk=t.lastSearchedChunk=i.clone();i;){t.byStart[r.start]=r,t.byEnd[r.end]=r;var a=i.next,n=a&&a.clone();n&&(r.next=n,n.previous=r,r=n),i=a}return t.lastChunk=r,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new ia(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t};ue.prototype.generateDecodedMap=function(t){var i=this;t=t||{};var r=0,a=Object.keys(this.storedNames),n=new Ii(t.hires),s=dn(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext(function(o){var u=s(o.start);o.intro.length&&n.advance(o.intro),o.edited?n.addEdit(r,o.content,u,o.storeName?a.indexOf(o.original):-1):n.addUneditedChunk(r,o,i.original,u,i.sourcemapLocations),o.outro.length&&n.advance(o.outro)}),{file:t.file?t.file.split(/[/\\]/).pop():null,sources:[t.source?go(t.file||"",t.source):null],sourcesContent:t.includeContent?[this.original]:[null],names:a,mappings:n.raw}};ue.prototype.generateMap=function(t){return new aa(this.generateDecodedMap(t))};ue.prototype.getIndentString=function(){return this.indentStr===null?" ":this.indentStr};ue.prototype.indent=function(t,i){var r=/^[^\r\n]/gm;if(vo(t)&&(i=t,t=void 0),t=t!==void 0?t:this.indentStr||" ",t==="")return this;i=i||{};var a={};if(i.exclude){var n=typeof i.exclude[0]=="number"?[i.exclude]:i.exclude;n.forEach(function(p){for(var m=p[0];m<p[1];m+=1)a[m]=!0})}var s=i.indentStart!==!1,o=function(p){return s?""+t+p:(s=!0,p)};this.intro=this.intro.replace(r,o);for(var u=0,l=this.firstChunk;l;){var c=l.end;if(l.edited)a[u]||(l.content=l.content.replace(r,o),l.content.length&&(s=l.content[l.content.length-1]===`
|
|
36
|
-
`));else for(u=l.start;u<c;){if(!a[u]){var f=this.original[u];f===`
|
|
37
|
-
`?s=!0:f!=="\r"&&s&&(s=!1,u===l.start||(this._splitChunk(l,u),l=l.next),l.prependRight(t))}u+=1}u=l.end,l=l.next}return this.outro=this.outro.replace(r,o),this};ue.prototype.insert=function(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")};ue.prototype.insertLeft=function(t,i){return Yr.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),Yr.insertLeft=!0),this.appendLeft(t,i)};ue.prototype.insertRight=function(t,i){return Yr.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),Yr.insertRight=!0),this.prependRight(t,i)};ue.prototype.move=function(t,i,r){if(r>=t&&r<=i)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(i),this._split(r);var a=this.byStart[t],n=this.byEnd[i],s=a.previous,o=n.next,u=this.byStart[r];if(!u&&n===this.lastChunk)return this;var l=u?u.previous:this.lastChunk;return s&&(s.next=o),o&&(o.previous=s),l&&(l.next=a),u&&(u.previous=n),a.previous||(this.firstChunk=n.next),n.next||(this.lastChunk=a.previous,this.lastChunk.next=null),a.previous=l,n.next=u||null,l||(this.firstChunk=a),u||(this.lastChunk=n),this};ue.prototype.overwrite=function(t,i,r,a){if(typeof r!="string")throw new TypeError("replacement content must be a string");for(;t<0;)t+=this.original.length;for(;i<0;)i+=this.original.length;if(i>this.original.length)throw new Error("end is out of bounds");if(t===i)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(i),a===!0&&(Yr.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),Yr.storeName=!0),a={storeName:!0});var n=a!==void 0?a.storeName:!1,s=a!==void 0?a.contentOnly:!1;if(n){var o=this.original.slice(t,i);Object.defineProperty(this.storedNames,o,{writable:!0,value:!0,enumerable:!0})}var u=this.byStart[t],l=this.byEnd[i];if(u){for(var c=u;c!==l;){if(c.next!==this.byStart[c.end])throw new Error("Cannot overwrite across a split point");c=c.next,c.edit("",!1)}u.edit(r,n,s)}else{var f=new ze(t,i,"").edit(r,n);l.next=f,f.previous=l}return this};ue.prototype.prepend=function(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this};ue.prototype.prependLeft=function(t,i){if(typeof i!="string")throw new TypeError("inserted content must be a string");this._split(t);var r=this.byEnd[t];return r?r.prependLeft(i):this.intro=i+this.intro,this};ue.prototype.prependRight=function(t,i){if(typeof i!="string")throw new TypeError("inserted content must be a string");this._split(t);var r=this.byStart[t];return r?r.prependRight(i):this.outro=i+this.outro,this};ue.prototype.remove=function(t,i){for(;t<0;)t+=this.original.length;for(;i<0;)i+=this.original.length;if(t===i)return this;if(t<0||i>this.original.length)throw new Error("Character is out of bounds");if(t>i)throw new Error("end must be greater than start");this._split(t),this._split(i);for(var r=this.byStart[t];r;)r.intro="",r.outro="",r.edit(""),r=i>r.end?this.byStart[r.end]:null;return this};ue.prototype.lastChar=function(){if(this.outro.length)return this.outro[this.outro.length-1];var t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""};ue.prototype.lastLine=function(){var t=this.outro.lastIndexOf(Si);if(t!==-1)return this.outro.substr(t+1);var i=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(t=r.outro.lastIndexOf(Si),t!==-1)return r.outro.substr(t+1)+i;i=r.outro+i}if(r.content.length>0){if(t=r.content.lastIndexOf(Si),t!==-1)return r.content.substr(t+1)+i;i=r.content+i}if(r.intro.length>0){if(t=r.intro.lastIndexOf(Si),t!==-1)return r.intro.substr(t+1)+i;i=r.intro+i}}while(r=r.previous);return t=this.intro.lastIndexOf(Si),t!==-1?this.intro.substr(t+1)+i:this.intro+i};ue.prototype.slice=function(t,i){for(t===void 0&&(t=0),i===void 0&&(i=this.original.length);t<0;)t+=this.original.length;for(;i<0;)i+=this.original.length;for(var r="",a=this.firstChunk;a&&(a.start>t||a.end<=t);){if(a.start<i&&a.end>=i)return r;a=a.next}if(a&&a.edited&&a.start!==t)throw new Error("Cannot use replaced character "+t+" as slice start anchor.");for(var n=a;a;){a.intro&&(n!==a||a.start===t)&&(r+=a.intro);var s=a.start<i&&a.end>=i;if(s&&a.edited&&a.end!==i)throw new Error("Cannot use replaced character "+i+" as slice end anchor.");var o=n===a?t-a.start:0,u=s?a.content.length+i-a.end:a.content.length;if(r+=a.content.slice(o,u),a.outro&&(!s||a.end===i)&&(r+=a.outro),s)break;a=a.next}return r};ue.prototype.snip=function(t,i){var r=this.clone();return r.remove(0,t),r.remove(i,r.original.length),r};ue.prototype._split=function(t){if(!(this.byStart[t]||this.byEnd[t]))for(var i=this.lastSearchedChunk,r=t>i.end;i;){if(i.contains(t))return this._splitChunk(i,t);i=r?this.byStart[i.end]:this.byEnd[i.start]}};ue.prototype._splitChunk=function(t,i){if(t.edited&&t.content.length){var r=dn(this.original)(i);throw new Error("Cannot split a chunk that has already been edited ("+r.line+":"+r.column+' \u2013 "'+t.original+'")')}var a=t.split(i);return this.byEnd[i]=t,this.byStart[i]=a,this.byEnd[a.end]=a,t===this.lastChunk&&(this.lastChunk=a),this.lastSearchedChunk=t,!0};ue.prototype.toString=function(){for(var t=this.intro,i=this.firstChunk;i;)t+=i.toString(),i=i.next;return t+this.outro};ue.prototype.isEmpty=function(){var t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0};ue.prototype.length=function(){var t=this.firstChunk,i=0;do i+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return i};ue.prototype.trimLines=function(){return this.trim("[\\r\\n]")};ue.prototype.trim=function(t){return this.trimStart(t).trimEnd(t)};ue.prototype.trimEndAborted=function(t){var i=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(i,""),this.outro.length)return!0;var r=this.lastChunk;do{var a=r.end,n=r.trimEnd(i);if(r.end!==a&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),n)return!0;r=r.previous}while(r);return!1};ue.prototype.trimEnd=function(t){return this.trimEndAborted(t),this};ue.prototype.trimStartAborted=function(t){var i=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(i,""),this.intro.length)return!0;var r=this.firstChunk;do{var a=r.end,n=r.trimStart(i);if(r.end!==a&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),n)return!0;r=r.next}while(r);return!1};ue.prototype.trimStart=function(t){return this.trimStartAborted(t),this};var po=Object.prototype.hasOwnProperty,ht=function(t){t===void 0&&(t={}),this.intro=t.intro||"",this.separator=t.separator!==void 0?t.separator:`
|
|
38
|
-
`,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}};ht.prototype.addSource=function(t){if(t instanceof ue)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!vo(t)||!t.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","indentExclusionRanges","separator"].forEach(function(r){po.call(t,r)||(t[r]=t.content[r])}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!po.call(this.uniqueSourceIndexByFilename,t.filename))this.uniqueSourceIndexByFilename[t.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:t.filename,content:t.content.original});else{var i=this.uniqueSources[this.uniqueSourceIndexByFilename[t.filename]];if(t.content.original!==i.content)throw new Error("Illegal source: same filename ("+t.filename+"), different contents")}return this.sources.push(t),this};ht.prototype.append=function(t,i){return this.addSource({content:new ue(t),separator:i&&i.separator||""}),this};ht.prototype.clone=function(){var t=new ht({intro:this.intro,separator:this.separator});return this.sources.forEach(function(i){t.addSource({filename:i.filename,content:i.content.clone(),separator:i.separator})}),t};ht.prototype.generateDecodedMap=function(t){var i=this;t===void 0&&(t={});var r=[];this.sources.forEach(function(n){Object.keys(n.content.storedNames).forEach(function(s){~r.indexOf(s)||r.push(s)})});var a=new Ii(t.hires);return this.intro&&a.advance(this.intro),this.sources.forEach(function(n,s){s>0&&a.advance(i.separator);var o=n.filename?i.uniqueSourceIndexByFilename[n.filename]:-1,u=n.content,l=dn(u.original);u.intro&&a.advance(u.intro),u.firstChunk.eachNext(function(c){var f=l(c.start);c.intro.length&&a.advance(c.intro),n.filename?c.edited?a.addEdit(o,c.content,f,c.storeName?r.indexOf(c.original):-1):a.addUneditedChunk(o,c,u.original,f,u.sourcemapLocations):a.advance(c.content),c.outro.length&&a.advance(c.outro)}),u.outro&&a.advance(u.outro)}),{file:t.file?t.file.split(/[/\\]/).pop():null,sources:this.uniqueSources.map(function(n){return t.file?go(t.file,n.filename):n.filename}),sourcesContent:this.uniqueSources.map(function(n){return t.includeContent?n.content:null}),names:r,mappings:a.raw}};ht.prototype.generateMap=function(t){return new aa(this.generateDecodedMap(t))};ht.prototype.getIndentString=function(){var t={};return this.sources.forEach(function(i){var r=i.content.indentStr;r!==null&&(t[r]||(t[r]=0),t[r]+=1)}),Object.keys(t).sort(function(i,r){return t[i]-t[r]})[0]||" "};ht.prototype.indent=function(t){var i=this;if(arguments.length||(t=this.getIndentString()),t==="")return this;var r=!this.intro||this.intro.slice(-1)===`
|
|
39
|
-
`;return this.sources.forEach(function(a,n){var s=a.separator!==void 0?a.separator:i.separator,o=r||n>0&&/\r?\n$/.test(s);a.content.indent(t,{exclude:a.indentExclusionRanges,indentStart:o}),r=a.content.lastChar()===`
|
|
40
|
-
`}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,function(a,n){return n>0?t+a:a})),this};ht.prototype.prepend=function(t){return this.intro=t+this.intro,this};ht.prototype.toString=function(){var t=this,i=this.sources.map(function(r,a){var n=r.separator!==void 0?r.separator:t.separator,s=(a>0?n:"")+r.content.toString();return s}).join("");return this.intro+i};ht.prototype.isEmpty=function(){return!(this.intro.length&&this.intro.trim()||this.sources.some(function(t){return!t.content.isEmpty()}))};ht.prototype.length=function(){return this.sources.reduce(function(t,i){return t+i.content.length()},this.intro.length)};ht.prototype.trimLines=function(){return this.trim("[\\r\\n]")};ht.prototype.trim=function(t){return this.trimStart(t).trimEnd(t)};ht.prototype.trimStart=function(t){var i=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(i,""),!this.intro){var r,a=0;do if(r=this.sources[a++],!r)break;while(!r.content.trimStartAborted(t))}return this};ht.prototype.trimEnd=function(t){var i=new RegExp((t||"\\s")+"+$"),r,a=this.sources.length-1;do if(r=this.sources[a--],!r){this.intro=this.intro.replace(i,"");break}while(!r.content.trimEndAborted(t));return this};S();var dh=new Uint8Array(new Uint16Array([1]).buffer)[0]===1;function vn(e,t="@"){if(!Re)return yn.then(()=>vn(e));let i=e.length+1,r=(Re.__heap_base.value||Re.__heap_base)+4*i-Re.memory.buffer.byteLength;r>0&&Re.memory.grow(Math.ceil(r/65536));let a=Re.sa(i-1);if((dh?vh:gh)(e,new Uint16Array(Re.memory.buffer,a,i)),!Re.parse())throw Object.assign(new Error(`Parse error ${t}:${e.slice(0,Re.e()).split(`
|
|
41
|
-
`).length}:${Re.e()-e.lastIndexOf(`
|
|
42
|
-
`,Re.e()-1)}`),{idx:Re.e()});let n=[],s=[];for(;Re.ri();){let u=Re.is(),l=Re.ie(),c;Re.ip()&&(c=o(e.slice(u-1,l+1))),n.push({n:c,s:u,e:l,ss:Re.ss(),se:Re.se(),d:Re.id()})}for(;Re.re();)s.push(e.slice(Re.es(),Re.ee()));function o(u){try{return(0,eval)(u)}catch{}}return[n,s,!!Re.f()]}function gh(e,t){let i=e.length,r=0;for(;r<i;){let a=e.charCodeAt(r);t[r++]=(255&a)<<8|a>>>8}}function vh(e,t){let i=e.length,r=0;for(;r<i;)t[r]=e.charCodeAt(r++)}var Re,yn=WebAssembly.compile((gn="AGFzbQEAAAABWAxgAX8Bf2AEf39/fwBgAn9/AGAAAX9gAABgBn9/f39/fwF/YAR/f39/AX9gA39/fwF/YAd/f39/f39/AX9gBX9/f39/AX9gAn9/AX9gCH9/f39/f39/AX8DMC8AAQIDAwMDAwMDAwMDAwMABAQABQQEAAAAAAQEBAQEAAUGBwgJCgsDAgAACgMICwQFAXABAQEFAwEAAQYPAn8BQfDwAAt/AEHw8AALB18QBm1lbW9yeQIAAnNhAAABZQADAmlzAAQCaWUABQJzcwAGAnNlAAcCaWQACAJpcAAJAmVzAAoCZWUACwJyaQAMAnJlAA0BZgAOBXBhcnNlAA8LX19oZWFwX2Jhc2UDAQrbNC9oAQF/QQAgADYCtAhBACgCkAgiASAAQQF0aiIAQQA7AQBBACAAQQJqIgA2ArgIQQAgADYCvAhBAEEANgKUCEEAQQA2AqQIQQBBADYCnAhBAEEANgKYCEEAQQA2AqwIQQBBADYCoAggAQurAQECf0EAKAKkCCIEQRhqQZQIIAQbQQAoArwIIgU2AgBBACAFNgKkCEEAIAQ2AqgIQQAgBUEcajYCvAggBSAANgIIAkACQEEAKAKICCADRw0AIAUgAjYCDAwBCwJAQQAoAoQIIANHDQAgBSACQQJqNgIMDAELIAVBACgCkAg2AgwLIAUgATYCACAFIAM2AhAgBSACNgIEIAVBADYCGCAFQQAoAoQIIANGOgAUC0gBAX9BACgCrAgiAkEIakGYCCACG0EAKAK8CCICNgIAQQAgAjYCrAhBACACQQxqNgK8CCACQQA2AgggAiABNgIEIAIgADYCAAsIAEEAKALACAsVAEEAKAKcCCgCAEEAKAKQCGtBAXULFQBBACgCnAgoAgRBACgCkAhrQQF1CxUAQQAoApwIKAIIQQAoApAIa0EBdQsVAEEAKAKcCCgCDEEAKAKQCGtBAXULOwEBfwJAQQAoApwIKAIQIgBBACgChAhHDQBBfw8LAkAgAEEAKAKICEcNAEF+DwsgAEEAKAKQCGtBAXULCwBBACgCnAgtABQLFQBBACgCoAgoAgBBACgCkAhrQQF1CxUAQQAoAqAIKAIEQQAoApAIa0EBdQslAQF/QQBBACgCnAgiAEEYakGUCCAAGygCACIANgKcCCAAQQBHCyUBAX9BAEEAKAKgCCIAQQhqQZgIIAAbKAIAIgA2AqAIIABBAEcLCABBAC0AxAgLhQwBBX8jAEGA8ABrIgEkAEEAQQE6AMQIQQBB//8DOwHKCEEAQQAoAowINgLMCEEAQQAoApAIQX5qIgI2AuAIQQAgAkEAKAK0CEEBdGoiAzYC5AhBAEEAOwHGCEEAQQA7AcgIQQBBADoA0AhBAEEANgLACEEAQQA6ALAIQQAgAUGA0ABqNgLUCEEAIAFBgBBqNgLYCEEAQQA6ANwIAkACQAJAA0BBACACQQJqIgQ2AuAIAkACQAJAAkAgAiADTw0AIAQvAQAiA0F3akEFSQ0DIANBm39qIgVBBE0NASADQSBGDQMCQCADQS9GDQAgA0E7Rg0DDAYLAkAgAi8BBCIEQSpGDQAgBEEvRw0GEBAMBAsQEQwDC0EAIQMgBCECQQAtALAIDQYMBQsCQAJAIAUOBQEFBQUAAQsgBBASRQ0BIAJBBGpB7QBB8ABB7wBB8gBB9AAQE0UNARAUDAELQQAvAcgIDQAgBBASRQ0AIAJBBGpB+ABB8ABB7wBB8gBB9AAQE0UNABAVQQAtAMQIDQBBAEEAKALgCCICNgLMCAwEC0EAQQAoAuAINgLMCAtBACgC5AghA0EAKALgCCECDAALC0EAIAI2AuAIQQBBADoAxAgLA0BBACACQQJqIgM2AuAIAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAJBACgC5AhPDQAgAy8BACIEQXdqQQVJDQ4gBEFgaiIFQQlNDQEgBEGgf2oiBUEJTQ0CAkACQAJAIARBhX9qIgNBAk0NACAEQS9HDRAgAi8BBCICQSpGDQEgAkEvRw0CEBAMEQsCQAJAIAMOAwARAQALAkBBACgCzAgiBC8BAEEpRw0AQQAoAqQIIgJFDQAgAigCBCAERw0AQQBBACgCqAgiAjYCpAgCQCACRQ0AIAJBADYCGAwBC0EAQQA2ApQICyABQQAvAcgIIgJqQQAtANwIOgAAQQAgAkEBajsByAhBACgC2AggAkECdGogBDYCAEEAQQA6ANwIDBALQQAvAcgIIgJFDQlBACACQX9qIgM7AcgIAkAgAkEALwHKCCIERw0AQQBBAC8BxghBf2oiAjsBxghBAEEAKALUCCACQf//A3FBAXRqLwEAOwHKCAwICyAEQf//A0YNDyADQf//A3EgBEkNCQwPCxARDA8LAkACQAJAAkBBACgCzAgiBC8BACICEBZFDQAgAkFVaiIDQQNLDQICQAJAAkAgAw4EAQUCAAELIARBfmovAQBBUGpB//8DcUEKSQ0DDAQLIARBfmovAQBBK0YNAgwDCyAEQX5qLwEAQS1GDQEMAgsCQCACQf0ARg0AIAJBKUcNAUEAKALYCEEALwHICEECdGooAgAQF0UNAQwCC0EAKALYCEEALwHICCIDQQJ0aigCABAYDQEgASADai0AAA0BCyAEEBkNACACRQ0AQQEhBCACQS9GQQAtANAIQQBHcUUNAQsQGkEAIQQLQQAgBDoA0AgMDQtBAC8ByghB//8DRkEALwHICEVxQQAtALAIRXEhAwwPCyAFDgoMCwELCwsLAgcEDAsgBQ4KAgoKBwoJCgoKCAILEBsMCQsQHAwICxAdDAcLQQAvAcgIIgINAQsQHkEAIQMMCAtBACACQX9qIgQ7AcgIQQAoAqQIIgJFDQQgAigCEEEAKALYCCAEQf//A3FBAnRqKAIARw0EIAIgAzYCBAwEC0EAQQAvAcgIIgJBAWo7AcgIQQAoAtgIIAJBAnRqQQAoAswINgIADAMLIAMQEkUNAiACLwEKQfMARw0CIAIvAQhB8wBHDQIgAi8BBkHhAEcNAiACLwEEQewARw0CAkACQCACLwEMIgRBd2oiAkEXSw0AQQEgAnRBn4CABHENAQsgBEGgAUcNAwtBAEEBOgDcCAwCCyADEBJFDQEgAkEEakHtAEHwAEHvAEHyAEH0ABATRQ0BEBQMAQtBAC8ByAgNACADEBJFDQAgAkEEakH4AEHwAEHvAEHyAEH0ABATRQ0AEBULQQBBACgC4Ag2AswIC0EAKALgCCECDAALCyABQYDwAGokACADC1ABBH9BACgC4AhBAmohAEEAKALkCCEBAkADQCAAIgJBfmogAU8NASACQQJqIQAgAi8BAEF2aiIDQQNLDQAgAw4EAQAAAQELC0EAIAI2AuAIC3cBAn9BAEEAKALgCCIAQQJqNgLgCCAAQQZqIQBBACgC5AghAQNAAkACQAJAIABBfGogAU8NACAAQX5qLwEAQSpHDQIgAC8BAEEvRw0CQQAgAEF+ajYC4AgMAQsgAEF+aiEAC0EAIAA2AuAIDwsgAEECaiEADAALCx0AAkBBACgCkAggAEcNAEEBDwsgAEF+ai8BABAfCz8BAX9BACEGAkAgAC8BCCAFRw0AIAAvAQYgBEcNACAALwEEIANHDQAgAC8BAiACRw0AIAAvAQAgAUYhBgsgBgv3AwEEf0EAQQAoAuAIIgBBDGoiATYC4AgCQAJAAkACQAJAECciAkFZaiIDQQdNDQAgAkEiRg0CIAJB+wBGDQIMAQsCQAJAIAMOCAMBAgMCAgIAAwtBAEEAKALgCEECajYC4AgQJ0HtAEcNA0EAKALgCCIDLwEGQeEARw0DIAMvAQRB9ABHDQMgAy8BAkHlAEcNA0EAKALMCC8BAEEuRg0DIAAgACADQQhqQQAoAogIEAEPC0EAKALYCEEALwHICCIDQQJ0aiAANgIAQQAgA0EBajsByAhBACgCzAgvAQBBLkYNAiAAQQAoAuAIQQJqQQAgABABQQBBACgC4AhBAmo2AuAIAkACQBAnIgNBIkYNAAJAIANBJ0cNABAcDAILQQBBACgC4AhBfmo2AuAIDwsQGwtBAEEAKALgCEECajYC4AgCQBAnQSlHDQBBACgCpAgiA0EBOgAUIANBACgC4Ag2AgRBAEEALwHICEF/ajsByAgPC0EAQQAoAuAIQX5qNgLgCA8LQQAoAuAIIAFGDQELQQAvAcgIDQFBACgC4AghA0EAKALkCCEBAkADQCADIAFPDQECQAJAIAMvAQAiAkEnRg0AIAJBIkcNAQsgACACECgPC0EAIANBAmoiAzYC4AgMAAsLEB4LDwtBAEEAKALgCEF+ajYC4AgLmAYBBH9BAEEAKALgCCIAQQxqIgE2AuAIECchAgJAAkACQAJAAkACQEEAKALgCCIDIAFHDQAgAhApRQ0BCwJAAkACQAJAIAJBn39qIgFBC00NAAJAAkAgAkEqRg0AIAJB9gBGDQUgAkH7AEcNA0EAIANBAmo2AuAIECchA0EAKALgCCEBA0AgA0H//wNxECoaQQAoAuAIIQIQJxoCQCABIAIQKyIDQSxHDQBBAEEAKALgCEECajYC4AgQJyEDC0EAKALgCCECAkAgA0H9AEYNACACIAFGDQwgAiEBIAJBACgC5AhNDQEMDAsLQQAgAkECajYC4AgMAQtBACADQQJqNgLgCBAnGkEAKALgCCICIAIQKxoLECchAgwBCyABDgwEAAEGAAUAAAAAAAIEC0EAKALgCCEDAkAgAkHmAEcNACADLwEGQe0ARw0AIAMvAQRB7wBHDQAgAy8BAkHyAEcNAEEAIANBCGo2AuAIIAAQJxAoDwtBACADQX5qNgLgCAwCCwJAIAMvAQhB8wBHDQAgAy8BBkHzAEcNACADLwEEQeEARw0AIAMvAQJB7ABHDQAgAy8BChAfRQ0AQQAgA0EKajYC4AgQJyECQQAoAuAIIQMgAhAqGiADQQAoAuAIEAJBAEEAKALgCEF+ajYC4AgPC0EAIANBBGoiAzYC4AgLQQAgA0EEaiICNgLgCEEAQQA6AMQIA0BBACACQQJqNgLgCBAnIQNBACgC4AghAgJAIAMQKkEgckH7AEcNAEEAQQAoAuAIQX5qNgLgCA8LQQAoAuAIIgMgAkYNASACIAMQAgJAECciAkEsRg0AAkAgAkE9Rw0AQQBBACgC4AhBfmo2AuAIDwtBAEEAKALgCEF+ajYC4AgPC0EAKALgCCECDAALCw8LQQAgA0EKajYC4AgQJxpBACgC4AghAwtBACADQRBqNgLgCAJAECciAkEqRw0AQQBBACgC4AhBAmo2AuAIECchAgtBACgC4AghAyACECoaIANBACgC4AgQAkEAQQAoAuAIQX5qNgLgCA8LIAMgA0EOahACDwsQHgt1AQF/AkACQCAAQV9qIgFBBUsNAEEBIAF0QTFxDQELIABBRmpB//8DcUEGSQ0AIABBWGpB//8DcUEHSSAAQSlHcQ0AAkAgAEGlf2oiAUEDSw0AIAEOBAEAAAEBCyAAQf0ARyAAQYV/akH//wNxQQRJcQ8LQQELPQEBf0EBIQECQCAAQfcAQegAQekAQewAQeUAECANACAAQeYAQe8AQfIAECENACAAQekAQeYAECIhAQsgAQutAQEDf0EBIQECQAJAAkACQAJAAkACQCAALwEAIgJBRWoiA0EDTQ0AIAJBm39qIgNBA00NASACQSlGDQMgAkH5AEcNAiAAQX5qQeYAQekAQe4AQeEAQewAQewAECMPCyADDgQCAQEFAgsgAw4EAgAAAwILQQAhAQsgAQ8LIABBfmpB5QBB7ABB8wAQIQ8LIABBfmpB4wBB4QBB9ABB4wAQJA8LIABBfmovAQBBPUYL7QMBAn9BACEBAkAgAC8BAEGcf2oiAkETSw0AAkACQAJAAkACQAJAAkACQCACDhQAAQIICAgICAgIAwQICAUIBggIBwALIABBfmovAQBBl39qIgJBA0sNBwJAAkAgAg4EAAkJAQALIABBfGpB9gBB7wAQIg8LIABBfGpB+QBB6QBB5QAQIQ8LIABBfmovAQBBjX9qIgJBAUsNBgJAAkAgAg4CAAEACwJAIABBfGovAQAiAkHhAEYNACACQewARw0IIABBempB5QAQJQ8LIABBempB4wAQJQ8LIABBfGpB5ABB5QBB7ABB5QAQJA8LIABBfmovAQBB7wBHDQUgAEF8ai8BAEHlAEcNBQJAIABBemovAQAiAkHwAEYNACACQeMARw0GIABBeGpB6QBB7gBB8wBB9ABB4QBB7gAQIw8LIABBeGpB9ABB+QAQIg8LQQEhASAAQX5qIgBB6QAQJQ0EIABB8gBB5QBB9ABB9QBB8gAQIA8LIABBfmpB5AAQJQ8LIABBfmpB5ABB5QBB4gBB9QBB5wBB5wBB5QAQJg8LIABBfmpB4QBB9wBB4QBB6QAQJA8LAkAgAEF+ai8BACICQe8ARg0AIAJB5QBHDQEgAEF8akHuABAlDwsgAEF8akH0AEHoAEHyABAhIQELIAELgwEBA38DQEEAQQAoAuAIIgBBAmoiATYC4AgCQAJAAkAgAEEAKALkCE8NACABLwEAIgFBpX9qIgJBAU0NAgJAIAFBdmoiAEEDTQ0AIAFBL0cNBAwCCyAADgQAAwMAAAsQHgsPCwJAAkAgAg4CAQABC0EAIABBBGo2AuAIDAELECwaDAALC5EBAQR/QQAoAuAIIQBBACgC5AghAQJAA0AgACICQQJqIQAgAiABTw0BAkAgAC8BACIDQdwARg0AAkAgA0F2aiICQQNNDQAgA0EiRw0CQQAgADYC4AgPCyACDgQCAQECAgsgAkEEaiEAIAIvAQRBDUcNACACQQZqIAAgAi8BBkEKRhshAAwACwtBACAANgLgCBAeC5EBAQR/QQAoAuAIIQBBACgC5AghAQJAA0AgACICQQJqIQAgAiABTw0BAkAgAC8BACIDQdwARg0AAkAgA0F2aiICQQNNDQAgA0EnRw0CQQAgADYC4AgPCyACDgQCAQECAgsgAkEEaiEAIAIvAQRBDUcNACACQQZqIAAgAi8BBkEKRhshAAwACwtBACAANgLgCBAeC8kBAQV/QQAoAuAIIQBBACgC5AghAQNAIAAiAkECaiEAAkACQCACIAFPDQAgAC8BACIDQaR/aiIEQQRNDQEgA0EkRw0CIAIvAQRB+wBHDQJBAEEALwHGCCIAQQFqOwHGCEEAKALUCCAAQQF0akEALwHKCDsBAEEAIAJBBGo2AuAIQQBBAC8ByAhBAWoiADsByghBACAAOwHICA8LQQAgADYC4AgQHg8LAkACQCAEDgUBAgICAAELQQAgADYC4AgPCyACQQRqIQAMAAsLNQEBf0EAQQE6ALAIQQAoAuAIIQBBAEEAKALkCEECajYC4AhBACAAQQAoApAIa0EBdTYCwAgLNAEBf0EBIQECQCAAQXdqQf//A3FBBUkNACAAQYABckGgAUYNACAAQS5HIAAQKXEhAQsgAQtJAQN/QQAhBgJAIABBeGoiB0EAKAKQCCIISQ0AIAcgASACIAMgBCAFEBNFDQACQCAHIAhHDQBBAQ8LIABBdmovAQAQHyEGCyAGC1kBA39BACEEAkAgAEF8aiIFQQAoApAIIgZJDQAgAC8BACADRw0AIABBfmovAQAgAkcNACAFLwEAIAFHDQACQCAFIAZHDQBBAQ8LIABBemovAQAQHyEECyAEC0wBA39BACEDAkAgAEF+aiIEQQAoApAIIgVJDQAgAC8BACACRw0AIAQvAQAgAUcNAAJAIAQgBUcNAEEBDwsgAEF8ai8BABAfIQMLIAMLSwEDf0EAIQcCQCAAQXZqIghBACgCkAgiCUkNACAIIAEgAiADIAQgBSAGEC1FDQACQCAIIAlHDQBBAQ8LIABBdGovAQAQHyEHCyAHC2YBA39BACEFAkAgAEF6aiIGQQAoApAIIgdJDQAgAC8BACAERw0AIABBfmovAQAgA0cNACAAQXxqLwEAIAJHDQAgBi8BACABRw0AAkAgBiAHRw0AQQEPCyAAQXhqLwEAEB8hBQsgBQs9AQJ/QQAhAgJAQQAoApAIIgMgAEsNACAALwEAIAFHDQACQCADIABHDQBBAQ8LIABBfmovAQAQHyECCyACC00BA39BACEIAkAgAEF0aiIJQQAoApAIIgpJDQAgCSABIAIgAyAEIAUgBiAHEC5FDQACQCAJIApHDQBBAQ8LIABBcmovAQAQHyEICyAIC3YBA39BACgC4AghAAJAA0ACQCAALwEAIgFBd2pBBUkNACABQSBGDQAgAUGgAUYNACABQS9HDQICQCAALwECIgBBKkYNACAAQS9HDQMQEAwBCxARC0EAQQAoAuAIIgJBAmoiADYC4AggAkEAKALkCEkNAAsLIAELWAACQAJAIAFBIkYNACABQSdHDQFBACgC4AghARAcIAAgAUECakEAKALgCEEAKAKECBABDwtBACgC4AghARAbIAAgAUECakEAKALgCEEAKAKECBABDwsQHgtoAQJ/QQEhAQJAAkAgAEFfaiICQQVLDQBBASACdEExcQ0BCyAAQfj/A3FBKEYNACAAQUZqQf//A3FBBkkNAAJAIABBpX9qIgJBA0sNACACQQFHDQELIABBhX9qQf//A3FBBEkhAQsgAQttAQJ/AkACQANAAkAgAEH//wNxIgFBd2oiAkEXSw0AQQEgAnRBn4CABHENAgsgAUGgAUYNASAAIQIgARApDQJBACECQQBBACgC4AgiAEECajYC4AggAC8BAiIADQAMAgsLIAAhAgsgAkH//wNxC1wBAn8CQEEAKALgCCICLwEAIgNB4QBHDQBBACACQQRqNgLgCBAnIQJBACgC4AghACACECoaQQAoAuAIIQEQJyEDQQAoAuAIIQILAkAgAiAARg0AIAAgARACCyADC4kBAQV/QQAoAuAIIQBBACgC5AghAQN/IABBAmohAgJAAkAgACABTw0AIAIvAQAiA0Gkf2oiBEEBTQ0BIAIhACADQXZqIgNBA0sNAiACIQAgAw4EAAICAAALQQAgAjYC4AgQHkEADwsCQAJAIAQOAgEAAQtBACACNgLgCEHdAA8LIABBBGohAAwACwtJAQF/QQAhBwJAIAAvAQogBkcNACAALwEIIAVHDQAgAC8BBiAERw0AIAAvAQQgA0cNACAALwECIAJHDQAgAC8BACABRiEHCyAHC1MBAX9BACEIAkAgAC8BDCAHRw0AIAAvAQogBkcNACAALwEIIAVHDQAgAC8BBiAERw0AIAAvAQQgA0cNACAALwECIAJHDQAgAC8BACABRiEICyAICwsfAgBBgAgLAgAAAEGECAsQAQAAAAIAAAAABAAAcDgAAA==",typeof window<"u"&&typeof atob=="function"?Uint8Array.from(atob(gn),e=>e.charCodeAt(0)):Buffer.from(gn,"base64"))).then(WebAssembly.instantiate).then(({exports:e})=>{Re=e}),gn;S();function yo(e){return Object.prototype.toString.call(e)==="[object Object]"}var Er=ra(bl());import Ac from"path";S();S();var Tl=/\.(mjs|js|ts|vue|jsx|tsx)(\?.*|)$/,Di="node_modules",wl=".vite-plugin-externals";var Td={disableInServe:!1,disableSsr:!0,filter(e,t,i,r){return!(!Tl.test(t)||t.includes(Di)&&!r)},useWindow:!0,sourceMapOptions:{},debug:!1};function _l(e){return Object.assign({},Td,e)}S();S();var wd=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],Pl=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],_d="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Ql="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Dn={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Pn="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Nd={5:Pn,"5module":Pn+" export import",6:Pn+" const class extends export import super"},kd=/^in(stanceof)?$/,Ld=new RegExp("["+Ql+"]"),Rd=new RegExp("["+Ql+_d+"]");function Un(e,t){for(var i=65536,r=0;r<t.length;r+=2){if(i+=t[r],i>e)return!1;if(i+=t[r+1],i>=e)return!0}return!1}function nr(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ld.test(String.fromCharCode(e)):t===!1?!1:Un(e,Pl)}function $r(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Rd.test(String.fromCharCode(e)):t===!1?!1:Un(e,Pl)||Un(e,wd)}var me=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function _t(e,t){return new me(e,{beforeExpr:!0,binop:t})}var Nt={beforeExpr:!0},It={startsExpr:!0},Mn={};function de(e,t){return t===void 0&&(t={}),t.keyword=e,Mn[e]=new me(e,t)}var y={num:new me("num",It),regexp:new me("regexp",It),string:new me("string",It),name:new me("name",It),privateId:new me("privateId",It),eof:new me("eof"),bracketL:new me("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new me("]"),braceL:new me("{",{beforeExpr:!0,startsExpr:!0}),braceR:new me("}"),parenL:new me("(",{beforeExpr:!0,startsExpr:!0}),parenR:new me(")"),comma:new me(",",Nt),semi:new me(";",Nt),colon:new me(":",Nt),dot:new me("."),question:new me("?",Nt),questionDot:new me("?."),arrow:new me("=>",Nt),template:new me("template"),invalidTemplate:new me("invalidTemplate"),ellipsis:new me("...",Nt),backQuote:new me("`",It),dollarBraceL:new me("${",{beforeExpr:!0,startsExpr:!0}),eq:new me("=",{beforeExpr:!0,isAssign:!0}),assign:new me("_=",{beforeExpr:!0,isAssign:!0}),incDec:new me("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new me("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:_t("||",1),logicalAND:_t("&&",2),bitwiseOR:_t("|",3),bitwiseXOR:_t("^",4),bitwiseAND:_t("&",5),equality:_t("==/!=/===/!==",6),relational:_t("</>/<=/>=",7),bitShift:_t("<</>>/>>>",8),plusMin:new me("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:_t("%",10),star:_t("*",10),slash:_t("/",10),starstar:new me("**",{beforeExpr:!0}),coalesce:_t("??",1),_break:de("break"),_case:de("case",Nt),_catch:de("catch"),_continue:de("continue"),_debugger:de("debugger"),_default:de("default",Nt),_do:de("do",{isLoop:!0,beforeExpr:!0}),_else:de("else",Nt),_finally:de("finally"),_for:de("for",{isLoop:!0}),_function:de("function",It),_if:de("if"),_return:de("return",Nt),_switch:de("switch"),_throw:de("throw",Nt),_try:de("try"),_var:de("var"),_const:de("const"),_while:de("while",{isLoop:!0}),_with:de("with"),_new:de("new",{beforeExpr:!0,startsExpr:!0}),_this:de("this",It),_super:de("super",It),_class:de("class",It),_extends:de("extends",Nt),_export:de("export"),_import:de("import",It),_null:de("null",It),_true:de("true",It),_false:de("false",It),_in:de("in",{beforeExpr:!0,binop:7}),_instanceof:de("instanceof",{beforeExpr:!0,binop:7}),_typeof:de("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:de("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:de("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Rt=/\r\n?|\n|\u2028|\u2029/,Dd=new RegExp(Rt.source,"g");function Zr(e){return e===10||e===13||e===8232||e===8233}function Ul(e,t,i){i===void 0&&(i=e.length);for(var r=t;r<i;r++){var a=e.charCodeAt(r);if(Zr(a))return r<i-1&&a===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var Ol=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,kt=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Vl=Object.prototype,Pd=Vl.hasOwnProperty,Qd=Vl.toString,Oi=Object.hasOwn||function(e,t){return Pd.call(e,t)},Nl=Array.isArray||function(e){return Qd.call(e)==="[object Array]"},kl=Object.create(null);function mr(e){return kl[e]||(kl[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Ar(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var Ud=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Qi=function(t,i){this.line=t,this.column=i};Qi.prototype.offset=function(t){return new Qi(this.line,this.column+t)};var Ba=function(t,i,r){this.start=i,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile)};function Fl(e,t){for(var i=1,r=0;;){var a=Ul(e,r,t);if(a<0)return new Qi(i,t-r);++i,r=a}}var On={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Ll=!1;function Od(e){var t={};for(var i in On)t[i]=e&&Oi(e,i)?e[i]:On[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!Ll&&typeof console=="object"&&console.warn&&(Ll=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
43
|
-
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),Nl(t.onToken)){var r=t.onToken;t.onToken=function(a){return r.push(a)}}return Nl(t.onComment)&&(t.onComment=Vd(t,t.onComment)),t}function Vd(e,t){return function(i,r,a,n,s,o){var u={type:i?"Block":"Line",value:r,start:a,end:n};e.locations&&(u.loc=new Ba(this,s,o)),e.ranges&&(u.range=[a,n]),t.push(u)}}var Ui=1,ei=2,qn=4,Ml=8,ql=16,Kl=32,Kn=64,Hl=128,Vi=256,Hn=Ui|ei|Vi;function Gn(e,t){return ei|(e?qn:0)|(t?Ml:0)}var Ea=0,jn=1,or=2,Gl=3,jl=4,Yl=5,Fe=function(t,i,r){this.options=t=Od(t),this.sourceFile=t.sourceFile,this.keywords=mr(Nd[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var a="";t.allowReserved!==!0&&(a=Dn[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(a+=" await")),this.reservedWords=mr(a);var n=(a?a+" ":"")+Dn.strict;this.reservedWordsStrict=mr(n),this.reservedWordsStrictBind=mr(n+" "+Dn.strictBind),this.input=String(i),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
|
|
44
|
-
`,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(Rt).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=y.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Ui),this.regexpState=null,this.privateNameStack=[]},Yt={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};Fe.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};Yt.inFunction.get=function(){return(this.currentVarScope().flags&ei)>0};Yt.inGenerator.get=function(){return(this.currentVarScope().flags&Ml)>0&&!this.currentVarScope().inClassFieldInit};Yt.inAsync.get=function(){return(this.currentVarScope().flags&qn)>0&&!this.currentVarScope().inClassFieldInit};Yt.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&Vi)return!1;if(t.flags&ei)return(t.flags&qn)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Yt.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&Kn)>0||i||this.options.allowSuperOutsideMethod};Yt.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Hl)>0};Yt.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Yt.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(ei|Vi))>0||i};Yt.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Vi)>0};Fe.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var r=this,a=0;a<t.length;a++)r=t[a](r);return r};Fe.parse=function(t,i){return new this(i,t).parse()};Fe.parseExpressionAt=function(t,i,r){var a=new this(r,t,i);return a.nextToken(),a.parseExpression()};Fe.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(Fe.prototype,Yt);var vt=Fe.prototype,Fd=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;vt.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){kt.lastIndex=e,e+=kt.exec(this.input)[0].length;var t=Fd.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){kt.lastIndex=e+t[0].length;var i=kt.exec(this.input),r=i.index+i[0].length,a=this.input.charAt(r);return a===";"||a==="}"||Rt.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(a)||a==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,kt.lastIndex=e,e+=kt.exec(this.input)[0].length,this.input[e]===";"&&e++}};vt.eat=function(e){return this.type===e?(this.next(),!0):!1};vt.isContextual=function(e){return this.type===y.name&&this.value===e&&!this.containsEsc};vt.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};vt.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};vt.canInsertSemicolon=function(){return this.type===y.eof||this.type===y.braceR||Rt.test(this.input.slice(this.lastTokEnd,this.start))};vt.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};vt.semicolon=function(){!this.eat(y.semi)&&!this.insertSemicolon()&&this.unexpected()};vt.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};vt.expect=function(e){this.eat(e)||this.unexpected()};vt.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var ba=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};vt.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};vt.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,r=e.doubleProto;if(!t)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")};vt.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};vt.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var J=Fe.prototype;J.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==y.eof;){var i=this.parseStatement(null,!0,t);e.body.push(i)}if(this.inModule)for(var r=0,a=Object.keys(this.undefinedExports);r<a.length;r+=1){var n=a[r];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Yn={kind:"loop"},Md={kind:"switch"};J.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;kt.lastIndex=this.pos;var t=kt.exec(this.input),i=this.pos+t[0].length,r=this.input.charCodeAt(i);if(r===91||r===92)return!0;if(e)return!1;if(r===123||r>55295&&r<56320)return!0;if(nr(r,!0)){for(var a=i+1;$r(r=this.input.charCodeAt(a),!0);)++a;if(r===92||r>55295&&r<56320)return!0;var n=this.input.slice(i,a);if(!kd.test(n))return!0}return!1};J.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;kt.lastIndex=this.pos;var e=kt.exec(this.input),t=this.pos+e[0].length,i;return!Rt.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!($r(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};J.parseStatement=function(e,t,i){var r=this.type,a=this.startNode(),n;switch(this.isLet(e)&&(r=y._var,n="let"),r){case y._break:case y._continue:return this.parseBreakContinueStatement(a,r.keyword);case y._debugger:return this.parseDebuggerStatement(a);case y._do:return this.parseDoStatement(a);case y._for:return this.parseForStatement(a);case y._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!e);case y._class:return e&&this.unexpected(),this.parseClass(a,!0);case y._if:return this.parseIfStatement(a);case y._return:return this.parseReturnStatement(a);case y._switch:return this.parseSwitchStatement(a);case y._throw:return this.parseThrowStatement(a);case y._try:return this.parseTryStatement(a);case y._const:case y._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(a,n);case y._while:return this.parseWhileStatement(a);case y._with:return this.parseWithStatement(a);case y.braceL:return this.parseBlock(!0,a);case y.semi:return this.parseEmptyStatement(a);case y._export:case y._import:if(this.options.ecmaVersion>10&&r===y._import){kt.lastIndex=this.pos;var s=kt.exec(this.input),o=this.pos+s[0].length,u=this.input.charCodeAt(o);if(u===40||u===46)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===y._import?this.parseImport(a):this.parseExport(a,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!e);var l=this.value,c=this.parseExpression();return r===y.name&&c.type==="Identifier"&&this.eat(y.colon)?this.parseLabeledStatement(a,l,c,e):this.parseExpressionStatement(a,c)}};J.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(y.semi)||this.insertSemicolon()?e.label=null:this.type!==y.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var a=this.labels[r];if((e.label==null||a.name===e.label.name)&&(a.kind!=null&&(i||a.kind==="loop")||e.label&&i))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")};J.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};J.parseDoStatement=function(e){return this.next(),this.labels.push(Yn),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(y._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(y.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};J.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Yn),this.enterScope(0),this.expect(y.parenL),this.type===y.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===y._var||this.type===y._const||i){var r=this.startNode(),a=i?"let":this.value;return this.next(),this.parseVar(r,!0,a),this.finishNode(r,"VariableDeclaration"),(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&r.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===y._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,r)):(t>-1&&this.unexpected(t),this.parseFor(e,r))}var n=this.isContextual("let"),s=!1,o=this.containsEsc,u=new ba,l=this.start,c=t>-1?this.parseExprSubscripts(u,"await"):this.parseExpression(!0,u);return this.type===y._in||(s=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===y._in&&this.unexpected(t),e.await=!0):s&&this.options.ecmaVersion>=8&&(c.start===l&&!o&&c.type==="Identifier"&&c.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),n&&s&&this.raise(c.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(c,!1,u),this.checkLValPattern(c),this.parseForIn(e,c)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,c))};J.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,Pi|(i?0:Vn),!1,t)};J.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(y._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};J.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(y.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};J.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(y.braceL),this.labels.push(Md),this.enterScope(0);for(var t,i=!1;this.type!==y.braceR;)if(this.type===y._case||this.type===y._default){var r=this.type===y._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(y.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};J.parseThrowStatement=function(e){return this.next(),Rt.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var qd=[];J.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Kl:0),this.checkLValPattern(e,t?jl:or),this.expect(y.parenR),e};J.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===y._catch){var t=this.startNode();this.next(),this.eat(y.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(y._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};J.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};J.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Yn),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};J.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};J.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};J.parseLabeledStatement=function(e,t,i,r){for(var a=0,n=this.labels;a<n.length;a+=1){var s=n[a];s.name===t&&this.raise(i.start,"Label '"+t+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===y._switch?"switch":null,u=this.labels.length-1;u>=0;u--){var l=this.labels[u];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};J.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};J.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(y.braceL),e&&this.enterScope(0);this.type!==y.braceR;){var r=this.parseStatement(null);t.body.push(r)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};J.parseFor=function(e,t){return e.init=t,this.expect(y.semi),e.test=this.type===y.semi?null:this.parseExpression(),this.expect(y.semi),e.update=this.type===y.parenR?null:this.parseExpression(),this.expect(y.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};J.parseForIn=function(e,t){var i=this.type===y._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(y.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};J.parseVar=function(e,t,i,r){for(e.declarations=[],e.kind=i;;){var a=this.startNode();if(this.parseVarId(a,i),this.eat(y.eq)?a.init=this.parseMaybeAssign(t):!r&&i==="const"&&!(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&a.id.type!=="Identifier"&&!(t&&(this.type===y._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):a.init=null,e.declarations.push(this.finishNode(a,"VariableDeclarator")),!this.eat(y.comma))break}return e};J.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?jn:or,!1)};var Pi=1,Vn=2,zl=4;J.parseFunction=function(e,t,i,r,a){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===y.star&&t&Vn&&this.unexpected(),e.generator=this.eat(y.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&Pi&&(e.id=t&zl&&this.type!==y.name?null:this.parseIdent(),e.id&&!(t&Vn)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?jn:or:Gl));var n=this.yieldPos,s=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gn(e.async,e.generator)),t&Pi||(e.id=this.type===y.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,a),this.yieldPos=n,this.awaitPos=s,this.awaitIdentPos=o,this.finishNode(e,t&Pi?"FunctionDeclaration":"FunctionExpression")};J.parseFunctionParams=function(e){this.expect(y.parenL),e.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};J.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),a=this.startNode(),n=!1;for(a.body=[],this.expect(y.braceL);this.type!==y.braceR;){var s=this.parseClassElement(e.superClass!==null);s&&(a.body.push(s),s.type==="MethodDefinition"&&s.kind==="constructor"?(n&&this.raiseRecoverable(s.start,"Duplicate constructor in the same class"),n=!0):s.key&&s.key.type==="PrivateIdentifier"&&Kd(r,s)&&this.raiseRecoverable(s.key.start,"Identifier '#"+s.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(a,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};J.parseClassElement=function(e){if(this.eat(y.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),r="",a=!1,n=!1,s="method",o=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(y.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===y.star?o=!0:r="static"}if(i.static=o,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===y.star)&&!this.canInsertSemicolon()?n=!0:r="async"),!r&&(t>=9||!n)&&this.eat(y.star)&&(a=!0),!r&&!n&&!a){var u=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?s=u:r=u)}if(r?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===y.parenL||s!=="method"||a||n){var l=!i.static&&xa(i,"constructor"),c=l&&e;l&&s!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=l?"constructor":s,this.parseClassMethod(i,a,n,c)}else this.parseClassField(i);return i};J.isClassElementNameStart=function(){return this.type===y.name||this.type===y.privateId||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword};J.parseClassElementName=function(e){this.type===y.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};J.parseClassMethod=function(e,t,i,r){var a=e.key;e.kind==="constructor"?(t&&this.raise(a.start,"Constructor can't be a generator"),i&&this.raise(a.start,"Constructor can't be an async method")):e.static&&xa(e,"prototype")&&this.raise(a.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,r);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};J.parseClassField=function(e){if(xa(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&xa(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(y.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};J.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(Vi|Kn);this.type!==y.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};J.parseClassId=function(e,t){this.type===y.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,or,!1)):(t===!0&&this.unexpected(),e.id=null)};J.parseClassSuper=function(e){e.superClass=this.eat(y._extends)?this.parseExprSubscripts(null,!1):null};J.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};J.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,a=r===0?null:this.privateNameStack[r-1],n=0;n<i.length;++n){var s=i[n];Oi(t,s.name)||(a?a.used.push(s):this.raiseRecoverable(s.start,"Private field '#"+s.name+"' must be declared in an enclosing class"))}};function Kd(e,t){var i=t.key.name,r=e[i],a="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(a=(t.static?"s":"i")+t.kind),r==="iget"&&a==="iset"||r==="iset"&&a==="iget"||r==="sget"&&a==="sset"||r==="sset"&&a==="sget"?(e[i]="true",!1):r?!0:(e[i]=a,!1)}function xa(e,t){var i=e.computed,r=e.key;return!i&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}J.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==y.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};J.parseExport=function(e,t){if(this.next(),this.eat(y.star))return this.parseExportAllDeclaration(e,t);if(this.eat(y._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==y.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,r=e.specifiers;i<r.length;i+=1){var a=r[i];this.checkUnreserved(a.local),this.checkLocalExport(a.local),a.local.type==="Literal"&&this.raise(a.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};J.parseExportDeclaration=function(e){return this.parseStatement(null)};J.parseExportDefaultDeclaration=function(){var e;if(this.type===y._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,Pi|zl,!1,e)}else if(this.type===y._class){var i=this.startNode();return this.parseClass(i,"nullableID")}else{var r=this.parseMaybeAssign();return this.semicolon(),r}};J.checkExport=function(e,t,i){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Oi(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)};J.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier")this.checkExport(e,t,t.start);else if(i==="ObjectPattern")for(var r=0,a=t.properties;r<a.length;r+=1){var n=a[r];this.checkPatternExport(e,n)}else if(i==="ArrayPattern")for(var s=0,o=t.elements;s<o.length;s+=1){var u=o[s];u&&this.checkPatternExport(e,u)}else i==="Property"?this.checkPatternExport(e,t.value):i==="AssignmentPattern"?this.checkPatternExport(e,t.left):i==="RestElement"&&this.checkPatternExport(e,t.argument)};J.checkVariableExport=function(e,t){if(e)for(var i=0,r=t;i<r.length;i+=1){var a=r[i];this.checkPatternExport(e,a.id)}};J.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};J.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};J.parseExportSpecifiers=function(e){var t=[],i=!0;for(this.expect(y.braceL);!this.eat(y.braceR);){if(i)i=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;t.push(this.parseExportSpecifier(e))}return t};J.parseImport=function(e){return this.next(),this.type===y.string?(e.specifiers=qd,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===y.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};J.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,or),this.finishNode(e,"ImportSpecifier")};J.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,or),this.finishNode(e,"ImportDefaultSpecifier")};J.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,or),this.finishNode(e,"ImportNamespaceSpecifier")};J.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===y.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(y.comma)))return e;if(this.type===y.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(y.braceL);!this.eat(y.braceR);){if(t)t=!1;else if(this.expect(y.comma),this.afterTrailingComma(y.braceR))break;e.push(this.parseImportSpecifier())}return e};J.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===y.string){var e=this.parseLiteral(this.value);return Ud.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};J.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};J.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Dt=Fe.prototype;Dt.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var r=0,a=e.properties;r<a.length;r+=1){var n=a[r];this.toAssignable(n,t),n.type==="RestElement"&&(n.argument.type==="ArrayPattern"||n.argument.type==="ObjectPattern")&&this.raise(n.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return e};Dt.toAssignableList=function(e,t){for(var i=e.length,r=0;r<i;r++){var a=e[r];a&&this.toAssignable(a,t)}if(i){var n=e[i-1];this.options.ecmaVersion===6&&t&&n&&n.type==="RestElement"&&n.argument.type!=="Identifier"&&this.unexpected(n.argument.start)}return e};Dt.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};Dt.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==y.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};Dt.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case y.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(y.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case y.braceL:return this.parseObj(!0)}return this.parseIdent()};Dt.parseBindingList=function(e,t,i,r){for(var a=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(y.comma),t&&this.type===y.comma)a.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===y.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),a.push(s),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else a.push(this.parseAssignableListItem(r))}return a};Dt.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};Dt.parseBindingListItem=function(e){return e};Dt.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(y.eq))return i;var r=this.startNodeAt(e,t);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};Dt.checkLValSimple=function(e,t,i){t===void 0&&(t=Ea);var r=t!==Ea;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===or&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(Oi(i,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),i[e.name]=!0),t!==Yl&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}};Dt.checkLValPattern=function(e,t,i){switch(t===void 0&&(t=Ea),e.type){case"ObjectPattern":for(var r=0,a=e.properties;r<a.length;r+=1){var n=a[r];this.checkLValInnerPattern(n,t,i)}break;case"ArrayPattern":for(var s=0,o=e.elements;s<o.length;s+=1){var u=o[s];u&&this.checkLValInnerPattern(u,t,i)}break;default:this.checkLValSimple(e,t,i)}};Dt.checkLValInnerPattern=function(e,t,i){switch(t===void 0&&(t=Ea),e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var Kt=function(t,i,r,a,n){this.token=t,this.isExpr=!!i,this.preserveSpace=!!r,this.override=a,this.generator=!!n},De={b_stat:new Kt("{",!1),b_expr:new Kt("{",!0),b_tmpl:new Kt("${",!1),p_stat:new Kt("(",!1),p_expr:new Kt("(",!0),q_tmpl:new Kt("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Kt("function",!1),f_expr:new Kt("function",!0),f_expr_gen:new Kt("function",!0,!1,null,!0),f_gen:new Kt("function",!1,!1,null,!0)},ti=Fe.prototype;ti.initialContext=function(){return[De.b_stat]};ti.curContext=function(){return this.context[this.context.length-1]};ti.braceIsBlock=function(e){var t=this.curContext();return t===De.f_expr||t===De.f_stat?!0:e===y.colon&&(t===De.b_stat||t===De.b_expr)?!t.isExpr:e===y._return||e===y.name&&this.exprAllowed?Rt.test(this.input.slice(this.lastTokEnd,this.start)):e===y._else||e===y.semi||e===y.eof||e===y.parenR||e===y.arrow?!0:e===y.braceL?t===De.b_stat:e===y._var||e===y._const||e===y.name?!1:!this.exprAllowed};ti.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};ti.updateContext=function(e){var t,i=this.type;i.keyword&&e===y.dot?this.exprAllowed=!1:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr};ti.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};y.parenR.updateContext=y.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===De.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};y.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?De.b_stat:De.b_expr),this.exprAllowed=!0};y.dollarBraceL.updateContext=function(){this.context.push(De.b_tmpl),this.exprAllowed=!0};y.parenL.updateContext=function(e){var t=e===y._if||e===y._for||e===y._with||e===y._while;this.context.push(t?De.p_stat:De.p_expr),this.exprAllowed=!0};y.incDec.updateContext=function(){};y._function.updateContext=y._class.updateContext=function(e){e.beforeExpr&&e!==y._else&&!(e===y.semi&&this.curContext()!==De.p_stat)&&!(e===y._return&&Rt.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===y.colon||e===y.braceL)&&this.curContext()===De.b_stat)?this.context.push(De.f_expr):this.context.push(De.f_stat),this.exprAllowed=!1};y.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};y.backQuote.updateContext=function(){this.curContext()===De.q_tmpl?this.context.pop():this.context.push(De.q_tmpl),this.exprAllowed=!1};y.star.updateContext=function(e){if(e===y._function){var t=this.context.length-1;this.context[t]===De.f_expr?this.context[t]=De.f_expr_gen:this.context[t]=De.f_gen}this.exprAllowed=!0};y.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==y.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ee=Fe.prototype;ee.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,a;switch(r.type){case"Identifier":a=r.name;break;case"Literal":a=String(r.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6){a==="__proto__"&&n==="init"&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=!0);return}a="$"+a;var s=t[a];if(s){var o;n==="init"?o=this.strict&&s.init||s.get||s.set:o=s.init||s[n],o&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[a]={init:!1,get:!1,set:!1};s[n]=!0}};ee.parseExpression=function(e,t){var i=this.start,r=this.startLoc,a=this.parseMaybeAssign(e,t);if(this.type===y.comma){var n=this.startNodeAt(i,r);for(n.expressions=[a];this.eat(y.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return a};ee.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,a=-1,n=-1,s=-1;t?(a=t.parenthesizedAssign,n=t.trailingComma,s=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new ba,r=!0);var o=this.start,u=this.startLoc;(this.type===y.parenL||this.type===y.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var l=this.parseMaybeConditional(e,t);if(i&&(l=i.call(this,l,o,u)),this.type.isAssign){var c=this.startNodeAt(o,u);return c.operator=this.value,this.type===y.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===y.eq?this.checkLValPattern(l):this.checkLValSimple(l),c.left=l,this.next(),c.right=this.parseMaybeAssign(e),s>-1&&(t.doubleProto=s),this.finishNode(c,"AssignmentExpression")}else r&&this.checkExpressionErrors(t,!0);return a>-1&&(t.parenthesizedAssign=a),n>-1&&(t.trailingComma=n),l};ee.parseMaybeConditional=function(e,t){var i=this.start,r=this.startLoc,a=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return a;if(this.eat(y.question)){var n=this.startNodeAt(i,r);return n.test=a,n.consequent=this.parseMaybeAssign(),this.expect(y.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return a};ee.parseExprOps=function(e,t){var i=this.start,r=this.startLoc,a=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||a.start===i&&a.type==="ArrowFunctionExpression"?a:this.parseExprOp(a,i,r,-1,e)};ee.parseExprOp=function(e,t,i,r,a){var n=this.type.binop;if(n!=null&&(!a||this.type!==y._in)&&n>r){var s=this.type===y.logicalOR||this.type===y.logicalAND,o=this.type===y.coalesce;o&&(n=y.logicalAND.binop);var u=this.value;this.next();var l=this.start,c=this.startLoc,f=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,a),l,c,n,a),p=this.buildBinary(t,i,e,f,u,s||o);return(s&&this.type===y.coalesce||o&&(this.type===y.logicalOR||this.type===y.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(p,t,i,r,a)}return e};ee.buildBinary=function(e,t,i,r,a,n){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var s=this.startNodeAt(e,t);return s.left=i,s.operator=a,s.right=r,this.finishNode(s,n?"LogicalExpression":"BinaryExpression")};ee.parseMaybeUnary=function(e,t,i,r){var a=this.start,n=this.startLoc,s;if(this.isContextual("await")&&this.canAwait)s=this.parseAwait(r),t=!0;else if(this.type.prefix){var o=this.startNode(),u=this.type===y.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0,u,r),this.checkExpressionErrors(e,!0),u?this.checkLValSimple(o.argument):this.strict&&o.operator==="delete"&&Jl(o.argument)?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):o.operator==="delete"&&Fn(o.argument)?this.raiseRecoverable(o.start,"Private fields can not be deleted"):t=!0,s=this.finishNode(o,u?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===y.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),s=this.parsePrivateIdent(),this.type!==y._in&&this.unexpected();else{if(s=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return s;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(a,n);l.operator=this.value,l.prefix=!1,l.argument=s,this.checkLValSimple(s),this.next(),s=this.finishNode(l,"UpdateExpression")}}if(!i&&this.eat(y.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(a,n,s,this.parseMaybeUnary(null,!1,!1,r),"**",!1);else return s};function Jl(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Jl(e.expression)}function Fn(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Fn(e.expression)||e.type==="ParenthesizedExpression"&&Fn(e.expression)}ee.parseExprSubscripts=function(e,t){var i=this.start,r=this.startLoc,a=this.parseExprAtom(e,t);if(a.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return a;var n=this.parseSubscripts(a,i,r,!1,t);return e&&n.type==="MemberExpression"&&(e.parenthesizedAssign>=n.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=n.start&&(e.parenthesizedBind=-1),e.trailingComma>=n.start&&(e.trailingComma=-1)),n};ee.parseSubscripts=function(e,t,i,r,a){for(var n=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,s=!1;;){var o=this.parseSubscript(e,t,i,r,n,s,a);if(o.optional&&(s=!0),o===e||o.type==="ArrowFunctionExpression"){if(s){var u=this.startNodeAt(t,i);u.expression=o,o=this.finishNode(u,"ChainExpression")}return o}e=o}};ee.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(y.arrow)};ee.parseSubscriptAsyncArrow=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!0,r)};ee.parseSubscript=function(e,t,i,r,a,n,s){var o=this.options.ecmaVersion>=11,u=o&&this.eat(y.questionDot);r&&u&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var l=this.eat(y.bracketL);if(l||u&&this.type!==y.parenL&&this.type!==y.backQuote||this.eat(y.dot)){var c=this.startNodeAt(t,i);c.object=e,l?(c.property=this.parseExpression(),this.expect(y.bracketR)):this.type===y.privateId&&e.type!=="Super"?c.property=this.parsePrivateIdent():c.property=this.parseIdent(this.options.allowReserved!=="never"),c.computed=!!l,o&&(c.optional=u),e=this.finishNode(c,"MemberExpression")}else if(!r&&this.eat(y.parenL)){var f=new ba,p=this.yieldPos,m=this.awaitPos,v=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var C=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1,f);if(a&&!u&&this.shouldParseAsyncArrow())return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=p,this.awaitPos=m,this.awaitIdentPos=v,this.parseSubscriptAsyncArrow(t,i,C,s);this.checkExpressionErrors(f,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=m||this.awaitPos,this.awaitIdentPos=v||this.awaitIdentPos;var E=this.startNodeAt(t,i);E.callee=e,E.arguments=C,o&&(E.optional=u),e=this.finishNode(E,"CallExpression")}else if(this.type===y.backQuote){(u||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var B=this.startNodeAt(t,i);B.tag=e,B.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(B,"TaggedTemplateExpression")}return e};ee.parseExprAtom=function(e,t,i){this.type===y.slash&&this.readRegexp();var r,a=this.potentialArrowAt===this.start;switch(this.type){case y._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===y.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==y.dot&&this.type!==y.bracketL&&this.type!==y.parenL&&this.unexpected(),this.finishNode(r,"Super");case y._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case y.name:var n=this.start,s=this.startLoc,o=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!o&&u.name==="async"&&!this.canInsertSemicolon()&&this.eat(y._function))return this.overrideContext(De.f_expr),this.parseFunction(this.startNodeAt(n,s),0,!1,!0,t);if(a&&!this.canInsertSemicolon()){if(this.eat(y.arrow))return this.parseArrowExpression(this.startNodeAt(n,s),[u],!1,t);if(this.options.ecmaVersion>=8&&u.name==="async"&&this.type===y.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return u=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(y.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,s),[u],!0,t)}return u;case y.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case y.num:case y.string:return this.parseLiteral(this.value);case y._null:case y._true:case y._false:return r=this.startNode(),r.value=this.type===y._null?null:this.type===y._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case y.parenL:var c=this.start,f=this.parseParenAndDistinguishExpression(a,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(f)&&(e.parenthesizedAssign=c),e.parenthesizedBind<0&&(e.parenthesizedBind=c)),f;case y.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(y.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case y.braceL:return this.overrideContext(De.b_expr),this.parseObj(!1,e);case y._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case y._class:return this.parseClass(this.startNode(),!1);case y._new:return this.parseNew();case y.backQuote:return this.parseTemplate();case y._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};ee.parseExprAtomDefault=function(){this.unexpected()};ee.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===y.parenL&&!e)return this.parseDynamicImport(t);if(this.type===y.dot){var i=this.startNodeAt(t.start,t.loc&&t.loc.start);return i.name="import",t.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};ee.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(y.parenR)){var t=this.start;this.eat(y.comma)&&this.eat(y.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};ee.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};ee.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};ee.parseParenExpression=function(){this.expect(y.parenL);var e=this.parseExpression();return this.expect(y.parenR),e};ee.shouldParseArrow=function(e){return!this.canInsertSemicolon()};ee.parseParenAndDistinguishExpression=function(e,t){var i=this.start,r=this.startLoc,a,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s=this.start,o=this.startLoc,u=[],l=!0,c=!1,f=new ba,p=this.yieldPos,m=this.awaitPos,v;for(this.yieldPos=0,this.awaitPos=0;this.type!==y.parenR;)if(l?l=!1:this.expect(y.comma),n&&this.afterTrailingComma(y.parenR,!0)){c=!0;break}else if(this.type===y.ellipsis){v=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else u.push(this.parseMaybeAssign(!1,f,this.parseParenItem));var C=this.lastTokEnd,E=this.lastTokEndLoc;if(this.expect(y.parenR),e&&this.shouldParseArrow(u)&&this.eat(y.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=m,this.parseParenArrowList(i,r,u,t);(!u.length||c)&&this.unexpected(this.lastTokStart),v&&this.unexpected(v),this.checkExpressionErrors(f,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=m||this.awaitPos,u.length>1?(a=this.startNodeAt(s,o),a.expressions=u,this.finishNodeAt(a,"SequenceExpression",C,E)):a=u[0]}else a=this.parseParenExpression();if(this.options.preserveParens){var B=this.startNodeAt(i,r);return B.expression=a,this.finishNode(B,"ParenthesizedExpression")}else return a};ee.parseParenItem=function(e){return e};ee.parseParenArrowList=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,r)};var Hd=[];ee.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===y.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,a=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,a,!0,!1),this.eat(y.parenL)?e.arguments=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Hd,this.finishNode(e,"NewExpression")};ee.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===y.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,`
|
|
45
|
-
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
46
|
-
`),cooked:this.value},this.next(),i.tail=this.type===y.backQuote,this.finishNode(i,"TemplateElement")};ee.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===y.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(y.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(y.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};ee.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===y.name||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===y.star)&&!Rt.test(this.input.slice(this.lastTokEnd,this.start))};ee.parseObj=function(e,t){var i=this.startNode(),r=!0,a={};for(i.properties=[],this.next();!this.eat(y.braceR);){if(r)r=!1;else if(this.expect(y.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(y.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,a,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};ee.parseProperty=function(e,t){var i=this.startNode(),r,a,n,s;if(this.options.ecmaVersion>=9&&this.eat(y.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===y.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,s=this.startLoc),e||(r=this.eat(y.star)));var o=this.containsEsc;return this.parsePropertyName(i),!e&&!o&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(i)?(a=!0,r=this.options.ecmaVersion>=9&&this.eat(y.star),this.parsePropertyName(i)):a=!1,this.parsePropertyValue(i,e,r,a,n,s,t,o),this.finishNode(i,"Property")};ee.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};ee.parsePropertyValue=function(e,t,i,r,a,n,s,o){(i||r)&&this.type===y.colon&&this.unexpected(),this.eat(y.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,s),e.kind="init"):this.options.ecmaVersion>=6&&this.type===y.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,r)):!t&&!o&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==y.comma&&this.type!==y.braceR&&this.type!==y.eq?((i||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=a),e.kind="init",t?e.value=this.parseMaybeDefault(a,n,this.copyNode(e.key)):this.type===y.eq&&s?(s.shorthandAssign<0&&(s.shorthandAssign=this.start),e.value=this.parseMaybeDefault(a,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};ee.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(y.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(y.bracketR),e.key;e.computed=!1}return e.key=this.type===y.num||this.type===y.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};ee.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};ee.parseMethod=function(e,t,i){var r=this.startNode(),a=this.yieldPos,n=this.awaitPos,s=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Gn(t,r.generator)|Kn|(i?Hl:0)),this.expect(y.parenL),r.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=a,this.awaitPos=n,this.awaitIdentPos=s,this.finishNode(r,"FunctionExpression")};ee.parseArrowExpression=function(e,t,i,r){var a=this.yieldPos,n=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(Gn(i,!1)|ql),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=a,this.awaitPos=n,this.awaitIdentPos=s,this.finishNode(e,"ArrowFunctionExpression")};ee.parseFunctionBody=function(e,t,i,r){var a=t&&this.type!==y.braceL,n=this.strict,s=!1;if(a)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||o)&&(s=this.strictDirective(this.end),s&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var u=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(e,!n&&!s&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Yl),e.body=this.parseBlock(!1,void 0,s&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=u}this.exitScope()};ee.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1){var r=i[t];if(r.type!=="Identifier")return!1}return!0};ee.checkParams=function(e,t){for(var i=Object.create(null),r=0,a=e.params;r<a.length;r+=1){var n=a[r];this.checkLValInnerPattern(n,jn,t?null:i)}};ee.parseExprList=function(e,t,i,r){for(var a=[],n=!0;!this.eat(e);){if(n)n=!1;else if(this.expect(y.comma),t&&this.afterTrailingComma(e))break;var s=void 0;i&&this.type===y.comma?s=null:this.type===y.ellipsis?(s=this.parseSpread(r),r&&this.type===y.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):s=this.parseMaybeAssign(!1,r),a.push(s)}return a};ee.checkUnreserved=function(e){var t=e.start,i=e.end,r=e.name;if(this.inGenerator&&r==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().inClassFieldInit&&r==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(r==="arguments"||r==="await")&&this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,i).indexOf("\\")!==-1)){var a=this.strict?this.reservedWordsStrict:this.reservedWords;a.test(r)&&(!this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))}};ee.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};ee.parseIdentNode=function(){var e=this.startNode();return this.type===y.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=y.name):this.unexpected(),e};ee.parsePrivateIdent=function(){var e=this.startNode();return this.type===y.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};ee.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===y.semi||this.canInsertSemicolon()||this.type!==y.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(y.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};ee.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Sa=Fe.prototype;Sa.raise=function(e,t){var i=Fl(this.input,e);t+=" ("+i.line+":"+i.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=i,r.raisedAt=this.pos,r};Sa.raiseRecoverable=Sa.raise;Sa.curPosition=function(){if(this.options.locations)return new Qi(this.curLine,this.pos-this.lineStart)};var Cr=Fe.prototype,Gd=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[],this.inClassFieldInit=!1};Cr.enterScope=function(e){this.scopeStack.push(new Gd(e))};Cr.exitScope=function(){this.scopeStack.pop()};Cr.treatFunctionsAsVarInScope=function(e){return e.flags&ei||!this.inModule&&e.flags&Ui};Cr.declareName=function(e,t,i){var r=!1;if(t===or){var a=this.currentScope();r=a.lexical.indexOf(e)>-1||a.functions.indexOf(e)>-1||a.var.indexOf(e)>-1,a.lexical.push(e),this.inModule&&a.flags&Ui&&delete this.undefinedExports[e]}else if(t===jl){var n=this.currentScope();n.lexical.push(e)}else if(t===Gl){var s=this.currentScope();this.treatFunctionsAsVar?r=s.lexical.indexOf(e)>-1:r=s.lexical.indexOf(e)>-1||s.var.indexOf(e)>-1,s.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var u=this.scopeStack[o];if(u.lexical.indexOf(e)>-1&&!(u.flags&Kl&&u.lexical[0]===e)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(e)>-1){r=!0;break}if(u.var.push(e),this.inModule&&u.flags&Ui&&delete this.undefinedExports[e],u.flags&Hn)break}r&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};Cr.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};Cr.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Cr.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Hn)return t}};Cr.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Hn&&!(t.flags&ql))return t}};var Ta=function(t,i,r){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new Ba(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},Fi=Fe.prototype;Fi.startNode=function(){return new Ta(this,this.start,this.startLoc)};Fi.startNodeAt=function(e,t){return new Ta(this,e,t)};function Wl(e,t,i,r){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=i),e}Fi.finishNode=function(e,t){return Wl.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Fi.finishNodeAt=function(e,t,i,r){return Wl.call(this,e,t,i,r)};Fi.copyNode=function(e){var t=new Ta(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var Xl="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",$l=Xl+" Extended_Pictographic",Zl=$l,ec=Zl+" EBase EComp EMod EPres ExtPict",tc=ec,jd=tc,Yd={9:Xl,10:$l,11:Zl,12:ec,13:tc,14:jd},zd="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Jd={9:"",10:"",11:"",12:"",13:"",14:zd},Rl="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",rc="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",ic=rc+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ac=ic+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",nc=ac+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",sc=nc+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Wd=sc+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Xd={9:rc,10:ic,11:ac,12:nc,13:sc,14:Wd},oc={};function $d(e){var t=oc[e]={binary:mr(Yd[e]+" "+Rl),binaryOfStrings:mr(Jd[e]),nonBinary:{General_Category:mr(Rl),Script:mr(Xd[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(Ca=0,Qn=[9,10,11,12,13,14];Ca<Qn.length;Ca+=1)Dl=Qn[Ca],$d(Dl);var Dl,Ca,Qn,j=Fe.prototype,Ia=function(t,i){this.parent=t,this.base=i||this};Ia.prototype.separatedFrom=function(t){for(var i=this;i;i=i.parent)for(var r=t;r;r=r.parent)if(i.base===r.base&&i!==r)return!0;return!1};Ia.prototype.sibling=function(){return new Ia(this.parent,this.base)};var zt=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=oc[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};zt.prototype.reset=function(t,i,r){var a=r.indexOf("v")!==-1,n=r.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=r,a&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};zt.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};zt.prototype.at=function(t,i){i===void 0&&(i=!1);var r=this.source,a=r.length;if(t>=a)return-1;var n=r.charCodeAt(t);if(!(i||this.switchU)||n<=55295||n>=57344||t+1>=a)return n;var s=r.charCodeAt(t+1);return s>=56320&&s<=57343?(n<<10)+s-56613888:n};zt.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var r=this.source,a=r.length;if(t>=a)return a;var n=r.charCodeAt(t),s;return!(i||this.switchU)||n<=55295||n>=57344||t+1>=a||(s=r.charCodeAt(t+1))<56320||s>57343?t+1:t+2};zt.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};zt.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};zt.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};zt.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};zt.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var r=this.pos,a=0,n=t;a<n.length;a+=1){var s=n[a],o=this.at(r,i);if(o===-1||o!==s)return!1;r=this.nextIndex(r,i)}return this.pos=r,!0};j.validateRegExpFlags=function(e){for(var t=e.validFlags,i=e.flags,r=!1,a=!1,n=0;n<i.length;n++){var s=i.charAt(n);t.indexOf(s)===-1&&this.raise(e.start,"Invalid regular expression flag"),i.indexOf(s,n+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),s==="u"&&(r=!0),s==="v"&&(a=!0)}this.options.ecmaVersion>=15&&r&&a&&this.raise(e.start,"Invalid regular expression flag")};function Zd(e){for(var t in e)return!0;return!1}j.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Zd(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))};j.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var r=i[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}};j.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Ia(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")};j.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};j.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1};j.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var i=!1;if(this.options.ecmaVersion>=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};j.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};j.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};j.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var r=0,a=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(a=e.lastIntValue),e.eat(125)))return a!==-1&&a<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=i}return!1};j.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};j.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};j.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1};j.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};j.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};j.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};j.regexp_eatSyntaxCharacter=function(e){var t=e.current();return uc(t)?(e.lastIntValue=t,e.advance(),!0):!1};function uc(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}j.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!uc(i);)e.advance();return e.pos!==t};j.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};j.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,i=e.groupNames[e.lastStringValue];if(i)if(t)for(var r=0,a=i;r<a.length;r+=1){var n=a[r];n.separatedFrom(e.branchID)||e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");t?(i||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}};j.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};j.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Ar(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Ar(e.lastIntValue);return!0}return!1};j.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),eg(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function eg(e){return nr(e,!0)||e===36||e===95}j.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),tg(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function tg(e){return $r(e,!0)||e===36||e===95||e===8204||e===8205}j.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};j.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};j.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};j.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};j.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};j.regexp_eatZero=function(e){return e.current()===48&&!wa(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};j.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};j.regexp_eatControlLetter=function(e){var t=e.current();return lc(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function lc(e){return e>=65&&e<=90||e>=97&&e<=122}j.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(r&&a>=55296&&a<=56319){var n=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=(a-55296)*1024+(s-56320)+65536,!0}e.pos=n,e.lastIntValue=a}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&rg(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=i}return!1};function rg(e){return e>=0&&e<=1114111}j.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};j.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var cc=0,sr=1,Lt=2;j.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(ig(t))return e.lastIntValue=-1,e.advance(),sr;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&r===Lt&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return cc};function ig(e){return e===100||e===68||e===115||e===83||e===119||e===87}j.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,r),sr}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var a=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,a)}return cc};j.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){Oi(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};j.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return sr;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Lt;e.raise("Invalid property name")};j.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";fc(t=e.current());)e.lastStringValue+=Ar(t),e.advance();return e.lastStringValue!==""};function fc(e){return lc(e)||e===95}j.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";ag(t=e.current());)e.lastStringValue+=Ar(t),e.advance();return e.lastStringValue!==""};function ag(e){return fc(e)||wa(e)}j.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};j.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===Lt&&e.raise("Negated character class may contain strings"),!0}return!1};j.regexp_classContents=function(e){return e.current()===93?sr:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),sr)};j.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};j.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||dc(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),!0):!1};j.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};j.regexp_classSetExpression=function(e){var t=sr,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===Lt&&(t=Lt);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==Lt&&(t=sr);continue}e.raise("Invalid character in character class")}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===Lt&&(t=Lt)}};j.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return i!==-1&&r!==-1&&i>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};j.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?sr:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};j.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return i&&r===Lt&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var a=this.regexp_eatCharacterClassEscape(e);if(a)return a;e.pos=t}return null};j.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};j.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===Lt&&(t=Lt);return t};j.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?sr:Lt};j.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&ng(i)||sg(i)?!1:(e.advance(),e.lastIntValue=i,!0)};function ng(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function sg(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}j.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return og(t)?(e.lastIntValue=t,e.advance(),!0):!1};function og(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}j.regexp_eatClassControlLetter=function(e){var t=e.current();return wa(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};j.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};j.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;wa(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function wa(e){return e>=48&&e<=57}j.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;hc(i=e.current());)e.lastIntValue=16*e.lastIntValue+pc(i),e.advance();return e.pos!==t};function hc(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function pc(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}j.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};j.regexp_eatOctalDigit=function(e){var t=e.current();return dc(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function dc(e){return e>=48&&e<=55}j.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var a=e.current();if(!hc(a))return e.pos=i,!1;e.lastIntValue=16*e.lastIntValue+pc(a),e.advance()}return!0};var zn=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Ba(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},he=Fe.prototype;he.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new zn(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};he.getToken=function(){return this.next(),new zn(this)};typeof Symbol<"u"&&(he[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===y.eof,value:t}}}});he.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(y.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};he.readToken=function(e){return nr(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};he.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};he.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var r=void 0,a=t;(r=Ul(this.input,a,this.pos))>-1;)++this.curLine,a=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};he.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!Zr(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition())};he.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Ol.test(String.fromCharCode(e)))++this.pos;else break e}}};he.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};he.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(y.ellipsis)):(++this.pos,this.finishToken(y.dot))};he.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(y.assign,2):this.finishOp(y.slash,1)};he.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,r=e===42?y.star:y.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,r=y.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(y.assign,i+1):this.finishOp(r,i)};he.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(y.assign,3)}return this.finishOp(e===124?y.logicalOR:y.logicalAND,2)}return t===61?this.finishOp(y.assign,2):this.finishOp(e===124?y.bitwiseOR:y.bitwiseAND,1)};he.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(y.assign,2):this.finishOp(y.bitwiseXOR,1)};he.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Rt.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(y.incDec,2):t===61?this.finishOp(y.assign,2):this.finishOp(y.plusMin,1)};he.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(y.assign,i+1):this.finishOp(y.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(y.relational,i))};he.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(y.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(y.arrow)):this.finishOp(e===61?y.eq:y.prefix,1)};he.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(y.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(y.assign,3)}return this.finishOp(y.coalesce,2)}}return this.finishOp(y.question,1)};he.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),nr(t,!0)||t===92))return this.finishToken(y.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Ar(t)+"'")};he.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(y.parenL);case 41:return++this.pos,this.finishToken(y.parenR);case 59:return++this.pos,this.finishToken(y.semi);case 44:return++this.pos,this.finishToken(y.comma);case 91:return++this.pos,this.finishToken(y.bracketL);case 93:return++this.pos,this.finishToken(y.bracketR);case 123:return++this.pos,this.finishToken(y.braceL);case 125:return++this.pos,this.finishToken(y.braceR);case 58:return++this.pos,this.finishToken(y.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(y.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(y.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Ar(e)+"'")};he.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};he.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(Rt.test(r)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(r==="[")t=!0;else if(r==="]"&&t)t=!1;else if(r==="/"&&!t)break;e=r==="\\"}++this.pos}var a=this.input.slice(i,this.pos);++this.pos;var n=this.pos,s=this.readWord1();this.containsEsc&&this.unexpected(n);var o=this.regexpState||(this.regexpState=new zt(this));o.reset(i,a,s),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var u=null;try{u=new RegExp(a,s)}catch{}return this.finishToken(y.regexp,{pattern:a,flags:s,value:u})};he.readInt=function(e,t,i){for(var r=this.options.ecmaVersion>=12&&t===void 0,a=i&&this.input.charCodeAt(this.pos)===48,n=this.pos,s=0,o=0,u=0,l=t??1/0;u<l;++u,++this.pos){var c=this.input.charCodeAt(this.pos),f=void 0;if(r&&c===95){a&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),o===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),u===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),o=c;continue}if(c>=97?f=c-97+10:c>=65?f=c-65+10:c>=48&&c<=57?f=c-48:f=1/0,f>=e)break;o=c,s=s*e+f}return r&&o===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||t!=null&&this.pos-n!==t?null:s};function ug(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function gc(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}he.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=gc(this.input.slice(t,this.pos)),++this.pos):nr(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,i)};he.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&r===110){var a=gc(this.input.slice(t,this.pos));return++this.pos,nr(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,a)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),r===46&&!i&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!i&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),nr(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=ug(this.input.slice(t,this.pos),i);return this.finishToken(y.num,n)};he.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};he.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Zr(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(y.string,t)};var vc={};he.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===vc)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};he.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw vc;this.raise(e,t)};he.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===y.template||this.type===y.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(y.dollarBraceL)):(++this.pos,this.finishToken(y.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(y.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Zr(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
|
|
47
|
-
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};he.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(y.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
|
48
|
-
`&&++this.pos;case`
|
|
49
|
-
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};he.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
|
50
|
-
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Ar(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],a=parseInt(r,8);return a>255&&(r=r.slice(0,-1),a=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(a)}return Zr(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};he.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};he.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var a=this.fullCharCodeAtPos();if($r(a,r))this.pos+=a<=65535?1:2;else if(a===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var s=this.readCodePoint();(t?nr:$r)(s,r)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Ar(s),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};he.readWord=function(){var e=this.readWord1(),t=y.name;return this.keywords.test(e)&&(t=Mn[e]),this.finishToken(t,e)};var lg="8.12.1";Fe.acorn={Parser:Fe,version:lg,defaultOptions:On,Position:Qi,SourceLocation:Ba,getLineInfo:Fl,Node:Ta,TokenType:me,tokTypes:y,keywordTypes:Mn,TokContext:Kt,tokContexts:De,isIdentifierChar:$r,isIdentifierStart:nr,Token:zn,isNewLine:Zr,lineBreak:Rt,lineBreakG:Dd,nonASCIIwhitespace:Ol};var yc=(e,t,i)=>{var r;let n=(r=Fe.parse(e,{ecmaVersion:"latest",sourceType:"module"}).body[0])===null||r===void 0?void 0:r.specifiers;return n?n.reduce((s,o)=>{let{local:u}=o;if(o.type==="ImportDefaultSpecifier")s+=`const ${u.name} = ${i(t)}
|
|
51
|
-
`;else if(o.type==="ImportSpecifier"){let{imported:l}=o;s+=`const ${u.name} = ${i(t)}.${l.name}
|
|
52
|
-
`}else if(o.type==="ImportNamespaceSpecifier")s+=`const ${u.name} = ${i(t)}
|
|
53
|
-
`;else if(o.type==="ExportSpecifier"){let{exported:l}=o,c=`${i(t)}${u.name!=="default"?`.${u.name}`:""}`;l.name==="default"?s+=`export default ${c}
|
|
54
|
-
`:s+=`export const ${l.name} = ${c}
|
|
55
|
-
`}return s},""):""};function mc(e,t,i){return Object.keys(t).reduce((r,a)=>{let n=new RegExp(`require\\((["'\`])\\s*${a}\\s*(\\1)\\)`,"g");return r.replace(n,i(t[a]))},e)}var cg=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],i;return t?t.call(e):(e=typeof __values=="function"?__values(e):e[Symbol.iterator](),i={},r("next"),r("throw"),r("return"),i[Symbol.asyncIterator]=function(){return this},i);function r(n){i[n]=e[n]&&function(s){return new Promise(function(o,u){s=e[n](s),a(o,u,s.done,s.value)})}}function a(n,s,o,u){Promise.resolve(u).then(function(l){n({value:l,done:o})},s)}},fg=e=>i=>{let{useWindow:r}=e;return r===!1?typeof i=="string"?i:i.join("."):typeof i=="string"?`window['${i}']`:`window${i.map(n=>`['${n}']`).join("")}`};function Cc(e={},t={}){let i=!1,r=!1,a=_l(t),n=Object.keys(e),s=n.length===0,o=fg(a);return Object.assign(Object.assign({name:"vite-plugin-externals"},t.enforce?{enforce:t.enforce}:{}),{async config(u,{command:l}){var c,f,p,m;if(i=l==="build",r=l==="serve",!r||a.disableInServe||s)return;let v=[],C=(m=(p=u.resolve)===null||p===void 0?void 0:p.alias)!==null&&m!==void 0?m:{};yo(C)?Object.keys(C).forEach(T=>{v.push({find:T,replacement:C[T]})}):Array.isArray(C)&&v.push(...C);let E=Ac.join(process.cwd(),Di,wl);await(0,Er.ensureDir)(E),await(0,Er.emptyDirSync)(E);try{for(var B=cg(n),w;w=await B.next(),!w.done;){let T=w.value,U=Ac.join(E,`${T}.js`);v.push({find:new RegExp(`^${T}$`),replacement:U}),await(0,Er.ensureFile)(U),await(0,Er.writeFile)(U,`module.exports = ${o(e[T])};`)}}catch(T){c={error:T}}finally{try{w&&!w.done&&(f=B.return)&&await f.call(B)}finally{if(c)throw c.error}}return{resolve:{alias:v}}},async transform(u,l,c){let f=pg(c);if(r&&a.disableInServe||!hg.call(this,a,u,l,i,f))return;let p,m=!1;try{i&&l.includes(Di)&&(u=mc(u,e,o)),await yn;let[v]=vn(u);v.forEach(({d:C,n:E,ss:B,se:w})=>{if(C!==-1||!E)return;let T=e[E];if(!T)return;p=p||(p=new ue(u));let U=u.substring(B,w),P=yc(U,T,o);p.overwrite(B,w,P)})}catch(v){m=!0,t.debug&&console.error(v)}return m||!p?{code:u,map:null}:{code:p.toString(),map:p.generateMap(Object.assign({},{source:l,includeContent:!0,hires:!0},t.sourceMapOptions))}}})}function hg(e,t,i,r,a){let{disableSsr:n=!0,filter:s}=e;return n&&a?!1:s.call(this,t,i,a??!1,r)}function pg(e){var t;return typeof e=="boolean"?e:(t=e?.ssr)!==null&&t!==void 0?t:!1}var ch=ra(Zs(),1);import{resolve as pA}from"node:path";S();var Ec=/[?&]component-hmr\b/;function xc(){let e;return{name:"wix:component-hmr",apply:"serve",configResolved(t){e=t.root},load(t){if(!Ec.test(t))return null;let i=t.replace(Ec,"").replace(e,"");return{code:`
|
|
56
|
-
import { createComponentHmrWrapper } from '@wix/cli-app/internal/component-hmr-wrapper';
|
|
57
|
-
import OriginalComponent from '${i}';
|
|
58
|
-
|
|
59
|
-
if (import.meta.hot) {
|
|
60
|
-
// We catch HMR updates because otherwise Vite reloads the component as a fallback
|
|
61
|
-
import.meta.hot.accept((_) => {});
|
|
62
|
-
|
|
63
|
-
import.meta.hot.accept(
|
|
64
|
-
'${i}',
|
|
65
|
-
({ default: NewComponent }) => {
|
|
66
|
-
// 'createComponentHmrWrapper' sets 'import.meta.hot.data.setComponent'
|
|
67
|
-
// so we can call it here
|
|
68
|
-
import.meta.hot.data.setComponent(NewComponent);
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export default createComponentHmrWrapper(OriginalComponent, import.meta.hot.data);
|
|
74
|
-
`}}}}S();var Sc=/[?&]custom-element-hmr\b/;function Ic(){let e;return{name:"wix:custom-element-hmr",apply:"serve",configResolved(t){e=t.root},load(t){if(!Sc.test(t))return null;let i=t.replace(Sc,"").replace(e,""),r=ro(io("/"),i);return{code:`
|
|
75
|
-
import { applyCustomElementHmr } from '@wix/cli-app/internal/component-hmr-wrapper';
|
|
76
|
-
import OriginalCustomElement from '${i}';
|
|
77
|
-
|
|
78
|
-
if (import.meta.hot) {
|
|
79
|
-
import.meta.hot.accept((_)=>{})
|
|
80
|
-
import.meta.hot.accept(
|
|
81
|
-
'${i}',
|
|
82
|
-
function({ default: NewCustomElement }) {
|
|
83
|
-
document.querySelectorAll('${r}').forEach(node => {
|
|
84
|
-
if (node.disconnectedCallback) {
|
|
85
|
-
node.disconnectedCallback();
|
|
86
|
-
}
|
|
87
|
-
applyCustomElementHmr(node, NewCustomElement);
|
|
88
|
-
if (node.connectedCallback) {
|
|
89
|
-
node.connectedCallback();
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export default OriginalCustomElement;
|
|
97
|
-
`}}}}S();import{send as Bc}from"vite";S();function _a(e){let t=e.resolvedUrls?.local[0];if(!t)throw new Error("Vite server listening but no URL.");return t}function wc(e){let{initialModel:t,type:i,projectModelWatcher:r}=e,a=yi(t),n=Ai(t);return i==="dev"&&r.onChange(s=>{a=yi(s),n=Ai(s)}),{name:"inline-html",resolveId(s){return a.has(s)||n.has(s)?s:null},load(s){let o=a.get(s),u=n.get(s);if(!o&&!u)return null;if(o){let l=ln(o.id);return bc(o.id,l,t.config.appId,e.type)}if(u){let l=cn(u.id);return Tc(l,e.type)}},async configureServer(s){s.middlewares.use(async(o,u,l)=>{if(!o.url)return l();let c=_a(s),f;try{f=new URL(o.url,c)}catch(C){throw new Gr({code:jr.TypeErrorInvalidUrl(),info:{url:o.url,resolvedUrl:c},cause:C})}let p=f.pathname.replace(/^\/+/,""),m=a.get(p),v=n.get(p);if(!m&&!v)return l();if(m){let C=ln(m.id),E=await s.transformIndexHtml(o.url,bc(m.id,C,t.config.appId,e.type),o.originalUrl);return Bc(o,u,E,"html",{headers:s.config.server.headers})}if(v){let C=cn(v.id),E=await s.transformIndexHtml(o.url,Tc(C,e.type),o.originalUrl);return Bc(o,u,E,"html",{headers:s.config.server.headers})}})}}}var _c=e=>e==="dev"?`
|
|
98
|
-
<script crossorigin src="https://unpkg.com/react@16.14.0/umd/react.development.js"></script>
|
|
99
|
-
<script crossorigin src="https://unpkg.com/react-dom@16.14.0/umd/react-dom.development.js"></script>
|
|
100
|
-
`:`
|
|
101
|
-
<script crossorigin src="https://unpkg.com/react@16.14.0/umd/react.production.min.js"></script>
|
|
102
|
-
<script crossorigin src="https://unpkg.com/react-dom@16.14.0/umd/react-dom.production.min.js"></script>
|
|
103
|
-
`;function bc(e,t,i,r){return`<!DOCTYPE html>
|
|
104
|
-
<html>
|
|
105
|
-
<head>
|
|
106
|
-
<meta charset="UTF-8" />
|
|
107
|
-
<title>Dashboard Component</title>
|
|
108
|
-
</head>
|
|
109
|
-
<body style="margin: 0">
|
|
110
|
-
<div id="root"></div>
|
|
111
|
-
${_c(r)}
|
|
112
|
-
<script type="module">
|
|
113
|
-
import { createElement } from 'react';
|
|
114
|
-
import { render } from 'react-dom';
|
|
115
|
-
import '${t}';
|
|
116
|
-
|
|
117
|
-
async function main() {
|
|
118
|
-
const getComponent = await window['__module_federation__containers']['${i}'].get('${e}');
|
|
119
|
-
render(createElement(getComponent().default), document.getElementById('root'));
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
main();
|
|
123
|
-
</script>
|
|
124
|
-
</body>
|
|
125
|
-
</html>`}function Tc(e,t){return`<!DOCTYPE html>
|
|
126
|
-
<html>
|
|
127
|
-
<head>
|
|
128
|
-
<meta charset="UTF-8" />
|
|
129
|
-
<title>Settings Panel</title>
|
|
130
|
-
</head>
|
|
131
|
-
<body style="margin: 0">
|
|
132
|
-
<div id="root"></div>
|
|
133
|
-
${_c(t)}
|
|
134
|
-
<script type="module">
|
|
135
|
-
import { createElement } from 'react';
|
|
136
|
-
import { render } from 'react-dom';
|
|
137
|
-
import SettingsPanel from '${e}';
|
|
138
|
-
|
|
139
|
-
render(createElement(SettingsPanel), document.getElementById('root'));
|
|
140
|
-
</script>
|
|
141
|
-
</body>
|
|
142
|
-
</html>`}S();var Lc=ra(Zs(),1);var Nc=(e,t)=>`/${e}${t==="dev"?"?component-hmr":""}`,dg=(e,t,i)=>`${e?e.local[0]:"/"}${t}${i==="dev"?"?custom-element-hmr":""}`,gg=/[?#].*$/s,kc=e=>e.replace(gg,""),Rc=({initialModel:e,type:t,projectModelWatcher:i})=>{let{appId:r}=e.config,a=mi(e),n=Ci(e),s=fn(e),o;return{name:"wix:moduleBundle",resolveId(u){let l=kc(u);return a.has(l)||n.has(l)||s.has(l)?l:null},configureServer(u){o=u,t==="dev"&&i.onChange(l=>{a=mi(l);for(let c of a.keys()){let f=u.moduleGraph.getModuleById(c);f&&u.moduleGraph.invalidateModule(f)}n=Ci(l);for(let c of n.keys()){let f=u.moduleGraph.getModuleById(c);f&&u.moduleGraph.invalidateModule(f)}s=fn(l);for(let c of s.keys()){let f=u.moduleGraph.getModuleById(c);f&&u.moduleGraph.invalidateModule(f)}})},load(u){let l=kc(u),c=a.get(l)??n.get(l)??s.get(l);if(!c)return null;let f=c.id;if((0,Lc.isType)(c,"CustomElement")){if(n.has(l))return`
|
|
143
|
-
import { enableClient } from "@wix/cli-app/internal/platform-sdk/site";
|
|
144
|
-
(async function () {
|
|
145
|
-
if (!window['React']) {
|
|
146
|
-
await import('https://unpkg.com/react@16.14.0/umd/react.production.min.js');
|
|
147
|
-
await import('https://unpkg.com/react-dom@16.14.0/umd/react-dom.production.min.js');
|
|
148
|
-
}
|
|
149
|
-
const { default: UsersCustomElementClass } = await import('${dg(t==="dev"?o.resolvedUrls:null,c.relativePath,t)}');
|
|
150
|
-
|
|
151
|
-
let accessTokenListenerFn = UsersCustomElementClass.prototype.accessTokenListener;
|
|
152
|
-
if (!accessTokenListenerFn) {
|
|
153
|
-
const { injectGetAccessToken } = enableClient('${r}');
|
|
154
|
-
accessTokenListenerFn = injectGetAccessToken;
|
|
155
|
-
}
|
|
156
|
-
Object.defineProperty(UsersCustomElementClass.prototype, 'accessTokenListener', {
|
|
157
|
-
writable: false,
|
|
158
|
-
configurable: false,
|
|
159
|
-
value: accessTokenListenerFn
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
customElements.define('${c.tagName}', UsersCustomElementClass);
|
|
163
|
-
})();
|
|
164
|
-
`;if(s.has(l))return`
|
|
165
|
-
import { enableClient } from '@wix/cli-app/internal/platform-sdk/editor';
|
|
166
|
-
enableClient();
|
|
167
|
-
export { default } from '${Nc(c.relativePanelPath,t)}';
|
|
168
|
-
`}return`
|
|
169
|
-
import { withContextualWixClient } from "@wix/cli-app/internal/platform-sdk/dashboard";
|
|
170
|
-
|
|
171
|
-
(function () {
|
|
172
|
-
const mfKey = '__module_federation__containers';
|
|
173
|
-
window[mfKey] = window[mfKey] || {};
|
|
174
|
-
window[mfKey]['${r}'] = window[mfKey]['${r}'] || {
|
|
175
|
-
get: async (cmpId) => {
|
|
176
|
-
const importFn = window[mfKey]['${r}'][cmpId];
|
|
177
|
-
const Component = await importFn();
|
|
178
|
-
return () => Component;
|
|
179
|
-
},
|
|
180
|
-
init: async () => {
|
|
181
|
-
${t==="dev"?"await import('/@vite/client');":""}
|
|
182
|
-
},
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
window[mfKey]['${r}']['${f}'] = async () => {
|
|
186
|
-
const componentImport = await import('${Nc(c.relativePath,t)}');
|
|
187
|
-
return { default: withContextualWixClient(componentImport.default) };
|
|
188
|
-
};
|
|
189
|
-
})();
|
|
190
|
-
`}}};S();var Dc={global:"window"};function Pc(){return[{name:"fix-draft-js",apply:"serve",config:()=>({optimizeDeps:{esbuildOptions:{define:Dc}}})},{name:"fix-draft-js",apply:"build",config:()=>({esbuild:{define:Dc}})}]}S();S();var rh=ra(th(),1);import{readFile as Zm,writeFile as eA,stat as tA}from"node:fs/promises";import rA from"node:path";var iA="wix-cli.pem",ih=30,aA=[{name:"commonName",value:"localhost"},{name:"countryName",value:"US"},{shortName:"ST",value:"Virginia"},{name:"organizationName",value:"Dev"},{shortName:"OU",value:"Dev"}],nA=async()=>{let e=rh.default.generate(aA,{days:ih});return e.private+e.cert},sA=async e=>{let t=await tA(e).then(i=>i).catch(()=>null);return!t||Date.now()-t.ctime.valueOf()>ih*24*60*60*1e3},ah=async()=>{let e=eo(),t=rA.join(e,iA);if(!await sA(t)){let a=await Zm(t,{encoding:"utf-8"});return{cert:a,key:a}}let r=await nA();return await to(),await eA(t,r,{encoding:"utf-8"}),{cert:r,key:r}};import{send as oA}from"vite";function nh(){return{name:"wix:ssl",config:async e=>{try{let t=await ah();return{...e,server:{https:t},preview:{https:t}}}catch(t){throw new Gr({code:jr.FailedToGenerateSelfsignedCertificate(),cause:t})}},async configureServer(e){e.middlewares.use(async(t,i,r)=>t.url==="/"?oA(t,i,uA(),"html",{headers:e.config.server.headers}):r())}}}function uA(){return`<!DOCTYPE html>
|
|
191
|
-
<html>
|
|
192
|
-
<head>
|
|
193
|
-
<meta charset="UTF-8" />
|
|
194
|
-
<title>Wix CLI Dev Server Root</title>
|
|
195
|
-
</head>
|
|
196
|
-
<body>
|
|
197
|
-
Wix CLI dev server is up and running.<br>
|
|
198
|
-
You can close this browser tab and return to the terminal to continue working.
|
|
199
|
-
</body>
|
|
200
|
-
</html>`}S();var sh="__WIX_ORIGIN_PLACEHOLDER__";function oh(){let e=null;return{name:"wix:auto-origin",apply:"serve",config:()=>({server:{origin:sh}}),configureServer:t=>{t.middlewares.use((i,r,a)=>{e=e??_a(t),a()})},transform:(t,i)=>{if(/.*\.(m?jsx?|tsx?)$/.exec(i))return t;if(!e)throw new Gr({code:jr.FailedToResolveViteOrigin()});return t.replaceAll(sh,e)}}}S();import{dirname as lA,isAbsolute as cA,join as fA}from"node:path";import{URL as uh}from"node:url";function hA(e,t,i){let r=new uh(t,i).href;if(t.startsWith("/@vite"))return r;if(!cA(t)){let a=fA(lA(e),t);r=new uh(a,i).href}return r}function lh(){let e;return{name:"wix:absolute-html-url",apply:"serve",configureServer(t){e=t},transformIndexHtml:{order:"post",handler(t,{originalUrl:i}){if(!i)throw new Error("Cannot find asset URL.");let r=e.resolvedUrls?.local[0],a=(n,s,o,u)=>{let l=hA(i,o,r);return`${s}${l}${u}`};return t.replace(/(<script [^><]*src=["'])((?!http)[^"']+)(["'][^><]*>[\r\n]*<\/script>)/g,a).replace(/(<link [^><]*href=["'])((?!http)[^"']+)(["'][^><]*>)/g,a).replace(/(\r\n|\n|\r)/gm,"")}}}}async function dA(e,t,{baseBackendUrl:i}={}){let{https:r}=t,a=[...yi(e)].map(([l,c])=>[`html-asset-${c.id}`,l]),n=[...mi(e)].map(([l,c])=>[`script-asset-${c.id}`,l]),s=e.components.filter((0,ch.isType)(so.EmbeddedScript)).map(l=>[l.id,pA(e.projectFolder,l.relativePath)]),o=[...Ai(e)].map(([l,c])=>[`html-asset-${c.id}`,l]),u=[...Ci(e)].map(([l,c])=>[`script-asset-${c.id}`,l]);return{configFile:!1,root:e.projectFolder,customLogger:t.customLogger,clearScreen:!1,logLevel:"info",optimizeDeps:{entries:[oo,uo,lo,co,fo]},server:{},build:{sourcemap:!0,outDir:ao(e.projectFolder),rollupOptions:{input:Object.fromEntries([...a,...n,...s,...o,...u])}},define:{...i?{"import.meta.env.BASE_API_URL":JSON.stringify(i.replace(/\/$/,"")+"/functions")}:{}},plugins:[Pc(),...r?[nh()]:[],Rc({initialModel:e,...t}),xc(),Ic(),Cc({react:"React","react-dom":"ReactDOM"}),wc({initialModel:e,...t}),oh(),lh()],experimental:{renderBuiltUrl(l,{hostType:c,hostId:f}){return c==="html"&&!f.includes("wix/html")?"__STATICS_BASE_URL_PLACEHOLDER__"+l:c!=="js"?{relative:!0}:{runtime:`import.meta.url.replace("${f}", "${l}")`}}}}}S();import{viteMiniflarePlugin as gA}from"@wix/cli-miniflare";import{createRequire as vA}from"node:module";var $s=vA(import.meta.url);async function yA(e,t,{appSecret:i,webhooksPublicKey:r}){let a=$s.resolve("@wix/cli-cloudflare-runtime/entry"),n=$s.resolve("@wix/cli-cloudflare-runtime/getRegisteredExtensions");return{configFile:!1,root:e.projectFolder,customLogger:t.customLogger,clearScreen:!1,logLevel:"info",optimizeDeps:{entries:[a,n]},ssr:{noExternal:!0,optimizeDeps:{include:["kind-of","lodash.isplainobject","lodash","crypto-js/sha256.js","crypto-js/enc-base64url.js","crypto-js","@wix/sdk"]}},resolve:{alias:{querystring:"query-string"}},build:{ssr:!0,manifest:!0,sourcemap:!0,target:"esnext",outDir:no(e.projectFolder),rollupOptions:{output:{entryFileNames:"[name].mjs",chunkFileNames:"assets/[name].mjs"},input:{entry:a,getRegisteredExtensions:n}}},define:{"import.meta.env.APP_ID":JSON.stringify(e.config.appId),"import.meta.env.APP_SECRET":JSON.stringify(i),"import.meta.env.PUBLIC_KEY":JSON.stringify(r)},plugins:[gA({entry:$s.resolve("@wix/cli-cloudflare-runtime/entry"),customLogger:t.customLogger})]}}S();export{_a as a,dA as b,yA as c};
|
|
201
|
-
//# sourceMappingURL=chunk-5GXRNUOR.js.map
|