/*! For license information please see main.js.LICENSE.txt */ (()=>{var r,i,n,o={79831:(r,i,n)=>{n.d(i,{Z:()=>_});var o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const _=function memoize(r){var i={};return function(n){return void 0===i[n]&&(i[n]=r(n)),i[n]}}((function(r){return o.test(r)||111===r.charCodeAt(0)&&110===r.charCodeAt(1)&&r.charCodeAt(2)<91}))},7356:(r,i,n)=>{n.r(i),n.d(i,{anticipate:()=>_e,backIn:()=>oe,backInOut:()=>le,backOut:()=>se,bounceIn:()=>bounceIn,bounceInOut:()=>bounceInOut,bounceOut:()=>bounceOut,circIn:()=>circIn,circInOut:()=>ne,circOut:()=>ie,createAnticipateEasing:()=>createAnticipateEasing,createBackIn:()=>createBackIn,createExpoIn:()=>createExpoIn,createMirroredEasing:()=>_,createReversedEasing:()=>o,cubicBezier:()=>cubicBezier,easeIn:()=>j,easeInOut:()=>$,easeOut:()=>q,linear:()=>linear,mirrored:()=>mirrored,reversed:()=>reversed});var reversed=function(r){return function(i){return 1-r(1-i)}},mirrored=function(r){return function(i){return i<=.5?r(2*i)/2:(2-r(2*(1-i)))/2}},o=reversed,_=mirrored,createExpoIn=function(r){return function(i){return Math.pow(i,r)}},createBackIn=function(r){return function(i){return i*i*((r+1)*i-r)}},createAnticipateEasing=function(r){var i=createBackIn(r);return function(r){return(r*=2)<1?.5*i(r):.5*(2-Math.pow(2,-10*(r-1)))}},linear=function(r){return r},j=createExpoIn(2),q=reversed(j),$=mirrored(j),circIn=function(r){return 1-Math.sin(Math.acos(r))},ie=reversed(circIn),ne=mirrored(ie),oe=createBackIn(1.525),se=reversed(oe),le=mirrored(oe),_e=createAnticipateEasing(1.525),bounceOut=function(r){var i=r*r;return r<.36363636363636365?7.5625*i:r<.7272727272727273?9.075*i-9.9*r+3.4:r<.9?12.066481994459833*i-19.63545706371191*r+8.898060941828255:10.8*r*r-20.52*r+10.72},bounceIn=function(r){return 1-bounceOut(1-r)},bounceInOut=function(r){return r<.5?.5*(1-bounceOut(1-2*r)):.5*bounceOut(2*r-1)+.5},pe=.1,he="undefined"!=typeof Float32Array,a=function(r,i){return 1-3*i+3*r},b=function(r,i){return 3*i-6*r},c=function(r){return 3*r},getSlope=function(r,i,n){return 3*a(i,n)*r*r+2*b(i,n)*r+c(i)},calcBezier=function(r,i,n){return((a(i,n)*r+b(i,n))*r+c(i))*r};function cubicBezier(r,i,n,o){var _=he?new Float32Array(11):new Array(11),getTForX=function(i){for(var o,j,q,$=0,ie=1;10!==ie&&_[ie]<=i;++ie)$+=pe;return--ie,o=(i-_[ie])/(_[ie+1]-_[ie]),(q=getSlope(j=$+o*pe,r,n))>=.001?function(i,o){for(var _=0,j=0;_<8;++_){if(0===(j=getSlope(o,r,n)))return o;o-=(calcBezier(o,r,n)-i)/j}return o}(i,j):0===q?j:function(i,o,_){var j,q,$=0;do{(j=calcBezier(q=o+(_-o)/2,r,n)-i)>0?_=q:o=q}while(Math.abs(j)>1e-7&&++$<10);return q}(i,$,$+pe)};!function(){for(var i=0;i<11;++i)_[i]=calcBezier(i*pe,r,n)}();return function(_){return r===i&&n===o?_:0===_?0:1===_?1:calcBezier(getTForX(_),i,o)}}},21937:(r,i,n)=>{n.d(i,{CD:()=>mix,Lk:()=>ie,Rc:()=>mixColor,Rv:()=>velocityPerSecond,TE:()=>distance,YD:()=>progress,iP:()=>mixComplex,sX:()=>interpolate,uZ:()=>q,zG:()=>pipe});var o=n(49528),_=n(21027),j=(n(25799),n(7356),{x:0,y:0,z:0}),isNum=function(r){return"number"==typeof r},curryRange=function(r){return function(i,n,o){return void 0!==o?r(i,n,o):function(o){return r(i,n,o)}}},q=curryRange((function(r,i,n){return Math.min(Math.max(n,r),i)})),isPoint=function(r){return r.hasOwnProperty("x")&&r.hasOwnProperty("y")},isPoint3D=function(r){return isPoint(r)&&r.hasOwnProperty("z")},distance1D=function(r,i){return Math.abs(r-i)},distance=function(r,i){if(void 0===i&&(i=j),isNum(r)&&isNum(i))return distance1D(r,i);if(isPoint(r)&&isPoint(i)){var n=distance1D(r.x,i.x),o=distance1D(r.y,i.y),_=isPoint3D(r)&&isPoint3D(i)?distance1D(r.z,i.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(o,2)+Math.pow(_,2))}return 0},progress=function(r,i,n){var o=i-r;return 0===o?1:(n-r)/o},mix=function(r,i,n){return-n*r+n*i+r},__assign=function(){return __assign=Object.assign||function __assign(r){for(var i,n=1,o=arguments.length;n=q.numNumbers,"Complex values '"+r+"' and '"+i+"' too different to mix. Ensure all colors are of the same type."),pipe(mixArray(j.parsed,q.parsed),n)},mixNumber=function(r,i){return function(n){return mix(r,i,n)}};function createMixers(r,i,n){for(var _=[],j=n||function detectMixerFactory(r){return"number"==typeof r?mixNumber:"string"==typeof r?o.$_.test(r)?mixColor:mixComplex:Array.isArray(r)?mixArray:"object"==typeof r?mixObject:void 0}(r[0]),q=r.length-1,$=0;$r[oe-1]&&(r=[].concat(r),i=[].concat(i),r.reverse(),i.reverse());var se=createMixers(i,ie,ne),le=2===oe?function fastInterpolate(r,i){var n=r[0],o=r[1],_=i[0];return function(r){return _(progress(n,o,r))}}(r,se):function slowInterpolate(r,i){var n=r.length,o=n-1;return function(_){var j=0,q=!1;if(_<=r[0]?q=!0:_>=r[o]&&(j=o-1,q=!0),!q){for(var $=1;$_||$===o);$++);j=$-1}var ie=progress(r[j],r[j+1],_);return i[j](ie)}}(r,se);return $?pipe(q(r[0],r[oe-1]),le):le}var identity=function(r){return r},springForce=function(r){return void 0===r&&(r=identity),curryRange((function(i,n,o){var _=n-o,j=-(0-i+1)*(0-r(Math.abs(_)));return _<=0?n+j:n-j}))},ie=(springForce(),springForce(Math.sqrt),function(r,i){return isNum(r)?r/(1e3/i):0}),velocityPerSecond=function(r,i){return i?r*(1e3/i):0};curryRange((function(r,i,n){var o=i-r;return((n-r)%o+o)%o+r})),q(0,1)},81252:(r,i,n)=>{var o,_=Object.freeze([]),j=Object.freeze(Object.create(null)),q=Object.freeze({"&":"&","'":"'",">":">","<":"<",""":'"'}),$="text";function addNode(r,i){i.parent=r.parent,i.toJSON=nodeToJson,r.parent.children.push(i)}function addText(r,i){var n=r.parent.children,o=n[n.length-1];void 0!==o&&o.type===$?o.text+=i:addNode(r,{type:$,text:i})}function consumeCDSect(r){var i=scan(r,o.Anchored.CDSect),n=i[0],_=i[1];return void 0!==n&&(r.options.preserveCdata?addNode(r,{type:"cdata",text:_}):addText(r,_),!0)}function consumeCharData(r){var i=scan(r,o.Anchored.CharData)[0];if(void 0===i)return!1;var n=i.indexOf("]]>");return-1!==n&&(r.pos=r.prevPos+n,error(r,"Element content may not contain the CDATA section close delimiter `]]>`")),o.CharOnly.test(i)||(r.pos=r.prevPos+i.search(new RegExp("(?!"+o.Char.source+")")),error(r,"Element content contains an invalid character")),addText(r,i),!0}function consumeComment(r){var i=scan(r,o.Anchored.Comment)[1];return void 0!==i&&(r.options.preserveComments&&addNode(r,{type:"comment",content:i.trim()}),!0)}function consumeElement(r){var i=scan(r,o.Anchored.EmptyElemTag),n=i[0],_=i[1],j=i[2],q=void 0!==n;if(!q){var $=scan(r,o.Anchored.STag);if(n=$[0],_=$[1],j=$[2],void 0===n)return!1}var ie=r.parent,ne=function parseAttrs(r,i){var n=Object.create(null);if(!i)return n;for(var _=i.match(o.Global.Attribute).sort(),j=0,q=_.length;j0}(r)}function consumePI(r){var i=scan(r,o.Anchored.PI),n=i[0],_=i[1];return void 0!==n&&("xml"===_.toLowerCase()&&(r.pos=r.prevPos,error(r,"XML declaration is only allowed at the start of the document")),!0)}function consumeReference(r){var i=scan(r,o.Anchored.Reference)[0];return void 0!==i&&(addText(r,r.replaceReference(i)),!0)}function error(r,i){for(var n=r.pos,o=r.xml,_=1,j="",q=1,$=0;$50&&(_<40?j=j.slice(0,50):(oe=_-20,j=j.slice(oe,_+30)));var se=new Error(i+" (line "+q+", column "+_+")\n "+j+"\n"+" ".repeat(_-oe+1)+"^\n");throw se.column=_,se.excerpt=j,se.line=q,se.pos=n,se}function nodeToJson(){var r=Object.assign(Object.create(null),this);return delete r.parent,r}function normalizeAttrValue(r,i){return i.replace(/[\x20\t\r\n]/g," ").replace(o.Global.Reference,r.replaceReference)}function replaceReference(r){var i=this;if(";"!==r[r.length-1]&&error(i,"Invalid reference: `"+r+"`"),"#"===r[1]){var n;n="x"===r[2]?parseInt(r.slice(3,-1),16):parseInt(r.slice(2,-1),10),isNaN(n)&&(i.pos=i.prevPos,error(i,"Invalid character entity `"+r+"`"));var _=String.fromCodePoint(n);return o.Char.test(_)||(i.pos=i.prevPos,error(i,"Invalid character entity `"+r+"`")),_}var j=q[r];if(void 0!==j)return j;if(i.options.resolveUndefinedEntity){var $=i.options.resolveUndefinedEntity(r);if(null!=$)return $}if(i.options.ignoreUndefinedEntities)return r;i.pos=i.prevPos,error(i,"Named entity isn't defined: `"+r+"`")}function scan(r,i){var n=r.pos,o=r.xml,j=(n>0?o.slice(n):o).match(i);return null===j?_:(r.prevPos=r.pos,r.pos+=j[0].length,j)}r.exports=function parseXml(r,i){void 0===i&&(i=j),void 0===o&&(o=n(19839)),"\ufeff"===r[0]&&(r=r.slice(1));var _={type:"document",children:[],parent:null,toJSON:nodeToJson},q={length:(r=r.replace(/\r\n?/g,"\n")).length,options:i,parent:_,pos:0,prevPos:0,xml:r};for(q.replaceReference=replaceReference.bind(q),function consumeProlog(r){var i=r.pos;scan(r,o.Anchored.XMLDecl);for(;consumeMisc(r););if(function consumeDoctypeDecl(r){return scan(r,o.Anchored.doctypedecl).length>0}(r))for(;consumeMisc(r););return r.pos>i}(q),consumeElement(q)||error(q,"Root element is missing or invalid");consumeMisc(q););return function isEof(r){return r.pos>=r.length-1}(q)||error(q,"Extra content at the end of the document"),_}},19839:(r,i)=>{function _templateObject18(){var r=_taggedTemplateLiteralLoose(["\n \n"],["\n <\\?xml\n ","\n [\\s\\S]+?\n \\?>\n"]);return _templateObject18=function _templateObject18(){return r},r}function _templateObject17(){var r=_taggedTemplateLiteralLoose(["\n \n"],["\n <\\?\n // Group 1: PITarget\n (\n ","\n )\n\n (?:\n ","\n (?:",")*?\n )?\n \\?>\n"]);return _templateObject17=function _templateObject17(){return r},r}function _templateObject16(){var r=_taggedTemplateLiteralLoose(["\n ]*\n\n (?:\n [ [sS]+? ]\n (?:",")?\n )?\n >\n"],["\n ]*\n\n (?:\n \\[ [\\s\\S]+? \\]\n (?:",")?\n )?\n >\n"]);return _templateObject16=function _templateObject16(){return r},r}function _templateObject15(){var r=_taggedTemplateLiteralLoose(["\n \x3c!--\n // Group 1: Comment text (optional)\n (\n (?:\n (?!-) ","\n | - (?!-) ","\n )*\n )\n --\x3e\n"]);return _templateObject15=function _templateObject15(){return r},r}function _templateObject14(){var r=_taggedTemplateLiteralLoose(["\n ^(?:",")*$\n"]);return _templateObject14=function _templateObject14(){return r},r}function _templateObject13(){var r=_taggedTemplateLiteralLoose(["\n <\n // Group 1: Start tag name\n (",")\n\n // Group 2: Attributes (optional)\n (\n (?:\n ","\n ","\n )*\n )\n\n (?:",")?\n >\n"]);return _templateObject13=function _templateObject13(){return r},r}function _templateObject12(){var r=_taggedTemplateLiteralLoose(["\n \n"]);return _templateObject12=function _templateObject12(){return r},r}function _templateObject11(){var r=_taggedTemplateLiteralLoose(["\n <\n // Group 1: Element name\n (",")\n\n // Group 2: Attributes (optional)\n (\n (?:\n ","\n ","\n )*\n )\n\n (?:",")?\n />\n"]);return _templateObject11=function _templateObject11(){return r},r}function _templateObject10(){var r=_taggedTemplateLiteralLoose(["\n \n"],["\n \n"]);return _templateObject10=function _templateObject10(){return r},r}function _templateObject9(){var r=_taggedTemplateLiteralLoose(["\n ","\n ","\n\n (?:\n \"(?:\n [^<\"]\n )*\"\n\n |\n\n '(?:\n [^<']\n )*'\n )\n"]);return _templateObject9=function _templateObject9(){return r},r}function _templateObject8(){var r=_taggedTemplateLiteralLoose(["\n (?:",")?\n =\n (?:",")?\n"]);return _templateObject8=function _templateObject8(){return r},r}function _templateObject7(){var r=_taggedTemplateLiteralLoose(["\n [ \t\r\n]+\n"],["\n [\\x20\\t\\r\\n]+\n"]);return _templateObject7=function _templateObject7(){return r},r}function _templateObject6(){var r=_taggedTemplateLiteralLoose(["\n &[^s&;]*;?\n"],["\n &[^\\s&;]*;?\n"]);return _templateObject6=function _templateObject6(){return r},r}function _templateObject5(){var r=_taggedTemplateLiteralLoose(["\n ","\n (?:",")*\n"]);return _templateObject5=function _templateObject5(){return r},r}function _templateObject4(){var r=_taggedTemplateLiteralLoose(["\n (?:\n ","\n\n |\n\n [\n .\n 0-9\n ·\n ̀-ͯ\n ‿-⁀\n -\n ]\n )\n"],["\n (?:\n ","\n\n |\n\n [\n .\n 0-9\n \\xB7\n \\u0300-\\u036F\n \\u203F-\\u2040\n -\n ]\n )\n"]);return _templateObject4=function _templateObject4(){return r},r}function _templateObject3(){var r=_taggedTemplateLiteralLoose(["\n (?:\n [\n :\n A-Z\n _\n a-z\n À-Ö\n Ø-ö\n ø-˿\n Ͱ-ͽ\n Ϳ-῿\n ‌-‍\n ⁰-↏\n Ⰰ-⿯\n 、-퟿\n 豈-﷏\n ﷰ-�\n ]\n\n |\n\n [\ud800-\udb7f][\udc00-\udfff]\n )\n"],["\n (?:\n [\n :\n A-Z\n _\n a-z\n \\xC0-\\xD6\n \\xD8-\\xF6\n \\xF8-\\u02FF\n \\u0370-\\u037D\n \\u037F-\\u1FFF\n \\u200C-\\u200D\n \\u2070-\\u218F\n \\u2C00-\\u2FEF\n \\u3001-\\uD7FF\n \\uF900-\\uFDCF\n \\uFDF0-\\uFFFD\n ]\n\n |\n\n [\\uD800-\\uDB7F][\\uDC00-\\uDFFF]\n )\n"]);return _templateObject3=function _templateObject3(){return r},r}function _templateObject2(){var r=_taggedTemplateLiteralLoose(["\n [^<&]+\n"]);return _templateObject2=function _templateObject2(){return r},r}function _templateObject(){var r=_taggedTemplateLiteralLoose(["\n (?:\n [\n \t\n \n\n \r\n -퟿\n -�\n ]\n\n |\n\n [\ud800-\udbff][\udc00-\udfff]\n )\n"],["\n (?:\n [\n \\t\n \\n\n \\r\n \\x20-\\uD7FF\n \\uE000-\\uFFFD\n ]\n\n |\n\n [\\uD800-\\uDBFF][\\uDC00-\\uDFFF]\n )\n"]);return _templateObject=function _templateObject(){return r},r}function _taggedTemplateLiteralLoose(r,i){return i||(i=r.slice(0)),r.raw=i,r}function regex(r){for(var i=r.length,n=r.raw,o=i-1,_="",j=arguments.length,q=new Array(j>1?j-1:0),$=1;${n.d(i,{J:()=>o});const o="production"},55561:(r,i,n)=>{n.d(i,{$e:()=>withScope,Tb:()=>captureException,e:()=>configureScope,eN:()=>captureEvent,n_:()=>addBreadcrumb});var o=n(12035);function captureException(r,i){return(0,o.Gd)().captureException(r,{captureContext:i})}function captureEvent(r,i){return(0,o.Gd)().captureEvent(r,i)}function configureScope(r){(0,o.Gd)().configureScope(r)}function addBreadcrumb(r){(0,o.Gd)().addBreadcrumb(r)}function withScope(r){(0,o.Gd)().withScope(r)}},12035:(r,i,n)=>{n.d(i,{Gd:()=>getCurrentHub,cu:()=>getMainCarrier});var o=n(82681),_=n(97685),j=n(80431),q=n(92420),$=n(59277),ie=n(56993),ne=n(77363);const oe=100;class Hub{constructor(r,i=new ie.s,n=4){this._version=n,this._stack=[{scope:i}],r&&this.bindClient(r)}isOlderThan(r){return this._version{o.captureException(r,{originalException:r,syntheticException:_,...i,event_id:n},j)})),n}captureMessage(r,i,n){const _=this._lastEventId=n&&n.event_id?n.event_id:(0,o.DM)(),j=new Error(r);return this._withClient(((o,q)=>{o.captureMessage(r,i,{originalException:r,syntheticException:j,...n,event_id:_},q)})),_}captureEvent(r,i){const n=i&&i.event_id?i.event_id:(0,o.DM)();return r.type||(this._lastEventId=n),this._withClient(((o,_)=>{o.captureEvent(r,{...i,event_id:n},_)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(r,i){const{scope:n,client:o}=this.getStackTop();if(!o)return;const{beforeBreadcrumb:q=null,maxBreadcrumbs:$=oe}=o.getOptions&&o.getOptions()||{};if($<=0)return;const ie={timestamp:(0,_.yW)(),...r},ne=q?(0,j.Cf)((()=>q(ie,i))):ie;null!==ne&&(o.emit&&o.emit("beforeAddBreadcrumb",ne,i),n.addBreadcrumb(ne,$))}setUser(r){this.getScope().setUser(r)}setTags(r){this.getScope().setTags(r)}setExtras(r){this.getScope().setExtras(r)}setTag(r,i){this.getScope().setTag(r,i)}setExtra(r,i){this.getScope().setExtra(r,i)}setContext(r,i){this.getScope().setContext(r,i)}configureScope(r){const{scope:i,client:n}=this.getStackTop();n&&r(i)}run(r){const i=makeMain(this);try{r(this)}finally{makeMain(i)}}getIntegration(r){const i=this.getClient();if(!i)return null;try{return i.getIntegration(r)}catch(n){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&j.kg.warn(`Cannot retrieve integration ${r.id} from the current Hub`),null}}startTransaction(r,i){const n=this._callExtensionMethod("startTransaction",r,i);return"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||n||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(r=!1){if(r)return this.endSession();this._sendSessionUpdate()}endSession(){const r=this.getStackTop().scope,i=r.getSession();i&&(0,ne.RJ)(i),this._sendSessionUpdate(),r.setSession()}startSession(r){const{scope:i,client:n}=this.getStackTop(),{release:o,environment:_=$.J}=n&&n.getOptions()||{},{userAgent:j}=q.n2.navigator||{},ie=(0,ne.Hv)({release:o,environment:_,user:i.getUser(),...j&&{userAgent:j},...r}),oe=i.getSession&&i.getSession();return oe&&"ok"===oe.status&&(0,ne.CT)(oe,{status:"exited"}),this.endSession(),i.setSession(ie),ie}shouldSendDefaultPii(){const r=this.getClient(),i=r&&r.getOptions();return Boolean(i&&i.sendDefaultPii)}_sendSessionUpdate(){const{scope:r,client:i}=this.getStackTop(),n=r.getSession();n&&i&&i.captureSession&&i.captureSession(n)}_withClient(r){const{scope:i,client:n}=this.getStackTop();n&&r(n,i)}_callExtensionMethod(r,...i){const n=getMainCarrier().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[r])return n.extensions[r].apply(this,i);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&j.kg.warn(`Extension method ${r} couldn't be found, doing nothing.`)}}function getMainCarrier(){return q.n2.__SENTRY__=q.n2.__SENTRY__||{extensions:{},hub:void 0},q.n2}function makeMain(r){const i=getMainCarrier(),n=getHubFromCarrier(i);return setHubOnCarrier(i,r),n}function getCurrentHub(){const r=getMainCarrier();if(r.__SENTRY__&&r.__SENTRY__.acs){const i=r.__SENTRY__.acs.getCurrentHub();if(i)return i}return getGlobalHub(r)}function getGlobalHub(r=getMainCarrier()){return hasHubOnCarrier(r)&&!getHubFromCarrier(r).isOlderThan(4)||setHubOnCarrier(r,new Hub),getHubFromCarrier(r)}function hasHubOnCarrier(r){return!!(r&&r.__SENTRY__&&r.__SENTRY__.hub)}function getHubFromCarrier(r){return(0,q.YO)("hub",(()=>new Hub),r)}function setHubOnCarrier(r,i){if(!r)return!1;return(r.__SENTRY__=r.__SENTRY__||{}).hub=i,!0}},56993:(r,i,n)=>{n.d(i,{c:()=>addGlobalEventProcessor,s:()=>Scope});var o=n(50619),_=n(97685),j=n(16816),q=n(80431),$=n(82681),ie=n(92420),ne=n(77363);class Scope{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(r){const i=new Scope;return r&&(i._breadcrumbs=[...r._breadcrumbs],i._tags={...r._tags},i._extra={...r._extra},i._contexts={...r._contexts},i._user=r._user,i._level=r._level,i._span=r._span,i._session=r._session,i._transactionName=r._transactionName,i._fingerprint=r._fingerprint,i._eventProcessors=[...r._eventProcessors],i._requestSession=r._requestSession,i._attachments=[...r._attachments],i._sdkProcessingMetadata={...r._sdkProcessingMetadata}),i}addScopeListener(r){this._scopeListeners.push(r)}addEventProcessor(r){return this._eventProcessors.push(r),this}setUser(r){return this._user=r||{},this._session&&(0,ne.CT)(this._session,{user:r}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(r){return this._requestSession=r,this}setTags(r){return this._tags={...this._tags,...r},this._notifyScopeListeners(),this}setTag(r,i){return this._tags={...this._tags,[r]:i},this._notifyScopeListeners(),this}setExtras(r){return this._extra={...this._extra,...r},this._notifyScopeListeners(),this}setExtra(r,i){return this._extra={...this._extra,[r]:i},this._notifyScopeListeners(),this}setFingerprint(r){return this._fingerprint=r,this._notifyScopeListeners(),this}setLevel(r){return this._level=r,this._notifyScopeListeners(),this}setTransactionName(r){return this._transactionName=r,this._notifyScopeListeners(),this}setContext(r,i){return null===i?delete this._contexts[r]:this._contexts[r]=i,this._notifyScopeListeners(),this}setSpan(r){return this._span=r,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const r=this.getSpan();return r&&r.transaction}setSession(r){return r?this._session=r:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(r){if(!r)return this;if("function"==typeof r){const i=r(this);return i instanceof Scope?i:this}return r instanceof Scope?(this._tags={...this._tags,...r._tags},this._extra={...this._extra,...r._extra},this._contexts={...this._contexts,...r._contexts},r._user&&Object.keys(r._user).length&&(this._user=r._user),r._level&&(this._level=r._level),r._fingerprint&&(this._fingerprint=r._fingerprint),r._requestSession&&(this._requestSession=r._requestSession)):(0,o.PO)(r)&&(this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(r,i){const n="number"==typeof i?i:100;if(n<=0)return this;const o={timestamp:(0,_.yW)(),...r};return this._breadcrumbs=[...this._breadcrumbs,o].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(r){return this._attachments.push(r),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(r,i={}){if(this._extra&&Object.keys(this._extra).length&&(r.extra={...this._extra,...r.extra}),this._tags&&Object.keys(this._tags).length&&(r.tags={...this._tags,...r.tags}),this._user&&Object.keys(this._user).length&&(r.user={...this._user,...r.user}),this._contexts&&Object.keys(this._contexts).length&&(r.contexts={...this._contexts,...r.contexts}),this._level&&(r.level=this._level),this._transactionName&&(r.transaction=this._transactionName),this._span){r.contexts={trace:this._span.getTraceContext(),...r.contexts};const i=this._span.transaction;if(i){r.sdkProcessingMetadata={dynamicSamplingContext:i.getDynamicSamplingContext(),...r.sdkProcessingMetadata};const n=i.name;n&&(r.tags={transaction:n,...r.tags})}}return this._applyFingerprint(r),r.breadcrumbs=[...r.breadcrumbs||[],...this._breadcrumbs],r.breadcrumbs=r.breadcrumbs.length>0?r.breadcrumbs:void 0,r.sdkProcessingMetadata={...r.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...getGlobalEventProcessors(),...this._eventProcessors],r,i)}setSDKProcessingMetadata(r){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...r},this}_notifyEventProcessors(r,i,n,_=0){return new j.cW(((j,$)=>{const ie=r[_];if(null===i||"function"!=typeof ie)j(i);else{const ne=ie({...i},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ie.id&&null===ne&&q.kg.log(`Event processor "${ie.id}" dropped event`),(0,o.J8)(ne)?ne.then((i=>this._notifyEventProcessors(r,i,n,_+1).then(j))).then(null,$):this._notifyEventProcessors(r,ne,n,_+1).then(j).then(null,$)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((r=>{r(this)})),this._notifyingListeners=!1)}_applyFingerprint(r){r.fingerprint=r.fingerprint?(0,$.lE)(r.fingerprint):[],this._fingerprint&&(r.fingerprint=r.fingerprint.concat(this._fingerprint)),r.fingerprint&&!r.fingerprint.length&&delete r.fingerprint}}function getGlobalEventProcessors(){return(0,ie.YO)("globalEventProcessors",(()=>[]))}function addGlobalEventProcessor(r){getGlobalEventProcessors().push(r)}},77363:(r,i,n)=>{n.d(i,{CT:()=>updateSession,Hv:()=>makeSession,RJ:()=>closeSession});var o=n(97685),_=n(82681),j=n(89043);function makeSession(r){const i=(0,o.ph)(),n={sid:(0,_.DM)(),init:!0,timestamp:i,started:i,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function sessionToJSON(r){return(0,j.Jr)({sid:`${r.sid}`,init:r.init,started:new Date(1e3*r.started).toISOString(),timestamp:new Date(1e3*r.timestamp).toISOString(),status:r.status,errors:r.errors,did:"number"==typeof r.did||"string"==typeof r.did?`${r.did}`:void 0,duration:r.duration,attrs:{release:r.release,environment:r.environment,ip_address:r.ipAddress,user_agent:r.userAgent}})}(n)};return r&&updateSession(n,r),n}function updateSession(r,i={}){if(i.user&&(!r.ipAddress&&i.user.ip_address&&(r.ipAddress=i.user.ip_address),r.did||i.did||(r.did=i.user.id||i.user.email||i.user.username)),r.timestamp=i.timestamp||(0,o.ph)(),i.ignoreDuration&&(r.ignoreDuration=i.ignoreDuration),i.sid&&(r.sid=32===i.sid.length?i.sid:(0,_.DM)()),void 0!==i.init&&(r.init=i.init),!r.did&&i.did&&(r.did=`${i.did}`),"number"==typeof i.started&&(r.started=i.started),r.ignoreDuration)r.duration=void 0;else if("number"==typeof i.duration)r.duration=i.duration;else{const i=r.timestamp-r.started;r.duration=i>=0?i:0}i.release&&(r.release=i.release),i.environment&&(r.environment=i.environment),!r.ipAddress&&i.ipAddress&&(r.ipAddress=i.ipAddress),!r.userAgent&&i.userAgent&&(r.userAgent=i.userAgent),"number"==typeof i.errors&&(r.errors=i.errors),i.status&&(r.status=i.status)}function closeSession(r,i){let n={};i?n={status:i}:"ok"===r.status&&(n={status:"exited"}),updateSession(r,n)}},49262:(r,i,n)=>{n.d(i,{T:()=>addTracingExtensions,l:()=>startIdleTransaction});var o=n(80431),_=n(50619),j=n(12035),q=n(20642),$=n(77157),ie=n(73958);let ne=!1;function errorCallback(){const r=(0,ie.x1)();if(r){const i="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.log(`[Tracing] Transaction: ${i} -> Global error occured`),r.setStatus(i)}}errorCallback.tag="sentry_tracingErrorCallback";var oe=n(14025),se=n(42164);function traceHeaders(){const r=this.getScope().getSpan();return r?{"sentry-trace":r.toTraceparent()}:{}}function sample(r,i,n){if(!(0,q.z)(i))return r.sampled=!1,r;if(void 0!==r.sampled)return r.setMetadata({sampleRate:Number(r.sampled)}),r;let j;return"function"==typeof i.tracesSampler?(j=i.tracesSampler(n),r.setMetadata({sampleRate:Number(j)})):void 0!==n.parentSampled?j=n.parentSampled:void 0!==i.tracesSampleRate?(j=i.tracesSampleRate,r.setMetadata({sampleRate:Number(j)})):(j=1,r.setMetadata({sampleRate:j})),function isValidSampleRate(r){if((0,_.i2)(r)||"number"!=typeof r&&"boolean"!=typeof r)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(r)} of type ${JSON.stringify(typeof r)}.`),!1;if(r<0||r>1)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${r}.`),!1;return!0}(j)?j?(r.sampled=Math.random(){n.d(i,{AT:()=>$,io:()=>IdleTransaction});var o=n(97685),_=n(80431),j=n(68762),q=n(42164);const $={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},ie=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class IdleTransactionSpanRecorder extends j.gB{constructor(r,i,n,o){super(o),this._pushActivity=r,this._popActivity=i,this.transactionSpanId=n}add(r){r.spanId!==this.transactionSpanId&&(r.finish=i=>{r.endTimestamp="number"==typeof i?i:(0,o.ph)(),this._popActivity(r.spanId)},void 0===r.endTimestamp&&this._pushActivity(r.spanId)),super.add(r)}}class IdleTransaction extends q.Y{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=ie[4]}constructor(r,i,n=$.idleTimeout,o=$.finalTimeout,j=$.heartbeatInterval,q=!1){super(r,i),this._idleHub=i,this._idleTimeout=n,this._finalTimeout=o,this._heartbeatInterval=j,this._onScope=q,IdleTransaction.prototype.__init.call(this),IdleTransaction.prototype.__init2.call(this),IdleTransaction.prototype.__init3.call(this),IdleTransaction.prototype.__init4.call(this),IdleTransaction.prototype.__init5.call(this),IdleTransaction.prototype.__init6.call(this),q&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),i.configureScope((r=>r.setSpan(this)))),this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=ie[3],this.finish())}),this._finalTimeout)}finish(r=(0,o.ph)()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*r).toISOString(),this.op);for(const i of this._beforeFinishCallbacks)i(this,r);this.spanRecorder.spans=this.spanRecorder.spans.filter((i=>{if(i.spanId===this.spanId)return!0;i.endTimestamp||(i.endTimestamp=r,i.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(i,void 0,2)));const n=i.startTimestamp{this._finished||this._pushActivity(r)},popActivity=r=>{this._finished||this._popActivity(r)};this.spanRecorder=new IdleTransactionSpanRecorder(pushActivity,popActivity,this.spanId,r),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(r,{restartOnChildSpanChange:i}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===i,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=ie[5],this.finish(r)))}setFinishReason(r){this._finishReason=r}_restartIdleTimeout(r){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=ie[1],this.finish(r))}),this._idleTimeout)}_pushActivity(r){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log(`[Tracing] pushActivity: ${r}`),this.activities[r]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(r){if(this.activities[r]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log(`[Tracing] popActivity ${r}`),delete this.activities[r],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const r=(0,o.ph)();this._idleTimeoutCanceledPermanently?(this._finishReason=ie[5],this.finish(r)):this._restartIdleTimeout(r+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const r=Object.keys(this.activities).join("");r===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=r,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=ie[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}},68762:(r,i,n)=>{n.d(i,{Dr:()=>Span,gB:()=>SpanRecorder});var o=n(82681),_=n(97685),j=n(80431),q=n(89043);class SpanRecorder{__init(){this.spans=[]}constructor(r=1e3){SpanRecorder.prototype.__init.call(this),this._maxlen=r}add(r){this.spans.length>this._maxlen?r.spanRecorder=void 0:this.spans.push(r)}}class Span{__init2(){this.traceId=(0,o.DM)()}__init3(){this.spanId=(0,o.DM)().substring(16)}__init4(){this.startTimestamp=(0,_.ph)()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(r){if(Span.prototype.__init2.call(this),Span.prototype.__init3.call(this),Span.prototype.__init4.call(this),Span.prototype.__init5.call(this),Span.prototype.__init6.call(this),Span.prototype.__init7.call(this),!r)return this;r.traceId&&(this.traceId=r.traceId),r.spanId&&(this.spanId=r.spanId),r.parentSpanId&&(this.parentSpanId=r.parentSpanId),"sampled"in r&&(this.sampled=r.sampled),r.op&&(this.op=r.op),r.description&&(this.description=r.description),r.data&&(this.data=r.data),r.tags&&(this.tags=r.tags),r.status&&(this.status=r.status),r.startTimestamp&&(this.startTimestamp=r.startTimestamp),r.endTimestamp&&(this.endTimestamp=r.endTimestamp),r.instrumenter&&(this.instrumenter=r.instrumenter)}startChild(r){const i=new Span({...r,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(i.spanRecorder=this.spanRecorder,i.spanRecorder&&i.spanRecorder.add(i),i.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.transaction){const n=`[Tracing] Starting '${r&&r.op||"< unknown op >"}' span on transaction '${i.transaction.name||"< unknown name >"}' (${i.transaction.spanId}).`;i.transaction.metadata.spanMetadata[i.spanId]={logMessage:n},j.kg.log(n)}return i}setTag(r,i){return this.tags={...this.tags,[r]:i},this}setData(r,i){return this.data={...this.data,[r]:i},this}setStatus(r){return this.status=r,this}setHttpStatus(r){this.setTag("http.status_code",String(r));const i=function spanStatusfromHttpCode(r){if(r<400&&r>=100)return"ok";if(r>=400&&r<500)switch(r){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(r>=500&&r<600)switch(r){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(r);return"unknown_error"!==i&&this.setStatus(i),this}isSuccess(){return"ok"===this.status}finish(r){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:r}=this.transaction.metadata.spanMetadata[this.spanId];r&&j.kg.log(r.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof r?r:(0,_.ph)()}toTraceparent(){let r="";return void 0!==this.sampled&&(r=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${r}`}toContext(){return(0,q.Jr)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(r){return this.data=r.data||{},this.description=r.description,this.endTimestamp=r.endTimestamp,this.op=r.op,this.parentSpanId=r.parentSpanId,this.sampled=r.sampled,this.spanId=r.spanId||this.spanId,this.startTimestamp=r.startTimestamp||this.startTimestamp,this.status=r.status,this.tags=r.tags||{},this.traceId=r.traceId||this.traceId,this}getTraceContext(){return(0,q.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return(0,q.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}},42164:(r,i,n)=>{n.d(i,{Y:()=>Transaction});var o=n(80431),_=n(89043),j=n(59277),q=n(12035),$=n(68762);class Transaction extends $.Dr{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(r,i){super(r),Transaction.prototype.__init.call(this),Transaction.prototype.__init2.call(this),Transaction.prototype.__init3.call(this),this._hub=i||(0,q.Gd)(),this._name=r.name||"",this.metadata={source:"custom",...r.metadata,spanMetadata:{}},this._trimEnd=r.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(r){this.setName(r)}setName(r,i="custom"){this._name=r,this.metadata.source=i}initSpanRecorder(r=1e3){this.spanRecorder||(this.spanRecorder=new $.gB(r)),this.spanRecorder.add(this)}setContext(r,i){null===i?delete this._contexts[r]:this._contexts[r]=i}setMeasurement(r,i,n=""){this._measurements[r]={value:i,unit:n}}setMetadata(r){this.metadata={...this.metadata,...r}}finish(r){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.warn("Transaction has no name, falling back to ``."),this.name=""),super.finish(r);const i=this._hub.getClient();if(i&&i.emit&&i.emit("finishTransaction",this),!0!==this.sampled)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(i&&i.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((r=>r!==this&&r.endTimestamp)):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce(((r,i)=>r.endTimestamp&&i.endTimestamp?r.endTimestamp>i.endTimestamp?r:i:r)).endTimestamp);const _=this.metadata,j={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{..._,dynamicSamplingContext:this.getDynamicSamplingContext()},..._.source&&{transaction_info:{source:_.source}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),j.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(j)}toContext(){const r=super.toContext();return(0,_.Jr)({...r,name:this.name,trimEnd:this._trimEnd})}updateWithContext(r){return super.updateWithContext(r),this.name=r.name||"",this._trimEnd=r.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const r=this._hub||(0,q.Gd)(),i=r&&r.getClient();if(!i)return{};const{environment:n,release:o}=i.getOptions()||{},{publicKey:$}=i.getDsn()||{},ie=this.metadata.sampleRate,ne=void 0!==ie?ie.toString():void 0,{segment:oe}=r.getScope().getUser()||{},se=this.metadata.source,le=se&&"url"!==se?this.name:void 0,_e=(0,_.Jr)({environment:n||j.J,release:o,transaction:le,user_segment:oe,public_key:$,trace_id:this.traceId,sample_rate:ne});return i.emit&&i.emit("createDsc",_e),_e}setHub(r){this._hub=r}}},73958:(r,i,n)=>{n.d(i,{x1:()=>getActiveTransaction});var o=n(12035);function getActiveTransaction(r){return(r||(0,o.Gd)()).getScope().getTransaction()}},20642:(r,i,n)=>{n.d(i,{z:()=>hasTracingEnabled});var o=n(12035);function hasTracingEnabled(r){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const i=(0,o.Gd)().getClient(),n=r||i&&i.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}},6390:(r,i,n)=>{n.d(i,{Rt:()=>htmlTreeAsString,l4:()=>getLocationHref,qT:()=>getDomElement});var o=n(50619);const _=(0,n(92420).Rf)();function htmlTreeAsString(r,i={}){try{let n=r;const o=5,_=[];let j=0,q=0;const $=" > ",ie=$.length;let ne;const oe=Array.isArray(i)?i:i.keyAttrs,se=!Array.isArray(i)&&i.maxStringLength||80;for(;n&&j++1&&q+_.length*ie+ne.length>=se));)_.push(ne),q+=ne.length,n=n.parentNode;return _.reverse().join($)}catch(n){return""}}function _htmlElementAsString(r,i){const n=r,_=[];let j,q,$,ie,ne;if(!n||!n.tagName)return"";_.push(n.tagName.toLowerCase());const oe=i&&i.length?i.filter((r=>n.getAttribute(r))).map((r=>[r,n.getAttribute(r)])):null;if(oe&&oe.length)oe.forEach((r=>{_.push(`[${r[0]}="${r[1]}"]`)}));else if(n.id&&_.push(`#${n.id}`),j=n.className,j&&(0,o.HD)(j))for(q=j.split(/\s+/),ne=0;ne{function isBrowserBundle(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function getSDKSource(){return"npm"}n.d(i,{S:()=>getSDKSource,n:()=>isBrowserBundle})},77157:(r,i,n)=>{n.d(i,{xU:()=>se,oq:()=>addInstrumentationHandler});var o=n(50619),_=n(80431),j=n(89043),q=n(15391),$=n(77653),ie=n(92420);const ne=(0,ie.Rf)();const oe=(0,ie.Rf)(),se="__sentry_xhr_v2__",le={},_e={};function instrument(r){if(!_e[r])switch(_e[r]=!0,r){case"console":!function instrumentConsole(){if(!("console"in oe))return;_.RU.forEach((function(r){r in oe.console&&(0,j.hl)(oe.console,r,(function(i){return function(...n){triggerHandlers("console",{args:n,level:r}),i&&i.apply(oe.console,n)}}))}))}();break;case"dom":!function instrumentDOM(){if(!("document"in oe))return;const r=triggerHandlers.bind(null,"dom"),i=makeDOMEventHandler(r,!0);oe.document.addEventListener("click",i,!1),oe.document.addEventListener("keypress",i,!1),["EventTarget","Node"].forEach((i=>{const n=oe[i]&&oe[i].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,j.hl)(n,"addEventListener",(function(i){return function(n,o,_){if("click"===n||"keypress"==n)try{const o=this,j=o.__sentry_instrumentation_handlers__=o.__sentry_instrumentation_handlers__||{},q=j[n]=j[n]||{refCount:0};if(!q.handler){const o=makeDOMEventHandler(r);q.handler=o,i.call(this,n,o,_)}q.refCount++}catch(j){}return i.call(this,n,o,_)}})),(0,j.hl)(n,"removeEventListener",(function(r){return function(i,n,o){if("click"===i||"keypress"==i)try{const n=this,_=n.__sentry_instrumentation_handlers__||{},j=_[i];j&&(j.refCount--,j.refCount<=0&&(r.call(this,i,j.handler,o),j.handler=void 0,delete _[i]),0===Object.keys(_).length&&delete n.__sentry_instrumentation_handlers__)}catch(_){}return r.call(this,i,n,o)}})))}))}();break;case"xhr":!function instrumentXHR(){if(!("XMLHttpRequest"in oe))return;const r=XMLHttpRequest.prototype;(0,j.hl)(r,"open",(function(r){return function(...i){const n=i[1],_=this[se]={method:(0,o.HD)(i[0])?i[0].toUpperCase():i[0],url:i[1],request_headers:{}};(0,o.HD)(n)&&"POST"===_.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const onreadystatechangeHandler=()=>{const r=this[se];if(r&&4===this.readyState){try{r.status_code=this.status}catch(n){}triggerHandlers("xhr",{args:i,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?(0,j.hl)(this,"onreadystatechange",(function(r){return function(...i){return onreadystatechangeHandler(),r.apply(this,i)}})):this.addEventListener("readystatechange",onreadystatechangeHandler),(0,j.hl)(this,"setRequestHeader",(function(r){return function(...i){const[n,o]=i,_=this[se];return _&&(_.request_headers[n.toLowerCase()]=o),r.apply(this,i)}})),r.apply(this,i)}})),(0,j.hl)(r,"send",(function(r){return function(...i){const n=this[se];return n&&void 0!==i[0]&&(n.body=i[0]),triggerHandlers("xhr",{args:i,startTimestamp:Date.now(),xhr:this}),r.apply(this,i)}}))}();break;case"fetch":!function instrumentFetch(){if(!(0,$.t$)())return;(0,j.hl)(oe,"fetch",(function(r){return function(...i){const{method:n,url:o}=function parseFetchArgs(r){if(0===r.length)return{method:"GET",url:""};if(2===r.length){const[i,n]=r;return{url:getUrlFromResource(i),method:hasProp(n,"method")?String(n.method).toUpperCase():"GET"}}const i=r[0];return{url:getUrlFromResource(i),method:hasProp(i,"method")?String(i.method).toUpperCase():"GET"}}(i),_={args:i,fetchData:{method:n,url:o},startTimestamp:Date.now()};return triggerHandlers("fetch",{..._}),r.apply(oe,i).then((r=>(triggerHandlers("fetch",{..._,endTimestamp:Date.now(),response:r}),r)),(r=>{throw triggerHandlers("fetch",{..._,endTimestamp:Date.now(),error:r}),r}))}}))}();break;case"history":!function instrumentHistory(){if(!function supportsHistory(){const r=ne.chrome,i=r&&r.app&&r.app.runtime,n="history"in ne&&!!ne.history.pushState&&!!ne.history.replaceState;return!i&&n}())return;const r=oe.onpopstate;function historyReplacementFunction(r){return function(...i){const n=i.length>2?i[2]:void 0;if(n){const r=pe,i=String(n);pe=i,triggerHandlers("history",{from:r,to:i})}return r.apply(this,i)}}oe.onpopstate=function(...i){const n=oe.location.href,o=pe;if(pe=n,triggerHandlers("history",{from:o,to:n}),r)try{return r.apply(this,i)}catch(_){}},(0,j.hl)(oe.history,"pushState",historyReplacementFunction),(0,j.hl)(oe.history,"replaceState",historyReplacementFunction)}();break;case"error":!function instrumentError(){ge=oe.onerror,oe.onerror=function(r,i,n,o,_){return triggerHandlers("error",{column:o,error:_,line:n,msg:r,url:i}),!(!ge||ge.__SENTRY_LOADER__)&&ge.apply(this,arguments)},oe.onerror.__SENTRY_INSTRUMENTED__=!0}();break;case"unhandledrejection":!function instrumentUnhandledRejection(){we=oe.onunhandledrejection,oe.onunhandledrejection=function(r){return triggerHandlers("unhandledrejection",r),!(we&&!we.__SENTRY_LOADER__)||we.apply(this,arguments)},oe.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}();break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.warn("unknown instrumentation type:",r))}}function addInstrumentationHandler(r,i){le[r]=le[r]||[],le[r].push(i),instrument(r)}function triggerHandlers(r,i){if(r&&le[r])for(const o of le[r]||[])try{o(i)}catch(n){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.error(`Error while triggering instrumentation handler.\nType: ${r}\nName: ${(0,q.$P)(o)}\nError:`,n)}}function hasProp(r,i){return!!r&&"object"==typeof r&&!!r[i]}function getUrlFromResource(r){return"string"==typeof r?r:r?hasProp(r,"url")?r.url:r.toString?r.toString():"":""}let pe;let he,me;function makeDOMEventHandler(r,i=!1){return n=>{if(!n||me===n)return;if(function shouldSkipDOMEvent(r){if("keypress"!==r.type)return!1;try{const i=r.target;if(!i||!i.tagName)return!0;if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||i.isContentEditable)return!1}catch(i){}return!0}(n))return;const o="keypress"===n.type?"input":n.type;(void 0===he||function shouldShortcircuitPreviousDebounce(r,i){if(!r)return!0;if(r.type!==i.type)return!0;try{if(r.target!==i.target)return!0}catch(n){}return!1}(me,n))&&(r({event:n,name:o,global:i}),me=n),clearTimeout(he),he=oe.setTimeout((()=>{he=void 0}),1e3)}}let ge=null;let we=null},50619:(r,i,n)=>{n.d(i,{Cy:()=>isSyntheticEvent,HD:()=>isString,J8:()=>isThenable,Kj:()=>isRegExp,PO:()=>isPlainObject,TX:()=>isDOMError,V9:()=>isInstanceOf,VW:()=>isErrorEvent,VZ:()=>isError,cO:()=>isEvent,fm:()=>isDOMException,i2:()=>isNaN,kK:()=>isElement,pt:()=>isPrimitive});const o=Object.prototype.toString;function isError(r){switch(o.call(r)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return isInstanceOf(r,Error)}}function isBuiltin(r,i){return o.call(r)===`[object ${i}]`}function isErrorEvent(r){return isBuiltin(r,"ErrorEvent")}function isDOMError(r){return isBuiltin(r,"DOMError")}function isDOMException(r){return isBuiltin(r,"DOMException")}function isString(r){return isBuiltin(r,"String")}function isPrimitive(r){return null===r||"object"!=typeof r&&"function"!=typeof r}function isPlainObject(r){return isBuiltin(r,"Object")}function isEvent(r){return"undefined"!=typeof Event&&isInstanceOf(r,Event)}function isElement(r){return"undefined"!=typeof Element&&isInstanceOf(r,Element)}function isRegExp(r){return isBuiltin(r,"RegExp")}function isThenable(r){return Boolean(r&&r.then&&"function"==typeof r.then)}function isSyntheticEvent(r){return isPlainObject(r)&&"nativeEvent"in r&&"preventDefault"in r&&"stopPropagation"in r}function isNaN(r){return"number"==typeof r&&r!=r}function isInstanceOf(r,i){try{return r instanceof i}catch(n){return!1}}},80431:(r,i,n)=>{n.d(i,{Cf:()=>consoleSandbox,RU:()=>_,kg:()=>j});var o=n(92420);const _=["debug","info","warn","error","log","assert","trace"];function consoleSandbox(r){if(!("console"in o.n2))return r();const i=o.n2.console,n={};_.forEach((r=>{const o=i[r]&&i[r].__sentry_original__;r in i&&o&&(n[r]=i[r],i[r]=o)}));try{return r()}finally{Object.keys(n).forEach((r=>{i[r]=n[r]}))}}function makeLogger(){let r=!1;const i={enable:()=>{r=!0},disable:()=>{r=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?_.forEach((n=>{i[n]=(...i)=>{r&&consoleSandbox((()=>{o.n2.console[n](`Sentry Logger [${n}]:`,...i)}))}})):_.forEach((r=>{i[r]=()=>{}})),i}let j;j="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?(0,o.YO)("logger",makeLogger):makeLogger()},82681:(r,i,n)=>{n.d(i,{DM:()=>uuid4,Db:()=>addExceptionTypeValue,EG:()=>addExceptionMechanism,YO:()=>checkOrSetAlreadyCaught,jH:()=>getEventDescription,lE:()=>arrayify});var o=n(89043),_=n(92420);function uuid4(){const r=_.n2,i=r.crypto||r.msCrypto;if(i&&i.randomUUID)return i.randomUUID().replace(/-/g,"");const n=i&&i.getRandomValues?()=>i.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(r=>(r^(15&n())>>r/4).toString(16)))}function getFirstException(r){return r.exception&&r.exception.values?r.exception.values[0]:void 0}function getEventDescription(r){const{message:i,event_id:n}=r;if(i)return i;const o=getFirstException(r);return o?o.type&&o.value?`${o.type}: ${o.value}`:o.type||o.value||n||"":n||""}function addExceptionTypeValue(r,i,n){const o=r.exception=r.exception||{},_=o.values=o.values||[],j=_[0]=_[0]||{};j.value||(j.value=i||""),j.type||(j.type=n||"Error")}function addExceptionMechanism(r,i){const n=getFirstException(r);if(!n)return;const o=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...o,...i},i&&"data"in i){const r={...o&&o.data,...i.data};n.mechanism.data=r}}function checkOrSetAlreadyCaught(r){if(r&&r.__sentry_captured__)return!0;try{(0,o.xp)(r,"__sentry_captured__",!0)}catch(i){}return!1}function arrayify(r){return Array.isArray(r)?r:[r]}},98612:(r,i,n)=>{n.d(i,{KV:()=>isNodeEnv,l$:()=>dynamicRequire});var o=n(77147);r=n.hmd(r);var _=n(2724);function isNodeEnv(){return!(0,o.n)()&&"[object process]"===Object.prototype.toString.call(void 0!==_?_:0)}function dynamicRequire(r,i){return r.require(i)}},89043:(r,i,n)=>{n.d(i,{$Q:()=>markFunctionWrapped,HK:()=>getOriginalFunction,Jr:()=>dropUndefinedKeys,Sh:()=>convertToPlainObject,_j:()=>urlEncode,hl:()=>fill,xp:()=>addNonEnumerableProperty,zf:()=>extractExceptionKeysForMessage});var o=n(6390),_=n(50619),j=n(18154);function fill(r,i,n){if(!(i in r))return;const o=r[i],_=n(o);if("function"==typeof _)try{markFunctionWrapped(_,o)}catch(j){}r[i]=_}function addNonEnumerableProperty(r,i,n){Object.defineProperty(r,i,{value:n,writable:!0,configurable:!0})}function markFunctionWrapped(r,i){const n=i.prototype||{};r.prototype=i.prototype=n,addNonEnumerableProperty(r,"__sentry_original__",i)}function getOriginalFunction(r){return r.__sentry_original__}function urlEncode(r){return Object.keys(r).map((i=>`${encodeURIComponent(i)}=${encodeURIComponent(r[i])}`)).join("&")}function convertToPlainObject(r){if((0,_.VZ)(r))return{message:r.message,name:r.name,stack:r.stack,...getOwnProperties(r)};if((0,_.cO)(r)){const i={type:r.type,target:serializeEventTarget(r.target),currentTarget:serializeEventTarget(r.currentTarget),...getOwnProperties(r)};return"undefined"!=typeof CustomEvent&&(0,_.V9)(r,CustomEvent)&&(i.detail=r.detail),i}return r}function serializeEventTarget(r){try{return(0,_.kK)(r)?(0,o.Rt)(r):Object.prototype.toString.call(r)}catch(i){return""}}function getOwnProperties(r){if("object"==typeof r&&null!==r){const i={};for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[n]=r[n]);return i}return{}}function extractExceptionKeysForMessage(r,i=40){const n=Object.keys(convertToPlainObject(r));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=i)return(0,j.$G)(n[0],i);for(let o=n.length;o>0;o--){const r=n.slice(0,o).join(", ");if(!(r.length>i))return o===n.length?r:(0,j.$G)(r,i)}return""}function dropUndefinedKeys(r){return _dropUndefinedKeys(r,new Map)}function _dropUndefinedKeys(r,i){if((0,_.PO)(r)){const n=i.get(r);if(void 0!==n)return n;const o={};i.set(r,o);for(const _ of Object.keys(r))void 0!==r[_]&&(o[_]=_dropUndefinedKeys(r[_],i));return o}if(Array.isArray(r)){const n=i.get(r);if(void 0!==n)return n;const o=[];return i.set(r,o),r.forEach((r=>{o.push(_dropUndefinedKeys(r,i))})),o}return r}},15391:(r,i,n)=>{n.d(i,{$P:()=>getFunctionName,Sq:()=>stackParserFromStackParserOptions,pE:()=>createStackParser});const o=/\(error: (.*)\)/;function createStackParser(...r){const i=r.sort(((r,i)=>r[0]-i[0])).map((r=>r[1]));return(r,n=0)=>{const _=[],j=r.split("\n");for(let q=n;q1024)continue;const n=o.test(r)?r.replace(o,"$1"):r;if(!n.match(/\S*Error: /)){for(const r of i){const i=r(n);if(i){_.push(i);break}}if(_.length>=50)break}}return function stripSentryFramesAndReverse(r){if(!r.length)return[];const i=r.slice(0,50),n=i[i.length-1].function;n&&/sentryWrapped/.test(n)&&i.pop();i.reverse();const o=i[i.length-1].function;o&&/captureMessage|captureException/.test(o)&&i.pop();return i.map((r=>({...r,filename:r.filename||i[i.length-1].filename,function:r.function||"?"})))}(_)}}function stackParserFromStackParserOptions(r){return Array.isArray(r)?createStackParser(...r):r}const _="";function getFunctionName(r){try{return r&&"function"==typeof r&&r.name||_}catch(i){return _}}},18154:(r,i,n)=>{n.d(i,{$G:()=>truncate,U0:()=>stringMatchesSomePattern,nK:()=>safeJoin});var o=n(50619);function truncate(r,i=0){return"string"!=typeof r||0===i||r.length<=i?r:`${r.slice(0,i)}...`}function safeJoin(r,i){if(!Array.isArray(r))return"";const n=[];for(let _=0;_function isMatchingPattern(r,i,n=!1){return!!(0,o.HD)(r)&&((0,o.Kj)(i)?i.test(r):!!(0,o.HD)(i)&&(n?r===i:r.includes(i)))}(r,i,n)))}},77653:(r,i,n)=>{n.d(i,{Ak:()=>supportsFetch,Du:()=>isNativeFetch,t$:()=>supportsNativeFetch});var o=n(80431);const _=(0,n(92420).Rf)();function supportsFetch(){if(!("fetch"in _))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(r){return!1}}function isNativeFetch(r){return r&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(r.toString())}function supportsNativeFetch(){if(!supportsFetch())return!1;if(isNativeFetch(_.fetch))return!0;let r=!1;const i=_.document;if(i&&"function"==typeof i.createElement)try{const n=i.createElement("iframe");n.hidden=!0,i.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(r=isNativeFetch(n.contentWindow.fetch)),i.head.removeChild(n)}catch(n){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return r}},16816:(r,i,n)=>{n.d(i,{$2:()=>rejectedSyncPromise,WD:()=>resolvedSyncPromise,cW:()=>SyncPromise});var o,_=n(50619);function resolvedSyncPromise(r){return new SyncPromise((i=>{i(r)}))}function rejectedSyncPromise(r){return new SyncPromise(((i,n)=>{n(r)}))}!function(r){r[r.PENDING=0]="PENDING";r[r.RESOLVED=1]="RESOLVED";r[r.REJECTED=2]="REJECTED"}(o||(o={}));class SyncPromise{__init(){this._state=o.PENDING}__init2(){this._handlers=[]}constructor(r){SyncPromise.prototype.__init.call(this),SyncPromise.prototype.__init2.call(this),SyncPromise.prototype.__init3.call(this),SyncPromise.prototype.__init4.call(this),SyncPromise.prototype.__init5.call(this),SyncPromise.prototype.__init6.call(this);try{r(this._resolve,this._reject)}catch(i){this._reject(i)}}then(r,i){return new SyncPromise(((n,o)=>{this._handlers.push([!1,i=>{if(r)try{n(r(i))}catch(_){o(_)}else n(i)},r=>{if(i)try{n(i(r))}catch(_){o(_)}else o(r)}]),this._executeHandlers()}))}catch(r){return this.then((r=>r),r)}finally(r){return new SyncPromise(((i,n)=>{let o,_;return this.then((i=>{_=!1,o=i,r&&r()}),(i=>{_=!0,o=i,r&&r()})).then((()=>{_?n(o):i(o)}))}))}__init3(){this._resolve=r=>{this._setResult(o.RESOLVED,r)}}__init4(){this._reject=r=>{this._setResult(o.REJECTED,r)}}__init5(){this._setResult=(r,i)=>{this._state===o.PENDING&&((0,_.J8)(i)?i.then(this._resolve,this._reject):(this._state=r,this._value=i,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===o.PENDING)return;const r=this._handlers.slice();this._handlers=[],r.forEach((r=>{r[0]||(this._state===o.RESOLVED&&r[1](this._value),this._state===o.REJECTED&&r[2](this._value),r[0]=!0)}))}}}},97685:(r,i,n)=>{n.d(i,{Z1:()=>le,ph:()=>oe,yW:()=>ne});var o=n(98612),_=n(92420);r=n.hmd(r);const j=(0,_.Rf)(),q={nowSeconds:()=>Date.now()/1e3};const $=(0,o.KV)()?function getNodePerformance(){try{return(0,o.l$)(r,"perf_hooks").performance}catch(i){return}}():function getBrowserPerformance(){const{performance:r}=j;if(!r||!r.now)return;return{now:()=>r.now(),timeOrigin:Date.now()-r.now()}}(),ie=void 0===$?q:{nowSeconds:()=>($.timeOrigin+$.now())/1e3},ne=q.nowSeconds.bind(q),oe=ie.nowSeconds.bind(ie);let se;const le=(()=>{const{performance:r}=j;if(!r||!r.now)return void(se="none");const i=36e5,n=r.now(),o=Date.now(),_=r.timeOrigin?Math.abs(r.timeOrigin+n-o):i,q=_{function isGlobalObj(r){return r&&r.Math==Math?r:void 0}n.d(i,{Rf:()=>getGlobalObject,YO:()=>getGlobalSingleton,n2:()=>o});const o="object"==typeof globalThis&&isGlobalObj(globalThis)||"object"==typeof window&&isGlobalObj(window)||"object"==typeof self&&isGlobalObj(self)||"object"==typeof n.g&&isGlobalObj(n.g)||function(){return this}()||{};function getGlobalObject(){return o}function getGlobalSingleton(r,i,n){const _=n||o,j=_.__SENTRY__=_.__SENTRY__||{};return j[r]||(j[r]=i())}},92047:(r,i,n)=>{const o=i;o.bignum=n(11143),o.define=n(75141).define,o.base=n(10479),o.constants=n(55533),o.decoders=n(60412),o.encoders=n(75039)},75141:(r,i,n)=>{const o=n(75039),_=n(60412),j=n(40137);function Entity(r,i){this.name=r,this.body=i,this.decoders={},this.encoders={}}i.define=function define(r,i){return new Entity(r,i)},Entity.prototype._createNamed=function createNamed(r){const i=this.name;function Generated(r){this._initNamed(r,i)}return j(Generated,r),Generated.prototype._initNamed=function _initNamed(i,n){r.call(this,i,n)},new Generated(this)},Entity.prototype._getDecoder=function _getDecoder(r){return r=r||"der",this.decoders.hasOwnProperty(r)||(this.decoders[r]=this._createNamed(_[r])),this.decoders[r]},Entity.prototype.decode=function decode(r,i,n){return this._getDecoder(i).decode(r,n)},Entity.prototype._getEncoder=function _getEncoder(r){return r=r||"der",this.encoders.hasOwnProperty(r)||(this.encoders[r]=this._createNamed(o[r])),this.encoders[r]},Entity.prototype.encode=function encode(r,i,n){return this._getEncoder(i).encode(r,n)}},56465:(r,i,n)=>{const o=n(40137),_=n(35058).b,j=n(28632).Buffer;function DecoderBuffer(r,i){_.call(this,i),j.isBuffer(r)?(this.base=r,this.offset=0,this.length=r.length):this.error("Input not Buffer")}function EncoderBuffer(r,i){if(Array.isArray(r))this.length=0,this.value=r.map((function(r){return EncoderBuffer.isEncoderBuffer(r)||(r=new EncoderBuffer(r,i)),this.length+=r.length,r}),this);else if("number"==typeof r){if(!(0<=r&&r<=255))return i.error("non-byte EncoderBuffer value");this.value=r,this.length=1}else if("string"==typeof r)this.value=r,this.length=j.byteLength(r);else{if(!j.isBuffer(r))return i.error("Unsupported type: "+typeof r);this.value=r,this.length=r.length}}o(DecoderBuffer,_),i.C=DecoderBuffer,DecoderBuffer.isDecoderBuffer=function isDecoderBuffer(r){if(r instanceof DecoderBuffer)return!0;return"object"==typeof r&&j.isBuffer(r.base)&&"DecoderBuffer"===r.constructor.name&&"number"==typeof r.offset&&"number"==typeof r.length&&"function"==typeof r.save&&"function"==typeof r.restore&&"function"==typeof r.isEmpty&&"function"==typeof r.readUInt8&&"function"==typeof r.skip&&"function"==typeof r.raw},DecoderBuffer.prototype.save=function save(){return{offset:this.offset,reporter:_.prototype.save.call(this)}},DecoderBuffer.prototype.restore=function restore(r){const i=new DecoderBuffer(this.base);return i.offset=r.offset,i.length=this.offset,this.offset=r.offset,_.prototype.restore.call(this,r.reporter),i},DecoderBuffer.prototype.isEmpty=function isEmpty(){return this.offset===this.length},DecoderBuffer.prototype.readUInt8=function readUInt8(r){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(r||"DecoderBuffer overrun")},DecoderBuffer.prototype.skip=function skip(r,i){if(!(this.offset+r<=this.length))return this.error(i||"DecoderBuffer overrun");const n=new DecoderBuffer(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+r,this.offset+=r,n},DecoderBuffer.prototype.raw=function raw(r){return this.base.slice(r?r.offset:this.offset,this.length)},i.R=EncoderBuffer,EncoderBuffer.isEncoderBuffer=function isEncoderBuffer(r){if(r instanceof EncoderBuffer)return!0;return"object"==typeof r&&"EncoderBuffer"===r.constructor.name&&"number"==typeof r.length&&"function"==typeof r.join},EncoderBuffer.prototype.join=function join(r,i){return r||(r=j.alloc(this.length)),i||(i=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(r,i),i+=n.length})):("number"==typeof this.value?r[i]=this.value:"string"==typeof this.value?r.write(this.value,i):j.isBuffer(this.value)&&this.value.copy(r,i),i+=this.length)),r}},10479:(r,i,n)=>{const o=i;o.Reporter=n(35058).b,o.DecoderBuffer=n(56465).C,o.EncoderBuffer=n(56465).R,o.Node=n(25324)},25324:(r,i,n)=>{const o=n(35058).b,_=n(56465).R,j=n(56465).C,q=n(97338),$=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],ie=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat($);function Node(r,i,n){const o={};this._baseState=o,o.name=n,o.enc=r,o.parent=i||null,o.children=null,o.tag=null,o.args=null,o.reverseArgs=null,o.choice=null,o.optional=!1,o.any=!1,o.obj=!1,o.use=null,o.useDecoder=null,o.key=null,o.default=null,o.explicit=null,o.implicit=null,o.contains=null,o.parent||(o.children=[],this._wrap())}r.exports=Node;const ne=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function clone(){const r=this._baseState,i={};ne.forEach((function(n){i[n]=r[n]}));const n=new this.constructor(i.parent);return n._baseState=i,n},Node.prototype._wrap=function wrap(){const r=this._baseState;ie.forEach((function(i){this[i]=function _wrappedMethod(){const n=new this.constructor(this);return r.children.push(n),n[i].apply(n,arguments)}}),this)},Node.prototype._init=function init(r){const i=this._baseState;q(null===i.parent),r.call(this),i.children=i.children.filter((function(r){return r._baseState.parent===this}),this),q.equal(i.children.length,1,"Root node can have only one child")},Node.prototype._useArgs=function useArgs(r){const i=this._baseState,n=r.filter((function(r){return r instanceof this.constructor}),this);r=r.filter((function(r){return!(r instanceof this.constructor)}),this),0!==n.length&&(q(null===i.children),i.children=n,n.forEach((function(r){r._baseState.parent=this}),this)),0!==r.length&&(q(null===i.args),i.args=r,i.reverseArgs=r.map((function(r){if("object"!=typeof r||r.constructor!==Object)return r;const i={};return Object.keys(r).forEach((function(n){n==(0|n)&&(n|=0);const o=r[n];i[o]=n})),i})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(r){Node.prototype[r]=function _overrided(){const i=this._baseState;throw new Error(r+" not implemented for encoding: "+i.enc)}})),$.forEach((function(r){Node.prototype[r]=function _tagMethod(){const i=this._baseState,n=Array.prototype.slice.call(arguments);return q(null===i.tag),i.tag=r,this._useArgs(n),this}})),Node.prototype.use=function use(r){q(r);const i=this._baseState;return q(null===i.use),i.use=r,this},Node.prototype.optional=function optional(){return this._baseState.optional=!0,this},Node.prototype.def=function def(r){const i=this._baseState;return q(null===i.default),i.default=r,i.optional=!0,this},Node.prototype.explicit=function explicit(r){const i=this._baseState;return q(null===i.explicit&&null===i.implicit),i.explicit=r,this},Node.prototype.implicit=function implicit(r){const i=this._baseState;return q(null===i.explicit&&null===i.implicit),i.implicit=r,this},Node.prototype.obj=function obj(){const r=this._baseState,i=Array.prototype.slice.call(arguments);return r.obj=!0,0!==i.length&&this._useArgs(i),this},Node.prototype.key=function key(r){const i=this._baseState;return q(null===i.key),i.key=r,this},Node.prototype.any=function any(){return this._baseState.any=!0,this},Node.prototype.choice=function choice(r){const i=this._baseState;return q(null===i.choice),i.choice=r,this._useArgs(Object.keys(r).map((function(i){return r[i]}))),this},Node.prototype.contains=function contains(r){const i=this._baseState;return q(null===i.use),i.contains=r,this},Node.prototype._decode=function decode(r,i){const n=this._baseState;if(null===n.parent)return r.wrapResult(n.children[0]._decode(r,i));let o,_=n.default,q=!0,$=null;if(null!==n.key&&($=r.enterKey(n.key)),n.optional){let o=null;if(null!==n.explicit?o=n.explicit:null!==n.implicit?o=n.implicit:null!==n.tag&&(o=n.tag),null!==o||n.any){if(q=this._peekTag(r,o,n.any),r.isError(q))return q}else{const o=r.save();try{null===n.choice?this._decodeGeneric(n.tag,r,i):this._decodeChoice(r,i),q=!0}catch(ie){q=!1}r.restore(o)}}if(n.obj&&q&&(o=r.enterObject()),q){if(null!==n.explicit){const i=this._decodeTag(r,n.explicit);if(r.isError(i))return i;r=i}const o=r.offset;if(null===n.use&&null===n.choice){let i;n.any&&(i=r.save());const o=this._decodeTag(r,null!==n.implicit?n.implicit:n.tag,n.any);if(r.isError(o))return o;n.any?_=r.raw(i):r=o}if(i&&i.track&&null!==n.tag&&i.track(r.path(),o,r.length,"tagged"),i&&i.track&&null!==n.tag&&i.track(r.path(),r.offset,r.length,"content"),n.any||(_=null===n.choice?this._decodeGeneric(n.tag,r,i):this._decodeChoice(r,i)),r.isError(_))return _;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function decodeChildren(n){n._decode(r,i)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const o=new j(_);_=this._getUse(n.contains,r._reporterState.obj)._decode(o,i)}}return n.obj&&q&&(_=r.leaveObject(o)),null===n.key||null===_&&!0!==q?null!==$&&r.exitKey($):r.leaveKey($,n.key,_),_},Node.prototype._decodeGeneric=function decodeGeneric(r,i,n){const o=this._baseState;return"seq"===r||"set"===r?null:"seqof"===r||"setof"===r?this._decodeList(i,r,o.args[0],n):/str$/.test(r)?this._decodeStr(i,r,n):"objid"===r&&o.args?this._decodeObjid(i,o.args[0],o.args[1],n):"objid"===r?this._decodeObjid(i,null,null,n):"gentime"===r||"utctime"===r?this._decodeTime(i,r,n):"null_"===r?this._decodeNull(i,n):"bool"===r?this._decodeBool(i,n):"objDesc"===r?this._decodeStr(i,r,n):"int"===r||"enum"===r?this._decodeInt(i,o.args&&o.args[0],n):null!==o.use?this._getUse(o.use,i._reporterState.obj)._decode(i,n):i.error("unknown tag: "+r)},Node.prototype._getUse=function _getUse(r,i){const n=this._baseState;return n.useDecoder=this._use(r,i),q(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},Node.prototype._decodeChoice=function decodeChoice(r,i){const n=this._baseState;let o=null,_=!1;return Object.keys(n.choice).some((function(j){const q=r.save(),$=n.choice[j];try{const n=$._decode(r,i);if(r.isError(n))return!1;o={type:j,value:n},_=!0}catch(ie){return r.restore(q),!1}return!0}),this),_?o:r.error("Choice not matched")},Node.prototype._createEncoderBuffer=function createEncoderBuffer(r){return new _(r,this.reporter)},Node.prototype._encode=function encode(r,i,n){const o=this._baseState;if(null!==o.default&&o.default===r)return;const _=this._encodeValue(r,i,n);return void 0===_||this._skipDefault(_,i,n)?void 0:_},Node.prototype._encodeValue=function encode(r,i,n){const _=this._baseState;if(null===_.parent)return _.children[0]._encode(r,i||new o);let j=null;if(this.reporter=i,_.optional&&void 0===r){if(null===_.default)return;r=_.default}let q=null,$=!1;if(_.any)j=this._createEncoderBuffer(r);else if(_.choice)j=this._encodeChoice(r,i);else if(_.contains)q=this._getUse(_.contains,n)._encode(r,i),$=!0;else if(_.children)q=_.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,i,r);if(null===n._baseState.key)return i.error("Child should have a key");const o=i.enterKey(n._baseState.key);if("object"!=typeof r)return i.error("Child expected, but input is not object");const _=n._encode(r[n._baseState.key],i,r);return i.leaveKey(o),_}),this).filter((function(r){return r})),q=this._createEncoderBuffer(q);else if("seqof"===_.tag||"setof"===_.tag){if(!_.args||1!==_.args.length)return i.error("Too many args for : "+_.tag);if(!Array.isArray(r))return i.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,q=this._createEncoderBuffer(r.map((function(n){const o=this._baseState;return this._getUse(o.args[0],r)._encode(n,i)}),n))}else null!==_.use?j=this._getUse(_.use,n)._encode(r,i):(q=this._encodePrimitive(_.tag,r),$=!0);if(!_.any&&null===_.choice){const r=null!==_.implicit?_.implicit:_.tag,n=null===_.implicit?"universal":"context";null===r?null===_.use&&i.error("Tag could be omitted only for .use()"):null===_.use&&(j=this._encodeComposite(r,$,n,q))}return null!==_.explicit&&(j=this._encodeComposite(_.explicit,!1,"context",j)),j},Node.prototype._encodeChoice=function encodeChoice(r,i){const n=this._baseState,o=n.choice[r.type];return o||q(!1,r.type+" not found in "+JSON.stringify(Object.keys(n.choice))),o._encode(r.value,i)},Node.prototype._encodePrimitive=function encodePrimitive(r,i){const n=this._baseState;if(/str$/.test(r))return this._encodeStr(i,r);if("objid"===r&&n.args)return this._encodeObjid(i,n.reverseArgs[0],n.args[1]);if("objid"===r)return this._encodeObjid(i,null,null);if("gentime"===r||"utctime"===r)return this._encodeTime(i,r);if("null_"===r)return this._encodeNull();if("int"===r||"enum"===r)return this._encodeInt(i,n.args&&n.reverseArgs[0]);if("bool"===r)return this._encodeBool(i);if("objDesc"===r)return this._encodeStr(i,r);throw new Error("Unsupported tag: "+r)},Node.prototype._isNumstr=function isNumstr(r){return/^[0-9 ]*$/.test(r)},Node.prototype._isPrintstr=function isPrintstr(r){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(r)}},35058:(r,i,n)=>{const o=n(40137);function Reporter(r){this._reporterState={obj:null,path:[],options:r||{},errors:[]}}function ReporterError(r,i){this.path=r,this.rethrow(i)}i.b=Reporter,Reporter.prototype.isError=function isError(r){return r instanceof ReporterError},Reporter.prototype.save=function save(){const r=this._reporterState;return{obj:r.obj,pathLen:r.path.length}},Reporter.prototype.restore=function restore(r){const i=this._reporterState;i.obj=r.obj,i.path=i.path.slice(0,r.pathLen)},Reporter.prototype.enterKey=function enterKey(r){return this._reporterState.path.push(r)},Reporter.prototype.exitKey=function exitKey(r){const i=this._reporterState;i.path=i.path.slice(0,r-1)},Reporter.prototype.leaveKey=function leaveKey(r,i,n){const o=this._reporterState;this.exitKey(r),null!==o.obj&&(o.obj[i]=n)},Reporter.prototype.path=function path(){return this._reporterState.path.join("/")},Reporter.prototype.enterObject=function enterObject(){const r=this._reporterState,i=r.obj;return r.obj={},i},Reporter.prototype.leaveObject=function leaveObject(r){const i=this._reporterState,n=i.obj;return i.obj=r,n},Reporter.prototype.error=function error(r){let i;const n=this._reporterState,o=r instanceof ReporterError;if(i=o?r:new ReporterError(n.path.map((function(r){return"["+JSON.stringify(r)+"]"})).join(""),r.message||r,r.stack),!n.options.partial)throw i;return o||n.errors.push(i),i},Reporter.prototype.wrapResult=function wrapResult(r){const i=this._reporterState;return i.options.partial?{result:this.isError(r)?null:r,errors:i.errors}:r},o(ReporterError,Error),ReporterError.prototype.rethrow=function rethrow(r){if(this.message=r+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,ReporterError),!this.stack)try{throw new Error(this.message)}catch(i){this.stack=i.stack}return this}},15228:(r,i)=>{function reverse(r){const i={};return Object.keys(r).forEach((function(n){(0|n)==n&&(n|=0);const o=r[n];i[o]=n})),i}i.tagClass={0:"universal",1:"application",2:"context",3:"private"},i.tagClassByName=reverse(i.tagClass),i.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},i.tagByName=reverse(i.tag)},55533:(r,i,n)=>{const o=i;o._reverse=function reverse(r){const i={};return Object.keys(r).forEach((function(n){(0|n)==n&&(n|=0);const o=r[n];i[o]=n})),i},o.der=n(15228)},99008:(r,i,n)=>{const o=n(40137),_=n(11143),j=n(56465).C,q=n(25324),$=n(15228);function DERDecoder(r){this.enc="der",this.name=r.name,this.entity=r,this.tree=new DERNode,this.tree._init(r.body)}function DERNode(r){q.call(this,"der",r)}function derDecodeTag(r,i){let n=r.readUInt8(i);if(r.isError(n))return n;const o=$.tagClass[n>>6],_=0==(32&n);if(31==(31&n)){let o=n;for(n=0;128==(128&o);){if(o=r.readUInt8(i),r.isError(o))return o;n<<=7,n|=127&o}}else n&=31;return{cls:o,primitive:_,tag:n,tagStr:$.tag[n]}}function derDecodeLen(r,i,n){let o=r.readUInt8(n);if(r.isError(o))return o;if(!i&&128===o)return null;if(0==(128&o))return o;const _=127&o;if(_>4)return r.error("length octect is too long");o=0;for(let j=0;j<_;j++){o<<=8;const i=r.readUInt8(n);if(r.isError(i))return i;o|=i}return o}r.exports=DERDecoder,DERDecoder.prototype.decode=function decode(r,i){return j.isDecoderBuffer(r)||(r=new j(r,i)),this.tree._decode(r,i)},o(DERNode,q),DERNode.prototype._peekTag=function peekTag(r,i,n){if(r.isEmpty())return!1;const o=r.save(),_=derDecodeTag(r,'Failed to peek tag: "'+i+'"');return r.isError(_)?_:(r.restore(o),_.tag===i||_.tagStr===i||_.tagStr+"of"===i||n)},DERNode.prototype._decodeTag=function decodeTag(r,i,n){const o=derDecodeTag(r,'Failed to decode tag of "'+i+'"');if(r.isError(o))return o;let _=derDecodeLen(r,o.primitive,'Failed to get length of "'+i+'"');if(r.isError(_))return _;if(!n&&o.tag!==i&&o.tagStr!==i&&o.tagStr+"of"!==i)return r.error('Failed to match tag: "'+i+'"');if(o.primitive||null!==_)return r.skip(_,'Failed to match body of: "'+i+'"');const j=r.save(),q=this._skipUntilEnd(r,'Failed to skip indefinite length body: "'+this.tag+'"');return r.isError(q)?q:(_=r.offset-j.offset,r.restore(j),r.skip(_,'Failed to match body of: "'+i+'"'))},DERNode.prototype._skipUntilEnd=function skipUntilEnd(r,i){for(;;){const n=derDecodeTag(r,i);if(r.isError(n))return n;const o=derDecodeLen(r,n.primitive,i);if(r.isError(o))return o;let _;if(_=n.primitive||null!==o?r.skip(o):this._skipUntilEnd(r,i),r.isError(_))return _;if("end"===n.tagStr)break}},DERNode.prototype._decodeList=function decodeList(r,i,n,o){const _=[];for(;!r.isEmpty();){const i=this._peekTag(r,"end");if(r.isError(i))return i;const j=n.decode(r,"der",o);if(r.isError(j)&&i)break;_.push(j)}return _},DERNode.prototype._decodeStr=function decodeStr(r,i){if("bitstr"===i){const i=r.readUInt8();return r.isError(i)?i:{unused:i,data:r.raw()}}if("bmpstr"===i){const i=r.raw();if(i.length%2==1)return r.error("Decoding of string type: bmpstr length mismatch");let n="";for(let r=0;r{const o=i;o.der=n(99008),o.pem=n(41293)},41293:(r,i,n)=>{const o=n(40137),_=n(28632).Buffer,j=n(99008);function PEMDecoder(r){j.call(this,r),this.enc="pem"}o(PEMDecoder,j),r.exports=PEMDecoder,PEMDecoder.prototype.decode=function decode(r,i){const n=r.toString().split(/[\r\n]+/g),o=i.label.toUpperCase(),q=/^-----(BEGIN|END) ([^-]+)-----$/;let $=-1,ie=-1;for(let _=0;_{const o=n(40137),_=n(28632).Buffer,j=n(25324),q=n(15228);function DEREncoder(r){this.enc="der",this.name=r.name,this.entity=r,this.tree=new DERNode,this.tree._init(r.body)}function DERNode(r){j.call(this,"der",r)}function two(r){return r<10?"0"+r:r}r.exports=DEREncoder,DEREncoder.prototype.encode=function encode(r,i){return this.tree._encode(r,i).join()},o(DERNode,j),DERNode.prototype._encodeComposite=function encodeComposite(r,i,n,o){const j=function encodeTag(r,i,n,o){let _;"seqof"===r?r="seq":"setof"===r&&(r="set");if(q.tagByName.hasOwnProperty(r))_=q.tagByName[r];else{if("number"!=typeof r||(0|r)!==r)return o.error("Unknown tag: "+r);_=r}if(_>=31)return o.error("Multi-octet tag encoding unsupported");i||(_|=32);return _|=q.tagClassByName[n||"universal"]<<6,_}(r,i,n,this.reporter);if(o.length<128){const r=_.alloc(2);return r[0]=j,r[1]=o.length,this._createEncoderBuffer([r,o])}let $=1;for(let _=o.length;_>=256;_>>=8)$++;const ie=_.alloc(2+$);ie[0]=j,ie[1]=128|$;for(let _=1+$,q=o.length;q>0;_--,q>>=8)ie[_]=255&q;return this._createEncoderBuffer([ie,o])},DERNode.prototype._encodeStr=function encodeStr(r,i){if("bitstr"===i)return this._createEncoderBuffer([0|r.unused,r.data]);if("bmpstr"===i){const i=_.alloc(2*r.length);for(let n=0;n=40)return this.reporter.error("Second objid identifier OOB");r.splice(0,2,40*r[0]+r[1])}let o=0;for(let _=0;_=128;i>>=7)o++}const j=_.alloc(o);let q=j.length-1;for(let _=r.length-1;_>=0;_--){let i=r[_];for(j[q--]=127&i;(i>>=7)>0;)j[q--]=128|127&i}return this._createEncoderBuffer(j)},DERNode.prototype._encodeTime=function encodeTime(r,i){let n;const o=new Date(r);return"gentime"===i?n=[two(o.getUTCFullYear()),two(o.getUTCMonth()+1),two(o.getUTCDate()),two(o.getUTCHours()),two(o.getUTCMinutes()),two(o.getUTCSeconds()),"Z"].join(""):"utctime"===i?n=[two(o.getUTCFullYear()%100),two(o.getUTCMonth()+1),two(o.getUTCDate()),two(o.getUTCHours()),two(o.getUTCMinutes()),two(o.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+i+" time is not supported yet"),this._encodeStr(n,"octstr")},DERNode.prototype._encodeNull=function encodeNull(){return this._createEncoderBuffer("")},DERNode.prototype._encodeInt=function encodeInt(r,i){if("string"==typeof r){if(!i)return this.reporter.error("String int or enum given, but no values map");if(!i.hasOwnProperty(r))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(r));r=i[r]}if("number"!=typeof r&&!_.isBuffer(r)){const i=r.toArray();!r.sign&&128&i[0]&&i.unshift(0),r=_.from(i)}if(_.isBuffer(r)){let i=r.length;0===r.length&&i++;const n=_.alloc(i);return r.copy(n),0===r.length&&(n[0]=0),this._createEncoderBuffer(n)}if(r<128)return this._createEncoderBuffer(r);if(r<256)return this._createEncoderBuffer([0,r]);let n=1;for(let _=r;_>=256;_>>=8)n++;const o=new Array(n);for(let _=o.length-1;_>=0;_--)o[_]=255&r,r>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(_.from(o))},DERNode.prototype._encodeBool=function encodeBool(r){return this._createEncoderBuffer(r?255:0)},DERNode.prototype._use=function use(r,i){return"function"==typeof r&&(r=r(i)),r._getEncoder("der").tree},DERNode.prototype._skipDefault=function skipDefault(r,i,n){const o=this._baseState;let _;if(null===o.default)return!1;const j=r.join();if(void 0===o.defaultBuffer&&(o.defaultBuffer=this._encodeValue(o.default,i,n).join()),j.length!==o.defaultBuffer.length)return!1;for(_=0;_{const o=i;o.der=n(25156),o.pem=n(35734)},35734:(r,i,n)=>{const o=n(40137),_=n(25156);function PEMEncoder(r){_.call(this,r),this.enc="pem"}o(PEMEncoder,_),r.exports=PEMEncoder,PEMEncoder.prototype.encode=function encode(r,i){const n=_.prototype.encode.call(this,r).toString("base64"),o=["-----BEGIN "+i.label+"-----"];for(let _=0;_=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function parseHexByte(r,i,n){var o=parseHex4Bits(r,n);return n-1>=i&&(o|=parseHex4Bits(r,n-1)<<4),o}function parseBase(r,i,n,o){for(var _=0,j=Math.min(r.length,n),q=i;q=49?$-49+10:$>=17?$-17+10:$}return _}BN.isBN=function isBN(r){return r instanceof BN||null!==r&&"object"==typeof r&&r.constructor.wordSize===BN.wordSize&&Array.isArray(r.words)},BN.max=function max(r,i){return r.cmp(i)>0?r:i},BN.min=function min(r,i){return r.cmp(i)<0?r:i},BN.prototype._init=function init(r,i,n){if("number"==typeof r)return this._initNumber(r,i,n);if("object"==typeof r)return this._initArray(r,i,n);"hex"===i&&(i=16),assert(i===(0|i)&&i>=2&&i<=36);var o=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)j=r[o]|r[o-1]<<8|r[o-2]<<16,this.words[_]|=j<>>26-q&67108863,(q+=24)>=26&&(q-=26,_++);else if("le"===n)for(o=0,_=0;o>>26-q&67108863,(q+=24)>=26&&(q-=26,_++);return this.strip()},BN.prototype._parseHex=function _parseHex(r,i,n){this.length=Math.ceil((r.length-i)/6),this.words=new Array(this.length);for(var o=0;o=i;o-=2)_=parseHexByte(r,i,o)<=18?(j-=18,q+=1,this.words[q]|=_>>>26):j+=8;else for(o=(r.length-i)%2==0?i+1:i;o=18?(j-=18,q+=1,this.words[q]|=_>>>26):j+=8;this.strip()},BN.prototype._parseBase=function _parseBase(r,i,n){this.words=[0],this.length=1;for(var o=0,_=1;_<=67108863;_*=i)o++;o--,_=_/i|0;for(var j=r.length-n,q=j%o,$=Math.min(j,j-q)+n,ie=0,ne=n;ne<$;ne+=o)ie=parseBase(r,ne,ne+o,i),this.imuln(_),this.words[0]+ie<67108864?this.words[0]+=ie:this._iaddn(ie);if(0!==q){var oe=1;for(ie=parseBase(r,ne,r.length,i),ne=0;ne1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function inspect(){return(this.red?""};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],j=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function smallMulTo(r,i,n){n.negative=i.negative^r.negative;var o=r.length+i.length|0;n.length=o,o=o-1|0;var _=0|r.words[0],j=0|i.words[0],q=_*j,$=67108863&q,ie=q/67108864|0;n.words[0]=$;for(var ne=1;ne>>26,se=67108863&ie,le=Math.min(ne,i.length-1),_e=Math.max(0,ne-r.length+1);_e<=le;_e++){var pe=ne-_e|0;oe+=(q=(_=0|r.words[pe])*(j=0|i.words[_e])+se)/67108864|0,se=67108863&q}n.words[ne]=0|se,ie=0|oe}return 0!==ie?n.words[ne]=0|ie:n.length--,n.strip()}BN.prototype.toString=function toString(r,i){var n;if(i=0|i||1,16===(r=r||10)||"hex"===r){n="";for(var o=0,$=0,ie=0;ie>>24-o&16777215)||ie!==this.length-1?_[6-oe.length]+oe+n:oe+n,(o+=2)>=26&&(o-=26,ie--)}for(0!==$&&(n=$.toString(16)+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(r===(0|r)&&r>=2&&r<=36){var se=j[r],le=q[r];n="";var _e=this.clone();for(_e.negative=0;!_e.isZero();){var pe=_e.modn(le).toString(r);n=(_e=_e.idivn(le)).isZero()?pe+n:_[se-pe.length]+pe+n}for(this.isZero()&&(n="0"+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},BN.prototype.toJSON=function toJSON(){return this.toString(16)},BN.prototype.toBuffer=function toBuffer(r,i){return assert(void 0!==o),this.toArrayLike(o,r,i)},BN.prototype.toArray=function toArray(r,i){return this.toArrayLike(Array,r,i)},BN.prototype.toArrayLike=function toArrayLike(r,i,n){var o=this.byteLength(),_=n||Math.max(1,o);assert(o<=_,"byte array longer than desired length"),assert(_>0,"Requested array length <= 0"),this.strip();var j,q,$="le"===i,ie=new r(_),ne=this.clone();if($){for(q=0;!ne.isZero();q++)j=ne.andln(255),ne.iushrn(8),ie[q]=j;for(;q<_;q++)ie[q]=0}else{for(q=0;q<_-o;q++)ie[q]=0;for(q=0;!ne.isZero();q++)j=ne.andln(255),ne.iushrn(8),ie[_-q-1]=j}return ie},Math.clz32?BN.prototype._countBits=function _countBits(r){return 32-Math.clz32(r)}:BN.prototype._countBits=function _countBits(r){var i=r,n=0;return i>=4096&&(n+=13,i>>>=13),i>=64&&(n+=7,i>>>=7),i>=8&&(n+=4,i>>>=4),i>=2&&(n+=2,i>>>=2),n+i},BN.prototype._zeroBits=function _zeroBits(r){if(0===r)return 26;var i=r,n=0;return 0==(8191&i)&&(n+=13,i>>>=13),0==(127&i)&&(n+=7,i>>>=7),0==(15&i)&&(n+=4,i>>>=4),0==(3&i)&&(n+=2,i>>>=2),0==(1&i)&&n++,n},BN.prototype.bitLength=function bitLength(){var r=this.words[this.length-1],i=this._countBits(r);return 26*(this.length-1)+i},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;ir.length?this.clone().ior(r):r.clone().ior(this)},BN.prototype.uor=function uor(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},BN.prototype.iuand=function iuand(r){var i;i=this.length>r.length?r:this;for(var n=0;nr.length?this.clone().iand(r):r.clone().iand(this)},BN.prototype.uand=function uand(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},BN.prototype.iuxor=function iuxor(r){var i,n;this.length>r.length?(i=this,n=r):(i=r,n=this);for(var o=0;or.length?this.clone().ixor(r):r.clone().ixor(this)},BN.prototype.uxor=function uxor(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},BN.prototype.inotn=function inotn(r){assert("number"==typeof r&&r>=0);var i=0|Math.ceil(r/26),n=r%26;this._expand(i),n>0&&i--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},BN.prototype.notn=function notn(r){return this.clone().inotn(r)},BN.prototype.setn=function setn(r,i){assert("number"==typeof r&&r>=0);var n=r/26|0,o=r%26;return this._expand(n+1),this.words[n]=i?this.words[n]|1<r.length?(n=this,o=r):(n=r,o=this);for(var _=0,j=0;j>>26;for(;0!==_&&j>>26;if(this.length=n.length,0!==_)this.words[this.length]=_,this.length++;else if(n!==this)for(;jr.length?this.clone().iadd(r):r.clone().iadd(this)},BN.prototype.isub=function isub(r){if(0!==r.negative){r.negative=0;var i=this.iadd(r);return r.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var n,o,_=this.cmp(r);if(0===_)return this.negative=0,this.length=1,this.words[0]=0,this;_>0?(n=this,o=r):(n=r,o=this);for(var j=0,q=0;q>26,this.words[q]=67108863&i;for(;0!==j&&q>26,this.words[q]=67108863&i;if(0===j&&q>>13,_e=0|q[1],pe=8191&_e,he=_e>>>13,me=0|q[2],ge=8191&me,we=me>>>13,ve=0|q[3],ye=8191&ve,ke=ve>>>13,Se=0|q[4],Ae=8191&Se,Me=Se>>>13,Te=0|q[5],Re=8191&Te,Be=Te>>>13,Ne=0|q[6],Oe=8191&Ne,je=Ne>>>13,Fe=0|q[7],Ue=8191&Fe,Ve=Fe>>>13,We=0|q[8],$e=8191&We,Ye=We>>>13,Xe=0|q[9],et=8191&Xe,tt=Xe>>>13,rt=0|$[0],it=8191&rt,nt=rt>>>13,at=0|$[1],ot=8191&at,st=at>>>13,ct=0|$[2],dt=8191&ct,ut=ct>>>13,_t=0|$[3],pt=8191&_t,ht=_t>>>13,mt=0|$[4],bt=8191&mt,wt=mt>>>13,vt=0|$[5],yt=8191&vt,kt=vt>>>13,St=0|$[6],At=8191&St,Mt=St>>>13,Et=0|$[7],Tt=8191&Et,Pt=Et>>>13,Ct=0|$[8],xt=8191&Ct,Rt=Ct>>>13,Bt=0|$[9],Dt=8191&Bt,Nt=Bt>>>13;n.negative=r.negative^i.negative,n.length=19;var It=(ne+(o=Math.imul(se,it))|0)+((8191&(_=(_=Math.imul(se,nt))+Math.imul(le,it)|0))<<13)|0;ne=((j=Math.imul(le,nt))+(_>>>13)|0)+(It>>>26)|0,It&=67108863,o=Math.imul(pe,it),_=(_=Math.imul(pe,nt))+Math.imul(he,it)|0,j=Math.imul(he,nt);var Ot=(ne+(o=o+Math.imul(se,ot)|0)|0)+((8191&(_=(_=_+Math.imul(se,st)|0)+Math.imul(le,ot)|0))<<13)|0;ne=((j=j+Math.imul(le,st)|0)+(_>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,o=Math.imul(ge,it),_=(_=Math.imul(ge,nt))+Math.imul(we,it)|0,j=Math.imul(we,nt),o=o+Math.imul(pe,ot)|0,_=(_=_+Math.imul(pe,st)|0)+Math.imul(he,ot)|0,j=j+Math.imul(he,st)|0;var jt=(ne+(o=o+Math.imul(se,dt)|0)|0)+((8191&(_=(_=_+Math.imul(se,ut)|0)+Math.imul(le,dt)|0))<<13)|0;ne=((j=j+Math.imul(le,ut)|0)+(_>>>13)|0)+(jt>>>26)|0,jt&=67108863,o=Math.imul(ye,it),_=(_=Math.imul(ye,nt))+Math.imul(ke,it)|0,j=Math.imul(ke,nt),o=o+Math.imul(ge,ot)|0,_=(_=_+Math.imul(ge,st)|0)+Math.imul(we,ot)|0,j=j+Math.imul(we,st)|0,o=o+Math.imul(pe,dt)|0,_=(_=_+Math.imul(pe,ut)|0)+Math.imul(he,dt)|0,j=j+Math.imul(he,ut)|0;var zt=(ne+(o=o+Math.imul(se,pt)|0)|0)+((8191&(_=(_=_+Math.imul(se,ht)|0)+Math.imul(le,pt)|0))<<13)|0;ne=((j=j+Math.imul(le,ht)|0)+(_>>>13)|0)+(zt>>>26)|0,zt&=67108863,o=Math.imul(Ae,it),_=(_=Math.imul(Ae,nt))+Math.imul(Me,it)|0,j=Math.imul(Me,nt),o=o+Math.imul(ye,ot)|0,_=(_=_+Math.imul(ye,st)|0)+Math.imul(ke,ot)|0,j=j+Math.imul(ke,st)|0,o=o+Math.imul(ge,dt)|0,_=(_=_+Math.imul(ge,ut)|0)+Math.imul(we,dt)|0,j=j+Math.imul(we,ut)|0,o=o+Math.imul(pe,pt)|0,_=(_=_+Math.imul(pe,ht)|0)+Math.imul(he,pt)|0,j=j+Math.imul(he,ht)|0;var qt=(ne+(o=o+Math.imul(se,bt)|0)|0)+((8191&(_=(_=_+Math.imul(se,wt)|0)+Math.imul(le,bt)|0))<<13)|0;ne=((j=j+Math.imul(le,wt)|0)+(_>>>13)|0)+(qt>>>26)|0,qt&=67108863,o=Math.imul(Re,it),_=(_=Math.imul(Re,nt))+Math.imul(Be,it)|0,j=Math.imul(Be,nt),o=o+Math.imul(Ae,ot)|0,_=(_=_+Math.imul(Ae,st)|0)+Math.imul(Me,ot)|0,j=j+Math.imul(Me,st)|0,o=o+Math.imul(ye,dt)|0,_=(_=_+Math.imul(ye,ut)|0)+Math.imul(ke,dt)|0,j=j+Math.imul(ke,ut)|0,o=o+Math.imul(ge,pt)|0,_=(_=_+Math.imul(ge,ht)|0)+Math.imul(we,pt)|0,j=j+Math.imul(we,ht)|0,o=o+Math.imul(pe,bt)|0,_=(_=_+Math.imul(pe,wt)|0)+Math.imul(he,bt)|0,j=j+Math.imul(he,wt)|0;var Lt=(ne+(o=o+Math.imul(se,yt)|0)|0)+((8191&(_=(_=_+Math.imul(se,kt)|0)+Math.imul(le,yt)|0))<<13)|0;ne=((j=j+Math.imul(le,kt)|0)+(_>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,o=Math.imul(Oe,it),_=(_=Math.imul(Oe,nt))+Math.imul(je,it)|0,j=Math.imul(je,nt),o=o+Math.imul(Re,ot)|0,_=(_=_+Math.imul(Re,st)|0)+Math.imul(Be,ot)|0,j=j+Math.imul(Be,st)|0,o=o+Math.imul(Ae,dt)|0,_=(_=_+Math.imul(Ae,ut)|0)+Math.imul(Me,dt)|0,j=j+Math.imul(Me,ut)|0,o=o+Math.imul(ye,pt)|0,_=(_=_+Math.imul(ye,ht)|0)+Math.imul(ke,pt)|0,j=j+Math.imul(ke,ht)|0,o=o+Math.imul(ge,bt)|0,_=(_=_+Math.imul(ge,wt)|0)+Math.imul(we,bt)|0,j=j+Math.imul(we,wt)|0,o=o+Math.imul(pe,yt)|0,_=(_=_+Math.imul(pe,kt)|0)+Math.imul(he,yt)|0,j=j+Math.imul(he,kt)|0;var Ft=(ne+(o=o+Math.imul(se,At)|0)|0)+((8191&(_=(_=_+Math.imul(se,Mt)|0)+Math.imul(le,At)|0))<<13)|0;ne=((j=j+Math.imul(le,Mt)|0)+(_>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o=Math.imul(Ue,it),_=(_=Math.imul(Ue,nt))+Math.imul(Ve,it)|0,j=Math.imul(Ve,nt),o=o+Math.imul(Oe,ot)|0,_=(_=_+Math.imul(Oe,st)|0)+Math.imul(je,ot)|0,j=j+Math.imul(je,st)|0,o=o+Math.imul(Re,dt)|0,_=(_=_+Math.imul(Re,ut)|0)+Math.imul(Be,dt)|0,j=j+Math.imul(Be,ut)|0,o=o+Math.imul(Ae,pt)|0,_=(_=_+Math.imul(Ae,ht)|0)+Math.imul(Me,pt)|0,j=j+Math.imul(Me,ht)|0,o=o+Math.imul(ye,bt)|0,_=(_=_+Math.imul(ye,wt)|0)+Math.imul(ke,bt)|0,j=j+Math.imul(ke,wt)|0,o=o+Math.imul(ge,yt)|0,_=(_=_+Math.imul(ge,kt)|0)+Math.imul(we,yt)|0,j=j+Math.imul(we,kt)|0,o=o+Math.imul(pe,At)|0,_=(_=_+Math.imul(pe,Mt)|0)+Math.imul(he,At)|0,j=j+Math.imul(he,Mt)|0;var Ut=(ne+(o=o+Math.imul(se,Tt)|0)|0)+((8191&(_=(_=_+Math.imul(se,Pt)|0)+Math.imul(le,Tt)|0))<<13)|0;ne=((j=j+Math.imul(le,Pt)|0)+(_>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,o=Math.imul($e,it),_=(_=Math.imul($e,nt))+Math.imul(Ye,it)|0,j=Math.imul(Ye,nt),o=o+Math.imul(Ue,ot)|0,_=(_=_+Math.imul(Ue,st)|0)+Math.imul(Ve,ot)|0,j=j+Math.imul(Ve,st)|0,o=o+Math.imul(Oe,dt)|0,_=(_=_+Math.imul(Oe,ut)|0)+Math.imul(je,dt)|0,j=j+Math.imul(je,ut)|0,o=o+Math.imul(Re,pt)|0,_=(_=_+Math.imul(Re,ht)|0)+Math.imul(Be,pt)|0,j=j+Math.imul(Be,ht)|0,o=o+Math.imul(Ae,bt)|0,_=(_=_+Math.imul(Ae,wt)|0)+Math.imul(Me,bt)|0,j=j+Math.imul(Me,wt)|0,o=o+Math.imul(ye,yt)|0,_=(_=_+Math.imul(ye,kt)|0)+Math.imul(ke,yt)|0,j=j+Math.imul(ke,kt)|0,o=o+Math.imul(ge,At)|0,_=(_=_+Math.imul(ge,Mt)|0)+Math.imul(we,At)|0,j=j+Math.imul(we,Mt)|0,o=o+Math.imul(pe,Tt)|0,_=(_=_+Math.imul(pe,Pt)|0)+Math.imul(he,Tt)|0,j=j+Math.imul(he,Pt)|0;var Vt=(ne+(o=o+Math.imul(se,xt)|0)|0)+((8191&(_=(_=_+Math.imul(se,Rt)|0)+Math.imul(le,xt)|0))<<13)|0;ne=((j=j+Math.imul(le,Rt)|0)+(_>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,o=Math.imul(et,it),_=(_=Math.imul(et,nt))+Math.imul(tt,it)|0,j=Math.imul(tt,nt),o=o+Math.imul($e,ot)|0,_=(_=_+Math.imul($e,st)|0)+Math.imul(Ye,ot)|0,j=j+Math.imul(Ye,st)|0,o=o+Math.imul(Ue,dt)|0,_=(_=_+Math.imul(Ue,ut)|0)+Math.imul(Ve,dt)|0,j=j+Math.imul(Ve,ut)|0,o=o+Math.imul(Oe,pt)|0,_=(_=_+Math.imul(Oe,ht)|0)+Math.imul(je,pt)|0,j=j+Math.imul(je,ht)|0,o=o+Math.imul(Re,bt)|0,_=(_=_+Math.imul(Re,wt)|0)+Math.imul(Be,bt)|0,j=j+Math.imul(Be,wt)|0,o=o+Math.imul(Ae,yt)|0,_=(_=_+Math.imul(Ae,kt)|0)+Math.imul(Me,yt)|0,j=j+Math.imul(Me,kt)|0,o=o+Math.imul(ye,At)|0,_=(_=_+Math.imul(ye,Mt)|0)+Math.imul(ke,At)|0,j=j+Math.imul(ke,Mt)|0,o=o+Math.imul(ge,Tt)|0,_=(_=_+Math.imul(ge,Pt)|0)+Math.imul(we,Tt)|0,j=j+Math.imul(we,Pt)|0,o=o+Math.imul(pe,xt)|0,_=(_=_+Math.imul(pe,Rt)|0)+Math.imul(he,xt)|0,j=j+Math.imul(he,Rt)|0;var Gt=(ne+(o=o+Math.imul(se,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(se,Nt)|0)+Math.imul(le,Dt)|0))<<13)|0;ne=((j=j+Math.imul(le,Nt)|0)+(_>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,o=Math.imul(et,ot),_=(_=Math.imul(et,st))+Math.imul(tt,ot)|0,j=Math.imul(tt,st),o=o+Math.imul($e,dt)|0,_=(_=_+Math.imul($e,ut)|0)+Math.imul(Ye,dt)|0,j=j+Math.imul(Ye,ut)|0,o=o+Math.imul(Ue,pt)|0,_=(_=_+Math.imul(Ue,ht)|0)+Math.imul(Ve,pt)|0,j=j+Math.imul(Ve,ht)|0,o=o+Math.imul(Oe,bt)|0,_=(_=_+Math.imul(Oe,wt)|0)+Math.imul(je,bt)|0,j=j+Math.imul(je,wt)|0,o=o+Math.imul(Re,yt)|0,_=(_=_+Math.imul(Re,kt)|0)+Math.imul(Be,yt)|0,j=j+Math.imul(Be,kt)|0,o=o+Math.imul(Ae,At)|0,_=(_=_+Math.imul(Ae,Mt)|0)+Math.imul(Me,At)|0,j=j+Math.imul(Me,Mt)|0,o=o+Math.imul(ye,Tt)|0,_=(_=_+Math.imul(ye,Pt)|0)+Math.imul(ke,Tt)|0,j=j+Math.imul(ke,Pt)|0,o=o+Math.imul(ge,xt)|0,_=(_=_+Math.imul(ge,Rt)|0)+Math.imul(we,xt)|0,j=j+Math.imul(we,Rt)|0;var Zt=(ne+(o=o+Math.imul(pe,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(pe,Nt)|0)+Math.imul(he,Dt)|0))<<13)|0;ne=((j=j+Math.imul(he,Nt)|0)+(_>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,o=Math.imul(et,dt),_=(_=Math.imul(et,ut))+Math.imul(tt,dt)|0,j=Math.imul(tt,ut),o=o+Math.imul($e,pt)|0,_=(_=_+Math.imul($e,ht)|0)+Math.imul(Ye,pt)|0,j=j+Math.imul(Ye,ht)|0,o=o+Math.imul(Ue,bt)|0,_=(_=_+Math.imul(Ue,wt)|0)+Math.imul(Ve,bt)|0,j=j+Math.imul(Ve,wt)|0,o=o+Math.imul(Oe,yt)|0,_=(_=_+Math.imul(Oe,kt)|0)+Math.imul(je,yt)|0,j=j+Math.imul(je,kt)|0,o=o+Math.imul(Re,At)|0,_=(_=_+Math.imul(Re,Mt)|0)+Math.imul(Be,At)|0,j=j+Math.imul(Be,Mt)|0,o=o+Math.imul(Ae,Tt)|0,_=(_=_+Math.imul(Ae,Pt)|0)+Math.imul(Me,Tt)|0,j=j+Math.imul(Me,Pt)|0,o=o+Math.imul(ye,xt)|0,_=(_=_+Math.imul(ye,Rt)|0)+Math.imul(ke,xt)|0,j=j+Math.imul(ke,Rt)|0;var Ht=(ne+(o=o+Math.imul(ge,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(ge,Nt)|0)+Math.imul(we,Dt)|0))<<13)|0;ne=((j=j+Math.imul(we,Nt)|0)+(_>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,o=Math.imul(et,pt),_=(_=Math.imul(et,ht))+Math.imul(tt,pt)|0,j=Math.imul(tt,ht),o=o+Math.imul($e,bt)|0,_=(_=_+Math.imul($e,wt)|0)+Math.imul(Ye,bt)|0,j=j+Math.imul(Ye,wt)|0,o=o+Math.imul(Ue,yt)|0,_=(_=_+Math.imul(Ue,kt)|0)+Math.imul(Ve,yt)|0,j=j+Math.imul(Ve,kt)|0,o=o+Math.imul(Oe,At)|0,_=(_=_+Math.imul(Oe,Mt)|0)+Math.imul(je,At)|0,j=j+Math.imul(je,Mt)|0,o=o+Math.imul(Re,Tt)|0,_=(_=_+Math.imul(Re,Pt)|0)+Math.imul(Be,Tt)|0,j=j+Math.imul(Be,Pt)|0,o=o+Math.imul(Ae,xt)|0,_=(_=_+Math.imul(Ae,Rt)|0)+Math.imul(Me,xt)|0,j=j+Math.imul(Me,Rt)|0;var Kt=(ne+(o=o+Math.imul(ye,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(ye,Nt)|0)+Math.imul(ke,Dt)|0))<<13)|0;ne=((j=j+Math.imul(ke,Nt)|0)+(_>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,o=Math.imul(et,bt),_=(_=Math.imul(et,wt))+Math.imul(tt,bt)|0,j=Math.imul(tt,wt),o=o+Math.imul($e,yt)|0,_=(_=_+Math.imul($e,kt)|0)+Math.imul(Ye,yt)|0,j=j+Math.imul(Ye,kt)|0,o=o+Math.imul(Ue,At)|0,_=(_=_+Math.imul(Ue,Mt)|0)+Math.imul(Ve,At)|0,j=j+Math.imul(Ve,Mt)|0,o=o+Math.imul(Oe,Tt)|0,_=(_=_+Math.imul(Oe,Pt)|0)+Math.imul(je,Tt)|0,j=j+Math.imul(je,Pt)|0,o=o+Math.imul(Re,xt)|0,_=(_=_+Math.imul(Re,Rt)|0)+Math.imul(Be,xt)|0,j=j+Math.imul(Be,Rt)|0;var Wt=(ne+(o=o+Math.imul(Ae,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(Ae,Nt)|0)+Math.imul(Me,Dt)|0))<<13)|0;ne=((j=j+Math.imul(Me,Nt)|0)+(_>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,o=Math.imul(et,yt),_=(_=Math.imul(et,kt))+Math.imul(tt,yt)|0,j=Math.imul(tt,kt),o=o+Math.imul($e,At)|0,_=(_=_+Math.imul($e,Mt)|0)+Math.imul(Ye,At)|0,j=j+Math.imul(Ye,Mt)|0,o=o+Math.imul(Ue,Tt)|0,_=(_=_+Math.imul(Ue,Pt)|0)+Math.imul(Ve,Tt)|0,j=j+Math.imul(Ve,Pt)|0,o=o+Math.imul(Oe,xt)|0,_=(_=_+Math.imul(Oe,Rt)|0)+Math.imul(je,xt)|0,j=j+Math.imul(je,Rt)|0;var $t=(ne+(o=o+Math.imul(Re,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(Re,Nt)|0)+Math.imul(Be,Dt)|0))<<13)|0;ne=((j=j+Math.imul(Be,Nt)|0)+(_>>>13)|0)+($t>>>26)|0,$t&=67108863,o=Math.imul(et,At),_=(_=Math.imul(et,Mt))+Math.imul(tt,At)|0,j=Math.imul(tt,Mt),o=o+Math.imul($e,Tt)|0,_=(_=_+Math.imul($e,Pt)|0)+Math.imul(Ye,Tt)|0,j=j+Math.imul(Ye,Pt)|0,o=o+Math.imul(Ue,xt)|0,_=(_=_+Math.imul(Ue,Rt)|0)+Math.imul(Ve,xt)|0,j=j+Math.imul(Ve,Rt)|0;var Yt=(ne+(o=o+Math.imul(Oe,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(Oe,Nt)|0)+Math.imul(je,Dt)|0))<<13)|0;ne=((j=j+Math.imul(je,Nt)|0)+(_>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,o=Math.imul(et,Tt),_=(_=Math.imul(et,Pt))+Math.imul(tt,Tt)|0,j=Math.imul(tt,Pt),o=o+Math.imul($e,xt)|0,_=(_=_+Math.imul($e,Rt)|0)+Math.imul(Ye,xt)|0,j=j+Math.imul(Ye,Rt)|0;var Jt=(ne+(o=o+Math.imul(Ue,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(Ue,Nt)|0)+Math.imul(Ve,Dt)|0))<<13)|0;ne=((j=j+Math.imul(Ve,Nt)|0)+(_>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,o=Math.imul(et,xt),_=(_=Math.imul(et,Rt))+Math.imul(tt,xt)|0,j=Math.imul(tt,Rt);var Qt=(ne+(o=o+Math.imul($e,Dt)|0)|0)+((8191&(_=(_=_+Math.imul($e,Nt)|0)+Math.imul(Ye,Dt)|0))<<13)|0;ne=((j=j+Math.imul(Ye,Nt)|0)+(_>>>13)|0)+(Qt>>>26)|0,Qt&=67108863;var Xt=(ne+(o=Math.imul(et,Dt))|0)+((8191&(_=(_=Math.imul(et,Nt))+Math.imul(tt,Dt)|0))<<13)|0;return ne=((j=Math.imul(tt,Nt))+(_>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,ie[0]=It,ie[1]=Ot,ie[2]=jt,ie[3]=zt,ie[4]=qt,ie[5]=Lt,ie[6]=Ft,ie[7]=Ut,ie[8]=Vt,ie[9]=Gt,ie[10]=Zt,ie[11]=Ht,ie[12]=Kt,ie[13]=Wt,ie[14]=$t,ie[15]=Yt,ie[16]=Jt,ie[17]=Qt,ie[18]=Xt,0!==ne&&(ie[19]=ne,n.length++),n};function jumboMulTo(r,i,n){return(new FFTM).mulp(r,i,n)}function FFTM(r,i){this.x=r,this.y=i}Math.imul||($=smallMulTo),BN.prototype.mulTo=function mulTo(r,i){var n,o=this.length+r.length;return n=10===this.length&&10===r.length?$(this,r,i):o<63?smallMulTo(this,r,i):o<1024?function bigMulTo(r,i,n){n.negative=i.negative^r.negative,n.length=r.length+i.length;for(var o=0,_=0,j=0;j>>26)|0)>>>26,q&=67108863}n.words[j]=$,o=q,q=_}return 0!==o?n.words[j]=o:n.length--,n.strip()}(this,r,i):jumboMulTo(this,r,i),n},FFTM.prototype.makeRBT=function makeRBT(r){for(var i=new Array(r),n=BN.prototype._countBits(r)-1,o=0;o>=1;return o},FFTM.prototype.permute=function permute(r,i,n,o,_,j){for(var q=0;q>>=1)_++;return 1<<_+1+o},FFTM.prototype.conjugate=function conjugate(r,i,n){if(!(n<=1))for(var o=0;o>>=13,n[2*j+1]=8191&_,_>>>=13;for(j=2*i;j>=26,i+=o/67108864|0,i+=_>>>26,this.words[n]=67108863&_}return 0!==i&&(this.words[n]=i,this.length++),this},BN.prototype.muln=function muln(r){return this.clone().imuln(r)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(r){var i=function toBitArray(r){for(var i=new Array(r.bitLength()),n=0;n>>_}return i}(r);if(0===i.length)return new BN(1);for(var n=this,o=0;o=0);var i,n=r%26,o=(r-n)/26,_=67108863>>>26-n<<26-n;if(0!==n){var j=0;for(i=0;i>>26-n}j&&(this.words[i]=j,this.length++)}if(0!==o){for(i=this.length-1;i>=0;i--)this.words[i+o]=this.words[i];for(i=0;i=0),o=i?(i-i%26)/26:0;var _=r%26,j=Math.min((r-_)/26,this.length),q=67108863^67108863>>>_<<_,$=n;if(o-=j,o=Math.max(0,o),$){for(var ie=0;iej)for(this.length-=j,ie=0;ie=0&&(0!==ne||ie>=o);ie--){var oe=0|this.words[ie];this.words[ie]=ne<<26-_|oe>>>_,ne=oe&q}return $&&0!==ne&&($.words[$.length++]=ne),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function ishrn(r,i,n){return assert(0===this.negative),this.iushrn(r,i,n)},BN.prototype.shln=function shln(r){return this.clone().ishln(r)},BN.prototype.ushln=function ushln(r){return this.clone().iushln(r)},BN.prototype.shrn=function shrn(r){return this.clone().ishrn(r)},BN.prototype.ushrn=function ushrn(r){return this.clone().iushrn(r)},BN.prototype.testn=function testn(r){assert("number"==typeof r&&r>=0);var i=r%26,n=(r-i)/26,o=1<=0);var i=r%26,n=(r-i)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==i&&n++,this.length=Math.min(n,this.length),0!==i){var o=67108863^67108863>>>i<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(r){if(assert("number"==typeof r),assert(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i>26)-($/67108864|0),this.words[o+n]=67108863&_}for(;o>26,this.words[o+n]=67108863&_;if(0===q)return this.strip();for(assert(-1===q),q=0,o=0;o>26,this.words[o]=67108863&_;return this.negative=1,this.strip()},BN.prototype._wordDiv=function _wordDiv(r,i){var n=(this.length,r.length),o=this.clone(),_=r,j=0|_.words[_.length-1];0!==(n=26-this._countBits(j))&&(_=_.ushln(n),o.iushln(n),j=0|_.words[_.length-1]);var q,$=o.length-_.length;if("mod"!==i){(q=new BN(null)).length=$+1,q.words=new Array(q.length);for(var ie=0;ie=0;oe--){var se=67108864*(0|o.words[_.length+oe])+(0|o.words[_.length+oe-1]);for(se=Math.min(se/j|0,67108863),o._ishlnsubmul(_,se,oe);0!==o.negative;)se--,o.negative=0,o._ishlnsubmul(_,1,oe),o.isZero()||(o.negative^=1);q&&(q.words[oe]=se)}return q&&q.strip(),o.strip(),"div"!==i&&0!==n&&o.iushrn(n),{div:q||null,mod:o}},BN.prototype.divmod=function divmod(r,i,n){return assert(!r.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===r.negative?(j=this.neg().divmod(r,i),"mod"!==i&&(o=j.div.neg()),"div"!==i&&(_=j.mod.neg(),n&&0!==_.negative&&_.iadd(r)),{div:o,mod:_}):0===this.negative&&0!==r.negative?(j=this.divmod(r.neg(),i),"mod"!==i&&(o=j.div.neg()),{div:o,mod:j.mod}):0!=(this.negative&r.negative)?(j=this.neg().divmod(r.neg(),i),"div"!==i&&(_=j.mod.neg(),n&&0!==_.negative&&_.isub(r)),{div:j.div,mod:_}):r.length>this.length||this.cmp(r)<0?{div:new BN(0),mod:this}:1===r.length?"div"===i?{div:this.divn(r.words[0]),mod:null}:"mod"===i?{div:null,mod:new BN(this.modn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new BN(this.modn(r.words[0]))}:this._wordDiv(r,i);var o,_,j},BN.prototype.div=function div(r){return this.divmod(r,"div",!1).div},BN.prototype.mod=function mod(r){return this.divmod(r,"mod",!1).mod},BN.prototype.umod=function umod(r){return this.divmod(r,"mod",!0).mod},BN.prototype.divRound=function divRound(r){var i=this.divmod(r);if(i.mod.isZero())return i.div;var n=0!==i.div.negative?i.mod.isub(r):i.mod,o=r.ushrn(1),_=r.andln(1),j=n.cmp(o);return j<0||1===_&&0===j?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},BN.prototype.modn=function modn(r){assert(r<=67108863);for(var i=(1<<26)%r,n=0,o=this.length-1;o>=0;o--)n=(i*n+(0|this.words[o]))%r;return n},BN.prototype.idivn=function idivn(r){assert(r<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*i;this.words[n]=o/r|0,i=o%r}return this.strip()},BN.prototype.divn=function divn(r){return this.clone().idivn(r)},BN.prototype.egcd=function egcd(r){assert(0===r.negative),assert(!r.isZero());var i=this,n=r.clone();i=0!==i.negative?i.umod(r):i.clone();for(var o=new BN(1),_=new BN(0),j=new BN(0),q=new BN(1),$=0;i.isEven()&&n.isEven();)i.iushrn(1),n.iushrn(1),++$;for(var ie=n.clone(),ne=i.clone();!i.isZero();){for(var oe=0,se=1;0==(i.words[0]&se)&&oe<26;++oe,se<<=1);if(oe>0)for(i.iushrn(oe);oe-- >0;)(o.isOdd()||_.isOdd())&&(o.iadd(ie),_.isub(ne)),o.iushrn(1),_.iushrn(1);for(var le=0,_e=1;0==(n.words[0]&_e)&&le<26;++le,_e<<=1);if(le>0)for(n.iushrn(le);le-- >0;)(j.isOdd()||q.isOdd())&&(j.iadd(ie),q.isub(ne)),j.iushrn(1),q.iushrn(1);i.cmp(n)>=0?(i.isub(n),o.isub(j),_.isub(q)):(n.isub(i),j.isub(o),q.isub(_))}return{a:j,b:q,gcd:n.iushln($)}},BN.prototype._invmp=function _invmp(r){assert(0===r.negative),assert(!r.isZero());var i=this,n=r.clone();i=0!==i.negative?i.umod(r):i.clone();for(var o,_=new BN(1),j=new BN(0),q=n.clone();i.cmpn(1)>0&&n.cmpn(1)>0;){for(var $=0,ie=1;0==(i.words[0]&ie)&&$<26;++$,ie<<=1);if($>0)for(i.iushrn($);$-- >0;)_.isOdd()&&_.iadd(q),_.iushrn(1);for(var ne=0,oe=1;0==(n.words[0]&oe)&&ne<26;++ne,oe<<=1);if(ne>0)for(n.iushrn(ne);ne-- >0;)j.isOdd()&&j.iadd(q),j.iushrn(1);i.cmp(n)>=0?(i.isub(n),_.isub(j)):(n.isub(i),j.isub(_))}return(o=0===i.cmpn(1)?_:j).cmpn(0)<0&&o.iadd(r),o},BN.prototype.gcd=function gcd(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var i=this.clone(),n=r.clone();i.negative=0,n.negative=0;for(var o=0;i.isEven()&&n.isEven();o++)i.iushrn(1),n.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;n.isEven();)n.iushrn(1);var _=i.cmp(n);if(_<0){var j=i;i=n,n=j}else if(0===_||0===n.cmpn(1))break;i.isub(n)}return n.iushln(o)},BN.prototype.invm=function invm(r){return this.egcd(r).a.umod(r)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(r){return this.words[0]&r},BN.prototype.bincn=function bincn(r){assert("number"==typeof r);var i=r%26,n=(r-i)/26,o=1<>>26,q&=67108863,this.words[j]=q}return 0!==_&&(this.words[j]=_,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(r){var i,n=r<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)i=1;else{n&&(r=-r),assert(r<=67108863,"Number is too big");var o=0|this.words[0];i=o===r?0:or.length)return 1;if(this.length=0;n--){var o=0|this.words[n],_=0|r.words[n];if(o!==_){o<_?i=-1:o>_&&(i=1);break}}return i},BN.prototype.gtn=function gtn(r){return 1===this.cmpn(r)},BN.prototype.gt=function gt(r){return 1===this.cmp(r)},BN.prototype.gten=function gten(r){return this.cmpn(r)>=0},BN.prototype.gte=function gte(r){return this.cmp(r)>=0},BN.prototype.ltn=function ltn(r){return-1===this.cmpn(r)},BN.prototype.lt=function lt(r){return-1===this.cmp(r)},BN.prototype.lten=function lten(r){return this.cmpn(r)<=0},BN.prototype.lte=function lte(r){return this.cmp(r)<=0},BN.prototype.eqn=function eqn(r){return 0===this.cmpn(r)},BN.prototype.eq=function eq(r){return 0===this.cmp(r)},BN.red=function red(r){return new Red(r)},BN.prototype.toRed=function toRed(r){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(r){return this.red=r,this},BN.prototype.forceRed=function forceRed(r){return assert(!this.red,"Already a number in reduction context"),this._forceRed(r)},BN.prototype.redAdd=function redAdd(r){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},BN.prototype.redIAdd=function redIAdd(r){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},BN.prototype.redSub=function redSub(r){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},BN.prototype.redISub=function redISub(r){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},BN.prototype.redShl=function redShl(r){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},BN.prototype.redMul=function redMul(r){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},BN.prototype.redIMul=function redIMul(r){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(r){return assert(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var ie={k256:null,p224:null,p192:null,p25519:null};function MPrime(r,i){this.name=r,this.p=new BN(i,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(r){if("string"==typeof r){var i=BN._prime(r);this.m=i.p,this.prime=i}else assert(r.gtn(1),"modulus must be greater than 1"),this.m=r,this.prime=null}function Mont(r){Red.call(this,r),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}MPrime.prototype._tmp=function _tmp(){var r=new BN(null);return r.words=new Array(Math.ceil(this.n/13)),r},MPrime.prototype.ireduce=function ireduce(r){var i,n=r;do{this.split(n,this.tmp),i=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(i>this.n);var o=i0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},MPrime.prototype.split=function split(r,i){r.iushrn(this.n,0,i)},MPrime.prototype.imulK=function imulK(r){return r.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(r,i){for(var n=4194303,o=Math.min(r.length,9),_=0;_>>22,j=q}j>>>=22,r.words[_-10]=j,0===j&&r.length>10?r.length-=10:r.length-=9},K256.prototype.imulK=function imulK(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var i=0,n=0;n>>=26,r.words[n]=_,i=o}return 0!==i&&(r.words[r.length++]=i),r},BN._prime=function prime(r){if(ie[r])return ie[r];var prime;if("k256"===r)prime=new K256;else if("p224"===r)prime=new P224;else if("p192"===r)prime=new P192;else{if("p25519"!==r)throw new Error("Unknown prime "+r);prime=new P25519}return ie[r]=prime,prime},Red.prototype._verify1=function _verify1(r){assert(0===r.negative,"red works only with positives"),assert(r.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(r,i){assert(0==(r.negative|i.negative),"red works only with positives"),assert(r.red&&r.red===i.red,"red works only with red numbers")},Red.prototype.imod=function imod(r){return this.prime?this.prime.ireduce(r)._forceRed(this):r.umod(this.m)._forceRed(this)},Red.prototype.neg=function neg(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},Red.prototype.add=function add(r,i){this._verify2(r,i);var n=r.add(i);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},Red.prototype.iadd=function iadd(r,i){this._verify2(r,i);var n=r.iadd(i);return n.cmp(this.m)>=0&&n.isub(this.m),n},Red.prototype.sub=function sub(r,i){this._verify2(r,i);var n=r.sub(i);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},Red.prototype.isub=function isub(r,i){this._verify2(r,i);var n=r.isub(i);return n.cmpn(0)<0&&n.iadd(this.m),n},Red.prototype.shl=function shl(r,i){return this._verify1(r),this.imod(r.ushln(i))},Red.prototype.imul=function imul(r,i){return this._verify2(r,i),this.imod(r.imul(i))},Red.prototype.mul=function mul(r,i){return this._verify2(r,i),this.imod(r.mul(i))},Red.prototype.isqr=function isqr(r){return this.imul(r,r.clone())},Red.prototype.sqr=function sqr(r){return this.mul(r,r)},Red.prototype.sqrt=function sqrt(r){if(r.isZero())return r.clone();var i=this.m.andln(3);if(assert(i%2==1),3===i){var n=this.m.add(new BN(1)).iushrn(2);return this.pow(r,n)}for(var o=this.m.subn(1),_=0;!o.isZero()&&0===o.andln(1);)_++,o.iushrn(1);assert(!o.isZero());var j=new BN(1).toRed(this),q=j.redNeg(),$=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new BN(2*ie*ie).toRed(this);0!==this.pow(ie,$).cmp(q);)ie.redIAdd(q);for(var ne=this.pow(ie,o),oe=this.pow(r,o.addn(1).iushrn(1)),se=this.pow(r,o),le=_;0!==se.cmp(j);){for(var _e=se,pe=0;0!==_e.cmp(j);pe++)_e=_e.redSqr();assert(pe=0;o--){for(var ie=i.words[o],ne=$-1;ne>=0;ne--){var oe=ie>>ne&1;_!==n[0]&&(_=this.sqr(_)),0!==oe||0!==j?(j<<=1,j|=oe,(4===++q||0===o&&0===ne)&&(_=this.mul(_,n[j]),q=0,j=0)):q=0}$=26}return _},Red.prototype.convertTo=function convertTo(r){var i=r.umod(this.m);return i===r?i.clone():i},Red.prototype.convertFrom=function convertFrom(r){var i=r.clone();return i.red=null,i},BN.mont=function mont(r){return new Mont(r)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(r){return this.imod(r.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(r){var i=this.imod(r.mul(this.rinv));return i.red=null,i},Mont.prototype.imul=function imul(r,i){if(r.isZero()||i.isZero())return r.words[0]=0,r.length=1,r;var n=r.imul(i),o=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=n.isub(o).iushrn(this.shift),j=_;return _.cmp(this.m)>=0?j=_.isub(this.m):_.cmpn(0)<0&&(j=_.iadd(this.m)),j._forceRed(this)},Mont.prototype.mul=function mul(r,i){if(r.isZero()||i.isZero())return new BN(0)._forceRed(this);var n=r.mul(i),o=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=n.isub(o).iushrn(this.shift),j=_;return _.cmp(this.m)>=0?j=_.isub(this.m):_.cmpn(0)<0&&(j=_.iadd(this.m)),j._forceRed(this)},Mont.prototype.invm=function invm(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}}(r=n.nmd(r),this)},5933:(r,i,n)=>{function _typeof(r){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(r){return typeof r}:function _typeof(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(r)}function boundMethod(r,i,n){var o=n.value;if("function"!=typeof o)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof(o)));var _=!1;return{configurable:!0,get:function get(){if(_||this===r.prototype||this.hasOwnProperty(i)||"function"!=typeof o)return o;var n=o.bind(this);return _=!0,Object.defineProperty(this,i,{configurable:!0,get:function get(){return n},set:function set(r){o=r,delete this[i]}}),_=!1,n},set:function set(r){o=r}}}function boundClass(r){var i;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?i=Reflect.ownKeys(r.prototype):(i=Object.getOwnPropertyNames(r.prototype),"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r.prototype)))),i.forEach((function(i){if("constructor"!==i){var n=Object.getOwnPropertyDescriptor(r.prototype,i);"function"==typeof n.value&&Object.defineProperty(r.prototype,i,boundMethod(r,i,n))}})),r}function autobind(){return 1===arguments.length?boundClass.apply(void 0,arguments):boundMethod.apply(void 0,arguments)}n.d(i,{MR:()=>boundMethod,ZP:()=>autobind})},34005:(r,i)=>{i.byteLength=function byteLength(r){var i=getLens(r),n=i[0],o=i[1];return 3*(n+o)/4-o},i.toByteArray=function toByteArray(r){var i,n,j=getLens(r),q=j[0],$=j[1],ie=new _(function _byteLength(r,i,n){return 3*(i+n)/4-n}(0,q,$)),ne=0,oe=$>0?q-4:q;for(n=0;n>16&255,ie[ne++]=i>>8&255,ie[ne++]=255&i;2===$&&(i=o[r.charCodeAt(n)]<<2|o[r.charCodeAt(n+1)]>>4,ie[ne++]=255&i);1===$&&(i=o[r.charCodeAt(n)]<<10|o[r.charCodeAt(n+1)]<<4|o[r.charCodeAt(n+2)]>>2,ie[ne++]=i>>8&255,ie[ne++]=255&i);return ie},i.fromByteArray=function fromByteArray(r){for(var i,o=r.length,_=o%3,j=[],q=16383,$=0,ie=o-_;$ie?ie:$+q));1===_?(i=r[o-1],j.push(n[i>>2]+n[i<<4&63]+"==")):2===_&&(i=(r[o-2]<<8)+r[o-1],j.push(n[i>>10]+n[i>>4&63]+n[i<<2&63]+"="));return j.join("")};for(var n=[],o=[],_="undefined"!=typeof Uint8Array?Uint8Array:Array,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",q=0,$=j.length;q<$;++q)n[q]=j[q],o[j.charCodeAt(q)]=q;function getLens(r){var i=r.length;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=r.indexOf("=");return-1===n&&(n=i),[n,n===i?0:4-n%4]}function encodeChunk(r,i,o){for(var _,j,q=[],$=i;$>18&63]+n[j>>12&63]+n[j>>6&63]+n[63&j]);return q.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},18486:function(r,i,n){!function(r,i){function assert(r,i){if(!r)throw new Error(i||"Assertion failed")}function inherits(r,i){r.super_=i;var TempCtor=function(){};TempCtor.prototype=i.prototype,r.prototype=new TempCtor,r.prototype.constructor=r}function BN(r,i,n){if(BN.isBN(r))return r;this.negative=0,this.words=null,this.length=0,this.red=null,null!==r&&("le"!==i&&"be"!==i||(n=i,i=10),this._init(r||0,i||10,n||"be"))}var o;"object"==typeof r?r.exports=BN:i.BN=BN,BN.BN=BN,BN.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(46601).Buffer}catch(ne){}function parseHex4Bits(r,i){var n=r.charCodeAt(i);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void assert(!1,"Invalid character in "+r)}function parseHexByte(r,i,n){var o=parseHex4Bits(r,n);return n-1>=i&&(o|=parseHex4Bits(r,n-1)<<4),o}function parseBase(r,i,n,o){for(var _=0,j=0,q=Math.min(r.length,n),$=i;$=49?ie-49+10:ie>=17?ie-17+10:ie,assert(ie>=0&&j0?r:i},BN.min=function min(r,i){return r.cmp(i)<0?r:i},BN.prototype._init=function init(r,i,n){if("number"==typeof r)return this._initNumber(r,i,n);if("object"==typeof r)return this._initArray(r,i,n);"hex"===i&&(i=16),assert(i===(0|i)&&i>=2&&i<=36);var o=0;"-"===(r=r.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)j=r[o]|r[o-1]<<8|r[o-2]<<16,this.words[_]|=j<>>26-q&67108863,(q+=24)>=26&&(q-=26,_++);else if("le"===n)for(o=0,_=0;o>>26-q&67108863,(q+=24)>=26&&(q-=26,_++);return this._strip()},BN.prototype._parseHex=function _parseHex(r,i,n){this.length=Math.ceil((r.length-i)/6),this.words=new Array(this.length);for(var o=0;o=i;o-=2)_=parseHexByte(r,i,o)<=18?(j-=18,q+=1,this.words[q]|=_>>>26):j+=8;else for(o=(r.length-i)%2==0?i+1:i;o=18?(j-=18,q+=1,this.words[q]|=_>>>26):j+=8;this._strip()},BN.prototype._parseBase=function _parseBase(r,i,n){this.words=[0],this.length=1;for(var o=0,_=1;_<=67108863;_*=i)o++;o--,_=_/i|0;for(var j=r.length-n,q=j%o,$=Math.min(j,j-q)+n,ie=0,ne=n;ne<$;ne+=o)ie=parseBase(r,ne,ne+o,i),this.imuln(_),this.words[0]+ie<67108864?this.words[0]+=ie:this._iaddn(ie);if(0!==q){var oe=1;for(ie=parseBase(r,ne,r.length,i),ne=0;ne1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}catch(ne){BN.prototype.inspect=inspect}else BN.prototype.inspect=inspect;function inspect(){return(this.red?""}var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],j=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];BN.prototype.toString=function toString(r,i){var n;if(i=0|i||1,16===(r=r||10)||"hex"===r){n="";for(var o=0,$=0,ie=0;ie>>24-o&16777215)||ie!==this.length-1?_[6-oe.length]+oe+n:oe+n,(o+=2)>=26&&(o-=26,ie--)}for(0!==$&&(n=$.toString(16)+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(r===(0|r)&&r>=2&&r<=36){var se=j[r],le=q[r];n="";var _e=this.clone();for(_e.negative=0;!_e.isZero();){var pe=_e.modrn(le).toString(r);n=(_e=_e.idivn(le)).isZero()?pe+n:_[se-pe.length]+pe+n}for(this.isZero()&&(n="0"+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){var r=this.words[0];return 2===this.length?r+=67108864*this.words[1]:3===this.length&&1===this.words[2]?r+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-r:r},BN.prototype.toJSON=function toJSON(){return this.toString(16,2)},o&&(BN.prototype.toBuffer=function toBuffer(r,i){return this.toArrayLike(o,r,i)}),BN.prototype.toArray=function toArray(r,i){return this.toArrayLike(Array,r,i)};function smallMulTo(r,i,n){n.negative=i.negative^r.negative;var o=r.length+i.length|0;n.length=o,o=o-1|0;var _=0|r.words[0],j=0|i.words[0],q=_*j,$=67108863&q,ie=q/67108864|0;n.words[0]=$;for(var ne=1;ne>>26,se=67108863&ie,le=Math.min(ne,i.length-1),_e=Math.max(0,ne-r.length+1);_e<=le;_e++){var pe=ne-_e|0;oe+=(q=(_=0|r.words[pe])*(j=0|i.words[_e])+se)/67108864|0,se=67108863&q}n.words[ne]=0|se,ie=0|oe}return 0!==ie?n.words[ne]=0|ie:n.length--,n._strip()}BN.prototype.toArrayLike=function toArrayLike(r,i,n){this._strip();var o=this.byteLength(),_=n||Math.max(1,o);assert(o<=_,"byte array longer than desired length"),assert(_>0,"Requested array length <= 0");var j=function allocate(r,i){return r.allocUnsafe?r.allocUnsafe(i):new r(i)}(r,_);return this["_toArrayLike"+("le"===i?"LE":"BE")](j,o),j},BN.prototype._toArrayLikeLE=function _toArrayLikeLE(r,i){for(var n=0,o=0,_=0,j=0;_>8&255),n>16&255),6===j?(n>24&255),o=0,j=0):(o=q>>>24,j+=2)}if(n=0&&(r[n--]=q>>8&255),n>=0&&(r[n--]=q>>16&255),6===j?(n>=0&&(r[n--]=q>>24&255),o=0,j=0):(o=q>>>24,j+=2)}if(n>=0)for(r[n--]=o;n>=0;)r[n--]=0},Math.clz32?BN.prototype._countBits=function _countBits(r){return 32-Math.clz32(r)}:BN.prototype._countBits=function _countBits(r){var i=r,n=0;return i>=4096&&(n+=13,i>>>=13),i>=64&&(n+=7,i>>>=7),i>=8&&(n+=4,i>>>=4),i>=2&&(n+=2,i>>>=2),n+i},BN.prototype._zeroBits=function _zeroBits(r){if(0===r)return 26;var i=r,n=0;return 0==(8191&i)&&(n+=13,i>>>=13),0==(127&i)&&(n+=7,i>>>=7),0==(15&i)&&(n+=4,i>>>=4),0==(3&i)&&(n+=2,i>>>=2),0==(1&i)&&n++,n},BN.prototype.bitLength=function bitLength(){var r=this.words[this.length-1],i=this._countBits(r);return 26*(this.length-1)+i},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var r=0,i=0;ir.length?this.clone().ior(r):r.clone().ior(this)},BN.prototype.uor=function uor(r){return this.length>r.length?this.clone().iuor(r):r.clone().iuor(this)},BN.prototype.iuand=function iuand(r){var i;i=this.length>r.length?r:this;for(var n=0;nr.length?this.clone().iand(r):r.clone().iand(this)},BN.prototype.uand=function uand(r){return this.length>r.length?this.clone().iuand(r):r.clone().iuand(this)},BN.prototype.iuxor=function iuxor(r){var i,n;this.length>r.length?(i=this,n=r):(i=r,n=this);for(var o=0;or.length?this.clone().ixor(r):r.clone().ixor(this)},BN.prototype.uxor=function uxor(r){return this.length>r.length?this.clone().iuxor(r):r.clone().iuxor(this)},BN.prototype.inotn=function inotn(r){assert("number"==typeof r&&r>=0);var i=0|Math.ceil(r/26),n=r%26;this._expand(i),n>0&&i--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this._strip()},BN.prototype.notn=function notn(r){return this.clone().inotn(r)},BN.prototype.setn=function setn(r,i){assert("number"==typeof r&&r>=0);var n=r/26|0,o=r%26;return this._expand(n+1),this.words[n]=i?this.words[n]|1<r.length?(n=this,o=r):(n=r,o=this);for(var _=0,j=0;j>>26;for(;0!==_&&j>>26;if(this.length=n.length,0!==_)this.words[this.length]=_,this.length++;else if(n!==this)for(;jr.length?this.clone().iadd(r):r.clone().iadd(this)},BN.prototype.isub=function isub(r){if(0!==r.negative){r.negative=0;var i=this.iadd(r);return r.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(r),this.negative=1,this._normSign();var n,o,_=this.cmp(r);if(0===_)return this.negative=0,this.length=1,this.words[0]=0,this;_>0?(n=this,o=r):(n=r,o=this);for(var j=0,q=0;q>26,this.words[q]=67108863&i;for(;0!==j&&q>26,this.words[q]=67108863&i;if(0===j&&q>>13,_e=0|q[1],pe=8191&_e,he=_e>>>13,me=0|q[2],ge=8191&me,we=me>>>13,ve=0|q[3],ye=8191&ve,ke=ve>>>13,Se=0|q[4],Ae=8191&Se,Me=Se>>>13,Te=0|q[5],Re=8191&Te,Be=Te>>>13,Ne=0|q[6],Oe=8191&Ne,je=Ne>>>13,Fe=0|q[7],Ue=8191&Fe,Ve=Fe>>>13,We=0|q[8],$e=8191&We,Ye=We>>>13,Xe=0|q[9],et=8191&Xe,tt=Xe>>>13,rt=0|$[0],it=8191&rt,nt=rt>>>13,at=0|$[1],ot=8191&at,st=at>>>13,ct=0|$[2],dt=8191&ct,ut=ct>>>13,_t=0|$[3],pt=8191&_t,ht=_t>>>13,mt=0|$[4],bt=8191&mt,wt=mt>>>13,vt=0|$[5],yt=8191&vt,kt=vt>>>13,St=0|$[6],At=8191&St,Mt=St>>>13,Et=0|$[7],Tt=8191&Et,Pt=Et>>>13,Ct=0|$[8],xt=8191&Ct,Rt=Ct>>>13,Bt=0|$[9],Dt=8191&Bt,Nt=Bt>>>13;n.negative=r.negative^i.negative,n.length=19;var It=(ne+(o=Math.imul(se,it))|0)+((8191&(_=(_=Math.imul(se,nt))+Math.imul(le,it)|0))<<13)|0;ne=((j=Math.imul(le,nt))+(_>>>13)|0)+(It>>>26)|0,It&=67108863,o=Math.imul(pe,it),_=(_=Math.imul(pe,nt))+Math.imul(he,it)|0,j=Math.imul(he,nt);var Ot=(ne+(o=o+Math.imul(se,ot)|0)|0)+((8191&(_=(_=_+Math.imul(se,st)|0)+Math.imul(le,ot)|0))<<13)|0;ne=((j=j+Math.imul(le,st)|0)+(_>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,o=Math.imul(ge,it),_=(_=Math.imul(ge,nt))+Math.imul(we,it)|0,j=Math.imul(we,nt),o=o+Math.imul(pe,ot)|0,_=(_=_+Math.imul(pe,st)|0)+Math.imul(he,ot)|0,j=j+Math.imul(he,st)|0;var jt=(ne+(o=o+Math.imul(se,dt)|0)|0)+((8191&(_=(_=_+Math.imul(se,ut)|0)+Math.imul(le,dt)|0))<<13)|0;ne=((j=j+Math.imul(le,ut)|0)+(_>>>13)|0)+(jt>>>26)|0,jt&=67108863,o=Math.imul(ye,it),_=(_=Math.imul(ye,nt))+Math.imul(ke,it)|0,j=Math.imul(ke,nt),o=o+Math.imul(ge,ot)|0,_=(_=_+Math.imul(ge,st)|0)+Math.imul(we,ot)|0,j=j+Math.imul(we,st)|0,o=o+Math.imul(pe,dt)|0,_=(_=_+Math.imul(pe,ut)|0)+Math.imul(he,dt)|0,j=j+Math.imul(he,ut)|0;var zt=(ne+(o=o+Math.imul(se,pt)|0)|0)+((8191&(_=(_=_+Math.imul(se,ht)|0)+Math.imul(le,pt)|0))<<13)|0;ne=((j=j+Math.imul(le,ht)|0)+(_>>>13)|0)+(zt>>>26)|0,zt&=67108863,o=Math.imul(Ae,it),_=(_=Math.imul(Ae,nt))+Math.imul(Me,it)|0,j=Math.imul(Me,nt),o=o+Math.imul(ye,ot)|0,_=(_=_+Math.imul(ye,st)|0)+Math.imul(ke,ot)|0,j=j+Math.imul(ke,st)|0,o=o+Math.imul(ge,dt)|0,_=(_=_+Math.imul(ge,ut)|0)+Math.imul(we,dt)|0,j=j+Math.imul(we,ut)|0,o=o+Math.imul(pe,pt)|0,_=(_=_+Math.imul(pe,ht)|0)+Math.imul(he,pt)|0,j=j+Math.imul(he,ht)|0;var qt=(ne+(o=o+Math.imul(se,bt)|0)|0)+((8191&(_=(_=_+Math.imul(se,wt)|0)+Math.imul(le,bt)|0))<<13)|0;ne=((j=j+Math.imul(le,wt)|0)+(_>>>13)|0)+(qt>>>26)|0,qt&=67108863,o=Math.imul(Re,it),_=(_=Math.imul(Re,nt))+Math.imul(Be,it)|0,j=Math.imul(Be,nt),o=o+Math.imul(Ae,ot)|0,_=(_=_+Math.imul(Ae,st)|0)+Math.imul(Me,ot)|0,j=j+Math.imul(Me,st)|0,o=o+Math.imul(ye,dt)|0,_=(_=_+Math.imul(ye,ut)|0)+Math.imul(ke,dt)|0,j=j+Math.imul(ke,ut)|0,o=o+Math.imul(ge,pt)|0,_=(_=_+Math.imul(ge,ht)|0)+Math.imul(we,pt)|0,j=j+Math.imul(we,ht)|0,o=o+Math.imul(pe,bt)|0,_=(_=_+Math.imul(pe,wt)|0)+Math.imul(he,bt)|0,j=j+Math.imul(he,wt)|0;var Lt=(ne+(o=o+Math.imul(se,yt)|0)|0)+((8191&(_=(_=_+Math.imul(se,kt)|0)+Math.imul(le,yt)|0))<<13)|0;ne=((j=j+Math.imul(le,kt)|0)+(_>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,o=Math.imul(Oe,it),_=(_=Math.imul(Oe,nt))+Math.imul(je,it)|0,j=Math.imul(je,nt),o=o+Math.imul(Re,ot)|0,_=(_=_+Math.imul(Re,st)|0)+Math.imul(Be,ot)|0,j=j+Math.imul(Be,st)|0,o=o+Math.imul(Ae,dt)|0,_=(_=_+Math.imul(Ae,ut)|0)+Math.imul(Me,dt)|0,j=j+Math.imul(Me,ut)|0,o=o+Math.imul(ye,pt)|0,_=(_=_+Math.imul(ye,ht)|0)+Math.imul(ke,pt)|0,j=j+Math.imul(ke,ht)|0,o=o+Math.imul(ge,bt)|0,_=(_=_+Math.imul(ge,wt)|0)+Math.imul(we,bt)|0,j=j+Math.imul(we,wt)|0,o=o+Math.imul(pe,yt)|0,_=(_=_+Math.imul(pe,kt)|0)+Math.imul(he,yt)|0,j=j+Math.imul(he,kt)|0;var Ft=(ne+(o=o+Math.imul(se,At)|0)|0)+((8191&(_=(_=_+Math.imul(se,Mt)|0)+Math.imul(le,At)|0))<<13)|0;ne=((j=j+Math.imul(le,Mt)|0)+(_>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,o=Math.imul(Ue,it),_=(_=Math.imul(Ue,nt))+Math.imul(Ve,it)|0,j=Math.imul(Ve,nt),o=o+Math.imul(Oe,ot)|0,_=(_=_+Math.imul(Oe,st)|0)+Math.imul(je,ot)|0,j=j+Math.imul(je,st)|0,o=o+Math.imul(Re,dt)|0,_=(_=_+Math.imul(Re,ut)|0)+Math.imul(Be,dt)|0,j=j+Math.imul(Be,ut)|0,o=o+Math.imul(Ae,pt)|0,_=(_=_+Math.imul(Ae,ht)|0)+Math.imul(Me,pt)|0,j=j+Math.imul(Me,ht)|0,o=o+Math.imul(ye,bt)|0,_=(_=_+Math.imul(ye,wt)|0)+Math.imul(ke,bt)|0,j=j+Math.imul(ke,wt)|0,o=o+Math.imul(ge,yt)|0,_=(_=_+Math.imul(ge,kt)|0)+Math.imul(we,yt)|0,j=j+Math.imul(we,kt)|0,o=o+Math.imul(pe,At)|0,_=(_=_+Math.imul(pe,Mt)|0)+Math.imul(he,At)|0,j=j+Math.imul(he,Mt)|0;var Ut=(ne+(o=o+Math.imul(se,Tt)|0)|0)+((8191&(_=(_=_+Math.imul(se,Pt)|0)+Math.imul(le,Tt)|0))<<13)|0;ne=((j=j+Math.imul(le,Pt)|0)+(_>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,o=Math.imul($e,it),_=(_=Math.imul($e,nt))+Math.imul(Ye,it)|0,j=Math.imul(Ye,nt),o=o+Math.imul(Ue,ot)|0,_=(_=_+Math.imul(Ue,st)|0)+Math.imul(Ve,ot)|0,j=j+Math.imul(Ve,st)|0,o=o+Math.imul(Oe,dt)|0,_=(_=_+Math.imul(Oe,ut)|0)+Math.imul(je,dt)|0,j=j+Math.imul(je,ut)|0,o=o+Math.imul(Re,pt)|0,_=(_=_+Math.imul(Re,ht)|0)+Math.imul(Be,pt)|0,j=j+Math.imul(Be,ht)|0,o=o+Math.imul(Ae,bt)|0,_=(_=_+Math.imul(Ae,wt)|0)+Math.imul(Me,bt)|0,j=j+Math.imul(Me,wt)|0,o=o+Math.imul(ye,yt)|0,_=(_=_+Math.imul(ye,kt)|0)+Math.imul(ke,yt)|0,j=j+Math.imul(ke,kt)|0,o=o+Math.imul(ge,At)|0,_=(_=_+Math.imul(ge,Mt)|0)+Math.imul(we,At)|0,j=j+Math.imul(we,Mt)|0,o=o+Math.imul(pe,Tt)|0,_=(_=_+Math.imul(pe,Pt)|0)+Math.imul(he,Tt)|0,j=j+Math.imul(he,Pt)|0;var Vt=(ne+(o=o+Math.imul(se,xt)|0)|0)+((8191&(_=(_=_+Math.imul(se,Rt)|0)+Math.imul(le,xt)|0))<<13)|0;ne=((j=j+Math.imul(le,Rt)|0)+(_>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,o=Math.imul(et,it),_=(_=Math.imul(et,nt))+Math.imul(tt,it)|0,j=Math.imul(tt,nt),o=o+Math.imul($e,ot)|0,_=(_=_+Math.imul($e,st)|0)+Math.imul(Ye,ot)|0,j=j+Math.imul(Ye,st)|0,o=o+Math.imul(Ue,dt)|0,_=(_=_+Math.imul(Ue,ut)|0)+Math.imul(Ve,dt)|0,j=j+Math.imul(Ve,ut)|0,o=o+Math.imul(Oe,pt)|0,_=(_=_+Math.imul(Oe,ht)|0)+Math.imul(je,pt)|0,j=j+Math.imul(je,ht)|0,o=o+Math.imul(Re,bt)|0,_=(_=_+Math.imul(Re,wt)|0)+Math.imul(Be,bt)|0,j=j+Math.imul(Be,wt)|0,o=o+Math.imul(Ae,yt)|0,_=(_=_+Math.imul(Ae,kt)|0)+Math.imul(Me,yt)|0,j=j+Math.imul(Me,kt)|0,o=o+Math.imul(ye,At)|0,_=(_=_+Math.imul(ye,Mt)|0)+Math.imul(ke,At)|0,j=j+Math.imul(ke,Mt)|0,o=o+Math.imul(ge,Tt)|0,_=(_=_+Math.imul(ge,Pt)|0)+Math.imul(we,Tt)|0,j=j+Math.imul(we,Pt)|0,o=o+Math.imul(pe,xt)|0,_=(_=_+Math.imul(pe,Rt)|0)+Math.imul(he,xt)|0,j=j+Math.imul(he,Rt)|0;var Gt=(ne+(o=o+Math.imul(se,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(se,Nt)|0)+Math.imul(le,Dt)|0))<<13)|0;ne=((j=j+Math.imul(le,Nt)|0)+(_>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,o=Math.imul(et,ot),_=(_=Math.imul(et,st))+Math.imul(tt,ot)|0,j=Math.imul(tt,st),o=o+Math.imul($e,dt)|0,_=(_=_+Math.imul($e,ut)|0)+Math.imul(Ye,dt)|0,j=j+Math.imul(Ye,ut)|0,o=o+Math.imul(Ue,pt)|0,_=(_=_+Math.imul(Ue,ht)|0)+Math.imul(Ve,pt)|0,j=j+Math.imul(Ve,ht)|0,o=o+Math.imul(Oe,bt)|0,_=(_=_+Math.imul(Oe,wt)|0)+Math.imul(je,bt)|0,j=j+Math.imul(je,wt)|0,o=o+Math.imul(Re,yt)|0,_=(_=_+Math.imul(Re,kt)|0)+Math.imul(Be,yt)|0,j=j+Math.imul(Be,kt)|0,o=o+Math.imul(Ae,At)|0,_=(_=_+Math.imul(Ae,Mt)|0)+Math.imul(Me,At)|0,j=j+Math.imul(Me,Mt)|0,o=o+Math.imul(ye,Tt)|0,_=(_=_+Math.imul(ye,Pt)|0)+Math.imul(ke,Tt)|0,j=j+Math.imul(ke,Pt)|0,o=o+Math.imul(ge,xt)|0,_=(_=_+Math.imul(ge,Rt)|0)+Math.imul(we,xt)|0,j=j+Math.imul(we,Rt)|0;var Zt=(ne+(o=o+Math.imul(pe,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(pe,Nt)|0)+Math.imul(he,Dt)|0))<<13)|0;ne=((j=j+Math.imul(he,Nt)|0)+(_>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,o=Math.imul(et,dt),_=(_=Math.imul(et,ut))+Math.imul(tt,dt)|0,j=Math.imul(tt,ut),o=o+Math.imul($e,pt)|0,_=(_=_+Math.imul($e,ht)|0)+Math.imul(Ye,pt)|0,j=j+Math.imul(Ye,ht)|0,o=o+Math.imul(Ue,bt)|0,_=(_=_+Math.imul(Ue,wt)|0)+Math.imul(Ve,bt)|0,j=j+Math.imul(Ve,wt)|0,o=o+Math.imul(Oe,yt)|0,_=(_=_+Math.imul(Oe,kt)|0)+Math.imul(je,yt)|0,j=j+Math.imul(je,kt)|0,o=o+Math.imul(Re,At)|0,_=(_=_+Math.imul(Re,Mt)|0)+Math.imul(Be,At)|0,j=j+Math.imul(Be,Mt)|0,o=o+Math.imul(Ae,Tt)|0,_=(_=_+Math.imul(Ae,Pt)|0)+Math.imul(Me,Tt)|0,j=j+Math.imul(Me,Pt)|0,o=o+Math.imul(ye,xt)|0,_=(_=_+Math.imul(ye,Rt)|0)+Math.imul(ke,xt)|0,j=j+Math.imul(ke,Rt)|0;var Ht=(ne+(o=o+Math.imul(ge,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(ge,Nt)|0)+Math.imul(we,Dt)|0))<<13)|0;ne=((j=j+Math.imul(we,Nt)|0)+(_>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,o=Math.imul(et,pt),_=(_=Math.imul(et,ht))+Math.imul(tt,pt)|0,j=Math.imul(tt,ht),o=o+Math.imul($e,bt)|0,_=(_=_+Math.imul($e,wt)|0)+Math.imul(Ye,bt)|0,j=j+Math.imul(Ye,wt)|0,o=o+Math.imul(Ue,yt)|0,_=(_=_+Math.imul(Ue,kt)|0)+Math.imul(Ve,yt)|0,j=j+Math.imul(Ve,kt)|0,o=o+Math.imul(Oe,At)|0,_=(_=_+Math.imul(Oe,Mt)|0)+Math.imul(je,At)|0,j=j+Math.imul(je,Mt)|0,o=o+Math.imul(Re,Tt)|0,_=(_=_+Math.imul(Re,Pt)|0)+Math.imul(Be,Tt)|0,j=j+Math.imul(Be,Pt)|0,o=o+Math.imul(Ae,xt)|0,_=(_=_+Math.imul(Ae,Rt)|0)+Math.imul(Me,xt)|0,j=j+Math.imul(Me,Rt)|0;var Kt=(ne+(o=o+Math.imul(ye,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(ye,Nt)|0)+Math.imul(ke,Dt)|0))<<13)|0;ne=((j=j+Math.imul(ke,Nt)|0)+(_>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,o=Math.imul(et,bt),_=(_=Math.imul(et,wt))+Math.imul(tt,bt)|0,j=Math.imul(tt,wt),o=o+Math.imul($e,yt)|0,_=(_=_+Math.imul($e,kt)|0)+Math.imul(Ye,yt)|0,j=j+Math.imul(Ye,kt)|0,o=o+Math.imul(Ue,At)|0,_=(_=_+Math.imul(Ue,Mt)|0)+Math.imul(Ve,At)|0,j=j+Math.imul(Ve,Mt)|0,o=o+Math.imul(Oe,Tt)|0,_=(_=_+Math.imul(Oe,Pt)|0)+Math.imul(je,Tt)|0,j=j+Math.imul(je,Pt)|0,o=o+Math.imul(Re,xt)|0,_=(_=_+Math.imul(Re,Rt)|0)+Math.imul(Be,xt)|0,j=j+Math.imul(Be,Rt)|0;var Wt=(ne+(o=o+Math.imul(Ae,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(Ae,Nt)|0)+Math.imul(Me,Dt)|0))<<13)|0;ne=((j=j+Math.imul(Me,Nt)|0)+(_>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,o=Math.imul(et,yt),_=(_=Math.imul(et,kt))+Math.imul(tt,yt)|0,j=Math.imul(tt,kt),o=o+Math.imul($e,At)|0,_=(_=_+Math.imul($e,Mt)|0)+Math.imul(Ye,At)|0,j=j+Math.imul(Ye,Mt)|0,o=o+Math.imul(Ue,Tt)|0,_=(_=_+Math.imul(Ue,Pt)|0)+Math.imul(Ve,Tt)|0,j=j+Math.imul(Ve,Pt)|0,o=o+Math.imul(Oe,xt)|0,_=(_=_+Math.imul(Oe,Rt)|0)+Math.imul(je,xt)|0,j=j+Math.imul(je,Rt)|0;var $t=(ne+(o=o+Math.imul(Re,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(Re,Nt)|0)+Math.imul(Be,Dt)|0))<<13)|0;ne=((j=j+Math.imul(Be,Nt)|0)+(_>>>13)|0)+($t>>>26)|0,$t&=67108863,o=Math.imul(et,At),_=(_=Math.imul(et,Mt))+Math.imul(tt,At)|0,j=Math.imul(tt,Mt),o=o+Math.imul($e,Tt)|0,_=(_=_+Math.imul($e,Pt)|0)+Math.imul(Ye,Tt)|0,j=j+Math.imul(Ye,Pt)|0,o=o+Math.imul(Ue,xt)|0,_=(_=_+Math.imul(Ue,Rt)|0)+Math.imul(Ve,xt)|0,j=j+Math.imul(Ve,Rt)|0;var Yt=(ne+(o=o+Math.imul(Oe,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(Oe,Nt)|0)+Math.imul(je,Dt)|0))<<13)|0;ne=((j=j+Math.imul(je,Nt)|0)+(_>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,o=Math.imul(et,Tt),_=(_=Math.imul(et,Pt))+Math.imul(tt,Tt)|0,j=Math.imul(tt,Pt),o=o+Math.imul($e,xt)|0,_=(_=_+Math.imul($e,Rt)|0)+Math.imul(Ye,xt)|0,j=j+Math.imul(Ye,Rt)|0;var Jt=(ne+(o=o+Math.imul(Ue,Dt)|0)|0)+((8191&(_=(_=_+Math.imul(Ue,Nt)|0)+Math.imul(Ve,Dt)|0))<<13)|0;ne=((j=j+Math.imul(Ve,Nt)|0)+(_>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,o=Math.imul(et,xt),_=(_=Math.imul(et,Rt))+Math.imul(tt,xt)|0,j=Math.imul(tt,Rt);var Qt=(ne+(o=o+Math.imul($e,Dt)|0)|0)+((8191&(_=(_=_+Math.imul($e,Nt)|0)+Math.imul(Ye,Dt)|0))<<13)|0;ne=((j=j+Math.imul(Ye,Nt)|0)+(_>>>13)|0)+(Qt>>>26)|0,Qt&=67108863;var Xt=(ne+(o=Math.imul(et,Dt))|0)+((8191&(_=(_=Math.imul(et,Nt))+Math.imul(tt,Dt)|0))<<13)|0;return ne=((j=Math.imul(tt,Nt))+(_>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,ie[0]=It,ie[1]=Ot,ie[2]=jt,ie[3]=zt,ie[4]=qt,ie[5]=Lt,ie[6]=Ft,ie[7]=Ut,ie[8]=Vt,ie[9]=Gt,ie[10]=Zt,ie[11]=Ht,ie[12]=Kt,ie[13]=Wt,ie[14]=$t,ie[15]=Yt,ie[16]=Jt,ie[17]=Qt,ie[18]=Xt,0!==ne&&(ie[19]=ne,n.length++),n};function bigMulTo(r,i,n){n.negative=i.negative^r.negative,n.length=r.length+i.length;for(var o=0,_=0,j=0;j>>26)|0)>>>26,q&=67108863}n.words[j]=$,o=q,q=_}return 0!==o?n.words[j]=o:n.length--,n._strip()}function jumboMulTo(r,i,n){return bigMulTo(r,i,n)}function FFTM(r,i){this.x=r,this.y=i}Math.imul||($=smallMulTo),BN.prototype.mulTo=function mulTo(r,i){var n=this.length+r.length;return 10===this.length&&10===r.length?$(this,r,i):n<63?smallMulTo(this,r,i):n<1024?bigMulTo(this,r,i):jumboMulTo(this,r,i)},FFTM.prototype.makeRBT=function makeRBT(r){for(var i=new Array(r),n=BN.prototype._countBits(r)-1,o=0;o>=1;return o},FFTM.prototype.permute=function permute(r,i,n,o,_,j){for(var q=0;q>>=1)_++;return 1<<_+1+o},FFTM.prototype.conjugate=function conjugate(r,i,n){if(!(n<=1))for(var o=0;o>>=13,n[2*j+1]=8191&_,_>>>=13;for(j=2*i;j>=26,n+=_/67108864|0,n+=j>>>26,this.words[o]=67108863&j}return 0!==n&&(this.words[o]=n,this.length++),i?this.ineg():this},BN.prototype.muln=function muln(r){return this.clone().imuln(r)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(r){var i=function toBitArray(r){for(var i=new Array(r.bitLength()),n=0;n>>_&1}return i}(r);if(0===i.length)return new BN(1);for(var n=this,o=0;o=0);var i,n=r%26,o=(r-n)/26,_=67108863>>>26-n<<26-n;if(0!==n){var j=0;for(i=0;i>>26-n}j&&(this.words[i]=j,this.length++)}if(0!==o){for(i=this.length-1;i>=0;i--)this.words[i+o]=this.words[i];for(i=0;i=0),o=i?(i-i%26)/26:0;var _=r%26,j=Math.min((r-_)/26,this.length),q=67108863^67108863>>>_<<_,$=n;if(o-=j,o=Math.max(0,o),$){for(var ie=0;iej)for(this.length-=j,ie=0;ie=0&&(0!==ne||ie>=o);ie--){var oe=0|this.words[ie];this.words[ie]=ne<<26-_|oe>>>_,ne=oe&q}return $&&0!==ne&&($.words[$.length++]=ne),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},BN.prototype.ishrn=function ishrn(r,i,n){return assert(0===this.negative),this.iushrn(r,i,n)},BN.prototype.shln=function shln(r){return this.clone().ishln(r)},BN.prototype.ushln=function ushln(r){return this.clone().iushln(r)},BN.prototype.shrn=function shrn(r){return this.clone().ishrn(r)},BN.prototype.ushrn=function ushrn(r){return this.clone().iushrn(r)},BN.prototype.testn=function testn(r){assert("number"==typeof r&&r>=0);var i=r%26,n=(r-i)/26,o=1<=0);var i=r%26,n=(r-i)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==i&&n++,this.length=Math.min(n,this.length),0!==i){var o=67108863^67108863>>>i<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function isubn(r){if(assert("number"==typeof r),assert(r<67108864),r<0)return this.iaddn(-r);if(0!==this.negative)return this.negative=0,this.iaddn(r),this.negative=1,this;if(this.words[0]-=r,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i>26)-($/67108864|0),this.words[o+n]=67108863&_}for(;o>26,this.words[o+n]=67108863&_;if(0===q)return this._strip();for(assert(-1===q),q=0,o=0;o>26,this.words[o]=67108863&_;return this.negative=1,this._strip()},BN.prototype._wordDiv=function _wordDiv(r,i){var n=(this.length,r.length),o=this.clone(),_=r,j=0|_.words[_.length-1];0!==(n=26-this._countBits(j))&&(_=_.ushln(n),o.iushln(n),j=0|_.words[_.length-1]);var q,$=o.length-_.length;if("mod"!==i){(q=new BN(null)).length=$+1,q.words=new Array(q.length);for(var ie=0;ie=0;oe--){var se=67108864*(0|o.words[_.length+oe])+(0|o.words[_.length+oe-1]);for(se=Math.min(se/j|0,67108863),o._ishlnsubmul(_,se,oe);0!==o.negative;)se--,o.negative=0,o._ishlnsubmul(_,1,oe),o.isZero()||(o.negative^=1);q&&(q.words[oe]=se)}return q&&q._strip(),o._strip(),"div"!==i&&0!==n&&o.iushrn(n),{div:q||null,mod:o}},BN.prototype.divmod=function divmod(r,i,n){return assert(!r.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===r.negative?(j=this.neg().divmod(r,i),"mod"!==i&&(o=j.div.neg()),"div"!==i&&(_=j.mod.neg(),n&&0!==_.negative&&_.iadd(r)),{div:o,mod:_}):0===this.negative&&0!==r.negative?(j=this.divmod(r.neg(),i),"mod"!==i&&(o=j.div.neg()),{div:o,mod:j.mod}):0!=(this.negative&r.negative)?(j=this.neg().divmod(r.neg(),i),"div"!==i&&(_=j.mod.neg(),n&&0!==_.negative&&_.isub(r)),{div:j.div,mod:_}):r.length>this.length||this.cmp(r)<0?{div:new BN(0),mod:this}:1===r.length?"div"===i?{div:this.divn(r.words[0]),mod:null}:"mod"===i?{div:null,mod:new BN(this.modrn(r.words[0]))}:{div:this.divn(r.words[0]),mod:new BN(this.modrn(r.words[0]))}:this._wordDiv(r,i);var o,_,j},BN.prototype.div=function div(r){return this.divmod(r,"div",!1).div},BN.prototype.mod=function mod(r){return this.divmod(r,"mod",!1).mod},BN.prototype.umod=function umod(r){return this.divmod(r,"mod",!0).mod},BN.prototype.divRound=function divRound(r){var i=this.divmod(r);if(i.mod.isZero())return i.div;var n=0!==i.div.negative?i.mod.isub(r):i.mod,o=r.ushrn(1),_=r.andln(1),j=n.cmp(o);return j<0||1===_&&0===j?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},BN.prototype.modrn=function modrn(r){var i=r<0;i&&(r=-r),assert(r<=67108863);for(var n=(1<<26)%r,o=0,_=this.length-1;_>=0;_--)o=(n*o+(0|this.words[_]))%r;return i?-o:o},BN.prototype.modn=function modn(r){return this.modrn(r)},BN.prototype.idivn=function idivn(r){var i=r<0;i&&(r=-r),assert(r<=67108863);for(var n=0,o=this.length-1;o>=0;o--){var _=(0|this.words[o])+67108864*n;this.words[o]=_/r|0,n=_%r}return this._strip(),i?this.ineg():this},BN.prototype.divn=function divn(r){return this.clone().idivn(r)},BN.prototype.egcd=function egcd(r){assert(0===r.negative),assert(!r.isZero());var i=this,n=r.clone();i=0!==i.negative?i.umod(r):i.clone();for(var o=new BN(1),_=new BN(0),j=new BN(0),q=new BN(1),$=0;i.isEven()&&n.isEven();)i.iushrn(1),n.iushrn(1),++$;for(var ie=n.clone(),ne=i.clone();!i.isZero();){for(var oe=0,se=1;0==(i.words[0]&se)&&oe<26;++oe,se<<=1);if(oe>0)for(i.iushrn(oe);oe-- >0;)(o.isOdd()||_.isOdd())&&(o.iadd(ie),_.isub(ne)),o.iushrn(1),_.iushrn(1);for(var le=0,_e=1;0==(n.words[0]&_e)&&le<26;++le,_e<<=1);if(le>0)for(n.iushrn(le);le-- >0;)(j.isOdd()||q.isOdd())&&(j.iadd(ie),q.isub(ne)),j.iushrn(1),q.iushrn(1);i.cmp(n)>=0?(i.isub(n),o.isub(j),_.isub(q)):(n.isub(i),j.isub(o),q.isub(_))}return{a:j,b:q,gcd:n.iushln($)}},BN.prototype._invmp=function _invmp(r){assert(0===r.negative),assert(!r.isZero());var i=this,n=r.clone();i=0!==i.negative?i.umod(r):i.clone();for(var o,_=new BN(1),j=new BN(0),q=n.clone();i.cmpn(1)>0&&n.cmpn(1)>0;){for(var $=0,ie=1;0==(i.words[0]&ie)&&$<26;++$,ie<<=1);if($>0)for(i.iushrn($);$-- >0;)_.isOdd()&&_.iadd(q),_.iushrn(1);for(var ne=0,oe=1;0==(n.words[0]&oe)&&ne<26;++ne,oe<<=1);if(ne>0)for(n.iushrn(ne);ne-- >0;)j.isOdd()&&j.iadd(q),j.iushrn(1);i.cmp(n)>=0?(i.isub(n),_.isub(j)):(n.isub(i),j.isub(_))}return(o=0===i.cmpn(1)?_:j).cmpn(0)<0&&o.iadd(r),o},BN.prototype.gcd=function gcd(r){if(this.isZero())return r.abs();if(r.isZero())return this.abs();var i=this.clone(),n=r.clone();i.negative=0,n.negative=0;for(var o=0;i.isEven()&&n.isEven();o++)i.iushrn(1),n.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;n.isEven();)n.iushrn(1);var _=i.cmp(n);if(_<0){var j=i;i=n,n=j}else if(0===_||0===n.cmpn(1))break;i.isub(n)}return n.iushln(o)},BN.prototype.invm=function invm(r){return this.egcd(r).a.umod(r)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(r){return this.words[0]&r},BN.prototype.bincn=function bincn(r){assert("number"==typeof r);var i=r%26,n=(r-i)/26,o=1<>>26,q&=67108863,this.words[j]=q}return 0!==_&&(this.words[j]=_,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(r){var i,n=r<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)i=1;else{n&&(r=-r),assert(r<=67108863,"Number is too big");var o=0|this.words[0];i=o===r?0:or.length)return 1;if(this.length=0;n--){var o=0|this.words[n],_=0|r.words[n];if(o!==_){o<_?i=-1:o>_&&(i=1);break}}return i},BN.prototype.gtn=function gtn(r){return 1===this.cmpn(r)},BN.prototype.gt=function gt(r){return 1===this.cmp(r)},BN.prototype.gten=function gten(r){return this.cmpn(r)>=0},BN.prototype.gte=function gte(r){return this.cmp(r)>=0},BN.prototype.ltn=function ltn(r){return-1===this.cmpn(r)},BN.prototype.lt=function lt(r){return-1===this.cmp(r)},BN.prototype.lten=function lten(r){return this.cmpn(r)<=0},BN.prototype.lte=function lte(r){return this.cmp(r)<=0},BN.prototype.eqn=function eqn(r){return 0===this.cmpn(r)},BN.prototype.eq=function eq(r){return 0===this.cmp(r)},BN.red=function red(r){return new Red(r)},BN.prototype.toRed=function toRed(r){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),r.convertTo(this)._forceRed(r)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(r){return this.red=r,this},BN.prototype.forceRed=function forceRed(r){return assert(!this.red,"Already a number in reduction context"),this._forceRed(r)},BN.prototype.redAdd=function redAdd(r){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,r)},BN.prototype.redIAdd=function redIAdd(r){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,r)},BN.prototype.redSub=function redSub(r){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,r)},BN.prototype.redISub=function redISub(r){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,r)},BN.prototype.redShl=function redShl(r){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,r)},BN.prototype.redMul=function redMul(r){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.mul(this,r)},BN.prototype.redIMul=function redIMul(r){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,r),this.red.imul(this,r)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(r){return assert(this.red&&!r.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,r)};var ie={k256:null,p224:null,p192:null,p25519:null};function MPrime(r,i){this.name=r,this.p=new BN(i,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(r){if("string"==typeof r){var i=BN._prime(r);this.m=i.p,this.prime=i}else assert(r.gtn(1),"modulus must be greater than 1"),this.m=r,this.prime=null}function Mont(r){Red.call(this,r),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}MPrime.prototype._tmp=function _tmp(){var r=new BN(null);return r.words=new Array(Math.ceil(this.n/13)),r},MPrime.prototype.ireduce=function ireduce(r){var i,n=r;do{this.split(n,this.tmp),i=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(i>this.n);var o=i0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},MPrime.prototype.split=function split(r,i){r.iushrn(this.n,0,i)},MPrime.prototype.imulK=function imulK(r){return r.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(r,i){for(var n=4194303,o=Math.min(r.length,9),_=0;_>>22,j=q}j>>>=22,r.words[_-10]=j,0===j&&r.length>10?r.length-=10:r.length-=9},K256.prototype.imulK=function imulK(r){r.words[r.length]=0,r.words[r.length+1]=0,r.length+=2;for(var i=0,n=0;n>>=26,r.words[n]=_,i=o}return 0!==i&&(r.words[r.length++]=i),r},BN._prime=function prime(r){if(ie[r])return ie[r];var prime;if("k256"===r)prime=new K256;else if("p224"===r)prime=new P224;else if("p192"===r)prime=new P192;else{if("p25519"!==r)throw new Error("Unknown prime "+r);prime=new P25519}return ie[r]=prime,prime},Red.prototype._verify1=function _verify1(r){assert(0===r.negative,"red works only with positives"),assert(r.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(r,i){assert(0==(r.negative|i.negative),"red works only with positives"),assert(r.red&&r.red===i.red,"red works only with red numbers")},Red.prototype.imod=function imod(r){return this.prime?this.prime.ireduce(r)._forceRed(this):(move(r,r.umod(this.m)._forceRed(this)),r)},Red.prototype.neg=function neg(r){return r.isZero()?r.clone():this.m.sub(r)._forceRed(this)},Red.prototype.add=function add(r,i){this._verify2(r,i);var n=r.add(i);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},Red.prototype.iadd=function iadd(r,i){this._verify2(r,i);var n=r.iadd(i);return n.cmp(this.m)>=0&&n.isub(this.m),n},Red.prototype.sub=function sub(r,i){this._verify2(r,i);var n=r.sub(i);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},Red.prototype.isub=function isub(r,i){this._verify2(r,i);var n=r.isub(i);return n.cmpn(0)<0&&n.iadd(this.m),n},Red.prototype.shl=function shl(r,i){return this._verify1(r),this.imod(r.ushln(i))},Red.prototype.imul=function imul(r,i){return this._verify2(r,i),this.imod(r.imul(i))},Red.prototype.mul=function mul(r,i){return this._verify2(r,i),this.imod(r.mul(i))},Red.prototype.isqr=function isqr(r){return this.imul(r,r.clone())},Red.prototype.sqr=function sqr(r){return this.mul(r,r)},Red.prototype.sqrt=function sqrt(r){if(r.isZero())return r.clone();var i=this.m.andln(3);if(assert(i%2==1),3===i){var n=this.m.add(new BN(1)).iushrn(2);return this.pow(r,n)}for(var o=this.m.subn(1),_=0;!o.isZero()&&0===o.andln(1);)_++,o.iushrn(1);assert(!o.isZero());var j=new BN(1).toRed(this),q=j.redNeg(),$=this.m.subn(1).iushrn(1),ie=this.m.bitLength();for(ie=new BN(2*ie*ie).toRed(this);0!==this.pow(ie,$).cmp(q);)ie.redIAdd(q);for(var ne=this.pow(ie,o),oe=this.pow(r,o.addn(1).iushrn(1)),se=this.pow(r,o),le=_;0!==se.cmp(j);){for(var _e=se,pe=0;0!==_e.cmp(j);pe++)_e=_e.redSqr();assert(pe=0;o--){for(var ie=i.words[o],ne=$-1;ne>=0;ne--){var oe=ie>>ne&1;_!==n[0]&&(_=this.sqr(_)),0!==oe||0!==j?(j<<=1,j|=oe,(4===++q||0===o&&0===ne)&&(_=this.mul(_,n[j]),q=0,j=0)):q=0}$=26}return _},Red.prototype.convertTo=function convertTo(r){var i=r.umod(this.m);return i===r?i.clone():i},Red.prototype.convertFrom=function convertFrom(r){var i=r.clone();return i.red=null,i},BN.mont=function mont(r){return new Mont(r)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(r){return this.imod(r.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(r){var i=this.imod(r.mul(this.rinv));return i.red=null,i},Mont.prototype.imul=function imul(r,i){if(r.isZero()||i.isZero())return r.words[0]=0,r.length=1,r;var n=r.imul(i),o=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=n.isub(o).iushrn(this.shift),j=_;return _.cmp(this.m)>=0?j=_.isub(this.m):_.cmpn(0)<0&&(j=_.iadd(this.m)),j._forceRed(this)},Mont.prototype.mul=function mul(r,i){if(r.isZero()||i.isZero())return new BN(0)._forceRed(this);var n=r.mul(i),o=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=n.isub(o).iushrn(this.shift),j=_;return _.cmp(this.m)>=0?j=_.isub(this.m):_.cmpn(0)<0&&(j=_.iadd(this.m)),j._forceRed(this)},Mont.prototype.invm=function invm(r){return this.imod(r._invmp(this.m).mul(this.r2))._forceRed(this)}}(r=n.nmd(r),this)},17203:(r,i,n)=>{var o;function Rand(r){this.rand=r}if(r.exports=function rand(r){return o||(o=new Rand(null)),o.generate(r)},r.exports.Rand=Rand,Rand.prototype.generate=function generate(r){return this._rand(r)},Rand.prototype._rand=function _rand(r){if(this.rand.getBytes)return this.rand.getBytes(r);for(var i=new Uint8Array(r),n=0;n{var o=n(65955).Buffer;function asUInt32Array(r){o.isBuffer(r)||(r=o.from(r));for(var i=r.length/4|0,n=new Array(i),_=0;_>>24]^oe[pe>>>16&255]^se[he>>>8&255]^le[255&me]^i[ge++],q=ne[pe>>>24]^oe[he>>>16&255]^se[me>>>8&255]^le[255&_e]^i[ge++],$=ne[he>>>24]^oe[me>>>16&255]^se[_e>>>8&255]^le[255&pe]^i[ge++],ie=ne[me>>>24]^oe[_e>>>16&255]^se[pe>>>8&255]^le[255&he]^i[ge++],_e=j,pe=q,he=$,me=ie;return j=(o[_e>>>24]<<24|o[pe>>>16&255]<<16|o[he>>>8&255]<<8|o[255&me])^i[ge++],q=(o[pe>>>24]<<24|o[he>>>16&255]<<16|o[me>>>8&255]<<8|o[255&_e])^i[ge++],$=(o[he>>>24]<<24|o[me>>>16&255]<<16|o[_e>>>8&255]<<8|o[255&pe])^i[ge++],ie=(o[me>>>24]<<24|o[_e>>>16&255]<<16|o[pe>>>8&255]<<8|o[255&he])^i[ge++],[j>>>=0,q>>>=0,$>>>=0,ie>>>=0]}var _=[0,1,2,4,8,16,32,64,128,27,54],j=function(){for(var r=new Array(256),i=0;i<256;i++)r[i]=i<128?i<<1:i<<1^283;for(var n=[],o=[],_=[[],[],[],[]],j=[[],[],[],[]],q=0,$=0,ie=0;ie<256;++ie){var ne=$^$<<1^$<<2^$<<3^$<<4;ne=ne>>>8^255&ne^99,n[q]=ne,o[ne]=q;var oe=r[q],se=r[oe],le=r[se],_e=257*r[ne]^16843008*ne;_[0][q]=_e<<24|_e>>>8,_[1][q]=_e<<16|_e>>>16,_[2][q]=_e<<8|_e>>>24,_[3][q]=_e,_e=16843009*le^65537*se^257*oe^16843008*q,j[0][ne]=_e<<24|_e>>>8,j[1][ne]=_e<<16|_e>>>16,j[2][ne]=_e<<8|_e>>>24,j[3][ne]=_e,0===q?q=$=1:(q=oe^r[r[r[le^oe]]],$^=r[r[$]])}return{SBOX:n,INV_SBOX:o,SUB_MIX:_,INV_SUB_MIX:j}}();function AES(r){this._key=asUInt32Array(r),this._reset()}AES.blockSize=16,AES.keySize=32,AES.prototype.blockSize=AES.blockSize,AES.prototype.keySize=AES.keySize,AES.prototype._reset=function(){for(var r=this._key,i=r.length,n=i+6,o=4*(n+1),q=[],$=0;$>>24,ie=j.SBOX[ie>>>24]<<24|j.SBOX[ie>>>16&255]<<16|j.SBOX[ie>>>8&255]<<8|j.SBOX[255&ie],ie^=_[$/i|0]<<24):i>6&&$%i==4&&(ie=j.SBOX[ie>>>24]<<24|j.SBOX[ie>>>16&255]<<16|j.SBOX[ie>>>8&255]<<8|j.SBOX[255&ie]),q[$]=q[$-i]^ie}for(var ne=[],oe=0;oe>>24]]^j.INV_SUB_MIX[1][j.SBOX[le>>>16&255]]^j.INV_SUB_MIX[2][j.SBOX[le>>>8&255]]^j.INV_SUB_MIX[3][j.SBOX[255&le]]}this._nRounds=n,this._keySchedule=q,this._invKeySchedule=ne},AES.prototype.encryptBlockRaw=function(r){return cryptBlock(r=asUInt32Array(r),this._keySchedule,j.SUB_MIX,j.SBOX,this._nRounds)},AES.prototype.encryptBlock=function(r){var i=this.encryptBlockRaw(r),n=o.allocUnsafe(16);return n.writeUInt32BE(i[0],0),n.writeUInt32BE(i[1],4),n.writeUInt32BE(i[2],8),n.writeUInt32BE(i[3],12),n},AES.prototype.decryptBlock=function(r){var i=(r=asUInt32Array(r))[1];r[1]=r[3],r[3]=i;var n=cryptBlock(r,this._invKeySchedule,j.INV_SUB_MIX,j.INV_SBOX,this._nRounds),_=o.allocUnsafe(16);return _.writeUInt32BE(n[0],0),_.writeUInt32BE(n[3],4),_.writeUInt32BE(n[2],8),_.writeUInt32BE(n[1],12),_},AES.prototype.scrub=function(){scrubVec(this._keySchedule),scrubVec(this._invKeySchedule),scrubVec(this._key)},r.exports.AES=AES},6377:(r,i,n)=>{var o=n(69584),_=n(65955).Buffer,j=n(59618),q=n(40137),$=n(43554),ie=n(29343),ne=n(89199);function StreamCipher(r,i,n,q){j.call(this);var ie=_.alloc(4,0);this._cipher=new o.AES(i);var oe=this._cipher.encryptBlock(ie);this._ghash=new $(oe),n=function calcIv(r,i,n){if(12===i.length)return r._finID=_.concat([i,_.from([0,0,0,1])]),_.concat([i,_.from([0,0,0,2])]);var o=new $(n),j=i.length,q=j%16;o.update(i),q&&(q=16-q,o.update(_.alloc(q,0))),o.update(_.alloc(8,0));var ie=8*j,oe=_.alloc(8);oe.writeUIntBE(ie,0,8),o.update(oe),r._finID=o.state;var se=_.from(r._finID);return ne(se),se}(this,n,oe),this._prev=_.from(n),this._cache=_.allocUnsafe(0),this._secCache=_.allocUnsafe(0),this._decrypt=q,this._alen=0,this._len=0,this._mode=r,this._authTag=null,this._called=!1}q(StreamCipher,j),StreamCipher.prototype._update=function(r){if(!this._called&&this._alen){var i=16-this._alen%16;i<16&&(i=_.alloc(i,0),this._ghash.update(i))}this._called=!0;var n=this._mode.encrypt(this,r);return this._decrypt?this._ghash.update(r):this._ghash.update(n),this._len+=r.length,n},StreamCipher.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var r=ie(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function xorTest(r,i){var n=0;r.length!==i.length&&n++;for(var o=Math.min(r.length,i.length),_=0;_{var o=n(37817),_=n(46581),j=n(44946);i.createCipher=i.Cipher=o.createCipher,i.createCipheriv=i.Cipheriv=o.createCipheriv,i.createDecipher=i.Decipher=_.createDecipher,i.createDecipheriv=i.Decipheriv=_.createDecipheriv,i.listCiphers=i.getCiphers=function getCiphers(){return Object.keys(j)}},46581:(r,i,n)=>{var o=n(6377),_=n(65955).Buffer,j=n(92282),q=n(92570),$=n(59618),ie=n(69584),ne=n(21833);function Decipher(r,i,n){$.call(this),this._cache=new Splitter,this._last=void 0,this._cipher=new ie.AES(i),this._prev=_.from(n),this._mode=r,this._autopadding=!0}function Splitter(){this.cache=_.allocUnsafe(0)}function createDecipheriv(r,i,n){var $=j[r.toLowerCase()];if(!$)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=_.from(n)),"GCM"!==$.mode&&n.length!==$.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof i&&(i=_.from(i)),i.length!==$.key/8)throw new TypeError("invalid key length "+i.length);return"stream"===$.type?new q($.module,i,n,!0):"auth"===$.type?new o($.module,i,n,!0):new Decipher($.module,i,n)}n(40137)(Decipher,$),Decipher.prototype._update=function(r){var i,n;this._cache.add(r);for(var o=[];i=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,i),o.push(n);return _.concat(o)},Decipher.prototype._final=function(){var r=this._cache.flush();if(this._autopadding)return function unpad(r){var i=r[15];if(i<1||i>16)throw new Error("unable to decrypt data");var n=-1;for(;++n16)return i=this.cache.slice(0,16),this.cache=this.cache.slice(16),i}else if(this.cache.length>=16)return i=this.cache.slice(0,16),this.cache=this.cache.slice(16),i;return null},Splitter.prototype.flush=function(){if(this.cache.length)return this.cache},i.createDecipher=function createDecipher(r,i){var n=j[r.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var o=ne(i,!1,n.key,n.iv);return createDecipheriv(r,o.key,o.iv)},i.createDecipheriv=createDecipheriv},37817:(r,i,n)=>{var o=n(92282),_=n(6377),j=n(65955).Buffer,q=n(92570),$=n(59618),ie=n(69584),ne=n(21833);function Cipher(r,i,n){$.call(this),this._cache=new Splitter,this._cipher=new ie.AES(i),this._prev=j.from(n),this._mode=r,this._autopadding=!0}n(40137)(Cipher,$),Cipher.prototype._update=function(r){var i,n;this._cache.add(r);for(var o=[];i=this._cache.get();)n=this._mode.encrypt(this,i),o.push(n);return j.concat(o)};var oe=j.alloc(16,16);function Splitter(){this.cache=j.allocUnsafe(0)}function createCipheriv(r,i,n){var $=o[r.toLowerCase()];if(!$)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=j.from(i)),i.length!==$.key/8)throw new TypeError("invalid key length "+i.length);if("string"==typeof n&&(n=j.from(n)),"GCM"!==$.mode&&n.length!==$.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===$.type?new q($.module,i,n):"auth"===$.type?new _($.module,i,n):new Cipher($.module,i,n)}Cipher.prototype._final=function(){var r=this._cache.flush();if(this._autopadding)return r=this._mode.encrypt(this,r),this._cipher.scrub(),r;if(!r.equals(oe))throw this._cipher.scrub(),new Error("data not multiple of block length")},Cipher.prototype.setAutoPadding=function(r){return this._autopadding=!!r,this},Splitter.prototype.add=function(r){this.cache=j.concat([this.cache,r])},Splitter.prototype.get=function(){if(this.cache.length>15){var r=this.cache.slice(0,16);return this.cache=this.cache.slice(16),r}return null},Splitter.prototype.flush=function(){for(var r=16-this.cache.length,i=j.allocUnsafe(r),n=-1;++n{var o=n(65955).Buffer,_=o.alloc(16,0);function fromArray(r){var i=o.allocUnsafe(16);return i.writeUInt32BE(r[0]>>>0,0),i.writeUInt32BE(r[1]>>>0,4),i.writeUInt32BE(r[2]>>>0,8),i.writeUInt32BE(r[3]>>>0,12),i}function GHASH(r){this.h=r,this.state=o.alloc(16,0),this.cache=o.allocUnsafe(0)}GHASH.prototype.ghash=function(r){for(var i=-1;++i0;r--)n[r]=n[r]>>>1|(1&n[r-1])<<31;n[0]=n[0]>>>1,i&&(n[0]=n[0]^225<<24)}this.state=fromArray(o)},GHASH.prototype.update=function(r){var i;for(this.cache=o.concat([this.cache,r]);this.cache.length>=16;)i=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(i)},GHASH.prototype.final=function(r,i){return this.cache.length&&this.ghash(o.concat([this.cache,_],16)),this.ghash(fromArray([0,r,0,i])),this.state},r.exports=GHASH},89199:r=>{r.exports=function incr32(r){for(var i,n=r.length;n--;){if(255!==(i=r.readUInt8(n))){i++,r.writeUInt8(i,n);break}r.writeUInt8(0,n)}}},78405:(r,i,n)=>{var o=n(29343);i.encrypt=function(r,i){var n=o(i,r._prev);return r._prev=r._cipher.encryptBlock(n),r._prev},i.decrypt=function(r,i){var n=r._prev;r._prev=i;var _=r._cipher.decryptBlock(i);return o(_,n)}},76969:(r,i,n)=>{var o=n(65955).Buffer,_=n(29343);function encryptStart(r,i,n){var j=i.length,q=_(i,r._cache);return r._cache=r._cache.slice(j),r._prev=o.concat([r._prev,n?i:q]),q}i.encrypt=function(r,i,n){for(var _,j=o.allocUnsafe(0);i.length;){if(0===r._cache.length&&(r._cache=r._cipher.encryptBlock(r._prev),r._prev=o.allocUnsafe(0)),!(r._cache.length<=i.length)){j=o.concat([j,encryptStart(r,i,n)]);break}_=r._cache.length,j=o.concat([j,encryptStart(r,i.slice(0,_),n)]),i=i.slice(_)}return j}},4766:(r,i,n)=>{var o=n(65955).Buffer;function encryptByte(r,i,n){for(var o,_,j=-1,q=0;++j<8;)o=i&1<<7-j?128:0,q+=(128&(_=r._cipher.encryptBlock(r._prev)[0]^o))>>j%8,r._prev=shiftIn(r._prev,n?o:_);return q}function shiftIn(r,i){var n=r.length,_=-1,j=o.allocUnsafe(r.length);for(r=o.concat([r,o.from([i])]);++_>7;return j}i.encrypt=function(r,i,n){for(var _=i.length,j=o.allocUnsafe(_),q=-1;++q<_;)j[q]=encryptByte(r,i[q],n);return j}},12224:(r,i,n)=>{var o=n(65955).Buffer;function encryptByte(r,i,n){var _=r._cipher.encryptBlock(r._prev)[0]^i;return r._prev=o.concat([r._prev.slice(1),o.from([n?i:_])]),_}i.encrypt=function(r,i,n){for(var _=i.length,j=o.allocUnsafe(_),q=-1;++q<_;)j[q]=encryptByte(r,i[q],n);return j}},59357:(r,i,n)=>{var o=n(29343),_=n(65955).Buffer,j=n(89199);function getBlock(r){var i=r._cipher.encryptBlockRaw(r._prev);return j(r._prev),i}i.encrypt=function(r,i){var n=Math.ceil(i.length/16),j=r._cache.length;r._cache=_.concat([r._cache,_.allocUnsafe(16*n)]);for(var q=0;q{i.encrypt=function(r,i){return r._cipher.encryptBlock(i)},i.decrypt=function(r,i){return r._cipher.decryptBlock(i)}},92282:(r,i,n)=>{var o={ECB:n(89390),CBC:n(78405),CFB:n(76969),CFB8:n(12224),CFB1:n(4766),OFB:n(26621),CTR:n(59357),GCM:n(59357)},_=n(44946);for(var j in _)_[j].module=o[_[j].mode];r.exports=_},26621:(r,i,n)=>{var o=n(13039).Buffer,_=n(29343);function getBlock(r){return r._prev=r._cipher.encryptBlock(r._prev),r._prev}i.encrypt=function(r,i){for(;r._cache.length{var o=n(69584),_=n(65955).Buffer,j=n(59618);function StreamCipher(r,i,n,q){j.call(this),this._cipher=new o.AES(i),this._prev=_.from(n),this._cache=_.allocUnsafe(0),this._secCache=_.allocUnsafe(0),this._decrypt=q,this._mode=r}n(40137)(StreamCipher,j),StreamCipher.prototype._update=function(r){return this._mode.encrypt(this,r,this._decrypt)},StreamCipher.prototype._final=function(){this._cipher.scrub()},r.exports=StreamCipher},45372:(r,i,n)=>{var o=n(73999),_=n(94962),j=n(92282),q=n(33719),$=n(21833);function createCipheriv(r,i,n){if(r=r.toLowerCase(),j[r])return _.createCipheriv(r,i,n);if(q[r])return new o({key:i,iv:n,mode:r});throw new TypeError("invalid suite type")}function createDecipheriv(r,i,n){if(r=r.toLowerCase(),j[r])return _.createDecipheriv(r,i,n);if(q[r])return new o({key:i,iv:n,mode:r,decrypt:!0});throw new TypeError("invalid suite type")}i.createCipher=i.Cipher=function createCipher(r,i){var n,o;if(r=r.toLowerCase(),j[r])n=j[r].key,o=j[r].iv;else{if(!q[r])throw new TypeError("invalid suite type");n=8*q[r].key,o=q[r].iv}var _=$(i,!1,n,o);return createCipheriv(r,_.key,_.iv)},i.createCipheriv=i.Cipheriv=createCipheriv,i.createDecipher=i.Decipher=function createDecipher(r,i){var n,o;if(r=r.toLowerCase(),j[r])n=j[r].key,o=j[r].iv;else{if(!q[r])throw new TypeError("invalid suite type");n=8*q[r].key,o=q[r].iv}var _=$(i,!1,n,o);return createDecipheriv(r,_.key,_.iv)},i.createDecipheriv=i.Decipheriv=createDecipheriv,i.listCiphers=i.getCiphers=function getCiphers(){return Object.keys(q).concat(_.getCiphers())}},73999:(r,i,n)=>{var o=n(59618),_=n(81104),j=n(40137),q=n(65955).Buffer,$={"des-ede3-cbc":_.CBC.instantiate(_.EDE),"des-ede3":_.EDE,"des-ede-cbc":_.CBC.instantiate(_.EDE),"des-ede":_.EDE,"des-cbc":_.CBC.instantiate(_.DES),"des-ecb":_.DES};function DES(r){o.call(this);var i,n=r.mode.toLowerCase(),_=$[n];i=r.decrypt?"decrypt":"encrypt";var j=r.key;q.isBuffer(j)||(j=q.from(j)),"des-ede"!==n&&"des-ede-cbc"!==n||(j=q.concat([j,j.slice(0,8)]));var ie=r.iv;q.isBuffer(ie)||(ie=q.from(ie)),this._des=_.create({key:j,iv:ie,type:i})}$.des=$["des-cbc"],$.des3=$["des-ede3-cbc"],r.exports=DES,j(DES,o),DES.prototype._update=function(r){return q.from(this._des.update(r))},DES.prototype._final=function(){return q.from(this._des.final())}},33719:(r,i)=>{i["des-ecb"]={key:8,iv:0},i["des-cbc"]=i.des={key:8,iv:8},i["des-ede3-cbc"]=i.des3={key:24,iv:8},i["des-ede3"]={key:24,iv:0},i["des-ede-cbc"]={key:16,iv:8},i["des-ede"]={key:16,iv:0}},52967:(r,i,n)=>{var o=n(13039).Buffer,_=n(18486),j=n(65519);function getr(r){var i,n=r.modulus.byteLength();do{i=new _(j(n))}while(i.cmp(r.modulus)>=0||!i.umod(r.prime1)||!i.umod(r.prime2));return i}function crt(r,i){var n=function blind(r){var i=getr(r);return{blinder:i.toRed(_.mont(r.modulus)).redPow(new _(r.publicExponent)).fromRed(),unblinder:i.invm(r.modulus)}}(i),j=i.modulus.byteLength(),q=new _(r).mul(n.blinder).umod(i.modulus),$=q.toRed(_.mont(i.prime1)),ie=q.toRed(_.mont(i.prime2)),ne=i.coefficient,oe=i.prime1,se=i.prime2,le=$.redPow(i.exponent1).fromRed(),_e=ie.redPow(i.exponent2).fromRed(),pe=le.isub(_e).imul(ne).umod(oe).imul(se);return _e.iadd(pe).imul(n.unblinder).umod(i.modulus).toArrayLike(o,"be",j)}crt.getr=getr,r.exports=crt},8812:(r,i,n)=>{r.exports=n(75207)},72895:(r,i,n)=>{var o=n(38114).Buffer,_=n(22525),j=n(29449),q=n(40137),$=n(99348),ie=n(20410),ne=n(75207);function Sign(r){j.Writable.call(this);var i=ne[r];if(!i)throw new Error("Unknown message digest");this._hashType=i.hash,this._hash=_(i.hash),this._tag=i.id,this._signType=i.sign}function Verify(r){j.Writable.call(this);var i=ne[r];if(!i)throw new Error("Unknown message digest");this._hash=_(i.hash),this._tag=i.id,this._signType=i.sign}function createSign(r){return new Sign(r)}function createVerify(r){return new Verify(r)}Object.keys(ne).forEach((function(r){ne[r].id=o.from(ne[r].id,"hex"),ne[r.toLowerCase()]=ne[r]})),q(Sign,j.Writable),Sign.prototype._write=function _write(r,i,n){this._hash.update(r),n()},Sign.prototype.update=function update(r,i){return"string"==typeof r&&(r=o.from(r,i)),this._hash.update(r),this},Sign.prototype.sign=function signMethod(r,i){this.end();var n=this._hash.digest(),o=$(n,r,this._hashType,this._signType,this._tag);return i?o.toString(i):o},q(Verify,j.Writable),Verify.prototype._write=function _write(r,i,n){this._hash.update(r),n()},Verify.prototype.update=function update(r,i){return"string"==typeof r&&(r=o.from(r,i)),this._hash.update(r),this},Verify.prototype.verify=function verifyMethod(r,i,n){"string"==typeof i&&(i=o.from(i,n)),this.end();var _=this._hash.digest();return ie(i,_,r,this._signType,this._tag)},r.exports={Sign:createSign,Verify:createVerify,createSign,createVerify}},99348:(r,i,n)=>{var o=n(38114).Buffer,_=n(97925),j=n(52967),q=n(816).ec,$=n(18486),ie=n(47817),ne=n(1308);function getKey(r,i,n,j){if((r=o.from(r.toArray())).length0&&n.ishrn(o),n}function makeKey(r,i,n){var j,q;do{for(j=o.alloc(0);8*j.length{var o=n(38114).Buffer,_=n(18486),j=n(816).ec,q=n(47817),$=n(1308);function checkValue(r,i){if(r.cmpn(0)<=0)throw new Error("invalid sig");if(r.cmp(i)>=i)throw new Error("invalid sig")}r.exports=function verify(r,i,n,ie,ne){var oe=q(n);if("ec"===oe.type){if("ecdsa"!==ie&&"ecdsa/rsa"!==ie)throw new Error("wrong public key type");return function ecVerify(r,i,n){var o=$[n.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var _=new j(o),q=n.data.subjectPrivateKey.data;return _.verify(i,r,q)}(r,i,oe)}if("dsa"===oe.type){if("dsa"!==ie)throw new Error("wrong public key type");return function dsaVerify(r,i,n){var o=n.data.p,j=n.data.q,$=n.data.g,ie=n.data.pub_key,ne=q.signature.decode(r,"der"),oe=ne.s,se=ne.r;checkValue(oe,j),checkValue(se,j);var le=_.mont(o),_e=oe.invm(j);return 0===$.toRed(le).redPow(new _(i).mul(_e).mod(j)).fromRed().mul(ie.toRed(le).redPow(se.mul(_e).mod(j)).fromRed()).mod(o).mod(j).cmp(se)}(r,i,oe)}if("rsa"!==ie&&"ecdsa/rsa"!==ie)throw new Error("wrong public key type");i=o.concat([ne,i]);for(var se=oe.modulus.byteLength(),le=[1],_e=0;i.length+le.length+2{var o=n(13039),_=o.Buffer;function copyProps(r,i){for(var n in r)i[n]=r[n]}function SafeBuffer(r,i,n){return _(r,i,n)}_.from&&_.alloc&&_.allocUnsafe&&_.allocUnsafeSlow?r.exports=o:(copyProps(o,i),i.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(_.prototype),copyProps(_,SafeBuffer),SafeBuffer.from=function(r,i,n){if("number"==typeof r)throw new TypeError("Argument must not be a number");return _(r,i,n)},SafeBuffer.alloc=function(r,i,n){if("number"!=typeof r)throw new TypeError("Argument must be a number");var o=_(r);return void 0!==i?"string"==typeof n?o.fill(i,n):o.fill(i):o.fill(0),o},SafeBuffer.allocUnsafe=function(r){if("number"!=typeof r)throw new TypeError("Argument must be a number");return _(r)},SafeBuffer.allocUnsafeSlow=function(r){if("number"!=typeof r)throw new TypeError("Argument must be a number");return o.SlowBuffer(r)}},29343:(r,i,n)=>{var o=n(13039).Buffer;r.exports=function xor(r,i){for(var n=Math.min(r.length,i.length),_=new o(n),j=0;j{var o=n(34005),_=n(68865),j="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=Buffer,i.SlowBuffer=function SlowBuffer(r){+r!=r&&(r=0);return Buffer.alloc(+r)},i.INSPECT_MAX_BYTES=50;var q=2147483647;function createBuffer(r){if(r>q)throw new RangeError('The value "'+r+'" is invalid for option "size"');var i=new Uint8Array(r);return Object.setPrototypeOf(i,Buffer.prototype),i}function Buffer(r,i,n){if("number"==typeof r){if("string"==typeof i)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(r)}return from(r,i,n)}function from(r,i,n){if("string"==typeof r)return function fromString(r,i){"string"==typeof i&&""!==i||(i="utf8");if(!Buffer.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var n=0|byteLength(r,i),o=createBuffer(n),_=o.write(r,i);_!==n&&(o=o.slice(0,_));return o}(r,i);if(ArrayBuffer.isView(r))return function fromArrayView(r){if(isInstance(r,Uint8Array)){var i=new Uint8Array(r);return fromArrayBuffer(i.buffer,i.byteOffset,i.byteLength)}return fromArrayLike(r)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(isInstance(r,ArrayBuffer)||r&&isInstance(r.buffer,ArrayBuffer))return fromArrayBuffer(r,i,n);if("undefined"!=typeof SharedArrayBuffer&&(isInstance(r,SharedArrayBuffer)||r&&isInstance(r.buffer,SharedArrayBuffer)))return fromArrayBuffer(r,i,n);if("number"==typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');var o=r.valueOf&&r.valueOf();if(null!=o&&o!==r)return Buffer.from(o,i,n);var _=function fromObject(r){if(Buffer.isBuffer(r)){var i=0|checked(r.length),n=createBuffer(i);return 0===n.length||r.copy(n,0,0,i),n}if(void 0!==r.length)return"number"!=typeof r.length||numberIsNaN(r.length)?createBuffer(0):fromArrayLike(r);if("Buffer"===r.type&&Array.isArray(r.data))return fromArrayLike(r.data)}(r);if(_)return _;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof r[Symbol.toPrimitive])return Buffer.from(r[Symbol.toPrimitive]("string"),i,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}function assertSize(r){if("number"!=typeof r)throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function allocUnsafe(r){return assertSize(r),createBuffer(r<0?0:0|checked(r))}function fromArrayLike(r){for(var i=r.length<0?0:0|checked(r.length),n=createBuffer(i),o=0;o=q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+q.toString(16)+" bytes");return 0|r}function byteLength(r,i){if(Buffer.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||isInstance(r,ArrayBuffer))return r.byteLength;if("string"!=typeof r)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);var n=r.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===n)return 0;for(var _=!1;;)switch(i){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return utf8ToBytes(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return base64ToBytes(r).length;default:if(_)return o?-1:utf8ToBytes(r).length;i=(""+i).toLowerCase(),_=!0}}function slowToString(r,i,n){var o=!1;if((void 0===i||i<0)&&(i=0),i>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(i>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return hexSlice(this,i,n);case"utf8":case"utf-8":return utf8Slice(this,i,n);case"ascii":return asciiSlice(this,i,n);case"latin1":case"binary":return latin1Slice(this,i,n);case"base64":return base64Slice(this,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,i,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),o=!0}}function swap(r,i,n){var o=r[i];r[i]=r[n],r[n]=o}function bidirectionalIndexOf(r,i,n,o,_){if(0===r.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),numberIsNaN(n=+n)&&(n=_?0:r.length-1),n<0&&(n=r.length+n),n>=r.length){if(_)return-1;n=r.length-1}else if(n<0){if(!_)return-1;n=0}if("string"==typeof i&&(i=Buffer.from(i,o)),Buffer.isBuffer(i))return 0===i.length?-1:arrayIndexOf(r,i,n,o,_);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?_?Uint8Array.prototype.indexOf.call(r,i,n):Uint8Array.prototype.lastIndexOf.call(r,i,n):arrayIndexOf(r,[i],n,o,_);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(r,i,n,o,_){var j,q=1,$=r.length,ie=i.length;if(void 0!==o&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(r.length<2||i.length<2)return-1;q=2,$/=2,ie/=2,n/=2}function read(r,i){return 1===q?r[i]:r.readUInt16BE(i*q)}if(_){var ne=-1;for(j=n;j<$;j++)if(read(r,j)===read(i,-1===ne?0:j-ne)){if(-1===ne&&(ne=j),j-ne+1===ie)return ne*q}else-1!==ne&&(j-=j-ne),ne=-1}else for(n+ie>$&&(n=$-ie),j=n;j>=0;j--){for(var oe=!0,se=0;se_&&(o=_):o=_;var j=i.length;o>j/2&&(o=j/2);for(var q=0;q>8,_=n%256,j.push(_),j.push(o);return j}(i,r.length-n),r,n,o)}function base64Slice(r,i,n){return 0===i&&n===r.length?o.fromByteArray(r):o.fromByteArray(r.slice(i,n))}function utf8Slice(r,i,n){n=Math.min(r.length,n);for(var o=[],_=i;_239?4:oe>223?3:oe>191?2:1;if(_+le<=n)switch(le){case 1:oe<128&&(se=oe);break;case 2:128==(192&(j=r[_+1]))&&(ne=(31&oe)<<6|63&j)>127&&(se=ne);break;case 3:j=r[_+1],q=r[_+2],128==(192&j)&&128==(192&q)&&(ne=(15&oe)<<12|(63&j)<<6|63&q)>2047&&(ne<55296||ne>57343)&&(se=ne);break;case 4:j=r[_+1],q=r[_+2],ie=r[_+3],128==(192&j)&&128==(192&q)&&128==(192&ie)&&(ne=(15&oe)<<18|(63&j)<<12|(63&q)<<6|63&ie)>65535&&ne<1114112&&(se=ne)}null===se?(se=65533,le=1):se>65535&&(se-=65536,o.push(se>>>10&1023|55296),se=56320|1023&se),o.push(se),_+=le}return function decodeCodePointsArray(r){var i=r.length;if(i<=$)return String.fromCharCode.apply(String,r);var n="",o=0;for(;oo.length?Buffer.from(j).copy(o,_):Uint8Array.prototype.set.call(o,j,_);else{if(!Buffer.isBuffer(j))throw new TypeError('"list" argument must be an Array of Buffers');j.copy(o,_)}_+=j.length}return o},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;in&&(r+=" ... "),""},j&&(Buffer.prototype[j]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(r,i,n,o,_){if(isInstance(r,Uint8Array)&&(r=Buffer.from(r,r.offset,r.byteLength)),!Buffer.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(void 0===i&&(i=0),void 0===n&&(n=r?r.length:0),void 0===o&&(o=0),void 0===_&&(_=this.length),i<0||n>r.length||o<0||_>this.length)throw new RangeError("out of range index");if(o>=_&&i>=n)return 0;if(o>=_)return-1;if(i>=n)return 1;if(this===r)return 0;for(var j=(_>>>=0)-(o>>>=0),q=(n>>>=0)-(i>>>=0),$=Math.min(j,q),ie=this.slice(o,_),ne=r.slice(i,n),oe=0;oe<$;++oe)if(ie[oe]!==ne[oe]){j=ie[oe],q=ne[oe];break}return j>>=0,isFinite(n)?(n>>>=0,void 0===o&&(o="utf8")):(o=n,n=void 0)}var _=this.length-i;if((void 0===n||n>_)&&(n=_),r.length>0&&(n<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var j=!1;;)switch(o){case"hex":return hexWrite(this,r,i,n);case"utf8":case"utf-8":return utf8Write(this,r,i,n);case"ascii":case"latin1":case"binary":return asciiWrite(this,r,i,n);case"base64":return base64Write(this,r,i,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,r,i,n);default:if(j)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),j=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;function asciiSlice(r,i,n){var o="";n=Math.min(r.length,n);for(var _=i;_o)&&(n=o);for(var _="",j=i;jn)throw new RangeError("Trying to access beyond buffer length")}function checkInt(r,i,n,o,_,j){if(!Buffer.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>_||ir.length)throw new RangeError("Index out of range")}function checkIEEE754(r,i,n,o,_,j){if(n+o>r.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function writeFloat(r,i,n,o,j){return i=+i,n>>>=0,j||checkIEEE754(r,0,n,4),_.write(r,i,n,o,23,4),n+4}function writeDouble(r,i,n,o,j){return i=+i,n>>>=0,j||checkIEEE754(r,0,n,8),_.write(r,i,n,o,52,8),n+8}Buffer.prototype.slice=function slice(r,i){var n=this.length;(r=~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),(i=void 0===i?n:~~i)<0?(i+=n)<0&&(i=0):i>n&&(i=n),i>>=0,i>>>=0,n||checkOffset(r,i,this.length);for(var o=this[r],_=1,j=0;++j>>=0,i>>>=0,n||checkOffset(r,i,this.length);for(var o=this[r+--i],_=1;i>0&&(_*=256);)o+=this[r+--i]*_;return o},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(r,i){return r>>>=0,i||checkOffset(r,1,this.length),this[r]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(r,i){return r>>>=0,i||checkOffset(r,2,this.length),this[r]|this[r+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(r,i){return r>>>=0,i||checkOffset(r,2,this.length),this[r]<<8|this[r+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},Buffer.prototype.readIntLE=function readIntLE(r,i,n){r>>>=0,i>>>=0,n||checkOffset(r,i,this.length);for(var o=this[r],_=1,j=0;++j=(_*=128)&&(o-=Math.pow(2,8*i)),o},Buffer.prototype.readIntBE=function readIntBE(r,i,n){r>>>=0,i>>>=0,n||checkOffset(r,i,this.length);for(var o=i,_=1,j=this[r+--o];o>0&&(_*=256);)j+=this[r+--o]*_;return j>=(_*=128)&&(j-=Math.pow(2,8*i)),j},Buffer.prototype.readInt8=function readInt8(r,i){return r>>>=0,i||checkOffset(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},Buffer.prototype.readInt16LE=function readInt16LE(r,i){r>>>=0,i||checkOffset(r,2,this.length);var n=this[r]|this[r+1]<<8;return 32768&n?4294901760|n:n},Buffer.prototype.readInt16BE=function readInt16BE(r,i){r>>>=0,i||checkOffset(r,2,this.length);var n=this[r+1]|this[r]<<8;return 32768&n?4294901760|n:n},Buffer.prototype.readInt32LE=function readInt32LE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},Buffer.prototype.readFloatLE=function readFloatLE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),_.read(this,r,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(r,i){return r>>>=0,i||checkOffset(r,4,this.length),_.read(this,r,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(r,i){return r>>>=0,i||checkOffset(r,8,this.length),_.read(this,r,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(r,i){return r>>>=0,i||checkOffset(r,8,this.length),_.read(this,r,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(r,i,n,o){(r=+r,i>>>=0,n>>>=0,o)||checkInt(this,r,i,n,Math.pow(2,8*n)-1,0);var _=1,j=0;for(this[i]=255&r;++j>>=0,n>>>=0,o)||checkInt(this,r,i,n,Math.pow(2,8*n)-1,0);var _=n-1,j=1;for(this[i+_]=255&r;--_>=0&&(j*=256);)this[i+_]=r/j&255;return i+n},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,1,255,0),this[i]=255&r,i+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,2,65535,0),this[i]=255&r,this[i+1]=r>>>8,i+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,2,65535,0),this[i]=r>>>8,this[i+1]=255&r,i+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,4,4294967295,0),this[i+3]=r>>>24,this[i+2]=r>>>16,this[i+1]=r>>>8,this[i]=255&r,i+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,4,4294967295,0),this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r,i+4},Buffer.prototype.writeIntLE=function writeIntLE(r,i,n,o){if(r=+r,i>>>=0,!o){var _=Math.pow(2,8*n-1);checkInt(this,r,i,n,_-1,-_)}var j=0,q=1,$=0;for(this[i]=255&r;++j>0)-$&255;return i+n},Buffer.prototype.writeIntBE=function writeIntBE(r,i,n,o){if(r=+r,i>>>=0,!o){var _=Math.pow(2,8*n-1);checkInt(this,r,i,n,_-1,-_)}var j=n-1,q=1,$=0;for(this[i+j]=255&r;--j>=0&&(q*=256);)r<0&&0===$&&0!==this[i+j+1]&&($=1),this[i+j]=(r/q>>0)-$&255;return i+n},Buffer.prototype.writeInt8=function writeInt8(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,1,127,-128),r<0&&(r=255+r+1),this[i]=255&r,i+1},Buffer.prototype.writeInt16LE=function writeInt16LE(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,2,32767,-32768),this[i]=255&r,this[i+1]=r>>>8,i+2},Buffer.prototype.writeInt16BE=function writeInt16BE(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,2,32767,-32768),this[i]=r>>>8,this[i+1]=255&r,i+2},Buffer.prototype.writeInt32LE=function writeInt32LE(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,4,2147483647,-2147483648),this[i]=255&r,this[i+1]=r>>>8,this[i+2]=r>>>16,this[i+3]=r>>>24,i+4},Buffer.prototype.writeInt32BE=function writeInt32BE(r,i,n){return r=+r,i>>>=0,n||checkInt(this,r,i,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r,i+4},Buffer.prototype.writeFloatLE=function writeFloatLE(r,i,n){return writeFloat(this,r,i,!0,n)},Buffer.prototype.writeFloatBE=function writeFloatBE(r,i,n){return writeFloat(this,r,i,!1,n)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(r,i,n){return writeDouble(this,r,i,!0,n)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(r,i,n){return writeDouble(this,r,i,!1,n)},Buffer.prototype.copy=function copy(r,i,n,o){if(!Buffer.isBuffer(r))throw new TypeError("argument should be a Buffer");if(n||(n=0),o||0===o||(o=this.length),i>=r.length&&(i=r.length),i||(i=0),o>0&&o=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),r.length-i>>=0,n=void 0===n?this.length:n>>>0,r||(r=0),"number"==typeof r)for(j=i;j55295&&n<57344){if(!_){if(n>56319){(i-=3)>-1&&j.push(239,191,189);continue}if(q+1===o){(i-=3)>-1&&j.push(239,191,189);continue}_=n;continue}if(n<56320){(i-=3)>-1&&j.push(239,191,189),_=n;continue}n=65536+(_-55296<<10|n-56320)}else _&&(i-=3)>-1&&j.push(239,191,189);if(_=null,n<128){if((i-=1)<0)break;j.push(n)}else if(n<2048){if((i-=2)<0)break;j.push(n>>6|192,63&n|128)}else if(n<65536){if((i-=3)<0)break;j.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((i-=4)<0)break;j.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return j}function base64ToBytes(r){return o.toByteArray(function base64clean(r){if((r=(r=r.split("=")[0]).trim().replace(ie,"")).length<2)return"";for(;r.length%4!=0;)r+="=";return r}(r))}function blitBuffer(r,i,n,o){for(var _=0;_=i.length||_>=r.length);++_)i[_+n]=r[_];return _}function isInstance(r,i){return r instanceof i||null!=r&&null!=r.constructor&&null!=r.constructor.name&&r.constructor.name===i.name}function numberIsNaN(r){return r!=r}var ne=function(){for(var r="0123456789abcdef",i=new Array(256),n=0;n<16;++n)for(var o=16*n,_=0;_<16;++_)i[o+_]=r[n]+r[_];return i}()},59618:(r,i,n)=>{var o=n(65955).Buffer,_=n(67004).Transform,j=n(6923).s;function CipherBase(r){_.call(this),this.hashMode="string"==typeof r,this.hashMode?this[r]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(40137)(CipherBase,_),CipherBase.prototype.update=function(r,i,n){"string"==typeof r&&(r=o.from(r,i));var _=this._update(r);return this.hashMode?this:(n&&(_=this._toString(_,n)),_)},CipherBase.prototype.setAutoPadding=function(){},CipherBase.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},CipherBase.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},CipherBase.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},CipherBase.prototype._transform=function(r,i,n){var o;try{this.hashMode?this._update(r):this.push(this._update(r))}catch(_){o=_}finally{n(o)}},CipherBase.prototype._flush=function(r){var i;try{this.push(this.__final())}catch(n){i=n}r(i)},CipherBase.prototype._finalOrDigest=function(r){var i=this.__final()||o.alloc(0);return r&&(i=this._toString(i,r,!0)),i},CipherBase.prototype._toString=function(r,i,n){if(this._decoder||(this._decoder=new j(i),this._encoding=i),this._encoding!==i)throw new Error("can't switch encodings");var o=this._decoder.write(r);return n&&(o+=this._decoder.end()),o},r.exports=CipherBase},99821:function(r,i){var n,o,_;o=[],void 0===(_="function"==typeof(n=function(){var r=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;function indexOrEnd(r,i){return-1===r.indexOf(i)?r.length:r.indexOf(i)}function split(r){var i=r.replace(/^v/,"").replace(/\+.*$/,""),n=indexOrEnd(i,"-"),o=i.substring(0,n).split(".");return o.push(i.substring(n+1)),o}function tryParse(r){return isNaN(Number(r))?r:Number(r)}function validate(i){if("string"!=typeof i)throw new TypeError("Invalid argument expected string");if(!r.test(i))throw new Error("Invalid argument not valid semver ('"+i+"' received)")}function compareVersions(r,i){[r,i].forEach(validate);for(var n=split(r),o=split(i),_=0;_q)return 1;if(q>j)return-1}var $=n[n.length-1],ie=o[o.length-1];if($&&ie){var ne=$.split(".").map(tryParse),oe=ie.split(".").map(tryParse);for(_=0;_oe[_])return 1;if(oe[_]>ne[_])return-1}}else if($||ie)return $?-1:1;return 0}var i=[">",">=","=","<","<="],n={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};function validateOperator(r){if("string"!=typeof r)throw new TypeError("Invalid operator type, expected string but got "+typeof r);if(-1===i.indexOf(r))throw new TypeError("Invalid operator, expected one of "+i.join("|"))}return compareVersions.validate=function(i){return"string"==typeof i&&r.test(i)},compareVersions.compare=function(r,i,o){validateOperator(o);var _=compareVersions(r,i);return n[o].indexOf(_)>-1},compareVersions})?n.apply(i,o):n)||(r.exports=_)},19564:(r,i,n)=>{var o=n(3084);r.exports=o},89003:(r,i,n)=>{var o=n(99329);r.exports=o},59389:(r,i,n)=>{var o=n(55094);r.exports=o},37050:(r,i,n)=>{var o=n(13048);r.exports=o},74461:(r,i,n)=>{var o=n(15579);r.exports=o},87730:(r,i,n)=>{n(25036),n(9586);var o=n(36917);r.exports=o("Array","flatMap")},55018:(r,i,n)=>{n(47195),n(34540);var o=n(36917);r.exports=o("Array","flat")},85792:(r,i,n)=>{n(64701);var o=n(23034);r.exports=o.Object.entries},99035:(r,i,n)=>{n(55574);var o=n(23034);r.exports=o.Object.values},94626:(r,i,n)=>{var o=n(19564);r.exports=o},9141:(r,i,n)=>{var o=n(89003);r.exports=o},69894:(r,i,n)=>{var o=n(59389);r.exports=o},60612:(r,i,n)=>{var o=n(37050);r.exports=o},8794:(r,i,n)=>{var o=n(74461);r.exports=o},86173:(r,i,n)=>{var o=n(32022),_=n(34028),j=n(84160),q=o.TypeError;r.exports=function(r){if(_(r))return r;throw q(j(r)+" is not a function")}},41684:(r,i,n)=>{var o=n(32022),_=n(34028),j=o.String,q=o.TypeError;r.exports=function(r){if("object"==typeof r||_(r))return r;throw q("Can't set "+j(r)+" as a prototype")}},47512:(r,i,n)=>{var o=n(30191),_=n(13250),j=n(43087),q=o("unscopables"),$=Array.prototype;null==$[q]&&j.f($,q,{configurable:!0,value:_(null)}),r.exports=function(r){$[q][r]=!0}},39837:(r,i,n)=>{var o=n(32022),_=n(27357),j=o.TypeError;r.exports=function(r,i){if(_(i,r))return r;throw j("Incorrect invocation")}},52546:(r,i,n)=>{var o=n(32022),_=n(51355),j=o.String,q=o.TypeError;r.exports=function(r){if(_(r))return r;throw q(j(r)+" is not an object")}},78035:(r,i,n)=>{var o=n(58326),_=n(86593),j=n(84117),createMethod=function(r){return function(i,n,q){var $,ie=o(i),ne=j(ie),oe=_(q,ne);if(r&&n!=n){for(;ne>oe;)if(($=ie[oe++])!=$)return!0}else for(;ne>oe;oe++)if((r||oe in ie)&&ie[oe]===n)return r||oe||0;return!r&&-1}};r.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},42893:(r,i,n)=>{var o=n(32022),_=n(86593),j=n(84117),q=n(19402),$=o.Array,ie=Math.max;r.exports=function(r,i,n){for(var o=j(r),ne=_(i,o),oe=_(void 0===n?o:n,o),se=$(ie(oe-ne,0)),le=0;ne{var o=n(42893),_=Math.floor,mergeSort=function(r,i){var n=r.length,j=_(n/2);return n<8?insertionSort(r,i):merge(r,mergeSort(o(r,0,j),i),mergeSort(o(r,j),i),i)},insertionSort=function(r,i){for(var n,o,_=r.length,j=1;j<_;){for(o=j,n=r[j];o&&i(r[o-1],n)>0;)r[o]=r[--o];o!==j++&&(r[o]=n)}return r},merge=function(r,i,n,o){for(var _=i.length,j=n.length,q=0,$=0;q<_||${var o=n(32022),_=n(65351),j=n(78449),q=n(51355),$=n(30191)("species"),ie=o.Array;r.exports=function(r){var i;return _(r)&&(i=r.constructor,(j(i)&&(i===ie||_(i.prototype))||q(i)&&null===(i=i[$]))&&(i=void 0)),void 0===i?ie:i}},74842:(r,i,n)=>{var o=n(78502);r.exports=function(r,i){return new(o(r))(0===i?0:i)}},39523:(r,i,n)=>{var o=n(59913),_=o({}.toString),j=o("".slice);r.exports=function(r){return j(_(r),8,-1)}},82814:(r,i,n)=>{var o=n(32022),_=n(77568),j=n(34028),q=n(39523),$=n(30191)("toStringTag"),ie=o.Object,ne="Arguments"==q(function(){return arguments}());r.exports=_?q:function(r){var i,n,o;return void 0===r?"Undefined":null===r?"Null":"string"==typeof(n=function(r,i){try{return r[i]}catch(n){}}(i=ie(r),$))?n:ne?q(i):"Object"==(o=q(i))&&j(i.callee)?"Arguments":o}},74953:(r,i,n)=>{var o=n(98511),_=n(91537),j=n(66213),q=n(43087);r.exports=function(r,i,n){for(var $=_(i),ie=q.f,ne=j.f,oe=0;oe<$.length;oe++){var se=$[oe];o(r,se)||n&&o(n,se)||ie(r,se,ne(i,se))}}},88538:(r,i,n)=>{var o=n(38986);r.exports=!o((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype}))},62753:(r,i,n)=>{var o=n(10798).IteratorPrototype,_=n(13250),j=n(71111),q=n(27747),$=n(13766),returnThis=function(){return this};r.exports=function(r,i,n,ie){var ne=i+" Iterator";return r.prototype=_(o,{next:j(+!ie,n)}),q(r,ne,!1,!0),$[ne]=returnThis,r}},22775:(r,i,n)=>{var o=n(12115),_=n(43087),j=n(71111);r.exports=o?function(r,i,n){return _.f(r,i,j(1,n))}:function(r,i,n){return r[i]=n,r}},71111:r=>{r.exports=function(r,i){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:i}}},19402:(r,i,n)=>{var o=n(79127),_=n(43087),j=n(71111);r.exports=function(r,i,n){var q=o(i);q in r?_.f(r,q,j(0,n)):r[q]=n}},92665:(r,i,n)=>{var o=n(54635),_=n(49425),j=n(68546),q=n(27765),$=n(34028),ie=n(62753),ne=n(75783),oe=n(25466),se=n(27747),le=n(22775),_e=n(5048),pe=n(30191),he=n(13766),me=n(10798),ge=q.PROPER,we=q.CONFIGURABLE,ve=me.IteratorPrototype,ye=me.BUGGY_SAFARI_ITERATORS,ke=pe("iterator"),Se="keys",Ae="values",Me="entries",returnThis=function(){return this};r.exports=function(r,i,n,q,pe,me,Te){ie(n,i,q);var Re,Be,Ne,getIterationMethod=function(r){if(r===pe&&Ve)return Ve;if(!ye&&r in Fe)return Fe[r];switch(r){case Se:return function keys(){return new n(this,r)};case Ae:return function values(){return new n(this,r)};case Me:return function entries(){return new n(this,r)}}return function(){return new n(this)}},Oe=i+" Iterator",je=!1,Fe=r.prototype,Ue=Fe[ke]||Fe["@@iterator"]||pe&&Fe[pe],Ve=!ye&&Ue||getIterationMethod(pe),We="Array"==i&&Fe.entries||Ue;if(We&&(Re=ne(We.call(new r)))!==Object.prototype&&Re.next&&(j||ne(Re)===ve||(oe?oe(Re,ve):$(Re[ke])||_e(Re,ke,returnThis)),se(Re,Oe,!0,!0),j&&(he[Oe]=returnThis)),ge&&pe==Ae&&Ue&&Ue.name!==Ae&&(!j&&we?le(Fe,"name",Ae):(je=!0,Ve=function values(){return _(Ue,this)})),pe)if(Be={values:getIterationMethod(Ae),keys:me?Ve:getIterationMethod(Se),entries:getIterationMethod(Me)},Te)for(Ne in Be)(ye||je||!(Ne in Fe))&&_e(Fe,Ne,Be[Ne]);else o({target:i,proto:!0,forced:ye||je},Be);return j&&!Te||Fe[ke]===Ve||_e(Fe,ke,Ve,{name:pe}),he[i]=Ve,Be}},12115:(r,i,n)=>{var o=n(38986);r.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},82985:(r,i,n)=>{var o=n(32022),_=n(51355),j=o.document,q=_(j)&&_(j.createElement);r.exports=function(r){return q?j.createElement(r):{}}},66910:r=>{r.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},73391:(r,i,n)=>{var o=n(82985)("span").classList,_=o&&o.constructor&&o.constructor.prototype;r.exports=_===Object.prototype?void 0:_},30727:(r,i,n)=>{var o=n(83155);r.exports=o("navigator","userAgent")||""},80714:(r,i,n)=>{var o,_,j=n(32022),q=n(30727),$=j.process,ie=j.Deno,ne=$&&$.versions||ie&&ie.version,oe=ne&&ne.v8;oe&&(_=(o=oe.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1])),!_&&q&&(!(o=q.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=q.match(/Chrome\/(\d+)/))&&(_=+o[1]),r.exports=_},36917:(r,i,n)=>{var o=n(32022),_=n(59913);r.exports=function(r,i){return _(o[r].prototype[i])}},26100:r=>{r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},54635:(r,i,n)=>{var o=n(32022),_=n(66213).f,j=n(22775),q=n(5048),$=n(33096),ie=n(74953),ne=n(77987);r.exports=function(r,i){var n,oe,se,le,_e,pe=r.target,he=r.global,me=r.stat;if(n=he?o:me?o[pe]||$(pe,{}):(o[pe]||{}).prototype)for(oe in i){if(le=i[oe],se=r.noTargetGet?(_e=_(n,oe))&&_e.value:n[oe],!ne(he?oe:pe+(me?".":"#")+oe,r.forced)&&void 0!==se){if(typeof le==typeof se)continue;ie(le,se)}(r.sham||se&&se.sham)&&j(le,"sham",!0),q(n,oe,le,r)}}},38986:r=>{r.exports=function(r){try{return!!r()}catch(i){return!0}}},47484:(r,i,n)=>{var o=n(32022),_=n(65351),j=n(84117),q=n(80391),$=o.TypeError,flattenIntoArray=function(r,i,n,o,ie,ne,oe,se){for(var le,_e,pe=ie,he=0,me=!!oe&&q(oe,se);he0&&_(le))_e=j(le),pe=flattenIntoArray(r,i,le,_e,pe,ne-1)-1;else{if(pe>=9007199254740991)throw $("Exceed the acceptable array length");r[pe]=le}pe++}he++}return pe};r.exports=flattenIntoArray},80391:(r,i,n)=>{var o=n(59913),_=n(86173),j=n(74959),q=o(o.bind);r.exports=function(r,i){return _(r),void 0===i?r:j?q(r,i):function(){return r.apply(i,arguments)}}},74959:(r,i,n)=>{var o=n(38986);r.exports=!o((function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")}))},49425:(r,i,n)=>{var o=n(74959),_=Function.prototype.call;r.exports=o?_.bind(_):function(){return _.apply(_,arguments)}},27765:(r,i,n)=>{var o=n(12115),_=n(98511),j=Function.prototype,q=o&&Object.getOwnPropertyDescriptor,$=_(j,"name"),ie=$&&"something"===function something(){}.name,ne=$&&(!o||o&&q(j,"name").configurable);r.exports={EXISTS:$,PROPER:ie,CONFIGURABLE:ne}},59913:(r,i,n)=>{var o=n(74959),_=Function.prototype,j=_.bind,q=_.call,$=o&&j.bind(q,q);r.exports=o?function(r){return r&&$(r)}:function(r){return r&&function(){return q.apply(r,arguments)}}},83155:(r,i,n)=>{var o=n(32022),_=n(34028),aFunction=function(r){return _(r)?r:void 0};r.exports=function(r,i){return arguments.length<2?aFunction(o[r]):o[r]&&o[r][i]}},6897:(r,i,n)=>{var o=n(82814),_=n(34040),j=n(13766),q=n(30191)("iterator");r.exports=function(r){if(null!=r)return _(r,q)||_(r,"@@iterator")||j[o(r)]}},32057:(r,i,n)=>{var o=n(32022),_=n(49425),j=n(86173),q=n(52546),$=n(84160),ie=n(6897),ne=o.TypeError;r.exports=function(r,i){var n=arguments.length<2?ie(r):i;if(j(n))return q(_(n,r));throw ne($(r)+" is not iterable")}},34040:(r,i,n)=>{var o=n(86173);r.exports=function(r,i){var n=r[i];return null==n?void 0:o(n)}},32022:(r,i,n)=>{var check=function(r){return r&&r.Math==Math&&r};r.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},98511:(r,i,n)=>{var o=n(59913),_=n(47137),j=o({}.hasOwnProperty);r.exports=Object.hasOwn||function hasOwn(r,i){return j(_(r),i)}},17307:r=>{r.exports={}},86419:(r,i,n)=>{var o=n(83155);r.exports=o("document","documentElement")},2159:(r,i,n)=>{var o=n(12115),_=n(38986),j=n(82985);r.exports=!o&&!_((function(){return 7!=Object.defineProperty(j("div"),"a",{get:function(){return 7}}).a}))},94032:(r,i,n)=>{var o=n(32022),_=n(59913),j=n(38986),q=n(39523),$=o.Object,ie=_("".split);r.exports=j((function(){return!$("z").propertyIsEnumerable(0)}))?function(r){return"String"==q(r)?ie(r,""):$(r)}:$},46169:(r,i,n)=>{var o=n(59913),_=n(34028),j=n(43349),q=o(Function.toString);_(j.inspectSource)||(j.inspectSource=function(r){return q(r)}),r.exports=j.inspectSource},78045:(r,i,n)=>{var o,_,j,q=n(26507),$=n(32022),ie=n(59913),ne=n(51355),oe=n(22775),se=n(98511),le=n(43349),_e=n(57186),pe=n(17307),he="Object already initialized",me=$.TypeError,ge=$.WeakMap;if(q||le.state){var we=le.state||(le.state=new ge),ve=ie(we.get),ye=ie(we.has),ke=ie(we.set);o=function(r,i){if(ye(we,r))throw new me(he);return i.facade=r,ke(we,r,i),i},_=function(r){return ve(we,r)||{}},j=function(r){return ye(we,r)}}else{var Se=_e("state");pe[Se]=!0,o=function(r,i){if(se(r,Se))throw new me(he);return i.facade=r,oe(r,Se,i),i},_=function(r){return se(r,Se)?r[Se]:{}},j=function(r){return se(r,Se)}}r.exports={set:o,get:_,has:j,enforce:function(r){return j(r)?_(r):o(r,{})},getterFor:function(r){return function(i){var n;if(!ne(i)||(n=_(i)).type!==r)throw me("Incompatible receiver, "+r+" required");return n}}}},65351:(r,i,n)=>{var o=n(39523);r.exports=Array.isArray||function isArray(r){return"Array"==o(r)}},34028:r=>{r.exports=function(r){return"function"==typeof r}},78449:(r,i,n)=>{var o=n(59913),_=n(38986),j=n(34028),q=n(82814),$=n(83155),ie=n(46169),noop=function(){},ne=[],oe=$("Reflect","construct"),se=/^\s*(?:class|function)\b/,le=o(se.exec),_e=!se.exec(noop),pe=function isConstructor(r){if(!j(r))return!1;try{return oe(noop,ne,r),!0}catch(i){return!1}},he=function isConstructor(r){if(!j(r))return!1;switch(q(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _e||!!le(se,ie(r))}catch(i){return!0}};he.sham=!0,r.exports=!oe||_((function(){var r;return pe(pe.call)||!pe(Object)||!pe((function(){r=!0}))||r}))?he:pe},77987:(r,i,n)=>{var o=n(38986),_=n(34028),j=/#|\.prototype\./,isForced=function(r,i){var n=$[q(r)];return n==ne||n!=ie&&(_(i)?o(i):!!i)},q=isForced.normalize=function(r){return String(r).replace(j,".").toLowerCase()},$=isForced.data={},ie=isForced.NATIVE="N",ne=isForced.POLYFILL="P";r.exports=isForced},51355:(r,i,n)=>{var o=n(34028);r.exports=function(r){return"object"==typeof r?null!==r:o(r)}},68546:r=>{r.exports=!1},24505:(r,i,n)=>{var o=n(32022),_=n(83155),j=n(34028),q=n(27357),$=n(78590),ie=o.Object;r.exports=$?function(r){return"symbol"==typeof r}:function(r){var i=_("Symbol");return j(i)&&q(i.prototype,ie(r))}},10798:(r,i,n)=>{var o,_,j,q=n(38986),$=n(34028),ie=n(13250),ne=n(75783),oe=n(5048),se=n(30191),le=n(68546),_e=se("iterator"),pe=!1;[].keys&&("next"in(j=[].keys())?(_=ne(ne(j)))!==Object.prototype&&(o=_):pe=!0),null==o||q((function(){var r={};return o[_e].call(r)!==r}))?o={}:le&&(o=ie(o)),$(o[_e])||oe(o,_e,(function(){return this})),r.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:pe}},13766:r=>{r.exports={}},84117:(r,i,n)=>{var o=n(9375);r.exports=function(r){return o(r.length)}},92113:(r,i,n)=>{var o=n(80714),_=n(38986);r.exports=!!Object.getOwnPropertySymbols&&!_((function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},45733:(r,i,n)=>{var o=n(38986),_=n(30191),j=n(68546),q=_("iterator");r.exports=!o((function(){var r=new URL("b?a=1&b=2&c=3","http://a"),i=r.searchParams,n="";return r.pathname="c%20d",i.forEach((function(r,o){i.delete("b"),n+=o+r})),j&&!r.toJSON||!i.sort||"http://a/c%20d?a=1&c=3"!==r.href||"3"!==i.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!i[q]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},26507:(r,i,n)=>{var o=n(32022),_=n(34028),j=n(46169),q=o.WeakMap;r.exports=_(q)&&/native code/.test(j(q))},13250:(r,i,n)=>{var o,_=n(52546),j=n(13330),q=n(26100),$=n(17307),ie=n(86419),ne=n(82985),oe=n(57186),se=oe("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(r){return"