Skip to content

Instantly share code, notes, and snippets.

@xream
Last active January 9, 2026 03:21
Show Gist options
  • Select an option

  • Save xream/a4919966ddbc580951d87a2a6f23697b to your computer and use it in GitHub Desktop.

Select an option

Save xream/a4919966ddbc580951d87a2a6f23697b to your computer and use it in GitHub Desktop.
Sub-Store-Stash
hostname=sub.store
^https?:\/\/sub\.store\/((download)|api\/(preview|sync|(utils\/node-info))) url script-analyze-echo-response https://gist.githubusercontent.com/xream/a4919966ddbc580951d87a2a6f23697b/raw/sub-store-1.min.js
^https?:\/\/sub\.store url script-analyze-echo-response https://gist.githubusercontent.com/xream/a4919966ddbc580951d87a2a6f23697b/raw/sub-store-0.min.js
This file has been truncated, but you can view the full file.
(()=>{var r9=Object.create;var MA=Object.defineProperty;var n9=Object.getOwnPropertyDescriptor;var i9=Object.getOwnPropertyNames;var s9=Object.getPrototypeOf,a9=Object.prototype.hasOwnProperty;var Po=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var u9=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of i9(t))!a9.call(e,i)&&i!==r&&MA(e,i,{get:()=>t[i],enumerable:!(n=n9(t,i))||n.enumerable});return e};var un=(e,t,r)=>(r=e!=null?r9(s9(e)):{},u9(t||!e||!e.__esModule?MA(r,"default",{value:e,enumerable:!0}):r,e));var KA=de(VA=>{"use strict";(function(e){function t(){}function r(){}var n=String.fromCharCode,i={}.toString,a=i.call(e.SharedArrayBuffer),s=i(),u=e.Uint8Array,l=u||Array,f=u?ArrayBuffer:l,d=f.isView||function(w){return w&&"length"in w},g=i.call(f.prototype);f=r.prototype;var p=e.TextEncoder,h=new(u?Uint16Array:l)(32);t.prototype.decode=function(w){if(!d(w)){var v=i.call(w);if(v!==g&&v!==a&&v!==s)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");w=u?new l(w):w||[]}for(var y=v="",m=0,b=w.length|0,D=b-32|0,C,F,L=0,N=0,S,B=0,T=-1;m<b;){for(C=m<=D?32:b-m|0;B<C;m=m+1|0,B=B+1|0){switch(F=w[m]&255,F>>4){case 15:if(S=w[m=m+1|0]&255,S>>6!==2||247<F){m=m-1|0;break}L=(F&7)<<6|S&63,N=5,F=256;case 14:S=w[m=m+1|0]&255,L<<=6,L|=(F&15)<<6|S&63,N=S>>6===2?N+4|0:24,F=F+256&768;case 13:case 12:S=w[m=m+1|0]&255,L<<=6,L|=(F&31)<<6|S&63,N=N+7|0,m<b&&S>>6===2&&L>>N&&1114112>L?(F=L,L=L-65536|0,0<=L&&(T=(L>>10)+55296|0,F=(L&1023)+56320|0,31>B?(h[B]=T,B=B+1|0,T=-1):(S=T,T=F,F=S))):(F>>=8,m=m-F-1|0,F=65533),L=N=0,C=m<=D?32:b-m|0;default:h[B]=F;continue;case 11:case 10:case 9:case 8:}h[B]=65533}if(y+=n(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10],h[11],h[12],h[13],h[14],h[15],h[16],h[17],h[18],h[19],h[20],h[21],h[22],h[23],h[24],h[25],h[26],h[27],h[28],h[29],h[30],h[31]),32>B&&(y=y.slice(0,B-32|0)),m<b){if(h[0]=T,B=~T>>>31,T=-1,y.length<v.length)continue}else T!==-1&&(y+=n(T));v+=y,y=""}return v},f.encode=function(w){w=w===void 0?"":""+w;var v=w.length|0,y=new l((v<<1)+8|0),m,b=0,D=!u;for(m=0;m<v;m=m+1|0,b=b+1|0){var C=w.charCodeAt(m)|0;if(127>=C)y[b]=C;else{if(2047>=C)y[b]=192|C>>6;else{e:{if(55296<=C)if(56319>=C){var F=w.charCodeAt(m=m+1|0)|0;if(56320<=F&&57343>=F){if(C=(C<<10)+F-56613888|0,65535<C){y[b]=240|C>>18,y[b=b+1|0]=128|C>>12&63,y[b=b+1|0]=128|C>>6&63,y[b=b+1|0]=128|C&63;continue}break e}C=65533}else 57343>=C&&(C=65533);!D&&m<<1<b&&m<<1<(b-7|0)&&(D=!0,F=new l(3*v),F.set(y),y=F)}y[b]=224|C>>12,y[b=b+1|0]=128|C>>6&63}y[b=b+1|0]=128|C&63}}return u?y.subarray(0,b):y.slice(0,b)},p||(e.TextDecoder=t,e.TextEncoder=r)})(typeof global>"u"?typeof self>"u"?VA:self:global)});var sg=de(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});Ml.isCorrect=Ml.isInSubnet=void 0;function I9(e){return this.subnetMask<e.subnetMask?!1:this.mask(e.subnetMask)===e.mask()}Ml.isInSubnet=I9;function B9(e){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===e&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}Ml.isCorrect=B9});var ag=de(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.RE_SUBNET_STRING=Zs.RE_ADDRESS=Zs.GROUPS=Zs.BITS=void 0;Zs.BITS=32;Zs.GROUPS=4;Zs.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;Zs.RE_SUBNET_STRING=/\/\d{1,2}$/});var jd=de(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.AddressError=void 0;var ug=class extends Error{constructor(t,r){super(t),this.name="AddressError",r!==null&&(this.parseMessage=r)}};Ud.AddressError=ug});var og=de((Hd,pE)=>{(function(){var e,t=0xdeadbeefcafe,r=(t&16777215)==15715070;function n(R,k,K){R!=null&&(typeof R=="number"?this.fromNumber(R,k,K):k==null&&typeof R!="string"?this.fromString(R,256):this.fromString(R,k))}function i(){return new n(null)}function a(R,k,K,Q,we,be){for(;--be>=0;){var $e=k*this[R++]+K[Q]+we;we=Math.floor($e/67108864),K[Q++]=$e&67108863}return we}function s(R,k,K,Q,we,be){for(var $e=k&32767,Oe=k>>15;--be>=0;){var Zt=this[R]&32767,Br=this[R++]>>15,An=Oe*Zt+Br*$e;Zt=$e*Zt+((An&32767)<<15)+K[Q]+(we&1073741823),we=(Zt>>>30)+(An>>>15)+Oe*Br+(we>>>30),K[Q++]=Zt&1073741823}return we}function u(R,k,K,Q,we,be){for(var $e=k&16383,Oe=k>>14;--be>=0;){var Zt=this[R]&16383,Br=this[R++]>>14,An=Oe*Zt+Br*$e;Zt=$e*Zt+((An&16383)<<14)+K[Q]+we,we=(Zt>>28)+(An>>14)+Oe*Br,K[Q++]=Zt&268435455}return we}var l=typeof navigator<"u";l&&r&&navigator.appName=="Microsoft Internet Explorer"?(n.prototype.am=s,e=30):l&&r&&navigator.appName!="Netscape"?(n.prototype.am=a,e=26):(n.prototype.am=u,e=28),n.prototype.DB=e,n.prototype.DM=(1<<e)-1,n.prototype.DV=1<<e;var f=52;n.prototype.FV=Math.pow(2,f),n.prototype.F1=f-e,n.prototype.F2=2*e-f;var d="0123456789abcdefghijklmnopqrstuvwxyz",g=new Array,p,h;for(p=48,h=0;h<=9;++h)g[p++]=h;for(p=97,h=10;h<36;++h)g[p++]=h;for(p=65,h=10;h<36;++h)g[p++]=h;function w(R){return d.charAt(R)}function v(R,k){var K=g[R.charCodeAt(k)];return K??-1}function y(R){for(var k=this.t-1;k>=0;--k)R[k]=this[k];R.t=this.t,R.s=this.s}function m(R){this.t=1,this.s=R<0?-1:0,R>0?this[0]=R:R<-1?this[0]=R+this.DV:this.t=0}function b(R){var k=i();return k.fromInt(R),k}function D(R,k){var K;if(k==16)K=4;else if(k==8)K=3;else if(k==256)K=8;else if(k==2)K=1;else if(k==32)K=5;else if(k==4)K=2;else{this.fromRadix(R,k);return}this.t=0,this.s=0;for(var Q=R.length,we=!1,be=0;--Q>=0;){var $e=K==8?R[Q]&255:v(R,Q);if($e<0){R.charAt(Q)=="-"&&(we=!0);continue}we=!1,be==0?this[this.t++]=$e:be+K>this.DB?(this[this.t-1]|=($e&(1<<this.DB-be)-1)<<be,this[this.t++]=$e>>this.DB-be):this[this.t-1]|=$e<<be,be+=K,be>=this.DB&&(be-=this.DB)}K==8&&R[0]&128&&(this.s=-1,be>0&&(this[this.t-1]|=(1<<this.DB-be)-1<<be)),this.clamp(),we&&n.ZERO.subTo(this,this)}function C(){for(var R=this.s&this.DM;this.t>0&&this[this.t-1]==R;)--this.t}function F(R){if(this.s<0)return"-"+this.negate().toString(R);var k;if(R==16)k=4;else if(R==8)k=3;else if(R==2)k=1;else if(R==32)k=5;else if(R==4)k=2;else return this.toRadix(R);var K=(1<<k)-1,Q,we=!1,be="",$e=this.t,Oe=this.DB-$e*this.DB%k;if($e-- >0)for(Oe<this.DB&&(Q=this[$e]>>Oe)>0&&(we=!0,be=w(Q));$e>=0;)Oe<k?(Q=(this[$e]&(1<<Oe)-1)<<k-Oe,Q|=this[--$e]>>(Oe+=this.DB-k)):(Q=this[$e]>>(Oe-=k)&K,Oe<=0&&(Oe+=this.DB,--$e)),Q>0&&(we=!0),we&&(be+=w(Q));return we?be:"0"}function L(){var R=i();return n.ZERO.subTo(this,R),R}function N(){return this.s<0?this.negate():this}function S(R){var k=this.s-R.s;if(k!=0)return k;var K=this.t;if(k=K-R.t,k!=0)return this.s<0?-k:k;for(;--K>=0;)if((k=this[K]-R[K])!=0)return k;return 0}function B(R){var k=1,K;return(K=R>>>16)!=0&&(R=K,k+=16),(K=R>>8)!=0&&(R=K,k+=8),(K=R>>4)!=0&&(R=K,k+=4),(K=R>>2)!=0&&(R=K,k+=2),(K=R>>1)!=0&&(R=K,k+=1),k}function T(){return this.t<=0?0:this.DB*(this.t-1)+B(this[this.t-1]^this.s&this.DM)}function U(R,k){var K;for(K=this.t-1;K>=0;--K)k[K+R]=this[K];for(K=R-1;K>=0;--K)k[K]=0;k.t=this.t+R,k.s=this.s}function V(R,k){for(var K=R;K<this.t;++K)k[K-R]=this[K];k.t=Math.max(this.t-R,0),k.s=this.s}function Y(R,k){var K=R%this.DB,Q=this.DB-K,we=(1<<Q)-1,be=Math.floor(R/this.DB),$e=this.s<<K&this.DM,Oe;for(Oe=this.t-1;Oe>=0;--Oe)k[Oe+be+1]=this[Oe]>>Q|$e,$e=(this[Oe]&we)<<K;for(Oe=be-1;Oe>=0;--Oe)k[Oe]=0;k[be]=$e,k.t=this.t+be+1,k.s=this.s,k.clamp()}function H(R,k){k.s=this.s;var K=Math.floor(R/this.DB);if(K>=this.t){k.t=0;return}var Q=R%this.DB,we=this.DB-Q,be=(1<<Q)-1;k[0]=this[K]>>Q;for(var $e=K+1;$e<this.t;++$e)k[$e-K-1]|=(this[$e]&be)<<we,k[$e-K]=this[$e]>>Q;Q>0&&(k[this.t-K-1]|=(this.s&be)<<we),k.t=this.t-K,k.clamp()}function z(R,k){for(var K=0,Q=0,we=Math.min(R.t,this.t);K<we;)Q+=this[K]-R[K],k[K++]=Q&this.DM,Q>>=this.DB;if(R.t<this.t){for(Q-=R.s;K<this.t;)Q+=this[K],k[K++]=Q&this.DM,Q>>=this.DB;Q+=this.s}else{for(Q+=this.s;K<R.t;)Q-=R[K],k[K++]=Q&this.DM,Q>>=this.DB;Q-=R.s}k.s=Q<0?-1:0,Q<-1?k[K++]=this.DV+Q:Q>0&&(k[K++]=Q),k.t=K,k.clamp()}function W(R,k){var K=this.abs(),Q=R.abs(),we=K.t;for(k.t=we+Q.t;--we>=0;)k[we]=0;for(we=0;we<Q.t;++we)k[we+K.t]=K.am(0,Q[we],k,we,0,K.t);k.s=0,k.clamp(),this.s!=R.s&&n.ZERO.subTo(k,k)}function ie(R){for(var k=this.abs(),K=R.t=2*k.t;--K>=0;)R[K]=0;for(K=0;K<k.t-1;++K){var Q=k.am(K,k[K],R,2*K,0,1);(R[K+k.t]+=k.am(K+1,2*k[K],R,2*K+1,Q,k.t-K-1))>=k.DV&&(R[K+k.t]-=k.DV,R[K+k.t+1]=1)}R.t>0&&(R[R.t-1]+=k.am(K,k[K],R,2*K,0,1)),R.s=0,R.clamp()}function Fe(R,k,K){var Q=R.abs();if(!(Q.t<=0)){var we=this.abs();if(we.t<Q.t){k?.fromInt(0),K!=null&&this.copyTo(K);return}K==null&&(K=i());var be=i(),$e=this.s,Oe=R.s,Zt=this.DB-B(Q[Q.t-1]);Zt>0?(Q.lShiftTo(Zt,be),we.lShiftTo(Zt,K)):(Q.copyTo(be),we.copyTo(K));var Br=be.t,An=be[Br-1];if(An!=0){var En=An*(1<<this.F1)+(Br>1?be[Br-2]>>this.F2:0),xi=this.FV/En,$u=(1<<this.F1)/En,Wn=1<<this.F2,bn=K.t,Pu=bn-Br,ts=k??i();for(be.dlShiftTo(Pu,ts),K.compareTo(ts)>=0&&(K[K.t++]=1,K.subTo(ts,K)),n.ONE.dlShiftTo(Br,ts),ts.subTo(be,be);be.t<Br;)be[be.t++]=0;for(;--Pu>=0;){var Eo=K[--bn]==An?this.DM:Math.floor(K[bn]*xi+(K[bn-1]+Wn)*$u);if((K[bn]+=be.am(0,Eo,K,Pu,0,Br))<Eo)for(be.dlShiftTo(Pu,ts),K.subTo(ts,K);K[bn]<--Eo;)K.subTo(ts,K)}k!=null&&(K.drShiftTo(Br,k),$e!=Oe&&n.ZERO.subTo(k,k)),K.t=Br,K.clamp(),Zt>0&&K.rShiftTo(Zt,K),$e<0&&n.ZERO.subTo(K,K)}}}function Se(R){var k=i();return this.abs().divRemTo(R,null,k),this.s<0&&k.compareTo(n.ZERO)>0&&R.subTo(k,k),k}function Re(R){this.m=R}function Je(R){return R.s<0||R.compareTo(this.m)>=0?R.mod(this.m):R}function ue(R){return R}function Ce(R){R.divRemTo(this.m,null,R)}function Ue(R,k,K){R.multiplyTo(k,K),this.reduce(K)}function or(R,k){R.squareTo(k),this.reduce(k)}Re.prototype.convert=Je,Re.prototype.revert=ue,Re.prototype.reduce=Ce,Re.prototype.mulTo=Ue,Re.prototype.sqrTo=or;function $t(){if(this.t<1)return 0;var R=this[0];if(!(R&1))return 0;var k=R&3;return k=k*(2-(R&15)*k)&15,k=k*(2-(R&255)*k)&255,k=k*(2-((R&65535)*k&65535))&65535,k=k*(2-R*k%this.DV)%this.DV,k>0?this.DV-k:-k}function _t(R){this.m=R,this.mp=R.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<R.DB-15)-1,this.mt2=2*R.t}function Dr(R){var k=i();return R.abs().dlShiftTo(this.m.t,k),k.divRemTo(this.m,null,k),R.s<0&&k.compareTo(n.ZERO)>0&&this.m.subTo(k,k),k}function cr(R){var k=i();return R.copyTo(k),this.reduce(k),k}function ht(R){for(;R.t<=this.mt2;)R[R.t++]=0;for(var k=0;k<this.m.t;++k){var K=R[k]&32767,Q=K*this.mpl+((K*this.mph+(R[k]>>15)*this.mpl&this.um)<<15)&R.DM;for(K=k+this.m.t,R[K]+=this.m.am(0,Q,R,k,0,this.m.t);R[K]>=R.DV;)R[K]-=R.DV,R[++K]++}R.clamp(),R.drShiftTo(this.m.t,R),R.compareTo(this.m)>=0&&R.subTo(this.m,R)}function Xt(R,k){R.squareTo(k),this.reduce(k)}function st(R,k,K){R.multiplyTo(k,K),this.reduce(K)}_t.prototype.convert=Dr,_t.prototype.revert=cr,_t.prototype.reduce=ht,_t.prototype.mulTo=st,_t.prototype.sqrTo=Xt;function Ye(){return(this.t>0?this[0]&1:this.s)==0}function fr(R,k){if(R>4294967295||R<1)return n.ONE;var K=i(),Q=i(),we=k.convert(this),be=B(R)-1;for(we.copyTo(K);--be>=0;)if(k.sqrTo(K,Q),(R&1<<be)>0)k.mulTo(Q,we,K);else{var $e=K;K=Q,Q=$e}return k.revert(K)}function Me(R,k){var K;return R<256||k.isEven()?K=new Re(k):K=new _t(k),this.exp(R,K)}n.prototype.copyTo=y,n.prototype.fromInt=m,n.prototype.fromString=D,n.prototype.clamp=C,n.prototype.dlShiftTo=U,n.prototype.drShiftTo=V,n.prototype.lShiftTo=Y,n.prototype.rShiftTo=H,n.prototype.subTo=z,n.prototype.multiplyTo=W,n.prototype.squareTo=ie,n.prototype.divRemTo=Fe,n.prototype.invDigit=$t,n.prototype.isEven=Ye,n.prototype.exp=fr,n.prototype.toString=F,n.prototype.negate=L,n.prototype.abs=N,n.prototype.compareTo=S,n.prototype.bitLength=T,n.prototype.mod=Se,n.prototype.modPowInt=Me,n.ZERO=b(0),n.ONE=b(1);function Nt(){var R=i();return this.copyTo(R),R}function dn(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function ir(){return this.t==0?this.s:this[0]<<24>>24}function Jt(){return this.t==0?this.s:this[0]<<16>>16}function vt(R){return Math.floor(Math.LN2*this.DB/Math.log(R))}function Ur(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function Ri(R){if(R==null&&(R=10),this.signum()==0||R<2||R>36)return"0";var k=this.chunkSize(R),K=Math.pow(R,k),Q=b(K),we=i(),be=i(),$e="";for(this.divRemTo(Q,we,be);we.signum()>0;)$e=(K+be.intValue()).toString(R).substr(1)+$e,we.divRemTo(Q,we,be);return be.intValue().toString(R)+$e}function pn(R,k){this.fromInt(0),k==null&&(k=10);for(var K=this.chunkSize(k),Q=Math.pow(k,K),we=!1,be=0,$e=0,Oe=0;Oe<R.length;++Oe){var Zt=v(R,Oe);if(Zt<0){R.charAt(Oe)=="-"&&this.signum()==0&&(we=!0);continue}$e=k*$e+Zt,++be>=K&&(this.dMultiply(Q),this.dAddOffset($e,0),be=0,$e=0)}be>0&&(this.dMultiply(Math.pow(k,be)),this.dAddOffset($e,0)),we&&n.ZERO.subTo(this,this)}function Dt(R,k,K){if(typeof k=="number")if(R<2)this.fromInt(1);else for(this.fromNumber(R,K),this.testBit(R-1)||this.bitwiseTo(n.ONE.shiftLeft(R-1),me,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(k);)this.dAddOffset(2,0),this.bitLength()>R&&this.subTo(n.ONE.shiftLeft(R-1),this);else{var Q=new Array,we=R&7;Q.length=(R>>3)+1,k.nextBytes(Q),we>0?Q[0]&=(1<<we)-1:Q[0]=0,this.fromString(Q,256)}}function je(){var R=this.t,k=new Array;k[0]=this.s;var K=this.DB-R*this.DB%8,Q,we=0;if(R-- >0)for(K<this.DB&&(Q=this[R]>>K)!=(this.s&this.DM)>>K&&(k[we++]=Q|this.s<<this.DB-K);R>=0;)K<8?(Q=(this[R]&(1<<K)-1)<<8-K,Q|=this[--R]>>(K+=this.DB-8)):(Q=this[R]>>(K-=8)&255,K<=0&&(K+=this.DB,--R)),Q&128&&(Q|=-256),we==0&&(this.s&128)!=(Q&128)&&++we,(we>0||Q!=this.s)&&(k[we++]=Q);return k}function Ie(R){return this.compareTo(R)==0}function Fr(R){return this.compareTo(R)<0?this:R}function gn(R){return this.compareTo(R)>0?this:R}function at(R,k,K){var Q,we,be=Math.min(R.t,this.t);for(Q=0;Q<be;++Q)K[Q]=k(this[Q],R[Q]);if(R.t<this.t){for(we=R.s&this.DM,Q=be;Q<this.t;++Q)K[Q]=k(this[Q],we);K.t=this.t}else{for(we=this.s&this.DM,Q=be;Q<R.t;++Q)K[Q]=k(we,R[Q]);K.t=R.t}K.s=k(this.s,R.s),K.clamp()}function Pa(R,k){return R&k}function mn(R){var k=i();return this.bitwiseTo(R,Pa,k),k}function me(R,k){return R|k}function js(R){var k=i();return this.bitwiseTo(R,me,k),k}function Pt(R,k){return R^k}function rn(R){var k=i();return this.bitwiseTo(R,Pt,k),k}function Es(R,k){return R&~k}function Du(R){var k=i();return this.bitwiseTo(R,Es,k),k}function Hs(){for(var R=i(),k=0;k<this.t;++k)R[k]=this.DM&~this[k];return R.t=this.t,R.s=~this.s,R}function Fu(R){var k=i();return R<0?this.rShiftTo(-R,k):this.lShiftTo(R,k),k}function Ms(R){var k=i();return R<0?this.lShiftTo(-R,k):this.rShiftTo(R,k),k}function bs(R){if(R==0)return-1;var k=0;return R&65535||(R>>=16,k+=16),R&255||(R>>=8,k+=8),R&15||(R>>=4,k+=4),R&3||(R>>=2,k+=2),R&1||++k,k}function Lt(){for(var R=0;R<this.t;++R)if(this[R]!=0)return R*this.DB+bs(this[R]);return this.s<0?this.t*this.DB:-1}function li(R){for(var k=0;R!=0;)R&=R-1,++k;return k}function Su(){for(var R=0,k=this.s&this.DM,K=0;K<this.t;++K)R+=li(this[K]^k);return R}function Iu(R){var k=Math.floor(R/this.DB);return k>=this.t?this.s!=0:(this[k]&1<<R%this.DB)!=0}function Bu(R,k){var K=n.ONE.shiftLeft(R);return this.bitwiseTo(K,k,K),K}function qs(R){return this.changeBit(R,me)}function co(R){return this.changeBit(R,Es)}function Vs(R){return this.changeBit(R,Pt)}function fo(R,k){for(var K=0,Q=0,we=Math.min(R.t,this.t);K<we;)Q+=this[K]+R[K],k[K++]=Q&this.DM,Q>>=this.DB;if(R.t<this.t){for(Q+=R.s;K<this.t;)Q+=this[K],k[K++]=Q&this.DM,Q>>=this.DB;Q+=this.s}else{for(Q+=this.s;K<R.t;)Q+=R[K],k[K++]=Q&this.DM,Q>>=this.DB;Q+=R.s}k.s=Q<0?-1:0,Q>0?k[K++]=Q:Q<-1&&(k[K++]=this.DV+Q),k.t=K,k.clamp()}function Ra(R){var k=i();return this.addTo(R,k),k}function re(R){var k=i();return this.subTo(R,k),k}function fe(R){var k=i();return this.multiplyTo(R,k),k}function Le(){var R=i();return this.squareTo(R),R}function ke(R){var k=i();return this.divRemTo(R,k,null),k}function Ke(R){var k=i();return this.divRemTo(R,null,k),k}function ut(R){var k=i(),K=i();return this.divRemTo(R,k,K),new Array(k,K)}function ft(R){this[this.t]=this.am(0,R-1,this,0,0,this.t),++this.t,this.clamp()}function Or(R,k){if(R!=0){for(;this.t<=k;)this[this.t++]=0;for(this[k]+=R;this[k]>=this.DV;)this[k]-=this.DV,++k>=this.t&&(this[this.t++]=0),++this[k]}}function Vt(){}function ci(R){return R}function es(R,k,K){R.multiplyTo(k,K)}function vn(R,k){R.squareTo(k)}Vt.prototype.convert=ci,Vt.prototype.revert=ci,Vt.prototype.mulTo=es,Vt.prototype.sqrTo=vn;function Pn(R){return this.exp(R,new Vt)}function Sr(R,k,K){var Q=Math.min(this.t+R.t,k);for(K.s=0,K.t=Q;Q>0;)K[--Q]=0;var we;for(we=K.t-this.t;Q<we;++Q)K[Q+this.t]=this.am(0,R[Q],K,Q,0,this.t);for(we=Math.min(R.t,k);Q<we;++Q)this.am(0,R[Q],K,Q,0,k-Q);K.clamp()}function wn(R,k,K){--k;var Q=K.t=this.t+R.t-k;for(K.s=0;--Q>=0;)K[Q]=0;for(Q=Math.max(k-this.t,0);Q<R.t;++Q)K[this.t+Q-k]=this.am(k-Q,R[Q],K,0,0,this.t+Q-k);K.clamp(),K.drShiftTo(1,K)}function Yr(R){this.r2=i(),this.q3=i(),n.ONE.dlShiftTo(2*R.t,this.r2),this.mu=this.r2.divide(R),this.m=R}function ho(R){if(R.s<0||R.t>2*this.m.t)return R.mod(this.m);if(R.compareTo(this.m)<0)return R;var k=i();return R.copyTo(k),this.reduce(k),k}function Ks(R){return R}function Kn(R){for(R.drShiftTo(this.m.t-1,this.r2),R.t>this.m.t+1&&(R.t=this.m.t+1,R.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);R.compareTo(this.r2)<0;)R.dAddOffset(1,this.m.t+1);for(R.subTo(this.r2,R);R.compareTo(this.m)>=0;)R.subTo(this.m,R)}function kt(R,k){R.squareTo(k),this.reduce(k)}function Ir(R,k,K){R.multiplyTo(k,K),this.reduce(K)}Yr.prototype.convert=ho,Yr.prototype.revert=Ks,Yr.prototype.reduce=Kn,Yr.prototype.mulTo=Ir,Yr.prototype.sqrTo=kt;function rt(R,k){var K=R.bitLength(),Q,we=b(1),be;if(K<=0)return we;K<18?Q=1:K<48?Q=3:K<144?Q=4:K<768?Q=5:Q=6,K<8?be=new Re(k):k.isEven()?be=new Yr(k):be=new _t(k);var $e=new Array,Oe=3,Zt=Q-1,Br=(1<<Q)-1;if($e[1]=be.convert(this),Q>1){var An=i();for(be.sqrTo($e[1],An);Oe<=Br;)$e[Oe]=i(),be.mulTo(An,$e[Oe-2],$e[Oe]),Oe+=2}var En=R.t-1,xi,$u=!0,Wn=i(),bn;for(K=B(R[En])-1;En>=0;){for(K>=Zt?xi=R[En]>>K-Zt&Br:(xi=(R[En]&(1<<K+1)-1)<<Zt-K,En>0&&(xi|=R[En-1]>>this.DB+K-Zt)),Oe=Q;!(xi&1);)xi>>=1,--Oe;if((K-=Oe)<0&&(K+=this.DB,--En),$u)$e[xi].copyTo(we),$u=!1;else{for(;Oe>1;)be.sqrTo(we,Wn),be.sqrTo(Wn,we),Oe-=2;Oe>0?be.sqrTo(we,Wn):(bn=we,we=Wn,Wn=bn),be.mulTo(Wn,$e[xi],we)}for(;En>=0&&!(R[En]&1<<K);)be.sqrTo(we,Wn),bn=we,we=Wn,Wn=bn,--K<0&&(K=this.DB-1,--En)}return be.revert(we)}function hr(R){var k=this.s<0?this.negate():this.clone(),K=R.s<0?R.negate():R.clone();if(k.compareTo(K)<0){var Q=k;k=K,K=Q}var we=k.getLowestSetBit(),be=K.getLowestSetBit();if(be<0)return k;for(we<be&&(be=we),be>0&&(k.rShiftTo(be,k),K.rShiftTo(be,K));k.signum()>0;)(we=k.getLowestSetBit())>0&&k.rShiftTo(we,k),(we=K.getLowestSetBit())>0&&K.rShiftTo(we,K),k.compareTo(K)>=0?(k.subTo(K,k),k.rShiftTo(1,k)):(K.subTo(k,K),K.rShiftTo(1,K));return be>0&&K.lShiftTo(be,K),K}function nn(R){if(R<=0)return 0;var k=this.DV%R,K=this.s<0?R-1:0;if(this.t>0)if(k==0)K=this[0]%R;else for(var Q=this.t-1;Q>=0;--Q)K=(k*K+this[Q])%R;return K}function dr(R){var k=R.isEven();if(this.isEven()&&k||R.signum()==0)return n.ZERO;for(var K=R.clone(),Q=this.clone(),we=b(1),be=b(0),$e=b(0),Oe=b(1);K.signum()!=0;){for(;K.isEven();)K.rShiftTo(1,K),k?((!we.isEven()||!be.isEven())&&(we.addTo(this,we),be.subTo(R,be)),we.rShiftTo(1,we)):be.isEven()||be.subTo(R,be),be.rShiftTo(1,be);for(;Q.isEven();)Q.rShiftTo(1,Q),k?((!$e.isEven()||!Oe.isEven())&&($e.addTo(this,$e),Oe.subTo(R,Oe)),$e.rShiftTo(1,$e)):Oe.isEven()||Oe.subTo(R,Oe),Oe.rShiftTo(1,Oe);K.compareTo(Q)>=0?(K.subTo(Q,K),k&&we.subTo($e,we),be.subTo(Oe,be)):(Q.subTo(K,Q),k&&$e.subTo(we,$e),Oe.subTo(be,Oe))}if(Q.compareTo(n.ONE)!=0)return n.ZERO;if(Oe.compareTo(R)>=0)return Oe.subtract(R);if(Oe.signum()<0)Oe.addTo(R,Oe);else return Oe;return Oe.signum()<0?Oe.add(R):Oe}var Kt=[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,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],zn=(1<<26)/Kt[Kt.length-1];function fi(R){var k,K=this.abs();if(K.t==1&&K[0]<=Kt[Kt.length-1]){for(k=0;k<Kt.length;++k)if(K[0]==Kt[k])return!0;return!1}if(K.isEven())return!1;for(k=1;k<Kt.length;){for(var Q=Kt[k],we=k+1;we<Kt.length&&Q<zn;)Q*=Kt[we++];for(Q=K.modInt(Q);k<we;)if(Q%Kt[k++]==0)return!1}return K.millerRabin(R)}function hi(R){var k=this.subtract(n.ONE),K=k.getLowestSetBit();if(K<=0)return!1;var Q=k.shiftRight(K);R=R+1>>1,R>Kt.length&&(R=Kt.length);for(var we=i(),be=0;be<R;++be){we.fromInt(Kt[Math.floor(Math.random()*Kt.length)]);var $e=we.modPow(Q,this);if($e.compareTo(n.ONE)!=0&&$e.compareTo(k)!=0){for(var Oe=1;Oe++<K&&$e.compareTo(k)!=0;)if($e=$e.modPowInt(2,this),$e.compareTo(n.ONE)==0)return!1;if($e.compareTo(k)!=0)return!1}}return!0}n.prototype.chunkSize=vt,n.prototype.toRadix=Ri,n.prototype.fromRadix=pn,n.prototype.fromNumber=Dt,n.prototype.bitwiseTo=at,n.prototype.changeBit=Bu,n.prototype.addTo=fo,n.prototype.dMultiply=ft,n.prototype.dAddOffset=Or,n.prototype.multiplyLowerTo=Sr,n.prototype.multiplyUpperTo=wn,n.prototype.modInt=nn,n.prototype.millerRabin=hi,n.prototype.clone=Nt,n.prototype.intValue=dn,n.prototype.byteValue=ir,n.prototype.shortValue=Jt,n.prototype.signum=Ur,n.prototype.toByteArray=je,n.prototype.equals=Ie,n.prototype.min=Fr,n.prototype.max=gn,n.prototype.and=mn,n.prototype.or=js,n.prototype.xor=rn,n.prototype.andNot=Du,n.prototype.not=Hs,n.prototype.shiftLeft=Fu,n.prototype.shiftRight=Ms,n.prototype.getLowestSetBit=Lt,n.prototype.bitCount=Su,n.prototype.testBit=Iu,n.prototype.setBit=qs,n.prototype.clearBit=co,n.prototype.flipBit=Vs,n.prototype.add=Ra,n.prototype.subtract=re,n.prototype.multiply=fe,n.prototype.divide=ke,n.prototype.remainder=Ke,n.prototype.divideAndRemainder=ut,n.prototype.modPow=rt,n.prototype.modInverse=dr,n.prototype.pow=Pn,n.prototype.gcd=hr,n.prototype.isProbablePrime=fi,n.prototype.square=Le,n.prototype.Barrett=Yr;var Gn,jr,mr;function Kc(R){jr[mr++]^=R&255,jr[mr++]^=R>>8&255,jr[mr++]^=R>>16&255,jr[mr++]^=R>>24&255,mr>=Yn&&(mr-=Yn)}function po(){Kc(new Date().getTime())}if(jr==null){jr=new Array,mr=0;var sn;if(typeof window<"u"&&window.crypto){if(window.crypto.getRandomValues){var go=new Uint8Array(32);for(window.crypto.getRandomValues(go),sn=0;sn<32;++sn)jr[mr++]=go[sn]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var pl=window.crypto.random(32);for(sn=0;sn<pl.length;++sn)jr[mr++]=pl.charCodeAt(sn)&255}}for(;mr<Yn;)sn=Math.floor(65536*Math.random()),jr[mr++]=sn>>>8,jr[mr++]=sn&255;mr=0,po()}function gl(){if(Gn==null){for(po(),Gn=Ao(),Gn.init(jr),mr=0;mr<jr.length;++mr)jr[mr]=0;mr=0}return Gn.next()}function mo(R){var k;for(k=0;k<R.length;++k)R[k]=gl()}function zs(){}zs.prototype.nextBytes=mo;function vo(){this.i=0,this.j=0,this.S=new Array}function ml(R){var k,K,Q;for(k=0;k<256;++k)this.S[k]=k;for(K=0,k=0;k<256;++k)K=K+this.S[k]+R[k%R.length]&255,Q=this.S[k],this.S[k]=this.S[K],this.S[K]=Q;this.i=0,this.j=0}function wo(){var R;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,R=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=R,this.S[R+this.S[this.i]&255]}vo.prototype.init=ml,vo.prototype.next=wo;function Ao(){return new vo}var Yn=256;typeof Hd<"u"?Hd=pE.exports={default:n,BigInteger:n,SecureRandom:zs}:this.jsbn={BigInteger:n,SecureRandom:zs}}).call(Hd)});var vf=de(Md=>{(function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(s){return n(a(s),arguments)}function r(s,u){return t.apply(null,[s].concat(u||[]))}function n(s,u){var l=1,f=s.length,d,g="",p,h,w,v,y,m,b,D;for(p=0;p<f;p++)if(typeof s[p]=="string")g+=s[p];else if(typeof s[p]=="object"){if(w=s[p],w.keys)for(d=u[l],h=0;h<w.keys.length;h++){if(d==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',w.keys[h],w.keys[h-1]));d=d[w.keys[h]]}else w.param_no?d=u[w.param_no]:d=u[l++];if(e.not_type.test(w.type)&&e.not_primitive.test(w.type)&&d instanceof Function&&(d=d()),e.numeric_arg.test(w.type)&&typeof d!="number"&&isNaN(d))throw new TypeError(t("[sprintf] expecting number but found %T",d));switch(e.number.test(w.type)&&(b=d>=0),w.type){case"b":d=parseInt(d,10).toString(2);break;case"c":d=String.fromCharCode(parseInt(d,10));break;case"d":case"i":d=parseInt(d,10);break;case"j":d=JSON.stringify(d,null,w.width?parseInt(w.width):0);break;case"e":d=w.precision?parseFloat(d).toExponential(w.precision):parseFloat(d).toExponential();break;case"f":d=w.precision?parseFloat(d).toFixed(w.precision):parseFloat(d);break;case"g":d=w.precision?String(Number(d.toPrecision(w.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=w.precision?d.substring(0,w.precision):d;break;case"t":d=String(!!d),d=w.precision?d.substring(0,w.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=w.precision?d.substring(0,w.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=w.precision?d.substring(0,w.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase();break}e.json.test(w.type)?g+=d:(e.number.test(w.type)&&(!b||w.sign)?(D=b?"+":"-",d=d.toString().replace(e.sign,"")):D="",y=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",m=w.width-(D+d).length,v=w.width&&m>0?y.repeat(m):"",g+=w.align?D+d+v:y==="0"?D+v+d:v+D+d)}return g}var i=Object.create(null);function a(s){if(i[s])return i[s];for(var u=s,l,f=[],d=0;u;){if((l=e.text.exec(u))!==null)f.push(l[0]);else if((l=e.modulo.exec(u))!==null)f.push("%");else if((l=e.placeholder.exec(u))!==null){if(l[2]){d|=1;var g=[],p=l[2],h=[];if((h=e.key.exec(p))!==null)for(g.push(h[1]);(p=p.substring(h[0].length))!=="";)if((h=e.key_access.exec(p))!==null)g.push(h[1]);else if((h=e.index_access.exec(p))!==null)g.push(h[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=g}else d|=2;if(d===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");f.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");u=u.substring(l[0].length)}return i[s]=f}typeof Md<"u"&&(Md.sprintf=t,Md.vsprintf=r),typeof window<"u"&&(window.sprintf=t,window.vsprintf=r,typeof define=="function"&&define.amd&&define(function(){return{sprintf:t,vsprintf:r}}))})()});var cg=de(Qs=>{"use strict";var $9=Qs&&Qs.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),P9=Qs&&Qs.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),vE=Qs&&Qs.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&$9(t,e,r);return P9(t,e),t};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.Address4=void 0;var gE=vE(sg()),Is=vE(ag()),mE=jd(),wf=og(),ql=vf(),lg=class e{constructor(t){this.groups=Is.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=gE.isCorrect(Is.BITS),this.isInSubnet=gE.isInSubnet,this.address=t;let r=Is.RE_SUBNET_STRING.exec(t);if(r){if(this.parsedSubnet=r[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>Is.BITS)throw new mE.AddressError("Invalid subnet mask.");t=t.replace(Is.RE_SUBNET_STRING,"")}this.addressMinusSuffix=t,this.parsedAddress=this.parse(t)}static isValid(t){try{return new e(t),!0}catch{return!1}}parse(t){let r=t.split(".");if(!t.match(Is.RE_ADDRESS))throw new mE.AddressError("Invalid IPv4 address.");return r}correctForm(){return this.parsedAddress.map(t=>parseInt(t,10)).join(".")}static fromHex(t){let r=t.replace(/:/g,"").padStart(8,"0"),n=[],i;for(i=0;i<8;i+=2){let a=r.slice(i,i+2);n.push(parseInt(a,16))}return new e(n.join("."))}static fromInteger(t){return e.fromHex(t.toString(16))}static fromArpa(t){let n=t.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new e(n)}toHex(){return this.parsedAddress.map(t=>(0,ql.sprintf)("%02x",parseInt(t,10))).join(":")}toArray(){return this.parsedAddress.map(t=>parseInt(t,10))}toGroup6(){let t=[],r;for(r=0;r<Is.GROUPS;r+=2){let n=(0,ql.sprintf)("%02x%02x",parseInt(this.parsedAddress[r],10),parseInt(this.parsedAddress[r+1],10));t.push((0,ql.sprintf)("%x",parseInt(n,16)))}return t.join(":")}bigInteger(){return new wf.BigInteger(this.parsedAddress.map(t=>(0,ql.sprintf)("%02x",parseInt(t,10))).join(""),16)}_startAddress(){return new wf.BigInteger(this.mask()+"0".repeat(Is.BITS-this.subnetMask),2)}startAddress(){return e.fromBigInteger(this._startAddress())}startAddressExclusive(){let t=new wf.BigInteger("1");return e.fromBigInteger(this._startAddress().add(t))}_endAddress(){return new wf.BigInteger(this.mask()+"1".repeat(Is.BITS-this.subnetMask),2)}endAddress(){return e.fromBigInteger(this._endAddress())}endAddressExclusive(){let t=new wf.BigInteger("1");return e.fromBigInteger(this._endAddress().subtract(t))}static fromBigInteger(t){return e.fromInteger(parseInt(t.toString(),10))}mask(t){return t===void 0&&(t=this.subnetMask),this.getBitsBase2(0,t)}getBitsBase2(t,r){return this.binaryZeroPad().slice(t,r)}reverseForm(t){t||(t={});let r=this.correctForm().split(".").reverse().join(".");return t.omitSuffix?r:(0,ql.sprintf)("%s.in-addr.arpa.",r)}isMulticast(){return this.isInSubnet(new e("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart(Is.BITS,"0")}groupForV6(){let t=this.parsedAddress;return this.address.replace(Is.RE_ADDRESS,(0,ql.sprintf)('<span class="hover-group group-v4 group-6">%s</span>.<span class="hover-group group-v4 group-7">%s</span>',t.slice(0,2).join("."),t.slice(2,4).join(".")))}};Qs.Address4=lg});var fg=de(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.RE_URL_WITH_PORT=Rr.RE_URL=Rr.RE_ZONE_STRING=Rr.RE_SUBNET_STRING=Rr.RE_BAD_ADDRESS=Rr.RE_BAD_CHARACTERS=Rr.TYPES=Rr.SCOPES=Rr.GROUPS=Rr.BITS=void 0;Rr.BITS=128;Rr.GROUPS=8;Rr.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};Rr.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};Rr.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;Rr.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;Rr.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;Rr.RE_ZONE_STRING=/%.*$/;Rr.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);Rr.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var hg=de(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.simpleGroup=ea.spanLeadingZeroes=ea.spanAll=ea.spanAllZeroes=void 0;var wE=vf();function AE(e){return e.replace(/(0+)/g,'<span class="zero">$1</span>')}ea.spanAllZeroes=AE;function R9(e,t=0){return e.split("").map((n,i)=>(0,wE.sprintf)('<span class="digit value-%s position-%d">%s</span>',n,i+t,AE(n))).join("")}ea.spanAll=R9;function EE(e){return e.replace(/^(0+)/,'<span class="zero">$1</span>')}function x9(e){return e.split(":").map(r=>EE(r)).join(":")}ea.spanLeadingZeroes=x9;function T9(e,t=0){return e.split(":").map((n,i)=>/group-v4/.test(n)?n:(0,wE.sprintf)('<span class="hover-group group-%d">%s</span>',i+t,EE(n)))}ea.simpleGroup=T9});var bE=de(ln=>{"use strict";var O9=ln&&ln.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),k9=ln&&ln.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),N9=ln&&ln.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&O9(t,e,r);return k9(t,e),t};Object.defineProperty(ln,"__esModule",{value:!0});ln.possibleElisions=ln.simpleRegularExpression=ln.ADDRESS_BOUNDARY=ln.padGroup=ln.groupPossibilities=void 0;var L9=N9(fg()),Vl=vf();function Vd(e){return(0,Vl.sprintf)("(%s)",e.join("|"))}ln.groupPossibilities=Vd;function qd(e){return e.length<4?(0,Vl.sprintf)("0{0,%d}%s",4-e.length,e):e}ln.padGroup=qd;ln.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function U9(e){let t=[];e.forEach((n,i)=>{parseInt(n,16)===0&&t.push(i)});let r=t.map(n=>e.map((i,a)=>{if(a===n){let s=a===0||a===L9.GROUPS-1?":":"";return Vd([qd(i),s])}return qd(i)}).join(":"));return r.push(e.map(qd).join(":")),Vd(r)}ln.simpleRegularExpression=U9;function j9(e,t,r){let n=t?"":":",i=r?"":":",a=[];!t&&!r&&a.push("::"),t&&r&&a.push(""),(r&&!t||!r&&t)&&a.push(":"),a.push((0,Vl.sprintf)("%s(:0{1,4}){1,%d}",n,e-1)),a.push((0,Vl.sprintf)("(0{1,4}:){1,%d}%s",e-1,i)),a.push((0,Vl.sprintf)("(0{1,4}:){%d}0{1,4}",e-1));for(let s=1;s<e-1;s++)for(let u=1;u<e-s;u++)a.push((0,Vl.sprintf)("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",u,e-u-s-1));return Vd(a)}ln.possibleElisions=j9});var DE=de(ta=>{"use strict";var H9=ta&&ta.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),M9=ta&&ta.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zd=ta&&ta.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&H9(t,e,r);return M9(t,e),t};Object.defineProperty(ta,"__esModule",{value:!0});ta.Address6=void 0;var yE=zd(sg()),dg=zd(ag()),lr=zd(fg()),pg=zd(hg()),ko=cg(),No=bE(),Ja=jd(),ti=og(),ri=vf();function Kd(e){if(!e)throw new Error("Assertion failed.")}function q9(e){let t=/(\d+)(\d{3})/;for(;t.test(e);)e=e.replace(t,"$1,$2");return e}function V9(e){return e=e.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),e=e.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),e}function K9(e,t){let r=[],n=[],i;for(i=0;i<e.length;i++)i<t[0]?r.push(e[i]):i>t[1]&&n.push(e[i]);return r.concat(["compact"]).concat(n)}function _E(e){return(0,ri.sprintf)("%04x",parseInt(e,16))}function CE(e){return e&255}var gg=class e{constructor(t,r){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=yE.isInSubnet,this.isCorrect=yE.isCorrect(lr.BITS),r===void 0?this.groups=lr.GROUPS:this.groups=r,this.address=t;let n=lr.RE_SUBNET_STRING.exec(t);if(n){if(this.parsedSubnet=n[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>lr.BITS)throw new Ja.AddressError("Invalid subnet mask.");t=t.replace(lr.RE_SUBNET_STRING,"")}else if(/\//.test(t))throw new Ja.AddressError("Invalid subnet mask.");let i=lr.RE_ZONE_STRING.exec(t);i&&(this.zone=i[0],t=t.replace(lr.RE_ZONE_STRING,"")),this.addressMinusSuffix=t,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(t){try{return new e(t),!0}catch{return!1}}static fromBigInteger(t){let r=t.toString(16).padStart(32,"0"),n=[],i;for(i=0;i<lr.GROUPS;i++)n.push(r.slice(i*4,(i+1)*4));return new e(n.join(":"))}static fromURL(t){let r,n=null,i;if(t.indexOf("[")!==-1&&t.indexOf("]:")!==-1){if(i=lr.RE_URL_WITH_PORT.exec(t),i===null)return{error:"failed to parse address with port",address:null,port:null};r=i[1],n=i[2]}else if(t.indexOf("/")!==-1){if(t=t.replace(/^[a-z0-9]+:\/\//,""),i=lr.RE_URL.exec(t),i===null)return{error:"failed to parse address from URL",address:null,port:null};r=i[1]}else r=t;return n?(n=parseInt(n,10),(n<0||n>65536)&&(n=null)):n=null,{address:new e(r),port:n}}static fromAddress4(t){let r=new ko.Address4(t),n=lr.BITS-(dg.BITS-r.subnetMask);return new e(`::ffff:${r.correctForm()}/${n}`)}static fromArpa(t){let r=t.replace(/(\.ip6\.arpa)?\.$/,""),n=7;if(r.length!==63)throw new Ja.AddressError("Invalid 'ip6.arpa' form.");let i=r.split(".").reverse();for(let a=n;a>0;a--){let s=a*4;i.splice(s,0,":")}return r=i.join(""),new e(r)}microsoftTranscription(){return(0,ri.sprintf)("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(t=this.subnetMask){return this.getBitsBase2(0,t)}possibleSubnets(t=128){let r=lr.BITS-this.subnetMask,n=Math.abs(t-lr.BITS),i=r-n;return i<0?"0":q9(new ti.BigInteger("2",10).pow(i).toString(10))}_startAddress(){return new ti.BigInteger(this.mask()+"0".repeat(lr.BITS-this.subnetMask),2)}startAddress(){return e.fromBigInteger(this._startAddress())}startAddressExclusive(){let t=new ti.BigInteger("1");return e.fromBigInteger(this._startAddress().add(t))}_endAddress(){return new ti.BigInteger(this.mask()+"1".repeat(lr.BITS-this.subnetMask),2)}endAddress(){return e.fromBigInteger(this._endAddress())}endAddressExclusive(){let t=new ti.BigInteger("1");return e.fromBigInteger(this._endAddress().subtract(t))}getScope(){let t=lr.SCOPES[this.getBits(12,16).intValue()];return this.getType()==="Global unicast"&&t!=="Link local"&&(t="Global"),t||"Unknown"}getType(){for(let t of Object.keys(lr.TYPES))if(this.isInSubnet(new e(t)))return lr.TYPES[t];return"Global unicast"}getBits(t,r){return new ti.BigInteger(this.getBitsBase2(t,r),2)}getBitsBase2(t,r){return this.binaryZeroPad().slice(t,r)}getBitsBase16(t,r){let n=r-t;if(n%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(t,r).toString(16).padStart(n/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,lr.BITS)}reverseForm(t){t||(t={});let r=Math.floor(this.subnetMask/4),n=this.canonicalForm().replace(/:/g,"").split("").slice(0,r).reverse().join(".");return r>0?t.omitSuffix?n:(0,ri.sprintf)("%s.ip6.arpa.",n):t.omitSuffix?"":"ip6.arpa."}correctForm(){let t,r=[],n=0,i=[];for(t=0;t<this.parsedAddress.length;t++){let u=parseInt(this.parsedAddress[t],16);u===0&&n++,u!==0&&n>0&&(n>1&&i.push([t-n,t-1]),n=0)}n>1&&i.push([this.parsedAddress.length-n,this.parsedAddress.length-1]);let a=i.map(u=>u[1]-u[0]+1);if(i.length>0){let u=a.indexOf(Math.max(...a));r=K9(this.parsedAddress,i[u])}else r=this.parsedAddress;for(t=0;t<r.length;t++)r[t]!=="compact"&&(r[t]=parseInt(r[t],16).toString(16));let s=r.join(":");return s=s.replace(/^compact$/,"::"),s=s.replace(/^compact|compact$/,":"),s=s.replace(/compact/,""),s}binaryZeroPad(){return this.bigInteger().toString(2).padStart(lr.BITS,"0")}parse4in6(t){let r=t.split(":"),i=r.slice(-1)[0].match(dg.RE_ADDRESS);if(i){this.parsedAddress4=i[0],this.address4=new ko.Address4(this.parsedAddress4);for(let a=0;a<this.address4.groups;a++)if(/^0[0-9]+/.test(this.address4.parsedAddress[a]))throw new Ja.AddressError("IPv4 addresses can't have leading zeroes.",t.replace(dg.RE_ADDRESS,this.address4.parsedAddress.map(V9).join(".")));this.v4=!0,r[r.length-1]=this.address4.toGroup6(),t=r.join(":")}return t}parse(t){t=this.parse4in6(t);let r=t.match(lr.RE_BAD_CHARACTERS);if(r)throw new Ja.AddressError((0,ri.sprintf)("Bad character%s detected in address: %s",r.length>1?"s":"",r.join("")),t.replace(lr.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let n=t.match(lr.RE_BAD_ADDRESS);if(n)throw new Ja.AddressError((0,ri.sprintf)("Address failed regex: %s",n.join("")),t.replace(lr.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let i=[],a=t.split("::");if(a.length===2){let s=a[0].split(":"),u=a[1].split(":");s.length===1&&s[0]===""&&(s=[]),u.length===1&&u[0]===""&&(u=[]);let l=this.groups-(s.length+u.length);if(!l)throw new Ja.AddressError("Error parsing groups");this.elidedGroups=l,this.elisionBegin=s.length,this.elisionEnd=s.length+this.elidedGroups,i=i.concat(s);for(let f=0;f<l;f++)i.push("0");i=i.concat(u)}else if(a.length===1)i=t.split(":"),this.elidedGroups=0;else throw new Ja.AddressError("Too many :: groups found");if(i=i.map(s=>(0,ri.sprintf)("%x",parseInt(s,16))),i.length!==this.groups)throw new Ja.AddressError("Incorrect number of groups found");return i}canonicalForm(){return this.parsedAddress.map(_E).join(":")}decimal(){return this.parsedAddress.map(t=>(0,ri.sprintf)("%05d",parseInt(t,16))).join(":")}bigInteger(){return new ti.BigInteger(this.parsedAddress.map(_E).join(""),16)}to4(){let t=this.binaryZeroPad().split("");return ko.Address4.fromHex(new ti.BigInteger(t.slice(96,128).join(""),2).toString(16))}to4in6(){let t=this.to4(),n=new e(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),i="";return/:$/.test(n)||(i=":"),n+i+t.address}inspectTeredo(){let t=this.getBitsBase16(0,32),r=this.getBits(80,96).xor(new ti.BigInteger("ffff",16)).toString(),n=ko.Address4.fromHex(this.getBitsBase16(32,64)),i=ko.Address4.fromHex(this.getBits(96,128).xor(new ti.BigInteger("ffffffff",16)).toString(16)),a=this.getBits(64,80),s=this.getBitsBase2(64,80),u=a.testBit(15),l=a.testBit(14),f=a.testBit(8),d=a.testBit(9),g=new ti.BigInteger(s.slice(2,6)+s.slice(8,16),2).toString(10);return{prefix:(0,ri.sprintf)("%s:%s",t.slice(0,4),t.slice(4,8)),server4:n.address,client4:i.address,flags:s,coneNat:u,microsoft:{reserved:l,universalLocal:d,groupIndividual:f,nonce:g},udpPort:r}}inspect6to4(){let t=this.getBitsBase16(0,16),r=ko.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:(0,ri.sprintf)("%s",t.slice(0,4)),gateway:r.address}}to6to4(){if(!this.is4())return null;let t=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new e(t)}toByteArray(){let t=this.bigInteger().toByteArray();return t.length===17&&t[0]===0?t.slice(1):t}toUnsignedByteArray(){return this.toByteArray().map(CE)}static fromByteArray(t){return this.fromUnsignedByteArray(t.map(CE))}static fromUnsignedByteArray(t){let r=new ti.BigInteger("256",10),n=new ti.BigInteger("0",10),i=new ti.BigInteger("1",10);for(let a=t.length-1;a>=0;a--)n=n.add(i.multiply(new ti.BigInteger(t[a].toString(10),10))),i=i.multiply(r);return e.fromBigInteger(n)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new e("2001::/32"))}is6to4(){return this.isInSubnet(new e("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(t){return t===void 0?t="":t=(0,ri.sprintf)(":%s",t),(0,ri.sprintf)("http://[%s]%s/",this.correctForm(),t)}link(t){t||(t={}),t.className===void 0&&(t.className=""),t.prefix===void 0&&(t.prefix="/#address="),t.v4===void 0&&(t.v4=!1);let r=this.correctForm;return t.v4&&(r=this.to4in6),t.className?(0,ri.sprintf)('<a href="%1$s%2$s" class="%3$s">%2$s</a>',t.prefix,r.call(this),t.className):(0,ri.sprintf)('<a href="%1$s%2$s">%2$s</a>',t.prefix,r.call(this))}group(){if(this.elidedGroups===0)return pg.simpleGroup(this.address).join(":");Kd(typeof this.elidedGroups=="number"),Kd(typeof this.elisionBegin=="number");let t=[],[r,n]=this.address.split("::");r.length?t.push(...pg.simpleGroup(r)):t.push("");let i=["hover-group"];for(let a=this.elisionBegin;a<this.elisionBegin+this.elidedGroups;a++)i.push((0,ri.sprintf)("group-%d",a));return t.push((0,ri.sprintf)('<span class="%s"></span>',i.join(" "))),n.length?t.push(...pg.simpleGroup(n,this.elisionEnd)):t.push(""),this.is4()&&(Kd(this.address4 instanceof ko.Address4),t.pop(),t.push(this.address4.groupForV6())),t.join(":")}regularExpressionString(t=!1){let r=[],n=new e(this.correctForm());if(n.elidedGroups===0)r.push((0,No.simpleRegularExpression)(n.parsedAddress));else if(n.elidedGroups===lr.GROUPS)r.push((0,No.possibleElisions)(lr.GROUPS));else{let i=n.address.split("::");i[0].length&&r.push((0,No.simpleRegularExpression)(i[0].split(":"))),Kd(typeof n.elidedGroups=="number"),r.push((0,No.possibleElisions)(n.elidedGroups,i[0].length!==0,i[1].length!==0)),i[1].length&&r.push((0,No.simpleRegularExpression)(i[1].split(":"))),r=[r.join(":")]}return t||(r=["(?=^|",No.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...r,")(?=[^\\w\\:]|",No.ADDRESS_BOUNDARY,"|$)"]),r.join("")}regularExpression(t=!1){return new RegExp(this.regularExpressionString(t),"i")}};ta.Address6=gg});var FE=de(kn=>{"use strict";var z9=kn&&kn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),G9=kn&&kn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Y9=kn&&kn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&z9(t,e,r);return G9(t,e),t};Object.defineProperty(kn,"__esModule",{value:!0});kn.v6=kn.AddressError=kn.Address6=kn.Address4=void 0;var W9=cg();Object.defineProperty(kn,"Address4",{enumerable:!0,get:function(){return W9.Address4}});var X9=DE();Object.defineProperty(kn,"Address6",{enumerable:!0,get:function(){return X9.Address6}});var J9=jd();Object.defineProperty(kn,"AddressError",{enumerable:!0,get:function(){return J9.AddressError}});var Z9=Y9(hg());kn.v6={helpers:Z9}});var yf=de((Yl,bf)=>{(function(){var e,t="4.17.21",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",a="Invalid `variable` option passed into `_.template`",s="__lodash_hash_undefined__",u=500,l="__lodash_placeholder__",f=1,d=2,g=4,p=1,h=2,w=1,v=2,y=4,m=8,b=16,D=32,C=64,F=128,L=256,N=512,S=30,B="...",T=800,U=16,V=1,Y=2,H=3,z=1/0,W=9007199254740991,ie=17976931348623157e292,Fe=NaN,Se=4294967295,Re=Se-1,Je=Se>>>1,ue=[["ary",F],["bind",w],["bindKey",v],["curry",m],["curryRight",b],["flip",N],["partial",D],["partialRight",C],["rearg",L]],Ce="[object Arguments]",Ue="[object Array]",or="[object AsyncFunction]",$t="[object Boolean]",_t="[object Date]",Dr="[object DOMException]",cr="[object Error]",ht="[object Function]",Xt="[object GeneratorFunction]",st="[object Map]",Ye="[object Number]",fr="[object Null]",Me="[object Object]",Nt="[object Promise]",dn="[object Proxy]",ir="[object RegExp]",Jt="[object Set]",vt="[object String]",Ur="[object Symbol]",Ri="[object Undefined]",pn="[object WeakMap]",Dt="[object WeakSet]",je="[object ArrayBuffer]",Ie="[object DataView]",Fr="[object Float32Array]",gn="[object Float64Array]",at="[object Int8Array]",Pa="[object Int16Array]",mn="[object Int32Array]",me="[object Uint8Array]",js="[object Uint8ClampedArray]",Pt="[object Uint16Array]",rn="[object Uint32Array]",Es=/\b__p \+= '';/g,Du=/\b(__p \+=) '' \+/g,Hs=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Fu=/&(?:amp|lt|gt|quot|#39);/g,Ms=/[&<>"']/g,bs=RegExp(Fu.source),Lt=RegExp(Ms.source),li=/<%-([\s\S]+?)%>/g,Su=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,Bu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qs=/^\w*$/,co=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vs=/[\\^$.*+?()[\]{}|]/g,fo=RegExp(Vs.source),Ra=/^\s+/,re=/\s/,fe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Le=/\{\n\/\* \[wrapped with (.+)\] \*/,ke=/,? & /,Ke=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ut=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,Or=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vt=/\w*$/,ci=/^[-+]0x[0-9a-f]+$/i,es=/^0b[01]+$/i,vn=/^\[object .+?Constructor\]$/,Pn=/^0o[0-7]+$/i,Sr=/^(?:0|[1-9]\d*)$/,wn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yr=/($^)/,ho=/['\n\r\u2028\u2029\\]/g,Ks="\\ud800-\\udfff",Kn="\\u0300-\\u036f",kt="\\ufe20-\\ufe2f",Ir="\\u20d0-\\u20ff",rt=Kn+kt+Ir,hr="\\u2700-\\u27bf",nn="a-z\\xdf-\\xf6\\xf8-\\xff",dr="\\xac\\xb1\\xd7\\xf7",Kt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",zn="\\u2000-\\u206f",fi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hi="A-Z\\xc0-\\xd6\\xd8-\\xde",Gn="\\ufe0e\\ufe0f",jr=dr+Kt+zn+fi,mr="['\u2019]",Kc="["+Ks+"]",po="["+jr+"]",sn="["+rt+"]",go="\\d+",pl="["+hr+"]",gl="["+nn+"]",mo="[^"+Ks+jr+go+hr+nn+hi+"]",zs="\\ud83c[\\udffb-\\udfff]",vo="(?:"+sn+"|"+zs+")",ml="[^"+Ks+"]",wo="(?:\\ud83c[\\udde6-\\uddff]){2}",Ao="[\\ud800-\\udbff][\\udc00-\\udfff]",Yn="["+hi+"]",R="\\u200d",k="(?:"+gl+"|"+mo+")",K="(?:"+Yn+"|"+mo+")",Q="(?:"+mr+"(?:d|ll|m|re|s|t|ve))?",we="(?:"+mr+"(?:D|LL|M|RE|S|T|VE))?",be=vo+"?",$e="["+Gn+"]?",Oe="(?:"+R+"(?:"+[ml,wo,Ao].join("|")+")"+$e+be+")*",Zt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Br="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",An=$e+be+Oe,En="(?:"+[pl,wo,Ao].join("|")+")"+An,xi="(?:"+[ml+sn+"?",sn,wo,Ao,Kc].join("|")+")",$u=RegExp(mr,"g"),Wn=RegExp(sn,"g"),bn=RegExp(zs+"(?="+zs+")|"+xi+An,"g"),Pu=RegExp([Yn+"?"+gl+"+"+Q+"(?="+[po,Yn,"$"].join("|")+")",K+"+"+we+"(?="+[po,Yn+k,"$"].join("|")+")",Yn+"?"+k+"+"+Q,Yn+"+"+we,Br,Zt,go,En].join("|"),"g"),ts=RegExp("["+R+Ks+rt+Gn+"]"),Eo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kp=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Np=-1,sr={};sr[Fr]=sr[gn]=sr[at]=sr[Pa]=sr[mn]=sr[me]=sr[js]=sr[Pt]=sr[rn]=!0,sr[Ce]=sr[Ue]=sr[je]=sr[$t]=sr[Ie]=sr[_t]=sr[cr]=sr[ht]=sr[st]=sr[Ye]=sr[Me]=sr[ir]=sr[Jt]=sr[vt]=sr[pn]=!1;var tr={};tr[Ce]=tr[Ue]=tr[je]=tr[Ie]=tr[$t]=tr[_t]=tr[Fr]=tr[gn]=tr[at]=tr[Pa]=tr[mn]=tr[st]=tr[Ye]=tr[Me]=tr[ir]=tr[Jt]=tr[vt]=tr[Ur]=tr[me]=tr[js]=tr[Pt]=tr[rn]=!0,tr[cr]=tr[ht]=tr[pn]=!1;var Lp={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Up={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jp={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Hp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mp=parseFloat,qp=parseInt,kh=typeof global=="object"&&global&&global.Object===Object&&global,Vp=typeof self=="object"&&self&&self.Object===Object&&self,Hr=kh||Vp||Function("return this")(),zc=typeof Yl=="object"&&Yl&&!Yl.nodeType&&Yl,xa=zc&&typeof bf=="object"&&bf&&!bf.nodeType&&bf,Nh=xa&&xa.exports===zc,Gc=Nh&&kh.process,di=function(){try{var ne=xa&&xa.require&&xa.require("util").types;return ne||Gc&&Gc.binding&&Gc.binding("util")}catch{}}(),Lh=di&&di.isArrayBuffer,Uh=di&&di.isDate,jh=di&&di.isMap,Hh=di&&di.isRegExp,Mh=di&&di.isSet,qh=di&&di.isTypedArray;function Xn(ne,he,le){switch(le.length){case 0:return ne.call(he);case 1:return ne.call(he,le[0]);case 2:return ne.call(he,le[0],le[1]);case 3:return ne.call(he,le[0],le[1],le[2])}return ne.apply(he,le)}function Kp(ne,he,le,Ne){for(var nt=-1,Ft=ne==null?0:ne.length;++nt<Ft;){var Er=ne[nt];he(Ne,Er,le(Er),ne)}return Ne}function pi(ne,he){for(var le=-1,Ne=ne==null?0:ne.length;++le<Ne&&he(ne[le],le,ne)!==!1;);return ne}function P(ne,he){for(var le=ne==null?0:ne.length;le--&&he(ne[le],le,ne)!==!1;);return ne}function ot(ne,he){for(var le=-1,Ne=ne==null?0:ne.length;++le<Ne;)if(!he(ne[le],le,ne))return!1;return!0}function Ti(ne,he){for(var le=-1,Ne=ne==null?0:ne.length,nt=0,Ft=[];++le<Ne;){var Er=ne[le];he(Er,le,ne)&&(Ft[nt++]=Er)}return Ft}function Jn(ne,he){var le=ne==null?0:ne.length;return!!le&&Ru(ne,he,0)>-1}function bo(ne,he,le){for(var Ne=-1,nt=ne==null?0:ne.length;++Ne<nt;)if(le(he,ne[Ne]))return!0;return!1}function te(ne,he){for(var le=-1,Ne=ne==null?0:ne.length,nt=Array(Ne);++le<Ne;)nt[le]=he(ne[le],le,ne);return nt}function Oi(ne,he){for(var le=-1,Ne=he.length,nt=ne.length;++le<Ne;)ne[nt+le]=he[le];return ne}function Yc(ne,he,le,Ne){var nt=-1,Ft=ne==null?0:ne.length;for(Ne&&Ft&&(le=ne[++nt]);++nt<Ft;)le=he(le,ne[nt],nt,ne);return le}function nw(ne,he,le,Ne){var nt=ne==null?0:ne.length;for(Ne&&nt&&(le=ne[--nt]);nt--;)le=he(le,ne[nt],nt,ne);return le}function Vh(ne,he){for(var le=-1,Ne=ne==null?0:ne.length;++le<Ne;)if(he(ne[le],le,ne))return!0;return!1}var Ar=Ta("length");function iw(ne){return ne.split("")}function Wc(ne){return ne.match(Ke)||[]}function We(ne,he,le){var Ne;return le(ne,function(nt,Ft,Er){if(he(nt,Ft,Er))return Ne=Ft,!1}),Ne}function Mr(ne,he,le,Ne){for(var nt=ne.length,Ft=le+(Ne?1:-1);Ne?Ft--:++Ft<nt;)if(he(ne[Ft],Ft,ne))return Ft;return-1}function Ru(ne,he,le){return he===he?Xh(ne,he,le):Mr(ne,rs,le)}function zp(ne,he,le,Ne){for(var nt=le-1,Ft=ne.length;++nt<Ft;)if(Ne(ne[nt],he))return nt;return-1}function rs(ne){return ne!==ne}function Xc(ne,he){var le=ne==null?0:ne.length;return le?vl(ne,he)/le:Fe}function Ta(ne){return function(he){return he==null?e:he[ne]}}function ve(ne){return function(he){return ne==null?e:ne[he]}}function Kh(ne,he,le,Ne,nt){return nt(ne,function(Ft,Er,Qt){le=Ne?(Ne=!1,Ft):he(le,Ft,Er,Qt)}),le}function zh(ne,he){var le=ne.length;for(ne.sort(he);le--;)ne[le]=ne[le].value;return ne}function vl(ne,he){for(var le,Ne=-1,nt=ne.length;++Ne<nt;){var Ft=he(ne[Ne]);Ft!==e&&(le=le===e?Ft:le+Ft)}return le}function Jc(ne,he){for(var le=-1,Ne=Array(ne);++le<ne;)Ne[le]=he(le);return Ne}function Gp(ne,he){return te(he,function(le){return[le,ne[le]]})}function Zc(ne){return ne&&ne.slice(0,El(ne)+1).replace(Ra,"")}function Rn(ne){return function(he){return ne(he)}}function yo(ne,he){return te(he,function(le){return ne[le]})}function _o(ne,he){return ne.has(he)}function wl(ne,he){for(var le=-1,Ne=ne.length;++le<Ne&&Ru(he,ne[le],0)>-1;);return le}function Gh(ne,he){for(var le=ne.length;le--&&Ru(he,ne[le],0)>-1;);return le}function Yh(ne,he){for(var le=ne.length,Ne=0;le--;)ne[le]===he&&++Ne;return Ne}var Qc=ve(Lp),Yp=ve(Up);function Wh(ne){return"\\"+Hp[ne]}function Wp(ne,he){return ne==null?e:ne[he]}function Oa(ne){return ts.test(ne)}function Xp(ne){return Eo.test(ne)}function Jp(ne){for(var he,le=[];!(he=ne.next()).done;)le.push(he.value);return le}function ef(ne){var he=-1,le=Array(ne.size);return ne.forEach(function(Ne,nt){le[++he]=[nt,Ne]}),le}function yn(ne,he){return function(le){return ne(he(le))}}function ki(ne,he){for(var le=-1,Ne=ne.length,nt=0,Ft=[];++le<Ne;){var Er=ne[le];(Er===he||Er===l)&&(ne[le]=l,Ft[nt++]=le)}return Ft}function Ni(ne){var he=-1,le=Array(ne.size);return ne.forEach(function(Ne){le[++he]=Ne}),le}function Al(ne){var he=-1,le=Array(ne.size);return ne.forEach(function(Ne){le[++he]=[Ne,Ne]}),le}function Xh(ne,he,le){for(var Ne=le-1,nt=ne.length;++Ne<nt;)if(ne[Ne]===he)return Ne;return-1}function Zp(ne,he,le){for(var Ne=le+1;Ne--;)if(ne[Ne]===he)return Ne;return Ne}function ka(ne){return Oa(ne)?Zh(ne):Ar(ne)}function gi(ne){return Oa(ne)?Qp(ne):iw(ne)}function El(ne){for(var he=ne.length;he--&&re.test(ne.charAt(he)););return he}var Jh=ve(jp);function Zh(ne){for(var he=bn.lastIndex=0;bn.test(ne);)++he;return he}function Qp(ne){return ne.match(bn)||[]}function e1(ne){return ne.match(Pu)||[]}var t1=function ne(he){he=he==null?Hr:ns.defaults(Hr.Object(),he,ns.pick(Hr,kp));var le=he.Array,Ne=he.Date,nt=he.Error,Ft=he.Function,Er=he.Math,Qt=he.Object,bl=he.RegExp,r1=he.String,mi=he.TypeError,yl=le.prototype,Qh=Ft.prototype,Na=Qt.prototype,ys=he["__core-js_shared__"],_l=Qh.toString,Rt=Na.hasOwnProperty,n1=0,Cl=function(){var o=/[^.]+$/.exec(ys&&ys.keys&&ys.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Dl=Na.toString,i1=_l.call(Qt),s1=Hr._,a1=bl("^"+_l.call(Rt).replace(Vs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fl=Nh?he.Buffer:e,Gs=he.Symbol,Sl=he.Uint8Array,ed=Fl?Fl.allocUnsafe:e,Il=yn(Qt.getPrototypeOf,Qt),td=Qt.create,rd=Na.propertyIsEnumerable,jt=yl.splice,nd=Gs?Gs.isConcatSpreadable:e,La=Gs?Gs.iterator:e,Ua=Gs?Gs.toStringTag:e,Bl=function(){try{var o=Io(Qt,"defineProperty");return o({},"",{}),o}catch{}}(),_=he.clearTimeout!==Hr.clearTimeout&&he.clearTimeout,j=Ne&&Ne.now!==Hr.Date.now&&Ne.now,J=he.setTimeout!==Hr.setTimeout&&he.setTimeout,G=Er.ceil,ae=Er.floor,ce=Qt.getOwnPropertySymbols,er=Fl?Fl.isBuffer:e,$r=he.isFinite,s5=yl.join,a5=yn(Qt.keys,Qt),Wr=Er.max,xn=Er.min,u5=Ne.now,o5=he.parseInt,sw=Er.random,l5=yl.reverse,u1=Io(he,"DataView"),tf=Io(he,"Map"),o1=Io(he,"Promise"),$l=Io(he,"Set"),rf=Io(he,"WeakMap"),nf=Io(Qt,"create"),sd=rf&&new rf,Pl={},c5=Bo(u1),f5=Bo(tf),h5=Bo(o1),d5=Bo($l),p5=Bo(rf),ad=Gs?Gs.prototype:e,sf=ad?ad.valueOf:e,aw=ad?ad.toString:e;function M(o){if(Pr(o)&&!lt(o)&&!(o instanceof Ct)){if(o instanceof is)return o;if(Rt.call(o,"__wrapped__"))return uA(o)}return new is(o)}var Rl=function(){function o(){}return function(c){if(!br(c))return{};if(td)return td(c);o.prototype=c;var E=new o;return o.prototype=e,E}}();function ud(){}function is(o,c){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=e}M.templateSettings={escape:li,evaluate:Su,interpolate:Iu,variable:"",imports:{_:M}},M.prototype=ud.prototype,M.prototype.constructor=M,is.prototype=Rl(ud.prototype),is.prototype.constructor=is;function Ct(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Se,this.__views__=[]}function g5(){var o=new Ct(this.__wrapped__);return o.__actions__=vi(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=vi(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=vi(this.__views__),o}function m5(){if(this.__filtered__){var o=new Ct(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function v5(){var o=this.__wrapped__.value(),c=this.__dir__,E=lt(o),I=c<0,x=E?o.length:0,q=BF(0,x,this.__views__),X=q.start,Z=q.end,se=Z-X,Ae=I?Z:X-1,Ee=this.__iteratees__,ye=Ee.length,Pe=0,He=xn(se,this.__takeCount__);if(!E||!I&&x==se&&He==se)return $w(o,this.__actions__);var et=[];e:for(;se--&&Pe<He;){Ae+=c;for(var gt=-1,tt=o[Ae];++gt<ye;){var bt=Ee[gt],St=bt.iteratee,ji=bt.type,ei=St(tt);if(ji==Y)tt=ei;else if(!ei){if(ji==V)continue e;break e}}et[Pe++]=tt}return et}Ct.prototype=Rl(ud.prototype),Ct.prototype.constructor=Ct;function Co(o){var c=-1,E=o==null?0:o.length;for(this.clear();++c<E;){var I=o[c];this.set(I[0],I[1])}}function w5(){this.__data__=nf?nf(null):{},this.size=0}function A5(o){var c=this.has(o)&&delete this.__data__[o];return this.size-=c?1:0,c}function E5(o){var c=this.__data__;if(nf){var E=c[o];return E===s?e:E}return Rt.call(c,o)?c[o]:e}function b5(o){var c=this.__data__;return nf?c[o]!==e:Rt.call(c,o)}function y5(o,c){var E=this.__data__;return this.size+=this.has(o)?0:1,E[o]=nf&&c===e?s:c,this}Co.prototype.clear=w5,Co.prototype.delete=A5,Co.prototype.get=E5,Co.prototype.has=b5,Co.prototype.set=y5;function ja(o){var c=-1,E=o==null?0:o.length;for(this.clear();++c<E;){var I=o[c];this.set(I[0],I[1])}}function _5(){this.__data__=[],this.size=0}function C5(o){var c=this.__data__,E=od(c,o);if(E<0)return!1;var I=c.length-1;return E==I?c.pop():jt.call(c,E,1),--this.size,!0}function D5(o){var c=this.__data__,E=od(c,o);return E<0?e:c[E][1]}function F5(o){return od(this.__data__,o)>-1}function S5(o,c){var E=this.__data__,I=od(E,o);return I<0?(++this.size,E.push([o,c])):E[I][1]=c,this}ja.prototype.clear=_5,ja.prototype.delete=C5,ja.prototype.get=D5,ja.prototype.has=F5,ja.prototype.set=S5;function Ha(o){var c=-1,E=o==null?0:o.length;for(this.clear();++c<E;){var I=o[c];this.set(I[0],I[1])}}function I5(){this.size=0,this.__data__={hash:new Co,map:new(tf||ja),string:new Co}}function B5(o){var c=Ed(this,o).delete(o);return this.size-=c?1:0,c}function $5(o){return Ed(this,o).get(o)}function P5(o){return Ed(this,o).has(o)}function R5(o,c){var E=Ed(this,o),I=E.size;return E.set(o,c),this.size+=E.size==I?0:1,this}Ha.prototype.clear=I5,Ha.prototype.delete=B5,Ha.prototype.get=$5,Ha.prototype.has=P5,Ha.prototype.set=R5;function Do(o){var c=-1,E=o==null?0:o.length;for(this.__data__=new Ha;++c<E;)this.add(o[c])}function x5(o){return this.__data__.set(o,s),this}function T5(o){return this.__data__.has(o)}Do.prototype.add=Do.prototype.push=x5,Do.prototype.has=T5;function _s(o){var c=this.__data__=new ja(o);this.size=c.size}function O5(){this.__data__=new ja,this.size=0}function k5(o){var c=this.__data__,E=c.delete(o);return this.size=c.size,E}function N5(o){return this.__data__.get(o)}function L5(o){return this.__data__.has(o)}function U5(o,c){var E=this.__data__;if(E instanceof ja){var I=E.__data__;if(!tf||I.length<r-1)return I.push([o,c]),this.size=++E.size,this;E=this.__data__=new Ha(I)}return E.set(o,c),this.size=E.size,this}_s.prototype.clear=O5,_s.prototype.delete=k5,_s.prototype.get=N5,_s.prototype.has=L5,_s.prototype.set=U5;function uw(o,c){var E=lt(o),I=!E&&$o(o),x=!E&&!I&&Nu(o),q=!E&&!I&&!x&&kl(o),X=E||I||x||q,Z=X?Jc(o.length,r1):[],se=Z.length;for(var Ae in o)(c||Rt.call(o,Ae))&&!(X&&(Ae=="length"||x&&(Ae=="offset"||Ae=="parent")||q&&(Ae=="buffer"||Ae=="byteLength"||Ae=="byteOffset")||Ka(Ae,se)))&&Z.push(Ae);return Z}function ow(o){var c=o.length;return c?o[A1(0,c-1)]:e}function j5(o,c){return bd(vi(o),Fo(c,0,o.length))}function H5(o){return bd(vi(o))}function l1(o,c,E){(E!==e&&!Cs(o[c],E)||E===e&&!(c in o))&&Ma(o,c,E)}function af(o,c,E){var I=o[c];(!(Rt.call(o,c)&&Cs(I,E))||E===e&&!(c in o))&&Ma(o,c,E)}function od(o,c){for(var E=o.length;E--;)if(Cs(o[E][0],c))return E;return-1}function M5(o,c,E,I){return xu(o,function(x,q,X){c(I,x,E(x),X)}),I}function lw(o,c){return o&&Ws(c,an(c),o)}function q5(o,c){return o&&Ws(c,Ai(c),o)}function Ma(o,c,E){c=="__proto__"&&Bl?Bl(o,c,{configurable:!0,enumerable:!0,value:E,writable:!0}):o[c]=E}function c1(o,c){for(var E=-1,I=c.length,x=le(I),q=o==null;++E<I;)x[E]=q?e:V1(o,c[E]);return x}function Fo(o,c,E){return o===o&&(E!==e&&(o=o<=E?o:E),c!==e&&(o=o>=c?o:c)),o}function ss(o,c,E,I,x,q){var X,Z=c&f,se=c&d,Ae=c&g;if(E&&(X=x?E(o,I,x,q):E(o)),X!==e)return X;if(!br(o))return o;var Ee=lt(o);if(Ee){if(X=PF(o),!Z)return vi(o,X)}else{var ye=Tn(o),Pe=ye==ht||ye==Xt;if(Nu(o))return xw(o,Z);if(ye==Me||ye==Ce||Pe&&!x){if(X=se||Pe?{}:Zw(o),!Z)return se?EF(o,q5(X,o)):AF(o,lw(X,o))}else{if(!tr[ye])return x?o:{};X=RF(o,ye,Z)}}q||(q=new _s);var He=q.get(o);if(He)return He;q.set(o,X),SA(o)?o.forEach(function(tt){X.add(ss(tt,c,E,tt,o,q))}):DA(o)&&o.forEach(function(tt,bt){X.set(bt,ss(tt,c,E,bt,o,q))});var et=Ae?se?$1:B1:se?Ai:an,gt=Ee?e:et(o);return pi(gt||o,function(tt,bt){gt&&(bt=tt,tt=o[bt]),af(X,bt,ss(tt,c,E,bt,o,q))}),X}function V5(o){var c=an(o);return function(E){return cw(E,o,c)}}function cw(o,c,E){var I=E.length;if(o==null)return!I;for(o=Qt(o);I--;){var x=E[I],q=c[x],X=o[x];if(X===e&&!(x in o)||!q(X))return!1}return!0}function fw(o,c,E){if(typeof o!="function")throw new mi(i);return df(function(){o.apply(e,E)},c)}function uf(o,c,E,I){var x=-1,q=Jn,X=!0,Z=o.length,se=[],Ae=c.length;if(!Z)return se;E&&(c=te(c,Rn(E))),I?(q=bo,X=!1):c.length>=r&&(q=_o,X=!1,c=new Do(c));e:for(;++x<Z;){var Ee=o[x],ye=E==null?Ee:E(Ee);if(Ee=I||Ee!==0?Ee:0,X&&ye===ye){for(var Pe=Ae;Pe--;)if(c[Pe]===ye)continue e;se.push(Ee)}else q(c,ye,I)||se.push(Ee)}return se}var xu=Lw(Ys),hw=Lw(h1,!0);function K5(o,c){var E=!0;return xu(o,function(I,x,q){return E=!!c(I,x,q),E}),E}function ld(o,c,E){for(var I=-1,x=o.length;++I<x;){var q=o[I],X=c(q);if(X!=null&&(Z===e?X===X&&!Ui(X):E(X,Z)))var Z=X,se=q}return se}function z5(o,c,E,I){var x=o.length;for(E=dt(E),E<0&&(E=-E>x?0:x+E),I=I===e||I>x?x:dt(I),I<0&&(I+=x),I=E>I?0:BA(I);E<I;)o[E++]=c;return o}function dw(o,c){var E=[];return xu(o,function(I,x,q){c(I,x,q)&&E.push(I)}),E}function _n(o,c,E,I,x){var q=-1,X=o.length;for(E||(E=TF),x||(x=[]);++q<X;){var Z=o[q];c>0&&E(Z)?c>1?_n(Z,c-1,E,I,x):Oi(x,Z):I||(x[x.length]=Z)}return x}var f1=Uw(),pw=Uw(!0);function Ys(o,c){return o&&f1(o,c,an)}function h1(o,c){return o&&pw(o,c,an)}function cd(o,c){return Ti(c,function(E){return za(o[E])})}function So(o,c){c=Ou(c,o);for(var E=0,I=c.length;o!=null&&E<I;)o=o[Xs(c[E++])];return E&&E==I?o:e}function gw(o,c,E){var I=c(o);return lt(o)?I:Oi(I,E(o))}function Zn(o){return o==null?o===e?Ri:fr:Ua&&Ua in Qt(o)?IF(o):HF(o)}function d1(o,c){return o>c}function G5(o,c){return o!=null&&Rt.call(o,c)}function Y5(o,c){return o!=null&&c in Qt(o)}function W5(o,c,E){return o>=xn(c,E)&&o<Wr(c,E)}function p1(o,c,E){for(var I=E?bo:Jn,x=o[0].length,q=o.length,X=q,Z=le(q),se=1/0,Ae=[];X--;){var Ee=o[X];X&&c&&(Ee=te(Ee,Rn(c))),se=xn(Ee.length,se),Z[X]=!E&&(c||x>=120&&Ee.length>=120)?new Do(X&&Ee):e}Ee=o[0];var ye=-1,Pe=Z[0];e:for(;++ye<x&&Ae.length<se;){var He=Ee[ye],et=c?c(He):He;if(He=E||He!==0?He:0,!(Pe?_o(Pe,et):I(Ae,et,E))){for(X=q;--X;){var gt=Z[X];if(!(gt?_o(gt,et):I(o[X],et,E)))continue e}Pe&&Pe.push(et),Ae.push(He)}}return Ae}function X5(o,c,E,I){return Ys(o,function(x,q,X){c(I,E(x),q,X)}),I}function of(o,c,E){c=Ou(c,o),o=rA(o,c);var I=o==null?o:o[Xs(us(c))];return I==null?e:Xn(I,o,E)}function mw(o){return Pr(o)&&Zn(o)==Ce}function J5(o){return Pr(o)&&Zn(o)==je}function Z5(o){return Pr(o)&&Zn(o)==_t}function lf(o,c,E,I,x){return o===c?!0:o==null||c==null||!Pr(o)&&!Pr(c)?o!==o&&c!==c:Q5(o,c,E,I,lf,x)}function Q5(o,c,E,I,x,q){var X=lt(o),Z=lt(c),se=X?Ue:Tn(o),Ae=Z?Ue:Tn(c);se=se==Ce?Me:se,Ae=Ae==Ce?Me:Ae;var Ee=se==Me,ye=Ae==Me,Pe=se==Ae;if(Pe&&Nu(o)){if(!Nu(c))return!1;X=!0,Ee=!1}if(Pe&&!Ee)return q||(q=new _s),X||kl(o)?Ww(o,c,E,I,x,q):FF(o,c,se,E,I,x,q);if(!(E&p)){var He=Ee&&Rt.call(o,"__wrapped__"),et=ye&&Rt.call(c,"__wrapped__");if(He||et){var gt=He?o.value():o,tt=et?c.value():c;return q||(q=new _s),x(gt,tt,E,I,q)}}return Pe?(q||(q=new _s),SF(o,c,E,I,x,q)):!1}function eF(o){return Pr(o)&&Tn(o)==st}function g1(o,c,E,I){var x=E.length,q=x,X=!I;if(o==null)return!q;for(o=Qt(o);x--;){var Z=E[x];if(X&&Z[2]?Z[1]!==o[Z[0]]:!(Z[0]in o))return!1}for(;++x<q;){Z=E[x];var se=Z[0],Ae=o[se],Ee=Z[1];if(X&&Z[2]){if(Ae===e&&!(se in o))return!1}else{var ye=new _s;if(I)var Pe=I(Ae,Ee,se,o,c,ye);if(!(Pe===e?lf(Ee,Ae,p|h,I,ye):Pe))return!1}}return!0}function vw(o){if(!br(o)||kF(o))return!1;var c=za(o)?a1:vn;return c.test(Bo(o))}function tF(o){return Pr(o)&&Zn(o)==ir}function rF(o){return Pr(o)&&Tn(o)==Jt}function nF(o){return Pr(o)&&Sd(o.length)&&!!sr[Zn(o)]}function ww(o){return typeof o=="function"?o:o==null?Ei:typeof o=="object"?lt(o)?bw(o[0],o[1]):Ew(o):jA(o)}function m1(o){if(!hf(o))return a5(o);var c=[];for(var E in Qt(o))Rt.call(o,E)&&E!="constructor"&&c.push(E);return c}function iF(o){if(!br(o))return jF(o);var c=hf(o),E=[];for(var I in o)I=="constructor"&&(c||!Rt.call(o,I))||E.push(I);return E}function v1(o,c){return o<c}function Aw(o,c){var E=-1,I=wi(o)?le(o.length):[];return xu(o,function(x,q,X){I[++E]=c(x,q,X)}),I}function Ew(o){var c=R1(o);return c.length==1&&c[0][2]?eA(c[0][0],c[0][1]):function(E){return E===o||g1(E,o,c)}}function bw(o,c){return T1(o)&&Qw(c)?eA(Xs(o),c):function(E){var I=V1(E,o);return I===e&&I===c?K1(E,o):lf(c,I,p|h)}}function fd(o,c,E,I,x){o!==c&&f1(c,function(q,X){if(x||(x=new _s),br(q))sF(o,c,X,E,fd,I,x);else{var Z=I?I(k1(o,X),q,X+"",o,c,x):e;Z===e&&(Z=q),l1(o,X,Z)}},Ai)}function sF(o,c,E,I,x,q,X){var Z=k1(o,E),se=k1(c,E),Ae=X.get(se);if(Ae){l1(o,E,Ae);return}var Ee=q?q(Z,se,E+"",o,c,X):e,ye=Ee===e;if(ye){var Pe=lt(se),He=!Pe&&Nu(se),et=!Pe&&!He&&kl(se);Ee=se,Pe||He||et?lt(Z)?Ee=Z:kr(Z)?Ee=vi(Z):He?(ye=!1,Ee=xw(se,!0)):et?(ye=!1,Ee=Tw(se,!0)):Ee=[]:pf(se)||$o(se)?(Ee=Z,$o(Z)?Ee=$A(Z):(!br(Z)||za(Z))&&(Ee=Zw(se))):ye=!1}ye&&(X.set(se,Ee),x(Ee,se,I,q,X),X.delete(se)),l1(o,E,Ee)}function yw(o,c){var E=o.length;if(E)return c+=c<0?E:0,Ka(c,E)?o[c]:e}function _w(o,c,E){c.length?c=te(c,function(q){return lt(q)?function(X){return So(X,q.length===1?q[0]:q)}:q}):c=[Ei];var I=-1;c=te(c,Rn(Ze()));var x=Aw(o,function(q,X,Z){var se=te(c,function(Ae){return Ae(q)});return{criteria:se,index:++I,value:q}});return zh(x,function(q,X){return wF(q,X,E)})}function aF(o,c){return Cw(o,c,function(E,I){return K1(o,I)})}function Cw(o,c,E){for(var I=-1,x=c.length,q={};++I<x;){var X=c[I],Z=So(o,X);E(Z,X)&&cf(q,Ou(X,o),Z)}return q}function uF(o){return function(c){return So(c,o)}}function w1(o,c,E,I){var x=I?zp:Ru,q=-1,X=c.length,Z=o;for(o===c&&(c=vi(c)),E&&(Z=te(o,Rn(E)));++q<X;)for(var se=0,Ae=c[q],Ee=E?E(Ae):Ae;(se=x(Z,Ee,se,I))>-1;)Z!==o&&jt.call(Z,se,1),jt.call(o,se,1);return o}function Dw(o,c){for(var E=o?c.length:0,I=E-1;E--;){var x=c[E];if(E==I||x!==q){var q=x;Ka(x)?jt.call(o,x,1):y1(o,x)}}return o}function A1(o,c){return o+ae(sw()*(c-o+1))}function oF(o,c,E,I){for(var x=-1,q=Wr(G((c-o)/(E||1)),0),X=le(q);q--;)X[I?q:++x]=o,o+=E;return X}function E1(o,c){var E="";if(!o||c<1||c>W)return E;do c%2&&(E+=o),c=ae(c/2),c&&(o+=o);while(c);return E}function wt(o,c){return N1(tA(o,c,Ei),o+"")}function lF(o){return ow(Nl(o))}function cF(o,c){var E=Nl(o);return bd(E,Fo(c,0,E.length))}function cf(o,c,E,I){if(!br(o))return o;c=Ou(c,o);for(var x=-1,q=c.length,X=q-1,Z=o;Z!=null&&++x<q;){var se=Xs(c[x]),Ae=E;if(se==="__proto__"||se==="constructor"||se==="prototype")return o;if(x!=X){var Ee=Z[se];Ae=I?I(Ee,se,Z):e,Ae===e&&(Ae=br(Ee)?Ee:Ka(c[x+1])?[]:{})}af(Z,se,Ae),Z=Z[se]}return o}var Fw=sd?function(o,c){return sd.set(o,c),o}:Ei,fF=Bl?function(o,c){return Bl(o,"toString",{configurable:!0,enumerable:!1,value:G1(c),writable:!0})}:Ei;function hF(o){return bd(Nl(o))}function as(o,c,E){var I=-1,x=o.length;c<0&&(c=-c>x?0:x+c),E=E>x?x:E,E<0&&(E+=x),x=c>E?0:E-c>>>0,c>>>=0;for(var q=le(x);++I<x;)q[I]=o[I+c];return q}function dF(o,c){var E;return xu(o,function(I,x,q){return E=c(I,x,q),!E}),!!E}function hd(o,c,E){var I=0,x=o==null?I:o.length;if(typeof c=="number"&&c===c&&x<=Je){for(;I<x;){var q=I+x>>>1,X=o[q];X!==null&&!Ui(X)&&(E?X<=c:X<c)?I=q+1:x=q}return x}return b1(o,c,Ei,E)}function b1(o,c,E,I){var x=0,q=o==null?0:o.length;if(q===0)return 0;c=E(c);for(var X=c!==c,Z=c===null,se=Ui(c),Ae=c===e;x<q;){var Ee=ae((x+q)/2),ye=E(o[Ee]),Pe=ye!==e,He=ye===null,et=ye===ye,gt=Ui(ye);if(X)var tt=I||et;else Ae?tt=et&&(I||Pe):Z?tt=et&&Pe&&(I||!He):se?tt=et&&Pe&&!He&&(I||!gt):He||gt?tt=!1:tt=I?ye<=c:ye<c;tt?x=Ee+1:q=Ee}return xn(q,Re)}function Sw(o,c){for(var E=-1,I=o.length,x=0,q=[];++E<I;){var X=o[E],Z=c?c(X):X;if(!E||!Cs(Z,se)){var se=Z;q[x++]=X===0?0:X}}return q}function Iw(o){return typeof o=="number"?o:Ui(o)?Fe:+o}function Li(o){if(typeof o=="string")return o;if(lt(o))return te(o,Li)+"";if(Ui(o))return aw?aw.call(o):"";var c=o+"";return c=="0"&&1/o==-z?"-0":c}function Tu(o,c,E){var I=-1,x=Jn,q=o.length,X=!0,Z=[],se=Z;if(E)X=!1,x=bo;else if(q>=r){var Ae=c?null:CF(o);if(Ae)return Ni(Ae);X=!1,x=_o,se=new Do}else se=c?[]:Z;e:for(;++I<q;){var Ee=o[I],ye=c?c(Ee):Ee;if(Ee=E||Ee!==0?Ee:0,X&&ye===ye){for(var Pe=se.length;Pe--;)if(se[Pe]===ye)continue e;c&&se.push(ye),Z.push(Ee)}else x(se,ye,E)||(se!==Z&&se.push(ye),Z.push(Ee))}return Z}function y1(o,c){return c=Ou(c,o),o=rA(o,c),o==null||delete o[Xs(us(c))]}function Bw(o,c,E,I){return cf(o,c,E(So(o,c)),I)}function dd(o,c,E,I){for(var x=o.length,q=I?x:-1;(I?q--:++q<x)&&c(o[q],q,o););return E?as(o,I?0:q,I?q+1:x):as(o,I?q+1:0,I?x:q)}function $w(o,c){var E=o;return E instanceof Ct&&(E=E.value()),Yc(c,function(I,x){return x.func.apply(x.thisArg,Oi([I],x.args))},E)}function _1(o,c,E){var I=o.length;if(I<2)return I?Tu(o[0]):[];for(var x=-1,q=le(I);++x<I;)for(var X=o[x],Z=-1;++Z<I;)Z!=x&&(q[x]=uf(q[x]||X,o[Z],c,E));return Tu(_n(q,1),c,E)}function Pw(o,c,E){for(var I=-1,x=o.length,q=c.length,X={};++I<x;){var Z=I<q?c[I]:e;E(X,o[I],Z)}return X}function C1(o){return kr(o)?o:[]}function D1(o){return typeof o=="function"?o:Ei}function Ou(o,c){return lt(o)?o:T1(o,c)?[o]:aA(zt(o))}var pF=wt;function ku(o,c,E){var I=o.length;return E=E===e?I:E,!c&&E>=I?o:as(o,c,E)}var Rw=_||function(o){return Hr.clearTimeout(o)};function xw(o,c){if(c)return o.slice();var E=o.length,I=ed?ed(E):new o.constructor(E);return o.copy(I),I}function F1(o){var c=new o.constructor(o.byteLength);return new Sl(c).set(new Sl(o)),c}function gF(o,c){var E=c?F1(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.byteLength)}function mF(o){var c=new o.constructor(o.source,Vt.exec(o));return c.lastIndex=o.lastIndex,c}function vF(o){return sf?Qt(sf.call(o)):{}}function Tw(o,c){var E=c?F1(o.buffer):o.buffer;return new o.constructor(E,o.byteOffset,o.length)}function Ow(o,c){if(o!==c){var E=o!==e,I=o===null,x=o===o,q=Ui(o),X=c!==e,Z=c===null,se=c===c,Ae=Ui(c);if(!Z&&!Ae&&!q&&o>c||q&&X&&se&&!Z&&!Ae||I&&X&&se||!E&&se||!x)return 1;if(!I&&!q&&!Ae&&o<c||Ae&&E&&x&&!I&&!q||Z&&E&&x||!X&&x||!se)return-1}return 0}function wF(o,c,E){for(var I=-1,x=o.criteria,q=c.criteria,X=x.length,Z=E.length;++I<X;){var se=Ow(x[I],q[I]);if(se){if(I>=Z)return se;var Ae=E[I];return se*(Ae=="desc"?-1:1)}}return o.index-c.index}function kw(o,c,E,I){for(var x=-1,q=o.length,X=E.length,Z=-1,se=c.length,Ae=Wr(q-X,0),Ee=le(se+Ae),ye=!I;++Z<se;)Ee[Z]=c[Z];for(;++x<X;)(ye||x<q)&&(Ee[E[x]]=o[x]);for(;Ae--;)Ee[Z++]=o[x++];return Ee}function Nw(o,c,E,I){for(var x=-1,q=o.length,X=-1,Z=E.length,se=-1,Ae=c.length,Ee=Wr(q-Z,0),ye=le(Ee+Ae),Pe=!I;++x<Ee;)ye[x]=o[x];for(var He=x;++se<Ae;)ye[He+se]=c[se];for(;++X<Z;)(Pe||x<q)&&(ye[He+E[X]]=o[x++]);return ye}function vi(o,c){var E=-1,I=o.length;for(c||(c=le(I));++E<I;)c[E]=o[E];return c}function Ws(o,c,E,I){var x=!E;E||(E={});for(var q=-1,X=c.length;++q<X;){var Z=c[q],se=I?I(E[Z],o[Z],Z,E,o):e;se===e&&(se=o[Z]),x?Ma(E,Z,se):af(E,Z,se)}return E}function AF(o,c){return Ws(o,x1(o),c)}function EF(o,c){return Ws(o,Xw(o),c)}function pd(o,c){return function(E,I){var x=lt(E)?Kp:M5,q=c?c():{};return x(E,o,Ze(I,2),q)}}function xl(o){return wt(function(c,E){var I=-1,x=E.length,q=x>1?E[x-1]:e,X=x>2?E[2]:e;for(q=o.length>3&&typeof q=="function"?(x--,q):e,X&&Qn(E[0],E[1],X)&&(q=x<3?e:q,x=1),c=Qt(c);++I<x;){var Z=E[I];Z&&o(c,Z,I,q)}return c})}function Lw(o,c){return function(E,I){if(E==null)return E;if(!wi(E))return o(E,I);for(var x=E.length,q=c?x:-1,X=Qt(E);(c?q--:++q<x)&&I(X[q],q,X)!==!1;);return E}}function Uw(o){return function(c,E,I){for(var x=-1,q=Qt(c),X=I(c),Z=X.length;Z--;){var se=X[o?Z:++x];if(E(q[se],se,q)===!1)break}return c}}function bF(o,c,E){var I=c&w,x=ff(o);function q(){var X=this&&this!==Hr&&this instanceof q?x:o;return X.apply(I?E:this,arguments)}return q}function jw(o){return function(c){c=zt(c);var E=Oa(c)?gi(c):e,I=E?E[0]:c.charAt(0),x=E?ku(E,1).join(""):c.slice(1);return I[o]()+x}}function Tl(o){return function(c){return Yc(LA(NA(c).replace($u,"")),o,"")}}function ff(o){return function(){var c=arguments;switch(c.length){case 0:return new o;case 1:return new o(c[0]);case 2:return new o(c[0],c[1]);case 3:return new o(c[0],c[1],c[2]);case 4:return new o(c[0],c[1],c[2],c[3]);case 5:return new o(c[0],c[1],c[2],c[3],c[4]);case 6:return new o(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new o(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var E=Rl(o.prototype),I=o.apply(E,c);return br(I)?I:E}}function yF(o,c,E){var I=ff(o);function x(){for(var q=arguments.length,X=le(q),Z=q,se=Ol(x);Z--;)X[Z]=arguments[Z];var Ae=q<3&&X[0]!==se&&X[q-1]!==se?[]:ki(X,se);if(q-=Ae.length,q<E)return Kw(o,c,gd,x.placeholder,e,X,Ae,e,e,E-q);var Ee=this&&this!==Hr&&this instanceof x?I:o;return Xn(Ee,this,X)}return x}function Hw(o){return function(c,E,I){var x=Qt(c);if(!wi(c)){var q=Ze(E,3);c=an(c),E=function(Z){return q(x[Z],Z,x)}}var X=o(c,E,I);return X>-1?x[q?c[X]:X]:e}}function Mw(o){return Va(function(c){var E=c.length,I=E,x=is.prototype.thru;for(o&&c.reverse();I--;){var q=c[I];if(typeof q!="function")throw new mi(i);if(x&&!X&&Ad(q)=="wrapper")var X=new is([],!0)}for(I=X?I:E;++I<E;){q=c[I];var Z=Ad(q),se=Z=="wrapper"?P1(q):e;se&&O1(se[0])&&se[1]==(F|m|D|L)&&!se[4].length&&se[9]==1?X=X[Ad(se[0])].apply(X,se[3]):X=q.length==1&&O1(q)?X[Z]():X.thru(q)}return function(){var Ae=arguments,Ee=Ae[0];if(X&&Ae.length==1&&lt(Ee))return X.plant(Ee).value();for(var ye=0,Pe=E?c[ye].apply(this,Ae):Ee;++ye<E;)Pe=c[ye].call(this,Pe);return Pe}})}function gd(o,c,E,I,x,q,X,Z,se,Ae){var Ee=c&F,ye=c&w,Pe=c&v,He=c&(m|b),et=c&N,gt=Pe?e:ff(o);function tt(){for(var bt=arguments.length,St=le(bt),ji=bt;ji--;)St[ji]=arguments[ji];if(He)var ei=Ol(tt),Hi=Yh(St,ei);if(I&&(St=kw(St,I,x,He)),q&&(St=Nw(St,q,X,He)),bt-=Hi,He&&bt<Ae){var Nr=ki(St,ei);return Kw(o,c,gd,tt.placeholder,E,St,Nr,Z,se,Ae-bt)}var Ds=ye?E:this,Ya=Pe?Ds[o]:o;return bt=St.length,Z?St=MF(St,Z):et&&bt>1&&St.reverse(),Ee&&se<bt&&(St.length=se),this&&this!==Hr&&this instanceof tt&&(Ya=gt||ff(Ya)),Ya.apply(Ds,St)}return tt}function qw(o,c){return function(E,I){return X5(E,o,c(I),{})}}function md(o,c){return function(E,I){var x;if(E===e&&I===e)return c;if(E!==e&&(x=E),I!==e){if(x===e)return I;typeof E=="string"||typeof I=="string"?(E=Li(E),I=Li(I)):(E=Iw(E),I=Iw(I)),x=o(E,I)}return x}}function S1(o){return Va(function(c){return c=te(c,Rn(Ze())),wt(function(E){var I=this;return o(c,function(x){return Xn(x,I,E)})})})}function vd(o,c){c=c===e?" ":Li(c);var E=c.length;if(E<2)return E?E1(c,o):c;var I=E1(c,G(o/ka(c)));return Oa(c)?ku(gi(I),0,o).join(""):I.slice(0,o)}function _F(o,c,E,I){var x=c&w,q=ff(o);function X(){for(var Z=-1,se=arguments.length,Ae=-1,Ee=I.length,ye=le(Ee+se),Pe=this&&this!==Hr&&this instanceof X?q:o;++Ae<Ee;)ye[Ae]=I[Ae];for(;se--;)ye[Ae++]=arguments[++Z];return Xn(Pe,x?E:this,ye)}return X}function Vw(o){return function(c,E,I){return I&&typeof I!="number"&&Qn(c,E,I)&&(E=I=e),c=Ga(c),E===e?(E=c,c=0):E=Ga(E),I=I===e?c<E?1:-1:Ga(I),oF(c,E,I,o)}}function wd(o){return function(c,E){return typeof c=="string"&&typeof E=="string"||(c=os(c),E=os(E)),o(c,E)}}function Kw(o,c,E,I,x,q,X,Z,se,Ae){var Ee=c&m,ye=Ee?X:e,Pe=Ee?e:X,He=Ee?q:e,et=Ee?e:q;c|=Ee?D:C,c&=~(Ee?C:D),c&y||(c&=~(w|v));var gt=[o,c,x,He,ye,et,Pe,Z,se,Ae],tt=E.apply(e,gt);return O1(o)&&nA(tt,gt),tt.placeholder=I,iA(tt,o,c)}function I1(o){var c=Er[o];return function(E,I){if(E=os(E),I=I==null?0:xn(dt(I),292),I&&$r(E)){var x=(zt(E)+"e").split("e"),q=c(x[0]+"e"+(+x[1]+I));return x=(zt(q)+"e").split("e"),+(x[0]+"e"+(+x[1]-I))}return c(E)}}var CF=$l&&1/Ni(new $l([,-0]))[1]==z?function(o){return new $l(o)}:X1;function zw(o){return function(c){var E=Tn(c);return E==st?ef(c):E==Jt?Al(c):Gp(c,o(c))}}function qa(o,c,E,I,x,q,X,Z){var se=c&v;if(!se&&typeof o!="function")throw new mi(i);var Ae=I?I.length:0;if(Ae||(c&=~(D|C),I=x=e),X=X===e?X:Wr(dt(X),0),Z=Z===e?Z:dt(Z),Ae-=x?x.length:0,c&C){var Ee=I,ye=x;I=x=e}var Pe=se?e:P1(o),He=[o,c,E,I,x,Ee,ye,q,X,Z];if(Pe&&UF(He,Pe),o=He[0],c=He[1],E=He[2],I=He[3],x=He[4],Z=He[9]=He[9]===e?se?0:o.length:Wr(He[9]-Ae,0),!Z&&c&(m|b)&&(c&=~(m|b)),!c||c==w)var et=bF(o,c,E);else c==m||c==b?et=yF(o,c,Z):(c==D||c==(w|D))&&!x.length?et=_F(o,c,E,I):et=gd.apply(e,He);var gt=Pe?Fw:nA;return iA(gt(et,He),o,c)}function Gw(o,c,E,I){return o===e||Cs(o,Na[E])&&!Rt.call(I,E)?c:o}function Yw(o,c,E,I,x,q){return br(o)&&br(c)&&(q.set(c,o),fd(o,c,e,Yw,q),q.delete(c)),o}function DF(o){return pf(o)?e:o}function Ww(o,c,E,I,x,q){var X=E&p,Z=o.length,se=c.length;if(Z!=se&&!(X&&se>Z))return!1;var Ae=q.get(o),Ee=q.get(c);if(Ae&&Ee)return Ae==c&&Ee==o;var ye=-1,Pe=!0,He=E&h?new Do:e;for(q.set(o,c),q.set(c,o);++ye<Z;){var et=o[ye],gt=c[ye];if(I)var tt=X?I(gt,et,ye,c,o,q):I(et,gt,ye,o,c,q);if(tt!==e){if(tt)continue;Pe=!1;break}if(He){if(!Vh(c,function(bt,St){if(!_o(He,St)&&(et===bt||x(et,bt,E,I,q)))return He.push(St)})){Pe=!1;break}}else if(!(et===gt||x(et,gt,E,I,q))){Pe=!1;break}}return q.delete(o),q.delete(c),Pe}function FF(o,c,E,I,x,q,X){switch(E){case Ie:if(o.byteLength!=c.byteLength||o.byteOffset!=c.byteOffset)return!1;o=o.buffer,c=c.buffer;case je:return!(o.byteLength!=c.byteLength||!q(new Sl(o),new Sl(c)));case $t:case _t:case Ye:return Cs(+o,+c);case cr:return o.name==c.name&&o.message==c.message;case ir:case vt:return o==c+"";case st:var Z=ef;case Jt:var se=I&p;if(Z||(Z=Ni),o.size!=c.size&&!se)return!1;var Ae=X.get(o);if(Ae)return Ae==c;I|=h,X.set(o,c);var Ee=Ww(Z(o),Z(c),I,x,q,X);return X.delete(o),Ee;case Ur:if(sf)return sf.call(o)==sf.call(c)}return!1}function SF(o,c,E,I,x,q){var X=E&p,Z=B1(o),se=Z.length,Ae=B1(c),Ee=Ae.length;if(se!=Ee&&!X)return!1;for(var ye=se;ye--;){var Pe=Z[ye];if(!(X?Pe in c:Rt.call(c,Pe)))return!1}var He=q.get(o),et=q.get(c);if(He&&et)return He==c&&et==o;var gt=!0;q.set(o,c),q.set(c,o);for(var tt=X;++ye<se;){Pe=Z[ye];var bt=o[Pe],St=c[Pe];if(I)var ji=X?I(St,bt,Pe,c,o,q):I(bt,St,Pe,o,c,q);if(!(ji===e?bt===St||x(bt,St,E,I,q):ji)){gt=!1;break}tt||(tt=Pe=="constructor")}if(gt&&!tt){var ei=o.constructor,Hi=c.constructor;ei!=Hi&&"constructor"in o&&"constructor"in c&&!(typeof ei=="function"&&ei instanceof ei&&typeof Hi=="function"&&Hi instanceof Hi)&&(gt=!1)}return q.delete(o),q.delete(c),gt}function Va(o){return N1(tA(o,e,cA),o+"")}function B1(o){return gw(o,an,x1)}function $1(o){return gw(o,Ai,Xw)}var P1=sd?function(o){return sd.get(o)}:X1;function Ad(o){for(var c=o.name+"",E=Pl[c],I=Rt.call(Pl,c)?E.length:0;I--;){var x=E[I],q=x.func;if(q==null||q==o)return x.name}return c}function Ol(o){var c=Rt.call(M,"placeholder")?M:o;return c.placeholder}function Ze(){var o=M.iteratee||Y1;return o=o===Y1?ww:o,arguments.length?o(arguments[0],arguments[1]):o}function Ed(o,c){var E=o.__data__;return OF(c)?E[typeof c=="string"?"string":"hash"]:E.map}function R1(o){for(var c=an(o),E=c.length;E--;){var I=c[E],x=o[I];c[E]=[I,x,Qw(x)]}return c}function Io(o,c){var E=Wp(o,c);return vw(E)?E:e}function IF(o){var c=Rt.call(o,Ua),E=o[Ua];try{o[Ua]=e;var I=!0}catch{}var x=Dl.call(o);return I&&(c?o[Ua]=E:delete o[Ua]),x}var x1=ce?function(o){return o==null?[]:(o=Qt(o),Ti(ce(o),function(c){return rd.call(o,c)}))}:J1,Xw=ce?function(o){for(var c=[];o;)Oi(c,x1(o)),o=Il(o);return c}:J1,Tn=Zn;(u1&&Tn(new u1(new ArrayBuffer(1)))!=Ie||tf&&Tn(new tf)!=st||o1&&Tn(o1.resolve())!=Nt||$l&&Tn(new $l)!=Jt||rf&&Tn(new rf)!=pn)&&(Tn=function(o){var c=Zn(o),E=c==Me?o.constructor:e,I=E?Bo(E):"";if(I)switch(I){case c5:return Ie;case f5:return st;case h5:return Nt;case d5:return Jt;case p5:return pn}return c});function BF(o,c,E){for(var I=-1,x=E.length;++I<x;){var q=E[I],X=q.size;switch(q.type){case"drop":o+=X;break;case"dropRight":c-=X;break;case"take":c=xn(c,o+X);break;case"takeRight":o=Wr(o,c-X);break}}return{start:o,end:c}}function $F(o){var c=o.match(Le);return c?c[1].split(ke):[]}function Jw(o,c,E){c=Ou(c,o);for(var I=-1,x=c.length,q=!1;++I<x;){var X=Xs(c[I]);if(!(q=o!=null&&E(o,X)))break;o=o[X]}return q||++I!=x?q:(x=o==null?0:o.length,!!x&&Sd(x)&&Ka(X,x)&&(lt(o)||$o(o)))}function PF(o){var c=o.length,E=new o.constructor(c);return c&&typeof o[0]=="string"&&Rt.call(o,"index")&&(E.index=o.index,E.input=o.input),E}function Zw(o){return typeof o.constructor=="function"&&!hf(o)?Rl(Il(o)):{}}function RF(o,c,E){var I=o.constructor;switch(c){case je:return F1(o);case $t:case _t:return new I(+o);case Ie:return gF(o,E);case Fr:case gn:case at:case Pa:case mn:case me:case js:case Pt:case rn:return Tw(o,E);case st:return new I;case Ye:case vt:return new I(o);case ir:return mF(o);case Jt:return new I;case Ur:return vF(o)}}function xF(o,c){var E=c.length;if(!E)return o;var I=E-1;return c[I]=(E>1?"& ":"")+c[I],c=c.join(E>2?", ":" "),o.replace(fe,`{
/* [wrapped with `+c+`] */
`)}function TF(o){return lt(o)||$o(o)||!!(nd&&o&&o[nd])}function Ka(o,c){var E=typeof o;return c=c??W,!!c&&(E=="number"||E!="symbol"&&Sr.test(o))&&o>-1&&o%1==0&&o<c}function Qn(o,c,E){if(!br(E))return!1;var I=typeof c;return(I=="number"?wi(E)&&Ka(c,E.length):I=="string"&&c in E)?Cs(E[c],o):!1}function T1(o,c){if(lt(o))return!1;var E=typeof o;return E=="number"||E=="symbol"||E=="boolean"||o==null||Ui(o)?!0:qs.test(o)||!Bu.test(o)||c!=null&&o in Qt(c)}function OF(o){var c=typeof o;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?o!=="__proto__":o===null}function O1(o){var c=Ad(o),E=M[c];if(typeof E!="function"||!(c in Ct.prototype))return!1;if(o===E)return!0;var I=P1(E);return!!I&&o===I[0]}function kF(o){return!!Cl&&Cl in o}var NF=ys?za:Z1;function hf(o){var c=o&&o.constructor,E=typeof c=="function"&&c.prototype||Na;return o===E}function Qw(o){return o===o&&!br(o)}function eA(o,c){return function(E){return E==null?!1:E[o]===c&&(c!==e||o in Qt(E))}}function LF(o){var c=Dd(o,function(I){return E.size===u&&E.clear(),I}),E=c.cache;return c}function UF(o,c){var E=o[1],I=c[1],x=E|I,q=x<(w|v|F),X=I==F&&E==m||I==F&&E==L&&o[7].length<=c[8]||I==(F|L)&&c[7].length<=c[8]&&E==m;if(!(q||X))return o;I&w&&(o[2]=c[2],x|=E&w?0:y);var Z=c[3];if(Z){var se=o[3];o[3]=se?kw(se,Z,c[4]):Z,o[4]=se?ki(o[3],l):c[4]}return Z=c[5],Z&&(se=o[5],o[5]=se?Nw(se,Z,c[6]):Z,o[6]=se?ki(o[5],l):c[6]),Z=c[7],Z&&(o[7]=Z),I&F&&(o[8]=o[8]==null?c[8]:xn(o[8],c[8])),o[9]==null&&(o[9]=c[9]),o[0]=c[0],o[1]=x,o}function jF(o){var c=[];if(o!=null)for(var E in Qt(o))c.push(E);return c}function HF(o){return Dl.call(o)}function tA(o,c,E){return c=Wr(c===e?o.length-1:c,0),function(){for(var I=arguments,x=-1,q=Wr(I.length-c,0),X=le(q);++x<q;)X[x]=I[c+x];x=-1;for(var Z=le(c+1);++x<c;)Z[x]=I[x];return Z[c]=E(X),Xn(o,this,Z)}}function rA(o,c){return c.length<2?o:So(o,as(c,0,-1))}function MF(o,c){for(var E=o.length,I=xn(c.length,E),x=vi(o);I--;){var q=c[I];o[I]=Ka(q,E)?x[q]:e}return o}function k1(o,c){if(!(c==="constructor"&&typeof o[c]=="function")&&c!="__proto__")return o[c]}var nA=sA(Fw),df=J||function(o,c){return Hr.setTimeout(o,c)},N1=sA(fF);function iA(o,c,E){var I=c+"";return N1(o,xF(I,qF($F(I),E)))}function sA(o){var c=0,E=0;return function(){var I=u5(),x=U-(I-E);if(E=I,x>0){if(++c>=T)return arguments[0]}else c=0;return o.apply(e,arguments)}}function bd(o,c){var E=-1,I=o.length,x=I-1;for(c=c===e?I:c;++E<c;){var q=A1(E,x),X=o[q];o[q]=o[E],o[E]=X}return o.length=c,o}var aA=LF(function(o){var c=[];return o.charCodeAt(0)===46&&c.push(""),o.replace(co,function(E,I,x,q){c.push(x?q.replace(ft,"$1"):I||E)}),c});function Xs(o){if(typeof o=="string"||Ui(o))return o;var c=o+"";return c=="0"&&1/o==-z?"-0":c}function Bo(o){if(o!=null){try{return _l.call(o)}catch{}try{return o+""}catch{}}return""}function qF(o,c){return pi(ue,function(E){var I="_."+E[0];c&E[1]&&!Jn(o,I)&&o.push(I)}),o.sort()}function uA(o){if(o instanceof Ct)return o.clone();var c=new is(o.__wrapped__,o.__chain__);return c.__actions__=vi(o.__actions__),c.__index__=o.__index__,c.__values__=o.__values__,c}function VF(o,c,E){(E?Qn(o,c,E):c===e)?c=1:c=Wr(dt(c),0);var I=o==null?0:o.length;if(!I||c<1)return[];for(var x=0,q=0,X=le(G(I/c));x<I;)X[q++]=as(o,x,x+=c);return X}function KF(o){for(var c=-1,E=o==null?0:o.length,I=0,x=[];++c<E;){var q=o[c];q&&(x[I++]=q)}return x}function zF(){var o=arguments.length;if(!o)return[];for(var c=le(o-1),E=arguments[0],I=o;I--;)c[I-1]=arguments[I];return Oi(lt(E)?vi(E):[E],_n(c,1))}var GF=wt(function(o,c){return kr(o)?uf(o,_n(c,1,kr,!0)):[]}),YF=wt(function(o,c){var E=us(c);return kr(E)&&(E=e),kr(o)?uf(o,_n(c,1,kr,!0),Ze(E,2)):[]}),WF=wt(function(o,c){var E=us(c);return kr(E)&&(E=e),kr(o)?uf(o,_n(c,1,kr,!0),e,E):[]});function XF(o,c,E){var I=o==null?0:o.length;return I?(c=E||c===e?1:dt(c),as(o,c<0?0:c,I)):[]}function JF(o,c,E){var I=o==null?0:o.length;return I?(c=E||c===e?1:dt(c),c=I-c,as(o,0,c<0?0:c)):[]}function ZF(o,c){return o&&o.length?dd(o,Ze(c,3),!0,!0):[]}function QF(o,c){return o&&o.length?dd(o,Ze(c,3),!0):[]}function e8(o,c,E,I){var x=o==null?0:o.length;return x?(E&&typeof E!="number"&&Qn(o,c,E)&&(E=0,I=x),z5(o,c,E,I)):[]}function oA(o,c,E){var I=o==null?0:o.length;if(!I)return-1;var x=E==null?0:dt(E);return x<0&&(x=Wr(I+x,0)),Mr(o,Ze(c,3),x)}function lA(o,c,E){var I=o==null?0:o.length;if(!I)return-1;var x=I-1;return E!==e&&(x=dt(E),x=E<0?Wr(I+x,0):xn(x,I-1)),Mr(o,Ze(c,3),x,!0)}function cA(o){var c=o==null?0:o.length;return c?_n(o,1):[]}function t8(o){var c=o==null?0:o.length;return c?_n(o,z):[]}function r8(o,c){var E=o==null?0:o.length;return E?(c=c===e?1:dt(c),_n(o,c)):[]}function n8(o){for(var c=-1,E=o==null?0:o.length,I={};++c<E;){var x=o[c];I[x[0]]=x[1]}return I}function fA(o){return o&&o.length?o[0]:e}function i8(o,c,E){var I=o==null?0:o.length;if(!I)return-1;var x=E==null?0:dt(E);return x<0&&(x=Wr(I+x,0)),Ru(o,c,x)}function s8(o){var c=o==null?0:o.length;return c?as(o,0,-1):[]}var a8=wt(function(o){var c=te(o,C1);return c.length&&c[0]===o[0]?p1(c):[]}),u8=wt(function(o){var c=us(o),E=te(o,C1);return c===us(E)?c=e:E.pop(),E.length&&E[0]===o[0]?p1(E,Ze(c,2)):[]}),o8=wt(function(o){var c=us(o),E=te(o,C1);return c=typeof c=="function"?c:e,c&&E.pop(),E.length&&E[0]===o[0]?p1(E,e,c):[]});function l8(o,c){return o==null?"":s5.call(o,c)}function us(o){var c=o==null?0:o.length;return c?o[c-1]:e}function c8(o,c,E){var I=o==null?0:o.length;if(!I)return-1;var x=I;return E!==e&&(x=dt(E),x=x<0?Wr(I+x,0):xn(x,I-1)),c===c?Zp(o,c,x):Mr(o,rs,x,!0)}function f8(o,c){return o&&o.length?yw(o,dt(c)):e}var h8=wt(hA);function hA(o,c){return o&&o.length&&c&&c.length?w1(o,c):o}function d8(o,c,E){return o&&o.length&&c&&c.length?w1(o,c,Ze(E,2)):o}function p8(o,c,E){return o&&o.length&&c&&c.length?w1(o,c,e,E):o}var g8=Va(function(o,c){var E=o==null?0:o.length,I=c1(o,c);return Dw(o,te(c,function(x){return Ka(x,E)?+x:x}).sort(Ow)),I});function m8(o,c){var E=[];if(!(o&&o.length))return E;var I=-1,x=[],q=o.length;for(c=Ze(c,3);++I<q;){var X=o[I];c(X,I,o)&&(E.push(X),x.push(I))}return Dw(o,x),E}function L1(o){return o==null?o:l5.call(o)}function v8(o,c,E){var I=o==null?0:o.length;return I?(E&&typeof E!="number"&&Qn(o,c,E)?(c=0,E=I):(c=c==null?0:dt(c),E=E===e?I:dt(E)),as(o,c,E)):[]}function w8(o,c){return hd(o,c)}function A8(o,c,E){return b1(o,c,Ze(E,2))}function E8(o,c){var E=o==null?0:o.length;if(E){var I=hd(o,c);if(I<E&&Cs(o[I],c))return I}return-1}function b8(o,c){return hd(o,c,!0)}function y8(o,c,E){return b1(o,c,Ze(E,2),!0)}function _8(o,c){var E=o==null?0:o.length;if(E){var I=hd(o,c,!0)-1;if(Cs(o[I],c))return I}return-1}function C8(o){return o&&o.length?Sw(o):[]}function D8(o,c){return o&&o.length?Sw(o,Ze(c,2)):[]}function F8(o){var c=o==null?0:o.length;return c?as(o,1,c):[]}function S8(o,c,E){return o&&o.length?(c=E||c===e?1:dt(c),as(o,0,c<0?0:c)):[]}function I8(o,c,E){var I=o==null?0:o.length;return I?(c=E||c===e?1:dt(c),c=I-c,as(o,c<0?0:c,I)):[]}function B8(o,c){return o&&o.length?dd(o,Ze(c,3),!1,!0):[]}function $8(o,c){return o&&o.length?dd(o,Ze(c,3)):[]}var P8=wt(function(o){return Tu(_n(o,1,kr,!0))}),R8=wt(function(o){var c=us(o);return kr(c)&&(c=e),Tu(_n(o,1,kr,!0),Ze(c,2))}),x8=wt(function(o){var c=us(o);return c=typeof c=="function"?c:e,Tu(_n(o,1,kr,!0),e,c)});function T8(o){return o&&o.length?Tu(o):[]}function O8(o,c){return o&&o.length?Tu(o,Ze(c,2)):[]}function k8(o,c){return c=typeof c=="function"?c:e,o&&o.length?Tu(o,e,c):[]}function U1(o){if(!(o&&o.length))return[];var c=0;return o=Ti(o,function(E){if(kr(E))return c=Wr(E.length,c),!0}),Jc(c,function(E){return te(o,Ta(E))})}function dA(o,c){if(!(o&&o.length))return[];var E=U1(o);return c==null?E:te(E,function(I){return Xn(c,e,I)})}var N8=wt(function(o,c){return kr(o)?uf(o,c):[]}),L8=wt(function(o){return _1(Ti(o,kr))}),U8=wt(function(o){var c=us(o);return kr(c)&&(c=e),_1(Ti(o,kr),Ze(c,2))}),j8=wt(function(o){var c=us(o);return c=typeof c=="function"?c:e,_1(Ti(o,kr),e,c)}),H8=wt(U1);function M8(o,c){return Pw(o||[],c||[],af)}function q8(o,c){return Pw(o||[],c||[],cf)}var V8=wt(function(o){var c=o.length,E=c>1?o[c-1]:e;return E=typeof E=="function"?(o.pop(),E):e,dA(o,E)});function pA(o){var c=M(o);return c.__chain__=!0,c}function K8(o,c){return c(o),o}function yd(o,c){return c(o)}var z8=Va(function(o){var c=o.length,E=c?o[0]:0,I=this.__wrapped__,x=function(q){return c1(q,o)};return c>1||this.__actions__.length||!(I instanceof Ct)||!Ka(E)?this.thru(x):(I=I.slice(E,+E+(c?1:0)),I.__actions__.push({func:yd,args:[x],thisArg:e}),new is(I,this.__chain__).thru(function(q){return c&&!q.length&&q.push(e),q}))});function G8(){return pA(this)}function Y8(){return new is(this.value(),this.__chain__)}function W8(){this.__values__===e&&(this.__values__=IA(this.value()));var o=this.__index__>=this.__values__.length,c=o?e:this.__values__[this.__index__++];return{done:o,value:c}}function X8(){return this}function J8(o){for(var c,E=this;E instanceof ud;){var I=uA(E);I.__index__=0,I.__values__=e,c?x.__wrapped__=I:c=I;var x=I;E=E.__wrapped__}return x.__wrapped__=o,c}function Z8(){var o=this.__wrapped__;if(o instanceof Ct){var c=o;return this.__actions__.length&&(c=new Ct(this)),c=c.reverse(),c.__actions__.push({func:yd,args:[L1],thisArg:e}),new is(c,this.__chain__)}return this.thru(L1)}function Q8(){return $w(this.__wrapped__,this.__actions__)}var eS=pd(function(o,c,E){Rt.call(o,E)?++o[E]:Ma(o,E,1)});function tS(o,c,E){var I=lt(o)?ot:K5;return E&&Qn(o,c,E)&&(c=e),I(o,Ze(c,3))}function rS(o,c){var E=lt(o)?Ti:dw;return E(o,Ze(c,3))}var nS=Hw(oA),iS=Hw(lA);function sS(o,c){return _n(_d(o,c),1)}function aS(o,c){return _n(_d(o,c),z)}function uS(o,c,E){return E=E===e?1:dt(E),_n(_d(o,c),E)}function gA(o,c){var E=lt(o)?pi:xu;return E(o,Ze(c,3))}function mA(o,c){var E=lt(o)?P:hw;return E(o,Ze(c,3))}var oS=pd(function(o,c,E){Rt.call(o,E)?o[E].push(c):Ma(o,E,[c])});function lS(o,c,E,I){o=wi(o)?o:Nl(o),E=E&&!I?dt(E):0;var x=o.length;return E<0&&(E=Wr(x+E,0)),Id(o)?E<=x&&o.indexOf(c,E)>-1:!!x&&Ru(o,c,E)>-1}var cS=wt(function(o,c,E){var I=-1,x=typeof c=="function",q=wi(o)?le(o.length):[];return xu(o,function(X){q[++I]=x?Xn(c,X,E):of(X,c,E)}),q}),fS=pd(function(o,c,E){Ma(o,E,c)});function _d(o,c){var E=lt(o)?te:Aw;return E(o,Ze(c,3))}function hS(o,c,E,I){return o==null?[]:(lt(c)||(c=c==null?[]:[c]),E=I?e:E,lt(E)||(E=E==null?[]:[E]),_w(o,c,E))}var dS=pd(function(o,c,E){o[E?0:1].push(c)},function(){return[[],[]]});function pS(o,c,E){var I=lt(o)?Yc:Kh,x=arguments.length<3;return I(o,Ze(c,4),E,x,xu)}function gS(o,c,E){var I=lt(o)?nw:Kh,x=arguments.length<3;return I(o,Ze(c,4),E,x,hw)}function mS(o,c){var E=lt(o)?Ti:dw;return E(o,Fd(Ze(c,3)))}function vS(o){var c=lt(o)?ow:lF;return c(o)}function wS(o,c,E){(E?Qn(o,c,E):c===e)?c=1:c=dt(c);var I=lt(o)?j5:cF;return I(o,c)}function AS(o){var c=lt(o)?H5:hF;return c(o)}function ES(o){if(o==null)return 0;if(wi(o))return Id(o)?ka(o):o.length;var c=Tn(o);return c==st||c==Jt?o.size:m1(o).length}function bS(o,c,E){var I=lt(o)?Vh:dF;return E&&Qn(o,c,E)&&(c=e),I(o,Ze(c,3))}var yS=wt(function(o,c){if(o==null)return[];var E=c.length;return E>1&&Qn(o,c[0],c[1])?c=[]:E>2&&Qn(c[0],c[1],c[2])&&(c=[c[0]]),_w(o,_n(c,1),[])}),Cd=j||function(){return Hr.Date.now()};function _S(o,c){if(typeof c!="function")throw new mi(i);return o=dt(o),function(){if(--o<1)return c.apply(this,arguments)}}function vA(o,c,E){return c=E?e:c,c=o&&c==null?o.length:c,qa(o,F,e,e,e,e,c)}function wA(o,c){var E;if(typeof c!="function")throw new mi(i);return o=dt(o),function(){return--o>0&&(E=c.apply(this,arguments)),o<=1&&(c=e),E}}var j1=wt(function(o,c,E){var I=w;if(E.length){var x=ki(E,Ol(j1));I|=D}return qa(o,I,c,E,x)}),AA=wt(function(o,c,E){var I=w|v;if(E.length){var x=ki(E,Ol(AA));I|=D}return qa(c,I,o,E,x)});function EA(o,c,E){c=E?e:c;var I=qa(o,m,e,e,e,e,e,c);return I.placeholder=EA.placeholder,I}function bA(o,c,E){c=E?e:c;var I=qa(o,b,e,e,e,e,e,c);return I.placeholder=bA.placeholder,I}function yA(o,c,E){var I,x,q,X,Z,se,Ae=0,Ee=!1,ye=!1,Pe=!0;if(typeof o!="function")throw new mi(i);c=os(c)||0,br(E)&&(Ee=!!E.leading,ye="maxWait"in E,q=ye?Wr(os(E.maxWait)||0,c):q,Pe="trailing"in E?!!E.trailing:Pe);function He(Nr){var Ds=I,Ya=x;return I=x=e,Ae=Nr,X=o.apply(Ya,Ds),X}function et(Nr){return Ae=Nr,Z=df(bt,c),Ee?He(Nr):X}function gt(Nr){var Ds=Nr-se,Ya=Nr-Ae,HA=c-Ds;return ye?xn(HA,q-Ya):HA}function tt(Nr){var Ds=Nr-se,Ya=Nr-Ae;return se===e||Ds>=c||Ds<0||ye&&Ya>=q}function bt(){var Nr=Cd();if(tt(Nr))return St(Nr);Z=df(bt,gt(Nr))}function St(Nr){return Z=e,Pe&&I?He(Nr):(I=x=e,X)}function ji(){Z!==e&&Rw(Z),Ae=0,I=se=x=Z=e}function ei(){return Z===e?X:St(Cd())}function Hi(){var Nr=Cd(),Ds=tt(Nr);if(I=arguments,x=this,se=Nr,Ds){if(Z===e)return et(se);if(ye)return Rw(Z),Z=df(bt,c),He(se)}return Z===e&&(Z=df(bt,c)),X}return Hi.cancel=ji,Hi.flush=ei,Hi}var CS=wt(function(o,c){return fw(o,1,c)}),DS=wt(function(o,c,E){return fw(o,os(c)||0,E)});function FS(o){return qa(o,N)}function Dd(o,c){if(typeof o!="function"||c!=null&&typeof c!="function")throw new mi(i);var E=function(){var I=arguments,x=c?c.apply(this,I):I[0],q=E.cache;if(q.has(x))return q.get(x);var X=o.apply(this,I);return E.cache=q.set(x,X)||q,X};return E.cache=new(Dd.Cache||Ha),E}Dd.Cache=Ha;function Fd(o){if(typeof o!="function")throw new mi(i);return function(){var c=arguments;switch(c.length){case 0:return!o.call(this);case 1:return!o.call(this,c[0]);case 2:return!o.call(this,c[0],c[1]);case 3:return!o.call(this,c[0],c[1],c[2])}return!o.apply(this,c)}}function SS(o){return wA(2,o)}var IS=pF(function(o,c){c=c.length==1&&lt(c[0])?te(c[0],Rn(Ze())):te(_n(c,1),Rn(Ze()));var E=c.length;return wt(function(I){for(var x=-1,q=xn(I.length,E);++x<q;)I[x]=c[x].call(this,I[x]);return Xn(o,this,I)})}),H1=wt(function(o,c){var E=ki(c,Ol(H1));return qa(o,D,e,c,E)}),_A=wt(function(o,c){var E=ki(c,Ol(_A));return qa(o,C,e,c,E)}),BS=Va(function(o,c){return qa(o,L,e,e,e,c)});function $S(o,c){if(typeof o!="function")throw new mi(i);return c=c===e?c:dt(c),wt(o,c)}function PS(o,c){if(typeof o!="function")throw new mi(i);return c=c==null?0:Wr(dt(c),0),wt(function(E){var I=E[c],x=ku(E,0,c);return I&&Oi(x,I),Xn(o,this,x)})}function RS(o,c,E){var I=!0,x=!0;if(typeof o!="function")throw new mi(i);return br(E)&&(I="leading"in E?!!E.leading:I,x="trailing"in E?!!E.trailing:x),yA(o,c,{leading:I,maxWait:c,trailing:x})}function xS(o){return vA(o,1)}function TS(o,c){return H1(D1(c),o)}function OS(){if(!arguments.length)return[];var o=arguments[0];return lt(o)?o:[o]}function kS(o){return ss(o,g)}function NS(o,c){return c=typeof c=="function"?c:e,ss(o,g,c)}function LS(o){return ss(o,f|g)}function US(o,c){return c=typeof c=="function"?c:e,ss(o,f|g,c)}function jS(o,c){return c==null||cw(o,c,an(c))}function Cs(o,c){return o===c||o!==o&&c!==c}var HS=wd(d1),MS=wd(function(o,c){return o>=c}),$o=mw(function(){return arguments}())?mw:function(o){return Pr(o)&&Rt.call(o,"callee")&&!rd.call(o,"callee")},lt=le.isArray,qS=Lh?Rn(Lh):J5;function wi(o){return o!=null&&Sd(o.length)&&!za(o)}function kr(o){return Pr(o)&&wi(o)}function VS(o){return o===!0||o===!1||Pr(o)&&Zn(o)==$t}var Nu=er||Z1,KS=Uh?Rn(Uh):Z5;function zS(o){return Pr(o)&&o.nodeType===1&&!pf(o)}function GS(o){if(o==null)return!0;if(wi(o)&&(lt(o)||typeof o=="string"||typeof o.splice=="function"||Nu(o)||kl(o)||$o(o)))return!o.length;var c=Tn(o);if(c==st||c==Jt)return!o.size;if(hf(o))return!m1(o).length;for(var E in o)if(Rt.call(o,E))return!1;return!0}function YS(o,c){return lf(o,c)}function WS(o,c,E){E=typeof E=="function"?E:e;var I=E?E(o,c):e;return I===e?lf(o,c,e,E):!!I}function M1(o){if(!Pr(o))return!1;var c=Zn(o);return c==cr||c==Dr||typeof o.message=="string"&&typeof o.name=="string"&&!pf(o)}function XS(o){return typeof o=="number"&&$r(o)}function za(o){if(!br(o))return!1;var c=Zn(o);return c==ht||c==Xt||c==or||c==dn}function CA(o){return typeof o=="number"&&o==dt(o)}function Sd(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=W}function br(o){var c=typeof o;return o!=null&&(c=="object"||c=="function")}function Pr(o){return o!=null&&typeof o=="object"}var DA=jh?Rn(jh):eF;function JS(o,c){return o===c||g1(o,c,R1(c))}function ZS(o,c,E){return E=typeof E=="function"?E:e,g1(o,c,R1(c),E)}function QS(o){return FA(o)&&o!=+o}function eI(o){if(NF(o))throw new nt(n);return vw(o)}function tI(o){return o===null}function rI(o){return o==null}function FA(o){return typeof o=="number"||Pr(o)&&Zn(o)==Ye}function pf(o){if(!Pr(o)||Zn(o)!=Me)return!1;var c=Il(o);if(c===null)return!0;var E=Rt.call(c,"constructor")&&c.constructor;return typeof E=="function"&&E instanceof E&&_l.call(E)==i1}var q1=Hh?Rn(Hh):tF;function nI(o){return CA(o)&&o>=-W&&o<=W}var SA=Mh?Rn(Mh):rF;function Id(o){return typeof o=="string"||!lt(o)&&Pr(o)&&Zn(o)==vt}function Ui(o){return typeof o=="symbol"||Pr(o)&&Zn(o)==Ur}var kl=qh?Rn(qh):nF;function iI(o){return o===e}function sI(o){return Pr(o)&&Tn(o)==pn}function aI(o){return Pr(o)&&Zn(o)==Dt}var uI=wd(v1),oI=wd(function(o,c){return o<=c});function IA(o){if(!o)return[];if(wi(o))return Id(o)?gi(o):vi(o);if(La&&o[La])return Jp(o[La]());var c=Tn(o),E=c==st?ef:c==Jt?Ni:Nl;return E(o)}function Ga(o){if(!o)return o===0?o:0;if(o=os(o),o===z||o===-z){var c=o<0?-1:1;return c*ie}return o===o?o:0}function dt(o){var c=Ga(o),E=c%1;return c===c?E?c-E:c:0}function BA(o){return o?Fo(dt(o),0,Se):0}function os(o){if(typeof o=="number")return o;if(Ui(o))return Fe;if(br(o)){var c=typeof o.valueOf=="function"?o.valueOf():o;o=br(c)?c+"":c}if(typeof o!="string")return o===0?o:+o;o=Zc(o);var E=es.test(o);return E||Pn.test(o)?qp(o.slice(2),E?2:8):ci.test(o)?Fe:+o}function $A(o){return Ws(o,Ai(o))}function lI(o){return o?Fo(dt(o),-W,W):o===0?o:0}function zt(o){return o==null?"":Li(o)}var cI=xl(function(o,c){if(hf(c)||wi(c)){Ws(c,an(c),o);return}for(var E in c)Rt.call(c,E)&&af(o,E,c[E])}),PA=xl(function(o,c){Ws(c,Ai(c),o)}),Bd=xl(function(o,c,E,I){Ws(c,Ai(c),o,I)}),fI=xl(function(o,c,E,I){Ws(c,an(c),o,I)}),hI=Va(c1);function dI(o,c){var E=Rl(o);return c==null?E:lw(E,c)}var pI=wt(function(o,c){o=Qt(o);var E=-1,I=c.length,x=I>2?c[2]:e;for(x&&Qn(c[0],c[1],x)&&(I=1);++E<I;)for(var q=c[E],X=Ai(q),Z=-1,se=X.length;++Z<se;){var Ae=X[Z],Ee=o[Ae];(Ee===e||Cs(Ee,Na[Ae])&&!Rt.call(o,Ae))&&(o[Ae]=q[Ae])}return o}),gI=wt(function(o){return o.push(e,Yw),Xn(RA,e,o)});function mI(o,c){return We(o,Ze(c,3),Ys)}function vI(o,c){return We(o,Ze(c,3),h1)}function wI(o,c){return o==null?o:f1(o,Ze(c,3),Ai)}function AI(o,c){return o==null?o:pw(o,Ze(c,3),Ai)}function EI(o,c){return o&&Ys(o,Ze(c,3))}function bI(o,c){return o&&h1(o,Ze(c,3))}function yI(o){return o==null?[]:cd(o,an(o))}function _I(o){return o==null?[]:cd(o,Ai(o))}function V1(o,c,E){var I=o==null?e:So(o,c);return I===e?E:I}function CI(o,c){return o!=null&&Jw(o,c,G5)}function K1(o,c){return o!=null&&Jw(o,c,Y5)}var DI=qw(function(o,c,E){c!=null&&typeof c.toString!="function"&&(c=Dl.call(c)),o[c]=E},G1(Ei)),FI=qw(function(o,c,E){c!=null&&typeof c.toString!="function"&&(c=Dl.call(c)),Rt.call(o,c)?o[c].push(E):o[c]=[E]},Ze),SI=wt(of);function an(o){return wi(o)?uw(o):m1(o)}function Ai(o){return wi(o)?uw(o,!0):iF(o)}function II(o,c){var E={};return c=Ze(c,3),Ys(o,function(I,x,q){Ma(E,c(I,x,q),I)}),E}function BI(o,c){var E={};return c=Ze(c,3),Ys(o,function(I,x,q){Ma(E,x,c(I,x,q))}),E}var $I=xl(function(o,c,E){fd(o,c,E)}),RA=xl(function(o,c,E,I){fd(o,c,E,I)}),PI=Va(function(o,c){var E={};if(o==null)return E;var I=!1;c=te(c,function(q){return q=Ou(q,o),I||(I=q.length>1),q}),Ws(o,$1(o),E),I&&(E=ss(E,f|d|g,DF));for(var x=c.length;x--;)y1(E,c[x]);return E});function RI(o,c){return xA(o,Fd(Ze(c)))}var xI=Va(function(o,c){return o==null?{}:aF(o,c)});function xA(o,c){if(o==null)return{};var E=te($1(o),function(I){return[I]});return c=Ze(c),Cw(o,E,function(I,x){return c(I,x[0])})}function TI(o,c,E){c=Ou(c,o);var I=-1,x=c.length;for(x||(x=1,o=e);++I<x;){var q=o==null?e:o[Xs(c[I])];q===e&&(I=x,q=E),o=za(q)?q.call(o):q}return o}function OI(o,c,E){return o==null?o:cf(o,c,E)}function kI(o,c,E,I){return I=typeof I=="function"?I:e,o==null?o:cf(o,c,E,I)}var TA=zw(an),OA=zw(Ai);function NI(o,c,E){var I=lt(o),x=I||Nu(o)||kl(o);if(c=Ze(c,4),E==null){var q=o&&o.constructor;x?E=I?new q:[]:br(o)?E=za(q)?Rl(Il(o)):{}:E={}}return(x?pi:Ys)(o,function(X,Z,se){return c(E,X,Z,se)}),E}function LI(o,c){return o==null?!0:y1(o,c)}function UI(o,c,E){return o==null?o:Bw(o,c,D1(E))}function jI(o,c,E,I){return I=typeof I=="function"?I:e,o==null?o:Bw(o,c,D1(E),I)}function Nl(o){return o==null?[]:yo(o,an(o))}function HI(o){return o==null?[]:yo(o,Ai(o))}function MI(o,c,E){return E===e&&(E=c,c=e),E!==e&&(E=os(E),E=E===E?E:0),c!==e&&(c=os(c),c=c===c?c:0),Fo(os(o),c,E)}function qI(o,c,E){return c=Ga(c),E===e?(E=c,c=0):E=Ga(E),o=os(o),W5(o,c,E)}function VI(o,c,E){if(E&&typeof E!="boolean"&&Qn(o,c,E)&&(c=E=e),E===e&&(typeof c=="boolean"?(E=c,c=e):typeof o=="boolean"&&(E=o,o=e)),o===e&&c===e?(o=0,c=1):(o=Ga(o),c===e?(c=o,o=0):c=Ga(c)),o>c){var I=o;o=c,c=I}if(E||o%1||c%1){var x=sw();return xn(o+x*(c-o+Mp("1e-"+((x+"").length-1))),c)}return A1(o,c)}var KI=Tl(function(o,c,E){return c=c.toLowerCase(),o+(E?kA(c):c)});function kA(o){return z1(zt(o).toLowerCase())}function NA(o){return o=zt(o),o&&o.replace(wn,Qc).replace(Wn,"")}function zI(o,c,E){o=zt(o),c=Li(c);var I=o.length;E=E===e?I:Fo(dt(E),0,I);var x=E;return E-=c.length,E>=0&&o.slice(E,x)==c}function GI(o){return o=zt(o),o&&Lt.test(o)?o.replace(Ms,Yp):o}function YI(o){return o=zt(o),o&&fo.test(o)?o.replace(Vs,"\\$&"):o}var WI=Tl(function(o,c,E){return o+(E?"-":"")+c.toLowerCase()}),XI=Tl(function(o,c,E){return o+(E?" ":"")+c.toLowerCase()}),JI=jw("toLowerCase");function ZI(o,c,E){o=zt(o),c=dt(c);var I=c?ka(o):0;if(!c||I>=c)return o;var x=(c-I)/2;return vd(ae(x),E)+o+vd(G(x),E)}function QI(o,c,E){o=zt(o),c=dt(c);var I=c?ka(o):0;return c&&I<c?o+vd(c-I,E):o}function eB(o,c,E){o=zt(o),c=dt(c);var I=c?ka(o):0;return c&&I<c?vd(c-I,E)+o:o}function tB(o,c,E){return E||c==null?c=0:c&&(c=+c),o5(zt(o).replace(Ra,""),c||0)}function rB(o,c,E){return(E?Qn(o,c,E):c===e)?c=1:c=dt(c),E1(zt(o),c)}function nB(){var o=arguments,c=zt(o[0]);return o.length<3?c:c.replace(o[1],o[2])}var iB=Tl(function(o,c,E){return o+(E?"_":"")+c.toLowerCase()});function sB(o,c,E){return E&&typeof E!="number"&&Qn(o,c,E)&&(c=E=e),E=E===e?Se:E>>>0,E?(o=zt(o),o&&(typeof c=="string"||c!=null&&!q1(c))&&(c=Li(c),!c&&Oa(o))?ku(gi(o),0,E):o.split(c,E)):[]}var aB=Tl(function(o,c,E){return o+(E?" ":"")+z1(c)});function uB(o,c,E){return o=zt(o),E=E==null?0:Fo(dt(E),0,o.length),c=Li(c),o.slice(E,E+c.length)==c}function oB(o,c,E){var I=M.templateSettings;E&&Qn(o,c,E)&&(c=e),o=zt(o),c=Bd({},c,I,Gw);var x=Bd({},c.imports,I.imports,Gw),q=an(x),X=yo(x,q),Z,se,Ae=0,Ee=c.interpolate||Yr,ye="__p += '",Pe=bl((c.escape||Yr).source+"|"+Ee.source+"|"+(Ee===Iu?Or:Yr).source+"|"+(c.evaluate||Yr).source+"|$","g"),He="//# sourceURL="+(Rt.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Np+"]")+`
`;o.replace(Pe,function(tt,bt,St,ji,ei,Hi){return St||(St=ji),ye+=o.slice(Ae,Hi).replace(ho,Wh),bt&&(Z=!0,ye+=`' +
__e(`+bt+`) +
'`),ei&&(se=!0,ye+=`';
`+ei+`;
__p += '`),St&&(ye+=`' +
((__t = (`+St+`)) == null ? '' : __t) +
'`),Ae=Hi+tt.length,tt}),ye+=`';
`;var et=Rt.call(c,"variable")&&c.variable;if(!et)ye=`with (obj) {
`+ye+`
}
`;else if(ut.test(et))throw new nt(a);ye=(se?ye.replace(Es,""):ye).replace(Du,"$1").replace(Hs,"$1;"),ye="function("+(et||"obj")+`) {
`+(et?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(Z?", __e = _.escape":"")+(se?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+ye+`return __p
}`;var gt=UA(function(){return Ft(q,He+"return "+ye).apply(e,X)});if(gt.source=ye,M1(gt))throw gt;return gt}function lB(o){return zt(o).toLowerCase()}function cB(o){return zt(o).toUpperCase()}function fB(o,c,E){if(o=zt(o),o&&(E||c===e))return Zc(o);if(!o||!(c=Li(c)))return o;var I=gi(o),x=gi(c),q=wl(I,x),X=Gh(I,x)+1;return ku(I,q,X).join("")}function hB(o,c,E){if(o=zt(o),o&&(E||c===e))return o.slice(0,El(o)+1);if(!o||!(c=Li(c)))return o;var I=gi(o),x=Gh(I,gi(c))+1;return ku(I,0,x).join("")}function dB(o,c,E){if(o=zt(o),o&&(E||c===e))return o.replace(Ra,"");if(!o||!(c=Li(c)))return o;var I=gi(o),x=wl(I,gi(c));return ku(I,x).join("")}function pB(o,c){var E=S,I=B;if(br(c)){var x="separator"in c?c.separator:x;E="length"in c?dt(c.length):E,I="omission"in c?Li(c.omission):I}o=zt(o);var q=o.length;if(Oa(o)){var X=gi(o);q=X.length}if(E>=q)return o;var Z=E-ka(I);if(Z<1)return I;var se=X?ku(X,0,Z).join(""):o.slice(0,Z);if(x===e)return se+I;if(X&&(Z+=se.length-Z),q1(x)){if(o.slice(Z).search(x)){var Ae,Ee=se;for(x.global||(x=bl(x.source,zt(Vt.exec(x))+"g")),x.lastIndex=0;Ae=x.exec(Ee);)var ye=Ae.index;se=se.slice(0,ye===e?Z:ye)}}else if(o.indexOf(Li(x),Z)!=Z){var Pe=se.lastIndexOf(x);Pe>-1&&(se=se.slice(0,Pe))}return se+I}function gB(o){return o=zt(o),o&&bs.test(o)?o.replace(Fu,Jh):o}var mB=Tl(function(o,c,E){return o+(E?" ":"")+c.toUpperCase()}),z1=jw("toUpperCase");function LA(o,c,E){return o=zt(o),c=E?e:c,c===e?Xp(o)?e1(o):Wc(o):o.match(c)||[]}var UA=wt(function(o,c){try{return Xn(o,e,c)}catch(E){return M1(E)?E:new nt(E)}}),vB=Va(function(o,c){return pi(c,function(E){E=Xs(E),Ma(o,E,j1(o[E],o))}),o});function wB(o){var c=o==null?0:o.length,E=Ze();return o=c?te(o,function(I){if(typeof I[1]!="function")throw new mi(i);return[E(I[0]),I[1]]}):[],wt(function(I){for(var x=-1;++x<c;){var q=o[x];if(Xn(q[0],this,I))return Xn(q[1],this,I)}})}function AB(o){return V5(ss(o,f))}function G1(o){return function(){return o}}function EB(o,c){return o==null||o!==o?c:o}var bB=Mw(),yB=Mw(!0);function Ei(o){return o}function Y1(o){return ww(typeof o=="function"?o:ss(o,f))}function _B(o){return Ew(ss(o,f))}function CB(o,c){return bw(o,ss(c,f))}var DB=wt(function(o,c){return function(E){return of(E,o,c)}}),FB=wt(function(o,c){return function(E){return of(o,E,c)}});function W1(o,c,E){var I=an(c),x=cd(c,I);E==null&&!(br(c)&&(x.length||!I.length))&&(E=c,c=o,o=this,x=cd(c,an(c)));var q=!(br(E)&&"chain"in E)||!!E.chain,X=za(o);return pi(x,function(Z){var se=c[Z];o[Z]=se,X&&(o.prototype[Z]=function(){var Ae=this.__chain__;if(q||Ae){var Ee=o(this.__wrapped__),ye=Ee.__actions__=vi(this.__actions__);return ye.push({func:se,args:arguments,thisArg:o}),Ee.__chain__=Ae,Ee}return se.apply(o,Oi([this.value()],arguments))})}),o}function SB(){return Hr._===this&&(Hr._=s1),this}function X1(){}function IB(o){return o=dt(o),wt(function(c){return yw(c,o)})}var BB=S1(te),$B=S1(ot),PB=S1(Vh);function jA(o){return T1(o)?Ta(Xs(o)):uF(o)}function RB(o){return function(c){return o==null?e:So(o,c)}}var xB=Vw(),TB=Vw(!0);function J1(){return[]}function Z1(){return!1}function OB(){return{}}function kB(){return""}function NB(){return!0}function LB(o,c){if(o=dt(o),o<1||o>W)return[];var E=Se,I=xn(o,Se);c=Ze(c),o-=Se;for(var x=Jc(I,c);++E<o;)c(E);return x}function UB(o){return lt(o)?te(o,Xs):Ui(o)?[o]:vi(aA(zt(o)))}function jB(o){var c=++n1;return zt(o)+c}var HB=md(function(o,c){return o+c},0),MB=I1("ceil"),qB=md(function(o,c){return o/c},1),VB=I1("floor");function KB(o){return o&&o.length?ld(o,Ei,d1):e}function zB(o,c){return o&&o.length?ld(o,Ze(c,2),d1):e}function GB(o){return Xc(o,Ei)}function YB(o,c){return Xc(o,Ze(c,2))}function WB(o){return o&&o.length?ld(o,Ei,v1):e}function XB(o,c){return o&&o.length?ld(o,Ze(c,2),v1):e}var JB=md(function(o,c){return o*c},1),ZB=I1("round"),QB=md(function(o,c){return o-c},0);function e9(o){return o&&o.length?vl(o,Ei):0}function t9(o,c){return o&&o.length?vl(o,Ze(c,2)):0}return M.after=_S,M.ary=vA,M.assign=cI,M.assignIn=PA,M.assignInWith=Bd,M.assignWith=fI,M.at=hI,M.before=wA,M.bind=j1,M.bindAll=vB,M.bindKey=AA,M.castArray=OS,M.chain=pA,M.chunk=VF,M.compact=KF,M.concat=zF,M.cond=wB,M.conforms=AB,M.constant=G1,M.countBy=eS,M.create=dI,M.curry=EA,M.curryRight=bA,M.debounce=yA,M.defaults=pI,M.defaultsDeep=gI,M.defer=CS,M.delay=DS,M.difference=GF,M.differenceBy=YF,M.differenceWith=WF,M.drop=XF,M.dropRight=JF,M.dropRightWhile=ZF,M.dropWhile=QF,M.fill=e8,M.filter=rS,M.flatMap=sS,M.flatMapDeep=aS,M.flatMapDepth=uS,M.flatten=cA,M.flattenDeep=t8,M.flattenDepth=r8,M.flip=FS,M.flow=bB,M.flowRight=yB,M.fromPairs=n8,M.functions=yI,M.functionsIn=_I,M.groupBy=oS,M.initial=s8,M.intersection=a8,M.intersectionBy=u8,M.intersectionWith=o8,M.invert=DI,M.invertBy=FI,M.invokeMap=cS,M.iteratee=Y1,M.keyBy=fS,M.keys=an,M.keysIn=Ai,M.map=_d,M.mapKeys=II,M.mapValues=BI,M.matches=_B,M.matchesProperty=CB,M.memoize=Dd,M.merge=$I,M.mergeWith=RA,M.method=DB,M.methodOf=FB,M.mixin=W1,M.negate=Fd,M.nthArg=IB,M.omit=PI,M.omitBy=RI,M.once=SS,M.orderBy=hS,M.over=BB,M.overArgs=IS,M.overEvery=$B,M.overSome=PB,M.partial=H1,M.partialRight=_A,M.partition=dS,M.pick=xI,M.pickBy=xA,M.property=jA,M.propertyOf=RB,M.pull=h8,M.pullAll=hA,M.pullAllBy=d8,M.pullAllWith=p8,M.pullAt=g8,M.range=xB,M.rangeRight=TB,M.rearg=BS,M.reject=mS,M.remove=m8,M.rest=$S,M.reverse=L1,M.sampleSize=wS,M.set=OI,M.setWith=kI,M.shuffle=AS,M.slice=v8,M.sortBy=yS,M.sortedUniq=C8,M.sortedUniqBy=D8,M.split=sB,M.spread=PS,M.tail=F8,M.take=S8,M.takeRight=I8,M.takeRightWhile=B8,M.takeWhile=$8,M.tap=K8,M.throttle=RS,M.thru=yd,M.toArray=IA,M.toPairs=TA,M.toPairsIn=OA,M.toPath=UB,M.toPlainObject=$A,M.transform=NI,M.unary=xS,M.union=P8,M.unionBy=R8,M.unionWith=x8,M.uniq=T8,M.uniqBy=O8,M.uniqWith=k8,M.unset=LI,M.unzip=U1,M.unzipWith=dA,M.update=UI,M.updateWith=jI,M.values=Nl,M.valuesIn=HI,M.without=N8,M.words=LA,M.wrap=TS,M.xor=L8,M.xorBy=U8,M.xorWith=j8,M.zip=H8,M.zipObject=M8,M.zipObjectDeep=q8,M.zipWith=V8,M.entries=TA,M.entriesIn=OA,M.extend=PA,M.extendWith=Bd,W1(M,M),M.add=HB,M.attempt=UA,M.camelCase=KI,M.capitalize=kA,M.ceil=MB,M.clamp=MI,M.clone=kS,M.cloneDeep=LS,M.cloneDeepWith=US,M.cloneWith=NS,M.conformsTo=jS,M.deburr=NA,M.defaultTo=EB,M.divide=qB,M.endsWith=zI,M.eq=Cs,M.escape=GI,M.escapeRegExp=YI,M.every=tS,M.find=nS,M.findIndex=oA,M.findKey=mI,M.findLast=iS,M.findLastIndex=lA,M.findLastKey=vI,M.floor=VB,M.forEach=gA,M.forEachRight=mA,M.forIn=wI,M.forInRight=AI,M.forOwn=EI,M.forOwnRight=bI,M.get=V1,M.gt=HS,M.gte=MS,M.has=CI,M.hasIn=K1,M.head=fA,M.identity=Ei,M.includes=lS,M.indexOf=i8,M.inRange=qI,M.invoke=SI,M.isArguments=$o,M.isArray=lt,M.isArrayBuffer=qS,M.isArrayLike=wi,M.isArrayLikeObject=kr,M.isBoolean=VS,M.isBuffer=Nu,M.isDate=KS,M.isElement=zS,M.isEmpty=GS,M.isEqual=YS,M.isEqualWith=WS,M.isError=M1,M.isFinite=XS,M.isFunction=za,M.isInteger=CA,M.isLength=Sd,M.isMap=DA,M.isMatch=JS,M.isMatchWith=ZS,M.isNaN=QS,M.isNative=eI,M.isNil=rI,M.isNull=tI,M.isNumber=FA,M.isObject=br,M.isObjectLike=Pr,M.isPlainObject=pf,M.isRegExp=q1,M.isSafeInteger=nI,M.isSet=SA,M.isString=Id,M.isSymbol=Ui,M.isTypedArray=kl,M.isUndefined=iI,M.isWeakMap=sI,M.isWeakSet=aI,M.join=l8,M.kebabCase=WI,M.last=us,M.lastIndexOf=c8,M.lowerCase=XI,M.lowerFirst=JI,M.lt=uI,M.lte=oI,M.max=KB,M.maxBy=zB,M.mean=GB,M.meanBy=YB,M.min=WB,M.minBy=XB,M.stubArray=J1,M.stubFalse=Z1,M.stubObject=OB,M.stubString=kB,M.stubTrue=NB,M.multiply=JB,M.nth=f8,M.noConflict=SB,M.noop=X1,M.now=Cd,M.pad=ZI,M.padEnd=QI,M.padStart=eB,M.parseInt=tB,M.random=VI,M.reduce=pS,M.reduceRight=gS,M.repeat=rB,M.replace=nB,M.result=TI,M.round=ZB,M.runInContext=ne,M.sample=vS,M.size=ES,M.snakeCase=iB,M.some=bS,M.sortedIndex=w8,M.sortedIndexBy=A8,M.sortedIndexOf=E8,M.sortedLastIndex=b8,M.sortedLastIndexBy=y8,M.sortedLastIndexOf=_8,M.startCase=aB,M.startsWith=uB,M.subtract=QB,M.sum=e9,M.sumBy=t9,M.template=oB,M.times=LB,M.toFinite=Ga,M.toInteger=dt,M.toLength=BA,M.toLower=lB,M.toNumber=os,M.toSafeInteger=lI,M.toString=zt,M.toUpper=cB,M.trim=fB,M.trimEnd=hB,M.trimStart=dB,M.truncate=pB,M.unescape=gB,M.uniqueId=jB,M.upperCase=mB,M.upperFirst=z1,M.each=gA,M.eachRight=mA,M.first=fA,W1(M,function(){var o={};return Ys(M,function(c,E){Rt.call(M.prototype,E)||(o[E]=c)}),o}(),{chain:!1}),M.VERSION=t,pi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){M[o].placeholder=M}),pi(["drop","take"],function(o,c){Ct.prototype[o]=function(E){E=E===e?1:Wr(dt(E),0);var I=this.__filtered__&&!c?new Ct(this):this.clone();return I.__filtered__?I.__takeCount__=xn(E,I.__takeCount__):I.__views__.push({size:xn(E,Se),type:o+(I.__dir__<0?"Right":"")}),I},Ct.prototype[o+"Right"]=function(E){return this.reverse()[o](E).reverse()}}),pi(["filter","map","takeWhile"],function(o,c){var E=c+1,I=E==V||E==H;Ct.prototype[o]=function(x){var q=this.clone();return q.__iteratees__.push({iteratee:Ze(x,3),type:E}),q.__filtered__=q.__filtered__||I,q}}),pi(["head","last"],function(o,c){var E="take"+(c?"Right":"");Ct.prototype[o]=function(){return this[E](1).value()[0]}}),pi(["initial","tail"],function(o,c){var E="drop"+(c?"":"Right");Ct.prototype[o]=function(){return this.__filtered__?new Ct(this):this[E](1)}}),Ct.prototype.compact=function(){return this.filter(Ei)},Ct.prototype.find=function(o){return this.filter(o).head()},Ct.prototype.findLast=function(o){return this.reverse().find(o)},Ct.prototype.invokeMap=wt(function(o,c){return typeof o=="function"?new Ct(this):this.map(function(E){return of(E,o,c)})}),Ct.prototype.reject=function(o){return this.filter(Fd(Ze(o)))},Ct.prototype.slice=function(o,c){o=dt(o);var E=this;return E.__filtered__&&(o>0||c<0)?new Ct(E):(o<0?E=E.takeRight(-o):o&&(E=E.drop(o)),c!==e&&(c=dt(c),E=c<0?E.dropRight(-c):E.take(c-o)),E)},Ct.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Ct.prototype.toArray=function(){return this.take(Se)},Ys(Ct.prototype,function(o,c){var E=/^(?:filter|find|map|reject)|While$/.test(c),I=/^(?:head|last)$/.test(c),x=M[I?"take"+(c=="last"?"Right":""):c],q=I||/^find/.test(c);x&&(M.prototype[c]=function(){var X=this.__wrapped__,Z=I?[1]:arguments,se=X instanceof Ct,Ae=Z[0],Ee=se||lt(X),ye=function(bt){var St=x.apply(M,Oi([bt],Z));return I&&Pe?St[0]:St};Ee&&E&&typeof Ae=="function"&&Ae.length!=1&&(se=Ee=!1);var Pe=this.__chain__,He=!!this.__actions__.length,et=q&&!Pe,gt=se&&!He;if(!q&&Ee){X=gt?X:new Ct(this);var tt=o.apply(X,Z);return tt.__actions__.push({func:yd,args:[ye],thisArg:e}),new is(tt,Pe)}return et&&gt?o.apply(this,Z):(tt=this.thru(ye),et?I?tt.value()[0]:tt.value():tt)})}),pi(["pop","push","shift","sort","splice","unshift"],function(o){var c=yl[o],E=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",I=/^(?:pop|shift)$/.test(o);M.prototype[o]=function(){var x=arguments;if(I&&!this.__chain__){var q=this.value();return c.apply(lt(q)?q:[],x)}return this[E](function(X){return c.apply(lt(X)?X:[],x)})}}),Ys(Ct.prototype,function(o,c){var E=M[c];if(E){var I=E.name+"";Rt.call(Pl,I)||(Pl[I]=[]),Pl[I].push({name:c,func:E})}}),Pl[gd(e,v).name]=[{name:"wrapper",func:e}],Ct.prototype.clone=g5,Ct.prototype.reverse=m5,Ct.prototype.value=v5,M.prototype.at=z8,M.prototype.chain=G8,M.prototype.commit=Y8,M.prototype.next=W8,M.prototype.plant=J8,M.prototype.reverse=Z8,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=Q8,M.prototype.first=M.prototype.head,La&&(M.prototype[La]=X8),M},ns=t1();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Hr._=ns,define(function(){return ns})):xa?((xa.exports=ns)._=ns,zc._=ns):Hr._=ns}).call(Yl)});var Mo=de((EG,Ho)=>{"use strict";function xE(e){return typeof e>"u"||e===null}function Z7(e){return typeof e=="object"&&e!==null}function Q7(e){return Array.isArray(e)?e:xE(e)?[]:[e]}function e$(e,t){var r,n,i,a;if(t)for(a=Object.keys(t),r=0,n=a.length;r<n;r+=1)i=a[r],e[i]=t[i];return e}function t$(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function r$(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}Ho.exports.isNothing=xE;Ho.exports.isObject=Z7;Ho.exports.toArray=Q7;Ho.exports.repeat=t$;Ho.exports.isNegativeZero=r$;Ho.exports.extend=e$});var Wl=de((bG,TE)=>{"use strict";function Cf(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Cf.prototype=Object.create(Error.prototype);Cf.prototype.constructor=Cf;Cf.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};TE.exports=Cf});var NE=de((yG,kE)=>{"use strict";var OE=Mo();function Sg(e,t,r,n,i){this.name=e,this.buffer=t,this.position=r,this.line=n,this.column=i}Sg.prototype.getSnippet=function(t,r){var n,i,a,s,u;if(!this.buffer)return null;for(t=t||4,r=r||75,n="",i=this.position;i>0&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>r/2-1){n=" ... ",i+=5;break}for(a="",s=this.position;s<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>r/2-1){a=" ... ",s-=5;break}return u=this.buffer.slice(i,s),OE.repeat(" ",t)+n+u+a+`
`+OE.repeat(" ",t+this.position-i+n.length)+"^"};Sg.prototype.toString=function(t){var r,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(n+=`:
`+r)),n};kE.exports=Sg});var Zr=de((_G,UE)=>{"use strict";var LE=Wl(),n$=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i$=["scalar","sequence","mapping"];function s$(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function a$(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(n$.indexOf(r)===-1)throw new LE('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=s$(t.styleAliases||null),i$.indexOf(this.kind)===-1)throw new LE('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}UE.exports=a$});var qo=de((CG,HE)=>{"use strict";var jE=Mo(),t0=Wl(),u$=Zr();function Ig(e,t,r){var n=[];return e.include.forEach(function(i){r=Ig(i,t,r)}),e[t].forEach(function(i){r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&n.push(s)}),r.push(i)}),r.filter(function(i,a){return n.indexOf(a)===-1})}function o$(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function n(i){e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function Xl(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new t0("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Ig(this,"implicit",[]),this.compiledExplicit=Ig(this,"explicit",[]),this.compiledTypeMap=o$(this.compiledImplicit,this.compiledExplicit)}Xl.DEFAULT=null;Xl.create=function(){var t,r;switch(arguments.length){case 1:t=Xl.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new t0("Wrong number of arguments for Schema.create function")}if(t=jE.toArray(t),r=jE.toArray(r),!t.every(function(n){return n instanceof Xl}))throw new t0("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(n){return n instanceof u$}))throw new t0("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Xl({include:t,explicit:r})};HE.exports=Xl});var qE=de((DG,ME)=>{"use strict";var l$=Zr();ME.exports=new l$("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var KE=de((FG,VE)=>{"use strict";var c$=Zr();VE.exports=new c$("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var GE=de((SG,zE)=>{"use strict";var f$=Zr();zE.exports=new f$("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var r0=de((IG,YE)=>{"use strict";var h$=qo();YE.exports=new h$({explicit:[qE(),KE(),GE()]})});var XE=de((BG,WE)=>{"use strict";var d$=Zr();function p$(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function g$(){return null}function m$(e){return e===null}WE.exports=new d$("tag:yaml.org,2002:null",{kind:"scalar",resolve:p$,construct:g$,predicate:m$,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var ZE=de(($G,JE)=>{"use strict";var v$=Zr();function w$(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function A$(e){return e==="true"||e==="True"||e==="TRUE"}function E$(e){return Object.prototype.toString.call(e)==="[object Boolean]"}JE.exports=new v$("tag:yaml.org,2002:bool",{kind:"scalar",resolve:w$,construct:A$,predicate:E$,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var eb=de((PG,QE)=>{"use strict";var b$=Mo(),y$=Zr();function _$(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function C$(e){return 48<=e&&e<=55}function D$(e){return 48<=e&&e<=57}function F$(e){if(e===null)return!1;var t=e.length,r=0,n=!1,i;if(!t)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===t)return!0;if(i=e[++r],i==="b"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!_$(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}for(;r<t;r++)if(i=e[r],i!=="_"){if(!C$(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(i===":")break;if(!D$(e.charCodeAt(r)))return!1;n=!0}return!n||i==="_"?!1:i!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(r))}function S$(e){var t=e,r=1,n,i,a=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0"?0:n==="0"?t[1]==="b"?r*parseInt(t.slice(2),2):t[1]==="x"?r*parseInt(t,16):r*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){a.unshift(parseInt(s,10))}),t=0,i=1,a.forEach(function(s){t+=s*i,i*=60}),r*t):r*parseInt(t,10)}function I$(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!b$.isNegativeZero(e)}QE.exports=new y$("tag:yaml.org,2002:int",{kind:"scalar",resolve:F$,construct:S$,predicate:I$,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var nb=de((RG,rb)=>{"use strict";var tb=Mo(),B$=Zr(),$$=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function P$(e){return!(e===null||!$$.test(e)||e[e.length-1]==="_")}function R$(e){var t,r,n,i;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(a){i.unshift(parseFloat(a,10))}),t=0,n=1,i.forEach(function(a){t+=a*n,n*=60}),r*t):r*parseFloat(t,10)}var x$=/^[-+]?[0-9]+e/;function T$(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(tb.isNegativeZero(e))return"-0.0";return r=e.toString(10),x$.test(r)?r.replace("e",".e"):r}function O$(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||tb.isNegativeZero(e))}rb.exports=new B$("tag:yaml.org,2002:float",{kind:"scalar",resolve:P$,construct:R$,predicate:O$,represent:T$,defaultStyle:"lowercase"})});var Bg=de((xG,ib)=>{"use strict";var k$=qo();ib.exports=new k$({include:[r0()],implicit:[XE(),ZE(),eb(),nb()]})});var $g=de((TG,sb)=>{"use strict";var N$=qo();sb.exports=new N$({include:[Bg()]})});var lb=de((OG,ob)=>{"use strict";var L$=Zr(),ab=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ub=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function U$(e){return e===null?!1:ab.exec(e)!==null||ub.exec(e)!==null}function j$(e){var t,r,n,i,a,s,u,l=0,f=null,d,g,p;if(t=ab.exec(e),t===null&&(t=ub.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(a=+t[4],s=+t[5],u=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(d=+t[10],g=+(t[11]||0),f=(d*60+g)*6e4,t[9]==="-"&&(f=-f)),p=new Date(Date.UTC(r,n,i,a,s,u,l)),f&&p.setTime(p.getTime()-f),p}function H$(e){return e.toISOString()}ob.exports=new L$("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:U$,construct:j$,instanceOf:Date,represent:H$})});var fb=de((kG,cb)=>{"use strict";var M$=Zr();function q$(e){return e==="<<"||e===null}cb.exports=new M$("tag:yaml.org,2002:merge",{kind:"scalar",resolve:q$})});var pb=de((NG,db)=>{"use strict";var Vo;try{hb=Po,Vo=hb("buffer").Buffer}catch{}var hb,V$=Zr(),Pg=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function K$(e){if(e===null)return!1;var t,r,n=0,i=e.length,a=Pg;for(r=0;r<i;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function z$(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,a=Pg,s=0,u=[];for(t=0;t<i;t++)t%4===0&&t&&(u.push(s>>16&255),u.push(s>>8&255),u.push(s&255)),s=s<<6|a.indexOf(n.charAt(t));return r=i%4*6,r===0?(u.push(s>>16&255),u.push(s>>8&255),u.push(s&255)):r===18?(u.push(s>>10&255),u.push(s>>2&255)):r===12&&u.push(s>>4&255),Vo?Vo.from?Vo.from(u):new Vo(u):u}function G$(e){var t="",r=0,n,i,a=e.length,s=Pg;for(n=0;n<a;n++)n%3===0&&n&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[n];return i=a%3,i===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):i===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):i===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function Y$(e){return Vo&&Vo.isBuffer(e)}db.exports=new V$("tag:yaml.org,2002:binary",{kind:"scalar",resolve:K$,construct:z$,predicate:Y$,represent:G$})});var mb=de((UG,gb)=>{"use strict";var W$=Zr(),X$=Object.prototype.hasOwnProperty,J$=Object.prototype.toString;function Z$(e){if(e===null)return!0;var t=[],r,n,i,a,s,u=e;for(r=0,n=u.length;r<n;r+=1){if(i=u[r],s=!1,J$.call(i)!=="[object Object]")return!1;for(a in i)if(X$.call(i,a))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}function Q$(e){return e!==null?e:[]}gb.exports=new W$("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Z$,construct:Q$})});var wb=de((jG,vb)=>{"use strict";var eP=Zr(),tP=Object.prototype.toString;function rP(e){if(e===null)return!0;var t,r,n,i,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(n=s[t],tP.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;a[t]=[i[0],n[i[0]]]}return!0}function nP(e){if(e===null)return[];var t,r,n,i,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1)n=s[t],i=Object.keys(n),a[t]=[i[0],n[i[0]]];return a}vb.exports=new eP("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rP,construct:nP})});var Eb=de((HG,Ab)=>{"use strict";var iP=Zr(),sP=Object.prototype.hasOwnProperty;function aP(e){if(e===null)return!0;var t,r=e;for(t in r)if(sP.call(r,t)&&r[t]!==null)return!1;return!0}function uP(e){return e!==null?e:{}}Ab.exports=new iP("tag:yaml.org,2002:set",{kind:"mapping",resolve:aP,construct:uP})});var Jl=de((MG,bb)=>{"use strict";var oP=qo();bb.exports=new oP({include:[$g()],implicit:[lb(),fb()],explicit:[pb(),mb(),wb(),Eb()]})});var _b=de((qG,yb)=>{"use strict";var lP=Zr();function cP(){return!0}function fP(){}function hP(){return""}function dP(e){return typeof e>"u"}yb.exports=new lP("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:cP,construct:fP,predicate:dP,represent:hP})});var Db=de((VG,Cb)=>{"use strict";var pP=Zr();function gP(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),n="";return!(t[0]==="/"&&(r&&(n=r[1]),n.length>3||t[t.length-n.length-1]!=="/"))}function mP(e){var t=e,r=/\/([gim]*)$/.exec(e),n="";return t[0]==="/"&&(r&&(n=r[1]),t=t.slice(1,t.length-n.length-1)),new RegExp(t,n)}function vP(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function wP(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Cb.exports=new pP("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:gP,construct:mP,predicate:wP,represent:vP})});var Ib=de((KG,Sb)=>{"use strict";var n0;try{Fb=Po,n0=Fb("esprima")}catch{typeof window<"u"&&(n0=window.esprima)}var Fb,AP=Zr();function EP(e){if(e===null)return!1;try{var t="("+e+")",r=n0.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function bP(e){var t="("+e+")",r=n0.parse(t,{range:!0}),n=[],i;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(a){n.push(a.name)}),i=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(n,t.slice(i[0]+1,i[1]-1)):new Function(n,"return "+t.slice(i[0],i[1]))}function yP(e){return e.toString()}function _P(e){return Object.prototype.toString.call(e)==="[object Function]"}Sb.exports=new AP("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:EP,construct:bP,predicate:_P,represent:yP})});var Df=de((GG,$b)=>{"use strict";var Bb=qo();$b.exports=Bb.DEFAULT=new Bb({include:[Jl()],explicit:[_b(),Db(),Ib()]})});var Wb=de((YG,Ff)=>{"use strict";var Qa=Mo(),Nb=Wl(),CP=NE(),Lb=Jl(),DP=Df(),Ku=Object.prototype.hasOwnProperty,i0=1,Ub=2,jb=3,s0=4,Rg=1,FP=2,Pb=3,SP=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,IP=/[\x85\u2028\u2029]/,BP=/[,\[\]\{\}]/,Hb=/^(?:!|!!|![a-z\-]+!)$/i,Mb=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Rb(e){return Object.prototype.toString.call(e)}function sa(e){return e===10||e===13}function zo(e){return e===9||e===32}function bi(e){return e===9||e===32||e===10||e===13}function Zl(e){return e===44||e===91||e===93||e===123||e===125}function $P(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function PP(e){return e===120?2:e===117?4:e===85?8:0}function RP(e){return 48<=e&&e<=57?e-48:-1}function xb(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function xP(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var qb=new Array(256),Vb=new Array(256);for(Ko=0;Ko<256;Ko++)qb[Ko]=xb(Ko)?1:0,Vb[Ko]=xb(Ko);var Ko;function TP(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||DP,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Kb(e,t){return new Nb(t,new CP(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function Qe(e,t){throw Kb(e,t)}function a0(e,t){e.onWarning&&e.onWarning.call(null,Kb(e,t))}var Tb={YAML:function(t,r,n){var i,a,s;t.version!==null&&Qe(t,"duplication of %YAML directive"),n.length!==1&&Qe(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Qe(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&Qe(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&a0(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var i,a;n.length!==2&&Qe(t,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],Hb.test(i)||Qe(t,"ill-formed tag handle (first argument) of the TAG directive"),Ku.call(t.tagMap,i)&&Qe(t,'there is a previously declared suffix for "'+i+'" tag handle'),Mb.test(a)||Qe(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=a}};function Vu(e,t,r,n){var i,a,s,u;if(t<r){if(u=e.input.slice(t,r),n)for(i=0,a=u.length;i<a;i+=1)s=u.charCodeAt(i),s===9||32<=s&&s<=1114111||Qe(e,"expected valid JSON character");else SP.test(u)&&Qe(e,"the stream contains non-printable characters");e.result+=u}}function Ob(e,t,r,n){var i,a,s,u;for(Qa.isObject(r)||Qe(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),s=0,u=i.length;s<u;s+=1)a=i[s],Ku.call(t,a)||(t[a]=r[a],n[a]=!0)}function Ql(e,t,r,n,i,a,s,u){var l,f;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,f=i.length;l<f;l+=1)Array.isArray(i[l])&&Qe(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Rb(i[l])==="[object Object]"&&(i[l]="[object Object]");if(typeof i=="object"&&Rb(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(l=0,f=a.length;l<f;l+=1)Ob(e,t,a[l],r);else Ob(e,t,a,r);else!e.json&&!Ku.call(r,i)&&Ku.call(t,i)&&(e.line=s||e.line,e.position=u||e.position,Qe(e,"duplicated mapping key")),t[i]=a,delete r[i];return t}function xg(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Qe(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function Kr(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);i!==0;){for(;zo(i);)i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(sa(i))for(xg(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&a0(e,"deficient indentation"),n}function u0(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||bi(r)))}function Tg(e,t){t===1?e.result+=" ":t>1&&(e.result+=Qa.repeat(`
`,t-1))}function OP(e,t,r){var n,i,a,s,u,l,f,d,g=e.kind,p=e.result,h;if(h=e.input.charCodeAt(e.position),bi(h)||Zl(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(i=e.input.charCodeAt(e.position+1),bi(i)||r&&Zl(i)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,u=!1;h!==0;){if(h===58){if(i=e.input.charCodeAt(e.position+1),bi(i)||r&&Zl(i))break}else if(h===35){if(n=e.input.charCodeAt(e.position-1),bi(n))break}else{if(e.position===e.lineStart&&u0(e)||r&&Zl(h))break;if(sa(h))if(l=e.line,f=e.lineStart,d=e.lineIndent,Kr(e,!1,-1),e.lineIndent>=t){u=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=f,e.lineIndent=d;break}}u&&(Vu(e,a,s,!1),Tg(e,e.line-l),a=s=e.position,u=!1),zo(h)||(s=e.position+1),h=e.input.charCodeAt(++e.position)}return Vu(e,a,s,!1),e.result?!0:(e.kind=g,e.result=p,!1)}function kP(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Vu(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else sa(r)?(Vu(e,n,i,!0),Tg(e,Kr(e,!1,t)),n=i=e.position):e.position===e.lineStart&&u0(e)?Qe(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Qe(e,"unexpected end of the stream within a single quoted scalar")}function NP(e,t){var r,n,i,a,s,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return Vu(e,r,e.position,!0),e.position++,!0;if(u===92){if(Vu(e,r,e.position,!0),u=e.input.charCodeAt(++e.position),sa(u))Kr(e,!1,t);else if(u<256&&qb[u])e.result+=Vb[u],e.position++;else if((s=PP(u))>0){for(i=s,a=0;i>0;i--)u=e.input.charCodeAt(++e.position),(s=$P(u))>=0?a=(a<<4)+s:Qe(e,"expected hexadecimal character");e.result+=xP(a),e.position++}else Qe(e,"unknown escape sequence");r=n=e.position}else sa(u)?(Vu(e,r,n,!0),Tg(e,Kr(e,!1,t)),r=n=e.position):e.position===e.lineStart&&u0(e)?Qe(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Qe(e,"unexpected end of the stream within a double quoted scalar")}function LP(e,t){var r=!0,n,i=e.tag,a,s=e.anchor,u,l,f,d,g,p={},h,w,v,y;if(y=e.input.charCodeAt(e.position),y===91)l=93,g=!1,a=[];else if(y===123)l=125,g=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),y=e.input.charCodeAt(++e.position);y!==0;){if(Kr(e,!0,t),y=e.input.charCodeAt(e.position),y===l)return e.position++,e.tag=i,e.anchor=s,e.kind=g?"mapping":"sequence",e.result=a,!0;r||Qe(e,"missed comma between flow collection entries"),w=h=v=null,f=d=!1,y===63&&(u=e.input.charCodeAt(e.position+1),bi(u)&&(f=d=!0,e.position++,Kr(e,!0,t))),n=e.line,ec(e,t,i0,!1,!0),w=e.tag,h=e.result,Kr(e,!0,t),y=e.input.charCodeAt(e.position),(d||e.line===n)&&y===58&&(f=!0,y=e.input.charCodeAt(++e.position),Kr(e,!0,t),ec(e,t,i0,!1,!0),v=e.result),g?Ql(e,a,p,w,h,v):f?a.push(Ql(e,null,p,w,h,v)):a.push(h),Kr(e,!0,t),y=e.input.charCodeAt(e.position),y===44?(r=!0,y=e.input.charCodeAt(++e.position)):r=!1}Qe(e,"unexpected end of the stream within a flow collection")}function UP(e,t){var r,n,i=Rg,a=!1,s=!1,u=t,l=0,f=!1,d,g;if(g=e.input.charCodeAt(e.position),g===124)n=!1;else if(g===62)n=!0;else return!1;for(e.kind="scalar",e.result="";g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)Rg===i?i=g===43?Pb:FP:Qe(e,"repeat of a chomping mode identifier");else if((d=RP(g))>=0)d===0?Qe(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Qe(e,"repeat of an indentation width identifier"):(u=t+d-1,s=!0);else break;if(zo(g)){do g=e.input.charCodeAt(++e.position);while(zo(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!sa(g)&&g!==0)}for(;g!==0;){for(xg(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!s||e.lineIndent<u)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>u&&(u=e.lineIndent),sa(g)){l++;continue}if(e.lineIndent<u){i===Pb?e.result+=Qa.repeat(`
`,a?1+l:l):i===Rg&&a&&(e.result+=`
`);break}for(n?zo(g)?(f=!0,e.result+=Qa.repeat(`
`,a?1+l:l)):f?(f=!1,e.result+=Qa.repeat(`
`,l+1)):l===0?a&&(e.result+=" "):e.result+=Qa.repeat(`
`,l):e.result+=Qa.repeat(`
`,a?1+l:l),a=!0,s=!0,l=0,r=e.position;!sa(g)&&g!==0;)g=e.input.charCodeAt(++e.position);Vu(e,r,e.position,!1)}return!0}function kb(e,t){var r,n=e.tag,i=e.anchor,a=[],s,u=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(s=e.input.charCodeAt(e.position+1),!bi(s)));){if(u=!0,e.position++,Kr(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,ec(e,t,jb,!1,!0),a.push(e.result),Kr(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)Qe(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return u?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=a,!0):!1}function jP(e,t,r){var n,i,a,s,u=e.tag,l=e.anchor,f={},d={},g=null,p=null,h=null,w=!1,v=!1,y;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),y=e.input.charCodeAt(e.position);y!==0;){if(n=e.input.charCodeAt(e.position+1),a=e.line,s=e.position,(y===63||y===58)&&bi(n))y===63?(w&&(Ql(e,f,d,g,p,null),g=p=h=null),v=!0,w=!0,i=!0):w?(w=!1,i=!0):Qe(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,y=n;else if(ec(e,r,Ub,!1,!0))if(e.line===a){for(y=e.input.charCodeAt(e.position);zo(y);)y=e.input.charCodeAt(++e.position);if(y===58)y=e.input.charCodeAt(++e.position),bi(y)||Qe(e,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(Ql(e,f,d,g,p,null),g=p=h=null),v=!0,w=!1,i=!1,g=e.tag,p=e.result;else if(v)Qe(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=l,!0}else if(v)Qe(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=l,!0;else break;if((e.line===a||e.lineIndent>t)&&(ec(e,t,s0,!0,i)&&(w?p=e.result:h=e.result),w||(Ql(e,f,d,g,p,h,a,s),g=p=h=null),Kr(e,!0,-1),y=e.input.charCodeAt(e.position)),e.lineIndent>t&&y!==0)Qe(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return w&&Ql(e,f,d,g,p,null),v&&(e.tag=u,e.anchor=l,e.kind="mapping",e.result=f),v}function HP(e){var t,r=!1,n=!1,i,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&Qe(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):Qe(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!bi(s);)s===33&&(n?Qe(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),Hb.test(i)||Qe(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),BP.test(a)&&Qe(e,"tag suffix cannot contain flow indicator characters")}return a&&!Mb.test(a)&&Qe(e,"tag name cannot contain such characters: "+a),r?e.tag=a:Ku.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i==="!"?e.tag="!"+a:i==="!!"?e.tag="tag:yaml.org,2002:"+a:Qe(e,'undeclared tag handle "'+i+'"'),!0}function MP(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Qe(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!bi(r)&&!Zl(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Qe(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function qP(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!bi(n)&&!Zl(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Qe(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ku.call(e.anchorMap,r)||Qe(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Kr(e,!0,-1),!0}function ec(e,t,r,n,i){var a,s,u,l=1,f=!1,d=!1,g,p,h,w,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=u=s0===r||jb===r,n&&Kr(e,!0,-1)&&(f=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;HP(e)||MP(e);)Kr(e,!0,-1)?(f=!0,u=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):u=!1;if(u&&(u=f||i),(l===1||s0===r)&&(i0===r||Ub===r?w=t:w=t+1,v=e.position-e.lineStart,l===1?u&&(kb(e,v)||jP(e,v,w))||LP(e,w)?d=!0:(s&&UP(e,w)||kP(e,w)||NP(e,w)?d=!0:qP(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&Qe(e,"alias node should not have any properties")):OP(e,w,i0===r)&&(d=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(d=u&&kb(e,v))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Qe(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),g=0,p=e.implicitTypes.length;g<p;g+=1)if(h=e.implicitTypes[g],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Ku.call(e.typeMap[e.kind||"fallback"],e.tag)?(h=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&h.kind!==e.kind&&Qe(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result)?(e.result=h.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Qe(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):Qe(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function VP(e){var t=e.position,r,n,i,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(Kr(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!bi(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&Qe(e,"directive name must not be less than one character in length");s!==0;){for(;zo(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!sa(s));break}if(sa(s))break;for(r=e.position;s!==0&&!bi(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}s!==0&&xg(e),Ku.call(Tb,n)?Tb[n](e,n,i):a0(e,'unknown document directive "'+n+'"')}if(Kr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Kr(e,!0,-1)):a&&Qe(e,"directives end mark is expected"),ec(e,e.lineIndent-1,s0,!1,!0),Kr(e,!0,-1),e.checkLineBreaks&&IP.test(e.input.slice(t,e.position))&&a0(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&u0(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Kr(e,!0,-1));return}if(e.position<e.length-1)Qe(e,"end of the stream or a document separator is expected");else return}function zb(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new TP(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,Qe(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)VP(r);return r.documents}function Gb(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=zb(e,r);if(typeof t!="function")return n;for(var i=0,a=n.length;i<a;i+=1)t(n[i])}function Yb(e,t){var r=zb(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Nb("expected a single document in the stream, but found more")}}function KP(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),Gb(e,t,Qa.extend({schema:Lb},r))}function zP(e,t){return Yb(e,Qa.extend({schema:Lb},t))}Ff.exports.loadAll=Gb;Ff.exports.load=Yb;Ff.exports.safeLoadAll=KP;Ff.exports.safeLoad=zP});var wy=de((WG,Lg)=>{"use strict";var If=Mo(),Bf=Wl(),GP=Df(),YP=Jl(),ny=Object.prototype.toString,iy=Object.prototype.hasOwnProperty,WP=9,Sf=10,XP=13,JP=32,ZP=33,QP=34,sy=35,eR=37,tR=38,rR=39,nR=42,ay=44,iR=45,uy=58,sR=61,aR=62,uR=63,oR=64,oy=91,ly=93,lR=96,cy=123,cR=124,fy=125,Hn={};Hn[0]="\\0";Hn[7]="\\a";Hn[8]="\\b";Hn[9]="\\t";Hn[10]="\\n";Hn[11]="\\v";Hn[12]="\\f";Hn[13]="\\r";Hn[27]="\\e";Hn[34]='\\"';Hn[92]="\\\\";Hn[133]="\\N";Hn[160]="\\_";Hn[8232]="\\L";Hn[8233]="\\P";var fR=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function hR(e,t){var r,n,i,a,s,u,l;if(t===null)return{};for(r={},n=Object.keys(t),i=0,a=n.length;i<a;i+=1)s=n[i],u=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&iy.call(l.styleAliases,u)&&(u=l.styleAliases[u]),r[s]=u;return r}function Xb(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new Bf("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+If.repeat("0",n-t.length)+t}function dR(e){this.schema=e.schema||GP,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=If.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=hR(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Jb(e,t){for(var r=If.repeat(" ",t),n=0,i=-1,a="",s,u=e.length;n<u;)i=e.indexOf(`
`,n),i===-1?(s=e.slice(n),n=u):(s=e.slice(n,i+1),n=i+1),s.length&&s!==`
`&&(a+=r),a+=s;return a}function Og(e,t){return`
`+If.repeat(" ",e.indent*t)}function pR(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(i=e.implicitTypes[r],i.resolve(t))return!0;return!1}function Ng(e){return e===JP||e===WP}function tc(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function gR(e){return tc(e)&&!Ng(e)&&e!==65279&&e!==XP&&e!==Sf}function Zb(e,t){return tc(e)&&e!==65279&&e!==ay&&e!==oy&&e!==ly&&e!==cy&&e!==fy&&e!==uy&&(e!==sy||t&&gR(t))}function mR(e){return tc(e)&&e!==65279&&!Ng(e)&&e!==iR&&e!==uR&&e!==uy&&e!==ay&&e!==oy&&e!==ly&&e!==cy&&e!==fy&&e!==sy&&e!==tR&&e!==nR&&e!==ZP&&e!==cR&&e!==sR&&e!==aR&&e!==rR&&e!==QP&&e!==eR&&e!==oR&&e!==lR}function hy(e){var t=/^\n* /;return t.test(e)}var dy=1,py=2,gy=3,my=4,o0=5;function vR(e,t,r,n,i){var a,s,u,l=!1,f=!1,d=n!==-1,g=-1,p=mR(e.charCodeAt(0))&&!Ng(e.charCodeAt(e.length-1));if(t)for(a=0;a<e.length;a++){if(s=e.charCodeAt(a),!tc(s))return o0;u=a>0?e.charCodeAt(a-1):null,p=p&&Zb(s,u)}else{for(a=0;a<e.length;a++){if(s=e.charCodeAt(a),s===Sf)l=!0,d&&(f=f||a-g-1>n&&e[g+1]!==" ",g=a);else if(!tc(s))return o0;u=a>0?e.charCodeAt(a-1):null,p=p&&Zb(s,u)}f=f||d&&a-g-1>n&&e[g+1]!==" "}return!l&&!f?p&&!i(e)?dy:py:r>9&&hy(e)?o0:f?my:gy}function wR(e,t,r,n){e.dump=function(){if(t.length===0)return"''";if(!e.noCompatMode&&fR.indexOf(t)!==-1)return"'"+t+"'";var i=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=n||e.flowLevel>-1&&r>=e.flowLevel;function u(l){return pR(e,l)}switch(vR(t,s,e.indent,a,u)){case dy:return t;case py:return"'"+t.replace(/'/g,"''")+"'";case gy:return"|"+Qb(t,e.indent)+ey(Jb(t,i));case my:return">"+Qb(t,e.indent)+ey(Jb(AR(t,a),i));case o0:return'"'+ER(t,a)+'"';default:throw new Bf("impossible error: invalid scalar style")}}()}function Qb(e,t){var r=hy(e)?String(t):"",n=e[e.length-1]===`
`,i=n&&(e[e.length-2]===`
`||e===`
`),a=i?"+":n?"":"-";return r+a+`
`}function ey(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function AR(e,t){for(var r=/(\n+)([^\n]*)/g,n=function(){var f=e.indexOf(`
`);return f=f!==-1?f:e.length,r.lastIndex=f,ty(e.slice(0,f),t)}(),i=e[0]===`
`||e[0]===" ",a,s;s=r.exec(e);){var u=s[1],l=s[2];a=l[0]===" ",n+=u+(!i&&!a&&l!==""?`
`:"")+ty(l,t),i=a}return n}function ty(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,i=0,a,s=0,u=0,l="";n=r.exec(e);)u=n.index,u-i>t&&(a=s>i?s:u,l+=`
`+e.slice(i,a),i=a+1),s=u;return l+=`
`,e.length-i>t&&s>i?l+=e.slice(i,s)+`
`+e.slice(s+1):l+=e.slice(i),l.slice(1)}function ER(e){for(var t="",r,n,i,a=0;a<e.length;a++){if(r=e.charCodeAt(a),r>=55296&&r<=56319&&(n=e.charCodeAt(a+1),n>=56320&&n<=57343)){t+=Xb((r-55296)*1024+n-56320+65536),a++;continue}i=Hn[r],t+=!i&&tc(r)?e[a]:i||Xb(r)}return t}function bR(e,t,r){var n="",i=e.tag,a,s;for(a=0,s=r.length;a<s;a+=1)Go(e,t,r[a],!1,!1)&&(a!==0&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}function yR(e,t,r,n){var i="",a=e.tag,s,u;for(s=0,u=r.length;s<u;s+=1)Go(e,t+1,r[s],!0,!0)&&((!n||s!==0)&&(i+=Og(e,t)),e.dump&&Sf===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=a,e.dump=i||"[]"}function _R(e,t,r){var n="",i=e.tag,a=Object.keys(r),s,u,l,f,d;for(s=0,u=a.length;s<u;s+=1)d="",s!==0&&(d+=", "),e.condenseFlow&&(d+='"'),l=a[s],f=r[l],Go(e,t,l,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Go(e,t,f,!1,!1)&&(d+=e.dump,n+=d));e.tag=i,e.dump="{"+n+"}"}function CR(e,t,r,n){var i="",a=e.tag,s=Object.keys(r),u,l,f,d,g,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Bf("sortKeys must be a boolean or a function");for(u=0,l=s.length;u<l;u+=1)p="",(!n||u!==0)&&(p+=Og(e,t)),f=s[u],d=r[f],Go(e,t+1,f,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&Sf===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,g&&(p+=Og(e,t)),Go(e,t+1,d,!0,g)&&(e.dump&&Sf===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=a,e.dump=i||"{}"}function ry(e,t,r){var n,i,a,s,u,l;for(i=r?e.explicitTypes:e.implicitTypes,a=0,s=i.length;a<s;a+=1)if(u=i[a],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t=="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(e.tag=r?u.tag:"?",u.represent){if(l=e.styleMap[u.tag]||u.defaultStyle,ny.call(u.represent)==="[object Function]")n=u.represent(t,l);else if(iy.call(u.represent,l))n=u.represent[l](t,l);else throw new Bf("!<"+u.tag+'> tag resolver accepts not "'+l+'" style');e.dump=n}return!0}return!1}function Go(e,t,r,n,i,a){e.tag=null,e.dump=r,ry(e,r,!1)||ry(e,r,!0);var s=ny.call(e.dump);n&&(n=e.flowLevel<0||e.flowLevel>t);var u=s==="[object Object]"||s==="[object Array]",l,f;if(u&&(l=e.duplicates.indexOf(r),f=l!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(u&&f&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),s==="[object Object]")n&&Object.keys(e.dump).length!==0?(CR(e,t,e.dump,i),f&&(e.dump="&ref_"+l+e.dump)):(_R(e,t,e.dump),f&&(e.dump="&ref_"+l+" "+e.dump));else if(s==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;n&&e.dump.length!==0?(yR(e,d,e.dump,i),f&&(e.dump="&ref_"+l+e.dump)):(bR(e,d,e.dump),f&&(e.dump="&ref_"+l+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&wR(e,e.dump,t,a);else{if(e.skipInvalid)return!1;throw new Bf("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function DR(e,t){var r=[],n=[],i,a;for(kg(e,r,n),i=0,a=n.length;i<a;i+=1)t.duplicates.push(r[n[i]]);t.usedDuplicates=new Array(a)}function kg(e,t,r){var n,i,a;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)kg(e[i],t,r);else for(n=Object.keys(e),i=0,a=n.length;i<a;i+=1)kg(e[n[i]],t,r)}function vy(e,t){t=t||{};var r=new dR(t);return r.noRefs||DR(e,r),Go(r,0,e,!0,!0)?r.dump+`
`:""}function FR(e,t){return vy(e,If.extend({schema:YP},t))}Lg.exports.dump=vy;Lg.exports.safeDump=FR});var Ey=de((XG,xr)=>{"use strict";var l0=Wb(),Ay=wy();function c0(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}xr.exports.Type=Zr();xr.exports.Schema=qo();xr.exports.FAILSAFE_SCHEMA=r0();xr.exports.JSON_SCHEMA=Bg();xr.exports.CORE_SCHEMA=$g();xr.exports.DEFAULT_SAFE_SCHEMA=Jl();xr.exports.DEFAULT_FULL_SCHEMA=Df();xr.exports.load=l0.load;xr.exports.loadAll=l0.loadAll;xr.exports.safeLoad=l0.safeLoad;xr.exports.safeLoadAll=l0.safeLoadAll;xr.exports.dump=Ay.dump;xr.exports.safeDump=Ay.safeDump;xr.exports.YAMLException=Wl();xr.exports.MINIMAL_SCHEMA=r0();xr.exports.SAFE_SCHEMA=Jl();xr.exports.DEFAULT_SCHEMA=Df();xr.exports.scan=c0("scan");xr.exports.parse=c0("parse");xr.exports.compose=c0("compose");xr.exports.addConstructor=c0("addConstructor")});var yy=de((JG,by)=>{"use strict";var SR=Ey();by.exports=SR});var Cy=de((ZG,_y)=>{"use strict";var f0=yy();_y.exports={safeLoad:f0.safeLoad,load:f0.load,safeDump:f0.safeDump,dump:f0.dump}});var $y=de(d0=>{"use strict";d0.byteLength=kR;d0.toByteArray=LR;d0.fromByteArray=HR;var oa=[],hs=[],OR=typeof Uint8Array<"u"?Uint8Array:Array,Ug="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Yo=0,Iy=Ug.length;Yo<Iy;++Yo)oa[Yo]=Ug[Yo],hs[Ug.charCodeAt(Yo)]=Yo;var Yo,Iy;hs[45]=62;hs[95]=63;function By(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function kR(e){var t=By(e),r=t[0],n=t[1];return(r+n)*3/4-n}function NR(e,t,r){return(t+r)*3/4-r}function LR(e){var t,r=By(e),n=r[0],i=r[1],a=new OR(NR(e,n,i)),s=0,u=i>0?n-4:n,l;for(l=0;l<u;l+=4)t=hs[e.charCodeAt(l)]<<18|hs[e.charCodeAt(l+1)]<<12|hs[e.charCodeAt(l+2)]<<6|hs[e.charCodeAt(l+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=t&255;return i===2&&(t=hs[e.charCodeAt(l)]<<2|hs[e.charCodeAt(l+1)]>>4,a[s++]=t&255),i===1&&(t=hs[e.charCodeAt(l)]<<10|hs[e.charCodeAt(l+1)]<<4|hs[e.charCodeAt(l+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function UR(e){return oa[e>>18&63]+oa[e>>12&63]+oa[e>>6&63]+oa[e&63]}function jR(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(UR(n));return i.join("")}function HR(e){for(var t,r=e.length,n=r%3,i=[],a=16383,s=0,u=r-n;s<u;s+=a)i.push(jR(e,s,s+a>u?u:s+a));return n===1?(t=e[r-1],i.push(oa[t>>2]+oa[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(oa[t>>10]+oa[t>>4&63]+oa[t<<2&63]+"=")),i.join("")}});var Py=de(jg=>{jg.read=function(e,t,r,n,i){var a,s,u=i*8-n-1,l=(1<<u)-1,f=l>>1,d=-7,g=r?i-1:0,p=r?-1:1,h=e[t+g];for(g+=p,a=h&(1<<-d)-1,h>>=-d,d+=u;d>0;a=a*256+e[t+g],g+=p,d-=8);for(s=a&(1<<-d)-1,a>>=-d,d+=n;d>0;s=s*256+e[t+g],g+=p,d-=8);if(a===0)a=1-f;else{if(a===l)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-f}return(h?-1:1)*s*Math.pow(2,a-n)};jg.write=function(e,t,r,n,i,a){var s,u,l,f=a*8-i-1,d=(1<<f)-1,g=d>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,w=n?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,s=d):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+g>=1?t+=p/l:t+=p*Math.pow(2,1-g),t*l>=2&&(s++,l/=2),s+g>=d?(u=0,s=d):s+g>=1?(u=(t*l-1)*Math.pow(2,i),s=s+g):(u=t*Math.pow(2,g-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=u&255,h+=w,u/=256,i-=8);for(s=s<<i|u,f+=i;f>0;e[r+h]=s&255,h+=w,s/=256,f-=8);e[r+h-w]|=v*128}});var m0=de(sc=>{"use strict";var Hg=$y(),nc=Py(),Ry=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;sc.Buffer=pe;sc.SlowBuffer=GR;sc.INSPECT_MAX_BYTES=50;var p0=2147483647;sc.kMaxLength=p0;pe.TYPED_ARRAY_SUPPORT=MR();!pe.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function MR(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(pe.prototype,"parent",{enumerable:!0,get:function(){if(pe.isBuffer(this))return this.buffer}});Object.defineProperty(pe.prototype,"offset",{enumerable:!0,get:function(){if(pe.isBuffer(this))return this.byteOffset}});function eu(e){if(e>p0)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,pe.prototype),t}function pe(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Kg(e)}return ky(e,t,r)}pe.poolSize=8192;function ky(e,t,r){if(typeof e=="string")return VR(e,t);if(ArrayBuffer.isView(e))return KR(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(la(e,ArrayBuffer)||e&&la(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(la(e,SharedArrayBuffer)||e&&la(e.buffer,SharedArrayBuffer)))return qg(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return pe.from(n,t,r);let i=zR(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return pe.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}pe.from=function(e,t,r){return ky(e,t,r)};Object.setPrototypeOf(pe.prototype,Uint8Array.prototype);Object.setPrototypeOf(pe,Uint8Array);function Ny(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function qR(e,t,r){return Ny(e),e<=0?eu(e):t!==void 0?typeof r=="string"?eu(e).fill(t,r):eu(e).fill(t):eu(e)}pe.alloc=function(e,t,r){return qR(e,t,r)};function Kg(e){return Ny(e),eu(e<0?0:zg(e)|0)}pe.allocUnsafe=function(e){return Kg(e)};pe.allocUnsafeSlow=function(e){return Kg(e)};function VR(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!pe.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Ly(e,t)|0,n=eu(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Mg(e){let t=e.length<0?0:zg(e.length)|0,r=eu(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function KR(e){if(la(e,Uint8Array)){let t=new Uint8Array(e);return qg(t.buffer,t.byteOffset,t.byteLength)}return Mg(e)}function qg(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,pe.prototype),n}function zR(e){if(pe.isBuffer(e)){let t=zg(e.length)|0,r=eu(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||Yg(e.length)?eu(0):Mg(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Mg(e.data)}function zg(e){if(e>=p0)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p0.toString(16)+" bytes");return e|0}function GR(e){return+e!=e&&(e=0),pe.alloc(+e)}pe.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==pe.prototype};pe.compare=function(t,r){if(la(t,Uint8Array)&&(t=pe.from(t,t.offset,t.byteLength)),la(r,Uint8Array)&&(r=pe.from(r,r.offset,r.byteLength)),!pe.isBuffer(t)||!pe.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,s=Math.min(n,i);a<s;++a)if(t[a]!==r[a]){n=t[a],i=r[a];break}return n<i?-1:i<n?1:0};pe.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};pe.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return pe.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let i=pe.allocUnsafe(r),a=0;for(n=0;n<t.length;++n){let s=t[n];if(la(s,Uint8Array))a+s.length>i.length?(pe.isBuffer(s)||(s=pe.from(s)),s.copy(i,a)):Uint8Array.prototype.set.call(i,s,a);else if(pe.isBuffer(s))s.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=s.length}return i};function Ly(e,t){if(pe.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||la(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Vg(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Gy(e).length;default:if(i)return n?-1:Vg(e).length;t=(""+t).toLowerCase(),i=!0}}pe.byteLength=Ly;function YR(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return ix(this,t,r);case"utf8":case"utf-8":return jy(this,t,r);case"ascii":return rx(this,t,r);case"latin1":case"binary":return nx(this,t,r);case"base64":return ex(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return sx(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}pe.prototype._isBuffer=!0;function Wo(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}pe.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)Wo(this,r,r+1);return this};pe.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)Wo(this,r,r+3),Wo(this,r+1,r+2);return this};pe.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)Wo(this,r,r+7),Wo(this,r+1,r+6),Wo(this,r+2,r+5),Wo(this,r+3,r+4);return this};pe.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?jy(this,0,t):YR.apply(this,arguments)};pe.prototype.toLocaleString=pe.prototype.toString;pe.prototype.equals=function(t){if(!pe.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:pe.compare(this,t)===0};pe.prototype.inspect=function(){let t="",r=sc.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};Ry&&(pe.prototype[Ry]=pe.prototype.inspect);pe.prototype.compare=function(t,r,n,i,a){if(la(t,Uint8Array)&&(t=pe.from(t,t.offset,t.byteLength)),!pe.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let s=a-i,u=n-r,l=Math.min(s,u),f=this.slice(i,a),d=t.slice(r,n);for(let g=0;g<l;++g)if(f[g]!==d[g]){s=f[g],u=d[g];break}return s<u?-1:u<s?1:0};function Uy(e,t,r,n,i){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Yg(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=pe.from(t,n)),pe.isBuffer(t))return t.length===0?-1:xy(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):xy(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function xy(e,t,r,n,i){let a=1,s=e.length,u=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function l(d,g){return a===1?d[g]:d.readUInt16BE(g*a)}let f;if(i){let d=-1;for(f=r;f<s;f++)if(l(e,f)===l(t,d===-1?0:f-d)){if(d===-1&&(d=f),f-d+1===u)return d*a}else d!==-1&&(f-=f-d),d=-1}else for(r+u>s&&(r=s-u),f=r;f>=0;f--){let d=!0;for(let g=0;g<u;g++)if(l(e,f+g)!==l(t,g)){d=!1;break}if(d)return f}return-1}pe.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};pe.prototype.indexOf=function(t,r,n){return Uy(this,t,r,n,!0)};pe.prototype.lastIndexOf=function(t,r,n){return Uy(this,t,r,n,!1)};function WR(e,t,r,n){r=Number(r)||0;let i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let s;for(s=0;s<n;++s){let u=parseInt(t.substr(s*2,2),16);if(Yg(u))return s;e[r+s]=u}return s}function XR(e,t,r,n){return g0(Vg(t,e.length-r),e,r,n)}function JR(e,t,r,n){return g0(lx(t),e,r,n)}function ZR(e,t,r,n){return g0(Gy(t),e,r,n)}function QR(e,t,r,n){return g0(cx(t,e.length-r),e,r,n)}pe.prototype.write=function(t,r,n,i){if(r===void 0)i="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")i=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return WR(this,t,r,n);case"utf8":case"utf-8":return XR(this,t,r,n);case"ascii":case"latin1":case"binary":return JR(this,t,r,n);case"base64":return ZR(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return QR(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};pe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ex(e,t,r){return t===0&&r===e.length?Hg.fromByteArray(e):Hg.fromByteArray(e.slice(t,r))}function jy(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let a=e[i],s=null,u=a>239?4:a>223?3:a>191?2:1;if(i+u<=r){let l,f,d,g;switch(u){case 1:a<128&&(s=a);break;case 2:l=e[i+1],(l&192)===128&&(g=(a&31)<<6|l&63,g>127&&(s=g));break;case 3:l=e[i+1],f=e[i+2],(l&192)===128&&(f&192)===128&&(g=(a&15)<<12|(l&63)<<6|f&63,g>2047&&(g<55296||g>57343)&&(s=g));break;case 4:l=e[i+1],f=e[i+2],d=e[i+3],(l&192)===128&&(f&192)===128&&(d&192)===128&&(g=(a&15)<<18|(l&63)<<12|(f&63)<<6|d&63,g>65535&&g<1114112&&(s=g))}}s===null?(s=65533,u=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=u}return tx(n)}var Ty=4096;function tx(e){let t=e.length;if(t<=Ty)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Ty));return r}function rx(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]&127);return n}function nx(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function ix(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let a=t;a<r;++a)i+=fx[e[a]];return i}function sx(e,t,r){let n=e.slice(t,r),i="";for(let a=0;a<n.length-1;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}pe.prototype.slice=function(t,r){let n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);let i=this.subarray(t,r);return Object.setPrototypeOf(i,pe.prototype),i};function cn(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}pe.prototype.readUintLE=pe.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||cn(t,r,this.length);let i=this[t],a=1,s=0;for(;++s<r&&(a*=256);)i+=this[t+s]*a;return i};pe.prototype.readUintBE=pe.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||cn(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};pe.prototype.readUint8=pe.prototype.readUInt8=function(t,r){return t=t>>>0,r||cn(t,1,this.length),this[t]};pe.prototype.readUint16LE=pe.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||cn(t,2,this.length),this[t]|this[t+1]<<8};pe.prototype.readUint16BE=pe.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||cn(t,2,this.length),this[t]<<8|this[t+1]};pe.prototype.readUint32LE=pe.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||cn(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};pe.prototype.readUint32BE=pe.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||cn(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};pe.prototype.readBigUInt64LE=zu(function(t){t=t>>>0,ic(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Rf(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<<BigInt(32))});pe.prototype.readBigUInt64BE=zu(function(t){t=t>>>0,ic(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Rf(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(a)});pe.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||cn(t,r,this.length);let i=this[t],a=1,s=0;for(;++s<r&&(a*=256);)i+=this[t+s]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};pe.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||cn(t,r,this.length);let i=r,a=1,s=this[t+--i];for(;i>0&&(a*=256);)s+=this[t+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};pe.prototype.readInt8=function(t,r){return t=t>>>0,r||cn(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};pe.prototype.readInt16LE=function(t,r){t=t>>>0,r||cn(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};pe.prototype.readInt16BE=function(t,r){t=t>>>0,r||cn(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};pe.prototype.readInt32LE=function(t,r){return t=t>>>0,r||cn(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};pe.prototype.readInt32BE=function(t,r){return t=t>>>0,r||cn(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};pe.prototype.readBigInt64LE=zu(function(t){t=t>>>0,ic(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Rf(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});pe.prototype.readBigInt64BE=zu(function(t){t=t>>>0,ic(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Rf(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});pe.prototype.readFloatLE=function(t,r){return t=t>>>0,r||cn(t,4,this.length),nc.read(this,t,!0,23,4)};pe.prototype.readFloatBE=function(t,r){return t=t>>>0,r||cn(t,4,this.length),nc.read(this,t,!1,23,4)};pe.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||cn(t,8,this.length),nc.read(this,t,!0,52,8)};pe.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||cn(t,8,this.length),nc.read(this,t,!1,52,8)};function yi(e,t,r,n,i,a){if(!pe.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}pe.prototype.writeUintLE=pe.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let u=Math.pow(2,8*n)-1;yi(this,t,r,n,u,0)}let a=1,s=0;for(this[r]=t&255;++s<n&&(a*=256);)this[r+s]=t/a&255;return r+n};pe.prototype.writeUintBE=pe.prototype.writeUIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let u=Math.pow(2,8*n)-1;yi(this,t,r,n,u,0)}let a=n-1,s=1;for(this[r+a]=t&255;--a>=0&&(s*=256);)this[r+a]=t/s&255;return r+n};pe.prototype.writeUint8=pe.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,1,255,0),this[r]=t&255,r+1};pe.prototype.writeUint16LE=pe.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};pe.prototype.writeUint16BE=pe.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};pe.prototype.writeUint32LE=pe.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};pe.prototype.writeUint32BE=pe.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Hy(e,t,r,n,i){zy(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function My(e,t,r,n,i){zy(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}pe.prototype.writeBigUInt64LE=zu(function(t,r=0){return Hy(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});pe.prototype.writeBigUInt64BE=zu(function(t,r=0){return My(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});pe.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);yi(this,t,r,n,l-1,-l)}let a=0,s=1,u=0;for(this[r]=t&255;++a<n&&(s*=256);)t<0&&u===0&&this[r+a-1]!==0&&(u=1),this[r+a]=(t/s>>0)-u&255;return r+n};pe.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);yi(this,t,r,n,l-1,-l)}let a=n-1,s=1,u=0;for(this[r+a]=t&255;--a>=0&&(s*=256);)t<0&&u===0&&this[r+a+1]!==0&&(u=1),this[r+a]=(t/s>>0)-u&255;return r+n};pe.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};pe.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};pe.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};pe.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};pe.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||yi(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};pe.prototype.writeBigInt64LE=zu(function(t,r=0){return Hy(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});pe.prototype.writeBigInt64BE=zu(function(t,r=0){return My(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function qy(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Vy(e,t,r,n,i){return t=+t,r=r>>>0,i||qy(e,t,r,4,34028234663852886e22,-34028234663852886e22),nc.write(e,t,r,n,23,4),r+4}pe.prototype.writeFloatLE=function(t,r,n){return Vy(this,t,r,!0,n)};pe.prototype.writeFloatBE=function(t,r,n){return Vy(this,t,r,!1,n)};function Ky(e,t,r,n,i){return t=+t,r=r>>>0,i||qy(e,t,r,8,17976931348623157e292,-17976931348623157e292),nc.write(e,t,r,n,52,8),r+8}pe.prototype.writeDoubleLE=function(t,r,n){return Ky(this,t,r,!0,n)};pe.prototype.writeDoubleBE=function(t,r,n){return Ky(this,t,r,!1,n)};pe.prototype.copy=function(t,r,n,i){if(!pe.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);let a=i-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),r),a};pe.prototype.fill=function(t,r,n,i){if(typeof t=="string"){if(typeof r=="string"?(i=r,r=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!pe.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(t.length===1){let s=t.charCodeAt(0);(i==="utf8"&&s<128||i==="latin1")&&(t=s)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a<n;++a)this[a]=t;else{let s=pe.isBuffer(t)?t:pe.from(t,i),u=s.length;if(u===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<n-r;++a)this[a+r]=s[a%u]}return this};var rc={};function Gg(e,t,r){rc[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}Gg("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Gg("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);Gg("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Oy(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Oy(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Oy(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function ax(e,t,r){ic(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Rf(t,e.length-(r+1))}function zy(e,t,r,n,i,a){if(e>r||e<t){let s=typeof t=="bigint"?"n":"",u;throw a>3?t===0||t===BigInt(0)?u=`>= 0${s} and < 2${s} ** ${(a+1)*8}${s}`:u=`>= -(2${s} ** ${(a+1)*8-1}${s}) and < 2 ** ${(a+1)*8-1}${s}`:u=`>= ${t}${s} and <= ${r}${s}`,new rc.ERR_OUT_OF_RANGE("value",u,e)}ax(n,i,a)}function ic(e,t){if(typeof e!="number")throw new rc.ERR_INVALID_ARG_TYPE(t,"number",e)}function Rf(e,t,r){throw Math.floor(e)!==e?(ic(e,r),new rc.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new rc.ERR_BUFFER_OUT_OF_BOUNDS:new rc.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var ux=/[^+/0-9A-Za-z-_]/g;function ox(e){if(e=e.split("=")[0],e=e.trim().replace(ux,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Vg(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function lx(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function cx(e,t){let r,n,i,a=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function Gy(e){return Hg.toByteArray(ox(e))}function g0(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function la(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Yg(e){return e!==e}var fx=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function zu(e){return typeof BigInt>"u"?hx:e}function hx(){throw new Error("BigInt not supported")}});var v_=de(De=>{var xf={};xf.userAgent=!1;var ac={},dx="11.1.0",px="jsrsasign(all) 11.1.0 (2024-02-01) (c) 2010-2023 Kenji Urushima | kjur.github.io/jsrsasign/license";var Be=Be||function(e,t){var r={},n=r.lib={},i=n.Base=function(){function h(){}return{extend:function(w){h.prototype=this;var v=new h;return w&&v.mixIn(w),v.hasOwnProperty("init")||(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var v in w)w.hasOwnProperty(v)&&(this[v]=w[v]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=n.WordArray=i.extend({init:function(h,w){h=this.words=h||[],w!=t?this.sigBytes=w:this.sigBytes=h.length*4},toString:function(h){return(h||u).stringify(this)},concat:function(h){var w=this.words,v=h.words,y=this.sigBytes,m=h.sigBytes;if(this.clamp(),y%4)for(var b=0;b<m;b++){var D=v[b>>>2]>>>24-b%4*8&255;w[y+b>>>2]|=D<<24-(y+b)%4*8}else for(var b=0;b<m;b+=4)w[y+b>>>2]=v[b>>>2];return this.sigBytes+=m,this},clamp:function(){var h=this.words,w=this.sigBytes;h[w>>>2]&=4294967295<<32-w%4*8,h.length=e.ceil(w/4)},clone:function(){var h=i.clone.call(this);return h.words=this.words.slice(0),h},random:function(h){for(var w=[],v=0;v<h;v+=4)w.push(e.random()*4294967296|0);return new a.init(w,h)}}),s=r.enc={},u=s.Hex={stringify:function(h){for(var w=h.words,v=h.sigBytes,y=[],m=0;m<v;m++){var b=w[m>>>2]>>>24-m%4*8&255;y.push((b>>>4).toString(16)),y.push((b&15).toString(16))}return y.join("")},parse:function(h){for(var w=h.length,v=[],y=0;y<w;y+=2)v[y>>>3]|=parseInt(h.substr(y,2),16)<<24-y%8*4;return new a.init(v,w/2)}},l=s.Latin1={stringify:function(h){for(var w=h.words,v=h.sigBytes,y=[],m=0;m<v;m++){var b=w[m>>>2]>>>24-m%4*8&255;y.push(String.fromCharCode(b))}return y.join("")},parse:function(h){for(var w=h.length,v=[],y=0;y<w;y++)v[y>>>2]|=(h.charCodeAt(y)&255)<<24-y%4*8;return new a.init(v,w)}},f=s.Utf8={stringify:function(h){try{return decodeURIComponent(escape(l.stringify(h)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(h){return l.parse(unescape(encodeURIComponent(h)))}},d=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(h){typeof h=="string"&&(h=f.parse(h)),this._data.concat(h),this._nDataBytes+=h.sigBytes},_process:function(h){var w=this._data,v=w.words,y=w.sigBytes,m=this.blockSize,b=m*4,D=y/b;h?D=e.ceil(D):D=e.max((D|0)-this._minBufferSize,0);var C=D*m,F=e.min(C*4,y);if(C){for(var L=0;L<C;L+=m)this._doProcessBlock(v,L);var N=v.splice(0,C);w.sigBytes-=F}return new a.init(N,F)},clone:function(){var h=i.clone.call(this);return h._data=this._data.clone(),h},_minBufferSize:0}),g=n.Hasher=d.extend({cfg:i.extend(),init:function(h){this.cfg=this.cfg.extend(h),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(h){return this._append(h),this._process(),this},finalize:function(h){h&&this._append(h);var w=this._doFinalize();return w},blockSize:512/32,_createHelper:function(h){return function(w,v){return new h.init(v).finalize(w)}},_createHmacHelper:function(h){return function(w,v){return new p.HMAC.init(h,v).finalize(w)}}}),p=r.algo={};return r}(Math);(function(e){var i=Be,t=i.lib,r=t.Base,n=t.WordArray,i=i.x64={};i.Word=r.extend({init:function(a,s){this.high=a,this.low=s}}),i.WordArray=r.extend({init:function(a,s){a=this.words=a||[],this.sigBytes=s!=e?s:8*a.length},toX32:function(){for(var a=this.words,s=a.length,u=[],l=0;l<s;l++){var f=a[l];u.push(f.high),u.push(f.low)}return n.create(u,this.sigBytes)},clone:function(){for(var a=r.clone.call(this),s=a.words=this.words.slice(0),u=s.length,l=0;l<u;l++)s[l]=s[l].clone();return a}})})();Be.lib.Cipher||function(e){var h=Be,t=h.lib,r=t.Base,n=t.WordArray,i=t.BufferedBlockAlgorithm,a=h.enc.Base64,s=h.algo.EvpKDF,u=t.Cipher=i.extend({cfg:r.extend(),createEncryptor:function(v,y){return this.create(this._ENC_XFORM_MODE,v,y)},createDecryptor:function(v,y){return this.create(this._DEC_XFORM_MODE,v,y)},init:function(v,y,m){this.cfg=this.cfg.extend(m),this._xformMode=v,this._key=y,this.reset()},reset:function(){i.reset.call(this),this._doReset()},process:function(v){return this._append(v),this._process()},finalize:function(v){return v&&this._append(v),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(v){return{encrypt:function(y,m,b){return(typeof m=="string"?w:p).encrypt(v,y,m,b)},decrypt:function(y,m,b){return(typeof m=="string"?w:p).decrypt(v,y,m,b)}}}});t.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var g=h.mode={},l=function(v,y,m){var b=this._iv;b?this._iv=e:b=this._prevBlock;for(var D=0;D<m;D++)v[y+D]^=b[D]},f=(t.BlockCipherMode=r.extend({createEncryptor:function(v,y){return this.Encryptor.create(v,y)},createDecryptor:function(v,y){return this.Decryptor.create(v,y)},init:function(v,y){this._cipher=v,this._iv=y}})).extend();f.Encryptor=f.extend({processBlock:function(v,y){var m=this._cipher,b=m.blockSize;l.call(this,v,y,b),m.encryptBlock(v,y),this._prevBlock=v.slice(y,y+b)}}),f.Decryptor=f.extend({processBlock:function(v,y){var m=this._cipher,b=m.blockSize,D=v.slice(y,y+b);m.decryptBlock(v,y),l.call(this,v,y,b),this._prevBlock=D}}),g=g.CBC=f,f=(h.pad={}).Pkcs7={pad:function(v,y){for(var m=4*y,m=m-v.sigBytes%m,b=m<<24|m<<16|m<<8|m,D=[],C=0;C<m;C+=4)D.push(b);m=n.create(D,m),v.concat(m)},unpad:function(v){v.sigBytes-=v.words[v.sigBytes-1>>>2]&255}},t.BlockCipher=u.extend({cfg:u.cfg.extend({mode:g,padding:f}),reset:function(){u.reset.call(this);var y=this.cfg,v=y.iv,y=y.mode;if(this._xformMode==this._ENC_XFORM_MODE)var m=y.createEncryptor;else m=y.createDecryptor,this._minBufferSize=1;this._mode=m.call(y,this,v&&v.words)},_doProcessBlock:function(v,y){this._mode.processBlock(v,y)},_doFinalize:function(){var v=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){v.pad(this._data,this.blockSize);var y=this._process(!0)}else y=this._process(!0),v.unpad(y);return y},blockSize:4});var d=t.CipherParams=r.extend({init:function(v){this.mixIn(v)},toString:function(v){return(v||this.formatter).stringify(this)}}),g=(h.format={}).OpenSSL={stringify:function(v){var y=v.ciphertext;return v=v.salt,(v?n.create([1398893684,1701076831]).concat(v).concat(y):y).toString(a)},parse:function(v){v=a.parse(v);var y=v.words;if(y[0]==1398893684&&y[1]==1701076831){var m=n.create(y.slice(2,4));y.splice(0,4),v.sigBytes-=16}return d.create({ciphertext:v,salt:m})}},p=t.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(v,y,m,b){b=this.cfg.extend(b);var D=v.createEncryptor(m,b);return y=D.finalize(y),D=D.cfg,d.create({ciphertext:y,key:m,iv:D.iv,algorithm:v,mode:D.mode,padding:D.padding,blockSize:v.blockSize,formatter:b.format})},decrypt:function(v,y,m,b){return b=this.cfg.extend(b),y=this._parse(y,b.format),v.createDecryptor(m,b).finalize(y.ciphertext)},_parse:function(v,y){return typeof v=="string"?y.parse(v,this):v}}),h=(h.kdf={}).OpenSSL={execute:function(v,y,m,b){return b||(b=n.random(8)),v=s.create({keySize:y+m}).compute(v,b),m=n.create(v.words.slice(y),4*m),v.sigBytes=4*y,d.create({key:v,iv:m,salt:b})}},w=t.PasswordBasedCipher=p.extend({cfg:p.cfg.extend({kdf:h}),encrypt:function(v,y,m,b){return b=this.cfg.extend(b),m=b.kdf.execute(m,v.keySize,v.ivSize),b.iv=m.iv,v=p.encrypt.call(this,v,y,m.key,b),v.mixIn(m),v},decrypt:function(v,y,m,b){return b=this.cfg.extend(b),y=this._parse(y,b.format),m=b.kdf.execute(m,v.keySize,v.ivSize,y.salt),b.iv=m.iv,p.decrypt.call(this,v,y,m.key,b)}})}();(function(){for(var e=Be,t=e.lib.BlockCipher,L=e.algo,r=[],n=[],i=[],a=[],s=[],u=[],l=[],f=[],d=[],g=[],p=[],h=0;256>h;h++)p[h]=128>h?h<<1:h<<1^283;for(var w=0,v=0,h=0;256>h;h++){var y=v^v<<1^v<<2^v<<3^v<<4,y=y>>>8^y&255^99;r[w]=y,n[y]=w;var m=p[w],b=p[m],D=p[b],C=257*p[y]^16843008*y;i[w]=C<<24|C>>>8,a[w]=C<<16|C>>>16,s[w]=C<<8|C>>>24,u[w]=C,C=16843009*D^65537*b^257*m^16843008*w,l[y]=C<<24|C>>>8,f[y]=C<<16|C>>>16,d[y]=C<<8|C>>>24,g[y]=C,w?(w=m^p[p[p[D^m]]],v^=p[p[v]]):w=v=1}var F=[0,1,2,4,8,16,32,64,128,27,54],L=L.AES=t.extend({_doReset:function(){for(var B=this._key,N=B.words,S=B.sigBytes/4,B=4*((this._nRounds=S+6)+1),T=this._keySchedule=[],U=0;U<B;U++)if(U<S)T[U]=N[U];else{var V=T[U-1];U%S?6<S&&U%S==4&&(V=r[V>>>24]<<24|r[V>>>16&255]<<16|r[V>>>8&255]<<8|r[V&255]):(V=V<<8|V>>>24,V=r[V>>>24]<<24|r[V>>>16&255]<<16|r[V>>>8&255]<<8|r[V&255],V^=F[U/S|0]<<24),T[U]=T[U-S]^V}for(N=this._invKeySchedule=[],S=0;S<B;S++)U=B-S,V=S%4?T[U]:T[U-4],N[S]=4>S||4>=U?V:l[r[V>>>24]]^f[r[V>>>16&255]]^d[r[V>>>8&255]]^g[r[V&255]]},encryptBlock:function(N,S){this._doCryptBlock(N,S,this._keySchedule,i,a,s,u,r)},decryptBlock:function(N,S){var B=N[S+1];N[S+1]=N[S+3],N[S+3]=B,this._doCryptBlock(N,S,this._invKeySchedule,l,f,d,g,n),B=N[S+1],N[S+1]=N[S+3],N[S+3]=B},_doCryptBlock:function(N,S,B,T,U,V,Y,H){for(var z=this._nRounds,ue=N[S]^B[0],Ce=N[S+1]^B[1],Ue=N[S+2]^B[2],Je=N[S+3]^B[3],W=4,ie=1;ie<z;ie++)var Fe=T[ue>>>24]^U[Ce>>>16&255]^V[Ue>>>8&255]^Y[Je&255]^B[W++],Se=T[Ce>>>24]^U[Ue>>>16&255]^V[Je>>>8&255]^Y[ue&255]^B[W++],Re=T[Ue>>>24]^U[Je>>>16&255]^V[ue>>>8&255]^Y[Ce&255]^B[W++],Je=T[Je>>>24]^U[ue>>>16&255]^V[Ce>>>8&255]^Y[Ue&255]^B[W++],ue=Fe,Ce=Se,Ue=Re;Fe=(H[ue>>>24]<<24|H[Ce>>>16&255]<<16|H[Ue>>>8&255]<<8|H[Je&255])^B[W++],Se=(H[Ce>>>24]<<24|H[Ue>>>16&255]<<16|H[Je>>>8&255]<<8|H[ue&255])^B[W++],Re=(H[Ue>>>24]<<24|H[Je>>>16&255]<<16|H[ue>>>8&255]<<8|H[Ce&255])^B[W++],Je=(H[Je>>>24]<<24|H[ue>>>16&255]<<16|H[Ce>>>8&255]<<8|H[Ue&255])^B[W++],N[S]=Fe,N[S+1]=Se,N[S+2]=Re,N[S+3]=Je},keySize:8});e.AES=t._createHelper(L)})();(function(){function e(p,h){var w=(this._lBlock>>>p^this._rBlock)&h;this._rBlock^=w,this._lBlock^=w<<p}function t(p,h){var w=(this._rBlock>>>p^this._lBlock)&h;this._lBlock^=w,this._rBlock^=w<<p}var r=Be,i=r.lib,n=i.WordArray,i=i.BlockCipher,a=r.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],u=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],f=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],g=a.DES=i.extend({_doReset:function(){for(var p=this._key.words,h=[],w=0;56>w;w++){var v=s[w]-1;h[w]=p[v>>>5]>>>31-v%32&1}for(p=this._subKeys=[],v=0;16>v;v++){for(var y=p[v]=[],m=l[v],w=0;24>w;w++)y[w/6|0]|=h[(u[w]-1+m)%28]<<31-w%6,y[4+(w/6|0)]|=h[28+(u[w+24]-1+m)%28]<<31-w%6;for(y[0]=y[0]<<1|y[0]>>>31,w=1;7>w;w++)y[w]>>>=4*(w-1)+3;y[7]=y[7]<<5|y[7]>>>27}for(h=this._invSubKeys=[],w=0;16>w;w++)h[w]=p[15-w]},encryptBlock:function(p,h){this._doCryptBlock(p,h,this._subKeys)},decryptBlock:function(p,h){this._doCryptBlock(p,h,this._invSubKeys)},_doCryptBlock:function(p,h,w){this._lBlock=p[h],this._rBlock=p[h+1],e.call(this,4,252645135),e.call(this,16,65535),t.call(this,2,858993459),t.call(this,8,16711935),e.call(this,1,1431655765);for(var v=0;16>v;v++){for(var y=w[v],m=this._lBlock,b=this._rBlock,D=0,C=0;8>C;C++)D|=f[C][((b^y[C])&d[C])>>>0];this._lBlock=b,this._rBlock=m^D}w=this._lBlock,this._lBlock=this._rBlock,this._rBlock=w,e.call(this,1,1431655765),t.call(this,8,16711935),t.call(this,2,858993459),e.call(this,16,65535),e.call(this,4,252645135),p[h]=this._lBlock,p[h+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});r.DES=i._createHelper(g),a=a.TripleDES=i.extend({_doReset:function(){var p=this._key.words;this._des1=g.createEncryptor(n.create(p.slice(0,2))),this._des2=g.createEncryptor(n.create(p.slice(2,4))),this._des3=g.createEncryptor(n.create(p.slice(4,6)))},encryptBlock:function(p,h){this._des1.encryptBlock(p,h),this._des2.decryptBlock(p,h),this._des3.encryptBlock(p,h)},decryptBlock:function(p,h){this._des3.decryptBlock(p,h),this._des2.encryptBlock(p,h),this._des1.decryptBlock(p,h)},keySize:6,ivSize:2,blockSize:2}),r.TripleDES=i._createHelper(a)})();(function(){var e=Be,t=e.lib.WordArray;e.enc.Base64={stringify:function(r){var n=r.words,i=r.sigBytes,a=this._map;r.clamp(),r=[];for(var s=0;s<i;s+=3)for(var u=(n[s>>>2]>>>24-8*(s%4)&255)<<16|(n[s+1>>>2]>>>24-8*((s+1)%4)&255)<<8|n[s+2>>>2]>>>24-8*((s+2)%4)&255,l=0;4>l&&s+.75*l<i;l++)r.push(a.charAt(u>>>6*(3-l)&63));if(n=a.charAt(64))for(;r.length%4;)r.push(n);return r.join("")},parse:function(r){var n=r.length,i=this._map,a=i.charAt(64);a&&(a=r.indexOf(a),a!=-1&&(n=a));for(var a=[],s=0,u=0;u<n;u++)if(u%4){var l=i.indexOf(r.charAt(u-1))<<2*(u%4),f=i.indexOf(r.charAt(u))>>>6-2*(u%4);a[s>>>2]|=(l|f)<<24-8*(s%4),s++}return t.create(a,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();(function(e){function t(g,p,h,w,v,y,m){return g=g+(p&h|~p&w)+v+m,(g<<y|g>>>32-y)+p}function r(g,p,h,w,v,y,m){return g=g+(p&w|h&~w)+v+m,(g<<y|g>>>32-y)+p}function n(g,p,h,w,v,y,m){return g=g+(p^h^w)+v+m,(g<<y|g>>>32-y)+p}function i(g,p,h,w,v,y,m){return g=g+(h^(p|~w))+v+m,(g<<y|g>>>32-y)+p}for(var a=Be,l=a.lib,s=l.WordArray,u=l.Hasher,l=a.algo,f=[],d=0;64>d;d++)f[d]=4294967296*e.abs(e.sin(d+1))|0;l=l.MD5=u.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,p){for(var h=0;16>h;h++){var w=p+h,v=g[w];g[w]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360}var h=this._hash.words,w=g[p+0],v=g[p+1],y=g[p+2],m=g[p+3],b=g[p+4],D=g[p+5],C=g[p+6],F=g[p+7],L=g[p+8],N=g[p+9],S=g[p+10],B=g[p+11],T=g[p+12],U=g[p+13],V=g[p+14],Y=g[p+15],H=h[0],ie=h[1],W=h[2],z=h[3],H=t(H,ie,W,z,w,7,f[0]),z=t(z,H,ie,W,v,12,f[1]),W=t(W,z,H,ie,y,17,f[2]),ie=t(ie,W,z,H,m,22,f[3]),H=t(H,ie,W,z,b,7,f[4]),z=t(z,H,ie,W,D,12,f[5]),W=t(W,z,H,ie,C,17,f[6]),ie=t(ie,W,z,H,F,22,f[7]),H=t(H,ie,W,z,L,7,f[8]),z=t(z,H,ie,W,N,12,f[9]),W=t(W,z,H,ie,S,17,f[10]),ie=t(ie,W,z,H,B,22,f[11]),H=t(H,ie,W,z,T,7,f[12]),z=t(z,H,ie,W,U,12,f[13]),W=t(W,z,H,ie,V,17,f[14]),ie=t(ie,W,z,H,Y,22,f[15]),H=r(H,ie,W,z,v,5,f[16]),z=r(z,H,ie,W,C,9,f[17]),W=r(W,z,H,ie,B,14,f[18]),ie=r(ie,W,z,H,w,20,f[19]),H=r(H,ie,W,z,D,5,f[20]),z=r(z,H,ie,W,S,9,f[21]),W=r(W,z,H,ie,Y,14,f[22]),ie=r(ie,W,z,H,b,20,f[23]),H=r(H,ie,W,z,N,5,f[24]),z=r(z,H,ie,W,V,9,f[25]),W=r(W,z,H,ie,m,14,f[26]),ie=r(ie,W,z,H,L,20,f[27]),H=r(H,ie,W,z,U,5,f[28]),z=r(z,H,ie,W,y,9,f[29]),W=r(W,z,H,ie,F,14,f[30]),ie=r(ie,W,z,H,T,20,f[31]),H=n(H,ie,W,z,D,4,f[32]),z=n(z,H,ie,W,L,11,f[33]),W=n(W,z,H,ie,B,16,f[34]),ie=n(ie,W,z,H,V,23,f[35]),H=n(H,ie,W,z,v,4,f[36]),z=n(z,H,ie,W,b,11,f[37]),W=n(W,z,H,ie,F,16,f[38]),ie=n(ie,W,z,H,S,23,f[39]),H=n(H,ie,W,z,U,4,f[40]),z=n(z,H,ie,W,w,11,f[41]),W=n(W,z,H,ie,m,16,f[42]),ie=n(ie,W,z,H,C,23,f[43]),H=n(H,ie,W,z,N,4,f[44]),z=n(z,H,ie,W,T,11,f[45]),W=n(W,z,H,ie,Y,16,f[46]),ie=n(ie,W,z,H,y,23,f[47]),H=i(H,ie,W,z,w,6,f[48]),z=i(z,H,ie,W,F,10,f[49]),W=i(W,z,H,ie,V,15,f[50]),ie=i(ie,W,z,H,D,21,f[51]),H=i(H,ie,W,z,T,6,f[52]),z=i(z,H,ie,W,m,10,f[53]),W=i(W,z,H,ie,S,15,f[54]),ie=i(ie,W,z,H,v,21,f[55]),H=i(H,ie,W,z,L,6,f[56]),z=i(z,H,ie,W,Y,10,f[57]),W=i(W,z,H,ie,C,15,f[58]),ie=i(ie,W,z,H,U,21,f[59]),H=i(H,ie,W,z,b,6,f[60]),z=i(z,H,ie,W,B,10,f[61]),W=i(W,z,H,ie,y,15,f[62]),ie=i(ie,W,z,H,N,21,f[63]);h[0]=h[0]+H|0,h[1]=h[1]+ie|0,h[2]=h[2]+W|0,h[3]=h[3]+z|0},_doFinalize:function(){var g=this._data,p=g.words,h=8*this._nDataBytes,w=8*g.sigBytes;p[w>>>5]|=128<<24-w%32;var v=e.floor(h/4294967296);for(p[(w+64>>>9<<4)+15]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,p[(w+64>>>9<<4)+14]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,g.sigBytes=4*(p.length+1),this._process(),g=this._hash,p=g.words,h=0;4>h;h++)w=p[h],p[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360;return g},clone:function(){var g=u.clone.call(this);return g._hash=this._hash.clone(),g}}),a.MD5=u._createHelper(l),a.HmacMD5=u._createHmacHelper(l)})(Math);(function(){var e=Be,i=e.lib,t=i.WordArray,r=i.Hasher,n=[],i=e.algo.SHA1=r.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,s){for(var u=this._hash.words,l=u[0],f=u[1],d=u[2],g=u[3],p=u[4],h=0;80>h;h++){if(16>h)n[h]=a[s+h]|0;else{var w=n[h-3]^n[h-8]^n[h-14]^n[h-16];n[h]=w<<1|w>>>31}w=(l<<5|l>>>27)+p+n[h],w=20>h?w+((f&d|~f&g)+1518500249):40>h?w+((f^d^g)+1859775393):60>h?w+((f&d|f&g|d&g)-1894007588):w+((f^d^g)-899497514),p=g,g=d,d=f<<30|f>>>2,f=l,l=w}u[0]=u[0]+l|0,u[1]=u[1]+f|0,u[2]=u[2]+d|0,u[3]=u[3]+g|0,u[4]=u[4]+p|0},_doFinalize:function(){var a=this._data,s=a.words,u=8*this._nDataBytes,l=8*a.sigBytes;return s[l>>>5]|=128<<24-l%32,s[(l+64>>>9<<4)+14]=Math.floor(u/4294967296),s[(l+64>>>9<<4)+15]=u,a.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var a=r.clone.call(this);return a._hash=this._hash.clone(),a}});e.SHA1=r._createHelper(i),e.HmacSHA1=r._createHmacHelper(i)})();(function(e){for(var t=Be,h=t.lib,r=h.WordArray,n=h.Hasher,h=t.algo,i=[],a=[],s=function(v){return 4294967296*(v-(v|0))|0},u=2,l=0;64>l;){var f;e:{f=u;for(var d=e.sqrt(f),g=2;g<=d;g++)if(!(f%g)){f=!1;break e}f=!0}f&&(8>l&&(i[l]=s(e.pow(u,.5))),a[l]=s(e.pow(u,1/3)),l++),u++}var p=[],h=h.SHA256=n.extend({_doReset:function(){this._hash=new r.init(i.slice(0))},_doProcessBlock:function(w,v){for(var y=this._hash.words,m=y[0],b=y[1],D=y[2],C=y[3],F=y[4],L=y[5],N=y[6],S=y[7],B=0;64>B;B++){if(16>B)p[B]=w[v+B]|0;else{var T=p[B-15],U=p[B-2];p[B]=((T<<25|T>>>7)^(T<<14|T>>>18)^T>>>3)+p[B-7]+((U<<15|U>>>17)^(U<<13|U>>>19)^U>>>10)+p[B-16]}T=S+((F<<26|F>>>6)^(F<<21|F>>>11)^(F<<7|F>>>25))+(F&L^~F&N)+a[B]+p[B],U=((m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22))+(m&b^m&D^b&D),S=N,N=L,L=F,F=C+T|0,C=D,D=b,b=m,m=T+U|0}y[0]=y[0]+m|0,y[1]=y[1]+b|0,y[2]=y[2]+D|0,y[3]=y[3]+C|0,y[4]=y[4]+F|0,y[5]=y[5]+L|0,y[6]=y[6]+N|0,y[7]=y[7]+S|0},_doFinalize:function(){var w=this._data,v=w.words,y=8*this._nDataBytes,m=8*w.sigBytes;return v[m>>>5]|=128<<24-m%32,v[(m+64>>>9<<4)+14]=e.floor(y/4294967296),v[(m+64>>>9<<4)+15]=y,w.sigBytes=4*v.length,this._process(),this._hash},clone:function(){var w=n.clone.call(this);return w._hash=this._hash.clone(),w}});t.SHA256=n._createHelper(h),t.HmacSHA256=n._createHmacHelper(h)})(Math);(function(){var e=Be,t=e.lib.WordArray,n=e.algo,r=n.SHA256,n=n.SHA224=r.extend({_doReset:function(){this._hash=new t.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var i=r._doFinalize.call(this);return i.sigBytes-=4,i}});e.SHA224=r._createHelper(n),e.HmacSHA224=r._createHmacHelper(n)})();(function(){function e(){return n.create.apply(n,arguments)}for(var t=Be,r=t.lib.Hasher,a=t.x64,n=a.Word,i=a.WordArray,a=t.algo,s=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],u=[],l=0;80>l;l++)u[l]=e();a=a.SHA512=r.extend({_doReset:function(){this._hash=new i.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(f,d){for(var b=this._hash.words,g=b[0],p=b[1],h=b[2],w=b[3],v=b[4],y=b[5],m=b[6],b=b[7],D=g.high,C=g.low,F=p.high,L=p.low,N=h.high,S=h.low,B=w.high,T=w.low,U=v.high,V=v.low,Y=y.high,H=y.low,z=m.high,W=m.low,ie=b.high,Fe=b.low,Se=D,Re=C,Je=F,ue=L,Ce=N,Ue=S,or=B,$t=T,_t=U,Dr=V,cr=Y,ht=H,Xt=z,st=W,Ye=ie,fr=Fe,Me=0;80>Me;Me++){var Fr=u[Me];if(16>Me)var Nt=Fr.high=f[d+2*Me]|0,Ie=Fr.low=f[d+2*Me+1]|0;else{var Nt=u[Me-15],Ie=Nt.high,vt=Nt.low,Nt=(Ie>>>1|vt<<31)^(Ie>>>8|vt<<24)^Ie>>>7,vt=(vt>>>1|Ie<<31)^(vt>>>8|Ie<<24)^(vt>>>7|Ie<<25),Ur=u[Me-2],Ie=Ur.high,Dt=Ur.low,Ur=(Ie>>>19|Dt<<13)^(Ie<<3|Dt>>>29)^Ie>>>6,Dt=(Dt>>>19|Ie<<13)^(Dt<<3|Ie>>>29)^(Dt>>>6|Ie<<26),Ie=u[Me-7],dn=Ie.high,ir=u[Me-16],je=ir.high,ir=ir.low,Ie=vt+Ie.low,Nt=Nt+dn+(Ie>>>0<vt>>>0?1:0),Ie=Ie+Dt,Nt=Nt+Ur+(Ie>>>0<Dt>>>0?1:0),Ie=Ie+ir,Nt=Nt+je+(Ie>>>0<ir>>>0?1:0);Fr.high=Nt,Fr.low=Ie}var dn=_t&cr^~_t&Xt,ir=Dr&ht^~Dr&st,Fr=Se&Je^Se&Ce^Je&Ce,Jt=Re&ue^Re&Ue^ue&Ue,vt=(Se>>>28|Re<<4)^(Se<<30|Re>>>2)^(Se<<25|Re>>>7),Ur=(Re>>>28|Se<<4)^(Re<<30|Se>>>2)^(Re<<25|Se>>>7),Dt=s[Me],Ri=Dt.high,pn=Dt.low,Dt=fr+((Dr>>>14|_t<<18)^(Dr>>>18|_t<<14)^(Dr<<23|_t>>>9)),je=Ye+((_t>>>14|Dr<<18)^(_t>>>18|Dr<<14)^(_t<<23|Dr>>>9))+(Dt>>>0<fr>>>0?1:0),Dt=Dt+ir,je=je+dn+(Dt>>>0<ir>>>0?1:0),Dt=Dt+pn,je=je+Ri+(Dt>>>0<pn>>>0?1:0),Dt=Dt+Ie,je=je+Nt+(Dt>>>0<Ie>>>0?1:0),Ie=Ur+Jt,Fr=vt+Fr+(Ie>>>0<Ur>>>0?1:0),Ye=Xt,fr=st,Xt=cr,st=ht,cr=_t,ht=Dr,Dr=$t+Dt|0,_t=or+je+(Dr>>>0<$t>>>0?1:0)|0,or=Ce,$t=Ue,Ce=Je,Ue=ue,Je=Se,ue=Re,Re=Dt+Ie|0,Se=je+Fr+(Re>>>0<Dt>>>0?1:0)|0}C=g.low=C+Re,g.high=D+Se+(C>>>0<Re>>>0?1:0),L=p.low=L+ue,p.high=F+Je+(L>>>0<ue>>>0?1:0),S=h.low=S+Ue,h.high=N+Ce+(S>>>0<Ue>>>0?1:0),T=w.low=T+$t,w.high=B+or+(T>>>0<$t>>>0?1:0),V=v.low=V+Dr,v.high=U+_t+(V>>>0<Dr>>>0?1:0),H=y.low=H+ht,y.high=Y+cr+(H>>>0<ht>>>0?1:0),W=m.low=W+st,m.high=z+Xt+(W>>>0<st>>>0?1:0),Fe=b.low=Fe+fr,b.high=ie+Ye+(Fe>>>0<fr>>>0?1:0)},_doFinalize:function(){var f=this._data,d=f.words,g=8*this._nDataBytes,p=8*f.sigBytes;return d[p>>>5]|=128<<24-p%32,d[(p+128>>>10<<5)+30]=Math.floor(g/4294967296),d[(p+128>>>10<<5)+31]=g,f.sigBytes=4*d.length,this._process(),this._hash.toX32()},clone:function(){var f=r.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:32}),t.SHA512=r._createHelper(a),t.HmacSHA512=r._createHmacHelper(a)})();(function(){var e=Be,i=e.x64,t=i.Word,r=i.WordArray,i=e.algo,n=i.SHA512,i=i.SHA384=n.extend({_doReset:function(){this._hash=new r.init([new t.init(3418070365,3238371032),new t.init(1654270250,914150663),new t.init(2438529370,812702999),new t.init(355462360,4144912697),new t.init(1731405415,4290775857),new t.init(2394180231,1750603025),new t.init(3675008525,1694076839),new t.init(1203062813,3204075428)])},_doFinalize:function(){var a=n._doFinalize.call(this);return a.sigBytes-=16,a}});e.SHA384=n._createHelper(i),e.HmacSHA384=n._createHmacHelper(i)})();(function(){var e=Be,f=e.lib,t=f.WordArray,r=f.Hasher,f=e.algo,n=t.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),i=t.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),a=t.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),s=t.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=t.create([0,1518500249,1859775393,2400959708,2840853838]),l=t.create([1352829926,1548603684,1836072691,2053994217,0]),f=f.RIPEMD160=r.extend({_doReset:function(){this._hash=t.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,g){for(var p=0;16>p;p++){var h=g+p,w=d[h];d[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var h=this._hash.words,w=u.words,v=l.words,y=n.words,m=i.words,b=a.words,D=s.words,C,F,L,N,S,B,T,U,V,Y;B=C=h[0],T=F=h[1],U=L=h[2],V=N=h[3],Y=S=h[4];for(var H,p=0;80>p;p+=1)H=C+d[g+y[p]]|0,H=16>p?H+((F^L^N)+w[0]):32>p?H+((F&L|~F&N)+w[1]):48>p?H+(((F|~L)^N)+w[2]):64>p?H+((F&N|L&~N)+w[3]):H+((F^(L|~N))+w[4]),H|=0,H=H<<b[p]|H>>>32-b[p],H=H+S|0,C=S,S=N,N=L<<10|L>>>22,L=F,F=H,H=B+d[g+m[p]]|0,H=16>p?H+((T^(U|~V))+v[0]):32>p?H+((T&V|U&~V)+v[1]):48>p?H+(((T|~U)^V)+v[2]):64>p?H+((T&U|~T&V)+v[3]):H+((T^U^V)+v[4]),H|=0,H=H<<D[p]|H>>>32-D[p],H=H+Y|0,B=Y,Y=V,V=U<<10|U>>>22,U=T,T=H;H=h[1]+L+V|0,h[1]=h[2]+N+Y|0,h[2]=h[3]+S+B|0,h[3]=h[4]+C+T|0,h[4]=h[0]+F+U|0,h[0]=H},_doFinalize:function(){var d=this._data,g=d.words,p=8*this._nDataBytes,h=8*d.sigBytes;for(g[h>>>5]|=128<<24-h%32,g[(h+64>>>9<<4)+14]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360,d.sigBytes=4*(g.length+1),this._process(),d=this._hash,g=d.words,p=0;5>p;p++)h=g[p],g[p]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;return d},clone:function(){var d=r.clone.call(this);return d._hash=this._hash.clone(),d}});e.RIPEMD160=r._createHelper(f),e.HmacRIPEMD160=r._createHmacHelper(f)})(Math);(function(){var e=Be,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(r,n){r=this._hasher=new r.init,typeof n=="string"&&(n=t.parse(n));var i=r.blockSize,a=4*i;n.sigBytes>a&&(n=r.finalize(n)),n.clamp();for(var s=this._oKey=n.clone(),u=this._iKey=n.clone(),l=s.words,f=u.words,d=0;d<i;d++)l[d]^=1549556828,f[d]^=909522486;s.sigBytes=u.sigBytes=a,this.reset()},reset:function(){var r=this._hasher;r.reset(),r.update(this._iKey)},update:function(r){return this._hasher.update(r),this},finalize:function(r){var n=this._hasher;return r=n.finalize(r),n.reset(),n.finalize(this._oKey.clone().concat(r))}})})();(function(){var e=Be,n=e.lib,t=n.Base,r=n.WordArray,n=e.algo,i=n.HMAC,a=n.PBKDF2=t.extend({cfg:t.extend({keySize:4,hasher:n.SHA1,iterations:1}),init:function(s){this.cfg=this.cfg.extend(s)},compute:function(s,u){for(var w=this.cfg,l=i.create(w.hasher,s),f=r.create(),d=r.create([1]),g=f.words,p=d.words,h=w.keySize,w=w.iterations;g.length<h;){var v=l.update(u).finalize(d);l.reset();for(var y=v.words,m=y.length,b=v,D=1;D<w;D++){b=l.finalize(b),l.reset();for(var C=b.words,F=0;F<m;F++)y[F]^=C[F]}f.concat(v),p[0]++}return f.sigBytes=4*h,f}});e.PBKDF2=function(s,u,l){return a.create(l).compute(s,u)}})();var uc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zg="=";function ru(e){var t,r,n="";for(t=0;t+3<=e.length;t+=3)r=parseInt(e.substring(t,t+3),16),n+=uc.charAt(r>>6)+uc.charAt(r&63);if(t+1==e.length?(r=parseInt(e.substring(t,t+1),16),n+=uc.charAt(r<<2)):t+2==e.length&&(r=parseInt(e.substring(t,t+2),16),n+=uc.charAt(r>>2)+uc.charAt((r&3)<<4)),Zg)for(;(n.length&3)>0;)n+=Zg;return n}function lc(e){var t="",r,n=0,i,a;for(r=0;r<e.length&&e.charAt(r)!=Zg;++r)a=uc.indexOf(e.charAt(r)),!(a<0)&&(n==0?(t+=tu(a>>2),i=a&3,n=1):n==1?(t+=tu(i<<2|a>>4),i=a&15,n=2):n==2?(t+=tu(i),t+=tu(a>>2),i=a&3,n=3):(t+=tu(i<<2|a>>4),t+=tu(a&15),n=0));return n==1&&(t+=tu(i<<2)),t}function Jy(e){var t=lc(e),r,n=new Array;for(r=0;2*r<t.length;++r)n[r]=parseInt(t.substring(2*r,2*r+2),16);return n}var Yu,gx=0xdeadbeefcafe,Yy=(gx&16777215)==15715070;function ee(e,t,r){e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}function It(){return new ee(null)}function mx(e,t,r,n,i,a){for(;--a>=0;){var s=t*this[e++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=s&67108863}return i}function vx(e,t,r,n,i,a){for(var s=t&32767,u=t>>15;--a>=0;){var l=this[e]&32767,f=this[e++]>>15,d=u*l+f*s;l=s*l+((d&32767)<<15)+r[n]+(i&1073741823),i=(l>>>30)+(d>>>15)+u*f+(i>>>30),r[n++]=l&1073741823}return i}function wx(e,t,r,n,i,a){for(var s=t&16383,u=t>>14;--a>=0;){var l=this[e]&16383,f=this[e++]>>14,d=u*l+f*s;l=s*l+((d&16383)<<14)+r[n]+i,i=(l>>28)+(d>>14)+u*f,r[n++]=l&268435455}return i}Yy&&xf.appName=="Microsoft Internet Explorer"?(ee.prototype.am=vx,Yu=30):Yy&&xf.appName!="Netscape"?(ee.prototype.am=mx,Yu=26):(ee.prototype.am=wx,Yu=28);ee.prototype.DB=Yu;ee.prototype.DM=(1<<Yu)-1;ee.prototype.DV=1<<Yu;var nm=52;ee.prototype.FV=Math.pow(2,nm);ee.prototype.F1=nm-Yu;ee.prototype.F2=2*Yu-nm;var Ax="0123456789abcdefghijklmnopqrstuvwxyz",b0=new Array,cc,ps;cc=48;for(ps=0;ps<=9;++ps)b0[cc++]=ps;cc=97;for(ps=10;ps<36;++ps)b0[cc++]=ps;cc=65;for(ps=10;ps<36;++ps)b0[cc++]=ps;function tu(e){return Ax.charAt(e)}function Zy(e,t){var r=b0[e.charCodeAt(t)];return r??-1}function Ex(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function bx(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}function Gu(e){var t=It();return t.fromInt(e),t}function yx(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var n=e.length,i=!1,a=0;--n>=0;){var s=r==8?e[n]&255:Zy(e,n);if(s<0){e.charAt(n)=="-"&&(i=!0);continue}i=!1,a==0?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,a+=r,a>=this.DB&&(a-=this.DB)}r==8&&e[0]&128&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),i&&ee.ZERO.subTo(this,this)}function _x(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function Cx(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 r=(1<<t)-1,n,i=!1,a="",s=this.t,u=this.DB-s*this.DB%t;if(s-- >0)for(u<this.DB&&(n=this[s]>>u)>0&&(i=!0,a=tu(n));s>=0;)u<t?(n=(this[s]&(1<<u)-1)<<t-u,n|=this[--s]>>(u+=this.DB-t)):(n=this[s]>>(u-=t)&r,u<=0&&(u+=this.DB,--s)),n>0&&(i=!0),i&&(a+=tu(n));return i?a:"0"}function Dx(){var e=It();return ee.ZERO.subTo(this,e),e}function Fx(){return this.s<0?this.negate():this}function Sx(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-e[r])!=0)return t;return 0}function y0(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}function Ix(){return this.t<=0?0:this.DB*(this.t-1)+y0(this[this.t-1]^this.s&this.DM)}function Bx(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s}function $x(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s}function Px(e,t){var r=e%this.DB,n=this.DB-r,i=(1<<n)-1,a=Math.floor(e/this.DB),s=this.s<<r&this.DM,u;for(u=this.t-1;u>=0;--u)t[u+a+1]=this[u]>>n|s,s=(this[u]&i)<<r;for(u=a-1;u>=0;--u)t[u]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()}function Rx(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var n=e%this.DB,i=this.DB-n,a=(1<<n)-1;t[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)t[s-r-1]|=(this[s]&a)<<i,t[s-r]=this[s]>>n;n>0&&(t[this.t-r-1]|=(this.s&a)<<i),t.t=this.t-r,t.clamp()}function xx(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]-e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n-=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n-=e[r],t[r++]=n&this.DM,n>>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()}function Tx(e,t){var r=this.abs(),n=e.abs(),i=r.t;for(t.t=i+n.t;--i>=0;)t[i]=0;for(i=0;i<n.t;++i)t[i+r.t]=r.am(0,n[i],t,i,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&ee.ZERO.subTo(t,t)}function Ox(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var n=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,n,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()}function kx(e,t,r){var n=e.abs();if(!(n.t<=0)){var i=this.abs();if(i.t<n.t){t?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=It());var a=It(),s=this.s,u=e.s,l=this.DB-y0(n[n.t-1]);l>0?(n.lShiftTo(l,a),i.lShiftTo(l,r)):(n.copyTo(a),i.copyTo(r));var f=a.t,d=a[f-1];if(d!=0){var g=d*(1<<this.F1)+(f>1?a[f-2]>>this.F2:0),p=this.FV/g,h=(1<<this.F1)/g,w=1<<this.F2,v=r.t,y=v-f,m=t??It();for(a.dlShiftTo(y,m),r.compareTo(m)>=0&&(r[r.t++]=1,r.subTo(m,r)),ee.ONE.dlShiftTo(f,m),m.subTo(a,a);a.t<f;)a[a.t++]=0;for(;--y>=0;){var b=r[--v]==d?this.DM:Math.floor(r[v]*p+(r[v-1]+w)*h);if((r[v]+=a.am(0,b,r,y,0,f))<b)for(a.dlShiftTo(y,m),r.subTo(m,r);r[v]<--b;)r.subTo(m,r)}t!=null&&(r.drShiftTo(f,t),s!=u&&ee.ZERO.subTo(t,t)),r.t=f,r.clamp(),l>0&&r.rShiftTo(l,r),s<0&&ee.ZERO.subTo(r,r)}}}function Nx(e){var t=It();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(ee.ZERO)>0&&e.subTo(t,t),t}function Xo(e){this.m=e}function Lx(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function Ux(e){return e}function jx(e){e.divRemTo(this.m,null,e)}function Hx(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function Mx(e,t){e.squareTo(t),this.reduce(t)}Xo.prototype.convert=Lx;Xo.prototype.revert=Ux;Xo.prototype.reduce=jx;Xo.prototype.mulTo=Hx;Xo.prototype.sqrTo=Mx;function qx(){if(this.t<1)return 0;var e=this[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 Jo(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 Vx(e){var t=It();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(ee.ZERO)>0&&this.m.subTo(t,t),t}function Kx(e){var t=It();return e.copyTo(t),this.reduce(t),t}function zx(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e[t]&32767,n=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function Gx(e,t){e.squareTo(t),this.reduce(t)}function Yx(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Jo.prototype.convert=Vx;Jo.prototype.revert=Kx;Jo.prototype.reduce=zx;Jo.prototype.mulTo=Yx;Jo.prototype.sqrTo=Gx;function Wx(){return(this.t>0?this[0]&1:this.s)==0}function Xx(e,t){if(e>4294967295||e<1)return ee.ONE;var r=It(),n=It(),i=t.convert(this),a=y0(e)-1;for(i.copyTo(r);--a>=0;)if(t.sqrTo(r,n),(e&1<<a)>0)t.mulTo(n,i,r);else{var s=r;r=n,n=s}return t.revert(r)}function Jx(e,t){var r;return e<256||t.isEven()?r=new Xo(t):r=new Jo(t),this.exp(e,r)}ee.prototype.copyTo=Ex;ee.prototype.fromInt=bx;ee.prototype.fromString=yx;ee.prototype.clamp=_x;ee.prototype.dlShiftTo=Bx;ee.prototype.drShiftTo=$x;ee.prototype.lShiftTo=Px;ee.prototype.rShiftTo=Rx;ee.prototype.subTo=xx;ee.prototype.multiplyTo=Tx;ee.prototype.squareTo=Ox;ee.prototype.divRemTo=kx;ee.prototype.invDigit=qx;ee.prototype.isEven=Wx;ee.prototype.exp=Xx;ee.prototype.toString=Cx;ee.prototype.negate=Dx;ee.prototype.abs=Fx;ee.prototype.compareTo=Sx;ee.prototype.bitLength=Ix;ee.prototype.mod=Nx;ee.prototype.modPowInt=Jx;ee.ZERO=Gu(0);ee.ONE=Gu(1);function Zx(){var e=It();return this.copyTo(e),e}function Qx(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function eT(){return this.t==0?this.s:this[0]<<24>>24}function tT(){return this.t==0?this.s:this[0]<<16>>16}function rT(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function nT(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function iT(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=Gu(r),i=It(),a=It(),s="";for(this.divRemTo(n,i,a);i.signum()>0;)s=(r+a.intValue()).toString(e).substr(1)+s,i.divRemTo(n,i,a);return a.intValue().toString(e)+s}function sT(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,a=0,s=0,u=0;u<e.length;++u){var l=Zy(e,u);if(l<0){e.charAt(u)=="-"&&this.signum()==0&&(i=!0);continue}s=t*s+l,++a>=r&&(this.dMultiply(n),this.dAddOffset(s,0),a=0,s=0)}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),i&&ee.ZERO.subTo(this,this)}function aT(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(ee.ONE.shiftLeft(e-1),im,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(ee.ONE.shiftLeft(e-1),this);else{var n=new Array,i=e&7;n.length=(e>>3)+1,t.nextBytes(n),i>0?n[0]&=(1<<i)-1:n[0]=0,this.fromString(n,256)}}function uT(){var e=this.t,t=new Array;t[0]=this.s;var r=this.DB-e*this.DB%8,n,i=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),n&128&&(n|=-256),i==0&&(this.s&128)!=(n&128)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t}function oT(e){return this.compareTo(e)==0}function lT(e){return this.compareTo(e)<0?this:e}function cT(e){return this.compareTo(e)>0?this:e}function fT(e,t,r){var n,i,a=Math.min(e.t,this.t);for(n=0;n<a;++n)r[n]=t(this[n],e[n]);if(e.t<this.t){for(i=e.s&this.DM,n=a;n<this.t;++n)r[n]=t(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=a;n<e.t;++n)r[n]=t(i,e[n]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()}function hT(e,t){return e&t}function dT(e){var t=It();return this.bitwiseTo(e,hT,t),t}function im(e,t){return e|t}function pT(e){var t=It();return this.bitwiseTo(e,im,t),t}function Qy(e,t){return e^t}function gT(e){var t=It();return this.bitwiseTo(e,Qy,t),t}function e_(e,t){return e&~t}function mT(e){var t=It();return this.bitwiseTo(e,e_,t),t}function vT(){for(var e=It(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e}function wT(e){var t=It();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function AT(e){var t=It();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function ET(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 bT(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+ET(this[e]);return this.s<0?this.t*this.DB:-1}function yT(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function _T(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=yT(this[r]^t);return e}function CT(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<e%this.DB)!=0}function DT(e,t){var r=ee.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}function FT(e){return this.changeBit(e,im)}function ST(e){return this.changeBit(e,e_)}function IT(e){return this.changeBit(e,Qy)}function BT(e,t){for(var r=0,n=0,i=Math.min(e.t,this.t);r<i;)n+=this[r]+e[r],t[r++]=n&this.DM,n>>=this.DB;if(e.t<this.t){for(n+=e.s;r<this.t;)n+=this[r],t[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<e.t;)n+=e[r],t[r++]=n&this.DM,n>>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()}function $T(e){var t=It();return this.addTo(e,t),t}function PT(e){var t=It();return this.subTo(e,t),t}function RT(e){var t=It();return this.multiplyTo(e,t),t}function xT(){var e=It();return this.squareTo(e),e}function TT(e){var t=It();return this.divRemTo(e,t,null),t}function OT(e){var t=It();return this.divRemTo(e,null,t),t}function kT(e){var t=It(),r=It();return this.divRemTo(e,t,r),new Array(t,r)}function NT(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function LT(e,t){if(e!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}function Of(){}function t_(e){return e}function UT(e,t,r){e.multiplyTo(t,r)}function jT(e,t){e.squareTo(t)}Of.prototype.convert=t_;Of.prototype.revert=t_;Of.prototype.mulTo=UT;Of.prototype.sqrTo=jT;function HT(e){return this.exp(e,new Of)}function MT(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r[--n]=0;var i;for(i=r.t-this.t;n<i;++n)r[n+this.t]=this.am(0,e[n],r,n,0,this.t);for(i=Math.min(e.t,t);n<i;++n)this.am(0,e[n],r,n,0,t-n);r.clamp()}function qT(e,t,r){--t;var n=r.t=this.t+e.t-t;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(t-this.t,0);n<e.t;++n)r[this.t+n-t]=this.am(t-n,e[n],r,0,0,this.t+n-t);r.clamp(),r.drShiftTo(1,r)}function fc(e){this.r2=It(),this.q3=It(),ee.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function VT(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=It();return e.copyTo(t),this.reduce(t),t}function KT(e){return e}function zT(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 GT(e,t){e.squareTo(t),this.reduce(t)}function YT(e,t,r){e.multiplyTo(t,r),this.reduce(r)}fc.prototype.convert=VT;fc.prototype.revert=KT;fc.prototype.reduce=zT;fc.prototype.mulTo=YT;fc.prototype.sqrTo=GT;function WT(e,t){var r=e.bitLength(),n,i=Gu(1),a;if(r<=0)return i;r<18?n=1:r<48?n=3:r<144?n=4:r<768?n=5:n=6,r<8?a=new Xo(t):t.isEven()?a=new fc(t):a=new Jo(t);var s=new Array,u=3,l=n-1,f=(1<<n)-1;if(s[1]=a.convert(this),n>1){var d=It();for(a.sqrTo(s[1],d);u<=f;)s[u]=It(),a.mulTo(d,s[u-2],s[u]),u+=2}var g=e.t-1,p,h=!0,w=It(),v;for(r=y0(e[g])-1;g>=0;){for(r>=l?p=e[g]>>r-l&f:(p=(e[g]&(1<<r+1)-1)<<l-r,g>0&&(p|=e[g-1]>>this.DB+r-l)),u=n;!(p&1);)p>>=1,--u;if((r-=u)<0&&(r+=this.DB,--g),h)s[p].copyTo(i),h=!1;else{for(;u>1;)a.sqrTo(i,w),a.sqrTo(w,i),u-=2;u>0?a.sqrTo(i,w):(v=i,i=w,w=v),a.mulTo(w,s[p],i)}for(;g>=0&&!(e[g]&1<<r);)a.sqrTo(i,w),v=i,i=w,w=v,--r<0&&(r=this.DB-1,--g)}return a.revert(i)}function XT(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var n=t;t=r,r=n}var i=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(i<a&&(a=i),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r}function JT(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r}function ZT(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return ee.ZERO;for(var r=e.clone(),n=this.clone(),i=Gu(1),a=Gu(0),s=Gu(0),u=Gu(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!i.isEven()||!a.isEven())&&(i.addTo(this,i),a.subTo(e,a)),i.rShiftTo(1,i)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;n.isEven();)n.rShiftTo(1,n),t?((!s.isEven()||!u.isEven())&&(s.addTo(this,s),u.subTo(e,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(e,u),u.rShiftTo(1,u);r.compareTo(n)>=0?(r.subTo(n,r),t&&i.subTo(s,i),a.subTo(u,a)):(n.subTo(r,n),t&&s.subTo(i,s),u.subTo(a,u))}if(n.compareTo(ee.ONE)!=0)return ee.ZERO;if(u.compareTo(e)>=0)return u.subtract(e);if(u.signum()<0)u.addTo(e,u);else return u;return u.signum()<0?u.add(e):u}var ni=[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,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],QT=(1<<26)/ni[ni.length-1];function eO(e){var t,r=this.abs();if(r.t==1&&r[0]<=ni[ni.length-1]){for(t=0;t<ni.length;++t)if(r[0]==ni[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<ni.length;){for(var n=ni[t],i=t+1;i<ni.length&&n<QT;)n*=ni[i++];for(n=r.modInt(n);t<i;)if(n%ni[t++]==0)return!1}return r.millerRabin(e)}function tO(e){var t=this.subtract(ee.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var n=t.shiftRight(r);e=e+1>>1,e>ni.length&&(e=ni.length);for(var i=It(),a=0;a<e;++a){i.fromInt(ni[Math.floor(Math.random()*ni.length)]);var s=i.modPow(n,this);if(s.compareTo(ee.ONE)!=0&&s.compareTo(t)!=0){for(var u=1;u++<r&&s.compareTo(t)!=0;)if(s=s.modPowInt(2,this),s.compareTo(ee.ONE)==0)return!1;if(s.compareTo(t)!=0)return!1}}return!0}ee.prototype.chunkSize=rT;ee.prototype.toRadix=iT;ee.prototype.fromRadix=sT;ee.prototype.fromNumber=aT;ee.prototype.bitwiseTo=fT;ee.prototype.changeBit=DT;ee.prototype.addTo=BT;ee.prototype.dMultiply=NT;ee.prototype.dAddOffset=LT;ee.prototype.multiplyLowerTo=MT;ee.prototype.multiplyUpperTo=qT;ee.prototype.modInt=JT;ee.prototype.millerRabin=tO;ee.prototype.clone=Zx;ee.prototype.intValue=Qx;ee.prototype.byteValue=eT;ee.prototype.shortValue=tT;ee.prototype.signum=nT;ee.prototype.toByteArray=uT;ee.prototype.equals=oT;ee.prototype.min=lT;ee.prototype.max=cT;ee.prototype.and=dT;ee.prototype.or=pT;ee.prototype.xor=gT;ee.prototype.andNot=mT;ee.prototype.not=vT;ee.prototype.shiftLeft=wT;ee.prototype.shiftRight=AT;ee.prototype.getLowestSetBit=bT;ee.prototype.bitCount=_T;ee.prototype.testBit=CT;ee.prototype.setBit=FT;ee.prototype.clearBit=ST;ee.prototype.flipBit=IT;ee.prototype.add=$T;ee.prototype.subtract=PT;ee.prototype.multiply=RT;ee.prototype.divide=TT;ee.prototype.remainder=OT;ee.prototype.divideAndRemainder=kT;ee.prototype.modPow=WT;ee.prototype.modInverse=ZT;ee.prototype.pow=HT;ee.prototype.gcd=XT;ee.prototype.isProbablePrime=eO;ee.prototype.square=xT;function sm(){this.i=0,this.j=0,this.S=new Array}function rO(e){var t,r,n;for(t=0;t<256;++t)this.S[t]=t;for(r=0,t=0;t<256;++t)r=r+this.S[t]+e[t%e.length]&255,n=this.S[t],this.S[t]=this.S[r],this.S[r]=n;this.i=0,this.j=0}function nO(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]}sm.prototype.init=rO;sm.prototype.next=nO;function iO(){return new sm}var Qg=256;var v0,qi,fn;function sO(e){qi[fn++]^=e&255,qi[fn++]^=e>>8&255,qi[fn++]^=e>>16&255,qi[fn++]^=e>>24&255,fn>=Qg&&(fn-=Qg)}function am(){sO(new Date().getTime())}if(qi==null){if(qi=new Array,fn=0,ac!==void 0&&(ac.crypto!==void 0||ac.msCrypto!==void 0)){if(Wg=ac.crypto||ac.msCrypto,Wg.getRandomValues)for(Xg=new Uint8Array(32),Wg.getRandomValues(Xg),ds=0;ds<32;++ds)qi[fn++]=Xg[ds];else if(xf.appName=="Netscape"&&xf.appVersion<"5")for(Jg=ac.crypto.random(32),ds=0;ds<Jg.length;++ds)qi[fn++]=Jg.charCodeAt(ds)&255}for(;fn<Qg;)ds=Math.floor(65536*Math.random()),qi[fn++]=ds>>>8,qi[fn++]=ds&255;fn=0,am()}var ds,Wg,Xg,Jg;function aO(){if(v0==null){for(am(),v0=iO(),v0.init(qi),fn=0;fn<qi.length;++fn)qi[fn]=0;fn=0}return v0.next()}function uO(e){var t;for(t=0;t<e.length;++t)e[t]=aO()}function hc(){}hc.prototype.nextBytes=uO;function _i(e,t){return new ee(e,t)}function it(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function oO(e,t){if(this.isPublic=!0,this.isPrivate=!1,typeof e!="string")this.n=e,this.e=t;else if(e!=null&&t!=null&&e.length>0&&t.length>0)this.n=_i(e,16),this.e=parseInt(t,16);else throw"Invalid RSA public key"}function lO(e){return e.modPowInt(this.e,this.n)}it.prototype.doPublic=lO;it.prototype.setPublic=oO;it.prototype.type="RSA";function cO(e,t,r){if(this.isPrivate=!0,typeof e!="string")this.n=e,this.e=t,this.d=r;else if(e!=null&&t!=null&&e.length>0&&t.length>0)this.n=_i(e,16),this.e=parseInt(t,16),this.d=_i(r,16);else throw"Invalid RSA private key"}function fO(e,t,r,n,i,a,s,u){if(this.isPrivate=!0,this.isPublic=!1,e==null)throw"RSASetPrivateEx N == null";if(t==null)throw"RSASetPrivateEx E == null";if(e.length==0)throw"RSASetPrivateEx N.length == 0";if(t.length==0)throw"RSASetPrivateEx E.length == 0";if(e!=null&&t!=null&&e.length>0&&t.length>0)this.n=_i(e,16),this.e=parseInt(t,16),this.d=_i(r,16),this.p=_i(n,16),this.q=_i(i,16),this.dmp1=_i(a,16),this.dmq1=_i(s,16),this.coeff=_i(u,16);else throw"Invalid RSA private key in RSASetPrivateEx"}function hO(e,t){var r=new hc,n=e>>1;this.e=parseInt(t,16);for(var i=new ee(t,16),a=e/2-100,s=ee.ONE.shiftLeft(a);;){for(;this.p=new ee(e-n,1,r),!(this.p.subtract(ee.ONE).gcd(i).compareTo(ee.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new ee(n,1,r),!(this.q.subtract(ee.ONE).gcd(i).compareTo(ee.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var u=this.p;this.p=this.q,this.q=u}var l=this.q.subtract(this.p).abs();if(!(l.bitLength()<a||l.compareTo(s)<=0)){var f=this.p.subtract(ee.ONE),d=this.q.subtract(ee.ONE),g=f.multiply(d);if(g.gcd(i).compareTo(ee.ONE)==0&&(this.n=this.p.multiply(this.q),this.n.bitLength()==e)){this.d=i.modInverse(g),this.dmp1=this.d.mod(f),this.dmq1=this.d.mod(d),this.coeff=this.q.modInverse(this.p);break}}}this.isPrivate=!0}function dO(e){if(this.p==null||this.q==null)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),r=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(r)<0;)t=t.add(this.p);return t.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)}it.prototype.doPrivate=dO;it.prototype.setPrivate=cO;it.prototype.setPrivateEx=fO;it.prototype.generate=hO;function en(e,t){this.x=t,this.q=e}function pO(e){return e==this?!0:this.q.equals(e.q)&&this.x.equals(e.x)}function gO(){return this.x}function mO(){return new en(this.q,this.x.negate().mod(this.q))}function vO(e){return new en(this.q,this.x.add(e.toBigInteger()).mod(this.q))}function wO(e){return new en(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))}function AO(e){return new en(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))}function EO(){return new en(this.q,this.x.square().mod(this.q))}function bO(e){return new en(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))}en.prototype.equals=pO;en.prototype.toBigInteger=gO;en.prototype.negate=mO;en.prototype.add=vO;en.prototype.subtract=wO;en.prototype.multiply=AO;en.prototype.square=EO;en.prototype.divide=bO;en.prototype.sqrt=function(){return new en(this.q,this.x.sqrt().mod(this.q))};function Ut(e,t,r,n){this.curve=e,this.x=t,this.y=r,n==null?this.z=ee.ONE:this.z=n,this.zinv=null}function yO(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function _O(){return this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function CO(e){if(e==this)return!0;if(this.isInfinity())return e.isInfinity();if(e.isInfinity())return this.isInfinity();var t,r;return t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),t.equals(ee.ZERO)?(r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q),r.equals(ee.ZERO)):!1}function DO(){return this.x==null&&this.y==null?!0:this.z.equals(ee.ZERO)&&!this.y.toBigInteger().equals(ee.ZERO)}function FO(){return new Ut(this.curve,this.x,this.y.negate(),this.z)}function SO(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(ee.ZERO.equals(r))return ee.ZERO.equals(t)?this.twice():this.curve.getInfinity();var n=new ee("3"),i=this.x.toBigInteger(),a=this.y.toBigInteger(),s=e.x.toBigInteger(),u=e.y.toBigInteger(),l=r.square(),f=l.multiply(r),d=i.multiply(l),g=t.square().multiply(this.z),p=g.subtract(d.shiftLeft(1)).multiply(e.z).subtract(f).multiply(r).mod(this.curve.q),h=d.multiply(n).multiply(t).subtract(a.multiply(f)).subtract(g.multiply(t)).multiply(e.z).add(t.multiply(f)).mod(this.curve.q),w=f.multiply(this.z).multiply(e.z).mod(this.curve.q);return new Ut(this.curve,this.curve.fromBigInteger(p),this.curve.fromBigInteger(h),w)}function IO(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var e=new ee("3"),t=this.x.toBigInteger(),r=this.y.toBigInteger(),n=r.multiply(this.z),i=n.multiply(r).mod(this.curve.q),a=this.curve.a.toBigInteger(),s=t.square().multiply(e);ee.ZERO.equals(a)||(s=s.add(this.z.square().multiply(a))),s=s.mod(this.curve.q);var u=s.square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(n).mod(this.curve.q),l=s.multiply(e).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(s.square().multiply(s)).mod(this.curve.q),f=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new Ut(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(l),f)}function BO(e){if(this.isInfinity())return this;if(e.signum()==0)return this.curve.getInfinity();var t=e,r=t.multiply(new ee("3")),n=this.negate(),i=this,a=this.curve.q.subtract(e),s=a.multiply(new ee("3")),u=new Ut(this.curve,this.x,this.y),l=u.negate(),f;for(f=r.bitLength()-2;f>0;--f){i=i.twice();var d=r.testBit(f),g=t.testBit(f);d!=g&&(i=i.add(d?this:n))}for(f=s.bitLength()-2;f>0;--f){u=u.twice();var p=s.testBit(f),h=a.testBit(f);p!=h&&(u=u.add(p?u:l))}return i}function $O(e,t,r){var n;e.bitLength()>r.bitLength()?n=e.bitLength()-1:n=r.bitLength()-1;for(var i=this.curve.getInfinity(),a=this.add(t);n>=0;)i=i.twice(),e.testBit(n)?r.testBit(n)?i=i.add(a):i=i.add(this):r.testBit(n)&&(i=i.add(t)),--n;return i}Ut.prototype.getX=yO;Ut.prototype.getY=_O;Ut.prototype.equals=CO;Ut.prototype.isInfinity=DO;Ut.prototype.negate=FO;Ut.prototype.add=SO;Ut.prototype.twice=IO;Ut.prototype.multiply=BO;Ut.prototype.multiplyTwo=$O;function nu(e,t,r){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(r),this.infinity=new Ut(this,null,null)}function PO(){return this.q}function RO(){return this.a}function xO(){return this.b}function TO(e){return e==this?!0:this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)}function OO(){return this.infinity}function kO(e){return new en(this.q,e)}function NO(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:var t=e.substr(0,2),r=e.substr(2),n=this.fromBigInteger(new ee(f,16)),i=this.getA(),a=this.getB(),s=n.square().add(i).multiply(n).add(a),u=s.sqrt();return t=="03"&&(u=u.negate()),new Ut(this,n,u);case 4:case 6:case 7:var l=(e.length-2)/2,f=e.substr(2,l),d=e.substr(l+2,l);return new Ut(this,this.fromBigInteger(new ee(f,16)),this.fromBigInteger(new ee(d,16)));default:return null}}nu.prototype.getQ=PO;nu.prototype.getA=RO;nu.prototype.getB=xO;nu.prototype.equals=TO;nu.prototype.getInfinity=OO;nu.prototype.fromBigInteger=kO;nu.prototype.decodePointHex=NO;en.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)};Ut.prototype.getEncoded=function(e){var t=function(a,s){var u=a.toByteArrayUnsigned();if(s<u.length)u=u.slice(u.length-s);else for(;s>u.length;)u.unshift(0);return u},r=this.getX().toBigInteger(),n=this.getY().toBigInteger(),i=t(r,32);return e?n.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(t(n,32))),i};Ut.decodeFrom=function(e,t){var r=t[0],n=t.length-1,i=t.slice(1,1+n/2),a=t.slice(1+n/2,1+n);i.unshift(0),a.unshift(0);var s=new ee(i),u=new ee(a);return new Ut(e,e.fromBigInteger(s),e.fromBigInteger(u))};Ut.decodeFromHex=function(e,t){var r=t.substr(0,2),n=t.length-2,i=t.substr(2,n/2),a=t.substr(2+n/2,n/2),s=new ee(i,16),u=new ee(a,16);return new Ut(e,e.fromBigInteger(s),e.fromBigInteger(u))};Ut.prototype.add2D=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;if(this.x.equals(e.x))return this.y.equals(e.y)?this.twice():this.curve.getInfinity();var t=e.x.subtract(this.x),r=e.y.subtract(this.y),n=r.divide(t),i=n.square().subtract(this.x).subtract(e.x),a=n.multiply(this.x.subtract(i)).subtract(this.y);return new Ut(this.curve,i,a)};Ut.prototype.twice2D=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var e=this.curve.fromBigInteger(ee.valueOf(2)),t=this.curve.fromBigInteger(ee.valueOf(3)),r=this.x.square().multiply(t).add(this.curve.a).divide(this.y.multiply(e)),n=r.square().subtract(this.x.multiply(e)),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new Ut(this.curve,n,i)};Ut.prototype.multiply2D=function(e){if(this.isInfinity())return this;if(e.signum()==0)return this.curve.getInfinity();var t=e,r=t.multiply(new ee("3")),n=this.negate(),i=this,a;for(a=r.bitLength()-2;a>0;--a){i=i.twice();var s=r.testBit(a),u=t.testBit(a);s!=u&&(i=i.add2D(s?this:n))}return i};Ut.prototype.isOnCurve=function(){var e=this.getX().toBigInteger(),t=this.getY().toBigInteger(),r=this.curve.getA().toBigInteger(),n=this.curve.getB().toBigInteger(),i=this.curve.getQ(),a=t.multiply(t).mod(i),s=e.multiply(e).multiply(e).add(r.multiply(e)).add(n).mod(i);return a.equals(s)};Ut.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"};Ut.prototype.validate=function(){var e=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var t=this.getX().toBigInteger(),r=this.getY().toBigInteger();if(t.compareTo(ee.ONE)<0||t.compareTo(e.subtract(ee.ONE))>0)throw new Error("x coordinate out of bounds");if(r.compareTo(ee.ONE)<0||r.compareTo(e.subtract(ee.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(e).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var r_=function(){var e="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)",t='(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))',r='(?:"'+t+'*")',n=new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|"+e+"|"+r+")","g"),i=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),a={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:`
`,r:"\r",t:" "};function s(g,p,h){return p?a[p]:String.fromCharCode(parseInt(h,16))}var u=new String(""),l="\\",f={"{":Object,"[":Array},d=Object.hasOwnProperty;return function(g,p){var h=g.match(n),w,v=h[0],y=!1;v==="{"?w={}:v==="["?w=[]:(w=[],y=!0);for(var m,b=[w],D=1-y,C=h.length;D<C;++D){v=h[D];var F;switch(v.charCodeAt(0)){default:F=b[0],F[m||F.length]=+v,m=void 0;break;case 34:if(v=v.substring(1,v.length-1),v.indexOf(l)!==-1&&(v=v.replace(i,s)),F=b[0],!m)if(F instanceof Array)m=F.length;else{m=v||u;break}F[m]=v,m=void 0;break;case 91:F=b[0],b.unshift(F[m||F.length]=[]),m=void 0;break;case 93:b.shift();break;case 102:F=b[0],F[m||F.length]=!1,m=void 0;break;case 110:F=b[0],F[m||F.length]=null,m=void 0;break;case 116:F=b[0],F[m||F.length]=!0,m=void 0;break;case 123:F=b[0],b.unshift(F[m||F.length]={}),m=void 0;break;case 125:b.shift();break}}if(y){if(b.length!==1)throw new Error;w=w[0]}else if(b.length)throw new Error;if(p){var L=function(N,S){var B=N[S];if(B&&typeof B=="object"){var T=null;for(var U in B)if(d.call(B,U)&&B!==N){var V=L(B,U);V!==void 0?B[U]=V:(T||(T=[]),T.push(U))}if(T)for(var Y=T.length;--Y>=0;)delete B[T[Y]]}return p.call(N,S,B)};w=L({"":w},"")}return w}}();(typeof A>"u"||!A)&&(A={});(typeof A.asn1>"u"||!A.asn1)&&(A.asn1={});A.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){return Nf(e)},this.getPEMStringFromHex=function(e,t){return Mn(e,t)},this.newObject=function(e){var t=A,r=t.asn1,n=r.ASN1Object,i=r.DERBoolean,a=r.DERInteger,s=r.DERBitString,u=r.DEROctetString,l=r.DERNull,f=r.DERObjectIdentifier,d=r.DEREnumerated,g=r.DERUTF8String,p=r.DERNumericString,h=r.DERPrintableString,w=r.DERTeletexString,v=r.DERIA5String,y=r.DERUTCTime,m=r.DERGeneralizedTime,b=r.DERVisibleString,D=r.DERBMPString,C=r.DERSequence,F=r.DERSet,L=r.DERTaggedObject,N=r.ASN1Util.newObject;if(e instanceof r.ASN1Object)return e;var S=Object.keys(e);if(S.length!=1)throw new Error("key of param shall be only one.");var B=S[0];if(":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":"+B+":")==-1)throw new Error("undefined key: "+B);if(B=="bool")return new i(e[B]);if(B=="int")return new a(e[B]);if(B=="bitstr")return new s(e[B]);if(B=="octstr")return new u(e[B]);if(B=="null")return new l(e[B]);if(B=="oid")return new f(e[B]);if(B=="enum")return new d(e[B]);if(B=="utf8str")return new g(e[B]);if(B=="numstr")return new p(e[B]);if(B=="prnstr")return new h(e[B]);if(B=="telstr")return new w(e[B]);if(B=="ia5str")return new v(e[B]);if(B=="utctime")return new y(e[B]);if(B=="gentime")return new m(e[B]);if(B=="visstr")return new b(e[B]);if(B=="bmpstr")return new D(e[B]);if(B=="asn1")return new n(e[B]);if(B=="seq"){for(var T=e[B],U=[],V=0;V<T.length;V++){var Y=N(T[V]);U.push(Y)}return new C({array:U})}if(B=="set"){for(var T=e[B],U=[],V=0;V<T.length;V++){var Y=N(T[V]);U.push(Y)}return new F({array:U})}if(B=="tag"){var H=e[B];if(Object.prototype.toString.call(H)==="[object Array]"&&H.length==3){var z=N(H[2]);return new L({tag:H[0],explicit:H[1],obj:z})}else return new L(H)}},this.jsonToASN1HEX=function(e){var t=this.newObject(e);return t.tohex()}};A.asn1.ASN1Util.oidHexToInt=function(e){for(var i="",t=parseInt(e.substr(0,2),16),r=Math.floor(t/40),n=t%40,i=r+"."+n,a="",s=2;s<e.length;s+=2){var u=parseInt(e.substr(s,2),16),l=("00000000"+u.toString(2)).slice(-8);if(a=a+l.substr(1,7),l.substr(0,1)=="0"){var f=new ee(a,2);i=i+"."+f.toString(10),a=""}}return i};A.asn1.ASN1Util.oidIntToHex=function(e){var t=function(u){var l=u.toString(16);return l.length==1&&(l="0"+l),l},r=function(u){var l="",f=new ee(u,10),d=f.toString(2),g=7-d.length%7;g==7&&(g=0);for(var p="",h=0;h<g;h++)p+="0";d=p+d;for(var h=0;h<d.length-1;h+=7){var w=d.substr(h,7);h!=d.length-7&&(w="1"+w),l+=t(parseInt(w,2))}return l};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",i=e.split("."),a=parseInt(i[0])*40+parseInt(i[1]);n+=t(a),i.splice(0,2);for(var s=0;s<i.length;s++)n+=r(i[s]);return n};A.asn1.ASN1Object=function(e){var t=!0,r=null,n="00",i="00",a="";this.params=null,this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw new Error("this.hV is null or undefined");if(this.hV.length%2==1)throw new Error("value hex must be even length: n="+a.length+",v="+this.hV);var s=this.hV.length/2,u=s.toString(16);if(u.length%2==1&&(u="0"+u),s<128)return u;var l=u.length/2;if(l>15)throw new Error("ASN.1 length too long to represent by 8x: n = "+s.toString(16));var f=128+l;return f.toString(16)+u},this.tohex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.getValueHex=function(){return this.tohex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(s){this.params=s},e!=null&&e.tlv!=null&&(this.hTLV=e.tlv,this.isModified=!1)};A.asn1.DERAbstractString=function(e){A.asn1.DERAbstractString.superclass.constructor.call(this);var t=null,r=null;this.getString=function(){return this.s},this.setString=function(n){this.hTLV=null,this.isModified=!0,this.s=n,this.hV=C0(this.s).toLowerCase()},this.setStringHex=function(n){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e=="string"?this.setString(e):typeof e.str<"u"?this.setString(e.str):typeof e.hex<"u"&&this.setStringHex(e.hex))};ge(A.asn1.DERAbstractString,A.asn1.ASN1Object);A.asn1.DERAbstractTime=function(e){A.asn1.DERAbstractTime.superclass.constructor.call(this);var t=null,r=null;this.localDateToUTC=function(n){var i=n.getTime()+n.getTimezoneOffset()*6e4,a=new Date(i);return a},this.formatDate=function(n,i,a){var s=this.zeroPadding,u=this.localDateToUTC(n),l=String(u.getFullYear());i=="utc"&&(l=l.substr(2,2));var f=s(String(u.getMonth()+1),2),d=s(String(u.getDate()),2),g=s(String(u.getHours()),2),p=s(String(u.getMinutes()),2),h=s(String(u.getSeconds()),2),w=l+f+d+g+p+h;if(a===!0){var v=u.getMilliseconds();if(v!=0){var y=s(String(v),3);y=y.replace(/[0]+$/,""),w=w+"."+y}}return w+"Z"},this.zeroPadding=function(n,i){return n.length>=i?n:new Array(i-n.length+1).join("0")+n},this.setByParam=function(n){this.hV=null,this.hTLV=null,this.params=n},this.getString=function(){},this.setString=function(n){this.hTLV=null,this.isModified=!0,this.params==null&&(this.params={}),this.params.str=n},this.setByDate=function(n){this.hTLV=null,this.isModified=!0,this.params==null&&(this.params={}),this.params.date=n},this.setByDateValue=function(n,i,a,s,u,l){var f=new Date(Date.UTC(n,i-1,a,s,u,l,0));this.setByDate(f)},this.getFreshValueHex=function(){return this.hV}};ge(A.asn1.DERAbstractTime,A.asn1.ASN1Object);A.asn1.DERAbstractStructured=function(e){A.asn1.DERAbstractString.superclass.constructor.call(this);var t=null;this.setByASN1ObjectArray=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array=r},this.appendASN1Object=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array.push(r)},this.asn1Array=new Array,typeof e<"u"&&typeof e.array<"u"&&(this.asn1Array=e.array)};ge(A.asn1.DERAbstractStructured,A.asn1.ASN1Object);A.asn1.DERBoolean=function(e){A.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",e==!1?this.hTLV="010100":this.hTLV="0101ff"};ge(A.asn1.DERBoolean,A.asn1.ASN1Object);A.asn1.DERInteger=function(e){A.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.params=null;var t=Nf;this.setByBigInteger=function(r){this.isModified=!0,this.params={bigint:r}},this.setByInteger=function(r){this.isModified=!0,this.params=r},this.setValueHex=function(r){this.isModified=!0,this.params={hex:r}},this.getFreshValueHex=function(){var r=this.params,n=null;if(r==null)throw new Error("value not set");if(typeof r=="object"&&r.hex!=null)return this.hV=r.hex,this.hV;if(typeof r=="number")n=new ee(String(r),10);else if(r.int!=null)n=new ee(String(r.int),10);else if(r.bigint!=null)n=r.bigint;else throw new Error("wrong parameter");return this.hV=t(n),this.hV},e!=null&&(this.params=e)};ge(A.asn1.DERInteger,A.asn1.ASN1Object);A.asn1.DERBitString=function(e){if(e!==void 0&&typeof e.obj<"u"){var t=A.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.tohex()}A.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(r){this.hTLV=null,this.isModified=!0,this.hV=r},this.setUnusedBitsAndHexValue=function(r,n){if(r<0||7<r)throw"unused bits shall be from 0 to 7: u = "+r;var i="0"+r;this.hTLV=null,this.isModified=!0,this.hV=i+n},this.setByBinaryString=function(r){r=r.replace(/0+$/,"");var n=8-r.length%8;n==8&&(n=0),r+="0000000".substr(0,n);for(var i="",a=0;a<r.length-1;a+=8){var s=r.substr(a,8),u=parseInt(s,2).toString(16);u.length==1&&(u="0"+u),i+=u}this.hTLV=null,this.isModified=!0,this.hV="0"+n+i},this.setByBooleanArray=function(r){for(var n="",i=0;i<r.length;i++)r[i]==!0?n+="1":n+="0";this.setByBinaryString(n)},this.newFalseArray=function(r){for(var n=new Array(r),i=0;i<r;i++)n[i]=!1;return n},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e=="string"&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):typeof e.hex<"u"?this.setHexValueIncludingUnusedBits(e.hex):typeof e.bin<"u"?this.setByBinaryString(e.bin):typeof e.array<"u"&&this.setByBooleanArray(e.array))};ge(A.asn1.DERBitString,A.asn1.ASN1Object);A.asn1.DEROctetString=function(e){if(e!==void 0&&typeof e.obj<"u"){var t=A.asn1.ASN1Util.newObject(e.obj);e.hex=t.tohex()}A.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"};ge(A.asn1.DEROctetString,A.asn1.DERAbstractString);A.asn1.DERNull=function(){A.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};ge(A.asn1.DERNull,A.asn1.ASN1Object);A.asn1.DERObjectIdentifier=function(e){A.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){var r=l_(t);if(r==null)throw new Error("malformed oid string: "+t);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(t){var r=A.asn1.x509.OID.name2oid(t);if(r!=="")this.setValueOidString(r);else throw new Error("DERObjectIdentifier oidName undefined: "+t)},this.setValueNameOrOid=function(t){t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t)},this.getFreshValueHex=function(){return this.hV},this.setByParam=function(t){typeof t=="string"?this.setValueNameOrOid(t):t.oid!==void 0?this.setValueNameOrOid(t.oid):t.name!==void 0?this.setValueNameOrOid(t.name):t.hex!==void 0&&this.setValueHex(t.hex)},e!==void 0&&this.setByParam(e)};ge(A.asn1.DERObjectIdentifier,A.asn1.ASN1Object);A.asn1.DEREnumerated=function(e){A.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=Nf(t)},this.setByInteger=function(t){var r=new ee(String(t),10);this.setByBigInteger(r)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},typeof e<"u"&&(typeof e.int<"u"?this.setByInteger(e.int):typeof e=="number"?this.setByInteger(e):typeof e.hex<"u"&&this.setValueHex(e.hex))};ge(A.asn1.DEREnumerated,A.asn1.ASN1Object);A.asn1.DERUTF8String=function(e){A.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"};ge(A.asn1.DERUTF8String,A.asn1.DERAbstractString);A.asn1.DERNumericString=function(e){A.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"};ge(A.asn1.DERNumericString,A.asn1.DERAbstractString);A.asn1.DERPrintableString=function(e){A.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"};ge(A.asn1.DERPrintableString,A.asn1.DERAbstractString);A.asn1.DERTeletexString=function(e){A.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"};ge(A.asn1.DERTeletexString,A.asn1.DERAbstractString);A.asn1.DERIA5String=function(e){A.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"};ge(A.asn1.DERIA5String,A.asn1.DERAbstractString);A.asn1.DERVisibleString=function(e){A.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="1a"};ge(A.asn1.DERVisibleString,A.asn1.DERAbstractString);A.asn1.DERBMPString=function(e){A.asn1.DERBMPString.superclass.constructor.call(this,e),this.hT="1e"};ge(A.asn1.DERBMPString,A.asn1.DERAbstractString);A.asn1.DERUTCTime=function(e){A.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.params=void 0,this.getFreshValueHex=function(){var t=this.params;if(this.params==null&&(t={date:new Date}),typeof t=="string")if(t.match(/^[0-9]{12}Z$/)||t.match(/^[0-9]{12}\.[0-9]+Z$/))this.hV=Ci(t);else throw new Error("malformed string for UTCTime: "+t);else if(t.str!=null)this.hV=Ci(t.str);else if(t.date==null&&t.millis==!0){var r=new Date;this.hV=Ci(this.formatDate(r,"utc",!0))}else if(t.date!=null&&t.date instanceof Date){var n=t.millis===!0;this.hV=Ci(this.formatDate(t.date,"utc",n))}else t instanceof Date&&(this.hV=Ci(this.formatDate(t,"utc")));if(this.hV==null)throw new Error("parameter not specified properly for UTCTime");return this.hV},e!=null&&this.setByParam(e)};ge(A.asn1.DERUTCTime,A.asn1.DERAbstractTime);A.asn1.DERGeneralizedTime=function(e){A.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.params=e,this.getFreshValueHex=function(){var t=this.params;if(this.params==null&&(t={date:new Date}),typeof t=="string")if(t.match(/^[0-9]{14}Z$/)||t.match(/^[0-9]{14}\.[0-9]+Z$/))this.hV=Ci(t);else throw new Error("malformed string for GeneralizedTime: "+t);else if(t.str!=null)this.hV=Ci(t.str);else if(t.date==null&&t.millis==!0){var r=new Date;this.hV=Ci(this.formatDate(r,"gen",!0))}else if(t.date!=null&&t.date instanceof Date){var n=t.millis===!0;this.hV=Ci(this.formatDate(t.date,"gen",n))}else t instanceof Date&&(this.hV=Ci(this.formatDate(t,"gen")));if(this.hV==null)throw new Error("parameter not specified properly for GeneralizedTime");return this.hV},e!=null&&this.setByParam(e)};ge(A.asn1.DERGeneralizedTime,A.asn1.DERAbstractTime);A.asn1.DERSequence=function(e){A.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var t="",r=0;r<this.asn1Array.length;r++){var n=this.asn1Array[r];t+=n.tohex()}return this.hV=t,this.hV}};ge(A.asn1.DERSequence,A.asn1.DERAbstractStructured);A.asn1.DERSet=function(e){A.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,r=0;r<this.asn1Array.length;r++){var n=this.asn1Array[r];t.push(n.tohex())}return this.sortFlag==!0&&t.sort(),this.hV=t.join(""),this.hV},typeof e<"u"&&typeof e.sortflag<"u"&&e.sortflag==!1&&(this.sortFlag=!1)};ge(A.asn1.DERSet,A.asn1.DERAbstractStructured);A.asn1.DERTaggedObject=function(e){A.asn1.DERTaggedObject.superclass.constructor.call(this);var t=A.asn1,r=_e,n=r.getV,i=r.isASN1HEX,a=t.ASN1Util.newObject;this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.params={tag:"a0",explicit:!0},this.setASN1Object=function(s,u,l){this.params={tag:u,explicit:s,obj:l}},this.getFreshValueHex=function(){var s=this.params;if(s.explicit==null&&(s.explicit=!0),s.tage!=null&&(s.tag=s.tage,s.explicit=!0),s.tagi!=null&&(s.tag=s.tagi,s.explicit=!1),s.str!=null)this.hV=C0(s.str);else if(s.hex!=null)this.hV=s.hex;else if(s.obj!=null){var u;s.obj instanceof t.ASN1Object?u=s.obj.tohex():typeof s.obj=="object"&&(u=a(s.obj).tohex()),s.explicit?this.hV=u:this.hV=n(u,0)}else throw new Error("str, hex nor obj not specified");return s.tag==null&&(s.tag="a0"),this.hT=s.tag,this.hTLV=null,this.isModified=!0,this.hV},this.setByParam=function(s){this.params=s},e!==void 0&&this.setByParam(e)};ge(A.asn1.DERTaggedObject,A.asn1.ASN1Object);var _e=new function(){};_e.getLblen=function(e,t){if(e.substr(t+2,1)!="8")return 1;var r=parseInt(e.substr(t+3,1));return r==0?-1:0<r&&r<10?r+1:-2};_e.getL=function(e,t){var r=_e.getLblen(e,t);return r<1?"":e.substr(t+2,r*2)};_e.getVblen=function(e,t){var r,n;return r=_e.getL(e,t),r==""?-1:(r.substr(0,1)==="8"?n=new ee(r.substr(2),16):n=new ee(r,16),n.intValue())};_e.getVidx=function(e,t){var r=_e.getLblen(e,t);return r<0?r:t+(r+1)*2};_e.getV=function(e,t){var r=_e.getVidx(e,t),n=_e.getVblen(e,t);return e.substr(r,n*2)};_e.getTLV=function(e,t){return e.substr(t,2)+_e.getL(e,t)+_e.getV(e,t)};_e.getTLVblen=function(e,t){return 2+_e.getLblen(e,t)*2+_e.getVblen(e,t)*2};_e.getNextSiblingIdx=function(e,t){var r=_e.getVidx(e,t),n=_e.getVblen(e,t);return r+n*2};_e.getChildIdx=function(e,t){var r=_e,n=[],i,a,s;i=r.getVidx(e,t),a=r.getVblen(e,t)*2,e.substr(t,2)=="03"&&(i+=2,a-=2),s=0;for(var u=i;s<=a;){var l=r.getTLVblen(e,u);if(s+=l,s<=a&&n.push(u),u+=l,s>=a)break}return n};_e.getNthChildIdx=function(e,t,r){var n=_e.getChildIdx(e,t);return n[r]};_e.getIdxbyList=function(e,t,r,n){var i=_e,a,s;return r.length==0?n!==void 0&&e.substr(t,2)!==n?-1:t:(a=r.shift(),s=i.getChildIdx(e,t),a>=s.length?-1:i.getIdxbyList(e,s[a],r,n))};_e.getIdxbyListEx=function(e,t,r,n){var i=_e,a,s;if(r.length==0)return n!==void 0&&e.substr(t,2)!==n?-1:t;a=r.shift(),s=i.getChildIdx(e,t);for(var u=0,l=0;l<s.length;l++){var f=e.substr(s[l],2);if(typeof a=="number"&&!i.isContextTag(f)&&u==a||typeof a=="string"&&i.isContextTag(f,a))return i.getIdxbyListEx(e,s[l],r,n);i.isContextTag(f)||u++}return-1};_e.getTLVbyList=function(e,t,r,n){var i=_e,a=i.getIdxbyList(e,t,r,n);return a==-1||a>=e.length?null:i.getTLV(e,a)};_e.getTLVbyListEx=function(e,t,r,n){var i=_e,a=i.getIdxbyListEx(e,t,r,n);return a==-1?null:i.getTLV(e,a)};_e.getVbyList=function(e,t,r,n,i){var a=_e,s,u;return s=a.getIdxbyList(e,t,r,n),s==-1||s>=e.length?null:(u=a.getV(e,s),i===!0&&(u=u.substr(2)),u)};_e.getVbyListEx=function(e,t,r,n,i){var a=_e,s,u,l;return s=a.getIdxbyListEx(e,t,r,n),s==-1?null:(l=a.getV(e,s),e.substr(s,2)=="03"&&i!==!1&&(l=l.substr(2)),l)};_e.getInt=function(e,t,r){r==null&&(r=-1);try{var n=e.substr(t,2);if(n!="02"&&n!="03")return r;var i=_e.getV(e,t);return n=="02"?parseInt(i,16):f_(i)}catch{return r}};_e.getOID=function(e,t,r){r==null&&(r=null);try{if(e.substr(t,2)!="06")return r;var n=_e.getV(e,t);return B0(n)}catch{return r}};_e.getOIDName=function(e,t,r){r==null&&(r=null);try{var n=_e.getOID(e,t,r);if(n==r)return r;var i=A.asn1.x509.OID.oid2name(n);return i==""?n:i}catch{return r}};_e.getString=function(e,t,r){r==null&&(r=null);try{var n=_e.getV(e,t);return Di(n)}catch{return r}};_e.hextooidstr=function(e){var t=function(g,p){return g.length>=p?g:new Array(p-g.length+1).join("0")+g},r=[],n=e.substr(0,2),i=parseInt(n,16);r[0]=new String(Math.floor(i/40)),r[1]=new String(i%40);for(var a=e.substr(2),s=[],u=0;u<a.length/2;u++)s.push(parseInt(a.substr(u*2,2),16));for(var l=[],f="",u=0;u<s.length;u++)s[u]&128?f=f+t((s[u]&127).toString(2),7):(f=f+t((s[u]&127).toString(2),7),l.push(new String(parseInt(f,2))),f="");var d=r.join(".");return l.length>0&&(d=d+"."+l.join(".")),d};_e.dump=function(e,t,r,n){var i=_e,a=i.getV,s=i.dump,u=i.getChildIdx,l=e;e instanceof A.asn1.ASN1Object&&(l=e.tohex());var f=function(N,S){if(N.length<=S*2)return N;var B=N.substr(0,S)+"..(total "+N.length/2+"bytes).."+N.substr(N.length-S,S);return B};t===void 0&&(t={ommit_long_octet:32}),r===void 0&&(r=0),n===void 0&&(n="");var d=t.ommit_long_octet,F=l.substr(r,2);if(F=="01"){var g=a(l,r);return g=="00"?n+`BOOLEAN FALSE
`:n+`BOOLEAN TRUE
`}if(F=="02"){var g=a(l,r);return n+"INTEGER "+f(g,d)+`
`}if(F=="03"){var g=a(l,r);if(i.isASN1HEX(g.substr(2))){var p=n+`BITSTRING, encapsulates
`;return p=p+s(g.substr(2),t,0,n+" "),p}else return n+"BITSTRING "+f(g,d)+`
`}if(F=="04"){var g=a(l,r);if(i.isASN1HEX(g)){var p=n+`OCTETSTRING, encapsulates
`;return p=p+s(g,t,0,n+" "),p}else return n+"OCTETSTRING "+f(g,d)+`
`}if(F=="05")return n+`NULL
`;if(F=="06"){var h=a(l,r),w=A.asn1.ASN1Util.oidHexToInt(h),v=A.asn1.x509.OID.oid2name(w),y=w.replace(/\./g," ");return v!=""?n+"ObjectIdentifier "+v+" ("+y+`)
`:n+"ObjectIdentifier ("+y+`)
`}if(F=="0a")return n+"ENUMERATED "+parseInt(a(l,r))+`
`;if(F=="0c")return n+"UTF8String '"+Yt(a(l,r))+`'
`;if(F=="13")return n+"PrintableString '"+Yt(a(l,r))+`'
`;if(F=="14")return n+"TeletexString '"+Yt(a(l,r))+`'
`;if(F=="16")return n+"IA5String '"+Yt(a(l,r))+`'
`;if(F=="17")return n+"UTCTime "+Yt(a(l,r))+`
`;if(F=="18")return n+"GeneralizedTime "+Yt(a(l,r))+`
`;if(F=="1a")return n+"VisualString '"+Yt(a(l,r))+`'
`;if(F=="1e")return n+"BMPString '"+cm(a(l,r))+`'
`;if(F=="30"){if(l.substr(r,4)=="3000")return n+`SEQUENCE {}
`;var p=n+`SEQUENCE
`,m=u(l,r),b=t;if((m.length==2||m.length==3)&&l.substr(m[0],2)=="06"&&l.substr(m[m.length-1],2)=="04"){var v=i.oidname(a(l,m[0])),D=JSON.parse(JSON.stringify(t));D.x509ExtName=v,b=D}for(var C=0;C<m.length;C++)p=p+s(l,b,m[C],n+" ");return p}if(F=="31"){for(var p=n+`SET
`,m=u(l,r),C=0;C<m.length;C++)p=p+s(l,t,m[C],n+" ");return p}var F=parseInt(F,16);if(F&128){var L=F&31;if(F&32){for(var p=n+"["+L+`]
`,m=u(l,r),C=0;C<m.length;C++)p=p+s(l,t,m[C],n+" ");return p}else{var g=a(l,r);if(_e.isASN1HEX(g)){var p=n+"["+L+`]
`;return p=p+s(g,t,0,n+" "),p}else(g.substr(0,8)=="68747470"||t.x509ExtName==="subjectAltName"&&L==2)&&(g=Yt(g));var p=n+"["+L+"] "+g+`
`;return p}}return n+"UNKNOWN("+F+") "+a(l,r)+`
`};_e.parse=function(e){var t=_e,r=t.parse,n=t.isASN1HEX,i=t.getV,a=t.getTLV,s=t.getChildIdx,u=A.asn1,l=u.ASN1Util.oidHexToInt,f=u.x509.OID.oid2name,d=Yt,g=cm,p=qO,h={"0c":"utf8str",12:"numstr",13:"prnstr",14:"telstr",16:"ia5str",17:"utctime",18:"gentime","1a":"visstr","1e":"bmpstr",30:"seq",31:"set"},w=function(B){for(var T=[],U=s(B,0),V=0;V<U.length;V++){var Y=U[V],H=a(B,Y),z=r(H);T.push(z)}return T},v=e.substr(0,2),y={},m=i(e,0);if(v=="01")return e=="0101ff"?{bool:!0}:{bool:!1};if(v=="02")return{int:{hex:m}};if(v=="03")try{if(m.substr(0,2)!="00")throw"not encap";var b=m.substr(2);if(!n(b))throw"not encap";return{bitstr:{obj:r(b)}}}catch{var D=null;return m.length<=10&&(D=d_(m)),D==null?{bitstr:{hex:m}}:{bitstr:{bin:D}}}else if(v=="04")try{if(!n(m))throw"not encap";return{octstr:{obj:r(m)}}}catch{return{octstr:{hex:m}}}else{if(v=="05")return{null:""};if(v=="06"){var C=l(m),F=f(C);return F==""?{oid:C}:{oid:F}}else{if(v=="0a")return m.length>4?{enum:{hex:m}}:{enum:parseInt(m,16)};if(v=="30"||v=="31")return y[h[v]]=w(e),y;if(v=="14"){var L=p(m);return y[h[v]]={str:L},y}else if(v=="1e"){var L=g(m);return y[h[v]]={str:L},y}else if(":0c:12:13:16:17:18:1a:".indexOf(v)!=-1){var L=d(m);return y[h[v]]={str:L},y}else if(v.match(/^8[0-9]$/)){var L=d(m);return L==null|L==""?{tag:{tag:v,explicit:!1,hex:m}}:L.match(/[\x00-\x1F\x7F-\x9F]/)!=null||L.match(/[\u0000-\u001F\u0080–\u009F]/)!=null?{tag:{tag:v,explicit:!1,hex:m}}:{tag:{tag:v,explicit:!1,str:L}}}else if(v.match(/^a[0-9]$/))try{if(!n(m))throw new Error("not encap");return{tag:{tag:v,explicit:!0,obj:r(m)}}}catch{return{tag:{tag:v,explicit:!0,hex:m}}}else{var N=new A.asn1.ASN1Object;N.hV=m;var S=N.getLengthHexFromValue();return{asn1:{tlv:v+S+m}}}}}};_e.isContextTag=function(e,t){e=e.toLowerCase();var r,n;try{r=parseInt(e,16)}catch{return-1}if(t===void 0)return(r&192)==128;try{var i=t.match(/^\[[0-9]+\]$/);return i==null||(n=parseInt(t.substr(1,t.length-1),10),n>31)?!1:(r&192)==128&&(r&31)==n}catch{return!1}};_e.isASN1HEX=function(e){var t=_e;if(e.length%2==1)return!1;var r=t.getVblen(e,0),n=e.substr(0,2),i=t.getL(e,0),a=e.length-n.length-i.length;return a==r*2};_e.checkStrictDER=function(e,t,r,n,i){var a=_e;if(r===void 0){if(typeof e!="string")throw new Error("not hex string");if(e=e.toLowerCase(),!A.lang.String.isHex(e))throw new Error("not hex string");r=e.length,n=e.length/2,n<128?i=1:i=Math.ceil(n.toString(16))+1}var s=a.getL(e,t);if(s.length>i*2)throw new Error("L of TLV too long: idx="+t);var u=a.getVblen(e,t);if(u>n)throw new Error("value of L too long than hex: idx="+t);var l=a.getTLV(e,t),f=l.length-2-a.getL(e,t).length;if(f!==u*2)throw new Error("V string length and L's value not the same:"+f+"/"+u*2);if(t===0&&e.length!=l.length)throw new Error("total length and TLV length unmatch:"+e.length+"!="+l.length);var d=e.substr(t,2);if(d==="02"){var g=a.getVidx(e,t);if(e.substr(g,2)=="00"&&e.charCodeAt(g+2)<56)throw new Error("not least zeros for DER INTEGER")}if(parseInt(d,16)&32){for(var p=a.getVblen(e,t),h=0,w=a.getChildIdx(e,t),v=0;v<w.length;v++){var y=a.getTLV(e,w[v]);h+=y.length,a.checkStrictDER(e,w[v],r,n,i)}if(p*2!=h)throw new Error("sum of children's TLV length and L unmatch: "+p*2+"!="+h)}};_e.oidname=function(e){var t=A.asn1;A.lang.String.isHex(e)&&(e=t.ASN1Util.oidHexToInt(e));var r=t.x509.OID.oid2name(e);return r===""&&(r=e),r};(typeof A>"u"||!A)&&(A={});(typeof A.asn1>"u"||!A.asn1)&&(A.asn1={});(typeof A.asn1.x509>"u"||!A.asn1.x509)&&(A.asn1.x509={});A.asn1.x509.Certificate=function(e){A.asn1.x509.Certificate.superclass.constructor.call(this);var t=A,r=t.asn1,n=r.DERBitString,i=r.DERSequence,a=r.x509,s=a.TBSCertificate,u=a.AlgorithmIdentifier;this.params=void 0,this.setByParam=function(l){this.params=l},this.sign=function(){var l=this.params,f=l.sigalg;l.sigalg.name!=null&&(f=l.sigalg.name);var d=l.tbsobj.tohex(),g=new A.crypto.Signature({alg:f});g.init(l.cakey),g.updateHex(d),l.sighex=g.sign()},this.getPEM=function(){return Mn(this.tohex(),"CERTIFICATE")},this.tohex=function(){var l=this.params;if((l.tbsobj==null||l.tbsobj==null)&&(l.tbsobj=new s(l)),l.sighex==null&&l.cakey!=null&&this.sign(),l.sighex==null)throw new Error("sighex or cakey parameter not defined");var f=[];f.push(l.tbsobj),f.push(new u({name:l.sigalg})),f.push(new n({hex:"00"+l.sighex}));var d=new i({array:f});return d.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&(this.params=e)};ge(A.asn1.x509.Certificate,A.asn1.ASN1Object);A.asn1.x509.TBSCertificate=function(e){A.asn1.x509.TBSCertificate.superclass.constructor.call(this);var t=A,r=t.asn1,n=r.x509,i=r.DERTaggedObject,a=r.DERInteger,s=r.DERSequence,u=n.AlgorithmIdentifier,l=n.Time,f=n.X500Name,d=n.Extensions,g=n.SubjectPublicKeyInfo;this.params=null,this.setByParam=function(p){this.params=p},this.tohex=function(){var p=[],h=this.params;if(h.version!=null||h.version!=1){var w=2;h.version!=null&&(w=h.version-1);var v=new i({obj:new a({int:w})});p.push(v)}p.push(new a(h.serial)),p.push(new u({name:h.sigalg})),p.push(new f(h.issuer)),p.push(new s({array:[new l(h.notbefore),new l(h.notafter)]})),p.push(new f(h.subject)),p.push(new g(Et.getKey(h.sbjpubkey))),h.ext!==void 0&&h.ext.length>0&&p.push(new i({tag:"a3",obj:new d(h.ext)}));var y=new A.asn1.DERSequence({array:p});return y.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.x509.TBSCertificate,A.asn1.ASN1Object);A.asn1.x509.Extensions=function(e){A.asn1.x509.Extensions.superclass.constructor.call(this);var t=A,r=t.asn1,n=r.DERSequence,i=r.x509;this.aParam=[],this.setByParam=function(a){this.aParam=a},this.tohex=function(){for(var a=[],s=0;s<this.aParam.length;s++){var u=this.aParam[s],l=u.extname,f=null;if(u.extn!=null)f=new i.PrivateExtension(u);else if(l=="subjectKeyIdentifier")f=new i.SubjectKeyIdentifier(u);else if(l=="keyUsage")f=new i.KeyUsage(u);else if(l=="subjectAltName")f=new i.SubjectAltName(u);else if(l=="issuerAltName")f=new i.IssuerAltName(u);else if(l=="basicConstraints")f=new i.BasicConstraints(u);else if(l=="nameConstraints")f=new i.NameConstraints(u);else if(l=="cRLDistributionPoints")f=new i.CRLDistributionPoints(u);else if(l=="certificatePolicies")f=new i.CertificatePolicies(u);else if(l=="policyMappings")f=new i.PolicyMappings(u);else if(l=="policyConstraints")f=new i.PolicyConstraints(u);else if(l=="inhibitAnyPolicy")f=new i.InhibitAnyPolicy(u);else if(l=="authorityKeyIdentifier")f=new i.AuthorityKeyIdentifier(u);else if(l=="extKeyUsage")f=new i.ExtKeyUsage(u);else if(l=="authorityInfoAccess")f=new i.AuthorityInfoAccess(u);else if(l=="cRLNumber")f=new i.CRLNumber(u);else if(l=="cRLReason")f=new i.CRLReason(u);else if(l=="ocspNonce")f=new i.OCSPNonce(u);else if(l=="ocspNoCheck")f=new i.OCSPNoCheck(u);else if(l=="adobeTimeStamp")f=new i.AdobeTimeStamp(u);else if(l=="subjectDirectoryAttributes")f=new i.SubjectDirectoryAttributes(u);else throw new Error("extension not supported:"+JSON.stringify(u));f!=null&&a.push(f)}var d=new n({array:a});return d.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.x509.Extensions,A.asn1.ASN1Object);A.asn1.x509.Extension=function(e){A.asn1.x509.Extension.superclass.constructor.call(this);var t=null,r=A,n=r.asn1,i=n.DERObjectIdentifier,a=n.DEROctetString,s=n.DERBitString,u=n.DERBoolean,l=n.DERSequence;this.tohex=function(){var f=new i({oid:this.oid}),d=new a({hex:this.getExtnValueHex()}),g=new Array;g.push(f),this.critical&&g.push(new u),g.push(d);var p=new l({array:g});return p.tohex()},this.getEncodedHex=function(){return this.tohex()},this.critical=!1,e!==void 0&&e.critical!==void 0&&(this.critical=e.critical)};ge(A.asn1.x509.Extension,A.asn1.ASN1Object);A.asn1.x509.KeyUsage=function(e){A.asn1.x509.KeyUsage.superclass.constructor.call(this,e);var t=Error,r={digitalSignature:0,nonRepudiation:1,keyEncipherment:2,dataEncipherment:3,keyAgreement:4,keyCertSign:5,cRLSign:6,encipherOnly:7,decipherOnly:8};this.getExtnValueHex=function(){var n=this.getBinValue();return this.asn1ExtnValue=new A.asn1.DERBitString({bin:n}),this.asn1ExtnValue.tohex()},this.getBinValue=function(){var n=this.params;if(typeof n!="object"||typeof n.names!="object"&&typeof n.bin!="string")throw new t("parameter not yet set");if(n.names!=null)return E0(n.names,r);if(n.bin!=null)return n.bin;throw new t("parameter not set properly")},this.oid="2.5.29.15",e!==void 0&&(this.params=e)};ge(A.asn1.x509.KeyUsage,A.asn1.x509.Extension);A.asn1.x509.BasicConstraints=function(e){A.asn1.x509.BasicConstraints.superclass.constructor.call(this,e);var t=A.asn1,r=t.DERBoolean,n=t.DERInteger,i=t.DERSequence,a=!1,s=-1;this.getExtnValueHex=function(){var u=new Array;this.cA&&u.push(new r),this.pathLen>-1&&u.push(new n({int:this.pathLen}));var l=new i({array:u});return this.asn1ExtnValue=l,this.asn1ExtnValue.tohex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,e!==void 0&&(e.cA!==void 0&&(this.cA=e.cA),e.pathLen!==void 0&&(this.pathLen=e.pathLen))};ge(A.asn1.x509.BasicConstraints,A.asn1.x509.Extension);A.asn1.x509.CRLDistributionPoints=function(e){A.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,e);var t=A,r=t.asn1,n=r.x509;this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.setByDPArray=function(i){for(var a=[],s=0;s<i.length;s++)if(i[s]instanceof A.asn1.ASN1Object)a.push(i[s]);else{var u=new n.DistributionPoint(i[s]);a.push(u)}this.asn1ExtnValue=new r.DERSequence({array:a})},this.setByOneURI=function(i){var a=new n.DistributionPoint({fulluri:i});this.setByDPArray([a])},this.oid="2.5.29.31",e!==void 0&&(e.array!==void 0?this.setByDPArray(e.array):e.uri!==void 0&&this.setByOneURI(e.uri))};ge(A.asn1.x509.CRLDistributionPoints,A.asn1.x509.Extension);A.asn1.x509.DistributionPoint=function(e){A.asn1.x509.DistributionPoint.superclass.constructor.call(this);var t=null,r=A,n=r.asn1,i=n.x509.DistributionPointName;this.tohex=function(){var a=new n.DERSequence;if(this.asn1DP!=null){var s=new n.DERTaggedObject({explicit:!0,tag:"a0",obj:this.asn1DP});a.appendASN1Object(s)}return this.hTLV=a.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&(e.dpobj!==void 0?this.asn1DP=e.dpobj:e.dpname!==void 0?this.asn1DP=new i(e.dpname):e.fulluri!==void 0&&(this.asn1DP=new i({full:[{uri:e.fulluri}]})))};ge(A.asn1.x509.DistributionPoint,A.asn1.ASN1Object);A.asn1.x509.DistributionPointName=function(e){A.asn1.x509.DistributionPointName.superclass.constructor.call(this);var t=null,r=null,n=null,i=null,a=A,s=a.asn1,u=s.DERTaggedObject;if(this.tohex=function(){if(this.type!="full")throw new Error("currently type shall be 'full': "+this.type);return this.asn1Obj=new u({explicit:!1,tag:this.tag,obj:this.asn1V}),this.hTLV=this.asn1Obj.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0)if(s.x509.GeneralNames.prototype.isPrototypeOf(e))this.type="full",this.tag="a0",this.asn1V=e;else if(e.full!==void 0)this.type="full",this.tag="a0",this.asn1V=new s.x509.GeneralNames(e.full);else throw new Error("This class supports GeneralNames only as argument")};ge(A.asn1.x509.DistributionPointName,A.asn1.ASN1Object);A.asn1.x509.CertificatePolicies=function(e){A.asn1.x509.CertificatePolicies.superclass.constructor.call(this,e);var t=A,r=t.asn1,n=r.x509,i=r.DERSequence,a=n.PolicyInformation;this.params=null,this.getExtnValueHex=function(){for(var s=[],u=0;u<this.params.array.length;u++)s.push(new a(this.params.array[u]));var l=new i({array:s});return this.asn1ExtnValue=l,this.asn1ExtnValue.tohex()},this.oid="2.5.29.32",e!==void 0&&(this.params=e)};ge(A.asn1.x509.CertificatePolicies,A.asn1.x509.Extension);A.asn1.x509.PolicyInformation=function(e){A.asn1.x509.PolicyInformation.superclass.constructor.call(this,e);var t=A.asn1,r=t.DERSequence,n=t.DERObjectIdentifier,i=t.x509.PolicyQualifierInfo;this.params=null,this.tohex=function(){if(this.params.policyoid===void 0&&this.params.array===void 0)throw new Error("parameter oid and array missing");var a=[new n(this.params.policyoid)];if(this.params.array!==void 0){for(var s=[],u=0;u<this.params.array.length;u++)s.push(new i(this.params.array[u]));s.length>0&&a.push(new r({array:s}))}var l=new r({array:a});return l.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&(this.params=e)};ge(A.asn1.x509.PolicyInformation,A.asn1.ASN1Object);A.asn1.x509.PolicyQualifierInfo=function(e){A.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this,e);var t=A.asn1,r=t.DERSequence,n=t.DERIA5String,i=t.DERObjectIdentifier,a=t.x509.UserNotice;this.params=null,this.tohex=function(){if(this.params.cps!==void 0){var s=new r({array:[new i({oid:"1.3.6.1.5.5.7.2.1"}),new n({str:this.params.cps})]});return s.tohex()}if(this.params.unotice!=null){var s=new r({array:[new i({oid:"1.3.6.1.5.5.7.2.2"}),new a(this.params.unotice)]});return s.tohex()}},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&(this.params=e)};ge(A.asn1.x509.PolicyQualifierInfo,A.asn1.ASN1Object);A.asn1.x509.UserNotice=function(e){A.asn1.x509.UserNotice.superclass.constructor.call(this,e);var t=A.asn1.DERSequence,r=A.asn1.DERInteger,n=A.asn1.x509.DisplayText,i=A.asn1.x509.NoticeReference;this.params=null,this.tohex=function(){var a=[];this.params.noticeref!==void 0&&a.push(new i(this.params.noticeref)),this.params.exptext!==void 0&&a.push(new n(this.params.exptext));var s=new t({array:a});return s.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&(this.params=e)};ge(A.asn1.x509.UserNotice,A.asn1.ASN1Object);A.asn1.x509.NoticeReference=function(e){A.asn1.x509.NoticeReference.superclass.constructor.call(this,e);var t=A.asn1.DERSequence,r=A.asn1.DERInteger,n=A.asn1.x509.DisplayText;this.params=null,this.tohex=function(){var i=[];if(this.params.org!==void 0&&i.push(new n(this.params.org)),this.params.noticenum!==void 0){for(var a=[],s=this.params.noticenum,u=0;u<s.length;u++)a.push(new r(s[u]));i.push(new t({array:a}))}if(i.length==0)throw new Error("parameter is empty");var l=new t({array:i});return l.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&(this.params=e)};ge(A.asn1.x509.NoticeReference,A.asn1.ASN1Object);A.asn1.x509.DisplayText=function(e){A.asn1.x509.DisplayText.superclass.constructor.call(this,e),this.hT="0c",e!==void 0&&(e.type==="ia5"?this.hT="16":e.type==="vis"?this.hT="1a":e.type==="bmp"&&(this.hT="1e"))};ge(A.asn1.x509.DisplayText,A.asn1.DERAbstractString);A.asn1.x509.PolicyMappings=function(e){A.asn1.x509.PolicyMappings.superclass.constructor.call(this,e);var t=A,r=t.asn1,n=r.x509,i=r.ASN1Util.newObject;this.params=null,this.getExtnValueHex=function(){for(var a=this.params,s=[],u=0;u<a.array.length;u++){var l=a.array[u];s.push({seq:[{oid:l[0]},{oid:l[1]}]})}return this.asn1ExtnValue=i({seq:s}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.33",e!==void 0&&(this.params=e)};ge(A.asn1.x509.PolicyMappings,A.asn1.x509.Extension);A.asn1.x509.PolicyConstraints=function(e){A.asn1.x509.PolicyConstraints.superclass.constructor.call(this,e);var t=A,r=t.asn1,n=r.x509,i=r.ASN1Util.newObject;this.params=null,this.getExtnValueHex=function(){var a=this.params,s=[];return a.reqexp!=null&&s.push({tag:{tagi:"80",obj:{int:a.reqexp}}}),a.inhibit!=null&&s.push({tag:{tagi:"81",obj:{int:a.inhibit}}}),this.asn1ExtnValue=i({seq:s}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.36",e!==void 0&&(this.params=e)};ge(A.asn1.x509.PolicyConstraints,A.asn1.x509.Extension);A.asn1.x509.InhibitAnyPolicy=function(e){A.asn1.x509.InhibitAnyPolicy.superclass.constructor.call(this,e);var t=A,r=t.asn1,n=r.x509,i=r.ASN1Util.newObject;this.params=null,this.getExtnValueHex=function(){return this.asn1ExtnValue=i({int:this.params.skip}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.54",e!==void 0&&(this.params=e)};ge(A.asn1.x509.InhibitAnyPolicy,A.asn1.x509.Extension);A.asn1.x509.NameConstraints=function(e){A.asn1.x509.NameConstraints.superclass.constructor.call(this,e);var t=A,r=t.asn1,n=r.x509,i=r.ASN1Util.newObject,a=n.GeneralSubtree;this.params=null,this.getExtnValueHex=function(){var s=this.params,u=[];if(s.permit!=null&&s.permit.length!=null){for(var l=[],f=0;f<s.permit.length;f++)l.push(new a(s.permit[f]));u.push({tag:{tagi:"a0",obj:{seq:l}}})}if(s.exclude!=null&&s.exclude.length!=null){for(var d=[],f=0;f<s.exclude.length;f++)d.push(new a(s.exclude[f]));u.push({tag:{tagi:"a1",obj:{seq:d}}})}return this.asn1ExtnValue=i({seq:u}),this.asn1ExtnValue.tohex()},this.oid="2.5.29.30",e!==void 0&&(this.params=e)};ge(A.asn1.x509.NameConstraints,A.asn1.x509.Extension);A.asn1.x509.GeneralSubtree=function(e){A.asn1.x509.GeneralSubtree.superclass.constructor.call(this);var t=A.asn1,r=t.x509,n=r.GeneralName,i=t.ASN1Util.newObject;this.params=null,this.setByParam=function(a){this.params=a},this.tohex=function(){var a=this.params,s=[new n(a)];a.min!=null&&s.push({tag:{tagi:"80",obj:{int:a.min}}}),a.max!=null&&s.push({tag:{tagi:"81",obj:{int:a.max}}});var u=i({seq:s});return u.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.x509.GeneralSubtree,A.asn1.ASN1Object);A.asn1.x509.ExtKeyUsage=function(e){A.asn1.x509.ExtKeyUsage.superclass.constructor.call(this,e);var t=A,r=t.asn1;this.setPurposeArray=function(n){this.asn1ExtnValue=new r.DERSequence;for(var i=0;i<n.length;i++){var a=new r.DERObjectIdentifier(n[i]);this.asn1ExtnValue.appendASN1Object(a)}},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="2.5.29.37",e!==void 0&&e.array!==void 0&&this.setPurposeArray(e.array)};ge(A.asn1.x509.ExtKeyUsage,A.asn1.x509.Extension);A.asn1.x509.AuthorityKeyIdentifier=function(e){A.asn1.x509.AuthorityKeyIdentifier.superclass.constructor.call(this,e);var t=A,r=t.asn1,n=r.DERTaggedObject,i=r.x509.GeneralNames,a=t.crypto.Util.isKey;this.asn1KID=null,this.asn1CertIssuer=null,this.asn1CertSN=null,this.getExtnValueHex=function(){var s=new Array;this.asn1KID&&s.push(new n({explicit:!1,tag:"80",obj:this.asn1KID})),this.asn1CertIssuer&&s.push(new n({explicit:!1,tag:"a1",obj:new i([{dn:this.asn1CertIssuer}])})),this.asn1CertSN&&s.push(new n({explicit:!1,tag:"82",obj:this.asn1CertSN}));var u=new r.DERSequence({array:s});return this.asn1ExtnValue=u,this.asn1ExtnValue.tohex()},this.setKIDByParam=function(s){if(s.str!==void 0||s.hex!==void 0)this.asn1KID=new A.asn1.DEROctetString(s);else if(typeof s=="object"&&A.crypto.Util.isKey(s)||typeof s=="string"&&s.indexOf("BEGIN ")!=-1){var u=s;typeof s=="string"&&(u=Et.getKey(s));var l=Et.getKeyID(u);this.asn1KID=new A.asn1.DEROctetString({hex:l})}},this.setCertIssuerByParam=function(s){s.str!==void 0||s.ldapstr!==void 0||s.hex!==void 0||s.certsubject!==void 0||s.certissuer!==void 0?this.asn1CertIssuer=new A.asn1.x509.X500Name(s):typeof s=="string"&&s.indexOf("BEGIN ")!=-1&&s.indexOf("CERTIFICATE")!=-1&&(this.asn1CertIssuer=new A.asn1.x509.X500Name({certissuer:s}))},this.setCertSNByParam=function(s){if(s.str!==void 0||s.bigint!==void 0||s.hex!==void 0)this.asn1CertSN=new A.asn1.DERInteger(s);else if(typeof s=="string"&&s.indexOf("BEGIN ")!=-1&&s.indexOf("CERTIFICATE")){var u=new Xe;u.readCertPEM(s);var l=u.getSerialNumberHex();this.asn1CertSN=new A.asn1.DERInteger({hex:l})}},this.oid="2.5.29.35",e!==void 0&&(e.kid!==void 0&&this.setKIDByParam(e.kid),e.issuer!==void 0&&this.setCertIssuerByParam(e.issuer),e.sn!==void 0&&this.setCertSNByParam(e.sn),e.issuersn!==void 0&&typeof e.issuersn=="string"&&e.issuersn.indexOf("BEGIN ")!=-1&&e.issuersn.indexOf("CERTIFICATE")&&(this.setCertSNByParam(e.issuersn),this.setCertIssuerByParam(e.issuersn)))};ge(A.asn1.x509.AuthorityKeyIdentifier,A.asn1.x509.Extension);A.asn1.x509.SubjectKeyIdentifier=function(e){A.asn1.x509.SubjectKeyIdentifier.superclass.constructor.call(this,e);var t=A,r=t.asn1,n=r.DEROctetString;this.asn1KID=null,this.getExtnValueHex=function(){return this.asn1ExtnValue=this.asn1KID,this.asn1ExtnValue.tohex()},this.setKIDByParam=function(i){if(i.str!==void 0||i.hex!==void 0)this.asn1KID=new n(i);else if(typeof i=="object"&&A.crypto.Util.isKey(i)||typeof i=="string"&&i.indexOf("BEGIN")!=-1){var a=i;typeof i=="string"&&(a=Et.getKey(i));var s=Et.getKeyID(a);this.asn1KID=new A.asn1.DEROctetString({hex:s})}},this.oid="2.5.29.14",e!==void 0&&e.kid!==void 0&&this.setKIDByParam(e.kid)};ge(A.asn1.x509.SubjectKeyIdentifier,A.asn1.x509.Extension);A.asn1.x509.AuthorityInfoAccess=function(e){A.asn1.x509.AuthorityInfoAccess.superclass.constructor.call(this,e),this.setAccessDescriptionArray=function(t){for(var r=new Array,n=A,i=n.asn1,a=i.DERSequence,s=i.DERObjectIdentifier,u=i.x509.GeneralName,l=0;l<t.length;l++){var f,d=t[l];if(d.ocsp!==void 0)f=new a({array:[new s({oid:"1.3.6.1.5.5.7.48.1"}),new u({uri:d.ocsp})]});else if(d.caissuer!==void 0)f=new a({array:[new s({oid:"1.3.6.1.5.5.7.48.2"}),new u({uri:d.caissuer})]});else throw new Error("unknown AccessMethod parameter: "+JSON.stringify(d));r.push(f)}this.asn1ExtnValue=new a({array:r})},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="1.3.6.1.5.5.7.1.1",e!==void 0&&e.array!==void 0&&this.setAccessDescriptionArray(e.array)};ge(A.asn1.x509.AuthorityInfoAccess,A.asn1.x509.Extension);A.asn1.x509.SubjectAltName=function(e){A.asn1.x509.SubjectAltName.superclass.constructor.call(this,e),this.setNameArray=function(t){this.asn1ExtnValue=new A.asn1.x509.GeneralNames(t)},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="2.5.29.17",e!==void 0&&e.array!==void 0&&this.setNameArray(e.array)};ge(A.asn1.x509.SubjectAltName,A.asn1.x509.Extension);A.asn1.x509.IssuerAltName=function(e){A.asn1.x509.IssuerAltName.superclass.constructor.call(this,e),this.setNameArray=function(t){this.asn1ExtnValue=new A.asn1.x509.GeneralNames(t)},this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.oid="2.5.29.18",e!==void 0&&e.array!==void 0&&this.setNameArray(e.array)};ge(A.asn1.x509.IssuerAltName,A.asn1.x509.Extension);A.asn1.x509.SubjectDirectoryAttributes=function(e){A.asn1.x509.SubjectDirectoryAttributes.superclass.constructor.call(this,e);var t=A.asn1,r=t.DERSequence,n=t.ASN1Util.newObject,i=t.x509.OID.name2oid;this.params=null,this.getExtnValueHex=function(){for(var a=[],s=0;s<this.params.array.length;s++){var u=this.params.array[s];if(u.attr!=null&&u.array!=null){var l={seq:[{oid:u.attr},{set:u.array}]};a.push(n(l));continue}var f={seq:[{oid:"1.2.3.4"},{set:[{utf8str:"DE"}]}]};if(u.attr=="dateOfBirth")f.seq[0].oid=i(u.attr),f.seq[1].set[0]={gentime:u.str};else if(u.attr=="placeOfBirth")f.seq[0].oid=i(u.attr),f.seq[1].set[0]={utf8str:u.str};else if(u.attr=="gender")f.seq[0].oid=i(u.attr),f.seq[1].set[0]={prnstr:u.str};else if(u.attr=="countryOfCitizenship")f.seq[0].oid=i(u.attr),f.seq[1].set[0]={prnstr:u.str};else if(u.attr=="countryOfResidence")f.seq[0].oid=i(u.attr),f.seq[1].set[0]={prnstr:u.str};else throw new Error("unsupported attribute: "+u.attr);a.push(new n(f))}var d=new r({array:a});return this.asn1ExtnValue=d,this.asn1ExtnValue.tohex()},this.oid="2.5.29.9",e!==void 0&&(this.params=e)};ge(A.asn1.x509.SubjectDirectoryAttributes,A.asn1.x509.Extension);A.asn1.x509.PrivateExtension=function(e){A.asn1.x509.PrivateExtension.superclass.constructor.call(this,e);var t=A,r=t.lang.String.isHex,n=t.asn1,i=n.x509.OID.name2oid,a=n.ASN1Util.newObject;this.params=null,this.setByParam=function(s){this.oid=i(s.extname),this.params=s},this.getExtnValueHex=function(){if(this.params.extname==null||this.params.extn==null)throw new Error("extname or extnhex not specified");var s=this.params.extn;if(typeof s=="string"&&r(s))return s;if(typeof s=="object")try{return a(s).tohex()}catch{}throw new Error("unsupported extn value")},e!=null&&this.setByParam(e)};ge(A.asn1.x509.PrivateExtension,A.asn1.x509.Extension);A.asn1.x509.CRL=function(e){A.asn1.x509.CRL.superclass.constructor.call(this);var t=A,r=t.asn1,n=r.DERSequence,i=r.DERBitString,a=r.x509,s=a.AlgorithmIdentifier,u=a.TBSCertList;this.params=void 0,this.setByParam=function(l){this.params=l},this.sign=function(){var l=new u(this.params).tohex(),f=new A.crypto.Signature({alg:this.params.sigalg});f.init(this.params.cakey),f.updateHex(l);var d=f.sign();this.params.sighex=d},this.getPEM=function(){return Mn(this.tohex(),"X509 CRL")},this.tohex=function(){var l=this.params;if(l.tbsobj==null&&(l.tbsobj=new u(l)),l.sighex==null&&l.cakey!=null&&this.sign(),l.sighex==null)throw new Error("sighex or cakey parameter not defined");var f=[];f.push(l.tbsobj),f.push(new s({name:l.sigalg})),f.push(new i({hex:"00"+l.sighex}));var d=new n({array:f});return d.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&(this.params=e)};ge(A.asn1.x509.CRL,A.asn1.ASN1Object);A.asn1.x509.TBSCertList=function(e){A.asn1.x509.TBSCertList.superclass.constructor.call(this);var t=A,r=t.asn1,n=r.DERInteger,i=r.DERSequence,a=r.DERTaggedObject,s=r.DERObjectIdentifier,u=r.x509,l=u.AlgorithmIdentifier,f=u.Time,d=u.Extensions,g=u.X500Name;this.params=null,this.setByParam=function(p){this.params=p},this.getRevCertSequence=function(){for(var p=[],h=this.params.revcert,w=0;w<h.length;w++){var v=[new n(h[w].sn),new f(h[w].date)];h[w].ext!=null&&v.push(new d(h[w].ext)),p.push(new i({array:v}))}return new i({array:p})},this.tohex=function(){var p=[],h=this.params;if(h.version!=null){var w=h.version-1,v=new n({int:w});p.push(v)}if(p.push(new l({name:h.sigalg})),p.push(new g(h.issuer)),p.push(new f(h.thisupdate)),h.nextupdate!=null&&p.push(new f(h.nextupdate)),h.revcert!=null&&p.push(this.getRevCertSequence()),h.ext!=null){var y=new d(h.ext);p.push(new a({tag:"a0",explicit:!0,obj:y}))}var m=new i({array:p});return m.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.x509.TBSCertList,A.asn1.ASN1Object);A.asn1.x509.CRLEntry=function(e){A.asn1.x509.CRLEntry.superclass.constructor.call(this);var t=null,r=null,n=A,i=n.asn1;this.setCertSerial=function(a){this.sn=new i.DERInteger(a)},this.setRevocationDate=function(a){this.time=new i.x509.Time(a)},this.tohex=function(){var a=new i.DERSequence({array:[this.sn,this.time]});return this.TLV=a.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&(e.time!==void 0&&this.setRevocationDate(e.time),e.sn!==void 0&&this.setCertSerial(e.sn))};ge(A.asn1.x509.CRLEntry,A.asn1.ASN1Object);A.asn1.x509.CRLNumber=function(e){A.asn1.x509.CRLNumber.superclass.constructor.call(this,e),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new A.asn1.DERInteger(this.params.num),this.asn1ExtnValue.tohex()},this.oid="2.5.29.20",e!=null&&(this.params=e)};ge(A.asn1.x509.CRLNumber,A.asn1.x509.Extension);A.asn1.x509.CRLReason=function(e){A.asn1.x509.CRLReason.superclass.constructor.call(this,e),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new A.asn1.DEREnumerated(this.params.code),this.asn1ExtnValue.tohex()},this.oid="2.5.29.21",e!=null&&(this.params=e)};ge(A.asn1.x509.CRLReason,A.asn1.x509.Extension);A.asn1.x509.OCSPNonce=function(e){A.asn1.x509.OCSPNonce.superclass.constructor.call(this,e),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new A.asn1.DEROctetString(this.params),this.asn1ExtnValue.tohex()},this.oid="1.3.6.1.5.5.7.48.1.2",e!=null&&(this.params=e)};ge(A.asn1.x509.OCSPNonce,A.asn1.x509.Extension);A.asn1.x509.OCSPNoCheck=function(e){A.asn1.x509.OCSPNoCheck.superclass.constructor.call(this,e),this.params=void 0,this.getExtnValueHex=function(){return this.asn1ExtnValue=new A.asn1.DERNull,this.asn1ExtnValue.tohex()},this.oid="1.3.6.1.5.5.7.48.1.5",e!=null&&(this.params=e)};ge(A.asn1.x509.OCSPNoCheck,A.asn1.x509.Extension);A.asn1.x509.AdobeTimeStamp=function(e){A.asn1.x509.AdobeTimeStamp.superclass.constructor.call(this,e);var t=A,r=t.asn1,n=r.DERInteger,i=r.DERBoolean,a=r.DERSequence,s=r.x509.GeneralName;this.params=null,this.getExtnValueHex=function(){var u=this.params,l=[new n(1)];return l.push(new s({uri:u.uri})),u.reqauth!=null&&l.push(new i(u.reqauth)),this.asn1ExtnValue=new a({array:l}),this.asn1ExtnValue.tohex()},this.oid="1.2.840.113583.1.1.9.1",e!==void 0&&this.setByParam(e)};ge(A.asn1.x509.AdobeTimeStamp,A.asn1.x509.Extension);A.asn1.x509.X500Name=function(e){A.asn1.x509.X500Name.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var t=A,r=t.asn1,n=r.x509,i=n.RDN,a=yr;this.setByString=function(s,u){u!==void 0&&(this.sRule=u);var l=s.split("/");l.shift();for(var f=[],d=0;d<l.length;d++)if(l[d].match(/^[^=]+=.+$/))f.push(l[d]);else{var g=f.length-1;f[g]=f[g]+"/"+l[d]}for(var d=0;d<f.length;d++)this.asn1Array.push(new i({str:f[d],rule:this.sRule}))},this.setByLdapString=function(s,u){u!==void 0&&(this.sRule=u);var l=n.X500Name.ldapToCompat(s);this.setByString(l,u)},this.setByObject=function(s,u){u!==void 0&&(this.sRule=u);for(var l in s)if(s.hasOwnProperty(l)){var f=new i({str:l+"="+s[l],rule:this.sRule});this.asn1Array?this.asn1Array.push(f):this.asn1Array=[f]}},this.setByParam=function(s){if(s.rule!==void 0&&(this.sRule=s.rule),s.array!==void 0)this.paramArray=s.array;else if(s.str!==void 0)this.setByString(s.str);else if(s.ldapstr!==void 0)this.setByLdapString(s.ldapstr);else if(s.hex!==void 0)this.hTLV=s.hex;else if(s.certissuer!==void 0){var u=new Xe;u.readCertPEM(s.certissuer),this.hTLV=u.getIssuerHex()}else if(s.certsubject!==void 0){var u=new Xe;u.readCertPEM(s.certsubject),this.hTLV=u.getSubjectHex()}else typeof s=="object"&&s.certsubject===void 0&&s.certissuer===void 0&&this.setByObject(s)},this.tohex=function(){if(typeof this.hTLV=="string")return this.hTLV;if(this.asn1Array.length==0&&this.paramArray.length>0)for(var s=0;s<this.paramArray.length;s++){var u={array:this.paramArray[s]};this.sRule!="utf8"&&(u.rule=this.sRule);var l=new i(u);this.asn1Array.push(l)}var f=new r.DERSequence({array:this.asn1Array});return this.hTLV=f.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.x509.X500Name,A.asn1.ASN1Object);A.asn1.x509.X500Name.compatToLDAP=function(e){if(e.substr(0,1)!=="/")throw"malformed input";var t="";e=e.substr(1);var r=e.split("/");return r.reverse(),r=r.map(function(n){return n.replace(/,/,"\\,")}),r.join(",")};A.asn1.x509.X500Name.onelineToLDAP=function(e){return A.asn1.x509.X500Name.compatToLDAP(e)};A.asn1.x509.X500Name.ldapToCompat=function(e){for(var t=e.split(","),r=!1,n=[],i=0;t.length>0;i++){var a=t.shift();if(r===!0){var s=n.pop(),u=(s+","+a).replace(/\\,/g,",");n.push(u),r=!1}else n.push(a);a.substr(-1,1)==="\\"&&(r=!0)}return n=n.map(function(l){return l.replace("/","\\/")}),n.reverse(),"/"+n.join("/")};A.asn1.x509.X500Name.ldapToOneline=function(e){return A.asn1.x509.X500Name.ldapToCompat(e)};A.asn1.x509.RDN=function(e){A.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var t=A.asn1.x509.AttributeTypeAndValue;this.setByParam=function(r){r.rule!==void 0&&(this.sRule=r.rule),r.str!==void 0&&this.addByMultiValuedString(r.str),r.array!==void 0&&(this.paramArray=r.array)},this.addByString=function(r){this.asn1Array.push(new A.asn1.x509.AttributeTypeAndValue({str:r,rule:this.sRule}))},this.addByMultiValuedString=function(r){for(var n=A.asn1.x509.RDN.parseString(r),i=0;i<n.length;i++)this.addByString(n[i])},this.tohex=function(){if(this.asn1Array.length==0&&this.paramArray.length>0)for(var r=0;r<this.paramArray.length;r++){var n=this.paramArray[r];n.rule!==void 0&&this.sRule!="utf8"&&(n.rule=this.sRule);var i=new t(n);this.asn1Array.push(i)}var a=new A.asn1.DERSet({array:this.asn1Array});return this.TLV=a.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.x509.RDN,A.asn1.ASN1Object);A.asn1.x509.RDN.parseString=function(e){for(var t=e.split(/\+/),r=!1,n=[],i=0;t.length>0;i++){var a=t.shift();if(r===!0){var s=n.pop(),u=(s+"+"+a).replace(/\\\+/g,"+");n.push(u),r=!1}else n.push(a);a.substr(-1,1)==="\\"&&(r=!0)}for(var l=!1,f=[],i=0;n.length>0;i++){var a=n.shift();if(l===!0){var d=f.pop();if(a.match(/"$/)){var u=(d+"+"+a).replace(/^([^=]+)="(.*)"$/,"$1=$2");f.push(u),l=!1}else f.push(d+"+"+a)}else f.push(a);a.match(/^[^=]+="/)&&(l=!0)}return f};A.asn1.x509.AttributeTypeAndValue=function(e){A.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this),this.sRule="utf8",this.sType=null,this.sValue=null,this.dsType=null;var t=A,r=t.asn1,n=r.DERSequence,i=r.DERUTF8String,a=r.DERPrintableString,s=r.DERTeletexString,u=r.DERIA5String,l=r.DERVisibleString,f=r.DERBMPString,d=t.lang.String.isMail,g=t.lang.String.isPrintable;this.setByParam=function(p){if(p.rule!==void 0&&(this.sRule=p.rule),p.ds!==void 0&&(this.dsType=p.ds),p.value===void 0&&p.str!==void 0){var h=p.str,w=h.match(/^([^=]+)=(.+)$/);if(w)this.sType=w[1],this.sValue=w[2];else throw new Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)}else this.sType=p.type,this.sValue=p.value},this.setByString=function(p,h){h!==void 0&&(this.sRule=h);var w=p.match(/^([^=]+)=(.+)$/);if(w)this.setByAttrTypeAndValueStr(w[1],w[2]);else throw new Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)},this._getDsType=function(){var p=this.sType,h=this.sValue,w=this.sRule;return w==="prn"?p=="CN"&&d(h)?"ia5":g(h)?"prn":"utf8":w==="utf8"?p=="CN"&&d(h)?"ia5":p=="C"?"prn":"utf8":"utf8"},this.setByAttrTypeAndValueStr=function(p,h,w){w!==void 0&&(this.sRule=w),this.sType=p,this.sValue=h},this.getValueObj=function(p,h){if(p=="utf8")return new i({str:h});if(p=="prn")return new a({str:h});if(p=="tel")return new s({str:h});if(p=="ia5")return new u({str:h});if(p=="vis")return new l({str:h});if(p=="bmp")return new f({str:h});throw new Error("unsupported directory string type: type="+p+" value="+h)},this.tohex=function(){this.dsType==null&&(this.dsType=this._getDsType());var p=A.asn1.x509.OID.atype2obj(this.sType),h=this.getValueObj(this.dsType,this.sValue),w=new n({array:[p,h]});return this.TLV=w.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.x509.AttributeTypeAndValue,A.asn1.ASN1Object);A.asn1.x509.SubjectPublicKeyInfo=function(e){A.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var t=null,r=null,n=A,i=n.asn1,a=i.DERInteger,s=i.DERBitString,u=i.DERObjectIdentifier,l=i.DERSequence,f=i.ASN1Util.newObject,d=i.x509,g=d.AlgorithmIdentifier,p=n.crypto,h=p.ECDSA,w=p.DSA;this.getASN1Object=function(){if(this.asn1AlgId==null||this.asn1SubjPKey==null)throw"algId and/or subjPubKey not set";var v=new l({array:[this.asn1AlgId,this.asn1SubjPKey]});return v},this.tohex=function(){var v=this.getASN1Object();return this.hTLV=v.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.setPubKey=function(v){try{if(v instanceof it){var y=f({seq:[{int:{bigint:v.n}},{int:{int:v.e}}]}),m=y.tohex();this.asn1AlgId=new g({name:"rsaEncryption"}),this.asn1SubjPKey=new s({hex:"00"+m})}}catch{}try{if(v instanceof A.crypto.ECDSA){var b=new u({name:v.curveName});this.asn1AlgId=new g({name:"ecPublicKey",asn1params:b}),this.asn1SubjPKey=new s({hex:"00"+v.pubKeyHex})}}catch{}try{if(v instanceof A.crypto.DSA){var b=new f({seq:[{int:{bigint:v.p}},{int:{bigint:v.q}},{int:{bigint:v.g}}]});this.asn1AlgId=new g({name:"dsa",asn1params:b});var D=new a({bigint:v.y});this.asn1SubjPKey=new s({hex:"00"+D.tohex()})}}catch{}},e!==void 0&&this.setPubKey(e)};ge(A.asn1.x509.SubjectPublicKeyInfo,A.asn1.ASN1Object);A.asn1.x509.Time=function(e){A.asn1.x509.Time.superclass.constructor.call(this);var t=null,r=null,n=A,i=n.asn1,a=i.DERUTCTime,s=i.DERGeneralizedTime;this.params=null,this.type=null,this.setTimeParams=function(u){this.timeParams=u},this.setByParam=function(u){this.params=u},this.getType=function(u){return u.match(/^[0-9]{12}Z$/)?"utc":u.match(/^[0-9]{14}Z$/)?"gen":u.match(/^[0-9]{12}\.[0-9]+Z$/)?"utc":u.match(/^[0-9]{14}\.[0-9]+Z$/)?"gen":null},this.tohex=function(){var u=this.params,l=null;if(typeof u=="string"&&(u={str:u}),u!=null&&u.str&&(u.type==null||u.type==null)&&(u.type=this.getType(u.str)),u!=null&&u.str?(u.type=="utc"&&(l=new a(u.str)),u.type=="gen"&&(l=new s(u.str))):this.type=="gen"?l=new s:l=new a,l==null)throw new Error("wrong setting for Time");return this.TLV=l.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};A.asn1.x509.Time_bak=function(e){A.asn1.x509.Time_bak.superclass.constructor.call(this);var t=null,r=null,n=A,i=n.asn1,a=i.DERUTCTime,s=i.DERGeneralizedTime;this.setTimeParams=function(u){this.timeParams=u},this.tohex=function(){var u=null;return this.timeParams!=null?this.type=="utc"?u=new a(this.timeParams):u=new s(this.timeParams):this.type=="utc"?u=new a:u=new s,this.TLV=u.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},this.type="utc",e!==void 0&&(e.type!==void 0?this.type=e.type:e.str!==void 0&&(e.str.match(/^[0-9]{12}Z$/)&&(this.type="utc"),e.str.match(/^[0-9]{14}Z$/)&&(this.type="gen")),this.timeParams=e)};ge(A.asn1.x509.Time,A.asn1.ASN1Object);A.asn1.x509.AlgorithmIdentifier=function(e){A.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var t=A,r=t.asn1,n=r.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;if(this.tohex=function(){if(this.nameAlg===null&&this.asn1Alg===null)throw new Error("algorithm not specified");if(this.nameAlg!==null){var a=null;for(var s in n)s===this.nameAlg&&(a=n[s]);if(a!==null)return this.hTLV=a,this.hTLV}this.nameAlg!==null&&this.asn1Alg===null&&(this.asn1Alg=r.x509.OID.name2obj(this.nameAlg));var u=[this.asn1Alg];this.asn1Params!==null&&u.push(this.asn1Params);var l=new r.DERSequence({array:u});return this.hTLV=l.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&(e.name!==void 0&&(this.nameAlg=e.name),e.asn1params!==void 0&&(this.asn1Params=e.asn1params),e.paramempty!==void 0&&(this.paramEmpty=e.paramempty)),this.asn1Params===null&&this.paramEmpty===!1&&this.nameAlg!==null){this.nameAlg.name!==void 0&&(this.nameAlg=this.nameAlg.name);var i=this.nameAlg.toLowerCase();i.substr(-7,7)!=="withdsa"&&i.substr(-9,9)!=="withecdsa"&&(this.asn1Params=new r.DERNull)}};ge(A.asn1.x509.AlgorithmIdentifier,A.asn1.ASN1Object);A.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV={SHAwithRSAandMGF1:"300d06092a864886f70d01010a3000",SHA256withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",SHA384withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",SHA512withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"};A.asn1.x509.GeneralName=function(e){A.asn1.x509.GeneralName.superclass.constructor.call(this);var t={rfc822:"81",dns:"82",dn:"a4",uri:"86",ip:"87",otherName:"a0"},r=A,n=r.asn1,i=n.x509,a=i.X500Name,s=i.OtherName,u=n.DERIA5String,l=n.DERPrintableString,f=n.DEROctetString,d=n.DERTaggedObject,g=n.ASN1Object,p=Error;this.params=null,this.setByParam=function(h){this.params=h},this.tohex=function(){var h=this.params,w,y,v,y=!1;if(h.other!==void 0)w="a0",v=new s(h.other);else if(h.rfc822!==void 0)w="81",v=new u({str:h.rfc822});else if(h.dns!==void 0)w="82",v=new u({str:h.dns});else if(h.dn!==void 0)w="a4",y=!0,typeof h.dn=="string"?v=new a({str:h.dn}):h.dn instanceof A.asn1.x509.X500Name?v=h.dn:v=new a(h.dn);else if(h.ldapdn!==void 0)w="a4",y=!0,v=new a({ldapstr:h.ldapdn});else if(h.certissuer!==void 0||h.certsubj!==void 0){w="a4",y=!0;var m,b,D=null;if(h.certsubj!==void 0?(m=!1,b=h.certsubj):(m=!0,b=h.certissuer),b.match(/^[0-9A-Fa-f]+$/)&&D==b,b.indexOf("-----BEGIN ")!=-1&&(D=yr(b)),D==null)throw new Error("certsubj/certissuer not cert");var C=new Xe;C.hex=D;var F;m?F=C.getIssuerHex():F=C.getSubjectHex(),v=new g,v.hTLV=F}else if(h.uri!==void 0)w="86",v=new u({str:h.uri});else if(h.ip!==void 0){w="87";var L,N=h.ip;try{if(N.match(/^[0-9a-f]+$/)){var S=N.length;if(S==8||S==16||S==32||S==64)L=N;else throw"err"}else L=lm(N)}catch(T){throw new p("malformed IP address: "+h.ip+":"+T.message)}v=new f({hex:L})}else throw new p("improper params");var B=new d({tag:w,explicit:y,obj:v});return B.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.x509.GeneralName,A.asn1.ASN1Object);A.asn1.x509.GeneralNames=function(e){A.asn1.x509.GeneralNames.superclass.constructor.call(this);var t=null,r=A,n=r.asn1;this.setByParamArray=function(i){for(var a=0;a<i.length;a++){var s=new n.x509.GeneralName(i[a]);this.asn1Array.push(s)}},this.tohex=function(){var i=new n.DERSequence({array:this.asn1Array});return i.tohex()},this.getEncodedHex=function(){return this.tohex()},this.asn1Array=new Array,typeof e<"u"&&this.setByParamArray(e)};ge(A.asn1.x509.GeneralNames,A.asn1.ASN1Object);A.asn1.x509.OtherName=function(e){A.asn1.x509.OtherName.superclass.constructor.call(this);var t=null,r=null,n=A,i=n.asn1,a=i.DERObjectIdentifier,s=i.DERSequence,u=i.ASN1Util.newObject;this.params=null,this.setByParam=function(l){this.params=l},this.tohex=function(){var l=this.params;if(l.oid==null||l.value==null)throw new Error("oid or value not specified");var f=new a({oid:l.oid}),d=u({tag:{tag:"a0",explicit:!0,obj:l.value}}),g=new s({array:[f,d]});return g.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.x509.OtherName,A.asn1.ASN1Object);A.asn1.x509.OID=new function(){var e=A.asn1.DERObjectIdentifier;this.name2oidList={"aes128-CBC":"2.16.840.1.101.3.4.1.2","aes256-CBC":"2.16.840.1.101.3.4.1.42",sha1:"1.3.14.3.2.26",sha256:"2.16.840.1.101.3.4.2.1",sha384:"2.16.840.1.101.3.4.2.2",sha512:"2.16.840.1.101.3.4.2.3",sha224:"2.16.840.1.101.3.4.2.4",md5:"1.2.840.113549.2.5",md2:"1.3.14.7.2.2.1",ripemd160:"1.3.36.3.2.1",hmacWithSHA1:"1.2.840.113549.2.7",hmacWithSHA224:"1.2.840.113549.2.8",hmacWithSHA256:"1.2.840.113549.2.9",hmacWithSHA384:"1.2.840.113549.2.10",hmacWithSHA512:"1.2.840.113549.2.11",MD2withRSA:"1.2.840.113549.1.1.2",MD4withRSA:"1.2.840.113549.1.1.3",MD5withRSA:"1.2.840.113549.1.1.4",SHA1withRSA:"1.2.840.113549.1.1.5","pkcs1-MGF":"1.2.840.113549.1.1.8",rsaPSS:"1.2.840.113549.1.1.10",SHA224withRSA:"1.2.840.113549.1.1.14",SHA256withRSA:"1.2.840.113549.1.1.11",SHA384withRSA:"1.2.840.113549.1.1.12",SHA512withRSA:"1.2.840.113549.1.1.13",SHA1withECDSA:"1.2.840.10045.4.1",SHA224withECDSA:"1.2.840.10045.4.3.1",SHA256withECDSA:"1.2.840.10045.4.3.2",SHA384withECDSA:"1.2.840.10045.4.3.3",SHA512withECDSA:"1.2.840.10045.4.3.4",dsa:"1.2.840.10040.4.1",SHA1withDSA:"1.2.840.10040.4.3",SHA224withDSA:"2.16.840.1.101.3.4.3.1",SHA256withDSA:"2.16.840.1.101.3.4.3.2",rsaEncryption:"1.2.840.113549.1.1.1",commonName:"2.5.4.3",countryName:"2.5.4.6",localityName:"2.5.4.7",stateOrProvinceName:"2.5.4.8",streetAddress:"2.5.4.9",organizationName:"2.5.4.10",organizationalUnitName:"2.5.4.11",domainComponent:"0.9.2342.19200300.100.1.25",userId:"0.9.2342.19200300.100.1.1",surname:"2.5.4.4",givenName:"2.5.4.42",title:"2.5.4.12",distinguishedName:"2.5.4.49",emailAddress:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3",subjectDirectoryAttributes:"2.5.29.9",subjectKeyIdentifier:"2.5.29.14",keyUsage:"2.5.29.15",subjectAltName:"2.5.29.17",issuerAltName:"2.5.29.18",basicConstraints:"2.5.29.19",cRLNumber:"2.5.29.20",cRLReason:"2.5.29.21",nameConstraints:"2.5.29.30",cRLDistributionPoints:"2.5.29.31",certificatePolicies:"2.5.29.32",anyPolicy:"2.5.29.32.0",policyMappings:"2.5.29.33",authorityKeyIdentifier:"2.5.29.35",policyConstraints:"2.5.29.36",extKeyUsage:"2.5.29.37",inhibitAnyPolicy:"2.5.29.54",authorityInfoAccess:"1.3.6.1.5.5.7.1.1",ocsp:"1.3.6.1.5.5.7.48.1",ocspBasic:"1.3.6.1.5.5.7.48.1.1",ocspNonce:"1.3.6.1.5.5.7.48.1.2",ocspNoCheck:"1.3.6.1.5.5.7.48.1.5",caIssuers:"1.3.6.1.5.5.7.48.2",anyExtendedKeyUsage:"2.5.29.37.0",serverAuth:"1.3.6.1.5.5.7.3.1",clientAuth:"1.3.6.1.5.5.7.3.2",codeSigning:"1.3.6.1.5.5.7.3.3",emailProtection:"1.3.6.1.5.5.7.3.4",timeStamping:"1.3.6.1.5.5.7.3.8",ocspSigning:"1.3.6.1.5.5.7.3.9",smtpUTF8Mailbox:"1.3.6.1.5.5.7.8.9",dateOfBirth:"1.3.6.1.5.5.7.9.1",placeOfBirth:"1.3.6.1.5.5.7.9.2",gender:"1.3.6.1.5.5.7.9.3",countryOfCitizenship:"1.3.6.1.5.5.7.9.4",countryOfResidence:"1.3.6.1.5.5.7.9.5",ecPublicKey:"1.2.840.10045.2.1","P-256":"1.2.840.10045.3.1.7",secp256r1:"1.2.840.10045.3.1.7",secp256k1:"1.3.132.0.10",secp384r1:"1.3.132.0.34",secp521r1:"1.3.132.0.35",pkcs5PBES2:"1.2.840.113549.1.5.13",pkcs5PBKDF2:"1.2.840.113549.1.5.12","des-EDE3-CBC":"1.2.840.113549.3.7",data:"1.2.840.113549.1.7.1","signed-data":"1.2.840.113549.1.7.2","enveloped-data":"1.2.840.113549.1.7.3","digested-data":"1.2.840.113549.1.7.5","encrypted-data":"1.2.840.113549.1.7.6","authenticated-data":"1.2.840.113549.1.9.16.1.2",tstinfo:"1.2.840.113549.1.9.16.1.4",signingCertificate:"1.2.840.113549.1.9.16.2.12",timeStampToken:"1.2.840.113549.1.9.16.2.14",signaturePolicyIdentifier:"1.2.840.113549.1.9.16.2.15",etsArchiveTimeStamp:"1.2.840.113549.1.9.16.2.27",signingCertificateV2:"1.2.840.113549.1.9.16.2.47",etsArchiveTimeStampV2:"1.2.840.113549.1.9.16.2.48",extensionRequest:"1.2.840.113549.1.9.14",contentType:"1.2.840.113549.1.9.3",messageDigest:"1.2.840.113549.1.9.4",signingTime:"1.2.840.113549.1.9.5",counterSignature:"1.2.840.113549.1.9.6",archiveTimeStampV3:"0.4.0.1733.2.4",pdfRevocationInfoArchival:"1.2.840.113583.1.1.8",adobeTimeStamp:"1.2.840.113583.1.1.9.1",smimeMailboxLegacy:"2.23.140.1.5.1.1",smimeMailboxMulti:"2.23.140.1.5.1.2",smimeMailboxStrict:"2.23.140.1.5.1.3",smimeOrganizationLegacy:"2.23.140.1.5.2.1",smimeOrganizationMulti:"2.23.140.1.5.2.2",smimeOrganizationStrict:"2.23.140.1.5.2.3",smimeSponsorLegacy:"2.23.140.1.5.3.1",smimeSponsorMulti:"2.23.140.1.5.3.2",smimeSponsorStrict:"2.23.140.1.5.3.3",smimeIndividualLegacy:"2.23.140.1.5.4.1",smimeIndividualMulti:"2.23.140.1.5.4.2",smimeIndividualStrict:"2.23.140.1.5.4.3"},this.atype2oidList={CN:"2.5.4.3",L:"2.5.4.7",ST:"2.5.4.8",O:"2.5.4.10",OU:"2.5.4.11",C:"2.5.4.6",STREET:"2.5.4.9",DC:"0.9.2342.19200300.100.1.25",UID:"0.9.2342.19200300.100.1.1",SN:"2.5.4.4",T:"2.5.4.12",GN:"2.5.4.42",DN:"2.5.4.49",E:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",serialNumber:"2.5.4.5",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3"},this.objCache={},this.name2obj=function(t){if(typeof this.objCache[t]<"u")return this.objCache[t];if(typeof this.name2oidList[t]>"u")throw"Name of ObjectIdentifier not defined: "+t;var r=this.name2oidList[t],n=new e({oid:r});return this.objCache[t]=n,n},this.atype2obj=function(t){if(this.objCache[t]!==void 0)return this.objCache[t];var r;if(t.match(/^\d+\.\d+\.[0-9.]+$/))r=t;else if(this.atype2oidList[t]!==void 0)r=this.atype2oidList[t];else if(this.name2oidList[t]!==void 0)r=this.name2oidList[t];else throw new Error("AttributeType name undefined: "+t);var n=new e({oid:r});return this.objCache[t]=n,n},this.registerOIDs=function(t){if(this.checkOIDs(t))for(var r in t)this.name2oidList[r]=t[r]},this.checkOIDs=function(t){try{var r=Object.keys(t);return r.length==0?!1:(r.map(function(n,i,a){var s=this[n];if(!s.match(/^[0-2]\.[0-9.]+$/))throw new Error("value is not OID")},t),!0)}catch{return!1}}};A.asn1.x509.OID.oid2name=function(e){var t=A.asn1.x509.OID.name2oidList;for(var r in t)if(t[r]==e)return r;return""};A.asn1.x509.OID.oid2atype=function(e){var t=A.asn1.x509.OID.atype2oidList;for(var r in t)if(t[r]==e)return r;return e};A.asn1.x509.OID.name2oid=function(e){if(e.match(/^[0-9.]+$/))return e;var t=A.asn1.x509.OID.name2oidList;return t[e]===void 0?"":t[e]};A.asn1.x509.X509Util={};A.asn1.x509.X509Util.newCertPEM=function(e){var t=A.asn1.x509,r=t.TBSCertificate,n=t.Certificate,i=new n(e);return i.getPEM()};(typeof A>"u"||!A)&&(A={});(typeof A.asn1>"u"||!A.asn1)&&(A.asn1={});(typeof A.asn1.cms>"u"||!A.asn1.cms)&&(A.asn1.cms={});A.asn1.cms.Attribute=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSequence,a=n.DERSet,s=n.DERObjectIdentifier;this.params=null,this.typeOid=null,this.setByParam=function(u){this.params=u},this.getValueArray=function(){throw new t("not yet implemented abstract")},this.tohex=function(){var u=new s({oid:this.typeOid}),l=new a({array:this.getValueArray()}),f=new i({array:[u,l]});return f.tohex()},this.getEncodedHex=function(){return this.tohex()}};ge(A.asn1.cms.Attribute,A.asn1.ASN1Object);A.asn1.cms.ContentType=function(e){var t=A,r=t.asn1;r.cms.ContentType.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.3",this.getValueArray=function(){var n=new r.DERObjectIdentifier(this.params.type);return[n]},e!=null&&this.setByParam(e)};ge(A.asn1.cms.ContentType,A.asn1.cms.Attribute);A.asn1.cms.MessageDigest=function(e){var t=A,r=t.asn1,n=r.DEROctetString,i=r.cms;i.MessageDigest.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.4",this.getValueArray=function(){var a=new n(this.params);return[a]},e!=null&&this.setByParam(e)};ge(A.asn1.cms.MessageDigest,A.asn1.cms.Attribute);A.asn1.cms.SigningTime=function(e){var t=A,r=t.asn1;r.cms.SigningTime.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.5",this.getValueArray=function(){var n=new r.x509.Time(this.params);return[n]},e!=null&&this.setByParam(e)};ge(A.asn1.cms.SigningTime,A.asn1.cms.Attribute);A.asn1.cms.SigningCertificate=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSequence,a=n.cms,s=a.ESSCertID,u=r.crypto;a.SigningCertificate.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.12",this.getValueArray=function(){if(this.params==null||this.params==null||this.params.array==null)throw new t("parameter 'array' not specified");for(var l=this.params.array,f=[],d=0;d<l.length;d++){var g=l[d];e.hasis==!1&&typeof g=="string"&&(g.indexOf("-----BEGIN")!=-1||_e.isASN1HEX(g))&&(g={cert:g}),g.hasis!=!1&&e.hasis==!1&&(g.hasis=!1),f.push(new s(g))}var p=new i({array:f}),h=new i({array:[p]});return[h]},e!=null&&this.setByParam(e)};ge(A.asn1.cms.SigningCertificate,A.asn1.cms.Attribute);A.asn1.cms.ESSCertID=function(e){A.asn1.cms.ESSCertID.superclass.constructor.call(this);var t=Error,r=A,n=r.asn1,i=n.DEROctetString,a=n.DERSequence,s=n.cms.IssuerSerial;this.params=null,this.getCertHash=function(u,l){if(u.hash!=null)return u.hash;if(typeof u=="string"&&u.indexOf("-----BEGIN")==-1&&!_e.isASN1HEX(u))return u;var f;if(typeof u=="string")f=u;else if(u.cert!=null)f=u.cert;else throw new t("hash nor cert unspecified");var d;f.indexOf("-----BEGIN")!=-1?d=yr(f):d=f,typeof u=="string"&&(u.indexOf("-----BEGIN")!=-1?d=yr(u):_e.isASN1HEX(u)&&(d=u));var g;if(u.alg!=null)g=u.alg;else if(l!=null)g=l;else throw new t("hash alg unspecified");return r.crypto.Util.hashHex(d,g)},this.tohex=function(){var u=this.params,l=this.getCertHash(u,"sha1"),f=[];f.push(new i({hex:l})),(typeof u=="string"&&u.indexOf("-----BEGIN")!=-1||u.cert!=null&&u.hasis!=!1||u.issuer!=null&&u.serial!=null)&&f.push(new s(u));var d=new a({array:f});return d.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.ESSCertID,A.asn1.ASN1Object);A.asn1.cms.SigningCertificateV2=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSequence,a=n.x509,s=n.cms,u=s.ESSCertIDv2,l=r.crypto;s.SigningCertificateV2.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.47",this.getValueArray=function(){if(this.params==null||this.params==null||this.params.array==null)throw new t("parameter 'array' not specified");for(var f=this.params.array,d=[],g=0;g<f.length;g++){var p=f[g];(e.alg!=null||e.hasis==!1)&&typeof p=="string"&&(p.indexOf("-----BEGIN")!=-1||_e.isASN1HEX(p))&&(p={cert:p}),p.alg==null&&e.alg!=null&&(p.alg=e.alg),p.hasis!=!1&&e.hasis==!1&&(p.hasis=!1),d.push(new u(p))}var h=new i({array:d}),w=new i({array:[h]});return[w]},e!=null&&this.setByParam(e)};ge(A.asn1.cms.SigningCertificateV2,A.asn1.cms.Attribute);A.asn1.cms.ESSCertIDv2=function(e){A.asn1.cms.ESSCertIDv2.superclass.constructor.call(this);var t=Error,r=A,n=r.asn1,i=n.DEROctetString,a=n.DERSequence,s=n.cms.IssuerSerial,u=n.x509.AlgorithmIdentifier;this.params=null,this.tohex=function(){var l=this.params,f=this.getCertHash(l,"sha256"),d=[];l.alg!=null&&l.alg!="sha256"&&d.push(new u({name:l.alg})),d.push(new i({hex:f})),(typeof l=="string"&&l.indexOf("-----BEGIN")!=-1||l.cert!=null&&l.hasis!=!1||l.issuer!=null&&l.serial!=null)&&d.push(new s(l));var g=new a({array:d});return g.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.ESSCertIDv2,A.asn1.cms.ESSCertID);A.asn1.cms.IssuerSerial=function(e){var t=Error,r=A,n=r.asn1,i=n.DERInteger,a=n.DERSequence,s=n.cms,u=n.x509,l=u.GeneralNames,f=Xe;s.IssuerSerial.superclass.constructor.call(this),this.setByParam=function(d){this.params=d},this.tohex=function(){var d=this.params,g,p;if(typeof d=="string"&&d.indexOf("-----BEGIN")!=-1||d.cert!=null){var h;d.cert!=null?h=d.cert:h=d;var w=new f;w.readCertPEM(h),g=w.getIssuer(),p={hex:w.getSerialNumberHex()}}else if(d.issuer!=null&&d.serial)g=d.issuer,p=d.serial;else throw new t("cert or issuer and serial parameter not specified");var v=new l([{dn:g}]),y=new i(p),m=new a({array:[v,y]});return m.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.IssuerSerial,A.asn1.ASN1Object);A.asn1.cms.SignerIdentifier=function(e){var t=A,r=t.asn1,n=r.DERInteger,i=r.DERSequence,a=r.cms,s=a.IssuerAndSerialNumber,u=a.SubjectKeyIdentifier,l=r.x509,f=l.X500Name,d=Xe,g=Error;a.SignerIdentifier.superclass.constructor.call(this),this.params=null,this.tohex=function(){var p=this.params;if(p.type=="isssn"){var h=new s(p);return h.tohex()}else if(p.type=="skid"){var w=new u(p);return w.tohex()}else throw new Error("wrong property for isssn or skid")},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.SignerIdentifier,A.asn1.ASN1Object);A.asn1.cms.IssuerAndSerialNumber=function(e){var t=A,r=t.asn1,n=r.DERInteger,i=r.DERSequence,a=r.cms,s=r.x509,u=s.X500Name,l=Xe,f=Error;a.IssuerAndSerialNumber.superclass.constructor.call(this),this.params=null,this.tohex=function(){var d=this.params,g,p;if(typeof d=="string"&&d.indexOf("-----BEGIN")!=-1||d.cert!=null){var h;d.cert!=null?h=d.cert:h=d;var w=new l;w.readCertPEM(h),g=w.getIssuer(),p={hex:w.getSerialNumberHex()}}else if(d.issuer!=null&&d.serial)g=d.issuer,p=d.serial;else throw new f("cert or issuer and serial parameter not specified");var v=new u(g),y=new n(p),m=new i({array:[v,y]});return m.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(d){this.params=d},e!=null&&this.setByParam(e)};ge(A.asn1.cms.IssuerAndSerialNumber,A.asn1.ASN1Object);A.asn1.cms.SubjectKeyIdentifier=function(e){var t=A,r=t.asn1,n=r.DERInteger,i=r.DERSequence,a=r.ASN1Util.newObject,s=r.cms,u=s.IssuerAndSerialName,l=s.SubjectKeyIdentifier,f=r.x509,d=f.X500Name,g=Xe,p=Error;s.SubjectKeyIdentifier.superclass.constructor.call(this),this.tohex=function(){var h=this.params;if(h.cert==null&&h.skid==null)throw new p("property cert nor skid undefined");var w;if(h.cert!=null){var v=new g(h.cert),y=v.getExtSubjectKeyIdentifier();w=y.kid.hex}else h.skid!=null&&(w=h.skid);var m=a({tag:{tage:"a0",obj:{octstr:{hex:w}}}});return m.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.SubjectKeyIdentifier,A.asn1.ASN1Object);A.asn1.cms.AttributeList=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSet,a=n.cms;a.AttributeList.superclass.constructor.call(this),this.params=null,this.hTLV=null,this.setByParam=function(s){this.params=s},this.tohex=function(){var s=this.params;if(this.hTLV!=null)return this.hTLV;var u=!0;s.sortflag!=null&&(u=s.sortflag);for(var l=s.array,f=[],d=0;d<l.length;d++){var g=l[d],p=g.attr;if(p=="contentType")f.push(new a.ContentType(g));else if(p=="messageDigest")f.push(new a.MessageDigest(g));else if(p=="signingTime")f.push(new a.SigningTime(g));else if(p=="signingCertificate")f.push(new a.SigningCertificate(g));else if(p=="signingCertificateV2")f.push(new a.SigningCertificateV2(g));else if(p=="signaturePolicyIdentifier")f.push(new A.asn1.cades.SignaturePolicyIdentifier(g));else if(p=="signatureTimeStamp"||p=="timeStampToken")f.push(new A.asn1.cades.SignatureTimeStamp(g));else throw new t("unknown attr: "+p)}var h=new i({array:f,sortflag:u});return this.hTLV=h.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.AttributeList,A.asn1.ASN1Object);A.asn1.cms.SignerInfo=function(e){var t=Error,r=A,n=r.asn1,i=n.DERInteger,a=n.DEROctetString,s=n.DERSequence,u=n.DERTaggedObject,l=n.cms,f=l.SignerIdentifier,d=l.AttributeList,g=l.ContentType,p=l.EncapsulatedContentInfo,h=l.MessageDigest,w=l.SignedData,v=n.x509,y=v.AlgorithmIdentifier,m=r.crypto,b=Et;l.SignerInfo.superclass.constructor.call(this),this.params=null,this.sign=function(){var D=this.params,C=D.sigalg,F=new d(D.sattrs).tohex(),L=b.getKey(D.signkey),N=new m.Signature({alg:C});N.init(L),N.updateHex(F);var S=N.sign();D.sighex=S},this.tohex=function(){var D=this.params,C=[];if(C.push(new i({int:D.version})),C.push(new f(D.id)),C.push(new y({name:D.hashalg})),D.sattrs!=null){var F=new d(D.sattrs);try{C.push(new u({tag:"a0",explicit:!1,obj:F}))}catch(N){throw new t("si sattr error: "+N)}}if(D.sigalgfield!=null?C.push(new y({name:D.sigalgfield})):C.push(new y({name:D.sigalg})),D.sighex==null&&D.signkey!=null&&this.sign(),C.push(new a({hex:D.sighex})),D.uattrs!=null){var F=new d(D.uattrs);try{C.push(new u({tag:"a1",explicit:!1,obj:F}))}catch(S){throw new t("si uattr error: "+S)}}var L=new s({array:C});return L.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.SignerInfo,A.asn1.ASN1Object);A.asn1.cms.EncapsulatedContentInfo=function(e){var t=A,r=t.asn1,n=r.DERTaggedObject,i=r.DERSequence,a=r.DERObjectIdentifier,s=r.DEROctetString,u=r.cms;u.EncapsulatedContentInfo.superclass.constructor.call(this),this.params=null,this.tohex=function(){var l=this.params,f=[];if(f.push(new a(l.type)),l.content!=null&&(l.content.hex!=null||l.content.str!=null)&&l.isDetached!=!0){var d=new s(l.content),g=new n({tag:"a0",explicit:!0,obj:d});f.push(g)}var p=new i({array:f});return p.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(l){this.params=l},e!=null&&this.setByParam(e)};ge(A.asn1.cms.EncapsulatedContentInfo,A.asn1.ASN1Object);A.asn1.cms.ContentInfo=function(e){var t=A,r=t.asn1,n=r.DERTaggedObject,i=r.DERSequence,a=r.DERObjectIdentifier,s=r.x509,u=s.OID.name2obj;A.asn1.cms.ContentInfo.superclass.constructor.call(this),this.params=null,this.tohex=function(){var l=this.params,f=[];f.push(new a(l.type));var d=new n({tag:"a0",explicit:!0,obj:l.obj});f.push(d);var g=new i({array:f});return g.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(l){this.params=l},e!=null&&this.setByParam(e)};ge(A.asn1.cms.ContentInfo,A.asn1.ASN1Object);A.asn1.cms.SignedData=function(e){var t=Error,r=A,n=r.asn1,i=n.ASN1Object,a=n.DERInteger,s=n.DERSet,u=n.DERSequence,l=n.DERTaggedObject,f=n.cms,d=f.EncapsulatedContentInfo,g=f.SignerInfo,p=f.ContentInfo,h=f.CertificateSet,w=f.RevocationInfoChoices,v=n.x509,y=v.AlgorithmIdentifier;A.asn1.cms.SignedData.superclass.constructor.call(this),this.params=null,this.checkAndFixParam=function(){var m=this.params;this._setDigestAlgs(m),this._setContentTypeByEContent(m),this._setMessageDigestByEContent(m),this._setSignerInfoVersion(m),this._setSignedDataVersion(m)},this._setDigestAlgs=function(m){for(var b={},D=m.sinfos,C=0;C<D.length;C++){var F=D[C];b[F.hashalg]=1}m.hashalgs=Object.keys(b).sort()},this._setContentTypeByEContent=function(m){for(var b=m.econtent.type,D=m.sinfos,C=0;C<D.length;C++){var F=D[C],L=this._getAttrParamByName(F,"contentType");L.type=b}},this._setMessageDigestByEContent=function(m){var b=m.econtent,D=m.econtent.type,C=b.content.hex;C==null&&b.type=="data"&&b.content.str!=null&&(C=ca(b.content.str));for(var F=m.sinfos,L=0;L<F.length;L++){var N=F[L],S=N.hashalg,B=this._getAttrParamByName(N,"messageDigest"),T=A.crypto.Util.hashHex(C,S);B.hex=T}},this._getAttrParamByName=function(m,b){for(var D=m.sattrs.array,C=0;C<D.length;C++)if(D[C].attr==b)return D[C]},this._setSignerInfoVersion=function(m){for(var b=m.sinfos,D=0;D<b.length;D++){var C=b[D],F=1;C.id.type=="skid"&&(F=3),C.version=F}},this._setSignedDataVersion=function(m){var b=this._getSignedDataVersion(m);m.version=b},this._getSignedDataVersion=function(m){if(m.revinfos!=null)for(var b=m.revinfos,D=0;D<b.length;D++){var C=b[D];if(C.ocsp!=null)return 5}for(var F=m.sinfos,D=0;D<F.length;D++){var L=m.sinfos[D];if(L.version==3)return 3}return m.econtent.type!="data"?3:1},this.tohex=function(){var m=this.params;this.getEncodedHexPrepare!=null&&this.getEncodedHexPrepare(),m.fixed!=!0&&this.checkAndFixParam();var b=[];b.push(new a({int:m.version}));for(var D=[],C=0;C<m.hashalgs.length;C++){var F=m.hashalgs[C];D.push(new y({name:F}))}b.push(new s({array:D})),b.push(new d(m.econtent)),m.certs!=null&&b.push(new h(m.certs)),m.revinfos!=null&&b.push(new w(m.revinfos));for(var L=[],C=0;C<m.sinfos.length;C++){var N=m.sinfos[C];L.push(new g(N))}b.push(new s({array:L}));var S=new u({array:b});return S.tohex()},this.getEncodedHex=function(){return this.tohex()},this.getContentInfo=function(){var m=new p({type:"signed-data",obj:this});return m},this.getContentInfoEncodedHex=function(){return this.getContentInfo().tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.SignedData,A.asn1.ASN1Object);A.asn1.cms.CertificateSet=function(e){A.asn1.cms.CertificateSet.superclass.constructor.call(this);var t=Error,r=A.asn1,n=r.DERTaggedObject,i=r.DERSet,a=r.ASN1Object;this.params=null,this.tohex=function(){var s=this.params,u=[],l;if(s instanceof Array)l=s;else if(s.array!=null)l=s.array;else throw new t("cert array not specified");for(var f=0;f<l.length;f++){var d=l[f],g=yr(d),p=new a;p.hTLV=g,u.push(p)}var h={array:u};s.sortflag==!1&&(h.sortflag=!1);var w=new i(h),v=new n({tag:"a0",explicit:!1,obj:w});return v.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.CertificateSet,A.asn1.ASN1Object);A.asn1.cms.RevocationInfoChoices=function(e){A.asn1.cms.RevocationInfoChoices.superclass.constructor.call(this),this.params=null,this.tohex=function(){var t=this.params;if(!t instanceof Array)throw new Error("params is not array");for(var r=[],n=0;n<t.length;n++)r.push(new A.asn1.cms.RevocationInfoChoice(t[n]));var i=A.asn1.ASN1Util.newObject({tag:{tagi:"a1",obj:{set:r}}});return i.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.RevocationInfoChoices,A.asn1.ASN1Object);A.asn1.cms.RevocationInfoChoice=function(e){A.asn1.cms.RevocationInfoChoice.superclass.constructor.call(this),this.params=null,this.tohex=function(){var t=this.params;if(t.crl!=null&&typeof t.crl=="string"){var r=t.crl;return t.crl.indexOf("-----BEGIN")!=-1&&(r=yr(t.crl)),r}else if(t.ocsp!=null){var n=A.asn1.ASN1Util.newObject({tag:{tagi:"a1",obj:new A.asn1.cms.OtherRevocationFormat(t)}});return n.tohex()}else throw new Error("property crl or ocsp undefined")},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.RevocationInfoChoice,A.asn1.ASN1Object);A.asn1.cms.OtherRevocationFormat=function(e){A.asn1.cms.OtherRevocationFormat.superclass.constructor.call(this);var t=Error,r=A,n=r.asn1,i=n.ASN1Util.newObject,a=r.lang.String.isHex;this.params=null,this.tohex=function(){var s=this.params;if(s.ocsp==null)throw new t("property ocsp not specified");if(!a(s.ocsp)||!_e.isASN1HEX(s.ocsp))throw new t("ocsp value not ASN.1 hex string");var u=i({seq:[{oid:"1.3.6.1.5.5.7.16.2"},{asn1:{tlv:s.ocsp}}]});return u.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cms.OtherRevocationFormat,A.asn1.ASN1Object);A.asn1.cms.CMSUtil=new function(){};A.asn1.cms.CMSUtil.newSignedData=function(e){return new A.asn1.cms.SignedData(e)};A.asn1.cms.CMSUtil.verifySignedData=function(e){var t=A,r=t.asn1,n=r.cms,i=n.SignerInfo,a=n.SignedData,s=n.SigningTime,u=n.SigningCertificate,l=n.SigningCertificateV2,f=r.cades,d=f.SignaturePolicyIdentifier,g=t.lang.String.isHex,p=_e,h=p.getVbyList,w=p.getTLVbyList,v=p.getIdxbyList,y=p.getChildIdx,m=p.getTLV,b=p.oidname,D=t.crypto.Util.hashHex;e.cms===void 0&&g(e.cms);var C=e.cms,F=function(z,W){for(var ie,Fe=3;Fe<6;Fe++)if(ie=v(z,0,[1,0,Fe]),ie!==void 0){var Se=z.substr(ie,2);Se==="a0"&&(W.certsIdx=ie),Se==="a1"&&(W.revinfosIdx=ie),Se==="31"&&(W.signerinfosIdx=ie)}},L=function(z,W){var ie=W.signerinfosIdx;if(ie!==void 0){var Fe=y(z,ie);W.signerInfoIdxList=Fe;for(var Se=0;Se<Fe.length;Se++){var Re=Fe[Se],Je={idx:Re};N(z,Je),W.signerInfos.push(Je)}}},N=function(z,W){var ie=W.idx;W.signerid_issuer1=w(z,ie,[1,0],"30"),W.signerid_serial1=h(z,ie,[1,1],"02"),W.hashalg=b(h(z,ie,[2,0],"06"));var Fe=v(z,ie,[3],"a0");W.idxSignedAttrs=Fe,S(z,W,Fe);var Se=y(z,ie),Re=Se.length;if(Re<6)throw"malformed SignerInfo";W.sigalg=b(h(z,ie,[Re-2,0],"06")),W.sigval=h(z,ie,[Re-1],"04")},S=function(z,W,ie){var Fe=y(z,ie);W.signedAttrIdxList=Fe;for(var Se=0;Se<Fe.length;Se++){var Re=Fe[Se],Je=h(z,Re,[0],"06"),ue;Je==="2a864886f70d010905"?(ue=Yt(h(z,Re,[1,0])),W.saSigningTime=ue):Je==="2a864886f70d010904"&&(ue=h(z,Re,[1,0],"04"),W.saMessageDigest=ue)}},B=function(z,W){if(h(z,0,[0],"06")!=="2a864886f70d010702")return W;W.cmsType="signedData",W.econtent=h(z,0,[1,0,2,1,0]),F(z,W),W.signerInfos=[],L(z,W)},T=function(z,W){for(var ie=W.parse.signerInfos,Fe=ie.length,Se=!0,Re=0;Re<Fe;Re++){var Je=ie[Re];V(z,W,Je,Re),Je.isValid||(Se=!1)}W.isValid=Se},U=function(z,W,ie,Fe){var Se=W.parse.certsIdx,Re;if(W.certs===void 0){Re=[],W.certkeys=[];for(var Je=y(z,Se),ue=0;ue<Je.length;ue++){var Ce=m(z,Je[ue]),Ue=new Xe;Ue.readCertHex(Ce),Re[ue]=Ue,W.certkeys[ue]=Ue.getPublicKey()}W.certs=Re}else Re=W.certs;W.cccc=Re.length,W.cccci=Je.length;for(var ue=0;ue<Re.length;ue++){var or=Ue.getIssuerHex(),$t=Ue.getSerialNumberHex();ie.signerid_issuer1===or&&ie.signerid_serial1===$t&&(ie.certkey_idx=ue)}},V=function(z,W,ie,Fe){ie.verifyDetail={};var Se=ie.verifyDetail,Re=W.parse.econtent,Je=ie.hashalg,ue=ie.saMessageDigest;Se.validMessageDigest=!1,D(Re,Je)===ue&&(Se.validMessageDigest=!0),U(z,W,ie,Fe),Se.validSignatureValue=!1;var Ce=ie.sigalg,Ue="31"+m(z,ie.idxSignedAttrs).substr(2);ie.signedattrshex=Ue;var or=W.certs[ie.certkey_idx].getPublicKey(),$t=new A.crypto.Signature({alg:Ce});$t.init(or),$t.updateHex(Ue);var _t=$t.verify(ie.sigval);Se.validSignatureValue_isValid=_t,_t===!0&&(Se.validSignatureValue=!0),ie.isValid=!1,Se.validMessageDigest&&Se.validSignatureValue&&(ie.isValid=!0)},Y=function(){},H={isValid:!1,parse:{}};return B(C,H.parse),T(C,H),H};A.asn1.cms.CMSParser=function(){var e=Error,t=Xe,r=new t,n=_e,i=n.getV,a=n.getTLV,s=n.getIdxbyList,u=n.getTLVbyList,l=n.getTLVbyListEx,f=n.getVbyList,d=n.getVbyListEx,g=n.getChildIdx;this.getCMSSignedData=function(p){var h=u(p,0,[1,0]),w=this.getSignedData(h);return w},this.getSignedData=function(p){var h=g(p,0),w={},v=i(p,h[0]),y=parseInt(v,16);w.version=y;var m=a(p,h[1]);w.hashalgs=this.getHashAlgArray(m);var b=a(p,h[2]);w.econtent=this.getEContent(b);var D=l(p,0,["[0]"]);D!=null&&(w.certs=this.getCertificateSet(D));var C=l(p,0,["[1]"]);C!=null;var F=l(p,0,[3]);return w.sinfos=this.getSignerInfos(F),w},this.getHashAlgArray=function(p){for(var h=g(p,0),w=new t,v=[],y=0;y<h.length;y++){var m=a(p,h[y]),b=w.getAlgorithmIdentifierName(m);v.push(b)}return v},this.getEContent=function(p){var h={},w=f(p,0,[0]),v=f(p,0,[1,0]);return h.type=A.asn1.x509.OID.oid2name(_e.hextooidstr(w)),h.content={hex:v},h},this.getSignerInfos=function(p){for(var h=[],w=g(p,0),v=0;v<w.length;v++){var y=a(p,w[v]),m=this.getSignerInfo(y);h.push(m)}return h},this.getSignerInfo=function(p){var h={},w=g(p,0),v=n.getInt(p,w[0],-1);v!=-1&&(h.version=v);var y=a(p,w[1]),m=this.getIssuerAndSerialNumber(y);h.id=m;var b=a(p,w[2]),D=r.getAlgorithmIdentifierName(b);h.hashalg=D;var C=l(p,0,["[0]"]);if(C!=null){var F=this.getAttributeList(C);h.sattrs=F}var L=l(p,0,[3]),N=r.getAlgorithmIdentifierName(L);h.sigalg=N;var S=d(p,0,[4]);h.sighex=S;var B=l(p,0,["[1]"]);if(B!=null){var T=this.getAttributeList(B);h.uattrs=T}return h},this.getSignerIdentifier=function(p){if(p.substr(0,2)=="30")return this.getIssuerAndSerialNumber(p);throw new Error("SKID of signerIdentifier not supported")},this.getIssuerAndSerialNumber=function(p){var h={type:"isssn"},w=g(p,0),v=a(p,w[0]);h.issuer=r.getX500Name(v);var y=i(p,w[1]);return h.serial={hex:y},h},this.getAttributeList=function(p){for(var h=[],w=g(p,0),v=0;v<w.length;v++){var y=a(p,w[v]),m=this.getAttribute(y);h.push(m)}return{array:h}},this.getAttribute=function(p){var h={},w=g(p,0),v=n.getOID(p,w[0]),y=A.asn1.x509.OID.oid2name(v);h.attr=y;var m=a(p,w[1]),b=g(m,0);if(b.length==1)h.valhex=a(m,b[0]);else{for(var D=[],C=0;C<b.length;C++)D.push(a(m,b[C]));h.valhex=D}return y=="contentType"?this.setContentType(h):y=="messageDigest"?this.setMessageDigest(h):y=="signingTime"?this.setSigningTime(h):y=="signingCertificate"?this.setSigningCertificate(h):y=="signingCertificateV2"?this.setSigningCertificateV2(h):y=="signaturePolicyIdentifier"&&this.setSignaturePolicyIdentifier(h),h},this.setContentType=function(p){var h=n.getOIDName(p.valhex,0,null);h!=null&&(p.type=h,delete p.valhex)},this.setSigningTime=function(p){var h=i(p.valhex,0),w=Yt(h);p.str=w,delete p.valhex},this.setMessageDigest=function(p){var h=i(p.valhex,0);p.hex=h,delete p.valhex},this.setSigningCertificate=function(p){var h=g(p.valhex,0);if(h.length>0){for(var w=a(p.valhex,h[0]),v=g(w,0),y=[],m=0;m<v.length;m++){var b=a(w,v[m]),D=this.getESSCertID(b);y.push(D)}p.array=y}if(h.length>1){var C=a(p.valhex,h[1]);p.polhex=C}delete p.valhex},this.setSignaturePolicyIdentifier=function(p){var h=g(p.valhex,0);if(h.length>0){var w=n.getOID(p.valhex,h[0]);p.oid=w}if(h.length>1){var v=new t,y=g(p.valhex,h[1]),m=a(p.valhex,y[0]),b=v.getAlgorithmIdentifierName(m);p.alg=b;var D=i(p.valhex,y[1]);p.hash=D}delete p.valhex},this.setSigningCertificateV2=function(p){var h=g(p.valhex,0);if(h.length>0){for(var w=a(p.valhex,h[0]),v=g(w,0),y=[],m=0;m<v.length;m++){var b=a(w,v[m]),D=this.getESSCertIDv2(b);y.push(D)}p.array=y}if(h.length>1){var C=a(p.valhex,h[1]);p.polhex=C}delete p.valhex},this.getESSCertID=function(p){var h={},w=g(p,0);if(w.length>0){var v=i(p,w[0]);h.hash=v}if(w.length>1){var y=a(p,w[1]),m=this.getIssuerSerial(y);m.serial!=null&&(h.serial=m.serial),m.issuer!=null&&(h.issuer=m.issuer)}return h},this.getESSCertIDv2=function(p){var h={},w=g(p,0);if(w.length<1||3<w.length)throw new e("wrong number of elements");var v=0;if(p.substr(w[0],2)=="30"){var y=a(p,w[0]);h.alg=r.getAlgorithmIdentifierName(y),v++}else h.alg="sha256";var m=i(p,w[v]);if(h.hash=m,w.length>v+1){var b=a(p,w[v+1]),D=this.getIssuerSerial(b);h.issuer=D.issuer,h.serial=D.serial}return h},this.getIssuerSerial=function(p){var h={},w=g(p,0),v=a(p,w[0]),y=r.getGeneralNames(v),m=y[0].dn;h.issuer=m;var b=i(p,w[1]);return h.serial={hex:b},h},this.getCertificateSet=function(p){for(var h=g(p,0),w=[],v=0;v<h.length;v++){var y=a(p,h[v]);if(y.substr(0,2)=="30"){var m=Mn(y,"CERTIFICATE");w.push(m)}}return{array:w,sortflag:!1}}};(typeof A>"u"||!A)&&(A={});(typeof A.asn1>"u"||!A.asn1)&&(A.asn1={});(typeof A.asn1.tsp>"u"||!A.asn1.tsp)&&(A.asn1.tsp={});A.asn1.tsp.TimeStampToken=function(e){var t=A,r=t.asn1,n=r.tsp;n.TimeStampToken.superclass.constructor.call(this),this.params=null,this.getEncodedHexPrepare=function(){var i=new n.TSTInfo(this.params.econtent.content);this.params.econtent.content.hex=i.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.tsp.TimeStampToken,A.asn1.cms.SignedData);A.asn1.tsp.TSTInfo=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSequence,a=n.DERInteger,s=n.DERBoolean,u=n.DERGeneralizedTime,l=n.DERObjectIdentifier,f=n.DERTaggedObject,d=n.tsp,g=d.MessageImprint,p=d.Accuracy,h=n.x509.X500Name,w=n.x509.GeneralName;if(d.TSTInfo.superclass.constructor.call(this),this.dVersion=new a({int:1}),this.dPolicy=null,this.dMessageImprint=null,this.dSerial=null,this.dGenTime=null,this.dAccuracy=null,this.dOrdering=null,this.dNonce=null,this.dTsa=null,this.tohex=function(){var v=[this.dVersion];if(this.dPolicy==null)throw new Error("policy shall be specified.");if(v.push(this.dPolicy),this.dMessageImprint==null)throw new Error("messageImprint shall be specified.");if(v.push(this.dMessageImprint),this.dSerial==null)throw new Error("serialNumber shall be specified.");if(v.push(this.dSerial),this.dGenTime==null)throw new Error("genTime shall be specified.");v.push(this.dGenTime),this.dAccuracy!=null&&v.push(this.dAccuracy),this.dOrdering!=null&&v.push(this.dOrdering),this.dNonce!=null&&v.push(this.dNonce),this.dTsa!=null&&v.push(this.dTsa);var y=new i({array:v});return this.hTLV=y.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0){if(typeof e.policy=="string"){if(!e.policy.match(/^[0-9.]+$/))throw"policy shall be oid like 0.1.4.134";this.dPolicy=new l({oid:e.policy})}e.messageImprint!==void 0&&(this.dMessageImprint=new g(e.messageImprint)),e.serial!==void 0&&(this.dSerial=new a(e.serial)),e.genTime!==void 0&&(this.dGenTime=new u(e.genTime)),e.accuracy!==void 0&&(this.dAccuracy=new p(e.accuracy)),e.ordering!==void 0&&e.ordering==!0&&(this.dOrdering=new s),e.nonce!==void 0&&(this.dNonce=new a(e.nonce)),e.tsa!==void 0&&(this.dTsa=new f({tag:"a0",explicit:!0,obj:new w({dn:e.tsa})}))}};ge(A.asn1.tsp.TSTInfo,A.asn1.ASN1Object);A.asn1.tsp.Accuracy=function(e){var t=A,r=t.asn1,n=r.ASN1Util.newObject;r.tsp.Accuracy.superclass.constructor.call(this),this.params=null,this.tohex=function(){var i=this.params,a=[];return i.seconds!=null&&typeof i.seconds=="number"&&a.push({int:i.seconds}),i.millis!=null&&typeof i.millis=="number"&&a.push({tag:{tagi:"80",obj:{int:i.millis}}}),i.micros!=null&&typeof i.micros=="number"&&a.push({tag:{tagi:"81",obj:{int:i.micros}}}),n({seq:a}).tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.tsp.Accuracy,A.asn1.ASN1Object);A.asn1.tsp.MessageImprint=function(e){var t=A,r=t.asn1,n=r.DERSequence,i=r.DEROctetString,a=r.x509,s=a.AlgorithmIdentifier;r.tsp.MessageImprint.superclass.constructor.call(this),this.params=null,this.tohex=function(){var u=this.params,l=new s({name:u.alg}),f=new i({hex:u.hash}),d=new n({array:[l,f]});return d.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.tsp.MessageImprint,A.asn1.ASN1Object);A.asn1.tsp.TimeStampReq=function(e){var t=A,r=t.asn1,n=r.DERSequence,i=r.DERInteger,a=r.DERBoolean,s=r.ASN1Object,u=r.DERObjectIdentifier,l=r.tsp,f=l.MessageImprint;l.TimeStampReq.superclass.constructor.call(this),this.params=null,this.tohex=function(){var d=this.params,g=[];g.push(new i({int:1})),d.messageImprint instanceof A.asn1.ASN1Object?g.push(d.messageImprint):g.push(new f(d.messageImprint)),d.policy!=null&&g.push(new u(d.policy)),d.nonce!=null&&g.push(new i(d.nonce)),d.certreq==!0&&g.push(new a);var p=new n({array:g});return p.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.tsp.TimeStampReq,A.asn1.ASN1Object);A.asn1.tsp.TimeStampResp=function(e){var t=A,r=t.asn1,n=r.DERSequence,i=r.ASN1Object,a=r.tsp,s=a.PKIStatusInfo;a.TimeStampResp.superclass.constructor.call(this),this.params=null,this.tohex=function(){var u=this.params,l=[];if(u.econtent!=null||u.tst!=null)if(u.statusinfo!=null?l.push(new s(u.statusinfo)):l.push(new s("granted")),u.econtent!=null)l.push(new a.TimeStampToken(u).getContentInfo());else if(u.tst instanceof r.ASN1Object)l.push(u.tst);else throw new Error("improper member tst value");else if(u.statusinfo!=null)l.push(new s(u.statusinfo));else throw new Error("parameter for token nor statusinfo not specified");var f=new n({array:l});return f.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.tsp.TimeStampResp,A.asn1.ASN1Object);A.asn1.tsp.PKIStatusInfo=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSequence,a=n.tsp,s=a.PKIStatus,u=a.PKIFreeText,l=a.PKIFailureInfo;a.PKIStatusInfo.superclass.constructor.call(this),this.params=null,this.tohex=function(){var f=this.params,d=[];if(typeof f=="string")d.push(new s(f));else{if(f.status==null)throw new t("property 'status' unspecified");d.push(new s(f.status)),f.statusstr!=null&&d.push(new u(f.statusstr)),f.failinfo!=null&&d.push(new l(f.failinfo))}var g=new i({array:d});return g.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.tsp.PKIStatusInfo,A.asn1.ASN1Object);A.asn1.tsp.PKIStatus=function(e){var t=Error,r=A,n=r.asn1,i=n.DERInteger,a=n.tsp;a.PKIStatus.superclass.constructor.call(this);var s={granted:0,grantedWithMods:1,rejection:2,waiting:3,revocationWarning:4,revocationNotification:5};this.params=null,this.tohex=function(){var u=this.params,l,f;if(typeof u=="string")try{f=s[u]}catch{throw new t("undefined name: "+u)}else if(typeof u=="number")f=u;else throw new t("unsupported params");return new i({int:f}).tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.tsp.PKIStatus,A.asn1.ASN1Object);A.asn1.tsp.PKIFreeText=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSequence,a=n.DERUTF8String,s=n.tsp;s.PKIFreeText.superclass.constructor.call(this),this.params=null,this.tohex=function(){var u=this.params;if(!u instanceof Array)throw new t("wrong params: not array");for(var l=[],f=0;f<u.length;f++)l.push(new a({str:u[f]}));var d=new i({array:l});return d.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.tsp.PKIFreeText,A.asn1.ASN1Object);A.asn1.tsp.PKIFailureInfo=function(e){var t=Error,r=A,n=r.asn1,i=n.DERBitString,a=n.tsp,s=a.PKIFailureInfo,u={badAlg:0,badRequest:2,badDataFormat:5,timeNotAvailable:14,unacceptedPolicy:15,unacceptedExtension:16,addInfoNotAvailable:17,systemFailure:25};s.superclass.constructor.call(this),this.params=null,this.getBinValue=function(){var l=this.params,f=0;if(typeof l=="number"&&0<=l&&l<=25){f|=1<<l;for(var d=f.toString(2),g="",p=d.length-1;p>=0;p--)g+=d[p];return g}else{if(typeof l=="string"&&u[l]!=null)return E0([l],u);if(typeof l=="object"&&l.length!=null)return E0(l,u);throw new t("wrong params")}},this.tohex=function(){var l=this.params,f=this.getBinValue();return new i({bin:f}).tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.tsp.PKIFailureInfo,A.asn1.ASN1Object);A.asn1.tsp.AbstractTSAAdapter=function(e){this.getTSTHex=function(t,r){throw"not implemented yet"}};A.asn1.tsp.SimpleTSAAdapter=function(e){var t=A,r=t.asn1,n=r.tsp,i=t.crypto.Util.hashHex;n.SimpleTSAAdapter.superclass.constructor.call(this),this.params=null,this.serial=0,this.getTSTHex=function(a,s){var u=i(a,s);this.params.econtent.content.messageImprint={alg:s,hash:u},this.params.econtent.content.serial={int:this.serial++};var l=Math.floor(Math.random()*1e9);this.params.econtent.content.nonce={int:l};var f=new n.TimeStampToken(this.params);return f.getContentInfoEncodedHex()},e!==void 0&&(this.params=e)};ge(A.asn1.tsp.SimpleTSAAdapter,A.asn1.tsp.AbstractTSAAdapter);A.asn1.tsp.FixedTSAAdapter=function(e){var t=A,r=t.asn1,n=r.tsp,i=t.crypto.Util.hashHex;n.FixedTSAAdapter.superclass.constructor.call(this),this.params=null,this.getTSTHex=function(a,s){var u=i(a,s);this.params.econtent.content.messageImprint={alg:s,hash:u};var l=new n.TimeStampToken(this.params);return l.getContentInfoEncodedHex()},e!==void 0&&(this.params=e)};ge(A.asn1.tsp.FixedTSAAdapter,A.asn1.tsp.AbstractTSAAdapter);A.asn1.tsp.TSPUtil=new function(){};A.asn1.tsp.TSPUtil.newTimeStampToken=function(e){return new A.asn1.tsp.TimeStampToken(e)};A.asn1.tsp.TSPUtil.parseTimeStampReq=function(e){var t=new A.asn1.tsp.TSPParser;return t.getTimeStampReq(e)};A.asn1.tsp.TSPUtil.parseMessageImprint=function(e){var t=new A.asn1.tsp.TSPParser;return t.getMessageImprint(e)};A.asn1.tsp.TSPParser=function(){var e=Error,t=Xe,r=new t,n=_e,i=n.getV,a=n.getTLV,s=n.getIdxbyList,u=n.getTLVbyListEx,l=n.getChildIdx,f=["granted","grantedWithMods","rejection","waiting","revocationWarning","revocationNotification"],d={0:"badAlg",2:"badRequest",5:"badDataFormat",14:"timeNotAvailable",15:"unacceptedPolicy",16:"unacceptedExtension",17:"addInfoNotAvailable",25:"systemFailure"};this.getResponse=function(g){var p=l(g,0);if(p.length==1)return this.getPKIStatusInfo(a(g,p[0]));if(p.length>1){var h=this.getPKIStatusInfo(a(g,p[0])),w=a(g,p[1]),v=this.getToken(w);return v.statusinfo=h,v}},this.getToken=function(g){var p=new A.asn1.cms.CMSParser,h=p.getCMSSignedData(g);return this.setTSTInfo(h),h},this.setTSTInfo=function(g){var p=g.econtent;if(p.type=="tstinfo"){var h=p.content.hex,w=this.getTSTInfo(h);p.content=w}},this.getTSTInfo=function(g){var p={},h=l(g,0),w=i(g,h[1]);p.policy=B0(w);var v=a(g,h[2]);p.messageImprint=this.getMessageImprint(v);var y=i(g,h[3]);p.serial={hex:y};var m=i(g,h[4]);p.genTime={str:Yt(m)};var b=0;if(h.length>5&&g.substr(h[5],2)=="30"){var D=a(g,h[5]);p.accuracy=this.getAccuracy(D),b++}if(h.length>5+b&&g.substr(h[5+b],2)=="01"){var C=i(g,h[5+b]);C=="ff"&&(p.ordering=!0),b++}if(h.length>5+b&&g.substr(h[5+b],2)=="02"){var F=i(g,h[5+b]);p.nonce={hex:F},b++}if(h.length>5+b&&g.substr(h[5+b],2)=="a0"){var L=a(g,h[5+b]);L="30"+L.substr(2),pGeneralNames=r.getGeneralNames(L);var N=pGeneralNames[0].dn;p.tsa=N,b++}if(h.length>5+b&&g.substr(h[5+b],2)=="a1"){var S=a(g,h[5+b]);S="30"+S.substr(2);var B=r.getExtParamArray(S);p.ext=B,b++}return p},this.getAccuracy=function(g){for(var p={},h=l(g,0),w=0;w<h.length;w++){var v=g.substr(h[w],2),y=i(g,h[w]),m=parseInt(y,16);v=="02"?p.seconds=m:v=="80"?p.millis=m:v=="81"&&(p.micros=m)}return p},this.getMessageImprint=function(g){if(g.substr(0,2)!="30")throw new Error("head of messageImprint hex shall be x30");var p={},h=l(g,0),w=s(g,0,[0,0]),v=i(g,w),y=n.hextooidstr(v),m=A.asn1.x509.OID.oid2name(y);if(m=="")throw new Error("hashAlg name undefined: "+y);var b=m,D=s(g,0,[1]);return p.alg=b,p.hash=i(g,D),p},this.getPKIStatusInfo=function(g){var p={},h=l(g,0),w=0;try{var v=i(g,h[0]),y=parseInt(v,16);p.status=f[y]}catch{}if(h.length>1&&g.substr(h[1],2)=="30"){var m=a(g,h[1]);p.statusstr=this.getPKIFreeText(m),w++}if(h.length>w&&g.substr(h[1+w],2)=="03"){var b=a(g,h[1+w]);p.failinfo=this.getPKIFailureInfo(b)}return p},this.getPKIFreeText=function(g){for(var p=[],h=l(g,0),w=0;w<h.length;w++)p.push(n.getString(g,h[w]));return p},this.getPKIFailureInfo=function(g){var p=n.getInt(g,0);return d[p]!=null?d[p]:p},this.getTimeStampReq=function(g){var p={};p.certreq=!1;var h=l(g,0);if(h.length<2)throw new Error("TimeStampReq must have at least 2 items");var w=a(g,h[1]);p.messageImprint=A.asn1.tsp.TSPUtil.parseMessageImprint(w);for(var v=2;v<h.length;v++){var y=h[v],m=g.substr(y,2);if(m=="06"){var b=i(g,y);p.policy=n.hextooidstr(b)}m=="02"&&(p.nonce=i(g,y)),m=="01"&&(p.certreq=!0)}return p}};(typeof A>"u"||!A)&&(A={});(typeof A.asn1>"u"||!A.asn1)&&(A.asn1={});(typeof A.asn1.cades>"u"||!A.asn1.cades)&&(A.asn1.cades={});A.asn1.cades.SignaturePolicyIdentifier=function(e){var t=A,r=t.asn1,n=r.cades,i=n.SignaturePolicyId;n.SignaturePolicyIdentifier.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.15",this.params=null,this.getValueArray=function(){return[new i(this.params)]},this.setByParam=function(a){this.params=a},e!=null&&this.setByParam(e)};ge(A.asn1.cades.SignaturePolicyIdentifier,A.asn1.cms.Attribute);A.asn1.cades.SignaturePolicyId=function(e){var t=A,r=t.asn1,n=r.DERSequence,i=r.DERObjectIdentifier,a=r.x509,s=a.AlgorithmIdentifier,u=r.cades,l=u.SignaturePolicyId,f=u.OtherHashAlgAndValue;l.superclass.constructor.call(this),this.params=null,this.tohex=function(){var d=this.params,g=[];g.push(new i(d.oid)),g.push(new f(d));var p=new n({array:g});return p.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(d){this.params=d},e!=null&&this.setByParam(e)};ge(A.asn1.cades.SignaturePolicyId,A.asn1.ASN1Object);A.asn1.cades.OtherHashAlgAndValue=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSequence,a=n.DEROctetString,s=n.x509,u=s.AlgorithmIdentifier,l=n.cades,f=l.OtherHashAlgAndValue;f.superclass.constructor.call(this),this.params=null,this.tohex=function(){var d=this.params;if(d.alg==null)throw new t("property 'alg' not specified");if(d.hash==null&&d.cert==null)throw new t("property 'hash' nor 'cert' not specified");var g=null;if(d.hash!=null)g=d.hash;else if(d.cert!=null){if(typeof d.cert!="string")throw new t("cert not string");var p=d.cert;d.cert.indexOf("-----BEGIN")!=-1&&(p=yr(d.cert)),g=A.crypto.Util.hashHex(p,d.alg)}var h=[];h.push(new u({name:d.alg})),h.push(new a({hex:g}));var w=new i({array:h});return w.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cades.OtherHashAlgAndValue,A.asn1.ASN1Object);A.asn1.cades.OtherHashValue=function(e){A.asn1.cades.OtherHashValue.superclass.constructor.call(this);var t=Error,r=A,n=r.lang.String.isHex,i=r.asn1,a=i.DEROctetString,s=r.crypto.Util.hashHex;this.params=null,this.tohex=function(){var u=this.params;if(u.hash==null&&u.cert==null)throw new t("hash or cert not specified");var l=null;if(u.hash!=null)l=u.hash;else if(u.cert!=null){if(typeof u.cert!="string")throw new t("cert not string");var f=u.cert;u.cert.indexOf("-----BEGIN")!=-1&&(f=yr(u.cert)),l=A.crypto.Util.hashHex(f,"sha1")}return new a({hex:l}).tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cades.OtherHashValue,A.asn1.ASN1Object);A.asn1.cades.SignatureTimeStamp=function(e){var t=Error,r=A,n=r.lang.String.isHex,i=r.asn1,a=i.ASN1Object,s=i.x509,u=i.cades;u.SignatureTimeStamp.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.14",this.params=null,this.getValueArray=function(){var l=this.params;if(l.tst!=null)if(n(l.tst)){var f=new a;return f.hTLV=l.tst,[f]}else{if(l.tst instanceof a)return[l.tst];throw new t("params.tst has wrong value")}else if(l.res!=null){var d=l.res;if(d instanceof a&&(d=d.tohex()),typeof d!="string"||!n(d))throw new t("params.res has wrong value");var g=_e.getTLVbyList(d,0,[1]),f=new a;return f.hTLV=l.tst,[f]}},e!=null&&this.setByParam(e)};ge(A.asn1.cades.SignatureTimeStamp,A.asn1.cms.Attribute);A.asn1.cades.CompleteCertificateRefs=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSequence,a=n.cades,s=a.OtherCertID,u=r.lang.String.isHex;a.CompleteCertificateRefs.superclass.constructor.call(this),this.typeOid="1.2.840.113549.1.9.16.2.21",this.params=null,this.getValueArray=function(){for(var l=this.params,f=[],d=0;d<l.array.length;d++){var g=l.array[d];if(typeof g=="string")if(g.indexOf("-----BEGIN")!=-1)g={cert:g};else if(u(g))g={hash:g};else throw new t("unsupported value: "+g);l.alg!=null&&g.alg==null&&(g.alg=l.alg),l.hasis!=null&&g.hasis==null&&(g.hasis=l.hasis);var p=new s(g);f.push(p)}var h=new i({array:f});return[h]},e!=null&&this.setByParam(e)};ge(A.asn1.cades.CompleteCertificateRefs,A.asn1.cms.Attribute);A.asn1.cades.OtherCertID=function(e){var t=A,r=t.asn1,n=r.DERSequence,i=r.cms,a=i.IssuerSerial,s=r.cades,u=s.OtherHashValue,l=s.OtherHashAlgAndValue;s.OtherCertID.superclass.constructor.call(this),this.params=e,this.tohex=function(){var f=this.params;typeof f=="string"&&(f.indexOf("-----BEGIN")!=-1?f={cert:f}:_isHex(f)&&(f={hash:f}));var d=[],g=null;if(f.alg!=null?g=new l(f):g=new u(f),d.push(g),f.cert!=null&&f.hasis==!0||f.issuer!=null&&f.serial!=null){var p=new a(f);d.push(p)}var h=new n({array:d});return h.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cades.OtherCertID,A.asn1.ASN1Object);A.asn1.cades.OtherHash=function(e){var t=Error,r=A,n=r.asn1,i=n.cms,a=n.cades,s=a.OtherHashAlgAndValue,u=a.OtherHashValue,l=r.crypto.Util.hashHex,f=r.lang.String.isHex;a.OtherHash.superclass.constructor.call(this),this.params=null,this.tohex=function(){var d=this.params;typeof d=="string"&&(d.indexOf("-----BEGIN")!=-1?d={cert:d}:f(d)&&(d={hash:d}));var g=null;return d.alg!=null?g=new s(d):g=new u(d),g.tohex()},this.getEncodedHex=function(){return this.tohex()},e!=null&&this.setByParam(e)};ge(A.asn1.cades.OtherHash,A.asn1.ASN1Object);A.asn1.cades.CAdESUtil=new function(){};A.asn1.cades.CAdESUtil.parseSignedDataForAddingUnsigned=function(e){var t=new A.asn1.cms.CMSParser,r=t.getCMSSignedData(e);return r};A.asn1.cades.CAdESUtil.parseSignerInfoForAddingUnsigned=function(e,t,r){var n=_e,i=n.getChildIdx,a=n.getTLV,s=n.getV,u=A,l=u.asn1,f=l.ASN1Object,d=l.cms,g=d.AttributeList,p=d.SignerInfo,h={},w=i(e,t);if(w.length!=6)throw"not supported items for SignerInfo (!=6)";var v=w.shift();h.version=a(e,v);var y=w.shift();h.si=a(e,y);var m=w.shift();h.digalg=a(e,m);var b=w.shift();h.sattrs=a(e,b);var D=w.shift();h.sigalg=a(e,D);var C=w.shift();h.sig=a(e,C),h.sigval=s(e,C);var F=null;return h.obj=new p,F=new f,F.hTLV=h.version,h.obj.dCMSVersion=F,F=new f,F.hTLV=h.si,h.obj.dSignerIdentifier=F,F=new f,F.hTLV=h.digalg,h.obj.dDigestAlgorithm=F,F=new f,F.hTLV=h.sattrs,h.obj.dSignedAttrs=F,F=new f,F.hTLV=h.sigalg,h.obj.dSigAlg=F,F=new f,F.hTLV=h.sig,h.obj.dSig=F,h.obj.dUnsignedAttrs=new g,h};(typeof A.asn1.csr>"u"||!A.asn1.csr)&&(A.asn1.csr={});A.asn1.csr.CertificationRequest=function(e){var t=A,r=t.asn1,n=r.DERBitString,i=r.DERSequence,a=r.csr,s=r.x509,u=a.CertificationRequestInfo;a.CertificationRequest.superclass.constructor.call(this),this.setByParam=function(l){this.params=l},this.sign=function(){var l=new u(this.params).tohex(),f=new A.crypto.Signature({alg:this.params.sigalg});f.init(this.params.sbjprvkey),f.updateHex(l);var d=f.sign();this.params.sighex=d},this.getPEM=function(){return Mn(this.tohex(),"CERTIFICATE REQUEST")},this.tohex=function(){var l=this.params,f=new A.asn1.csr.CertificationRequestInfo(this.params),d=new A.asn1.x509.AlgorithmIdentifier({name:l.sigalg});if(l.sighex==null&&l.sbjprvkey!=null&&this.sign(),l.sighex==null)throw new Error("sighex or sbjprvkey parameter not defined");var g=new n({hex:"00"+l.sighex}),p=new i({array:[f,d,g]});return p.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.csr.CertificationRequest,A.asn1.ASN1Object);A.asn1.csr.CertificationRequestInfo=function(e){var t=A,r=t.asn1,n=r.DERBitString,i=r.DERSequence,a=r.DERInteger,s=r.DERUTF8String,u=r.DERTaggedObject,l=r.ASN1Util.newObject,f=r.csr,d=r.x509,g=d.X500Name,p=d.Extensions,h=d.SubjectPublicKeyInfo,w=f.AttributeList;f.CertificationRequestInfo.superclass.constructor.call(this),this.params=null,this.setByParam=function(y){y!=null&&(this.params=y)},this.tohex=function(){var y=this.params,m=[];if(m.push(new a({int:0})),m.push(new g(y.subject)),m.push(new h(Et.getKey(y.sbjpubkey))),y.attrs!=null){var b=v(y.attrs),D=l({tag:{tage:"a0",obj:b}});m.push(D)}else if(y.extreq!=null){var C=new p(y.extreq),D=l({tag:{tage:"a0",obj:{seq:[{oid:"1.2.840.113549.1.9.14"},{set:[C]}]}}});m.push(D)}else m.push(new u({tag:"a0",explicit:!1,obj:new s({str:""})}));var F=new i({array:m});return F.tohex()},this.getEncodedHex=function(){return this.tohex()};function v(y){for(var m=Error,b=A.asn1.x509.Extensions,D=[],C=0;C<y.length;C++){var F=y[C],L=F.attr;if(L=="extensionRequest"){var N=new b(F.ext),S={seq:[{oid:"1.2.840.113549.1.9.14"},{set:[N]}]};D.push(S)}else if(L=="unstructuredName"){var S={seq:[{oid:"1.2.840.113549.1.9.2"},{set:F.names}]};D.push(S)}else if(L=="challengePassword"){var S={seq:[{oid:"1.2.840.113549.1.9.7"},{set:[{utf8str:F.password}]}]};D.push(S)}else throw new m("unknown CSR attribute")}return{set:D}}e!=null&&this.setByParam(e)};ge(A.asn1.csr.CertificationRequestInfo,A.asn1.ASN1Object);A.asn1.csr.AttributeList=function(e){function t(r){}};ge(A.asn1.csr.AttributeList,A.asn1.ASN1Object);A.asn1.csr.CSRUtil=new function(){};A.asn1.csr.CSRUtil.newCSRPEM=function(e){var t=Et,r=A.asn1.csr,n=new r.CertificationRequest(e),i=n.getPEM();return i};A.asn1.csr.CSRUtil.getParam=function(e,t){var r=_e,n=r.getV,i=r.getIdxbyList,a=r.getTLVbyList,s=r.getTLVbyListEx,u=r.getVbyListEx,l=function(b){var D=i(b,0,[0,3,0,0],"06");return n(b,D)!="2a864886f70d01090e"?null:a(b,0,[0,3,0,1,0],"30")},f={};if(e.indexOf("-----BEGIN CERTIFICATE REQUEST")==-1)throw new Error("argument is not PEM file");var d=yr(e,"CERTIFICATE REQUEST");t&&(f.tbs=a(d,0,[0]));try{var g=s(d,0,[0,1]);if(g=="3000")f.subject={};else{var v=new Xe;f.subject=v.getX500Name(g)}}catch{}var p=s(d,0,[0,2]),h=Et.getKey(p,null,"pkcs8pub");f.sbjpubkey=Et.getPEM(h,"PKCS8PUB");var w=l(d),v=new Xe;w!=null&&(f.extreq=v.getExtParamArray(w));try{var y=s(d,0,[1],"30"),v=new Xe;f.sigalg=v.getAlgorithmIdentifierName(y)}catch{}try{var m=u(d,0,[2]);f.sighex=m}catch{}return f};A.asn1.csr.CSRUtil.verifySignature=function(e){try{var t=null;if(typeof e=="string"&&e.indexOf("-----BEGIN CERTIFICATE REQUEST")!=-1?t=A.asn1.csr.CSRUtil.getParam(e,!0):typeof e=="object"&&e.sbjpubkey!=null&&e.sigalg!=null&&e.sighex!=null&&e.tbs!=null&&(t=e),t==null)return!1;var r=new A.crypto.Signature({alg:t.sigalg});return r.init(t.sbjpubkey),r.updateHex(t.tbs),r.verify(t.sighex)}catch(n){return alert(n),!1}};(typeof A>"u"||!A)&&(A={});(typeof A.asn1>"u"||!A.asn1)&&(A.asn1={});(typeof A.asn1.ocsp>"u"||!A.asn1.ocsp)&&(A.asn1.ocsp={});A.asn1.ocsp.DEFAULT_HASH="sha1";A.asn1.ocsp.OCSPResponse=function(e){A.asn1.ocsp.OCSPResponse.superclass.constructor.call(this);var t=A.asn1.DEREnumerated,r=A.asn1.ASN1Util.newObject,n=A.asn1.ocsp.ResponseBytes,i=["successful","malformedRequest","internalError","tryLater","_not_used_","sigRequired","unauthorized"];this.params=null,this._getStatusCode=function(){var a=this.params.resstatus;return typeof a=="number"?a:typeof a!="string"?-1:i.indexOf(a)},this.setByParam=function(a){this.params=a},this.tohex=function(){var a=this.params,s=this._getStatusCode();if(s==-1)throw new Error("responseStatus not supported: "+a.resstatus);if(s!=0)return r({seq:[{enum:{int:s}}]}).tohex();var u=new n(a);return r({seq:[{enum:{int:0}},{tag:{tag:"a0",explicit:!0,obj:u}}]}).tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.ocsp.OCSPResponse,A.asn1.ASN1Object);A.asn1.ocsp.ResponseBytes=function(e){A.asn1.ocsp.ResponseBytes.superclass.constructor.call(this);var t=A.asn1,r=t.DERSequence,n=t.DERObjectIdentifier,i=t.DEROctetString,a=t.ocsp.BasicOCSPResponse;this.params=null,this.setByParam=function(s){this.params=s},this.tohex=function(){var s=this.params;if(s.restype!="ocspBasic")throw new Error("not supported responseType: "+s.restype);var u=new a(s),l=[];l.push(new n({name:"ocspBasic"})),l.push(new i({hex:u.tohex()}));var f=new r({array:l});return f.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.ocsp.ResponseBytes,A.asn1.ASN1Object);A.asn1.ocsp.BasicOCSPResponse=function(e){A.asn1.ocsp.BasicOCSPResponse.superclass.constructor.call(this);var t=Error,r=A.asn1,n=r.ASN1Object,i=r.DERSequence,a=r.DERGeneralizedTime,s=r.DERTaggedObject,u=r.DERBitString,l=r.x509.Extensions,f=r.x509.AlgorithmIdentifier,d=r.ocsp,g=d.ResponderID;_SingleResponseList=d.SingleResponseList,_ResponseData=d.ResponseData,this.params=null,this.setByParam=function(p){this.params=p},this.sign=function(){var p=this.params,h=p.tbsresp.tohex(),w=new A.crypto.Signature({alg:p.sigalg});w.init(p.reskey),w.updateHex(h),p.sighex=w.sign()},this.tohex=function(){var p=this.params;p.tbsresp==null&&(p.tbsresp=new _ResponseData(p)),p.sighex==null&&p.reskey!=null&&this.sign();var h=[];if(h.push(p.tbsresp),h.push(new f({name:p.sigalg})),h.push(new u({hex:"00"+p.sighex})),p.certs!=null&&p.certs.length!=null){for(var w=[],v=0;v<p.certs.length;v++){var y=p.certs[v],m=null;if(_e.isASN1HEX(y))m=y;else if(y.match(/-----BEGIN/))m=yr(y);else throw new t("certs["+v+"] not hex or PEM");w.push(new n({tlv:m}))}var b=new i({array:w});h.push(new s({tag:"a0",explicit:!0,obj:b}))}var D=new i({array:h});return D.tohex()},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.ocsp.BasicOCSPResponse,A.asn1.ASN1Object);A.asn1.ocsp.ResponseData=function(e){A.asn1.ocsp.ResponseData.superclass.constructor.call(this);var t=Error,r=A.asn1,n=r.DERSequence,i=r.DERGeneralizedTime,a=r.DERTaggedObject,s=r.x509.Extensions,u=r.ocsp,l=u.ResponderID;_SingleResponseList=u.SingleResponseList,this.params=null,this.tohex=function(){var f=this.params;f.respid!=null&&new t("respid not specified"),f.prodat!=null&&new t("prodat not specified"),f.array!=null&&new t("array not specified");var d=[];if(d.push(new l(f.respid)),d.push(new i(f.prodat)),d.push(new _SingleResponseList(f.array)),f.ext!=null){var g=new s(f.ext);d.push(new a({tag:"a1",explicit:!0,obj:g}))}var p=new n({array:d});return p.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(f){this.params=f},e!==void 0&&this.setByParam(e)};ge(A.asn1.ocsp.ResponseData,A.asn1.ASN1Object);A.asn1.ocsp.ResponderID=function(e){A.asn1.ocsp.ResponderID.superclass.constructor.call(this);var t=A,r=t.asn1,n=r.ASN1Util.newObject,i=r.x509.X500Name,a=t.lang.String.isHex,s=Error;this.params=null,this.tohex=function(){var u=this.params;if(u.key!=null){var l=null;if(typeof u.key=="string"){if(a(u.key)&&(l=u.key),u.key.match(/-----BEGIN CERTIFICATE/)){var f=new Xe(u.key),d=f.getExtSubjectKeyIdentifier();d!=null&&(l=d.kid.hex)}}else if(u.key instanceof Xe){var d=u.key.getExtSubjectKeyIdentifier();d!=null&&(l=d.kid.hex)}if(l==null)throw new s("wrong key member value");var g=n({tag:{tag:"a2",explicit:!0,obj:{octstr:{hex:l}}}});return g.tohex()}else if(u.name!=null){var p=null;if(typeof u.name=="string"&&u.name.match(/-----BEGIN CERTIFICATE/)){var f=new Xe(u.name);p=f.getSubject()}else u.name instanceof Xe?p=u.name.getSubject():typeof u.name=="object"&&(u.name.array!=null||u.name.str!=null)&&(p=u.name);if(p==null)throw new s("wrong name member value");var g=n({tag:{tag:"a1",explicit:!0,obj:new i(p)}});return g.tohex()}throw new s("key or name not specified")},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(u){this.params=u},e!==void 0&&this.setByParam(e)};ge(A.asn1.ocsp.ResponderID,A.asn1.ASN1Object);A.asn1.ocsp.SingleResponseList=function(e){A.asn1.ocsp.SingleResponseList.superclass.constructor.call(this);var t=A.asn1,r=t.DERSequence,n=t.ocsp.SingleResponse;this.params=null,this.tohex=function(){var i=this.params;if(typeof i!="object"||i.length==null)throw new Error("params not specified properly");for(var a=[],s=0;s<i.length;s++)a.push(new n(i[s]));var u=new r({array:a});return u.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(i){this.params=i},e!==void 0&&this.setByParam(e)};ge(A.asn1.ocsp.SingleResponseList,A.asn1.ASN1Object);A.asn1.ocsp.SingleResponse=function(e){var t=Error,r=A,n=r.asn1,i=n.DERSequence,a=n.DERGeneralizedTime,s=n.DERTaggedObject,u=n.ocsp,l=u.CertID,f=u.CertStatus,d=n.x509,g=d.Extensions;u.SingleResponse.superclass.constructor.call(this),this.params=null,this.tohex=function(){var p=this.params,h=[];if(p.certid==null)throw new t("certid unspecified");if(p.status==null)throw new t("status unspecified");if(p.thisupdate==null)throw new t("thisupdate unspecified");if(h.push(new l(p.certid)),h.push(new f(p.status)),h.push(new a(p.thisupdate)),p.nextupdate!=null){var w=new a(p.nextupdate);h.push(new s({tag:"a0",explicit:!0,obj:w}))}if(p.ext!=null){var v=new g(p.ext);h.push(new s({tag:"a1",explicit:!0,obj:v}))}var y=new i({array:h});return y.tohex()},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(p){this.params=p},e!==void 0&&this.setByParam(e)};ge(A.asn1.ocsp.SingleResponse,A.asn1.ASN1Object);A.asn1.ocsp.CertID=function(e){var t=A,r=t.asn1,n=r.DEROctetString,i=r.DERInteger,a=r.DERSequence,s=r.x509,u=s.AlgorithmIdentifier,l=r.ocsp,f=l.DEFAULT_HASH,d=t.crypto,g=d.Util.hashHex,p=Xe,h=_e,w=h.getVbyList;l.CertID.superclass.constructor.call(this),this.DEFAULT_HASH="sha1",this.params=null,this.setByValue=function(v,y,m,b){b==null&&(b=this.DEFAULT_HASH),this.params={alg:b,issname:v,isskey:y,sbjsn:m}},this.setByCert=function(v,y,m){m==null&&(m=this.DEFAULT_HASH),this.params={alg:m,issuerCert:v,subjectCert:y}},this.getParamByCerts=function(v,y,m){m==null&&(m=this.DEFAULT_HASH);var b=new p(v),D=new p(y),C=g(b.getSubjectHex(),m),F=b.getPublicKeyHex(),L=g(w(F,0,[1],"03",!0),m),N=D.getSerialNumberHex(),S={alg:m,issname:C,isskey:L,sbjsn:N};return S},this.tohex=function(){if(typeof this.params!="object")throw new Error("params not set");var v=this.params,y,m,b,D;if(v.alg==null?D=this.DEFAULT_HASH:D=v.alg,v.issuerCert!=null&&v.subjectCert!=null){var C=this.getParamByCerts(v.issuerCert,v.subjectCert,D);y=C.issname,m=C.isskey,b=C.sbjsn}else if(v.issname!=null&&v.isskey!=null&&v.sbjsn!=null)y=v.issname,m=v.isskey,b=v.sbjsn;else throw new Error("required param members not defined");var F=new u({name:D}),L=new n({hex:y}),N=new n({hex:m}),S=new i({hex:b}),B=new a({array:[F,L,N,S]});return this.hTLV=B.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&this.setByParam(e)};ge(A.asn1.ocsp.CertID,A.asn1.ASN1Object);A.asn1.ocsp.CertStatus=function(e){A.asn1.ocsp.CertStatus.superclass.constructor.call(this),this.params=null,this.tohex=function(){var t=this.params;if(t.status=="good")return"8000";if(t.status=="unknown")return"8200";if(t.status=="revoked"){var r=[{gentime:{str:t.time}}];t.reason!=null&&r.push({tag:{tag:"a0",explicit:!0,obj:{enum:{int:t.reason}}}});var n={tag:"a1",explicit:!1,obj:{seq:r}};return A.asn1.ASN1Util.newObject({tag:n}).tohex()}throw new Error("bad status")},this.getEncodedHex=function(){return this.tohex()},this.setByParam=function(t){this.params=t},e!==void 0&&this.setByParam(e)};ge(A.asn1.ocsp.CertStatus,A.asn1.ASN1Object);A.asn1.ocsp.Request=function(e){var t=A,r=t.asn1,n=r.DERSequence,i=r.ocsp;if(i.Request.superclass.constructor.call(this),this.dReqCert=null,this.dExt=null,this.tohex=function(){var s=[];if(this.dReqCert===null)throw"reqCert not set";s.push(this.dReqCert);var u=new n({array:s});return this.hTLV=u.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},typeof e<"u"){var a=new i.CertID(e);this.dReqCert=a}};ge(A.asn1.ocsp.Request,A.asn1.ASN1Object);A.asn1.ocsp.TBSRequest=function(e){var t=A,r=t.asn1,n=r.DERSequence,i=r.ocsp;i.TBSRequest.superclass.constructor.call(this),this.version=0,this.dRequestorName=null,this.dRequestList=[],this.dRequestExt=null,this.setRequestListByParam=function(a){for(var s=[],u=0;u<a.length;u++){var l=new i.Request(a[0]);s.push(l)}this.dRequestList=s},this.tohex=function(){var a=[];if(this.version!==0)throw"not supported version: "+this.version;if(this.dRequestorName!==null)throw"requestorName not supported";var s=new n({array:this.dRequestList});if(a.push(s),this.dRequestExt!==null)throw"requestExtensions not supported";var u=new n({array:a});return this.hTLV=u.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&e.reqList!==void 0&&this.setRequestListByParam(e.reqList)};ge(A.asn1.ocsp.TBSRequest,A.asn1.ASN1Object);A.asn1.ocsp.OCSPRequest=function(e){var t=A,r=t.asn1,n=r.DERSequence,i=r.ocsp;if(i.OCSPRequest.superclass.constructor.call(this),this.dTbsRequest=null,this.dOptionalSignature=null,this.tohex=function(){var s=[];if(this.dTbsRequest!==null)s.push(this.dTbsRequest);else throw"tbsRequest not set";if(this.dOptionalSignature!==null)throw"optionalSignature not supported";var u=new n({array:s});return this.hTLV=u.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},e!==void 0&&e.reqList!==void 0){var a=new i.TBSRequest(e);this.dTbsRequest=a}};ge(A.asn1.ocsp.OCSPRequest,A.asn1.ASN1Object);A.asn1.ocsp.OCSPUtil={};A.asn1.ocsp.OCSPUtil.getRequestHex=function(e,t,r){var n=A,i=n.asn1,a=i.ocsp;r===void 0&&(r=a.DEFAULT_HASH);var s={alg:r,issuerCert:e,subjectCert:t},u=new a.OCSPRequest({reqList:[s]});return u.tohex()};A.asn1.ocsp.OCSPUtil.getOCSPResponseInfo=function(e){var t=_e,r=t.getVbyList,n=t.getVbyListEx,i=t.getIdxbyList,a=t.getIdxbyListEx,s=t.getV,u={};try{var l=n(e,0,[0],"0a");u.responseStatus=parseInt(l,16)}catch{}if(u.responseStatus!==0)return u;try{var f=i(e,0,[1,0,1,0,0,2,0,1]);e.substr(f,2)==="80"?u.certStatus="good":e.substr(f,2)==="a1"?(u.certStatus="revoked",u.revocationTime=Yt(r(e,f,[0]))):e.substr(f,2)==="82"&&(u.certStatus="unknown")}catch{}try{var d=i(e,0,[1,0,1,0,0,2,0,2]);u.thisUpdate=Yt(s(e,d))}catch{}try{var g=i(e,0,[1,0,1,0,0,2,0,3]);e.substr(g,2)==="a0"&&(u.nextUpdate=Yt(r(e,g,[0])))}catch{}return u};A.asn1.ocsp.OCSPParser=function(){var e=Error,t=Xe,r=new t,n=_e,i=n.getV,a=n.getTLV,s=n.getIdxbyList,u=n.getVbyList,l=n.getTLVbyList,f=n.getVbyListEx,d=n.getTLVbyListEx,g=n.getChildIdx;this.getOCSPRequest=function(p){var h=g(p,0);if(h.length!=1&&h.length!=2)throw new e("wrong number elements: "+h.length);var w=this.getTBSRequest(a(p,h[0]));return w},this.getTBSRequest=function(p){var h={},w=d(p,0,[0],"30");h.array=this.getRequestList(w);var v=d(p,0,["[2]",0],"30");return v!=null&&(h.ext=r.getExtParamArray(v)),h},this.getRequestList=function(p){for(var h=[],w=g(p,0),v=0;v<w.length;v++){var p=a(p,w[v]);h.push(this.getRequest(p))}return h},this.getRequest=function(p){var h=g(p,0);if(h.length!=1&&h.length!=2)throw new e("wrong number elements: "+h.length);var w=this.getCertID(a(p,h[0]));if(h.length==2){var v=s(p,0,[1,0]);w.ext=r.getExtParamArray(a(p,v))}return w},this.getCertID=function(p){var h=g(p,0);if(h.length!=4)throw new e("wrong number elements: "+h.length);var w=new t,v={};return v.alg=w.getAlgorithmIdentifierName(a(p,h[0])),v.issname=i(p,h[1]),v.isskey=i(p,h[2]),v.sbjsn=i(p,h[3]),v},this.getOCSPResponse=function(p){var h=g(p,0),w,v=i(p,h[0]),y=parseInt(v);if(h.length==1)return{resstatus:y};var m=l(p,0,[1,0]);return w=this.getResponseBytes(m),w.resstatus=y,w},this.getResponseBytes=function(p){var h=g(p,0),w,v=l(p,0,[1,0]);w=this.getBasicOCSPResponse(v);var y=i(p,h[0]);return w.restype=A.asn1.x509.OID.oid2name(B0(y)),w},this.getBasicOCSPResponse=function(p){var h=g(p,0),w;w=this.getResponseData(a(p,h[0]));var v=new Xe;w.alg=v.getAlgorithmIdentifierName(a(p,h[1]));var y=i(p,h[2]);w.sighex=y.substr(2);var m=f(p,0,["[0]"]);if(m!=null){for(var b=g(m,0),D=[],C=0;C<b.length;C++){var F=a(m,b[C]);D.push(F)}w.certs=D}return w},this.getResponseData=function(p){var h=g(p,0),w=h.length,v={},y=0;p.substr(h[0],2)=="a0"&&y++,v.respid=this.getResponderID(a(p,h[y++]));var m=i(p,h[y++]);if(v.prodat=Yt(m),v.array=this.getSingleResponseList(a(p,h[y++])),p.substr(h[w-1],2)=="a1"){var b=l(p,h[w-1],[0]),D=new Xe;v.ext=D.getExtParamArray(b)}return v},this.getResponderID=function(p){var h={};if(p.substr(0,2)=="a2"){var w=u(p,0,[0]);h.key=w}if(p.substr(0,2)=="a1"){var v=l(p,0,[0]),y=new Xe;h.name=y.getX500Name(v)}return h},this.getSingleResponseList=function(p){for(var h=g(p,0),w=[],v=0;v<h.length;v++){var y=this.getSingleResponse(a(p,h[v]));w.push(y)}return w},this.getSingleResponse=function(p){var h=g(p,0),w={},v=this.getCertID(a(p,h[0]));w.certid=v;var y=this.getCertStatus(a(p,h[1]));if(w.status=y,p.substr(h[2],2)=="18"){var m=i(p,h[2]);w.thisupdate=Yt(m)}for(var b=3;b<h.length;b++){if(p.substr(h[b],2)=="a0"){var D=u(p,h[b],[0],"18");w.nextupdate=Yt(D)}if(p.substr(h[b],2)=="a1"){var C=new Xe,F=l(p,0,[b,0]);w.ext=C.getExtParamArray(F)}}return w},this.getCertStatus=function(p){var h={};if(p=="8000")return{status:"good"};if(p=="8200")return{status:"unknown"};if(p.substr(0,2)=="a1"){h.status="revoked";var w=u(p,0,[0]),v=Yt(w);h.time=v}return h}};var A;(typeof A>"u"||!A)&&(A={});(typeof A.lang>"u"||!A.lang)&&(A.lang={});A.lang.String=function(){};function n_(e){for(var t=new Array,r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}function i_(e){for(var t="",r=0;r<e.length;r++)t=t+String.fromCharCode(e[r]);return t}function _0(e){for(var t="",r=0;r<e.length;r++){var n=e[r].toString(16);n.length==1&&(n="0"+n),t=t+n}return t}function Ci(e){return _0(n_(e))}function LO(e){return ru(Ci(e))}function UO(e){return oc(ru(Ci(e)))}function jO(e){return i_(Jy(kf(e)))}function oc(e){return e=e.replace(/\=/g,""),e=e.replace(/\+/g,"-"),e=e.replace(/\//g,"_"),e}function kf(e){return e.length%4==2?e=e+"==":e.length%4==3&&(e=e+"="),e=e.replace(/-/g,"+"),e=e.replace(/_/g,"/"),e}function Qr(e){return e.length%2==1&&(e="0"+e),oc(ru(e))}function pr(e){return lc(kf(e))}var Tf,Bs;typeof Buffer=="function"?(Tf=function(e){return oc(Buffer.from(e,"utf8").toString("base64"))},Bs=function(e){return Buffer.from(kf(e),"base64").toString("utf8")}):(Tf=function(e){return Qr(F0(I0(e)))},Bs=function(e){return decodeURIComponent(S0(pr(e)))});function HO(e){return ru(F0(I0(e)))}function MO(e){return decodeURIComponent(S0(lc(e)))}function C0(e){return F0(I0(e)).toLowerCase()}function Yt(e){try{return decodeURIComponent(S0(e))}catch{return null}}function qO(e){return Yt(VO(e))}function VO(e){for(var t=e.match(/.{1,2}/g),r=[],n=0;n<t.length;n++){var i=parseInt(t[n],16);161<=i&&i<=191?(r.push("c2"),r.push(t[n])):192<=i&&i<=255?(r.push("c3"),r.push((i-64).toString(16))):r.push(t[n])}return r.join("")}function Di(e){for(var t="",r=0;r<e.length-1;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t}function ca(e){for(var t="",r=0;r<e.length;r++)t+=("0"+e.charCodeAt(r).toString(16)).slice(-2);return t}function um(e){return ru(e)}function KO(e){return D0(um(e),64)}function D0(e,t){return e=e.replace(new RegExp("(.{"+t+"})","g"),`$1\r
`),e=e.replace(/\s+$/,""),e}function s_(e){var t=e.replace(/[^0-9A-Za-z\/+=]*/g,""),r=lc(t);return r}function zO(e,t){return"-----BEGIN "+t+`-----\r
`+D0(e,64)+`\r
-----END `+t+`-----\r
`}function Mn(e,t){return"-----BEGIN "+t+`-----\r
`+D0(um(e),64)+`\r
-----END `+t+`-----\r
`}function yr(e,t){if(e.indexOf("-----BEGIN ")==-1)throw new Error("can't find PEM header");return t!==void 0?(e=e.replace(new RegExp("^[^]*-----BEGIN "+t+"-----"),""),e=e.replace(new RegExp("-----END "+t+"-----[^]*$"),"")):(e=e.replace(/^[^]*-----BEGIN [^-]+-----/,""),e=e.replace(/-----END [^-]+-----[^]*$/,"")),s_(e)}function GO(e){return e.indexOf("-----BEGIN ")==-1||e.indexOf("-----END ")==-1?null:(e=e.replace(/^[\s\S]*?-----BEGIN [^-]+-----/m,""),e=e.replace(/-----END [\s\S]+$/m,""),e=e.replace(/\s+/g,""),e.match(/^[0-9a-zA-Z+/=]+$/)?e:null)}function YO(e){if(e.length%2!=0)throw"input is not even length";if(e.match(/^[0-9A-Fa-f]+$/)==null)throw"input is not hexadecimal";for(var t=new ArrayBuffer(e.length/2),r=new DataView(t),n=0;n<e.length/2;n++)r.setUint8(n,parseInt(e.substr(n*2,2),16));return t}function WO(e){for(var t="",r=new DataView(e),n=0;n<e.byteLength;n++)t+=("00"+r.getUint8(n).toString(16)).slice(-2);return t}function om(e){var t,r,n,i,a,s,u,l,f,d,g,p;if(e=u_(e),p=e.match(/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/),p)return t=parseInt(p[1]),r=parseInt(p[2])-1,n=parseInt(p[3]),i=parseInt(p[4]),a=parseInt(p[5]),s=parseInt(p[6]),u=0,d=p[7],d!==""&&(g=(d.substr(1)+"00").substr(0,3),u=parseInt(g)),Date.UTC(t,r,n,i,a,s,u);throw new Error("unsupported zulu format: "+e)}function XO(e){var t=new Date(e),r=("0000"+t.getUTCFullYear()).slice(-4),n=("00"+(t.getUTCMonth()+1)).slice(-2),i=("00"+t.getUTCDate()).slice(-2),a=("00"+t.getUTCHours()).slice(-2),s=("00"+t.getUTCMinutes()).slice(-2),u=("00"+t.getUTCSeconds()).slice(-2),l=("000"+t.getUTCMilliseconds()).slice(-3);return l=l.replace(/0+$/,""),l=l!=""?"."+l:l,r+n+i+a+s+u+l+"Z"}function a_(e){return Math.round(om(e)/1e3)}function JO(e){return new Date(om(e))}function ZO(e,t,r){var n,i=e.getUTCFullYear();if(t){if(i<1950||2049<i)throw"not proper year for UTCTime: "+i;n=(""+i).slice(-2)}else n=("000"+i).slice(-4);if(n+=("0"+(e.getUTCMonth()+1)).slice(-2),n+=("0"+e.getUTCDate()).slice(-2),n+=("0"+e.getUTCHours()).slice(-2),n+=("0"+e.getUTCMinutes()).slice(-2),n+=("0"+e.getUTCSeconds()).slice(-2),r){var a=e.getUTCMilliseconds();a!==0&&(a=("00"+a).slice(-3),a=a.replace(/0+$/g,""),n+="."+a)}return n+="Z",n}function u_(e){return e.match(/^[0-9]{12}Z$/)||e.match(/^[0-9]{12}[.][0-9]*Z$/)?e.match(/^[0-4]/)?"20"+e:"19"+e:e}function F0(e){return e.replace(/%/g,"")}function S0(e){return e.replace(/(..)/g,"%$1")}function em(e){var t="malformed IPv6 address";if(!e.match(/^[0-9A-Fa-f:]+$/))throw t;e=e.toLowerCase();var r=e.split(":").length-1;if(r<2)throw t;var n=":".repeat(7-r+2);e=e.replace("::",n);var i=e.split(":");if(i.length!=8)throw t;for(var a=0;a<8;a++)i[a]=("0000"+i[a]).slice(-4);return i.join("")}function tm(e){if(!e.match(/^[0-9A-Fa-f]{32}$/))throw new Error("malformed IPv6 address: "+e);e=e.toLowerCase();var t=e.match(/.{1,4}/g);t=t.map(function(i){return i.replace(/^0+/,"")}),t=t.map(function(i){return i==""?"0":i}),e=":"+t.join(":")+":";var r=e.match(/:(0:){2,}/g);if(r==null)return e.slice(1,-1);var n=r.sort().slice(-1)[0];return e=e.replace(n.substr(0,n.length-1),":"),e.substr(0,2)!="::"&&(e=e.substr(1)),e.substr(-2,2)!="::"&&(e=e.substr(0,e.length-1)),e}function w0(e){var t=new Error("malformed hex value");if(!e.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw t;if(e.length==8){var r;try{return r=parseInt(e.substr(0,2),16)+"."+parseInt(e.substr(2,2),16)+"."+parseInt(e.substr(4,2),16)+"."+parseInt(e.substr(6,2),16),r}catch{throw t}}else if(e.length==16)try{return w0(e.substr(0,8))+"/"+Wy(e.substr(8))}catch{throw t}else{if(e.length==32)return tm(e);if(e.length==64){try{return tm(e.substr(0,32))+"/"+Wy(e.substr(32))}catch{throw t}return}else return e}}function Wy(e){var t=new Error("malformed mask"),r;try{r=new ee(e,16).toString(2)}catch{throw t}if(!r.match(/^1*0*$/))throw t;return r.replace(/0+$/,"").length}function lm(e){var t=new Error("malformed IP address");if(e=e.toLowerCase(e),!e.match(/^[0-9a-f.:/]+$/))throw t;if(e.match(/^[0-9.]+$/)){var r=e.split(".");if(r.length!==4)throw t;var n="";try{for(var i=0;i<4;i++){var a=parseInt(r[i]);n+=("0"+a.toString(16)).slice(-2)}return n}catch{throw t}}else if(e.match(/^[0-9.]+\/[0-9]+$/)){var s=e.split("/");return lm(s[0])+Xy(parseInt(s[1]),32)}else{if(e.match(/^[0-9a-f:]+$/)&&e.indexOf(":")!==-1)return em(e);if(e.match(/^[0-9a-f:]+\/[0-9]+$/)&&e.indexOf(":")!==-1){var s=e.split("/");return em(s[0])+Xy(parseInt(s[1]),128)}else throw t}}function Xy(e,t){if(t==32&&e==0)return"00000000";if(t==128&&e==0)return"00000000000000000000000000000000";var r=Array(e+1).join("1")+Array(t-e+1).join("0");return new ee(r,2).toString(16)}function cm(e){function t(i){var a=parseInt(i.substr(0,2),16),s=parseInt(i.substr(2),16);if(a==0&s<128)return String.fromCharCode(s);if(a<8){var u=192|(a&7)<<3|(s&192)>>6,l=128|s&63;return Yt(u.toString(16)+l.toString(16))}var u=224|(a&240)>>4,l=128|(a&15)<<2|(s&192)>>6,f=128|s&63;return Yt(u.toString(16)+l.toString(16)+f.toString(16))}var r=e.match(/.{4}/g),n=r.map(t);return n.join("")}function I0(e){for(var t=encodeURIComponent(e),r="",n=0;n<t.length;n++)t[n]=="%"?(r=r+t.substr(n,3),n=n+2):r=r+"%"+Ci(t[n]);return r}function QO(e){return e=e.replace(/\r\n/mg,`
`),e}function ek(e){return e=e.replace(/\r\n/mg,`
`),e=e.replace(/\n/mg,`\r
`),e}A.lang.String.isInteger=function(e){return e.match(/^[0-9]+$/)?!0:!!e.match(/^-[0-9]+$/)};A.lang.String.isHex=function(e){return o_(e)};function o_(e){return!!(e.length%2==0&&(e.match(/^[0-9a-f]+$/)||e.match(/^[0-9A-F]+$/)))}A.lang.String.isBase64=function(e){return e=e.replace(/\s+/g,""),!!(e.match(/^[0-9A-Za-z+\/]+={0,3}$/)&&e.length%4==0)};A.lang.String.isBase64URL=function(e){return e.match(/[+/=]/)?!1:(e=kf(e),A.lang.String.isBase64(e))};function fm(e){return!!e.match(/^[0-9A-Za-z-_.]+$/)}A.lang.String.isIntegerArray=function(e){return e=e.replace(/\s+/g,""),!!e.match(/^\[[0-9,]+\]$/)};A.lang.String.isPrintable=function(e){return e.match(/^[0-9A-Za-z '()+,-./:=?]*$/)!==null};A.lang.String.isIA5=function(e){return e.match(/^[\x20-\x21\x23-\x7f]*$/)!==null};A.lang.String.isMail=function(e){return e.match(/^[A-Za-z0-9]{1}[A-Za-z0-9_.-]*@{1}[A-Za-z0-9_.-]{1,}\.[A-Za-z0-9]{1,}$/)!==null};function rm(e){return e.length%2==1?"0"+e:e.substr(0,1)>"7"?"00"+e:e}function tk(e){e=e.replace(/^\s*\[\s*/,""),e=e.replace(/\s*\]\s*$/,""),e=e.replace(/\s*/g,"");try{var t=e.split(/,/).map(function(r,n,i){var a=parseInt(r);if(a<0||255<a)throw"integer not in range 0-255";var s=("00"+a.toString(16)).slice(-2);return s}).join("");return t}catch(r){throw"malformed integer array string: "+r}}var rk=function(e,t){var r=e.length;e.length>t.length&&(r=t.length);for(var n=0;n<r;n++)if(e.charCodeAt(n)!=t.charCodeAt(n))return n;return e.length!=t.length?r:-1};function l_(e){var t=function(u){var l=u.toString(16);return l.length==1&&(l="0"+l),l},r=function(u){var l="",f=parseInt(u,10),d=f.toString(2),g=7-d.length%7;g==7&&(g=0);for(var p="",h=0;h<g;h++)p+="0";d=p+d;for(var h=0;h<d.length-1;h+=7){var w=d.substr(h,7);h!=d.length-7&&(w="1"+w),l+=t(parseInt(w,2))}return l};try{if(!e.match(/^[0-9.]+$/))return null;var n="",i=e.split("."),a=parseInt(i[0],10)*40+parseInt(i[1],10);n+=t(a),i.splice(0,2);for(var s=0;s<i.length;s++)n+=r(i[s]);return n}catch{return null}}function B0(e){if(!o_(e))return null;try{var t=[],r=e.substr(0,2),n=parseInt(r,16);t[0]=new String(Math.floor(n/40)),t[1]=new String(n%40);for(var i=e.substr(2),a=[],s=0;s<i.length/2;s++)a.push(parseInt(i.substr(s*2,2),16));for(var u=[],l="",s=0;s<a.length;s++)a[s]&128?l=l+A0((a[s]&127).toString(2),7):(l=l+A0((a[s]&127).toString(2),7),u.push(new String(parseInt(l,2))),l="");var f=t.join(".");return u.length>0&&(f=f+"."+u.join(".")),f}catch{return null}}function c_(e){var t=new ee(String(e),10);return Nf(t)}function Nf(e){var t=e.toString(16);if(t.substr(0,1)!="-")return t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t),t;var r=t.substr(1),n=r.length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var i="",a=0;a<n;a++)i+="f";var s=new ee(i,16),u=s.xor(e).add(ee.ONE);return t=u.toString(16).replace(/^-/,""),t}var A0=function(e,t,r){return r==null&&(r="0"),e.length>=t?e:new Array(t-e.length+1).join(r)+e};function f_(e){if(e.length%2!=0||(e=e.toLowerCase(),e.match(/^[0-9a-f]+$/)==null))return-1;try{var t=e.substr(0,2);if(t=="00")return parseInt(e.substr(2),16);var r=parseInt(t,16);if(r>7)return-1;var n=e.substr(2),i=parseInt(n,16).toString(2);i=="0"&&(i="00000000"),i=i.slice(0,0-r);var a=parseInt(i,2);return a==NaN?-1:a}catch{return-1}}function h_(e){if(typeof e!="number"||e<0)return null;var t=Number(e).toString(2),r=8-t.length%8;r==8&&(r=0),t=t+A0("",r,"0");var n=parseInt(t,2).toString(16);n.length%2==1&&(n="0"+n);var i="0"+r;return i+n}function d_(e){if(typeof e!="string"||e.length%2!=0||!e.match(/^[0-9a-f]+$/))return null;try{var t=parseInt(e.substr(0,2),16);if(t<0||7<t)return null;for(var r=e.substr(2),n="",i=0;i<r.length;i+=2){var a=r.substr(i,2),s=parseInt(a,16).toString(2);s=("0000000"+s).slice(-8),n+=s}return n.substr(0,n.length-t)}catch{return null}}function nk(e){if(typeof e!="string"||e.match(/^[01]+$/)==null)return null;try{var t=parseInt(e,2);return h_(t)}catch{return null}}function E0(e,t){for(var r=0,n=0;n<e.length;n++)r|=1<<t[e[n]];for(var i=r.toString(2),a="",n=i.length-1;n>=0;n--)a+=i[n];return a}function rr(e,n,r){if(typeof e=="object"){for(var n=String(n).split("."),i=0;i<n.length&&e;i++){var a=n[i];a.match(/^[0-9]+$/)&&(a=parseInt(a)),e=e[a]}return e||e===!1?e:r}}function ge(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t)}(typeof A>"u"||!A)&&(A={});(typeof A.crypto>"u"||!A.crypto)&&(A.crypto={});A.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:Be.algo.MD5,sha1:Be.algo.SHA1,sha224:Be.algo.SHA224,sha256:Be.algo.SHA256,sha384:Be.algo.SHA384,sha512:Be.algo.SHA512,ripemd160:Be.algo.RIPEMD160},this.getDigestInfoHex=function(e,t){if(typeof this.DIGESTINFOHEAD[t]>"u")throw"alg not supported in Util.DIGESTINFOHEAD: "+t;return this.DIGESTINFOHEAD[t]+e},this.getPaddedDigestInfoHex=function(e,t,r){var n=this.getDigestInfoHex(e,t),i=r/4;if(n.length+22>i)throw"key is too short for SigAlg: keylen="+r+","+t;for(var a="0001",s="00"+n,u="",l=i-a.length-s.length,f=0;f<l;f+=2)u+="ff";var d=a+u+s;return d},this.hashString=function(e,t){var r=new A.crypto.MessageDigest({alg:t});return r.digestString(e)},this.hashHex=function(e,t){var r=new A.crypto.MessageDigest({alg:t});return r.digestHex(e)},this.sha1=function(e){return this.hashString(e,"sha1")},this.sha256=function(e){return this.hashString(e,"sha256")},this.sha256Hex=function(e){return this.hashHex(e,"sha256")},this.sha512=function(e){return this.hashString(e,"sha512")},this.sha512Hex=function(e){return this.hashHex(e,"sha512")},this.isKey=function(e){return e instanceof it||e instanceof A.crypto.DSA||e instanceof A.crypto.ECDSA}};A.crypto.Util.md5=function(e){var t=new A.crypto.MessageDigest({alg:"md5",prov:"cryptojs"});return t.digestString(e)};A.crypto.Util.ripemd160=function(e){var t=new A.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"});return t.digestString(e)};A.crypto.Util.SECURERANDOMGEN=new hc;A.crypto.Util.getRandomHexOfNbytes=function(e){var t=new Array(e);return A.crypto.Util.SECURERANDOMGEN.nextBytes(t),_0(t)};A.crypto.Util.getRandomBigIntegerOfNbytes=function(e){return new ee(A.crypto.Util.getRandomHexOfNbytes(e),16)};A.crypto.Util.getRandomHexOfNbits=function(e){var t=e%8,r=(e-t)/8,n=new Array(r+1);return A.crypto.Util.SECURERANDOMGEN.nextBytes(n),n[0]=(255<<t&255^255)&n[0],_0(n)};A.crypto.Util.getRandomBigIntegerOfNbits=function(e){return new ee(A.crypto.Util.getRandomHexOfNbits(e),16)};A.crypto.Util.getRandomBigIntegerZeroToMax=function(e){for(var t=e.bitLength();;){var r=A.crypto.Util.getRandomBigIntegerOfNbits(t);if(e.compareTo(r)!=-1)return r}};A.crypto.Util.getRandomBigIntegerMinToMax=function(e,t){var r=e.compareTo(t);if(r==1)throw"biMin is greater than biMax";if(r==0)return e;var n=t.subtract(e),i=A.crypto.Util.getRandomBigIntegerZeroToMax(n);return i.add(e)};A.crypto.MessageDigest=function(e){var t=null,r=null,n=null;this.setAlgAndProvider=function(i,a){if(i=A.crypto.MessageDigest.getCanonicalAlgName(i),i!==null&&a===void 0&&(a=A.crypto.Util.DEFAULTPROVIDER[i]),":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(i)!=-1&&a=="cryptojs"){try{this.md=A.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[i].create()}catch(s){throw"setAlgAndProvider hash alg set fail alg="+i+"/"+s}this.updateString=function(s){this.md.update(s)},this.updateHex=function(s){var u=Be.enc.Hex.parse(s);this.md.update(u)},this.digest=function(){var s=this.md.finalize();return s.toString(Be.enc.Hex)},this.digestString=function(s){return this.updateString(s),this.digest()},this.digestHex=function(s){return this.updateHex(s),this.digest()}}if(":sha256:".indexOf(i)!=-1&&a=="sjcl"){try{this.md=new sjcl.hash.sha256}catch(s){throw"setAlgAndProvider hash alg set fail alg="+i+"/"+s}this.updateString=function(s){this.md.update(s)},this.updateHex=function(s){var u=sjcl.codec.hex.toBits(s);this.md.update(u)},this.digest=function(){var s=this.md.finalize();return sjcl.codec.hex.fromBits(s)},this.digestString=function(s){return this.updateString(s),this.digest()},this.digestHex=function(s){return this.updateHex(s),this.digest()}}},this.updateString=function(i){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(i){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(i){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(i){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},e!==void 0&&e.alg!==void 0&&(this.algName=e.alg,e.prov===void 0&&(this.provName=A.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))};A.crypto.MessageDigest.getCanonicalAlgName=function(e){return typeof e=="string"&&(e=e.toLowerCase(),e=e.replace(/-/,"")),e};A.crypto.MessageDigest.getHashLength=function(e){var t=A.crypto.MessageDigest,r=t.getCanonicalAlgName(e);if(t.HASHLENGTH[r]===void 0)throw"not supported algorithm: "+e;return t.HASHLENGTH[r]};A.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20};A.crypto.Mac=function(e){var t=null,r=null,n=null,i=null,a=null;this.setAlgAndProvider=function(s,u){if(s=s.toLowerCase(),s==null&&(s="hmacsha1"),s=s.toLowerCase(),s.substr(0,4)!="hmac")throw"setAlgAndProvider unsupported HMAC alg: "+s;u===void 0&&(u=A.crypto.Util.DEFAULTPROVIDER[s]),this.algProv=s+"/"+u;var l=s.substr(4);if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(l)!=-1&&u=="cryptojs"){try{var f=A.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[l];this.mac=Be.algo.HMAC.create(f,this.pass)}catch(d){throw"setAlgAndProvider hash alg set fail hashAlg="+l+"/"+d}this.updateString=function(d){this.mac.update(d)},this.updateHex=function(d){var g=Be.enc.Hex.parse(d);this.mac.update(g)},this.doFinal=function(){var d=this.mac.finalize();return d.toString(Be.enc.Hex)},this.doFinalString=function(d){return this.updateString(d),this.doFinal()},this.doFinalHex=function(d){return this.updateHex(d),this.doFinal()}}},this.updateString=function(s){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(s){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(s){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(s){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(s){if(typeof s=="string"){var u=s;(s.length%2==1||!s.match(/^[0-9A-Fa-f]+$/))&&(u=ca(s)),this.pass=Be.enc.Hex.parse(u);return}if(typeof s!="object")throw"KJUR.crypto.Mac unsupported password type: "+s;var u=null;if(s.hex!==void 0){if(s.hex.length%2!=0||!s.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+s.hex;u=s.hex}if(s.utf8!==void 0&&(u=C0(s.utf8)),s.rstr!==void 0&&(u=ca(s.rstr)),s.b64!==void 0&&(u=lc(s.b64)),s.b64u!==void 0&&(u=pr(s.b64u)),u==null)throw"KJUR.crypto.Mac unsupported password type: "+s;this.pass=Be.enc.Hex.parse(u)},e!==void 0&&(e.pass!==void 0&&this.setPassword(e.pass),e.alg!==void 0&&(this.algName=e.alg,e.prov===void 0&&(this.provName=A.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))};A.crypto.Signature=function(e){var t=null,r=null,n=null,i=null,a=null,s=null,u=null,l=null,f=null,d=null,g=-1,p=null,h=null,w=null,v=null,y=null;if(this._setAlgNames=function(){var m=this.algName.match(/^(.+)with(.+)$/);m&&(this.mdAlgName=m[1].toLowerCase(),this.pubkeyAlgName=m[2].toLowerCase(),this.pubkeyAlgName=="rsaandmgf1"&&this.mdAlgName=="sha"&&(this.mdAlgName="sha1"))},this._zeroPaddingOfSignature=function(m,b){for(var D="",C=b/4-m.length,F=0;F<C;F++)D=D+"0";return D+m},this.setAlgAndProvider=function(m,b){if(this._setAlgNames(),b!="cryptojs/jsrsa")throw new Error("provider not supported: "+b);if(":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)!=-1){try{this.md=new A.crypto.MessageDigest({alg:this.mdAlgName})}catch(D){throw new Error("setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+D)}this.init=function(D,C){var F=null;try{C===void 0?F=Et.getKey(D):F=Et.getKey(D,C)}catch(L){throw"init failed:"+L}if(F.isPrivate===!0)this.prvKey=F,this.state="SIGN";else if(F.isPublic===!0)this.pubKey=F,this.state="VERIFY";else throw"init failed.:"+F},this.updateString=function(D){this.md.updateString(D)},this.updateHex=function(D){this.md.updateHex(D)},this.sign=function(){if(this.sHashHex=this.md.digest(),this.prvKey===void 0&&this.ecprvhex!==void 0&&this.eccurvename!==void 0&&A.crypto.ECDSA!==void 0&&(this.prvKey=new A.crypto.ECDSA({curve:this.eccurvename,prv:this.ecprvhex})),this.prvKey instanceof it&&this.pubkeyAlgName==="rsaandmgf1")this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof it&&this.pubkeyAlgName==="rsa")this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof A.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else if(this.prvKey instanceof A.crypto.DSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else throw"Signature: unsupported private key alg: "+this.pubkeyAlgName;return this.hSign},this.signString=function(D){return this.updateString(D),this.sign()},this.signHex=function(D){return this.updateHex(D),this.sign()},this.verify=function(D){if(this.sHashHex=this.md.digest(),this.pubKey===void 0&&this.ecpubhex!==void 0&&this.eccurvename!==void 0&&A.crypto.ECDSA!==void 0&&(this.pubKey=new A.crypto.ECDSA({curve:this.eccurvename,pub:this.ecpubhex})),this.pubKey instanceof it&&this.pubkeyAlgName==="rsaandmgf1")return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,D,this.mdAlgName,this.pssSaltLen);if(this.pubKey instanceof it&&this.pubkeyAlgName==="rsa")return this.pubKey.verifyWithMessageHash(this.sHashHex,D);if(A.crypto.ECDSA!==void 0&&this.pubKey instanceof A.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,D);if(A.crypto.DSA!==void 0&&this.pubKey instanceof A.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,D);throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(m,b){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.updateString=function(m){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(m){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(m){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(m){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(m){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=e,e!==void 0&&(e.alg!==void 0&&(this.algName=e.alg,e.prov===void 0?this.provName=A.crypto.Util.DEFAULTPROVIDER[this.algName]:this.provName=e.prov,this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()),e.psssaltlen!==void 0&&(this.pssSaltLen=e.psssaltlen),e.prvkeypem!==void 0)){if(e.prvkeypas!==void 0)throw"both prvkeypem and prvkeypas parameters not supported";try{var t=Et.getKey(e.prvkeypem);this.init(t)}catch(m){throw"fatal error to load pem private key: "+m}}};A.crypto.Cipher=function(e){};A.crypto.Cipher.encrypt=function(e,t,r,n){if(rr(n,"enclag")!=null&&(r=n.encalg),typeof r=="string"&&r.substr(-4)=="-CBC"){var i=t,a=e;rr(n,"key")!=null&&(i=n.key),rr(n,"enc")!=null&&(hEnc=n.enc);var s=Be.enc.Hex.parse(i),u=Be.enc.Hex.parse(a),l=Be.enc.Hex.parse(n.iv),f;if(r=="des-EDE3-CBC")f=Be.TripleDES.encrypt(u,s,{iv:l});else if(r=="aes128-CBC"||r=="aes256-CBC")f=Be.AES.encrypt(u,s,{iv:l});else throw new Error("unsupported algorithm: "+r);return f+""}else throw new Error("Cipher.encrypt: unsupported key or algorithm")};A.crypto.Cipher.decrypt=function(e,t,r,n){if(rr(n,"enclag")!=null&&(r=n.encalg),typeof r=="string"&&r.substr(-4)=="-CBC"){var i=t,a=e;rr(n,"key")!=null&&(i=n.key),rr(n,"enc")!=null&&(a=n.enc);var s=Be.enc.Hex.parse(i),u=Be.enc.Hex.parse(a),l=Be.enc.Hex.parse(n.iv),f;if(r=="des-EDE3-CBC")f=Be.TripleDES.decrypt({ciphertext:u},s,{iv:l});else if(r=="aes128-CBC"||r=="aes256-CBC")f=Be.AES.decrypt({ciphertext:u},s,{iv:l});else throw new Error("unsupported algorithm: "+r);return Be.enc.Hex.stringify(f)}else throw new Error("Cipher.decrypt: unsupported key or algorithm")};A.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040022":"secp384r1","2b81040023":"secp521r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}};(typeof A>"u"||!A)&&(A={});(typeof A.crypto>"u"||!A.crypto)&&(A.crypto={});A.crypto.ECDSA=function(e){var t="secp256r1",r=null,n=null,i=null,a=Error,s=ee,u=Ut,l=A.crypto.ECDSA,f=A.crypto.ECParameterDB,d=l.getName,g=_e,p=g.getVbyListEx,h=g.isASN1HEX,w=new hc,v=null;this.type="EC",this.isPrivate=!1,this.isPublic=!1;function y(m,b,D,C){for(var F=Math.max(b.bitLength(),C.bitLength()),L=m.add2D(D),N=m.curve.getInfinity(),S=F-1;S>=0;--S)N=N.twice2D(),N.z=s.ONE,b.testBit(S)?C.testBit(S)?N=N.add2D(L):N=N.add2D(m):C.testBit(S)&&(N=N.add2D(D));return N}this.getBigRandom=function(m){return new s(m.bitLength(),w).mod(m.subtract(s.ONE)).add(s.ONE)},this.setNamedCurve=function(m){this.ecparams=f.getByName(m),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=m},this.setPrivateKeyHex=function(m){this.isPrivate=!0,this.prvKeyHex=m},this.setPublicKeyHex=function(m){this.isPublic=!0,this.pubKeyHex=m},this.getPublicKeyXYHex=function(){var m=this.pubKeyHex;if(m.substr(0,2)!=="04")throw"this method supports uncompressed format(04) only";var b=this.ecparams.keycharlen;if(m.length!==2+b*2)throw"malformed public key hex length";var D={};return D.x=m.substr(2,b),D.y=m.substr(2+b),D},this.getShortNISTPCurveName=function(){var m=this.curveName;return m==="secp256r1"||m==="NIST P-256"||m==="P-256"||m==="prime256v1"?"P-256":m==="secp384r1"||m==="NIST P-384"||m==="P-384"?"P-384":m==="secp521r1"||m==="NIST P-521"||m==="P-521"?"P-521":null},this.generateKeyPairHex=function(){var m=this.ecparams.n,b=this.getBigRandom(m),D=this.ecparams.keycharlen,C=("0000000000"+b.toString(16)).slice(-D);this.setPrivateKeyHex(C);var F=this.generatePublicKeyHex();return{ecprvhex:C,ecpubhex:F}},this.generatePublicKeyHex=function(){var m=new s(this.prvKeyHex,16),b=this.ecparams.G.multiply(m),D=b.getX().toBigInteger(),C=b.getY().toBigInteger(),F=this.ecparams.keycharlen,L=("0000000000"+D.toString(16)).slice(-F),N=("0000000000"+C.toString(16)).slice(-F),S="04"+L+N;return this.setPublicKeyHex(S),S},this.signWithMessageHash=function(m){return this.signHex(m,this.prvKeyHex)},this.signHex=function(m,b){var D=new s(b,16),C=this.ecparams.n,F=new s(m.substring(0,this.ecparams.keycharlen),16);do var L=this.getBigRandom(C),N=this.ecparams.G,S=N.multiply(L),B=S.getX().toBigInteger().mod(C);while(B.compareTo(s.ZERO)<=0);var T=L.modInverse(C).multiply(F.add(D.multiply(B))).mod(C);return l.biRSSigToASN1Sig(B,T)},this.sign=function(m,b){var D=b,C=this.ecparams.n,F=s.fromByteArrayUnsigned(m);do var L=this.getBigRandom(C),N=this.ecparams.G,S=N.multiply(L),B=S.getX().toBigInteger().mod(C);while(B.compareTo(ee.ZERO)<=0);var T=L.modInverse(C).multiply(F.add(D.multiply(B))).mod(C);return this.serializeSig(B,T)},this.verifyWithMessageHash=function(m,b){return this.verifyHex(m,b,this.pubKeyHex)},this.verifyHex=function(m,b,D){try{var C,F,L=l.parseSigHex(b);C=L.r,F=L.s;var N=u.decodeFromHex(this.ecparams.curve,D),S=new s(m.substring(0,this.ecparams.keycharlen),16);return this.verifyRaw(S,C,F,N)}catch{return!1}},this.verify=function(m,b,D){var C,F;if(Bitcoin.Util.isArray(b)){var L=this.parseSig(b);C=L.r,F=L.s}else if(typeof b=="object"&&b.r&&b.s)C=b.r,F=b.s;else throw"Invalid value for signature";var N;if(D instanceof Ut)N=D;else if(Bitcoin.Util.isArray(D))N=u.decodeFrom(this.ecparams.curve,D);else throw"Invalid format for pubkey value, must be byte array or ECPointFp";var S=s.fromByteArrayUnsigned(m);return this.verifyRaw(S,C,F,N)},this.verifyRaw=function(m,b,D,C){var F=this.ecparams.n,L=this.ecparams.G;if(b.compareTo(s.ONE)<0||b.compareTo(F)>=0||D.compareTo(s.ONE)<0||D.compareTo(F)>=0)return!1;var N=D.modInverse(F),S=m.multiply(N).mod(F),B=b.multiply(N).mod(F),T=L.multiply(S).add(C.multiply(B)),U=T.getX().toBigInteger().mod(F);return U.equals(b)},this.serializeSig=function(m,b){var D=m.toByteArraySigned(),C=b.toByteArraySigned(),F=[];return F.push(2),F.push(D.length),F=F.concat(D),F.push(2),F.push(C.length),F=F.concat(C),F.unshift(F.length),F.unshift(48),F},this.parseSig=function(m){var b;if(m[0]!=48)throw new Error("Signature not a valid DERSequence");if(b=2,m[b]!=2)throw new Error("First element in signature must be a DERInteger");var D=m.slice(b+2,b+2+m[b+1]);if(b+=2+m[b+1],m[b]!=2)throw new Error("Second element in signature must be a DERInteger");var C=m.slice(b+2,b+2+m[b+1]);b+=2+m[b+1];var F=s.fromByteArrayUnsigned(D),L=s.fromByteArrayUnsigned(C);return{r:F,s:L}},this.parseSigCompact=function(m){if(m.length!==65)throw"Signature has the wrong length";var b=m[0]-27;if(b<0||b>7)throw"Invalid signature type";var D=this.ecparams.n,C=s.fromByteArrayUnsigned(m.slice(1,33)).mod(D),F=s.fromByteArrayUnsigned(m.slice(33,65)).mod(D);return{r:C,s:F,i:b}},this.readPKCS5PrvKeyHex=function(m){if(h(m)===!1)throw new Error("not ASN.1 hex string");var b,D,C;try{b=p(m,0,["[0]",0],"06"),D=p(m,0,[1],"04");try{C=p(m,0,["[1]",0],"03")}catch{}}catch{throw new Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=d(b),this.curveName===void 0)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(C),this.setPrivateKeyHex(D),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(m){if(h(m)===!1)throw new a("not ASN.1 hex string");var b,D,C,F;try{b=p(m,0,[1,0],"06"),D=p(m,0,[1,1],"06"),C=p(m,0,[2,0,1],"04");try{F=p(m,0,[2,0,"[1]",0],"03")}catch{}}catch{throw new a("malformed PKCS#8 plain ECC private key")}if(this.curveName=d(D),this.curveName===void 0)throw new a("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(F),this.setPrivateKeyHex(C),this.isPublic=!1},this.readPKCS8PubKeyHex=function(m){if(h(m)===!1)throw new a("not ASN.1 hex string");var b,D,C;try{b=p(m,0,[0,0],"06"),D=p(m,0,[0,1],"06"),C=p(m,0,[1],"03")}catch{throw new a("malformed PKCS#8 ECC public key")}if(this.curveName=d(D),this.curveName===null)throw new a("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(C)},this.readCertPubKeyHex=function(m,b){if(h(m)===!1)throw new a("not ASN.1 hex string");var D,C;try{D=p(m,0,[0,5,0,1],"06"),C=p(m,0,[0,5,1],"03")}catch{throw new a("malformed X.509 certificate ECC public key")}if(this.curveName=d(D),this.curveName===null)throw new a("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(C)},e!==void 0&&e.curve!==void 0&&(this.curveName=e.curve),this.curveName===void 0&&(this.curveName=t),this.setNamedCurve(this.curveName),e!==void 0&&(e.prv!==void 0&&this.setPrivateKeyHex(e.prv),e.pub!==void 0&&this.setPublicKeyHex(e.pub))};A.crypto.ECDSA.parseSigHex=function(e){var t=A.crypto.ECDSA.parseSigHexInHexRS(e),r=new ee(t.r,16),n=new ee(t.s,16);return{r,s:n}};A.crypto.ECDSA.parseSigHexInHexRS=function(e){var t=_e,r=t.getChildIdx,n=t.getV;if(t.checkStrictDER(e,0),e.substr(0,2)!="30")throw new Error("signature is not a ASN.1 sequence");var i=r(e,0);if(i.length!=2)throw new Error("signature shall have two elements");var a=i[0],s=i[1];if(e.substr(a,2)!="02")throw new Error("1st item not ASN.1 integer");if(e.substr(s,2)!="02")throw new Error("2nd item not ASN.1 integer");var u=n(e,a),l=n(e,s);return{r:u,s:l}};A.crypto.ECDSA.asn1SigToConcatSig=function(e){var t=A.crypto.ECDSA.parseSigHexInHexRS(e),r=t.r,n=t.s;if(r.length>=130&&r.length<=134){if(r.length%2!=0)throw Error("unknown ECDSA sig r length error");if(n.length%2!=0)throw Error("unknown ECDSA sig s length error");r.substr(0,2)=="00"&&(r=r.substr(2)),n.substr(0,2)=="00"&&(n=n.substr(2));var i=Math.max(r.length,n.length);return r=("000000"+r).slice(-i),n=("000000"+n).slice(-i),r+n}if(r.substr(0,2)=="00"&&r.length%32==2&&(r=r.substr(2)),n.substr(0,2)=="00"&&n.length%32==2&&(n=n.substr(2)),r.length%32==30&&(r="00"+r),n.length%32==30&&(n="00"+n),r.length%32!=0)throw Error("unknown ECDSA sig r length error");if(n.length%32!=0)throw Error("unknown ECDSA sig s length error");return r+n};A.crypto.ECDSA.concatSigToASN1Sig=function(e){if(e.length%4!=0)throw Error("unknown ECDSA concatinated r-s sig length error");var t=e.substr(0,e.length/2),r=e.substr(e.length/2);return A.crypto.ECDSA.hexRSSigToASN1Sig(t,r)};A.crypto.ECDSA.hexRSSigToASN1Sig=function(e,t){var r=new ee(e,16),n=new ee(t,16);return A.crypto.ECDSA.biRSSigToASN1Sig(r,n)};A.crypto.ECDSA.biRSSigToASN1Sig=function(e,t){var r=A.asn1,n=new r.DERInteger({bigint:e}),i=new r.DERInteger({bigint:t}),a=new r.DERSequence({array:[n,i]});return a.tohex()};A.crypto.ECDSA.getName=function(e){return e==="2b8104001f"?"secp192k1":e==="2a8648ce3d030107"?"secp256r1":e==="2b8104000a"?"secp256k1":e==="2b81040021"?"secp224r1":e==="2b81040022"?"secp384r1":e==="2b81040023"?"secp521r1":"|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(e)!==-1?"secp256r1":"|secp256k1|".indexOf(e)!==-1?"secp256k1":"|secp224r1|NIST P-224|P-224|".indexOf(e)!==-1?"secp224r1":"|secp384r1|NIST P-384|P-384|".indexOf(e)!==-1?"secp384r1":"|secp521r1|NIST P-521|P-521|".indexOf(e)!==-1?"secp521r1":null};(typeof A>"u"||!A)&&(A={});(typeof A.crypto>"u"||!A.crypto)&&(A.crypto={});A.crypto.ECParameterDB=new function(){var e={},t={};function r(n){return new ee(n,16)}this.getByName=function(n){var i=n;if(typeof t[i]<"u"&&(i=t[n]),typeof e[i]<"u")return e[i];throw"unregistered EC curve name: "+i},this.regist=function(n,i,a,s,u,l,f,d,g,p,h,w){e[n]={};var v=r(a),y=r(s),m=r(u),b=r(l),D=r(f),C=new nu(v,y,m),F=C.decodePointHex("04"+d+g);e[n].name=n,e[n].keylen=i,e[n].keycharlen=Math.ceil(i/8)*2,e[n].curve=C,e[n].G=F,e[n].n=b,e[n].h=D,e[n].oid=h,e[n].info=w;for(var L=0;L<p.length;L++)t[p[L]]=n}};A.crypto.ECParameterDB.regist("secp128r1",128,"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC","E87579C11079F43DD824993C2CEE5ED3","FFFFFFFE0000000075A30D1B9038A115","1","161FF7528B899B2D0C28607CA52C5B86","CF5AC8395BAFEB13C02DA292DDED7A83",[],"","secp128r1 : SECG curve over a 128 bit prime field");A.crypto.ECParameterDB.regist("secp160k1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73","0","7","0100000000000000000001B8FA16DFAB9ACA16B6B3","1","3B4C382CE37AA192A4019E763036F4F5DD4D7EBB","938CF935318FDCED6BC28286531733C3F03C4FEE",[],"","secp160k1 : SECG curve over a 160 bit prime field");A.crypto.ECParameterDB.regist("secp160r1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC","1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45","0100000000000000000001F4C8F927AED3CA752257","1","4A96B5688EF573284664698968C38BB913CBFC82","23A628553168947D59DCC912042351377AC5FB32",[],"","secp160r1 : SECG curve over a 160 bit prime field");A.crypto.ECParameterDB.regist("secp192k1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37","0","3","FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D","1","DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D","9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",[]);A.crypto.ECParameterDB.regist("secp192r1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC","64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1","FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831","1","188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012","07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",[]);A.crypto.ECParameterDB.regist("secp224r1",224,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE","B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4","FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D","1","B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21","BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",[]);A.crypto.ECParameterDB.regist("secp256k1",256,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","0","7","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","1","79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",[]);A.crypto.ECParameterDB.regist("secp256r1",256,"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC","5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B","FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551","1","6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296","4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",["NIST P-256","P-256","prime256v1"]);A.crypto.ECParameterDB.regist("secp384r1",384,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC","B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973","1","AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7","3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",["NIST P-384","P-384"]);A.crypto.ECParameterDB.regist("secp521r1",521,"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC","051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409","1","00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",["NIST P-521","P-521"]);(typeof A>"u"||!A)&&(A={});(typeof A.crypto>"u"||!A.crypto)&&(A.crypto={});A.crypto.DSA=function(){var e=_e,t=e.getVbyList,r=e.getVbyListEx,n=e.isASN1HEX,i=ee;this.p=null,this.q=null,this.g=null,this.y=null,this.x=null,this.type="DSA",this.isPrivate=!1,this.isPublic=!1,this.setPrivate=function(a,s,u,l,f){this.isPrivate=!0,this.p=a,this.q=s,this.g=u,this.y=l,this.x=f},this.setPrivateHex=function(a,s,u,l,f){var d,g,p,h,w;d=new ee(a,16),g=new ee(s,16),p=new ee(u,16),typeof l=="string"&&l.length>1?h=new ee(l,16):h=null,w=new ee(f,16),this.setPrivate(d,g,p,h,w)},this.setPublic=function(a,s,u,l){this.isPublic=!0,this.p=a,this.q=s,this.g=u,this.y=l,this.x=null},this.setPublicHex=function(a,s,u,l){var f,d,g,p;f=new ee(a,16),d=new ee(s,16),g=new ee(u,16),p=new ee(l,16),this.setPublic(f,d,g,p)},this.signWithMessageHash=function(a){var s=this.p,u=this.q,l=this.g,f=this.y,d=this.x,g=A.crypto.Util.getRandomBigIntegerMinToMax(ee.ONE.add(ee.ONE),u.subtract(ee.ONE)),p=a.substr(0,u.bitLength()/4),h=new ee(p,16),w=l.modPow(g,s).mod(u),v=g.modInverse(u).multiply(h.add(d.multiply(w))).mod(u),y=A.asn1.ASN1Util.jsonToASN1HEX({seq:[{int:{bigint:w}},{int:{bigint:v}}]});return y},this.verifyWithMessageHash=function(a,s){var u=this.p,l=this.q,f=this.g,d=this.y,g=this.parseASN1Signature(s),p=g[0],h=g[1],w=a.substr(0,l.bitLength()/4),v=new ee(w,16);if(ee.ZERO.compareTo(p)>0||p.compareTo(l)>0||ee.ZERO.compareTo(h)>=0||h.compareTo(l)>0)throw"invalid DSA signature";var y=h.modInverse(l),m=v.multiply(y).mod(l),b=p.multiply(y).mod(l),D=f.modPow(m,u).multiply(d.modPow(b,u)).mod(u).mod(l);return D.compareTo(p)==0},this.parseASN1Signature=function(a){try{var s=new i(r(a,0,[0],"02"),16),u=new i(r(a,0,[1],"02"),16);return[s,u]}catch{throw new Error("malformed ASN.1 DSA signature")}},this.readPKCS5PrvKeyHex=function(a){var s,u,l,f,d;if(n(a)===!1)throw new Error("not ASN.1 hex string");try{s=r(a,0,[1],"02"),u=r(a,0,[2],"02"),l=r(a,0,[3],"02"),f=r(a,0,[4],"02"),d=r(a,0,[5],"02")}catch{throw new Error("malformed PKCS#1/5 plain DSA private key")}this.setPrivateHex(s,u,l,f,d)},this.readPKCS8PrvKeyHex=function(a){var s,u,l,f;if(n(a)===!1)throw new Error("not ASN.1 hex string");try{s=r(a,0,[1,1,0],"02"),u=r(a,0,[1,1,1],"02"),l=r(a,0,[1,1,2],"02"),f=r(a,0,[2,0],"02")}catch{throw new Error("malformed PKCS#8 plain DSA private key")}this.setPrivateHex(s,u,l,null,f)},this.readPKCS8PubKeyHex=function(a){var s,u,l,f;if(n(a)===!1)throw new Error("not ASN.1 hex string");try{s=r(a,0,[0,1,0],"02"),u=r(a,0,[0,1,1],"02"),l=r(a,0,[0,1,2],"02"),f=r(a,0,[1,0],"02")}catch{throw new Error("malformed PKCS#8 DSA public key")}this.setPublicHex(s,u,l,f)},this.readCertPubKeyHex=function(a,s){var u,l,f,d;if(n(a)===!1)throw new Error("not ASN.1 hex string");try{u=r(a,0,[0,5,0,1,0],"02"),l=r(a,0,[0,5,0,1,1],"02"),f=r(a,0,[0,5,0,1,2],"02"),d=r(a,0,[0,5,1,0],"02")}catch{throw new Error("malformed X.509 certificate DSA public key")}this.setPublicHex(u,l,f,d)}};var Et=function(){var e=function(v,y,m){return n(Be.AES,v,y,m)},t=function(v,y,m){return n(Be.TripleDES,v,y,m)},r=function(v,y,m){return n(Be.DES,v,y,m)},n=function(v,y,m,b){var D=Be.enc.Hex.parse(y),C=Be.enc.Hex.parse(m),F=Be.enc.Hex.parse(b),L={};L.key=C,L.iv=F,L.ciphertext=D;var N=v.decrypt(L,C,{iv:F});return Be.enc.Hex.stringify(N)},i=function(v,y,m){return u(Be.AES,v,y,m)},a=function(v,y,m){return u(Be.TripleDES,v,y,m)},s=function(v,y,m){return u(Be.DES,v,y,m)},u=function(v,y,m,b){var D=Be.enc.Hex.parse(y),C=Be.enc.Hex.parse(m),F=Be.enc.Hex.parse(b),L=v.encrypt(D,C,{iv:F}),N=Be.enc.Hex.parse(L.toString()),S=Be.enc.Base64.stringify(N);return S},l={"AES-256-CBC":{proc:e,eproc:i,keylen:32,ivlen:16},"AES-192-CBC":{proc:e,eproc:i,keylen:24,ivlen:16},"AES-128-CBC":{proc:e,eproc:i,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:t,eproc:a,keylen:24,ivlen:8},"DES-CBC":{proc:r,eproc:s,keylen:8,ivlen:8}},f=function(v){return l[v].proc},d=function(v){var y=Be.lib.WordArray.random(v),m=Be.enc.Hex.stringify(y);return m},g=function(v){var y={},m=v.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));m&&(y.cipher=m[1],y.ivsalt=m[2]);var b=v.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));b&&(y.type=b[1]);var D=-1,C=0;v.indexOf(`\r
\r
`)!=-1&&(D=v.indexOf(`\r
\r
`),C=2),v.indexOf(`
`)!=-1&&(D=v.indexOf(`
`),C=1);var F=v.indexOf("-----END");if(D!=-1&&F!=-1){var L=v.substring(D+C*2,F-C);L=L.replace(/\s+/g,""),y.data=L}return y},p=function(v,y,m){for(var b=m.substring(0,16),D=Be.enc.Hex.parse(b),C=Be.enc.Utf8.parse(y),F=l[v].keylen+l[v].ivlen,L="",N=null;;){var S=Be.algo.MD5.create();if(N!=null&&S.update(N),S.update(C),S.update(D),N=S.finalize(),L=L+Be.enc.Hex.stringify(N),L.length>=F*2)break}var B={};return B.keyhex=L.substr(0,l[v].keylen*2),B.ivhex=L.substr(l[v].keylen*2,l[v].ivlen*2),B},h=function(v,y,m,b){var D=Be.enc.Base64.parse(v),C=Be.enc.Hex.stringify(D),F=l[y].proc,L=F(C,m,b);return L},w=function(v,y,m,b){var D=l[y].eproc,C=D(v,m,b);return C};return{version:"1.0.0",parsePKCS5PEM:function(v){return g(v)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(v,y,m){return p(v,y,m)},decryptKeyB64:function(v,y,m,b){return h(v,y,m,b)},getDecryptedKeyHex:function(v,y){var m=g(v),b=m.type,D=m.cipher,C=m.ivsalt,F=m.data,L=p(D,y,C),N=L.keyhex,S=h(F,D,N,C);return S},getEncryptedPKCS5PEMFromPrvKeyHex:function(v,y,m,b,D){var T="";if((typeof b>"u"||b==null)&&(b="AES-256-CBC"),typeof l[b]>"u")throw new Error("KEYUTIL unsupported algorithm: "+b);if(typeof D>"u"||D==null){var C=l[b].ivlen,F=d(C);D=F.toUpperCase()}var L=p(b,m,D),N=L.keyhex,S=w(y,b,N,D),B=S.replace(/(.{64})/g,`$1\r
`),T="-----BEGIN "+v+` PRIVATE KEY-----\r
`;return T+=`Proc-Type: 4,ENCRYPTED\r
`,T+="DEK-Info: "+b+","+D+`\r
`,T+=`\r
`,T+=B,T+=`\r
-----END `+v+` PRIVATE KEY-----\r
`,T},getEncryptedPKCS8PEM:function(v,y,m){var b=this.getEncryptedPKCS8Hex(v,y,m);return Mn(b,"ENCRYPTED PRIVATE KEY")},getEncryptedPKCS8Hex:function(v,y,m){var b;m==null||m==null?b={}:b=JSON.parse(JSON.stringify(m)),b.plain=v,this.initPBES2Param(b),this.encryptPBES2Param(b,y);var D=this.generatePBES2ASN1Param(b);return A.asn1.ASN1Util.newObject(D).tohex()},initPBES2Param:function(v){if(rr(v,"encalg")==null&&(v.encalg="aes256-CBC"),rr(v,"iter")==null&&(v.iter=2048),rr(v,"prf")==null&&(v.prf="hmacWithSHA256"),rr(v,"salt")==null&&(v.salt=Be.enc.Hex.stringify(Be.lib.WordArray.random(8))),rr(v,"enciv")==null){var y;v.encalg=="des-EDE3-CBC"&&(y=8),v.encalg=="aes128-CBC"&&(y=16),v.encalg=="aes256-CBC"&&(y=16),v.enciv=Be.enc.Hex.stringify(Be.lib.WordArray.random(y))}},encryptPBES2Param:function(v,y){var m=Et.getDKFromPBES2Param(v,y);try{var b=A.crypto.Cipher.encrypt(v.plain,m,v.encalg,{iv:v.enciv})}catch{throw new Error("encrypt error: "+v.plain+" "+m+" "+v.encalg+" "+v.enciv)}v.enc=b},generatePBES2ASN1Param:function(v){var y={seq:[{seq:[{oid:"pkcs5PBES2"},{seq:[{seq:[{oid:"pkcs5PBKDF2"},{seq:[{octstr:{hex:v.salt}},{int:{hex:c_(v.iter)}}]}]},{seq:[{oid:v.encalg},{octstr:{hex:v.enciv}}]}]}]},{octstr:{hex:v.enc}}]};return v.prf!="hmacWithSHA1"&&y.seq[0].seq[1].seq[0].seq[1].seq.push({seq:[{oid:v.prf},{null:""}]}),y},parseHexOfEncryptedPKCS8:function(v){var y=_e,m=y.getChildIdx,b=y.getV,D={},C=m(v,0);if(C.length!=2)throw new Error("malformed format: SEQUENCE(0).items != 2: "+C.length);D.ciphertext=b(v,C[1]);var F=m(v,C[0]);if(F.length!=2)throw new Error("malformed format: SEQUENCE(0.0).items != 2: "+F.length);if(b(v,F[0])!="2a864886f70d01050d")throw new Error("this only supports pkcs5PBES2");var L=m(v,F[1]);if(F.length!=2)throw new Error("malformed format: SEQUENCE(0.0.1).items != 2: "+L.length);var N=m(v,L[1]);if(N.length!=2)throw new Error("malformed format: SEQUENCE(0.0.1.1).items != 2: "+N.length);if(b(v,N[0])!="2a864886f70d0307")throw"this only supports TripleDES";D.encryptionSchemeAlg="TripleDES",D.encryptionSchemeIV=b(v,N[1]);var S=m(v,L[0]);if(S.length!=2)throw new Error("malformed format: SEQUENCE(0.0.1.0).items != 2: "+S.length);if(b(v,S[0])!="2a864886f70d01050c")throw new Error("this only supports pkcs5PBKDF2");var B=m(v,S[1]);if(B.length<2)throw new Error("malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+B.length);D.pbkdf2Salt=b(v,B[0]);var T=b(v,B[1]);try{D.pbkdf2Iter=parseInt(T,16)}catch{throw new Error("malformed format pbkdf2Iter: "+T)}return D},getPBKDF2KeyHexFromParam:function(v,y){var m=Be.enc.Hex.parse(v.pbkdf2Salt),b=v.pbkdf2Iter,D=Be.PBKDF2(y,m,{keySize:192/32,iterations:b}),C=Be.enc.Hex.stringify(D);return C},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(v,y){var m=yr(v,"ENCRYPTED PRIVATE KEY"),b=this.parseHexOfEncryptedPKCS8(m),D=Et.getPBKDF2KeyHexFromParam(b,y),C={};C.ciphertext=Be.enc.Hex.parse(b.ciphertext);var F=Be.enc.Hex.parse(D),L=Be.enc.Hex.parse(b.encryptionSchemeIV),N=Be.TripleDES.decrypt(C,F,{iv:L}),S=Be.enc.Hex.stringify(N);return S},parsePBES2:function(v){var y=_e.parse(v);if(rr(y,"seq.0.seq.0.oid")!="pkcs5PBES2"||rr(y,"seq.0.seq.1.seq.0.seq.0.oid")!="pkcs5PBKDF2")throw new Error("not pkcs5PBES2 and pkcs5PBKDF2 used");var m=rr(y,"seq.0.seq.1.seq.0.seq.1.seq");if(m==null)throw new Error("PBKDF2 parameter not found");var b=rr(m,"0.octstr.hex"),D=rr(m,"1.int.hex"),C=rr(m,"2.seq.0.oid","hmacWithSHA1"),F=-1;try{F=parseInt(D,16)}catch{throw new Error("iter not proper value")}var L=rr(y,"seq.0.seq.1.seq.1.seq.0.oid"),N=rr(y,"seq.0.seq.1.seq.1.seq.1.octstr.hex"),S=rr(y,"seq.1.octstr.hex");if(L==null||N==null||S==null)throw new Error("encalg, enciv or enc is undefined");var B={salt:b,iter:F,prf:C,encalg:L,enciv:N,enc:S};return B},getDKFromPBES2Param:function(v,y){var m={hmacWithSHA1:Be.algo.SHA1,hmacWithSHA224:Be.algo.SHA224,hmacWithSHA256:Be.algo.SHA256,hmacWithSHA384:Be.algo.SHA384,hmacWithSHA512:Be.algo.SHA512},b={"des-EDE3-CBC":192/32,"aes128-CBC":128/32,"aes256-CBC":256/32},D=m[v.prf];if(D==null)throw new Error("unsupported prf");var C=b[v.encalg];if(C==null)throw new Error("unsupported encalg");var F=Be.enc.Hex.parse(v.salt),L=v.iter;try{var N=Be.PBKDF2(y,F,{keySize:C,iterations:L,hasher:D});return Be.enc.Hex.stringify(N)}catch(S){throw new Error("PBKDF2 error: "+S+" "+JSON.stringify(v)+" "+y)}},getPlainHexFromEncryptedPKCS8PEM:function(v,y){if(v.indexOf("BEGIN ENCRYPTED PRIVATE KEY")==-1)throw new Error("not Encrypted PKCS#8 PEM string");var m=yr(v),b;try{b=Et.parsePBES2(m)}catch(C){throw new Error("malformed PBES2 format: "+C.message)}var D=Et.getDKFromPBES2Param(b,y);return A.crypto.Cipher.decrypt(b.enc,D,b.encalg,{iv:b.enciv})},getKeyFromEncryptedPKCS8PEM:function(v,y){var m=this.getPlainHexFromEncryptedPKCS8PEM(v,y),b=this.getKeyFromPlainPrivatePKCS8Hex(m);return b},parsePlainPrivatePKCS8Hex:function(v){var y=_e,m=y.getChildIdx,b=y.getV,D={};if(D.algparam=null,v.substr(0,2)!="30")throw new Error("malformed plain PKCS8 private key(code:001)");var C=m(v,0);if(C.length<3)throw new Error("malformed plain PKCS8 private key(code:002)");if(v.substr(C[1],2)!="30")throw new Error("malformed PKCS8 private key(code:003)");var F=m(v,C[1]);if(F.length!=2)throw new Error("malformed PKCS8 private key(code:004)");if(v.substr(F[0],2)!="06")throw new Error("malformed PKCS8 private key(code:005)");if(D.algoid=b(v,F[0]),v.substr(F[1],2)=="06"&&(D.algparam=b(v,F[1])),v.substr(C[2],2)!="04")throw new Error("malformed PKCS8 private key(code:006)");return D.keyidx=y.getVidx(v,C[2]),D},getKeyFromPlainPrivatePKCS8PEM:function(v){var y=yr(v,"PRIVATE KEY"),m=this.getKeyFromPlainPrivatePKCS8Hex(y);return m},getKeyFromPlainPrivatePKCS8Hex:function(v){var y=this.parsePlainPrivatePKCS8Hex(v),m;if(y.algoid=="2a864886f70d010101")m=new it;else if(y.algoid=="2a8648ce380401")m=new A.crypto.DSA;else if(y.algoid=="2a8648ce3d0201")m=new A.crypto.ECDSA;else throw new Error("unsupported private key algorithm");return m.readPKCS8PrvKeyHex(v),m},_getKeyFromPublicPKCS8Hex:function(v){var y,m=_e.getVbyList(v,0,[0,0],"06");if(m==="2a864886f70d010101")y=new it;else if(m==="2a8648ce380401")y=new A.crypto.DSA;else if(m==="2a8648ce3d0201")y=new A.crypto.ECDSA;else throw new Error("unsupported PKCS#8 public key hex");return y.readPKCS8PubKeyHex(v),y},parsePublicRawRSAKeyHex:function(v){var y=_e,m=y.getChildIdx,b=y.getV,D={};if(v.substr(0,2)!="30")throw new Error("malformed RSA key(code:001)");var C=m(v,0);if(C.length!=2)throw new Error("malformed RSA key(code:002)");if(v.substr(C[0],2)!="02")throw new Error("malformed RSA key(code:003)");if(D.n=b(v,C[0]),v.substr(C[1],2)!="02")throw new Error("malformed RSA key(code:004)");return D.e=b(v,C[1]),D},parsePublicPKCS8Hex:function(v){var y=_e,m=y.getChildIdx,b=y.getV,D={};D.algparam=null;var C=m(v,0);if(C.length!=2)throw new Error("outer DERSequence shall have 2 elements: "+C.length);var F=C[0];if(v.substr(F,2)!="30")throw new Error("malformed PKCS8 public key(code:001)");var L=m(v,F);if(L.length!=2)throw new Error("malformed PKCS8 public key(code:002)");if(v.substr(L[0],2)!="06")throw new Error("malformed PKCS8 public key(code:003)");if(D.algoid=b(v,L[0]),v.substr(L[1],2)=="06"?D.algparam=b(v,L[1]):v.substr(L[1],2)=="30"&&(D.algparam={},D.algparam.p=y.getVbyList(v,L[1],[0],"02"),D.algparam.q=y.getVbyList(v,L[1],[1],"02"),D.algparam.g=y.getVbyList(v,L[1],[2],"02")),v.substr(C[1],2)!="03")throw new Error("malformed PKCS8 public key(code:004)");return D.key=b(v,C[1]).substr(2),D}}}();Et.getKey=function(e,t,r){var n=_e,i=n.getChildIdx,a=n.getV,s=n.getVbyList,u=A.crypto,l=u.ECDSA,f=u.DSA,d=it,g=yr,p=Et;if(typeof d<"u"&&e instanceof d||typeof l<"u"&&e instanceof l||typeof f<"u"&&e instanceof f)return e;if(e.curve!==void 0&&e.xy!==void 0&&e.d===void 0)return new l({pub:e.xy,curve:e.curve});if(e.curve!==void 0&&e.d!==void 0)return new l({prv:e.d,curve:e.curve});if(e.kty===void 0&&e.n!==void 0&&e.e!==void 0&&e.d===void 0){var h=new d;return h.setPublic(e.n,e.e),h}if(e.kty===void 0&&e.n!==void 0&&e.e!==void 0&&e.d!==void 0&&e.p!==void 0&&e.q!==void 0&&e.dp!==void 0&&e.dq!==void 0&&e.co!==void 0&&e.qi===void 0){var h=new d;return h.setPrivateEx(e.n,e.e,e.d,e.p,e.q,e.dp,e.dq,e.co),h}if(e.kty===void 0&&e.n!==void 0&&e.e!==void 0&&e.d!==void 0&&e.p===void 0){var h=new d;return h.setPrivate(e.n,e.e,e.d),h}if(e.p!==void 0&&e.q!==void 0&&e.g!==void 0&&e.y!==void 0&&e.x===void 0){var h=new f;return h.setPublic(e.p,e.q,e.g,e.y),h}if(e.p!==void 0&&e.q!==void 0&&e.g!==void 0&&e.y!==void 0&&e.x!==void 0){var h=new f;return h.setPrivate(e.p,e.q,e.g,e.y,e.x),h}if(e.kty==="RSA"&&e.n!==void 0&&e.e!==void 0&&e.d===void 0){var h=new d;return h.setPublic(pr(e.n),pr(e.e)),h}if(e.kty==="RSA"&&e.n!==void 0&&e.e!==void 0&&e.d!==void 0&&e.p!==void 0&&e.q!==void 0&&e.dp!==void 0&&e.dq!==void 0&&e.qi!==void 0){var h=new d;return h.setPrivateEx(pr(e.n),pr(e.e),pr(e.d),pr(e.p),pr(e.q),pr(e.dp),pr(e.dq),pr(e.qi)),h}if(e.kty==="RSA"&&e.n!==void 0&&e.e!==void 0&&e.d!==void 0){var h=new d;return h.setPrivate(pr(e.n),pr(e.e),pr(e.d)),h}if(e.kty==="EC"&&e.crv!==void 0&&e.x!==void 0&&e.y!==void 0&&e.d===void 0){var w=new l({curve:e.crv}),v=w.ecparams.keycharlen,y=("0000000000"+pr(e.x)).slice(-v),m=("0000000000"+pr(e.y)).slice(-v),b="04"+y+m;return w.setPublicKeyHex(b),w}if(e.kty==="EC"&&e.crv!==void 0&&e.x!==void 0&&e.y!==void 0&&e.d!==void 0){var w=new l({curve:e.crv}),v=w.ecparams.keycharlen,y=("0000000000"+pr(e.x)).slice(-v),m=("0000000000"+pr(e.y)).slice(-v),b="04"+y+m,D=("0000000000"+pr(e.d)).slice(-v);return w.setPublicKeyHex(b),w.setPrivateKeyHex(D),w}if(r==="pkcs5prv"){var C=e,n=_e,F,h;if(F=i(C,0),F.length===9)h=new d,h.readPKCS5PrvKeyHex(C);else if(F.length===6)h=new f,h.readPKCS5PrvKeyHex(C);else if(F.length>2&&C.substr(F[1],2)==="04")h=new l,h.readPKCS5PrvKeyHex(C);else throw new Error("unsupported PKCS#1/5 hexadecimal key");return h}if(r==="pkcs8prv"){var h=p.getKeyFromPlainPrivatePKCS8Hex(e);return h}if(r==="pkcs8pub")return p._getKeyFromPublicPKCS8Hex(e);if(r==="x509pub")return Xe.getPublicKeyFromCertHex(e);if(e.indexOf("-END CERTIFICATE-",0)!=-1||e.indexOf("-END X509 CERTIFICATE-",0)!=-1||e.indexOf("-END TRUSTED CERTIFICATE-",0)!=-1)return Xe.getPublicKeyFromCertPEM(e);if(e.indexOf("-END PUBLIC KEY-")!=-1){var L=yr(e,"PUBLIC KEY");return p._getKeyFromPublicPKCS8Hex(L)}if(e.indexOf("-END RSA PRIVATE KEY-")!=-1&&e.indexOf("4,ENCRYPTED")==-1){var N=g(e,"RSA PRIVATE KEY");return p.getKey(N,null,"pkcs5prv")}if(e.indexOf("-END DSA PRIVATE KEY-")!=-1&&e.indexOf("4,ENCRYPTED")==-1){var S=g(e,"DSA PRIVATE KEY"),B=s(S,0,[1],"02"),T=s(S,0,[2],"02"),U=s(S,0,[3],"02"),V=s(S,0,[4],"02"),Y=s(S,0,[5],"02"),h=new f;return h.setPrivate(new ee(B,16),new ee(T,16),new ee(U,16),new ee(V,16),new ee(Y,16)),h}if(e.indexOf("-END EC PRIVATE KEY-")!=-1&&e.indexOf("4,ENCRYPTED")==-1){var N=g(e,"EC PRIVATE KEY");return p.getKey(N,null,"pkcs5prv")}if(e.indexOf("-END PRIVATE KEY-")!=-1)return p.getKeyFromPlainPrivatePKCS8PEM(e);if(e.indexOf("-END RSA PRIVATE KEY-")!=-1&&e.indexOf("4,ENCRYPTED")!=-1){var H=p.getDecryptedKeyHex(e,t),z=new it;return z.readPKCS5PrvKeyHex(H),z}if(e.indexOf("-END EC PRIVATE KEY-")!=-1&&e.indexOf("4,ENCRYPTED")!=-1){var S=p.getDecryptedKeyHex(e,t),h=s(S,0,[1],"04"),W=s(S,0,[2,0],"06"),ie=s(S,0,[3,0],"03").substr(2),Fe="";if(A.crypto.OID.oidhex2name[W]!==void 0)Fe=A.crypto.OID.oidhex2name[W];else throw new Error("undefined OID(hex) in KJUR.crypto.OID: "+W);var w=new l({curve:Fe});return w.setPublicKeyHex(ie),w.setPrivateKeyHex(h),w.isPublic=!1,w}if(e.indexOf("-END DSA PRIVATE KEY-")!=-1&&e.indexOf("4,ENCRYPTED")!=-1){var S=p.getDecryptedKeyHex(e,t),B=s(S,0,[1],"02"),T=s(S,0,[2],"02"),U=s(S,0,[3],"02"),V=s(S,0,[4],"02"),Y=s(S,0,[5],"02"),h=new f;return h.setPrivate(new ee(B,16),new ee(T,16),new ee(U,16),new ee(V,16),new ee(Y,16)),h}if(e.indexOf("-END ENCRYPTED PRIVATE KEY-")!=-1)return p.getKeyFromEncryptedPKCS8PEM(e,t);throw new Error("not supported argument")};Et.generateKeypair=function(e,t){if(e=="RSA"){var r=t,n=new it;n.generate(r,"10001"),n.isPrivate=!0,n.isPublic=!0;var i=new it,a=n.n.toString(16),s=n.e.toString(16);i.setPublic(a,s),i.isPrivate=!1,i.isPublic=!0;var u={};return u.prvKeyObj=n,u.pubKeyObj=i,u}else if(e=="EC"){var l=t,f=new A.crypto.ECDSA({curve:l}),d=f.generateKeyPairHex(),n=new A.crypto.ECDSA({curve:l});n.setPublicKeyHex(d.ecpubhex),n.setPrivateKeyHex(d.ecprvhex),n.isPrivate=!0,n.isPublic=!1;var i=new A.crypto.ECDSA({curve:l});i.setPublicKeyHex(d.ecpubhex),i.isPrivate=!1,i.isPublic=!0;var u={};return u.prvKeyObj=n,u.pubKeyObj=i,u}else throw new Error("unknown algorithm: "+e)};Et.getPEM=function(e,t,r,n,i,a){var s=A,u=s.asn1,l=u.DERObjectIdentifier,f=u.DERInteger,d=u.ASN1Util.newObject,g=u.x509,p=g.SubjectPublicKeyInfo,h=s.crypto,w=h.DSA,v=h.ECDSA,y=it;function m(z){var W=d({seq:[{int:0},{int:{bigint:z.n}},{int:z.e},{int:{bigint:z.d}},{int:{bigint:z.p}},{int:{bigint:z.q}},{int:{bigint:z.dmp1}},{int:{bigint:z.dmq1}},{int:{bigint:z.coeff}}]});return W}function b(z){var W=d({seq:[{int:1},{octstr:{hex:z.prvKeyHex}},{tag:["a0",!0,{oid:{name:z.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+z.pubKeyHex}}]}]});return W}function D(z){var W=d({seq:[{int:0},{int:{bigint:z.p}},{int:{bigint:z.q}},{int:{bigint:z.g}},{int:{bigint:z.y}},{int:{bigint:z.x}}]});return W}if((y!==void 0&&e instanceof y||w!==void 0&&e instanceof w||v!==void 0&&e instanceof v)&&e.isPublic==!0&&(t===void 0||t=="PKCS8PUB")){var C=new p(e),F=C.tohex();return Mn(F,"PUBLIC KEY")}if(t=="PKCS1PRV"&&y!==void 0&&e instanceof y&&(r===void 0||r==null)&&e.isPrivate==!0){var C=m(e),F=C.tohex();return Mn(F,"RSA PRIVATE KEY")}if(t=="PKCS1PRV"&&v!==void 0&&e instanceof v&&(r===void 0||r==null)&&e.isPrivate==!0){var L=new l({name:e.curveName}),N=L.tohex(),S=b(e),B=S.tohex(),T="";return T+=Mn(N,"EC PARAMETERS"),T+=Mn(B,"EC PRIVATE KEY"),T}if(t=="PKCS1PRV"&&w!==void 0&&e instanceof w&&(r===void 0||r==null)&&e.isPrivate==!0){var C=D(e),F=C.tohex();return Mn(F,"DSA PRIVATE KEY")}if(t=="PKCS5PRV"&&y!==void 0&&e instanceof y&&r!==void 0&&r!=null&&e.isPrivate==!0){var C=m(e),F=C.tohex();return n===void 0&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",F,r,n,a)}if(t=="PKCS5PRV"&&v!==void 0&&e instanceof v&&r!==void 0&&r!=null&&e.isPrivate==!0){var C=b(e),F=C.tohex();return n===void 0&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",F,r,n,a)}if(t=="PKCS5PRV"&&w!==void 0&&e instanceof w&&r!==void 0&&r!=null&&e.isPrivate==!0){var C=D(e),F=C.tohex();return n===void 0&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",F,r,n,a)}var U=function(z,W){if(typeof W=="string")return Et.getEncryptedPKCS8PEM(z,W);if(typeof W=="object"&&rr(W,"passcode")!=null){var ie=JSON.parse(JSON.stringify(W)),Fe=ie.passcode;return delete ie.passcode,Et.getEncryptedPKCS8PEM(z,Fe,ie)}};if(t=="PKCS8PRV"&&y!=null&&e instanceof y&&e.isPrivate==!0){var V=m(e),Y=V.tohex(),C=d({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:Y}}]}),F=C.tohex();return r===void 0||r==null?Mn(F,"PRIVATE KEY"):U(F,r)}if(t=="PKCS8PRV"&&v!==void 0&&e instanceof v&&e.isPrivate==!0){var H={seq:[{int:1},{octstr:{hex:e.prvKeyHex}}]};typeof e.pubKeyHex=="string"&&H.seq.push({tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]});var V=new d(H),Y=V.tohex(),C=d({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:e.curveName}}]},{octstr:{hex:Y}}]}),F=C.tohex();return r===void 0||r==null?Mn(F,"PRIVATE KEY"):U(F,r)}if(t=="PKCS8PRV"&&w!==void 0&&e instanceof w&&e.isPrivate==!0){var V=new f({bigint:e.x}),Y=V.tohex(),C=d({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]}]},{octstr:{hex:Y}}]}),F=C.tohex();return r===void 0||r==null?Mn(F,"PRIVATE KEY"):U(F,r)}throw new Error("unsupported object nor format")};Et.getKeyFromCSRPEM=function(e){var t=yr(e,"CERTIFICATE REQUEST"),r=Et.getKeyFromCSRHex(t);return r};Et.getKeyFromCSRHex=function(e){var t=Et.parseCSRHex(e),r=Et.getKey(t.p8pubkeyhex,null,"pkcs8pub");return r};Et.parseCSRHex=function(e){var t=_e,r=t.getChildIdx,n=t.getTLV,i={},a=e;if(a.substr(0,2)!="30")throw new Error("malformed CSR(code:001)");var s=r(a,0);if(s.length<1)throw new Error("malformed CSR(code:002)");if(a.substr(s[0],2)!="30")throw new Error("malformed CSR(code:003)");var u=r(a,s[0]);if(u.length<3)throw new Error("malformed CSR(code:004)");return i.p8pubkeyhex=n(a,u[2]),i};Et.getKeyID=function(e){var t=Et,r=_e;typeof e=="string"&&e.indexOf("BEGIN ")!=-1&&(e=t.getKey(e));var n=yr(t.getPEM(e)),i=r.getIdxbyList(n,0,[1]),a=r.getV(n,i).substring(2);return A.crypto.Util.hashHex(a,"sha1")};Et.getJWK=function(e,t,r,n,i){var a,s={},u,l=A.crypto.Util.hashHex;if(typeof e=="string")a=Et.getKey(e),e.indexOf("CERTIFICATE")!=-1&&(u=yr(e));else if(typeof e=="object")e instanceof Xe?(a=e.getPublicKey(),u=e.hex):a=e;else throw new Error("unsupported keyinfo type");if(a instanceof it&&a.isPrivate)s.kty="RSA",s.n=Qr(a.n.toString(16)),s.e=Qr(a.e.toString(16)),s.d=Qr(a.d.toString(16)),s.p=Qr(a.p.toString(16)),s.q=Qr(a.q.toString(16)),s.dp=Qr(a.dmp1.toString(16)),s.dq=Qr(a.dmq1.toString(16)),s.qi=Qr(a.coeff.toString(16));else if(a instanceof it&&a.isPublic)s.kty="RSA",s.n=Qr(a.n.toString(16)),s.e=Qr(a.e.toString(16));else if(a instanceof A.crypto.ECDSA&&a.isPrivate){var f=a.getShortNISTPCurveName();if(f!=="P-256"&&f!=="P-384"&&f!=="P-521")throw new Error("unsupported curve name for JWT: "+f);var d=a.getPublicKeyXYHex();s.kty="EC",s.crv=f,s.x=Qr(d.x),s.y=Qr(d.y),s.d=Qr(a.prvKeyHex)}else if(a instanceof A.crypto.ECDSA&&a.isPublic){var f=a.getShortNISTPCurveName();if(f!=="P-256"&&f!=="P-384"&&f!=="P-521")throw new Error("unsupported curve name for JWT: "+f);var d=a.getPublicKeyXYHex();s.kty="EC",s.crv=f,s.x=Qr(d.x),s.y=Qr(d.y)}if(s.kty==null)throw new Error("unsupported keyinfo");return!a.isPrivate&&t!=!0&&(s.kid=A.jws.JWS.getJWKthumbprint(s)),u!=null&&r!=!0&&(s.x5c=[ru(u)]),u!=null&&n!=!0&&(s.x5t=oc(ru(l(u,"sha1")))),u!=null&&i!=!0&&(s["x5t#S256"]=oc(ru(l(u,"sha256")))),s};Et.getJWKFromKey=function(e){return Et.getJWK(e,!0,!0,!0,!0)};it.getPosArrayOfChildrenFromHex=function(e){return _e.getChildIdx(e,0)};it.getHexValueArrayOfChildrenFromHex=function(e){var t=_e,r=t.getV,p=it.getPosArrayOfChildrenFromHex(e),n=r(e,p[0]),i=r(e,p[1]),a=r(e,p[2]),s=r(e,p[3]),u=r(e,p[4]),l=r(e,p[5]),f=r(e,p[6]),d=r(e,p[7]),g=r(e,p[8]),p=new Array;return p.push(n,i,a,s,u,l,f,d,g),p};it.prototype.readPrivateKeyFromPEMString=function(e){var t=yr(e),r=it.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])};it.prototype.readPKCS5PrvKeyHex=function(e){var t=it.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])};it.prototype.readPKCS8PrvKeyHex=function(e){var t,r,n,i,a,s,u,l,f=_e,d=f.getVbyListEx;if(f.isASN1HEX(e)===!1)throw new Error("not ASN.1 hex string");try{t=d(e,0,[2,0,1],"02"),r=d(e,0,[2,0,2],"02"),n=d(e,0,[2,0,3],"02"),i=d(e,0,[2,0,4],"02"),a=d(e,0,[2,0,5],"02"),s=d(e,0,[2,0,6],"02"),u=d(e,0,[2,0,7],"02"),l=d(e,0,[2,0,8],"02")}catch{throw new Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(t,r,n,i,a,s,u,l)};it.prototype.readPKCS5PubKeyHex=function(e){var t=_e,r=t.getV;if(t.isASN1HEX(e)===!1)throw new Error("keyHex is not ASN.1 hex string");var n=t.getChildIdx(e,0);if(n.length!==2||e.substr(n[0],2)!=="02"||e.substr(n[1],2)!=="02")throw new Error("wrong hex for PKCS#5 public key");var i=r(e,n[0]),a=r(e,n[1]);this.setPublic(i,a)};it.prototype.readPKCS8PubKeyHex=function(e){var t=_e;if(t.isASN1HEX(e)===!1)throw new Error("not ASN.1 hex string");if(t.getTLVbyListEx(e,0,[0,0])!=="06092a864886f70d010101")throw new Error("not PKCS8 RSA public key");var r=t.getTLVbyListEx(e,0,[1,0]);this.readPKCS5PubKeyHex(r)};it.prototype.readCertPubKeyHex=function(e,t){var r,n;r=new Xe,r.readCertHex(e),n=r.getPublicKeyHex(),this.readPKCS8PubKeyHex(n)};var oY=new RegExp("[^0-9a-f]","gi");function p_(e,t){for(var r="",n=t/4-e.length,i=0;i<n;i++)r=r+"0";return r+e}it.prototype.sign=function(e,t){var r=function(i){return A.crypto.Util.hashString(i,t)},n=r(e);return this.signWithMessageHash(n,t)};it.prototype.signWithMessageHash=function(e,t){var r=A.crypto.Util.getPaddedDigestInfoHex(e,t,this.n.bitLength()),n=_i(r,16),i=this.doPrivate(n),a=i.toString(16);return p_(a,this.n.bitLength())};function g_(e,t,r){for(var n="",i=0;n.length<t;)n+=Di(r(ca(e+String.fromCharCode.apply(String,[(i&4278190080)>>24,(i&16711680)>>16,(i&65280)>>8,i&255])))),i+=1;return n}it.prototype.signPSS=function(e,t,r){var n=function(a){return A.crypto.Util.hashHex(a,t)},i=n(ca(e));return r===void 0&&(r=-1),this.signWithMessageHashPSS(i,t,r)};it.prototype.signWithMessageHashPSS=function(e,t,r){var n=Di(e),i=n.length,a=this.n.bitLength()-1,s=Math.ceil(a/8),u,l=function(y){return A.crypto.Util.hashHex(y,t)};if(r===-1||r===void 0)r=i;else if(r===-2)r=s-i-2;else if(r<-2)throw new Error("invalid salt length");if(s<i+r+2)throw new Error("data too long");var f="";r>0&&(f=new Array(r),new hc().nextBytes(f),f=String.fromCharCode.apply(String,f));var d=Di(l(ca("\0\0\0\0\0\0\0\0"+n+f))),g=[];for(u=0;u<s-r-i-2;u+=1)g[u]=0;var p=String.fromCharCode.apply(String,g)+""+f,h=g_(d,p.length,l),w=[];for(u=0;u<p.length;u+=1)w[u]=p.charCodeAt(u)^h.charCodeAt(u);var v=65280>>8*s-a&255;for(w[0]&=~v,u=0;u<i;u++)w.push(d.charCodeAt(u));return w.push(188),p_(this.doPrivate(new ee(w)).toString(16),this.n.bitLength())};function m_(e){for(var t in A.crypto.Util.DIGESTINFOHEAD){var r=A.crypto.Util.DIGESTINFOHEAD[t],n=r.length;if(e.substring(0,n)==r){var i=[t,e.substring(n)];return i}}return[]}it.prototype.verify=function(e,t){if(t=t.toLowerCase(),t.match(/^[0-9a-f]+$/)==null)return!1;var r=_i(t,16),n=this.n.bitLength();if(r.bitLength()>n)return!1;var i=this.doPublic(r),a=i.toString(16);if(a.length+3!=n/4)return!1;var s=a.replace(/^1f+00/,""),u=m_(s);if(u.length==0)return!1;var l=u[0],f=u[1],d=function(p){return A.crypto.Util.hashString(p,l)},g=d(e);return f==g};it.prototype.verifyWithMessageHash=function(e,t){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var r=_i(t,16);if(r.bitLength()>this.n.bitLength())return 0;var n=this.doPublic(r),i=n.toString(16).replace(/^1f+00/,""),a=m_(i);if(a.length==0)return!1;var s=a[0],u=a[1];return u==e};it.prototype.verifyPSS=function(e,t,r,n){var i=function(s){return A.crypto.Util.hashHex(s,r)},a=i(ca(e));return n===void 0&&(n=-1),this.verifyWithMessageHashPSS(a,t,r,n)};it.prototype.verifyWithMessageHashPSS=function(e,t,r,n){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var i=new ee(t,16),a=function(b){return A.crypto.Util.hashHex(b,r)},s=Di(e),u=s.length,l=this.n.bitLength()-1,f=Math.ceil(l/8),d;if(n===-1||n===void 0)n=u;else if(n===-2)n=f-u-2;else if(n<-2)throw new Error("invalid salt length");if(f<u+n+2)throw new Error("data too long");var g=this.doPublic(i).toByteArray();for(d=0;d<g.length;d+=1)g[d]&=255;for(;g.length<f;)g.unshift(0);if(g[f-1]!==188)throw new Error("encoded message does not end in 0xbc");g=String.fromCharCode.apply(String,g);var p=g.substr(0,f-u-1),h=g.substr(p.length,u),w=65280>>8*f-l&255;if(p.charCodeAt(0)&w)throw new Error("bits beyond keysize not zero");var v=g_(h,p.length,a),y=[];for(d=0;d<p.length;d+=1)y[d]=p.charCodeAt(d)^v.charCodeAt(d);y[0]&=~w;var m=f-u-n-2;for(d=0;d<m;d+=1)if(y[d]!==0)throw new Error("leftmost octets not zero");if(y[m]!==1)throw new Error("0x01 marker not found");return h===Di(a(ca("\0\0\0\0\0\0\0\0"+s+String.fromCharCode.apply(String,y.slice(-n)))))};it.SALT_LEN_HLEN=-1;it.SALT_LEN_MAX=-2;it.SALT_LEN_RECOVER=-2;function Xe(e){var t=_e,r=t.getChildIdx,n=t.getV,i=t.dump,a=t.parse,s=t.getTLV,u=t.getVbyList,l=t.getVbyListEx,f=t.getTLVbyList,d=t.getTLVbyListEx,g=t.getIdxbyList,p=t.getIdxbyListEx,h=t.getVidx,w=t.getInt,v=t.oidname,y=t.hextooidstr,m=Xe,b=yr,D,C=Error;try{D=A.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch{}this.HEX2STAG={"0c":"utf8",13:"prn",16:"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){if(this.hex===null||this.version!==0)return this.version;var S=f(this.hex,0,[0,0]);if(S.substr(0,2)=="a0"){var B=f(S,0,[0]),T=w(B,0);if(T<0||2<T)throw new Error("malformed version field");return this.version=T+1,this.version}else return this.version=1,this.foffset=-1,1},this.getSerialNumberHex=function(){return l(this.hex,0,[0,0],"02")},this.getSignatureAlgorithmField=function(){var S=d(this.hex,0,[0,1]);return this.getAlgorithmIdentifierName(S)},this.getAlgorithmIdentifierName=function(S){for(var B in D)if(S===D[B])return B;return v(l(S,0,[0],"06"))},this.getIssuer=function(S,B){return this.getX500Name(this.getIssuerHex(),S,B)},this.getIssuerHex=function(){return f(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){var S=this.getIssuer();return S.str},this.getSubject=function(S,B){return this.getX500Name(this.getSubjectHex(),S,B)},this.getSubjectHex=function(){return f(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){var S=this.getSubject();return S.str},this.getNotBefore=function(){var S=u(this.hex,0,[0,4+this.foffset,0]);return S=S.replace(/(..)/g,"%$1"),S=decodeURIComponent(S),S},this.getNotAfter=function(){var S=u(this.hex,0,[0,4+this.foffset,1]);return S=S.replace(/(..)/g,"%$1"),S=decodeURIComponent(S),S},this.getPublicKeyHex=function(){return this.getSPKI()},this.getSPKI=function(){return f(this.hex,0,[0,6+this.foffset],"30")},this.getSPKIValue=function(){var S=this.getSPKI();return S==null?null:u(S,0,[1],"03",!0)},this.getPublicKeyIdx=function(){return g(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var S=this.getPublicKeyIdx();return g(this.hex,S,[1,0],"30")},this.getPublicKey=function(){return Et.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){var S=f(this.hex,0,[1],"30");return this.getAlgorithmIdentifierName(S)},this.getSignatureValueHex=function(){return u(this.hex,0,[2],"03",!0)},this.verifySignature=function(S){var B=this.getSignatureAlgorithmField(),T=this.getSignatureValueHex(),U=f(this.hex,0,[0],"30"),V=new A.crypto.Signature({alg:B});return V.init(S),V.updateHex(U),V.verify(T)},this.parseExt=function(S){var B,T,U;if(S===void 0){if(U=this.hex,this.version!==3)return-1;B=g(U,0,[0,7,0],"30"),T=r(U,B)}else{U=yr(S);var V=g(U,0,[0,3,0,0],"06");if(n(U,V)!="2a864886f70d01090e"){this.aExtInfo=new Array;return}B=g(U,0,[0,3,0,1,0],"30"),T=r(U,B),this.hex=U}this.aExtInfo=new Array;for(var Y=0;Y<T.length;Y++){var H={};H.critical=!1;var z=r(U,T[Y]),W=0;z.length===3&&(H.critical=!0,W=1),H.oid=t.hextooidstr(u(U,T[Y],[0],"06"));var ie=g(U,T[Y],[1+W]);H.vidx=h(U,ie),this.aExtInfo.push(H)}},this.getExtInfo=function(S){var B=this.aExtInfo,T=S;if(S.match(/^[0-9.]+$/)||(T=A.asn1.x509.OID.name2oid(S)),T!==""){for(var U=0;U<B.length;U++)if(B[U].oid===T)return B[U]}},this.getCriticalExtV=function(S,B,T){if(B!=null)return[B,T];var U=this.getExtInfo(S);return U==null?[null,null]:[s(this.hex,U.vidx),U.critical]},this.getExtBasicConstraints=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("basicConstraints");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"basicConstraints"};if(B&&(U.critical=!0),S==="3000")return U;if(S==="30030101ff")return U.cA=!0,U;if(S.substr(0,12)==="30060101ff02"){var V=n(S,10),Y=parseInt(V,16);return U.cA=!0,U.pathLen=Y,U}throw new Error("hExtV parse error: "+S)},this.getExtNameConstraints=function(S,B){var T=this.getCriticalExtV("nameConstraints",S,B);if(S=T[0],B=T[1],S!=null){var U={extname:"nameConstraints"};B&&(U.critical=!0);for(var V=r(S,0),Y=0;Y<V.length;Y++){for(var H=[],z=r(S,V[Y]),W=0;W<z.length;W++){var ie=s(S,z[W]),Fe=this.getGeneralSubtree(ie);H.push(Fe)}var Se=S.substr(V[Y],2);Se=="a0"?U.permit=H:Se=="a1"&&(U.exclude=H)}return U}},this.getGeneralSubtree=function(S){var B=r(S,0),T=B.length;if(T<1||2<T)throw new Error("wrong num elements");for(var U=this.getGeneralName(s(S,B[0])),V=1;V<T;V++){var Y=S.substr(B[V],2),H=n(S,B[V]),z=parseInt(H,16);Y=="80"&&(U.min=z),Y=="81"&&(U.max=z)}return U},this.getExtKeyUsage=function(S,B){var T=this.getCriticalExtV("keyUsage",S,B);if(S=T[0],B=T[1],S!=null){var U={extname:"keyUsage"};return B&&(U.critical=!0),U.names=this.getExtKeyUsageString(S).split(","),U}},this.getExtKeyUsageBin=function(S){if(S===void 0){var B=this.getExtInfo("keyUsage");if(B===void 0)return"";S=s(this.hex,B.vidx)}if(S.length!=8&&S.length!=10)throw new Error("malformed key usage value: "+S);var T="000000000000000"+parseInt(S.substr(6),16).toString(2);return S.length==8&&(T=T.slice(-8)),S.length==10&&(T=T.slice(-16)),T=T.replace(/0+$/,""),T==""&&(T="0"),T},this.getExtKeyUsageString=function(S){for(var B=this.getExtKeyUsageBin(S),T=new Array,U=0;U<B.length;U++)B.substr(U,1)=="1"&&T.push(Xe.KEYUSAGE_NAME[U]);return T.join(",")},this.getExtSubjectKeyIdentifier=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("subjectKeyIdentifier");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"subjectKeyIdentifier"};B&&(U.critical=!0);var V=n(S,0);return U.kid={hex:V},U},this.getExtAuthorityKeyIdentifier=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("authorityKeyIdentifier");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"authorityKeyIdentifier"};B&&(U.critical=!0);for(var V=r(S,0),Y=0;Y<V.length;Y++){var H=S.substr(V[Y],2);if(H==="80"&&(U.kid={hex:n(S,V[Y])}),H==="a1"){var z=s(S,V[Y]),W=this.getGeneralNames(z);U.issuer=W[0].dn}H==="82"&&(U.sn={hex:n(S,V[Y])})}return U},this.getExtExtKeyUsage=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("extKeyUsage");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"extKeyUsage",array:[]};B&&(U.critical=!0);for(var V=r(S,0),Y=0;Y<V.length;Y++)U.array.push(v(n(S,V[Y])));return U},this.getExtExtKeyUsageName=function(){var S=this.getExtInfo("extKeyUsage");if(S===void 0)return S;var B=new Array,T=s(this.hex,S.vidx);if(T==="")return B;for(var U=r(T,0),V=0;V<U.length;V++)B.push(v(n(T,U[V])));return B},this.getExtSubjectAltName=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("subjectAltName");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"subjectAltName",array:[]};return B&&(U.critical=!0),U.array=this.getGeneralNames(S),U},this.getExtIssuerAltName=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("issuerAltName");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"issuerAltName",array:[]};return B&&(U.critical=!0),U.array=this.getGeneralNames(S),U},this.getGeneralNames=function(S){for(var B=r(S,0),T=[],U=0;U<B.length;U++){var V=this.getGeneralName(s(S,B[U]));V!==void 0&&T.push(V)}return T},this.getGeneralName=function(S){var B=S.substr(0,2),T=n(S,0),U=Di(T);if(B=="81")return{rfc822:U};if(B=="82")return{dns:U};if(B=="86")return{uri:U};if(B=="87")return{ip:w0(T)};if(B=="a4")return{dn:this.getX500Name(T)};if(B=="a0")return{other:this.getOtherName(S)}},this.getExtSubjectAltName2=function(){var S,B,T,U=this.getExtInfo("subjectAltName");if(U===void 0)return U;for(var V=new Array,Y=s(this.hex,U.vidx),H=r(Y,0),z=0;z<H.length;z++)T=Y.substr(H[z],2),S=n(Y,H[z]),T==="81"&&(B=Yt(S),V.push(["MAIL",B])),T==="82"&&(B=Yt(S),V.push(["DNS",B])),T==="84"&&(B=Xe.hex2dn(S,0),V.push(["DN",B])),T==="86"&&(B=Yt(S),V.push(["URI",B])),T==="87"&&(B=w0(S),V.push(["IP",B]));return V},this.getExtCRLDistributionPoints=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("cRLDistributionPoints");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"cRLDistributionPoints",array:[]};B&&(U.critical=!0);for(var V=r(S,0),Y=0;Y<V.length;Y++){var H=s(S,V[Y]);U.array.push(this.getDistributionPoint(H))}return U},this.getDistributionPoint=function(S){for(var B={},T=r(S,0),U=0;U<T.length;U++){var V=S.substr(T[U],2),Y=s(S,T[U]);V=="a0"&&(B.dpname=this.getDistributionPointName(Y))}return B},this.getDistributionPointName=function(S){for(var B={},T=r(S,0),U=0;U<T.length;U++){var V=S.substr(T[U],2),Y=s(S,T[U]);V=="a0"&&(B.full=this.getGeneralNames(Y))}return B},this.getExtCRLDistributionPointsURI=function(){var S=this.getExtCRLDistributionPoints();if(S==null)return S;for(var B=S.array,T=[],U=0;U<B.length;U++)try{B[U].dpname.full[0].uri!=null&&T.push(B[U].dpname.full[0].uri)}catch{}return T},this.getExtAIAInfo=function(){var S=this.getExtInfo("authorityInfoAccess");if(S===void 0)return S;for(var B={ocsp:[],caissuer:[]},T=r(this.hex,S.vidx),U=0;U<T.length;U++){var V=u(this.hex,T[U],[0],"06"),Y=u(this.hex,T[U],[1],"86");V==="2b06010505073001"&&B.ocsp.push(Yt(Y)),V==="2b06010505073002"&&B.caissuer.push(Yt(Y))}return B},this.getExtAuthorityInfoAccess=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("authorityInfoAccess");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"authorityInfoAccess",array:[]};B&&(U.critical=!0);for(var V=r(S,0),Y=0;Y<V.length;Y++){var H=l(S,V[Y],[0],"06"),z=u(S,V[Y],[1],"86"),W=Yt(z);if(H=="2b06010505073001")U.array.push({ocsp:W});else if(H=="2b06010505073002")U.array.push({caissuer:W});else throw new Error("unknown method: "+H)}return U},this.getExtCertificatePolicies=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("certificatePolicies");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"certificatePolicies",array:[]};B&&(U.critical=!0);for(var V=r(S,0),Y=0;Y<V.length;Y++){var H=s(S,V[Y]),z=this.getPolicyInformation(H);U.array.push(z)}return U},this.getPolicyInformation=function(S){var B={},T=u(S,0,[0],"06");B.policyoid=v(T);var U=p(S,0,[1],"30");if(U!=-1){B.array=[];for(var V=r(S,U),Y=0;Y<V.length;Y++){var H=s(S,V[Y]),z=this.getPolicyQualifierInfo(H);B.array.push(z)}}return B},this.getOtherName=function(S){var B={},T=r(S,0),U=u(S,T[0],[],"06"),V=u(S,T[1],[]);return B.oid=v(U),B.value=a(V),B},this.getPolicyQualifierInfo=function(S){var B={},T=u(S,0,[0],"06");if(T==="2b06010505070201"){var U=l(S,0,[1],"16");B.cps=Di(U)}else if(T==="2b06010505070202"){var V=f(S,0,[1],"30");B.unotice=this.getUserNotice(V)}return B},this.getUserNotice=function(S){var B=null,T={};try{B=t.parse(S);var U=this._asn1ToUnotice(B);return U}catch{return}},this._asn1ToUnotice=function(S){try{for(var B={},T=rr(S,"seq"),U=0;U<T.length;U++){var V=this._asn1ToNoticeRef(T[U]);V!=null&&(B.noticeref=V);var Y=this.asn1ToDisplayText(T[U]);Y!=null&&(B.exptext=Y)}return Object.keys(B).length>0?B:void 0}catch{return}},this._asn1ToNoticeRef=function(S){try{for(var B={},T=rr(S,"seq"),U=0;U<T.length;U++){var V=this._asn1ToNoticeNum(T[U]);V!=null&&(B.noticenum=V);var Y=this.asn1ToDisplayText(T[U]);Y!=null&&(B.org=Y)}return Object.keys(B).length>0?B:void 0}catch{return}},this._asn1ToNoticeNum=function(S){try{for(var B=rr(S,"seq"),T=[],U=0;U<B.length;U++){var V=B[U];T.push(parseInt(rr(V,"int.hex"),16))}return T}catch{return}},this.getDisplayText=function(S){var B={"0c":"utf8",16:"ia5","1a":"vis","1e":"bmp"},T={};return T.type=B[S.substr(0,2)],T.str=Di(n(S,0)),T},this.asn1ToDisplayText=function(S){if(S.utf8str!=null)return{type:"utf8",str:S.utf8str.str};if(S.ia5str!=null)return{type:"ia5",str:S.ia5str.str};if(S.visstr!=null)return{type:"vis",str:S.visstr.str};if(S.bmpstr!=null)return{type:"bmp",str:S.bmpstr.str};if(S.prnstr!=null)return{type:"prn",str:S.prnstr.str}},this.getExtPolicyMappings=function(S,B){var T=this.getCriticalExtV("policyMappings",S,B);if(S=T[0],B=T[1],S!=null){var U={extname:"policyMappings"};B&&(U.critical=!0);try{for(var V=a(S),Y=V.seq,H=[],z=0;z<Y.length;z++){var W=Y[z].seq;H.push([W[0].oid,W[1].oid])}U.array=H}catch{throw new C("malformed policyMappings")}return U}},this.getExtPolicyConstraints=function(S,B){var T=this.getCriticalExtV("policyConstraints",S,B);if(S=T[0],B=T[1],S!=null){var U={extname:"policyConstraints"};B&&(U.critical=!0);var V=a(S);try{for(var Y=V.seq,H=0;H<Y.length;H++){var z=Y[H].tag;z.explicit==!1&&(z.tag=="80"&&(U.reqexp=parseInt(z.hex,16)),z.tag=="81"&&(U.inhibit=parseInt(z.hex,16)))}}catch{return new C("malformed policyConstraints value")}return U}},this.getExtInhibitAnyPolicy=function(S,B){var T=this.getCriticalExtV("inhibitAnyPolicy",S,B);if(S=T[0],B=T[1],S!=null){var U={extname:"inhibitAnyPolicy"};B&&(U.critical=!0);var V=w(S,0);return V==-1?new C("wrong value"):(U.skip=V,U)}},this.getExtCRLNumber=function(S,B){var T={extname:"cRLNumber"};if(B&&(T.critical=!0),S.substr(0,2)=="02")return T.num={hex:n(S,0)},T;throw new C("hExtV parse error: "+S)},this.getExtCRLReason=function(S,B){var T={extname:"cRLReason"};if(B&&(T.critical=!0),S.substr(0,2)=="0a")return T.code=parseInt(n(S,0),16),T;throw new Error("hExtV parse error: "+S)},this.getExtOcspNonce=function(S,B){var T={extname:"ocspNonce"};B&&(T.critical=!0);var U=n(S,0);return T.hex=U,T},this.getExtOcspNoCheck=function(S,B){var T={extname:"ocspNoCheck"};return B&&(T.critical=!0),T},this.getExtAdobeTimeStamp=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("adobeTimeStamp");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"adobeTimeStamp"};B&&(U.critical=!0);var V=r(S,0);if(V.length>1){var Y=s(S,V[1]),H=this.getGeneralName(Y);H.uri!=null&&(U.uri=H.uri)}if(V.length>2){var z=s(S,V[2]);z=="0101ff"&&(U.reqauth=!0),z=="010100"&&(U.reqauth=!1)}return U},this.getExtSubjectDirectoryAttributes=function(S,B){if(S===void 0&&B===void 0){var T=this.getExtInfo("subjectDirectoryAttributes");if(T===void 0)return;S=s(this.hex,T.vidx),B=T.critical}var U={extname:"subjectDirectoryAttributes"};B&&(U.critical=!0);try{for(var V=a(S),Y=[],H=0;H<V.seq.length;H++){var z=V.seq[H],W=rr(z,"seq.0.oid"),ie=rr(z,"seq.1.set");if(W==null||ie==null)throw"error";Y.push({attr:W,array:ie})}return U.array=Y,U}catch{throw new Error("malformed subjectDirectoryAttributes extension value")}};var F=function(S){var B={};try{var T=S.seq[0].oid,U=A.asn1.x509.OID.name2oid(T);B.type=A.asn1.x509.OID.oid2atype(U);var V=S.seq[1];if(V.utf8str!=null)B.ds="utf8",B.value=V.utf8str.str;else if(V.numstr!=null)B.ds="num",B.value=V.numstr.str;else if(V.telstr!=null)B.ds="tel",B.value=V.telstr.str;else if(V.prnstr!=null)B.ds="prn",B.value=V.prnstr.str;else if(V.ia5str!=null)B.ds="ia5",B.value=V.ia5str.str;else if(V.visstr!=null)B.ds="vis",B.value=V.visstr.str;else if(V.bmpstr!=null)B.ds="bmp",B.value=V.bmpstr.str;else throw"error";return B}catch{throw new Erorr("improper ASN.1 parsed AttrTypeAndValue")}},L=function(S){try{return S.set.map(function(B){return F(B)})}catch(B){throw new Error("improper ASN.1 parsed RDN: "+B)}},N=function(S){try{return S.seq.map(function(B){return L(B)})}catch(B){throw new Error("improper ASN.1 parsed X500Name: "+B)}};this.getX500NameRule=function(S){for(var B=!0,T=!0,U=!1,V="",Y="",H=null,z=[],W=0;W<S.length;W++)for(var ie=S[W],Fe=0;Fe<ie.length;Fe++)z.push(ie[Fe]);for(var W=0;W<z.length;W++){var Se=z[W],Re=Se.ds,Je=Se.value,ue=Se.type;if(V+=":"+Re,Re!="prn"&&Re!="utf8"&&Re!="ia5")return"mixed";if(Re=="ia5"){if(ue!="CN")return"mixed";if(A.lang.String.isMail(Je))continue;return"mixed"}if(ue=="C"){if(Re=="prn")continue;return"mixed"}if(Y+=":"+Re,H==null)H=Re;else if(H!==Re)return"mixed"}return H??"prn"},this.getAttrTypeAndValue=function(S){var B=a(S);return F(B)},this.getRDN=function(S){var B=a(S);return L(B)},this.getX500NameArray=function(S){var B=a(S);return N(B)},this.getX500Name=function(S,B,T){var U=this.getX500NameArray(S),V=this.dnarraytostr(U),Y={str:V};return Y.array=U,T==!0&&(Y.hex=S),B==!0&&(Y.canon=this.c14nRDNArray(U)),Y},this.readCertPEM=function(S){this.readCertHex(b(S))},this.readCertHex=function(S){this.hex=S,this.getVersion();try{g(this.hex,0,[0,7],"a3"),this.parseExt()}catch{}},this.getParam=function(S){var B={};return S==null&&(S={}),B.version=this.getVersion(),B.serial={hex:this.getSerialNumberHex()},B.sigalg=this.getSignatureAlgorithmField(),B.issuer=this.getIssuer(S.dncanon,S.dnhex),B.notbefore=this.getNotBefore(),B.notafter=this.getNotAfter(),B.subject=this.getSubject(S.dncanon,S.dnhex),B.sbjpubkey=Mn(this.getPublicKeyHex(),"PUBLIC KEY"),this.aExtInfo!=null&&this.aExtInfo.length>0&&(B.ext=this.getExtParamArray()),B.sighex=this.getSignatureValueHex(),S.tbshex==!0&&(B.tbshex=f(this.hex,0,[0])),S.nodnarray==!0&&(delete B.issuer.array,delete B.subject.array),B},this.getExtParamArray=function(S){if(S==null){var B=p(this.hex,0,[0,"[3]"]);B!=-1&&(S=d(this.hex,0,[0,"[3]",0],"30"))}for(var T=[],U=r(S,0),V=0;V<U.length;V++){var Y=s(S,U[V]),H=this.getExtParam(Y);H!=null&&T.push(H)}return T},this.getExtParam=function(S){var B={},T=r(S,0),U=T.length;if(U!=2&&U!=3)throw new Error("wrong number elements in Extension: "+U+" "+S);var V=y(u(S,0,[0],"06")),Y=!1;U==3&&f(S,0,[1])=="0101ff"&&(Y=!0);var H=f(S,0,[U-1,0]),z=void 0;if(V=="2.5.29.14"?z=this.getExtSubjectKeyIdentifier(H,Y):V=="2.5.29.15"?z=this.getExtKeyUsage(H,Y):V=="2.5.29.17"?z=this.getExtSubjectAltName(H,Y):V=="2.5.29.18"?z=this.getExtIssuerAltName(H,Y):V=="2.5.29.19"?z=this.getExtBasicConstraints(H,Y):V=="2.5.29.30"?z=this.getExtNameConstraints(H,Y):V=="2.5.29.31"?z=this.getExtCRLDistributionPoints(H,Y):V=="2.5.29.32"?z=this.getExtCertificatePolicies(H,Y):V=="2.5.29.33"?z=this.getExtPolicyMappings(H,Y):V=="2.5.29.35"?z=this.getExtAuthorityKeyIdentifier(H,Y):V=="2.5.29.36"?z=this.getExtPolicyConstraints(H,Y):V=="2.5.29.37"?z=this.getExtExtKeyUsage(H,Y):V=="2.5.29.54"?z=this.getExtInhibitAnyPolicy(H,Y):V=="1.3.6.1.5.5.7.1.1"?z=this.getExtAuthorityInfoAccess(H,Y):V=="2.5.29.20"?z=this.getExtCRLNumber(H,Y):V=="2.5.29.21"?z=this.getExtCRLReason(H,Y):V=="2.5.29.9"?z=this.getExtSubjectDirectoryAttributes(H,Y):V=="1.3.6.1.5.5.7.48.1.2"?z=this.getExtOcspNonce(H,Y):V=="1.3.6.1.5.5.7.48.1.5"?z=this.getExtOcspNoCheck(H,Y):V=="1.2.840.113583.1.1.9.1"?z=this.getExtAdobeTimeStamp(H,Y):Xe.EXT_PARSER[V]!=null&&(z=Xe.EXT_PARSER[V](V,Y,H)),z!=null)return z;var W={extname:V,extn:H};try{W.extn=a(H)}catch{}return Y&&(W.critical=!0),W},this.findExt=function(S,B){for(var T=0;T<S.length;T++)if(S[T].extname==B)return S[T];return null},this.updateExtCDPFullURI=function(S,B){var T=this.findExt(S,"cRLDistributionPoints");if(T!=null&&T.array!=null){for(var U=T.array,V=0;V<U.length;V++)if(U[V].dpname!=null&&U[V].dpname.full!=null)for(var Y=U[V].dpname.full,H=0;H<Y.length;H++){var z=Y[V];z.uri!=null&&(z.uri=B)}}},this.updateExtAIAOCSP=function(S,B){var T=this.findExt(S,"authorityInfoAccess");if(T!=null&&T.array!=null)for(var U=T.array,V=0;V<U.length;V++)U[V].ocsp!=null&&(U[V].ocsp=B)},this.updateExtAIACAIssuer=function(S,B){var T=this.findExt(S,"authorityInfoAccess");if(T!=null&&T.array!=null)for(var U=T.array,V=0;V<U.length;V++)U[V].caissuer!=null&&(U[V].caissuer=B)},this.dnarraytostr=function(S){function B(U){return U.map(function(V){return T(V).replace(/\+/,"\\+")}).join("+")}function T(U){return U.type+"="+U.value}return"/"+S.map(function(U){return B(U).replace(/\//,"\\/")}).join("/")},this.setCanonicalizedDN=function(S){var B;if(S.str!=null&&S.array==null){var T=new A.asn1.x509.X500Name({str:S.str}),U=T.tohex();B=this.getX500NameArray(U)}else B=S.array;S.canon==null&&(S.canon=this.c14nRDNArray(B))},this.c14nRDNArray=function(S){for(var B=[],T=0;T<S.length;T++){for(var U=S[T],V=[],Y=0;Y<U.length;Y++){var H=U[Y],z=H.value;z=z.replace(/^\s*/,""),z=z.replace(/\s*$/,""),z=z.replace(/\s+/g," "),z=z.toLowerCase(),V.push(H.type.toLowerCase()+"="+z)}B.push(V.join("+"))}return"/"+B.join("/")},this.getInfo=function(){var S=function(cr){for(var ht="",Xt=" ",st=`
`,Ye=cr.array,fr=0;fr<Ye.length;fr++){var Me=Ye[fr];if(Me.dn!=null&&(ht+=Xt+"dn: "+Me.dn.str+st),Me.ip!=null&&(ht+=Xt+"ip: "+Me.ip+st),Me.rfc822!=null&&(ht+=Xt+"rfc822: "+Me.rfc822+st),Me.dns!=null&&(ht+=Xt+"dns: "+Me.dns+st),Me.uri!=null&&(ht+=Xt+"uri: "+Me.uri+st),Me.other!=null){var Nt=Me.other.oid,dn=JSON.stringify(Me.other.value).replace(/\"/g,"");ht+=Xt+"other: "+Nt+"="+dn+st}}return ht=ht.replace(/\n$/,""),ht},B=function(cr){for(var ht="",Xt=cr.array,st=0;st<Xt.length;st++){var Ye=Xt[st];if(ht+=" policy oid: "+Ye.policyoid+`
`,Ye.array!==void 0)for(var fr=0;fr<Ye.array.length;fr++){var Me=Ye.array[fr];Me.cps!==void 0&&(ht+=" cps: "+Me.cps+`
`)}}return ht},T=function(cr){for(var ht="",Xt=cr.array,st=0;st<Xt.length;st++){var Ye=Xt[st];try{Ye.dpname.full[0].uri!==void 0&&(ht+=" "+Ye.dpname.full[0].uri+`
`)}catch{}try{Ye.dname.full[0].dn.hex!==void 0&&(ht+=" "+Xe.hex2dn(Ye.dpname.full[0].dn.hex)+`
`)}catch{}}return ht},U=function(cr){for(var ht="",Xt=cr.array,st=0;st<Xt.length;st++){var Ye=Xt[st];Ye.caissuer!==void 0&&(ht+=" caissuer: "+Ye.caissuer+`
`),Ye.ocsp!==void 0&&(ht+=" ocsp: "+Ye.ocsp+`
`)}return ht},V=Xe,Y,H,z;if(Y=`Basic Fields
`,Y+=" serial number: "+this.getSerialNumberHex()+`
`,Y+=" signature algorithm: "+this.getSignatureAlgorithmField()+`
`,Y+=" issuer: "+this.getIssuerString()+`
`,Y+=" notBefore: "+this.getNotBefore()+`
`,Y+=" notAfter: "+this.getNotAfter()+`
`,Y+=" subject: "+this.getSubjectString()+`
`,Y+=` subject public key info:
`,H=this.getPublicKey(),Y+=" key algorithm: "+H.type+`
`,H.type==="RSA"&&(Y+=" n="+rm(H.n.toString(16)).substr(0,16)+`...
`,Y+=" e="+rm(H.e.toString(16))+`
`),z=this.aExtInfo,z!=null){Y+=`X509v3 Extensions:
`;for(var W=0;W<z.length;W++){var ie=z[W],Fe=A.asn1.x509.OID.oid2name(ie.oid);Fe===""&&(Fe=ie.oid);var Se="";if(ie.critical===!0&&(Se="CRITICAL"),Y+=" "+Fe+" "+Se+`:
`,Fe==="basicConstraints"){var Re=this.getExtBasicConstraints();Re.cA===void 0?Y+=` {}
`:(Y+=" cA=true",Re.pathLen!==void 0&&(Y+=", pathLen="+Re.pathLen),Y+=`
`)}else if(Fe=="policyMappings"){var Je=this.getExtPolicyMappings().array,ue=Je.map(function(cr){var ht=cr;return ht[0]+":"+ht[1]}).join(", ");Y+=" "+ue+`
`}else if(Fe=="policyConstraints"){var Ce=this.getExtPolicyConstraints();Y+=" ",Ce.reqexp!=null&&(Y+=" reqexp="+Ce.reqexp),Ce.inhibit!=null&&(Y+=" inhibit="+Ce.inhibit),Y+=`
`}else if(Fe=="inhibitAnyPolicy"){var Ce=this.getExtInhibitAnyPolicy();Y+=" skip="+Ce.skip+`
`}else if(Fe=="keyUsage")Y+=" "+this.getExtKeyUsageString()+`
`;else if(Fe=="subjectKeyIdentifier")Y+=" "+this.getExtSubjectKeyIdentifier().kid.hex+`
`;else if(Fe=="authorityKeyIdentifier"){var Ue=this.getExtAuthorityKeyIdentifier();Ue.kid!==void 0&&(Y+=" kid="+Ue.kid.hex+`
`)}else if(Fe=="extKeyUsage"){var or=this.getExtExtKeyUsage().array;Y+=" "+or.join(", ")+`
`}else if(Fe=="subjectAltName"){var $t=S(this.getExtSubjectAltName());Y+=$t+`
`}else if(Fe=="cRLDistributionPoints"){var _t=this.getExtCRLDistributionPoints();Y+=T(_t)}else if(Fe=="authorityInfoAccess"){var Dr=this.getExtAuthorityInfoAccess();Y+=U(Dr)}else Fe=="certificatePolicies"&&(Y+=B(this.getExtCertificatePolicies()))}}return Y+="signature algorithm: "+this.getSignatureAlgorithmName()+`
`,Y+="signature: "+this.getSignatureValueHex().substr(0,16)+`...
`,Y},typeof e=="string"&&(e.indexOf("-----BEGIN")!=-1?this.readCertPEM(e):A.lang.String.isHex(e)&&this.readCertHex(e))}Xe.EXT_PARSER={};Xe.registExtParser=function(e,t){Xe.EXT_PARSER[e]=t};Xe.hex2dn=function(e,t){t===void 0&&(t=0);var r=new Xe,n=_e.getTLV(e,t),i=r.getX500Name(e);return i.str};Xe.hex2rdn=function(e,t){if(t===void 0&&(t=0),e.substr(t,2)!=="31")throw new Error("malformed RDN");for(var r=new Array,n=_e.getChildIdx(e,t),i=0;i<n.length;i++)r.push(Xe.hex2attrTypeValue(e,n[i]));return r=r.map(function(a){return a.replace("+","\\+")}),r.join("+")};Xe.hex2attrTypeValue=function(e,t){var r=_e,n=r.getV;if(t===void 0&&(t=0),e.substr(t,2)!=="30")throw new Error("malformed attribute type and value");var i=r.getChildIdx(e,t);i.length!==2||e.substr(i[0],2);var a=n(e,i[0]),s=A.asn1.ASN1Util.oidHexToInt(a),u=A.asn1.x509.OID.oid2atype(s),l=n(e,i[1]),f=Di(l);return u+"="+f};Xe.getPublicKeyFromCertHex=function(e){var t=new Xe;return t.readCertHex(e),t.getPublicKey()};Xe.getPublicKeyFromCertPEM=function(e){var t=new Xe;return t.readCertPEM(e),t.getPublicKey()};Xe.getPublicKeyInfoPropOfCertPEM=function(e){var t=_e,r=t.getVbyList,n={},i,a,s;return n.algparam=null,i=new Xe,i.readCertPEM(e),a=i.getPublicKeyHex(),n.keyhex=r(a,0,[1],"03").substr(2),n.algoid=r(a,0,[0,0],"06"),n.algoid==="2a8648ce3d0201"&&(n.algparam=r(a,0,[0,1],"06")),n};Xe.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"];var ik=function(e){var t=A,r=t.lang.String.isHex,n=_e,i=n.getV,a=n.getTLV,s=n.getVbyList,u=n.getTLVbyList,l=n.getTLVbyListEx,f=n.getIdxbyList,d=n.getIdxbyListEx,g=n.getChildIdx,p=new Xe;this.hex=null,this.posSigAlg=null,this.posRevCert=null,this.parsed=null,this._setPos=function(){var h=f(this.hex,0,[0,0]),w=this.hex.substr(h,2);if(w=="02")this.posSigAlg=1;else if(w=="30")this.posSigAlg=0;else throw new Error("malformed 1st item of TBSCertList: "+w);var v=f(this.hex,0,[0,this.posSigAlg+3]),y=this.hex.substr(v,2);if(y=="17"||y=="18"){var m,b;m=f(this.hex,0,[0,this.posSigAlg+4]),this.posRevCert=null,m!=-1&&(b=this.hex.substr(m,2),b=="30"&&(this.posRevCert=this.posSigAlg+4))}else if(y=="30")this.posRevCert=this.posSigAlg+3;else if(y=="a0")this.posRevCert=null;else throw new Error("malformed nextUpdate or revCert tag: "+y)},this.getVersion=function(){return this.posSigAlg==0?null:parseInt(s(this.hex,0,[0,0],"02"),16)+1},this.getSignatureAlgorithmField=function(){var h=u(this.hex,0,[0,this.posSigAlg],"30");return p.getAlgorithmIdentifierName(h)},this.getIssuer=function(){return p.getX500Name(this.getIssuerHex())},this.getIssuerHex=function(){return u(this.hex,0,[0,this.posSigAlg+1],"30")},this.getThisUpdate=function(){var h=s(this.hex,0,[0,this.posSigAlg+2]);return result=Di(h)},this.getNextUpdate=function(){var h=f(this.hex,0,[0,this.posSigAlg+3]),w=this.hex.substr(h,2);return w!="17"&&w!="18"?null:Di(i(this.hex,h))},this.getRevCertArray=function(){if(this.posRevCert==null)return null;for(var h=[],w=f(this.hex,0,[0,this.posRevCert]),v=g(this.hex,w),y=0;y<v.length;y++){var m=a(this.hex,v[y]);h.push(this.getRevCert(m))}return h},this.getRevCert=function(h){var w={},v=g(h,0);return w.sn={hex:s(h,0,[0],"02")},w.date=Di(s(h,0,[1])),v.length==3&&(w.ext=p.getExtParamArray(u(h,0,[2]))),w},this.findRevCert=function(h){var w=new Xe(h),v=w.getSerialNumberHex();return this.findRevCertBySN(v)},this.findRevCertBySN=function(h){if(this.parsed==null&&this.getParam(),this.parsed.revcert==null)return null;for(var w=this.parsed.revcert,v=0;v<w.length;v++)if(h==w[v].sn.hex)return w[v];return null},this.getSignatureValueHex=function(){return s(this.hex,0,[2],"03",!0)},this.verifySignature=function(h){var w=this.getSignatureAlgorithmField(),v=this.getSignatureValueHex(),y=u(this.hex,0,[0],"30"),m=new A.crypto.Signature({alg:w});return m.init(h),m.updateHex(y),m.verify(v)},this.getParam=function(h){var w={},v=this.getVersion();v!=null&&(w.version=v),w.sigalg=this.getSignatureAlgorithmField(),w.issuer=this.getIssuer(),w.thisupdate=this.getThisUpdate();var y=this.getNextUpdate();y!=null&&(w.nextupdate=y);var m=this.getRevCertArray();m!=null&&(w.revcert=m);var b=d(this.hex,0,[0,"[0]"]);if(b!=-1){var D=l(this.hex,0,[0,"[0]",0]);w.ext=p.getExtParamArray(D)}return w.sighex=this.getSignatureValueHex(),this.parsed=w,typeof h=="object"&&(h.tbshex==!0&&(w.tbshex=u(this.hex,0,[0])),h.nodnarray==!0&&delete w.issuer.array),w},typeof e=="string"&&(r(e)?this.hex=e:e.match(/-----BEGIN X509 CRL/)&&(this.hex=yr(e)),this._setPos())};(typeof A>"u"||!A)&&(A={});(typeof A.jws>"u"||!A.jws)&&(A.jws={});A.jws.JWS=function(){var e=A,t=e.jws.JWS,r=t.isSafeJSONString;this.parseJWS=function(n,i){if(!(this.parsedJWS!==void 0&&(i||this.parsedJWS.sigvalH!==void 0))){var a=n.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(a==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var s=a[1],u=a[2],l=a[3],f=s+"."+u;if(this.parsedJWS={},this.parsedJWS.headB64U=s,this.parsedJWS.payloadB64U=u,this.parsedJWS.sigvalB64U=l,this.parsedJWS.si=f,!i){var d=pr(l),g=_i(d,16);this.parsedJWS.sigvalH=d,this.parsedJWS.sigvalBI=g}var p=Bs(s),h=Bs(u);if(this.parsedJWS.headS=p,this.parsedJWS.payloadS=h,!r(p,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+p}}};A.jws.JWS.sign=function(e,t,r,n,i){var a=A,s=a.jws,u=s.JWS,l=u.readSafeJSONString,f=u.isSafeJSONString,d=a.crypto,g=d.ECDSA,p=d.Mac,h=d.Signature,w=JSON,v,y,m;if(typeof t!="string"&&typeof t!="object")throw"spHeader must be JSON string or object: "+t;if(typeof t=="object"&&(y=t,v=w.stringify(y)),typeof t=="string"){if(v=t,!f(v))throw"JWS Head is not safe JSON string: "+v;y=l(v)}if(m=r,typeof r=="object"&&(m=w.stringify(r)),(e==""||e==null)&&y.alg!==void 0&&(e=y.alg),e!=""&&e!=null&&y.alg===void 0&&(y.alg=e,v=w.stringify(y)),e!==y.alg)throw"alg and sHeader.alg doesn't match: "+e+"!="+y.alg;var b=null;if(u.jwsalg2sigalg[e]===void 0)throw"unsupported alg name: "+e;b=u.jwsalg2sigalg[e];var D=Tf(v),C=Tf(m),F=D+"."+C,L="";if(b.substr(0,4)=="Hmac"){if(n===void 0)throw"mac key shall be specified for HS* alg";var N=new p({alg:b,prov:"cryptojs",pass:n});N.updateString(F),L=N.doFinal()}else if(b.indexOf("withECDSA")!=-1){var S=new h({alg:b});S.init(n,i),S.updateString(F);var B=S.sign();L=A.crypto.ECDSA.asn1SigToConcatSig(B)}else if(b!="none"){var S=new h({alg:b});S.init(n,i),S.updateString(F),L=S.sign()}var T=Qr(L);return F+"."+T};A.jws.JWS.verify=function(e,t,r){var n=A,i=n.jws,a=i.JWS,s=a.readSafeJSONString,u=n.crypto,l=u.ECDSA,f=u.Mac,d=u.Signature,g;if(typeof it!==void 0&&(g=it),!fm(e))return!1;var p=e.split(".");if(p.length!==3)return!1;var h=p[0],w=p[1],v=h+"."+w,y=pr(p[2]),m=s(Bs(p[0])),b=null,D=null;if(m.alg===void 0)throw"algorithm not specified in header";if(b=m.alg,D=b.substr(0,2),r!=null&&Object.prototype.toString.call(r)==="[object Array]"&&r.length>0){var C=":"+r.join(":")+":";if(C.indexOf(":"+b+":")==-1)throw"algorithm '"+b+"' not accepted in the list"}if(b!="none"&&t===null)throw"key shall be specified to verify.";if(typeof t=="string"&&t.indexOf("-----BEGIN ")!=-1&&(t=Et.getKey(t)),(D=="RS"||D=="PS")&&!(t instanceof g))throw"key shall be a RSAKey obj for RS* and PS* algs";if(D=="ES"&&!(t instanceof l))throw"key shall be a ECDSA obj for ES* algs";b=="none";var F=null;if(a.jwsalg2sigalg[m.alg]===void 0)throw"unsupported alg name: "+b;if(F=a.jwsalg2sigalg[b],F=="none")throw"not supported";if(F.substr(0,4)=="Hmac"){var L=null;if(t===void 0)throw"hexadecimal key shall be specified for HMAC";var N=new f({alg:F,pass:t});return N.updateString(v),L=N.doFinal(),y==L}else if(F.indexOf("withECDSA")!=-1){var S=null;try{S=l.concatSigToASN1Sig(y)}catch{return!1}var B=new d({alg:F});return B.init(t),B.updateString(v),B.verify(S)}else{var B=new d({alg:F});return B.init(t),B.updateString(v),B.verify(y)}};A.jws.JWS.parse=function(e){var t=e.split("."),r={},n,i,a;if(t.length!=2&&t.length!=3)throw"malformed sJWS: wrong number of '.' splitted elements";return n=t[0],i=t[1],t.length==3&&(a=t[2]),r.headerObj=A.jws.JWS.readSafeJSONString(Bs(n)),r.payloadObj=A.jws.JWS.readSafeJSONString(Bs(i)),r.headerPP=JSON.stringify(r.headerObj,null," "),r.payloadObj==null?r.payloadPP=Bs(i):r.payloadPP=JSON.stringify(r.payloadObj,null," "),a!==void 0&&(r.sigHex=pr(a)),r};A.jws.JWS.verifyJWT=function(e,t,r){var n=A,i=n.jws,a=i.JWS,s=a.readSafeJSONString,u=a.inArray,l=a.includedArray;if(!fm(e))return!1;var f=e.split(".");if(f.length!=3)return!1;var d=f[0],g=f[1],p=d+"."+g,h=pr(f[2]),w=s(Bs(d)),v=s(Bs(g));if(w.alg===void 0)return!1;if(r.alg===void 0)throw"acceptField.alg shall be specified";if(!u(w.alg,r.alg)||v.iss!==void 0&&typeof r.iss=="object"&&!u(v.iss,r.iss)||v.sub!==void 0&&typeof r.sub=="object"&&!u(v.sub,r.sub))return!1;if(v.aud!==void 0&&typeof r.aud=="object"){if(typeof v.aud=="string"){if(!u(v.aud,r.aud))return!1}else if(typeof v.aud=="object"&&!l(v.aud,r.aud))return!1}var y=i.IntDate.getNow();return r.verifyAt!==void 0&&typeof r.verifyAt=="number"&&(y=r.verifyAt),(r.gracePeriod===void 0||typeof r.gracePeriod!="number")&&(r.gracePeriod=0),!(v.exp!==void 0&&typeof v.exp=="number"&&v.exp+r.gracePeriod<y||v.nbf!==void 0&&typeof v.nbf=="number"&&y<v.nbf-r.gracePeriod||v.iat!==void 0&&typeof v.iat=="number"&&y<v.iat-r.gracePeriod||v.jti!==void 0&&r.jti!==void 0&&v.jti!==r.jti||!a.verify(e,t,r.alg))};A.jws.JWS.includedArray=function(e,t){var r=A.jws.JWS.inArray;if(e===null||typeof e!="object"||typeof e.length!="number")return!1;for(var n=0;n<e.length;n++)if(!r(e[n],t))return!1;return!0};A.jws.JWS.inArray=function(e,t){if(t===null||typeof t!="object"||typeof t.length!="number")return!1;for(var r=0;r<t.length;r++)if(t[r]==e)return!0;return!1};A.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",ES512:"SHA512withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"};A.jws.JWS.isSafeJSONString=function(e,t,r){var n=null;try{return n=r_(e),typeof n!="object"||n.constructor===Array?0:(t&&(t[r]=n),1)}catch{return 0}};A.jws.JWS.readSafeJSONString=function(e){var t=null;try{return t=r_(e),typeof t!="object"||t.constructor===Array?null:t}catch{return null}};A.jws.JWS.getEncodedSignatureValueFromJWS=function(e){var t=e.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(t==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return t[1]};A.jws.JWS.getJWKthumbprint=function(e){if(e.kty!=="RSA"&&e.kty!=="EC"&&e.kty!=="oct")throw"unsupported algorithm for JWK Thumprint";var t="{";if(e.kty==="RSA"){if(typeof e.n!="string"||typeof e.e!="string")throw"wrong n and e value for RSA key";t+='"e":"'+e.e+'",',t+='"kty":"'+e.kty+'",',t+='"n":"'+e.n+'"}'}else if(e.kty==="EC"){if(typeof e.crv!="string"||typeof e.x!="string"||typeof e.y!="string")throw"wrong crv, x and y value for EC key";t+='"crv":"'+e.crv+'",',t+='"kty":"'+e.kty+'",',t+='"x":"'+e.x+'",',t+='"y":"'+e.y+'"}'}else if(e.kty==="oct"){if(typeof e.k!="string")throw"wrong k value for oct(symmetric) key";t+='"kty":"'+e.kty+'",',t+='"k":"'+e.k+'"}'}var r=ca(t),n=A.crypto.Util.hashHex(r,"sha256"),i=Qr(n);return i};A.jws.IntDate={};A.jws.IntDate.get=function(e){var t=A.jws.IntDate,r=t.getNow,n=t.getZulu;if(e=="now")return r();if(e=="now + 1hour")return r()+60*60;if(e=="now + 1day")return r()+60*60*24;if(e=="now + 1month")return r()+60*60*24*30;if(e=="now + 1year")return r()+60*60*24*365;if(e.match(/Z$/))return n(e);if(e.match(/^[0-9]+$/))return parseInt(e);throw"unsupported format: "+e};A.jws.IntDate.getZulu=function(e){return a_(e)};A.jws.IntDate.getNow=function(){var e=~~(new Date/1e3);return e};A.jws.IntDate.intDate2UTCString=function(e){var t=new Date(e*1e3);return t.toUTCString()};A.jws.IntDate.intDate2Zulu=function(e){var t=new Date(e*1e3),r=("0000"+t.getUTCFullYear()).slice(-4),n=("00"+(t.getUTCMonth()+1)).slice(-2),i=("00"+t.getUTCDate()).slice(-2),a=("00"+t.getUTCHours()).slice(-2),s=("00"+t.getUTCMinutes()).slice(-2),u=("00"+t.getUTCSeconds()).slice(-2);return r+n+i+a+s+u+"Z"};(typeof A>"u"||!A)&&(A={});(typeof A.jws>"u"||!A.jws)&&(A.jws={});A.jws.JWSJS=function(){var e=A,t=e.jws,r=t.JWS,n=r.readSafeJSONString;this.aHeader=[],this.sPayload="",this.aSignature=[],this.init=function(){this.aHeader=[],this.sPayload=void 0,this.aSignature=[]},this.initWithJWS=function(i){this.init();var a=i.split(".");if(a.length!=3)throw"malformed input JWS";this.aHeader.push(a[0]),this.sPayload=a[1],this.aSignature.push(a[2])},this.addSignature=function(i,a,s,u){if(this.sPayload===void 0||this.sPayload===null)throw"there's no JSON-JS signature to add.";var l=this.aHeader.length;if(this.aHeader.length!=this.aSignature.length)throw"aHeader.length != aSignature.length";try{var f=A.jws.JWS.sign(i,a,this.sPayload,s,u),d=f.split("."),g=d[0],p=d[2];this.aHeader.push(d[0]),this.aSignature.push(d[2])}catch(h){throw this.aHeader.length>l&&this.aHeader.pop(),this.aSignature.length>l&&this.aSignature.pop(),"addSignature failed: "+h}},this.verifyAll=function(i){if(this.aHeader.length!==i.length||this.aSignature.length!==i.length)return!1;for(var a=0;a<i.length;a++){var s=i[a];if(s.length!==2)return!1;var u=this.verifyNth(a,s[0],s[1]);if(u===!1)return!1}return!0},this.verifyNth=function(i,a,s){if(this.aHeader.length<=i||this.aSignature.length<=i)return!1;var u=this.aHeader[i],l=this.aSignature[i],f=u+"."+this.sPayload+"."+l,d=!1;try{d=r.verify(f,a,s)}catch{return!1}return d},this.readJWSJS=function(i){if(typeof i=="string"){var a=n(i);if(a==null)throw"argument is not safe JSON object string";this.aHeader=a.headers,this.sPayload=a.payload,this.aSignature=a.signatures}else try{if(i.headers.length>0)this.aHeader=i.headers;else throw"malformed header";if(typeof i.payload=="string")this.sPayload=i.payload;else throw"malformed signatures";if(i.signatures.length>0)this.aSignature=i.signatures;else throw"malformed signatures"}catch(s){throw"malformed JWS-JS JSON object: "+s}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return this.aHeader.length==0?1:0}};De.SecureRandom=hc;De.rng_seed_time=am;De.BigInteger=ee;De.RSAKey=it;De.ECDSA=A.crypto.ECDSA;De.DSA=A.crypto.DSA;De.Signature=A.crypto.Signature;De.MessageDigest=A.crypto.MessageDigest;De.Mac=A.crypto.Mac;De.KEYUTIL=Et;De.ASN1HEX=_e;De.X509=Xe;De.X509CRL=ik;De.CryptoJS=Be;De.b64tohex=lc;De.b64toBA=Jy;De.ECFieldElementFp=en;De.ECPointFp=Ut;De.ECCurveFp=nu;De.stoBA=n_;De.BAtos=i_;De.BAtohex=_0;De.stohex=Ci;De.stob64=LO;De.stob64u=UO;De.b64utos=jO;De.b64tob64u=oc;De.b64utob64=kf;De.hex2b64=ru;De.hextob64u=Qr;De.b64utohex=pr;De.utf8tob64u=Tf;De.b64utoutf8=Bs;De.utf8tob64=HO;De.b64toutf8=MO;De.utf8tohex=C0;De.hextoutf8=Yt;De.hextorstr=Di;De.rstrtohex=ca;De.hextob64=um;De.hextob64nl=KO;De.b64nltohex=s_;De.hextopem=Mn;De.pemtohex=yr;De.hextoArrayBuffer=YO;De.ArrayBuffertohex=WO;De.zulutomsec=om;De.msectozulu=XO;De.zulutosec=a_;De.zulutodate=JO;De.datetozulu=ZO;De.uricmptohex=F0;De.hextouricmp=S0;De.ipv6tohex=em;De.hextoipv6=tm;De.hextoip=w0;De.iptohex=lm;De.ucs2hextoutf8=cm;De.encodeURIComponentAll=I0;De.newline_toUnix=QO;De.newline_toDos=ek;De.hextoposhex=rm;De.intarystrtohex=tk;De.strdiffidx=rk;De.oidtohex=l_;De.hextooid=B0;De.strpad=A0;De.bitstrtoint=f_;De.inttobitstr=h_;De.bitstrtobinstr=d_;De.binstrtobitstr=nk;De.isBase64URLDot=fm;De.namearraytobinstr=E0;De.extendClass=ge;De.foldnl=D0;De.b64topem=zO;De.pemtob64=GO;De.timeogen=u_;De.aryval=rr;De.inttohex=c_;De.twoscompl=Nf;De.KJUR=A;De.crypto=A.crypto;De.asn1=A.asn1;De.jws=A.jws;De.lang=A.lang;De.VERSION=dx;De.VERSION_FULL=px});var E_=de(pm=>{"use strict";pm.toString=function(e){switch(e){case 1:return"A";case 10:return"NULL";case 28:return"AAAA";case 18:return"AFSDB";case 42:return"APL";case 257:return"CAA";case 60:return"CDNSKEY";case 59:return"CDS";case 37:return"CERT";case 5:return"CNAME";case 49:return"DHCID";case 32769:return"DLV";case 39:return"DNAME";case 48:return"DNSKEY";case 43:return"DS";case 55:return"HIP";case 13:return"HINFO";case 45:return"IPSECKEY";case 25:return"KEY";case 36:return"KX";case 29:return"LOC";case 15:return"MX";case 35:return"NAPTR";case 2:return"NS";case 47:return"NSEC";case 50:return"NSEC3";case 51:return"NSEC3PARAM";case 12:return"PTR";case 46:return"RRSIG";case 17:return"RP";case 24:return"SIG";case 6:return"SOA";case 99:return"SPF";case 33:return"SRV";case 44:return"SSHFP";case 32768:return"TA";case 249:return"TKEY";case 52:return"TLSA";case 250:return"TSIG";case 16:return"TXT";case 252:return"AXFR";case 251:return"IXFR";case 41:return"OPT";case 255:return"ANY"}return"UNKNOWN_"+e};pm.toType=function(e){switch(e.toUpperCase()){case"A":return 1;case"NULL":return 10;case"AAAA":return 28;case"AFSDB":return 18;case"APL":return 42;case"CAA":return 257;case"CDNSKEY":return 60;case"CDS":return 59;case"CERT":return 37;case"CNAME":return 5;case"DHCID":return 49;case"DLV":return 32769;case"DNAME":return 39;case"DNSKEY":return 48;case"DS":return 43;case"HIP":return 55;case"HINFO":return 13;case"IPSECKEY":return 45;case"KEY":return 25;case"KX":return 36;case"LOC":return 29;case"MX":return 15;case"NAPTR":return 35;case"NS":return 2;case"NSEC":return 47;case"NSEC3":return 50;case"NSEC3PARAM":return 51;case"PTR":return 12;case"RRSIG":return 46;case"RP":return 17;case"SIG":return 24;case"SOA":return 6;case"SPF":return 99;case"SRV":return 33;case"SSHFP":return 44;case"TA":return 32768;case"TKEY":return 249;case"TLSA":return 52;case"TSIG":return 250;case"TXT":return 16;case"AXFR":return 252;case"IXFR":return 251;case"OPT":return 41;case"ANY":return 255;case"*":return 255}return e.toUpperCase().startsWith("UNKNOWN_")?parseInt(e.slice(8)):0}});var b_=de(gm=>{"use strict";gm.toString=function(e){switch(e){case 0:return"NOERROR";case 1:return"FORMERR";case 2:return"SERVFAIL";case 3:return"NXDOMAIN";case 4:return"NOTIMP";case 5:return"REFUSED";case 6:return"YXDOMAIN";case 7:return"YXRRSET";case 8:return"NXRRSET";case 9:return"NOTAUTH";case 10:return"NOTZONE";case 11:return"RCODE_11";case 12:return"RCODE_12";case 13:return"RCODE_13";case 14:return"RCODE_14";case 15:return"RCODE_15"}return"RCODE_"+e};gm.toRcode=function(e){switch(e.toUpperCase()){case"NOERROR":return 0;case"FORMERR":return 1;case"SERVFAIL":return 2;case"NXDOMAIN":return 3;case"NOTIMP":return 4;case"REFUSED":return 5;case"YXDOMAIN":return 6;case"YXRRSET":return 7;case"NXRRSET":return 8;case"NOTAUTH":return 9;case"NOTZONE":return 10;case"RCODE_11":return 11;case"RCODE_12":return 12;case"RCODE_13":return 13;case"RCODE_14":return 14;case"RCODE_15":return 15}return 0}});var y_=de(mm=>{"use strict";mm.toString=function(e){switch(e){case 0:return"QUERY";case 1:return"IQUERY";case 2:return"STATUS";case 3:return"OPCODE_3";case 4:return"NOTIFY";case 5:return"UPDATE";case 6:return"OPCODE_6";case 7:return"OPCODE_7";case 8:return"OPCODE_8";case 9:return"OPCODE_9";case 10:return"OPCODE_10";case 11:return"OPCODE_11";case 12:return"OPCODE_12";case 13:return"OPCODE_13";case 14:return"OPCODE_14";case 15:return"OPCODE_15"}return"OPCODE_"+e};mm.toOpcode=function(e){switch(e.toUpperCase()){case"QUERY":return 0;case"IQUERY":return 1;case"STATUS":return 2;case"OPCODE_3":return 3;case"NOTIFY":return 4;case"UPDATE":return 5;case"OPCODE_6":return 6;case"OPCODE_7":return 7;case"OPCODE_8":return 8;case"OPCODE_9":return 9;case"OPCODE_10":return 10;case"OPCODE_11":return 11;case"OPCODE_12":return 12;case"OPCODE_13":return 13;case"OPCODE_14":return 14;case"OPCODE_15":return 15}return 0}});var __=de(vm=>{"use strict";vm.toString=function(e){switch(e){case 1:return"IN";case 2:return"CS";case 3:return"CH";case 4:return"HS";case 255:return"ANY"}return"UNKNOWN_"+e};vm.toClass=function(e){switch(e.toUpperCase()){case"IN":return 1;case"CS":return 2;case"CH":return 3;case"HS":return 4;case"ANY":return 255}return 0}});var C_=de(wm=>{"use strict";wm.toString=function(e){switch(e){case 1:return"LLQ";case 2:return"UL";case 3:return"NSID";case 5:return"DAU";case 6:return"DHU";case 7:return"N3U";case 8:return"CLIENT_SUBNET";case 9:return"EXPIRE";case 10:return"COOKIE";case 11:return"TCP_KEEPALIVE";case 12:return"PADDING";case 13:return"CHAIN";case 14:return"KEY_TAG";case 26946:return"DEVICEID"}return e<0?null:`OPTION_${e}`};wm.toCode=function(e){if(typeof e=="number")return e;if(!e)return-1;switch(e.toUpperCase()){case"OPTION_0":return 0;case"LLQ":return 1;case"UL":return 2;case"NSID":return 3;case"OPTION_4":return 4;case"DAU":return 5;case"DHU":return 6;case"N3U":return 7;case"CLIENT_SUBNET":return 8;case"EXPIRE":return 9;case"COOKIE":return 10;case"TCP_KEEPALIVE":return 11;case"PADDING":return 12;case"CHAIN":return 13;case"KEY_TAG":return 14;case"DEVICEID":return 26946;case"OPTION_65535":return 65535}let t=e.match(/_(\d+)$/);return t?parseInt(t[1],10):-1}});var S_=de((F_,Am)=>{var D_=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=g,e.encode=d,e.familyOf=f,e.name=void 0,e.sizeOf=l,e.v6=e.v4=void 0;let t=/^(\d{1,3}\.){3,3}\d{1,3}$/,r=4,n=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i,i=16,a={name:"v4",size:r,isFormat:p=>t.test(p),encode(p,h,w){w=~~w,h=h||new Uint8Array(w+r);let v=p.length,y=0;for(let m=0;m<v;){let b=p.charCodeAt(m++);b===46?(h[w++]=y,y=0):y=y*10+(b-48)}return h[w]=y,h},decode(p,h){return h=~~h,`${p[h++]}.${p[h++]}.${p[h++]}.${p[h]}`}};e.v4=a;let s={name:"v6",size:i,isFormat:p=>p.length>0&&n.test(p),encode(p,h,w){w=~~w;let v=w+i,y=-1,m=0,b=0,D=!0,C=!1;h=h||new Uint8Array(w+i);for(let F=0;F<p.length;F++){let L=p.charCodeAt(F);L===58?(D?y!==-1?(w<v&&(h[w]=0),w<v-1&&(h[w+1]=0),w+=2):w<v&&(y=w):(C===!0?(w<v&&(h[w]=b),w++):(w<v&&(h[w]=m>>8),w<v-1&&(h[w+1]=m&255),w+=2),m=0,b=0),D=!0,C=!1):L===46?(w<v&&(h[w]=b),w++,b=0,m=0,D=!1,C=!0):(D=!1,L>=97?L-=87:L>=65?L-=55:(L-=48,b=b*10+L),m=(m<<4)+L)}if(D===!1)C===!0?(w<v&&(h[w]=b),w++):(w<v&&(h[w]=m>>8),w<v-1&&(h[w+1]=m&255),w+=2);else if(y===0)w<v&&(h[w]=0),w<v-1&&(h[w+1]=0),w+=2;else if(y!==-1){w+=2;for(let F=Math.min(w-1,v-1);F>=y+2;F--)h[F]=h[F-2];h[y]=0,h[y+1]=0,y=w}if(y!==w&&y!==-1)for(w>v-2&&(w=v-2);v>y;)h[--v]=w<v&&w>y?h[--w]:0;else for(;w<v;)h[w++]=0;return h},decode(p,h){h=~~h;let w="";for(let v=0;v<i;v+=2)v!==0&&(w+=":"),w+=(p[h+v]<<8|p[h+v+1]).toString(16);return w.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}};e.v6=s;let u="ip";e.name=u;function l(p){if(a.isFormat(p))return a.size;if(s.isFormat(p))return s.size;throw Error(`Invalid ip address: ${p}`)}function f(p){return l(p)===a.size?1:2}function d(p,h,w){w=~~w;let v=l(p);return typeof h=="function"&&(h=h(w+v)),v===a.size?a.encode(p,h,w):s.encode(p,h,w)}function g(p,h,w){if(h=~~h,w=w||p.length-h,w===a.size)return a.decode(p,h,w);if(w===s.size)return s.decode(p,h,w);throw Error(`Invalid buffer size needs to be ${a.size} for v4 or ${s.size} for v6.`)}return"default"in e?e.default:e}({});typeof define=="function"&&define.amd?define([],function(){return D_}):typeof Am=="object"&&typeof F_=="object"&&(Am.exports=D_)});var $_=de(qe=>{"use strict";var Ve=m0().Buffer,du=E_(),ak=b_(),uk=y_(),x0=__(),Em=C_(),Zo=S_(),ok=0,I_=32768,bm=32768,lk=~bm,B_=32768,ck=~B_,xe=qe.name={};xe.encode=function(e,t,r,{mail:n=!1}={}){t||(t=Ve.alloc(xe.encodingLength(e))),r||(r=0);let i=r,a=e.replace(/^\.|\.$/gm,"");if(a.length){let s=[];if(n){let u="";a.split(".").forEach(l=>{l.endsWith("\\")?u+=(u.length?".":"")+l.slice(0,-1):s.length===0&&u.length?s.push(u+"."+l):s.push(l)})}else s=a.split(".");for(let u=0;u<s.length;u++){let l=t.write(s[u],r+1);t[r]=l,r+=l+1}}return t[r++]=0,xe.encode.bytes=r-i,t};xe.encode.bytes=0;xe.decode=function(e,t,{mail:r=!1}={}){t||(t=0);let n=[],i=t,a=0,s=0,u=!1;for(;;){if(t>=e.length)throw new Error("Cannot decode name (buffer overflow)");let l=e[t++];if(s+=u?0:1,l===0)break;if(l&192)if((l&192)===192){if(t+1>e.length)throw new Error("Cannot decode name (buffer overflow)");let f=e.readUInt16BE(t-1)-49152;if(f>=i)throw new Error("Cannot decode name (bad pointer)");t=f,i=f,s+=u?0:1,u=!0}else throw new Error("Cannot decode name (bad label)");else{if(t+l>e.length)throw new Error("Cannot decode name (buffer overflow)");if(a+=l+1,a>254)throw new Error("Cannot decode name (name too long)");let f=e.toString("utf-8",t,t+l);r&&(f=f.replace(/\./g,"\\.")),n.push(f),t+=l,s+=u?0:l}}return xe.decode.bytes=s,n.length===0?".":n.join(".")};xe.decode.bytes=0;xe.encodingLength=function(e){return e==="."||e===".."?1:Ve.byteLength(e.replace(/^\.|\.$/gm,""))+2};var At={};At.encode=function(e,t,r){t||(t=Ve.alloc(At.encodingLength(e))),r||(r=0);let n=t.write(e,r+1);return t[r]=n,At.encode.bytes=n+1,t};At.encode.bytes=0;At.decode=function(e,t){t||(t=0);let r=e[t],n=e.toString("utf-8",t+1,t+1+r);return At.decode.bytes=r+1,n};At.decode.bytes=0;At.encodingLength=function(e){return Ve.byteLength(e)+1};var Rs={};Rs.encode=function(e,t,r){t||(t=Rs.encodingLength(e)),r||(r=0);let n=(e.flags||0)&32767,i=e.type==="response"?I_:ok;return t.writeUInt16BE(e.id||0,r),t.writeUInt16BE(n|i,r+2),t.writeUInt16BE(e.questions.length,r+4),t.writeUInt16BE(e.answers.length,r+6),t.writeUInt16BE(e.authorities.length,r+8),t.writeUInt16BE(e.additionals.length,r+10),t};Rs.encode.bytes=12;Rs.decode=function(e,t){if(t||(t=0),e.length<12)throw new Error("Header must be 12 bytes");let r=e.readUInt16BE(t+2);return{id:e.readUInt16BE(t),type:r&I_?"response":"query",flags:r&32767,flag_qr:(r>>15&1)===1,opcode:uk.toString(r>>11&15),flag_aa:(r>>10&1)===1,flag_tc:(r>>9&1)===1,flag_rd:(r>>8&1)===1,flag_ra:(r>>7&1)===1,flag_z:(r>>6&1)===1,flag_ad:(r>>5&1)===1,flag_cd:(r>>4&1)===1,rcode:ak.toString(r&15),questions:new Array(e.readUInt16BE(t+4)),answers:new Array(e.readUInt16BE(t+6)),authorities:new Array(e.readUInt16BE(t+8)),additionals:new Array(e.readUInt16BE(t+10))}};Rs.decode.bytes=12;Rs.encodingLength=function(){return 12};var iu=qe.unknown={};iu.encode=function(e,t,r){return t||(t=Ve.alloc(iu.encodingLength(e))),r||(r=0),t.writeUInt16BE(e.length,r),e.copy(t,r+2),iu.encode.bytes=e.length+2,t};iu.encode.bytes=0;iu.decode=function(e,t){t||(t=0);let r=e.readUInt16BE(t),n=e.slice(t+2,t+2+r);return iu.decode.bytes=r+2,n};iu.decode.bytes=0;iu.encodingLength=function(e){return e.length+2};var su=qe.ns={};su.encode=function(e,t,r){return t||(t=Ve.alloc(su.encodingLength(e))),r||(r=0),xe.encode(e,t,r+2),t.writeUInt16BE(xe.encode.bytes,r),su.encode.bytes=xe.encode.bytes+2,t};su.encode.bytes=0;su.decode=function(e,t){t||(t=0);let r=e.readUInt16BE(t),n=xe.decode(e,t+2);return su.decode.bytes=r+2,n};su.decode.bytes=0;su.encodingLength=function(e){return xe.encodingLength(e)+2};var au=qe.soa={};au.encode=function(e,t,r){t||(t=Ve.alloc(au.encodingLength(e))),r||(r=0);let n=r;return r+=2,xe.encode(e.mname,t,r),r+=xe.encode.bytes,xe.encode(e.rname,t,r,{mail:!0}),r+=xe.encode.bytes,t.writeUInt32BE(e.serial||0,r),r+=4,t.writeUInt32BE(e.refresh||0,r),r+=4,t.writeUInt32BE(e.retry||0,r),r+=4,t.writeUInt32BE(e.expire||0,r),r+=4,t.writeUInt32BE(e.minimum||0,r),r+=4,t.writeUInt16BE(r-n-2,n),au.encode.bytes=r-n,t};au.encode.bytes=0;au.decode=function(e,t){t||(t=0);let r=t,n={};return t+=2,n.mname=xe.decode(e,t),t+=xe.decode.bytes,n.rname=xe.decode(e,t,{mail:!0}),t+=xe.decode.bytes,n.serial=e.readUInt32BE(t),t+=4,n.refresh=e.readUInt32BE(t),t+=4,n.retry=e.readUInt32BE(t),t+=4,n.expire=e.readUInt32BE(t),t+=4,n.minimum=e.readUInt32BE(t),t+=4,au.decode.bytes=t-r,n};au.decode.bytes=0;au.encodingLength=function(e){return 22+xe.encodingLength(e.mname)+xe.encodingLength(e.rname)};var uu=qe.txt={};uu.encode=function(e,t,r){Array.isArray(e)||(e=[e]);for(let i=0;i<e.length;i++)if(typeof e[i]=="string"&&(e[i]=Ve.from(e[i])),!Ve.isBuffer(e[i]))throw new Error("Must be a Buffer");t||(t=Ve.alloc(uu.encodingLength(e))),r||(r=0);let n=r;return r+=2,e.forEach(function(i){t[r++]=i.length,i.copy(t,r,0,i.length),r+=i.length}),t.writeUInt16BE(r-n-2,n),uu.encode.bytes=r-n,t};uu.encode.bytes=0;uu.decode=function(e,t){t||(t=0);let r=t,n=e.readUInt16BE(t);t+=2;let i=[];for(;n>0;){let a=e[t++];if(--n,n<a)throw new Error("Buffer overflow");i.push(e.slice(t,t+a)),t+=a,n-=a}return uu.decode.bytes=t-r,i};uu.decode.bytes=0;uu.encodingLength=function(e){Array.isArray(e)||(e=[e]);let t=2;return e.forEach(function(r){typeof r=="string"?t+=Ve.byteLength(r)+1:t+=r.length+1}),t};var ou=qe.null={};ou.encode=function(e,t,r){t||(t=Ve.alloc(ou.encodingLength(e))),r||(r=0),typeof e=="string"&&(e=Ve.from(e)),e||(e=Ve.alloc(0));let n=r;r+=2;let i=e.length;return e.copy(t,r,0,i),r+=i,t.writeUInt16BE(r-n-2,n),ou.encode.bytes=r-n,t};ou.encode.bytes=0;ou.decode=function(e,t){t||(t=0);let r=t,n=e.readUInt16BE(t);t+=2;let i=e.slice(t,t+n);return t+=n,ou.decode.bytes=t-r,i};ou.decode.bytes=0;ou.encodingLength=function(e){return e?(Ve.isBuffer(e)?e.length:Ve.byteLength(e))+2:2};var lu=qe.hinfo={};lu.encode=function(e,t,r){t||(t=Ve.alloc(lu.encodingLength(e))),r||(r=0);let n=r;return r+=2,At.encode(e.cpu,t,r),r+=At.encode.bytes,At.encode(e.os,t,r),r+=At.encode.bytes,t.writeUInt16BE(r-n-2,n),lu.encode.bytes=r-n,t};lu.encode.bytes=0;lu.decode=function(e,t){t||(t=0);let r=t,n={};return t+=2,n.cpu=At.decode(e,t),t+=At.decode.bytes,n.os=At.decode(e,t),t+=At.decode.bytes,lu.decode.bytes=t-r,n};lu.decode.bytes=0;lu.encodingLength=function(e){return At.encodingLength(e.cpu)+At.encodingLength(e.os)+2};var $s=qe.ptr={},fk=qe.cname=$s,hk=qe.dname=$s;$s.encode=function(e,t,r){return t||(t=Ve.alloc($s.encodingLength(e))),r||(r=0),xe.encode(e,t,r+2),t.writeUInt16BE(xe.encode.bytes,r),$s.encode.bytes=xe.encode.bytes+2,t};$s.encode.bytes=0;$s.decode=function(e,t){t||(t=0);let r=xe.decode(e,t+2);return $s.decode.bytes=xe.decode.bytes+2,r};$s.decode.bytes=0;$s.encodingLength=function(e){return xe.encodingLength(e)+2};var cu=qe.srv={};cu.encode=function(e,t,r){t||(t=Ve.alloc(cu.encodingLength(e))),r||(r=0),t.writeUInt16BE(e.priority||0,r+2),t.writeUInt16BE(e.weight||0,r+4),t.writeUInt16BE(e.port||0,r+6),xe.encode(e.target,t,r+8);let n=xe.encode.bytes+6;return t.writeUInt16BE(n,r),cu.encode.bytes=n+2,t};cu.encode.bytes=0;cu.decode=function(e,t){t||(t=0);let r=e.readUInt16BE(t),n={};return n.priority=e.readUInt16BE(t+2),n.weight=e.readUInt16BE(t+4),n.port=e.readUInt16BE(t+6),n.target=xe.decode(e,t+8),cu.decode.bytes=r+2,n};cu.decode.bytes=0;cu.encodingLength=function(e){return 8+xe.encodingLength(e.target)};var Vi=qe.caa={};Vi.ISSUER_CRITICAL=128;Vi.encode=function(e,t,r){let n=Vi.encodingLength(e);return t||(t=Ve.alloc(Vi.encodingLength(e))),r||(r=0),e.issuerCritical&&(e.flags=Vi.ISSUER_CRITICAL),t.writeUInt16BE(n-2,r),r+=2,t.writeUInt8(e.flags||0,r),r+=1,At.encode(e.tag,t,r),r+=At.encode.bytes,t.write(e.value,r),r+=Ve.byteLength(e.value),Vi.encode.bytes=n,t};Vi.encode.bytes=0;Vi.decode=function(e,t){t||(t=0);let r=e.readUInt16BE(t);t+=2;let n=t,i={};return i.flags=e.readUInt8(t),t+=1,i.tag=At.decode(e,t),t+=At.decode.bytes,i.value=e.toString("utf-8",t,n+r),i.issuerCritical=!!(i.flags&Vi.ISSUER_CRITICAL),Vi.decode.bytes=r+2,i};Vi.decode.bytes=0;Vi.encodingLength=function(e){return At.encodingLength(e.tag)+At.encodingLength(e.value)+2};var Wu=qe.mx={};Wu.encode=function(e,t,r){t||(t=Ve.alloc(Wu.encodingLength(e))),r||(r=0);let n=r;return r+=2,t.writeUInt16BE(e.preference||0,r),r+=2,xe.encode(e.exchange,t,r),r+=xe.encode.bytes,t.writeUInt16BE(r-n-2,n),Wu.encode.bytes=r-n,t};Wu.encode.bytes=0;Wu.decode=function(e,t){t||(t=0);let r=t,n={};return t+=2,n.preference=e.readUInt16BE(t),t+=2,n.exchange=xe.decode(e,t),t+=xe.decode.bytes,Wu.decode.bytes=t-r,n};Wu.encodingLength=function(e){return 4+xe.encodingLength(e.exchange)};var fu=qe.a={};fu.encode=function(e,t,r){return t||(t=Ve.alloc(fu.encodingLength(e))),r||(r=0),t.writeUInt16BE(4,r),r+=2,Zo.v4.encode(e,t,r),fu.encode.bytes=6,t};fu.encode.bytes=0;fu.decode=function(e,t){t||(t=0),t+=2;let r=Zo.v4.decode(e,t);return fu.decode.bytes=6,r};fu.decode.bytes=0;fu.encodingLength=function(){return 6};var hu=qe.aaaa={};hu.encode=function(e,t,r){return t||(t=Ve.alloc(hu.encodingLength(e))),r||(r=0),t.writeUInt16BE(16,r),r+=2,Zo.v6.encode(e,t,r),hu.encode.bytes=18,t};hu.encode.bytes=0;hu.decode=function(e,t){t||(t=0),t+=2;let r=Zo.v6.decode(e,t);return hu.decode.bytes=18,r};hu.decode.bytes=0;hu.encodingLength=function(){return 18};var Fi=qe.option={};Fi.encode=function(e,t,r){t||(t=Ve.alloc(Fi.encodingLength(e))),r||(r=0);let n=r,i=Em.toCode(e.code);if(t.writeUInt16BE(i,r),r+=2,e.data)t.writeUInt16BE(e.data.length,r),r+=2,e.data.copy(t,r),r+=e.data.length;else switch(i){case 8:let a=e.sourcePrefixLength||0,s=e.family||Zo.familyOf(e.ip),u=Zo.encode(e.ip,Ve.alloc),l=Math.ceil(a/8);t.writeUInt16BE(l+4,r),r+=2,t.writeUInt16BE(s,r),r+=2,t.writeUInt8(a,r++),t.writeUInt8(e.scopePrefixLength||0,r++),u.copy(t,r,0,l),r+=l;break;case 11:e.timeout?(t.writeUInt16BE(2,r),r+=2,t.writeUInt16BE(e.timeout,r),r+=2):(t.writeUInt16BE(0,r),r+=2);break;case 12:let f=e.length||0;t.writeUInt16BE(f,r),r+=2,t.fill(0,r,r+f),r+=f;break;case 14:let d=e.tags.length*2;t.writeUInt16BE(d,r),r+=2;for(let g of e.tags)t.writeUInt16BE(g,r),r+=2;break;default:throw new Error(`Unknown roption code: ${e.code}`)}return Fi.encode.bytes=r-n,t};Fi.encode.bytes=0;Fi.decode=function(e,t){t||(t=0);let r={};r.code=e.readUInt16BE(t),r.type=Em.toString(r.code),t+=2;let n=e.readUInt16BE(t);switch(t+=2,r.data=e.slice(t,t+n),r.code){case 8:r.family=e.readUInt16BE(t),t+=2,r.sourcePrefixLength=e.readUInt8(t++),r.scopePrefixLength=e.readUInt8(t++);let i=Ve.alloc(r.family===1?4:16);e.copy(i,0,t,t+n-4),r.ip=Zo.decode(i);break;case 11:n>0&&(r.timeout=e.readUInt16BE(t),t+=2);break;case 14:r.tags=[];for(let a=0;a<n;a+=2)r.tags.push(e.readUInt16BE(t)),t+=2}return Fi.decode.bytes=n+4,r};Fi.decode.bytes=0;Fi.encodingLength=function(e){if(e.data)return e.data.length+4;switch(Em.toCode(e.code)){case 8:let r=e.sourcePrefixLength||0;return Math.ceil(r/8)+8;case 11:return typeof e.timeout=="number"?6:4;case 12:return e.length+4;case 14:return 4+e.tags.length*2}throw new Error(`Unknown roption code: ${e.code}`)};var zi=qe.opt={};zi.encode=function(e,t,r){t||(t=Ve.alloc(zi.encodingLength(e))),r||(r=0);let n=r,i=pc(e,Fi);return t.writeUInt16BE(i,r),r=Uf(e,Fi,t,r+2),zi.encode.bytes=r-n,t};zi.encode.bytes=0;zi.decode=function(e,t){t||(t=0);let r=t,n=[],i=e.readUInt16BE(t);t+=2;let a=0;for(;i>0;)n[a++]=Fi.decode(e,t),t+=Fi.decode.bytes,i-=Fi.decode.bytes;return zi.decode.bytes=t-r,n};zi.decode.bytes=0;zi.encodingLength=function(e){return 2+pc(e||[],Fi)};var ii=qe.dnskey={};ii.PROTOCOL_DNSSEC=3;ii.ZONE_KEY=128;ii.SECURE_ENTRYPOINT=32768;ii.encode=function(e,t,r){t||(t=Ve.alloc(ii.encodingLength(e))),r||(r=0);let n=r,i=e.key;if(!Ve.isBuffer(i))throw new Error("Key must be a Buffer");return r+=2,t.writeUInt16BE(e.flags,r),r+=2,t.writeUInt8(ii.PROTOCOL_DNSSEC,r),r+=1,t.writeUInt8(e.algorithm,r),r+=1,i.copy(t,r,0,i.length),r+=i.length,ii.encode.bytes=r-n,t.writeUInt16BE(ii.encode.bytes-2,n),t};ii.encode.bytes=0;ii.decode=function(e,t){t||(t=0);let r=t;var n={},i=e.readUInt16BE(t);if(t+=2,n.flags=e.readUInt16BE(t),t+=2,e.readUInt8(t)!==ii.PROTOCOL_DNSSEC)throw new Error("Protocol must be 3");return t+=1,n.algorithm=e.readUInt8(t),t+=1,n.key=e.slice(t,r+i+2),t+=n.key.length,ii.decode.bytes=t-r,n};ii.decode.bytes=0;ii.encodingLength=function(e){return 6+Ve.byteLength(e.key)};var fa=qe.rrsig={};fa.encode=function(e,t,r){t||(t=Ve.alloc(fa.encodingLength(e))),r||(r=0);let n=r,i=e.signature;if(!Ve.isBuffer(i))throw new Error("Signature must be a Buffer");return r+=2,t.writeUInt16BE(du.toType(e.typeCovered),r),r+=2,t.writeUInt8(e.algorithm,r),r+=1,t.writeUInt8(e.labels,r),r+=1,t.writeUInt32BE(e.originalTTL,r),r+=4,t.writeUInt32BE(e.expiration,r),r+=4,t.writeUInt32BE(e.inception,r),r+=4,t.writeUInt16BE(e.keyTag,r),r+=2,xe.encode(e.signersName,t,r),r+=xe.encode.bytes,i.copy(t,r,0,i.length),r+=i.length,fa.encode.bytes=r-n,t.writeUInt16BE(fa.encode.bytes-2,n),t};fa.encode.bytes=0;fa.decode=function(e,t){t||(t=0);let r=t;var n={},i=e.readUInt16BE(t);return t+=2,n.typeCovered=du.toString(e.readUInt16BE(t)),t+=2,n.algorithm=e.readUInt8(t),t+=1,n.labels=e.readUInt8(t),t+=1,n.originalTTL=e.readUInt32BE(t),t+=4,n.expiration=e.readUInt32BE(t),t+=4,n.inception=e.readUInt32BE(t),t+=4,n.keyTag=e.readUInt16BE(t),t+=2,n.signersName=xe.decode(e,t),t+=xe.decode.bytes,n.signature=e.slice(t,r+i+2),t+=n.signature.length,fa.decode.bytes=t-r,n};fa.decode.bytes=0;fa.encodingLength=function(e){return 20+xe.encodingLength(e.signersName)+Ve.byteLength(e.signature)};var ha=qe.rp={};ha.encode=function(e,t,r){t||(t=Ve.alloc(ha.encodingLength(e))),r||(r=0);let n=r;return r+=2,xe.encode(e.mbox||".",t,r,{mail:!0}),r+=xe.encode.bytes,xe.encode(e.txt||".",t,r),r+=xe.encode.bytes,ha.encode.bytes=r-n,t.writeUInt16BE(ha.encode.bytes-2,n),t};ha.encode.bytes=0;ha.decode=function(e,t){t||(t=0);let r=t,n={};return t+=2,n.mbox=xe.decode(e,t,{mail:!0})||".",t+=xe.decode.bytes,n.txt=xe.decode(e,t)||".",t+=xe.decode.bytes,ha.decode.bytes=t-r,n};ha.decode.bytes=0;ha.encodingLength=function(e){return 2+xe.encodingLength(e.mbox||".")+xe.encodingLength(e.txt||".")};var hn={};hn.encode=function(e,t,r){t||(t=Ve.alloc(hn.encodingLength(e))),r||(r=0);let n=r;for(var i=[],a=0;a<e.length;a++){var s=du.toType(e[a]);i[s>>8]===void 0&&(i[s>>8]=[]),i[s>>8][s>>3&31]|=1<<7-(s&7)}for(a=0;a<i.length;a++)if(i[a]!==void 0){var u=Ve.from(i[a]);t.writeUInt8(a,r),r+=1,t.writeUInt8(u.length,r),r+=1,u.copy(t,r),r+=u.length}return hn.encode.bytes=r-n,t};hn.encode.bytes=0;hn.decode=function(e,t,r){t||(t=0);let n=t;for(var i=[];t-n<r;){var a=e.readUInt8(t);t+=1;var s=e.readUInt8(t);t+=1;for(var u=0;u<s;u++)for(var l=e.readUInt8(t+u),f=0;f<8;f++)if(l&1<<7-f){var d=du.toString(a<<8|u<<3|f);i.push(d)}t+=s}return hn.decode.bytes=t-n,i};hn.decode.bytes=0;hn.encodingLength=function(e){for(var t=[],r=0;r<e.length;r++){var n=du.toType(e[r]);t[n>>8]=Math.max(t[n>>8]||0,n&255)}var i=0;for(r=0;r<t.length;r++)t[r]!==void 0&&(i+=2+Math.ceil((t[r]+1)/8));return i};var da=qe.nsec={};da.encode=function(e,t,r){t||(t=Ve.alloc(da.encodingLength(e))),r||(r=0);let n=r;return r+=2,xe.encode(e.nextDomain,t,r),r+=xe.encode.bytes,hn.encode(e.rrtypes,t,r),r+=hn.encode.bytes,da.encode.bytes=r-n,t.writeUInt16BE(da.encode.bytes-2,n),t};da.encode.bytes=0;da.decode=function(e,t){t||(t=0);let r=t;var n={},i=e.readUInt16BE(t);return t+=2,n.nextDomain=xe.decode(e,t),t+=xe.decode.bytes,n.rrtypes=hn.decode(e,t,i-(t-r)),t+=hn.decode.bytes,da.decode.bytes=t-r,n};da.decode.bytes=0;da.encodingLength=function(e){return 2+xe.encodingLength(e.nextDomain)+hn.encodingLength(e.rrtypes)};var pa=qe.nsec3={};pa.encode=function(e,t,r){t||(t=Ve.alloc(pa.encodingLength(e))),r||(r=0);let n=r,i=e.salt;if(!Ve.isBuffer(i))throw new Error("salt must be a Buffer");let a=e.nextDomain;if(!Ve.isBuffer(a))throw new Error("nextDomain must be a Buffer");return r+=2,t.writeUInt8(e.algorithm,r),r+=1,t.writeUInt8(e.flags,r),r+=1,t.writeUInt16BE(e.iterations,r),r+=2,t.writeUInt8(i.length,r),r+=1,i.copy(t,r,0,i.length),r+=i.length,t.writeUInt8(a.length,r),r+=1,a.copy(t,r,0,a.length),r+=a.length,hn.encode(e.rrtypes,t,r),r+=hn.encode.bytes,pa.encode.bytes=r-n,t.writeUInt16BE(pa.encode.bytes-2,n),t};pa.encode.bytes=0;pa.decode=function(e,t){t||(t=0);let r=t;var n={},i=e.readUInt16BE(t);t+=2,n.algorithm=e.readUInt8(t),t+=1,n.flags=e.readUInt8(t),t+=1,n.iterations=e.readUInt16BE(t),t+=2;let a=e.readUInt8(t);t+=1,n.salt=e.slice(t,t+a),t+=a;let s=e.readUInt8(t);return t+=1,n.nextDomain=e.slice(t,t+s),t+=s,n.rrtypes=hn.decode(e,t,i-(t-r)),t+=hn.decode.bytes,pa.decode.bytes=t-r,n};pa.decode.bytes=0;pa.encodingLength=function(e){return 8+e.salt.length+e.nextDomain.length+hn.encodingLength(e.rrtypes)};var ga=qe.ds={};ga.encode=function(e,t,r){t||(t=Ve.alloc(ga.encodingLength(e))),r||(r=0);let n=r,i=e.digest;if(!Ve.isBuffer(i))throw new Error("Digest must be a Buffer");return r+=2,t.writeUInt16BE(e.keyTag,r),r+=2,t.writeUInt8(e.algorithm,r),r+=1,t.writeUInt8(e.digestType,r),r+=1,i.copy(t,r,0,i.length),r+=i.length,ga.encode.bytes=r-n,t.writeUInt16BE(ga.encode.bytes-2,n),t};ga.encode.bytes=0;ga.decode=function(e,t){t||(t=0);let r=t;var n={},i=e.readUInt16BE(t);return t+=2,n.keyTag=e.readUInt16BE(t),t+=2,n.algorithm=e.readUInt8(t),t+=1,n.digestType=e.readUInt8(t),t+=1,n.digest=e.slice(t,r+i+2),t+=n.digest.length,ga.decode.bytes=t-r,n};ga.decode.bytes=0;ga.encodingLength=function(e){return 6+Ve.byteLength(e.digest)};var Ki=qe.sshfp={};Ki.getFingerprintLengthForHashType=function(t){switch(t){case 1:return 20;case 2:return 32}};Ki.encode=function(t,r,n){r||(r=Ve.alloc(Ki.encodingLength(t))),n||(n=0);let i=n;n+=2,r[n]=t.algorithm,n+=1,r[n]=t.hash,n+=1;let a=Ve.from(t.fingerprint.toUpperCase(),"hex");if(a.length!==Ki.getFingerprintLengthForHashType(t.hash))throw new Error("Invalid fingerprint length");return a.copy(r,n),n+=a.byteLength,Ki.encode.bytes=n-i,r.writeUInt16BE(Ki.encode.bytes-2,i),r};Ki.encode.bytes=0;Ki.decode=function(t,r){r||(r=0);let n=r,i={};r+=2,i.algorithm=t[r],r+=1,i.hash=t[r],r+=1;let a=Ki.getFingerprintLengthForHashType(i.hash);return i.fingerprint=t.slice(r,r+a).toString("hex").toUpperCase(),r+=a,Ki.decode.bytes=r-n,i};Ki.decode.bytes=0;Ki.encodingLength=function(e){return 4+Ve.from(e.fingerprint,"hex").byteLength};var ma=qe.naptr={};ma.encode=function(e,t,r){t||(t=Ve.alloc(ma.encodingLength(e))),r||(r=0);let n=r;return r+=2,t.writeUInt16BE(e.order||0,r),r+=2,t.writeUInt16BE(e.preference||0,r),r+=2,At.encode(e.flags,t,r),r+=At.encode.bytes,At.encode(e.services,t,r),r+=At.encode.bytes,At.encode(e.regexp,t,r),r+=At.encode.bytes,xe.encode(e.replacement,t,r),r+=xe.encode.bytes,ma.encode.bytes=r-n,t.writeUInt16BE(ma.encode.bytes-2,n),t};ma.encode.bytes=0;ma.decode=function(e,t){t||(t=0);let r=t,n={};return t+=2,n.order=e.readUInt16BE(t),t+=2,n.preference=e.readUInt16BE(t),t+=2,n.flags=At.decode(e,t),t+=At.decode.bytes,n.services=At.decode(e,t),t+=At.decode.bytes,n.regexp=At.decode(e,t),t+=At.decode.bytes,n.replacement=xe.decode(e,t),t+=xe.decode.bytes,ma.decode.bytes=t-r,n};ma.decode.bytes=0;ma.encodingLength=function(e){return At.encodingLength(e.flags)+At.encodingLength(e.services)+At.encodingLength(e.regexp)+xe.encodingLength(e.replacement)+6};var va=qe.tlsa={};va.encode=function(e,t,r){t||(t=Ve.alloc(va.encodingLength(e))),r||(r=0);let n=r,i=e.certificate;if(!Ve.isBuffer(i))throw new Error("Certificate must be a Buffer");return r+=2,t.writeUInt8(e.usage,r),r+=1,t.writeUInt8(e.selector,r),r+=1,t.writeUInt8(e.matchingType,r),r+=1,i.copy(t,r,0,i.length),r+=i.length,va.encode.bytes=r-n,t.writeUInt16BE(va.encode.bytes-2,n),t};va.encode.bytes=0;va.decode=function(e,t){t||(t=0);let r=t,n={},i=e.readUInt16BE(t);return t+=2,n.usage=e.readUInt8(t),t+=1,n.selector=e.readUInt8(t),t+=1,n.matchingType=e.readUInt8(t),t+=1,n.certificate=e.slice(t,r+i+2),t+=n.certificate.length,va.decode.bytes=t-r,n};va.decode.bytes=0;va.encodingLength=function(e){return 5+Ve.byteLength(e.certificate)};var ym=qe.record=function(e){switch(e.toUpperCase()){case"A":return fu;case"PTR":return $s;case"CNAME":return fk;case"DNAME":return hk;case"TXT":return uu;case"NULL":return ou;case"AAAA":return hu;case"SRV":return cu;case"HINFO":return lu;case"CAA":return Vi;case"NS":return su;case"SOA":return au;case"MX":return Wu;case"OPT":return zi;case"DNSKEY":return ii;case"RRSIG":return fa;case"RP":return ha;case"NSEC":return da;case"NSEC3":return pa;case"SSHFP":return Ki;case"DS":return ga;case"NAPTR":return ma;case"TLSA":return va}return iu},Fn=qe.answer={};Fn.encode=function(e,t,r){t||(t=Ve.alloc(Fn.encodingLength(e))),r||(r=0);let n=r;if(xe.encode(e.name,t,r),r+=xe.encode.bytes,t.writeUInt16BE(du.toType(e.type),r),e.type.toUpperCase()==="OPT"){if(e.name!==".")throw new Error("OPT name must be root.");t.writeUInt16BE(e.udpPayloadSize||4096,r+2),t.writeUInt8(e.extendedRcode||0,r+4),t.writeUInt8(e.ednsVersion||0,r+5),t.writeUInt16BE(e.flags||0,r+6),r+=8,zi.encode(e.options||[],t,r),r+=zi.encode.bytes}else{let i=x0.toClass(e.class===void 0?"IN":e.class);e.flush&&(i|=bm),t.writeUInt16BE(i,r+2),t.writeUInt32BE(e.ttl||0,r+4),r+=8;let a=ym(e.type);a.encode(e.data,t,r),r+=a.encode.bytes}return Fn.encode.bytes=r-n,t};Fn.encode.bytes=0;Fn.decode=function(e,t){t||(t=0);let r={},n=t;if(r.name=xe.decode(e,t),t+=xe.decode.bytes,r.type=du.toString(e.readUInt16BE(t)),r.type==="OPT")r.udpPayloadSize=e.readUInt16BE(t+2),r.extendedRcode=e.readUInt8(t+4),r.ednsVersion=e.readUInt8(t+5),r.flags=e.readUInt16BE(t+6),r.flag_do=(r.flags>>15&1)===1,r.options=zi.decode(e,t+8),t+=8+zi.decode.bytes;else{let i=e.readUInt16BE(t+2);r.ttl=e.readUInt32BE(t+4),r.class=x0.toString(i&lk),r.flush=!!(i&bm);let a=ym(r.type);r.data=a.decode(e,t+8),t+=8+a.decode.bytes}return Fn.decode.bytes=t-n,r};Fn.decode.bytes=0;Fn.encodingLength=function(e){let t=e.data!==null&&e.data!==void 0?e.data:e.options;return xe.encodingLength(e.name)+8+ym(e.type).encodingLength(t)};var Ps=qe.question={};Ps.encode=function(e,t,r){t||(t=Ve.alloc(Ps.encodingLength(e))),r||(r=0);let n=r;return xe.encode(e.name,t,r),r+=xe.encode.bytes,t.writeUInt16BE(du.toType(e.type),r),r+=2,t.writeUInt16BE(x0.toClass(e.class===void 0?"IN":e.class),r),r+=2,Ps.encode.bytes=r-n,e};Ps.encode.bytes=0;Ps.decode=function(e,t){t||(t=0);let r=t,n={};return n.name=xe.decode(e,t),t+=xe.decode.bytes,n.type=du.toString(e.readUInt16BE(t)),t+=2,n.class=x0.toString(e.readUInt16BE(t)),t+=2,!!(n.class&B_)&&(n.class&=ck),Ps.decode.bytes=t-r,n};Ps.decode.bytes=0;Ps.encodingLength=function(e){return xe.encodingLength(e.name)+4};qe.AUTHORITATIVE_ANSWER=1024;qe.TRUNCATED_RESPONSE=512;qe.RECURSION_DESIRED=256;qe.RECURSION_AVAILABLE=128;qe.AUTHENTIC_DATA=32;qe.CHECKING_DISABLED=16;qe.DNSSEC_OK=32768;qe.encode=function(e,t,r){let n=!t;n&&(t=Ve.alloc(qe.encodingLength(e))),r||(r=0);let i=r;return e.questions||(e.questions=[]),e.answers||(e.answers=[]),e.authorities||(e.authorities=[]),e.additionals||(e.additionals=[]),Rs.encode(e,t,r),r+=Rs.encode.bytes,r=Uf(e.questions,Ps,t,r),r=Uf(e.answers,Fn,t,r),r=Uf(e.authorities,Fn,t,r),r=Uf(e.additionals,Fn,t,r),qe.encode.bytes=r-i,n&&qe.encode.bytes!==t.length?t.slice(0,qe.encode.bytes):t};qe.encode.bytes=0;qe.decode=function(e,t){t||(t=0);let r=t,n=Rs.decode(e,t);return t+=Rs.decode.bytes,t=R0(n.questions,Ps,e,t),t=R0(n.answers,Fn,e,t),t=R0(n.authorities,Fn,e,t),t=R0(n.additionals,Fn,e,t),qe.decode.bytes=t-r,n};qe.decode.bytes=0;qe.encodingLength=function(e){return Rs.encodingLength(e)+pc(e.questions||[],Ps)+pc(e.answers||[],Fn)+pc(e.authorities||[],Fn)+pc(e.additionals||[],Fn)};qe.streamEncode=function(e){let t=qe.encode(e),r=Ve.alloc(2);r.writeUInt16BE(t.byteLength);let n=Ve.concat([r,t]);return qe.streamEncode.bytes=n.byteLength,n};qe.streamEncode.bytes=0;qe.streamDecode=function(e){let t=e.readUInt16BE(0);if(e.byteLength<t+2)return null;let r=qe.decode(e.slice(2));return qe.streamDecode.bytes=qe.decode.bytes,r};qe.streamDecode.bytes=0;function pc(e,t){let r=0;for(let n=0;n<e.length;n++)r+=t.encodingLength(e[n]);return r}function Uf(e,t,r,n){for(let i=0;i<e.length;i++)t.encode(e[i],r,n),n+=t.encode.bytes;return n}function R0(e,t,r,n){for(let i=0;i<e.length;i++)e[i]=t.decode(r,n),n+=t.decode.bytes;return n}});var xm=de((oW,Rm)=>{var q_=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);q_?($m=new Uint8Array(16),Rm.exports=function(){return q_($m),$m}):(Pm=new Array(16),Rm.exports=function(){for(var t=0,r;t<16;t++)t&3||(r=Math.random()*4294967296),Pm[t]=r>>>((t&3)<<3)&255;return Pm});var $m,Pm});var Tm=de((lW,K_)=>{var V_=[];for(Hf=0;Hf<256;++Hf)V_[Hf]=(Hf+256).toString(16).substr(1);var Hf;function iN(e,t){var r=t||0,n=V_;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")}K_.exports=iN});var Y_=de((cW,G_)=>{var sN=xm(),aN=Tm(),z_,Om,km=0,Nm=0;function uN(e,t,r){var n=t&&r||0,i=t||[];e=e||{};var a=e.node||z_,s=e.clockseq!==void 0?e.clockseq:Om;if(a==null||s==null){var u=sN();a==null&&(a=z_=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]),s==null&&(s=Om=(u[6]<<8|u[7])&16383)}var l=e.msecs!==void 0?e.msecs:new Date().getTime(),f=e.nsecs!==void 0?e.nsecs:Nm+1,d=l-km+(f-Nm)/1e4;if(d<0&&e.clockseq===void 0&&(s=s+1&16383),(d<0||l>km)&&e.nsecs===void 0&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");km=l,Nm=f,Om=s,l+=122192928e5;var g=((l&268435455)*1e4+f)%4294967296;i[n++]=g>>>24&255,i[n++]=g>>>16&255,i[n++]=g>>>8&255,i[n++]=g&255;var p=l/4294967296*1e4&268435455;i[n++]=p>>>8&255,i[n++]=p&255,i[n++]=p>>>24&15|16,i[n++]=p>>>16&255,i[n++]=s>>>8|128,i[n++]=s&255;for(var h=0;h<6;++h)i[n+h]=a[h];return t||aN(i)}G_.exports=uN});var X_=de((fW,W_)=>{var oN=xm(),lN=Tm();function cN(e,t,r){var n=t&&r||0;typeof e=="string"&&(t=e==="binary"?new Array(16):null,e=null),e=e||{};var i=e.random||(e.rng||oN)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t)for(var a=0;a<16;++a)t[n+a]=i[a];return t||lN(i)}W_.exports=cN});var Q_=de((hW,Z_)=>{var fN=Y_(),J_=X_(),Lm=J_;Lm.v1=fN;Lm.v4=J_;Z_.exports=Lm});var U0=de((dW,tC)=>{var{v4:hN}=Q_();function eC(){return hN().replace(/-/g,"")}var Um=eC;function jm(){return Um()}jm.setFactory=e=>{Um=e};jm.reset=()=>{Um=eC};tC.exports=jm});var gu=de((pW,rC)=>{var dN=Symbol("_options"),pN=Symbol("_cache"),gN=Symbol("_state"),mN=Symbol("_objectId"),vN=Symbol("_conflicts"),wN=Symbol("_change"),AN=Symbol("_elemIds");rC.exports={OPTIONS:dN,CACHE:pN,STATE:gN,OBJECT_ID:mN,CONFLICTS:vN,CHANGE:wN,ELEM_IDS:AN}});var xs=de((gW,iC)=>{function nC(e){return typeof e=="object"&&e!==null}function EN(e){if(!nC(e))return{};let t={};for(let r of Object.keys(e))t[r]=e[r];return t}function bN(e){let t=/^(\d+)@(.*)$/.exec(e||"");if(!t)throw new RangeError(`Not a valid opId: ${e}`);return{counter:parseInt(t[1],10),actorId:t[2]}}function yN(e,t){if(!(e instanceof Uint8Array)||!(t instanceof Uint8Array))throw new TypeError("equalBytes can only compare Uint8Arrays");if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}function _N(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=null;return t}iC.exports={isObject:nC,copyObject:EN,parseOpId:bN,equalBytes:yN,createArrayOfNulls:_N}});var Vf=de((mW,sC)=>{var{OBJECT_ID:el}=gu(),{isObject:CN}=xs(),qf=class{constructor(t){if(typeof t=="string"){let r=[...t].map(n=>({value:n}));return Mf(void 0,r)}else if(Array.isArray(t)){let r=t.map(n=>({value:n}));return Mf(void 0,r)}else{if(t===void 0)return Mf(void 0,[]);throw new TypeError(`Unsupported initial value for Text: ${t}`)}}get length(){return this.elems.length}get(t){let r=this.elems[t].value;if(this.context&&CN(r)){let n=r[el],i=this.path.concat([{key:t,objectId:n}]);return this.context.instantiateObject(i,n)}else return r}getElemId(t){return this.elems[t].elemId}[Symbol.iterator](){let t=this.elems,r=-1;return{next(){return r+=1,r<t.length?{done:!1,value:t[r].value}:{done:!0}}}}toString(){let t="";for(let r of this.elems)typeof r.value=="string"&&(t+=r.value);return t}toSpans(){let t=[],r="";for(let n of this.elems)typeof n.value=="string"?r+=n.value:(r.length>0&&(t.push(r),r=""),t.push(n.value));return r.length>0&&t.push(r),t}toJSON(){return this.toString()}getWriteable(t,r){if(!this[el])throw new RangeError("getWriteable() requires the objectId to be set");let n=Mf(this[el],this.elems);return n.context=t,n.path=r,n}set(t,r){if(this.context)this.context.setListIndex(this.path,t,r);else if(!this[el])this.elems[t].value=r;else throw new TypeError("Automerge.Text object cannot be modified outside of a change block");return this}insertAt(t,...r){if(this.context)this.context.splice(this.path,t,0,r);else if(!this[el])this.elems.splice(t,0,...r.map(n=>({value:n})));else throw new TypeError("Automerge.Text object cannot be modified outside of a change block");return this}deleteAt(t,r=1){if(this.context)this.context.splice(this.path,t,r,[]);else if(!this[el])this.elems.splice(t,r);else throw new TypeError("Automerge.Text object cannot be modified outside of a change block");return this}};for(let e of["concat","every","filter","find","findIndex","forEach","includes","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toLocaleString"])qf.prototype[e]=function(...t){return[...this][e](...t)};function Mf(e,t){let r=Object.create(qf.prototype);return r[el]=e,r.elems=t,r}sC.exports={Text:qf,instantiateText:Mf}});var zf=de((vW,oC)=>{var{OBJECT_ID:tl,CONFLICTS:DN}=gu(),{isObject:j0,copyObject:aC}=xs();function Hm(e,t,r){for(let n of e)if(t[n]!==r[n]){if(typeof t[n]=="number"&&typeof r[n]=="number")return t[n]-r[n];{let i=""+t[n],a=""+r[n];if(i===a)continue;return i<a?-1:1}}return 0}var Kf=class{constructor(){this.entries=Object.freeze({}),this.opIds=Object.freeze({}),Object.freeze(this)}byId(t){return this.entries[t]}get ids(){return Object.keys(this.entries).filter(t=>{let r=this.entries[t];return j0(r)&&r.id===t})}get count(){return this.ids.length}get rows(){return this.ids.map(t=>this.byId(t))}filter(t,r){return this.rows.filter(t,r)}find(t,r){return this.rows.find(t,r)}map(t,r){return this.rows.map(t,r)}sort(t){if(typeof t=="function")return this.rows.sort(t);if(typeof t=="string")return this.rows.sort((r,n)=>Hm([t],r,n));if(Array.isArray(t))return this.rows.sort((r,n)=>Hm(t,r,n));if(t===void 0)return this.rows.sort((r,n)=>Hm(["id"],r,n));throw new TypeError(`Unsupported sorting argument: ${t}`)}[Symbol.iterator](){let t=this.rows,r=-1;return{next(){return r+=1,r<t.length?{done:!1,value:t[r]}:{done:!0}}}}_clone(){if(!this[tl])throw new RangeError("clone() requires the objectId to be set");return uC(this[tl],aC(this.entries),aC(this.opIds))}_set(t,r,n){if(Object.isFrozen(this.entries))throw new Error("A table can only be modified in a change function");j0(r)&&!Array.isArray(r)&&Object.defineProperty(r,"id",{value:t,enumerable:!0}),this.entries[t]=r,this.opIds[t]=n}remove(t){if(Object.isFrozen(this.entries))throw new Error("A table can only be modified in a change function");delete this.entries[t],delete this.opIds[t]}_freeze(){Object.freeze(this.entries),Object.freeze(this.opIds),Object.freeze(this)}getWriteable(t,r){if(!this[tl])throw new RangeError("getWriteable() requires the objectId to be set");let n=Object.create(Mm.prototype);return n[tl]=this[tl],n.context=t,n.entries=this.entries,n.opIds=this.opIds,n.path=r,n}toJSON(){let t={};for(let r of this.ids)t[r]=this.byId(r);return t}},Mm=class extends Kf{byId(t){if(j0(this.entries[t])&&this.entries[t].id===t){let r=this.entries[t][tl],n=this.path.concat([{key:t,objectId:r}]);return this.context.instantiateObject(n,r,["id"])}}add(t){return this.context.addTableRow(this.path,t)}remove(t){if(j0(this.entries[t])&&this.entries[t].id===t)this.context.deleteTableRow(this.path,t,this.opIds[t]);else throw new RangeError(`There is no row with ID ${t} in this table`)}};function uC(e,t,r){let n=Object.create(Kf.prototype);if(!e)throw new RangeError("instantiateTable requires an objectId to be given");return n[tl]=e,n[DN]=Object.freeze({}),n.entries=t||{},n.opIds=r||{},n}oC.exports={Table:Kf,instantiateTable:uC}});var M0=de((wW,lC)=>{var H0=class{constructor(t){this.value=t||0,Object.freeze(this)}valueOf(){return this.value}toString(){return this.valueOf().toString()}toJSON(){return this.value}},qm=class extends H0{increment(t){return t=typeof t=="number"?t:1,this.context.increment(this.path,this.key,t),this.value+=t,this.value}decrement(t){return this.increment(typeof t=="number"?-t:-1)}};function FN(e,t,r,n,i){let a=Object.create(qm.prototype);return a.value=e,a.context=t,a.path=r,a.objectId=n,a.key=i,a}lC.exports={Counter:H0,getWriteableCounter:FN}});var Vm=de((AW,dC)=>{var{isObject:SN,copyObject:cC,parseOpId:V0}=xs(),{OBJECT_ID:Gf,CONFLICTS:rl,ELEM_IDS:q0}=gu(),{instantiateText:IN}=Vf(),{instantiateTable:BN}=zf(),{Counter:$N}=M0();function mu(e,t,r){return e.objectId?(t&&t[Gf]!==e.objectId&&(t=void 0),hC(e,t,r)):e.datatype==="timestamp"?new Date(e.value):e.datatype==="counter"?new $N(e.value):e.value}function PN(e,t){let r=/^(\d+)@(.*)$/,n=r.test(e)?V0(e):{counter:0,actorId:e},i=r.test(t)?V0(t):{counter:0,actorId:t};return n.counter<i.counter?-1:n.counter>i.counter?1:n.actorId<i.actorId?-1:n.actorId>i.actorId?1:0}function RN(e,t,r,n){if(e)for(let i of Object.keys(e)){let a={},s=Object.keys(e[i]).sort(PN).reverse();for(let u of s){let l=e[i][u];r[i]&&r[i][u]?a[u]=mu(l,r[i][u],n):a[u]=mu(l,void 0,n)}s.length===0?(delete t[i],delete r[i]):(t[i]=a[s[0]],r[i]=a)}}function fC(e,t){let r=cC(e),n=cC(e?e[rl]:void 0);return Object.defineProperty(r,Gf,{value:t}),Object.defineProperty(r,rl,{value:n}),r}function xN(e,t,r){let n=e.objectId;r[n]||(r[n]=fC(t,n));let i=r[n];return RN(e.props,i,i[rl],r),i}function TN(e,t,r){let n=e.objectId;r[n]||(r[n]=t?t._clone():BN(n));let i=r[n];for(let a of Object.keys(e.props||{})){let s=Object.keys(e.props[a]);if(s.length===0)i.remove(a);else if(s.length===1){let u=e.props[a][s[0]];i._set(a,mu(u,i.byId(a),r),s[0])}else throw new RangeError("Conflicts are not supported on properties of a table")}return i}function ON(e,t){let r=e?e.slice():[],n=e&&e[rl]?e[rl].slice():[],i=e&&e[q0]?e[q0].slice():[];return Object.defineProperty(r,Gf,{value:t}),Object.defineProperty(r,rl,{value:n}),Object.defineProperty(r,q0,{value:i}),r}function kN(e,t,r){let n=e.objectId;r[n]||(r[n]=ON(t,n));let i=r[n],a=i[rl],s=i[q0];for(let u=0;u<e.edits.length;u++){let l=e.edits[u];if(l.action==="insert"||l.action==="update"){let f=a[l.index]&&a[l.index][l.opId],d=mu(l.value,f,r),g={[l.opId]:d};for(;u<e.edits.length-1&&e.edits[u+1].index===l.index&&e.edits[u+1].action==="update";){u++;let p=e.edits[u],h=a[p.index]&&a[p.index][p.opId];d=mu(p.value,h,r),g[p.opId]=d}l.action==="insert"?(i.splice(l.index,0,d),a.splice(l.index,0,g),s.splice(l.index,0,l.elemId)):(i[l.index]=d,a[l.index]=g)}else if(l.action==="multi-insert"){let f=V0(l.elemId),d=[],g=[],p=[],h=l.datatype;l.values.forEach((w,v)=>{let y=`${f.counter+v}@${f.actorId}`;w=mu({value:w,datatype:h},void 0,r),g.push(w),p.push({[y]:{value:w,datatype:h,type:"value"}}),d.push(y)}),i.splice(l.index,0,...g),a.splice(l.index,0,...p),s.splice(l.index,0,...d)}else l.action==="remove"&&(i.splice(l.index,l.count),a.splice(l.index,l.count),s.splice(l.index,l.count))}return i}function NN(e,t,r){let n=e.objectId,i;r[n]?i=r[n].elems:t?i=t.elems.slice():i=[];for(let a of e.edits)if(a.action==="insert"){let s=mu(a.value,void 0,r),u={elemId:a.elemId,pred:[a.opId],value:s};i.splice(a.index,0,u)}else if(a.action==="multi-insert"){let s=V0(a.elemId),u=a.datatype,l=a.values.map((f,d)=>{f=mu({datatype:u,value:f},void 0,r);let g=`${s.counter+d}@${s.actorId}`;return{elemId:g,pred:[g],value:f}});i.splice(a.index,0,...l)}else if(a.action==="update"){let s=i[a.index].elemId,u=mu(a.value,i[a.index].value,r);i[a.index]={elemId:s,pred:[a.opId],value:u}}else a.action==="remove"&&i.splice(a.index,a.count);return r[n]=IN(n,i),r[n]}function hC(e,t,r){if(SN(t)&&(!e.props||Object.keys(e.props).length===0)&&(!e.edits||e.edits.length===0)&&!r[e.objectId])return t;if(e.type==="map")return xN(e,t,r);if(e.type==="table")return TN(e,t,r);if(e.type==="list")return kN(e,t,r);if(e.type==="text")return NN(e,t,r);throw new TypeError(`Unknown object type: ${e.type}`)}function LN(e){if(e[Gf]!=="_root")throw new RangeError(`Not the root object: ${e[Gf]}`);return fC(e,"_root")}dC.exports={interpretPatch:hC,cloneRootObject:LN}});var mC=de((EW,gC)=>{var{OBJECT_ID:nl,CHANGE:K0,STATE:UN}=gu(),{createArrayOfNulls:jN}=xs(),{Text:HN}=Vf(),{Table:MN}=zf();function Aa(e){if(typeof e=="string"&&/^[0-9]+$/.test(e)&&(e=parseInt(e,10)),typeof e!="number")throw new TypeError("A list index must be a number, but you passed "+JSON.stringify(e));if(e<0||isNaN(e)||e===1/0||e===-1/0)throw new RangeError("A list index must be positive, but you passed "+e);return e}function qN(e,t,r){let n={deleteAt(i,a){return e.splice(r,Aa(i),a||1,[]),this},fill(i,a,s){let u=e.getObject(t);for(let l=Aa(a||0);l<Aa(s||u.length);l++)e.setListIndex(r,l,i);return this},indexOf(i,a=0){let s=i[nl];if(s){let u=e.getObject(t);for(let l=a;l<u.length;l++)if(u[l][nl]===s)return l;return-1}else return e.getObject(t).indexOf(i,a)},insertAt(i,...a){return e.splice(r,Aa(i),0,a),this},pop(){let i=e.getObject(t);if(i.length==0)return;let a=e.getObjectField(r,t,i.length-1);return e.splice(r,i.length-1,1,[]),a},push(...i){let a=e.getObject(t);return e.splice(r,a.length,0,i),e.getObject(t).length},shift(){if(e.getObject(t).length==0)return;let a=e.getObjectField(r,t,0);return e.splice(r,0,1,[]),a},splice(i,a,...s){let u=e.getObject(t);i=Aa(i),(a===void 0||a>u.length-i)&&(a=u.length-i);let l=[];for(let f=0;f<a;f++)l.push(e.getObjectField(r,t,i+f));return e.splice(r,i,a,s),l},unshift(...i){return e.splice(r,0,0,i),e.getObject(t).length}};for(let i of["entries","keys","values"]){let a=e.getObject(t);n[i]=()=>a[i]()}for(let i of["concat","every","filter","find","findIndex","forEach","includes","join","lastIndexOf","map","reduce","reduceRight","slice","some","toLocaleString","toString"])n[i]=(...a)=>e.getObject(t).map((u,l)=>e.getObjectField(r,t,l))[i](...a);return n}var VN={get(e,t){let{context:r,objectId:n,path:i}=e;return t===nl?n:t===K0?r:t===UN?{actorId:r.actorId}:r.getObjectField(i,n,t)},set(e,t,r){let{context:n,path:i,readonly:a}=e;if(Array.isArray(a)&&a.indexOf(t)>=0)throw new RangeError(`Object property "${t}" cannot be modified`);return n.setMapKey(i,t,r),!0},deleteProperty(e,t){let{context:r,path:n,readonly:i}=e;if(Array.isArray(i)&&i.indexOf(t)>=0)throw new RangeError(`Object property "${t}" cannot be modified`);return r.deleteMapKey(n,t),!0},has(e,t){let{context:r,objectId:n}=e;return[nl,K0].includes(t)||t in r.getObject(n)},getOwnPropertyDescriptor(e,t){let{context:r,objectId:n}=e,i=r.getObject(n);if(t in i)return{configurable:!0,enumerable:!0,value:r.getObjectField(n,t)}},ownKeys(e){let{context:t,objectId:r}=e;return Object.keys(t.getObject(r))}},KN={get(e,t){let[r,n,i]=e;return t===Symbol.iterator?r.getObject(n)[Symbol.iterator]:t===nl?n:t===K0?r:t==="length"?r.getObject(n).length:typeof t=="string"&&/^[0-9]+$/.test(t)?r.getObjectField(i,n,Aa(t)):qN(r,n,i)[t]},set(e,t,r){let[n,i,a]=e;if(t==="length"){if(typeof r!="number")throw new RangeError("Invalid array length");let s=n.getObject(i).length;s>r?n.splice(a,r,s-r,[]):n.splice(a,s,0,jN(r-s))}else n.setListIndex(a,Aa(t),r);return!0},deleteProperty(e,t){let[r,,n]=e;return r.splice(n,Aa(t),1,[]),!0},has(e,t){let[r,n]=e;return typeof t=="string"&&/^[0-9]+$/.test(t)?Aa(t)<r.getObject(n).length:["length",nl,K0].includes(t)},getOwnPropertyDescriptor(e,t){let[r,n]=e,i=r.getObject(n);if(t==="length")return{writable:!0,value:i.length};if(t===nl)return{configurable:!1,enumerable:!1,value:n};if(typeof t=="string"&&/^[0-9]+$/.test(t)){let a=Aa(t);if(a<i.length)return{configurable:!0,enumerable:!0,value:r.getObjectField(n,a)}}},ownKeys(e){let[t,r]=e,n=t.getObject(r),i=["length"];for(let a of Object.keys(n))i.push(a);return i}};function pC(e,t,r,n){return new Proxy({context:e,objectId:t,path:r,readonly:n},VN)}function zN(e,t,r){return new Proxy([e,t,r],KN)}function GN(e,t,r){let n=this.getObject(t);return Array.isArray(n)?zN(this,t,e):n instanceof HN||n instanceof MN?n.getWriteable(this,e):pC(this,t,e,r)}function YN(e){return e.instantiateObject=GN,pC(e,"_root",[])}gC.exports={rootObjectProxy:YN}});var Ym=de((bW,vC)=>{var Km=class{constructor(t){if(!(Number.isInteger(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER))throw new RangeError(`Value ${t} cannot be a uint`);this.value=t,Object.freeze(this)}},zm=class{constructor(t){if(!(Number.isInteger(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=0))throw new RangeError(`Value ${t} cannot be a uint`);this.value=t,Object.freeze(this)}},Gm=class{constructor(t){if(typeof t!="number")throw new RangeError(`Value ${t} cannot be a float64`);this.value=t||0,Object.freeze(this)}};vC.exports={Int:Km,Uint:zm,Float64:Gm}});var bC=de((yW,EC)=>{var{CACHE:WN,OBJECT_ID:z0,CONFLICTS:il,ELEM_IDS:wC,STATE:XN}=gu(),{interpretPatch:JN}=Vm(),{Text:Xf}=Vf(),{Table:Jf}=zf(),{Counter:Xu,getWriteableCounter:ZN}=M0(),{Int:Wm,Uint:Xm,Float64:Jm}=Ym(),{isObject:Yf,parseOpId:AC,createArrayOfNulls:QN}=xs(),eL=U0(),Zm=class{constructor(t,r,n){this.actorId=r,this.nextOpNum=t[XN].maxOp+1,this.cache=t[WN],this.updated={},this.ops=[],this.applyPatch=n||JN}addOp(t){this.ops.push(t),t.action==="set"&&t.values?this.nextOpNum+=t.values.length:t.action==="del"&&t.multiOp?this.nextOpNum+=t.multiOp:this.nextOpNum+=1}nextOpId(){return`${this.nextOpNum}@${this.actorId}`}getValueDescription(t){if(!["object","boolean","number","string"].includes(typeof t))throw new TypeError(`Unsupported type of value: ${typeof t}`);if(Yf(t)){if(t instanceof Date)return{type:"value",value:t.getTime(),datatype:"timestamp"};if(t instanceof Wm)return{type:"value",value:t.value,datatype:"int"};if(t instanceof Xm)return{type:"value",value:t.value,datatype:"uint"};if(t instanceof Jm)return{type:"value",value:t.value,datatype:"float64"};if(t instanceof Xu)return{type:"value",value:t.value,datatype:"counter"};{let r=t[z0],n=this.getObjectType(r);if(!r)throw new RangeError(`Object ${JSON.stringify(t)} has no objectId`);return n==="list"||n==="text"?{objectId:r,type:n,edits:[]}:{objectId:r,type:n,props:{}}}}else return typeof t=="number"?Number.isInteger(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER?{type:"value",value:t,datatype:"int"}:{type:"value",value:t,datatype:"float64"}:{type:"value",value:t}}getValuesDescriptions(t,r,n){if(r instanceof Jf){let i=r.byId(n),a=r.opIds[n];return i?{[a]:this.getValueDescription(i)}:{}}else if(r instanceof Xf){let i=r.get(n),a=r.getElemId(n);return i?{[a]:this.getValueDescription(i)}:{}}else{let i=r[il][n],a={};if(!i)throw new RangeError(`No children at key ${n} of path ${JSON.stringify(t)}`);for(let s of Object.keys(i))a[s]=this.getValueDescription(i[s]);return a}}getPropertyValue(t,r,n){return t instanceof Jf?t.byId(r):t instanceof Xf?t.get(r):t[il][r][n]}getSubpatch(t,r){if(r.length==0)return t;let n=t,i=this.getObject("_root");for(let a of r){let s=this.getValuesDescriptions(r,i,a.key);if(n.props)n.props[a.key]||(n.props[a.key]=s);else if(n.edits)for(let l of Object.keys(s))n.edits.push({action:"update",index:a.key,opId:l,value:s[l]});let u=null;for(let l of Object.keys(s))s[l].objectId===a.objectId&&(u=l);if(!u)throw new RangeError(`Cannot find path object with objectId ${a.objectId}`);n=s[u],i=this.getPropertyValue(i,a.key,u)}return n}getObject(t){let r=this.updated[t]||this.cache[t];if(!r)throw new RangeError(`Target object does not exist: ${t}`);return r}getObjectType(t){if(t==="_root")return"map";let r=this.getObject(t);return r instanceof Xf?"text":r instanceof Jf?"table":Array.isArray(r)?"list":"map"}getObjectField(t,r,n){if(!["string","number"].includes(typeof n))return;let i=this.getObject(r);if(i[n]instanceof Xu)return ZN(i[n].value,this,t,r,n);if(Yf(i[n])){let a=i[n][z0],s=t.concat([{key:n,objectId:a}]);return this.instantiateObject(s,a)}else return i[n]}createNestedObjects(t,r,n,i,a,s){if(n[z0])throw new RangeError("Cannot create a reference to an existing document object");let u=this.nextOpId();if(n instanceof Xf){this.addOp(s?{action:"makeText",obj:t,elemId:s,insert:i,pred:a}:{action:"makeText",obj:t,key:r,insert:i,pred:a});let l={objectId:u,type:"text",edits:[]};return this.insertListItems(l,0,[...n],!0),l}else if(n instanceof Jf){if(n.count>0)throw new RangeError("Assigning a non-empty Table object is not supported");return this.addOp(s?{action:"makeTable",obj:t,elemId:s,insert:i,pred:a}:{action:"makeTable",obj:t,key:r,insert:i,pred:a}),{objectId:u,type:"table",props:{}}}else if(Array.isArray(n)){this.addOp(s?{action:"makeList",obj:t,elemId:s,insert:i,pred:a}:{action:"makeList",obj:t,key:r,insert:i,pred:a});let l={objectId:u,type:"list",edits:[]};return this.insertListItems(l,0,n,!0),l}else{this.addOp(s?{action:"makeMap",obj:t,elemId:s,insert:i,pred:a}:{action:"makeMap",obj:t,key:r,insert:i,pred:a});let l={};for(let f of Object.keys(n).sort()){let d=this.nextOpId(),g=this.setValue(u,f,n[f],!1,[]);l[f]={[d]:g}}return{objectId:u,type:"map",props:l}}}setValue(t,r,n,i,a,s){if(!t)throw new RangeError("setValue needs an objectId");if(r==="")throw new RangeError("The key of a map entry must not be an empty string");if(Yf(n)&&!(n instanceof Date)&&!(n instanceof Xu)&&!(n instanceof Wm)&&!(n instanceof Xm)&&!(n instanceof Jm))return this.createNestedObjects(t,r,n,i,a,s);{let u=this.getValueDescription(n),l={action:"set",obj:t,insert:i,value:u.value,pred:a};return s?l.elemId=s:l.key=r,u.datatype&&(l.datatype=u.datatype),this.addOp(l),u}}applyAtPath(t,r){let n={objectId:"_root",type:"map",props:{}};r(this.getSubpatch(n,t)),this.applyPatch(n,this.cache._root,this.updated)}setMapKey(t,r,n){if(typeof r!="string")throw new RangeError(`The key of a map entry must be a string, not ${typeof r}`);let i=t.length===0?"_root":t[t.length-1].objectId,a=this.getObject(i);if(a[r]instanceof Xu)throw new RangeError("Cannot overwrite a Counter object; use .increment() or .decrement() to change its value.");(a[r]!==n||Object.keys(a[il][r]||{}).length>1||n===void 0)&&this.applyAtPath(t,s=>{let u=Wf(a,r),l=this.nextOpId(),f=this.setValue(i,r,n,!1,u);s.props[r]={[l]:f}})}deleteMapKey(t,r){let n=t.length===0?"_root":t[t.length-1].objectId,i=this.getObject(n);if(i[r]!==void 0){let a=Wf(i,r);this.addOp({action:"del",obj:n,key:r,insert:!1,pred:a}),this.applyAtPath(t,s=>{s.props[r]={}})}}insertListItems(t,r,n,i){let a=i?[]:this.getObject(t.objectId);if(r<0||r>a.length)throw new RangeError(`List index ${r} is out of bounds for list of length ${a.length}`);if(n.length===0)return;let s=G0(a,r,!0),u=n.every(d=>typeof d=="string"||typeof d=="number"||typeof d=="boolean"||d===null||Yf(d)&&(d instanceof Date||d instanceof Xu||d instanceof Wm||d instanceof Xm||d instanceof Jm)),l=u?n.map(d=>this.getValueDescription(d)):[],f=l.every(d=>d.datatype===l[0].datatype);if(u&&f&&n.length>1){let d=this.nextOpId(),g=l[0].datatype,p=l.map(v=>v.value),h={action:"set",obj:t.objectId,elemId:s,insert:!0,values:p,pred:[]},w={action:"multi-insert",elemId:d,index:r,values:p};g&&(h.datatype=g,w.datatype=g),this.addOp(h),t.edits.push(w)}else for(let d=0;d<n.length;d++){let g=this.nextOpId(),p=this.setValue(t.objectId,r+d,n[d],!0,[],s);s=g,t.edits.push({action:"insert",index:r+d,elemId:s,opId:s,value:p})}}setListIndex(t,r,n){let i=t.length===0?"_root":t[t.length-1].objectId,a=this.getObject(i);if(r>=a.length){let s=QN(r-a.length);return s.push(n),this.splice(t,a.length,0,s)}if(a[r]instanceof Xu)throw new RangeError("Cannot overwrite a Counter object; use .increment() or .decrement() to change its value.");(a[r]!==n||Object.keys(a[il][r]||{}).length>1||n===void 0)&&this.applyAtPath(t,s=>{let u=Wf(a,r),l=this.nextOpId(),f=this.setValue(i,r,n,!1,u,G0(a,r));s.edits.push({action:"update",index:r,opId:l,value:f})})}splice(t,r,n,i){let a=t.length===0?"_root":t[t.length-1].objectId,s=this.getObject(a);if(r<0||n<0||r>s.length-n)throw new RangeError(`${n} deletions starting at index ${r} are out of bounds for list of length ${s.length}`);if(n===0&&i.length===0)return;let u={diffs:{objectId:"_root",type:"map",props:{}}},l=this.getSubpatch(u.diffs,t);if(n>0){let f,d,g;for(let p=0;p<n;p++){if(this.getObjectField(t,a,r+p)instanceof Xu)throw new TypeError("Unsupported operation: deleting a counter from a list");let h=G0(s,r+p),w=AC(h),v=Wf(s,r+p),y=v.length===1?AC(v[0]):void 0;f&&d&&g&&y&&d.actorId===w.actorId&&d.counter+1===w.counter&&g.actorId===y.actorId&&g.counter+1===y.counter?f.multiOp=(f.multiOp||1)+1:(f&&this.addOp(f),f={action:"del",obj:a,elemId:h,insert:!1,pred:v}),d=w,g=y}this.addOp(f),l.edits.push({action:"remove",index:r,count:n})}i.length>0&&this.insertListItems(l,r,i,!1),this.applyPatch(u.diffs,this.cache._root,this.updated)}addTableRow(t,r){if(!Yf(r)||Array.isArray(r))throw new TypeError("A table row must be an object");if(r[z0])throw new TypeError("Cannot reuse an existing object as table row");if(r.id)throw new TypeError('A table row must not have an "id" property; it is generated automatically');let n=eL(),i=this.setValue(t[t.length-1].objectId,n,r,!1,[]);return this.applyAtPath(t,a=>{a.props[n]={[i.objectId]:i}}),n}deleteTableRow(t,r,n){let i=t[t.length-1].objectId;this.getObject(i).byId(r)&&(this.addOp({action:"del",obj:i,key:r,insert:!1,pred:[n]}),this.applyAtPath(t,s=>{s.props[r]={}}))}increment(t,r,n){let i=t.length===0?"_root":t[t.length-1].objectId,a=this.getObject(i);if(!(a[r]instanceof Xu))throw new TypeError("Only counter values can be incremented");let s=this.getObjectType(i),u=a[r].value+n,l=this.nextOpId(),f=Wf(a,r);if(s==="list"||s==="text"){let d=G0(a,r,!1);this.addOp({action:"inc",obj:i,elemId:d,value:n,insert:!1,pred:f})}else this.addOp({action:"inc",obj:i,key:r,value:n,insert:!1,pred:f});this.applyAtPath(t,d=>{s==="list"||s==="text"?d.edits.push({action:"update",index:r,opId:l,value:{value:u,datatype:"counter"}}):d.props[r]={[l]:{value:u,datatype:"counter"}}})}};function Wf(e,t){return e instanceof Jf?[e.opIds[t]]:e instanceof Xf?e.elems[t].pred:e[il]?e[il][t]?Object.keys(e[il][t]):[]:[]}function G0(e,t,r=!1){if(r){if(t===0)return"_head";t-=1}if(e[wC])return e[wC][t];if(e.getElemId)return e.getElemId(t);throw new RangeError(`Cannot find elemId at list index ${t}`)}EC.exports={Context:Zm}});var _C=de((_W,yC)=>{var{OBJECT_ID:tL,CONFLICTS:si}=gu(),Qm=class{constructor(){this.observers={}}patchCallback(t,r,n,i,a){this._objectUpdate(t.diffs,r,n,i,a)}_objectUpdate(t,r,n,i,a){if(t.objectId){if(this.observers[t.objectId])for(let s of this.observers[t.objectId])s(t,r,n,i,a);if(t.type==="map"&&t.props)for(let s of Object.keys(t.props))for(let u of Object.keys(t.props[s]))this._objectUpdate(t.props[s][u],r&&r[si]&&r[si][s]&&r[si][s][u],n&&n[si]&&n[si][s]&&n[si][s][u],i,a);else if(t.type==="table"&&t.props)for(let s of Object.keys(t.props))for(let u of Object.keys(t.props[s]))this._objectUpdate(t.props[s][u],r&&r.byId(s),n&&n.byId(s),i,a);else if(t.type==="list"&&t.edits){let s=0;for(let u of t.edits)u.action==="insert"?(s-=1,this._objectUpdate(u.value,void 0,n&&n[si]&&n[si][u.index]&&n[si][u.index][u.elemId],i,a)):u.action==="multi-insert"?s-=u.values.length:u.action==="update"?this._objectUpdate(u.value,r&&r[si]&&r[si][u.index+s]&&r[si][u.index+s][u.opId],n&&n[si]&&n[si][u.index]&&n[si][u.index][u.opId],i,a):u.action==="remove"&&(s+=u.count)}else if(t.type==="text"&&t.edits){let s=0;for(let u of t.edits)u.action==="insert"?(s-=1,this._objectUpdate(u.value,void 0,n&&n.get(u.index),i,a)):u.action==="multi-insert"?s-=u.values.length:u.action==="update"?this._objectUpdate(u.value,r&&r.get(u.index+s),n&&n.get(u.index),i,a):u.action==="remove"&&(s+=u.count)}}}observe(t,r){let n=t[tL];if(!n)throw new TypeError("The observed object must be part of an Automerge document");this.observers[n]||(this.observers[n]=[]),this.observers[n].push(r)}};yC.exports={Observable:Qm}});var RC=de((CW,PC)=>{var{OPTIONS:Ea,CACHE:vc,STATE:ba,OBJECT_ID:Ac,CONFLICTS:wc,CHANGE:CC,ELEM_IDS:rL}=gu(),{isObject:rv,copyObject:ev}=xs(),nL=U0(),{interpretPatch:iL,cloneRootObject:sL}=Vm(),{rootObjectProxy:aL}=mC(),{Context:DC}=bC(),{Text:nv}=Vf(),{Table:FC}=zf(),{Counter:uL}=M0(),{Float64:oL,Int:lL,Uint:cL}=Ym(),{Observable:fL}=_C();function SC(e){if(typeof e!="string")throw new TypeError(`Unsupported type of actorId: ${typeof e}`);if(!/^[0-9a-f]+$/.test(e))throw new RangeError("actorId must consist only of lowercase hex digits");if(e.length%2!==0)throw new RangeError("actorId must consist of an even number of digits")}function Y0(e,t,r){let n=t._root;if(n||(n=sL(e[vc]._root),t._root=n),Object.defineProperty(n,Ea,{value:e[Ea]}),Object.defineProperty(n,vc,{value:t}),Object.defineProperty(n,ba,{value:r}),e[Ea].freeze)for(let i of Object.keys(t))t[i]instanceof FC?t[i]._freeze():t[i]instanceof nv?(Object.freeze(t[i].elems),Object.freeze(t[i])):(Object.freeze(t[i]),Object.freeze(t[i][wc]));for(let i of Object.keys(e[vc]))t[i]||(t[i]=e[vc][i]);return e[Ea].freeze&&Object.freeze(t),n}function IC(e,t,r){let n=Ec(e);if(!n)throw new Error("Actor ID must be initialized with setActorId() before making a change");let i=ev(e[ba]);i.seq+=1;let a={actor:n,seq:i.seq,startOp:i.maxOp+1,deps:i.deps,time:r&&typeof r.time=="number"?r.time:Math.round(new Date().getTime()/1e3),message:r&&typeof r.message=="string"?r.message:"",ops:t.ops};if(e[Ea].backend){let[s,u,l]=e[Ea].backend.applyLocalChange(i.backendState,a);i.backendState=s,i.lastLocalChange=l;let f=tv(e,u,i,!0),d=r&&r.patchCallback||e[Ea].patchCallback;return d&&d(u,e,f,!0,[l]),[f,a]}else{let s={actor:n,seq:a.seq,before:e};return i.requests=i.requests.concat([s]),i.maxOp=i.maxOp+hL(a.ops),i.deps=[],[Y0(e,t?t.updated:{},i),a]}}function hL(e){let t=0;for(let r of e)r.action==="set"&&r.values?t+=r.values.length:t+=1;return t}function dL(e){return e[ba]&&e[ba].lastLocalChange?e[ba].lastLocalChange:null}function tv(e,t,r,n){let i=Ec(e),a={};if(iL(t.diffs,e,a),n){if(!t.clock)throw new RangeError("patch is missing clock field");t.clock[i]&&t.clock[i]>r.seq&&(r.seq=t.clock[i]),r.clock=t.clock,r.deps=t.deps,r.maxOp=Math.max(r.maxOp,t.maxOp)}return Y0(e,a,r)}function BC(e){if(typeof e=="string")e={actorId:e};else if(typeof e>"u")e={};else if(!rv(e))throw new TypeError(`Unsupported value for init() options: ${e}`);if(e.deferActorId||(e.actorId===void 0&&(e.actorId=nL()),SC(e.actorId)),e.observable){let i=e.patchCallback,a=e.observable;e.patchCallback=(s,u,l,f,d)=>{i&&i(s,u,l,f,d),a.patchCallback(s,u,l,f,d)}}let t={},r={_root:t},n={seq:0,maxOp:0,requests:[],clock:{},deps:[]};return e.backend&&(n.backendState=e.backend.init(),n.lastLocalChange=null),Object.defineProperty(t,Ac,{value:"_root"}),Object.defineProperty(t,Ea,{value:Object.freeze(e)}),Object.defineProperty(t,wc,{value:Object.freeze({})}),Object.defineProperty(t,vc,{value:Object.freeze(r)}),Object.defineProperty(t,ba,{value:Object.freeze(n)}),Object.freeze(t)}function pL(e,t){return $C(BC(t),"Initialization",r=>Object.assign(r,e))}function $C(e,t,r){if(e[Ac]!=="_root")throw new TypeError("The first argument to Automerge.change must be the document root");if(e[CC])throw new TypeError("Calls to Automerge.change cannot be nested");if(typeof t=="function"&&r===void 0&&([t,r]=[r,t]),typeof t=="string"&&(t={message:t}),t!==void 0&&!rv(t))throw new TypeError("Unsupported type of options");let n=Ec(e);if(!n)throw new Error("Actor ID must be initialized with setActorId() before making a change");let i=new DC(e,n);return r(aL(i)),Object.keys(i.updated).length===0?[e,null]:IC(e,i,t)}function gL(e,t){if(e[Ac]!=="_root")throw new TypeError("The first argument to Automerge.emptyChange must be the document root");if(typeof t=="string"&&(t={message:t}),t!==void 0&&!rv(t))throw new TypeError("Unsupported type of options");let r=Ec(e);if(!r)throw new Error("Actor ID must be initialized with setActorId() before making a change");return IC(e,new DC(e,r),t)}function mL(e,t,r=void 0){if(e[Ac]!=="_root")throw new TypeError("The first argument to Frontend.applyPatch must be the document root");let n=ev(e[ba]);if(e[Ea].backend){if(!r)throw new RangeError("applyPatch must be called with the updated backend state");return n.backendState=r,tv(e,t,n,!0)}let i;if(n.requests.length>0)if(i=n.requests[0].before,t.actor===Ec(e)){if(n.requests[0].seq!==t.seq)throw new RangeError(`Mismatched sequence number: patch ${t.seq} does not match next request ${n.requests[0].seq}`);n.requests=n.requests.slice(1)}else n.requests=n.requests.slice();else i=e,n.requests=[];let a=tv(i,t,n,!0);return n.requests.length===0?a:(n.requests[0]=ev(n.requests[0]),n.requests[0].before=a,Y0(e,{},n))}function vL(e){return e[Ac]}function wL(e,t){if(e[CC])throw new TypeError("Cannot use getObjectById in a change callback");return e[vc][t]}function Ec(e){return e[ba].actorId||e[Ea].actorId}function AL(e,t){SC(t);let r=Object.assign({},e[ba],{actorId:t});return Y0(e,{},r)}function EL(e,t){if(e[wc]&&e[wc][t]&&Object.keys(e[wc][t]).length>1)return e[wc][t]}function bL(e,t=null,r="first"){if(e[Ac]!=="_root"){let n=Array.isArray(e)?". Note: Automerge.applyChanges now returns an array.":"";throw t?new TypeError(`The ${r} argument to Automerge.${t} must be the document root${n}`):new TypeError(`Argument is not an Automerge document root${n}`)}return e[ba].backendState}function yL(e){return e instanceof nv?e.elems.map(t=>t.elemId):e[rL]}PC.exports={init:BC,from:pL,change:$C,emptyChange:gL,applyPatch:mL,getObjectId:vL,getObjectById:wL,getActorId:Ec,setActorId:AL,getConflicts:EL,getLastLocalChange:dL,getBackendState:bL,getElementIds:yL,Text:nv,Table:FC,Counter:uL,Observable:fL,Float64:oL,Int:lL,Uint:cL}});var QC=de((DW,_c)=>{"use strict";function yc(e){let t=e.length;for(;--t>=0;)e[t]=0}var _L=0,LC=1,CL=2,DL=3,FL=258,cv=29,nh=256,Qf=nh+1+cv,bc=30,fv=19,UC=2*Qf+1,sl=15,iv=16,SL=7,hv=256,jC=16,HC=17,MC=18,ov=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),W0=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),IL=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),qC=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),BL=512,vu=new Array((Qf+2)*2);yc(vu);var Zf=new Array(bc*2);yc(Zf);var eh=new Array(BL);yc(eh);var th=new Array(FL-DL+1);yc(th);var dv=new Array(cv);yc(dv);var X0=new Array(bc);yc(X0);function sv(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var VC,KC,zC;function av(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var GC=e=>e<256?eh[e]:eh[256+(e>>>7)],rh=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Si=(e,t,r)=>{e.bi_valid>iv-r?(e.bi_buf|=t<<e.bi_valid&65535,rh(e,e.bi_buf),e.bi_buf=t>>iv-e.bi_valid,e.bi_valid+=r-iv):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)},ya=(e,t,r)=>{Si(e,r[t*2],r[t*2+1])},YC=(e,t)=>{let r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1},$L=e=>{e.bi_valid===16?(rh(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},PL=(e,t)=>{let r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,l=t.stat_desc.max_length,f,d,g,p,h,w,v=0;for(p=0;p<=sl;p++)e.bl_count[p]=0;for(r[e.heap[e.heap_max]*2+1]=0,f=e.heap_max+1;f<UC;f++)d=e.heap[f],p=r[r[d*2+1]*2+1]+1,p>l&&(p=l,v++),r[d*2+1]=p,!(d>n)&&(e.bl_count[p]++,h=0,d>=u&&(h=s[d-u]),w=r[d*2],e.opt_len+=w*(p+h),a&&(e.static_len+=w*(i[d*2+1]+h)));if(v!==0){do{for(p=l-1;e.bl_count[p]===0;)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[l]--,v-=2}while(v>0);for(p=l;p!==0;p--)for(d=e.bl_count[p];d!==0;)g=e.heap[--f],!(g>n)&&(r[g*2+1]!==p&&(e.opt_len+=(p-r[g*2+1])*r[g*2],r[g*2+1]=p),d--)}},WC=(e,t,r)=>{let n=new Array(sl+1),i=0,a,s;for(a=1;a<=sl;a++)i=i+r[a-1]<<1,n[a]=i;for(s=0;s<=t;s++){let u=e[s*2+1];u!==0&&(e[s*2]=YC(n[u]++,u))}},RL=()=>{let e,t,r,n,i,a=new Array(sl+1);for(r=0,n=0;n<cv-1;n++)for(dv[n]=r,e=0;e<1<<ov[n];e++)th[r++]=n;for(th[r-1]=n,i=0,n=0;n<16;n++)for(X0[n]=i,e=0;e<1<<W0[n];e++)eh[i++]=n;for(i>>=7;n<bc;n++)for(X0[n]=i<<7,e=0;e<1<<W0[n]-7;e++)eh[256+i++]=n;for(t=0;t<=sl;t++)a[t]=0;for(e=0;e<=143;)vu[e*2+1]=8,e++,a[8]++;for(;e<=255;)vu[e*2+1]=9,e++,a[9]++;for(;e<=279;)vu[e*2+1]=7,e++,a[7]++;for(;e<=287;)vu[e*2+1]=8,e++,a[8]++;for(WC(vu,Qf+1,a),e=0;e<bc;e++)Zf[e*2+1]=5,Zf[e*2]=YC(e,5);VC=new sv(vu,ov,nh+1,Qf,sl),KC=new sv(Zf,W0,0,bc,sl),zC=new sv(new Array(0),IL,0,fv,SL)},XC=e=>{let t;for(t=0;t<Qf;t++)e.dyn_ltree[t*2]=0;for(t=0;t<bc;t++)e.dyn_dtree[t*2]=0;for(t=0;t<fv;t++)e.bl_tree[t*2]=0;e.dyn_ltree[hv*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},JC=e=>{e.bi_valid>8?rh(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},xC=(e,t,r,n)=>{let i=t*2,a=r*2;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]},uv=(e,t,r)=>{let n=e.heap[r],i=r<<1;for(;i<=e.heap_len&&(i<e.heap_len&&xC(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!xC(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n},TC=(e,t,r)=>{let n,i,a=0,s,u;if(e.sym_next!==0)do n=e.pending_buf[e.sym_buf+a++]&255,n+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],n===0?ya(e,i,t):(s=th[i],ya(e,s+nh+1,t),u=ov[s],u!==0&&(i-=dv[s],Si(e,i,u)),n--,s=GC(n),ya(e,s,r),u=W0[s],u!==0&&(n-=X0[s],Si(e,n,u)));while(a<e.sym_next);ya(e,hv,t)},lv=(e,t)=>{let r=t.dyn_tree,n=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,s,u,l=-1,f;for(e.heap_len=0,e.heap_max=UC,s=0;s<a;s++)r[s*2]!==0?(e.heap[++e.heap_len]=l=s,e.depth[s]=0):r[s*2+1]=0;for(;e.heap_len<2;)f=e.heap[++e.heap_len]=l<2?++l:0,r[f*2]=1,e.depth[f]=0,e.opt_len--,i&&(e.static_len-=n[f*2+1]);for(t.max_code=l,s=e.heap_len>>1;s>=1;s--)uv(e,r,s);f=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],uv(e,r,1),u=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=u,r[f*2]=r[s*2]+r[u*2],e.depth[f]=(e.depth[s]>=e.depth[u]?e.depth[s]:e.depth[u])+1,r[s*2+1]=r[u*2+1]=f,e.heap[1]=f++,uv(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],PL(e,t),WC(r,l,e.bl_count)},OC=(e,t,r)=>{let n,i=-1,a,s=t[0*2+1],u=0,l=7,f=4;for(s===0&&(l=138,f=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)a=s,s=t[(n+1)*2+1],!(++u<l&&a===s)&&(u<f?e.bl_tree[a*2]+=u:a!==0?(a!==i&&e.bl_tree[a*2]++,e.bl_tree[jC*2]++):u<=10?e.bl_tree[HC*2]++:e.bl_tree[MC*2]++,u=0,i=a,s===0?(l=138,f=3):a===s?(l=6,f=3):(l=7,f=4))},kC=(e,t,r)=>{let n,i=-1,a,s=t[0*2+1],u=0,l=7,f=4;for(s===0&&(l=138,f=3),n=0;n<=r;n++)if(a=s,s=t[(n+1)*2+1],!(++u<l&&a===s)){if(u<f)do ya(e,a,e.bl_tree);while(--u!==0);else a!==0?(a!==i&&(ya(e,a,e.bl_tree),u--),ya(e,jC,e.bl_tree),Si(e,u-3,2)):u<=10?(ya(e,HC,e.bl_tree),Si(e,u-3,3)):(ya(e,MC,e.bl_tree),Si(e,u-11,7));u=0,i=a,s===0?(l=138,f=3):a===s?(l=6,f=3):(l=7,f=4)}},xL=e=>{let t;for(OC(e,e.dyn_ltree,e.l_desc.max_code),OC(e,e.dyn_dtree,e.d_desc.max_code),lv(e,e.bl_desc),t=fv-1;t>=3&&e.bl_tree[qC[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},TL=(e,t,r,n)=>{let i;for(Si(e,t-257,5),Si(e,r-1,5),Si(e,n-4,4),i=0;i<n;i++)Si(e,e.bl_tree[qC[i]*2+1],3);kC(e,e.dyn_ltree,t-1),kC(e,e.dyn_dtree,r-1)},OL=e=>{let t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return 0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return 1;for(r=32;r<nh;r++)if(e.dyn_ltree[r*2]!==0)return 1;return 0},NC=!1,kL=e=>{NC||(RL(),NC=!0),e.l_desc=new av(e.dyn_ltree,VC),e.d_desc=new av(e.dyn_dtree,KC),e.bl_desc=new av(e.bl_tree,zC),e.bi_buf=0,e.bi_valid=0,XC(e)},ZC=(e,t,r,n)=>{Si(e,(_L<<1)+(n?1:0),3),JC(e),rh(e,r),rh(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},NL=e=>{Si(e,LC<<1,3),ya(e,hv,vu),$L(e)},LL=(e,t,r,n)=>{let i,a,s=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=OL(e)),lv(e,e.l_desc),lv(e,e.d_desc),s=xL(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&t!==-1?ZC(e,t,r,n):e.strategy===4||a===i?(Si(e,(LC<<1)+(n?1:0),3),TC(e,vu,Zf)):(Si(e,(CL<<1)+(n?1:0),3),TL(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),TC(e,e.dyn_ltree,e.dyn_dtree)),XC(e),n&&JC(e)},UL=(e,t,r)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(th[r]+nh+1)*2]++,e.dyn_dtree[GC(t)*2]++),e.sym_next===e.sym_end);_c.exports._tr_init=kL;_c.exports._tr_stored_block=ZC;_c.exports._tr_flush_block=LL;_c.exports._tr_tally=UL;_c.exports._tr_align=NL});var pv=de((FW,e6)=>{"use strict";var jL=(e,t,r,n)=>{let i=e&65535|0,a=e>>>16&65535|0,s=0;for(;r!==0;){s=r>2e3?2e3:r,r-=s;do i=i+t[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0};e6.exports=jL});var gv=de((SW,t6)=>{"use strict";var HL=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t},ML=new Uint32Array(HL()),qL=(e,t,r,n)=>{let i=ML,a=n+r;e^=-1;for(let s=n;s<a;s++)e=e>>>8^i[(e^t[s])&255];return e^-1};t6.exports=qL});var J0=de((IW,r6)=>{"use strict";r6.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var Ju=de((BW,n6)=>{"use strict";n6.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var d6=de(($W,Fa)=>{"use strict";var{_tr_init:VL,_tr_stored_block:wv,_tr_flush_block:KL,_tr_tally:to,_tr_align:zL}=QC(),u6=pv(),Zu=gv(),GL=J0(),{Z_NO_FLUSH:ro,Z_PARTIAL_FLUSH:YL,Z_FULL_FLUSH:WL,Z_FINISH:gs,Z_BLOCK:i6,Z_OK:Sn,Z_STREAM_END:s6,Z_STREAM_ERROR:Ca,Z_DATA_ERROR:XL,Z_BUF_ERROR:mv,Z_DEFAULT_COMPRESSION:JL,Z_FILTERED:ZL,Z_HUFFMAN_ONLY:Z0,Z_RLE:QL,Z_FIXED:eU,Z_DEFAULT_STRATEGY:tU,Z_UNKNOWN:rU,Z_DEFLATED:Q0}=Ju(),nU=9,iU=15,sU=8,aU=29,uU=256,Av=uU+1+aU,oU=30,lU=19,cU=2*Av+1,fU=15,Bt=3,eo=258,Da=eo+Bt+1,hU=32,Dc=42,Dv=57,Ev=69,bv=73,yv=91,_v=103,al=113,sh=666,ai=1,Sc=2,ol=3,Ic=4,dU=3,ul=(e,t)=>(e.msg=GL[t],t),a6=e=>e*2-(e>4?9:0),Qu=e=>{let t=e.length;for(;--t>=0;)e[t]=0},pU=e=>{let t,r,n,i=e.w_size;t=e.hash_size,n=t;do r=e.head[--n],e.head[n]=r>=i?r-i:0;while(--t);t=i,n=t;do r=e.prev[--n],e.prev[n]=r>=i?r-i:0;while(--t)},gU=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask,no=gU,Wi=e=>{let t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))},Xi=(e,t)=>{KL(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Wi(e.strm)},Mt=(e,t)=>{e.pending_buf[e.pending++]=t},ih=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Cv=(e,t,r,n)=>{let i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),r),e.state.wrap===1?e.adler=u6(e.adler,t,i,r):e.state.wrap===2&&(e.adler=Zu(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)},o6=(e,t)=>{let r=e.max_chain_length,n=e.strstart,i,a,s=e.prev_length,u=e.nice_match,l=e.strstart>e.w_size-Da?e.strstart-(e.w_size-Da):0,f=e.window,d=e.w_mask,g=e.prev,p=e.strstart+eo,h=f[n+s-1],w=f[n+s];e.prev_length>=e.good_match&&(r>>=2),u>e.lookahead&&(u=e.lookahead);do if(i=t,!(f[i+s]!==w||f[i+s-1]!==h||f[i]!==f[n]||f[++i]!==f[n+1])){n+=2,i++;do;while(f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&f[++n]===f[++i]&&n<p);if(a=eo-(p-n),n=p-eo,a>s){if(e.match_start=t,s=a,a>=u)break;h=f[n+s-1],w=f[n+s]}}while((t=g[t&d])>l&&--r!==0);return s<=e.lookahead?s:e.lookahead},Fc=e=>{let t=e.w_size,r,n,i;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Da)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),pU(e),n+=t),e.strm.avail_in===0)break;if(r=Cv(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=Bt)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=no(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=no(e,e.ins_h,e.window[i+Bt-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<Bt)););}while(e.lookahead<Da&&e.strm.avail_in!==0)},l6=(e,t)=>{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n,i,a,s=0,u=e.strm.avail_in;do{if(n=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,n>i+e.strm.avail_in&&(n=i+e.strm.avail_in),n>a&&(n=a),n<r&&(n===0&&t!==gs||t===ro||n!==i+e.strm.avail_in)))break;s=t===gs&&n===i+e.strm.avail_in?1:0,wv(e,0,0,s),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,Wi(e.strm),i&&(i>n&&(i=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,n-=i),n&&(Cv(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(s===0);return u-=e.strm.avail_in,u&&(u>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=u&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-u,e.strm.next_in),e.strstart),e.strstart+=u,e.insert+=u>e.w_size-e.insert?e.w_size-e.insert:u),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?Ic:t!==ro&&t!==gs&&e.strm.avail_in===0&&e.strstart===e.block_start?Sc:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(Cv(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,r=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=r||(i||t===gs)&&t!==ro&&e.strm.avail_in===0&&i<=a)&&(n=i>a?a:i,s=t===gs&&e.strm.avail_in===0&&n===i?1:0,wv(e,e.block_start,n,s),e.block_start+=n,Wi(e.strm)),s?ol:ai)},vv=(e,t)=>{let r,n;for(;;){if(e.lookahead<Da){if(Fc(e),e.lookahead<Da&&t===ro)return ai;if(e.lookahead===0)break}if(r=0,e.lookahead>=Bt&&(e.ins_h=no(e,e.ins_h,e.window[e.strstart+Bt-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Da&&(e.match_length=o6(e,r)),e.match_length>=Bt)if(n=to(e,e.strstart-e.match_start,e.match_length-Bt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Bt){e.match_length--;do e.strstart++,e.ins_h=no(e,e.ins_h,e.window[e.strstart+Bt-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=no(e,e.ins_h,e.window[e.strstart+1]);else n=to(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Xi(e,!1),e.strm.avail_out===0))return ai}return e.insert=e.strstart<Bt-1?e.strstart:Bt-1,t===gs?(Xi(e,!0),e.strm.avail_out===0?ol:Ic):e.sym_next&&(Xi(e,!1),e.strm.avail_out===0)?ai:Sc},Cc=(e,t)=>{let r,n,i;for(;;){if(e.lookahead<Da){if(Fc(e),e.lookahead<Da&&t===ro)return ai;if(e.lookahead===0)break}if(r=0,e.lookahead>=Bt&&(e.ins_h=no(e,e.ins_h,e.window[e.strstart+Bt-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Bt-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Da&&(e.match_length=o6(e,r),e.match_length<=5&&(e.strategy===ZL||e.match_length===Bt&&e.strstart-e.match_start>4096)&&(e.match_length=Bt-1)),e.prev_length>=Bt&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Bt,n=to(e,e.strstart-1-e.prev_match,e.prev_length-Bt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=no(e,e.ins_h,e.window[e.strstart+Bt-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Bt-1,e.strstart++,n&&(Xi(e,!1),e.strm.avail_out===0))return ai}else if(e.match_available){if(n=to(e,0,e.window[e.strstart-1]),n&&Xi(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return ai}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=to(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Bt-1?e.strstart:Bt-1,t===gs?(Xi(e,!0),e.strm.avail_out===0?ol:Ic):e.sym_next&&(Xi(e,!1),e.strm.avail_out===0)?ai:Sc},mU=(e,t)=>{let r,n,i,a,s=e.window;for(;;){if(e.lookahead<=eo){if(Fc(e),e.lookahead<=eo&&t===ro)return ai;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Bt&&e.strstart>0&&(i=e.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=e.strstart+eo;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a);e.match_length=eo-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Bt?(r=to(e,1,e.match_length-Bt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=to(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Xi(e,!1),e.strm.avail_out===0))return ai}return e.insert=0,t===gs?(Xi(e,!0),e.strm.avail_out===0?ol:Ic):e.sym_next&&(Xi(e,!1),e.strm.avail_out===0)?ai:Sc},vU=(e,t)=>{let r;for(;;){if(e.lookahead===0&&(Fc(e),e.lookahead===0)){if(t===ro)return ai;break}if(e.match_length=0,r=to(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Xi(e,!1),e.strm.avail_out===0))return ai}return e.insert=0,t===gs?(Xi(e,!0),e.strm.avail_out===0?ol:Ic):e.sym_next&&(Xi(e,!1),e.strm.avail_out===0)?ai:Sc};function _a(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var ah=[new _a(0,0,0,0,l6),new _a(4,4,8,4,vv),new _a(4,5,16,8,vv),new _a(4,6,32,32,vv),new _a(4,4,16,16,Cc),new _a(8,16,32,32,Cc),new _a(8,16,128,128,Cc),new _a(8,32,128,256,Cc),new _a(32,128,258,1024,Cc),new _a(32,258,258,4096,Cc)],wU=e=>{e.window_size=2*e.w_size,Qu(e.head),e.max_lazy_match=ah[e.level].max_lazy,e.good_match=ah[e.level].good_length,e.nice_match=ah[e.level].nice_length,e.max_chain_length=ah[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Bt-1,e.match_available=0,e.ins_h=0};function AU(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Q0,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(cU*2),this.dyn_dtree=new Uint16Array((2*oU+1)*2),this.bl_tree=new Uint16Array((2*lU+1)*2),Qu(this.dyn_ltree),Qu(this.dyn_dtree),Qu(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(fU+1),this.heap=new Uint16Array(2*Av+1),Qu(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Av+1),Qu(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var uh=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==Dc&&t.status!==Dv&&t.status!==Ev&&t.status!==bv&&t.status!==yv&&t.status!==_v&&t.status!==al&&t.status!==sh?1:0},c6=e=>{if(uh(e))return ul(e,Ca);e.total_in=e.total_out=0,e.data_type=rU;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Dv:t.wrap?Dc:al,e.adler=t.wrap===2?0:1,t.last_flush=-2,VL(t),Sn},f6=e=>{let t=c6(e);return t===Sn&&wU(e.state),t},EU=(e,t)=>uh(e)||e.state.wrap!==2?Ca:(e.state.gzhead=t,Sn),h6=(e,t,r,n,i,a)=>{if(!e)return Ca;let s=1;if(t===JL&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>nU||r!==Q0||n<8||n>15||t<0||t>9||a<0||a>eU||n===8&&s!==1)return ul(e,Ca);n===8&&(n=9);let u=new AU;return e.state=u,u.strm=e,u.status=Dc,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=i+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+Bt-1)/Bt),u.window=new Uint8Array(u.w_size*2),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=(u.lit_bufsize-1)*3,u.level=t,u.strategy=a,u.method=r,f6(e)},bU=(e,t)=>h6(e,t,Q0,iU,sU,tU),yU=(e,t)=>{if(uh(e)||t>i6||t<0)return e?ul(e,Ca):Ca;let r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===sh&&t!==gs)return ul(e,e.avail_out===0?mv:Ca);let n=r.last_flush;if(r.last_flush=t,r.pending!==0){if(Wi(e),e.avail_out===0)return r.last_flush=-1,Sn}else if(e.avail_in===0&&a6(t)<=a6(n)&&t!==gs)return ul(e,mv);if(r.status===sh&&e.avail_in!==0)return ul(e,mv);if(r.status===Dc&&r.wrap===0&&(r.status=al),r.status===Dc){let i=Q0+(r.w_bits-8<<4)<<8,a=-1;if(r.strategy>=Z0||r.level<2?a=0:r.level<6?a=1:r.level===6?a=2:a=3,i|=a<<6,r.strstart!==0&&(i|=hU),i+=31-i%31,ih(r,i),r.strstart!==0&&(ih(r,e.adler>>>16),ih(r,e.adler&65535)),e.adler=1,r.status=al,Wi(e),r.pending!==0)return r.last_flush=-1,Sn}if(r.status===Dv){if(e.adler=0,Mt(r,31),Mt(r,139),Mt(r,8),r.gzhead)Mt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Mt(r,r.gzhead.time&255),Mt(r,r.gzhead.time>>8&255),Mt(r,r.gzhead.time>>16&255),Mt(r,r.gzhead.time>>24&255),Mt(r,r.level===9?2:r.strategy>=Z0||r.level<2?4:0),Mt(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(Mt(r,r.gzhead.extra.length&255),Mt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Zu(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Ev;else if(Mt(r,0),Mt(r,0),Mt(r,0),Mt(r,0),Mt(r,0),Mt(r,r.level===9?2:r.strategy>=Z0||r.level<2?4:0),Mt(r,dU),r.status=al,Wi(e),r.pending!==0)return r.last_flush=-1,Sn}if(r.status===Ev){if(r.gzhead.extra){let i=r.pending,a=(r.gzhead.extra.length&65535)-r.gzindex;for(;r.pending+a>r.pending_buf_size;){let u=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+u),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>i&&(e.adler=Zu(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex+=u,Wi(e),r.pending!==0)return r.last_flush=-1,Sn;i=0,a-=u}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+a),r.pending),r.pending+=a,r.gzhead.hcrc&&r.pending>i&&(e.adler=Zu(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=bv}if(r.status===bv){if(r.gzhead.name){let i=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=Zu(e.adler,r.pending_buf,r.pending-i,i)),Wi(e),r.pending!==0)return r.last_flush=-1,Sn;i=0}r.gzindex<r.gzhead.name.length?a=r.gzhead.name.charCodeAt(r.gzindex++)&255:a=0,Mt(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Zu(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=yv}if(r.status===yv){if(r.gzhead.comment){let i=r.pending,a;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>i&&(e.adler=Zu(e.adler,r.pending_buf,r.pending-i,i)),Wi(e),r.pending!==0)return r.last_flush=-1,Sn;i=0}r.gzindex<r.gzhead.comment.length?a=r.gzhead.comment.charCodeAt(r.gzindex++)&255:a=0,Mt(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=Zu(e.adler,r.pending_buf,r.pending-i,i))}r.status=_v}if(r.status===_v){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Wi(e),r.pending!==0))return r.last_flush=-1,Sn;Mt(r,e.adler&255),Mt(r,e.adler>>8&255),e.adler=0}if(r.status=al,Wi(e),r.pending!==0)return r.last_flush=-1,Sn}if(e.avail_in!==0||r.lookahead!==0||t!==ro&&r.status!==sh){let i=r.level===0?l6(r,t):r.strategy===Z0?vU(r,t):r.strategy===QL?mU(r,t):ah[r.level].func(r,t);if((i===ol||i===Ic)&&(r.status=sh),i===ai||i===ol)return e.avail_out===0&&(r.last_flush=-1),Sn;if(i===Sc&&(t===YL?zL(r):t!==i6&&(wv(r,0,0,!1),t===WL&&(Qu(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),Wi(e),e.avail_out===0))return r.last_flush=-1,Sn}return t!==gs?Sn:r.wrap<=0?s6:(r.wrap===2?(Mt(r,e.adler&255),Mt(r,e.adler>>8&255),Mt(r,e.adler>>16&255),Mt(r,e.adler>>24&255),Mt(r,e.total_in&255),Mt(r,e.total_in>>8&255),Mt(r,e.total_in>>16&255),Mt(r,e.total_in>>24&255)):(ih(r,e.adler>>>16),ih(r,e.adler&65535)),Wi(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Sn:s6)},_U=e=>{if(uh(e))return Ca;let t=e.state.status;return e.state=null,t===al?ul(e,XL):Sn},CU=(e,t)=>{let r=t.length;if(uh(e))return Ca;let n=e.state,i=n.wrap;if(i===2||i===1&&n.status!==Dc||n.lookahead)return Ca;if(i===1&&(e.adler=u6(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){i===0&&(Qu(n.head),n.strstart=0,n.block_start=0,n.insert=0);let l=new Uint8Array(n.w_size);l.set(t.subarray(r-n.w_size,r),0),t=l,r=n.w_size}let a=e.avail_in,s=e.next_in,u=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Fc(n);n.lookahead>=Bt;){let l=n.strstart,f=n.lookahead-(Bt-1);do n.ins_h=no(n,n.ins_h,n.window[l+Bt-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++;while(--f);n.strstart=l,n.lookahead=Bt-1,Fc(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=Bt-1,n.match_available=0,e.next_in=s,e.input=u,e.avail_in=a,n.wrap=i,Sn};Fa.exports.deflateInit=bU;Fa.exports.deflateInit2=h6;Fa.exports.deflateReset=f6;Fa.exports.deflateResetKeep=c6;Fa.exports.deflateSetHeader=EU;Fa.exports.deflate=yU;Fa.exports.deflateEnd=_U;Fa.exports.deflateSetDictionary=CU;Fa.exports.deflateInfo="pako deflate (from Nodeca project)"});var Sv=de((PW,Fv)=>{"use strict";var DU=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);Fv.exports.assign=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(let n in r)DU(r,n)&&(e[n]=r[n])}}return e};Fv.exports.flattenChunks=e=>{let t=0;for(let n=0,i=e.length;n<i;n++)t+=e[n].length;let r=new Uint8Array(t);for(let n=0,i=0,a=e.length;n<a;n++){let s=e[n];r.set(s,i),i+=s.length}return r}});var Iv=de((RW,ep)=>{"use strict";var p6=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{p6=!1}var oh=new Uint8Array(256);for(let e=0;e<256;e++)oh[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;oh[254]=oh[254]=1;ep.exports.string2buf=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,r,n,i,a,s=e.length,u=0;for(i=0;i<s;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<s&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(u),a=0,i=0;a<u;i++)r=e.charCodeAt(i),(r&64512)===55296&&i+1<s&&(n=e.charCodeAt(i+1),(n&64512)===56320&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};var FU=(e,t)=>{if(t<65534&&e.subarray&&p6)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r};ep.exports.buf2string=(e,t)=>{let r=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let n,i,a=new Array(r*2);for(i=0,n=0;n<r;){let s=e[n++];if(s<128){a[i++]=s;continue}let u=oh[s];if(u>4){a[i++]=65533,n+=u-1;continue}for(s&=u===2?31:u===3?15:7;u>1&&n<r;)s=s<<6|e[n++]&63,u--;if(u>1){a[i++]=65533;continue}s<65536?a[i++]=s:(s-=65536,a[i++]=55296|s>>10&1023,a[i++]=56320|s&1023)}return FU(a,i)};ep.exports.utf8border=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let r=t-1;for(;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+oh[e[r]]>t?r:t}});var Bv=de((xW,g6)=>{"use strict";function SU(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}g6.exports=SU});var A6=de((TW,Bc)=>{"use strict";var lh=d6(),m6=Sv(),v6=Iv(),$v=J0(),IU=Bv(),w6=Object.prototype.toString,{Z_NO_FLUSH:BU,Z_SYNC_FLUSH:$U,Z_FULL_FLUSH:PU,Z_FINISH:RU,Z_OK:tp,Z_STREAM_END:xU,Z_DEFAULT_COMPRESSION:TU,Z_DEFAULT_STRATEGY:OU,Z_DEFLATED:kU}=Ju();function ch(e){this.options=m6.assign({level:TU,method:kU,chunkSize:16384,windowBits:15,memLevel:8,strategy:OU},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new IU,this.strm.avail_out=0;let r=lh.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==tp)throw new Error($v[r]);if(t.header&&lh.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=v6.string2buf(t.dictionary):w6.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=lh.deflateSetDictionary(this.strm,n),r!==tp)throw new Error($v[r]);this._dict_set=!0}}ch.prototype.push=function(e,t){let r=this.strm,n=this.options.chunkSize,i,a;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?RU:BU,typeof e=="string"?r.input=v6.string2buf(e):w6.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){if(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(a===$U||a===PU)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(i=lh.deflate(r,a),i===xU)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=lh.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===tp;if(r.avail_out===0){this.onData(r.output);continue}if(a>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(r.avail_in===0)break}return!0};ch.prototype.onData=function(e){this.chunks.push(e)};ch.prototype.onEnd=function(e){e===tp&&(this.result=m6.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Pv(e,t){let r=new ch(t);if(r.push(e,!0),r.err)throw r.msg||$v[r.err];return r.result}function NU(e,t){return t=t||{},t.raw=!0,Pv(e,t)}function LU(e,t){return t=t||{},t.gzip=!0,Pv(e,t)}Bc.exports.Deflate=ch;Bc.exports.deflate=Pv;Bc.exports.deflateRaw=NU;Bc.exports.gzip=LU;Bc.exports.constants=Ju()});var b6=de((OW,E6)=>{"use strict";E6.exports=function(t,r){let n,i,a,s,u,l,f,d,g,p,h,w,v,y,m,b,D,C,F,L,N,S,B,T,U=t.state;n=t.next_in,B=t.input,i=n+(t.avail_in-5),a=t.next_out,T=t.output,s=a-(r-t.avail_out),u=a+(t.avail_out-257),l=U.dmax,f=U.wsize,d=U.whave,g=U.wnext,p=U.window,h=U.hold,w=U.bits,v=U.lencode,y=U.distcode,m=(1<<U.lenbits)-1,b=(1<<U.distbits)-1;e:do{w<15&&(h+=B[n++]<<w,w+=8,h+=B[n++]<<w,w+=8),D=v[h&m];t:for(;;){if(C=D>>>24,h>>>=C,w-=C,C=D>>>16&255,C===0)T[a++]=D&65535;else if(C&16){F=D&65535,C&=15,C&&(w<C&&(h+=B[n++]<<w,w+=8),F+=h&(1<<C)-1,h>>>=C,w-=C),w<15&&(h+=B[n++]<<w,w+=8,h+=B[n++]<<w,w+=8),D=y[h&b];r:for(;;){if(C=D>>>24,h>>>=C,w-=C,C=D>>>16&255,C&16){if(L=D&65535,C&=15,w<C&&(h+=B[n++]<<w,w+=8,w<C&&(h+=B[n++]<<w,w+=8)),L+=h&(1<<C)-1,L>l){t.msg="invalid distance too far back",U.mode=16209;break e}if(h>>>=C,w-=C,C=a-s,L>C){if(C=L-C,C>d&&U.sane){t.msg="invalid distance too far back",U.mode=16209;break e}if(N=0,S=p,g===0){if(N+=f-C,C<F){F-=C;do T[a++]=p[N++];while(--C);N=a-L,S=T}}else if(g<C){if(N+=f+g-C,C-=g,C<F){F-=C;do T[a++]=p[N++];while(--C);if(N=0,g<F){C=g,F-=C;do T[a++]=p[N++];while(--C);N=a-L,S=T}}}else if(N+=g-C,C<F){F-=C;do T[a++]=p[N++];while(--C);N=a-L,S=T}for(;F>2;)T[a++]=S[N++],T[a++]=S[N++],T[a++]=S[N++],F-=3;F&&(T[a++]=S[N++],F>1&&(T[a++]=S[N++]))}else{N=a-L;do T[a++]=T[N++],T[a++]=T[N++],T[a++]=T[N++],F-=3;while(F>2);F&&(T[a++]=T[N++],F>1&&(T[a++]=T[N++]))}}else if(C&64){t.msg="invalid distance code",U.mode=16209;break e}else{D=y[(D&65535)+(h&(1<<C)-1)];continue r}break}}else if(C&64)if(C&32){U.mode=16191;break e}else{t.msg="invalid literal/length code",U.mode=16209;break e}else{D=v[(D&65535)+(h&(1<<C)-1)];continue t}break}}while(n<i&&a<u);F=w>>3,n-=F,w-=F<<3,h&=(1<<w)-1,t.next_in=n,t.next_out=a,t.avail_in=n<i?5+(i-n):5-(n-i),t.avail_out=a<u?257+(u-a):257-(a-u),U.hold=h,U.bits=w}});var _6=de((kW,y6)=>{"use strict";var UU=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),jU=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),HU=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),MU=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),qU=(e,t,r,n,i,a,s,u)=>{let l=u.bits,f=0,d=0,g=0,p=0,h=0,w=0,v=0,y=0,m=0,b=0,D,C,F,L,N,S=null,B,T=new Uint16Array(16),U=new Uint16Array(16),V=null,Y,H,z;for(f=0;f<=15;f++)T[f]=0;for(d=0;d<n;d++)T[t[r+d]]++;for(h=l,p=15;p>=1&&T[p]===0;p--);if(h>p&&(h=p),p===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,u.bits=1,0;for(g=1;g<p&&T[g]===0;g++);for(h<g&&(h=g),y=1,f=1;f<=15;f++)if(y<<=1,y-=T[f],y<0)return-1;if(y>0&&(e===0||p!==1))return-1;for(U[1]=0,f=1;f<15;f++)U[f+1]=U[f]+T[f];for(d=0;d<n;d++)t[r+d]!==0&&(s[U[t[r+d]]++]=d);if(e===0?(S=V=s,B=20):e===1?(S=UU,V=jU,B=257):(S=HU,V=MU,B=0),b=0,d=0,f=g,N=a,w=h,v=0,F=-1,m=1<<h,L=m-1,e===1&&m>852||e===2&&m>592)return 1;for(;;){Y=f-v,s[d]+1<B?(H=0,z=s[d]):s[d]>=B?(H=V[s[d]-B],z=S[s[d]-B]):(H=96,z=0),D=1<<f-v,C=1<<w,g=C;do C-=D,i[N+(b>>v)+C]=Y<<24|H<<16|z|0;while(C!==0);for(D=1<<f-1;b&D;)D>>=1;if(D!==0?(b&=D-1,b+=D):b=0,d++,--T[f]===0){if(f===p)break;f=t[r+s[d]]}if(f>h&&(b&L)!==F){for(v===0&&(v=h),N+=g,w=f-v,y=1<<w;w+v<p&&(y-=T[w+v],!(y<=0));)w++,y<<=1;if(m+=1<<w,e===1&&m>852||e===2&&m>592)return 1;F=b&L,i[F]=h<<24|w<<16|N-a|0}}return b!==0&&(i[N+b]=f-v<<24|64<<16|0),u.bits=h,0};y6.exports=qU});var i4=de((NW,Ts)=>{"use strict";var Nv=pv(),Sa=gv(),VU=b6(),fh=_6(),KU=0,W6=1,X6=2,{Z_FINISH:C6,Z_BLOCK:zU,Z_TREES:rp,Z_OK:ll,Z_STREAM_END:GU,Z_NEED_DICT:YU,Z_STREAM_ERROR:vs,Z_DATA_ERROR:J6,Z_MEM_ERROR:Lv,Z_BUF_ERROR:WU,Z_DEFLATED:D6}=Ju(),ap=16180,F6=16181,S6=16182,I6=16183,B6=16184,$6=16185,P6=16186,R6=16187,x6=16188,T6=16189,sp=16190,wu=16191,Rv=16192,O6=16193,xv=16194,k6=16195,N6=16196,L6=16197,U6=16198,np=16199,ip=16200,j6=16201,H6=16202,M6=16203,q6=16204,V6=16205,Tv=16206,K6=16207,z6=16208,wr=16209,Uv=16210,Z6=16211,XU=852,JU=592,ZU=15,QU=ZU,G6=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function ej(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var cl=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.mode<ap||t.mode>Z6?1:0},Q6=e=>{if(cl(e))return vs;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=ap,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(XU),t.distcode=t.distdyn=new Int32Array(JU),t.sane=1,t.back=-1,ll},e4=e=>{if(cl(e))return vs;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Q6(e)},t4=(e,t)=>{let r;if(cl(e))return vs;let n=e.state;return t<0?(r=0,t=-t):(r=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?vs:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,e4(e))},r4=(e,t)=>{if(!e)return vs;let r=new ej;e.state=r,r.strm=e,r.window=null,r.mode=ap;let n=t4(e,t);return n!==ll&&(e.state=null),n},tj=e=>r4(e,QU),Y6=!0,Ov,kv,rj=e=>{if(Y6){Ov=new Int32Array(512),kv=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(fh(W6,e.lens,0,288,Ov,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;fh(X6,e.lens,0,32,kv,0,e.work,{bits:5}),Y6=!1}e.lencode=Ov,e.lenbits=9,e.distcode=kv,e.distbits=5},n4=(e,t,r,n)=>{let i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),n>=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),a.window.set(t.subarray(r-n,r-n+i),a.wnext),n-=i,n?(a.window.set(t.subarray(r-n,r),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},nj=(e,t)=>{let r,n,i,a,s,u,l,f,d,g,p,h,w,v,y=0,m,b,D,C,F,L,N,S,B=new Uint8Array(4),T,U,V=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(cl(e)||!e.output||!e.input&&e.avail_in!==0)return vs;r=e.state,r.mode===wu&&(r.mode=Rv),s=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,n=e.input,u=e.avail_in,f=r.hold,d=r.bits,g=u,p=l,S=ll;e:for(;;)switch(r.mode){case ap:if(r.wrap===0){r.mode=Rv;break}for(;d<16;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if(r.wrap&2&&f===35615){r.wbits===0&&(r.wbits=15),r.check=0,B[0]=f&255,B[1]=f>>>8&255,r.check=Sa(r.check,B,2,0),f=0,d=0,r.mode=F6;break}if(r.head&&(r.head.done=!1),!(r.wrap&1)||(((f&255)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=wr;break}if((f&15)!==D6){e.msg="unknown compression method",r.mode=wr;break}if(f>>>=4,d-=4,N=(f&15)+8,r.wbits===0&&(r.wbits=N),N>15||N>r.wbits){e.msg="invalid window size",r.mode=wr;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=f&512?T6:wu,f=0,d=0;break;case F6:for(;d<16;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if(r.flags=f,(r.flags&255)!==D6){e.msg="unknown compression method",r.mode=wr;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=wr;break}r.head&&(r.head.text=f>>8&1),r.flags&512&&r.wrap&4&&(B[0]=f&255,B[1]=f>>>8&255,r.check=Sa(r.check,B,2,0)),f=0,d=0,r.mode=S6;case S6:for(;d<32;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}r.head&&(r.head.time=f),r.flags&512&&r.wrap&4&&(B[0]=f&255,B[1]=f>>>8&255,B[2]=f>>>16&255,B[3]=f>>>24&255,r.check=Sa(r.check,B,4,0)),f=0,d=0,r.mode=I6;case I6:for(;d<16;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}r.head&&(r.head.xflags=f&255,r.head.os=f>>8),r.flags&512&&r.wrap&4&&(B[0]=f&255,B[1]=f>>>8&255,r.check=Sa(r.check,B,2,0)),f=0,d=0,r.mode=B6;case B6:if(r.flags&1024){for(;d<16;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}r.length=f,r.head&&(r.head.extra_len=f),r.flags&512&&r.wrap&4&&(B[0]=f&255,B[1]=f>>>8&255,r.check=Sa(r.check,B,2,0)),f=0,d=0}else r.head&&(r.head.extra=null);r.mode=$6;case $6:if(r.flags&1024&&(h=r.length,h>u&&(h=u),h&&(r.head&&(N=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(a,a+h),N)),r.flags&512&&r.wrap&4&&(r.check=Sa(r.check,n,h,a)),u-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=P6;case P6:if(r.flags&2048){if(u===0)break e;h=0;do N=n[a+h++],r.head&&N&&r.length<65536&&(r.head.name+=String.fromCharCode(N));while(N&&h<u);if(r.flags&512&&r.wrap&4&&(r.check=Sa(r.check,n,h,a)),u-=h,a+=h,N)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=R6;case R6:if(r.flags&4096){if(u===0)break e;h=0;do N=n[a+h++],r.head&&N&&r.length<65536&&(r.head.comment+=String.fromCharCode(N));while(N&&h<u);if(r.flags&512&&r.wrap&4&&(r.check=Sa(r.check,n,h,a)),u-=h,a+=h,N)break e}else r.head&&(r.head.comment=null);r.mode=x6;case x6:if(r.flags&512){for(;d<16;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if(r.wrap&4&&f!==(r.check&65535)){e.msg="header crc mismatch",r.mode=wr;break}f=0,d=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=wu;break;case T6:for(;d<32;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}e.adler=r.check=G6(f),f=0,d=0,r.mode=sp;case sp:if(r.havedict===0)return e.next_out=s,e.avail_out=l,e.next_in=a,e.avail_in=u,r.hold=f,r.bits=d,YU;e.adler=r.check=1,r.mode=wu;case wu:if(t===zU||t===rp)break e;case Rv:if(r.last){f>>>=d&7,d-=d&7,r.mode=Tv;break}for(;d<3;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}switch(r.last=f&1,f>>>=1,d-=1,f&3){case 0:r.mode=O6;break;case 1:if(rj(r),r.mode=np,t===rp){f>>>=2,d-=2;break e}break;case 2:r.mode=N6;break;case 3:e.msg="invalid block type",r.mode=wr}f>>>=2,d-=2;break;case O6:for(f>>>=d&7,d-=d&7;d<32;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if((f&65535)!==(f>>>16^65535)){e.msg="invalid stored block lengths",r.mode=wr;break}if(r.length=f&65535,f=0,d=0,r.mode=xv,t===rp)break e;case xv:r.mode=k6;case k6:if(h=r.length,h){if(h>u&&(h=u),h>l&&(h=l),h===0)break e;i.set(n.subarray(a,a+h),s),u-=h,a+=h,l-=h,s+=h,r.length-=h;break}r.mode=wu;break;case N6:for(;d<14;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if(r.nlen=(f&31)+257,f>>>=5,d-=5,r.ndist=(f&31)+1,f>>>=5,d-=5,r.ncode=(f&15)+4,f>>>=4,d-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=wr;break}r.have=0,r.mode=L6;case L6:for(;r.have<r.ncode;){for(;d<3;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}r.lens[V[r.have++]]=f&7,f>>>=3,d-=3}for(;r.have<19;)r.lens[V[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},S=fh(KU,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,S){e.msg="invalid code lengths set",r.mode=wr;break}r.have=0,r.mode=U6;case U6:for(;r.have<r.nlen+r.ndist;){for(;y=r.lencode[f&(1<<r.lenbits)-1],m=y>>>24,b=y>>>16&255,D=y&65535,!(m<=d);){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if(D<16)f>>>=m,d-=m,r.lens[r.have++]=D;else{if(D===16){for(U=m+2;d<U;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if(f>>>=m,d-=m,r.have===0){e.msg="invalid bit length repeat",r.mode=wr;break}N=r.lens[r.have-1],h=3+(f&3),f>>>=2,d-=2}else if(D===17){for(U=m+3;d<U;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}f>>>=m,d-=m,N=0,h=3+(f&7),f>>>=3,d-=3}else{for(U=m+7;d<U;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}f>>>=m,d-=m,N=0,h=11+(f&127),f>>>=7,d-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=wr;break}for(;h--;)r.lens[r.have++]=N}}if(r.mode===wr)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=wr;break}if(r.lenbits=9,T={bits:r.lenbits},S=fh(W6,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,S){e.msg="invalid literal/lengths set",r.mode=wr;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},S=fh(X6,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,S){e.msg="invalid distances set",r.mode=wr;break}if(r.mode=np,t===rp)break e;case np:r.mode=ip;case ip:if(u>=6&&l>=258){e.next_out=s,e.avail_out=l,e.next_in=a,e.avail_in=u,r.hold=f,r.bits=d,VU(e,p),s=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,n=e.input,u=e.avail_in,f=r.hold,d=r.bits,r.mode===wu&&(r.back=-1);break}for(r.back=0;y=r.lencode[f&(1<<r.lenbits)-1],m=y>>>24,b=y>>>16&255,D=y&65535,!(m<=d);){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if(b&&!(b&240)){for(C=m,F=b,L=D;y=r.lencode[L+((f&(1<<C+F)-1)>>C)],m=y>>>24,b=y>>>16&255,D=y&65535,!(C+m<=d);){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}f>>>=C,d-=C,r.back+=C}if(f>>>=m,d-=m,r.back+=m,r.length=D,b===0){r.mode=V6;break}if(b&32){r.back=-1,r.mode=wu;break}if(b&64){e.msg="invalid literal/length code",r.mode=wr;break}r.extra=b&15,r.mode=j6;case j6:if(r.extra){for(U=r.extra;d<U;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}r.length+=f&(1<<r.extra)-1,f>>>=r.extra,d-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=H6;case H6:for(;y=r.distcode[f&(1<<r.distbits)-1],m=y>>>24,b=y>>>16&255,D=y&65535,!(m<=d);){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if(!(b&240)){for(C=m,F=b,L=D;y=r.distcode[L+((f&(1<<C+F)-1)>>C)],m=y>>>24,b=y>>>16&255,D=y&65535,!(C+m<=d);){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}f>>>=C,d-=C,r.back+=C}if(f>>>=m,d-=m,r.back+=m,b&64){e.msg="invalid distance code",r.mode=wr;break}r.offset=D,r.extra=b&15,r.mode=M6;case M6:if(r.extra){for(U=r.extra;d<U;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}r.offset+=f&(1<<r.extra)-1,f>>>=r.extra,d-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=wr;break}r.mode=q6;case q6:if(l===0)break e;if(h=p-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=wr;break}h>r.wnext?(h-=r.wnext,w=r.wsize-h):w=r.wnext-h,h>r.length&&(h=r.length),v=r.window}else v=i,w=s-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do i[s++]=v[w++];while(--h);r.length===0&&(r.mode=ip);break;case V6:if(l===0)break e;i[s++]=r.length,l--,r.mode=ip;break;case Tv:if(r.wrap){for(;d<32;){if(u===0)break e;u--,f|=n[a++]<<d,d+=8}if(p-=l,e.total_out+=p,r.total+=p,r.wrap&4&&p&&(e.adler=r.check=r.flags?Sa(r.check,i,p,s-p):Nv(r.check,i,p,s-p)),p=l,r.wrap&4&&(r.flags?f:G6(f))!==r.check){e.msg="incorrect data check",r.mode=wr;break}f=0,d=0}r.mode=K6;case K6:if(r.wrap&&r.flags){for(;d<32;){if(u===0)break e;u--,f+=n[a++]<<d,d+=8}if(r.wrap&4&&f!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=wr;break}f=0,d=0}r.mode=z6;case z6:S=GU;break e;case wr:S=J6;break e;case Uv:return Lv;case Z6:default:return vs}return e.next_out=s,e.avail_out=l,e.next_in=a,e.avail_in=u,r.hold=f,r.bits=d,(r.wsize||p!==e.avail_out&&r.mode<wr&&(r.mode<Tv||t!==C6))&&n4(e,e.output,e.next_out,p-e.avail_out)?(r.mode=Uv,Lv):(g-=e.avail_in,p-=e.avail_out,e.total_in+=g,e.total_out+=p,r.total+=p,r.wrap&4&&p&&(e.adler=r.check=r.flags?Sa(r.check,i,p,e.next_out-p):Nv(r.check,i,p,e.next_out-p)),e.data_type=r.bits+(r.last?64:0)+(r.mode===wu?128:0)+(r.mode===np||r.mode===xv?256:0),(g===0&&p===0||t===C6)&&S===ll&&(S=WU),S)},ij=e=>{if(cl(e))return vs;let t=e.state;return t.window&&(t.window=null),e.state=null,ll},sj=(e,t)=>{if(cl(e))return vs;let r=e.state;return r.wrap&2?(r.head=t,t.done=!1,ll):vs},aj=(e,t)=>{let r=t.length,n,i,a;return cl(e)||(n=e.state,n.wrap!==0&&n.mode!==sp)?vs:n.mode===sp&&(i=1,i=Nv(i,t,r,0),i!==n.check)?J6:(a=n4(e,t,r,r),a?(n.mode=Uv,Lv):(n.havedict=1,ll))};Ts.exports.inflateReset=e4;Ts.exports.inflateReset2=t4;Ts.exports.inflateResetKeep=Q6;Ts.exports.inflateInit=tj;Ts.exports.inflateInit2=r4;Ts.exports.inflate=nj;Ts.exports.inflateEnd=ij;Ts.exports.inflateGetHeader=sj;Ts.exports.inflateSetDictionary=aj;Ts.exports.inflateInfo="pako inflate (from Nodeca project)"});var a4=de((LW,s4)=>{"use strict";function uj(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}s4.exports=uj});var c4=de((UW,$c)=>{"use strict";var Au=i4(),o4=Sv(),Mv=Iv(),qv=J0(),oj=Bv(),lj=a4(),l4=Object.prototype.toString,{Z_NO_FLUSH:cj,Z_FINISH:fj,Z_OK:hh,Z_STREAM_END:jv,Z_NEED_DICT:Hv,Z_STREAM_ERROR:hj,Z_DATA_ERROR:u4,Z_MEM_ERROR:dj}=Ju();function dh(e){this.options=o4.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new oj,this.strm.avail_out=0;let r=Au.inflateInit2(this.strm,t.windowBits);if(r!==hh)throw new Error(qv[r]);if(this.header=new lj,Au.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Mv.string2buf(t.dictionary):l4.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Au.inflateSetDictionary(this.strm,t.dictionary),r!==hh)))throw new Error(qv[r])}dh.prototype.push=function(e,t){let r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,a,s,u;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?fj:cj,l4.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(r.avail_out===0&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),a=Au.inflate(r,s),a===Hv&&i&&(a=Au.inflateSetDictionary(r,i),a===hh?a=Au.inflate(r,s):a===u4&&(a=Hv));r.avail_in>0&&a===jv&&r.state.wrap>0&&e[r.next_in]!==0;)Au.inflateReset(r),a=Au.inflate(r,s);switch(a){case hj:case u4:case Hv:case dj:return this.onEnd(a),this.ended=!0,!1}if(u=r.avail_out,r.next_out&&(r.avail_out===0||a===jv))if(this.options.to==="string"){let l=Mv.utf8border(r.output,r.next_out),f=r.next_out-l,d=Mv.buf2string(r.output,l);r.next_out=f,r.avail_out=n-f,f&&r.output.set(r.output.subarray(l,l+f),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(!(a===hh&&u===0)){if(a===jv)return a=Au.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(r.avail_in===0)break}}return!0};dh.prototype.onData=function(e){this.chunks.push(e)};dh.prototype.onEnd=function(e){e===hh&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o4.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Vv(e,t){let r=new dh(t);if(r.push(e),r.err)throw r.msg||qv[r.err];return r.result}function pj(e,t){return t=t||{},t.raw=!0,Vv(e,t)}$c.exports.Inflate=dh;$c.exports.inflate=Vv;$c.exports.inflateRaw=pj;$c.exports.ungzip=Vv;$c.exports.constants=Ju()});var f4=de((jW,Ia)=>{"use strict";var{Deflate:gj,deflate:mj,deflateRaw:vj,gzip:wj}=A6(),{Inflate:Aj,inflate:Ej,inflateRaw:bj,ungzip:yj}=c4(),_j=Ju();Ia.exports.Deflate=gj;Ia.exports.deflate=mj;Ia.exports.deflateRaw=vj;Ia.exports.gzip=wj;Ia.exports.Inflate=Aj;Ia.exports.inflate=Ej;Ia.exports.inflateRaw=bj;Ia.exports.ungzip=yj;Ia.exports.constants=_j});var Wv=de((HW,m4)=>{var Cj=new TextEncoder,Dj=new TextDecoder("utf-8");function Kv(e){return Cj.encode(e)}function zv(e){return Dj.decode(e)}function d4(e){if(typeof e!="string")throw new TypeError("value is not a string");if(!/^([0-9a-f][0-9a-f])*$/.test(e))throw new RangeError("value is not hexadecimal");return e===""?new Uint8Array(0):new Uint8Array(e.match(/../g).map(t=>parseInt(t,16)))}var h4=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],p4=new Array(256);for(let e=0;e<256;e++)p4[e]=`${h4[e>>>4&15]}${h4[e&15]}`;function g4(e){let t="",r=e.byteLength;for(let n=0;n<r;n++)t+=p4[e[n]];return t}var ph=class{constructor(){this.buf=new Uint8Array(16),this.offset=0}get buffer(){return this.finish(),this.buf.subarray(0,this.offset)}grow(t=0){let r=this.buf.byteLength*4;for(;r<t;)r*=2;let n=new Uint8Array(r);return n.set(this.buf,0),this.buf=n,this}appendByte(t){this.offset>=this.buf.byteLength&&this.grow(),this.buf[this.offset]=t,this.offset+=1}appendUint32(t){if(!Number.isInteger(t))throw new RangeError("value is not an integer");if(t<0||t>4294967295)throw new RangeError("number out of range");let r=Math.max(1,Math.ceil((32-Math.clz32(t))/7));this.offset+r>this.buf.byteLength&&this.grow();for(let n=0;n<r;n++)this.buf[this.offset+n]=t&127|(n===r-1?0:128),t>>>=7;return this.offset+=r,r}appendInt32(t){if(!Number.isInteger(t))throw new RangeError("value is not an integer");if(t<-2147483648||t>2147483647)throw new RangeError("number out of range");let r=Math.ceil((33-Math.clz32(t>=0?t:-t-1))/7);this.offset+r>this.buf.byteLength&&this.grow();for(let n=0;n<r;n++)this.buf[this.offset+n]=t&127|(n===r-1?0:128),t>>=7;return this.offset+=r,r}appendUint53(t){if(!Number.isInteger(t))throw new RangeError("value is not an integer");if(t<0||t>Number.MAX_SAFE_INTEGER)throw new RangeError("number out of range");let r=Math.floor(t/4294967296),n=(t&4294967295)>>>0;return this.appendUint64(r,n)}appendInt53(t){if(!Number.isInteger(t))throw new RangeError("value is not an integer");if(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER)throw new RangeError("number out of range");let r=Math.floor(t/4294967296),n=(t&4294967295)>>>0;return this.appendInt64(r,n)}appendUint64(t,r){if(!Number.isInteger(t)||!Number.isInteger(r))throw new RangeError("value is not an integer");if(t<0||t>4294967295||r<0||r>4294967295)throw new RangeError("number out of range");if(t===0)return this.appendUint32(r);let n=Math.ceil((64-Math.clz32(t))/7);this.offset+n>this.buf.byteLength&&this.grow();for(let i=0;i<4;i++)this.buf[this.offset+i]=r&127|128,r>>>=7;this.buf[this.offset+4]=r&15|(t&7)<<4|(n===5?0:128),t>>>=3;for(let i=5;i<n;i++)this.buf[this.offset+i]=t&127|(i===n-1?0:128),t>>>=7;return this.offset+=n,n}appendInt64(t,r){if(!Number.isInteger(t)||!Number.isInteger(r))throw new RangeError("value is not an integer");if(t<-2147483648||t>2147483647||r<-2147483648||r>4294967295)throw new RangeError("number out of range");if(r>>>=0,t===0&&r<=2147483647)return this.appendInt32(r);if(t===-1&&r>=2147483648)return this.appendInt32(r-4294967296);let n=Math.ceil((65-Math.clz32(t>=0?t:-t-1))/7);this.offset+n>this.buf.byteLength&&this.grow();for(let i=0;i<4;i++)this.buf[this.offset+i]=r&127|128,r>>>=7;this.buf[this.offset+4]=r&15|(t&7)<<4|(n===5?0:128),t>>=3;for(let i=5;i<n;i++)this.buf[this.offset+i]=t&127|(i===n-1?0:128),t>>=7;return this.offset+=n,n}appendRawBytes(t){return this.offset+t.byteLength>this.buf.byteLength&&this.grow(this.offset+t.byteLength),this.buf.set(t,this.offset),this.offset+=t.byteLength,t.byteLength}appendRawString(t){if(typeof t!="string")throw new TypeError("value is not a string");return this.appendRawBytes(Kv(t))}appendPrefixedBytes(t){return this.appendUint53(t.byteLength),this.appendRawBytes(t),this}appendPrefixedString(t){if(typeof t!="string")throw new TypeError("value is not a string");return this.appendPrefixedBytes(Kv(t)),this}appendHexString(t){return this.appendPrefixedBytes(d4(t)),this}finish(){}},gh=class{constructor(t){if(!(t instanceof Uint8Array))throw new TypeError(`Not a byte array: ${t}`);this.buf=t,this.offset=0}get done(){return this.offset===this.buf.byteLength}reset(){this.offset=0}skip(t){if(this.offset+t>this.buf.byteLength)throw new RangeError("cannot skip beyond end of buffer");this.offset+=t}readByte(){return this.offset+=1,this.buf[this.offset-1]}readUint32(){let t=0,r=0;for(;this.offset<this.buf.byteLength;){let n=this.buf[this.offset];if(r===28&&n&240)throw new RangeError("number out of range");if(t=(t|(n&127)<<r)>>>0,r+=7,this.offset++,!(n&128))return t}throw new RangeError("buffer ended with incomplete number")}readInt32(){let t=0,r=0;for(;this.offset<this.buf.byteLength;){let n=this.buf[this.offset];if(r===28&&n&128||r===28&&!(n&64)&&n&56||r===28&&n&64&&(n&56)!==56)throw new RangeError("number out of range");if(t|=(n&127)<<r,r+=7,this.offset++,!(n&128))return!(n&64)||r>28?t:t|-1<<r}throw new RangeError("buffer ended with incomplete number")}readUint53(){let{low32:t,high32:r}=this.readUint64();if(r<0||r>2097151)throw new RangeError("number out of range");return r*4294967296+t}readInt53(){let{low32:t,high32:r}=this.readInt64();if(r<-2097152||r===-2097152&&t===0||r>2097151)throw new RangeError("number out of range");return r*4294967296+t}readUint64(){let t=0,r=0,n=0;for(;this.offset<this.buf.byteLength&&n<=28;){let i=this.buf[this.offset];if(t=(t|(i&127)<<n)>>>0,n===28&&(r=(i&112)>>>4),n+=7,this.offset++,!(i&128))return{high32:r,low32:t}}for(n=3;this.offset<this.buf.byteLength;){let i=this.buf[this.offset];if(n===31&&i&254)throw new RangeError("number out of range");if(r=(r|(i&127)<<n)>>>0,n+=7,this.offset++,!(i&128))return{high32:r,low32:t}}throw new RangeError("buffer ended with incomplete number")}readInt64(){let t=0,r=0,n=0;for(;this.offset<this.buf.byteLength&&n<=28;){let i=this.buf[this.offset];if(t=(t|(i&127)<<n)>>>0,n===28&&(r=(i&112)>>>4),n+=7,this.offset++,!(i&128))return i&64&&(n<32&&(t=(t|-1<<n)>>>0),r|=-1<<Math.max(n-32,0)),{high32:r,low32:t}}for(n=3;this.offset<this.buf.byteLength;){let i=this.buf[this.offset];if(n===31&&i!==0&&i!==127)throw new RangeError("number out of range");if(r|=(i&127)<<n,n+=7,this.offset++,!(i&128))return i&64&&n<32&&(r|=-1<<n),{high32:r,low32:t}}throw new RangeError("buffer ended with incomplete number")}readRawBytes(t){let r=this.offset;if(r+t>this.buf.byteLength)throw new RangeError("subarray exceeds buffer size");return this.offset+=t,this.buf.subarray(r,this.offset)}readRawString(t){return zv(this.readRawBytes(t))}readPrefixedBytes(){return this.readRawBytes(this.readUint53())}readPrefixedString(){return zv(this.readPrefixedBytes())}readHexString(){return g4(this.readPrefixedBytes())}},up=class extends ph{constructor(t){super(),this.type=t,this.state="empty",this.lastValue=void 0,this.count=0,this.literal=[]}appendValue(t,r=1){this._appendValue(t,r)}_appendValue(t,r=1){r<=0||(this.state==="empty"?(this.state=t===null?"nulls":r===1?"loneValue":"repetition",this.lastValue=t,this.count=r):this.state==="loneValue"?t===null?(this.flush(),this.state="nulls",this.count=r):t===this.lastValue?(this.state="repetition",this.count=1+r):r>1?(this.flush(),this.state="repetition",this.count=r,this.lastValue=t):(this.state="literal",this.literal=[this.lastValue],this.lastValue=t):this.state==="repetition"?t===null?(this.flush(),this.state="nulls",this.count=r):t===this.lastValue?this.count+=r:r>1?(this.flush(),this.state="repetition",this.count=r,this.lastValue=t):(this.flush(),this.state="loneValue",this.lastValue=t):this.state==="literal"?t===null?(this.literal.push(this.lastValue),this.flush(),this.state="nulls",this.count=r):t===this.lastValue?(this.flush(),this.state="repetition",this.count=1+r):r>1?(this.literal.push(this.lastValue),this.flush(),this.state="repetition",this.count=r,this.lastValue=t):(this.literal.push(this.lastValue),this.lastValue=t):this.state==="nulls"&&(t===null?this.count+=r:r>1?(this.flush(),this.state="repetition",this.count=r,this.lastValue=t):(this.flush(),this.state="loneValue",this.lastValue=t)))}copyFrom(t,r={}){let{count:n,sumValues:i,sumShift:a}=r;if(!(t instanceof mh)||t.type!==this.type)throw new TypeError("incompatible type of decoder");let s=typeof n=="number"?n:Number.MAX_SAFE_INTEGER,u=0,l=0;if(n&&s>0&&t.done)throw new RangeError(`cannot copy ${n} values`);if(s===0||t.done)return i?{nonNullValues:u,sum:l}:{nonNullValues:u};let f=t.readValue();if(f===null){let g=Math.min(t.count+1,s);if(s-=g,t.count-=g-1,this.appendValue(null,g),n&&s>0&&t.done)throw new RangeError(`cannot copy ${n} values`);if(s===0||t.done)return i?{nonNullValues:u,sum:l}:{nonNullValues:u};if(f=t.readValue(),f===null)throw new RangeError("null run must be followed by non-null value")}if(this.appendValue(f),s--,u++,i&&(l+=a?f>>>a:f),n&&s>0&&t.done)throw new RangeError(`cannot copy ${n} values`);if(s===0||t.done)return i?{nonNullValues:u,sum:l}:{nonNullValues:u};let d=t.count>0;for(;s>0&&!t.done;){d||t.readRecord();let g=Math.min(t.count,s);if(t.count-=g,t.state==="literal"){u+=g;for(let p=0;p<g;p++){if(t.done)throw new RangeError("incomplete literal");let h=t.readRawValue();if(h===t.lastValue)throw new RangeError("Repetition of values is not allowed in literal");t.lastValue=h,this._appendValue(h),i&&(l+=a?h>>>a:h)}}else if(t.state==="repetition"){u+=g,i&&(l+=g*(a?t.lastValue>>>a:t.lastValue));let p=t.lastValue;if(this._appendValue(p),g>1){if(this._appendValue(p),this.state!=="repetition")throw new RangeError(`Unexpected state ${this.state}`);this.count+=g-2}}else if(t.state==="nulls"){if(this._appendValue(null),this.state!=="nulls")throw new RangeError(`Unexpected state ${this.state}`);this.count+=g-1}d=!1,s-=g}if(n&&s>0&&t.done)throw new RangeError(`cannot copy ${n} values`);return i?{nonNullValues:u,sum:l}:{nonNullValues:u}}flush(){if(this.state==="loneValue")this.appendInt32(-1),this.appendRawValue(this.lastValue);else if(this.state==="repetition")this.appendInt53(this.count),this.appendRawValue(this.lastValue);else if(this.state==="literal"){this.appendInt53(-this.literal.length);for(let t of this.literal)this.appendRawValue(t)}else this.state==="nulls"&&(this.appendInt32(0),this.appendUint53(this.count));this.state="empty"}appendRawValue(t){if(this.type==="int")this.appendInt53(t);else if(this.type==="uint")this.appendUint53(t);else if(this.type==="utf8")this.appendPrefixedString(t);else throw new RangeError(`Unknown RLEEncoder datatype: ${this.type}`)}finish(){this.state==="literal"&&this.literal.push(this.lastValue),(this.state!=="nulls"||this.offset>0)&&this.flush()}},mh=class extends gh{constructor(t,r){super(r),this.type=t,this.lastValue=void 0,this.count=0,this.state=void 0}get done(){return this.count===0&&this.offset===this.buf.byteLength}reset(){this.offset=0,this.lastValue=void 0,this.count=0,this.state=void 0}readValue(){if(this.done)return null;if(this.count===0&&this.readRecord(),this.count-=1,this.state==="literal"){let t=this.readRawValue();if(t===this.lastValue)throw new RangeError("Repetition of values is not allowed in literal");return this.lastValue=t,t}else return this.lastValue}skipValues(t){for(;t>0&&!this.done;){this.count===0&&(this.count=this.readInt53(),this.count>0?(this.lastValue=this.count<=t?this.skipRawValues(1):this.readRawValue(),this.state="repetition"):this.count<0?(this.count=-this.count,this.state="literal"):(this.count=this.readUint53(),this.lastValue=null,this.state="nulls"));let r=Math.min(t,this.count);this.state==="literal"&&this.skipRawValues(r),t-=r,this.count-=r}}readRecord(){if(this.count=this.readInt53(),this.count>1){let t=this.readRawValue();if((this.state==="repetition"||this.state==="literal")&&this.lastValue===t)throw new RangeError("Successive repetitions with the same value are not allowed");this.state="repetition",this.lastValue=t}else{if(this.count===1)throw new RangeError("Repetition count of 1 is not allowed, use a literal instead");if(this.count<0){if(this.count=-this.count,this.state==="literal")throw new RangeError("Successive literals are not allowed");this.state="literal"}else{if(this.state==="nulls")throw new RangeError("Successive null runs are not allowed");if(this.count=this.readUint53(),this.count===0)throw new RangeError("Zero-length null runs are not allowed");this.lastValue=null,this.state="nulls"}}}readRawValue(){if(this.type==="int")return this.readInt53();if(this.type==="uint")return this.readUint53();if(this.type==="utf8")return this.readPrefixedString();throw new RangeError(`Unknown RLEDecoder datatype: ${this.type}`)}skipRawValues(t){if(this.type==="utf8")for(let r=0;r<t;r++)this.skip(this.readUint53());else{for(;t>0&&this.offset<this.buf.byteLength;)this.buf[this.offset]&128||t--,this.offset++;if(t>0)throw new RangeError("cannot skip beyond end of buffer")}}},Gv=class extends up{constructor(){super("int"),this.absoluteValue=0}appendValue(t,r=1){r<=0||(typeof t=="number"?(super.appendValue(t-this.absoluteValue,1),this.absoluteValue=t,r>1&&super.appendValue(0,r-1)):super.appendValue(t,r))}copyFrom(t,r={}){if(r.sumValues)throw new RangeError("unsupported options for DeltaEncoder.copyFrom()");if(!(t instanceof op))throw new TypeError("incompatible type of decoder");let n=r.count;if(n>0&&t.done)throw new RangeError(`cannot copy ${n} values`);if(n===0||t.done)return;let i=t.readValue(),a=0;if(this.appendValue(i),i===null){if(a=t.count+1,n!==void 0&&n<a&&(a=n),t.count-=a-1,this.count+=a-1,n>a&&t.done)throw new RangeError(`cannot copy ${n} values`);if(n===a||t.done)return;t.count===0&&this.appendValue(t.readValue())}n!==void 0&&(n-=a+1);let{nonNullValues:s,sum:u}=super.copyFrom(t,{count:n,sumValues:!0});s>0&&(this.absoluteValue=u,t.absoluteValue=u)}},op=class extends mh{constructor(t){super("int",t),this.absoluteValue=0}reset(){this.offset=0,this.lastValue=void 0,this.count=0,this.state=void 0,this.absoluteValue=0}readValue(){let t=super.readValue();return t===null?null:(this.absoluteValue+=t,this.absoluteValue)}skipValues(t){for(;t>0&&!this.done;){this.count===0&&this.readRecord();let r=Math.min(t,this.count);if(this.state==="literal")for(let n=0;n<r;n++)this.lastValue=this.readRawValue(),this.absoluteValue+=this.lastValue;else this.state==="repetition"&&(this.absoluteValue+=r*this.lastValue);t-=r,this.count-=r}}},Yv=class extends ph{constructor(){super(),this.lastValue=!1,this.count=0}appendValue(t,r=1){if(t!==!1&&t!==!0)throw new RangeError(`Unsupported value for BooleanEncoder: ${t}`);r<=0||(this.lastValue===t?this.count+=r:(this.appendUint53(this.count),this.lastValue=t,this.count=r))}copyFrom(t,r={}){if(!(t instanceof lp))throw new TypeError("incompatible type of decoder");let{count:n}=r,i=typeof n=="number"?n:Number.MAX_SAFE_INTEGER;if(n&&i>0&&t.done)throw new RangeError(`cannot copy ${n} values`);if(i===0||t.done)return;this.appendValue(t.readValue()),i--;let a=Math.min(t.count,i);for(this.count+=a,t.count-=a,i-=a;i>0&&!t.done;){if(t.count=t.readUint53(),t.count===0)throw new RangeError("Zero-length runs are not allowed");t.lastValue=!t.lastValue,this.appendUint53(this.count);let s=Math.min(t.count,i);this.count=s,this.lastValue=t.lastValue,t.count-=s,i-=s}if(n&&i>0&&t.done)throw new RangeError(`cannot copy ${n} values`)}finish(){this.count>0&&(this.appendUint53(this.count),this.count=0)}},lp=class extends gh{constructor(t){super(t),this.lastValue=!0,this.firstRun=!0,this.count=0}get done(){return this.count===0&&this.offset===this.buf.byteLength}reset(){this.offset=0,this.lastValue=!0,this.firstRun=!0,this.count=0}readValue(){if(this.done)return!1;for(;this.count===0;){if(this.count=this.readUint53(),this.lastValue=!this.lastValue,this.count===0&&!this.firstRun)throw new RangeError("Zero-length runs are not allowed");this.firstRun=!1}return this.count-=1,this.lastValue}skipValues(t){for(;t>0&&!this.done;){if(this.count===0){if(this.count=this.readUint53(),this.lastValue=!this.lastValue,this.count===0&&!this.firstRun)throw new RangeError("Zero-length runs are not allowed");this.firstRun=!1}this.count<t?(t-=this.count,this.count=0):(this.count-=t,t=0)}}};m4.exports={stringToUtf8:Kv,utf8ToString:zv,hexStringToBytes:d4,bytesToHexString:g4,Encoder:ph,Decoder:gh,RLEEncoder:up,RLEDecoder:mh,DeltaEncoder:Gv,DeltaDecoder:op,BooleanEncoder:Yv,BooleanDecoder:lp}});var w4=de((v4,cp)=>{(function(e,t){var r={};t(r);var n=r.default;for(var i in r)n[i]=r[i];typeof cp=="object"&&typeof cp.exports=="object"?cp.exports=n:typeof define=="function"&&define.amd?define(function(){return n}):e.sha256=n})(v4,function(e){"use strict";e.__esModule=!0,e.digestLength=32,e.blockSize=64;var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function r(g,p,h,w,v){for(var y,m,b,D,C,F,L,N,S,B,T,U,V;v>=64;){for(y=p[0],m=p[1],b=p[2],D=p[3],C=p[4],F=p[5],L=p[6],N=p[7],B=0;B<16;B++)T=w+B*4,g[B]=(h[T]&255)<<24|(h[T+1]&255)<<16|(h[T+2]&255)<<8|h[T+3]&255;for(B=16;B<64;B++)S=g[B-2],U=(S>>>17|S<<15)^(S>>>19|S<<13)^S>>>10,S=g[B-15],V=(S>>>7|S<<25)^(S>>>18|S<<14)^S>>>3,g[B]=(U+g[B-7]|0)+(V+g[B-16]|0);for(B=0;B<64;B++)U=(((C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7))+(C&F^~C&L)|0)+(N+(t[B]+g[B]|0)|0)|0,V=((y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10))+(y&m^y&b^m&b)|0,N=L,L=F,F=C,C=D+U|0,D=b,b=m,m=y,y=U+V|0;p[0]+=y,p[1]+=m,p[2]+=b,p[3]+=D,p[4]+=C,p[5]+=F,p[6]+=L,p[7]+=N,w+=64,v-=64}return w}var n=function(){function g(){this.digestLength=e.digestLength,this.blockSize=e.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return g.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},g.prototype.clean=function(){for(var p=0;p<this.buffer.length;p++)this.buffer[p]=0;for(var p=0;p<this.temp.length;p++)this.temp[p]=0;this.reset()},g.prototype.update=function(p,h){if(h===void 0&&(h=p.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var w=0;if(this.bytesHashed+=h,this.bufferLength>0){for(;this.bufferLength<64&&h>0;)this.buffer[this.bufferLength++]=p[w++],h--;this.bufferLength===64&&(r(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(h>=64&&(w=r(this.temp,this.state,p,w,h),h%=64);h>0;)this.buffer[this.bufferLength++]=p[w++],h--;return this},g.prototype.finish=function(p){if(!this.finished){var h=this.bytesHashed,w=this.bufferLength,v=h/536870912|0,y=h<<3,m=h%64<56?64:128;this.buffer[w]=128;for(var b=w+1;b<m-8;b++)this.buffer[b]=0;this.buffer[m-8]=v>>>24&255,this.buffer[m-7]=v>>>16&255,this.buffer[m-6]=v>>>8&255,this.buffer[m-5]=v>>>0&255,this.buffer[m-4]=y>>>24&255,this.buffer[m-3]=y>>>16&255,this.buffer[m-2]=y>>>8&255,this.buffer[m-1]=y>>>0&255,r(this.temp,this.state,this.buffer,0,m),this.finished=!0}for(var b=0;b<8;b++)p[b*4+0]=this.state[b]>>>24&255,p[b*4+1]=this.state[b]>>>16&255,p[b*4+2]=this.state[b]>>>8&255,p[b*4+3]=this.state[b]>>>0&255;return this},g.prototype.digest=function(){var p=new Uint8Array(this.digestLength);return this.finish(p),p},g.prototype._saveState=function(p){for(var h=0;h<this.state.length;h++)p[h]=this.state[h]},g.prototype._restoreState=function(p,h){for(var w=0;w<this.state.length;w++)this.state[w]=p[w];this.bytesHashed=h,this.finished=!1,this.bufferLength=0},g}();e.Hash=n;var i=function(){function g(p){this.inner=new n,this.outer=new n,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var h=new Uint8Array(this.blockSize);if(p.length>this.blockSize)new n().update(p).finish(h).clean();else for(var w=0;w<p.length;w++)h[w]=p[w];for(var w=0;w<h.length;w++)h[w]^=54;this.inner.update(h);for(var w=0;w<h.length;w++)h[w]^=106;this.outer.update(h),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var w=0;w<h.length;w++)h[w]=0}return g.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},g.prototype.clean=function(){for(var p=0;p<this.istate.length;p++)this.ostate[p]=this.istate[p]=0;this.inner.clean(),this.outer.clean()},g.prototype.update=function(p){return this.inner.update(p),this},g.prototype.finish=function(p){return this.outer.finished?this.outer.finish(p):(this.inner.finish(p),this.outer.update(p,this.digestLength).finish(p)),this},g.prototype.digest=function(){var p=new Uint8Array(this.digestLength);return this.finish(p),p},g}();e.HMAC=i;function a(g){var p=new n().update(g),h=p.digest();return p.clean(),h}e.hash=a,e.default=a;function s(g,p){var h=new i(g).update(p),w=h.digest();return h.clean(),w}e.hmac=s;function u(g,p,h,w){var v=w[0];if(v===0)throw new Error("hkdf: cannot expand more");p.reset(),v>1&&p.update(g),h&&p.update(h),p.update(w),p.finish(g),w[0]++}var l=new Uint8Array(e.digestLength);function f(g,p,h,w){p===void 0&&(p=l),w===void 0&&(w=32);for(var v=new Uint8Array([1]),y=s(p,g),m=new i(y),b=new Uint8Array(m.digestLength),D=b.length,C=new Uint8Array(w),F=0;F<w;F++)D===b.length&&(u(b,m,h,v),D=0),C[F]=b[D++];return m.clean(),b.fill(0),v.fill(0),C}e.hkdf=f;function d(g,p,h,w){for(var v=new i(g),y=v.digestLength,m=new Uint8Array(4),b=new Uint8Array(y),D=new Uint8Array(y),C=new Uint8Array(w),F=0;F*y<w;F++){var L=F+1;m[0]=L>>>24&255,m[1]=L>>>16&255,m[2]=L>>>8&255,m[3]=L>>>0&255,v.reset(),v.update(p),v.update(m),v.finish(D);for(var N=0;N<y;N++)b[N]=D[N];for(var N=2;N<=h;N++){v.reset(),v.update(D).finish(D);for(var S=0;S<y;S++)b[S]^=D[S]}for(var N=0;N<y&&F*y+N<w;N++)C[F*y+N]=b[N]}for(var F=0;F<y;F++)b[F]=D[F]=0;for(var F=0;F<4;F++)m[F]=0;return v.clean(),C}e.pbkdf2=d})});var Eh=de((MW,q4)=>{var dp=f4(),{copyObject:A4,parseOpId:Eu,equalBytes:E4}=xs(),{utf8ToString:Fj,hexStringToBytes:F4,bytesToHexString:pp,Encoder:xc,Decoder:Bi,RLEEncoder:Ii,RLEDecoder:b4,DeltaEncoder:Pc,DeltaDecoder:Sj,BooleanEncoder:S4,BooleanDecoder:Ij}=Wv(),{Hash:I4}=w4(),Rc=new Uint8Array([133,111,74,131]),e2=0,Tc=1,Ah=2,B4=256,mt={GROUP_CARD:0,ACTOR_ID:1,INT_RLE:2,INT_DELTA:3,BOOLEAN:4,STRING_RLE:5,VALUE_LEN:6,VALUE_RAW:7},wh=8,nr={NULL:0,FALSE:1,TRUE:2,LEB128_UINT:3,LEB128_INT:4,IEEE754:5,UTF8:6,BYTES:7,COUNTER:8,TIMESTAMP:9,MIN_UNKNOWN:10,MAX_UNKNOWN:15},vh=["makeMap","set","makeList","del","makeText","inc","makeTable","link"],Bj={makeMap:"map",makeList:"list",makeText:"text",makeTable:"table"},$4=[{columnName:"objActor",columnId:0|mt.ACTOR_ID},{columnName:"objCtr",columnId:0|mt.INT_RLE},{columnName:"keyActor",columnId:16|mt.ACTOR_ID},{columnName:"keyCtr",columnId:16|mt.INT_DELTA},{columnName:"keyStr",columnId:16|mt.STRING_RLE},{columnName:"idActor",columnId:32|mt.ACTOR_ID},{columnName:"idCtr",columnId:32|mt.INT_DELTA},{columnName:"insert",columnId:48|mt.BOOLEAN},{columnName:"action",columnId:64|mt.INT_RLE},{columnName:"valLen",columnId:80|mt.VALUE_LEN},{columnName:"valRaw",columnId:80|mt.VALUE_RAW},{columnName:"chldActor",columnId:96|mt.ACTOR_ID},{columnName:"chldCtr",columnId:96|mt.INT_DELTA}],t2=$4.concat([{columnName:"predNum",columnId:112|mt.GROUP_CARD},{columnName:"predActor",columnId:112|mt.ACTOR_ID},{columnName:"predCtr",columnId:112|mt.INT_DELTA}]),r2=$4.concat([{columnName:"succNum",columnId:128|mt.GROUP_CARD},{columnName:"succActor",columnId:128|mt.ACTOR_ID},{columnName:"succCtr",columnId:128|mt.INT_DELTA}]),P4=[{columnName:"actor",columnId:0|mt.ACTOR_ID},{columnName:"seq",columnId:0|mt.INT_DELTA},{columnName:"maxOp",columnId:16|mt.INT_DELTA},{columnName:"time",columnId:32|mt.INT_DELTA},{columnName:"message",columnId:48|mt.STRING_RLE},{columnName:"depsNum",columnId:64|mt.GROUP_CARD},{columnName:"depsIndex",columnId:64|mt.INT_DELTA},{columnName:"extraLen",columnId:80|mt.VALUE_LEN},{columnName:"extraRaw",columnId:80|mt.VALUE_RAW}];function fp(e,t){if(!e||!e.actorId)return e;let r=e.counter,n=t.indexOf(e.actorId);if(n<0)throw new RangeError("missing actorId");return{counter:r,actorNum:n,actorId:e.actorId}}function Xv(e,t){return e.counter<t.counter?-1:e.counter>t.counter?1:e.actorId<t.actorId?-1:e.actorId>t.actorId?1:0}function $j(e,t){let r={},n=[];for(let a of e)a=A4(a),r[a.actor]=!0,a.ops=Lj(a.ops,a.startOp,a.actor),a.ops=a.ops.map(s=>{s=A4(s),s.obj!=="_root"&&(s.obj=Eu(s.obj)),s.elemId&&s.elemId!=="_head"&&(s.elemId=Eu(s.elemId)),s.child&&(s.child=Eu(s.child)),s.pred&&(s.pred=s.pred.map(Eu)),s.obj.actorId&&(r[s.obj.actorId]=!0),s.elemId&&s.elemId.actorId&&(r[s.elemId.actorId]=!0),s.child&&s.child.actorId&&(r[s.child.actorId]=!0);for(let u of s.pred)r[u.actorId]=!0;return s}),n.push(a);let i=Object.keys(r).sort();t&&(i=[e[0].actor].concat(i.filter(a=>a!==e[0].actor)));for(let a of n){a.actorNum=i.indexOf(a.actor);for(let s=0;s<a.ops.length;s++){let u=a.ops[s];u.id={counter:a.startOp+s,actorNum:a.actorNum,actorId:a.actor},u.obj=fp(u.obj,i),u.elemId=fp(u.elemId,i),u.child=fp(u.child,i),u.pred=u.pred.map(l=>fp(l,i))}}return{changes:n,actorIds:i}}function Pj(e,t){if(e.obj==="_root")t.objActor.appendValue(null),t.objCtr.appendValue(null);else if(e.obj.actorNum>=0&&e.obj.counter>0)t.objActor.appendValue(e.obj.actorNum),t.objCtr.appendValue(e.obj.counter);else throw new RangeError(`Unexpected objectId reference: ${JSON.stringify(e.obj)}`)}function Rj(e,t){if(e.key)t.keyActor.appendValue(null),t.keyCtr.appendValue(null),t.keyStr.appendValue(e.key);else if(e.elemId==="_head"&&e.insert)t.keyActor.appendValue(null),t.keyCtr.appendValue(0),t.keyStr.appendValue(null);else if(e.elemId&&e.elemId.actorNum>=0&&e.elemId.counter>0)t.keyActor.appendValue(e.elemId.actorNum),t.keyCtr.appendValue(e.elemId.counter),t.keyStr.appendValue(null);else throw new RangeError(`Unexpected operation key: ${JSON.stringify(e)}`)}function xj(e,t){let r=vh.indexOf(e.action);if(r>=0)t.action.appendValue(r);else if(typeof e.action=="number")t.action.appendValue(e.action);else throw new RangeError(`Unexpected operation action: ${e.action}`)}function Tj(e){switch(e.datatype){case"counter":return[nr.COUNTER,e.value];case"timestamp":return[nr.TIMESTAMP,e.value];case"uint":return[nr.LEB128_UINT,e.value];case"int":return[nr.LEB128_INT,e.value];case"float64":{let t=new ArrayBuffer(8);return new DataView(t).setFloat64(0,e.value,!0),[nr.IEEE754,new Uint8Array(t)]}default:if(Number.isInteger(e.value)&&e.value<=Number.MAX_SAFE_INTEGER&&e.value>=Number.MIN_SAFE_INTEGER)return[nr.LEB128_INT,e.value];{let t=new ArrayBuffer(8);return new DataView(t).setFloat64(0,e.value,!0),[nr.IEEE754,new Uint8Array(t)]}}}function Oj(e,t){if(e.action!=="set"&&e.action!=="inc"||e.value===null)t.valLen.appendValue(nr.NULL);else if(e.value===!1)t.valLen.appendValue(nr.FALSE);else if(e.value===!0)t.valLen.appendValue(nr.TRUE);else if(typeof e.value=="string"){let r=t.valRaw.appendRawString(e.value);t.valLen.appendValue(r<<4|nr.UTF8)}else if(ArrayBuffer.isView(e.value)){let r=t.valRaw.appendRawBytes(new Uint8Array(e.value.buffer));t.valLen.appendValue(r<<4|nr.BYTES)}else if(typeof e.value=="number"){let[r,n]=Tj(e),i;r===nr.LEB128_UINT?i=t.valRaw.appendUint53(n):r===nr.IEEE754?i=t.valRaw.appendRawBytes(n):i=t.valRaw.appendInt53(n),t.valLen.appendValue(i<<4|r)}else if(typeof e.datatype=="number"&&e.datatype>=nr.MIN_UNKNOWN&&e.datatype<=nr.MAX_UNKNOWN&&e.value instanceof Uint8Array){let r=t.valRaw.appendRawBytes(e.value);t.valLen.appendValue(r<<4|e.datatype)}else throw e.datatype?new RangeError(`Unknown datatype ${e.datatype} for value ${e.value}`):new RangeError(`Unsupported value in operation: ${e.value}`)}function R4(e,t){if(e===nr.NULL)return{value:null};if(e===nr.FALSE)return{value:!1};if(e===nr.TRUE)return{value:!0};if(e%16===nr.UTF8)return{value:Fj(t)};if(e%16===nr.LEB128_UINT)return{value:new Bi(t).readUint53(),datatype:"uint"};if(e%16===nr.LEB128_INT)return{value:new Bi(t).readInt53(),datatype:"int"};if(e%16===nr.IEEE754){let r=new DataView(t.buffer,t.byteOffset,t.byteLength);if(t.byteLength===8)return{value:r.getFloat64(0,!0),datatype:"float64"};throw new RangeError(`Invalid length for floating point number: ${t.byteLength}`)}else return e%16===nr.COUNTER?{value:new Bi(t).readInt53(),datatype:"counter"}:e%16===nr.TIMESTAMP?{value:new Bi(t).readInt53(),datatype:"timestamp"}:{value:t,datatype:e%16}}function y4(e,t,r,n){let{columnId:i,columnName:a,decoder:s}=e[t];if(i%8===mt.VALUE_LEN&&t+1<e.length&&e[t+1].columnId===i+1){let u=s.readValue(),l=e[t+1].decoder.readRawBytes(u>>4),{value:f,datatype:d}=R4(u,l);return n[a]=f,d&&(n[a+"_datatype"]=d),2}else if(i%8===mt.ACTOR_ID){let u=s.readValue();if(u===null)n[a]=null;else{if(!r[u])throw new RangeError(`No actor index ${u}`);n[a]=r[u]}}else n[a]=s.readValue();return 1}function kj(e,t){let r={objActor:new Ii("uint"),objCtr:new Ii("uint"),keyActor:new Ii("uint"),keyCtr:new Pc,keyStr:new Ii("utf8"),insert:new S4,action:new Ii("uint"),valLen:new Ii("uint"),valRaw:new xc,chldActor:new Ii("uint"),chldCtr:new Pc};t?(r.idActor=new Ii("uint"),r.idCtr=new Pc,r.succNum=new Ii("uint"),r.succActor=new Ii("uint"),r.succCtr=new Pc):(r.predNum=new Ii("uint"),r.predCtr=new Pc,r.predActor=new Ii("uint"));for(let i of e)if(Pj(i,r),Rj(i,r),r.insert.appendValue(!!i.insert),xj(i,r),Oj(i,r),i.child&&i.child.counter?(r.chldActor.appendValue(i.child.actorNum),r.chldCtr.appendValue(i.child.counter)):(r.chldActor.appendValue(null),r.chldCtr.appendValue(null)),t){r.idActor.appendValue(i.id.actorNum),r.idCtr.appendValue(i.id.counter),r.succNum.appendValue(i.succ.length),i.succ.sort(Xv);for(let a=0;a<i.succ.length;a++)r.succActor.appendValue(i.succ[a].actorNum),r.succCtr.appendValue(i.succ[a].counter)}else{r.predNum.appendValue(i.pred.length),i.pred.sort(Xv);for(let a=0;a<i.pred.length;a++)r.predActor.appendValue(i.pred[a].actorNum),r.predCtr.appendValue(i.pred[a].counter)}let n=[];for(let{columnName:i,columnId:a}of t?r2:t2)r[i]&&n.push({columnId:a,columnName:i,encoder:r[i]});return n.sort((i,a)=>i.columnId-a.columnId)}function Nj(e,t){return t===void 0?typeof e=="string"||typeof e=="boolean"||e===null:typeof e=="number"}function Lj(e,t,r){let n=t,i=[];for(let a of e)if(a.action==="set"&&a.values&&a.insert){if(a.pred.length!==0)throw new RangeError("multi-insert pred must be empty");let s=a.elemId,u=a.datatype;for(let l of a.values){if(!Nj(l,u))throw new RangeError(`Decode failed: bad value/datatype association (${l},${u})`);i.push({action:"set",obj:a.obj,elemId:s,datatype:u,value:l,pred:[],insert:!0}),s=`${n}@${r}`,n+=1}}else if(a.action==="del"&&a.multiOp>1){if(a.pred.length!==1)throw new RangeError("multiOp deletion must have exactly one pred");let s=Eu(a.elemId),u=Eu(a.pred[0]);for(let l=0;l<a.multiOp;l++){let f=`${s.counter+l}@${s.actorId}`,d=[`${u.counter+l}@${u.actorId}`];i.push({action:"del",obj:a.obj,elemId:f,pred:d}),n+=1}}else i.push(a),n+=1;return i}function x4(e,t){let r=[];for(let n of e){let i=n.objCtr===null?"_root":`${n.objCtr}@${n.objActor}`,a=n.keyStr?void 0:n.keyCtr===0?"_head":`${n.keyCtr}@${n.keyActor}`,s=vh[n.action]||n.action,u=a?{obj:i,elemId:a,action:s}:{obj:i,key:n.keyStr,action:s};if(u.insert=!!n.insert,(vh[n.action]==="set"||vh[n.action]==="inc")&&(u.value=n.valLen,n.valLen_datatype&&(u.datatype=n.valLen_datatype)),!!n.chldCtr!=!!n.chldActor)throw new RangeError(`Mismatched child columns: ${n.chldCtr} and ${n.chldActor}`);n.chldCtr!==null&&(u.child=`${n.chldCtr}@${n.chldActor}`),t?(u.id=`${n.idCtr}@${n.idActor}`,u.succ=n.succNum.map(l=>`${l.succCtr}@${l.succActor}`),_4(n.succNum.map(l=>({counter:l.succCtr,actorId:l.succActor})))):(u.pred=n.predNum.map(l=>`${l.predCtr}@${l.predActor}`),_4(n.predNum.map(l=>({counter:l.predCtr,actorId:l.predActor})))),r.push(u)}return r}function _4(e){let t=null;for(let r of e){if(t&&Xv(t,r)!==-1)throw new RangeError("operation IDs are not in ascending order");t=r}}function Uj(e){return(e&7)===mt.INT_DELTA?new Pc:(e&7)===mt.BOOLEAN?new S4:(e&7)===mt.STRING_RLE?new Ii("utf8"):(e&7)===mt.VALUE_RAW?new xc:new Ii("uint")}function hp(e,t){return(e&7)===mt.INT_DELTA?new Sj(t):(e&7)===mt.BOOLEAN?new Ij(t):(e&7)===mt.STRING_RLE?new b4("utf8",t):(e&7)===mt.VALUE_RAW?new Bi(t):new b4("uint",t)}function T4(e,t){let r=new Uint8Array(0),n=[],i=0,a=0;for(;i<e.length||a<t.length;)if(i===e.length||a<t.length&&t[a].columnId<e[i].columnId){let{columnId:s,columnName:u}=t[a];n.push({columnId:s,columnName:u,decoder:hp(s,r)}),a++}else if(a===t.length||e[i].columnId<t[a].columnId){let{columnId:s,buffer:u}=e[i];n.push({columnId:s,decoder:hp(s,u)}),i++}else{let{columnId:s,buffer:u}=e[i],{columnName:l}=t[a];n.push({columnId:s,columnName:l,decoder:hp(s,u)}),i++,a++}return n}function Jv(e,t,r){e=T4(e,r);let n=[];for(;e.some(i=>!i.decoder.done);){let i={},a=0;for(;a<e.length;){let s=e[a].columnId,u=s>>4,l=1;for(;a+l<e.length&&e[a+l].columnId>>4===u;)l++;if(s%8===mt.GROUP_CARD){let f=[],d=e[a].decoder.readValue();for(let g=0;g<d;g++){let p={};for(let h=1;h<l;h++)y4(e,a+h,t,p);f.push(p)}i[e[a].columnName]=f,a+=l}else a+=y4(e,a,t,i)}n.push(i)}return n}function Zv(e){let t=(-1^wh)>>>0,r=-1,n=[],i=e.readUint53();for(let a=0;a<i;a++){let s=e.readUint53(),u=e.readUint53();if((s&t)<=(r&t))throw new RangeError("Columns must be in ascending order");r=s,n.push({columnId:s,bufferLen:u})}return n}function Qv(e,t){let r=t.filter(n=>n.encoder.buffer.byteLength>0);e.appendUint53(r.length);for(let n of r)e.appendUint53(n.columnId),e.appendUint53(n.encoder.buffer.byteLength)}function O4(e){let t=e.readUint53(),r=[];for(let s=0;s<t;s++)r.push(pp(e.readRawBytes(32)));let n={actor:e.readHexString(),seq:e.readUint53(),startOp:e.readUint53(),time:e.readInt53(),message:e.readPrefixedString(),deps:r},i=[n.actor],a=e.readUint53();for(let s=0;s<a;s++)i.push(e.readHexString());return n.actorIds=i,n}function k4(e,t){let n=Rc.byteLength+4+1+5,i=new xc;i.appendRawBytes(new Uint8Array(n)),t(i);let a=i.buffer,s=new xc;s.appendByte(e),s.appendUint53(a.byteLength-n);let u=s.buffer,l=new I4;l.update(u),l.update(a.subarray(n));let f=l.digest(),d=f.subarray(0,4);return a.set(Rc,n-u.byteLength-4-Rc.byteLength),a.set(d,n-u.byteLength-4),a.set(u,n-u.byteLength),{hash:f,bytes:a.subarray(n-u.byteLength-4-Rc.byteLength)}}function Oc(e,t){if(!E4(e.readRawBytes(Rc.byteLength),Rc))throw new RangeError("Data does not begin with magic bytes 85 6f 4a 83");let r=e.readRawBytes(4),n=e.offset,i=e.readByte(),a=e.readUint53(),s={chunkType:i,chunkLength:a,chunkData:e.readRawBytes(a)};if(t){let u=new I4;u.update(e.buf.subarray(n,e.offset));let l=u.digest();if(!E4(l.subarray(0,4),r))throw new RangeError("checksum does not match data");s.hash=pp(l)}return s}function N4(e){let{changes:t,actorIds:r}=$j([e],!0),n=t[0],{hash:i,bytes:a}=k4(Tc,u=>{if(!Array.isArray(n.deps))throw new TypeError("deps is not an array");u.appendUint53(n.deps.length);for(let f of n.deps.slice().sort())u.appendRawBytes(F4(f));u.appendHexString(n.actor),u.appendUint53(n.seq),u.appendUint53(n.startOp),u.appendInt53(n.time),u.appendPrefixedString(n.message||""),u.appendUint53(r.length-1);for(let f of r.slice(1))u.appendHexString(f);let l=kj(n.ops,!1);Qv(u,l);for(let f of l)u.appendRawBytes(f.encoder.buffer);n.extraBytes&&u.appendRawBytes(n.extraBytes)}),s=pp(i);if(e.hash&&e.hash!==s)throw new RangeError(`Change hash does not match encoding: ${e.hash} != ${s}`);return a.byteLength>=B4?Hj(a):a}function L4(e){e[8]===Ah&&(e=U4(e));let t=new Bi(e),r=Oc(t,!0),n=new Bi(r.chunkData);if(!t.done)throw new RangeError("Encoded change has trailing data");if(r.chunkType!==Tc)throw new RangeError(`Unexpected chunk type: ${r.chunkType}`);let i=O4(n),a=Zv(n);for(let s=0;s<a.length;s++){if(a[s].columnId&wh)throw new RangeError("change must not contain deflated columns");a[s].buffer=n.readRawBytes(a[s].bufferLen)}if(!n.done){let s=n.buf.byteLength-n.offset;i.extraBytes=n.readRawBytes(s)}return i.columns=a,i.hash=r.hash,i}function n2(e){let t=L4(e);return t.ops=x4(Jv(t.columns,t.actorIds,t2),!1),delete t.actorIds,delete t.columns,t}function jj(e,t){e[8]===Ah&&(e=U4(e));let r=Oc(new Bi(e),t);if(r.chunkType!==Tc)throw new RangeError("Buffer chunk type is not a change");let n=O4(new Bi(r.chunkData));return n.change=e,t&&(n.hash=r.hash),n}function Hj(e){let t=Oc(new Bi(e),!1);if(t.chunkType!==Tc)throw new RangeError(`Unexpected chunk type: ${t.chunkType}`);let r=dp.deflateRaw(t.chunkData),n=new xc;return n.appendRawBytes(e.subarray(0,8)),n.appendByte(Ah),n.appendUint53(r.byteLength),n.appendRawBytes(r),n.buffer}function U4(e){let t=Oc(new Bi(e),!1);if(t.chunkType!==Ah)throw new RangeError(`Unexpected chunk type: ${t.chunkType}`);let r=dp.inflateRaw(t.chunkData),n=new xc;return n.appendRawBytes(e.subarray(0,8)),n.appendByte(Tc),n.appendUint53(r.byteLength),n.appendRawBytes(r),n.buffer}function j4(e){let t=new Bi(e),r=[],n=0;for(;!t.done;)Oc(t,!1),r.push(e.subarray(n,t.offset)),n=t.offset;return r}function Mj(e){let t=[];for(let r of e)for(let n of j4(r))n[8]===e2?t=t.concat(M4(n)):(n[8]===Tc||n[8]===Ah)&&t.push(n2(n));return t}function qj(e,t){if(e===t)return 0;if(e==="_root")return-1;if(t==="_root")return 1;let r=Eu(e),n=Eu(t);return r.counter<n.counter?-1:r.counter>n.counter?1:r.actorId<n.actorId?-1:r.actorId>n.actorId?1:0}function Vj(e,t){let r={};for(let i of e){if(i.ops=[],r[i.actor]||(r[i.actor]=[]),i.seq!==r[i.actor].length+1)throw new RangeError(`Expected seq = ${r[i.actor].length+1}, got ${i.seq}`);if(i.seq>1&&r[i.actor][i.seq-2].maxOp>i.maxOp)throw new RangeError("maxOp must increase monotonically per actor");r[i.actor].push(i)}let n={};for(let i of t){if(i.action==="del")throw new RangeError("document should not contain del operations");i.pred=n[i.id]?n[i.id].pred:[],n[i.id]=i;for(let a of i.succ){if(!n[a])if(i.elemId){let s=i.insert?i.id:i.elemId;n[a]={id:a,action:"del",obj:i.obj,elemId:s,pred:[]}}else n[a]={id:a,action:"del",obj:i.obj,key:i.key,pred:[]};n[a].pred.push(i.id)}delete i.succ}for(let i of Object.values(n))i.action==="del"&&t.push(i);for(let i of t){let{counter:a,actorId:s}=Eu(i.id),u=r[s],l=0,f=u.length;for(;l<f;){let d=Math.floor((l+f)/2);u[d].maxOp<a?l=d+1:f=d}if(l>=u.length)throw new RangeError(`Operation ID ${i.id} outside of allowed range`);u[l].ops.push(i)}for(let i of e){i.ops.sort((a,s)=>qj(a.id,s.id)),i.startOp=i.maxOp-i.ops.length+1,delete i.maxOp;for(let a=0;a<i.ops.length;a++){let s=i.ops[a],u=`${i.startOp+a}@${i.actor}`;if(s.id!==u)throw new RangeError(`Expected opId ${u}, got ${s.id}`);delete s.id}}}function Kj(e,t){let r={};for(let s=0;s<e.length;s++){let u=e[s];u.deps=[];for(let l of u.depsNum.map(f=>f.depsIndex)){if(!e[l]||!e[l].hash)throw new RangeError(`No hash for index ${l} while processing index ${s}`);let f=e[l].hash;u.deps.push(f),r[f]&&delete r[f]}if(u.deps.sort(),delete u.depsNum,u.extraLen_datatype!==nr.BYTES)throw new RangeError(`Bad datatype for extra bytes: ${nr.BYTES}`);u.extraBytes=u.extraLen,delete u.extraLen_datatype,e[s]=n2(N4(u)),r[e[s].hash]=!0}let n=Object.keys(r).sort(),i=n.length===t.length,a=0;for(;i&&a<n.length;)i=n[a]===t[a],a++;if(!i)throw new RangeError(`Mismatched heads hashes: expected ${t.join(", ")}, got ${n.join(", ")}`)}function zj(e){let{changesColumns:t,opsColumns:r,actorIds:n,heads:i,headsIndexes:a,extraBytes:s}=e;for(let u of t)C4(u);for(let u of r)C4(u);return k4(e2,u=>{u.appendUint53(n.length);for(let l of n)u.appendHexString(l);u.appendUint53(i.length);for(let l of i.sort())u.appendRawBytes(F4(l));Qv(u,t),Qv(u,r);for(let l of t)u.appendRawBytes(l.encoder.buffer);for(let l of r)u.appendRawBytes(l.encoder.buffer);for(let l of a)u.appendUint53(l);s&&u.appendRawBytes(s)}).bytes}function H4(e){let t=new Bi(e),r=Oc(t,!0),n=new Bi(r.chunkData);if(!t.done)throw new RangeError("Encoded document has trailing data");if(r.chunkType!==e2)throw new RangeError(`Unexpected chunk type: ${r.chunkType}`);let i=[],a=n.readUint53();for(let p=0;p<a;p++)i.push(n.readHexString());let s=[],u=[],l=n.readUint53();for(let p=0;p<l;p++)s.push(pp(n.readRawBytes(32)));let f=Zv(n),d=Zv(n);for(let p=0;p<f.length;p++)f[p].buffer=n.readRawBytes(f[p].bufferLen),D4(f[p]);for(let p=0;p<d.length;p++)d[p].buffer=n.readRawBytes(d[p].bufferLen),D4(d[p]);if(!n.done)for(let p=0;p<l;p++)u.push(n.readUint53());let g=n.readRawBytes(n.buf.byteLength-n.offset);return{changesColumns:f,opsColumns:d,actorIds:i,heads:s,headsIndexes:u,extraBytes:g}}function M4(e){let{changesColumns:t,opsColumns:r,actorIds:n,heads:i}=H4(e),a=Jv(t,n,P4),s=x4(Jv(r,n,r2),!0);return Vj(a,s),Kj(a,i),a}function C4(e){e.encoder.buffer.byteLength>=B4&&(e.encoder={buffer:dp.deflateRaw(e.encoder.buffer)},e.columnId|=wh)}function D4(e){e.columnId&wh&&(e.buffer=dp.inflateRaw(e.buffer),e.columnId^=wh)}q4.exports={COLUMN_TYPE:mt,VALUE_TYPE:nr,ACTIONS:vh,OBJECT_TYPE:Bj,DOC_OPS_COLUMNS:r2,CHANGE_COLUMNS:t2,DOCUMENT_COLUMNS:P4,encoderByColumnId:Uj,decoderByColumnId:hp,makeDecoders:T4,decodeValue:R4,splitContainers:j4,encodeChange:N4,decodeChangeColumns:L4,decodeChange:n2,decodeChangeMeta:jj,decodeChanges:Mj,encodeDocumentHeader:zj,decodeDocumentHeader:H4,decodeDocument:M4}});var aD=de((qW,sD)=>{var{parseOpId:vp,copyObject:wp}=xs(),{COLUMN_TYPE:$n,VALUE_TYPE:s2,ACTIONS:bu,OBJECT_TYPE:V4,DOC_OPS_COLUMNS:K4,CHANGE_COLUMNS:Wt,DOCUMENT_COLUMNS:Os,encoderByColumnId:jc,decoderByColumnId:d2,makeDecoders:bh,decodeValue:gp,encodeChange:Gj,decodeChangeColumns:Yj,decodeChangeMeta:Wj,decodeChanges:Xj,decodeDocumentHeader:Jj,encodeDocumentHeader:Zj}=Eh(),_h=600,Qj=10,J4=7,Z4=Math.floor(Qj*_h/8),Tr=0,Cr=1,In=2,Bn=3,yt=4,qn=5,gr=6,Vn=7,zr=8,io=9,fl=10,so=13,kc=14,Nc=15,ks=13,a2=14,Lc=15,z4=Wt.filter(e=>["predNum","predActor","predCtr"].includes(e.columnName)).map(e=>e.columnId);function u2(e,t,r){if(t.length===1)e[t[0]]=r;else{let n=Object.assign({},e[t[0]]);u2(n,t.slice(1),r),e[t[0]]=n}}function G4(e,t,r,n){for(let H of t)H.decoder.reset();let{objActor:i,objCtr:a,keyActor:s,keyCtr:u,keyStr:l,idActor:f,idCtr:d,insert:g}=e,[p,h,,,w,v,y,m,b,,,,,D]=t.map(H=>H.decoder),C=0,F=0,L=!1,N=null,S=null,B=null,T=null,U=null,V=null,Y=0;if(a!==null&&!n)for(;(!h.done||!p.done||!b.done)&&(S=h.readValue(),N=r[p.readValue()],b.skipValues(1),S===null||!N||S<a||S===a&&N<i);)C+=1;if((S!==a||N!==i)&&!n)return{found:!0,skipCount:C,visibleCount:F};if(l!==null){for(w.skipValues(C);!w.done;){let H=p.readValue();if(N=H===null?null:r[H],S=h.readValue(),U=w.readValue(),U!==null&&U<l&&S===a&&N===i)C+=1;else break}return{found:!0,skipCount:C,visibleCount:F}}if(y.skipValues(C),v.skipValues(C),m.skipValues(C),D.skipValues(C),T=y.readValue(),B=r[v.readValue()],V=m.readValue(),Y=D.readValue(),g){if(!n&&u!==null&&u>0&&s!==null){for(C+=1;!y.done&&!v.done&&(T!==u||B!==s)&&(V&&(L=!1),Y===0&&!L&&(F+=1,L=!0),T=y.readValue(),B=r[v.readValue()],S=h.readValue(),N=r[p.readValue()],V=m.readValue(),Y=D.readValue(),S===a&&N===i);)C+=1;if(S!==a||N!==i||T!==u||B!==s||!V)return{found:!1,skipCount:C,visibleCount:F};if(V&&(L=!1),Y===0&&!L&&(F+=1,L=!0),y.done||v.done)return{found:!0,skipCount:C,visibleCount:F};T=y.readValue(),B=r[v.readValue()],S=h.readValue(),N=r[p.readValue()],V=m.readValue(),Y=D.readValue()}for(;(!V||T>d||T===d&&B>f)&&S===a&&N===i&&(C+=1,V&&(L=!1),Y===0&&!L&&(F+=1,L=!0),!y.done&&!v.done);)T=y.readValue(),B=r[v.readValue()],S=h.readValue(),N=r[p.readValue()],V=m.readValue(),Y=D.readValue()}else if(u!==null&&u>0&&s!==null){for(;(!V||T!==u||B!==s)&&S===a&&N===i&&(C+=1,V&&(L=!1),Y===0&&!L&&(F+=1,L=!0),!y.done&&!v.done);)T=y.readValue(),B=r[v.readValue()],S=h.readValue(),N=r[p.readValue()],V=m.readValue(),Y=D.readValue();if(S!==a||N!==i||T!==u||B!==s||!V)return{found:!1,skipCount:C,visibleCount:F}}return{found:!0,skipCount:C,visibleCount:F}}function Y4(e,t,r,n){let i=e.blocks[t],a=e.blocks[t+1];return i.lastObjectActor!==r||i.lastObjectCtr!==n||i.numVisible===void 0?0:i.lastVisibleActor===a.firstVisibleActor&&i.lastVisibleActor!==void 0&&i.lastVisibleCtr===a.firstVisibleCtr&&i.lastVisibleCtr!==void 0?i.numVisible-1:i.numVisible}function Q4(e,t){let{objActor:r,objActorNum:n,objCtr:i,keyActor:a,keyCtr:s,keyStr:u}=t,l=0,f=0;if(i!==null)for(;l<e.blocks.length-1;){let d=e.blocks[l].lastObjectActor===void 0?void 0:e.actorIds[e.blocks[l].lastObjectActor],g=e.blocks[l].lastObjectCtr;if(g===null||g<i||g===i&&d<r)l++;else break}if(u!==null){for(;l<e.blocks.length-1;){let{lastObjectActor:g,lastObjectCtr:p,lastKey:h}=e.blocks[l];if(i===p&&n===g&&h!==void 0&&h<u)l++;else break}let{skipCount:d}=G4(t,e.blocks[l].columns,e.actorIds,!1);return{blockIndex:l,skipCount:d,visibleCount:0}}else{let d=s===null||s===0||a===null,g=a===null?null:e.actorIds.indexOf(a),p=!1;for(;;){if(!d&&!p)for(;l<e.blocks.length-1&&e.blocks[l].lastObjectActor===n&&e.blocks[l].lastObjectCtr===i&&!tD(e.blocks[l].bloom,g,s);){if(e.blocks[l].lastObjectCtr>i)throw new RangeError(`Reference element not found: ${s}@${a}`);f+=Y4(e,l,n,i),l++}let{found:h,skipCount:w,visibleCount:v}=G4(t,e.blocks[l].columns,e.actorIds,p);if(l===e.blocks.length-1||e.blocks[l].lastObjectActor!==n||e.blocks[l].lastObjectCtr!==i){if(h)return{blockIndex:l,skipCount:w,visibleCount:f+v};throw new RangeError(`Reference element not found: ${s}@${a}`)}else if(h&&w<e.blocks[l].numOps)return{blockIndex:l,skipCount:w,visibleCount:f+v};p=h&&t.insert,f+=Y4(e,l,n,i),l++}}}function eD(e,t,r){let n=8*e.byteLength,i=r%n,a=t%n,s=((r^t)*16777619>>>0)%n;for(let u=0;u<J4;u++)e[i>>>3]|=1<<(i&7),i=(i+a)%n,a=(a+s)%n}function tD(e,t,r){let n=8*e.byteLength,i=r%n,a=t%n,s=((r^t)*16777619>>>0)%n;for(let u=0;u<J4;u++){if(!(e[i>>>3]&1<<(i&7)))return!1;i=(i+a)%n,a=(a+s)%n}return!0}function rD(e){e.bloom=new Uint8Array(Z4),e.numOps=0,e.lastKey=void 0,e.numVisible=void 0,e.lastObjectActor=void 0,e.lastObjectCtr=void 0,e.firstVisibleActor=void 0,e.firstVisibleCtr=void 0,e.lastVisibleActor=void 0,e.lastVisibleCtr=void 0;for(let d of e.columns)d.decoder.reset();let[t,r,n,i,a,s,u,l,,,,,,f]=e.columns.map(d=>d.decoder);for(;!u.done;){e.numOps+=1;let d=t.readValue(),g=r.readValue(),p=n.readValue(),h=i.readValue(),w=a.readValue(),v=s.readValue(),y=u.readValue(),m=l.readValue(),b=f.readValue();if((e.lastObjectActor!==d||e.lastObjectCtr!==g)&&(e.numVisible=0,e.lastObjectActor=d,e.lastObjectCtr=g),w!==null)e.lastKey=w;else if(m||h!==null){e.lastKey=void 0;let D=m?v:p,C=m?y:h;eD(e.bloom,D,C),b===0&&(e.firstVisibleActor===void 0&&(e.firstVisibleActor=D),e.firstVisibleCtr===void 0&&(e.firstVisibleCtr=C),(e.lastVisibleActor!==D||e.lastVisibleCtr!==C)&&(e.numVisible+=1,e.lastVisibleActor=D,e.lastVisibleCtr=C))}}}function i2(e,t,r,n){if(t[yt]!==null)e.lastObjectCtr===t[Cr]&&e.lastObjectActor===t[Tr]&&(e.lastKey===void 0||e.lastKey<t[yt])&&(e.lastKey=t[yt]);else{let i=t[Vn]?t[qn]:t[In],a=t[Vn]?t[gr]:t[Bn];eD(e.bloom,i,a),(t[ks]===0||n)&&(e.firstVisibleActor===void 0&&(e.firstVisibleActor=i),e.firstVisibleCtr===void 0&&(e.firstVisibleCtr=a),e.lastVisibleActor=i,e.lastVisibleCtr=a)}(e.lastObjectCtr===void 0||t[Tr]!==null&&t[Cr]!==null&&(e.lastObjectCtr===null||e.lastObjectCtr<t[Cr]||e.lastObjectCtr===t[Cr]&&r[e.lastObjectActor]<r[t[Tr]]))&&(e.lastObjectActor=t[Tr],e.lastObjectCtr=t[Cr],e.lastKey=t[yt]!==null?t[yt]:void 0,e.numVisible=0)}function nD(e){for(let i of e.columns)i.decoder.reset();let t=Math.ceil(e.numOps/(.8*_h)),r=[],n=0;for(let i=1;i<=t;i++){let a=Math.ceil(i*e.numOps/t)-n,s=e.columns.map(f=>({columnId:f.columnId,encoder:jc(f.columnId)}));Hc(s,e.columns,a);let l={columns:s.map(f=>{let d=d2(f.columnId,f.encoder.buffer);return{columnId:f.columnId,decoder:d}})};rD(l),r.push(l),n+=a}return r}function eH(e){let t=e[0].columns.map(r=>({columnId:r.columnId,encoder:jc(r.columnId)}));for(let r of e){for(let n of r.columns)n.decoder.reset();Hc(t,r.columns,r.numOps)}return t}function Hc(e,t,r){if(r===0)return;let n=0,i=-1,a=0,s=-1,u=0;for(let l of e){for(;n<t.length&&t[n].columnId<l.columnId;)n++;let f=null;n<t.length&&t[n].columnId===l.columnId&&t[n].decoder.buf.byteLength>0&&(f=t[n].decoder);let d=l.columnId>>4===i?a:r;if(l.columnId%8===$n.GROUP_CARD)i=l.columnId>>4,f?a=l.encoder.copyFrom(f,{count:r,sumValues:!0}).sum:(l.encoder.appendValue(0,r),a=0);else if(l.columnId%8===$n.VALUE_LEN)if(f){if(n+1===t.length||t[n+1].columnId!==l.columnId+1)throw new RangeError("VALUE_LEN column without accompanying VALUE_RAW column");s=l.columnId+1,u=l.encoder.copyFrom(f,{count:d,sumValues:!0,sumShift:4}).sum}else l.encoder.appendValue(null,d),s=l.columnId+1,u=0;else if(l.columnId%8===$n.VALUE_RAW){if(l.columnId!==s)throw new RangeError("VALUE_RAW column without accompanying VALUE_LEN column");u>0&&l.encoder.appendRawBytes(f.readRawBytes(u))}else if(f)l.encoder.copyFrom(f,{count:d});else{let g=l.columnId%8===$n.BOOLEAN?!1:null;l.encoder.appendValue(g,d)}}}function o2(e,t){let r=[],n,i=-1,a=0,s=-1,u=0;for(let l of e){if(l.columnId%8===$n.VALUE_RAW){if(l.columnId!==s)throw new RangeError("unexpected VALUE_RAW column");n=l.decoder.readRawBytes(u)}else if(l.columnId%8===$n.GROUP_CARD)i=l.columnId>>4,a=l.decoder.readValue()||0,n=a;else if(l.columnId>>4===i){n=[],l.columnId%8===$n.VALUE_LEN&&(s=l.columnId+1,u=0);for(let f=0;f<a;f++){let d=l.decoder.readValue();l.columnId%8===$n.ACTOR_ID&&t&&typeof d=="number"&&(d=t[d]),l.columnId%8===$n.VALUE_LEN&&(u+=n>>>4),n.push(d)}}else n=l.decoder.readValue(),l.columnId%8===$n.ACTOR_ID&&t&&typeof n=="number"&&(n=t[n]),l.columnId%8===$n.VALUE_LEN&&(s=l.columnId+1,u=n>>>4);r.push(n)}return r}function mp(e,t,r){let n=0,i=-1,a=0;for(let s of e){for(;n<t.length&&t[n].columnId<s.columnId;)n++;if(n<t.length&&t[n].columnId===s.columnId){let u=r[n];if(s.columnId%8===$n.GROUP_CARD)i=s.columnId>>4,a=u,s.encoder.appendValue(u);else if(s.columnId>>4===i){if(!Array.isArray(u)||u.length!==a)throw new RangeError("bad group value");for(let l of u)s.encoder.appendValue(l)}else s.columnId%8===$n.VALUE_RAW?u&&s.encoder.appendRawBytes(u):s.encoder.appendValue(u)}else if(s.columnId%8===$n.GROUP_CARD)i=s.columnId>>4,a=0,s.encoder.appendValue(0);else if(s.columnId%8!==$n.VALUE_RAW){let u=s.columnId>>4===i?a:1,l=null;s.columnId%8===$n.BOOLEAN&&(l=!1),s.columnId%8===$n.VALUE_LEN&&(l=0),s.encoder.appendValue(l,u)}}}function l2(e,t){let r=e.blocks[t];if(r.columns[zr].decoder.done){if(t===e.blocks.length-1)return{docOp:null,blockIndex:t};t+=1,r=e.blocks[t];for(let n of r.columns)n.decoder.reset();return{docOp:o2(r.columns),blockIndex:t}}else return{docOp:o2(r.columns),blockIndex:t}}function iD(e,t){for(;t.changeIndex<t.changes.length-1&&(!t.columns||t.columns[zr].decoder.done);){t.changeIndex+=1;let n=t.changes[t.changeIndex];t.columns=bh(n.columns,Wt),t.opCtr=n.startOp,t.columns[zr].decoder.done&&(n.maxOp=n.startOp-1),iH(e,t.columns);let{actorIds:i,actorTable:a}=sH(e.actorIds,n);e.actorIds=i,t.actorTable=a,t.actorIndex=e.actorIds.indexOf(n.actorIds[0])}if(t.columns[zr].decoder.done){t.done=!0,t.nextOp=null;return}t.nextOp=o2(t.columns,t.actorTable),t.nextOp[qn]=t.actorIndex,t.nextOp[gr]=t.opCtr,t.changes[t.changeIndex].maxOp=t.opCtr,t.opCtr>e.maxOp&&(e.maxOp=t.opCtr),t.opCtr+=1;let r=t.nextOp;if(r[Cr]===null&&r[Tr]!==null||r[Cr]!==null&&r[Tr]===null)throw new RangeError(`Mismatched object reference: (${r[Cr]}, ${r[Tr]})`);if(r[Bn]===null&&r[In]!==null||r[Bn]===0&&r[In]!==null||r[Bn]>0&&r[In]===null)throw new RangeError(`Mismatched operation key: (${r[Bn]}, ${r[In]})`)}function Uc(e,t){return t==="list"||t==="text"?{objectId:e,type:t,edits:[]}:{objectId:e,type:t,props:{}}}function W4(e,t,r=1){let n=vp(e),i=vp(t);return n.actorId===i.actorId&&n.counter+r===i.counter}function yh(e,t){if(e.length===0){e.push(t);return}let r=e[e.length-1];r.action==="insert"&&t.action==="insert"&&r.index===t.index-1&&r.value.type==="value"&&t.value.type==="value"&&r.elemId===r.opId&&t.elemId===t.opId&&W4(r.elemId,t.elemId,1)&&r.value.datatype===t.value.datatype&&typeof r.value.value==typeof t.value.value?(r.action="multi-insert",t.value.datatype&&(r.datatype=t.value.datatype),r.values=[r.value.value,t.value.value],delete r.value,delete r.opId):r.action==="multi-insert"&&t.action==="insert"&&r.index+r.values.length===t.index&&t.value.type==="value"&&t.elemId===t.opId&&W4(r.elemId,t.elemId,r.values.length)&&r.datatype===t.value.datatype&&typeof r.values[0]==typeof t.value.value?r.values.push(t.value.value):r.action==="remove"&&t.action==="remove"&&r.index===t.index?r.count+=t.count:e.push(t)}function c2(e,t,r,n,i,a){let s=!1;if(a)for(;!s&&e.length>0;){let u=e[e.length-1];if((u.action==="insert"||u.action==="update")&&u.index===t)e.pop(),s=u.action==="insert";else if(u.action==="multi-insert"&&u.index+u.values.length-1===t)u.values.pop(),s=!0;else break}s?yh(e,{action:"insert",index:t,elemId:r,opId:n,value:i}):yh(e,{action:"update",index:t,opId:n,value:i})}function tH(e,t,r){let n=[];for(;e.length>0;){let a=e[e.length-1];if(a.action==="insert"){if(a.index!==t)throw new RangeError("last edit has unexpected index");n.unshift(e.pop());break}else if(a.action==="update"){if(a.index!==t)throw new RangeError("last edit has unexpected index");n.unshift(e.pop())}else throw new RangeError("last edit has unexpected action")}let i=!0;for(let a of n)c2(e,t,r,a.opId,a.value,i),i=!1}function f2(e,t,r,n,i,a,s,u){let l=!t,f=n[zr]<bu.length?V4[bu[n[zr]]]:null,d=`${n[gr]}@${i.actorIds[n[qn]]}`,g=n[Vn]?n[qn]:n[In],p=n[Vn]?n[gr]:n[Bn],h=n[yt]?n[yt]:`${p}@${i.actorIds[g]}`;n[zr]%2===0&&!i.objectMeta[d]&&(i.objectMeta[d]={parentObj:r,parentKey:h,opId:d,type:f,children:{}},u2(i.objectMeta,[r,"children",h,d],{objectId:d,type:f,props:{}}));let w=!a[h];a[h]||(a[h]={visibleOps:[],hasChild:!1});let v=u!==void 0&&n[ks]>0;v||(a[h].visibleOps.push(n),a[h].hasChild=a[h].hasChild||n[zr]%2===0);let y=i.objectMeta[r].children[h];if(a[h].hasChild||y&&Object.keys(y).length>0){let C={};for(let F of a[h].visibleOps){let L=`${F[gr]}@${i.actorIds[F[qn]]}`;if(bu[F[zr]]==="set")C[L]=Object.assign({type:"value"},gp(F[io],F[fl]));else if(F[zr]%2===0){let N=F[zr]<bu.length?V4[bu[F[zr]]]:null;C[L]=Uc(L,N)}}u2(i.objectMeta,[r,"children",h],C)}let m,b;if(v&&bu[n[zr]]==="set"&&(n[io]&15)===s2.COUNTER){a[h]||(a[h]={visibleOps:[],hasChild:!1}),a[h].counterStates||(a[h].counterStates={});let C=a[h].counterStates,F={opId:d,value:gp(n[io],n[fl]).value,succs:{}};for(let L=0;L<n[ks];L++){let N=`${n[Lc][L]}@${i.actorIds[n[a2][L]]}`;C[N]=F,F.succs[N]=!0}}else if(bu[n[zr]]==="inc"){if(!a[h]||!a[h].counterStates||!a[h].counterStates[d])throw new RangeError(`increment operation ${d} for unknown counter`);let C=a[h].counterStates[d];C.value+=gp(n[io],n[fl]).value,delete C.succs[d],Object.keys(C.succs).length===0&&(m=C.opId,b={type:"value",datatype:"counter",value:C.value})}else v||(bu[n[zr]]==="set"?(m=d,b=Object.assign({type:"value"},gp(n[io],n[fl]))):n[zr]%2===0&&(e[d]||(e[d]=Uc(d,f)),m=d,b=e[d]));e[r]||(e[r]=Uc(r,i.objectMeta[r].type));let D=e[r];if(n[yt]===null)if(u===0&&!l&&a[h].action==="insert"&&(a[h].action="update",tH(D.edits,s,h),t&&t.lastObjectActor===n[Tr]&&t.lastObjectCtr===n[Cr]&&(t.numVisible-=1)),b)if(!a[h].action&&(u===void 0||l))a[h].action="insert",yh(D.edits,{action:"insert",index:s,elemId:h,opId:m,value:b}),t&&t.lastObjectActor===n[Tr]&&t.lastObjectCtr===n[Cr]&&(t.numVisible+=1);else if(a[h].action==="remove"){let C=D.edits[D.edits.length-1];if(C.action!=="remove")throw new RangeError("last edit has unexpected type");C.count>1?C.count-=1:D.edits.pop(),a[h].action="update",c2(D.edits,s,h,m,b,!0),t&&t.lastObjectActor===n[Tr]&&t.lastObjectCtr===n[Cr]&&(t.numVisible+=1)}else c2(D.edits,s,h,m,b,!a[h].action),a[h].action||(a[h].action="update");else u===0&&!a[h].action&&(a[h].action="remove",yh(D.edits,{action:"remove",index:s,count:1}),t&&t.lastObjectActor===n[Tr]&&t.lastObjectCtr===n[Cr]&&(t.numVisible-=1));else(b||!l)&&((w||!D.props[n[yt]])&&(D.props[n[yt]]={}),b&&(D.props[n[yt]][m]=b))}function rH(e,t,r,n,i,a,s){let u=n.nextOp,l=u[Vn],f=u[Tr],d=u[Cr],g=f===null?"_root":`${d}@${i.actorIds[f]}`,p=n.actorIndex,h=i.actorIds[p],w=!1,v=!1,y={},m;({docOp:m,blockIndex:s}=l2(i,s));let b=m===null?0:1,D=m===null?0:m[ks],C=null,F=[],L=[],N=[],S=null;for(n.objectIds.add(g);;){if(F.length===0){w=!1;let H=n.nextOp;for(;!n.done&&H[qn]===p&&H[Vn]===l&&H[Tr]===u[Tr]&&H[Cr]===u[Cr];){let z=F.length>0?F[F.length-1]:null,W=!1;for(let ie=0;ie<H[so];ie++)for(let Fe of F)H[kc][ie]===Fe[qn]&&H[Nc][ie]===Fe[gr]&&(W=!0);if(H!==u){if(!(l&&z!==null&&H[yt]===null&&H[In]===z[qn]&&H[Bn]===z[gr])){if(!(!l&&z!==null&&H[yt]!==null&&H[yt]===z[yt]&&!W)){if(!(!l&&z!==null&&H[yt]===null&&z[yt]===null&&H[In]===z[In]&&H[Bn]===z[Bn]&&!W)){if(!(!l&&z===null&&H[yt]===null&&m&&m[Vn]&&m[yt]===null&&m[qn]===H[In]&&m[gr]===H[Bn])){if(!(!l&&z===null&&H[yt]!==null&&S!==null&&S<H[yt]))break}}}}}S=H!==null?H[yt]:null,F.push(n.nextOp),L.push(n.columns),N.push(new Array(n.nextOp[so])),iD(i,n),H=n.nextOp}}F.length>0&&(C=F[0]);let B=m&&m[Tr]===C[Tr]&&m[Cr]===C[Cr],T=m&&m[yt]!==null&&m[yt]===C[yt],U=m&&m[yt]===null&&C[yt]===null&&(!m[Vn]&&m[In]===C[In]&&m[Bn]===C[Bn]||m[Vn]&&m[qn]===C[In]&&m[gr]===C[Bn]);if(F.length===0&&!(B&&(T||U)))break;let V=!1,Y=0;if(l||!B||m[yt]===null&&C[yt]!==null||m[yt]!==null&&C[yt]!==null&&C[yt]<m[yt]){if(Y=F.length,!B&&!w&&C[yt]===null&&!C[Vn])throw new RangeError(`could not find list element with ID: ${C[Bn]}@${i.actorIds[C[In]]}`)}else if(T||U||w){for(let H=0;H<F.length;H++){let z=F[H];for(let W=0;W<z[so];W++)if(z[kc][W]===m[qn]&&z[Nc][W]===m[gr]){let ie=0;for(;ie<m[ks]&&(m[Lc][ie]<z[gr]||m[Lc][ie]===z[gr]&&i.actorIds[m[a2][ie]]<h);)ie++;m[Lc].splice(ie,0,z[gr]),m[a2].splice(ie,0,p),m[ks]++,N[H][W]=!0;break}}if(U&&(w=!0),w&&!U)Y=F.length;else if(F.length===0||m[gr]<C[gr]||m[gr]===C[gr]&&i.actorIds[m[qn]]<h){V=!0,f2(e,t,g,m,i,y,a,D);for(let H=F.length-1;H>=0;H--){let z=!0;for(let W=0;W<F[H][so];W++)N[H][W]||(z=!1);bu[F[H][zr]]==="del"&&z&&(F.splice(H,1),L.splice(H,1),N.splice(H,1))}}else{if(m[gr]===C[gr]&&i.actorIds[m[qn]]===h)throw new RangeError(`duplicate operation ID: ${C[gr]}@${h}`);Y=1}}else V=!0;if(V&&(mp(r,i.blocks[s].columns,m),i2(t,m,i.actorIds,!1),m[Vn]&&v&&(v=!1,a++),m[ks]===0&&(v=!0),t.numOps++,{docOp:m,blockIndex:s}=l2(i,s),m!==null&&(b++,D=m[ks])),Y>0){for(let H=0;H<Y;H++){let z=F[H];for(let W=0;W<z[so];W++)if(!N[H][W])throw new RangeError(`no matching operation for pred: ${z[Nc][W]}@${i.actorIds[z[kc][W]]}`);mp(r,L[H],z),i2(t,z,i.actorIds,!0),f2(e,t,g,z,i,y,a),z[Vn]?(v=!1,a++):v=!0}Y===F.length?(F.length=0,L.length=0,N.length=0):(F.splice(0,Y),L.splice(0,Y),N.splice(0,Y)),t.numOps+=Y}}return m&&(mp(r,i.blocks[s].columns,m),t.numOps++,i2(t,m,i.actorIds,!1)),{docOpsConsumed:b,blockIndex:s}}function nH(e,t,r){let[n,i,a,s,u,l,f,d]=t.nextOp,g=n===null?null:r.actorIds[n],p=a===null?null:r.actorIds[a],h={objActor:g,objActorNum:n,objCtr:i,keyActor:p,keyActorNum:a,keyCtr:s,keyStr:u,idActor:r.actorIds[l],idCtr:f,insert:d,objId:g===null?"_root":`${i}@${g}`},{blockIndex:w,skipCount:v,visibleCount:y}=Q4(r,h),m=r.blocks[w];for(let B of m.columns)B.decoder.reset();let b=v===0||m.firstVisibleActor===void 0||!d&&m.firstVisibleActor===a&&m.firstVisibleCtr===s,D={columns:void 0,bloom:new Uint8Array(m.bloom),numOps:v,lastKey:m.lastKey,numVisible:m.numVisible,lastObjectActor:m.lastObjectActor,lastObjectCtr:m.lastObjectCtr,firstVisibleActor:b?void 0:m.firstVisibleActor,firstVisibleCtr:b?void 0:m.firstVisibleCtr,lastVisibleActor:void 0,lastVisibleCtr:void 0},C=m.columns.map(B=>({columnId:B.columnId,encoder:jc(B.columnId)}));Hc(C,m.columns,v);let{blockIndex:F,docOpsConsumed:L}=rH(e,D,C,t,r,y,w),N=r.blocks[F],S=-v-L;for(let B=w;B<=F;B++)S+=r.blocks[B].numOps;Hc(C,N.columns,S),D.numOps+=S;for(let B of N.columns)if(!B.decoder.done)throw new RangeError(`excess ops in column ${B.columnId}`);if(D.columns=C.map(B=>{let T=d2(B.columnId,B.encoder.buffer);return{columnId:B.columnId,decoder:T}}),w===F&&D.numOps<=_h)S>0&&m.lastVisibleActor!==void 0&&m.lastVisibleCtr!==void 0&&(D.lastVisibleActor=m.lastVisibleActor,D.lastVisibleCtr=m.lastVisibleCtr),r.blocks[w]=D;else{let B=nD(D);r.blocks.splice(w,F-w+1,...B)}}function iH(e,t){if(t[Tr].columnId!==Wt[Tr].columnId||Wt[Tr].columnName!=="objActor"||t[Cr].columnId!==Wt[Cr].columnId||Wt[Cr].columnName!=="objCtr"||t[In].columnId!==Wt[In].columnId||Wt[In].columnName!=="keyActor"||t[Bn].columnId!==Wt[Bn].columnId||Wt[Bn].columnName!=="keyCtr"||t[yt].columnId!==Wt[yt].columnId||Wt[yt].columnName!=="keyStr"||t[qn].columnId!==Wt[qn].columnId||Wt[qn].columnName!=="idActor"||t[gr].columnId!==Wt[gr].columnId||Wt[gr].columnName!=="idCtr"||t[Vn].columnId!==Wt[Vn].columnId||Wt[Vn].columnName!=="insert"||t[zr].columnId!==Wt[zr].columnId||Wt[zr].columnName!=="action"||t[io].columnId!==Wt[io].columnId||Wt[io].columnName!=="valLen"||t[fl].columnId!==Wt[fl].columnId||Wt[fl].columnName!=="valRaw"||t[so].columnId!==Wt[so].columnId||Wt[so].columnName!=="predNum"||t[kc].columnId!==Wt[kc].columnId||Wt[kc].columnName!=="predActor"||t[Nc].columnId!==Wt[Nc].columnId||Wt[Nc].columnName!=="predCtr")throw new RangeError("unexpected columnId");let r=e.blocks[0].columns;if(!t.every(n=>z4.includes(n.columnId)||r.find(i=>i.columnId===n.columnId))){let n=r.map(i=>({columnId:i.columnId}));for(let i of t){let{columnId:a}=i;!z4.includes(a)&&!r.find(s=>s.columnId===a)&&n.push({columnId:a})}n.sort((i,a)=>i.columnId-a.columnId);for(let i=0;i<e.blocks.length;i++){let a=wp(e.blocks[i]);a.columns=bh(a.columns.map(s=>({columnId:s.columnId,buffer:s.decoder.buf})),n),e.blocks[i]=a}}}function sH(e,t){if(e.indexOf(t.actorIds[0])<0){if(t.seq!==1)throw new RangeError(`Seq ${t.seq} is the first change for actor ${t.actorIds[0]}`);e=e.concat([t.actorIds[0]])}let r=[];for(let n of t.actorIds){let i=e.indexOf(n);if(i<0)throw new RangeError(`actorId ${n} is not known to document`);r.push(i)}return{actorIds:e,actorTable:r}}function aH(e,t,r){for(let n of t){let i=r.objectMeta[n],a=null,s=!1;for(;;){let u=a&&Object.keys(i.children[a.parentKey]).length>0;if(e[n]||(e[n]=Uc(n,i.type)),a&&u)if(i.type==="list"||i.type==="text"){for(let l of e[n].edits)l.opId&&i.children[a.parentKey][l.opId]&&(s=!0);if(!s){let l=vp(n),f=vp(a.parentKey),d={objActor:l.actorId,objCtr:l.counter,keyActor:f.actorId,keyCtr:f.counter,objActorNum:r.actorIds.indexOf(l.actorId),keyActorNum:r.actorIds.indexOf(f.actorId),keyStr:null,insert:!1,objId:n},{visibleCount:g}=Q4(r,d);for(let[p,h]of Object.entries(i.children[a.parentKey])){let w=h;h.objectId&&(e[h.objectId]||(e[h.objectId]=Uc(h.objectId,h.type)),w=e[h.objectId]);let v={action:"update",index:g,opId:p,value:w};yh(e[n].edits,v)}}}else{e[n].props[a.parentKey]||(e[n].props[a.parentKey]={});let l=e[n].props[a.parentKey];for(let[f,d]of Object.entries(i.children[a.parentKey]))l[f]?s=!0:d.objectId?(e[d.objectId]||(e[d.objectId]=Uc(d.objectId,d.type)),l[f]=e[d.objectId]):l[f]=d}if(s||!i.parentObj||a&&!u)break;a=i,n=i.parentObj,i=r.objectMeta[n]}}return e}function uH(e,t,r,n,i){let a=new Set(r.heads),s=new Set,u=wp(r.clock),l=[],f=[];for(let d of t){if(r.changeIndexByHash[d.hash]!==void 0||s.has(d.hash))continue;let g=(u[d.actor]||0)+1,p=!0;for(let h of d.deps){let w=r.changeIndexByHash[h];(w===void 0||w===-1)&&!s.has(h)&&(p=!1)}if(!p)f.push(d);else if(d.seq<g){if(i)throw new RangeError(`Reuse of sequence number ${d.seq} for actor ${d.actor}`);return[[],t]}else{if(d.seq>g)throw new RangeError(`Skipped sequence number ${g} for actor ${d.actor}`);u[d.actor]=d.seq,s.add(d.hash);for(let h of d.deps)a.delete(h);a.add(d.hash),l.push(d)}}if(l.length>0){let d={changes:l,changeIndex:-1,objectIds:n};for(iD(r,d);!d.done;)nH(e,d,r);r.heads=[...a].sort(),r.clock=u}return[l,f]}function X4(e){for(let d of e.blocks[0].columns)d.decoder.reset();let t={},r=null,n=0,i={_root:{objectId:"_root",type:"map",props:{}}},a=null,s=null,u="_root",l=!1,f=0;for(;{docOp:r,blockIndex:n}=l2(e,n),r!==null;){(r[Tr]!==a||r[Cr]!==s)&&(u=`${r[Cr]}@${e.actorIds[r[Tr]]}`,a=r[Tr],s=r[Cr],t={},f=0,l=!1),r[Vn]&&l&&(l=!1,f++),r[ks]===0&&(l=!0),r[gr]>e.maxOp&&(e.maxOp=r[gr]);for(let d=0;d<r[ks];d++)r[Lc][d]>e.maxOp&&(e.maxOp=r[Lc][d]);f2(i,null,u,r,e,t,f,r[ks])}return i._root}function oH(e){let t=bh(e.changesColumns,Os),r=t[0].decoder,n=t[1].decoder,i=t[5].decoder,a=t[6].decoder;if(t[0].columnId!==Os[0].columnId||Os[0].columnName!=="actor"||t[1].columnId!==Os[1].columnId||Os[1].columnName!=="seq"||t[5].columnId!==Os[5].columnId||Os[5].columnName!=="depsNum"||t[6].columnId!==Os[6].columnId||Os[6].columnName!=="depsIndex")throw new RangeError("unexpected columnId");let s=0,u={},l=[],f=new Set;for(;!r.done;){let p=r.readValue(),h=n.readValue(),w=i.readValue(),v=e.actorIds[p];if(h!==1&&h!==u[v]+1)throw new RangeError(`Expected seq ${u[v]+1}, got ${h} for actor ${v}`);l.push(p),u[v]=h,f.add(s);for(let y=0;y<w;y++)f.delete(a.readValue());s++}let d=[...f].map(p=>e.actorIds[l[p]]).sort();for(let p of t)p.decoder.reset();let g=t.map(p=>({columnId:p.columnId,encoder:jc(p.columnId)}));return Hc(g,t,s),{clock:u,headActors:d,encoders:g,numChanges:s}}function lH(e,t,r,n){mp(e,Os,[r.indexOf(t.actor),t.seq,t.maxOp,t.time,t.message,t.deps.length,t.deps.map(i=>n[i]),t.extraBytes?t.extraBytes.byteLength<<4|s2.BYTES:s2.BYTES,t.extraBytes])}var h2=class e{constructor(t){if(this.maxOp=0,this.haveHashGraph=!1,this.changes=[],this.changeIndexByHash={},this.dependenciesByHash={},this.dependentsByHash={},this.hashesByActor={},this.actorIds=[],this.heads=[],this.clock={},this.queue=[],this.objectMeta={_root:{parentObj:null,parentKey:null,opId:null,type:"map",children:{}}},t){let r=Jj(t),{clock:n,headActors:i,encoders:a,numChanges:s}=oH(r);if(this.binaryDoc=t,this.changes=new Array(s),this.actorIds=r.actorIds,this.heads=r.heads,this.clock=n,this.changesEncoders=a,this.extraBytes=r.extraBytes,r.heads.length===1&&i.length===1&&(this.hashesByActor[i[0]]=[],this.hashesByActor[i[0]][n[i[0]]-1]=r.heads[0]),r.heads.length===r.headsIndexes.length)for(let l=0;l<r.heads.length;l++)this.changeIndexByHash[r.heads[l]]=r.headsIndexes[l];else if(r.heads.length===1)this.changeIndexByHash[r.heads[0]]=s-1;else for(let l of r.heads)this.changeIndexByHash[l]=-1;this.blocks=[{columns:bh(r.opsColumns,K4)}],rD(this.blocks[0]),this.blocks[0].numOps>_h&&(this.blocks=nD(this.blocks[0]));let u={blocks:this.blocks,actorIds:this.actorIds,objectMeta:this.objectMeta,maxOp:0};this.initPatch=X4(u),this.maxOp=u.maxOp}else this.haveHashGraph=!0,this.changesEncoders=Os.map(r=>({columnId:r.columnId,encoder:jc(r.columnId)})),this.blocks=[{columns:bh([],K4),bloom:new Uint8Array(Z4),numOps:0,lastKey:void 0,numVisible:void 0,lastObjectActor:void 0,lastObjectCtr:void 0,firstVisibleActor:void 0,firstVisibleCtr:void 0,lastVisibleActor:void 0,lastVisibleCtr:void 0}]}clone(){let t=new e;return t.maxOp=this.maxOp,t.haveHashGraph=this.haveHashGraph,t.changes=this.changes.slice(),t.changeIndexByHash=wp(this.changeIndexByHash),t.dependenciesByHash=wp(this.dependenciesByHash),t.dependentsByHash=Object.entries(this.dependentsByHash).reduce((r,[n,i])=>(r[n]=i.slice(),r),{}),t.hashesByActor=Object.entries(this.hashesByActor).reduce((r,[n,i])=>(r[n]=i.slice(),r),{}),t.actorIds=this.actorIds,t.heads=this.heads,t.clock=this.clock,t.blocks=this.blocks,t.objectMeta=this.objectMeta,t.queue=this.queue,t}applyChanges(t,r=!1){let n=t.map(d=>{let g=Yj(d);return g.buffer=d,g}),i={_root:{objectId:"_root",type:"map",props:{}}},a={maxOp:this.maxOp,changeIndexByHash:this.changeIndexByHash,actorIds:this.actorIds,heads:this.heads,clock:this.clock,blocks:this.blocks.slice(),objectMeta:Object.assign({},this.objectMeta)},s=this.queue.length===0?n:n.concat(this.queue),u=[],l=new Set;for(;;){let[d,g]=uH(i,s,a,l,this.haveHashGraph);s=g;for(let p=0;p<d.length;p++)a.changeIndexByHash[d[p].hash]=this.changes.length+u.length+p;if(d.length>0&&(u=u.concat(d)),s.length===0)break;if(d.length===0){if(this.haveHashGraph)break;this.computeHashGraph(),a.changeIndexByHash=this.changeIndexByHash}}aH(i,l,a);for(let d of u){this.changes.push(d.buffer),this.hashesByActor[d.actor]||(this.hashesByActor[d.actor]=[]),this.hashesByActor[d.actor][d.seq-1]=d.hash,this.changeIndexByHash[d.hash]=this.changes.length-1,this.dependenciesByHash[d.hash]=d.deps,this.dependentsByHash[d.hash]=[];for(let g of d.deps)this.dependentsByHash[g]||(this.dependentsByHash[g]=[]),this.dependentsByHash[g].push(d.hash);lH(this.changesEncoders,d,a.actorIds,this.changeIndexByHash)}this.maxOp=a.maxOp,this.actorIds=a.actorIds,this.heads=a.heads,this.clock=a.clock,this.blocks=a.blocks,this.objectMeta=a.objectMeta,this.queue=s,this.binaryDoc=null,this.initPatch=null;let f={maxOp:this.maxOp,clock:this.clock,deps:this.heads,pendingChanges:this.queue.length,diffs:i._root};return r&&n.length===1&&(f.actor=n[0].actor,f.seq=n[0].seq),f}computeHashGraph(){let t=this.save();this.haveHashGraph=!0,this.changes=[],this.changeIndexByHash={},this.dependenciesByHash={},this.dependentsByHash={},this.hashesByActor={},this.clock={};for(let r of Xj([t])){let n=Gj(r);this.changes.push(n),this.changeIndexByHash[r.hash]=this.changes.length-1,this.dependenciesByHash[r.hash]=r.deps,this.dependentsByHash[r.hash]=[];for(let a of r.deps)this.dependentsByHash[a].push(r.hash);r.seq===1&&(this.hashesByActor[r.actor]=[]),this.hashesByActor[r.actor].push(r.hash);let i=(this.clock[r.actor]||0)+1;if(r.seq!==i)throw new RangeError(`Expected seq ${i}, got seq ${r.seq} from actor ${r.actor}`);this.clock[r.actor]=r.seq}}getChanges(t){if(this.haveHashGraph||this.computeHashGraph(),t.length===0)return this.changes.slice();let r=[],n={},i=[];for(let a of t){n[a]=!0;let s=this.dependentsByHash[a];if(!s)throw new RangeError(`hash not found: ${a}`);r.push(...s)}for(;r.length>0;){let a=r.pop();if(n[a]=!0,i.push(a),!this.dependenciesByHash[a].every(s=>n[s]))break;r.push(...this.dependentsByHash[a])}if(r.length===0&&this.heads.every(a=>n[a]))return i.map(a=>this.changes[this.changeIndexByHash[a]]);for(r=t.slice(),n={};r.length>0;){let a=r.pop();if(!n[a]){let s=this.dependenciesByHash[a];if(!s)throw new RangeError(`hash not found: ${a}`);r.push(...s),n[a]=!0}}return this.changes.filter(a=>!n[Wj(a,!0).hash])}getChangesAdded(t){this.haveHashGraph||this.computeHashGraph();let r=this.heads.slice(),n={},i=[];for(;r.length>0;){let a=r.pop();!n[a]&&t.changeIndexByHash[a]===void 0&&(n[a]=!0,i.push(a),r.push(...this.dependenciesByHash[a]))}return i.reverse().map(a=>this.changes[this.changeIndexByHash[a]])}getChangeByHash(t){return this.haveHashGraph||this.computeHashGraph(),this.changes[this.changeIndexByHash[t]]}getMissingDeps(t=[]){this.haveHashGraph||this.computeHashGraph();let r=new Set(t),n=new Set;for(let a of this.queue){n.add(a.hash);for(let s of a.deps)r.add(s)}let i=[];for(let a of r)this.changeIndexByHash[a]===void 0&&!n.has(a)&&i.push(a);return i.sort()}save(){if(this.binaryDoc)return this.binaryDoc;let t=this.changesEncoders.map(n=>({columnId:n.columnId,encoder:jc(n.columnId)})),r=this.changesEncoders.map(n=>{let i=d2(n.columnId,n.encoder.buffer);return{columnId:n.columnId,decoder:i}});return Hc(t,r,this.changes.length),this.binaryDoc=Zj({changesColumns:this.changesEncoders,opsColumns:eH(this.blocks),actorIds:this.actorIds,heads:this.heads,headsIndexes:this.heads.map(n=>this.changeIndexByHash[n]),extraBytes:this.extraBytes}),this.changesEncoders=t,this.binaryDoc}getPatch(){let t={_root:{parentObj:null,parentKey:null,opId:null,type:"map",children:{}}},r={blocks:this.blocks,actorIds:this.actorIds,objectMeta:t,maxOp:0},n=this.initPatch?this.initPatch:X4(r);return{maxOp:this.maxOp,clock:this.clock,deps:this.heads,pendingChanges:this.queue.length,diffs:n}}};sD.exports={MAX_BLOCK_SIZE:_h,BackendDoc:h2,bloomFilterContains:tD}});var oD=de((VW,uD)=>{function cH(e){if(e.frozen)throw new Error("Attempting to use an outdated Automerge document that has already been updated. Please use the latest document state, or call Automerge.clone() if you really need to use this old document state.");return e.state}uD.exports={backendState:cH}});var p2=de((KW,hD)=>{var{encodeChange:fH}=Eh(),{BackendDoc:cD}=aD(),{backendState:Ns}=oD();function hH(){return{state:new cD,heads:[]}}function dH(e){return{state:Ns(e).clone(),heads:e.heads}}function pH(e){e.state=null,e.frozen=!0}function gH(e,t){let r=Ns(e),n=r.applyChanges(t);return e.frozen=!0,[{state:r,heads:r.heads},n]}function lD(e,t,r){if(e.hashesByActor[t]&&e.hashesByActor[t][r]||!e.haveHashGraph&&(e.computeHashGraph(),e.hashesByActor[t]&&e.hashesByActor[t][r]))return e.hashesByActor[t][r];throw new RangeError(`Unknown change: actorId = ${t}, seq = ${r+1}`)}function mH(e,t){let r=Ns(e);if(t.seq<=r.clock[t.actor])throw new RangeError("Change request has already been applied");if(t.seq>1){let s=lD(r,t.actor,t.seq-2);if(!s)throw new RangeError(`Cannot find hash of localChange before seq=${t.seq}`);let u={[s]:!0};for(let l of t.deps)u[l]=!0;t.deps=Object.keys(u).sort()}let n=fH(t),i=r.applyChanges([n],!0);e.frozen=!0;let a=lD(r,t.actor,t.seq-1);return i.deps=i.deps.filter(s=>s!==a),[{state:r,heads:r.heads},i,n]}function vH(e){return Ns(e).save()}function wH(e){let t=new cD(e);return{state:t,heads:t.heads}}function AH(e,t){let r=Ns(e);return r.applyChanges(t),e.frozen=!0,{state:r,heads:r.heads}}function EH(e){return Ns(e).getPatch()}function bH(e){return e.heads}function yH(e){return fD(e,[])}function fD(e,t){if(!Array.isArray(t))throw new TypeError("Pass an array of hashes to Backend.getChanges()");return Ns(e).getChanges(t)}function _H(e,t){return Ns(t).getChangesAdded(Ns(e))}function CH(e,t){return Ns(e).getChangeByHash(t)}function DH(e,t=[]){return Ns(e).getMissingDeps(t)}hD.exports={init:hH,clone:dH,free:pH,applyChanges:gH,applyLocalChange:mH,save:vH,load:wH,loadChanges:AH,getPatch:EH,getHeads:bH,getAllChanges:yH,getChanges:fD,getChangesAdded:_H,getChangeByHash:CH,getMissingDeps:DH}});var ED=de((zW,AD)=>{var Ls=p2(),{hexStringToBytes:dD,bytesToHexString:FH,Encoder:v2,Decoder:w2}=Wv(),{decodeChangeMeta:bp}=Eh(),{copyObject:SH}=xs(),pD=32,gD=66,mD=67,IH=10,BH=7,Ch=class{constructor(t){if(Array.isArray(t)){this.numEntries=t.length,this.numBitsPerEntry=IH,this.numProbes=BH,this.bits=new Uint8Array(Math.ceil(this.numEntries*this.numBitsPerEntry/8));for(let r of t)this.addHash(r)}else if(t instanceof Uint8Array)if(t.byteLength===0)this.numEntries=0,this.numBitsPerEntry=0,this.numProbes=0,this.bits=t;else{let r=new w2(t);this.numEntries=r.readUint32(),this.numBitsPerEntry=r.readUint32(),this.numProbes=r.readUint32(),this.bits=r.readRawBytes(Math.ceil(this.numEntries*this.numBitsPerEntry/8))}else throw new TypeError("invalid argument")}get bytes(){if(this.numEntries===0)return new Uint8Array(0);let t=new v2;return t.appendUint32(this.numEntries),t.appendUint32(this.numBitsPerEntry),t.appendUint32(this.numProbes),t.appendRawBytes(this.bits),t.buffer}getProbes(t){let r=dD(t),n=8*this.bits.byteLength;if(r.byteLength!==32)throw new RangeError(`Not a 256-bit hash: ${t}`);let i=((r[0]|r[1]<<8|r[2]<<16|r[3]<<24)>>>0)%n,a=((r[4]|r[5]<<8|r[6]<<16|r[7]<<24)>>>0)%n,s=((r[8]|r[9]<<8|r[10]<<16|r[11]<<24)>>>0)%n,u=[i];for(let l=1;l<this.numProbes;l++)i=(i+a)%n,a=(a+s)%n,u.push(i);return u}addHash(t){for(let r of this.getProbes(t))this.bits[r>>>3]|=1<<(r&7)}containsHash(t){if(this.numEntries===0)return!1;for(let r of this.getProbes(t))if(!(this.bits[r>>>3]&1<<(r&7)))return!1;return!0}};function Ap(e,t){if(!Array.isArray(t))throw new TypeError("hashes must be an array");e.appendUint32(t.length);for(let r=0;r<t.length;r++){if(r>0&&t[r-1]>=t[r])throw new RangeError("hashes must be sorted");let n=dD(t[r]);if(n.byteLength!==pD)throw new TypeError("heads hashes must be 256 bits");e.appendRawBytes(n)}}function Ep(e){let t=e.readUint32(),r=[];for(let n=0;n<t;n++)r.push(FH(e.readRawBytes(pD)));return r}function g2(e){let t=new v2;t.appendByte(gD),Ap(t,e.heads),Ap(t,e.need),t.appendUint32(e.have.length);for(let r of e.have)Ap(t,r.lastSync),t.appendPrefixedBytes(r.bloom);t.appendUint32(e.changes.length);for(let r of e.changes)t.appendPrefixedBytes(r);return t.buffer}function vD(e){let t=new w2(e),r=t.readByte();if(r!==gD)throw new RangeError(`Unexpected message type: ${r}`);let n=Ep(t),i=Ep(t),a=t.readUint32(),s={heads:n,need:i,have:[],changes:[]};for(let l=0;l<a;l++){let f=Ep(t),d=t.readPrefixedBytes(t);s.have.push({lastSync:f,bloom:d})}let u=t.readUint32();for(let l=0;l<u;l++){let f=t.readPrefixedBytes();s.changes.push(f)}return s}function $H(e){let t=new v2;return t.appendByte(mD),Ap(t,e.sharedHeads),t.buffer}function PH(e){let t=new w2(e),r=t.readByte();if(r!==mD)throw new RangeError(`Unexpected record type: ${r}`);let n=Ep(t);return Object.assign(wD(),{sharedHeads:n})}function RH(e,t){let n=Ls.getChanges(e,t).map(i=>bp(i,!0).hash);return{lastSync:t,bloom:new Ch(n).bytes}}function xH(e,t,r){if(t.length===0)return r.map(g=>Ls.getChangeByHash(e,g)).filter(g=>g!==void 0);let n={},i=[];for(let g of t){for(let p of g.lastSync)n[p]=!0;i.push(new Ch(g.bloom))}let a=Ls.getChanges(e,Object.keys(n)).map(g=>bp(g,!0)),s={},u={},l={};for(let g of a){s[g.hash]=!0;for(let p of g.deps)u[p]||(u[p]=[]),u[p].push(g.hash);i.every(p=>!p.containsHash(g.hash))&&(l[g.hash]=!0)}let f=Object.keys(l);for(;f.length>0;){let g=f.pop();if(u[g])for(let p of u[g])l[p]||(l[p]=!0,f.push(p))}let d=[];for(let g of r)if(l[g]=!0,!s[g]){let p=Ls.getChangeByHash(e,g);p&&d.push(p)}for(let g of a)l[g.hash]&&d.push(g.change);return d}function wD(){return{sharedHeads:[],lastSentHeads:[],theirHeads:null,theirNeed:null,theirHave:null,sentHashes:{}}}function m2(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])}function TH(e,t){if(!e)throw new Error("generateSyncMessage called with no Automerge document");if(!t)throw new Error("generateSyncMessage requires a syncState, which can be created with initSyncState()");let{sharedHeads:r,lastSentHeads:n,theirHeads:i,theirNeed:a,theirHave:s,sentHashes:u}=t,l=Ls.getHeads(e),f=Ls.getMissingDeps(e,i||[]),d=[];if((!i||f.every(v=>i.includes(v)))&&(d=[RH(e,r)]),s&&s.length>0&&!s[0].lastSync.every(y=>Ls.getChangeByHash(e,y))){let y={heads:l,need:[],have:[{lastSync:[],bloom:new Uint8Array(0)}],changes:[]};return[t,g2(y)]}let g=Array.isArray(s)&&Array.isArray(a)?xH(e,s,a):[],p=Array.isArray(n)&&m2(l,n),h=Array.isArray(i)&&m2(l,i);if(p&&h&&g.length===0)return[t,null];g=g.filter(v=>!u[bp(v,!0).hash]);let w={heads:l,have:d,need:f,changes:g};if(g.length>0){u=SH(u);for(let v of g)u[bp(v,!0).hash]=!0}return t=Object.assign({},t,{lastSentHeads:l,sentHashes:u}),[t,g2(w)]}function OH(e,t,r){let n=t.filter(s=>!e.includes(s)),i=r.filter(s=>t.includes(s));return[...new Set([...n,...i])].sort()}function kH(e,t,r){if(!e)throw new Error("generateSyncMessage called with no Automerge document");if(!t)throw new Error("generateSyncMessage requires a syncState, which can be created with initSyncState()");let{sharedHeads:n,lastSentHeads:i,sentHashes:a}=t,s=null,u=vD(r),l=Ls.getHeads(e);u.changes.length>0&&([e,s]=Ls.applyChanges(e,u.changes),n=OH(l,Ls.getHeads(e),n)),u.changes.length===0&&m2(u.heads,l)&&(i=u.heads);let f=u.heads.filter(g=>Ls.getChangeByHash(e,g));f.length===u.heads.length?(n=u.heads,u.heads.length===0&&(i=[],a=[])):n=[...new Set(f.concat(n))].sort();let d={sharedHeads:n,lastSentHeads:i,theirHave:u.have,theirHeads:u.heads,theirNeed:u.need,sentHashes:a};return[e,d,s]}AD.exports={receiveSyncMessage:kH,generateSyncMessage:TH,encodeSyncMessage:g2,decodeSyncMessage:vD,initSyncState:wD,encodeSyncState:$H,decodeSyncState:PH,BloomFilter:Ch}});var yD=de((GW,bD)=>{var{init:NH,clone:LH,free:UH,applyChanges:jH,applyLocalChange:HH,save:MH,load:qH,loadChanges:VH,getPatch:KH,getHeads:zH,getAllChanges:GH,getChanges:YH,getChangesAdded:WH,getChangeByHash:XH,getMissingDeps:JH}=p2(),{receiveSyncMessage:ZH,generateSyncMessage:QH,encodeSyncMessage:eM,decodeSyncMessage:tM,encodeSyncState:rM,decodeSyncState:nM,initSyncState:iM}=ED();bD.exports={init:NH,clone:LH,free:UH,applyChanges:jH,applyLocalChange:HH,save:MH,load:qH,loadChanges:VH,getPatch:KH,getHeads:zH,getAllChanges:GH,getChanges:YH,getChangesAdded:WH,getChangeByHash:XH,getMissingDeps:JH,receiveSyncMessage:ZH,generateSyncMessage:QH,encodeSyncMessage:eM,decodeSyncMessage:tM,encodeSyncState:rM,decodeSyncState:nM,initSyncState:iM}});var BD=de((YW,E2)=>{var sM=U0(),tn=RC(),{OPTIONS:_D}=gu(),{encodeChange:aM,decodeChange:CD}=Eh(),{isObject:A2}=xs(),Lr=yD();function Dh(e){if(typeof e=="string")e={actorId:e};else if(typeof e>"u")e={};else if(!A2(e))throw new TypeError(`Unsupported options for init(): ${e}`);return tn.init(Object.assign({backend:Lr},e))}function uM(e,t){let r={message:"Initialization"};return DD(Dh(t),r,n=>Object.assign(n,e))}function DD(e,t,r){let[n]=tn.change(e,t,r);return n}function oM(e,t){let[r]=tn.emptyChange(e,t);return r}function lM(e,t={}){let r=Lr.clone(tn.getBackendState(e,"clone"));return yp(Dh(t),Lr.getPatch(r),r,[],t)}function cM(e){Lr.free(tn.getBackendState(e,"free"))}function fM(e,t={}){let r=Lr.load(e);return yp(Dh(t),Lr.getPatch(r),r,[e],t)}function hM(e){return Lr.save(tn.getBackendState(e,"save"))}function dM(e,t){let r=tn.getBackendState(e,"merge"),n=tn.getBackendState(t,"merge","second"),i=Lr.getChangesAdded(r,n),[a]=SD(e,i);return a}function pM(e,t){let r=tn.getBackendState(e,"getChanges"),n=tn.getBackendState(t,"getChanges","second");return Lr.getChanges(n,Lr.getHeads(r))}function FD(e){return Lr.getAllChanges(tn.getBackendState(e,"getAllChanges"))}function yp(e,t,r,n,i){let a=tn.applyPatch(e,t,r),s=i.patchCallback||e[_D].patchCallback;return s&&s(t,e,a,!1,n),a}function SD(e,t,r={}){let n=tn.getBackendState(e,"applyChanges"),[i,a]=Lr.applyChanges(n,t);return[yp(e,a,i,t,r),a]}function ID(e,t){if(!A2(e)||!A2(t))return e===t;let r=Object.keys(e).sort(),n=Object.keys(t).sort();if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(r[i]!==n[i]||!ID(e[r[i]],t[n[i]]))return!1;return!0}function gM(e){let t=tn.getActorId(e),r=FD(e);return r.map((n,i)=>({get change(){return CD(n)},get snapshot(){let a=Lr.loadChanges(Lr.init(),r.slice(0,i+1));return tn.applyPatch(Dh(t),Lr.getPatch(a),a)}}))}function mM(e,t){let r=tn.getBackendState(e,"generateSyncMessage");return Lr.generateSyncMessage(r,t)}function vM(e,t,r){let n=tn.getBackendState(e,"receiveSyncMessage"),[i,a,s]=Lr.receiveSyncMessage(n,t,r);if(!s)return[e,a,s];let u=null;return e[_D].patchCallback&&(u=Lr.decodeSyncMessage(r).changes),[yp(e,s,i,u,{}),a,s]}function wM(){return Lr.initSyncState()}function AM(e){Lr=e}E2.exports={init:Dh,from:uM,change:DD,emptyChange:oM,clone:lM,free:cM,load:fM,save:hM,merge:dM,getChanges:pM,getAllChanges:FD,applyChanges:SD,encodeChange:aM,decodeChange:CD,equals:ID,getHistory:gM,uuid:sM,Frontend:tn,setDefaultBackend:AM,generateSyncMessage:mM,receiveSyncMessage:vM,initSyncState:wM,get Backend(){return Lr}};for(let e of["getObjectId","getObjectById","getActorId","setActorId","getConflicts","getLastLocalChange","Text","Table","Counter","Observable","Int","Uint","Float64"])E2.exports[e]=tn[e]});var Fp=de((xX,kD)=>{"use strict";var JM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},C2=class e extends Error{constructor(t,r,n){super(t),JM(this,e.prototype),this.name="GrammarError",this.location=r,n===void 0&&(n=[]),this.diagnostics=n,this.stage=null,this.problems=[["error",t,r,n]]}toString(){let t=super.toString();this.location&&(t+=`
at `,this.location.source!==void 0&&this.location.source!==null&&(t+=`${this.location.source}:`),t+=`${this.location.start.line}:${this.location.start.column}`);for(let r of this.diagnostics)t+=`
from `,r.location.source!==void 0&&r.location.source!==null&&(t+=`${r.location.source}:`),t+=`${r.location.start.line}:${r.location.start.column}: ${r.message}`;return t}format(t){let r=t.map(({source:a,text:s})=>({source:a,text:s.split(/\r\n|\n|\r/g)}));function n(a,s,u=""){let l="",f=r.find(({source:g})=>g===a.source),d=a.start;if(f){let g=a.end,p=f.text[d.line-1],w=(d.line===g.line?g.column:p.length+1)-d.column||1;u&&(l+=`
note: ${u}`),l+=`
--> ${a.source}:${d.line}:${d.column}
${"".padEnd(s)} |
${d.line.toString().padStart(s)} | ${p}
${"".padEnd(s)} | ${"".padEnd(d.column-1)}${"".padEnd(w,"^")}`}else l+=`
at ${a.source}:${d.line}:${d.column}`,u&&(l+=`: ${u}`);return l}function i(a,s,u,l=[]){let f;u?f=l.reduce((g,{location:p})=>Math.max(g,p.start.line),u.start.line):f=Math.max.apply(null,l.map(g=>g.location.start.line)),f=f.toString().length;let d=`${a}: ${s}`;u&&(d+=n(u,f));for(let g of l)d+=n(g.location,f,g.message);return d}return this.problems.filter(a=>a[0]!=="info").map(a=>i(...a)).join(`
`)}};kD.exports=C2});var ws=de((TX,ND)=>{"use strict";var ZM={build(e){function t(s,...u){return e[s.type](s,...u)}function r(){}function n(s,...u){return t(s.expression,...u)}function i(s){return function(u,...l){u[s].forEach(f=>t(f,...l))}}let a={grammar(s,...u){s.topLevelInitializer&&t(s.topLevelInitializer,...u),s.initializer&&t(s.initializer,...u),s.rules.forEach(l=>t(l,...u))},top_level_initializer:r,initializer:r,rule:n,named:n,choice:i("alternatives"),action:n,sequence:i("elements"),labeled:n,text:n,simple_and:n,simple_not:n,optional:n,zero_or_more:n,one_or_more:n,group:n,semantic_and:r,semantic_not:r,rule_ref:r,literal:r,class:r,any:r};return Object.keys(a).forEach(s=>{Object.prototype.hasOwnProperty.call(e,s)||(e[s]=a[s])}),t}};ND.exports=ZM});var ao=de((OX,UD)=>{"use strict";var QM=ws(),LD={findRule(e,t){for(let r=0;r<e.rules.length;r++)if(e.rules[r].name===t)return e.rules[r]},indexOfRule(e,t){for(let r=0;r<e.rules.length;r++)if(e.rules[r].name===t)return r;return-1},alwaysConsumesOnSuccess(e,t){function r(){return!0}function n(){return!1}let i=QM.build({choice(a){return a.alternatives.every(i)},sequence(a){return a.elements.some(i)},simple_and:n,simple_not:n,optional:n,zero_or_more:n,semantic_and:n,semantic_not:n,rule_ref(a){let s=LD.findRule(e,a.name);return s?i(s):void 0},literal(a){return a.value!==""},class:r,any:r});return i(t)}};UD.exports=LD});var D2=de((kX,jD)=>{"use strict";var eq={PUSH:0,PUSH_EMPTY_STRING:35,PUSH_UNDEFINED:1,PUSH_NULL:2,PUSH_FAILED:3,PUSH_EMPTY_ARRAY:4,PUSH_CURR_POS:5,POP:6,POP_CURR_POS:7,POP_N:8,NIP:9,APPEND:10,WRAP:11,TEXT:12,PLUCK:36,IF:13,IF_ERROR:14,IF_NOT_ERROR:15,WHILE_NOT_ERROR:16,MATCH_ANY:17,MATCH_STRING:18,MATCH_STRING_IC:19,MATCH_CHAR_CLASS:20,MATCH_REGEXP:20,ACCEPT_N:21,ACCEPT_STRING:22,FAIL:23,LOAD_SAVED_POS:24,UPDATE_SAVED_POS:25,CALL:26,RULE:27,SILENT_FAILS_ON:28,SILENT_FAILS_OFF:29};jD.exports=eq});var F2=de((NX,HD)=>{"use strict";var tq=ws(),rq=ao(),nq=Fp(),Bh=1,hl=0,$h=-1;function Sp(e){function t(s){return s.match=hl}function r(s){return a(s.expression),s.match=Bh}function n(s){return s.match=a(s.expression)}function i(s,u){let l=s.length,f=0,d=0;for(let g=0;g<l;++g){let p=a(s[g]);p===Bh&&++f,p===$h&&++d}return f===l?Bh:u?d===l?$h:hl:d>0?$h:hl}let a=tq.build({rule(s){let u,l=0;if(typeof s.match>"u"){s.match=hl;do if(u=s.match,s.match=a(s.expression),++l>6)throw new nq("Infinity cycle detected when trying to evaluate node match result",s.location);while(u!==s.match)}return s.match},named:n,choice(s){return s.match=i(s.alternatives,!0)},action:n,sequence(s){return s.match=i(s.elements,!1)},labeled:n,text:n,simple_and:n,simple_not(s){return s.match=-a(s.expression)},optional:r,zero_or_more:r,one_or_more:n,group:n,semantic_and:t,semantic_not:t,rule_ref(s){let u=rq.findRule(e,s.name);return s.match=a(u)},literal(s){let u=s.value.length===0?Bh:hl;return s.match=u},class(s){let u=s.parts.length===0?$h:hl;return s.match=u},any:t});a(e)}Sp.ALWAYS_MATCH=Bh;Sp.SOMETIMES_MATCH=hl;Sp.NEVER_MATCH=$h;HD.exports=Sp});var qD=de((LX,MD)=>{"use strict";var iq=ao(),Te=D2(),sq=ws(),{ALWAYS_MATCH:qc,SOMETIMES_MATCH:S2,NEVER_MATCH:I2}=F2();function aq(e){let t=[],r=[],n=[],i=[];function a(b){let D=t.indexOf(b);return D===-1?t.push(b)-1:D}function s(b){let D={value:b.parts,inverted:b.inverted,ignoreCase:b.ignoreCase},C=JSON.stringify(D),F=r.findIndex(L=>JSON.stringify(L)===C);return F===-1?r.push(D)-1:F}function u(b){let D=JSON.stringify(b),C=n.findIndex(F=>JSON.stringify(F)===D);return C===-1?n.push(b)-1:C}function l(b,D,C){let F={predicate:b,params:D,body:C.code,location:C.codeLocation},L=JSON.stringify(F),N=i.findIndex(S=>JSON.stringify(S)===L);return N===-1?i.push(F)-1:N}function f(b){let D={};return Object.keys(b).forEach(C=>{D[C]=b[C]}),D}function d(b,...D){return b.concat(...D)}function g(b,D,C,F){return b===qc?C:b===I2?F:D.concat([C.length,F.length],C,F)}function p(b,D){return b.concat([D.length],D)}function h(b,D,C,F){let L=Object.keys(C).map(N=>F-C[N]);return[Te.CALL,b,D,L.length].concat(L)}function w(b,D,C){let F=b.match|0;return d([Te.PUSH_CURR_POS],[Te.SILENT_FAILS_ON],m(b,{sp:C.sp+1,env:f(C.env),action:null}),[Te.SILENT_FAILS_OFF],g(D?-F:F,[D?Te.IF_ERROR:Te.IF_NOT_ERROR],d([Te.POP],[D?Te.POP:Te.POP_CURR_POS],[Te.PUSH_UNDEFINED]),d([Te.POP],[D?Te.POP_CURR_POS:Te.POP],[Te.PUSH_FAILED])))}function v(b,D,C){let F=l(!0,Object.keys(C.env),b);return d([Te.UPDATE_SAVED_POS],h(F,0,C.env,C.sp),g(b.match|0,[Te.IF],d([Te.POP],D?[Te.PUSH_FAILED]:[Te.PUSH_UNDEFINED]),d([Te.POP],D?[Te.PUSH_UNDEFINED]:[Te.PUSH_FAILED])))}function y(b){return p([Te.WHILE_NOT_ERROR],d([Te.APPEND],b))}let m=sq.build({grammar(b){b.rules.forEach(m),b.literals=t,b.classes=r,b.expectations=n,b.functions=i},rule(b){b.bytecode=m(b.expression,{sp:-1,env:{},pluck:[],action:null})},named(b,D){let C=b.match|0,F=C===I2?null:u({type:"rule",value:b.name});return d([Te.SILENT_FAILS_ON],m(b.expression,D),[Te.SILENT_FAILS_OFF],g(C,[Te.IF_ERROR],[Te.FAIL,F],[]))},choice(b,D){function C(F,L){let N=F[0].match|0,S=m(F[0],{sp:L.sp,env:f(L.env),action:null});return N===qc?S:d(S,F.length>1?g(S2,[Te.IF_ERROR],d([Te.POP],C(F.slice(1),L)),[]):[])}return C(b.alternatives,D)},action(b,D){let C=f(D.env),F=b.expression.type!=="sequence"||b.expression.elements.length===0,L=m(b.expression,{sp:D.sp+(F?1:0),env:C,action:b}),N=b.expression.match|0,S=F&&N!==I2?l(!1,Object.keys(C),b):null;return F?d([Te.PUSH_CURR_POS],L,g(N,[Te.IF_NOT_ERROR],d([Te.LOAD_SAVED_POS,1],h(S,1,C,D.sp+2)),[]),[Te.NIP]):L},sequence(b,D){function C(F,L){if(F.length>0){let N=b.elements.length-F.length+1;return d(m(F[0],{sp:L.sp,env:L.env,pluck:L.pluck,action:null}),g(F[0].match|0,[Te.IF_NOT_ERROR],C(F.slice(1),{sp:L.sp+1,env:L.env,pluck:L.pluck,action:L.action}),d(N>1?[Te.POP_N,N]:[Te.POP],[Te.POP_CURR_POS],[Te.PUSH_FAILED])))}else{if(L.pluck.length>0)return d([Te.PLUCK,b.elements.length+1,L.pluck.length],L.pluck.map(N=>L.sp-N));if(L.action){let N=l(!1,Object.keys(L.env),L.action);return d([Te.LOAD_SAVED_POS,b.elements.length],h(N,b.elements.length+1,L.env,L.sp))}else return d([Te.WRAP,b.elements.length],[Te.NIP])}}return d([Te.PUSH_CURR_POS],C(b.elements,{sp:D.sp+1,env:D.env,pluck:[],action:D.action}))},labeled(b,D){let C=D.env,F=b.label,L=D.sp+1;return F&&(C=f(D.env),D.env[b.label]=L),b.pick&&D.pluck.push(L),m(b.expression,{sp:D.sp,env:C,action:null})},text(b,D){return d([Te.PUSH_CURR_POS],m(b.expression,{sp:D.sp+1,env:f(D.env),action:null}),g(b.match|0,[Te.IF_NOT_ERROR],d([Te.POP],[Te.TEXT]),[Te.NIP]))},simple_and(b,D){return w(b.expression,!1,D)},simple_not(b,D){return w(b.expression,!0,D)},optional(b,D){return d(m(b.expression,{sp:D.sp,env:f(D.env),action:null}),g(-(b.expression.match|0),[Te.IF_ERROR],d([Te.POP],[Te.PUSH_NULL]),[]))},zero_or_more(b,D){let C=m(b.expression,{sp:D.sp+1,env:f(D.env),action:null});return d([Te.PUSH_EMPTY_ARRAY],C,y(C),[Te.POP])},one_or_more(b,D){let C=m(b.expression,{sp:D.sp+1,env:f(D.env),action:null});return d([Te.PUSH_EMPTY_ARRAY],C,g(b.expression.match|0,[Te.IF_NOT_ERROR],d(y(C),[Te.POP]),d([Te.POP],[Te.POP],[Te.PUSH_FAILED])))},group(b,D){return m(b.expression,{sp:D.sp,env:f(D.env),action:null})},semantic_and(b,D){return v(b,!1,D)},semantic_not(b,D){return v(b,!0,D)},rule_ref(b){return[Te.RULE,iq.indexOfRule(e,b.name)]},literal(b){if(b.value.length>0){let D=b.match|0,F=D===S2||D===qc&&!b.ignoreCase?a(b.ignoreCase?b.value.toLowerCase():b.value):null,L=D!==qc?u({type:"literal",value:b.value,ignoreCase:b.ignoreCase}):null;return g(D,b.ignoreCase?[Te.MATCH_STRING_IC,F]:[Te.MATCH_STRING,F],b.ignoreCase?[Te.ACCEPT_N,b.value.length]:[Te.ACCEPT_STRING,F],[Te.FAIL,L])}return[Te.PUSH_EMPTY_STRING]},class(b){let D=b.match|0,C=D===S2?s(b):null,F=D!==qc?u({type:"class",value:b.parts,inverted:b.inverted,ignoreCase:b.ignoreCase}):null;return g(D,[Te.MATCH_CHAR_CLASS,C],[Te.ACCEPT_N,1],[Te.FAIL,F])},any(b){let D=b.match|0,C=D!==qc?u({type:"any"}):null;return g(D,[Te.MATCH_ANY],[Te.ACCEPT_N,1],[Te.FAIL,C])}});m(e)}MD.exports=aq});var KD=de((UX,VD)=>{"use strict";var B2=class{constructor(t,r,n){this.sp=-1,this.maxSp=-1,this.varName=r,this.ruleName=t,this.type=n}name(t){if(t<0)throw new RangeError(`Rule '${this.ruleName}': The variable stack underflow: attempt to use a variable '${this.varName}<x>' at an index ${t}`);return this.varName+t}push(t){let r=this.name(++this.sp)+" = "+t+";";return this.sp>this.maxSp&&(this.maxSp=this.sp),r}pop(t){return t!==void 0?(this.sp-=t,Array.from({length:t},(r,n)=>this.name(this.sp+1+n))):this.name(this.sp--)}top(){return this.name(this.sp)}index(t){if(t<0)throw new RangeError(`Rule '${this.ruleName}': The variable stack overflow: attempt to get a variable at a negative index ${t}`);return this.name(this.sp-t)}result(){if(this.maxSp<0)throw new RangeError(`Rule '${this.ruleName}': The variable stack is empty, can't get the result'`);return this.name(0)}defines(){return this.maxSp<0?"":this.type+" "+Array.from({length:this.maxSp+1},(t,r)=>this.name(r)).join(", ")+";"}checkedIf(t,r,n){let i=this.sp;if(r(),n){let a=this.sp;if(this.sp=i,n(),a!==this.sp)throw new Error("Rule '"+this.ruleName+"', position "+t+": Branches of a condition can't move the stack pointer differently (before: "+i+", after then: "+a+", after else: "+this.sp+").")}}checkedLoop(t,r){let n=this.sp;if(r(),n!==this.sp)throw new Error("Rule '"+this.ruleName+"', position "+t+": Body of a loop can't move the stack pointer (before: "+n+", after: "+this.sp+").")}};VD.exports=B2});var $2=de((jX,zD)=>{"use strict";zD.exports="2.0.1"});var GD=de(Ip=>{"use strict";function _u(e){return e.charCodeAt(0).toString(16).toUpperCase()}Ip.hex=_u;function uq(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\v/g,"\\v").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,t=>"\\x0"+_u(t)).replace(/[\x10-\x1F\x7F-\xFF]/g,t=>"\\x"+_u(t)).replace(/[\u0100-\u0FFF]/g,t=>"\\u0"+_u(t)).replace(/[\u1000-\uFFFF]/g,t=>"\\u"+_u(t))}Ip.stringEscape=uq;function oq(e){return e.replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\v/g,"\\v").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,t=>"\\x0"+_u(t)).replace(/[\x10-\x1F\x7F-\xFF]/g,t=>"\\x"+_u(t)).replace(/[\u0100-\u0FFF]/g,t=>"\\u0"+_u(t)).replace(/[\u1000-\uFFFF]/g,t=>"\\u"+_u(t))}Ip.regexpClassEscape=oq});var XD=de(WD=>{var YD="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");WD.encode=function(e){if(0<=e&&e<YD.length)return YD[e];throw new TypeError("Must be between 0 and 63: "+e)}});var e3=de(QD=>{var lq=XD(),JD=5,ZD=1<<JD,cq=ZD-1,fq=ZD;function hq(e){return e<0?(-e<<1)+1:(e<<1)+0}QD.encode=function(t){let r="",n,i=hq(t);do n=i&cq,i>>>=JD,i>0&&(n|=fq),r+=lq.encode(n);while(i>0);return r}});var $p=de(oo=>{function dq(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}oo.getArg=dq;var r3=function(){return!("__proto__"in Object.create(null))}();function n3(e){return e}function pq(e){return i3(e)?"$"+e:e}oo.toSetString=r3?n3:pq;function gq(e){return i3(e)?e.slice(1):e}oo.fromSetString=r3?n3:gq;function i3(e){if(!e)return!1;let t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(let r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function t3(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function mq(e,t){let r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=t3(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:t3(e.name,t.name)}oo.compareByGeneratedPositionsInflated=mq;var P2="http:",Ph=`${P2}//host`;function s3(e){return t=>{let r=Rh(t),n=R2(t),i=new URL(t,n);e(i);let a=i.toString();return r==="absolute"?a:r==="scheme-relative"?a.slice(P2.length):r==="path-absolute"?a.slice(Ph.length):x2(n,a)}}function uo(e,t){return new URL(e,t).toString()}function vq(e,t){let r=0;do{let n=e+r++;if(t.indexOf(n)===-1)return n}while(!0)}function R2(e){let t=e.split("..").length-1,r=vq("p",e),n=`${Ph}/`;for(let i=0;i<t;i++)n+=`${r}/`;return n}var wq=/^[A-Za-z0-9\+\-\.]+:/;function Rh(e){return e[0]==="/"?e[1]==="/"?"scheme-relative":"path-absolute":wq.test(e)?"absolute":"path-relative"}function x2(e,t){typeof e=="string"&&(e=new URL(e)),typeof t=="string"&&(t=new URL(t));let r=t.pathname.split("/"),n=e.pathname.split("/");for(n.length>0&&!n[n.length-1]&&n.pop();r.length>0&&n.length>0&&r[0]===n[0];)r.shift(),n.shift();return n.map(()=>"..").concat(r).join("/")+t.search+t.hash}var Aq=s3(e=>{e.pathname=e.pathname.replace(/\/?$/,"/")}),Bp=s3(e=>{});oo.normalize=Bp;function Eq(e,t){let r=Rh(t),n=Rh(e);if(e=Aq(e),r==="absolute")return uo(t,void 0);if(n==="absolute")return uo(t,e);if(r==="scheme-relative")return Bp(t);if(n==="scheme-relative")return uo(t,uo(e,Ph)).slice(P2.length);if(r==="path-absolute")return Bp(t);if(n==="path-absolute")return uo(t,uo(e,Ph)).slice(Ph.length);let i=R2(t+e),a=uo(t,uo(e,i));return x2(i,a)}oo.join=Eq;function bq(e,t){let r=yq(e,t);return typeof r=="string"?r:Bp(t)}oo.relative=bq;function yq(e,t){if(Rh(e)!==Rh(t))return null;let n=R2(e+t),i=new URL(e,n),a=new URL(t,n);try{new URL("",a.toString())}catch{return null}return a.protocol!==i.protocol||a.user!==i.user||a.password!==i.password||a.hostname!==i.hostname||a.port!==i.port?null:x2(i,a)}});var u3=de(a3=>{var T2=class e{constructor(){this._array=[],this._set=new Map}static fromArray(t,r){let n=new e;for(let i=0,a=t.length;i<a;i++)n.add(t[i],r);return n}size(){return this._set.size}add(t,r){let n=this.has(t),i=this._array.length;(!n||r)&&this._array.push(t),n||this._set.set(t,i)}has(t){return this._set.has(t)}indexOf(t){let r=this._set.get(t);if(r>=0)return r;throw new Error('"'+t+'" is not in the set.')}at(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)}toArray(){return this._array.slice()}};a3.ArraySet=T2});var c3=de(l3=>{var o3=$p();function _q(e,t){let r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=i||o3.compareByGeneratedPositionsInflated(e,t)<=0}var O2=class{constructor(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(t,r){this._array.forEach(t,r)}add(t){_q(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))}toArray(){return this._sorted||(this._array.sort(o3.compareByGeneratedPositionsInflated),this._sorted=!0),this._array}};l3.MappingList=O2});var k2=de(f3=>{var xh=e3(),Gr=$p(),Pp=u3().ArraySet,Cq=c3().MappingList,Rp=class e{constructor(t){t||(t={}),this._file=Gr.getArg(t,"file",null),this._sourceRoot=Gr.getArg(t,"sourceRoot",null),this._skipValidation=Gr.getArg(t,"skipValidation",!1),this._sources=new Pp,this._names=new Pp,this._mappings=new Cq,this._sourcesContents=null}static fromSourceMap(t){let r=t.sourceRoot,n=new e({file:t.file,sourceRoot:r});return t.eachMapping(function(i){let a={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(a.source=i.source,r!=null&&(a.source=Gr.relative(r,a.source)),a.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(a.name=i.name)),n.addMapping(a)}),t.sources.forEach(function(i){let a=i;r!=null&&(a=Gr.relative(r,i)),n._sources.has(a)||n._sources.add(a);let s=t.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n}addMapping(t){let r=Gr.getArg(t,"generated"),n=Gr.getArg(t,"original",null),i=Gr.getArg(t,"source",null),a=Gr.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,i,a),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),a!=null&&(a=String(a),this._names.has(a)||this._names.add(a)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n&&n.line,originalColumn:n&&n.column,source:i,name:a})}setSourceContent(t,r){let n=t;this._sourceRoot!=null&&(n=Gr.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Gr.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Gr.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))}applySourceMap(t,r,n){let i=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}let a=this._sourceRoot;a!=null&&(i=Gr.relative(a,i));let s=this._mappings.toArray().length>0?new Pp:this._sources,u=new Pp;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){let g=t.originalPositionFor({line:l.originalLine,column:l.originalColumn});g.source!=null&&(l.source=g.source,n!=null&&(l.source=Gr.join(n,l.source)),a!=null&&(l.source=Gr.relative(a,l.source)),l.originalLine=g.line,l.originalColumn=g.column,g.name!=null&&(l.name=g.name))}let f=l.source;f!=null&&!s.has(f)&&s.add(f);let d=l.name;d!=null&&!u.has(d)&&u.add(d)},this),this._sources=s,this._names=u,t.sources.forEach(function(l){let f=t.sourceContentFor(l);f!=null&&(n!=null&&(l=Gr.join(n,l)),a!=null&&(l=Gr.relative(a,l)),this.setSourceContent(l,f))},this)}_validateMapping(t,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(!(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}}_serializeMappings(){let t=0,r=1,n=0,i=0,a=0,s=0,u="",l,f,d,g,p=this._mappings.toArray();for(let h=0,w=p.length;h<w;h++){if(f=p[h],l="",f.generatedLine!==r)for(t=0;f.generatedLine!==r;)l+=";",r++;else if(h>0){if(!Gr.compareByGeneratedPositionsInflated(f,p[h-1]))continue;l+=","}l+=xh.encode(f.generatedColumn-t),t=f.generatedColumn,f.source!=null&&(g=this._sources.indexOf(f.source),l+=xh.encode(g-s),s=g,l+=xh.encode(f.originalLine-1-i),i=f.originalLine-1,l+=xh.encode(f.originalColumn-n),n=f.originalColumn,f.name!=null&&(d=this._names.indexOf(f.name),l+=xh.encode(d-a),a=d)),u+=l}return u}_generateSourcesContent(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Gr.relative(r,n));let i=Gr.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)}toJSON(){let t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t}toString(){return JSON.stringify(this.toJSON())}};Rp.prototype._version=3;f3.SourceMapGenerator=Rp});var d3=de(h3=>{var Dq=k2().SourceMapGenerator,xp=$p(),Fq=/(\r?\n)/,Sq=10,Vc="$$$isSourceNode$$$",N2=class e{constructor(t,r,n,i,a){this.children=[],this.sourceContents={},this.line=t??null,this.column=r??null,this.source=n??null,this.name=a??null,this[Vc]=!0,i!=null&&this.add(i)}static fromStringWithSourceMap(t,r,n){let i=new e,a=t.split(Fq),s=0,u=function(){let h=v(),w=v()||"";return h+w;function v(){return s<a.length?a[s++]:void 0}},l=1,f=0,d=null,g;return r.eachMapping(function(h){if(d!==null)if(l<h.generatedLine)p(d,u()),l++,f=0;else{g=a[s]||"";let w=g.substr(0,h.generatedColumn-f);a[s]=g.substr(h.generatedColumn-f),f=h.generatedColumn,p(d,w),d=h;return}for(;l<h.generatedLine;)i.add(u()),l++;f<h.generatedColumn&&(g=a[s]||"",i.add(g.substr(0,h.generatedColumn)),a[s]=g.substr(h.generatedColumn),f=h.generatedColumn),d=h},this),s<a.length&&(d&&p(d,u()),i.add(a.splice(s).join(""))),r.sources.forEach(function(h){let w=r.sourceContentFor(h);w!=null&&(n!=null&&(h=xp.join(n,h)),i.setSourceContent(h,w))}),i;function p(h,w){if(h===null||h.source===void 0)i.add(w);else{let v=n?xp.join(n,h.source):h.source;i.add(new e(h.originalLine,h.originalColumn,v,w,h.name))}}}add(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[Vc]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this}prepend(t){if(Array.isArray(t))for(let r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[Vc]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this}walk(t){let r;for(let n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Vc]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})}join(t){let r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this}replaceRight(t,r){let n=this.children[this.children.length-1];return n[Vc]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this}setSourceContent(t,r){this.sourceContents[xp.toSetString(t)]=r}walkSourceContents(t){for(let n=0,i=this.children.length;n<i;n++)this.children[n][Vc]&&this.children[n].walkSourceContents(t);let r=Object.keys(this.sourceContents);for(let n=0,i=r.length;n<i;n++)t(xp.fromSetString(r[n]),this.sourceContents[r[n]])}toString(){let t="";return this.walk(function(r){t+=r}),t}toStringWithSourceMap(t){let r={code:"",line:1,column:0},n=new Dq(t),i=!1,a=null,s=null,u=null,l=null;return this.walk(function(f,d){r.code+=f,d.source!==null&&d.line!==null&&d.column!==null?((a!==d.source||s!==d.line||u!==d.column||l!==d.name)&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name}),a=d.source,s=d.line,u=d.column,l=d.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),a=null,i=!1);for(let g=0,p=f.length;g<p;g++)f.charCodeAt(g)===Sq?(r.line++,r.column=0,g+1===p?(a=null,i=!1):i&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})):r.column++}),this.walkSourceContents(function(f,d){n.setSourceContent(f,d)}),{code:r.code,map:n}}};h3.SourceNode=N2});var p3=de(L2=>{L2.SourceMapGenerator=k2().SourceMapGenerator;L2.SourceNode=d3().SourceNode});var w3=de((XX,v3)=>{"use strict";var Iq=ao(),qt=D2(),Bq=KD(),$q=$2(),{stringEscape:Zi,regexpClassEscape:U2}=GD(),{SourceNode:As}=p3();function m3(e,t,r){let n=t.start.line,i=t.start.column-1,a=e.split(`
`);return a.length===1?new As(n,i,t.source,e,r):new As(null,null,t.source,a.map((s,u)=>new As(n+u,u===0?i:0,t.source,u===a.length-1?s:[s,`
`],r)))}function g3(e,t,r,n,i){return r?new As(null,null,r.source,[e,m3(t,r,i),new As(r.end.line,r.end.column-1,r.source,n)]):new As(null,null,null,[e,t,n])}function Pq(e,t){function r(v){return v instanceof As?v:v.replace(/^(.+)$/gm," $1")}function n(v){return"peg$c"+v}function i(v){return"peg$r"+v}function a(v){return"peg$e"+v}function s(v){return"peg$f"+v}function u(v){return"peg$parse"+v}function l(){function v(D){return'"'+Zi(D)+'"'}function y(D){return"/^["+(D.inverted?"^":"")+D.value.map(C=>Array.isArray(C)?U2(C[0])+"-"+U2(C[1]):U2(C)).join("")+"]/"+(D.ignoreCase?"i":"")}function m(D){switch(D.type){case"rule":return'peg$otherExpectation("'+Zi(D.value)+'")';case"literal":return'peg$literalExpectation("'+Zi(D.value)+'", '+D.ignoreCase+")";case"class":return"peg$classExpectation(["+D.value.map(F=>Array.isArray(F)?'["'+Zi(F[0])+'", "'+Zi(F[1])+'"]':'"'+Zi(F)+'"').join(", ")+"], "+D.inverted+", "+D.ignoreCase+")";case"any":return"peg$anyExpectation()";default:throw new Error("Unknown expectation type ("+JSON.stringify(D)+")")}}function b(D,C){return g3(`
var ${s(C)} = function(${D.params.join(", ")}) {`,D.body,D.location,"};")}return new As(null,null,t.grammarSource,[e.literals.map((D,C)=>" var "+n(C)+" = "+v(D)+";").concat("",e.classes.map((D,C)=>" var "+i(C)+" = "+y(D)+";")).concat("",e.expectations.map((D,C)=>" var "+a(C)+" = "+m(D)+";")).concat("").join(`
`),e.functions.map(b)])}function f(v,y){let m=[];return m.push(""),t.trace&&m.push("peg$tracer.trace({",' type: "rule.enter",'," rule: "+v+","," location: peg$computeLocation(startPos, startPos)","});",""),t.cache&&(m.push("var key = peg$currPos * "+e.rules.length+" + "+y+";","var cached = peg$resultsCache[key];","","if (cached) {"," peg$currPos = cached.nextPos;",""),t.trace&&m.push("if (cached.result !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+v+","," result: cached.result,"," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+v+","," location: peg$computeLocation(startPos, startPos)"," });","}",""),m.push(" return cached.result;","}","")),m}function d(v,y){let m=[];return t.cache&&m.push("","peg$resultsCache[key] = { nextPos: peg$currPos, result: "+y+" };"),t.trace&&m.push("","if ("+y+" !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+v+","," result: "+y+","," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+v+","," location: peg$computeLocation(startPos, startPos)"," });","}"),m.push("","return "+y+";"),m}function g(v){let y=[],m=new Bq(v.name,"s","var");function b(C){let F=0,L=C.length,N=[],S;function B(V,Y){let H=Y+3,z=C[F+H-2],W=C[F+H-1],ie,Fe;m.checkedIf(F,()=>{F+=H,ie=b(C.slice(F,F+z)),F+=z},W>0?()=>{Fe=b(C.slice(F,F+W)),F+=W}:null),N.push("if ("+V+") {"),N.push(...ie.map(r)),W>0&&(N.push("} else {"),N.push(...Fe.map(r))),N.push("}")}function T(V){let H=C[F+2-1],z;m.checkedLoop(F,()=>{F+=2,z=b(C.slice(F,F+H)),F+=H}),N.push("while ("+V+") {"),N.push(...z.map(r)),N.push("}")}function U(){let Y=C[F+4-1],H=s(C[F+1])+"("+C.slice(F+4,F+4+Y).map(z=>m.index(z)).join(", ")+")";m.pop(C[F+2]),N.push(m.push(H)),F+=4+Y}for(;F<L;)switch(C[F]){case qt.PUSH_EMPTY_STRING:N.push(m.push("''")),F++;break;case qt.PUSH_CURR_POS:N.push(m.push("peg$currPos")),F++;break;case qt.PUSH_UNDEFINED:N.push(m.push("undefined")),F++;break;case qt.PUSH_NULL:N.push(m.push("null")),F++;break;case qt.PUSH_FAILED:N.push(m.push("peg$FAILED")),F++;break;case qt.PUSH_EMPTY_ARRAY:N.push(m.push("[]")),F++;break;case qt.POP:m.pop(),F++;break;case qt.POP_CURR_POS:N.push("peg$currPos = "+m.pop()+";"),F++;break;case qt.POP_N:m.pop(C[F+1]),F+=2;break;case qt.NIP:S=m.pop(),m.pop(),N.push(m.push(S)),F++;break;case qt.APPEND:S=m.pop(),N.push(m.top()+".push("+S+");"),F++;break;case qt.WRAP:N.push(m.push("["+m.pop(C[F+1]).join(", ")+"]")),F+=2;break;case qt.TEXT:N.push(m.push("input.substring("+m.pop()+", peg$currPos)")),F++;break;case qt.PLUCK:{let Y=C[F+3-1],H=3+Y;S=C.slice(F+3,F+H),S=Y===1?m.index(S[0]):`[ ${S.map(z=>m.index(z)).join(", ")} ]`,m.pop(C[F+1]),N.push(m.push(S)),F+=H;break}case qt.IF:B(m.top(),0);break;case qt.IF_ERROR:B(m.top()+" === peg$FAILED",0);break;case qt.IF_NOT_ERROR:B(m.top()+" !== peg$FAILED",0);break;case qt.WHILE_NOT_ERROR:T(m.top()+" !== peg$FAILED");break;case qt.MATCH_ANY:B("input.length > peg$currPos",0);break;case qt.MATCH_STRING:B(e.literals[C[F+1]].length>1?"input.substr(peg$currPos, "+e.literals[C[F+1]].length+") === "+n(C[F+1]):"input.charCodeAt(peg$currPos) === "+e.literals[C[F+1]].charCodeAt(0),1);break;case qt.MATCH_STRING_IC:B("input.substr(peg$currPos, "+e.literals[C[F+1]].length+").toLowerCase() === "+n(C[F+1]),1);break;case qt.MATCH_CHAR_CLASS:B(i(C[F+1])+".test(input.charAt(peg$currPos))",1);break;case qt.ACCEPT_N:N.push(m.push(C[F+1]>1?"input.substr(peg$currPos, "+C[F+1]+")":"input.charAt(peg$currPos)")),N.push(C[F+1]>1?"peg$currPos += "+C[F+1]+";":"peg$currPos++;"),F+=2;break;case qt.ACCEPT_STRING:N.push(m.push(n(C[F+1]))),N.push(e.literals[C[F+1]].length>1?"peg$currPos += "+e.literals[C[F+1]].length+";":"peg$currPos++;"),F+=2;break;case qt.FAIL:N.push(m.push("peg$FAILED")),N.push("if (peg$silentFails === 0) { peg$fail("+a(C[F+1])+"); }"),F+=2;break;case qt.LOAD_SAVED_POS:N.push("peg$savedPos = "+m.index(C[F+1])+";"),F+=2;break;case qt.UPDATE_SAVED_POS:N.push("peg$savedPos = peg$currPos;"),F++;break;case qt.CALL:U();break;case qt.RULE:N.push(m.push(u(e.rules[C[F+1]].name)+"()")),F+=2;break;case qt.SILENT_FAILS_ON:N.push("peg$silentFails++;"),F++;break;case qt.SILENT_FAILS_OFF:N.push("peg$silentFails--;"),F++;break;default:throw new Error("Invalid opcode: "+C[F]+".")}return N}let D=b(v.bytecode);return y.push(g3(" function ",u(v.name),v.nameLocation,`() {
`,v.name)),t.trace&&y.push(" var startPos = peg$currPos;"),y.push(r(m.defines())),y.push(...f('"'+Zi(v.name)+'"',Iq.indexOfRule(e,v.name)).map(r)),y.push(...D.map(r)),y.push(...d('"'+Zi(v.name)+'"',m.result()).map(r)),y.push("}"),y}function p(v){return v.codeLocation?m3(v.code,v.codeLocation,"$"+v.type):v.code}function h(){let v=[];e.topLevelInitializer&&(v.push(p(e.topLevelInitializer)),v.push("")),v.push("function peg$subclass(child, parent) {"," function C() { this.constructor = child; }"," C.prototype = parent.prototype;"," child.prototype = new C();","}","","function peg$SyntaxError(message, expected, found, location) {"," var self = Error.call(this, message);"," // istanbul ignore next Check is a necessary evil to support older environments"," if (Object.setPrototypeOf) {"," Object.setPrototypeOf(self, peg$SyntaxError.prototype);"," }"," self.expected = expected;"," self.found = found;"," self.location = location;",' self.name = "SyntaxError";'," return self;","}","","peg$subclass(peg$SyntaxError, Error);","","function peg$padEnd(str, targetLength, padString) {",' padString = padString || " ";'," if (str.length > targetLength) { return str; }"," targetLength -= str.length;"," padString += padString.repeat(targetLength);"," return str + padString.slice(0, targetLength);","}","","peg$SyntaxError.prototype.format = function(sources) {",' var str = "Error: " + this.message;'," if (this.location) {"," var src = null;"," var k;"," for (k = 0; k < sources.length; k++) {"," if (sources[k].source === this.location.source) {"," src = sources[k].text.split(/\\r\\n|\\n|\\r/g);"," break;"," }"," }"," var s = this.location.start;",' var loc = this.location.source + ":" + s.line + ":" + s.column;'," if (src) {"," var e = this.location.end;",` var filler = peg$padEnd("", s.line.toString().length, ' ');`," var line = src[s.line - 1];"," var last = s.line === e.line ? e.column : line.length + 1;"," var hatLen = (last - s.column) || 1;",' str += "\\n --> " + loc + "\\n"',' + filler + " |\\n"',' + s.line + " | " + line + "\\n"',` + filler + " | " + peg$padEnd("", s.column - 1, ' ')`,' + peg$padEnd("", hatLen, "^");'," } else {",' str += "\\n at " + loc;'," }"," }"," return str;","};","","peg$SyntaxError.buildMessage = function(expected, found) {"," var DESCRIBE_EXPECTATION_FNS = {"," literal: function(expectation) {",' return "\\"" + literalEscape(expectation.text) + "\\"";'," },",""," class: function(expectation) {"," var escapedParts = expectation.parts.map(function(part) {"," return Array.isArray(part)",' ? classEscape(part[0]) + "-" + classEscape(part[1])'," : classEscape(part);"," });","",' return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]";'," },",""," any: function() {",' return "any character";'," },",""," end: function() {",' return "end of input";'," },",""," other: function(expectation) {"," return expectation.description;"," }"," };",""," function hex(ch) {"," return ch.charCodeAt(0).toString(16).toUpperCase();"," }",""," function literalEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/"/g, "\\\\\\"")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function classEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/\\]/g, "\\\\]")',' .replace(/\\^/g, "\\\\^")',' .replace(/-/g, "\\\\-")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function describeExpectation(expectation) {"," return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);"," }",""," function describeExpected(expected) {"," var descriptions = expected.map(describeExpectation);"," var i, j;",""," descriptions.sort();",""," if (descriptions.length > 0) {"," for (i = 1, j = 1; i < descriptions.length; i++) {"," if (descriptions[i - 1] !== descriptions[i]) {"," descriptions[j] = descriptions[i];"," j++;"," }"," }"," descriptions.length = j;"," }",""," switch (descriptions.length) {"," case 1:"," return descriptions[0];",""," case 2:",' return descriptions[0] + " or " + descriptions[1];',""," default:",' return descriptions.slice(0, -1).join(", ")',' + ", or "'," + descriptions[descriptions.length - 1];"," }"," }",""," function describeFound(found) {",' return found ? "\\"" + literalEscape(found) + "\\"" : "end of input";'," }","",' return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";',"};",""),t.trace&&v.push("function peg$DefaultTracer() {"," this.indentLevel = 0;","}","","peg$DefaultTracer.prototype.trace = function(event) {"," var that = this;",""," function log(event) {"," function repeat(string, n) {",' var result = "", i;',""," for (i = 0; i < n; i++) {"," result += string;"," }",""," return result;"," }",""," function pad(string, length) {",' return string + repeat(" ", length - string.length);'," }","",' if (typeof console === "object") {'," console.log(",' event.location.start.line + ":" + event.location.start.column + "-"',' + event.location.end.line + ":" + event.location.end.column + " "',' + pad(event.type, 10) + " "',' + repeat(" ", that.indentLevel) + event.rule'," );"," }"," }",""," switch (event.type) {",' case "rule.enter":'," log(event);"," this.indentLevel++;"," break;","",' case "rule.match":'," this.indentLevel--;"," log(event);"," break;","",' case "rule.fail":'," this.indentLevel--;"," log(event);"," break;",""," default:",' throw new Error("Invalid event type: " + event.type + ".");'," }","};","");let y="{ "+t.allowedStartRules.map(b=>b+": "+u(b)).join(", ")+" }",m=u(t.allowedStartRules[0]);return v.push("function peg$parse(input, options) {"," options = options !== undefined ? options : {};",""," var peg$FAILED = {};"," var peg$source = options.grammarSource;",""," var peg$startRuleFunctions = "+y+";"," var peg$startRuleFunction = "+m+";","",l(),""," var peg$currPos = 0;"," var peg$savedPos = 0;"," var peg$posDetailsCache = [{ line: 1, column: 1 }];"," var peg$maxFailPos = 0;"," var peg$maxFailExpected = [];"," var peg$silentFails = 0;",""),t.cache&&v.push(" var peg$resultsCache = {};",""),t.trace&&v.push(' var peg$tracer = "tracer" in options ? options.tracer : new peg$DefaultTracer();',""),v.push(" var peg$result;","",' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleFunctions)) {",` throw new Error("Can't start parsing from rule \\"" + options.startRule + "\\".");`," }",""," peg$startRuleFunction = peg$startRuleFunctions[options.startRule];"," }",""," function text() {"," return input.substring(peg$savedPos, peg$currPos);"," }",""," function offset() {"," return peg$savedPos;"," }",""," function range() {"," return {"," source: peg$source,"," start: peg$savedPos,"," end: peg$currPos"," };"," }",""," function location() {"," return peg$computeLocation(peg$savedPos, peg$currPos);"," }",""," function expected(description, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildStructuredError("," [peg$otherExpectation(description)],"," input.substring(peg$savedPos, peg$currPos),"," location"," );"," }",""," function error(message, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildSimpleError(message, location);"," }",""," function peg$literalExpectation(text, ignoreCase) {",' return { type: "literal", text: text, ignoreCase: ignoreCase };'," }",""," function peg$classExpectation(parts, inverted, ignoreCase) {",' return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };'," }",""," function peg$anyExpectation() {",' return { type: "any" };'," }",""," function peg$endExpectation() {",' return { type: "end" };'," }",""," function peg$otherExpectation(description) {",' return { type: "other", description: description };'," }",""," function peg$computePosDetails(pos) {"," var details = peg$posDetailsCache[pos];"," var p;",""," if (details) {"," return details;"," } else {"," p = pos - 1;"," while (!peg$posDetailsCache[p]) {"," p--;"," }",""," details = peg$posDetailsCache[p];"," details = {"," line: details.line,"," column: details.column"," };",""," while (p < pos) {"," if (input.charCodeAt(p) === 10) {"," details.line++;"," details.column = 1;"," } else {"," details.column++;"," }",""," p++;"," }",""," peg$posDetailsCache[pos] = details;",""," return details;"," }"," }",""," function peg$computeLocation(startPos, endPos) {"," var startPosDetails = peg$computePosDetails(startPos);"," var endPosDetails = peg$computePosDetails(endPos);",""," return {"," source: peg$source,"," start: {"," offset: startPos,"," line: startPosDetails.line,"," column: startPosDetails.column"," },"," end: {"," offset: endPos,"," line: endPosDetails.line,"," column: endPosDetails.column"," }"," };"," }",""," function peg$fail(expected) {"," if (peg$currPos < peg$maxFailPos) { return; }",""," if (peg$currPos > peg$maxFailPos) {"," peg$maxFailPos = peg$currPos;"," peg$maxFailExpected = [];"," }",""," peg$maxFailExpected.push(expected);"," }",""," function peg$buildSimpleError(message, location) {"," return new peg$SyntaxError(message, null, null, location);"," }",""," function peg$buildStructuredError(expected, found, location) {"," return new peg$SyntaxError("," peg$SyntaxError.buildMessage(expected, found),"," expected,"," found,"," location"," );"," }",""),e.rules.forEach(b=>{v.push(...g(b).map(r)),v.push("")}),e.initializer&&(v.push(p(e.initializer)),v.push("")),v.push(" peg$result = peg$startRuleFunction();",""," if (peg$result !== peg$FAILED && peg$currPos === input.length) {"," return peg$result;"," } else {"," if (peg$result !== peg$FAILED && peg$currPos < input.length) {"," peg$fail(peg$endExpectation());"," }",""," throw peg$buildStructuredError("," peg$maxFailExpected,"," peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,"," peg$maxFailPos < input.length"," ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)"," : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)"," );"," }","}"),new As(null,null,t.grammarSource,v.map(b=>b instanceof As?b:b+`
`))}function w(v){function y(){return[`// Generated by Peggy ${$q}.`,"//","// https://peggyjs.org/"]}function m(){return t.trace?["{"," SyntaxError: peg$SyntaxError,"," DefaultTracer: peg$DefaultTracer,"," parse: peg$parse","}"].join(`
`):["{"," SyntaxError: peg$SyntaxError,"," parse: peg$parse","}"].join(`
`)}let D={bare(){return[...y(),"(function() {",' "use strict";',"",v,"",r("return "+m()+";"),"})()"]},commonjs(){let C=Object.keys(t.dependencies),F=y();return F.push("",'"use strict";',""),C.length>0&&(C.forEach(L=>{F.push("var "+L+' = require("'+Zi(t.dependencies[L])+'");')}),F.push("")),F.push(v,"","module.exports = "+m()+";"),F},es(){let C=Object.keys(t.dependencies),F=y();return F.push(""),C.length>0&&(C.forEach(L=>{F.push("import "+L+' from "'+Zi(t.dependencies[L])+'";')}),F.push("")),F.push(v,"","export {"," peg$SyntaxError as SyntaxError,",t.trace?" peg$DefaultTracer as DefaultTracer,":""," peg$parse as parse","};"),F},amd(){let C=Object.keys(t.dependencies),L="["+C.map(S=>t.dependencies[S]).map(S=>'"'+Zi(S)+'"').join(", ")+"]",N=C.join(", ");return[...y(),"define("+L+", function("+N+") {",' "use strict";',"",v,"",r("return "+m()+";"),"});"]},globals(){return[...y(),"(function(root) {",' "use strict";',"",v,"",r("root."+t.exportVar+" = "+m()+";"),"})(this);"]},umd(){let C=Object.keys(t.dependencies),F=C.map(T=>t.dependencies[T]),L="["+F.map(T=>'"'+Zi(T)+'"').join(", ")+"]",N=F.map(T=>'require("'+Zi(T)+'")').join(", "),S=C.join(", "),B=y();return B.push("(function(root, factory) {",' if (typeof define === "function" && define.amd) {'," define("+L+", factory);",' } else if (typeof module === "object" && module.exports) {'," module.exports = factory("+N+");"),t.exportVar!==null&&B.push(" } else {"," root."+t.exportVar+" = factory();"),B.push(" }","})(this, function("+S+") {",' "use strict";',"",v,"",r("return "+m()+";"),"});"),B}}[t.format]();return new As(null,null,t.grammarSource,D.map(C=>C instanceof As?C:C+`
`))}e.code=w(h())}v3.exports=Pq});var E3=de((JX,A3)=>{"use strict";var Rq=ao(),xq=ws();function Tq(e,t,r){function n(s){return s.type==="rule"&&s.expression.type==="rule_ref"}function i(s,u,l){xq.build({rule_ref(d){d.name===u&&(d.name=l,r.info(`Proxy rule "${u}" replaced by the rule "${l}"`,d.location,[{message:"This rule will be used",location:Rq.findRule(s,l).nameLocation}]))}})(s)}let a=[];e.rules.forEach((s,u)=>{n(s)&&(i(e,s.name,s.expression.name),t.allowedStartRules.indexOf(s.name)===-1&&a.push(u))}),a.reverse(),a.forEach(s=>{e.rules.splice(s,1)})}A3.exports=Tq});var y3=de((ZX,b3)=>{"use strict";var Oq=ws();function kq(e,t,r){function n(s){let u={};return Object.keys(s).forEach(l=>{u[l]=s[l]}),u}function i(s,u){a(s.expression,n(u))}let a=Oq.build({rule(s){a(s.expression,{})},choice(s,u){s.alternatives.forEach(l=>{a(l,n(u))})},action:i,labeled(s,u){let l=s.label;l&&Object.prototype.hasOwnProperty.call(u,l)&&r.error(`Label "${s.label}" is already defined`,s.labelLocation,[{message:"Original label location",location:u[l]}]),a(s.expression,u),u[s.label]=s.labelLocation},text:i,simple_and:i,simple_not:i,optional:i,zero_or_more:i,one_or_more:i,group:i});a(e)}b3.exports=kq});var C3=de((QX,_3)=>{"use strict";var Nq=ws();function Lq(e,t,r){let n={};Nq.build({rule(a){if(Object.prototype.hasOwnProperty.call(n,a.name)){r.error(`Rule "${a.name}" is already defined`,a.nameLocation,[{message:"Original rule location",location:n[a.name]}]);return}n[a.name]=a.nameLocation}})(e)}_3.exports=Lq});var S3=de((eJ,F3)=>{"use strict";var D3=ao(),Uq=ws();function jq(e,t,r){let n=[],i=[],a=Uq.build({rule(s){n.push(s.name),a(s.expression),n.pop()},sequence(s){s.elements.every(u=>(a(u),!D3.alwaysConsumesOnSuccess(e,u)))},rule_ref(s){i.push(s);let u=D3.findRule(e,s.name);if(n.indexOf(s.name)!==-1){n.push(s.name),r.error("Possible infinite loop when parsing (left recursion: "+n.join(" -> ")+")",u.nameLocation,i.map((l,f,d)=>({message:f+1!==d.length?`Step ${f+1}: call of the rule "${l.name}" without input consumption`:`Step ${f+1}: call itself without input consumption - left recursion`,location:l.location})));return}u&&a(u),i.pop()}});a(e)}F3.exports=jq});var $3=de((tJ,B3)=>{"use strict";var I3=ao(),Hq=ws();function Mq(e,t,r){Hq.build({zero_or_more(i){I3.alwaysConsumesOnSuccess(e,i.expression)||r.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input)",i.location)},one_or_more(i){I3.alwaysConsumesOnSuccess(e,i.expression)||r.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input)",i.location)}})(e)}B3.exports=Mq});var R3=de((rJ,P3)=>{"use strict";var qq=ao(),Vq=ws();function Kq(e,t,r){Vq.build({rule_ref(i){qq.findRule(e,i.name)||r.error(`Rule "${i.name}" is not defined`,i.location)}})(e)}P3.exports=Kq});var T3=de((nJ,x3)=>{"use strict";var zq=ws();function Gq(e,t,r){let n=zq.build({action(i){n(i.expression,i)},labeled(i,a){i.pick&&a&&r.error('"@" cannot be used with an action block',i.labelLocation,[{message:"Action block location",location:a.codeLocation}]),n(i.expression)}});n(e)}x3.exports=Gq});var k3=de((iJ,O3)=>{"use strict";var Yq=Fp(),j2=class{constructor(t){t=typeof t<"u"?t:{},typeof t.error=="function"&&(this.error=t.error),typeof t.warning=="function"&&(this.warning=t.warning),typeof t.info=="function"&&(this.info=t.info)}error(){}warning(){}info(){}},H2=class{constructor(t){this._callbacks=new j2(t),this._firstError=null,this.errors=0,this.problems=[],this.stage=null}error(...t){++this.errors,this._firstError===null&&(this._firstError=new Yq(...t),this._firstError.stage=this.stage,this._firstError.problems=this.problems),this.problems.push(["error",...t]),this._callbacks.error(this.stage,...t)}warning(...t){this.problems.push(["warning",...t]),this._callbacks.warning(this.stage,...t)}info(...t){this.problems.push(["info",...t]),this._callbacks.info(this.stage,...t)}checkErrors(){if(this.errors!==0)throw this._firstError}};O3.exports=H2});var N3=de((exports,module)=>{"use strict";var generateBytecode=qD(),generateJS=w3(),inferenceMatchResult=F2(),removeProxyRules=E3(),reportDuplicateLabels=y3(),reportDuplicateRules=C3(),reportInfiniteRecursion=S3(),reportInfiniteRepetition=$3(),reportUndefinedRules=R3(),reportIncorrectPlucking=T3(),Session=k3(),visitor=ws();function processOptions(e,t){let r={};return Object.keys(e).forEach(n=>{r[n]=e[n]}),Object.keys(t).forEach(n=>{Object.prototype.hasOwnProperty.call(r,n)||(r[n]=t[n])}),r}var compiler={visitor,passes:{check:[reportUndefinedRules,reportDuplicateRules,reportDuplicateLabels,reportInfiniteRecursion,reportInfiniteRepetition,reportIncorrectPlucking],transform:[removeProxyRules,inferenceMatchResult],generate:[generateBytecode,generateJS]},compile(ast,passes,options){if(options=options!==void 0?options:{},options=processOptions(options,{allowedStartRules:[ast.rules[0].name],cache:!1,dependencies:{},exportVar:null,format:"bare",output:"parser",trace:!1}),!Array.isArray(options.allowedStartRules))throw new Error("allowedStartRules must be an array");if(options.allowedStartRules.length===0)throw new Error("Must have at least one start rule");let allRules=ast.rules.map(e=>e.name);for(let e of options.allowedStartRules)if(allRules.indexOf(e)===-1)throw new Error(`Unknown start rule "${e}"`);let session=new Session(options);switch(Object.keys(passes).forEach(e=>{session.stage=e,session.info(`Process stage ${e}`),passes[e].forEach(t=>{session.info(`Process pass ${e}.${t.name}`),t(ast,options,session)}),session.checkErrors()}),options.output){case"parser":return eval(ast.code.toString());case"source":return ast.code.toString();case"source-and-map":return ast.code;default:throw new Error("Invalid output format: "+options.output+".")}}};module.exports=compiler});var U3=de((sJ,L3)=>{"use strict";var Wq={$:"text","&":"simple_and","!":"simple_not"},Xq={"?":"optional","*":"zero_or_more","+":"one_or_more"},Jq={"&":"semantic_and","!":"semantic_not"};function Zq(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function lo(e,t,r,n){var i=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(i,lo.prototype),i.expected=t,i.found=r,i.location=n,i.name="SyntaxError",i}Zq(lo,Error);function M2(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}lo.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r=null,n;for(n=0;n<e.length;n++)if(e[n].source===this.location.source){r=e[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,a=this.location.source+":"+i.line+":"+i.column;if(r){var s=this.location.end,u=M2("",i.line.toString().length," "),l=r[i.line-1],f=i.line===s.line?s.column:l.length+1,d=f-i.column||1;t+=`
--> `+a+`
`+u+` |
`+i.line+" | "+l+`
`+u+" | "+M2("",i.column-1," ")+M2("",d,"^")}else t+=`
at `+a}return t};lo.buildMessage=function(e,t){var r={literal:function(f){return'"'+i(f.text)+'"'},class:function(f){var d=f.parts.map(function(g){return Array.isArray(g)?a(g[0])+"-"+a(g[1]):a(g)});return"["+(f.inverted?"^":"")+d.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(f){return f.description}};function n(f){return f.charCodeAt(0).toString(16).toUpperCase()}function i(f){return f.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(d){return"\\x0"+n(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+n(d)})}function a(f){return f.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(d){return"\\x0"+n(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+n(d)})}function s(f){return r[f.type](f)}function u(f){var d=f.map(s),g,p;if(d.sort(),d.length>0){for(g=1,p=1;g<d.length;g++)d[g-1]!==d[g]&&(d[p]=d[g],p++);d.length=p}switch(d.length){case 1:return d[0];case 2:return d[0]+" or "+d[1];default:return d.slice(0,-1).join(", ")+", or "+d[d.length-1]}}function l(f){return f?'"'+i(f)+'"':"end of input"}return"Expected "+u(e)+" but "+l(t)+" found."};function Qq(e,t){t=t!==void 0?t:{};var r={},n=t.grammarSource,i={Grammar:vl},a=vl,s="{",u="}",l="=",f="/",d="@",g=":",p="$",h="&",w="!",v="?",y="*",m="+",b="(",D=")",C=" ",F="\v",L="\f",N=" ",S="\xA0",B="\uFEFF",T=`
`,U=`\r
`,V="\r",Y="\u2028",H="\u2029",z="/*",W="*/",ie="//",Fe="_",Se="\\",Re="\u200C",Je="\u200D",ue="i",Ce='"',Ue="'",or="[",$t="^",_t="]",Dr="-",cr="0",ht="b",Xt="f",st="n",Ye="r",fr="t",Me="v",Nt="x",dn="u",ir=".",Jt=";",vt=/^[\n\r\u2028\u2029]/,Ur=/^[0-9]/,Ri=/^[0-9a-f]/i,pn=/^[{}]/,Dt=/^[a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137-\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148-\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C-\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA-\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9-\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC-\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF-\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F-\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0-\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB-\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE-\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6-\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FC7\u1FD0-\u1FD3\u1FD6-\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6-\u1FF7\u210A\u210E-\u210F\u2113\u212F\u2134\u2139\u213C-\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65-\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73-\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3-\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]/,je=/^[\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5-\u06E6\u07F4-\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C-\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D-\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C-\uA69D\uA717-\uA71F\uA770\uA788\uA7F8-\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3-\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E-\uFF9F]/,Ie=/^[\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\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\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\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\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A-\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\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\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,Fr=/^[\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC]/,gn=/^[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178-\u0179\u017B\u017D\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018B\u018E-\u0191\u0193-\u0194\u0196-\u0198\u019C-\u019D\u019F-\u01A0\u01A2\u01A4\u01A6-\u01A7\u01A9\u01AC\u01AE-\u01AF\u01B1-\u01B3\u01B5\u01B7-\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A-\u023B\u023D-\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E-\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9-\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0-\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E-\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D-\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A]/,at=/^[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E-\u094F\u0982-\u0983\u09BE-\u09C0\u09C7-\u09C8\u09CB-\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB-\u0ACC\u0B02-\u0B03\u0B3E\u0B40\u0B47-\u0B48\u0B4B-\u0B4C\u0B57\u0BBE-\u0BBF\u0BC1-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82-\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7-\u0CC8\u0CCA-\u0CCB\u0CD5-\u0CD6\u0D02-\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82-\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2-\u0DF3\u0F3E-\u0F3F\u0F7F\u102B-\u102C\u1031\u1038\u103B-\u103C\u1056-\u1057\u1062-\u1064\u1067-\u106D\u1083-\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7-\u17C8\u1923-\u1926\u1929-\u192B\u1930-\u1931\u1933-\u1938\u1A19-\u1A1A\u1A55\u1A57\u1A61\u1A63-\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B44\u1B82\u1BA1\u1BA6-\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2-\u1BF3\u1C24-\u1C2B\u1C34-\u1C35\u1CE1\u1CF2-\u1CF3\u302E-\u302F\uA823-\uA824\uA827\uA880-\uA881\uA8B4-\uA8C3\uA952-\uA953\uA983\uA9B4-\uA9B5\uA9BA-\uA9BB\uA9BD-\uA9C0\uAA2F-\uAA30\uAA33-\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE-\uAAEF\uAAF5\uABE3-\uABE4\uABE6-\uABE7\uABE9-\uABEA\uABEC]/,Pa=/^[\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962-\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2-\u09E3\u0A01-\u0A02\u0A3C\u0A41-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A70-\u0A71\u0A75\u0A81-\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7-\u0AC8\u0ACD\u0AE2-\u0AE3\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62-\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC-\u0CCD\u0CE2-\u0CE3\u0D01\u0D41-\u0D44\u0D4D\u0D62-\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039-\u103A\u103D-\u103E\u1058-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193B\u1A17-\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80-\u1B81\u1BA2-\u1BA5\u1BA8-\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8-\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099-\u309A\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA825-\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31-\uAA32\uAA35-\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEC-\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/,mn=/^[0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]/,me=/^[\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF]/,js=/^[_\u203F-\u2040\u2054\uFE33-\uFE34\uFE4D-\uFE4F\uFF3F]/,Pt=/^[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,rn=We("{",!1),Es=We("}",!1),Du=We("=",!1),Hs=We("/",!1),Fu=We("@",!1),Ms=We(":",!1),bs=We("$",!1),Lt=We("&",!1),li=We("!",!1),Su=We("?",!1),Iu=We("*",!1),Bu=We("+",!1),qs=We("(",!1),co=We(")",!1),Vs=Ru(),fo=rs("whitespace"),Ra=We(" ",!1),re=We("\v",!1),fe=We("\f",!1),Le=We(" ",!1),ke=We("\xA0",!1),Ke=We("\uFEFF",!1),ut=Mr([`
`,"\r","\u2028","\u2029"],!1,!1),ft=rs("end of line"),Or=We(`
`,!1),Vt=We(`\r
`,!1),ci=We("\r",!1),es=We("\u2028",!1),vn=We("\u2029",!1),Pn=rs("comment"),Sr=We("/*",!1),wn=We("*/",!1),Yr=We("//",!1),ho=rs("identifier"),Ks=We("_",!1),Kn=We("\\",!1),kt=We("\u200C",!1),Ir=We("\u200D",!1),rt=rs("literal"),hr=We("i",!1),nn=rs("string"),dr=We('"',!1),Kt=We("'",!1),zn=rs("character class"),fi=We("[",!1),hi=We("^",!1),Gn=We("]",!1),jr=We("-",!1),mr=We("0",!1),Kc=We("b",!1),po=We("f",!1),sn=We("n",!1),go=We("r",!1),pl=We("t",!1),gl=We("v",!1),mo=We("x",!1),zs=We("u",!1),vo=Mr([["0","9"]],!1,!1),ml=Mr([["0","9"],["a","f"]],!1,!0),wo=We(".",!1),Ao=rs("code block"),Yn=Mr(["{","}"],!1,!1),R=Mr([["a","z"],"\xB5",["\xDF","\xF6"],["\xF8","\xFF"],"\u0101","\u0103","\u0105","\u0107","\u0109","\u010B","\u010D","\u010F","\u0111","\u0113","\u0115","\u0117","\u0119","\u011B","\u011D","\u011F","\u0121","\u0123","\u0125","\u0127","\u0129","\u012B","\u012D","\u012F","\u0131","\u0133","\u0135",["\u0137","\u0138"],"\u013A","\u013C","\u013E","\u0140","\u0142","\u0144","\u0146",["\u0148","\u0149"],"\u014B","\u014D","\u014F","\u0151","\u0153","\u0155","\u0157","\u0159","\u015B","\u015D","\u015F","\u0161","\u0163","\u0165","\u0167","\u0169","\u016B","\u016D","\u016F","\u0171","\u0173","\u0175","\u0177","\u017A","\u017C",["\u017E","\u0180"],"\u0183","\u0185","\u0188",["\u018C","\u018D"],"\u0192","\u0195",["\u0199","\u019B"],"\u019E","\u01A1","\u01A3","\u01A5","\u01A8",["\u01AA","\u01AB"],"\u01AD","\u01B0","\u01B4","\u01B6",["\u01B9","\u01BA"],["\u01BD","\u01BF"],"\u01C6","\u01C9","\u01CC","\u01CE","\u01D0","\u01D2","\u01D4","\u01D6","\u01D8","\u01DA",["\u01DC","\u01DD"],"\u01DF","\u01E1","\u01E3","\u01E5","\u01E7","\u01E9","\u01EB","\u01ED",["\u01EF","\u01F0"],"\u01F3","\u01F5","\u01F9","\u01FB","\u01FD","\u01FF","\u0201","\u0203","\u0205","\u0207","\u0209","\u020B","\u020D","\u020F","\u0211","\u0213","\u0215","\u0217","\u0219","\u021B","\u021D","\u021F","\u0221","\u0223","\u0225","\u0227","\u0229","\u022B","\u022D","\u022F","\u0231",["\u0233","\u0239"],"\u023C",["\u023F","\u0240"],"\u0242","\u0247","\u0249","\u024B","\u024D",["\u024F","\u0293"],["\u0295","\u02AF"],"\u0371","\u0373","\u0377",["\u037B","\u037D"],"\u0390",["\u03AC","\u03CE"],["\u03D0","\u03D1"],["\u03D5","\u03D7"],"\u03D9","\u03DB","\u03DD","\u03DF","\u03E1","\u03E3","\u03E5","\u03E7","\u03E9","\u03EB","\u03ED",["\u03EF","\u03F3"],"\u03F5","\u03F8",["\u03FB","\u03FC"],["\u0430","\u045F"],"\u0461","\u0463","\u0465","\u0467","\u0469","\u046B","\u046D","\u046F","\u0471","\u0473","\u0475","\u0477","\u0479","\u047B","\u047D","\u047F","\u0481","\u048B","\u048D","\u048F","\u0491","\u0493","\u0495","\u0497","\u0499","\u049B","\u049D","\u049F","\u04A1","\u04A3","\u04A5","\u04A7","\u04A9","\u04AB","\u04AD","\u04AF","\u04B1","\u04B3","\u04B5","\u04B7","\u04B9","\u04BB","\u04BD","\u04BF","\u04C2","\u04C4","\u04C6","\u04C8","\u04CA","\u04CC",["\u04CE","\u04CF"],"\u04D1","\u04D3","\u04D5","\u04D7","\u04D9","\u04DB","\u04DD","\u04DF","\u04E1","\u04E3","\u04E5","\u04E7","\u04E9","\u04EB","\u04ED","\u04EF","\u04F1","\u04F3","\u04F5","\u04F7","\u04F9","\u04FB","\u04FD","\u04FF","\u0501","\u0503","\u0505","\u0507","\u0509","\u050B","\u050D","\u050F","\u0511","\u0513","\u0515","\u0517","\u0519","\u051B","\u051D","\u051F","\u0521","\u0523","\u0525","\u0527","\u0529","\u052B","\u052D","\u052F",["\u0561","\u0587"],["\u13F8","\u13FD"],["\u1D00","\u1D2B"],["\u1D6B","\u1D77"],["\u1D79","\u1D9A"],"\u1E01","\u1E03","\u1E05","\u1E07","\u1E09","\u1E0B","\u1E0D","\u1E0F","\u1E11","\u1E13","\u1E15","\u1E17","\u1E19","\u1E1B","\u1E1D","\u1E1F","\u1E21","\u1E23","\u1E25","\u1E27","\u1E29","\u1E2B","\u1E2D","\u1E2F","\u1E31","\u1E33","\u1E35","\u1E37","\u1E39","\u1E3B","\u1E3D","\u1E3F","\u1E41","\u1E43","\u1E45","\u1E47","\u1E49","\u1E4B","\u1E4D","\u1E4F","\u1E51","\u1E53","\u1E55","\u1E57","\u1E59","\u1E5B","\u1E5D","\u1E5F","\u1E61","\u1E63","\u1E65","\u1E67","\u1E69","\u1E6B","\u1E6D","\u1E6F","\u1E71","\u1E73","\u1E75","\u1E77","\u1E79","\u1E7B","\u1E7D","\u1E7F","\u1E81","\u1E83","\u1E85","\u1E87","\u1E89","\u1E8B","\u1E8D","\u1E8F","\u1E91","\u1E93",["\u1E95","\u1E9D"],"\u1E9F","\u1EA1","\u1EA3","\u1EA5","\u1EA7","\u1EA9","\u1EAB","\u1EAD","\u1EAF","\u1EB1","\u1EB3","\u1EB5","\u1EB7","\u1EB9","\u1EBB","\u1EBD","\u1EBF","\u1EC1","\u1EC3","\u1EC5","\u1EC7","\u1EC9","\u1ECB","\u1ECD","\u1ECF","\u1ED1","\u1ED3","\u1ED5","\u1ED7","\u1ED9","\u1EDB","\u1EDD","\u1EDF","\u1EE1","\u1EE3","\u1EE5","\u1EE7","\u1EE9","\u1EEB","\u1EED","\u1EEF","\u1EF1","\u1EF3","\u1EF5","\u1EF7","\u1EF9","\u1EFB","\u1EFD",["\u1EFF","\u1F07"],["\u1F10","\u1F15"],["\u1F20","\u1F27"],["\u1F30","\u1F37"],["\u1F40","\u1F45"],["\u1F50","\u1F57"],["\u1F60","\u1F67"],["\u1F70","\u1F7D"],["\u1F80","\u1F87"],["\u1F90","\u1F97"],["\u1FA0","\u1FA7"],["\u1FB0","\u1FB4"],["\u1FB6","\u1FB7"],"\u1FBE",["\u1FC2","\u1FC4"],["\u1FC6","\u1FC7"],["\u1FD0","\u1FD3"],["\u1FD6","\u1FD7"],["\u1FE0","\u1FE7"],["\u1FF2","\u1FF4"],["\u1FF6","\u1FF7"],"\u210A",["\u210E","\u210F"],"\u2113","\u212F","\u2134","\u2139",["\u213C","\u213D"],["\u2146","\u2149"],"\u214E","\u2184",["\u2C30","\u2C5E"],"\u2C61",["\u2C65","\u2C66"],"\u2C68","\u2C6A","\u2C6C","\u2C71",["\u2C73","\u2C74"],["\u2C76","\u2C7B"],"\u2C81","\u2C83","\u2C85","\u2C87","\u2C89","\u2C8B","\u2C8D","\u2C8F","\u2C91","\u2C93","\u2C95","\u2C97","\u2C99","\u2C9B","\u2C9D","\u2C9F","\u2CA1","\u2CA3","\u2CA5","\u2CA7","\u2CA9","\u2CAB","\u2CAD","\u2CAF","\u2CB1","\u2CB3","\u2CB5","\u2CB7","\u2CB9","\u2CBB","\u2CBD","\u2CBF","\u2CC1","\u2CC3","\u2CC5","\u2CC7","\u2CC9","\u2CCB","\u2CCD","\u2CCF","\u2CD1","\u2CD3","\u2CD5","\u2CD7","\u2CD9","\u2CDB","\u2CDD","\u2CDF","\u2CE1",["\u2CE3","\u2CE4"],"\u2CEC","\u2CEE","\u2CF3",["\u2D00","\u2D25"],"\u2D27","\u2D2D","\uA641","\uA643","\uA645","\uA647","\uA649","\uA64B","\uA64D","\uA64F","\uA651","\uA653","\uA655","\uA657","\uA659","\uA65B","\uA65D","\uA65F","\uA661","\uA663","\uA665","\uA667","\uA669","\uA66B","\uA66D","\uA681","\uA683","\uA685","\uA687","\uA689","\uA68B","\uA68D","\uA68F","\uA691","\uA693","\uA695","\uA697","\uA699","\uA69B","\uA723","\uA725","\uA727","\uA729","\uA72B","\uA72D",["\uA72F","\uA731"],"\uA733","\uA735","\uA737","\uA739","\uA73B","\uA73D","\uA73F","\uA741","\uA743","\uA745","\uA747","\uA749","\uA74B","\uA74D","\uA74F","\uA751","\uA753","\uA755","\uA757","\uA759","\uA75B","\uA75D","\uA75F","\uA761","\uA763","\uA765","\uA767","\uA769","\uA76B","\uA76D","\uA76F",["\uA771","\uA778"],"\uA77A","\uA77C","\uA77F","\uA781","\uA783","\uA785","\uA787","\uA78C","\uA78E","\uA791",["\uA793","\uA795"],"\uA797","\uA799","\uA79B","\uA79D","\uA79F","\uA7A1","\uA7A3","\uA7A5","\uA7A7","\uA7A9","\uA7B5","\uA7B7","\uA7FA",["\uAB30","\uAB5A"],["\uAB60","\uAB65"],["\uAB70","\uABBF"],["\uFB00","\uFB06"],["\uFB13","\uFB17"],["\uFF41","\uFF5A"]],!1,!1),k=Mr([["\u02B0","\u02C1"],["\u02C6","\u02D1"],["\u02E0","\u02E4"],"\u02EC","\u02EE","\u0374","\u037A","\u0559","\u0640",["\u06E5","\u06E6"],["\u07F4","\u07F5"],"\u07FA","\u081A","\u0824","\u0828","\u0971","\u0E46","\u0EC6","\u10FC","\u17D7","\u1843","\u1AA7",["\u1C78","\u1C7D"],["\u1D2C","\u1D6A"],"\u1D78",["\u1D9B","\u1DBF"],"\u2071","\u207F",["\u2090","\u209C"],["\u2C7C","\u2C7D"],"\u2D6F","\u2E2F","\u3005",["\u3031","\u3035"],"\u303B",["\u309D","\u309E"],["\u30FC","\u30FE"],"\uA015",["\uA4F8","\uA4FD"],"\uA60C","\uA67F",["\uA69C","\uA69D"],["\uA717","\uA71F"],"\uA770","\uA788",["\uA7F8","\uA7F9"],"\uA9CF","\uA9E6","\uAA70","\uAADD",["\uAAF3","\uAAF4"],["\uAB5C","\uAB5F"],"\uFF70",["\uFF9E","\uFF9F"]],!1,!1),K=Mr(["\xAA","\xBA","\u01BB",["\u01C0","\u01C3"],"\u0294",["\u05D0","\u05EA"],["\u05F0","\u05F2"],["\u0620","\u063F"],["\u0641","\u064A"],["\u066E","\u066F"],["\u0671","\u06D3"],"\u06D5",["\u06EE","\u06EF"],["\u06FA","\u06FC"],"\u06FF","\u0710",["\u0712","\u072F"],["\u074D","\u07A5"],"\u07B1",["\u07CA","\u07EA"],["\u0800","\u0815"],["\u0840","\u0858"],["\u08A0","\u08B4"],["\u0904","\u0939"],"\u093D","\u0950",["\u0958","\u0961"],["\u0972","\u0980"],["\u0985","\u098C"],["\u098F","\u0990"],["\u0993","\u09A8"],["\u09AA","\u09B0"],"\u09B2",["\u09B6","\u09B9"],"\u09BD","\u09CE",["\u09DC","\u09DD"],["\u09DF","\u09E1"],["\u09F0","\u09F1"],["\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"],["\u0C60","\u0C61"],["\u0C85","\u0C8C"],["\u0C8E","\u0C90"],["\u0C92","\u0CA8"],["\u0CAA","\u0CB3"],["\u0CB5","\u0CB9"],"\u0CBD","\u0CDE",["\u0CE0","\u0CE1"],["\u0CF1","\u0CF2"],["\u0D05","\u0D0C"],["\u0D0E","\u0D10"],["\u0D12","\u0D3A"],"\u0D3D","\u0D4E",["\u0D5F","\u0D61"],["\u0D7A","\u0D7F"],["\u0D85","\u0D96"],["\u0D9A","\u0DB1"],["\u0DB3","\u0DBB"],"\u0DBD",["\u0DC0","\u0DC6"],["\u0E01","\u0E30"],["\u0E32","\u0E33"],["\u0E40","\u0E45"],["\u0E81","\u0E82"],"\u0E84",["\u0E87","\u0E88"],"\u0E8A","\u0E8D",["\u0E94","\u0E97"],["\u0E99","\u0E9F"],["\u0EA1","\u0EA3"],"\u0EA5","\u0EA7",["\u0EAA","\u0EAB"],["\u0EAD","\u0EB0"],["\u0EB2","\u0EB3"],"\u0EBD",["\u0EC0","\u0EC4"],["\u0EDC","\u0EDF"],"\u0F00",["\u0F40","\u0F47"],["\u0F49","\u0F6C"],["\u0F88","\u0F8C"],["\u1000","\u102A"],"\u103F",["\u1050","\u1055"],["\u105A","\u105D"],"\u1061",["\u1065","\u1066"],["\u106E","\u1070"],["\u1075","\u1081"],"\u108E",["\u10D0","\u10FA"],["\u10FD","\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"],["\u1401","\u166C"],["\u166F","\u167F"],["\u1681","\u169A"],["\u16A0","\u16EA"],["\u16F1","\u16F8"],["\u1700","\u170C"],["\u170E","\u1711"],["\u1720","\u1731"],["\u1740","\u1751"],["\u1760","\u176C"],["\u176E","\u1770"],["\u1780","\u17B3"],"\u17DC",["\u1820","\u1842"],["\u1844","\u1877"],["\u1880","\u18A8"],"\u18AA",["\u18B0","\u18F5"],["\u1900","\u191E"],["\u1950","\u196D"],["\u1970","\u1974"],["\u1980","\u19AB"],["\u19B0","\u19C9"],["\u1A00","\u1A16"],["\u1A20","\u1A54"],["\u1B05","\u1B33"],["\u1B45","\u1B4B"],["\u1B83","\u1BA0"],["\u1BAE","\u1BAF"],["\u1BBA","\u1BE5"],["\u1C00","\u1C23"],["\u1C4D","\u1C4F"],["\u1C5A","\u1C77"],["\u1CE9","\u1CEC"],["\u1CEE","\u1CF1"],["\u1CF5","\u1CF6"],["\u2135","\u2138"],["\u2D30","\u2D67"],["\u2D80","\u2D96"],["\u2DA0","\u2DA6"],["\u2DA8","\u2DAE"],["\u2DB0","\u2DB6"],["\u2DB8","\u2DBE"],["\u2DC0","\u2DC6"],["\u2DC8","\u2DCE"],["\u2DD0","\u2DD6"],["\u2DD8","\u2DDE"],"\u3006","\u303C",["\u3041","\u3096"],"\u309F",["\u30A1","\u30FA"],"\u30FF",["\u3105","\u312D"],["\u3131","\u318E"],["\u31A0","\u31BA"],["\u31F0","\u31FF"],["\u3400","\u4DB5"],["\u4E00","\u9FD5"],["\uA000","\uA014"],["\uA016","\uA48C"],["\uA4D0","\uA4F7"],["\uA500","\uA60B"],["\uA610","\uA61F"],["\uA62A","\uA62B"],"\uA66E",["\uA6A0","\uA6E5"],"\uA78F","\uA7F7",["\uA7FB","\uA801"],["\uA803","\uA805"],["\uA807","\uA80A"],["\uA80C","\uA822"],["\uA840","\uA873"],["\uA882","\uA8B3"],["\uA8F2","\uA8F7"],"\uA8FB","\uA8FD",["\uA90A","\uA925"],["\uA930","\uA946"],["\uA960","\uA97C"],["\uA984","\uA9B2"],["\uA9E0","\uA9E4"],["\uA9E7","\uA9EF"],["\uA9FA","\uA9FE"],["\uAA00","\uAA28"],["\uAA40","\uAA42"],["\uAA44","\uAA4B"],["\uAA60","\uAA6F"],["\uAA71","\uAA76"],"\uAA7A",["\uAA7E","\uAAAF"],"\uAAB1",["\uAAB5","\uAAB6"],["\uAAB9","\uAABD"],"\uAAC0","\uAAC2",["\uAADB","\uAADC"],["\uAAE0","\uAAEA"],"\uAAF2",["\uAB01","\uAB06"],["\uAB09","\uAB0E"],["\uAB11","\uAB16"],["\uAB20","\uAB26"],["\uAB28","\uAB2E"],["\uABC0","\uABE2"],["\uAC00","\uD7A3"],["\uD7B0","\uD7C6"],["\uD7CB","\uD7FB"],["\uF900","\uFA6D"],["\uFA70","\uFAD9"],"\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"],["\uFF66","\uFF6F"],["\uFF71","\uFF9D"],["\uFFA0","\uFFBE"],["\uFFC2","\uFFC7"],["\uFFCA","\uFFCF"],["\uFFD2","\uFFD7"],["\uFFDA","\uFFDC"]],!1,!1),Q=Mr(["\u01C5","\u01C8","\u01CB","\u01F2",["\u1F88","\u1F8F"],["\u1F98","\u1F9F"],["\u1FA8","\u1FAF"],"\u1FBC","\u1FCC","\u1FFC"],!1,!1),we=Mr([["A","Z"],["\xC0","\xD6"],["\xD8","\xDE"],"\u0100","\u0102","\u0104","\u0106","\u0108","\u010A","\u010C","\u010E","\u0110","\u0112","\u0114","\u0116","\u0118","\u011A","\u011C","\u011E","\u0120","\u0122","\u0124","\u0126","\u0128","\u012A","\u012C","\u012E","\u0130","\u0132","\u0134","\u0136","\u0139","\u013B","\u013D","\u013F","\u0141","\u0143","\u0145","\u0147","\u014A","\u014C","\u014E","\u0150","\u0152","\u0154","\u0156","\u0158","\u015A","\u015C","\u015E","\u0160","\u0162","\u0164","\u0166","\u0168","\u016A","\u016C","\u016E","\u0170","\u0172","\u0174","\u0176",["\u0178","\u0179"],"\u017B","\u017D",["\u0181","\u0182"],"\u0184",["\u0186","\u0187"],["\u0189","\u018B"],["\u018E","\u0191"],["\u0193","\u0194"],["\u0196","\u0198"],["\u019C","\u019D"],["\u019F","\u01A0"],"\u01A2","\u01A4",["\u01A6","\u01A7"],"\u01A9","\u01AC",["\u01AE","\u01AF"],["\u01B1","\u01B3"],"\u01B5",["\u01B7","\u01B8"],"\u01BC","\u01C4","\u01C7","\u01CA","\u01CD","\u01CF","\u01D1","\u01D3","\u01D5","\u01D7","\u01D9","\u01DB","\u01DE","\u01E0","\u01E2","\u01E4","\u01E6","\u01E8","\u01EA","\u01EC","\u01EE","\u01F1","\u01F4",["\u01F6","\u01F8"],"\u01FA","\u01FC","\u01FE","\u0200","\u0202","\u0204","\u0206","\u0208","\u020A","\u020C","\u020E","\u0210","\u0212","\u0214","\u0216","\u0218","\u021A","\u021C","\u021E","\u0220","\u0222","\u0224","\u0226","\u0228","\u022A","\u022C","\u022E","\u0230","\u0232",["\u023A","\u023B"],["\u023D","\u023E"],"\u0241",["\u0243","\u0246"],"\u0248","\u024A","\u024C","\u024E","\u0370","\u0372","\u0376","\u037F","\u0386",["\u0388","\u038A"],"\u038C",["\u038E","\u038F"],["\u0391","\u03A1"],["\u03A3","\u03AB"],"\u03CF",["\u03D2","\u03D4"],"\u03D8","\u03DA","\u03DC","\u03DE","\u03E0","\u03E2","\u03E4","\u03E6","\u03E8","\u03EA","\u03EC","\u03EE","\u03F4","\u03F7",["\u03F9","\u03FA"],["\u03FD","\u042F"],"\u0460","\u0462","\u0464","\u0466","\u0468","\u046A","\u046C","\u046E","\u0470","\u0472","\u0474","\u0476","\u0478","\u047A","\u047C","\u047E","\u0480","\u048A","\u048C","\u048E","\u0490","\u0492","\u0494","\u0496","\u0498","\u049A","\u049C","\u049E","\u04A0","\u04A2","\u04A4","\u04A6","\u04A8","\u04AA","\u04AC","\u04AE","\u04B0","\u04B2","\u04B4","\u04B6","\u04B8","\u04BA","\u04BC","\u04BE",["\u04C0","\u04C1"],"\u04C3","\u04C5","\u04C7","\u04C9","\u04CB","\u04CD","\u04D0","\u04D2","\u04D4","\u04D6","\u04D8","\u04DA","\u04DC","\u04DE","\u04E0","\u04E2","\u04E4","\u04E6","\u04E8","\u04EA","\u04EC","\u04EE","\u04F0","\u04F2","\u04F4","\u04F6","\u04F8","\u04FA","\u04FC","\u04FE","\u0500","\u0502","\u0504","\u0506","\u0508","\u050A","\u050C","\u050E","\u0510","\u0512","\u0514","\u0516","\u0518","\u051A","\u051C","\u051E","\u0520","\u0522","\u0524","\u0526","\u0528","\u052A","\u052C","\u052E",["\u0531","\u0556"],["\u10A0","\u10C5"],"\u10C7","\u10CD",["\u13A0","\u13F5"],"\u1E00","\u1E02","\u1E04","\u1E06","\u1E08","\u1E0A","\u1E0C","\u1E0E","\u1E10","\u1E12","\u1E14","\u1E16","\u1E18","\u1E1A","\u1E1C","\u1E1E","\u1E20","\u1E22","\u1E24","\u1E26","\u1E28","\u1E2A","\u1E2C","\u1E2E","\u1E30","\u1E32","\u1E34","\u1E36","\u1E38","\u1E3A","\u1E3C","\u1E3E","\u1E40","\u1E42","\u1E44","\u1E46","\u1E48","\u1E4A","\u1E4C","\u1E4E","\u1E50","\u1E52","\u1E54","\u1E56","\u1E58","\u1E5A","\u1E5C","\u1E5E","\u1E60","\u1E62","\u1E64","\u1E66","\u1E68","\u1E6A","\u1E6C","\u1E6E","\u1E70","\u1E72","\u1E74","\u1E76","\u1E78","\u1E7A","\u1E7C","\u1E7E","\u1E80","\u1E82","\u1E84","\u1E86","\u1E88","\u1E8A","\u1E8C","\u1E8E","\u1E90","\u1E92","\u1E94","\u1E9E","\u1EA0","\u1EA2","\u1EA4","\u1EA6","\u1EA8","\u1EAA","\u1EAC","\u1EAE","\u1EB0","\u1EB2","\u1EB4","\u1EB6","\u1EB8","\u1EBA","\u1EBC","\u1EBE","\u1EC0","\u1EC2","\u1EC4","\u1EC6","\u1EC8","\u1ECA","\u1ECC","\u1ECE","\u1ED0","\u1ED2","\u1ED4","\u1ED6","\u1ED8","\u1EDA","\u1EDC","\u1EDE","\u1EE0","\u1EE2","\u1EE4","\u1EE6","\u1EE8","\u1EEA","\u1EEC","\u1EEE","\u1EF0","\u1EF2","\u1EF4","\u1EF6","\u1EF8","\u1EFA","\u1EFC","\u1EFE",["\u1F08","\u1F0F"],["\u1F18","\u1F1D"],["\u1F28","\u1F2F"],["\u1F38","\u1F3F"],["\u1F48","\u1F4D"],"\u1F59","\u1F5B","\u1F5D","\u1F5F",["\u1F68","\u1F6F"],["\u1FB8","\u1FBB"],["\u1FC8","\u1FCB"],["\u1FD8","\u1FDB"],["\u1FE8","\u1FEC"],["\u1FF8","\u1FFB"],"\u2102","\u2107",["\u210B","\u210D"],["\u2110","\u2112"],"\u2115",["\u2119","\u211D"],"\u2124","\u2126","\u2128",["\u212A","\u212D"],["\u2130","\u2133"],["\u213E","\u213F"],"\u2145","\u2183",["\u2C00","\u2C2E"],"\u2C60",["\u2C62","\u2C64"],"\u2C67","\u2C69","\u2C6B",["\u2C6D","\u2C70"],"\u2C72","\u2C75",["\u2C7E","\u2C80"],"\u2C82","\u2C84","\u2C86","\u2C88","\u2C8A","\u2C8C","\u2C8E","\u2C90","\u2C92","\u2C94","\u2C96","\u2C98","\u2C9A","\u2C9C","\u2C9E","\u2CA0","\u2CA2","\u2CA4","\u2CA6","\u2CA8","\u2CAA","\u2CAC","\u2CAE","\u2CB0","\u2CB2","\u2CB4","\u2CB6","\u2CB8","\u2CBA","\u2CBC","\u2CBE","\u2CC0","\u2CC2","\u2CC4","\u2CC6","\u2CC8","\u2CCA","\u2CCC","\u2CCE","\u2CD0","\u2CD2","\u2CD4","\u2CD6","\u2CD8","\u2CDA","\u2CDC","\u2CDE","\u2CE0","\u2CE2","\u2CEB","\u2CED","\u2CF2","\uA640","\uA642","\uA644","\uA646","\uA648","\uA64A","\uA64C","\uA64E","\uA650","\uA652","\uA654","\uA656","\uA658","\uA65A","\uA65C","\uA65E","\uA660","\uA662","\uA664","\uA666","\uA668","\uA66A","\uA66C","\uA680","\uA682","\uA684","\uA686","\uA688","\uA68A","\uA68C","\uA68E","\uA690","\uA692","\uA694","\uA696","\uA698","\uA69A","\uA722","\uA724","\uA726","\uA728","\uA72A","\uA72C","\uA72E","\uA732","\uA734","\uA736","\uA738","\uA73A","\uA73C","\uA73E","\uA740","\uA742","\uA744","\uA746","\uA748","\uA74A","\uA74C","\uA74E","\uA750","\uA752","\uA754","\uA756","\uA758","\uA75A","\uA75C","\uA75E","\uA760","\uA762","\uA764","\uA766","\uA768","\uA76A","\uA76C","\uA76E","\uA779","\uA77B",["\uA77D","\uA77E"],"\uA780","\uA782","\uA784","\uA786","\uA78B","\uA78D","\uA790","\uA792","\uA796","\uA798","\uA79A","\uA79C","\uA79E","\uA7A0","\uA7A2","\uA7A4","\uA7A6","\uA7A8",["\uA7AA","\uA7AD"],["\uA7B0","\uA7B4"],"\uA7B6",["\uFF21","\uFF3A"]],!1,!1),be=Mr(["\u0903","\u093B",["\u093E","\u0940"],["\u0949","\u094C"],["\u094E","\u094F"],["\u0982","\u0983"],["\u09BE","\u09C0"],["\u09C7","\u09C8"],["\u09CB","\u09CC"],"\u09D7","\u0A03",["\u0A3E","\u0A40"],"\u0A83",["\u0ABE","\u0AC0"],"\u0AC9",["\u0ACB","\u0ACC"],["\u0B02","\u0B03"],"\u0B3E","\u0B40",["\u0B47","\u0B48"],["\u0B4B","\u0B4C"],"\u0B57",["\u0BBE","\u0BBF"],["\u0BC1","\u0BC2"],["\u0BC6","\u0BC8"],["\u0BCA","\u0BCC"],"\u0BD7",["\u0C01","\u0C03"],["\u0C41","\u0C44"],["\u0C82","\u0C83"],"\u0CBE",["\u0CC0","\u0CC4"],["\u0CC7","\u0CC8"],["\u0CCA","\u0CCB"],["\u0CD5","\u0CD6"],["\u0D02","\u0D03"],["\u0D3E","\u0D40"],["\u0D46","\u0D48"],["\u0D4A","\u0D4C"],"\u0D57",["\u0D82","\u0D83"],["\u0DCF","\u0DD1"],["\u0DD8","\u0DDF"],["\u0DF2","\u0DF3"],["\u0F3E","\u0F3F"],"\u0F7F",["\u102B","\u102C"],"\u1031","\u1038",["\u103B","\u103C"],["\u1056","\u1057"],["\u1062","\u1064"],["\u1067","\u106D"],["\u1083","\u1084"],["\u1087","\u108C"],"\u108F",["\u109A","\u109C"],"\u17B6",["\u17BE","\u17C5"],["\u17C7","\u17C8"],["\u1923","\u1926"],["\u1929","\u192B"],["\u1930","\u1931"],["\u1933","\u1938"],["\u1A19","\u1A1A"],"\u1A55","\u1A57","\u1A61",["\u1A63","\u1A64"],["\u1A6D","\u1A72"],"\u1B04","\u1B35","\u1B3B",["\u1B3D","\u1B41"],["\u1B43","\u1B44"],"\u1B82","\u1BA1",["\u1BA6","\u1BA7"],"\u1BAA","\u1BE7",["\u1BEA","\u1BEC"],"\u1BEE",["\u1BF2","\u1BF3"],["\u1C24","\u1C2B"],["\u1C34","\u1C35"],"\u1CE1",["\u1CF2","\u1CF3"],["\u302E","\u302F"],["\uA823","\uA824"],"\uA827",["\uA880","\uA881"],["\uA8B4","\uA8C3"],["\uA952","\uA953"],"\uA983",["\uA9B4","\uA9B5"],["\uA9BA","\uA9BB"],["\uA9BD","\uA9C0"],["\uAA2F","\uAA30"],["\uAA33","\uAA34"],"\uAA4D","\uAA7B","\uAA7D","\uAAEB",["\uAAEE","\uAAEF"],"\uAAF5",["\uABE3","\uABE4"],["\uABE6","\uABE7"],["\uABE9","\uABEA"],"\uABEC"],!1,!1),$e=Mr([["\u0300","\u036F"],["\u0483","\u0487"],["\u0591","\u05BD"],"\u05BF",["\u05C1","\u05C2"],["\u05C4","\u05C5"],"\u05C7",["\u0610","\u061A"],["\u064B","\u065F"],"\u0670",["\u06D6","\u06DC"],["\u06DF","\u06E4"],["\u06E7","\u06E8"],["\u06EA","\u06ED"],"\u0711",["\u0730","\u074A"],["\u07A6","\u07B0"],["\u07EB","\u07F3"],["\u0816","\u0819"],["\u081B","\u0823"],["\u0825","\u0827"],["\u0829","\u082D"],["\u0859","\u085B"],["\u08E3","\u0902"],"\u093A","\u093C",["\u0941","\u0948"],"\u094D",["\u0951","\u0957"],["\u0962","\u0963"],"\u0981","\u09BC",["\u09C1","\u09C4"],"\u09CD",["\u09E2","\u09E3"],["\u0A01","\u0A02"],"\u0A3C",["\u0A41","\u0A42"],["\u0A47","\u0A48"],["\u0A4B","\u0A4D"],"\u0A51",["\u0A70","\u0A71"],"\u0A75",["\u0A81","\u0A82"],"\u0ABC",["\u0AC1","\u0AC5"],["\u0AC7","\u0AC8"],"\u0ACD",["\u0AE2","\u0AE3"],"\u0B01","\u0B3C","\u0B3F",["\u0B41","\u0B44"],"\u0B4D","\u0B56",["\u0B62","\u0B63"],"\u0B82","\u0BC0","\u0BCD","\u0C00",["\u0C3E","\u0C40"],["\u0C46","\u0C48"],["\u0C4A","\u0C4D"],["\u0C55","\u0C56"],["\u0C62","\u0C63"],"\u0C81","\u0CBC","\u0CBF","\u0CC6",["\u0CCC","\u0CCD"],["\u0CE2","\u0CE3"],"\u0D01",["\u0D41","\u0D44"],"\u0D4D",["\u0D62","\u0D63"],"\u0DCA",["\u0DD2","\u0DD4"],"\u0DD6","\u0E31",["\u0E34","\u0E3A"],["\u0E47","\u0E4E"],"\u0EB1",["\u0EB4","\u0EB9"],["\u0EBB","\u0EBC"],["\u0EC8","\u0ECD"],["\u0F18","\u0F19"],"\u0F35","\u0F37","\u0F39",["\u0F71","\u0F7E"],["\u0F80","\u0F84"],["\u0F86","\u0F87"],["\u0F8D","\u0F97"],["\u0F99","\u0FBC"],"\u0FC6",["\u102D","\u1030"],["\u1032","\u1037"],["\u1039","\u103A"],["\u103D","\u103E"],["\u1058","\u1059"],["\u105E","\u1060"],["\u1071","\u1074"],"\u1082",["\u1085","\u1086"],"\u108D","\u109D",["\u135D","\u135F"],["\u1712","\u1714"],["\u1732","\u1734"],["\u1752","\u1753"],["\u1772","\u1773"],["\u17B4","\u17B5"],["\u17B7","\u17BD"],"\u17C6",["\u17C9","\u17D3"],"\u17DD",["\u180B","\u180D"],"\u18A9",["\u1920","\u1922"],["\u1927","\u1928"],"\u1932",["\u1939","\u193B"],["\u1A17","\u1A18"],"\u1A1B","\u1A56",["\u1A58","\u1A5E"],"\u1A60","\u1A62",["\u1A65","\u1A6C"],["\u1A73","\u1A7C"],"\u1A7F",["\u1AB0","\u1ABD"],["\u1B00","\u1B03"],"\u1B34",["\u1B36","\u1B3A"],"\u1B3C","\u1B42",["\u1B6B","\u1B73"],["\u1B80","\u1B81"],["\u1BA2","\u1BA5"],["\u1BA8","\u1BA9"],["\u1BAB","\u1BAD"],"\u1BE6",["\u1BE8","\u1BE9"],"\u1BED",["\u1BEF","\u1BF1"],["\u1C2C","\u1C33"],["\u1C36","\u1C37"],["\u1CD0","\u1CD2"],["\u1CD4","\u1CE0"],["\u1CE2","\u1CE8"],"\u1CED","\u1CF4",["\u1CF8","\u1CF9"],["\u1DC0","\u1DF5"],["\u1DFC","\u1DFF"],["\u20D0","\u20DC"],"\u20E1",["\u20E5","\u20F0"],["\u2CEF","\u2CF1"],"\u2D7F",["\u2DE0","\u2DFF"],["\u302A","\u302D"],["\u3099","\u309A"],"\uA66F",["\uA674","\uA67D"],["\uA69E","\uA69F"],["\uA6F0","\uA6F1"],"\uA802","\uA806","\uA80B",["\uA825","\uA826"],"\uA8C4",["\uA8E0","\uA8F1"],["\uA926","\uA92D"],["\uA947","\uA951"],["\uA980","\uA982"],"\uA9B3",["\uA9B6","\uA9B9"],"\uA9BC","\uA9E5",["\uAA29","\uAA2E"],["\uAA31","\uAA32"],["\uAA35","\uAA36"],"\uAA43","\uAA4C","\uAA7C","\uAAB0",["\uAAB2","\uAAB4"],["\uAAB7","\uAAB8"],["\uAABE","\uAABF"],"\uAAC1",["\uAAEC","\uAAED"],"\uAAF6","\uABE5","\uABE8","\uABED","\uFB1E",["\uFE00","\uFE0F"],["\uFE20","\uFE2F"]],!1,!1),Oe=Mr([["0","9"],["\u0660","\u0669"],["\u06F0","\u06F9"],["\u07C0","\u07C9"],["\u0966","\u096F"],["\u09E6","\u09EF"],["\u0A66","\u0A6F"],["\u0AE6","\u0AEF"],["\u0B66","\u0B6F"],["\u0BE6","\u0BEF"],["\u0C66","\u0C6F"],["\u0CE6","\u0CEF"],["\u0D66","\u0D6F"],["\u0DE6","\u0DEF"],["\u0E50","\u0E59"],["\u0ED0","\u0ED9"],["\u0F20","\u0F29"],["\u1040","\u1049"],["\u1090","\u1099"],["\u17E0","\u17E9"],["\u1810","\u1819"],["\u1946","\u194F"],["\u19D0","\u19D9"],["\u1A80","\u1A89"],["\u1A90","\u1A99"],["\u1B50","\u1B59"],["\u1BB0","\u1BB9"],["\u1C40","\u1C49"],["\u1C50","\u1C59"],["\uA620","\uA629"],["\uA8D0","\uA8D9"],["\uA900","\uA909"],["\uA9D0","\uA9D9"],["\uA9F0","\uA9F9"],["\uAA50","\uAA59"],["\uABF0","\uABF9"],["\uFF10","\uFF19"]],!1,!1),Zt=Mr([["\u16EE","\u16F0"],["\u2160","\u2182"],["\u2185","\u2188"],"\u3007",["\u3021","\u3029"],["\u3038","\u303A"],["\uA6E6","\uA6EF"]],!1,!1),Br=Mr(["_",["\u203F","\u2040"],"\u2054",["\uFE33","\uFE34"],["\uFE4D","\uFE4F"],"\uFF3F"],!1,!1),An=Mr([" ","\xA0","\u1680",["\u2000","\u200A"],"\u202F","\u205F","\u3000"],!1,!1),En=We(";",!1),xi=function(_,j,J){return{type:"grammar",topLevelInitializer:_,initializer:j,rules:J,location:Ar()}},$u=function(_){return{type:"top_level_initializer",code:_[0],codeLocation:_[1],location:Ar()}},Wn=function(_){return{type:"initializer",code:_[0],codeLocation:_[1],location:Ar()}},bn=function(_,j,J){return{type:"rule",name:_[0],nameLocation:_[1],expression:j!==null?{type:"named",name:j,expression:J,location:Ar()}:J,location:Ar()}},Pu=function(_,j){return j.length>0?{type:"choice",alternatives:[_].concat(j),location:Ar()}:_},ts=function(_,j){return j!==null?{type:"action",expression:_,code:j[0],codeLocation:j[1],location:Ar()}:_},Eo=function(_,j){return j.length>0||_.type==="labeled"&&_.pick?{type:"sequence",elements:[_].concat(j),location:Ar()}:_},kp=function(_,j,J){return J.type.startsWith("semantic_")&&Wc('"@" cannot be used on a semantic predicate',_),{type:"labeled",label:j!==null?j[0]:null,labelLocation:j!==null?j[1]:_,pick:!0,expression:J,location:Ar()}},Np=function(_,j){return{type:"labeled",label:_[0],labelLocation:_[1],expression:j,location:Ar()}},sr=function(){return Ar()},tr=function(_){return Bl.indexOf(_[0])>=0&&Wc(`Label can't be a reserved word "${_[0]}"`,_[1]),_},Lp=function(_,j){return{type:Wq[_],expression:j,location:Ar()}},Up=function(_,j){return{type:Xq[j],expression:_,location:Ar()}},jp=function(_){return _.type==="labeled"||_.type==="sequence"?{type:"group",expression:_,location:Ar()}:_},Hp=function(_){return{type:"rule_ref",name:_[0],location:Ar()}},Mp=function(_,j){return{type:Jq[_],code:j[0],codeLocation:j[1],location:Ar()}},qp=function(_,j){return[_+j.join(""),Ar()]},kh=function(_,j){return{type:"literal",value:_,ignoreCase:j!==null,location:Ar()}},Vp=function(_){return _.join("")},Hr=function(_){return _.join("")},zc=function(_,j,J){return{type:"class",parts:j.filter(G=>G!==""),inverted:_!==null,ignoreCase:J!==null,location:Ar()}},xa=function(_,j){return _.charCodeAt(0)>j.charCodeAt(0)&&Wc("Invalid character range: "+Yc()+"."),[_,j]},Nh=function(){return""},Gc=function(){return"\0"},di=function(){return"\b"},Lh=function(){return"\f"},Uh=function(){return`
`},jh=function(){return"\r"},Hh=function(){return" "},Mh=function(){return"\v"},qh=function(_){return String.fromCharCode(parseInt(_,16))},Xn=function(_){return String.fromCharCode(parseInt(_,16))},Kp=function(){return{type:"any",location:Ar()}},pi=function(_){return[_,Ar()]},P=0,ot=0,Ti=[{line:1,column:1}],Jn=0,bo=[],te=0,Oi;if("startRule"in t){if(!(t.startRule in i))throw new Error(`Can't start parsing from rule "`+t.startRule+'".');a=i[t.startRule]}function Yc(){return e.substring(ot,P)}function nw(){return ot}function Vh(){return{source:n,start:ot,end:P}}function Ar(){return Ta(ot,P)}function iw(_,j){throw j=j!==void 0?j:Ta(ot,P),zh([rs(_)],e.substring(ot,P),j)}function Wc(_,j){throw j=j!==void 0?j:Ta(ot,P),Kh(_,j)}function We(_,j){return{type:"literal",text:_,ignoreCase:j}}function Mr(_,j,J){return{type:"class",parts:_,inverted:j,ignoreCase:J}}function Ru(){return{type:"any"}}function zp(){return{type:"end"}}function rs(_){return{type:"other",description:_}}function Xc(_){var j=Ti[_],J;if(j)return j;for(J=_-1;!Ti[J];)J--;for(j=Ti[J],j={line:j.line,column:j.column};J<_;)e.charCodeAt(J)===10?(j.line++,j.column=1):j.column++,J++;return Ti[_]=j,j}function Ta(_,j){var J=Xc(_),G=Xc(j);return{source:n,start:{offset:_,line:J.line,column:J.column},end:{offset:j,line:G.line,column:G.column}}}function ve(_){P<Jn||(P>Jn&&(Jn=P,bo=[]),bo.push(_))}function Kh(_,j){return new lo(_,null,null,j)}function zh(_,j,J){return new lo(lo.buildMessage(_,j),_,j,J)}function vl(){var _,j,J,G,ae,ce,er,$r;if(_=P,j=jt(),J=P,G=Jc(),G!==r?(ae=jt(),J=G):(P=J,J=r),J===r&&(J=null),G=P,ae=Gp(),ae!==r?(ce=jt(),G=ae):(P=G,G=r),G===r&&(G=null),ae=[],ce=P,er=Zc(),er!==r?($r=jt(),ce=er):(P=ce,ce=r),ce!==r)for(;ce!==r;)ae.push(ce),ce=P,er=Zc(),er!==r?($r=jt(),ce=er):(P=ce,ce=r);else ae=r;return ae!==r?(ot=_,_=xi(J,G,ae)):(P=_,_=r),_}function Jc(){var _,j,J,G,ae;return _=P,e.charCodeAt(P)===123?(j=s,P++):(j=r,te===0&&ve(rn)),j!==r?(J=Rt(),J!==r?(e.charCodeAt(P)===125?(G=u,P++):(G=r,te===0&&ve(Es)),G!==r?(ae=La(),ae!==r?(ot=_,_=$u(J)):(P=_,_=r)):(P=_,_=r)):(P=_,_=r)):(P=_,_=r),_}function Gp(){var _,j,J;return _=P,j=Rt(),j!==r?(J=La(),J!==r?(ot=_,_=Wn(j)):(P=_,_=r)):(P=_,_=r),_}function Zc(){var _,j,J,G,ae,ce,er,$r;return _=P,j=El(),j!==r?(J=jt(),G=P,ae=ns(),ae!==r?(ce=jt(),G=ae):(P=G,G=r),G===r&&(G=null),e.charCodeAt(P)===61?(ae=l,P++):(ae=r,te===0&&ve(Du)),ae!==r?(ce=jt(),er=Rn(),er!==r?($r=La(),$r!==r?(ot=_,_=bn(j,G,er)):(P=_,_=r)):(P=_,_=r)):(P=_,_=r)):(P=_,_=r),_}function Rn(){var _,j,J,G,ae,ce,er,$r;if(_=P,j=yo(),j!==r){for(J=[],G=P,ae=jt(),e.charCodeAt(P)===47?(ce=f,P++):(ce=r,te===0&&ve(Hs)),ce!==r?(er=jt(),$r=yo(),$r!==r?G=$r:(P=G,G=r)):(P=G,G=r);G!==r;)J.push(G),G=P,ae=jt(),e.charCodeAt(P)===47?(ce=f,P++):(ce=r,te===0&&ve(Hs)),ce!==r?(er=jt(),$r=yo(),$r!==r?G=$r:(P=G,G=r)):(P=G,G=r);ot=_,_=Pu(j,J)}else P=_,_=r;return _}function yo(){var _,j,J,G,ae;return _=P,j=_o(),j!==r?(J=P,G=jt(),ae=Rt(),ae!==r?J=ae:(P=J,J=r),J===r&&(J=null),ot=_,_=ts(j,J)):(P=_,_=r),_}function _o(){var _,j,J,G,ae,ce;if(_=P,j=wl(),j!==r){for(J=[],G=P,ae=jt(),ce=wl(),ce!==r?G=ce:(P=G,G=r);G!==r;)J.push(G),G=P,ae=jt(),ce=wl(),ce!==r?G=ce:(P=G,G=r);ot=_,_=Eo(j,J)}else P=_,_=r;return _}function wl(){var _,j,J,G;return _=P,j=Gh(),j!==r?(J=Yh(),J===r&&(J=null),G=Qc(),G!==r?(ot=_,_=kp(j,J,G)):(P=_,_=r)):(P=_,_=r),_===r&&(_=P,j=Yh(),j!==r?(J=jt(),G=Qc(),G!==r?(ot=_,_=Np(j,G)):(P=_,_=r)):(P=_,_=r),_===r&&(_=Qc())),_}function Gh(){var _,j;return _=P,e.charCodeAt(P)===64?(j=d,P++):(j=r,te===0&&ve(Fu)),j!==r&&(ot=_,j=sr()),_=j,_}function Yh(){var _,j,J,G;return _=P,j=El(),j!==r?(J=jt(),e.charCodeAt(P)===58?(G=g,P++):(G=r,te===0&&ve(Ms)),G!==r?(ot=_,_=tr(j)):(P=_,_=r)):(P=_,_=r),_}function Qc(){var _,j,J,G;return _=P,j=Yp(),j!==r?(J=jt(),G=Wh(),G!==r?(ot=_,_=Lp(j,G)):(P=_,_=r)):(P=_,_=r),_===r&&(_=Wh()),_}function Yp(){var _;return e.charCodeAt(P)===36?(_=p,P++):(_=r,te===0&&ve(bs)),_===r&&(e.charCodeAt(P)===38?(_=h,P++):(_=r,te===0&&ve(Lt)),_===r&&(e.charCodeAt(P)===33?(_=w,P++):(_=r,te===0&&ve(li)))),_}function Wh(){var _,j,J,G;return _=P,j=Oa(),j!==r?(J=jt(),G=Wp(),G!==r?(ot=_,_=Up(j,G)):(P=_,_=r)):(P=_,_=r),_===r&&(_=Oa()),_}function Wp(){var _;return e.charCodeAt(P)===63?(_=v,P++):(_=r,te===0&&ve(Su)),_===r&&(e.charCodeAt(P)===42?(_=y,P++):(_=r,te===0&&ve(Iu)),_===r&&(e.charCodeAt(P)===43?(_=m,P++):(_=r,te===0&&ve(Bu)))),_}function Oa(){var _,j,J,G,ae,ce;return _=t1(),_===r&&(_=le(),_===r&&(_=_l(),_===r&&(_=Xp(),_===r&&(_=Jp(),_===r&&(_=P,e.charCodeAt(P)===40?(j=b,P++):(j=r,te===0&&ve(qs)),j!==r?(J=jt(),G=Rn(),G!==r?(ae=jt(),e.charCodeAt(P)===41?(ce=D,P++):(ce=r,te===0&&ve(co)),ce!==r?(ot=_,_=jp(G)):(P=_,_=r)):(P=_,_=r)):(P=_,_=r)))))),_}function Xp(){var _,j,J,G,ae,ce,er,$r;return _=P,j=El(),j!==r?(J=P,te++,G=P,ae=jt(),ce=P,er=ns(),er!==r?($r=jt(),er=[er,$r],ce=er):(P=ce,ce=r),ce===r&&(ce=null),e.charCodeAt(P)===61?(er=l,P++):(er=r,te===0&&ve(Du)),er!==r?(ae=[ae,ce,er],G=ae):(P=G,G=r),te--,G===r?J=void 0:(P=J,J=r),J!==r?(ot=_,_=Hp(j)):(P=_,_=r)):(P=_,_=r),_}function Jp(){var _,j,J,G;return _=P,j=ef(),j!==r?(J=jt(),G=Rt(),G!==r?(ot=_,_=Mp(j,G)):(P=_,_=r)):(P=_,_=r),_}function ef(){var _;return e.charCodeAt(P)===38?(_=h,P++):(_=r,te===0&&ve(Lt)),_===r&&(e.charCodeAt(P)===33?(_=w,P++):(_=r,te===0&&ve(li))),_}function yn(){var _;return e.length>P?(_=e.charAt(P),P++):(_=r,te===0&&ve(Vs)),_}function ki(){var _,j;return te++,e.charCodeAt(P)===9?(_=C,P++):(_=r,te===0&&ve(Ra)),_===r&&(e.charCodeAt(P)===11?(_=F,P++):(_=r,te===0&&ve(re)),_===r&&(e.charCodeAt(P)===12?(_=L,P++):(_=r,te===0&&ve(fe)),_===r&&(e.charCodeAt(P)===32?(_=N,P++):(_=r,te===0&&ve(Le)),_===r&&(e.charCodeAt(P)===160?(_=S,P++):(_=r,te===0&&ve(ke)),_===r&&(e.charCodeAt(P)===65279?(_=B,P++):(_=r,te===0&&ve(Ke)),_===r&&(_=rd())))))),te--,_===r&&(j=r,te===0&&ve(fo)),_}function Ni(){var _;return vt.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(ut)),_}function Al(){var _,j;return te++,e.charCodeAt(P)===10?(_=T,P++):(_=r,te===0&&ve(Or)),_===r&&(e.substr(P,2)===U?(_=U,P+=2):(_=r,te===0&&ve(Vt)),_===r&&(e.charCodeAt(P)===13?(_=V,P++):(_=r,te===0&&ve(ci)),_===r&&(e.charCodeAt(P)===8232?(_=Y,P++):(_=r,te===0&&ve(es)),_===r&&(e.charCodeAt(P)===8233?(_=H,P++):(_=r,te===0&&ve(vn)))))),te--,_===r&&(j=r,te===0&&ve(ft)),_}function Xh(){var _,j;return te++,_=Zp(),_===r&&(_=gi()),te--,_===r&&(j=r,te===0&&ve(Pn)),_}function Zp(){var _,j,J,G,ae,ce;if(_=P,e.substr(P,2)===z?(j=z,P+=2):(j=r,te===0&&ve(Sr)),j!==r){for(J=[],G=P,ae=P,te++,e.substr(P,2)===W?(ce=W,P+=2):(ce=r,te===0&&ve(wn)),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r);G!==r;)J.push(G),G=P,ae=P,te++,e.substr(P,2)===W?(ce=W,P+=2):(ce=r,te===0&&ve(wn)),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r);e.substr(P,2)===W?(G=W,P+=2):(G=r,te===0&&ve(wn)),G!==r?(j=[j,J,G],_=j):(P=_,_=r)}else P=_,_=r;return _}function ka(){var _,j,J,G,ae,ce;if(_=P,e.substr(P,2)===z?(j=z,P+=2):(j=r,te===0&&ve(Sr)),j!==r){for(J=[],G=P,ae=P,te++,e.substr(P,2)===W?(ce=W,P+=2):(ce=r,te===0&&ve(wn)),ce===r&&(ce=Ni()),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r);G!==r;)J.push(G),G=P,ae=P,te++,e.substr(P,2)===W?(ce=W,P+=2):(ce=r,te===0&&ve(wn)),ce===r&&(ce=Ni()),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r);e.substr(P,2)===W?(G=W,P+=2):(G=r,te===0&&ve(wn)),G!==r?(j=[j,J,G],_=j):(P=_,_=r)}else P=_,_=r;return _}function gi(){var _,j,J,G,ae,ce;if(_=P,e.substr(P,2)===ie?(j=ie,P+=2):(j=r,te===0&&ve(Yr)),j!==r){for(J=[],G=P,ae=P,te++,ce=Ni(),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r);G!==r;)J.push(G),G=P,ae=P,te++,ce=Ni(),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r);j=[j,J],_=j}else P=_,_=r;return _}function El(){var _,j,J,G;if(te++,_=P,j=Jh(),j!==r){for(J=[],G=Zh();G!==r;)J.push(G),G=Zh();ot=_,_=qp(j,J)}else P=_,_=r;return te--,_===r&&(j=r,te===0&&ve(ho)),_}function Jh(){var _,j,J;return _=Qp(),_===r&&(e.charCodeAt(P)===36?(_=p,P++):(_=r,te===0&&ve(bs)),_===r&&(e.charCodeAt(P)===95?(_=Fe,P++):(_=r,te===0&&ve(Ks)),_===r&&(_=P,e.charCodeAt(P)===92?(j=Se,P++):(j=r,te===0&&ve(Kn)),j!==r?(J=Qh(),J!==r?_=J:(P=_,_=r)):(P=_,_=r)))),_}function Zh(){var _;return _=Jh(),_===r&&(_=e1(),_===r&&(_=ed(),_===r&&(_=td(),_===r&&(e.charCodeAt(P)===8204?(_=Re,P++):(_=r,te===0&&ve(kt)),_===r&&(e.charCodeAt(P)===8205?(_=Je,P++):(_=r,te===0&&ve(Ir))))))),_}function Qp(){var _;return _=Fl(),_===r&&(_=Dl(),_===r&&(_=a1(),_===r&&(_=i1(),_===r&&(_=s1(),_===r&&(_=Il()))))),_}function e1(){var _;return _=Sl(),_===r&&(_=Gs()),_}function t1(){var _,j,J;return te++,_=P,j=ns(),j!==r?(e.charCodeAt(P)===105?(J=ue,P++):(J=r,te===0&&ve(hr)),J===r&&(J=null),ot=_,_=kh(j,J)):(P=_,_=r),te--,_===r&&(j=r,te===0&&ve(rt)),_}function ns(){var _,j,J,G;if(te++,_=P,e.charCodeAt(P)===34?(j=Ce,P++):(j=r,te===0&&ve(dr)),j!==r){for(J=[],G=ne();G!==r;)J.push(G),G=ne();e.charCodeAt(P)===34?(G=Ce,P++):(G=r,te===0&&ve(dr)),G!==r?(ot=_,_=Vp(J)):(P=_,_=r)}else P=_,_=r;if(_===r)if(_=P,e.charCodeAt(P)===39?(j=Ue,P++):(j=r,te===0&&ve(Kt)),j!==r){for(J=[],G=he();G!==r;)J.push(G),G=he();e.charCodeAt(P)===39?(G=Ue,P++):(G=r,te===0&&ve(Kt)),G!==r?(ot=_,_=Hr(J)):(P=_,_=r)}else P=_,_=r;return te--,_===r&&(j=r,te===0&&ve(nn)),_}function ne(){var _,j,J,G;return _=P,j=P,J=P,te++,e.charCodeAt(P)===34?(G=Ce,P++):(G=r,te===0&&ve(dr)),G===r&&(e.charCodeAt(P)===92?(G=Se,P++):(G=r,te===0&&ve(Kn)),G===r&&(G=Ni())),te--,G===r?J=void 0:(P=J,J=r),J!==r?(G=yn(),G!==r?(J=[J,G],j=J):(P=j,j=r)):(P=j,j=r),j!==r?_=e.substring(_,P):_=j,_===r&&(_=P,e.charCodeAt(P)===92?(j=Se,P++):(j=r,te===0&&ve(Kn)),j!==r?(J=Er(),J!==r?_=J:(P=_,_=r)):(P=_,_=r),_===r&&(_=Ft())),_}function he(){var _,j,J,G;return _=P,j=P,J=P,te++,e.charCodeAt(P)===39?(G=Ue,P++):(G=r,te===0&&ve(Kt)),G===r&&(e.charCodeAt(P)===92?(G=Se,P++):(G=r,te===0&&ve(Kn)),G===r&&(G=Ni())),te--,G===r?J=void 0:(P=J,J=r),J!==r?(G=yn(),G!==r?(J=[J,G],j=J):(P=j,j=r)):(P=j,j=r),j!==r?_=e.substring(_,P):_=j,_===r&&(_=P,e.charCodeAt(P)===92?(j=Se,P++):(j=r,te===0&&ve(Kn)),j!==r?(J=Er(),J!==r?_=J:(P=_,_=r)):(P=_,_=r),_===r&&(_=Ft())),_}function le(){var _,j,J,G,ae,ce;if(te++,_=P,e.charCodeAt(P)===91?(j=or,P++):(j=r,te===0&&ve(fi)),j!==r){for(e.charCodeAt(P)===94?(J=$t,P++):(J=r,te===0&&ve(hi)),J===r&&(J=null),G=[],ae=Ne(),ae===r&&(ae=nt());ae!==r;)G.push(ae),ae=Ne(),ae===r&&(ae=nt());e.charCodeAt(P)===93?(ae=_t,P++):(ae=r,te===0&&ve(Gn)),ae!==r?(e.charCodeAt(P)===105?(ce=ue,P++):(ce=r,te===0&&ve(hr)),ce===r&&(ce=null),ot=_,_=zc(J,G,ce)):(P=_,_=r)}else P=_,_=r;return te--,_===r&&(j=r,te===0&&ve(zn)),_}function Ne(){var _,j,J,G;return _=P,j=nt(),j!==r?(e.charCodeAt(P)===45?(J=Dr,P++):(J=r,te===0&&ve(jr)),J!==r?(G=nt(),G!==r?(ot=_,_=xa(j,G)):(P=_,_=r)):(P=_,_=r)):(P=_,_=r),_}function nt(){var _,j,J,G;return _=P,j=P,J=P,te++,e.charCodeAt(P)===93?(G=_t,P++):(G=r,te===0&&ve(Gn)),G===r&&(e.charCodeAt(P)===92?(G=Se,P++):(G=r,te===0&&ve(Kn)),G===r&&(G=Ni())),te--,G===r?J=void 0:(P=J,J=r),J!==r?(G=yn(),G!==r?(J=[J,G],j=J):(P=j,j=r)):(P=j,j=r),j!==r?_=e.substring(_,P):_=j,_===r&&(_=P,e.charCodeAt(P)===92?(j=Se,P++):(j=r,te===0&&ve(Kn)),j!==r?(J=Er(),J!==r?_=J:(P=_,_=r)):(P=_,_=r),_===r&&(_=Ft())),_}function Ft(){var _,j,J;return _=P,e.charCodeAt(P)===92?(j=Se,P++):(j=r,te===0&&ve(Kn)),j!==r?(J=Al(),J!==r?(ot=_,_=Nh()):(P=_,_=r)):(P=_,_=r),_}function Er(){var _,j,J,G;return _=Qt(),_===r&&(_=P,e.charCodeAt(P)===48?(j=cr,P++):(j=r,te===0&&ve(mr)),j!==r?(J=P,te++,G=Na(),te--,G===r?J=void 0:(P=J,J=r),J!==r?(ot=_,_=Gc()):(P=_,_=r)):(P=_,_=r),_===r&&(_=yl(),_===r&&(_=Qh()))),_}function Qt(){var _;return _=bl(),_===r&&(_=r1()),_}function bl(){var _,j;return e.charCodeAt(P)===39?(_=Ue,P++):(_=r,te===0&&ve(Kt)),_===r&&(e.charCodeAt(P)===34?(_=Ce,P++):(_=r,te===0&&ve(dr)),_===r&&(e.charCodeAt(P)===92?(_=Se,P++):(_=r,te===0&&ve(Kn)),_===r&&(_=P,e.charCodeAt(P)===98?(j=ht,P++):(j=r,te===0&&ve(Kc)),j!==r&&(ot=_,j=di()),_=j,_===r&&(_=P,e.charCodeAt(P)===102?(j=Xt,P++):(j=r,te===0&&ve(po)),j!==r&&(ot=_,j=Lh()),_=j,_===r&&(_=P,e.charCodeAt(P)===110?(j=st,P++):(j=r,te===0&&ve(sn)),j!==r&&(ot=_,j=Uh()),_=j,_===r&&(_=P,e.charCodeAt(P)===114?(j=Ye,P++):(j=r,te===0&&ve(go)),j!==r&&(ot=_,j=jh()),_=j,_===r&&(_=P,e.charCodeAt(P)===116?(j=fr,P++):(j=r,te===0&&ve(pl)),j!==r&&(ot=_,j=Hh()),_=j,_===r&&(_=P,e.charCodeAt(P)===118?(j=Me,P++):(j=r,te===0&&ve(gl)),j!==r&&(ot=_,j=Mh()),_=j)))))))),_}function r1(){var _,j,J,G;return _=P,j=P,J=P,te++,G=mi(),G===r&&(G=Ni()),te--,G===r?J=void 0:(P=J,J=r),J!==r?(G=yn(),G!==r?(J=[J,G],j=J):(P=j,j=r)):(P=j,j=r),j!==r?_=e.substring(_,P):_=j,_}function mi(){var _;return _=bl(),_===r&&(_=Na(),_===r&&(e.charCodeAt(P)===120?(_=Nt,P++):(_=r,te===0&&ve(mo)),_===r&&(e.charCodeAt(P)===117?(_=dn,P++):(_=r,te===0&&ve(zs))))),_}function yl(){var _,j,J,G,ae,ce;return _=P,e.charCodeAt(P)===120?(j=Nt,P++):(j=r,te===0&&ve(mo)),j!==r?(J=P,G=P,ae=ys(),ae!==r?(ce=ys(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r),G!==r?J=e.substring(J,P):J=G,J!==r?(ot=_,_=qh(J)):(P=_,_=r)):(P=_,_=r),_}function Qh(){var _,j,J,G,ae,ce,er,$r;return _=P,e.charCodeAt(P)===117?(j=dn,P++):(j=r,te===0&&ve(zs)),j!==r?(J=P,G=P,ae=ys(),ae!==r?(ce=ys(),ce!==r?(er=ys(),er!==r?($r=ys(),$r!==r?(ae=[ae,ce,er,$r],G=ae):(P=G,G=r)):(P=G,G=r)):(P=G,G=r)):(P=G,G=r),G!==r?J=e.substring(J,P):J=G,J!==r?(ot=_,_=Xn(J)):(P=_,_=r)):(P=_,_=r),_}function Na(){var _;return Ur.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(vo)),_}function ys(){var _;return Ri.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(ml)),_}function _l(){var _,j;return _=P,e.charCodeAt(P)===46?(j=ir,P++):(j=r,te===0&&ve(wo)),j!==r&&(ot=_,j=Kp()),_=j,_}function Rt(){var _,j,J,G;return te++,_=P,e.charCodeAt(P)===123?(j=s,P++):(j=r,te===0&&ve(rn)),j!==r?(J=n1(),e.charCodeAt(P)===125?(G=u,P++):(G=r,te===0&&ve(Es)),G!==r?_=J:(P=_,_=r)):(P=_,_=r),te--,_===r&&(j=r,te===0&&ve(Ao)),_}function n1(){var _,j;return _=P,j=Cl(),ot=_,j=pi(j),_=j,_}function Cl(){var _,j,J,G,ae,ce;if(_=P,j=[],J=[],G=P,ae=P,te++,pn.test(e.charAt(P))?(ce=e.charAt(P),P++):(ce=r,te===0&&ve(Yn)),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r),G!==r)for(;G!==r;)J.push(G),G=P,ae=P,te++,pn.test(e.charAt(P))?(ce=e.charAt(P),P++):(ce=r,te===0&&ve(Yn)),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r);else J=r;for(J===r&&(J=P,e.charCodeAt(P)===123?(G=s,P++):(G=r,te===0&&ve(rn)),G!==r?(ae=Cl(),e.charCodeAt(P)===125?(ce=u,P++):(ce=r,te===0&&ve(Es)),ce!==r?(G=[G,ae,ce],J=G):(P=J,J=r)):(P=J,J=r));J!==r;){if(j.push(J),J=[],G=P,ae=P,te++,pn.test(e.charAt(P))?(ce=e.charAt(P),P++):(ce=r,te===0&&ve(Yn)),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r),G!==r)for(;G!==r;)J.push(G),G=P,ae=P,te++,pn.test(e.charAt(P))?(ce=e.charAt(P),P++):(ce=r,te===0&&ve(Yn)),te--,ce===r?ae=void 0:(P=ae,ae=r),ae!==r?(ce=yn(),ce!==r?(ae=[ae,ce],G=ae):(P=G,G=r)):(P=G,G=r);else J=r;J===r&&(J=P,e.charCodeAt(P)===123?(G=s,P++):(G=r,te===0&&ve(rn)),G!==r?(ae=Cl(),e.charCodeAt(P)===125?(ce=u,P++):(ce=r,te===0&&ve(Es)),ce!==r?(G=[G,ae,ce],J=G):(P=J,J=r)):(P=J,J=r))}return _=e.substring(_,P),_}function Dl(){var _;return Dt.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(R)),_}function i1(){var _;return je.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(k)),_}function s1(){var _;return Ie.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(K)),_}function a1(){var _;return Fr.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(Q)),_}function Fl(){var _;return gn.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(we)),_}function Gs(){var _;return at.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(be)),_}function Sl(){var _;return Pa.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve($e)),_}function ed(){var _;return mn.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(Oe)),_}function Il(){var _;return me.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(Zt)),_}function td(){var _;return js.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(Br)),_}function rd(){var _;return Pt.test(e.charAt(P))?(_=e.charAt(P),P++):(_=r,te===0&&ve(An)),_}function jt(){var _,j;for(_=[],j=ki(),j===r&&(j=Al(),j===r&&(j=Xh()));j!==r;)_.push(j),j=ki(),j===r&&(j=Al(),j===r&&(j=Xh()));return _}function nd(){var _,j;for(_=[],j=ki(),j===r&&(j=ka());j!==r;)_.push(j),j=ki(),j===r&&(j=ka());return _}function La(){var _,j,J,G;return _=P,j=jt(),e.charCodeAt(P)===59?(J=Jt,P++):(J=r,te===0&&ve(En)),J!==r?(j=[j,J],_=j):(P=_,_=r),_===r&&(_=P,j=nd(),J=gi(),J===r&&(J=null),G=Al(),G!==r?(j=[j,J,G],_=j):(P=_,_=r),_===r&&(_=P,j=jt(),J=Ua(),J!==r?(j=[j,J],_=j):(P=_,_=r))),_}function Ua(){var _,j;return _=P,te++,e.length>P?(j=e.charAt(P),P++):(j=r,te===0&&ve(Vs)),te--,j===r?_=void 0:(P=_,_=r),_}let Bl=t.reservedWords||[];if(Oi=a(),Oi!==r&&P===e.length)return Oi;throw Oi!==r&&P<e.length&&ve(zp()),zh(bo,Jn<e.length?e.charAt(Jn):null,Jn<e.length?Ta(Jn,Jn+1):Ta(Jn,Jn))}L3.exports={SyntaxError:lo,parse:Qq}});var Oh=de((aJ,j3)=>{"use strict";var eV=Fp(),tV=N3(),rV=U3(),nV=$2(),iV=["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","null","true","false","enum","implements","interface","let","package","private","protected","public","static","yield","await"],Th={VERSION:nV,RESERVED_WORDS:iV,GrammarError:eV,parser:rV,compiler:tV,generate(e,t){t=t!==void 0?t:{};function r(a){let s={};return Object.keys(a).forEach(u=>{s[u]=a[u].slice()}),s}let n="plugins"in t?t.plugins:[],i={parser:Th.parser,passes:r(Th.compiler.passes),reservedWords:Th.RESERVED_WORDS.slice()};return n.forEach(a=>{a.use(i,t)}),Th.compiler.compile(i.parser.parse(e,{grammarSource:t.grammarSource,reservedWords:i.reservedWords}),i.passes,t)}};j3.exports=Th});var X2=de((Y2,W2)=>{(function(e,t){typeof Y2=="object"&&typeof W2<"u"?W2.exports=t():typeof define=="function"&&define.amd?define(t):e.JSON5=t()})(Y2,function(){"use strict";function e(re,fe){return fe={exports:{}},re(fe,fe.exports),fe.exports}var t=e(function(re){var fe=re.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=fe)}),r=e(function(re){var fe=re.exports={version:"2.6.5"};typeof __e=="number"&&(__e=fe)}),n=r.version,i=function(re){return typeof re=="object"?re!==null:typeof re=="function"},a=function(re){if(!i(re))throw TypeError(re+" is not an object!");return re},s=function(re){try{return!!re()}catch{return!0}},u=!s(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),l=t.document,f=i(l)&&i(l.createElement),d=function(re){return f?l.createElement(re):{}},g=!u&&!s(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!=7}),p=function(re,fe){if(!i(re))return re;var Le,ke;if(fe&&typeof(Le=re.toString)=="function"&&!i(ke=Le.call(re))||typeof(Le=re.valueOf)=="function"&&!i(ke=Le.call(re))||!fe&&typeof(Le=re.toString)=="function"&&!i(ke=Le.call(re)))return ke;throw TypeError("Can't convert object to primitive value")},h=Object.defineProperty,w=u?Object.defineProperty:function(fe,Le,ke){if(a(fe),Le=p(Le,!0),a(ke),g)try{return h(fe,Le,ke)}catch{}if("get"in ke||"set"in ke)throw TypeError("Accessors not supported!");return"value"in ke&&(fe[Le]=ke.value),fe},v={f:w},y=function(re,fe){return{enumerable:!(re&1),configurable:!(re&2),writable:!(re&4),value:fe}},m=u?function(re,fe,Le){return v.f(re,fe,y(1,Le))}:function(re,fe,Le){return re[fe]=Le,re},b={}.hasOwnProperty,D=function(re,fe){return b.call(re,fe)},C=0,F=Math.random(),L=function(re){return"Symbol(".concat(re===void 0?"":re,")_",(++C+F).toString(36))},N=!1,S=e(function(re){var fe="__core-js_shared__",Le=t[fe]||(t[fe]={});(re.exports=function(ke,Ke){return Le[ke]||(Le[ke]=Ke!==void 0?Ke:{})})("versions",[]).push({version:r.version,mode:N?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),B=S("native-function-to-string",Function.toString),T=e(function(re){var fe=L("src"),Le="toString",ke=(""+B).split(Le);r.inspectSource=function(Ke){return B.call(Ke)},(re.exports=function(Ke,ut,ft,Or){var Vt=typeof ft=="function";Vt&&(D(ft,"name")||m(ft,"name",ut)),Ke[ut]!==ft&&(Vt&&(D(ft,fe)||m(ft,fe,Ke[ut]?""+Ke[ut]:ke.join(String(ut)))),Ke===t?Ke[ut]=ft:Or?Ke[ut]?Ke[ut]=ft:m(Ke,ut,ft):(delete Ke[ut],m(Ke,ut,ft)))})(Function.prototype,Le,function(){return typeof this=="function"&&this[fe]||B.call(this)})}),U=function(re){if(typeof re!="function")throw TypeError(re+" is not a function!");return re},V=function(re,fe,Le){if(U(re),fe===void 0)return re;switch(Le){case 1:return function(ke){return re.call(fe,ke)};case 2:return function(ke,Ke){return re.call(fe,ke,Ke)};case 3:return function(ke,Ke,ut){return re.call(fe,ke,Ke,ut)}}return function(){return re.apply(fe,arguments)}},Y="prototype",H=function(re,fe,Le){var ke=re&H.F,Ke=re&H.G,ut=re&H.S,ft=re&H.P,Or=re&H.B,Vt=Ke?t:ut?t[fe]||(t[fe]={}):(t[fe]||{})[Y],ci=Ke?r:r[fe]||(r[fe]={}),es=ci[Y]||(ci[Y]={}),vn,Pn,Sr,wn;Ke&&(Le=fe);for(vn in Le)Pn=!ke&&Vt&&Vt[vn]!==void 0,Sr=(Pn?Vt:Le)[vn],wn=Or&&Pn?V(Sr,t):ft&&typeof Sr=="function"?V(Function.call,Sr):Sr,Vt&&T(Vt,vn,Sr,re&H.U),ci[vn]!=Sr&&m(ci,vn,wn),ft&&es[vn]!=Sr&&(es[vn]=Sr)};t.core=r,H.F=1,H.G=2,H.S=4,H.P=8,H.B=16,H.W=32,H.U=64,H.R=128;var z=H,W=Math.ceil,ie=Math.floor,Fe=function(re){return isNaN(re=+re)?0:(re>0?ie:W)(re)},Se=function(re){if(re==null)throw TypeError("Can't call method on "+re);return re},Re=function(re){return function(fe,Le){var ke=String(Se(fe)),Ke=Fe(Le),ut=ke.length,ft,Or;return Ke<0||Ke>=ut?re?"":void 0:(ft=ke.charCodeAt(Ke),ft<55296||ft>56319||Ke+1===ut||(Or=ke.charCodeAt(Ke+1))<56320||Or>57343?re?ke.charAt(Ke):ft:re?ke.slice(Ke,Ke+2):(ft-55296<<10)+(Or-56320)+65536)}},Je=Re(!1);z(z.P,"String",{codePointAt:function(fe){return Je(this,fe)}});var ue=r.String.codePointAt,Ce=Math.max,Ue=Math.min,or=function(re,fe){return re=Fe(re),re<0?Ce(re+fe,0):Ue(re,fe)},$t=String.fromCharCode,_t=String.fromCodePoint;z(z.S+z.F*(!!_t&&_t.length!=1),"String",{fromCodePoint:function(fe){for(var Le=arguments,ke=[],Ke=arguments.length,ut=0,ft;Ke>ut;){if(ft=+Le[ut++],or(ft,1114111)!==ft)throw RangeError(ft+" is not a valid code point");ke.push(ft<65536?$t(ft):$t(((ft-=65536)>>10)+55296,ft%1024+56320))}return ke.join("")}});var Dr=r.String.fromCodePoint,cr=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ht=/[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Xt=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\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\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,st={Space_Separator:cr,ID_Start:ht,ID_Continue:Xt},Ye={isSpaceSeparator:function(fe){return typeof fe=="string"&&st.Space_Separator.test(fe)},isIdStartChar:function(fe){return typeof fe=="string"&&(fe>="a"&&fe<="z"||fe>="A"&&fe<="Z"||fe==="$"||fe==="_"||st.ID_Start.test(fe))},isIdContinueChar:function(fe){return typeof fe=="string"&&(fe>="a"&&fe<="z"||fe>="A"&&fe<="Z"||fe>="0"&&fe<="9"||fe==="$"||fe==="_"||fe==="\u200C"||fe==="\u200D"||st.ID_Continue.test(fe))},isDigit:function(fe){return typeof fe=="string"&&/[0-9]/.test(fe)},isHexDigit:function(fe){return typeof fe=="string"&&/[0-9A-Fa-f]/.test(fe)}},fr,Me,Nt,dn,ir,Jt,vt,Ur,Ri,pn=function(fe,Le){fr=String(fe),Me="start",Nt=[],dn=0,ir=1,Jt=0,vt=void 0,Ur=void 0,Ri=void 0;do vt=Pa(),Fu[Me]();while(vt.type!=="eof");return typeof Le=="function"?Dt({"":Ri},"",Le):Ri};function Dt(re,fe,Le){var ke=re[fe];if(ke!=null&&typeof ke=="object")if(Array.isArray(ke))for(var Ke=0;Ke<ke.length;Ke++){var ut=String(Ke),ft=Dt(ke,ut,Le);ft===void 0?delete ke[ut]:Object.defineProperty(ke,ut,{value:ft,writable:!0,enumerable:!0,configurable:!0})}else for(var Or in ke){var Vt=Dt(ke,Or,Le);Vt===void 0?delete ke[Or]:Object.defineProperty(ke,Or,{value:Vt,writable:!0,enumerable:!0,configurable:!0})}return Le.call(re,fe,ke)}var je,Ie,Fr,gn,at;function Pa(){for(je="default",Ie="",Fr=!1,gn=1;;){at=mn();var re=js[je]();if(re)return re}}function mn(){if(fr[dn])return String.fromCodePoint(fr.codePointAt(dn))}function me(){var re=mn();return re===`
`?(ir++,Jt=0):re?Jt+=re.length:Jt++,re&&(dn+=re.length),re}var js={default:function(){switch(at){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
`:case"\r":case"\u2028":case"\u2029":me();return;case"/":me(),je="comment";return;case void 0:return me(),Pt("eof")}if(Ye.isSpaceSeparator(at)){me();return}return js[Me]()},comment:function(){switch(at){case"*":me(),je="multiLineComment";return;case"/":me(),je="singleLineComment";return}throw Lt(me())},multiLineComment:function(){switch(at){case"*":me(),je="multiLineCommentAsterisk";return;case void 0:throw Lt(me())}me()},multiLineCommentAsterisk:function(){switch(at){case"*":me();return;case"/":me(),je="default";return;case void 0:throw Lt(me())}me(),je="multiLineComment"},singleLineComment:function(){switch(at){case`
`:case"\r":case"\u2028":case"\u2029":me(),je="default";return;case void 0:return me(),Pt("eof")}me()},value:function(){switch(at){case"{":case"[":return Pt("punctuator",me());case"n":return me(),rn("ull"),Pt("null",null);case"t":return me(),rn("rue"),Pt("boolean",!0);case"f":return me(),rn("alse"),Pt("boolean",!1);case"-":case"+":me()==="-"&&(gn=-1),je="sign";return;case".":Ie=me(),je="decimalPointLeading";return;case"0":Ie=me(),je="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Ie=me(),je="decimalInteger";return;case"I":return me(),rn("nfinity"),Pt("numeric",1/0);case"N":return me(),rn("aN"),Pt("numeric",NaN);case'"':case"'":Fr=me()==='"',Ie="",je="string";return}throw Lt(me())},identifierNameStartEscape:function(){if(at!=="u")throw Lt(me());me();var fe=Hs();switch(fe){case"$":case"_":break;default:if(!Ye.isIdStartChar(fe))throw Su();break}Ie+=fe,je="identifierName"},identifierName:function(){switch(at){case"$":case"_":case"\u200C":case"\u200D":Ie+=me();return;case"\\":me(),je="identifierNameEscape";return}if(Ye.isIdContinueChar(at)){Ie+=me();return}return Pt("identifier",Ie)},identifierNameEscape:function(){if(at!=="u")throw Lt(me());me();var fe=Hs();switch(fe){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Ye.isIdContinueChar(fe))throw Su();break}Ie+=fe,je="identifierName"},sign:function(){switch(at){case".":Ie=me(),je="decimalPointLeading";return;case"0":Ie=me(),je="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Ie=me(),je="decimalInteger";return;case"I":return me(),rn("nfinity"),Pt("numeric",gn*(1/0));case"N":return me(),rn("aN"),Pt("numeric",NaN)}throw Lt(me())},zero:function(){switch(at){case".":Ie+=me(),je="decimalPoint";return;case"e":case"E":Ie+=me(),je="decimalExponent";return;case"x":case"X":Ie+=me(),je="hexadecimal";return}return Pt("numeric",gn*0)},decimalInteger:function(){switch(at){case".":Ie+=me(),je="decimalPoint";return;case"e":case"E":Ie+=me(),je="decimalExponent";return}if(Ye.isDigit(at)){Ie+=me();return}return Pt("numeric",gn*Number(Ie))},decimalPointLeading:function(){if(Ye.isDigit(at)){Ie+=me(),je="decimalFraction";return}throw Lt(me())},decimalPoint:function(){switch(at){case"e":case"E":Ie+=me(),je="decimalExponent";return}if(Ye.isDigit(at)){Ie+=me(),je="decimalFraction";return}return Pt("numeric",gn*Number(Ie))},decimalFraction:function(){switch(at){case"e":case"E":Ie+=me(),je="decimalExponent";return}if(Ye.isDigit(at)){Ie+=me();return}return Pt("numeric",gn*Number(Ie))},decimalExponent:function(){switch(at){case"+":case"-":Ie+=me(),je="decimalExponentSign";return}if(Ye.isDigit(at)){Ie+=me(),je="decimalExponentInteger";return}throw Lt(me())},decimalExponentSign:function(){if(Ye.isDigit(at)){Ie+=me(),je="decimalExponentInteger";return}throw Lt(me())},decimalExponentInteger:function(){if(Ye.isDigit(at)){Ie+=me();return}return Pt("numeric",gn*Number(Ie))},hexadecimal:function(){if(Ye.isHexDigit(at)){Ie+=me(),je="hexadecimalInteger";return}throw Lt(me())},hexadecimalInteger:function(){if(Ye.isHexDigit(at)){Ie+=me();return}return Pt("numeric",gn*Number(Ie))},string:function(){switch(at){case"\\":me(),Ie+=Es();return;case'"':if(Fr)return me(),Pt("string",Ie);Ie+=me();return;case"'":if(!Fr)return me(),Pt("string",Ie);Ie+=me();return;case`
`:case"\r":throw Lt(me());case"\u2028":case"\u2029":Iu(at);break;case void 0:throw Lt(me())}Ie+=me()},start:function(){switch(at){case"{":case"[":return Pt("punctuator",me())}je="value"},beforePropertyName:function(){switch(at){case"$":case"_":Ie=me(),je="identifierName";return;case"\\":me(),je="identifierNameStartEscape";return;case"}":return Pt("punctuator",me());case'"':case"'":Fr=me()==='"',je="string";return}if(Ye.isIdStartChar(at)){Ie+=me(),je="identifierName";return}throw Lt(me())},afterPropertyName:function(){if(at===":")return Pt("punctuator",me());throw Lt(me())},beforePropertyValue:function(){je="value"},afterPropertyValue:function(){switch(at){case",":case"}":return Pt("punctuator",me())}throw Lt(me())},beforeArrayValue:function(){if(at==="]")return Pt("punctuator",me());je="value"},afterArrayValue:function(){switch(at){case",":case"]":return Pt("punctuator",me())}throw Lt(me())},end:function(){throw Lt(me())}};function Pt(re,fe){return{type:re,value:fe,line:ir,column:Jt}}function rn(re){for(var fe=0,Le=re;fe<Le.length;fe+=1){var ke=Le[fe],Ke=mn();if(Ke!==ke)throw Lt(me());me()}}function Es(){var re=mn();switch(re){case"b":return me(),"\b";case"f":return me(),"\f";case"n":return me(),`
`;case"r":return me(),"\r";case"t":return me()," ";case"v":return me(),"\v";case"0":if(me(),Ye.isDigit(mn()))throw Lt(me());return"\0";case"x":return me(),Du();case"u":return me(),Hs();case`
`:case"\u2028":case"\u2029":return me(),"";case"\r":return me(),mn()===`
`&&me(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Lt(me());case void 0:throw Lt(me())}return me()}function Du(){var re="",fe=mn();if(!Ye.isHexDigit(fe)||(re+=me(),fe=mn(),!Ye.isHexDigit(fe)))throw Lt(me());return re+=me(),String.fromCodePoint(parseInt(re,16))}function Hs(){for(var re="",fe=4;fe-- >0;){var Le=mn();if(!Ye.isHexDigit(Le))throw Lt(me());re+=me()}return String.fromCodePoint(parseInt(re,16))}var Fu={start:function(){if(vt.type==="eof")throw li();Ms()},beforePropertyName:function(){switch(vt.type){case"identifier":case"string":Ur=vt.value,Me="afterPropertyName";return;case"punctuator":bs();return;case"eof":throw li()}},afterPropertyName:function(){if(vt.type==="eof")throw li();Me="beforePropertyValue"},beforePropertyValue:function(){if(vt.type==="eof")throw li();Ms()},beforeArrayValue:function(){if(vt.type==="eof")throw li();if(vt.type==="punctuator"&&vt.value==="]"){bs();return}Ms()},afterPropertyValue:function(){if(vt.type==="eof")throw li();switch(vt.value){case",":Me="beforePropertyName";return;case"}":bs()}},afterArrayValue:function(){if(vt.type==="eof")throw li();switch(vt.value){case",":Me="beforeArrayValue";return;case"]":bs()}},end:function(){}};function Ms(){var re;switch(vt.type){case"punctuator":switch(vt.value){case"{":re={};break;case"[":re=[];break}break;case"null":case"boolean":case"numeric":case"string":re=vt.value;break}if(Ri===void 0)Ri=re;else{var fe=Nt[Nt.length-1];Array.isArray(fe)?fe.push(re):Object.defineProperty(fe,Ur,{value:re,writable:!0,enumerable:!0,configurable:!0})}if(re!==null&&typeof re=="object")Nt.push(re),Array.isArray(re)?Me="beforeArrayValue":Me="beforePropertyName";else{var Le=Nt[Nt.length-1];Le==null?Me="end":Array.isArray(Le)?Me="afterArrayValue":Me="afterPropertyValue"}}function bs(){Nt.pop();var re=Nt[Nt.length-1];re==null?Me="end":Array.isArray(re)?Me="afterArrayValue":Me="afterPropertyValue"}function Lt(re){return qs(re===void 0?"JSON5: invalid end of input at "+ir+":"+Jt:"JSON5: invalid character '"+Bu(re)+"' at "+ir+":"+Jt)}function li(){return qs("JSON5: invalid end of input at "+ir+":"+Jt)}function Su(){return Jt-=5,qs("JSON5: invalid identifier character at "+ir+":"+Jt)}function Iu(re){console.warn("JSON5: '"+Bu(re)+"' in strings is not valid ECMAScript; consider escaping")}function Bu(re){var fe={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(fe[re])return fe[re];if(re<" "){var Le=re.charCodeAt(0).toString(16);return"\\x"+("00"+Le).substring(Le.length)}return re}function qs(re){var fe=new SyntaxError(re);return fe.lineNumber=ir,fe.columnNumber=Jt,fe}var co=function(fe,Le,ke){var Ke=[],ut="",ft,Or,Vt="",ci;if(Le!=null&&typeof Le=="object"&&!Array.isArray(Le)&&(ke=Le.space,ci=Le.quote,Le=Le.replacer),typeof Le=="function")Or=Le;else if(Array.isArray(Le)){ft=[];for(var es=0,vn=Le;es<vn.length;es+=1){var Pn=vn[es],Sr=void 0;typeof Pn=="string"?Sr=Pn:(typeof Pn=="number"||Pn instanceof String||Pn instanceof Number)&&(Sr=String(Pn)),Sr!==void 0&&ft.indexOf(Sr)<0&&ft.push(Sr)}}return ke instanceof Number?ke=Number(ke):ke instanceof String&&(ke=String(ke)),typeof ke=="number"?ke>0&&(ke=Math.min(10,Math.floor(ke)),Vt=" ".substr(0,ke)):typeof ke=="string"&&(Vt=ke.substr(0,10)),wn("",{"":fe});function wn(kt,Ir){var rt=Ir[kt];switch(rt!=null&&(typeof rt.toJSON5=="function"?rt=rt.toJSON5(kt):typeof rt.toJSON=="function"&&(rt=rt.toJSON(kt))),Or&&(rt=Or.call(Ir,kt,rt)),rt instanceof Number?rt=Number(rt):rt instanceof String?rt=String(rt):rt instanceof Boolean&&(rt=rt.valueOf()),rt){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof rt=="string")return Yr(rt,!1);if(typeof rt=="number")return String(rt);if(typeof rt=="object")return Array.isArray(rt)?Kn(rt):ho(rt)}function Yr(kt){for(var Ir={"'":.1,'"':.2},rt={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},hr="",nn=0;nn<kt.length;nn++){var dr=kt[nn];switch(dr){case"'":case'"':Ir[dr]++,hr+=dr;continue;case"\0":if(Ye.isDigit(kt[nn+1])){hr+="\\x00";continue}}if(rt[dr]){hr+=rt[dr];continue}if(dr<" "){var Kt=dr.charCodeAt(0).toString(16);hr+="\\x"+("00"+Kt).substring(Kt.length);continue}hr+=dr}var zn=ci||Object.keys(Ir).reduce(function(fi,hi){return Ir[fi]<Ir[hi]?fi:hi});return hr=hr.replace(new RegExp(zn,"g"),rt[zn]),zn+hr+zn}function ho(kt){if(Ke.indexOf(kt)>=0)throw TypeError("Converting circular structure to JSON5");Ke.push(kt);var Ir=ut;ut=ut+Vt;for(var rt=ft||Object.keys(kt),hr=[],nn=0,dr=rt;nn<dr.length;nn+=1){var Kt=dr[nn],zn=wn(Kt,kt);if(zn!==void 0){var fi=Ks(Kt)+":";Vt!==""&&(fi+=" "),fi+=zn,hr.push(fi)}}var hi;if(hr.length===0)hi="{}";else{var Gn;if(Vt==="")Gn=hr.join(","),hi="{"+Gn+"}";else{var jr=`,
`+ut;Gn=hr.join(jr),hi=`{
`+ut+Gn+`,
`+Ir+"}"}}return Ke.pop(),ut=Ir,hi}function Ks(kt){if(kt.length===0)return Yr(kt,!0);var Ir=String.fromCodePoint(kt.codePointAt(0));if(!Ye.isIdStartChar(Ir))return Yr(kt,!0);for(var rt=Ir.length;rt<kt.length;rt++)if(!Ye.isIdContinueChar(String.fromCodePoint(kt.codePointAt(rt))))return Yr(kt,!0);return kt}function Kn(kt){if(Ke.indexOf(kt)>=0)throw TypeError("Converting circular structure to JSON5");Ke.push(kt);var Ir=ut;ut=ut+Vt;for(var rt=[],hr=0;hr<kt.length;hr++){var nn=wn(String(hr),kt);rt.push(nn!==void 0?nn:"null")}var dr;if(rt.length===0)dr="[]";else if(Vt===""){var Kt=rt.join(",");dr="["+Kt+"]"}else{var zn=`,
`+ut,fi=rt.join(zn);dr=`[
`+ut+fi+`,
`+Ir+"]"}return Ke.pop(),ut=Ir,dr}},Vs={parse:pn,stringify:co},fo=Vs,Ra=fo;return Ra})});var $d="2.20.78";var Q1="schemaVersion",Ht="settings",vr="subs",ar="collections",xt="files",On="modules",Gt="artifacts",gf="rules",ls="tokens",qA="Auto Generated Sub-Store Backup",Pd="Sub-Store",Ro="Sub-Store Artifacts Repository",xo="#sub-store-cached-resource",To="#sub-store-cached-headers-resource",Rd="#sub-store-chr-expiration-time";var Oo="#sub-store-cached-script-resource",xd="#sub-store-csr-expiration-time";var xK=un(KA());var JA="3.7.7",l9=JA,Ul=typeof Buffer=="function",zA=typeof TextDecoder=="function"?new TextDecoder:void 0,GA=typeof TextEncoder=="function"?new TextEncoder:void 0,c9="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",mf=Array.prototype.slice.call(c9),Td=(e=>{let t={};return e.forEach((r,n)=>t[r]=n),t})(mf),f9=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Cn=String.fromCharCode.bind(String),YA=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),ZA=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),QA=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),eE=e=>{let t,r,n,i,a="",s=e.length%3;for(let u=0;u<e.length;){if((r=e.charCodeAt(u++))>255||(n=e.charCodeAt(u++))>255||(i=e.charCodeAt(u++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,a+=mf[t>>18&63]+mf[t>>12&63]+mf[t>>6&63]+mf[t&63]}return s?a.slice(0,s-3)+"===".substring(s):a},rg=typeof btoa=="function"?e=>btoa(e):Ul?e=>Buffer.from(e,"binary").toString("base64"):eE,eg=Ul?e=>Buffer.from(e).toString("base64"):e=>{let r=[];for(let n=0,i=e.length;n<i;n+=4096)r.push(Cn.apply(null,e.subarray(n,n+4096)));return rg(r.join(""))},Od=(e,t=!1)=>t?ZA(eg(e)):eg(e),h9=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?Cn(192|t>>>6)+Cn(128|t&63):Cn(224|t>>>12&15)+Cn(128|t>>>6&63)+Cn(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return Cn(240|t>>>18&7)+Cn(128|t>>>12&63)+Cn(128|t>>>6&63)+Cn(128|t&63)}},d9=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,tE=e=>e.replace(d9,h9),WA=Ul?e=>Buffer.from(e,"utf8").toString("base64"):GA?e=>eg(GA.encode(e)):e=>rg(tE(e)),Ll=(e,t=!1)=>t?ZA(WA(e)):WA(e),XA=e=>Ll(e,!0),p9=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,g9=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return Cn((r>>>10)+55296)+Cn((r&1023)+56320);case 3:return Cn((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Cn((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},rE=e=>e.replace(p9,g9),nE=e=>{if(e=e.replace(/\s+/g,""),!f9.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r="",n,i;for(let a=0;a<e.length;)t=Td[e.charAt(a++)]<<18|Td[e.charAt(a++)]<<12|(n=Td[e.charAt(a++)])<<6|(i=Td[e.charAt(a++)]),r+=n===64?Cn(t>>16&255):i===64?Cn(t>>16&255,t>>8&255):Cn(t>>16&255,t>>8&255,t&255);return r},ng=typeof atob=="function"?e=>atob(QA(e)):Ul?e=>Buffer.from(e,"base64").toString("binary"):nE,iE=Ul?e=>YA(Buffer.from(e,"base64")):e=>YA(ng(e).split("").map(t=>t.charCodeAt(0))),sE=e=>iE(aE(e)),m9=Ul?e=>Buffer.from(e,"base64").toString("utf8"):zA?e=>zA.decode(iE(e)):e=>rE(ng(e)),aE=e=>QA(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),tg=e=>m9(aE(e)),v9=e=>{if(typeof e!="string")return!1;let t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},uE=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),oE=function(){let e=(t,r)=>Object.defineProperty(String.prototype,t,uE(r));e("fromBase64",function(){return tg(this)}),e("toBase64",function(t){return Ll(this,t)}),e("toBase64URI",function(){return Ll(this,!0)}),e("toBase64URL",function(){return Ll(this,!0)}),e("toUint8Array",function(){return sE(this)})},lE=function(){let e=(t,r)=>Object.defineProperty(Uint8Array.prototype,t,uE(r));e("toBase64",function(t){return Od(this,t)}),e("toBase64URI",function(){return Od(this,!0)}),e("toBase64URL",function(){return Od(this,!0)})},w9=()=>{oE(),lE()},pt={version:JA,VERSION:l9,atob:ng,atobPolyfill:nE,btoa:rg,btoaPolyfill:eE,fromBase64:tg,toBase64:Ll,encode:Ll,encodeURI:XA,encodeURL:XA,utob:tE,btou:rE,decode:tg,isValid:v9,fromUint8Array:Od,toUint8Array:sE,extendString:oE,extendUint8Array:lE,extendBuiltins:w9};var Lu=typeof $task<"u",Wa=typeof $loon<"u",Uu=typeof $httpClient<"u"&&!Wa,Js=eval('typeof process !== "undefined"'),cE=typeof $environment<"u"&&$environment["stash-version"],fE=typeof $rocket<"u",A9=typeof egern=="object",E9=typeof $native<"u",ju=typeof $Plugins<"u";function kd(e){return e!==null&&typeof e=="object"&&[null,Object.prototype].includes(Object.getPrototypeOf(e))}function b9(e){let[t,r,n,i,a,s,u]=e.match(/^socks5:\/\/(?:(.*?):(.*?)@)?(.*?)(?::(\d+?))?(\?.*?)?(?:#(.*?))?$/);if(a)a=parseInt(a,10);else throw $.error(`port is not present in line: ${e}`),new Error(`port is not present in line: ${e}`);return{type:5,host:i,port:a,userId:r!=null?decodeURIComponent(r):void 0,password:n!=null?decodeURIComponent(n):void 0}}var Nd=class{constructor(name="untitled",debug=!1){if(this.name=name,this.debug=debug,this.http=Xa(),this.env=on(),Js){let dotenv=eval('require("dotenv")');dotenv.config()}this.node=(()=>{if(Js){let fs=eval("require('fs')");return{fs}}else return null})(),this.initCache();let delay=(e,t)=>new Promise(function(r){setTimeout(r.bind(null,t),e)});Promise.prototype.delay=async function(e){let t=await this;return await delay(e,t)}}initCache(){if(Lu&&(this.cache=JSON.parse($prefs.valueForKey(this.name)||"{}")),(Wa||Uu)&&(this.cache=JSON.parse($persistentStore.read(this.name)||"{}")),ju&&(this.cache=JSON.parse($Plugins.SubStoreCache.get(this.name)||"{}")),Js){let basePath=eval("process.env.SUB_STORE_DATA_BASE_PATH")||".",rootPath=`${basePath}/root.json`,backupRootPath=`${basePath}/root_${Date.now()}.json`;if(this.log(`Root path: ${rootPath}`),this.node.fs.existsSync(rootPath))try{this.root=JSON.parse(this.node.fs.readFileSync(`${rootPath}`))}catch(e){this.node.fs.copyFileSync(rootPath,backupRootPath),this.error(`Failed to parse ${rootPath}: ${e.message}. Backup created at ${backupRootPath}`)}kd(this.root)||(this.node.fs.writeFileSync(rootPath,JSON.stringify({}),{flag:"w"}),this.root={});let fpath=`${basePath}/${this.name}.json`,backupPath=`${basePath}/${this.name}_${Date.now()}.json`;if(this.log(`Data path: ${fpath}`),this.node.fs.existsSync(fpath))try{if(this.cache=JSON.parse(this.node.fs.readFileSync(`${fpath}`,"utf-8")),!kd(this.cache))throw new Error("Invalid Data")}catch{try{let t=pt.decode(this.node.fs.readFileSync(`${fpath}`,"utf-8"));if(this.cache=JSON.parse(t),this.node.fs.writeFileSync(fpath,t,{flag:"w"}),!kd(this.cache))throw new Error("Invalid Data")}catch(t){this.node.fs.copyFileSync(fpath,backupPath),this.error(`Failed to parse ${fpath}: ${t.message}. Backup created at ${backupPath}`)}}kd(this.cache)||(this.node.fs.writeFileSync(fpath,JSON.stringify({}),{flag:"w"}),this.cache={})}}persistCache(){let data=JSON.stringify(this.cache,null,2);if(Lu&&$prefs.setValueForKey(data,this.name),(Wa||Uu)&&$persistentStore.write(data,this.name),ju&&$Plugins.SubStoreCache.set(this.name,data),Js){let basePath=eval("process.env.SUB_STORE_DATA_BASE_PATH")||".";this.node.fs.writeFileSync(`${basePath}/${this.name}.json`,data,{flag:"w"},e=>console.log(e)),this.node.fs.writeFileSync(`${basePath}/root.json`,JSON.stringify(this.root,null,2),{flag:"w"},e=>console.log(e))}}write(e,t){if(this.log(`SET ${t}`),t.indexOf("#")!==-1){if(t=t.substr(1),Uu||Wa)return $persistentStore.write(e,t);if(Lu)return $prefs.setValueForKey(e,t);if(Js&&(this.root[t]=e),ju)return $Plugins.SubStoreCache.set(t,e)}else this.cache[t]=e;this.persistCache()}read(e){if(this.log(`READ ${e}`),e.indexOf("#")!==-1){if(e=e.substr(1),Uu||Wa)return $persistentStore.read(e);if(Lu)return $prefs.valueForKey(e);if(Js)return this.root[e];if(ju)return $Plugins.SubStoreCache.get(e)}else return this.cache[e]}delete(e){if(this.log(`DELETE ${e}`),e.indexOf("#")!==-1){if(e=e.substr(1),Uu||Wa)return $persistentStore.write(null,e);if(Lu)return $prefs.removeValueForKey(e);if(Js&&delete this.root[e],ju)return $Plugins.SubStoreCache.remove(e)}else delete this.cache[e];this.persistCache()}notify(title,subtitle="",content="",options={}){let openURL=options["open-url"],mediaURL=options["media-url"];if(Lu&&$notify(title,subtitle,content,options),Uu&&$notification.post(title,subtitle,content+`${mediaURL?`
\u591A\u5A92\u4F53:`+mediaURL:""}`,{url:openURL}),Wa){let e={};openURL&&(e.openUrl=openURL),mediaURL&&(e.mediaUrl=mediaURL),JSON.stringify(e)==="{}"?$notification.post(title,subtitle,content):$notification.post(title,subtitle,content,e)}if(Js){let content_=content+(openURL?`
\u70B9\u51FB\u8DF3\u8F6C: ${openURL}`:"")+(mediaURL?`
\u591A\u5A92\u4F53: ${mediaURL}`:"");console.log(`${title}
${subtitle}
${content_}
`);let push=eval("process.env.SUB_STORE_PUSH_SERVICE");if(push)if(/^https?:\/\//.test(push)){let e=push.replace("[\u63A8\u9001\u6807\u9898]",encodeURIComponent(title||"Sub-Store")).replace("[\u63A8\u9001\u5185\u5BB9]",encodeURIComponent([subtitle,content_].map(r=>r).join(`
`)));Xa().get({url:e}).then(r=>{console.log(`[Push Service] URL: ${e}
RES: ${r.statusCode} ${r.body}`)}).catch(r=>{console.log(`[Push Service] URL: ${e}
ERROR: ${r}`)})}else{let{execFile}=eval('require("child_process")');execFile("shoutrrr",["send","--url",push,"--message",`${title}
${subtitle}
${content_}`],(e,t,r)=>{if(e){console.log(`[Push Service] URL: ${push}
ERROR: ${e}`);return}r&&console.log(`[Push Service] URL: ${push}
stderr: ${r}`),console.log(`[Push Service] URL: ${push}
stdout: ${t}`)})}}ju&&$Plugins.Notify(title,subtitle+`
`+content)}log(e){this.debug&&console.log(`[${this.name}] LOG: ${e}`)}info(e){console.log(`[${this.name}] INFO: ${e}`)}error(e){console.log(`[${this.name}] ERROR: ${e}`)}wait(e){return new Promise(t=>setTimeout(t,e))}done(e={}){Lu||Wa||Uu||ju?$done(e):Js&&typeof $context<"u"&&($context.headers=e.headers,$context.statusCode=e.statusCode,$context.body=e.body)}};function on(){return{isQX:Lu,isLoon:Wa,isSurge:Uu,isNode:Js,isStash:cE,isShadowRocket:fE,isEgern:A9,isLanceX:E9,isGUIforCores:ju}}function Xa(defaultOptions={baseURL:""}){let{isQX,isLoon,isSurge,isNode,isGUIforCores}=on(),methods=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],URL_REGEX=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/;function send(method,options){options=typeof options=="string"?{url:options}:options;let baseURL=defaultOptions.baseURL;baseURL&&!URL_REGEX.test(options.url||"")&&(options.url=baseURL?baseURL+options.url:options.url),options={...defaultOptions,...options};let timeout=options.timeout,events={onRequest:()=>{},onResponse:e=>e,onTimeout:()=>{},...options.events};if(events.onRequest(method,options),options.node&&isSurge){let e=$environment["surge-build"];e&&parseInt(e)>=2407&&(options["policy-descriptor"]=options.node,delete options.node)}let worker;isQX?worker=$task.fetch({method,url:options.url,headers:options.headers,body:options.body,opts:options.opts}):isLoon||isSurge||isNode?worker=new Promise(async(resolve,reject)=>{let body=options.body,opts=JSON.parse(JSON.stringify(options));if(opts.body=body,opts.timeout=opts.timeout||8e3,opts.timeout&&(opts.timeout++,isNaN(opts.timeout)&&(opts.timeout=8e3),!isNode)){let e="ms";(isSurge||cE||fE)&&(opts.timeout=Math.ceil(opts.timeout/1e3),e="s")}if(isNode){let undici=eval("require('undici')"),{socksDispatcher}=eval("require('fetch-socks')"),{ProxyAgent,EnvHttpProxyAgent,request,interceptors}=undici,agentOpts={connect:{rejectUnauthorized:!(opts.strictSSL===!1||opts.insecure===!0||opts.rejectUnauthorized===!1)},bodyTimeout:opts.timeout,headersTimeout:opts.timeout,maxHeaderSize:eval("process.env.SUB_STORE_MAX_HEADER_SIZE")||32*1024},tlsOptions={rejectUnauthorized:agentOpts.connect.rejectUnauthorized};opts.tls={...opts.tls||{},...tlsOptions};try{let url=new URL(opts.url);(url.username||url.password)&&(opts.headers={...opts.headers||{},Authorization:`Basic ${Buffer.from(`${url.username||""}:${url.password||""}`).toString("base64")}`});let dispatcher;if(!opts.proxy){let allProxy=eval("process.env.all_proxy")||eval("process.env.ALL_PROXY");allProxy&&/^socks5:\/\//.test(allProxy)&&(opts.proxy=allProxy)}opts.proxy?/^socks5:\/\//.test(opts.proxy)?dispatcher=socksDispatcher(b9(opts.proxy),{...agentOpts,requestTls:tlsOptions}):dispatcher=new ProxyAgent({...agentOpts,uri:opts.proxy,requestTls:tlsOptions}):dispatcher=new EnvHttpProxyAgent({...agentOpts,requestTls:tlsOptions});let response=await request(opts.url,{...opts,method:method.toUpperCase(),dispatcher:dispatcher.compose(interceptors.redirect({maxRedirections:3,throwOnMaxRedirects:!0}))});resolve({statusCode:response.statusCode,headers:response.headers,body:opts.encoding===null?await response.body.arrayBuffer():await response.body.text()})}catch(e){reject(e)}}else $httpClient[method.toLowerCase()](opts,(e,t,r)=>{e?reject(e):resolve({statusCode:t.status||t.statusCode,headers:t.headers,body:r})})}):isGUIforCores&&(worker=new Promise(async(e,t)=>{try{let r=await $Plugins.Requests({method,url:options.url,headers:options.headers,body:options.body,autoTransformBody:!1,options:{Proxy:options.proxy,Timeout:options.timeout?options.timeout/1e3:15}});e({statusCode:r.status,headers:r.headers,body:r.body})}catch(r){t(r)}}));let timeoutid,timer=timeout?new Promise((e,t)=>{timeoutid=setTimeout(()=>(events.onTimeout(),t(`${method} URL: ${options.url} exceeds the timeout ${timeout} ms`)),timeout)}):null;return(timer?Promise.race([timer,worker]).then(e=>(typeof clearTimeout<"u"&&clearTimeout(timeoutid),e)):worker).then(e=>events.onResponse(e))}let http={};return methods.forEach(e=>http[e.toLowerCase()]=t=>send(e,t)),http}var y9=new Nd("sub-store"),O=y9;function jl(){_9()}function _9(){let e=O.read(Q1);e||C9(),e!=="2.0"&&O.write("2.0",Q1)}function C9(){O.info("Start migrating...");let e=O.read(vr)||{},t=Object.values(e).map(w=>(w.source=w.source||"remote",p(w),h(w),w));O.write(t,vr);let r=O.read(ar)||{},n=Object.values(r).map(w=>(delete w.ua,p(w),h(w),w));O.write(n,ar);let i=O.read(Gt)||{},a=Object.values(i);O.write(a,Gt);let s=O.read(gf)||{},u=Object.values(s);O.write(u,gf);let l=O.read(xt)||{},f=Object.values(l);O.write(f,xt);let d=O.read(ls)||{},g=Object.values(d);O.write(g,ls),delete O.cache.builtin,O.info("Migration complete!");function p(w){let v=w["display-name"];v&&(w.displayName=v,delete w["display-name"])}function h(w){let v=w.process;if(!v||v.length===0)return;let y=[],m={type:"Quick Setting Operator",args:{udp:"DEFAULT",tfo:"DEFAULT",scert:"DEFAULT","vmess aead":"DEFAULT",useless:"DEFAULT"}};for(let b of v)if(b.type){if(b.type==="Useless Filter")m.args.useless="ENABLED";else if(b.type==="Set Property Operator"){let{key:D,value:C}=b.args;switch(D){case"udp":m.args.udp=C?"ENABLED":"DISABLED";break;case"tfo":m.args.tfo=C?"ENABLED":"DISABLED";break;case"skip-cert-verify":m.args.scert=C?"ENABLED":"DISABLED";break;case"aead":m.args["vmess aead"]=C?"ENABLED":"DISABLED";break}}else if(b.type.indexOf("Keyword")===-1)if(b.type==="Flag Operator"){let D=typeof b.args>"u"?!0:b.args;b.args={mode:D?"add":"remove"},y.push(b)}else y.push(b)}y.unshift(m),w.process=y}}function ig({substore:$,port,host}){let{isNode}=on(),DEFAULT_HEADERS={"Content-Type":"text/plain;charset=UTF-8","Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST,GET,OPTIONS,PATCH,PUT,DELETE","Access-Control-Allow-Headers":"Origin, X-Requested-With, Content-Type, Accept","X-Powered-By":isNode&&eval("process.env.SUB_STORE_X_POWERED_BY")||"Sub-Store"};if(isNode){let express_=eval('require("express")'),bodyParser=eval('require("body-parser")'),app=express_(),limit=eval("process.env.SUB_STORE_BODY_JSON_LIMIT")||"1mb";return $.info(`[BACKEND] body JSON limit: ${limit}`),app.use(bodyParser.json({verify:rawBodySaver,limit})),app.use(bodyParser.urlencoded({verify:rawBodySaver,extended:!0})),app.use(bodyParser.raw({verify:rawBodySaver,type:"*/*"})),app.use((e,t,r)=>{t.set(DEFAULT_HEADERS),r()}),app.start=()=>{app.get("*",function(t,r){r.status(404).end()});let e=app.listen(port,host,()=>{let{address:t,port:r}=e.address();$.info(`[BACKEND] listening on ${t}:${r}`)})},app}let handlers=[],METHODS_NAMES=["GET","POST","PUT","DELETE","PATCH","OPTIONS","HEAD'","ALL"],dispatch=(e,t=0)=>{let{method:r,url:n,headers:i,body:a}=e;i=D9(i),/json/i.test(i["content-type"])&&(a=JSON.parse(a)),r=r.toUpperCase();let{path:s,query:u}=S9(n),l=null,f,d=0;for(f=t;f<handlers.length;f++)if(handlers[f].method==="ALL"||r===handlers[f].method){let{pattern:g}=handlers[f];F9(g,s)&&g.split("/").length>d&&(l=handlers[f],d=g.split("/").length)}if(l){let g=()=>{dispatch(r,n,f)},p={method:r,url:n,path:s,query:u,params:hE(l.pattern,s),headers:i,body:a},h=Response(),w=l.callback,v=y=>{h.status(500).json({status:"failed",message:`Internal Server Error: ${y}`})};if(w.constructor.name==="AsyncFunction")w(p,h,g).catch(v);else try{w(p,h,g)}catch(y){v(y)}}else Response().status(404).json({status:"failed",message:"ERROR: 404 not found"})},app={};return METHODS_NAMES.forEach(e=>{app[e.toLowerCase()]=(t,r)=>{handlers.push({method:e,pattern:t,callback:r})}}),app.route=e=>{let t={};return METHODS_NAMES.forEach(r=>{t[r.toLowerCase()]=n=>(handlers.push({method:r,pattern:e,callback:n}),t)}),t},app.start=()=>{dispatch($request)},app;function rawBodySaver(e,t,r,n){r&&r.length&&(e.rawBody=r.toString(n||"utf8"))}function Response(){let e=200,{isQX:t,isLoon:r,isSurge:n,isGUIforCores:i}=on(),a=DEFAULT_HEADERS,s={200:"HTTP/1.1 200 OK",201:"HTTP/1.1 201 Created",302:"HTTP/1.1 302 Found",307:"HTTP/1.1 307 Temporary Redirect",308:"HTTP/1.1 308 Permanent Redirect",404:"HTTP/1.1 404 Not Found",500:"HTTP/1.1 500 Internal Server Error"};return new class{status(u){return e=u,this}send(u=""){let l={status:t?s[e]:e,body:u,headers:a};t||i?$done(l):(r||n)&&$done({response:l})}end(){this.send()}html(u){this.set("Content-Type","text/html;charset=UTF-8"),this.send(u)}json(u){this.set("Content-Type","application/json;charset=UTF-8"),this.send(JSON.stringify(u))}set(u,l){return a[u]=l,this}}}}function D9(e){let t={};for(let r of Object.keys(e))t[r.toLowerCase()]=e[r];return t}function F9(e,t){if(e instanceof RegExp&&e.test(t))return!0;if(e==="/")return!0;if(e.indexOf(":")===-1){let r=t.split("/"),n=e.split("/");for(let i=0;i<n.length;i++)if(r[i]!==n[i])return!1;return!0}else if(hE(e,t))return!0;return!1}function S9(e){let r=(e.match(/https?:\/\/[^/]+(\/[^?]*)/)||[])[1]||"/",n=e.indexOf("?"),i={};if(n!==-1){let a=e.slice(e.indexOf("?")+1).split("&");for(let s=0;s<a.length;s++){let u=a[s].split("=");i[u[0]]=decodeURIComponent(u[1])}}return{path:r,query:i}}function hE(e,t){if(e.indexOf(":")===-1)return null;{let r={};for(let n=0,i=0;n<e.length;n++,i++)if(e[n]===":"){let a=[],s=[];for(;e[++n]!=="/"&&n<e.length;)a.push(e[n]);for(;t[i]!=="/"&&i<t.length;)s.push(t[i++]);r[a.join("")]=decodeURIComponent(s.join(""))}else if(e[n]!==t[i])return null;return r}}function Tt(e,t,r="name"){return e.find(n=>n[r]===t)}function dE(e,t,r="name"){return e.findIndex(n=>n[r]===t)}function Fs(e,t,r="name"){let n=dE(e,t,r);e.splice(n,1)}function Ss(e,t,r,n="name"){let i=dE(e,t,n);e[i]=r}function ze(e,t,r){e.status(r||200).json({status:"success",data:t})}function Ge(e,t,r){e.status(r||500).json({status:"failed",error:{code:t.code,type:t.type,message:t.message,details:e.req?.route?.path?.startsWith("/share/")?"\u8BE6\u60C5\u8BF7\u67E5\u770B\u65E5\u5FD7":t.details}})}var Hl=class{constructor(t,r,n){this.code=t,this.message=r,this.details=n}},Dn=class extends Hl{constructor(t,r,n){super(t,r,n),this.type="InternalServerError"}},Ot=class extends Hl{constructor(t,r,n){super(t,r,n),this.type="RequestInvalidError"}},Xr=class extends Hl{constructor(t,r,n){super(t,r,n),this.type="ResourceNotFoundError"}},Ld=class extends Hl{constructor(t,r,n){super(t,r,n),this.type="NetworkError"}};var Gd=un(FE()),Q9=/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$/,e7=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;function qr(e){return Q9.test(e)}function Jr(e){return e7.test(e)}function SE(e){return/^((6553[0-5])|(655[0-2][0-9])|(65[0-4][0-9]{2})|(6[0-4][0-9]{3})|([1-5][0-9]{4})|([0-5]{0,5})|([0-9]{1,4}))$/.test(e)}function ra(e){return typeof e=="string"&&e.trim().length>0}function ur(e,t){return ra(e)?e:t}function Kl(e){return typeof e<"u"&&e!==null}function zl(e,t){return Kl(e)?e:t}function Za(e){return e?/^.+?\s*?=\s*?.+?\s*?,.+?/.test(e)?{"policy-descriptor":e}:{policy:e}:{}}function t7(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}function Af(e){let t=e.split(/,|\//),r=t[Math.floor(Math.random()*t.length)];if(r.includes("-")){let[n,i]=r.split("-").map(Number);return t7(n,i)}else return Number(r)}function IE(e){return Number.isSafeInteger(e)?String(e):BigInt(e).toString()}function Yd(e){return typeof e=="string"&&/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e)}function Hu(e,t="YYYY-MM-DD_HH-mm-ss"){let r=e instanceof Date?e:new Date(e);if(isNaN(r.getTime()))return"";let n=a=>String(a).padStart(2,"0"),i={YYYY:r.getFullYear(),MM:n(r.getMonth()+1),DD:n(r.getDate()),HH:n(r.getHours()),mm:n(r.getMinutes()),ss:n(r.getSeconds())};return t.replace(/YYYY|MM|DD|HH|mm|ss/g,a=>i[a])}function mg(e){O.read(ar)||O.write({},ar),e.route("/api/collection/:name").get(n7).patch(i7).delete(s7),e.route("/api/collections").get(a7).post(r7).put(u7)}function r7(e,t){let r=e.body;if(O.info(`\u6B63\u5728\u521B\u5EFA\u7EC4\u5408\u8BA2\u9605\uFF1A${r.name}`),/\//.test(r.name)){Ge(t,new Ot("INVALID_NAME",`Collection ${r.name} is invalid`));return}let n=O.read(ar);if(Tt(n,r.name)){Ge(t,new Ot("DUPLICATE_KEY",`Collection ${r.name} already exists.`));return}n.push(r),O.write(n,ar),ze(t,r,201)}function n7(e,t){let{name:r}=e.params,{raw:n}=e.query,i=O.read(ar),a=Tt(i,r);a?n?t.set("content-type","application/json").set("content-disposition",`attachment; filename="${encodeURIComponent(`sub-store_collection_${r}_${Hu(new Date)}.json`)}"`).send(JSON.stringify(a)):ze(t,a):Ge(t,new Xr("SUBSCRIPTION_NOT_FOUND",`Collection ${r} does not exist`,404))}function i7(e,t){let{name:r}=e.params,n=e.body,i=O.read(ar),a=Tt(i,r);if(a){let s={...a,...n};if(O.info(`\u6B63\u5728\u66F4\u65B0\u7EC4\u5408\u8BA2\u9605\uFF1A${r}...`),r!==s.name){let u=O.read(Gt)||[];for(let f of u)f.type==="collection"&&f.source===a.name&&(f.source=s.name);let l=O.read(xt)||[];for(let f of l)f.sourceType==="collection"&&f.sourceName===a.name&&(f.sourceName=s.name);O.write(u,Gt),O.write(l,xt)}Ss(i,r,s),O.write(i,ar),ze(t,s)}else Ge(t,new Xr("RESOURCE_NOT_FOUND",`Collection ${r} does not exist!`),404)}function s7(e,t){let{name:r}=e.params;O.info(`\u6B63\u5728\u5220\u9664\u7EC4\u5408\u8BA2\u9605\uFF1A${r}`);let n=O.read(ar);Fs(n,r),O.write(n,ar),ze(t)}function a7(e,t){let r=O.read(ar);ze(t,r)}function u7(e,t){let r=e.body;O.write(r,ar),ze(t)}var vg=0;function Mi(e){return l7(o7(c7(e)))}function o7(e){return h7(d7(f7(e),e.length*8))}function l7(e){try{}catch{vg=0}for(var t=vg?"0123456789ABCDEF":"0123456789abcdef",r="",n,i=0;i<e.length;i++)n=e.charCodeAt(i),r+=t.charAt(n>>>4&15)+t.charAt(n&15);return r}function c7(e){for(var t="",r=-1,n,i;++r<e.length;)n=e.charCodeAt(r),i=r+1<e.length?e.charCodeAt(r+1):0,55296<=n&&n<=56319&&56320<=i&&i<=57343&&(n=65536+((n&1023)<<10)+(i&1023),r++),n<=127?t+=String.fromCharCode(n):n<=2047?t+=String.fromCharCode(192|n>>>6&31,128|n&63):n<=65535?t+=String.fromCharCode(224|n>>>12&15,128|n>>>6&63,128|n&63):n<=2097151&&(t+=String.fromCharCode(240|n>>>18&7,128|n>>>12&63,128|n>>>6&63,128|n&63));return t}function f7(e){for(var t=Array(e.length>>2),r=0;r<t.length;r++)t[r]=0;for(var r=0;r<e.length*8;r+=8)t[r>>5]|=(e.charCodeAt(r/8)&255)<<r%32;return t}function h7(e){for(var t="",r=0;r<e.length*32;r+=8)t+=String.fromCharCode(e[r>>5]>>>r%32&255);return t}function d7(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,i=-1732584194,a=271733878,s=0;s<e.length;s+=16){var u=r,l=n,f=i,d=a;r=Nn(r,n,i,a,e[s+0],7,-680876936),a=Nn(a,r,n,i,e[s+1],12,-389564586),i=Nn(i,a,r,n,e[s+2],17,606105819),n=Nn(n,i,a,r,e[s+3],22,-1044525330),r=Nn(r,n,i,a,e[s+4],7,-176418897),a=Nn(a,r,n,i,e[s+5],12,1200080426),i=Nn(i,a,r,n,e[s+6],17,-1473231341),n=Nn(n,i,a,r,e[s+7],22,-45705983),r=Nn(r,n,i,a,e[s+8],7,1770035416),a=Nn(a,r,n,i,e[s+9],12,-1958414417),i=Nn(i,a,r,n,e[s+10],17,-42063),n=Nn(n,i,a,r,e[s+11],22,-1990404162),r=Nn(r,n,i,a,e[s+12],7,1804603682),a=Nn(a,r,n,i,e[s+13],12,-40341101),i=Nn(i,a,r,n,e[s+14],17,-1502002290),n=Nn(n,i,a,r,e[s+15],22,1236535329),r=Ln(r,n,i,a,e[s+1],5,-165796510),a=Ln(a,r,n,i,e[s+6],9,-1069501632),i=Ln(i,a,r,n,e[s+11],14,643717713),n=Ln(n,i,a,r,e[s+0],20,-373897302),r=Ln(r,n,i,a,e[s+5],5,-701558691),a=Ln(a,r,n,i,e[s+10],9,38016083),i=Ln(i,a,r,n,e[s+15],14,-660478335),n=Ln(n,i,a,r,e[s+4],20,-405537848),r=Ln(r,n,i,a,e[s+9],5,568446438),a=Ln(a,r,n,i,e[s+14],9,-1019803690),i=Ln(i,a,r,n,e[s+3],14,-187363961),n=Ln(n,i,a,r,e[s+8],20,1163531501),r=Ln(r,n,i,a,e[s+13],5,-1444681467),a=Ln(a,r,n,i,e[s+2],9,-51403784),i=Ln(i,a,r,n,e[s+7],14,1735328473),n=Ln(n,i,a,r,e[s+12],20,-1926607734),r=Un(r,n,i,a,e[s+5],4,-378558),a=Un(a,r,n,i,e[s+8],11,-2022574463),i=Un(i,a,r,n,e[s+11],16,1839030562),n=Un(n,i,a,r,e[s+14],23,-35309556),r=Un(r,n,i,a,e[s+1],4,-1530992060),a=Un(a,r,n,i,e[s+4],11,1272893353),i=Un(i,a,r,n,e[s+7],16,-155497632),n=Un(n,i,a,r,e[s+10],23,-1094730640),r=Un(r,n,i,a,e[s+13],4,681279174),a=Un(a,r,n,i,e[s+0],11,-358537222),i=Un(i,a,r,n,e[s+3],16,-722521979),n=Un(n,i,a,r,e[s+6],23,76029189),r=Un(r,n,i,a,e[s+9],4,-640364487),a=Un(a,r,n,i,e[s+12],11,-421815835),i=Un(i,a,r,n,e[s+15],16,530742520),n=Un(n,i,a,r,e[s+2],23,-995338651),r=jn(r,n,i,a,e[s+0],6,-198630844),a=jn(a,r,n,i,e[s+7],10,1126891415),i=jn(i,a,r,n,e[s+14],15,-1416354905),n=jn(n,i,a,r,e[s+5],21,-57434055),r=jn(r,n,i,a,e[s+12],6,1700485571),a=jn(a,r,n,i,e[s+3],10,-1894986606),i=jn(i,a,r,n,e[s+10],15,-1051523),n=jn(n,i,a,r,e[s+1],21,-2054922799),r=jn(r,n,i,a,e[s+8],6,1873313359),a=jn(a,r,n,i,e[s+15],10,-30611744),i=jn(i,a,r,n,e[s+6],15,-1560198380),n=jn(n,i,a,r,e[s+13],21,1309151649),r=jn(r,n,i,a,e[s+4],6,-145523070),a=jn(a,r,n,i,e[s+11],10,-1120210379),i=jn(i,a,r,n,e[s+2],15,718787259),n=jn(n,i,a,r,e[s+9],21,-343485551),r=Mu(r,u),n=Mu(n,l),i=Mu(i,f),a=Mu(a,d)}return Array(r,n,i,a)}function Wd(e,t,r,n,i,a){return Mu(p7(Mu(Mu(t,e),Mu(n,a)),i),r)}function Nn(e,t,r,n,i,a,s){return Wd(t&r|~t&n,e,t,i,a,s)}function Ln(e,t,r,n,i,a,s){return Wd(t&n|r&~n,e,t,i,a,s)}function Un(e,t,r,n,i,a,s){return Wd(t^r^n,e,t,i,a,s)}function jn(e,t,r,n,i,a,s){return Wd(r^(t|~n),e,t,i,a,s)}function Mu(e,t){var r=(e&65535)+(t&65535),n=(e>>16)+(t>>16)+(r>>16);return n<<16|r&65535}function p7(e,t){return e<<t|e>>>32-t}var wg=class{constructor(){this.expires=g7(),O.read(To)||O.write("{}",To);try{this.resourceCache=JSON.parse(O.read(To))}catch(t){O.error(`\u89E3\u6790\u6301\u4E45\u5316\u7F13\u5B58\u4E2D\u7684 ${To} \u5931\u8D25, \u91CD\u7F6E\u4E3A {}, \u9519\u8BEF: ${t?.message??t}`),this.resourceCache={},O.write("{}",To)}this._cleanup()}_cleanup(){let t=!1;Object.entries(this.resourceCache).forEach(r=>{let[n,i]=r;i.time||(delete this.resourceCache[n],O.delete(`#${n}`),t=!0),new Date().getTime()-i.time>this.expires&&(delete this.resourceCache[n],t=!0)}),t&&this._persist()}revokeAll(){this.resourceCache={},this._persist()}_persist(){O.write(JSON.stringify(this.resourceCache),To)}get(t){let r=this.resourceCache[t]&&this.resourceCache[t].time;return r&&new Date().getTime()-r<=this.expires?this.resourceCache[t].data:null}gettime(t){let r=this.resourceCache[t]&&this.resourceCache[t].time;return r&&new Date().getTime()-r<=this.expires?this.resourceCache[t].time:null}set(t,r){this.resourceCache[t]={time:new Date().getTime(),data:r},this._persist()}};function g7(){O.read(Rd)||O.write("6e4",Rd);let e=6e4;if(O.env.isLoon){let t={"1\u5206\u949F":6e4,"5\u5206\u949F":3e5,"10\u5206\u949F":6e5,"30\u5206\u949F":18e5,"1\u5C0F\u65F6":36e5,"2\u5C0F\u65F6":72e5,"3\u5C0F\u65F6":108e5,"6\u5C0F\u65F6":216e5,"12\u5C0F\u65F6":432e5,"24\u5C0F\u65F6":864e5,"48\u5C0F\u65F6":1728e5,"72\u5C0F\u65F6":2592e5,\u53C2\u6570\u4F20\u5165:"readcachets"},r=O.read("#\u54CD\u5E94\u5934\u7F13\u5B58\u6709\u6548\u671F");return r in t&&(e=t[r],e==="readcachets"&&(e=r)),e}else return e=O.read(Rd),e}var Lo=new wg;function Gl(e){let t=Object.keys(e),r="",n="",i="";for(let a of t){let s=a.toLowerCase();s==="subscription-userinfo"?r=e[a]:s==="profile-web-page-url"?n=e[a]:s==="plan-name"&&(i=e[a])}return`${r||""}${n?`; app_url=${encodeURIComponent(n)}`:""}${i?`; plan_name=${encodeURIComponent(i)}`:""}`}async function na(rawUrl,ua,timeout,customProxy,flowUrl){let url=flowUrl||rawUrl||"",$arguments={},rawArgs=url.split("#");if(url=url.split("#")[0],rawArgs.length>1)try{$arguments=JSON.parse(decodeURIComponent(rawArgs[1]))}catch{for(let t of rawArgs[1].split("&")){let r=t.split("=")[0],n=t.split("=")[1];$arguments[r]=n==null||n===""?!0:decodeURIComponent(n)}}if($arguments?.noFlow||!/^https?/.test(url))return;let{isStash,isLoon,isShadowRocket,isQX}=on(),insecure=$arguments?.insecure?O.env.isNode?{strictSSL:!1}:{insecure:!0}:void 0,{defaultProxy,defaultFlowUserAgent,defaultTimeout}=O.read(Ht),proxy=customProxy||defaultProxy;O.env.isNode&&(proxy=proxy||eval("process.env.SUB_STORE_BACKEND_DEFAULT_PROXY"));let userAgent=ua||defaultFlowUserAgent||"clash.meta/v1.19.16",requestTimeout=timeout||defaultTimeout||8e3,id=Mi(userAgent+url),cached=Lo.get(id),flowInfo;if(!$arguments?.noCache&&cached)O.info(`\u4F7F\u7528\u7F13\u5B58\u7684\u6D41\u91CF\u4FE1\u606F: ${url}, ${userAgent}`),flowInfo=cached;else{let e=Xa();if(flowUrl){O.info(`\u4F7F\u7528 GET \u65B9\u6CD5\u4ECE\u54CD\u5E94\u4F53\u83B7\u53D6\u6D41\u91CF\u4FE1\u606F: ${flowUrl}, User-Agent: ${userAgent||""}, Insecure: ${!!insecure}, Proxy: ${proxy}`);let{body:t,statusCode:r}=await e.get({url:flowUrl,headers:{"User-Agent":userAgent},timeout:requestTimeout,...proxy?{proxy}:{},...isLoon&&proxy?{node:proxy}:{},...isQX&&proxy?{opts:{policy:proxy}}:{},...proxy?Za(proxy):{},...insecure||{}});if(r<200||r>=400)throw new Error(`statusCode: ${r}`);flowInfo=t}else{try{O.info(`\u4F7F\u7528 HEAD \u65B9\u6CD5\u4ECE\u54CD\u5E94\u5934\u83B7\u53D6\u6D41\u91CF\u4FE1\u606F: ${url}, User-Agent: ${userAgent||""}, Insecure: ${!!insecure}, Proxy: ${proxy}`);let{headers:t}=await e.head({url:url.split(/[\r\n]+/).map(r=>r.trim()).filter(r=>r.length)[0],headers:{"User-Agent":userAgent,...isStash&&proxy?{"X-Stash-Selected-Proxy":encodeURIComponent(proxy)}:{},...isShadowRocket&&proxy?{"X-Surge-Policy":proxy}:{}},timeout:requestTimeout,...proxy?{proxy}:{},...isLoon&&proxy?{node:proxy}:{},...isQX&&proxy?{opts:{policy:proxy}}:{},...proxy?Za(proxy):{},...insecure||{}});flowInfo=Gl(t)}catch(t){O.error(`\u4F7F\u7528 HEAD \u65B9\u6CD5\u4ECE\u54CD\u5E94\u5934\u83B7\u53D6\u6D41\u91CF\u4FE1\u606F\u5931\u8D25: ${url}, User-Agent: ${userAgent||""}, Insecure: ${!!insecure}, Proxy: ${proxy}: ${t.message??t}`)}if(!flowInfo){O.info(`\u4F7F\u7528 GET \u65B9\u6CD5\u83B7\u53D6\u6D41\u91CF\u4FE1\u606F: ${url}, User-Agent: ${userAgent||""}, Insecure: ${!!insecure}, Proxy: ${proxy}`);let{headers:t}=await e.get({url:url.split(/[\r\n]+/).map(r=>r.trim()).filter(r=>r.length)[0],headers:{"User-Agent":userAgent,...isStash&&proxy?{"X-Stash-Selected-Proxy":encodeURIComponent(proxy)}:{},...isShadowRocket&&proxy?{"X-Surge-Policy":proxy}:{}},timeout:requestTimeout,...proxy?{proxy}:{},...isLoon&&proxy?{node:proxy}:{},...isQX&&proxy?{opts:{policy:proxy}}:{},...proxy?Za(proxy):{},...insecure||{}});flowInfo=Gl(t)}}flowInfo&&(flowInfo=flowInfo.trim()),flowInfo&&Lo.set(id,flowInfo)}return flowInfo}function Uo(e){if(!e)return;let t=e.match(/upload=([-+]?)([0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)/),r=t==null?0:Number(t[1]+t[2]),n=e.match(/download=([-+]?)([0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)/),i=Number(n[1]+n[2]),a=e.match(/total=([-+]?)([0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)/),s=Number(a[1]+a[2]),u=e.match(/expire=([-+]?)([0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)/),l=u?Number(u[1]+u[2]):void 0,f=e.match(/reset_day=([0-9]+)/),d=f?Number(f[1]):void 0,g=e.match(/app_url=(.*?)\s*?(;|$)/),p=g?decodeURIComponent(g[1]):void 0,h=e.match(/plan_name=(.*?)\s*?(;|$)/),w=h?decodeURIComponent(h[1]):void 0;return{expires:l,total:s,usage:{upload:r,download:i},remainingDays:d,appUrl:p,planName:w}}function Ef(e,t="B"){let r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],n=r.indexOf(t);return e<1024||n===r.length-1?{value:(Math.round(e*100)/100).toString(),unit:t}:Ef(e/1024,r[++n])}function Xd(e){if(!e)throw new Error("\u6CA1\u6709\u6D41\u91CF\u4FE1\u606F");if(e?.expires&&e.expires*1e3<Date.now()){let t=new Date(e.expires*1e3).toLocaleDateString();throw new Error(`\u8BA2\u9605\u5DF2\u8FC7\u671F: ${t}`)}if(e?.total){let t=e.usage?.upload||0,r=e.usage?.download||0;if(e.total-t-r<0){let n=t+r,i=Ef(Math.abs(n));i.value=n<0?"-"+i.value:i.value;let a=Ef(e.total);throw new Error(`\u6D41\u91CF\u5DF2\u7528\u5B8C: ${i.value} ${i.unit} / ${a.value} ${a.unit}`)}}}function Jd(e={}){try{let{resetDay:t,startDate:r,cycleDays:n}=e;if(["string","number"].includes(typeof e)&&(t=e),r&&n){if(n=parseInt(n),isNaN(n)||n<=0)throw new Error("\u91CD\u7F6E\u5468\u671F\u5E94\u4E3A\u6B63\u6574\u6570");if(!r||!Date.parse(r))throw new Error("\u5F00\u59CB\u65E5\u671F\u4E0D\u5408\u6CD5");let i=new Date(r),a=new Date;if(i.setHours(0,0,0,0),a.setHours(0,0,0,0),i.getTime()>a.getTime())throw new Error("\u5F00\u59CB\u65E5\u671F\u5E94\u65E9\u4E8E\u73B0\u5728");let s=new Date(r);for(s.setDate(s.getDate()+n);s<a;)s.setDate(s.getDate()+n);s.setHours(0,0,0,0);let u=s.getTime()-a.getTime();return Math.ceil(u/(1e3*3600*24))}else{if(!t)return;if(t=parseInt(t),isNaN(t)||t<=0||t>31)throw new Error("\u6708\u91CD\u7F6E\u65E5\u5E94\u4E3A 1-31 \u4E4B\u95F4\u7684\u6574\u6570");let i=new Date,a=i.getDate(),s=i.getMonth(),u=i.getFullYear(),l;return t>a?l=0:l=new Date(u,s+1,0).getDate(),l-a+t}}catch(t){O.error(`getRmainingDays failed: ${t.message??t}`)}}function Zd(e,t){try{let r=new Map;e.split(";").map(a=>a.trim()).filter(Boolean).forEach(a=>{let s=a.indexOf("=");if(s===-1)return;let u=a.slice(0,s).trim(),l=a.slice(s+1).trim();if(!r.has(u))try{let f=decodeURIComponent(l);if(["upload","download","total","expire","reset_day"].includes(u))try{f=Number(f),["expire","reset_day"].includes(u)&&(f<=0||!Number.isFinite(f))?f="":["upload","download","total"].includes(u)&&!Number.isFinite(f)?f=0:f=f.toFixed(0)}catch(d){O.error(`Failed to convert value for key "${u}=${l}": ${d.message??d}`)}r.set(u,f)}catch{r.set(u,l)}});let n={},i={"subscription-userinfo":"","profile-web-page-url":"","plan-name":""};return r.forEach((a,s)=>{t&&s==="app_url"?i["profile-web-page-url"]=a:t&&s==="plan_name"?i["plan-name"]=a:n[s]=a}),Object.keys(n).length>0&&(i["subscription-userinfo"]=Object.entries(n).map(([a,s])=>`${a}=${encodeURIComponent(s)}`).join("; ")),t?i:i["subscription-userinfo"]}catch(r){return O.error(`normalizeFlowHeader failed: ${r.message??r}`),e}}O.read(vr)||O.write({},vr);function Ag(e){e.get("/api/sub/flow/:name",m7),e.route("/api/sub/:name").get(w7).patch(A7).delete(E7),e.route("/api/subs").get(b7).post(v7).put(y7)}async function m7(e,t){let{name:r}=e.params,{url:n}=e.query;n&&O.info(`\u6307\u5B9A\u8FDC\u7A0B\u8BA2\u9605 URL: ${n}`);let i=O.read(vr),a=Tt(i,r);if(!a){Ge(t,new Xr("RESOURCE_NOT_FOUND",`Subscription ${r} does not exist!`),404);return}if(a.source==="local"&&!["localFirst","remoteFirst"].includes(a.mergeSources)){if(a.subUserinfo){let s;if(/^https?:\/\//.test(a.subUserinfo))try{s=await na(void 0,void 0,void 0,a.proxy,a.subUserinfo)}catch(u){O.error(`\u8BA2\u9605 ${r} \u4F7F\u7528\u81EA\u5B9A\u4E49\u6D41\u91CF\u94FE\u63A5 ${a.subUserinfo} \u83B7\u53D6\u6D41\u91CF\u4FE1\u606F\u65F6\u53D1\u751F\u9519\u8BEF: ${JSON.stringify(u)}`)}else s=a.subUserinfo;try{ze(t,{...Uo(s)})}catch(u){O.error(`Failed to parse flow info for local subscription ${r}: ${u.message??u}`),Ge(t,new Ot("NO_FLOW_INFO","N/A","Failed to parse flow info"))}}else Ge(t,new Ot("NO_FLOW_INFO","N/A",`Local subscription ${r} has no flow information!`));return}try{n=`${n||a.url}`.split(/[\r\n]+/).map(f=>f.trim()).filter(f=>f.length)?.[0]||"";let s={},u=n.split("#");if(n=n.split("#")[0],u.length>1)try{s=JSON.parse(decodeURIComponent(u[1]))}catch{for(let d of u[1].split("&")){let g=d.split("=")[0],p=d.split("=")[1];s[g]=p==null||p===""?!0:decodeURIComponent(p)}}if(s.noFlow||!/^https?/.test(n)){Ge(t,new Ot("NO_FLOW_INFO","N/A",`Subscription ${r}: noFlow`));return}let l=await na(s?.insecure?`${n}#insecure`:n,s.flowUserAgent,void 0,a.proxy,s.flowUrl);if(!l&&!a.subUserinfo){Ge(t,new Dn("NO_FLOW_INFO","No flow info","Failed to fetch flow headers"));return}try{let f=Jd({resetDay:s.resetDay,startDate:s.startDate,cycleDays:s.cycleDays}),d;if(/^https?:\/\//.test(a.subUserinfo))try{d=await na(void 0,void 0,void 0,a.proxy,a.subUserinfo)}catch(p){O.error(`\u8BA2\u9605 ${r} \u4F7F\u7528\u81EA\u5B9A\u4E49\u6D41\u91CF\u94FE\u63A5 ${a.subUserinfo} \u83B7\u53D6\u6D41\u91CF\u4FE1\u606F\u65F6\u53D1\u751F\u9519\u8BEF: ${JSON.stringify(p)}`)}else d=a.subUserinfo;let g={...Uo([d,l].filter(p=>p).join("; "))};f!=null&&(g.remainingDays=f),ze(t,g)}catch(f){O.error(`Failed to parse flow info for local subscription ${r}: ${f.message??f}`),Ge(t,new Ot("NO_FLOW_INFO","N/A","Failed to parse flow info"))}}catch{Ge(t,new Ld("URL_NOT_ACCESSIBLE",`The URL for subscription ${r} is inaccessible.`))}}function v7(e,t){let r=e.body;if(delete r.subscriptions,O.info(`\u6B63\u5728\u521B\u5EFA\u8BA2\u9605\uFF1A ${r.name}`),/\//.test(r.name)){Ge(t,new Ot("INVALID_NAME",`Subscription ${r.name} is invalid`));return}let n=O.read(vr);if(Tt(n,r.name)){Ge(t,new Ot("DUPLICATE_KEY",`Subscription ${r.name} already exists.`));return}n.push(r),O.write(n,vr),ze(t,r,201)}function w7(e,t){let{name:r}=e.params,{raw:n}=e.query,i=O.read(vr),a=Tt(i,r);delete a.subscriptions,a?n?t.set("content-type","application/json").set("content-disposition",`attachment; filename="${encodeURIComponent(`sub-store_subscription_${r}_${Hu(new Date)}.json`)}"`).send(JSON.stringify(a)):ze(t,a):Ge(t,new Xr("SUBSCRIPTION_NOT_FOUND",`Subscription ${r} does not exist`,404))}function A7(e,t){let{name:r}=e.params,n=e.body;delete n.subscriptions;let i=O.read(vr),a=Tt(i,r);if(a){let s={...a,...n};if(O.info(`\u6B63\u5728\u66F4\u65B0\u8BA2\u9605\uFF1A ${r}`),r!==n.name){let u=O.read(ar)||[];for(let d of u){let g=d.subscriptions.indexOf(r);g!==-1&&(d.subscriptions[g]=n.name)}let l=O.read(Gt)||[];for(let d of l)d.type==="subscription"&&d.source==r&&(d.source=n.name);let f=O.read(xt)||[];for(let d of f)d.sourceType==="subscription"&&d.sourceName==r&&(d.sourceName=n.name);O.write(u,ar),O.write(l,Gt),O.write(f,xt)}Ss(i,r,s),O.write(i,vr),ze(t,s)}else Ge(t,new Xr("RESOURCE_NOT_FOUND",`Subscription ${r} does not exist!`),404)}function E7(e,t){let{name:r}=e.params;O.info(`\u5220\u9664\u8BA2\u9605\uFF1A${r}...`);let n=O.read(vr);Fs(n,r),O.write(n,vr);let i=O.read(ar);for(let a of i)a.subscriptions=a.subscriptions.filter(s=>s!==r);O.write(i,ar),ze(t)}function b7(e,t){let r=O.read(vr);ze(t,r)}function y7(e,t){let r=e.body;O.write(r,vr),ze(t)}var cs=class{constructor({token,key,syncPlatform}){let{isStash,isLoon,isShadowRocket,isQX}=on(),{defaultProxy,defaultTimeout:timeout,githubProxy}=O.read(Ht),proxy=defaultProxy;O.env.isNode&&(proxy=proxy||eval("process.env.SUB_STORE_BACKEND_DEFAULT_PROXY")),syncPlatform==="gitlab"?(this.headers={"PRIVATE-TOKEN":`${token}`,"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.141 Safari/537.36"},this.http=Xa({baseURL:"https://gitlab.com/api/v4",headers:{...this.headers,...isStash&&proxy?{"X-Stash-Selected-Proxy":encodeURIComponent(proxy)}:{},...isShadowRocket&&proxy?{"X-Surge-Policy":proxy}:{}},...proxy?{proxy}:{},...isLoon&&proxy?{node:proxy}:{},...isQX&&proxy?{opts:{policy:proxy}}:{},...proxy?Za(proxy):{},timeout:timeout||8e3,events:{onResponse:e=>{if(/^[45]/.test(String(e.statusCode))){let t=JSON.parse(e.body);return Promise.reject(`ERROR: ${t.message?.error??t.message}`)}else return e}}})):(this.headers={Authorization:`token ${token}`,"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.141 Safari/537.36"},this.http=Xa({baseURL:`${githubProxy?`${githubProxy}/`:""}https://api.github.com`,headers:{...this.headers,...isStash&&proxy?{"X-Stash-Selected-Proxy":encodeURIComponent(proxy)}:{},...isShadowRocket&&proxy?{"X-Surge-Policy":proxy}:{}},...proxy?{proxy}:{},...isLoon&&proxy?{node:proxy}:{},...isQX&&proxy?{opts:{policy:proxy}}:{},...proxy?Za(proxy):{},timeout:timeout||8e3,events:{onResponse:e=>/^[45]/.test(String(e.statusCode))?Promise.reject(`ERROR: ${JSON.parse(e.body).message}`):e}})),this.key=key,this.syncPlatform=syncPlatform}async locate(){return this.syncPlatform==="gitlab"?this.http.get("/snippets").then(e=>{let t=JSON.parse(e.body);for(let r of t)if(r.title===this.key)return r}):this.http.get("/gists?per_page=100&page=1").then(e=>{let t=JSON.parse(e.body);O.info(`\u83B7\u53D6\u5230\u5F53\u524D GitHub \u7528\u6237\u7684 gist: ${t.length} \u4E2A`);for(let r of t)if(r.description===this.key)return r})}async upload(e){if(Object.keys(e).length===0)return Promise.reject("\u672A\u63D0\u4F9B\u9700\u4E0A\u4F20\u7684\u6587\u4EF6");let t=await this.locate(),r=e;if(t?.id){this.syncPlatform==="gitlab"&&(t.files=t.files.reduce((a,s)=>(a[s.path]=s,a),{}));let n=[],i={...t.files};return Object.keys(r).map(a=>{i[a]?r[a].content==null||r[a].content===""?(delete i[a],n.push({action:"delete",file_path:a})):(i[a]=r[a],n.push({action:"update",file_path:a,content:r[a].content})):r[a].content==null||r[a].content===""?(delete i[a],delete r[a]):(i[a]=r[a],n.push({action:"create",file_path:a,content:r[a].content}))}),this.syncPlatform==="gitlab"?Object.keys(i).length===0?Promise.reject("\u672C\u6B21\u64CD\u4F5C\u5C06\u5BFC\u81F4\u6240\u6709\u6587\u4EF6\u7684\u5185\u5BB9\u90FD\u4E3A\u7A7A, \u65E0\u6CD5\u66F4\u65B0 snippet"):Object.keys(i).length>10?Promise.reject("\u672C\u6B21\u64CD\u4F5C\u5C06\u5BFC\u81F4 snippet \u7684\u6587\u4EF6\u6570\u8D85\u8FC7 10, \u65E0\u6CD5\u66F4\u65B0 snippet"):(r=n,this.http.put({headers:{...this.headers,"Content-Type":"application/json"},url:`/snippets/${t.id}`,body:JSON.stringify({files:r})})):Object.keys(i).length===0?Promise.reject("\u672C\u6B21\u64CD\u4F5C\u5C06\u5BFC\u81F4\u6240\u6709\u6587\u4EF6\u7684\u5185\u5BB9\u90FD\u4E3A\u7A7A, \u65E0\u6CD5\u66F4\u65B0 gist"):this.http.patch({url:`/gists/${t.id}`,body:JSON.stringify({files:r})})}else return r=Object.entries(r).reduce((n,[i,a])=>(a.content!==null&&a.content!==""&&(n[i]=a),n),{}),this.syncPlatform==="gitlab"?Object.keys(r).length===0?Promise.reject("\u6240\u6709\u6587\u4EF6\u7684\u5185\u5BB9\u90FD\u4E3A\u7A7A, \u65E0\u6CD5\u521B\u5EFA snippet"):(r=Object.keys(r).map(n=>({file_path:n,content:r[n].content})),this.http.post({headers:{...this.headers,"Content-Type":"application/json"},url:"/snippets",body:JSON.stringify({title:this.key,visibility:"private",files:r})})):Object.keys(r).length===0?Promise.reject("\u6240\u6709\u6587\u4EF6\u7684\u5185\u5BB9\u90FD\u4E3A\u7A7A, \u65E0\u6CD5\u521B\u5EFA gist"):this.http.post({url:"/gists",body:JSON.stringify({description:this.key,public:!1,files:r})})}async download(e){let t=await this.locate();if(t?.id)try{let{files:r}=await this.http.get(`/gists/${t.id}`).then(i=>JSON.parse(i.body)),n=r[e].raw_url;return await this.http.get(n).then(i=>i.body)}catch(r){return Promise.reject(r)}else return Promise.reject(`\u627E\u4E0D\u5230 Sub-Store Gist (${this.key})`)}};function Eg(e){O.read(Gt)||O.write({},Gt),e.get("/api/artifacts/restore",_7),e.route("/api/artifacts").get(C7).post(S7).put(D7),e.route("/api/artifact/:name").get(F7).patch(I7).delete(B7)}async function _7(e,t){O.info("\u5F00\u59CB\u6062\u590D\u8FDC\u7A0B\u914D\u7F6E...");try{let{gistToken:r,syncPlatform:n}=O.read(Ht);if(!r)return Promise.reject("\u672A\u8BBE\u7F6E GitHub Token\uFF01");let i=new cs({token:r,key:Ro,syncPlatform:n});try{let a=await i.locate();if(!a?.files)throw new Error("\u627E\u4E0D\u5230 Sub-Store Gist \u6587\u4EF6\u5217\u8868");let s=O.read(Gt),u=[];Object.keys(a.files).map(l=>{let f=a.files[l]?.filename;if(f)if(encodeURIComponent(f)!==f)O.error(`\u6587\u4EF6\u540D ${f} \u672A\u7F16\u7801 \u4E0D\u4FDD\u5B58`),u.push(f);else{let d=Tt(s,f);d?Ss(s,f,{...d,url:a.files[l]?.raw_url.replace(/\/raw\/[^/]*\/(.*)/,"/raw/$1")}):s.push({name:`${f}`,url:a.files[l]?.raw_url.replace(/\/raw\/[^/]*\/(.*)/,"/raw/$1")})}}),O.write(s,Gt)}catch(a){throw O.error(`\u67E5\u627E Sub-Store Gist \u65F6\u53D1\u751F\u9519\u8BEF: ${a.message??a}`),a}ze(t)}catch(r){O.error(`\u6062\u590D\u8FDC\u7A0B\u914D\u7F6E\u5931\u8D25\uFF0C\u539F\u56E0\uFF1A${r.message??r}`),Ge(t,new Dn("FAILED_TO_RESTORE_ARTIFACTS","Failed to restore artifacts",`Reason: ${r.message??r}`))}}function C7(e,t){let r=O.read(Gt);ze(t,r)}function D7(e,t){let r=e.body;O.write(r,Gt),ze(t)}async function F7(e,t){let{name:r}=e.params,n=O.read(Gt),i=Tt(n,r);i?ze(t,i):Ge(t,new Xr("RESOURCE_NOT_FOUND",`Artifact ${r} does not exist!`),404)}function S7(e,t){let r=e.body;if(!BE(r.name)){Ge(t,new Ot("INVALID_ARTIFACT_NAME",`Artifact name ${r.name} is invalid.`));return}O.info(`\u6B63\u5728\u521B\u5EFA\u8FDC\u7A0B\u914D\u7F6E\uFF1A${r.name}`);let n=O.read(Gt);Tt(n,r.name)?Ge(t,new Ot("DUPLICATE_KEY",`Artifact ${r.name} already exists.`)):(n.push(r),O.write(n,Gt),ze(t,r,201))}function I7(e,t){let r=O.read(Gt),n=e.params.name,i=Tt(r,n);if(i){O.info(`\u6B63\u5728\u66F4\u65B0\u8FDC\u7A0B\u914D\u7F6E\uFF1A${i.name}`);let a={...i,...e.body};if(!BE(a.name)){Ge(t,new Ot("INVALID_ARTIFACT_NAME",`Artifact name ${a.name} is invalid.`));return}Ss(r,n,a),O.write(r,Gt),ze(t,a)}else Ge(t,new Ot("DUPLICATE_KEY",`Artifact ${n} already exists.`))}async function B7(e,t){let{name:r}=e.params;O.info(`\u6B63\u5728\u5220\u9664\u8FDC\u7A0B\u914D\u7F6E\uFF1A${r}`);let n=O.read(Gt);try{let i=Tt(n,r);if(!i)throw new Error(`\u8FDC\u7A0B\u914D\u7F6E\uFF1A${r}\u4E0D\u5B58\u5728\uFF01`);if(i.updated){let a={};a[encodeURIComponent(i.name)]={content:""},encodeURIComponent(i.name)!==i.name&&(a[i.name]={content:""});try{await $E(a)}catch(s){O.error(`Function syncToGist: ${r} : ${s}`)}}Fs(n,r),O.write(n,Gt),ze(t)}catch(i){O.error(`\u65E0\u6CD5\u5220\u9664\u8FDC\u7A0B\u914D\u7F6E\uFF1A${r}\uFF0C\u539F\u56E0\uFF1A${i}`),Ge(t,new Dn("FAILED_TO_DELETE_ARTIFACT",`Failed to delete artifact ${r}`,`Reason: ${i}`))}}function BE(e){return/^[a-zA-Z0-9._-]*$/.test(e)}async function $E(e){let{gistToken:t,syncPlatform:r}=O.read(Ht);if(!t)return Promise.reject("\u672A\u8BBE\u7F6E GitHub Token\uFF01");let i=await new cs({token:t,key:Ro,syncPlatform:r}).upload(e),a={};try{a=JSON.parse(i.body)}catch{}let s=a?.html_url??a?.web_url,u=O.read(Ht);return s?(O.log(`\u540C\u6B65 Gist \u540E, \u627E\u5230 Sub-Store Gist: ${s}`),u.artifactStore=s,u.artifactStoreStatus="VALID"):(O.error("\u540C\u6B65 Gist \u540E, \u627E\u4E0D\u5230 Sub-Store Gist"),u.artifactStoreStatus="NOT FOUND"),O.write(u,Ht),i}function bg(e){O.read(Ht)||O.write({},Ht),e.route("/api/settings").get($7).patch(P7)}async function $7(e,t){try{let r=O.read(Ht);r||(r={},O.write(r,Ht)),r.avatarUrl||await Qd(),r.artifactStore||await e0(),ze(t,r)}catch(r){O.error(`Failed to get settings: ${r.message??r}`),Ge(t,new Dn("FAILED_TO_GET_SETTINGS","Failed to get settings",`Reason: ${r.message??r}`))}}async function P7(e,t){try{let n={...O.read(Ht),...e.body};O.write(n,Ht),(e.body.githubUser||e.body.gistToken||e.body.githubProxy||e.body.defaultProxy)&&(await Qd(),await e0()),ze(t,n)}catch(r){O.error(`Failed to update settings: ${r.message??r}`),Ge(t,new Dn("FAILED_TO_UPDATE_SETTINGS","Failed to update settings",`Reason: ${r.message??r}`))}}async function Qd(){let e=O.read(Ht),{githubUser:t,syncPlatform:r,githubProxy:n}=e;if(t)if(r==="gitlab")try{let i=await O.http.get({url:`https://gitlab.com/api/v4/users?username=${encodeURIComponent(t)}`,headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.141 Safari/537.36"}}).then(a=>JSON.parse(a.body));e.avatarUrl=i[0].avatar_url.replace(/(\?|&)s=\d+(&|$)/,"$1s=160$2"),O.write(e,Ht)}catch(i){O.error(`Failed to fetch GitLab avatar for User: ${t}. Reason: ${i.message??i}`)}else try{let i=await O.http.get({url:`${n?`${n}/`:""}https://api.github.com/users/${encodeURIComponent(t)}`,headers:{"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.141 Safari/537.36"}}).then(a=>JSON.parse(a.body));e.avatarUrl=i.avatar_url,O.write(e,Ht)}catch(i){O.error(`Failed to fetch GitHub avatar for User: ${t}. Reason: ${i.message??i}`)}}async function e0(){O.log("Updating artifact store");let e=O.read(Ht),{gistToken:t,syncPlatform:r}=e;if(t){let n=new cs({token:t,key:Ro,syncPlatform:r});try{let i=await n.locate(),a=i?.html_url??i?.web_url;a?(O.log(`\u627E\u5230 Sub-Store Gist: ${a}`),e.artifactStore=a,e.artifactStoreStatus="VALID"):(O.error(`\u627E\u4E0D\u5230 Sub-Store Gist (${Ro})`),e.artifactStoreStatus="NOT FOUND")}catch(i){O.error(`\u67E5\u627E Sub-Store Gist (${Ro}) \u65F6\u53D1\u751F\u9519\u8BEF: ${i.message??i}`),e.artifactStoreStatus="ERROR"}O.write(e,Ht)}}var Cg=un(yf());var yg=class{constructor(t){this.expires=t,O.read(xo)||O.write("{}",xo);try{this.resourceCache=JSON.parse(O.read(xo))}catch(r){O.error(`\u89E3\u6790\u6301\u4E45\u5316\u7F13\u5B58\u4E2D\u7684 ${xo} \u5931\u8D25, \u91CD\u7F6E\u4E3A {}, \u9519\u8BEF: ${r?.message??r}`),this.resourceCache={},O.write("{}",xo)}this._cleanup()}_cleanup(){let t=!1;Object.entries(this.resourceCache).forEach(r=>{let[n,i]=r;i.time||(delete this.resourceCache[n],O.delete(`#${n}`),t=!0),new Date().getTime()-i.time>this.expires&&(delete this.resourceCache[n],t=!0)}),t&&this._persist()}revokeAll(){this.resourceCache={},this._persist()}_persist(){O.write(JSON.stringify(this.resourceCache),xo)}get(t){let r=this.resourceCache[t]&&this.resourceCache[t].time;return r&&new Date().getTime()-r<=this.expires?this.resourceCache[t].data:null}set(t,r){this.resourceCache[t]={time:new Date().getTime(),data:r},this._persist()}},Vr=new yg(36e5);var _g=class{constructor(){this.expires=x7(),O.read(Oo)||O.write("{}",Oo);try{this.resourceCache=JSON.parse(O.read(Oo))}catch(t){O.error(`\u89E3\u6790\u6301\u4E45\u5316\u7F13\u5B58\u4E2D\u7684 ${Oo} \u5931\u8D25, \u91CD\u7F6E\u4E3A {}, \u9519\u8BEF: ${t?.message??t}`),this.resourceCache={},O.write("{}",Oo)}this._cleanup()}_cleanup(t,r){let n=!1;Object.entries(this.resourceCache).forEach(i=>{let[a,s]=i;s.time||(delete this.resourceCache[a],O.delete(`#${a}`),n=!0),(new Date().getTime()-s.time>(r??this.expires)||t&&a.startsWith(t))&&(delete this.resourceCache[a],n=!0)}),n&&this._persist()}revokeAll(){this.resourceCache={},this._persist()}_persist(){O.write(JSON.stringify(this.resourceCache),Oo)}get(t,r,n){let i=this.resourceCache[t]&&this.resourceCache[t].time;if(i){if(new Date().getTime()-i<=(r??this.expires))return this.resourceCache[t].data;n&&(delete this.resourceCache[t],this._persist())}return null}gettime(t){let r=this.resourceCache[t]&&this.resourceCache[t].time;return r&&new Date().getTime()-r<=this.expires?this.resourceCache[t].time:null}set(t,r){this.resourceCache[t]={time:new Date().getTime(),data:r},this._persist()}};function x7(){O.read(xd)||O.write("1728e5",xd);let e=1728e5;if(O.env.isLoon){let t={"1\u5206\u949F":6e4,"5\u5206\u949F":3e5,"10\u5206\u949F":6e5,"30\u5206\u949F":18e5,"1\u5C0F\u65F6":36e5,"2\u5C0F\u65F6":72e5,"3\u5C0F\u65F6":108e5,"6\u5C0F\u65F6":216e5,"12\u5C0F\u65F6":432e5,"24\u5C0F\u65F6":864e5,"48\u5C0F\u65F6":1728e5,"72\u5C0F\u65F6":2592e5,\u53C2\u6570\u4F20\u5165:"readcachets"},r=O.read("#\u8282\u70B9\u7F13\u5B58\u6709\u6548\u671F");return r in t&&(e=t[r],e==="readcachets"&&(e=r)),e}else return e=O.read(xd),e}var _f=new _g;var{isNode:PE,isQX:T7,isLoon:O7,isSurge:k7,isStash:N7,isShadowRocket:L7,isLanceX:U7,isEgern:j7,isGUIforCores:H7}=on(),ia="Node";PE&&(ia="Node");T7&&(ia="QX");O7&&(ia="Loon");k7&&(ia="Surge");N7&&(ia="Stash");L7&&(ia="Shadowrocket");j7&&(ia="Egern");U7&&(ia="LanceX");H7&&(ia="GUI.for.Cores");var jo={},M7={};try{if(typeof $environment<"u"&&(jo.env=$environment),typeof $loon<"u"&&(jo.loon=$loon),typeof $script<"u"&&(jo.script=$script),typeof $Plugin<"u"&&(jo.plugin=$Plugin),PE){jo.node={version:eval("process.version"),argv:eval("process.argv"),filename:eval("__filename"),dirname:eval("__dirname"),env:{}};let env=eval("process.env");for(let e in env)/^SUB_STORE_/.test(e)&&(jo.node.env[e]=env[e])}}catch(e){}var qu={backend:ia,version:$d,feature:M7,meta:jo};function Dg(e){e.get("/api/utils/env",RE),e.get("/api/utils/testJSON",q7),e.get("/api/utils/testText",V7),e.get("/api/utils/backup",G7),e.get("/api/utils/refresh",K7),e.route("/api/storage").get((t,r)=>{r.set("content-type","application/json").set("content-disposition",`attachment; filename="${encodeURIComponent(`sub-store_data_${Hu(new Date)}.json`)}"`).send(O.env.isNode?JSON.stringify(O.cache):O.read("#sub-store"))}).post((t,r)=>{let{content:n}=t.body;try{if(n=JSON.parse(pt.decode(n)),Object.keys(n.settings).length===0)throw new Error("\u5907\u4EFD\u6587\u4EF6\u5E94\u8BE5\u81F3\u5C11\u5305\u542B settings \u5B57\u6BB5")}catch{try{if(n=JSON.parse(n),Object.keys(n.settings).length===0)throw new Error("\u5907\u4EFD\u6587\u4EF6\u5E94\u8BE5\u81F3\u5C11\u5305\u542B settings \u5B57\u6BB5")}catch(a){throw O.error(`\u5907\u4EFD\u6587\u4EF6\u6821\u9A8C\u5931\u8D25, \u65E0\u6CD5\u8FD8\u539F
Reason: ${a.message??a}`),new Error("\u5907\u4EFD\u6587\u4EF6\u6821\u9A8C\u5931\u8D25, \u65E0\u6CD5\u8FD8\u539F")}}O.write(JSON.stringify(n,null," "),"#sub-store"),O.env.isNode&&(O.cache=n,O.persistCache()),jl(),ze(r)}),on().isNode?e.get("/",RE):e.get("/",async(t,r)=>{r.set("location","https://sub-store.vercel.app/").status(302).end()}),on().isQX&&e.options("/",async(t,r)=>{r.status(200).end()}),e.all("/",(t,r)=>{r.send("Hello from sub-store, made with \u2764\uFE0F by Peng-YM")})}function RE(e,t){console.log("router getEnv 1"),e.query.share&&(qu.feature.share=!0),console.log("router getEnv 2");let r={status:"success",data:{guide:"\u26A0\uFE0F\u26A0\uFE0F\u26A0\uFE0F \u60A8\u5F53\u524D\u770B\u5230\u7684\u662F\u540E\u7AEF\u7684\u54CD\u5E94. \u82E5\u60F3\u914D\u5408\u524D\u7AEF\u4F7F\u7528, \u53EF\u8BBF\u95EE\u5B98\u65B9\u524D\u7AEF https://sub-store.vercel.app \u540E\u81EA\u884C\u914D\u7F6E\u540E\u7AEF\u5730\u5740, \u6216\u4E00\u952E\u914D\u7F6E\u540E\u7AEF https://sub-store.vercel.app?api=https://a.com/xxx (\u5047\u8BBE https://a.com \u662F\u4F60\u540E\u7AEF\u7684\u57DF\u540D, /xxx \u662F\u81EA\u5B9A\u4E49\u8DEF\u5F84). \u9700\u6CE8\u610F HTTPS \u524D\u7AEF\u65E0\u6CD5\u8BF7\u6C42\u975E\u672C\u5730\u7684 HTTP \u540E\u7AEF(\u90E8\u5206\u6D4F\u89C8\u5668\u4E0A\u4E5F\u65E0\u6CD5\u8BBF\u95EE\u672C\u5730 HTTP \u540E\u7AEF). \u8BF7\u914D\u7F6E\u53CD\u4EE3\u6216\u5728\u5C40\u57DF\u7F51\u81EA\u5EFA HTTP \u524D\u7AEF. \u5982\u679C\u8FD8\u6709\u95EE\u9898, \u53EF\u67E5\u770B\u6B64\u6392\u67E5\u8BF4\u660E: https://t.me/zhetengsha/1068",...qu}};console.log("router getEnv 3");let n=JSON.stringify(r,null,2);console.log("router getEnv 4"),t.set("Content-Type","application/json;charset=UTF-8").send(n)}function q7(e,t){console.log("router testJSON 1"),e.query.share&&(qu.feature.share=!0),console.log("router testJSON 2");let r={status:"success",data:{guide:"\u26A0\uFE0F\u26A0\uFE0F\u26A0\uFE0F \u60A8\u5F53\u524D\u770B\u5230\u7684\u662F\u540E\u7AEF\u7684\u54CD\u5E94. \u82E5\u60F3\u914D\u5408\u524D\u7AEF\u4F7F\u7528, \u53EF\u8BBF\u95EE\u5B98\u65B9\u524D\u7AEF https://sub-store.vercel.app \u540E\u81EA\u884C\u914D\u7F6E\u540E\u7AEF\u5730\u5740, \u6216\u4E00\u952E\u914D\u7F6E\u540E\u7AEF https://sub-store.vercel.app?api=https://a.com/xxx (\u5047\u8BBE https://a.com \u662F\u4F60\u540E\u7AEF\u7684\u57DF\u540D, /xxx \u662F\u81EA\u5B9A\u4E49\u8DEF\u5F84). \u9700\u6CE8\u610F HTTPS \u524D\u7AEF\u65E0\u6CD5\u8BF7\u6C42\u975E\u672C\u5730\u7684 HTTP \u540E\u7AEF(\u90E8\u5206\u6D4F\u89C8\u5668\u4E0A\u4E5F\u65E0\u6CD5\u8BBF\u95EE\u672C\u5730 HTTP \u540E\u7AEF). \u8BF7\u914D\u7F6E\u53CD\u4EE3\u6216\u5728\u5C40\u57DF\u7F51\u81EA\u5EFA HTTP \u524D\u7AEF. \u5982\u679C\u8FD8\u6709\u95EE\u9898, \u53EF\u67E5\u770B\u6B64\u6392\u67E5\u8BF4\u660E: https://t.me/zhetengsha/1068"}};console.log("router testJSON 3");let n=JSON.stringify(r,null,2);console.log("router testJSON 4"),t.set("Content-Type","application/json;charset=UTF-8").send(n)}function V7(e,t){console.log("router testText 1"),e.query.share&&(qu.feature.share=!0),console.log("router testText 2"),t.set("Content-Type","text/plain;charset=UTF-8").send("test")}async function K7(e,t){await Qd(),await e0(),Vr.revokeAll(),_f.revokeAll(),Lo.revokeAll(),ze(t)}async function z7(e,t,r){let{gistToken:n,syncPlatform:i}=O.read(Ht);if(!n)throw new Error("GitHub Token is required for backup!");let a=new cs({token:n,key:qA,syncPlatform:i}),s=O.read("#sub-store");s=s?JSON.parse(s):{},O.env.isNode&&(s=JSON.parse(JSON.stringify(O.cache)));let u,l=O.read(Ht),f=l.syncTime,d=r||l.gistUpload||"base64";switch(O.info(`Gist backup action: ${e}, keep: ${t}, encode: ${r}, settings encode: ${l.gistUpload}, final encoding: ${d}`),e){case"upload":try{if(u=O.read("#sub-store"),u=u?JSON.parse(u):{},O.env.isNode&&(u=JSON.parse(JSON.stringify(O.cache))),d==="plaintext"?(u.settings.gistToken="\u6062\u590D\u540E\u8BF7\u91CD\u65B0\u8BBE\u7F6E GitHub Token",u=JSON.stringify(u,null," ")):u=pt.encode(JSON.stringify(u,null," ")),O.info("\u4E0B\u8F7D\u5907\u4EFD, \u4E0E\u672C\u5730\u5185\u5BB9\u5BF9\u6BD4..."),await a.download(Pd)===u){O.info("\u5185\u5BB9\u4E00\u81F4, \u65E0\u9700\u4E0A\u4F20\u5907\u4EFD");return}}catch(g){O.error(`${g.message??g}`)}l.syncTime=new Date().getTime(),O.write(l,Ht),u=O.read("#sub-store"),u=u?JSON.parse(u):{},O.env.isNode&&(u=JSON.parse(JSON.stringify(O.cache))),d==="plaintext"?(u.settings.gistToken="\u6062\u590D\u540E\u8BF7\u91CD\u65B0\u8BBE\u7F6E GitHub Token",u=JSON.stringify(u,null," ")):u=pt.encode(JSON.stringify(u,null," ")),O.info("\u4E0A\u4F20\u5907\u4EFD\u4E2D...");try{await a.upload({[Pd]:{content:u}}),O.info("\u4E0A\u4F20\u5907\u4EFD\u5B8C\u6210")}catch(g){throw l.syncTime=f,O.write(l,Ht),g}break;case"download":O.info("\u8FD8\u539F\u5907\u4EFD\u4E2D..."),u=await a.download(Pd);try{if(u=JSON.parse(pt.decode(u)),Object.keys(u.settings).length===0)throw new Error("\u5907\u4EFD\u6587\u4EF6\u5E94\u8BE5\u81F3\u5C11\u5305\u542B settings \u5B57\u6BB5")}catch{try{if(u=JSON.parse(u),Object.keys(u.settings).length===0)throw new Error("\u5907\u4EFD\u6587\u4EF6\u5E94\u8BE5\u81F3\u5C11\u5305\u542B settings \u5B57\u6BB5")}catch(p){throw O.error(`Gist \u5907\u4EFD\u6587\u4EF6\u6821\u9A8C\u5931\u8D25, \u65E0\u6CD5\u8FD8\u539F
Reason: ${p.message??p}`),new Error("Gist \u5907\u4EFD\u6587\u4EF6\u6821\u9A8C\u5931\u8D25, \u65E0\u6CD5\u8FD8\u539F")}}t&&(O.info(`\u4FDD\u7559\u539F\u6709\u8BBE\u7F6E ${t}`),t.split(",").forEach(g=>{Cg.default.set(u,g,Cg.default.get(s,g))})),O.write(JSON.stringify(u,null," "),"#sub-store"),O.env.isNode&&(O.cache=u,O.persistCache()),O.info("perform migration after restoring from gist..."),jl(),O.info("migration completed"),O.info("\u8FD8\u539F\u5907\u4EFD\u5B8C\u6210");break}}async function G7(e,t){let{action:r,keep:n,encode:i}=e.query,{gistToken:a}=O.read(Ht);if(!a)Ge(t,new Ot("GIST_TOKEN_NOT_FOUND","GitHub Token is required for backup!"));else try{await z7(r,n,i),ze(t)}catch(s){O.error(`Failed to ${r} gist data.
Reason: ${s.message??s}`),Ge(t,new Dn("BACKUP_FAILED",`Failed to ${r} gist data!`,`Reason: ${s.message??s}`))}}function Fg(e){e.post("/api/sort/subs",Y7),e.post("/api/sort/collections",W7),e.post("/api/sort/artifacts",X7),e.post("/api/sort/files",J7)}function Y7(e,t){let r=e.body,n=O.read(vr);n.sort((i,a)=>r.indexOf(i.name)-r.indexOf(a.name)),O.write(n,vr),ze(t,n)}function W7(e,t){let r=e.body,n=O.read(ar);n.sort((i,a)=>r.indexOf(i.name)-r.indexOf(a.name)),O.write(n,ar),ze(t,n)}function X7(e,t){let r=e.body,n=O.read(Gt);n.sort((i,a)=>r.indexOf(i.name)-r.indexOf(a.name)),O.write(n,Gt),ze(t,n)}function J7(e,t){let r=e.body,n=O.read(xt);n.sort((i,a)=>r.indexOf(i.name)-r.indexOf(a.name)),O.write(n,xt),ze(t,n)}var Pf=un(Cy());function Fy(e,t,...r){try{return e(t,...r)}catch{return e(Sy(e(t.replace(/!<str>\s*/g,"__SubStoreJSYAMLString__"),...r)).replace(/__SubStoreJSYAMLString__/g,""),...r)}}function $f(e,...t){return Fy(Pf.default.safeLoad,JSON.parse(JSON.stringify(e)),...t)}function IR(e,...t){return Fy(Pf.default.load,JSON.parse(JSON.stringify(e)),...t)}function Dy(e,...t){return Pf.default.safeDump(JSON.parse(JSON.stringify(e)),...t)}function Sy(e,...t){return Pf.default.dump(JSON.parse(JSON.stringify(e)),...t)}var aa={safeLoad:$f,load:IR,safeDump:Dy,dump:Sy,parse:$f,stringify:Dy};function BR(){return{name:"HTML",test:n=>/^<!DOCTYPE html>/.test(n),parse:()=>""}}function $R(){let e="Base64 Pre-processor",t=["dm1lc3M","c3NyOi8v","c29ja3M6Ly","dHJvamFu","c3M6Ly","c3NkOi8v","c2hhZG93","aHR0c","dmxlc3M=","aHlzdGVyaWEy","aHkyOi8v","d2lyZWd1YXJkOi8v","d2c6Ly8=","dHVpYzovLw=="];return{name:e,test:function(i){return!/^\w+:\/\/\w+/im.test(i)&&t.some(a=>i.indexOf(a)!==-1)},parse:function(i){let a=pt.decode(i);return/^\w+(:\/\/|\s*?=\s*?)\w+/m.test(a)?a:(O.error("Base64 Pre-processor error: decoded line does not start with protocol"),i)}}}function PR(){return{name:"Fallback Base64 Pre-processor",test:function(n){return!0},parse:function(n){let i=pt.decode(n);return/^\w+(:\/\/|\s*?=\s*?)\w+/m.test(i)?i:(O.error("Fallback Base64 Pre-processor error: decoded line does not start with protocol"),n)}}}function RR(){return{name:"Clash Pre-processor",test:function(n){if(!/proxies/.test(n))return!1;let i=$f(n);return i.proxies&&Array.isArray(i.proxies)},parse:function(n,i){let a=n.replace(/short-id:([ \t]*[^#\n,}]*)/g,(l,f)=>{let d=f.trim();return!d||d===""?'short-id: ""':/^(['"]).*\1$/.test(d)?`short-id: ${d}`:["null"].includes(d)?`short-id: ${d}`:`short-id: "${d}"`}),{proxies:s,"global-client-fingerprint":u}=$f(a);return(i?`proxies:
`:"")+s.map(l=>(u&&["trojan","vmess","vless"].includes(l.type)&&!l["client-fingerprint"]&&(l["client-fingerprint"]=u),`${i?" - ":""}${JSON.stringify(l)}
`)).join("")}}}function xR(){return{name:"SSD Pre-processor",test:function(n){return n.indexOf("ssd://")===0},parse:function(n){let i=[],a=JSON.parse(pt.decode(n.split("ssd://")[1])),s=a.port,u=a.encryption,l=a.password,f=a.servers;for(let d=0;d<f.length;d++){let g=f[d];u=g.encryption?g.encryption:u,l=g.password?g.password:l;let p=pt.encode(u+":"+l),h=g.server;s=g.port?g.port:s;let w=g.remarks?g.remarks:d,v=g.plugin_options?"/?plugin="+encodeURIComponent(g.plugin+";"+g.plugin_options):"";i[d]="ss://"+p+"@"+h+":"+s+v+"#"+w}return i.join(`
`)}}}function TR(){return{name:"Full Config Preprocessor",test:function(n){return/^(\[server_local\]|\[Proxy\])/gm.test(n)},parse:function(n){return n.match(/^\[server_local|Proxy\]([\s\S]+?)^\[.+?\](\r?\n|$)/im)?.[1]||n}}}var h0=[BR(),RR(),$R(),xR(),TR(),PR()];var Tp=un(m0());var hm=un(v_());function sk(e){let t=hm.default.pemtohex(e);return hm.default.KJUR.crypto.Util.hashHex(t,"sha256").match(/.{2}/g).join(":").toUpperCase()}var w_={generateFingerprint:sk};function $0(e,t){return[...Array(e).keys()].map(()=>t)}var dm={"\u{1F3F3}\uFE0F\u200D\u{1F308}":["EXP","BAND"],"\u{1F1F8}\u{1F1F1}":["TEST","SOS"],"\u{1F1F2}\u{1F1F5}":["MP","MNP"],"\u{1F1F8}\u{1F1F4}":["SO","SOM"],"\u{1F1E6}\u{1F1F6}":["AQ","ATA"],"\u{1F1E6}\u{1F1EC}":["AG","ATG"],"\u{1F1EC}\u{1F1F1}":["GL","GRL"],"\u{1F1FF}\u{1F1FC}":["ZW","ZWE"],"\u{1F1E6}\u{1F1FC}":["AW","ABW"],"\u{1F1F2}\u{1F1F1}":["ML","MLI"],"\u{1F1E6}\u{1F1E9}":["AD","AND"],"\u{1F1E6}\u{1F1EA}":["AE","ARE"],"\u{1F1E6}\u{1F1EB}":["AF","AFG"],"\u{1F1E6}\u{1F1F1}":["AL","ALB"],"\u{1F1E6}\u{1F1F2}":["AM","ARM"],"\u{1F1E6}\u{1F1F7}":["AR","ARG"],"\u{1F1E6}\u{1F1F9}":["AT","AUT"],"\u{1F1E6}\u{1F1FA}":["AU","AUS"],"\u{1F1E6}\u{1F1FF}":["AZ","AZE"],"\u{1F1E7}\u{1F1E6}":["BA","BIH"],"\u{1F1E7}\u{1F1E9}":["BD","BGD"],"\u{1F1E7}\u{1F1EA}":["BE","BEL"],"\u{1F1E7}\u{1F1EC}":["BG","BGR"],"\u{1F1E7}\u{1F1ED}":["BH","BHR"],"\u{1F1E7}\u{1F1F4}":["BO","BOL"],"\u{1F1E7}\u{1F1F3}":["BN","BRN"],"\u{1F1E7}\u{1F1F7}":["BR","BRA"],"\u{1F1E7}\u{1F1F9}":["BT","BTN"],"\u{1F1E7}\u{1F1FE}":["BY","BLR"],"\u{1F1E8}\u{1F1E6}":["CA","CAN"],"\u{1F1E8}\u{1F1ED}":["CH","CHE"],"\u{1F1E8}\u{1F1F1}":["CL","CHL"],"\u{1F1E8}\u{1F1F4}":["CO","COL"],"\u{1F1E8}\u{1F1F7}":["CR","CRI"],"\u{1F1E8}\u{1F1FE}":["CY","CYP"],"\u{1F1E8}\u{1F1FF}":["CZ","CZE"],"\u{1F1E9}\u{1F1EA}":["DE","DEU"],"\u{1F1E9}\u{1F1F0}":["DK","DNK"],"\u{1F1E9}\u{1F1FF}":["DZ","DZA"],"\u{1F1EA}\u{1F1E8}":["EC","ECU"],"\u{1F1EA}\u{1F1EA}":["EE","EST"],"\u{1F1EA}\u{1F1EC}":["EG","EGY"],"\u{1F1EA}\u{1F1F8}":["ES","ESP"],"\u{1F1EA}\u{1F1FA}":["EU"],"\u{1F1EB}\u{1F1EE}":["FI","FIN"],"\u{1F1EB}\u{1F1F7}":["FR","FRA"],"\u{1F1EC}\u{1F1E7}":["GB","GBR","UK"],"\u{1F1EC}\u{1F1EA}":["GE","GEO"],"\u{1F1EC}\u{1F1F7}":["GR","GRC"],"\u{1F1EC}\u{1F1F9}":["GT","GTM"],"\u{1F1EC}\u{1F1FA}":["GU","GUM"],"\u{1F1ED}\u{1F1F0}":["HK","HKG","HKT","HKBN","HGC","WTT","CMI"],"\u{1F1ED}\u{1F1F7}":["HR","HRV"],"\u{1F1ED}\u{1F1FA}":["HU","HUN"],"\u{1F1EE}\u{1F1F6}":["IQ","IRQ"],"\u{1F1EF}\u{1F1F4}":["JO","JOR"],"\u{1F1EF}\u{1F1F5}":["JP","JPN","TYO"],"\u{1F1F0}\u{1F1EA}":["KE","KEN"],"\u{1F1F0}\u{1F1EC}":["KG","KGZ"],"\u{1F1F0}\u{1F1ED}":["KH","KGZ"],"\u{1F1F0}\u{1F1F5}":["KP","PRK"],"\u{1F1F0}\u{1F1F7}":["KR","KOR","SEL"],"\u{1F1F0}\u{1F1FF}":["KZ","KAZ"],"\u{1F1EE}\u{1F1E9}":["ID","IDN"],"\u{1F1EE}\u{1F1EA}":["IE","IRL"],"\u{1F1EE}\u{1F1F1}":["IL","ISR"],"\u{1F1EE}\u{1F1F2}":["IM","IMN"],"\u{1F1EE}\u{1F1F3}":["IN","IND"],"\u{1F1EE}\u{1F1F7}":["IR","IRN"],"\u{1F1EE}\u{1F1F8}":["IS","ISL"],"\u{1F1EE}\u{1F1F9}":["IT","ITA"],"\u{1F1F1}\u{1F1E6}":["LA","LAO"],"\u{1F1F1}\u{1F1F0}":["LK","LKA"],"\u{1F1F1}\u{1F1F9}":["LT","LTU"],"\u{1F1F1}\u{1F1FA}":["LU","LUX"],"\u{1F1F1}\u{1F1FB}":["LV","LVA"],"\u{1F1F2}\u{1F1E6}":["MA","MAR"],"\u{1F1F2}\u{1F1E9}":["MD","MDA"],"\u{1F1F3}\u{1F1EC}":["NG","NGA"],"\u{1F1F2}\u{1F1F2}":["MM","MMR"],"\u{1F1F2}\u{1F1F0}":["MK","MKD"],"\u{1F1F2}\u{1F1F3}":["MN","MNG"],"\u{1F1F2}\u{1F1F4}":["MO","MAC","CTM"],"\u{1F1F2}\u{1F1F9}":["MT","MLT"],"\u{1F1F2}\u{1F1FD}":["MX","MEX"],"\u{1F1F2}\u{1F1FE}":["MY","MYS"],"\u{1F1F3}\u{1F1F1}":["NL","NLD","AMS"],"\u{1F1F3}\u{1F1F4}":["NO","NOR"],"\u{1F1F3}\u{1F1F5}":["NP","NPL"],"\u{1F1F3}\u{1F1FF}":["NZ","NZL"],"\u{1F1F4}\u{1F1F2}":["OM","OMN"],"\u{1F1F5}\u{1F1E6}":["PA","PAN"],"\u{1F1F5}\u{1F1EA}":["PE","PER"],"\u{1F1F5}\u{1F1ED}":["PH","PHL"],"\u{1F1F5}\u{1F1F0}":["PK","PAK"],"\u{1F1F5}\u{1F1F1}":["PL","POL"],"\u{1F1F5}\u{1F1F7}":["PR","PRI"],"\u{1F1F5}\u{1F1F9}":["PT","PRT"],"\u{1F1F5}\u{1F1FE}":["PY","PRY"],"\u{1F1F5}\u{1F1EC}":["PG","PNG"],"\u{1F1F6}\u{1F1E6}":["QA","QAT"],"\u{1F1F7}\u{1F1F4}":["RO","ROU"],"\u{1F1F7}\u{1F1F8}":["RS","SRB"],"\u{1F1F7}\u{1F1EA}":["RE","REU"],"\u{1F1F7}\u{1F1FA}":["RU","RUS"],"\u{1F1F8}\u{1F1E6}":["SA","SAU"],"\u{1F1FC}\u{1F1F8}":["WS","WSM"],"\u{1F1F8}\u{1F1EA}":["SE","SWE"],"\u{1F1F8}\u{1F1EC}":["SG","SGP"],"\u{1F1F8}\u{1F1EE}":["SI","SVN"],"\u{1F1F8}\u{1F1F0}":["SK","SVK"],"\u{1F1F9}\u{1F1EC}":["TG","TGO"],"\u{1F1F9}\u{1F1ED}":["TH","THA"],"\u{1F1F9}\u{1F1F3}":["TN","TUN"],"\u{1F1F9}\u{1F1F7}":["TR","TUR"],"\u{1F1F9}\u{1F1FC}":["TW","TWN","CHT","HINET","ROC"],"\u{1F1FA}\u{1F1E6}":["UA","UKR"],"\u{1F1FA}\u{1F1F8}":["US","USA","LAX","SFO","SJC"],"\u{1F1FA}\u{1F1FE}":["UY","URY"],"\u{1F1FB}\u{1F1E6}":["VA","VAT"],"\u{1F1FB}\u{1F1EA}":["VE","VEN"],"\u{1F1FB}\u{1F1F3}":["VN","VNM"],"\u{1F1FF}\u{1F1E6}":["ZA","ZAF","JNB"],"\u{1F1E8}\u{1F1F3}":["CN","CHN","BACK"]};function dc(e){let t={"\u{1F3F3}\uFE0F\u200D\u{1F308}":["\u6D41\u91CF","\u65F6\u95F4","\u8FC7\u671F","Bandwidth","Expire"],"\u{1F1F8}\u{1F1F1}":["\u5E94\u6025","\u6D4B\u8BD5\u8282\u70B9"],"\u{1F1F2}\u{1F1F5}":["\u5317\u9A6C\u91CC\u4E9A\u7EB3","Northern Mariana Islands","Saipan","\u585E\u73ED"],"\u{1F1F8}\u{1F1F4}":["Somalia","\u7D22\u9A6C\u91CC","\u6469\u52A0\u8FEA\u6C99","Mogadishu"],"\u{1F1E6}\u{1F1F6}":["Antarctica","\u5357\u6781\u6D32","\u5357\u6781"],"\u{1F1E6}\u{1F1EC}":["Antigua and Barbuda","\u5B89\u63D0\u74DC\u548C\u5DF4\u5E03\u8FBE"],"\u{1F1EC}\u{1F1F1}":["Greenland","\u683C\u9675\u5170\u5C9B","\u683C\u9675\u5170"],"\u{1F1FF}\u{1F1FC}":["Zimbabwe","\u6D25\u5DF4\u5E03\u97E6"],"\u{1F1E6}\u{1F1FC}":["Aruba","\u963F\u9C81\u5DF4"],"\u{1F1F2}\u{1F1F1}":["Mali","\u9A6C\u91CC"],"\u{1F1E6}\u{1F1E9}":["Andorra","\u5B89\u9053\u5C14"],"\u{1F1E6}\u{1F1EA}":["United Arab Emirates","\u963F\u8054\u914B","\u8FEA\u62DC","Dubai"],"\u{1F1E6}\u{1F1EB}":["Afghanistan","\u963F\u5BCC\u6C57"],"\u{1F1E6}\u{1F1F1}":["Albania","\u963F\u5C14\u5DF4\u5C3C\u4E9A","\u963F\u723E\u5DF4\u5C3C\u4E9E"],"\u{1F1E6}\u{1F1F2}":["Armenia","\u4E9A\u7F8E\u5C3C\u4E9A"],"\u{1F1E6}\u{1F1F7}":["Argentina","\u963F\u6839\u5EF7"],"\u{1F1E6}\u{1F1F9}":["Austria","\u5965\u5730\u5229","\u5967\u5730\u5229","\u7EF4\u4E5F\u7EB3"],"\u{1F1FC}\u{1F1F8}":["Samoa","\u8428\u6469\u4E9A","\u85A9\u6469\u4E9E"],"\u{1F1E6}\u{1F1FA}":["Australia","\u6FB3\u5927\u5229\u4E9A","\u6FB3\u6D32","\u58A8\u5C14\u672C","\u6089\u5C3C","\u571F\u6FB3","\u4EAC\u6FB3","\u5EE3\u6FB3","\u6EEC\u6FB3","\u6CAA\u6FB3","\u5E7F\u6FB3","Sydney"],"\u{1F1E6}\u{1F1FF}":["Azerbaijan","\u963F\u585E\u62DC\u7586"],"\u{1F1E7}\u{1F1E6}":["Bosnia and Herzegovina","\u6CE2\u9ED1\u5171\u548C\u56FD","\u6CE2\u9ED1"],"\u{1F1E7}\u{1F1E9}":["Bangladesh","\u5B5F\u52A0\u62C9\u56FD","\u5B5F\u52A0\u62C9"],"\u{1F1E7}\u{1F1EA}":["Belgium","\u6BD4\u5229\u65F6","\u6BD4\u5229\u6642"],"\u{1F1E7}\u{1F1EC}":["Bulgaria","\u4FDD\u52A0\u5229\u4E9A","\u4FDD\u52A0\u5229\u4E9E"],"\u{1F1E7}\u{1F1ED}":["Bahrain","\u5DF4\u6797"],"\u{1F1E7}\u{1F1F7}":["Brazil","\u5DF4\u897F","\u5723\u4FDD\u7F57"],"\u{1F1E7}\u{1F1F3}":["Brunei","\u6587\u83B1","\u6C76\u840A"],"\u{1F1E7}\u{1F1FE}":["Belarus","\u767D\u4FC4\u7F57\u65AF","\u767D\u4FC4"],"\u{1F1E7}\u{1F1F4}":["Bolivia","\u73BB\u5229\u7EF4\u4E9A"],"\u{1F1E7}\u{1F1F9}":["Bhutan","\u4E0D\u4E39","\u4E0D\u4E39\u738B\u56FD"],"\u{1F1E8}\u{1F1E6}":["Canada","\u52A0\u62FF\u5927","\u8499\u7279\u5229\u5C14","\u6E29\u54E5\u534E","\u6953\u8449","\u67AB\u53F6","\u6ED1\u94C1\u5362","\u591A\u4F26\u591A","Waterloo","Toronto"],"\u{1F1E8}\u{1F1ED}":["Switzerland","\u745E\u58EB","\u82CF\u9ECE\u4E16","Zurich"],"\u{1F1E8}\u{1F1F1}":["Chile","\u667A\u5229"],"\u{1F1E8}\u{1F1F4}":["Colombia","\u54E5\u4F26\u6BD4\u4E9A"],"\u{1F1E8}\u{1F1F7}":["Costa Rica","\u54E5\u65AF\u8FBE\u9ECE\u52A0"],"\u{1F1E8}\u{1F1FE}":["Cyprus","\u585E\u6D66\u8DEF\u65AF"],"\u{1F1E8}\u{1F1FF}":["Czechia","\u6377\u514B","Czech","Czech Republic"],"\u{1F1E9}\u{1F1EA}":["German","\u5FB7\u56FD","\u5FB7\u570B","\u4EAC\u5FB7","\u6EEC\u5FB7","\u5EE3\u5FB7","\u6CAA\u5FB7","\u5E7F\u5FB7","\u6CD5\u5170\u514B\u798F","Frankfurt","\u5FB7\u610F\u5FD7"],"\u{1F1E9}\u{1F1F0}":["Denmark","\u4E39\u9EA6","\u4E39\u9EA5"],"\u{1F1E9}\u{1F1FF}":["Algeria","\u963F\u5C14\u53CA\u5229\u4E9A","\u963F\u723E\u53CA\u5229\u4E9E"],"\u{1F1EA}\u{1F1E8}":["Ecuador","\u5384\u74DC\u591A\u5C14"],"\u{1F1EA}\u{1F1EA}":["Estonia","\u7231\u6C99\u5C3C\u4E9A"],"\u{1F1EA}\u{1F1EC}":["Egypt","\u57C3\u53CA"],"\u{1F1EA}\u{1F1F8}":["Spain","\u897F\u73ED\u7259"],"\u{1F1EA}\u{1F1FA}":["European Union","\u6B27\u76DF","\u6B27\u7F57\u5DF4"],"\u{1F1EB}\u{1F1EE}":["Finland","\u82AC\u5170","\u82AC\u862D","\u8D6B\u5C14\u8F9B\u57FA"],"\u{1F1EB}\u{1F1F7}":["France","\u6CD5\u56FD","\u6CD5\u570B","\u5DF4\u9ECE"],"\u{1F1EC}\u{1F1E7}":["Great Britain","\u82F1\u56FD","England","United Kingdom","\u4F26\u6566","\u82F1","London"],"\u{1F1EC}\u{1F1EA}":["Georgia","\u683C\u9C81\u5409\u4E9A","\u683C\u9B6F\u5409\u4E9E"],"\u{1F1EC}\u{1F1F7}":["Greece","\u5E0C\u814A","\u5E0C\u81D8"],"\u{1F1EC}\u{1F1FA}":["Guam","\u5173\u5C9B","\u95DC\u5CF6"],"\u{1F1EC}\u{1F1F9}":["Guatemala","\u5371\u5730\u9A6C\u62C9"],"\u{1F1ED}\u{1F1F0}":["Hongkong","\u9999\u6E2F","Hong Kong","HongKong","HONG KONG","\u6DF1\u6E2F","\u6CAA\u6E2F","\u547C\u6E2F","\u7A57\u6E2F","\u4EAC\u6E2F","\u6E2F"],"\u{1F1ED}\u{1F1F7}":["Croatia","\u514B\u7F57\u5730\u4E9A","\u514B\u7F85\u5730\u4E9E"],"\u{1F1ED}\u{1F1FA}":["Hungary","\u5308\u7259\u5229"],"\u{1F1EE}\u{1F1F6}":["Iraq","\u4F0A\u62C9\u514B","\u5DF4\u683C\u8FBE","Baghdad"],"\u{1F1EF}\u{1F1F4}":["Jordan","\u7EA6\u65E6"],"\u{1F1EF}\u{1F1F5}":["Japan","\u65E5\u672C","\u4E1C\u4EAC","\u5927\u962A","\u57FC\u7389","\u6CAA\u65E5","\u7A57\u65E5","\u5DDD\u65E5","\u4E2D\u65E5","\u6CC9\u65E5","\u676D\u65E5","\u6DF1\u65E5","\u8FBD\u65E5","\u5E7F\u65E5","\u5927\u5742","Osaka","Tokyo"],"\u{1F1F0}\u{1F1EA}":["Kenya","\u80AF\u5C3C\u4E9A"],"\u{1F1F0}\u{1F1EC}":["Kyrgyzstan","\u5409\u5C14\u5409\u65AF\u65AF\u5766"],"\u{1F1F0}\u{1F1ED}":["Cambodia","\u67EC\u57D4\u5BE8"],"\u{1F1F0}\u{1F1F5}":["North Korea","\u671D\u9C9C"],"\u{1F1F0}\u{1F1F7}":["Korea","\u97E9\u56FD","\u97D3\u570B","\u97E9","\u97D3","\u9996\u5C14","\u6625\u5DDD","Chuncheon","Seoul"],"\u{1F1F0}\u{1F1FF}":["Kazakhstan","\u54C8\u8428\u514B\u65AF\u5766","\u54C8\u8428\u514B"],"\u{1F1EE}\u{1F1E9}":["Indonesia","\u5370\u5C3C","\u5370\u5EA6\u5C3C\u897F\u4E9A","\u96C5\u52A0\u8FBE"],"\u{1F1EE}\u{1F1EA}":["Ireland","\u7231\u5C14\u5170","\u611B\u723E\u862D","\u90FD\u67CF\u6797"],"\u{1F1EE}\u{1F1F1}":["Israel","\u4EE5\u8272\u5217"],"\u{1F1EE}\u{1F1F2}":["Isle of Man","\u9A6C\u6069\u5C9B","\u99AC\u6069\u5CF6"],"\u{1F1EE}\u{1F1F3}":["India","\u5370\u5EA6","\u5B5F\u4E70","MFumbai","Mumbai"],"\u{1F1EE}\u{1F1F7}":["Iran","\u4F0A\u6717"],"\u{1F1EE}\u{1F1F8}":["Iceland","\u51B0\u5C9B","\u51B0\u5CF6"],"\u{1F1EE}\u{1F1F9}":["Italy","\u610F\u5927\u5229","\u7FA9\u5927\u5229","\u7C73\u5170","Nachash"],"\u{1F1F1}\u{1F1F0}":["Sri Lanka","\u65AF\u91CC\u5170\u5361","\u65AF\u91CC\u862D\u5361"],"\u{1F1F1}\u{1F1E6}":["Laos","\u8001\u631D","\u8001\u64BE"],"\u{1F1F1}\u{1F1F9}":["Lithuania","\u7ACB\u9676\u5B9B"],"\u{1F1F1}\u{1F1FA}":["Luxembourg","\u5362\u68EE\u5821"],"\u{1F1F1}\u{1F1FB}":["Latvia","\u62C9\u8131\u7EF4\u4E9A","Latvija"],"\u{1F1F2}\u{1F1E6}":["Morocco","\u6469\u6D1B\u54E5"],"\u{1F1F2}\u{1F1E9}":["Moldova","\u6469\u5C14\u591A\u74E6","\u6469\u723E\u591A\u74E6"],"\u{1F1F2}\u{1F1F2}":["Myanmar","\u7F05\u7538","\u7DEC\u7538"],"\u{1F1F3}\u{1F1EC}":["Nigeria","\u5C3C\u65E5\u5229\u4E9A","\u5C3C\u65E5\u5229\u4E9E"],"\u{1F1F2}\u{1F1F0}":["Macedonia","\u9A6C\u5176\u987F","\u99AC\u5176\u9813"],"\u{1F1F2}\u{1F1F3}":["Mongolia","\u8499\u53E4"],"\u{1F1F2}\u{1F1F4}":["Macao","\u6FB3\u95E8","\u6FB3\u9580","CTM"],"\u{1F1F2}\u{1F1F9}":["Malta","\u9A6C\u8033\u4ED6"],"\u{1F1F2}\u{1F1FD}":["Mexico","\u58A8\u897F\u54E5"],"\u{1F1F2}\u{1F1FE}":["Malaysia","\u9A6C\u6765","\u99AC\u4F86","\u5409\u9686\u5761","\u5927\u99AC"],"\u{1F1F3}\u{1F1F1}":["Netherlands","\u8377\u5170","\u8377\u862D","\u5C3C\u5FB7\u862D","\u963F\u59C6\u65AF\u7279\u4E39","Amsterdam"],"\u{1F1F3}\u{1F1F4}":["Norway","\u632A\u5A01"],"\u{1F1F3}\u{1F1F5}":["Nepal","\u5C3C\u6CCA\u5C14"],"\u{1F1F3}\u{1F1FF}":["New Zealand","\u65B0\u897F\u5170","\u65B0\u897F\u862D"],"\u{1F1F4}\u{1F1F2}":["Oman","\u963F\u66FC","\u9A6C\u65AF\u5580\u7279"],"\u{1F1F5}\u{1F1E6}":["Panama","\u5DF4\u62FF\u9A6C"],"\u{1F1F5}\u{1F1EA}":["Peru","\u79D8\u9C81","\u7955\u9B6F"],"\u{1F1F5}\u{1F1ED}":["Philippines","\u83F2\u5F8B\u5BBE","\u83F2\u5F8B\u8CD3"],"\u{1F1F5}\u{1F1F0}":["Pakistan","\u5DF4\u57FA\u65AF\u5766"],"\u{1F1F5}\u{1F1F1}":["Poland","\u6CE2\u5170","\u6CE2\u862D","\u534E\u6C99","Warsaw"],"\u{1F1F5}\u{1F1F7}":["Puerto Rico","\u6CE2\u591A\u9ECE\u5404"],"\u{1F1F5}\u{1F1F9}":["Portugal","\u8461\u8404\u7259"],"\u{1F1F5}\u{1F1EC}":["Papua New Guinea","\u5DF4\u5E03\u4E9A\u65B0\u51E0\u5185\u4E9A"],"\u{1F1F5}\u{1F1FE}":["Paraguay","\u5DF4\u62C9\u572D"],"\u{1F1F6}\u{1F1E6}":["Qatar","\u5361\u5854\u5C14","\u5361\u5854\u723E"],"\u{1F1F7}\u{1F1F4}":["Romania","\u7F57\u9A6C\u5C3C\u4E9A"],"\u{1F1F7}\u{1F1F8}":["Serbia","\u585E\u5C14\u7EF4\u4E9A"],"\u{1F1F7}\u{1F1EA}":["R\xE9union","\u7559\u5C3C\u6C6A","\u6CD5\u5C5E\u7559\u5C3C\u6C6A"],"\u{1F1F7}\u{1F1FA}":["Russia","\u4FC4\u7F57\u65AF","\u4FC4\u56FD","\u4FC4\u7F85\u65AF","\u4F2F\u529B","\u83AB\u65AF\u79D1","\u5723\u5F7C\u5F97\u5821","\u897F\u4F2F\u5229\u4E9A","\u4EAC\u4FC4","\u676D\u4FC4","\u5EE3\u4FC4","\u6EEC\u4FC4","\u5E7F\u4FC4","\u6CAA\u4FC4","Moscow"],"\u{1F1F8}\u{1F1E6}":["Saudi","\u6C99\u7279\u963F\u62C9\u4F2F","\u6C99\u7279","Riyadh","\u5229\u96C5\u5F97"],"\u{1F1F8}\u{1F1EA}":["Sweden","\u745E\u5178","\u65AF\u5FB7\u54E5\u5C14\u6469","Stockholm"],"\u{1F1F8}\u{1F1EC}":["Singapore","\u65B0\u52A0\u5761","\u72EE\u57CE","\u6CAA\u65B0","\u4EAC\u65B0","\u4E2D\u65B0","\u6CC9\u65B0","\u7A57\u65B0","\u6DF1\u65B0","\u676D\u65B0","\u5E7F\u65B0","\u5EE3\u65B0","\u6EEC\u65B0"],"\u{1F1F8}\u{1F1EE}":["Slovenia","\u65AF\u6D1B\u6587\u5C3C\u4E9A"],"\u{1F1F8}\u{1F1F0}":["Slovakia","\u65AF\u6D1B\u4F10\u514B"],"\u{1F1F9}\u{1F1EC}":["Togo","\u591A\u54E5","\u6D1B\u7F8E","Lom\xE9","Lome"],"\u{1F1F9}\u{1F1ED}":["Thailand","\u6CF0\u56FD","\u6CF0\u570B","\u66FC\u8C37"],"\u{1F1F9}\u{1F1F3}":["Tunisia","\u7A81\u5C3C\u65AF"],"\u{1F1F9}\u{1F1F7}":["Turkey","\u571F\u8033\u5176","\u4F0A\u65AF\u5766\u5E03\u5C14","Istanbul"],"\u{1F1F9}\u{1F1FC}":["Taiwan","\u53F0\u6E7E","\u81FA\u7063","\u53F0\u7063","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u534E\u6C11\u56FD","\u53F0\u5317","\u53F0\u4E2D","\u65B0\u5317","\u5F70\u5316","\u53F0","\u81FA","Taipei","Tai Wan"],"\u{1F1FA}\u{1F1E6}":["Ukraine","\u4E4C\u514B\u5170","\u70CF\u514B\u862D"],"\u{1F1FA}\u{1F1F8}":["United States","\u7F8E\u56FD","America","\u7F8E","\u4EAC\u7F8E","\u6CE2\u7279\u5170","\u8FBE\u62C9\u65AF","\u4FC4\u52D2\u5188","Oregon","\u51E4\u51F0\u57CE","\u8D39\u5229\u8499","\u7845\u8C37","\u77FD\u8C37","\u62C9\u65AF\u7EF4\u52A0\u65AF","\u6D1B\u6749\u77F6","\u5723\u4F55\u585E","\u5723\u514B\u62C9\u62C9","\u897F\u96C5\u56FE","\u829D\u52A0\u54E5","\u6CAA\u7F8E","\u54E5\u4F26\u5E03","\u7EBD\u7EA6","New York","Los Angeles","San Jose","Sillicon Valley","Michigan","\u4FC4\u4EA5\u4FC4","Ohio","\u9A6C\u7EB3\u8428\u65AF","Manassas","\u5F17\u5409\u5C3C\u4E9A","Virginia"],"\u{1F1FA}\u{1F1FE}":["Uruguay","\u4E4C\u62C9\u572D"],"\u{1F1FB}\u{1F1E6}":["Vatican","Vatican City","Holy See","\u68B5\u8482\u5188","\u68B5\u8482\u5CA1"],"\u{1F1FB}\u{1F1EA}":["Venezuela","\u59D4\u5185\u745E\u62C9"],"\u{1F1FB}\u{1F1F3}":["Vietnam","\u8D8A\u5357","\u80E1\u5FD7\u660E"],"\u{1F1FF}\u{1F1E6}":["South Africa","\u5357\u975E"],"\u{1F1E8}\u{1F1F3}":["China","\u4E2D\u56FD","\u4E2D\u570B","\u56DE\u56FD","\u56DE\u570B","\u56FD\u5185","\u570B\u5167","\u534E\u4E1C","\u534E\u897F","\u534E\u5357","\u534E\u5317","\u534E\u4E2D","\u6C5F\u82CF","\u5317\u4EAC","\u4E0A\u6D77","\u5E7F\u5DDE","\u6DF1\u5733","\u676D\u5DDE","\u5F90\u5DDE","\u9752\u5C9B","\u5B81\u6CE2","\u9547\u6C5F"]},r=e.match(/[\uD83C][\uDDE6-\uDDFF][\uD83C][\uDDE6-\uDDFF]/)?.[0]||"\u{1F3F4}\u200D\u2620\uFE0F";for(let n of Object.keys(t))if(t[n].some(a=>RegExp(`${a}`,"i").test(e)))return/内蒙古/.test(e)&&["\u{1F1F2}\u{1F1F3}"].includes(n)?r="\u{1F1E8}\u{1F1F3}":r=n;for(let n of Object.keys(dm))if(dm[n].some(a=>RegExp(`(^|[^a-zA-Z])${a}([^a-zA-Z]|$)`).test(e))&&!(n=="\u{1F1E8}\u{1F1F3}"&&RegExp("(^|[^a-zA-Z])CN2([^a-zA-Z]|$)").test(e)))return r=n;return r}function A_(e){return dm[dc(e)]?.[0]}function Lf(e){return e.replace(/[\uD83C][\uDDE6-\uDDFF][\uD83C][\uDDE6-\uDDFF]|🏴‍☠️|🏳️‍🌈/g,"").trim()}var P0=class{constructor({country,asn}={}){if(O.env.isNode){let Reader=eval('require("@maxmind/geoip2-node")').Reader,fs=eval("require('fs')"),countryFile=country||eval("process.env.SUB_STORE_MMDB_COUNTRY_PATH"),asnFile=asn||eval("process.env.SUB_STORE_MMDB_ASN_PATH");if(countryFile&&(this.countryReader=Reader.openBuffer(fs.readFileSync(countryFile))),asnFile){if(!fs.existsSync(asnFile))throw new Error("GeoLite2 ASN MMDB does not exist");this.asnReader=Reader.openBuffer(fs.readFileSync(asnFile))}}}geoip(e){return this.countryReader?.country(e)?.country?.isoCode}ipaso(e){return this.asnReader?.asn(e)?.autonomousSystemOrganization}ipasn(e){return this.asnReader?.asn(e)?.autonomousSystemNumber}};var T0=un($_()),_m=un(m0());async function gc({url:e,domain:t,type:r="A",timeout:n,edns:i}){let a=T0.default.encode({type:"query",id:0,flags:T0.default.RECURSION_DESIRED,questions:[{type:r,name:t}],additionals:[{type:"OPT",name:".",udpPayloadSize:4096,flags:0,options:[{code:"CLIENT_SUBNET",ip:i,sourcePrefixLength:qr(i)?24:56,scopePrefixLength:0}]}]}),u=_m.Buffer.from(a).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),l=await O.http.get({url:`${e}?dns=${encodeURIComponent(u)}`,headers:{Accept:"application/dns-message"},"binary-mode":!0,encoding:null,timeout:n});return T0.default.decode(_m.Buffer.from(O.env.isQX?l.bodyBytes:l.body))}var Dm=un(yf());function dk(e){return e&&typeof e=="object"&&!Array.isArray(e)}function jf(e){return e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e}function R_(e,t){let r=typeof t=="string"?JSON.parse(t):t;for(let n in r)if(dk(r[n]))if(n.endsWith("!")){let i=jf(n.slice(0,-1));e[i]=r[n]}else{let i=jf(n);e[i]||Object.assign(e,{[i]:{}}),R_(e[i],r[i])}else if(Array.isArray(r[n]))if(n.startsWith("+")){let i=jf(n.slice(1));e[i]||Object.assign(e,{[i]:[]}),e[i]=[...r[n],...e[i]]}else if(n.endsWith("+")){let i=jf(n.slice(0,-1));e[i]||Object.assign(e,{[i]:[]}),e[i]=[...e[i],...r[n]]}else{let i=jf(n);Object.assign(e,{[i]:r[n]})}else Object.assign(e,{[n]:r[n]});return e}function pk({rule:e}){return{name:"Conditional Filter",func:t=>t.map(r=>O0(e,r))}}function O0(e,t){if(!e.operator)switch(e.proposition){case"IN":return e.value.indexOf(t[e.attr])!==-1;case"CONTAINS":return typeof t[e.attr]!="string"?!1:t[e.attr].indexOf(e.value)!==-1;case"EQUALS":return t[e.attr]===e.value;case"EXISTS":return t[e.attr]!==null||typeof t[e.attr]<"u";default:throw new Error(`Unknown proposition: ${e.proposition}`)}switch(e.operator){case"AND":return e.child.ever
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment