(()=>{var Vd=Object.create;var qi=Object.defineProperty;var Fd=Object.getOwnPropertyDescriptor;var Kd=Object.getOwnPropertyNames;var Hd=Object.getPrototypeOf,Gd=Object.prototype.hasOwnProperty;var O=(e,t)=>()=>(e&&(t=e(e=0)),t);var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qd=(e,t)=>{for(var r in t)qi(e,r,{get:t[r],enumerable:!0})},Wd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Kd(t))!Gd.call(e,a)&&a!==r&&qi(e,a,{get:()=>t[a],enumerable:!(n=Fd(t,a))||n.enumerable});return e};var zd=(e,t,r)=>(r=e!=null?Vd(Hd(e)):{},Wd(t||!e||!e.__esModule?qi(r,"default",{value:e,enumerable:!0}):r,e));function Dn(e,t){return function(){return e.apply(t,arguments)}}var Wi=O(()=>{"use strict"});function Yd(e){return e!==null&&!Pn(e)&&e.constructor!==null&&!Pn(e.constructor)&&Rt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}function Xd(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&E0(e.buffer),t}function On(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),Zr(e))for(n=0,a=e.length;n0;)if(a=r[n],t===a.toLowerCase())return a;return null}function ji(){let{caseless:e}=A0(this)&&this||{},t={},r=(n,a)=>{let i=e&&I0(t,a)||a;_a(t[i])&&_a(n)?t[i]=ji(t[i],n):_a(n)?t[i]=ji({},n):Zr(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n{"use strict";Wi();({toString:jd}=Object.prototype),{getPrototypeOf:Yi}=Object,Ba=(e=>t=>{let r=jd.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Yt=e=>(e=e.toLowerCase(),t=>Ba(t)===e),Na=e=>t=>typeof t===e,{isArray:Zr}=Array,Pn=Na("undefined");E0=Yt("ArrayBuffer");Zd=Na("string"),Rt=Na("function"),w0=Na("number"),ka=e=>e!==null&&typeof e=="object",Qd=e=>e===!0||e===!1,_a=e=>{if(Ba(e)!=="object")return!1;let t=Yi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Jd=Yt("Date"),$d=Yt("File"),ep=Yt("Blob"),tp=Yt("FileList"),rp=e=>ka(e)&&Rt(e.pipe),np=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rt(e.append)&&((t=Ba(e))==="formdata"||t==="object"&&Rt(e.toString)&&e.toString()==="[object FormData]"))},ap=Yt("URLSearchParams"),ip=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");T0=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),A0=e=>!Pn(e)&&e!==T0;sp=(e,t,r,{allOwnKeys:n}={})=>(On(t,(a,i)=>{r&&Rt(a)?e[i]=Dn(a,r):e[i]=a},{allOwnKeys:n}),e),op=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),up=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},lp=(e,t,r,n)=>{let a,i,s,o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!n||n(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=r!==!1&&Yi(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},cp=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return n!==-1&&n===r},fp=e=>{if(!e)return null;if(Zr(e))return e;let t=e.length;if(!w0(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},dp=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Yi(Uint8Array)),pp=(e,t)=>{let n=(e&&e[Symbol.iterator]).call(e),a;for(;(a=n.next())&&!a.done;){let i=a.value;t.call(e,i[0],i[1])}},hp=(e,t)=>{let r,n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},mp=Yt("HTMLFormElement"),gp=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),x0=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),yp=Yt("RegExp"),R0=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};On(r,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(n[i]=s||a)}),Object.defineProperties(e,n)},vp=e=>{R0(e,(t,r)=>{if(Rt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=e[r];if(Rt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Cp=(e,t)=>{let r={},n=a=>{a.forEach(i=>{r[i]=!0})};return Zr(e)?n(e):n(String(e).split(t)),r},bp=()=>{},xp=(e,t)=>(e=+e,Number.isFinite(e)?e:t),zi="abcdefghijklmnopqrstuvwxyz",S0="0123456789",_0={DIGIT:S0,ALPHA:zi,ALPHA_DIGIT:zi+zi.toUpperCase()+S0},Sp=(e=16,t=_0.ALPHA_DIGIT)=>{let r="",{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};wp=e=>{let t=new Array(10),r=(n,a)=>{if(ka(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;let i=Zr(n)?[]:{};return On(n,(s,o)=>{let u=r(s,a+1);!Pn(u)&&(i[o]=u)}),t[a]=void 0,i}}return n};return r(e,0)},Ip=Yt("AsyncFunction"),Tp=e=>e&&(ka(e)||Rt(e))&&Rt(e.then)&&Rt(e.catch),A={isArray:Zr,isArrayBuffer:E0,isBuffer:Yd,isFormData:np,isArrayBufferView:Xd,isString:Zd,isNumber:w0,isBoolean:Qd,isObject:ka,isPlainObject:_a,isUndefined:Pn,isDate:Jd,isFile:$d,isBlob:ep,isRegExp:yp,isFunction:Rt,isStream:rp,isURLSearchParams:ap,isTypedArray:dp,isFileList:tp,forEach:On,merge:ji,extend:sp,trim:ip,stripBOM:op,inherits:up,toFlatObject:lp,kindOf:Ba,kindOfTest:Yt,endsWith:cp,toArray:fp,forEachEntry:pp,matchAll:hp,isHTMLForm:mp,hasOwnProperty:x0,hasOwnProp:x0,reduceDescriptors:R0,freezeMethods:vp,toObjectSet:Cp,toCamelCase:gp,noop:bp,toFiniteNumber:xp,findKey:I0,global:T0,isContextDefined:A0,ALPHABET:_0,generateString:Sp,isSpecCompliantForm:Ep,toJSONObject:wp,isAsyncFn:Ip,isThenable:Tp}});function Qr(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a)}var B0,N0,oe,ir=O(()=>{"use strict";je();A.inherits(Qr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:A.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});B0=Qr.prototype,N0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{N0[e]={value:e}});Object.defineProperties(Qr,N0);Object.defineProperty(B0,"isAxiosError",{value:!0});Qr.from=(e,t,r,n,a,i)=>{let s=Object.create(B0);return A.toFlatObject(e,s,function(u){return u!==Error.prototype},o=>o!=="isAxiosError"),Qr.call(s,e.message,t,r,n,a),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};oe=Qr});var La,Xi=O(()=>{La=null});function Zi(e){return A.isPlainObject(e)||A.isArray(e)}function L0(e){return A.endsWith(e,"[]")?e.slice(0,-2):e}function k0(e,t,r){return e?e.concat(t).map(function(a,i){return a=L0(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function Ap(e){return A.isArray(e)&&!e.some(Zi)}function _p(e,t,r){if(!A.isObject(e))throw new TypeError("target must be an object");t=t||new(La||FormData),r=A.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,C){return!A.isUndefined(C[h])});let n=r.metaTokens,a=r.visitor||c,i=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(t);if(!A.isFunction(a))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(A.isDate(p))return p.toISOString();if(!u&&A.isBlob(p))throw new oe("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(p)||A.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,h,C){let b=p;if(p&&!C&&typeof p=="object"){if(A.endsWith(h,"{}"))h=n?h:h.slice(0,-2),p=JSON.stringify(p);else if(A.isArray(p)&&Ap(p)||(A.isFileList(p)||A.endsWith(h,"[]"))&&(b=A.toArray(p)))return h=L0(h),b.forEach(function(S,_){!(A.isUndefined(S)||S===null)&&t.append(s===!0?k0([h],_,i):s===null?h:h+"[]",l(S))}),!1}return Zi(p)?!0:(t.append(k0(C,h,i),l(p)),!1)}let f=[],d=Object.assign(Rp,{defaultVisitor:c,convertValue:l,isVisitable:Zi});function m(p,h){if(!A.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(p),A.forEach(p,function(b,I){(!(A.isUndefined(b)||b===null)&&a.call(t,b,A.isString(I)?I.trim():I,h,d))===!0&&m(b,h?h.concat(I):[I])}),f.pop()}}if(!A.isObject(e))throw new TypeError("data must be an object");return m(e),t}var Rp,gr,Un=O(()=>{"use strict";je();ir();Xi();Rp=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});gr=_p});function D0(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function P0(e,t){this._pairs=[],e&&gr(e,this,t)}var O0,Da,Qi=O(()=>{"use strict";Un();O0=P0.prototype;O0.append=function(t,r){this._pairs.push([t,r])};O0.toString=function(t){let r=t?function(n){return t.call(this,n,D0)}:D0;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};Da=P0});function Bp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mn(e,t,r){if(!t)return e;let n=r&&r.encode||Bp,a=r&&r.serialize,i;if(a?i=a(t,r):i=A.isURLSearchParams(t)?t.toString():new Da(t,r).toString(n),i){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var Ji=O(()=>{"use strict";je();Qi()});var $i,es,U0=O(()=>{"use strict";je();$i=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){A.forEach(this.handlers,function(n){n!==null&&t(n)})}},es=$i});var Pa,ts=O(()=>{"use strict";Pa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}});var M0,V0=O(()=>{"use strict";Qi();M0=typeof URLSearchParams<"u"?URLSearchParams:Da});var F0,K0=O(()=>{"use strict";F0=typeof FormData<"u"?FormData:null});var H0,G0=O(()=>{"use strict";H0=typeof Blob<"u"?Blob:null});var q0,W0=O(()=>{V0();K0();G0();q0={isBrowser:!0,classes:{URLSearchParams:M0,FormData:F0,Blob:H0},protocols:["http","https","file","blob","url","data"]}});var rs={};qd(rs,{hasBrowserEnv:()=>z0,hasStandardBrowserEnv:()=>Np,hasStandardBrowserWebWorkerEnv:()=>kp});var z0,Np,kp,j0=O(()=>{z0=typeof window<"u"&&typeof document<"u",Np=(e=>z0&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),kp=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")()});var ct,Jr=O(()=>{W0();j0();ct={...rs,...q0}});function ns(e,t){return gr(e,new ct.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return ct.isNode&&A.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}var Y0=O(()=>{"use strict";je();Un();Jr()});function Lp(e){return A.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dp(e){let t={},r=Object.keys(e),n,a=r.length,i;for(n=0;n=r.length;return s=!s&&A.isArray(a)?a.length:s,u?(A.hasOwnProp(a,s)?a[s]=[a[s],n]:a[s]=n,!o):((!a[s]||!A.isObject(a[s]))&&(a[s]=[]),t(r,n,a[s],i)&&A.isArray(a[s])&&(a[s]=Dp(a[s])),!o)}if(A.isFormData(e)&&A.isFunction(e.entries)){let r={};return A.forEachEntry(e,(n,a)=>{t(Lp(n),a,r,0)}),r}return null}var Oa,as=O(()=>{"use strict";je();Oa=Pp});function Op(e,t,r){if(A.isString(e))try{return(t||JSON.parse)(e),A.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var is,$r,Ua=O(()=>{"use strict";je();ir();ts();Un();Y0();Jr();as();is={transitional:Pa,adapter:["xhr","http"],transformRequest:[function(t,r){let n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=A.isObject(t);if(i&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return a&&a?JSON.stringify(Oa(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ns(t,this.formSerializer).toString();if((o=A.isFileList(t))||n.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return gr(o?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),Op(t)):t}],transformResponse:[function(t){let r=this.transitional||is.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&A.isString(t)&&(n&&!this.responseType||a)){let s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(o){if(s)throw o.name==="SyntaxError"?oe.from(o,oe.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ct.classes.FormData,Blob:ct.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],e=>{is.headers[e]={}});$r=is});var Up,X0,Z0=O(()=>{"use strict";je();Up=A.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),X0=e=>{let t={},r,n,a;return e&&e.split(` `).forEach(function(s){a=s.indexOf(":"),r=s.substring(0,a).trim().toLowerCase(),n=s.substring(a+1).trim(),!(!r||t[r]&&Up[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t}});function Vn(e){return e&&String(e).trim().toLowerCase()}function Ma(e){return e===!1||e==null?e:A.isArray(e)?e.map(Ma):String(e)}function Mp(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}function ss(e,t,r,n,a){if(A.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!A.isString(t)){if(A.isString(n))return t.indexOf(n)!==-1;if(A.isRegExp(n))return n.test(t)}}function Fp(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Kp(e,t){let r=A.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,s){return this[n].call(this,t,a,i,s)},configurable:!0})})}var Q0,Vp,en,ft,Or=O(()=>{"use strict";je();Z0();Q0=Symbol("internals");Vp=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());en=class{constructor(t){t&&this.set(t)}set(t,r,n){let a=this;function i(o,u,l){let c=Vn(u);if(!c)throw new Error("header name must be a non-empty string");let f=A.findKey(a,c);(!f||a[f]===void 0||l===!0||l===void 0&&a[f]!==!1)&&(a[f||u]=Ma(o))}let s=(o,u)=>A.forEach(o,(l,c)=>i(l,c,u));return A.isPlainObject(t)||t instanceof this.constructor?s(t,r):A.isString(t)&&(t=t.trim())&&!Vp(t)?s(X0(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=Vn(t),t){let n=A.findKey(this,t);if(n){let a=this[n];if(!r)return a;if(r===!0)return Mp(a);if(A.isFunction(r))return r.call(this,a,n);if(A.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Vn(t),t){let n=A.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||ss(this,this[n],n,r)))}return!1}delete(t,r){let n=this,a=!1;function i(s){if(s=Vn(s),s){let o=A.findKey(n,s);o&&(!r||ss(n,n[o],o,r))&&(delete n[o],a=!0)}}return A.isArray(t)?t.forEach(i):i(t),a}clear(t){let r=Object.keys(this),n=r.length,a=!1;for(;n--;){let i=r[n];(!t||ss(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){let r=this,n={};return A.forEach(this,(a,i)=>{let s=A.findKey(n,i);if(s){r[s]=Ma(a),delete r[i];return}let o=t?Fp(i):String(i).trim();o!==i&&delete r[i],r[o]=Ma(a),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return A.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&A.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){let n=(this[Q0]=this[Q0]={accessors:{}}).accessors,a=this.prototype;function i(s){let o=Vn(s);n[o]||(Kp(a,s),n[o]=!0)}return A.isArray(t)?t.forEach(i):i(t),this}};en.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(en.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});A.freezeMethods(en);ft=en});function Fn(e,t){let r=this||$r,n=t||r,a=ft.from(n.headers),i=n.data;return A.forEach(e,function(o){i=o.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}var J0=O(()=>{"use strict";je();Ua();Or()});function Kn(e){return!!(e&&e.__CANCEL__)}var os=O(()=>{"use strict"});function $0(e,t,r){oe.call(this,e??"canceled",oe.ERR_CANCELED,t,r),this.name="CanceledError"}var yr,Hn=O(()=>{"use strict";ir();je();A.inherits($0,oe,{__CANCEL__:!0});yr=$0});function us(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new oe("Request failed with status code "+r.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}var eu=O(()=>{"use strict";ir()});var tu,ru=O(()=>{je();Jr();tu=ct.hasStandardBrowserEnv?{write(e,t,r,n,a,i){let s=[e+"="+encodeURIComponent(t)];A.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),A.isString(n)&&s.push("path="+n),A.isString(a)&&s.push("domain="+a),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}}});function ls(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}var nu=O(()=>{"use strict"});function cs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}var au=O(()=>{"use strict"});function Gn(e,t){return e&&!ls(t)?cs(e,t):t}var fs=O(()=>{"use strict";nu();au()});var iu,su=O(()=>{"use strict";je();Jr();iu=ct.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function a(i){let s=i;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(s){let o=A.isString(s)?a(s):s;return o.protocol===n.protocol&&o.host===n.host}}():function(){return function(){return!0}}()});function ds(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var ou=O(()=>{"use strict"});function Hp(e,t){e=e||10;let r=new Array(e),n=new Array(e),a=0,i=0,s;return t=t!==void 0?t:1e3,function(u){let l=Date.now(),c=n[i];s||(s=l),r[a]=u,n[a]=l;let f=i,d=0;for(;f!==a;)d+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),l-s{"use strict";uu=Hp});function cu(e,t){let r=0,n=uu(50,250);return a=>{let i=a.loaded,s=a.lengthComputable?a.total:void 0,o=i-r,u=n(o),l=i<=s;r=i;let c={loaded:i,total:s,progress:s?i/s:void 0,bytes:o,rate:u||void 0,estimated:u&&s&&l?(s-i)/u:void 0,event:a};c[t?"download":"upload"]=!0,e(c)}}var Gp,fu,du=O(()=>{"use strict";je();eu();ru();Ji();fs();su();ts();ir();Hn();ou();Jr();Or();lu();Gp=typeof XMLHttpRequest<"u",fu=Gp&&function(e){return new Promise(function(r,n){let a=e.data,i=ft.from(e.headers).normalize(),{responseType:s,withXSRFToken:o}=e,u;function l(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}let c;if(A.isFormData(a)){if(ct.hasStandardBrowserEnv||ct.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((c=i.getContentType())!==!1){let[h,...C]=c?c.split(";").map(b=>b.trim()).filter(Boolean):[];i.setContentType([h||"multipart/form-data",...C].join("; "))}}let f=new XMLHttpRequest;if(e.auth){let h=e.auth.username||"",C=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+C))}let d=Gn(e.baseURL,e.url);f.open(e.method.toUpperCase(),Mn(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function m(){if(!f)return;let h=ft.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),b={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:h,config:e,request:f};us(function(S){r(S),l()},function(S){n(S),l()},b),f=null}if("onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(m)},f.onabort=function(){f&&(n(new oe("Request aborted",oe.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new oe("Network Error",oe.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let C=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||Pa;e.timeoutErrorMessage&&(C=e.timeoutErrorMessage),n(new oe(C,b.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,f)),f=null},ct.hasStandardBrowserEnv&&(o&&A.isFunction(o)&&(o=o(e)),o||o!==!1&&iu(d))){let h=e.xsrfHeaderName&&e.xsrfCookieName&&tu.read(e.xsrfCookieName);h&&i.set(e.xsrfHeaderName,h)}a===void 0&&i.setContentType(null),"setRequestHeader"in f&&A.forEach(i.toJSON(),function(C,b){f.setRequestHeader(b,C)}),A.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),s&&s!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",cu(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",cu(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=h=>{f&&(n(!h||h.type?new yr(null,e,f):h),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));let p=ds(d);if(p&&ct.protocols.indexOf(p)===-1){n(new oe("Unsupported protocol "+p+":",oe.ERR_BAD_REQUEST,e));return}f.send(a||null)})}});var ps,pu,qp,Va,hs=O(()=>{je();Xi();du();ir();ps={http:La,xhr:fu};A.forEach(ps,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});pu=e=>`- ${e}`,qp=e=>A.isFunction(e)||e===null||e===!1,Va={getAdapter:e=>{e=A.isArray(e)?e:[e];let{length:t}=e,r,n,a={};for(let i=0;i`adapter ${o} `+(u===!1?"is not supported by the environment":"is not available in the build")),s=t?i.length>1?`since : `+i.map(pu).join(` `):" "+pu(i[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:ps}});function ms(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yr(null,e)}function Fa(e){return ms(e),e.headers=ft.from(e.headers),e.data=Fn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Va.getAdapter(e.adapter||$r.adapter)(e).then(function(n){return ms(e),n.data=Fn.call(e,e.transformResponse,n),n.headers=ft.from(n.headers),n},function(n){return Kn(n)||(ms(e),n&&n.response&&(n.response.data=Fn.call(e,e.transformResponse,n.response),n.response.headers=ft.from(n.response.headers))),Promise.reject(n)})}var hu=O(()=>{"use strict";J0();os();Ua();Hn();Or();hs()});function sr(e,t){t=t||{};let r={};function n(l,c,f){return A.isPlainObject(l)&&A.isPlainObject(c)?A.merge.call({caseless:f},l,c):A.isPlainObject(c)?A.merge({},c):A.isArray(c)?c.slice():c}function a(l,c,f){if(A.isUndefined(c)){if(!A.isUndefined(l))return n(void 0,l,f)}else return n(l,c,f)}function i(l,c){if(!A.isUndefined(c))return n(void 0,c)}function s(l,c){if(A.isUndefined(c)){if(!A.isUndefined(l))return n(void 0,l)}else return n(void 0,c)}function o(l,c,f){if(f in t)return n(l,c);if(f in e)return n(void 0,l)}let u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(l,c)=>a(mu(l),mu(c),!0)};return A.forEach(Object.keys(Object.assign({},e,t)),function(c){let f=u[c]||a,d=f(e[c],t[c],c);A.isUndefined(d)&&f!==o||(r[c]=d)}),r}var mu,gs=O(()=>{"use strict";je();Or();mu=e=>e instanceof ft?e.toJSON():e});var Ka,ys=O(()=>{Ka="1.6.2"});function Wp(e,t,r){if(typeof e!="object")throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),a=n.length;for(;a-- >0;){let i=n[a],s=t[i];if(s){let o=e[i],u=o===void 0||s(o,i,e);if(u!==!0)throw new oe("option "+i+" must be "+u,oe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new oe("Unknown option "+i,oe.ERR_BAD_OPTION)}}var vs,gu,Ha,yu=O(()=>{"use strict";ys();ir();vs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vs[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});gu={};vs.transitional=function(t,r,n){function a(i,s){return"[Axios v"+Ka+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,o)=>{if(t===!1)throw new oe(a(s," has been removed"+(r?" in "+r:"")),oe.ERR_DEPRECATED);return r&&!gu[s]&&(gu[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,o):!0}};Ha={assertOptions:Wp,validators:vs}});var vr,tn,qn,vu=O(()=>{"use strict";je();Ji();U0();hu();gs();fs();yu();Or();vr=Ha.validators,tn=class{constructor(t){this.defaults=t,this.interceptors={request:new es,response:new es}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=sr(this.defaults,r);let{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&Ha.assertOptions(n,{silentJSONParsing:vr.transitional(vr.boolean),forcedJSONParsing:vr.transitional(vr.boolean),clarifyTimeoutError:vr.transitional(vr.boolean)},!1),a!=null&&(A.isFunction(a)?r.paramsSerializer={serialize:a}:Ha.assertOptions(a,{encode:vr.function,serialize:vr.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&A.merge(i.common,i[r.method]);i&&A.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=ft.concat(s,i);let o=[],u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(u=u&&h.synchronous,o.unshift(h.fulfilled,h.rejected))});let l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let c,f=0,d;if(!u){let p=[Fa.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,l),d=p.length,c=Promise.resolve(r);f{"use strict";Hn();Wn=class{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});let n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i,s=new Promise(o=>{n.subscribe(o),i=o}).then(a);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,o){n.reason||(n.reason=new yr(i,s,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Wn(function(a){t=a}),cancel:t}}},Cu=Wn});function Cs(e){return function(r){return e.apply(null,r)}}var xu=O(()=>{"use strict"});function bs(e){return A.isObject(e)&&e.isAxiosError===!0}var Su=O(()=>{"use strict";je()});var xs,Eu,wu=O(()=>{xs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xs).forEach(([e,t])=>{xs[t]=e});Eu=xs});function Iu(e){let t=new qn(e),r=Dn(qn.prototype.request,t);return A.extend(r,qn.prototype,t,{allOwnKeys:!0}),A.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return Iu(sr(e,a))},r}var Ye,rn,Tu=O(()=>{"use strict";je();Wi();vu();gs();Ua();as();Hn();bu();os();ys();Un();ir();xu();Su();Or();hs();wu();Ye=Iu($r);Ye.Axios=qn;Ye.CanceledError=yr;Ye.CancelToken=Cu;Ye.isCancel=Kn;Ye.VERSION=Ka;Ye.toFormData=gr;Ye.AxiosError=oe;Ye.Cancel=Ye.CanceledError;Ye.all=function(t){return Promise.all(t)};Ye.spread=Cs;Ye.isAxiosError=bs;Ye.mergeConfig=sr;Ye.AxiosHeaders=ft;Ye.formToJSON=e=>Oa(A.isHTMLForm(e)?new FormData(e):e);Ye.getAdapter=Va.getAdapter;Ye.HttpStatusCode=Eu;Ye.default=Ye;rn=Ye});var nS,aS,iS,sS,oS,uS,lS,cS,fS,dS,pS,hS,mS,gS,yS,vS,Au=O(()=>{Tu();({Axios:nS,AxiosError:aS,CanceledError:iS,isCancel:sS,CancelToken:oS,VERSION:uS,all:lS,Cancel:cS,isAxiosError:fS,spread:dS,toFormData:pS,AxiosHeaders:hS,HttpStatusCode:mS,formToJSON:gS,getAdapter:yS,mergeConfig:vS}=rn)});var Ss,et,Ga=O(()=>{Ss=class{constructor(t=!1){this.debugMode=t}setDebugMode(t){this.debugMode=t}log(t,...r){this.debugMode&&console.log(`[LOG] ${t}`,...r)}debug(t,...r){this.debugMode&&console.log(`[DEBUG] ${t}`,...r)}info(t,...r){this.debugMode&&console.info(`[INFO] ${t}`,...r)}warn(t,...r){this.debugMode&&console.warn(`[WARN] ${t}`,...r)}error(t,...r){this.debugMode&&console.error(`[ERROR] ${t}`,...r)}},et=new Ss(!1)});function Ru(e){qa={...qa,...e},et.setDebugMode(qa?.debug===!0)}function Mt(){return qa}var qa,zn=O(()=>{Ga();qa={api:{},collector:{},dataCapture:{autoCapture:!1,consoleListener:!0,sessionReplay:{enabled:!1}},debug:!1}});var Cr,it,br=O(()=>{Cr=class{constructor(){this.errors=[]}static getInstance(){return Cr.instance||(Cr.instance=new Cr),Cr.instance}addError(t,r){this.errors.push({message:t,error:r})}getErrors(){return this.errors}},it=Cr.getInstance()});function Es(){if(!Wa&&(Wa=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wa))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wa(zp)}var Wa,zp,_u=O(()=>{zp=new Uint8Array(16)});function Bu(e,t=0){return(st[e[t+0]]+st[e[t+1]]+st[e[t+2]]+st[e[t+3]]+"-"+st[e[t+4]]+st[e[t+5]]+"-"+st[e[t+6]]+st[e[t+7]]+"-"+st[e[t+8]]+st[e[t+9]]+"-"+st[e[t+10]]+st[e[t+11]]+st[e[t+12]]+st[e[t+13]]+st[e[t+14]]+st[e[t+15]]).toLowerCase()}var st,Nu=O(()=>{st=[];for(let e=0;e<256;++e)st.push((e+256).toString(16).slice(1))});var jp,ws,ku=O(()=>{jp=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ws={randomUUID:jp}});function Yp(e,t,r){if(ws.randomUUID&&!t&&!e)return ws.randomUUID();e=e||{};let n=e.random||(e.rng||Es)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let a=0;a<16;++a)t[r+a]=n[a];return t}return Bu(n)}var nn,Lu=O(()=>{ku();_u();Nu();nn=Yp});var Du=O(()=>{Lu()});var Is,Xp,jn,Ts=O(()=>{Du();br();Is=class{constructor(t=30){this.requestId=nn();this.ttlInMinutes=t}clearSession(){localStorage.removeItem("session")}initializeSession(){try{let t=localStorage.getItem("session");if(t){let{sessionId:a,requestId:i,timestamp:s,identity:o}=JSON.parse(t),u=new Date().getTime();if(u-ss.id!==t),this.identities.push(a);let i=this.getSession();i.identity=this.identity,i.identities=this.identities,localStorage.setItem("session",JSON.stringify(i))}getIdentity(){return this.identity?this.identity:null}getIdentities(){return this.identities?this.identities:null}},Xp=new Is,jn=Xp});function Pu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");As(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Ou(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]{As=function(e,t){return As=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},As(e,t)};Yn=function(){return Yn=Object.assign||function(t){for(var r,n=1,a=arguments.length;n0){var n=e[r].toLowerCase();n!==e[r]?t+=" ".concat(n):t+=e[r]}else t+=e[r].toUpperCase();return t}function Zp(e,t){return function(r,n){return Object.prototype.hasOwnProperty.call(r,n)}(e,t)?e[t]:void 0}function bh(e,t){var r=[];return function(n,a){var i=5,s=(d=n,m=Qn([],d,!0),{current:function(){return m[0]},postpone:function(){var h=m.shift();h!==void 0&&m.push(h)},exclude:function(){m.shift()}}),o=(l=100,c=3e3,f=0,function(){return Math.random()*Math.min(c,l*Math.pow(2,f++))}),u=s.current(),l,c,f,d,m;if(u===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));var p=function(h,C){return a(h).catch(function(b){if(C+1>=i)throw b;(function(_){if(!(_ instanceof Error))return!1;var B=_.message;return B===_s||B===Ns})(b)?s.exclude():s.postpone();var I,S=s.current();if(S===void 0)throw b;return(I=o(),new Promise(function(_){return setTimeout(_,I)})).then(function(){return p(S,C+1)})})};return p(u,0)}(e,function(n){var a=new Date,i=function(o){return r.push({url:n,startedAt:a,finishedAt:new Date,error:o})},s=t(n);return s.then(function(){return i()},i),s}).then(function(n){return[n,r]})}function Sh(e){var t;e.scriptUrlPattern;var r=e.token,n=e.apiKey,a=n===void 0?r:n,i=Ou(e,["scriptUrlPattern","token","apiKey"]),s=(t=Zp(e,"scriptUrlPattern"))!==null&&t!==void 0?t:Vu,o=function(){var c=[],f=function(){c.push({time:new Date,state:document.visibilityState})},d=function(m,p,h,C){return m.addEventListener(p,h,C),function(){return m.removeEventListener(p,h,C)}}(document,"visibilitychange",f);return f(),[c,d]}(),u=o[0],l=o[1];return Promise.resolve().then(function(){if(!a||typeof a!="string")throw new Error(Bs);var c=function(f,d){return(Array.isArray(f)?f:[f]).map(function(m){return function(p,h){var C=encodeURIComponent;return p.replace(/<[^<>]+>/g,function(b){return b===""?"3":b===""?C(h):b===""?C(Ch):b})}(String(m),d)})}(s,a);return bh(c,Eh)}).catch(function(c){throw l(),function(f){return f instanceof Error&&f.message===Ns?new Error(ks):f}(c)}).then(function(c){var f=c[0],d=c[1];return l(),f.load(Yn(Yn({},i),{ldi:{attempts:d,visibilityStates:u}}))})}function Eh(e){return function(t,r,n,a){var i,s=document,o="securitypolicyviolation",u=function(c){var f=new URL(t,location.href),d=c.blockedURI;d!==f.href&&d!==f.protocol.slice(0,-1)&&d!==f.origin||(i=c,l())};s.addEventListener(o,u);var l=function(){return s.removeEventListener(o,u)};return a?.then(l,l),Promise.resolve().then(r).then(function(c){return l(),c},function(c){return new Promise(function(f){return setTimeout(f)}).then(function(){if(l(),i)return n(i);throw c})})}(e,function(){return function(t){return new Promise(function(r,n){var a=document.createElement("script"),i=function(){var o;return(o=a.parentNode)===null||o===void 0?void 0:o.removeChild(a)},s=document.head||document.getElementsByTagName("head")[0];a.onload=function(){i(),r()},a.onerror=function(){i(),n(new Error(ks))},a.async=!0,a.src=t,s.appendChild(a)})}(e)},function(){throw new Error(_s)}).then(wh)}function wh(){var e=window,t="__fpjs_p_l_b",r=e[t];if(function(n,a){var i,s=(i=Object.getOwnPropertyDescriptor)===null||i===void 0?void 0:i.call(Object,n,a);s?.configurable?delete n[a]:s&&!s.writable||(n[a]=void 0)}(e,t),typeof r?.load!="function")throw new Error(Ns);return r}var Qp,Jp,$p,eh,th,rh,_s,nh,ah,ih,sh,oh,uh,lh,Bs,Uu,Mu,ch,fh,dh,ph,hh,mh,gh,yh,vh,Ch,Ns,Vu,xh,ks,Fu,Ku=O(()=>{Rs();Qp={default:"endpoint"},Jp={default:"tlsEndpoint"},$p="Client timeout",eh="Network connection error",th="Network request aborted",rh="Response cannot be parsed",_s="Blocked by CSP",nh="The endpoint parameter is not a valid URL",ah=an("WrongRegion"),ih=an("SubscriptionNotActive"),sh=an("UnsupportedVersion"),oh=an("InstallationMethodRestricted"),uh=an("HostnameRestricted"),lh=an("IntegrationFailed"),Bs="API key required",Uu="API key not found",Mu="API key expired",ch="Request cannot be parsed",fh="Request failed",dh="Request failed to process",ph="Too many requests, rate limit exceeded",hh="Not available for this origin",mh="Not available with restricted header",gh=Bs,yh=Uu,vh=Mu,Ch="3.8.6",Ns="9319";Vu="https://fpnpmcdn.net/v//loader_v.js",xh=Vu,ks="Failed to load the JS script of the agent";Fu={load:Sh,defaultScriptUrlPattern:xh,ERROR_SCRIPT_LOAD_FAIL:ks,ERROR_API_KEY_EXPIRED:Mu,ERROR_API_KEY_INVALID:Uu,ERROR_API_KEY_MISSING:Bs,ERROR_BAD_REQUEST_FORMAT:ch,ERROR_BAD_RESPONSE_FORMAT:rh,ERROR_CLIENT_TIMEOUT:$p,ERROR_CSP_BLOCK:_s,ERROR_FORBIDDEN_ENDPOINT:uh,ERROR_FORBIDDEN_HEADER:mh,ERROR_FORBIDDEN_ORIGIN:hh,ERROR_GENERAL_SERVER_FAILURE:fh,ERROR_INSTALLATION_METHOD_RESTRICTED:oh,ERROR_INTEGRATION_FAILURE:lh,ERROR_INVALID_ENDPOINT:nh,ERROR_NETWORK_ABORT:th,ERROR_NETWORK_CONNECTION:eh,ERROR_RATE_LIMIT:ph,ERROR_SERVER_TIMEOUT:dh,ERROR_SUBSCRIPTION_NOT_ACTIVE:ih,ERROR_TOKEN_EXPIRED:vh,ERROR_TOKEN_INVALID:yh,ERROR_TOKEN_MISSING:gh,ERROR_UNSUPPORTED_VERSION:sh,ERROR_WRONG_REGION:ah,defaultEndpoint:Qp,defaultTlsEndpoint:Jp}});function ur(e,t,r,n){return new(r||(r=Promise))(function(a,i){function s(l){try{u(n.next(l))}catch(c){i(c)}}function o(l){try{u(n.throw(l))}catch(c){i(c)}}function u(l){var c;l.done?a(l.value):(c=l.value,c instanceof r?c:new r(function(f){f(c)})).then(s,o)}u((n=n.apply(e,t||[])).next())})}function lr(e,t){var r,n,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function o(u){return function(l){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(s=0)),s;)try{if(r=1,n&&(a=2&c[0]?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[2&c[0],a.value]),c[0]){case 0:case 1:a=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,n=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!((a=a.length>0&&a[a.length-1])||c[0]!==6&&c[0]!==2)){s=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]=a+r?(a=s,[4,ea(0)]):[3,3]):[3,4];case 2:o.sent(),o.label=3;case 3:return++i,[3,1];case 4:return[2,n]}})})}function $n(e){e.then(void 0,function(){})}function xr(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function _t(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function sn(e,t){return(t%=64)===32?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function It(e,t){return(t%=64)===0?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=Ue(e=_t(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=Ue(e=_t(e,[3301882366,444984403]),[0,e[0]>>>1])}function Ih(e,t){t=t||0;var r,n=(e=e||"").length%16,a=e.length-n,i=[0,t],s=[0,t],o=[0,0],u=[0,0],l=[2277735313,289559509],c=[1291169091,658871167];for(r=0;r>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}function Ls(e){return parseInt(e)}function Vt(e){return parseFloat(e)}function or(e,t){return typeof e=="number"&&isNaN(e)?t:e}function Ft(e){return e.reduce(function(t,r){return t+(r?1:0)},0)}function rl(e,t){if(t===void 0&&(t=1),Math.abs(t)>=1)return Math.round(e/t)*t;var r=1/t;return Math.round(e*r)/r}function Wu(e){return e&&typeof e=="object"&&"message"in e?e:{message:e}}function Th(e){return typeof e!="function"}function Ah(e,t,r){var n=Object.keys(e).filter(function(i){return!function(s,o){for(var u=0,l=s.length;u=4}function Rh(){var e=window,t=navigator;return Ft(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!nl()}function Fs(){var e=window,t=navigator;return Ft(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,t.vendor.indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function Jn(){var e=window,t=navigator;return Ft(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,t.vendor.indexOf("Apple")===0,"getStorageUpdates"in t,"WebKitMediaKeys"in e])>=4}function Ks(){var e=window;return Ft(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function _h(){var e,t,r=window;return Ft(["buildID"in navigator,"MozAppearance"in((t=(e=document.documentElement)===null||e===void 0?void 0:e.style)!==null&&t!==void 0?t:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4}function Bh(){var e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function al(){var e=Fs(),t=_h();if(!e&&!t)return!1;var r=window;return Ft(["onorientationchange"in r,"orientation"in r,e&&!("SharedWorker"in r),t&&/android/i.test(navigator.appVersion)])>=2}function zu(e){var t=new Error(e);return t.name=e,t}function ju(e,t,r){var n,a,i;return r===void 0&&(r=50),ur(this,void 0,void 0,function(){var s,o;return lr(this,function(u){switch(u.label){case 0:s=document,u.label=1;case 1:return s.body?[3,3]:[4,ea(r)];case 2:return u.sent(),[3,1];case 3:o=s.createElement("iframe"),u.label=4;case 4:return u.trys.push([4,,10,11]),[4,new Promise(function(l,c){var f=!1,d=function(){f=!0,l()};o.onload=d,o.onerror=function(h){f=!0,c(h)};var m=o.style;m.setProperty("display","block","important"),m.position="absolute",m.top="0",m.left="0",m.visibility="hidden",t&&"srcdoc"in o?o.srcdoc=t:o.src="about:blank",s.body.appendChild(o);var p=function(){var h,C;f||(((C=(h=o.contentWindow)===null||h===void 0?void 0:h.document)===null||C===void 0?void 0:C.readyState)==="complete"?d():setTimeout(p,10))};p()})];case 5:u.sent(),u.label=6;case 6:return!((a=(n=o.contentWindow)===null||n===void 0?void 0:n.document)===null||a===void 0)&&a.body?[3,8]:[4,ea(r)];case 7:return u.sent(),[3,6];case 8:return[4,e(o,o.contentWindow)];case 9:return[2,u.sent()];case 10:return(i=o.parentNode)===null||i===void 0||i.removeChild(o),[7];case 11:return[2]}})})}function Nh(e){for(var t=function(l){for(var c,f,d="Unexpected syntax '".concat(l,"'"),m=/^\s*([a-z-]*)(.*)$/i.exec(l),p=m[1]||void 0,h={},C=/([.:#][\w-]+|\[.+?\])/gi,b=function(B,N){h[B]=h[B]||[],h[B].push(N)};;){var I=C.exec(m[2]);if(!I)break;var S=I[0];switch(S[0]){case".":b("class",S.slice(1));break;case"#":b("id",S.slice(1));break;case"[":var _=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(S);if(!_)throw new Error(d);b(_[1],(f=(c=_[4])!==null&&c!==void 0?c:_[5])!==null&&f!==void 0?f:"");break;default:throw new Error(d)}}return[p,h]}(e),r=t[0],n=t[1],a=document.createElement(r??"div"),i=0,s=Object.keys(n);i{Vs=function(){return Vs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r.6*c.length})).sort(),[2,i]}var u})})},fontPreferences:function(){return function(e,t){return t===void 0&&(t=4e3),ju(function(r,n){var a=n.document,i=a.body,s=i.style;s.width="".concat(t,"px"),s.webkitTextSizeAdjust=s.textSizeAdjust="none",Fs()?i.style.zoom="".concat(1/n.devicePixelRatio):Jn()&&(i.style.zoom="reset");var o=a.createElement("div");return o.textContent=el([],Array(t/20<<0),!0).map(function(){return"word"}).join(" "),i.appendChild(o),e(a,i)},'')}(function(e,t){for(var r={},n={},a=0,i=Object.keys(Ms);a=3}())return-1;var r=new t(1,5e3,44100),n=r.createOscillator();n.type="triangle",n.frequency.value=1e4;var a=r.createDynamicsCompressor();a.threshold.value=-50,a.knee.value=40,a.ratio.value=12,a.attack.value=0,a.release.value=.25,n.connect(a),a.connect(r.destination),n.start(0);var i=function(l){var c=3,f=500,d=500,m=5e3,p=function(){};return[new Promise(function(h,C){var b=!1,I=0,S=0;l.oncomplete=function(N){return h(N.renderedBuffer)};var _=function(){setTimeout(function(){return C(zu("timeout"))},Math.min(d,S+m-Date.now()))},B=function(){try{var N=l.startRendering();switch(tl(N)&&$n(N),l.state){case"running":S=Date.now(),b&&_();break;case"suspended":document.hidden||I++,b&&I>=c?C(zu("suspended")):setTimeout(B,f)}}catch(G){C(G)}};B(),p=function(){b||(b=!0,S>0&&_())}}),p]}(r),s=i[0],o=i[1],u=s.then(function(l){return function(c){for(var f=0,d=0;d=3||r.push(t.languages);else if(typeof t.languages=="string"){var a=t.languages;a&&r.push(a.split(","))}return r},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return or(Vt(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,t=function(n){return or(Ls(n),null)},r=[t(e.width),t(e.height)];return r.sort().reverse(),r},hardwareConcurrency:function(){return or(Ls(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=(e=window.Intl)===null||e===void 0?void 0:e.DateTimeFormat;if(t){var r=new t().resolvedOptions().timeZone;if(r)return r}var n,a=(n=new Date().getFullYear(),-Math.max(Vt(new Date(n,0,1).getTimezoneOffset()),Vt(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(a>=0?"+":"").concat(Math.abs(a))},sessionStorage:function(){try{return!!window.sessionStorage}catch{return!0}},localStorage:function(){try{return!!window.localStorage}catch{return!0}},indexedDB:function(){if(!nl()&&!Rh())try{return!!window.indexedDB}catch{return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){var e=navigator.platform;return e==="MacIntel"&&Jn()&&!Ks()?function(){if(navigator.platform==="iPad")return!0;var t=screen,r=t.width/t.height;return Ft(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,r>.65&&r<1.53])>=2}()?"iPad":"iPhone":e},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],r=0;r{zn();Ku();ul();Ga();br();Sr=class{static async get(){try{let t=await Sr.getVisitorIdPro(),r=await Sr.getVisitorIdV3(),n=r?.visitorId||null,a=r?.components||void 0;return et.info(`Fp: v3=${n}, pro=${t}`),{visitorIdPro:t,visitorIdV3:n}}catch(t){return et.error("Could not get fp",t),{visitorIdPro:null,visitorIdV3:null}}}static async getVisitorIdPro(){try{let t=Mt().collector?.fingerprint?.fingerprintPro;if(t?.key&&t?.enabled)return(await(await Fu.load({apiKey:t?.key})).get()).visitorId||null}catch(t){it.addError("Could not get Fingerprint PRO ID",t)}return null}static async getVisitorIdV3(){try{return await(await ol.load()).get()}catch(t){it.addError("Could not get Fingerprint V3 ID",t)}return{visitorId:null,components:void 0}}}});var Hs,cl,fl=O(()=>{br();Hs=class{static async get(){try{let t=navigator?.languages||[],r=navigator?.language||t[0]||"";return t.length===0&&!r?(it.addError("No language information available",new Error("Browser language detection failed")),null):{supported:t,preferred:r}}catch(t){return it.addError("Language detection failed",t instanceof Error?t:new Error(String(t))),null}}},cl=Hs});var Gs,dl,pl=O(()=>{br();Gs=class{static async get(){try{let t=window.performance;if(!t)return null;let r=t.getEntriesByType("navigation")[0];return r?{pageLoad:r.loadEventEnd-r.startTime,domReady:r.domContentLoadedEventEnd-r.startTime,dns:r.domainLookupEnd-r.domainLookupStart,tcp:r.connectEnd-r.connectStart,ttfb:r.responseStart-r.requestStart}:null}catch(t){return it.addError("Performance inspection failed",t),null}}},dl=Gs});var xt,qs=O(()=>{xt=class{static sleep(t){return new Promise(r=>setTimeout(r,t))}static isConstantLike(t){return typeof t=="string"&&!t.match(/[^A-Z0-9_x]/)}static getConstantsFromPrototype(t){return Object.keys(t.__proto__).filter(xt.isConstantLike)}static recur(t,r=new WeakSet,n=!1){if(r.has(t))return{};try{r.add(t)}catch{}var a=n?[]:{};for(var i in t)try{let s;if(i==="enabledPlugin"||typeof t[i]=="function")continue;Array.isArray(t[i])?typeof t[i][0]=="object"?(s=xt.recur(t[i],r,!0),a[i]=s.length?s:t[i]):a[i]=t[i]:typeof t[i]=="object"?(s=xt.recur(t[i],r),Object.keys(s).length&&(a[i]=s)):n?a.push(t[i]):a[i]=t[i]}catch{}return a}static isValidUrlOrPath(t){try{if(!t)return!1;if(t.startsWith("/"))return!0;if(t.startsWith("http://")||t.startsWith("https://"))return new URL(t),!0}catch{return!1}return!1}static onRedirectPage(t){if(!xt.isValidUrlOrPath(t))return!1;var r=t===window.location.pathname;if(!r)try{r=new URL(t,window.location.origin).href===window.location.href}catch{}return r}}});var ta,hl=O(()=>{qs();ta=class{static async get(){let t=await xt.recur(window.screen),r=await xt.recur(window.visualViewport),n=["innerWidth","innerHeight","outerWidth","outerHeight","screenX","screenY","screenLeft","screenTop"],a={};n.forEach(u=>{if(u in window)try{a[u]=window[u]}catch{a[u]="error"}else a[u]=null});let i=window.screen.width,s=window.screen.height,o=window.devicePixelRatio;return a.widthRaw=i,a.heightRaw=s,a.width=Math.floor(o*i),a.height=Math.floor(o*s),{...t,...r,...a}}}});var ra,ml=O(()=>{ra=class{static async get(){return new Promise(t=>{let r=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date().getTimezoneOffset()/60;t({timezone:r,offset_hours:n})})}}});var Fh,ja,Ws=O(()=>{Fh="0.2.68/c19d4cde",ja=Fh});var te=Q((tE,gl)=>{gl.exports={options:{usePureJavaScript:!1}}});var Cl=Q((rE,vl)=>{var zs={};vl.exports=zs;var yl={};zs.encode=function(e,t,r){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(r!==void 0&&typeof r!="number")throw new TypeError('"maxline" must be a number.');var n="";if(!(e instanceof Uint8Array))n=Kh(e,t);else{var a=0,i=t.length,s=t.charAt(0),o=[0];for(a=0;a0;)o.push(l%i),l=l/i|0}for(a=0;e[a]===0&&a=0;--a)n+=t[o[a]]}if(r){var c=new RegExp(".{1,"+r+"}","g");n=n.match(c).join(`\r `)}return n};zs.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var r=yl[t];if(!r){r=yl[t]=[];for(var n=0;n>=8;for(;l>0;)s.push(l&255),l>>=8}for(var c=0;e[c]===i&&c0;)i.push(o%n),o=o/n|0}var u="";for(r=0;e.at(r)===0&&r=0;--r)u+=t[i[r]];return u}});var ye=Q((nE,El)=>{var bl=te(),xl=Cl(),w=El.exports=bl.util=bl.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){w.nextTick=process.nextTick,typeof setImmediate=="function"?w.setImmediate=setImmediate:w.setImmediate=w.nextTick;return}if(typeof setImmediate=="function"){w.setImmediate=function(){return setImmediate.apply(void 0,arguments)},w.nextTick=function(o){return setImmediate(o)};return}if(w.setImmediate=function(o){setTimeout(o,0)},typeof window<"u"&&typeof window.postMessage=="function"){let o=function(u){if(u.source===window&&u.data===e){u.stopPropagation();var l=t.slice();t.length=0,l.forEach(function(c){c()})}};var s=o,e="forge.setImmediate",t=[];w.setImmediate=function(u){t.push(u),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",o,!0)}if(typeof MutationObserver<"u"){var r=Date.now(),n=!0,a=document.createElement("div"),t=[];new MutationObserver(function(){var u=t.slice();t.length=0,u.forEach(function(l){l()})}).observe(a,{attributes:!0});var i=w.setImmediate;w.setImmediate=function(u){Date.now()-r>15?(r=Date.now(),i(u)):(t.push(u),t.length===1&&a.setAttribute("a",n=!n))}}w.nextTick=w.setImmediate})();w.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;w.globalScope=function(){return w.isNodejs?global:typeof self>"u"?window:self}();w.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};w.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer};w.isArrayBufferView=function(e){return e&&w.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function na(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}w.ByteBuffer=js;function js(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(w.isArrayBuffer(e)||w.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var r=0;rHh&&(this.data.substr(0,1),this._constructedStringLength=0)};w.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};w.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};w.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))};w.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)t&1&&(r+=e),t>>>=1,t>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this};w.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this};w.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(w.encodeUtf8(e))};w.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};w.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};w.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};w.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))};w.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))};w.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))};w.ByteStringBuffer.prototype.putInt=function(e,t){na(t);var r="";do t-=8,r+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(r)};w.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0);return t};w.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t};w.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};w.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};w.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};w.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this};w.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};w.ByteStringBuffer.prototype.copy=function(){var e=w.createBuffer(this.data);return e.read=this.read,e};w.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};w.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};w.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this};w.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t);return n.set(r),this.data=new DataView(n.buffer),this};w.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this};w.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this};w.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this};w.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this};w.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this};w.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this};w.DataBuffer.prototype.putInt=function(e,t){na(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this};w.DataBuffer.prototype.putSignedInt=function(e,t){return na(t),this.accommodate(t/8),e<0&&(e+=2<0);return t};w.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t};w.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};w.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};w.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)};w.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this};w.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};w.DataBuffer.prototype.copy=function(){return new w.DataBuffer(this)};w.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this};w.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};w.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this};w.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)t&1&&(r+=e),t>>>=1,t>0&&(e+=e);return r};w.xorBytes=function(e,t,r){for(var n="",a="",i="",s=0,o=0;r>0;--r,++s)a=e.charCodeAt(s)^t.charCodeAt(s),o>=10&&(n+=i,i="",o=0),i+=String.fromCharCode(a),++o;return n+=i,n};w.hexToBytes=function(e){var t="",r=0;for(e.length&!0&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var Er="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",wr=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],Sl="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";w.encode64=function(e,t){for(var r="",n="",a,i,s,o=0;o>2),r+=Er.charAt((a&3)<<4|i>>4),isNaN(i)?r+="==":(r+=Er.charAt((i&15)<<2|s>>6),r+=isNaN(s)?"=":Er.charAt(s&63)),t&&r.length>t&&(n+=r.substr(0,t)+`\r `,r=r.substr(t));return n+=r,n};w.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",r,n,a,i,s=0;s>4),a!==64&&(t+=String.fromCharCode((n&15)<<4|a>>2),i!==64&&(t+=String.fromCharCode((a&3)<<6|i)));return t};w.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};w.decodeUtf8=function(e){return decodeURIComponent(escape(e))};w.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:xl.encode,decode:xl.decode}};w.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)};w.binary.raw.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(e.length)),r=r||0;for(var a=r,i=0;i>2),r+=Er.charAt((a&3)<<4|i>>4),isNaN(i)?r+="==":(r+=Er.charAt((i&15)<<2|s>>6),r+=isNaN(s)?"=":Er.charAt(s&63)),t&&r.length>t&&(n+=r.substr(0,t)+`\r `,r=r.substr(t));return n+=r,n};w.binary.base64.decode=function(e,t,r){var n=t;n||(n=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=r||0;for(var a,i,s,o,u=0,l=r;u>4,s!==64&&(n[l++]=(i&15)<<4|s>>2,o!==64&&(n[l++]=(s&3)<<6|o));return t?l-r:n.subarray(0,l)};w.binary.base58.encode=function(e,t){return w.binary.baseN.encode(e,Sl,t)};w.binary.base58.decode=function(e,t){return w.binary.baseN.decode(e,Sl,t)};w.text={utf8:{},utf16:{}};w.text.utf8.encode=function(e,t,r){e=w.encodeUtf8(e);var n=t;n||(n=new Uint8Array(e.length)),r=r||0;for(var a=r,i=0;i"u"&&(r=["web","flash"]);var a,i=!1,s=null;for(var o in r){a=r[o];try{if(a==="flash"||a==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");n=e.apply(this,t),i=a==="flash"}(a==="web"||a==="both")&&(t[0]=localStorage,n=e.apply(this,t),i=!0)}catch(u){s=u}if(i)break}if(!i)throw s;return n};w.setItem=function(e,t,r,n,a){Ya(qh,arguments,a)};w.getItem=function(e,t,r,n){return Ya(Wh,arguments,n)};w.removeItem=function(e,t,r,n){Ya(zh,arguments,n)};w.clearItems=function(e,t,r){Ya(jh,arguments,r)};w.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0};w.format=function(e){for(var t=/%./g,r,n,a=0,i=[],s=0;r=t.exec(e);){n=e.substring(s,t.lastIndex-2),n.length>0&&i.push(n),s=t.lastIndex;var o=r[0][1];switch(o){case"s":case"o":a");break;case"%":i.push("%");break;default:i.push("<%"+o+"?>")}}return i.push(e.substring(s)),i.join("")};w.formatNumber=function(e,t,r,n){var a=e,i=isNaN(t=Math.abs(t))?2:t,s=r===void 0?",":r,o=n===void 0?".":n,u=a<0?"-":"",l=parseInt(a=Math.abs(+a||0).toFixed(i),10)+"",c=l.length>3?l.length%3:0;return u+(c?l.substr(0,c)+o:"")+l.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+o)+(i?s+Math.abs(a-l).toFixed(i).slice(2):"")};w.formatSize=function(e){return e>=1073741824?e=w.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=w.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=w.formatNumber(e/1024,0)+" KiB":e=w.formatNumber(e,0)+" bytes",e};w.bytesFromIP=function(e){return e.indexOf(".")!==-1?w.bytesFromIPv4(e):e.indexOf(":")!==-1?w.bytesFromIPv6(e):null};w.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=w.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1))}t.push(i)}if(r.length>0){var u=r[n];u.end-u.start>0&&(t.splice(u.start,u.end-u.start+1,""),u.start===0&&t.unshift(""),u.end===7&&t.push(""))}return t.join(":")};w.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in w&&!e.update)return t(null,w.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return w.cores=navigator.hardwareConcurrency,t(null,w.cores);if(typeof Worker>"u")return w.cores=1,t(null,w.cores);if(typeof Blob>"u")return w.cores=2,t(null,w.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(s){for(var o=Date.now(),u=o+4;Date.now()m.st&&c.stc.st&&m.st{var tt=te();ye();wl.exports=tt.cipher=tt.cipher||{};tt.cipher.algorithms=tt.cipher.algorithms||{};tt.cipher.createCipher=function(e,t){var r=e;if(typeof r=="string"&&(r=tt.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+e);return new tt.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})};tt.cipher.createDecipher=function(e,t){var r=e;if(typeof r=="string"&&(r=tt.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+e);return new tt.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})};tt.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),tt.cipher.algorithms[e]=t};tt.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in tt.cipher.algorithms?tt.cipher.algorithms[e]:null};var Zs=tt.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};Zs.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=tt.util.createBuffer(),this.output=e.output||tt.util.createBuffer(),this.mode.start(t)};Zs.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};Zs.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(r){return e(this.blockSize,r,!1)},this.mode.unpad=function(r){return e(this.blockSize,r,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))}});var Js=Q((iE,Il)=>{var rt=te();ye();rt.cipher=rt.cipher||{};var ue=Il.exports=rt.cipher.modes=rt.cipher.modes||{};ue.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};ue.ecb.prototype.start=function(e){};ue.ecb.prototype.encrypt=function(e,t,r){if(e.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return n>this.blockSize<<2?!1:(e.truncate(n),!0)};ue.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};ue.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=Za(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};ue.cbc.prototype.encrypt=function(e,t,r){if(e.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=e.length(),n=e.at(r-1);return n>this.blockSize<<2?!1:(e.truncate(n),!0)};ue.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=rt.util.createBuffer(),this._partialBytes=0};ue.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Za(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ue.cfb.prototype.encrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0)e.read-=this.blockSize;else for(var a=0;a0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};ue.cfb.prototype.decrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0)e.read-=this.blockSize;else for(var a=0;a0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};ue.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=rt.util.createBuffer(),this._partialBytes=0};ue.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Za(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ue.ofb.prototype.encrypt=function(e,t,r){var n=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0)e.read-=this.blockSize;else for(var a=0;a0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0};ue.ofb.prototype.decrypt=ue.ofb.prototype.encrypt;ue.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=rt.util.createBuffer(),this._partialBytes=0};ue.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Za(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};ue.ctr.prototype.encrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize)for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}Qa(this._inBlock)};ue.ctr.prototype.decrypt=ue.ctr.prototype.encrypt;ue.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=rt.util.createBuffer(),this._partialBytes=0,this._R=3774873600};ue.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=rt.util.createBuffer(e.iv);this._cipherLength=0;var r;if("additionalData"in e?r=rt.util.createBuffer(e.additionalData):r=rt.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=rt.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var n=t.length();if(n===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(Qs(n*8)))}this._inBlock=this._j0.slice(0),Qa(this._inBlock),this._partialBytes=0,r=rt.util.createBuffer(r),this._aDataLength=Qs(r.length()*8);var a=r.length()%this.blockSize;for(a&&r.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];r.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()])};ue.gcm.prototype.encrypt=function(e,t,r){var n=e.length();if(n===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&n>=this.blockSize){for(var a=0;a0&&(i=this.blockSize-i),this._partialOutput.clear();for(var a=0;a0&&this._partialOutput.getBytes(this._partialBytes),i>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=i,!0;t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),Qa(this._inBlock)};ue.gcm.prototype.decrypt=function(e,t,r){var n=e.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),Qa(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var a=0;a0;--n)t[n]=e[n]>>>1|(e[n-1]&1)<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)};ue.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=r/8|0,a=e[n]>>>(7-r%8)*4&15,i=this._m[r][a];t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t};ue.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)};ue.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,a=16*r,i=new Array(a),s=0;s>>1,a=new Array(r);a[n]=e.slice(0);for(var i=n>>>1;i>0;)this.pow(a[2*i],a[i]=[]),i>>=1;for(i=2;i4){var r=e;e=rt.util.createBuffer();for(var n=0;n{var Re=te();Xa();Js();ye();_l.exports=Re.aes=Re.aes||{};Re.aes.startEncrypting=function(e,t,r,n){var a=Ja({key:e,output:r,decrypt:!1,mode:n});return a.start(t),a};Re.aes.createEncryptionCipher=function(e,t){return Ja({key:e,output:null,decrypt:!1,mode:t})};Re.aes.startDecrypting=function(e,t,r,n){var a=Ja({key:e,output:r,decrypt:!0,mode:n});return a.start(t),a};Re.aes.createDecryptionCipher=function(e,t){return Ja({key:e,output:null,decrypt:!0,mode:t})};Re.aes.Algorithm=function(e,t){to||Al();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(n,a){return eo(r._w,n,a,!1)},decrypt:function(n,a){return eo(r._w,n,a,!0)}}}),r._init=!1};Re.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,r;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=Re.util.createBuffer(t);else if(Re.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){r=t,t=Re.util.createBuffer();for(var n=0;n>>2;for(var n=0;n>8^o&255^99,pt[r]=o,$s[o]=r,u=e[o],a=e[r],i=e[a],s=e[i],l=u<<24^o<<16^o<<8^(o^u),c=(a^i^s)<<24^(r^s)<<16^(r^i^s)<<8^(r^a^s);for(var f=0;f<4;++f)Ur[f][r]=l,Kt[f][o]=c,l=l<<24|l>>>8,c=c<<24|c>>>8;r===0?r=n=1:(r=a^e[e[e[a^s]]],n^=e[e[n]])}}function Rl(e,t){for(var r=e.slice(0),n,a=1,i=r.length,s=i+6+1,o=ln*s,u=i;u>>16&255]<<24^pt[n>>>8&255]<<16^pt[n&255]<<8^pt[n>>>24]^Tl[a]<<24,a++):i>6&&u%i===4&&(n=pt[n>>>24]<<24^pt[n>>>16&255]<<16^pt[n>>>8&255]<<8^pt[n&255]),r[u]=r[u-i]^n;if(t){var l,c=Kt[0],f=Kt[1],d=Kt[2],m=Kt[3],p=r.slice(0);o=r.length;for(var u=0,h=o-ln;u>>24]]^f[pt[l>>>16&255]]^d[pt[l>>>8&255]]^m[pt[l&255]];r=p}return r}function eo(e,t,r,n){var a=e.length/4-1,i,s,o,u,l;n?(i=Kt[0],s=Kt[1],o=Kt[2],u=Kt[3],l=$s):(i=Ur[0],s=Ur[1],o=Ur[2],u=Ur[3],l=pt);var c,f,d,m,p,h,C;c=t[0]^e[0],f=t[n?3:1]^e[1],d=t[2]^e[2],m=t[n?1:3]^e[3];for(var b=3,I=1;I>>24]^s[f>>>16&255]^o[d>>>8&255]^u[m&255]^e[++b],h=i[f>>>24]^s[d>>>16&255]^o[m>>>8&255]^u[c&255]^e[++b],C=i[d>>>24]^s[m>>>16&255]^o[c>>>8&255]^u[f&255]^e[++b],m=i[m>>>24]^s[c>>>16&255]^o[f>>>8&255]^u[d&255]^e[++b],c=p,f=h,d=C;r[0]=l[c>>>24]<<24^l[f>>>16&255]<<16^l[d>>>8&255]<<8^l[m&255]^e[++b],r[n?3:1]=l[f>>>24]<<24^l[d>>>16&255]<<16^l[m>>>8&255]<<8^l[c&255]^e[++b],r[2]=l[d>>>24]<<24^l[m>>>16&255]<<16^l[c>>>8&255]<<8^l[f&255]^e[++b],r[n?1:3]=l[m>>>24]<<24^l[c>>>16&255]<<16^l[f>>>8&255]<<8^l[d&255]^e[++b]}function Ja(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="AES-"+t,n;e.decrypt?n=Re.cipher.createDecipher(r,e.key):n=Re.cipher.createCipher(r,e.key);var a=n.start;return n.start=function(i,s){var o=null;s instanceof Re.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=i,a.call(n,s)},n}});var Tr=Q((oE,Bl)=>{var aa=te();aa.pki=aa.pki||{};var ro=Bl.exports=aa.pki.oids=aa.oids=aa.oids||{};function D(e,t){ro[e]=t,ro[t]=e}function Se(e,t){ro[e]=t}D("1.2.840.113549.1.1.1","rsaEncryption");D("1.2.840.113549.1.1.4","md5WithRSAEncryption");D("1.2.840.113549.1.1.5","sha1WithRSAEncryption");D("1.2.840.113549.1.1.7","RSAES-OAEP");D("1.2.840.113549.1.1.8","mgf1");D("1.2.840.113549.1.1.9","pSpecified");D("1.2.840.113549.1.1.10","RSASSA-PSS");D("1.2.840.113549.1.1.11","sha256WithRSAEncryption");D("1.2.840.113549.1.1.12","sha384WithRSAEncryption");D("1.2.840.113549.1.1.13","sha512WithRSAEncryption");D("1.3.101.112","EdDSA25519");D("1.2.840.10040.4.3","dsa-with-sha1");D("1.3.14.3.2.7","desCBC");D("1.3.14.3.2.26","sha1");D("1.3.14.3.2.29","sha1WithRSASignature");D("2.16.840.1.101.3.4.2.1","sha256");D("2.16.840.1.101.3.4.2.2","sha384");D("2.16.840.1.101.3.4.2.3","sha512");D("2.16.840.1.101.3.4.2.4","sha224");D("2.16.840.1.101.3.4.2.5","sha512-224");D("2.16.840.1.101.3.4.2.6","sha512-256");D("1.2.840.113549.2.2","md2");D("1.2.840.113549.2.5","md5");D("1.2.840.113549.1.7.1","data");D("1.2.840.113549.1.7.2","signedData");D("1.2.840.113549.1.7.3","envelopedData");D("1.2.840.113549.1.7.4","signedAndEnvelopedData");D("1.2.840.113549.1.7.5","digestedData");D("1.2.840.113549.1.7.6","encryptedData");D("1.2.840.113549.1.9.1","emailAddress");D("1.2.840.113549.1.9.2","unstructuredName");D("1.2.840.113549.1.9.3","contentType");D("1.2.840.113549.1.9.4","messageDigest");D("1.2.840.113549.1.9.5","signingTime");D("1.2.840.113549.1.9.6","counterSignature");D("1.2.840.113549.1.9.7","challengePassword");D("1.2.840.113549.1.9.8","unstructuredAddress");D("1.2.840.113549.1.9.14","extensionRequest");D("1.2.840.113549.1.9.20","friendlyName");D("1.2.840.113549.1.9.21","localKeyId");D("1.2.840.113549.1.9.22.1","x509Certificate");D("1.2.840.113549.1.12.10.1.1","keyBag");D("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");D("1.2.840.113549.1.12.10.1.3","certBag");D("1.2.840.113549.1.12.10.1.4","crlBag");D("1.2.840.113549.1.12.10.1.5","secretBag");D("1.2.840.113549.1.12.10.1.6","safeContentsBag");D("1.2.840.113549.1.5.13","pkcs5PBES2");D("1.2.840.113549.1.5.12","pkcs5PBKDF2");D("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");D("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");D("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");D("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");D("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");D("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");D("1.2.840.113549.2.7","hmacWithSHA1");D("1.2.840.113549.2.8","hmacWithSHA224");D("1.2.840.113549.2.9","hmacWithSHA256");D("1.2.840.113549.2.10","hmacWithSHA384");D("1.2.840.113549.2.11","hmacWithSHA512");D("1.2.840.113549.3.7","des-EDE3-CBC");D("2.16.840.1.101.3.4.1.2","aes128-CBC");D("2.16.840.1.101.3.4.1.22","aes192-CBC");D("2.16.840.1.101.3.4.1.42","aes256-CBC");D("2.5.4.3","commonName");D("2.5.4.4","surname");D("2.5.4.5","serialNumber");D("2.5.4.6","countryName");D("2.5.4.7","localityName");D("2.5.4.8","stateOrProvinceName");D("2.5.4.9","streetAddress");D("2.5.4.10","organizationName");D("2.5.4.11","organizationalUnitName");D("2.5.4.12","title");D("2.5.4.13","description");D("2.5.4.15","businessCategory");D("2.5.4.17","postalCode");D("2.5.4.42","givenName");D("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");D("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");D("2.16.840.1.113730.1.1","nsCertType");D("2.16.840.1.113730.1.13","nsComment");Se("2.5.29.1","authorityKeyIdentifier");Se("2.5.29.2","keyAttributes");Se("2.5.29.3","certificatePolicies");Se("2.5.29.4","keyUsageRestriction");Se("2.5.29.5","policyMapping");Se("2.5.29.6","subtreesConstraint");Se("2.5.29.7","subjectAltName");Se("2.5.29.8","issuerAltName");Se("2.5.29.9","subjectDirectoryAttributes");Se("2.5.29.10","basicConstraints");Se("2.5.29.11","nameConstraints");Se("2.5.29.12","policyConstraints");Se("2.5.29.13","basicConstraints");D("2.5.29.14","subjectKeyIdentifier");D("2.5.29.15","keyUsage");Se("2.5.29.16","privateKeyUsagePeriod");D("2.5.29.17","subjectAltName");D("2.5.29.18","issuerAltName");D("2.5.29.19","basicConstraints");Se("2.5.29.20","cRLNumber");Se("2.5.29.21","cRLReason");Se("2.5.29.22","expirationDate");Se("2.5.29.23","instructionCode");Se("2.5.29.24","invalidityDate");Se("2.5.29.25","cRLDistributionPoints");Se("2.5.29.26","issuingDistributionPoint");Se("2.5.29.27","deltaCRLIndicator");Se("2.5.29.28","issuingDistributionPoint");Se("2.5.29.29","certificateIssuer");Se("2.5.29.30","nameConstraints");D("2.5.29.31","cRLDistributionPoints");D("2.5.29.32","certificatePolicies");Se("2.5.29.33","policyMappings");Se("2.5.29.34","policyConstraints");D("2.5.29.35","authorityKeyIdentifier");Se("2.5.29.36","policyConstraints");D("2.5.29.37","extKeyUsage");Se("2.5.29.46","freshestCRL");Se("2.5.29.54","inhibitAnyPolicy");D("1.3.6.1.4.1.11129.2.4.2","timestampList");D("1.3.6.1.5.5.7.1.1","authorityInfoAccess");D("1.3.6.1.5.5.7.3.1","serverAuth");D("1.3.6.1.5.5.7.3.2","clientAuth");D("1.3.6.1.5.5.7.3.3","codeSigning");D("1.3.6.1.5.5.7.3.4","emailProtection");D("1.3.6.1.5.5.7.3.8","timeStamping")});var Ht=Q((uE,kl)=>{var Ne=te();ye();Tr();var V=kl.exports=Ne.asn1=Ne.asn1||{};V.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};V.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};V.create=function(e,t,r,n,a){if(Ne.util.isArray(n)){for(var i=[],s=0;st){var n=new Error("Too few bytes to parse DER.");throw n.available=e.length(),n.remaining=t,n.requested=r,n}}var Yh=function(e,t){var r=e.getByte();if(t--,r!==128){var n,a=r&128;if(!a)n=r;else{var i=r&127;ia(e,t,i),n=e.getInt(i<<3)}if(n<0)throw new Error("Negative length: "+n);return n}};V.fromDer=function(e,t){t===void 0&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof t=="boolean"&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),typeof e=="string"&&(e=Ne.util.createBuffer(e));var r=e.length(),n=$a(e,e.length(),0,t);if(t.parseAllBytes&&e.length()!==0){var a=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw a.byteCount=r,a.remaining=e.length(),a}return n};function $a(e,t,r,n){var a;ia(e,t,2);var i=e.getByte();t--;var s=i&192,o=i&31;a=e.length();var u=Yh(e,t);if(t-=a-e.length(),u!==void 0&&u>t){if(n.strict){var l=new Error("Too few bytes to read ASN.1 value.");throw l.available=e.length(),l.remaining=t,l.requested=u,l}u=t}var c,f,d=(i&32)===32;if(d)if(c=[],u===void 0)for(;;){if(ia(e,t,2),e.bytes(2)===String.fromCharCode(0,0)){e.getBytes(2),t-=2;break}a=e.length(),c.push($a(e,t,r+1,n)),t-=a-e.length()}else for(;u>0;)a=e.length(),c.push($a(e,u,r+1,n)),t-=a-e.length(),u-=a-e.length();if(c===void 0&&s===V.Class.UNIVERSAL&&o===V.Type.BITSTRING&&(f=e.bytes(u)),c===void 0&&n.decodeBitStrings&&s===V.Class.UNIVERSAL&&o===V.Type.BITSTRING&&u>1){var m=e.read,p=t,h=0;if(o===V.Type.BITSTRING&&(ia(e,t,1),h=e.getByte(),t--),h===0)try{a=e.length();var C={strict:!0,decodeBitStrings:!0},b=$a(e,t,r+1,C),I=a-e.length();t-=I,o==V.Type.BITSTRING&&I++;var S=b.tagClass;I===u&&(S===V.Class.UNIVERSAL||S===V.Class.CONTEXT_SPECIFIC)&&(c=[b])}catch{}c===void 0&&(e.read=m,t=p)}if(c===void 0){if(u===void 0){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");u=t}if(o===V.Type.BMPSTRING)for(c="";u>0;u-=2)ia(e,t,2),c+=String.fromCharCode(e.getInt16()),t-=2;else c=e.getBytes(u),t-=u}var _=f===void 0?null:{bitStringContents:f};return V.create(s,o,d,c,_)}V.toDer=function(e){var t=Ne.util.createBuffer(),r=e.tagClass|e.type,n=Ne.util.createBuffer(),a=!1;if("bitStringContents"in e&&(a=!0,e.original&&(a=V.equals(e,e.original))),a)n.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:n.putByte(0);for(var i=0;i1&&(e.value.charCodeAt(0)===0&&!(e.value.charCodeAt(1)&128)||e.value.charCodeAt(0)===255&&(e.value.charCodeAt(1)&128)===128)?n.putBytes(e.value.substr(1)):n.putBytes(e.value);if(t.putByte(r),n.length()<=127)t.putByte(n.length()&127);else{var s=n.length(),o="";do o+=String.fromCharCode(s&255),s=s>>>8;while(s>0);t.putByte(o.length|128);for(var i=o.length-1;i>=0;--i)t.putByte(o.charCodeAt(i))}return t.putBuffer(n),t};V.oidToDer=function(e){var t=e.split("."),r=Ne.util.createBuffer();r.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var n,a,i,s,o=2;o>>7,n||(s|=128),a.push(s),n=!1;while(i>0);for(var u=a.length-1;u>=0;--u)r.putByte(a[u])}return r};V.derToOid=function(e){var t;typeof e=="string"&&(e=Ne.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var n=0;e.length()>0;)r=e.getByte(),n=n<<7,r&128?n+=r&127:(t+="."+(n+r),n=0);return t};V.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(e.substr(2,2),10)-1,a=parseInt(e.substr(4,2),10),i=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),o=0;if(e.length>11){var u=e.charAt(10),l=10;u!=="+"&&u!=="-"&&(o=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(r,n,a),t.setUTCHours(i,s,o,0),l&&(u=e.charAt(l),u==="+"||u==="-")){var c=parseInt(e.substr(l+1,2),10),f=parseInt(e.substr(l+4,2),10),d=c*60+f;d*=6e4,u==="+"?t.setTime(+t-d):t.setTime(+t+d)}return t};V.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,a=parseInt(e.substr(6,2),10),i=parseInt(e.substr(8,2),10),s=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),u=0,l=0,c=!1;e.charAt(e.length-1)==="Z"&&(c=!0);var f=e.length-5,d=e.charAt(f);if(d==="+"||d==="-"){var m=parseInt(e.substr(f+1,2),10),p=parseInt(e.substr(f+4,2),10);l=m*60+p,l*=6e4,d==="+"&&(l*=-1),c=!0}return e.charAt(14)==="."&&(u=parseFloat(e.substr(14),10)*1e3),c?(t.setUTCFullYear(r,n,a),t.setUTCHours(i,s,o,u),t.setTime(+t+l)):(t.setFullYear(r,n,a),t.setHours(i,s,o,u)),t};V.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var n=0;n=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r};V.derToInteger=function(e){typeof e=="string"&&(e=Ne.util.createBuffer(e));var t=e.length()*8;if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)};V.validate=function(e,t,r,n){var a=!1;if((e.tagClass===t.tagClass||typeof t.tagClass>"u")&&(e.type===t.type||typeof t.type>"u"))if(e.constructed===t.constructed||typeof t.constructed>"u"){if(a=!0,t.value&&Ne.util.isArray(t.value))for(var i=0,s=0;a&&s0&&(n+=` `);for(var a="",i=0;i1?n+="0x"+Ne.util.bytesToHex(e.value.slice(1)):n+="(none)",e.value.length>0){var l=e.value.charCodeAt(0);l==1?n+=" (1 unused bit shown)":l>1&&(n+=" ("+l+" unused bits shown)")}}else if(e.type===V.Type.OCTETSTRING)Nl.test(e.value)||(n+="("+e.value+") "),n+="0x"+Ne.util.bytesToHex(e.value);else if(e.type===V.Type.UTF8)try{n+=Ne.util.decodeUtf8(e.value)}catch(c){if(c.message==="URI malformed")n+="0x"+Ne.util.bytesToHex(e.value)+" (malformed UTF8)";else throw c}else e.type===V.Type.PRINTABLESTRING||e.type===V.Type.IA5String?n+=e.value:Nl.test(e.value)?n+="0x"+Ne.util.bytesToHex(e.value):e.value.length===0?n+="[null]":n+=e.value}return n}});var Xt=Q((lE,Ll)=>{var ei=te();Ll.exports=ei.md=ei.md||{};ei.md.algorithms=ei.md.algorithms||{}});var fn=Q((cE,Dl)=>{var cr=te();Xt();ye();var Xh=Dl.exports=cr.hmac=cr.hmac||{};Xh.create=function(){var e=null,t=null,r=null,n=null,a={};return a.start=function(i,s){if(i!==null)if(typeof i=="string")if(i=i.toLowerCase(),i in cr.md.algorithms)t=cr.md.algorithms[i].create();else throw new Error('Unknown hash algorithm "'+i+'"');else t=i;if(s===null)s=e;else{if(typeof s=="string")s=cr.util.createBuffer(s);else if(cr.util.isArray(s)){var o=s;s=cr.util.createBuffer();for(var u=0;ut.blockLength&&(t.start(),t.update(s.bytes()),s=t.digest()),r=cr.util.createBuffer(),n=cr.util.createBuffer(),l=s.length();for(var u=0;u{var Zt=te();Xt();ye();var Ol=Ml.exports=Zt.md5=Zt.md5||{};Zt.md.md5=Zt.md.algorithms.md5=Ol;Ol.create=function(){Ul||Zh();var e=null,t=Zt.util.createBuffer(),r=new Array(16),n={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var a=n.messageLengthSize/4,i=0;i>>0,s>>>0];for(var o=n.fullMessageLength.length-1;o>=0;--o)n.fullMessageLength[o]+=s[1],s[1]=s[0]+(n.fullMessageLength[o]/4294967296>>>0),n.fullMessageLength[o]=n.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),Pl(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var a=Zt.util.createBuffer();a.putBytes(t.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,s=i&n.blockLength-1;a.putBytes(no.substr(0,n.blockLength-s));for(var o,u=0,l=n.fullMessageLength.length-1;l>=0;--l)o=n.fullMessageLength[l]*8+u,u=o/4294967296>>>0,a.putInt32Le(o>>>0);var c={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};Pl(c,r,a);var f=Zt.util.createBuffer();return f.putInt32Le(c.h0),f.putInt32Le(c.h1),f.putInt32Le(c.h2),f.putInt32Le(c.h3),f},n};var no=null,ti=null,sa=null,dn=null,Ul=!1;function Zh(){no=String.fromCharCode(128),no+=Zt.util.fillString(String.fromCharCode(0),64),ti=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],sa=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],dn=new Array(64);for(var e=0;e<64;++e)dn[e]=Math.floor(Math.abs(Math.sin(e+1))*4294967296);Ul=!0}function Pl(e,t,r){for(var n,a,i,s,o,u,l,c,f=r.length();f>=64;){for(a=e.h0,i=e.h1,s=e.h2,o=e.h3,c=0;c<16;++c)t[c]=r.getInt32Le(),u=o^i&(s^o),n=a+u+dn[c]+t[c],l=sa[c],a=o,o=s,s=i,i+=n<>>32-l;for(;c<32;++c)u=s^o&(i^s),n=a+u+dn[c]+t[ti[c]],l=sa[c],a=o,o=s,s=i,i+=n<>>32-l;for(;c<48;++c)u=i^s^o,n=a+u+dn[c]+t[ti[c]],l=sa[c],a=o,o=s,s=i,i+=n<>>32-l;for(;c<64;++c)u=s^(i|~o),n=a+u+dn[c]+t[ti[c]],l=sa[c],a=o,o=s,s=i,i+=n<>>32-l;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,f-=64}}});var Mr=Q((dE,Fl)=>{var ai=te();ye();var Vl=Fl.exports=ai.pem=ai.pem||{};Vl.encode=function(e,t){t=t||{};var r="-----BEGIN "+e.type+`-----\r `,n;if(e.procType&&(n={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]},r+=ni(n)),e.contentDomain&&(n={name:"Content-Domain",values:[e.contentDomain]},r+=ni(n)),e.dekInfo&&(n={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&n.values.push(e.dekInfo.parameters),r+=ni(n)),e.headers)for(var a=0;a65&&s!==-1){var o=t[s];o===","?(++s,t=t.substr(0,s)+`\r `+t.substr(s)):t=t.substr(0,s)+`\r `+o+t.substr(s+1),i=a-s-1,s=-1,++a}else(t[a]===" "||t[a]===" "||t[a]===",")&&(s=a);return t}function Qh(e){return e.replace(/^\s+/,"")}});var oa=Q((pE,Hl)=>{var Me=te();Xa();Js();ye();Hl.exports=Me.des=Me.des||{};Me.des.startEncrypting=function(e,t,r,n){var a=ii({key:e,output:r,decrypt:!1,mode:n||(t===null?"ECB":"CBC")});return a.start(t),a};Me.des.createEncryptionCipher=function(e,t){return ii({key:e,output:null,decrypt:!1,mode:t})};Me.des.startDecrypting=function(e,t,r,n){var a=ii({key:e,output:r,decrypt:!0,mode:n||(t===null?"ECB":"CBC")});return a.start(t),a};Me.des.createDecryptionCipher=function(e,t){return ii({key:e,output:null,decrypt:!0,mode:t})};Me.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(n,a){return Kl(r._keys,n,a,!1)},decrypt:function(n,a){return Kl(r._keys,n,a,!0)}}}),r._init=!1};Me.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=Me.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=sm(t),this._init=!0}};Qt("DES-ECB",Me.cipher.modes.ecb);Qt("DES-CBC",Me.cipher.modes.cbc);Qt("DES-CFB",Me.cipher.modes.cfb);Qt("DES-OFB",Me.cipher.modes.ofb);Qt("DES-CTR",Me.cipher.modes.ctr);Qt("3DES-ECB",Me.cipher.modes.ecb);Qt("3DES-CBC",Me.cipher.modes.cbc);Qt("3DES-CFB",Me.cipher.modes.cfb);Qt("3DES-OFB",Me.cipher.modes.ofb);Qt("3DES-CTR",Me.cipher.modes.ctr);function Qt(e,t){var r=function(){return new Me.des.Algorithm(e,t)};Me.cipher.registerAlgorithm(e,r)}var Jh=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],$h=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],em=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],tm=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],rm=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],nm=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],am=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],im=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function sm(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],n=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],a=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],i=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],s=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],o=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],u=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],c=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],f=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],m=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],p=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],h=e.length()>8?3:1,C=[],b=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],I=0,S,_=0;_>>4^N)&252645135,N^=S,B^=S<<4,S=(N>>>-16^B)&65535,B^=S,N^=S<<-16,S=(B>>>2^N)&858993459,N^=S,B^=S<<2,S=(N>>>-16^B)&65535,B^=S,N^=S<<-16,S=(B>>>1^N)&1431655765,N^=S,B^=S<<1,S=(N>>>8^B)&16711935,B^=S,N^=S<<8,S=(B>>>1^N)&1431655765,N^=S,B^=S<<1,S=B<<8|N>>>20&240,B=N<<24|N<<8&16711680|N>>>8&65280|N>>>24&240,N=S;for(var G=0;G>>26,N=N<<2|N>>>26):(B=B<<1|B>>>27,N=N<<1|N>>>27),B&=-15,N&=-15;var W=t[B>>>28]|r[B>>>24&15]|n[B>>>20&15]|a[B>>>16&15]|i[B>>>12&15]|s[B>>>8&15]|o[B>>>4&15],re=u[N>>>28]|l[N>>>24&15]|c[N>>>20&15]|f[N>>>16&15]|d[N>>>12&15]|m[N>>>8&15]|p[N>>>4&15];S=(re>>>16^W)&65535,C[I++]=W^S,C[I++]=re^S<<16}}return C}function Kl(e,t,r,n){var a=e.length===32?3:9,i;a===3?i=n?[30,-2,-2]:[0,32,2]:i=n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var s,o=t[0],u=t[1];s=(o>>>4^u)&252645135,u^=s,o^=s<<4,s=(o>>>16^u)&65535,u^=s,o^=s<<16,s=(u>>>2^o)&858993459,o^=s,u^=s<<2,s=(u>>>8^o)&16711935,o^=s,u^=s<<8,s=(o>>>1^u)&1431655765,u^=s,o^=s<<1,o=o<<1|o>>>31,u=u<<1|u>>>31;for(var l=0;l>>4|u<<28)^e[d+1];s=o,o=u,u=s^($h[m>>>24&63]|tm[m>>>16&63]|nm[m>>>8&63]|im[m&63]|Jh[p>>>24&63]|em[p>>>16&63]|rm[p>>>8&63]|am[p&63])}s=o,o=u,u=s}o=o>>>1|o<<31,u=u>>>1|u<<31,s=(o>>>1^u)&1431655765,u^=s,o^=s<<1,s=(u>>>8^o)&16711935,o^=s,u^=s<<8,s=(u>>>2^o)&858993459,o^=s,u^=s<<2,s=(o>>>16^u)&65535,u^=s,o^=s<<16,s=(o>>>4^u)&252645135,u^=s,o^=s<<4,r[0]=o,r[1]=u}function ii(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="DES-"+t,n;e.decrypt?n=Me.cipher.createDecipher(r,e.key):n=Me.cipher.createCipher(r,e.key);var a=n.start;return n.start=function(i,s){var o=null;s instanceof Me.util.ByteBuffer&&(o=s,s={}),s=s||{},s.output=o,s.iv=i,a.call(n,s)},n}});var si=Q(()=>{});var oi=Q((gE,Gl)=>{var ht=te();fn();Xt();ye();var om=ht.pkcs5=ht.pkcs5||{},fr;ht.util.isNodejs&&!ht.options.usePureJavaScript&&(fr=si());Gl.exports=ht.pbkdf2=om.pbkdf2=function(e,t,r,n,a,i){if(typeof a=="function"&&(i=a,a=null),ht.util.isNodejs&&!ht.options.usePureJavaScript&&fr.pbkdf2&&(a===null||typeof a!="object")&&(fr.pbkdf2Sync.length>4||!a||a==="sha1"))return typeof a!="string"&&(a="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),i?fr.pbkdf2Sync.length===4?fr.pbkdf2(e,t,r,n,function(S,_){if(S)return i(S);i(null,_.toString("binary"))}):fr.pbkdf2(e,t,r,n,a,function(S,_){if(S)return i(S);i(null,_.toString("binary"))}):fr.pbkdf2Sync.length===4?fr.pbkdf2Sync(e,t,r,n).toString("binary"):fr.pbkdf2Sync(e,t,r,n,a).toString("binary");if((typeof a>"u"||a===null)&&(a="sha1"),typeof a=="string"){if(!(a in ht.md.algorithms))throw new Error("Unknown hash algorithm: "+a);a=ht.md[a].create()}var s=a.digestLength;if(n>4294967295*s){var o=new Error("Derived key is too long.");if(i)return i(o);throw o}var u=Math.ceil(n/s),l=n-(u-1)*s,c=ht.hmac.create();c.start(a,e);var f="",d,m,p;if(!i){for(var h=1;h<=u;++h){c.start(null,null),c.update(t),c.update(ht.util.int32ToBytes(h)),d=p=c.digest().getBytes();for(var C=2;C<=r;++C)c.start(null,null),c.update(p),m=c.digest().getBytes(),d=ht.util.xorBytes(d,m,s),p=m;f+=hu)return i(null,f);c.start(null,null),c.update(t),c.update(ht.util.int32ToBytes(h)),d=p=c.digest().getBytes(),C=2,I()}function I(){if(C<=r)return c.start(null,null),c.update(p),m=c.digest().getBytes(),d=ht.util.xorBytes(d,m,s),p=m,++C,ht.util.setImmediate(I);f+=h{var Jt=te();Xt();ye();var Wl=Yl.exports=Jt.sha256=Jt.sha256||{};Jt.md.sha256=Jt.md.algorithms.sha256=Wl;Wl.create=function(){zl||um();var e=null,t=Jt.util.createBuffer(),r=new Array(64),n={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var a=n.messageLengthSize/4,i=0;i>>0,s>>>0];for(var o=n.fullMessageLength.length-1;o>=0;--o)n.fullMessageLength[o]+=s[1],s[1]=s[0]+(n.fullMessageLength[o]/4294967296>>>0),n.fullMessageLength[o]=n.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),ql(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var a=Jt.util.createBuffer();a.putBytes(t.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,s=i&n.blockLength-1;a.putBytes(ao.substr(0,n.blockLength-s));for(var o,u,l=n.fullMessageLength[0]*8,c=0;c>>0,l+=u,a.putInt32(l>>>0),l=o>>>0;a.putInt32(l);var f={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};ql(f,r,a);var d=Jt.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d.putInt32(f.h5),d.putInt32(f.h6),d.putInt32(f.h7),d},n};var ao=null,zl=!1,jl=null;function um(){ao=String.fromCharCode(128),ao+=Jt.util.fillString(String.fromCharCode(0),64),jl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],zl=!0}function ql(e,t,r){for(var n,a,i,s,o,u,l,c,f,d,m,p,h,C,b,I=r.length();I>=64;){for(l=0;l<16;++l)t[l]=r.getInt32();for(;l<64;++l)n=t[l-2],n=(n>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,a=t[l-15],a=(a>>>7|a<<25)^(a>>>18|a<<14)^a>>>3,t[l]=n+t[l-7]+a+t[l-16]|0;for(c=e.h0,f=e.h1,d=e.h2,m=e.h3,p=e.h4,h=e.h5,C=e.h6,b=e.h7,l=0;l<64;++l)s=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7),o=C^p&(h^C),i=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),u=c&f|d&(c^f),n=b+s+o+jl[l]+t[l],a=i+u,b=C,C=h,h=p,p=m+n>>>0,m=d,d=f,f=c,c=n+a>>>0;e.h0=e.h0+c|0,e.h1=e.h1+f|0,e.h2=e.h2+d|0,e.h3=e.h3+m|0,e.h4=e.h4+p|0,e.h5=e.h5+h|0,e.h6=e.h6+C|0,e.h7=e.h7+b|0,I-=64}}});var so=Q((vE,Xl)=>{var $t=te();ye();var ui=null;$t.util.isNodejs&&!$t.options.usePureJavaScript&&!process.versions["node-webkit"]&&(ui=si());var lm=Xl.exports=$t.prng=$t.prng||{};lm.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,n=new Array(32),a=0;a<32;++a)n[a]=r.create();t.pools=n,t.pool=0,t.generate=function(l,c){if(!c)return t.generateSync(l);var f=t.plugin.cipher,d=t.plugin.increment,m=t.plugin.formatKey,p=t.plugin.formatSeed,h=$t.util.createBuffer();t.key=null,C();function C(b){if(b)return c(b);if(h.length()>=l)return c(null,h.getBytes(l));if(t.generated>1048575&&(t.key=null),t.key===null)return $t.util.nextTick(function(){i(C)});var I=f(t.key,t.seed);t.generated+=I.length,h.putBytes(I),t.key=m(f(t.key,d(t.seed))),t.seed=p(f(t.key,t.seed)),$t.util.setImmediate(C)}},t.generateSync=function(l){var c=t.plugin.cipher,f=t.plugin.increment,d=t.plugin.formatKey,m=t.plugin.formatSeed;t.key=null;for(var p=$t.util.createBuffer();p.length()1048575&&(t.key=null),t.key===null&&s();var h=c(t.key,t.seed);t.generated+=h.length,p.putBytes(h),t.key=d(c(t.key,f(t.seed))),t.seed=m(c(t.key,t.seed))}return p.getBytes(l)};function i(l){if(t.pools[0].messageLength>=32)return o(),l();var c=32-t.pools[0].messageLength<<5;t.seedFile(c,function(f,d){if(f)return l(f);t.collect(d),o(),l()})}function s(){if(t.pools[0].messageLength>=32)return o();var l=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(l)),o()}function o(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var l=t.plugin.md.create();l.update(t.keyBytes);for(var c=1,f=0;f<32;++f)t.reseeds%c===0&&(l.update(t.pools[f].digest().getBytes()),t.pools[f].start()),c=c<<1;t.keyBytes=l.digest().getBytes(),l.start(),l.update(t.keyBytes);var d=l.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(d),t.generated=0}function u(l){var c=null,f=$t.util.globalScope,d=f.crypto||f.msCrypto;d&&d.getRandomValues&&(c=function(B){return d.getRandomValues(B)});var m=$t.util.createBuffer();if(c)for(;m.length()>16),I+=(b&32767)<<16,I+=b>>15,I=(I&2147483647)+(I>>31),_=I&4294967295;for(var C=0;C<3;++C)S=_>>>(C<<3),S^=Math.floor(Math.random()*256),m.putByte(S&255)}return m.getBytes(l)}return ui?(t.seedFile=function(l,c){ui.randomBytes(l,function(f,d){if(f)return c(f);c(null,d.toString())})},t.seedFileSync=function(l){return ui.randomBytes(l).toString()}):(t.seedFile=function(l,c){try{c(null,u(l))}catch(f){c(f)}},t.seedFileSync=u),t.collect=function(l){for(var c=l.length,f=0;f>d&255);t.collect(f)},t.registerWorker=function(l){if(l===self)t.seedFile=function(f,d){function m(p){var h=p.data;h.forge&&h.forge.prng&&(self.removeEventListener("message",m),d(h.forge.prng.err,h.forge.prng.bytes))}self.addEventListener("message",m),self.postMessage({forge:{prng:{needed:f}}})};else{var c=function(f){var d=f.data;d.forge&&d.forge.prng&&t.seedFile(d.forge.prng.needed,function(m,p){l.postMessage({forge:{prng:{err:m,bytes:p}}})})};l.addEventListener("message",c)}},t}});var Bt=Q((CE,oo)=>{var nt=te();Ir();io();so();ye();(function(){if(nt.random&&nt.random.getBytes){oo.exports=nt.random;return}(function(e){var t={},r=new Array(4),n=nt.util.createBuffer();t.formatKey=function(f){var d=nt.util.createBuffer(f);return f=new Array(4),f[0]=d.getInt32(),f[1]=d.getInt32(),f[2]=d.getInt32(),f[3]=d.getInt32(),nt.aes._expandKey(f,!1)},t.formatSeed=function(f){var d=nt.util.createBuffer(f);return f=new Array(4),f[0]=d.getInt32(),f[1]=d.getInt32(),f[2]=d.getInt32(),f[3]=d.getInt32(),f},t.cipher=function(f,d){return nt.aes._updateBlock(f,d,r,!1),n.putInt32(r[0]),n.putInt32(r[1]),n.putInt32(r[2]),n.putInt32(r[3]),n.getBytes()},t.increment=function(f){return++f[3],f},t.md=nt.md.sha256;function a(){var f=nt.prng.create(t);return f.getBytes=function(d,m){return f.generate(d,m)},f.getBytesSync=function(d){return f.generate(d)},f}var i=a(),s=null,o=nt.util.globalScope,u=o.crypto||o.msCrypto;if(u&&u.getRandomValues&&(s=function(f){return u.getRandomValues(f)}),nt.options.usePureJavaScript||!nt.util.isNodejs&&!s){if(typeof window>"u"||window.document,i.collectInt(+new Date,32),typeof navigator<"u"){var l="";for(var c in navigator)try{typeof navigator[c]=="string"&&(l+=navigator[c])}catch{}i.collect(l),l=null}e&&(e().mousemove(function(f){i.collectInt(f.clientX,16),i.collectInt(f.clientY,16)}),e().keypress(function(f){i.collectInt(f.charCode,8)}))}if(!nt.random)nt.random=i;else for(var c in i)nt.random[c]=i[c];nt.random.createInstance=a,oo.exports=nt.random})(typeof jQuery<"u"?jQuery:null)})()});var lo=Q((bE,Jl)=>{var St=te();ye();var uo=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],Zl=[1,2,3,5],cm=function(e,t){return e<>16-t},fm=function(e,t){return(e&65535)>>t|e<<16-t&65535};Jl.exports=St.rc2=St.rc2||{};St.rc2.expandKey=function(e,t){typeof e=="string"&&(e=St.util.createBuffer(e)),t=t||128;var r=e,n=e.length(),a=t,i=Math.ceil(a/8),s=255>>(a&7),o;for(o=n;o<128;o++)r.putByte(uo[r.at(o-1)+r.at(o-n)&255]);for(r.setAt(128-i,uo[r.at(128-i)&s]),o=127-i;o>=0;o--)r.setAt(o,uo[r.at(o+1)^r.at(o+i)]);return r};var Ql=function(e,t,r){var n=!1,a=null,i=null,s=null,o,u,l,c,f=[];for(e=St.rc2.expandKey(e,t),l=0;l<64;l++)f.push(e.getInt16Le());r?(o=function(p){for(l=0;l<4;l++)p[l]+=f[c]+(p[(l+3)%4]&p[(l+2)%4])+(~p[(l+3)%4]&p[(l+1)%4]),p[l]=cm(p[l],Zl[l]),c++},u=function(p){for(l=0;l<4;l++)p[l]+=f[p[(l+3)%4]&63]}):(o=function(p){for(l=3;l>=0;l--)p[l]=fm(p[l],Zl[l]),p[l]-=f[c]+(p[(l+3)%4]&p[(l+2)%4])+(~p[(l+3)%4]&p[(l+1)%4]),c--},u=function(p){for(l=3;l>=0;l--)p[l]-=f[p[(l+3)%4]&63]});var d=function(p){var h=[];for(l=0;l<4;l++){var C=a.getInt16Le();s!==null&&(r?C^=s.getInt16Le():s.putInt16Le(C)),h.push(C&65535)}c=r?0:63;for(var b=0;b=8;)d([[5,o],[1,u],[6,o],[1,u],[5,o]])},finish:function(p){var h=!0;if(r)if(p)h=p(8,a,!r);else{var C=a.length()===8?8:8-a.length();a.fillWithByte(C,C)}if(h&&(n=!0,m.update()),!r&&(h=a.length()===0,h))if(p)h=p(8,i,!r);else{var b=i.length(),I=i.at(b-1);I>b?h=!1:i.truncate(I)}return h}},m};St.rc2.startEncrypting=function(e,t,r){var n=St.rc2.createEncryptionCipher(e,128);return n.start(t,r),n};St.rc2.createEncryptionCipher=function(e,t){return Ql(e,t,!0)};St.rc2.startDecrypting=function(e,t,r){var n=St.rc2.createDecryptionCipher(e,128);return n.start(t,r),n};St.rc2.createDecryptionCipher=function(e,t){return Ql(e,t,!1)}});var la=Q((xE,sc)=>{var co=te();sc.exports=co.jsbn=co.jsbn||{};var dr,dm=0xdeadbeefcafe,$l=(dm&16777215)==15715070;function k(e,t,r){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}co.jsbn.BigInteger=k;function ve(){return new k(null)}function pm(e,t,r,n,a,i){for(;--i>=0;){var s=t*this.data[e++]+r.data[n]+a;a=Math.floor(s/67108864),r.data[n++]=s&67108863}return a}function hm(e,t,r,n,a,i){for(var s=t&32767,o=t>>15;--i>=0;){var u=this.data[e]&32767,l=this.data[e++]>>15,c=o*u+l*s;u=s*u+((c&32767)<<15)+r.data[n]+(a&1073741823),a=(u>>>30)+(c>>>15)+o*l+(a>>>30),r.data[n++]=u&1073741823}return a}function ec(e,t,r,n,a,i){for(var s=t&16383,o=t>>14;--i>=0;){var u=this.data[e]&16383,l=this.data[e++]>>14,c=o*u+l*s;u=s*u+((c&16383)<<14)+r.data[n]+a,a=(u>>28)+(c>>14)+o*l,r.data[n++]=u&268435455}return a}typeof navigator>"u"?(k.prototype.am=ec,dr=28):$l&&navigator.appName=="Microsoft Internet Explorer"?(k.prototype.am=hm,dr=30):$l&&navigator.appName!="Netscape"?(k.prototype.am=pm,dr=26):(k.prototype.am=ec,dr=28);k.prototype.DB=dr;k.prototype.DM=(1<=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function ym(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function Ar(e){var t=ve();return t.fromInt(e),t}function vm(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var n=e.length,a=!1,i=0;--n>=0;){var s=r==8?e[n]&255:rc(e,n);if(s<0){e.charAt(n)=="-"&&(a=!0);continue}a=!1,i==0?this.data[this.t++]=s:i+r>this.DB?(this.data[this.t-1]|=(s&(1<>this.DB-i):this.data[this.t-1]|=s<=this.DB&&(i-=this.DB)}r==8&&e[0]&128&&(this.s=-1,i>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t}function bm(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<0)for(o>o)>0&&(a=!0,i=tc(n));s>=0;)o>(o+=this.DB-t)):(n=this.data[s]>>(o-=t)&r,o<=0&&(o+=this.DB,--s)),n>0&&(a=!0),a&&(i+=tc(n));return a?i:"0"}function xm(){var e=ve();return k.ZERO.subTo(this,e),e}function Sm(){return this.s<0?this.negate():this}function Em(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this.data[r]-e.data[r])!=0)return t;return 0}function ci(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}function wm(){return this.t<=0?0:this.DB*(this.t-1)+ci(this.data[this.t-1]^this.s&this.DM)}function Im(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s}function Tm(e,t){for(var r=e;r=0;--o)t.data[o+i+1]=this.data[o]>>n|s,s=(this.data[o]&a)<=0;--o)t.data[o]=0;t.data[i]=s,t.t=this.t+i+1,t.s=this.s,t.clamp()}function Rm(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var n=e%this.DB,a=this.DB-n,i=(1<>n;for(var s=r+1;s>n;n>0&&(t.data[this.t-r-1]|=(this.s&i)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()}function Bm(e,t){var r=this.abs(),n=e.abs(),a=r.t;for(t.t=a+n.t;--a>=0;)t.data[a]=0;for(a=0;a=0;)e.data[r]=0;for(r=0;r=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()}function km(e,t,r){var n=e.abs();if(!(n.t<=0)){var a=this.abs();if(a.t0?(n.lShiftTo(u,i),a.lShiftTo(u,r)):(n.copyTo(i),a.copyTo(r));var l=i.t,c=i.data[l-1];if(c!=0){var f=c*(1<1?i.data[l-2]>>this.F2:0),d=this.FV/f,m=(1<=0&&(r.data[r.t++]=1,r.subTo(b,r)),k.ONE.dlShiftTo(l,b),b.subTo(i,i);i.t=0;){var I=r.data[--h]==c?this.DM:Math.floor(r.data[h]*d+(r.data[h-1]+p)*m);if((r.data[h]+=i.am(0,I,r,C,0,l))0&&r.rShiftTo(u,r),s<0&&k.ZERO.subTo(r,r)}}}function Lm(e){var t=ve();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(k.ZERO)>0&&e.subTo(t,t),t}function Vr(e){this.m=e}function Dm(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function Pm(e){return e}function Om(e){e.divRemTo(this.m,null,e)}function Um(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function Mm(e,t){e.squareTo(t),this.reduce(t)}Vr.prototype.convert=Dm;Vr.prototype.revert=Pm;Vr.prototype.reduce=Om;Vr.prototype.mulTo=Um;Vr.prototype.sqrTo=Mm;function Vm(){if(this.t<1)return 0;var e=this.data[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Fr(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(t,t),t}function Km(e){var t=ve();return e.copyTo(t),this.reduce(t),t}function Hm(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function Gm(e,t){e.squareTo(t),this.reduce(t)}function qm(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Fr.prototype.convert=Fm;Fr.prototype.revert=Km;Fr.prototype.reduce=Hm;Fr.prototype.mulTo=qm;Fr.prototype.sqrTo=Gm;function Wm(){return(this.t>0?this.data[0]&1:this.s)==0}function zm(e,t){if(e>4294967295||e<1)return k.ONE;var r=ve(),n=ve(),a=t.convert(this),i=ci(e)-1;for(a.copyTo(r);--i>=0;)if(t.sqrTo(r,n),(e&1<0)t.mulTo(n,a,r);else{var s=r;r=n,n=s}return t.revert(r)}function jm(e,t){var r;return e<256||t.isEven()?r=new Vr(t):r=new Fr(t),this.exp(e,r)}k.prototype.copyTo=gm;k.prototype.fromInt=ym;k.prototype.fromString=vm;k.prototype.clamp=Cm;k.prototype.dlShiftTo=Im;k.prototype.drShiftTo=Tm;k.prototype.lShiftTo=Am;k.prototype.rShiftTo=Rm;k.prototype.subTo=_m;k.prototype.multiplyTo=Bm;k.prototype.squareTo=Nm;k.prototype.divRemTo=km;k.prototype.invDigit=Vm;k.prototype.isEven=Wm;k.prototype.exp=zm;k.prototype.toString=bm;k.prototype.negate=xm;k.prototype.abs=Sm;k.prototype.compareTo=Em;k.prototype.bitLength=wm;k.prototype.mod=Lm;k.prototype.modPowInt=jm;k.ZERO=Ar(0);k.ONE=Ar(1);function Ym(){var e=ve();return this.copyTo(e),e}function Xm(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<>24}function Qm(){return this.t==0?this.s:this.data[0]<<16>>16}function Jm(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function $m(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function eg(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),n=Ar(r),a=ve(),i=ve(),s="";for(this.divRemTo(n,a,i);a.signum()>0;)s=(r+i.intValue()).toString(e).substr(1)+s,a.divRemTo(n,a,i);return i.intValue().toString(e)+s}function tg(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),n=Math.pow(t,r),a=!1,i=0,s=0,o=0;o=r&&(this.dMultiply(n),this.dAddOffset(s,0),i=0,s=0)}i>0&&(this.dMultiply(Math.pow(t,i)),this.dAddOffset(s,0)),a&&k.ZERO.subTo(this,this)}function rg(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(k.ONE.shiftLeft(e-1),po,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(k.ONE.shiftLeft(e-1),this);else{var n=new Array,a=e&7;n.length=(e>>3)+1,t.nextBytes(n),a>0?n[0]&=(1<0)for(r>r)!=(this.s&this.DM)>>r&&(t[a++]=n|this.s<=0;)r<8?(n=(this.data[e]&(1<>(r+=this.DB-8)):(n=this.data[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),n&128&&(n|=-256),a==0&&(this.s&128)!=(n&128)&&++a,(a>0||n!=this.s)&&(t[a++]=n);return t}function ag(e){return this.compareTo(e)==0}function ig(e){return this.compareTo(e)<0?this:e}function sg(e){return this.compareTo(e)>0?this:e}function og(e,t,r){var n,a,i=Math.min(e.t,this.t);for(n=0;n>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function yg(){for(var e=0;e=this.t?this.s!=0:(this.data[t]&1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()}function Tg(e){var t=ve();return this.addTo(e,t),t}function Ag(e){var t=ve();return this.subTo(e,t),t}function Rg(e){var t=ve();return this.multiplyTo(e,t),t}function _g(e){var t=ve();return this.divRemTo(e,t,null),t}function Bg(e){var t=ve();return this.divRemTo(e,null,t),t}function Ng(e){var t=ve(),r=ve();return this.divRemTo(e,t,r),new Array(t,r)}function kg(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function Lg(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function ua(){}function ic(e){return e}function Dg(e,t,r){e.multiplyTo(t,r)}function Pg(e,t){e.squareTo(t)}ua.prototype.convert=ic;ua.prototype.revert=ic;ua.prototype.mulTo=Dg;ua.prototype.sqrTo=Pg;function Og(e){return this.exp(e,new ua)}function Ug(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r.data[--n]=0;var a;for(a=r.t-this.t;n=0;)r.data[n]=0;for(n=Math.max(t-this.t,0);n2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=ve();return e.copyTo(t),this.reduce(t),t}function Fg(e){return e}function Kg(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function Hg(e,t){e.squareTo(t),this.reduce(t)}function Gg(e,t,r){e.multiplyTo(t,r),this.reduce(r)}hn.prototype.convert=Vg;hn.prototype.revert=Fg;hn.prototype.reduce=Kg;hn.prototype.mulTo=Gg;hn.prototype.sqrTo=Hg;function qg(e,t){var r=e.bitLength(),n,a=Ar(1),i;if(r<=0)return a;r<18?n=1:r<48?n=3:r<144?n=4:r<768?n=5:n=6,r<8?i=new Vr(t):t.isEven()?i=new hn(t):i=new Fr(t);var s=new Array,o=3,u=n-1,l=(1<1){var c=ve();for(i.sqrTo(s[1],c);o<=l;)s[o]=ve(),i.mulTo(c,s[o-2],s[o]),o+=2}var f=e.t-1,d,m=!0,p=ve(),h;for(r=ci(e.data[f])-1;f>=0;){for(r>=u?d=e.data[f]>>r-u&l:(d=(e.data[f]&(1<0&&(d|=e.data[f-1]>>this.DB+r-u)),o=n;!(d&1);)d>>=1,--o;if((r-=o)<0&&(r+=this.DB,--f),m)s[d].copyTo(a),m=!1;else{for(;o>1;)i.sqrTo(a,p),i.sqrTo(p,a),o-=2;o>0?i.sqrTo(a,p):(h=a,a=p,p=h),i.mulTo(p,s[d],a)}for(;f>=0&&!(e.data[f]&1<0&&(t.rShiftTo(i,t),r.rShiftTo(i,r));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=r.getLowestSetBit())>0&&r.rShiftTo(a,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return i>0&&r.lShiftTo(i,r),r}function zg(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this.data[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e;return r}function jg(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return k.ZERO;for(var r=e.clone(),n=this.clone(),a=Ar(1),i=Ar(0),s=Ar(0),o=Ar(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!a.isEven()||!i.isEven())&&(a.addTo(this,a),i.subTo(e,i)),a.rShiftTo(1,a)):i.isEven()||i.subTo(e,i),i.rShiftTo(1,i);for(;n.isEven();)n.rShiftTo(1,n),t?((!s.isEven()||!o.isEven())&&(s.addTo(this,s),o.subTo(e,o)),s.rShiftTo(1,s)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);r.compareTo(n)>=0?(r.subTo(n,r),t&&a.subTo(s,a),i.subTo(o,i)):(n.subTo(r,n),t&&s.subTo(a,s),o.subTo(i,o))}if(n.compareTo(k.ONE)!=0)return k.ZERO;if(o.compareTo(e)>=0)return o.subtract(e);if(o.signum()<0)o.addTo(e,o);else return o;return o.signum()<0?o.add(e):o}var Gt=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],Yg=(1<<26)/Gt[Gt.length-1];function Xg(e){var t,r=this.abs();if(r.t==1&&r.data[0]<=Gt[Gt.length-1]){for(t=0;t=0);var o=i.modPow(n,this);if(o.compareTo(k.ONE)!=0&&o.compareTo(t)!=0){for(var u=1;u++{var er=te();Xt();ye();var uc=cc.exports=er.sha1=er.sha1||{};er.md.sha1=er.md.algorithms.sha1=uc;uc.create=function(){lc||Jg();var e=null,t=er.util.createBuffer(),r=new Array(80),n={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return n.start=function(){n.messageLength=0,n.fullMessageLength=n.messageLength64=[];for(var a=n.messageLengthSize/4,i=0;i>>0,s>>>0];for(var o=n.fullMessageLength.length-1;o>=0;--o)n.fullMessageLength[o]+=s[1],s[1]=s[0]+(n.fullMessageLength[o]/4294967296>>>0),n.fullMessageLength[o]=n.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return t.putBytes(a),oc(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),n},n.digest=function(){var a=er.util.createBuffer();a.putBytes(t.bytes());var i=n.fullMessageLength[n.fullMessageLength.length-1]+n.messageLengthSize,s=i&n.blockLength-1;a.putBytes(ho.substr(0,n.blockLength-s));for(var o,u,l=n.fullMessageLength[0]*8,c=0;c>>0,l+=u,a.putInt32(l>>>0),l=o>>>0;a.putInt32(l);var f={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};oc(f,r,a);var d=er.util.createBuffer();return d.putInt32(f.h0),d.putInt32(f.h1),d.putInt32(f.h2),d.putInt32(f.h3),d.putInt32(f.h4),d},n};var ho=null,lc=!1;function Jg(){ho=String.fromCharCode(128),ho+=er.util.fillString(String.fromCharCode(0),64),lc=!0}function oc(e,t,r){for(var n,a,i,s,o,u,l,c,f=r.length();f>=64;){for(a=e.h0,i=e.h1,s=e.h2,o=e.h3,u=e.h4,c=0;c<16;++c)n=r.getInt32(),t[c]=n,l=o^i&(s^o),n=(a<<5|a>>>27)+l+u+1518500249+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<20;++c)n=t[c-3]^t[c-8]^t[c-14]^t[c-16],n=n<<1|n>>>31,t[c]=n,l=o^i&(s^o),n=(a<<5|a>>>27)+l+u+1518500249+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<32;++c)n=t[c-3]^t[c-8]^t[c-14]^t[c-16],n=n<<1|n>>>31,t[c]=n,l=i^s^o,n=(a<<5|a>>>27)+l+u+1859775393+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<40;++c)n=t[c-6]^t[c-16]^t[c-28]^t[c-32],n=n<<2|n>>>30,t[c]=n,l=i^s^o,n=(a<<5|a>>>27)+l+u+1859775393+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<60;++c)n=t[c-6]^t[c-16]^t[c-28]^t[c-32],n=n<<2|n>>>30,t[c]=n,l=i&s|o&(i^s),n=(a<<5|a>>>27)+l+u+2400959708+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;for(;c<80;++c)n=t[c-6]^t[c-16]^t[c-28]^t[c-32],n=n<<2|n>>>30,t[c]=n,l=i^s^o,n=(a<<5|a>>>27)+l+u+3395469782+n,u=o,o=s,s=(i<<30|i>>>2)>>>0,i=a,a=n;e.h0=e.h0+a|0,e.h1=e.h1+i|0,e.h2=e.h2+s|0,e.h3=e.h3+o|0,e.h4=e.h4+u|0,f-=64}}});var mo=Q((EE,dc)=>{var tr=te();ye();Bt();mn();var fc=dc.exports=tr.pkcs1=tr.pkcs1||{};fc.encode_rsa_oaep=function(e,t,r){var n,a,i,s;typeof r=="string"?(n=r,a=arguments[3]||void 0,i=arguments[4]||void 0):r&&(n=r.label||void 0,a=r.seed||void 0,i=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md)),i?i.start():i=tr.md.sha1.create(),s||(s=i);var o=Math.ceil(e.n.bitLength()/8),u=o-2*i.digestLength-2;if(t.length>u){var l=new Error("RSAES-OAEP input message length is too long.");throw l.length=t.length,l.maxLength=u,l}n||(n=""),i.update(n,"raw");for(var c=i.digest(),f="",d=u-t.length,m=0;m>24&255,i>>16&255,i>>8&255,i&255);r.start(),r.update(e+s),n+=r.digest().getBytes()}return n.substring(0,t)}});var yo=Q((wE,go)=>{var Rr=te();ye();la();Bt();(function(){if(Rr.prime){go.exports=Rr.prime;return}var e=go.exports=Rr.prime=Rr.prime||{},t=Rr.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],n=new t(null);n.fromInt(30);var a=function(f,d){return f|d};e.generateProbablePrime=function(f,d,m){typeof d=="function"&&(m=d,d={}),d=d||{};var p=d.algorithm||"PRIMEINC";typeof p=="string"&&(p={name:p}),p.options=p.options||{};var h=d.prng||Rr.random,C={nextBytes:function(b){for(var I=h.getBytesSync(b.length),S=0;Sd&&(f=l(d,m)),f.isProbablePrime(h))return b(null,f);f.dAddOffset(r[p++%8],0)}while(C<0||+new Date-I"u")return s(f,d,m,p);var h=l(f,d),C=m.workers,b=m.workLoad||100,I=b*30/8,S=m.workerScript||"forge/prime.worker.js";if(C===-1)return Rr.util.estimateCores(function(B,N){B&&(N=2),C=N-1,_()});_();function _(){C=Math.max(1,C);for(var B=[],N=0;Nf&&(h=l(f,d));var Ve=h.toString(16);ee.target.postMessage({hex:Ve,workLoad:b}),h.dAddOffset(I,0)}}}}function l(f,d){var m=new t(f,d),p=f-1;return m.testBit(p)||m.bitwiseTo(t.ONE.shiftLeft(p),a,m),m.dAddOffset(31-m.mod(n).byteValue(),0),m}function c(f){return f<=100?27:f<=150?18:f<=200?15:f<=250?12:f<=300?9:f<=350?8:f<=400?7:f<=500?6:f<=600?5:f<=800?4:f<=1250?3:2}})()});var ca=Q((IE,Cc)=>{var z=te();Ht();la();Tr();mo();yo();Bt();ye();typeof he>"u"&&(he=z.jsbn.BigInteger);var he,vo=z.util.isNodejs?si():null,T=z.asn1,kt=z.util;z.pki=z.pki||{};Cc.exports=z.pki.rsa=z.rsa=z.rsa||{};var J=z.pki,$g=[6,4,2,4,2,4,6,2],ey={name:"PrivateKeyInfo",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:T.Class.UNIVERSAL,type:T.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:T.Class.UNIVERSAL,type:T.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},ty={name:"RSAPrivateKey",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},ry={name:"RSAPublicKey",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:T.Class.UNIVERSAL,type:T.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},ny=z.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:T.Class.UNIVERSAL,type:T.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:T.Class.UNIVERSAL,type:T.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},ay={name:"DigestInfo",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:T.Class.UNIVERSAL,type:T.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:T.Class.UNIVERSAL,type:T.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:T.Class.UNIVERSAL,type:T.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:T.Class.UNIVERSAL,type:T.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},iy=function(e){var t;if(e.algorithm in J.oids)t=J.oids[e.algorithm];else{var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}var n=T.oidToDer(t).getBytes(),a=T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[]),i=T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[]);i.value.push(T.create(T.Class.UNIVERSAL,T.Type.OID,!1,n)),i.value.push(T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,""));var s=T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,e.digest().getBytes());return a.value.push(i),a.value.push(s),T.toDer(a).getBytes()},yc=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(he.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(he.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var n;do n=new he(z.util.bytesToHex(z.random.getBytes(t.n.bitLength()/8)),16);while(n.compareTo(t.n)>=0||!n.gcd(t.n).equals(he.ONE));e=e.multiply(n.modPow(t.e,t.n)).mod(t.n);for(var a=e.mod(t.p).modPow(t.dP,t.p),i=e.mod(t.q).modPow(t.dQ,t.q);a.compareTo(i)<0;)a=a.add(t.p);var s=a.subtract(i).multiply(t.qInv).mod(t.p).multiply(t.q).add(i);return s=s.multiply(n.modInverse(t.n)).mod(t.n),s};J.rsa.encrypt=function(e,t,r){var n=r,a,i=Math.ceil(t.n.bitLength()/8);r!==!1&&r!==!0?(n=r===2,a=vc(e,t,r)):(a=z.util.createBuffer(),a.putBytes(e));for(var s=new he(a.toHex(),16),o=yc(s,t,n),u=o.toString(16),l=z.util.createBuffer(),c=i-Math.ceil(u.length/2);c>0;)l.putByte(0),--c;return l.putBytes(z.util.hexToBytes(u)),l.getBytes()};J.rsa.decrypt=function(e,t,r,n){var a=Math.ceil(t.n.bitLength()/8);if(e.length!==a){var i=new Error("Encrypted message length is invalid.");throw i.length=e.length,i.expected=a,i}var s=new he(z.util.createBuffer(e).toHex(),16);if(s.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var o=yc(s,t,r),u=o.toString(16),l=z.util.createBuffer(),c=a-Math.ceil(u.length/2);c>0;)l.putByte(0),--c;return l.putBytes(z.util.hexToBytes(u)),n!==!1?di(l.getBytes(),t,r):l.getBytes()};J.rsa.createKeyPairGenerationState=function(e,t,r){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,r=r||{};var n=r.prng||z.random,a={nextBytes:function(o){for(var u=n.getBytesSync(o.length),l=0;l>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},s.e.fromInt(s.eInt);else throw new Error("Invalid key generation algorithm: "+i);return s};J.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new he(null);r.fromInt(30);for(var n=0,a=function(f,d){return f|d},i=+new Date,s,o=0;e.keys===null&&(t<=0||ou?e.pqState=0:e.num.isProbablePrime(oy(e.num.bitLength()))?++e.pqState:e.num.dAddOffset($g[n++%8],0):e.pqState===2?e.pqState=e.num.subtract(he.ONE).gcd(e.e).compareTo(he.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(he.ONE),e.q1=e.q.subtract(he.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(he.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var c=e.e.modInverse(e.phi);e.keys={privateKey:J.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:J.rsa.setPublicKey(e.n,e.e)}}s=+new Date,o+=s-i,i=s}return e.keys!==null};J.rsa.generateKeyPair=function(e,t,r,n){if(arguments.length===1?typeof e=="object"?(r=e,e=void 0):typeof e=="function"&&(n=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(n=t,t=void 0):typeof t!="number"&&(r=t,t=void 0):(r=e,n=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof r=="function"&&(n=r,r=void 0):(n=r,r=t,t=void 0)),r=r||{},e===void 0&&(e=r.bits||2048),t===void 0&&(t=r.e||65537),!z.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(n){if(pc("generateKeyPair"))return vo.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(o,u,l){if(o)return n(o);n(null,{privateKey:J.privateKeyFromPem(l),publicKey:J.publicKeyFromPem(u)})});if(hc("generateKey")&&hc("exportKey"))return kt.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:gc(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(o){return kt.globalScope.crypto.subtle.exportKey("pkcs8",o.privateKey)}).then(void 0,function(o){n(o)}).then(function(o){if(o){var u=J.privateKeyFromAsn1(T.fromDer(z.util.createBuffer(o)));n(null,{privateKey:u,publicKey:J.setRsaPublicKey(u.n,u.e)})}});if(mc("generateKey")&&mc("exportKey")){var a=kt.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:gc(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);a.oncomplete=function(o){var u=o.target.result,l=kt.globalScope.msCrypto.subtle.exportKey("pkcs8",u.privateKey);l.oncomplete=function(c){var f=c.target.result,d=J.privateKeyFromAsn1(T.fromDer(z.util.createBuffer(f)));n(null,{privateKey:d,publicKey:J.setRsaPublicKey(d.n,d.e)})},l.onerror=function(c){n(c)}},a.onerror=function(o){n(o)};return}}else if(pc("generateKeyPairSync")){var i=vo.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:J.privateKeyFromPem(i.privateKey),publicKey:J.publicKeyFromPem(i.publicKey)}}}var s=J.rsa.createKeyPairGenerationState(e,t,r);if(!n)return J.rsa.stepKeyPairGenerationState(s,0),s.keys;sy(s,r,n)};J.setRsaPublicKey=J.rsa.setPublicKey=function(e,t){var r={n:e,e:t};return r.encrypt=function(n,a,i){if(typeof a=="string"?a=a.toUpperCase():a===void 0&&(a="RSAES-PKCS1-V1_5"),a==="RSAES-PKCS1-V1_5")a={encode:function(o,u,l){return vc(o,u,2).getBytes()}};else if(a==="RSA-OAEP"||a==="RSAES-OAEP")a={encode:function(o,u){return z.pkcs1.encode_rsa_oaep(u,o,i)}};else if(["RAW","NONE","NULL",null].indexOf(a)!==-1)a={encode:function(o){return o}};else if(typeof a=="string")throw new Error('Unsupported encryption scheme: "'+a+'".');var s=a.encode(n,r,!0);return J.rsa.encrypt(s,r,!0)},r.verify=function(n,a,i,s){typeof i=="string"?i=i.toUpperCase():i===void 0&&(i="RSASSA-PKCS1-V1_5"),s===void 0&&(s={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in s||(s._parseAllDigestBytes=!0),i==="RSASSA-PKCS1-V1_5"?i={verify:function(u,l){l=di(l,r,!0);var c=T.fromDer(l,{parseAllBytes:s._parseAllDigestBytes}),f={},d=[];if(!T.validate(c,ay,f,d)){var m=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw m.errors=d,m}var p=T.derToOid(f.algorithmIdentifier);if(!(p===z.oids.md2||p===z.oids.md5||p===z.oids.sha1||p===z.oids.sha224||p===z.oids.sha256||p===z.oids.sha384||p===z.oids.sha512||p===z.oids["sha512-224"]||p===z.oids["sha512-256"])){var m=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw m.oid=p,m}if((p===z.oids.md2||p===z.oids.md5)&&!("parameters"in f))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifer NULL parameters.");return u===f.digest}}:(i==="NONE"||i==="NULL"||i===null)&&(i={verify:function(u,l){return l=di(l,r,!0),u===l}});var o=J.rsa.decrypt(a,r,!0,!1);return i.verify(n,o,r.n.bitLength())},r};J.setRsaPrivateKey=J.rsa.setPrivateKey=function(e,t,r,n,a,i,s,o){var u={n:e,e:t,d:r,p:n,q:a,dP:i,dQ:s,qInv:o};return u.decrypt=function(l,c,f){typeof c=="string"?c=c.toUpperCase():c===void 0&&(c="RSAES-PKCS1-V1_5");var d=J.rsa.decrypt(l,u,!1,!1);if(c==="RSAES-PKCS1-V1_5")c={decode:di};else if(c==="RSA-OAEP"||c==="RSAES-OAEP")c={decode:function(m,p){return z.pkcs1.decode_rsa_oaep(p,m,f)}};else if(["RAW","NONE","NULL",null].indexOf(c)!==-1)c={decode:function(m){return m}};else throw new Error('Unsupported encryption scheme: "'+c+'".');return c.decode(d,u,!1)},u.sign=function(l,c){var f=!1;typeof c=="string"&&(c=c.toUpperCase()),c===void 0||c==="RSASSA-PKCS1-V1_5"?(c={encode:iy},f=1):(c==="NONE"||c==="NULL"||c===null)&&(c={encode:function(){return l}},f=1);var d=c.encode(l,u.n.bitLength());return J.rsa.encrypt(d,u,f)},u};J.wrapRsaPrivateKey=function(e){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,T.integerToDer(0).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(J.oids.rsaEncryption).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,"")]),T.create(T.Class.UNIVERSAL,T.Type.OCTETSTRING,!1,T.toDer(e).getBytes())])};J.privateKeyFromAsn1=function(e){var t={},r=[];if(T.validate(e,ey,t,r)&&(e=T.fromDer(z.util.createBuffer(t.privateKey))),t={},r=[],!T.validate(e,ty,t,r)){var n=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw n.errors=r,n}var a,i,s,o,u,l,c,f;return a=z.util.createBuffer(t.privateKeyModulus).toHex(),i=z.util.createBuffer(t.privateKeyPublicExponent).toHex(),s=z.util.createBuffer(t.privateKeyPrivateExponent).toHex(),o=z.util.createBuffer(t.privateKeyPrime1).toHex(),u=z.util.createBuffer(t.privateKeyPrime2).toHex(),l=z.util.createBuffer(t.privateKeyExponent1).toHex(),c=z.util.createBuffer(t.privateKeyExponent2).toHex(),f=z.util.createBuffer(t.privateKeyCoefficient).toHex(),J.setRsaPrivateKey(new he(a,16),new he(i,16),new he(s,16),new he(o,16),new he(u,16),new he(l,16),new he(c,16),new he(f,16))};J.privateKeyToAsn1=J.privateKeyToRSAPrivateKey=function(e){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,T.integerToDer(0).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.n)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.e)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.d)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.p)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.q)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.dP)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.dQ)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.qInv))])};J.publicKeyFromAsn1=function(e){var t={},r=[];if(T.validate(e,ny,t,r)){var n=T.derToOid(t.publicKeyOid);if(n!==J.oids.rsaEncryption){var a=new Error("Cannot read public key. Unknown OID.");throw a.oid=n,a}e=t.rsaPublicKey}if(r=[],!T.validate(e,ry,t,r)){var a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw a.errors=r,a}var i=z.util.createBuffer(t.publicKeyModulus).toHex(),s=z.util.createBuffer(t.publicKeyExponent).toHex();return J.setRsaPublicKey(new he(i,16),new he(s,16))};J.publicKeyToAsn1=J.publicKeyToSubjectPublicKeyInfo=function(e){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.OID,!1,T.oidToDer(J.oids.rsaEncryption).getBytes()),T.create(T.Class.UNIVERSAL,T.Type.NULL,!1,"")]),T.create(T.Class.UNIVERSAL,T.Type.BITSTRING,!1,[J.publicKeyToRSAPublicKey(e)])])};J.publicKeyToRSAPublicKey=function(e){return T.create(T.Class.UNIVERSAL,T.Type.SEQUENCE,!0,[T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.n)),T.create(T.Class.UNIVERSAL,T.Type.INTEGER,!1,rr(e.e))])};function vc(e,t,r){var n=z.util.createBuffer(),a=Math.ceil(t.n.bitLength()/8);if(e.length>a-11){var i=new Error("Message is too long for PKCS#1 v1.5 padding.");throw i.length=e.length,i.max=a-11,i}n.putByte(0),n.putByte(r);var s=a-3-e.length,o;if(r===0||r===1){o=r===0?0:255;for(var u=0;u0;){for(var l=0,c=z.random.getBytes(s),u=0;u"u")throw new Error("Encryption block is invalid.");var u=0;if(o===0){u=a-3-n;for(var l=0;l1;){if(i.getByte()!==255){--i.read;break}++u}else if(o===2)for(u=0;i.length()>1;){if(i.getByte()===0){--i.read;break}++u}var c=i.getByte();if(c!==0||u!==a-3-i.length())throw new Error("Encryption block is invalid.");return i.getBytes()}function sy(e,t,r){typeof t=="function"&&(r=t,t={}),t=t||{};var n={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(n.prng=t.prng),a();function a(){i(e.pBits,function(o,u){if(o)return r(o);if(e.p=u,e.q!==null)return s(o,e.q);i(e.qBits,s)})}function i(o,u){z.prime.generateProbablePrime(o,n,u)}function s(o,u){if(o)return r(o);if(e.q=u,e.p.compareTo(e.q)<0){var l=e.p;e.p=e.q,e.q=l}if(e.p.subtract(he.ONE).gcd(e.e).compareTo(he.ONE)!==0){e.p=null,a();return}if(e.q.subtract(he.ONE).gcd(e.e).compareTo(he.ONE)!==0){e.q=null,i(e.qBits,s);return}if(e.p1=e.p.subtract(he.ONE),e.q1=e.q.subtract(he.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(he.ONE)!==0){e.p=e.q=null,a();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,i(e.qBits,s);return}var c=e.e.modInverse(e.phi);e.keys={privateKey:J.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:J.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}}function rr(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=z.util.hexToBytes(t);return r.length>1&&(r.charCodeAt(0)===0&&!(r.charCodeAt(1)&128)||r.charCodeAt(0)===255&&(r.charCodeAt(1)&128)===128)?r.substr(1):r}function oy(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function pc(e){return z.util.isNodejs&&typeof vo[e]=="function"}function hc(e){return typeof kt.globalScope<"u"&&typeof kt.globalScope.crypto=="object"&&typeof kt.globalScope.crypto.subtle=="object"&&typeof kt.globalScope.crypto.subtle[e]=="function"}function mc(e){return typeof kt.globalScope<"u"&&typeof kt.globalScope.msCrypto=="object"&&typeof kt.globalScope.msCrypto.subtle=="object"&&typeof kt.globalScope.msCrypto.subtle[e]=="function"}function gc(e){for(var t=z.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),n=0;n{var K=te();Ir();Ht();oa();Xt();Tr();oi();Mr();Bt();lo();ca();ye();typeof bc>"u"&&(bc=K.jsbn.BigInteger);var bc,R=K.asn1,$=K.pki=K.pki||{};wc.exports=$.pbe=K.pbe=K.pbe||{};var Kr=$.oids,uy={name:"EncryptedPrivateKeyInfo",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:R.Class.UNIVERSAL,type:R.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:R.Class.UNIVERSAL,type:R.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},ly={name:"PBES2Algorithms",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:R.Class.UNIVERSAL,type:R.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:R.Class.UNIVERSAL,type:R.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:R.Class.UNIVERSAL,type:R.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:R.Class.UNIVERSAL,type:R.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:R.Class.UNIVERSAL,type:R.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:R.Class.UNIVERSAL,type:R.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:R.Class.UNIVERSAL,type:R.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},cy={name:"pkcs-12PbeParams",tagClass:R.Class.UNIVERSAL,type:R.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:R.Class.UNIVERSAL,type:R.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:R.Class.UNIVERSAL,type:R.Type.INTEGER,constructed:!1,capture:"iterations"}]};$.encryptPrivateKeyInfo=function(e,t,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var n=K.random.getBytesSync(r.saltSize),a=r.count,i=R.integerToDer(a),s,o,u;if(r.algorithm.indexOf("aes")===0||r.algorithm==="des"){var l,c,f;switch(r.algorithm){case"aes128":s=16,l=16,c=Kr["aes128-CBC"],f=K.aes.createEncryptionCipher;break;case"aes192":s=24,l=16,c=Kr["aes192-CBC"],f=K.aes.createEncryptionCipher;break;case"aes256":s=32,l=16,c=Kr["aes256-CBC"],f=K.aes.createEncryptionCipher;break;case"des":s=8,l=8,c=Kr.desCBC,f=K.des.createEncryptionCipher;break;default:var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=r.algorithm,d}var m="hmacWith"+r.prfAlgorithm.toUpperCase(),p=Ec(m),h=K.pkcs5.pbkdf2(t,n,a,s,p),C=K.random.getBytesSync(l),b=f(h);b.start(C),b.update(R.toDer(e)),b.finish(),u=b.output.getBytes();var I=fy(n,i,s,m);o=R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OID,!1,R.oidToDer(Kr.pkcs5PBES2).getBytes()),R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OID,!1,R.oidToDer(Kr.pkcs5PBKDF2).getBytes()),I]),R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OID,!1,R.oidToDer(c).getBytes()),R.create(R.Class.UNIVERSAL,R.Type.OCTETSTRING,!1,C)])])])}else if(r.algorithm==="3des"){s=24;var S=new K.util.ByteBuffer(n),h=$.pbe.generatePkcs12Key(t,S,1,a,s),C=$.pbe.generatePkcs12Key(t,S,2,a,s),b=K.des.createEncryptionCipher(h);b.start(C),b.update(R.toDer(e)),b.finish(),u=b.output.getBytes(),o=R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OID,!1,R.oidToDer(Kr["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[R.create(R.Class.UNIVERSAL,R.Type.OCTETSTRING,!1,n),R.create(R.Class.UNIVERSAL,R.Type.INTEGER,!1,i.getBytes())])])}else{var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=r.algorithm,d}var _=R.create(R.Class.UNIVERSAL,R.Type.SEQUENCE,!0,[o,R.create(R.Class.UNIVERSAL,R.Type.OCTETSTRING,!1,u)]);return _};$.decryptPrivateKeyInfo=function(e,t){var r=null,n={},a=[];if(!R.validate(e,uy,n,a)){var i=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}var s=R.derToOid(n.encryptionOid),o=$.pbe.getCipher(s,n.encryptionParams,t),u=K.util.createBuffer(n.encryptedData);return o.update(u),o.finish()&&(r=R.fromDer(o.output)),r};$.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:R.toDer(e).getBytes()};return K.pem.encode(r,{maxline:t})};$.encryptedPrivateKeyFromPem=function(e){var t=K.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return R.fromDer(t.body)};$.encryptRsaPrivateKey=function(e,t,r){if(r=r||{},!r.legacy){var n=$.wrapRsaPrivateKey($.privateKeyToAsn1(e));return n=$.encryptPrivateKeyInfo(n,t,r),$.encryptedPrivateKeyToPem(n)}var a,i,s,o;switch(r.algorithm){case"aes128":a="AES-128-CBC",s=16,i=K.random.getBytesSync(16),o=K.aes.createEncryptionCipher;break;case"aes192":a="AES-192-CBC",s=24,i=K.random.getBytesSync(16),o=K.aes.createEncryptionCipher;break;case"aes256":a="AES-256-CBC",s=32,i=K.random.getBytesSync(16),o=K.aes.createEncryptionCipher;break;case"3des":a="DES-EDE3-CBC",s=24,i=K.random.getBytesSync(8),o=K.des.createEncryptionCipher;break;case"des":a="DES-CBC",s=8,i=K.random.getBytesSync(8),o=K.des.createEncryptionCipher;break;default:var u=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw u.algorithm=r.algorithm,u}var l=K.pbe.opensslDeriveBytes(t,i.substr(0,8),s),c=o(l);c.start(i),c.update(R.toDer($.privateKeyToAsn1(e))),c.finish();var f={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:a,parameters:K.util.bytesToHex(i).toUpperCase()},body:c.output.getBytes()};return K.pem.encode(f)};$.decryptRsaPrivateKey=function(e,t){var r=null,n=K.pem.decode(e)[0];if(n.type!=="ENCRYPTED PRIVATE KEY"&&n.type!=="PRIVATE KEY"&&n.type!=="RSA PRIVATE KEY"){var a=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw a.headerType=a,a}if(n.procType&&n.procType.type==="ENCRYPTED"){var i,s;switch(n.dekInfo.algorithm){case"DES-CBC":i=8,s=K.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,s=K.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,s=K.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,s=K.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,s=K.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,s=function(f){return K.rc2.createDecryptionCipher(f,40)};break;case"RC2-64-CBC":i=8,s=function(f){return K.rc2.createDecryptionCipher(f,64)};break;case"RC2-128-CBC":i=16,s=function(f){return K.rc2.createDecryptionCipher(f,128)};break;default:var a=new Error('Could not decrypt private key; unsupported encryption algorithm "'+n.dekInfo.algorithm+'".');throw a.algorithm=n.dekInfo.algorithm,a}var o=K.util.hexToBytes(n.dekInfo.parameters),u=K.pbe.opensslDeriveBytes(t,o.substr(0,8),i),l=s(u);if(l.start(o),l.update(K.util.createBuffer(n.body)),l.finish())r=l.output.getBytes();else return r}else r=n.body;return n.type==="ENCRYPTED PRIVATE KEY"?r=$.decryptPrivateKeyInfo(R.fromDer(r),t):r=R.fromDer(r),r!==null&&(r=$.privateKeyFromAsn1(r)),r};$.pbe.generatePkcs12Key=function(e,t,r,n,a,i){var s,o;if(typeof i>"u"||i===null){if(!("sha1"in K.md))throw new Error('"sha1" hash algorithm unavailable.');i=K.md.sha1.create()}var u=i.digestLength,l=i.blockLength,c=new K.util.ByteBuffer,f=new K.util.ByteBuffer;if(e!=null){for(o=0;o=0;o--)q=q>>8,q+=W.at(o)+ne.at(o),ne.setAt(o,q&255);ee.putBuffer(ne)}S=ee,c.putBuffer(N)}return c.truncate(c.length()-a),c};$.pbe.getCipher=function(e,t,r){switch(e){case $.oids.pkcs5PBES2:return $.pbe.getCipherForPBES2(e,t,r);case $.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case $.oids["pbewithSHAAnd40BitRC2-CBC"]:return $.pbe.getCipherForPKCS12PBE(e,t,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}};$.pbe.getCipherForPBES2=function(e,t,r){var n={},a=[];if(!R.validate(t,ly,n,a)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}if(e=R.derToOid(n.kdfOid),e!==$.oids.pkcs5PBKDF2){var i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw i.oid=e,i.supportedOids=["pkcs5PBKDF2"],i}if(e=R.derToOid(n.encOid),e!==$.oids["aes128-CBC"]&&e!==$.oids["aes192-CBC"]&&e!==$.oids["aes256-CBC"]&&e!==$.oids["des-EDE3-CBC"]&&e!==$.oids.desCBC){var i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw i.oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i}var s=n.kdfSalt,o=K.util.createBuffer(n.kdfIterationCount);o=o.getInt(o.length()<<3);var u,l;switch($.oids[e]){case"aes128-CBC":u=16,l=K.aes.createDecryptionCipher;break;case"aes192-CBC":u=24,l=K.aes.createDecryptionCipher;break;case"aes256-CBC":u=32,l=K.aes.createDecryptionCipher;break;case"des-EDE3-CBC":u=24,l=K.des.createDecryptionCipher;break;case"desCBC":u=8,l=K.des.createDecryptionCipher;break}var c=Sc(n.prfOid),f=K.pkcs5.pbkdf2(r,s,o,u,c),d=n.encIv,m=l(f);return m.start(d),m};$.pbe.getCipherForPKCS12PBE=function(e,t,r){var n={},a=[];if(!R.validate(t,cy,n,a)){var i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw i.errors=a,i}var s=K.util.createBuffer(n.salt),o=K.util.createBuffer(n.iterations);o=o.getInt(o.length()<<3);var u,l,c;switch(e){case $.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,l=8,c=K.des.startDecrypting;break;case $.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,l=8,c=function(h,C){var b=K.rc2.createDecryptionCipher(h,40);return b.start(C,null),b};break;default:var i=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw i.oid=e,i}var f=Sc(n.prfOid),d=$.pbe.generatePkcs12Key(r,s,1,o,u,f);f.start();var m=$.pbe.generatePkcs12Key(r,s,2,o,l,f);return c(d,m)};$.pbe.opensslDeriveBytes=function(e,t,r,n){if(typeof n>"u"||n===null){if(!("md5"in K.md))throw new Error('"md5" hash algorithm unavailable.');n=K.md.md5.create()}t===null&&(t="");for(var a=[xc(n,e+t)],i=16,s=1;i{var gn=te();Ht();ye();var F=gn.asn1,yn=Ac.exports=gn.pkcs7asn1=gn.pkcs7asn1||{};gn.pkcs7=gn.pkcs7||{};gn.pkcs7.asn1=yn;var Ic={name:"ContentInfo",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:F.Class.UNIVERSAL,type:F.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:F.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};yn.contentInfoValidator=Ic;var Tc={name:"EncryptedContentInfo",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:F.Class.UNIVERSAL,type:F.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:F.Class.UNIVERSAL,type:F.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:F.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:F.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};yn.envelopedDataValidator={name:"EnvelopedData",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:F.Class.UNIVERSAL,type:F.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:F.Class.UNIVERSAL,type:F.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(Tc)};yn.encryptedDataValidator={name:"EncryptedData",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:F.Class.UNIVERSAL,type:F.Type.INTEGER,constructed:!1,capture:"version"}].concat(Tc)};var dy={name:"SignerInfo",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:F.Class.UNIVERSAL,type:F.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:F.Class.UNIVERSAL,type:F.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:F.Class.UNIVERSAL,type:F.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:F.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:F.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:F.Class.UNIVERSAL,type:F.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:F.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};yn.signedDataValidator={name:"SignedData",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:F.Class.UNIVERSAL,type:F.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:F.Class.UNIVERSAL,type:F.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},Ic,{name:"SignedData.Certificates",tagClass:F.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:F.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:F.Class.UNIVERSAL,type:F.Type.SET,capture:"signerInfos",optional:!0,value:[dy]}]};yn.recipientInfoValidator={name:"RecipientInfo",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:F.Class.UNIVERSAL,type:F.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:F.Class.UNIVERSAL,type:F.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:F.Class.UNIVERSAL,type:F.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:F.Class.UNIVERSAL,type:F.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:F.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:F.Class.UNIVERSAL,type:F.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var xo=Q((RE,Rc)=>{var Hr=te();ye();Hr.mgf=Hr.mgf||{};var py=Rc.exports=Hr.mgf.mgf1=Hr.mgf1=Hr.mgf1||{};py.create=function(e){var t={generate:function(r,n){for(var a=new Hr.util.ByteBuffer,i=Math.ceil(n/e.digestLength),s=0;s{var pi=te();xo();_c.exports=pi.mgf=pi.mgf||{};pi.mgf.mgf1=pi.mgf1});var hi=Q((BE,Nc)=>{var Gr=te();Bt();ye();var hy=Nc.exports=Gr.pss=Gr.pss||{};hy.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,r=e.mgf,n=t.digestLength,a=e.salt||null;typeof a=="string"&&(a=Gr.util.createBuffer(a));var i;if("saltLength"in e)i=e.saltLength;else if(a!==null)i=a.length();else throw new Error("Salt length not specified or specific salt not given.");if(a!==null&&a.length()!==i)throw new Error("Given salt length does not match length of given salt.");var s=e.prng||Gr.random,o={};return o.encode=function(u,l){var c,f=l-1,d=Math.ceil(f/8),m=u.digest().getBytes();if(d>8*d-f&255;return B=String.fromCharCode(B.charCodeAt(0)&~N)+B.substr(1),B+C+String.fromCharCode(188)},o.verify=function(u,l,c){var f,d=c-1,m=Math.ceil(d/8);if(l=l.substr(-m),m>8*m-d&255;if(h.charCodeAt(0)&b)throw new Error("Bits beyond keysize not zero as expected.");var I=r.generate(C,p),S="";for(f=0;f{var j=te();Ir();Ht();oa();Xt();Bc();Tr();Mr();hi();ca();ye();var g=j.asn1,P=Oc.exports=j.pki=j.pki||{},me=P.oids,He={};He.CN=me.commonName;He.commonName="CN";He.C=me.countryName;He.countryName="C";He.L=me.localityName;He.localityName="L";He.ST=me.stateOrProvinceName;He.stateOrProvinceName="ST";He.O=me.organizationName;He.organizationName="O";He.OU=me.organizationalUnitName;He.organizationalUnitName="OU";He.E=me.emailAddress;He.emailAddress="E";var Lc=j.pki.rsa.publicKeyValidator,my={name:"Certificate",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:g.Class.UNIVERSAL,type:g.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:g.Class.UNIVERSAL,type:g.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:g.Class.UNIVERSAL,type:g.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:g.Class.UNIVERSAL,type:g.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},Lc,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:g.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:g.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:g.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},gy={name:"rsapss",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:g.Class.UNIVERSAL,type:g.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:g.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:g.Class.UNIVERSAL,type:g.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:g.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:g.Class.UNIVERSAL,type:g.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:g.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:g.Class.UNIVERSAL,type:g.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},yy={name:"CertificationRequestInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},Lc,{name:"CertificationRequestInfo.attributes",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:g.Class.UNIVERSAL,type:g.Type.SET,constructed:!0}]}]}]},vy={name:"CertificationRequest",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[yy,{name:"CertificationRequest.signatureAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};P.RDNAttributesAsArray=function(e,t){for(var r=[],n,a,i,s=0;s2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(u.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(s.validity.notBefore=u[0],s.validity.notAfter=u[1],s.tbsCertificate=r.tbsCertificate,t){s.md=gi({signatureOid:s.signatureOid,type:"certificate"});var l=g.toDer(s.tbsCertificate);s.md.update(l.getBytes())}var c=j.md.sha1.create(),f=g.toDer(r.certIssuer);c.update(f.getBytes()),s.issuer.getField=function(p){return _r(s.issuer,p)},s.issuer.addField=function(p){Lt([p]),s.issuer.attributes.push(p)},s.issuer.attributes=P.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(s.issuer.uniqueId=r.certIssuerUniqueId),s.issuer.hash=c.digest().toHex();var d=j.md.sha1.create(),m=g.toDer(r.certSubject);return d.update(m.getBytes()),s.subject.getField=function(p){return _r(s.subject,p)},s.subject.addField=function(p){Lt([p]),s.subject.attributes.push(p)},s.subject.attributes=P.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(s.subject.uniqueId=r.certSubjectUniqueId),s.subject.hash=d.digest().toHex(),r.certExtensions?s.extensions=P.certificateExtensionsFromAsn1(r.certExtensions):s.extensions=[],s.publicKey=P.publicKeyFromAsn1(r.subjectPublicKeyInfo),s};P.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r1&&(n=r.value.charCodeAt(1),a=r.value.length>2?r.value.charCodeAt(2):0),t.digitalSignature=(n&128)===128,t.nonRepudiation=(n&64)===64,t.keyEncipherment=(n&32)===32,t.dataEncipherment=(n&16)===16,t.keyAgreement=(n&8)===8,t.keyCertSign=(n&4)===4,t.cRLSign=(n&2)===2,t.encipherOnly=(n&1)===1,t.decipherOnly=(a&128)===128}else if(t.name==="basicConstraints"){var r=g.fromDer(t.value);r.value.length>0&&r.value[0].type===g.Type.BOOLEAN?t.cA=r.value[0].value.charCodeAt(0)!==0:t.cA=!1;var i=null;r.value.length>0&&r.value[0].type===g.Type.INTEGER?i=r.value[0].value:r.value.length>1&&(i=r.value[1].value),i!==null&&(t.pathLenConstraint=g.derToInteger(i))}else if(t.name==="extKeyUsage")for(var r=g.fromDer(t.value),s=0;s1&&(n=r.value.charCodeAt(1)),t.client=(n&128)===128,t.server=(n&64)===64,t.email=(n&32)===32,t.objsign=(n&16)===16,t.reserved=(n&8)===8,t.sslCA=(n&4)===4,t.emailCA=(n&2)===2,t.objCA=(n&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var u,r=g.fromDer(t.value),l=0;l"u"&&(t.type&&t.type in P.oids?t.name=P.oids[t.type]:t.shortName&&t.shortName in He&&(t.name=P.oids[He[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in P.oids)t.type=P.oids[t.name];else{var n=new Error("Attribute type not specified.");throw n.attribute=t,n}if(typeof t.shortName>"u"&&t.name&&t.name in He&&(t.shortName=He[t.name]),t.type===me.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=g.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var a=0;a"u"){var n=new Error("Attribute value not specified.");throw n.attribute=t,n}}}function Pc(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in P.oids&&(e.name=P.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in P.oids)e.id=P.oids[e.name];else{var r=new Error("Extension ID not specified.");throw r.extension=e,r}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var n=0,a=0,i=0;e.digitalSignature&&(a|=128,n=7),e.nonRepudiation&&(a|=64,n=6),e.keyEncipherment&&(a|=32,n=5),e.dataEncipherment&&(a|=16,n=4),e.keyAgreement&&(a|=8,n=3),e.keyCertSign&&(a|=4,n=2),e.cRLSign&&(a|=2,n=1),e.encipherOnly&&(a|=1,n=0),e.decipherOnly&&(i|=128,n=7);var s=String.fromCharCode(n);i!==0?s+=String.fromCharCode(a)+String.fromCharCode(i):a!==0&&(s+=String.fromCharCode(a)),e.value=g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,s)}else if(e.name==="basicConstraints")e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(g.create(g.Class.UNIVERSAL,g.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in e&&e.value.value.push(g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);var o=e.value.value;for(var u in e)e[u]===!0&&(u in me?o.push(g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(me[u]).getBytes())):u.indexOf(".")!==-1&&o.push(g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(u).getBytes())))}else if(e.name==="nsCertType"){var n=0,a=0;e.client&&(a|=128,n=7),e.server&&(a|=64,n=6),e.email&&(a|=32,n=5),e.objsign&&(a|=16,n=4),e.reserved&&(a|=8,n=3),e.sslCA&&(a|=4,n=2),e.emailCA&&(a|=2,n=1),e.objCA&&(a|=1,n=0);var s=String.fromCharCode(n);a!==0&&(s+=String.fromCharCode(a)),e.value=g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,s)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);for(var l,c=0;c128)throw new Error('Invalid "nsComment" content.');e.value=g.create(g.Class.UNIVERSAL,g.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var f=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=f.toHex(),e.value=g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,f.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);var o=e.value.value;if(e.keyIdentifier){var d=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;o.push(g.create(g.Class.CONTEXT_SPECIFIC,0,!1,d))}if(e.authorityCertIssuer){var m=[g.create(g.Class.CONTEXT_SPECIFIC,4,!0,[vn(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];o.push(g.create(g.Class.CONTEXT_SPECIFIC,1,!0,m))}if(e.serialNumber){var p=j.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);o.push(g.create(g.Class.CONTEXT_SPECIFIC,2,!1,p))}}else if(e.name==="cRLDistributionPoints"){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);for(var o=e.value.value,h=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]),C=g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[]),l,c=0;c"u"){var r=new Error("Extension value not specified.");throw r.extension=e,r}return e}function So(e,t){switch(e){case me["RSASSA-PSS"]:var r=[];return t.hash.algorithmOid!==void 0&&r.push(g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(t.hash.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&r.push(g.create(g.Class.CONTEXT_SPECIFIC,1,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(t.mgf.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(t.mgf.hash.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&r.push(g.create(g.Class.CONTEXT_SPECIFIC,2,!0,[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(t.saltLength).getBytes())])),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,r);default:return g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")}}function Cy(e){var t=g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var r=e.attributes,n=0;n=by&&e0&&n.value.push(P.certificateExtensionsToAsn1(e.extensions)),n};P.getCertificationRequestInfo=function(e){var t=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(e.version).getBytes()),vn(e.subject),P.publicKeyToAsn1(e.publicKey),Cy(e)]);return t};P.distinguishedNameToAsn1=function(e){return vn(e)};P.certificateToAsn1=function(e){var t=e.tbsCertificate||P.getTBSCertificate(e);return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[t,g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(e.signatureOid).getBytes()),So(e.signatureOid,e.signatureParameters)]),g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])};P.certificateExtensionsToAsn1=function(e){var t=g.create(g.Class.CONTEXT_SPECIFIC,3,!0,[]),r=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);t.value.push(r);for(var n=0;n"u"&&(a=new Date);var i=!0,s=null,o=0;do{var u=t.shift(),l=null,c=!1;if(a&&(au.validity.notAfter)&&(s={message:"Certificate is not valid yet or has expired.",error:P.certificateError.certificate_expired,notBefore:u.validity.notBefore,notAfter:u.validity.notAfter,now:a}),s===null){if(l=t[0]||e.getIssuer(u),l===null&&u.isIssuer(u)&&(c=!0,l=u),l){var f=l;j.util.isArray(f)||(f=[f]);for(var d=!1;!d&&f.length>0;){l=f.shift();try{d=l.verify(u)}catch{}}d||(s={message:"Certificate signature is invalid.",error:P.certificateError.bad_certificate})}s===null&&(!l||c)&&!e.hasCertificate(u)&&(s={message:"Certificate is not trusted.",error:P.certificateError.unknown_ca})}if(s===null&&l&&!u.isIssuer(l)&&(s={message:"Certificate issuer is invalid.",error:P.certificateError.bad_certificate}),s===null)for(var m={keyUsage:!0,basicConstraints:!0},p=0;s===null&&pC.pathLenConstraint&&(s={message:"Certificate basicConstraints pathLenConstraint violated.",error:P.certificateError.bad_certificate})}}var S=s===null?!0:s.error,_=r.verify?r.verify(S,o,n):S;if(_===!0)s=null;else throw S===!0&&(s={message:"The application rejected the certificate.",error:P.certificateError.bad_certificate}),(_||_===0)&&(typeof _=="object"&&!j.util.isArray(_)?(_.message&&(s.message=_.message),_.error&&(s.error=_.error)):typeof _=="string"&&(s.error=_)),s;i=!1,++o}while(t.length>0);return!0}});var wo=Q((kE,Mc)=>{var _e=te();Ht();fn();Tr();bo();Co();Bt();ca();mn();ye();yi();var x=_e.asn1,le=_e.pki,da=Mc.exports=_e.pkcs12=_e.pkcs12||{},Uc={name:"ContentInfo",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:x.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},Sy={name:"PFX",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:x.Class.UNIVERSAL,type:x.Type.INTEGER,constructed:!1,capture:"version"},Uc,{name:"PFX.macData",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:x.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:x.Class.UNIVERSAL,type:x.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:x.Class.UNIVERSAL,type:x.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:x.Class.UNIVERSAL,type:x.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},Ey={name:"SafeBag",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:x.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:x.Class.UNIVERSAL,type:x.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},wy={name:"Attribute",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:x.Class.UNIVERSAL,type:x.Type.SET,constructed:!0,capture:"values"}]},Iy={name:"CertBag",tagClass:x.Class.UNIVERSAL,type:x.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:x.Class.UNIVERSAL,type:x.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:x.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:x.Class.UNIVERSAL,type:x.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function fa(e,t,r,n){for(var a=[],i=0;i=0&&a.push(o)}}return a}da.pkcs12FromAsn1=function(e,t,r){typeof t=="string"?(r=t,t=!0):t===void 0&&(t=!0);var n={},a=[];if(!x.validate(e,Sy,n,a)){var i=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw i.errors=i,i}var s={version:n.version.charCodeAt(0),safeContents:[],getBags:function(C){var b={},I;return"localKeyId"in C?I=C.localKeyId:"localKeyIdHex"in C&&(I=_e.util.hexToBytes(C.localKeyIdHex)),I===void 0&&!("friendlyName"in C)&&"bagType"in C&&(b[C.bagType]=fa(s.safeContents,null,null,C.bagType)),I!==void 0&&(b.localKeyId=fa(s.safeContents,"localKeyId",I,C.bagType)),"friendlyName"in C&&(b.friendlyName=fa(s.safeContents,"friendlyName",C.friendlyName,C.bagType)),b},getBagsByFriendlyName:function(C,b){return fa(s.safeContents,"friendlyName",C,b)},getBagsByLocalKeyId:function(C,b){return fa(s.safeContents,"localKeyId",C,b)}};if(n.version.charCodeAt(0)!==3){var i=new Error("PKCS#12 PFX of version other than 3 not supported.");throw i.version=n.version.charCodeAt(0),i}if(x.derToOid(n.contentType)!==le.oids.data){var i=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw i.oid=x.derToOid(n.contentType),i}var o=n.content.value[0];if(o.tagClass!==x.Class.UNIVERSAL||o.type!==x.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(o=Eo(o),n.mac){var u=null,l=0,c=x.derToOid(n.macAlgorithm);switch(c){case le.oids.sha1:u=_e.md.sha1.create(),l=20;break;case le.oids.sha256:u=_e.md.sha256.create(),l=32;break;case le.oids.sha384:u=_e.md.sha384.create(),l=48;break;case le.oids.sha512:u=_e.md.sha512.create(),l=64;break;case le.oids.md5:u=_e.md.md5.create(),l=16;break}if(u===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+c);var f=new _e.util.ByteBuffer(n.macSalt),d="macIterations"in n?parseInt(_e.util.bytesToHex(n.macIterations),16):1,m=da.generateKey(r,f,3,d,l,u),p=_e.hmac.create();p.start(u,m),p.update(o.value);var h=p.getMac();if(h.getBytes()!==n.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return Ty(s,o.value,t,r),s};function Eo(e){if(e.composed||e.constructed){for(var t=_e.util.createBuffer(),r=0;r0&&(i=x.create(x.Class.UNIVERSAL,x.Type.SET,!0,u));var l=[],c=[];t!==null&&(_e.util.isArray(t)?c=t:c=[t]);for(var f=[],d=0;d0){var C=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,f),b=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(le.oids.data).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,x.toDer(C).getBytes())])]);l.push(b)}var I=null;if(e!==null){var S=le.wrapRsaPrivateKey(le.privateKeyToAsn1(e));r===null?I=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(le.oids.keyBag).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[S]),i]):I=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(le.oids.pkcs8ShroudedKeyBag).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[le.encryptPrivateKeyInfo(S,r,n)]),i]);var _=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[I]),B=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(le.oids.data).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,x.toDer(_).getBytes())])]);l.push(B)}var N=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,l),G;if(n.useMac){var o=_e.md.sha1.create(),W=new _e.util.ByteBuffer(_e.random.getBytes(n.saltSize)),re=n.count,e=da.generateKey(r,W,3,re,20),ee=_e.hmac.create();ee.start(o,e),ee.update(x.toDer(N).getBytes());var ne=ee.getMac();G=x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(le.oids.sha1).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.NULL,!1,"")]),x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,ne.getBytes())]),x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,W.getBytes()),x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,x.integerToDer(re).getBytes())])}return x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.INTEGER,!1,x.integerToDer(3).getBytes()),x.create(x.Class.UNIVERSAL,x.Type.SEQUENCE,!0,[x.create(x.Class.UNIVERSAL,x.Type.OID,!1,x.oidToDer(le.oids.data).getBytes()),x.create(x.Class.CONTEXT_SPECIFIC,0,!0,[x.create(x.Class.UNIVERSAL,x.Type.OCTETSTRING,!1,x.toDer(N).getBytes())])]),G])};da.generateKey=_e.pbe.generatePkcs12Key});var To=Q((LE,Vc)=>{var Br=te();Ht();Tr();Co();Mr();oi();wo();hi();ca();ye();yi();var Io=Br.asn1,Cn=Vc.exports=Br.pki=Br.pki||{};Cn.pemToDer=function(e){var t=Br.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return Br.util.createBuffer(t.body)};Cn.privateKeyFromPem=function(e){var t=Br.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var n=Io.fromDer(t.body);return Cn.privateKeyFromAsn1(n)};Cn.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:Io.toDer(Cn.privateKeyToAsn1(e)).getBytes()};return Br.pem.encode(r,{maxline:t})};Cn.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:Io.toDer(e).getBytes()};return Br.pem.encode(r,{maxline:t})}});var ko=Q((DE,jc)=>{var L=te();Ht();fn();ri();Mr();To();Bt();mn();ye();var xi=function(e,t,r,n){var a=L.util.createBuffer(),i=e.length>>1,s=i+(e.length&1),o=e.substr(0,s),u=e.substr(i,s),l=L.util.createBuffer(),c=L.hmac.create();r=t+r;var f=Math.ceil(n/16),d=Math.ceil(n/20);c.start("MD5",o);var m=L.util.createBuffer();l.putBytes(r);for(var p=0;p0&&(v.queue(e,v.createAlert(e,{level:v.Alert.Level.warning,description:v.Alert.Description.no_renegotiation})),v.flush(e)),e.process()};v.parseHelloMessage=function(e,t,r){var n=null,a=e.entity===v.ConnectionEnd.client;if(r<38)e.error(e,{message:a?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}});else{var i=t.fragment,s=i.length();if(n={version:{major:i.getByte(),minor:i.getByte()},random:L.util.createBuffer(i.getBytes(32)),session_id:Tt(i,1),extensions:[]},a?(n.cipher_suite=i.getBytes(2),n.compression_method=i.getByte()):(n.cipher_suites=Tt(i,2),n.compression_methods=Tt(i,1)),s=r-(s-i.length()),s>0){for(var o=Tt(i,2);o.length()>0;)n.extensions.push({type:[o.getByte(),o.getByte()],data:Tt(o,2)});if(!a)for(var u=0;u0;){var f=c.getByte();if(f!==0)break;e.session.extensions.server_name.serverNameList.push(Tt(c,2).getBytes())}}}if(e.session.version&&(n.version.major!==e.session.version.major||n.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.protocol_version}});if(a)e.session.cipherSuite=v.getCipherSuite(n.cipher_suite);else for(var d=L.util.createBuffer(n.cipher_suites.bytes());d.length()>0&&(e.session.cipherSuite=v.getCipherSuite(d.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.handshake_failure},cipherSuite:L.util.bytesToHex(n.cipher_suite)});a?e.session.compressionMethod=n.compression_method:e.session.compressionMethod=v.CompressionMethod.none}return n};v.createSecurityParameters=function(e,t){var r=e.entity===v.ConnectionEnd.client,n=t.random.bytes(),a=r?e.session.sp.client_random:n,i=r?n:v.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:v.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:a,server_random:i}};v.handleServerHello=function(e,t,r){var n=v.parseHelloMessage(e,t,r);if(!e.fail){if(n.version.minor<=e.version.minor)e.version.minor=n.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.protocol_version}});e.session.version=e.version;var a=n.session_id.bytes();a.length>0&&a===e.session.id?(e.expect=Hc,e.session.resuming=!0,e.session.sp.server_random=n.random.bytes()):(e.expect=Dy,e.session.resuming=!1,v.createSecurityParameters(e,n)),e.session.id=a,e.process()}};v.handleClientHello=function(e,t,r){var n=v.parseHelloMessage(e,t,r);if(!e.fail){var a=n.session_id.bytes(),i=null;if(e.sessionCache&&(i=e.sessionCache.getSession(a),i===null?a="":(i.version.major!==n.version.major||i.version.minor>n.version.minor)&&(i=null,a="")),a.length===0&&(a=L.random.getBytes(32)),e.session.id=a,e.session.clientHelloVersion=n.version,e.session.sp={},i)e.version=e.session.version=i.version,e.session.sp=i.sp;else{for(var s,o=1;o0;)i=Tt(a.certificate_list,3),s=L.asn1.fromDer(i),i=L.pki.certificateFromAsn1(s,!0),o.push(i)}catch(l){return e.error(e,{message:"Could not parse certificate list.",cause:l,send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.bad_certificate}})}var u=e.entity===v.ConnectionEnd.client;(u||e.verifyClient===!0)&&o.length===0?e.error(e,{message:u?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}}):o.length===0?e.expect=u?Fc:_o:(u?e.session.serverCertificate=o[0]:e.session.clientCertificate=o[0],v.verifyCertificateChain(e,o)&&(e.expect=u?Fc:_o)),e.process()};v.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.unsupported_certificate}});e.expect=Py,e.process()};v.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.unsupported_certificate}});var n=t.fragment,a={enc_pre_master_secret:Tt(n,2).getBytes()},i=null;if(e.getPrivateKey)try{i=e.getPrivateKey(e,e.session.serverCertificate),i=L.pki.privateKeyFromPem(i)}catch(u){e.error(e,{message:"Could not get private key.",cause:u,send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}})}if(i===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}});try{var s=e.session.sp;s.pre_master_secret=i.decrypt(a.enc_pre_master_secret);var o=e.session.clientHelloVersion;if(o.major!==s.pre_master_secret.charCodeAt(0)||o.minor!==s.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{s.pre_master_secret=L.random.getBytes(48)}e.expect=Bo,e.session.clientCertificate!==null&&(e.expect=Hy),e.process()};v.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}});var n=t.fragment,a={certificate_types:Tt(n,1),certificate_authorities:Tt(n,2)};e.session.certificateRequest=a,e.expect=Oy,e.process()};v.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}});var n=t.fragment;n.read-=4;var a=n.bytes();n.read+=4;var i={signature:Tt(n,2).getBytes()},s=L.util.createBuffer();s.putBuffer(e.session.md5.digest()),s.putBuffer(e.session.sha1.digest()),s=s.getBytes();try{var o=e.session.clientCertificate;if(!o.publicKey.verify(s,i.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(a),e.session.sha1.update(a)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.handshake_failure}})}e.expect=Bo,e.process()};v.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.record_overflow}});if(e.serverCertificate===null){var n={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.insufficient_security}},a=0,i=e.verify(e,n.alert.description,a,[]);if(i!==!0)return(i||i===0)&&(typeof i=="object"&&!L.util.isArray(i)?(i.message&&(n.message=i.message),i.alert&&(n.alert.description=i.alert)):typeof i=="number"&&(n.alert.description=i)),e.error(e,n)}e.session.certificateRequest!==null&&(t=v.createRecord(e,{type:v.ContentType.handshake,data:v.createCertificate(e)}),v.queue(e,t)),t=v.createRecord(e,{type:v.ContentType.handshake,data:v.createClientKeyExchange(e)}),v.queue(e,t),e.expect=Vy;var s=function(o,u){o.session.certificateRequest!==null&&o.session.clientCertificate!==null&&v.queue(o,v.createRecord(o,{type:v.ContentType.handshake,data:v.createCertificateVerify(o,u)})),v.queue(o,v.createRecord(o,{type:v.ContentType.change_cipher_spec,data:v.createChangeCipherSpec()})),o.state.pending=v.createConnectionState(o),o.state.current.write=o.state.pending.write,v.queue(o,v.createRecord(o,{type:v.ContentType.handshake,data:v.createFinished(o)})),o.expect=Hc,v.flush(o),o.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return s(e,null);v.getClientSignature(e,s)};v.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.illegal_parameter}});var r=e.entity===v.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=v.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?Uy:Gy,e.process()};v.handleFinished=function(e,t,r){var n=t.fragment;n.read-=4;var a=n.bytes();n.read+=4;var i=t.fragment.getBytes();n=L.util.createBuffer(),n.putBuffer(e.session.md5.digest()),n.putBuffer(e.session.sha1.digest());var s=e.entity===v.ConnectionEnd.client,o=s?"server finished":"client finished",u=e.session.sp,l=12,c=xi;if(n=c(u.master_secret,o,n.getBytes(),l),n.getBytes()!==i)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.decrypt_error}});e.session.md5.update(a),e.session.sha1.update(a),(e.session.resuming&&s||!e.session.resuming&&!s)&&(v.queue(e,v.createRecord(e,{type:v.ContentType.change_cipher_spec,data:v.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,v.queue(e,v.createRecord(e,{type:v.ContentType.handshake,data:v.createFinished(e)}))),e.expect=s?My:qy,e.handshaking=!1,++e.handshakes,e.peerCertificate=s?e.session.serverCertificate:e.session.clientCertificate,v.flush(e),e.isConnected=!0,e.connected(e),e.process()};v.handleAlert=function(e,t){var r=t.fragment,n={level:r.getByte(),description:r.getByte()},a;switch(n.description){case v.Alert.Description.close_notify:a="Connection closed.";break;case v.Alert.Description.unexpected_message:a="Unexpected message.";break;case v.Alert.Description.bad_record_mac:a="Bad record MAC.";break;case v.Alert.Description.decryption_failed:a="Decryption failed.";break;case v.Alert.Description.record_overflow:a="Record overflow.";break;case v.Alert.Description.decompression_failure:a="Decompression failed.";break;case v.Alert.Description.handshake_failure:a="Handshake failure.";break;case v.Alert.Description.bad_certificate:a="Bad certificate.";break;case v.Alert.Description.unsupported_certificate:a="Unsupported certificate.";break;case v.Alert.Description.certificate_revoked:a="Certificate revoked.";break;case v.Alert.Description.certificate_expired:a="Certificate expired.";break;case v.Alert.Description.certificate_unknown:a="Certificate unknown.";break;case v.Alert.Description.illegal_parameter:a="Illegal parameter.";break;case v.Alert.Description.unknown_ca:a="Unknown certificate authority.";break;case v.Alert.Description.access_denied:a="Access denied.";break;case v.Alert.Description.decode_error:a="Decode error.";break;case v.Alert.Description.decrypt_error:a="Decrypt error.";break;case v.Alert.Description.export_restriction:a="Export restriction.";break;case v.Alert.Description.protocol_version:a="Unsupported protocol version.";break;case v.Alert.Description.insufficient_security:a="Insufficient security.";break;case v.Alert.Description.internal_error:a="Internal error.";break;case v.Alert.Description.user_canceled:a="User canceled.";break;case v.Alert.Description.no_renegotiation:a="Renegotiation not supported.";break;default:a="Unknown error.";break}if(n.description===v.Alert.Description.close_notify)return e.close();e.error(e,{message:a,send:!1,origin:e.entity===v.ConnectionEnd.client?"server":"client",alert:n}),e.process()};v.handleHandshake=function(e,t){var r=t.fragment,n=r.getByte(),a=r.getInt24();if(a>r.length())return e.fragmented=t,t.fragment=L.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var i=r.bytes(a+4);r.read+=4,n in bi[e.entity][e.expect]?(e.entity===v.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:L.md.md5.create(),sha1:L.md.sha1.create()}),n!==v.HandshakeType.hello_request&&n!==v.HandshakeType.certificate_verify&&n!==v.HandshakeType.finished&&(e.session.md5.update(i),e.session.sha1.update(i)),bi[e.entity][e.expect][n](e,t,a)):v.handleUnexpected(e,t)};v.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()};v.handleHeartbeat=function(e,t){var r=t.fragment,n=r.getByte(),a=r.getInt16(),i=r.getBytes(a);if(n===v.HeartbeatMessageType.heartbeat_request){if(e.handshaking||a>i.length)return e.process();v.queue(e,v.createRecord(e,{type:v.ContentType.heartbeat,data:v.createHeartbeat(v.HeartbeatMessageType.heartbeat_response,i)})),v.flush(e)}else if(n===v.HeartbeatMessageType.heartbeat_response){if(i!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,L.util.createBuffer(i))}e.process()};var Ly=0,Dy=1,Fc=2,Py=3,Oy=4,Hc=5,Uy=6,My=7,Vy=8,Fy=0,Ky=1,_o=2,Hy=3,Bo=4,Gy=5,qy=6,y=v.handleUnexpected,Gc=v.handleChangeCipherSpec,ot=v.handleAlert,mt=v.handleHandshake,qc=v.handleApplicationData,ut=v.handleHeartbeat,No=[];No[v.ConnectionEnd.client]=[[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[Gc,ot,y,y,ut],[y,ot,mt,y,ut],[y,ot,mt,qc,ut],[y,ot,mt,y,ut]];No[v.ConnectionEnd.server]=[[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[y,ot,mt,y,ut],[Gc,ot,y,y,ut],[y,ot,mt,y,ut],[y,ot,mt,qc,ut],[y,ot,mt,y,ut]];var Nr=v.handleHelloRequest,Wy=v.handleServerHello,Wc=v.handleCertificate,Kc=v.handleServerKeyExchange,Ao=v.handleCertificateRequest,vi=v.handleServerHelloDone,zc=v.handleFinished,bi=[];bi[v.ConnectionEnd.client]=[[y,y,Wy,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,Wc,Kc,Ao,vi,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,Kc,Ao,vi,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,Ao,vi,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,vi,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,zc],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[Nr,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y]];var zy=v.handleClientHello,jy=v.handleClientKeyExchange,Yy=v.handleCertificateVerify;bi[v.ConnectionEnd.server]=[[y,zy,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,Wc,y,y,y,y,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,jy,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,Yy,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,zc],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y],[y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y]];v.generateKeys=function(e,t){var r=xi,n=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",n,48).bytes(),t.pre_master_secret=null),n=t.server_random+t.client_random;var a=2*t.mac_key_length+2*t.enc_key_length,i=e.version.major===v.Versions.TLS_1_0.major&&e.version.minor===v.Versions.TLS_1_0.minor;i&&(a+=2*t.fixed_iv_length);var s=r(t.master_secret,"key expansion",n,a),o={client_write_MAC_key:s.getBytes(t.mac_key_length),server_write_MAC_key:s.getBytes(t.mac_key_length),client_write_key:s.getBytes(t.enc_key_length),server_write_key:s.getBytes(t.enc_key_length)};return i&&(o.client_write_IV=s.getBytes(t.fixed_iv_length),o.server_write_IV=s.getBytes(t.fixed_iv_length)),o};v.createConnectionState=function(e){var t=e.entity===v.ConnectionEnd.client,r=function(){var i={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(s){return!0},compressionState:null,compressFunction:function(s){return!0},updateSequenceNumber:function(){i.sequenceNumber[1]===4294967295?(i.sequenceNumber[1]=0,++i.sequenceNumber[0]):++i.sequenceNumber[1]}};return i},n={read:r(),write:r()};if(n.read.update=function(i,s){return n.read.cipherFunction(s,n.read)?n.read.compressFunction(i,s,n.read)||i.error(i,{message:"Could not decompress record.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.decompression_failure}}):i.error(i,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.bad_record_mac}}),!i.fail},n.write.update=function(i,s){return n.write.compressFunction(i,s,n.write)?n.write.cipherFunction(s,n.write)||i.error(i,{message:"Could not encrypt record.",send:!1,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}}):i.error(i,{message:"Could not compress record.",send:!1,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}}),!i.fail},e.session){var a=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(a),a.keys=v.generateKeys(e,a),n.read.macKey=t?a.keys.server_write_MAC_key:a.keys.client_write_MAC_key,n.write.macKey=t?a.keys.client_write_MAC_key:a.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(n,e,a),a.compression_algorithm){case v.CompressionMethod.none:break;case v.CompressionMethod.deflate:n.read.compressFunction=ky,n.write.compressFunction=Ny;break;default:throw new Error("Unsupported compression algorithm.")}}return n};v.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,r=L.util.createBuffer();return r.putInt32(t),r.putBytes(L.random.getBytes(28)),r};v.createRecord=function(e,t){if(!t.data)return null;var r={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return r};v.createAlert=function(e,t){var r=L.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),v.createRecord(e,{type:v.ContentType.alert,data:r})};v.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=L.util.createBuffer(),r=0;r0&&(f+=2);var d=e.session.id,m=d.length+1+2+4+28+2+a+1+s+f,p=L.util.createBuffer();return p.putByte(v.HandshakeType.client_hello),p.putInt24(m),p.putByte(e.version.major),p.putByte(e.version.minor),p.putBytes(e.session.sp.client_random),Dt(p,1,L.util.createBuffer(d)),Dt(p,2,t),Dt(p,1,i),f>0&&Dt(p,2,o),p};v.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,n=L.util.createBuffer();return n.putByte(v.HandshakeType.server_hello),n.putInt24(r),n.putByte(e.version.major),n.putByte(e.version.minor),n.putBytes(e.session.sp.server_random),Dt(n,1,L.util.createBuffer(t)),n.putByte(e.session.cipherSuite.id[0]),n.putByte(e.session.cipherSuite.id[1]),n.putByte(e.session.compressionMethod),n};v.createCertificate=function(e){var t=e.entity===v.ConnectionEnd.client,r=null;if(e.getCertificate){var n;t?n=e.session.certificateRequest:n=e.session.extensions.server_name.serverNameList,r=e.getCertificate(e,n)}var a=L.util.createBuffer();if(r!==null)try{L.util.isArray(r)||(r=[r]);for(var i=null,s=0;s0&&(r.putByte(v.HandshakeType.server_key_exchange),r.putInt24(t)),r};v.getClientSignature=function(e,t){var r=L.util.createBuffer();r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest()),r=r.getBytes(),e.getSignature=e.getSignature||function(n,a,i){var s=null;if(n.getPrivateKey)try{s=n.getPrivateKey(n,n.session.clientCertificate),s=L.pki.privateKeyFromPem(s)}catch(o){n.error(n,{message:"Could not get private key.",cause:o,send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}})}s===null?n.error(n,{message:"No private key set.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.internal_error}}):a=s.sign(a,null),i(n,a)},e.getSignature(e,r,t)};v.createCertificateVerify=function(e,t){var r=t.length+2,n=L.util.createBuffer();return n.putByte(v.HandshakeType.certificate_verify),n.putInt24(r),n.putInt16(t.length),n.putBytes(t),n};v.createCertificateRequest=function(e){var t=L.util.createBuffer();t.putByte(1);var r=L.util.createBuffer();for(var n in e.caStore.certs){var a=e.caStore.certs[n],i=L.pki.distinguishedNameToAsn1(a.subject),s=L.asn1.toDer(i);r.putInt16(s.length()),r.putBuffer(s)}var o=1+t.length()+2+r.length(),u=L.util.createBuffer();return u.putByte(v.HandshakeType.certificate_request),u.putInt24(o),Dt(u,1,t),Dt(u,2,r),u};v.createServerHelloDone=function(e){var t=L.util.createBuffer();return t.putByte(v.HandshakeType.server_hello_done),t.putInt24(0),t};v.createChangeCipherSpec=function(){var e=L.util.createBuffer();return e.putByte(1),e};v.createFinished=function(e){var t=L.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var r=e.entity===v.ConnectionEnd.client,n=e.session.sp,a=12,i=xi,s=r?"client finished":"server finished";t=i(n.master_secret,s,t.getBytes(),a);var o=L.util.createBuffer();return o.putByte(v.HandshakeType.finished),o.putInt24(t.length()),o.putBuffer(t),o};v.createHeartbeat=function(e,t,r){typeof r>"u"&&(r=t.length);var n=L.util.createBuffer();n.putByte(e),n.putInt16(r),n.putBytes(t);var a=n.length(),i=Math.max(16,a-r-3);return n.putBytes(L.random.getBytes(i)),n};v.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===v.ContentType.handshake||t.type===v.ContentType.alert||t.type===v.ContentType.change_cipher_spec))){if(t.type===v.ContentType.handshake){var r=t.fragment.bytes();e.session.md5.update(r),e.session.sha1.update(r),r=null}var n;if(t.fragment.length()<=v.MaxFragment)n=[t];else{n=[];for(var a=t.fragment.bytes();a.length>v.MaxFragment;)n.push(v.createRecord(e,{type:t.type,data:L.util.createBuffer(a.slice(0,v.MaxFragment))})),a=a.slice(v.MaxFragment);a.length>0&&n.push(v.createRecord(e,{type:t.type,data:L.util.createBuffer(a)}))}for(var i=0;i0&&(s=r.order[0]),s!==null&&s in r.cache){i=r.cache[s],delete r.cache[s];for(var o in r.order)if(r.order[o]===s){r.order.splice(o,1);break}}return i},r.setSession=function(a,i){if(r.order.length===r.capacity){var s=r.order.shift();delete r.cache[s]}var s=L.util.bytesToHex(a);r.order.push(s),r.cache[s]=i}}return r};v.createConnection=function(e){var t=null;e.caStore?L.util.isArray(e.caStore)?t=L.pki.createCaStore(e.caStore):t=e.caStore:t=L.pki.createCaStore();var r=e.cipherSuites||null;if(r===null){r=[];for(var n in v.CipherSuites)r.push(v.CipherSuites[n])}var a=e.server?v.ConnectionEnd.server:v.ConnectionEnd.client,i=e.sessionCache?v.createSessionCache(e.sessionCache):null,s={version:{major:v.Version.major,minor:v.Version.minor},entity:a,sessionId:e.sessionId,caStore:t,sessionCache:i,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(c,f,d,m){return f},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:L.util.createBuffer(),tlsData:L.util.createBuffer(),data:L.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(c,f){f.origin=f.origin||(c.entity===v.ConnectionEnd.client?"client":"server"),f.send&&(v.queue(c,v.createAlert(c,f.alert)),v.flush(c));var d=f.fatal!==!1;d&&(c.fail=!0),e.error(c,f),d&&c.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};s.reset=function(c){s.version={major:v.Version.major,minor:v.Version.minor},s.record=null,s.session=null,s.peerCertificate=null,s.state={pending:null,current:null},s.expect=s.entity===v.ConnectionEnd.client?Ly:Fy,s.fragmented=null,s.records=[],s.open=!1,s.handshakes=0,s.handshaking=!1,s.isConnected=!1,s.fail=!(c||typeof c>"u"),s.input.clear(),s.tlsData.clear(),s.data.clear(),s.state.current=v.createConnectionState(s)},s.reset();var o=function(c,f){var d=f.type-v.ContentType.change_cipher_spec,m=No[c.entity][c.expect];d in m?m[d](c,f):v.handleUnexpected(c,f)},u=function(c){var f=0,d=c.input,m=d.length();if(m<5)f=5-m;else{c.record={type:d.getByte(),version:{major:d.getByte(),minor:d.getByte()},length:d.getInt16(),fragment:L.util.createBuffer(),ready:!1};var p=c.record.version.major===c.version.major;p&&c.session&&c.session.version&&(p=c.record.version.minor===c.version.minor),p||c.error(c,{message:"Incompatible TLS version.",send:!0,alert:{level:v.Alert.Level.fatal,description:v.Alert.Description.protocol_version}})}return f},l=function(c){var f=0,d=c.input,m=d.length();if(m0&&(s.sessionCache&&(f=s.sessionCache.getSession(c)),f===null&&(c="")),c.length===0&&s.sessionCache&&(f=s.sessionCache.getSession(),f!==null&&(c=f.id)),s.session={id:c,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:L.md.md5.create(),sha1:L.md.sha1.create()},f&&(s.version=f.version,s.session.sp=f.sp),s.session.sp.client_random=v.createRandom().getBytes(),s.open=!0,v.queue(s,v.createRecord(s,{type:v.ContentType.handshake,data:v.createClientHello(s)})),v.flush(s)}},s.process=function(c){var f=0;return c&&s.input.putBytes(c),s.fail||(s.record!==null&&s.record.ready&&s.record.fragment.isEmpty()&&(s.record=null),s.record===null&&(f=u(s)),!s.fail&&s.record!==null&&!s.record.ready&&(f=l(s)),!s.fail&&s.record!==null&&s.record.ready&&o(s,s.record)),f},s.prepare=function(c){return v.queue(s,v.createRecord(s,{type:v.ContentType.application_data,data:L.util.createBuffer(c)})),v.flush(s)},s.prepareHeartbeatRequest=function(c,f){return c instanceof L.util.ByteBuffer&&(c=c.bytes()),typeof f>"u"&&(f=c.length),s.expectedHeartbeatPayload=c,v.queue(s,v.createRecord(s,{type:v.ContentType.heartbeat,data:v.createHeartbeat(v.HeartbeatMessageType.heartbeat_request,c,f)})),v.flush(s)},s.close=function(c){if(!s.fail&&s.sessionCache&&s.session){var f={id:s.session.id,version:s.session.version,sp:s.session.sp};f.sp.keys=null,s.sessionCache.setSession(f.id,f)}s.open&&(s.open=!1,s.input.clear(),(s.isConnected||s.handshaking)&&(s.isConnected=s.handshaking=!1,v.queue(s,v.createAlert(s,{level:v.Alert.Level.warning,description:v.Alert.Description.close_notify})),v.flush(s)),s.closed(s)),s.reset(c)},s};jc.exports=L.tls=L.tls||{};for(Ci in v)typeof v[Ci]!="function"&&(L.tls[Ci]=v[Ci]);var Ci;L.tls.prf_tls1=xi;L.tls.hmac_sha1=By;L.tls.createSessionCache=v.createSessionCache;L.tls.createConnection=v.createConnection});var Zc=Q((PE,Xc)=>{var kr=te();Ir();ko();var Pt=Xc.exports=kr.tls;Pt.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Pt.BulkCipherAlgorithm.aes,e.cipher_type=Pt.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Pt.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:Yc};Pt.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Pt.BulkCipherAlgorithm.aes,e.cipher_type=Pt.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Pt.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:Yc};function Yc(e,t,r){var n=t.entity===kr.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:kr.cipher.createDecipher("AES-CBC",n?r.keys.server_write_key:r.keys.client_write_key),iv:n?r.keys.server_write_IV:r.keys.client_write_IV},e.write.cipherState={init:!1,cipher:kr.cipher.createCipher("AES-CBC",n?r.keys.client_write_key:r.keys.server_write_key),iv:n?r.keys.client_write_IV:r.keys.server_write_IV},e.read.cipherFunction=$y,e.write.cipherFunction=Zy,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=Pt.hmac_sha1}function Zy(e,t){var r=!1,n=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(n),t.updateSequenceNumber();var a;e.version.minor===Pt.Versions.TLS_1_0.minor?a=t.cipherState.init?null:t.cipherState.iv:a=kr.random.getBytesSync(16),t.cipherState.init=!0;var i=t.cipherState.cipher;return i.start({iv:a}),e.version.minor>=Pt.Versions.TLS_1_1.minor&&i.output.putBytes(a),i.update(e.fragment),i.finish(Qy)&&(e.fragment=i.output,e.length=e.fragment.length(),r=!0),r}function Qy(e,t,r){if(!r){var n=e-t.length()%e;t.fillWithByte(n-1,n)}return!0}function Jy(e,t,r){var n=!0;if(r){for(var a=t.length(),i=t.last(),s=a-1-i;s=i?(e.fragment=a.output.getBytes(o-i),s=a.output.getBytes(i)):e.fragment=a.output.getBytes(),e.fragment=kr.util.createBuffer(e.fragment),e.length=e.fragment.length();var u=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),r=ev(t.macKey,s,u)&&r,r}function ev(e,t,r){var n=kr.hmac.create();return n.start("SHA1",e),n.update(t),t=n.digest().getBytes(),n.start(null,null),n.update(r),r=n.digest().getBytes(),t===r}});var Po=Q((OE,ef)=>{var ke=te();Xt();ye();var pa=ef.exports=ke.sha512=ke.sha512||{};ke.md.sha512=ke.md.algorithms.sha512=pa;var Jc=ke.sha384=ke.sha512.sha384=ke.sha512.sha384||{};Jc.create=function(){return pa.create("SHA-384")};ke.md.sha384=ke.md.algorithms.sha384=Jc;ke.sha512.sha256=ke.sha512.sha256||{create:function(){return pa.create("SHA-512/256")}};ke.md["sha512/256"]=ke.md.algorithms["sha512/256"]=ke.sha512.sha256;ke.sha512.sha224=ke.sha512.sha224||{create:function(){return pa.create("SHA-512/224")}};ke.md["sha512/224"]=ke.md.algorithms["sha512/224"]=ke.sha512.sha224;pa.create=function(e){if($c||tv(),typeof e>"u"&&(e="SHA-512"),!(e in qr))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=qr[e],r=null,n=ke.util.createBuffer(),a=new Array(80),i=0;i<80;++i)a[i]=new Array(2);var s=64;switch(e){case"SHA-384":s=48;break;case"SHA-512/256":s=32;break;case"SHA-512/224":s=28;break}var o={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:s,messageLength:0,fullMessageLength:null,messageLengthSize:16};return o.start=function(){o.messageLength=0,o.fullMessageLength=o.messageLength128=[];for(var u=o.messageLengthSize/4,l=0;l>>0,c>>>0];for(var f=o.fullMessageLength.length-1;f>=0;--f)o.fullMessageLength[f]+=c[1],c[1]=c[0]+(o.fullMessageLength[f]/4294967296>>>0),o.fullMessageLength[f]=o.fullMessageLength[f]>>>0,c[0]=c[1]/4294967296>>>0;return n.putBytes(u),Qc(r,a,n),(n.read>2048||n.length()===0)&&n.compact(),o},o.digest=function(){var u=ke.util.createBuffer();u.putBytes(n.bytes());var l=o.fullMessageLength[o.fullMessageLength.length-1]+o.messageLengthSize,c=l&o.blockLength-1;u.putBytes(Lo.substr(0,o.blockLength-c));for(var f,d,m=o.fullMessageLength[0]*8,p=0;p>>0,m+=d,u.putInt32(m>>>0),m=f>>>0;u.putInt32(m);for(var h=new Array(r.length),p=0;p=128;){for(fe=0;fe<16;++fe)t[fe][0]=r.getInt32()>>>0,t[fe][1]=r.getInt32()>>>0;for(;fe<80;++fe)Ut=t[fe-2],be=Ut[0],H=Ut[1],n=((be>>>19|H<<13)^(H>>>29|be<<3)^be>>>6)>>>0,a=((be<<13|H>>>19)^(H<<3|be>>>29)^(be<<26|H>>>6))>>>0,Fe=t[fe-15],be=Fe[0],H=Fe[1],i=((be>>>1|H<<31)^(be>>>8|H<<24)^be>>>7)>>>0,s=((be<<31|H>>>1)^(be<<24|H>>>8)^(be<<25|H>>>7))>>>0,jt=t[fe-7],De=t[fe-16],H=a+jt[1]+s+De[1],t[fe][0]=n+jt[0]+i+De[0]+(H/4294967296>>>0)>>>0,t[fe][1]=H>>>0;for(h=e[0][0],C=e[0][1],b=e[1][0],I=e[1][1],S=e[2][0],_=e[2][1],B=e[3][0],N=e[3][1],G=e[4][0],W=e[4][1],re=e[5][0],ee=e[5][1],ne=e[6][0],q=e[6][1],Ve=e[7][0],Ee=e[7][1],fe=0;fe<80;++fe)l=((G>>>14|W<<18)^(G>>>18|W<<14)^(W>>>9|G<<23))>>>0,c=((G<<18|W>>>14)^(G<<14|W>>>18)^(W<<23|G>>>9))>>>0,f=(ne^G&(re^ne))>>>0,d=(q^W&(ee^q))>>>0,o=((h>>>28|C<<4)^(C>>>2|h<<30)^(C>>>7|h<<25))>>>0,u=((h<<4|C>>>28)^(C<<30|h>>>2)^(C<<25|h>>>7))>>>0,m=(h&b|S&(h^b))>>>0,p=(C&I|_&(C^I))>>>0,H=Ee+c+d+Do[fe][1]+t[fe][1],n=Ve+l+f+Do[fe][0]+t[fe][0]+(H/4294967296>>>0)>>>0,a=H>>>0,H=u+p,i=o+m+(H/4294967296>>>0)>>>0,s=H>>>0,Ve=ne,Ee=q,ne=re,q=ee,re=G,ee=W,H=N+a,G=B+n+(H/4294967296>>>0)>>>0,W=H>>>0,B=S,N=_,S=b,_=I,b=h,I=C,H=a+s,h=n+i+(H/4294967296>>>0)>>>0,C=H>>>0;H=e[0][1]+C,e[0][0]=e[0][0]+h+(H/4294967296>>>0)>>>0,e[0][1]=H>>>0,H=e[1][1]+I,e[1][0]=e[1][0]+b+(H/4294967296>>>0)>>>0,e[1][1]=H>>>0,H=e[2][1]+_,e[2][0]=e[2][0]+S+(H/4294967296>>>0)>>>0,e[2][1]=H>>>0,H=e[3][1]+N,e[3][0]=e[3][0]+B+(H/4294967296>>>0)>>>0,e[3][1]=H>>>0,H=e[4][1]+W,e[4][0]=e[4][0]+G+(H/4294967296>>>0)>>>0,e[4][1]=H>>>0,H=e[5][1]+ee,e[5][0]=e[5][0]+re+(H/4294967296>>>0)>>>0,e[5][1]=H>>>0,H=e[6][1]+q,e[6][0]=e[6][0]+ne+(H/4294967296>>>0)>>>0,e[6][1]=H>>>0,H=e[7][1]+Ee,e[7][0]=e[7][0]+Ve+(H/4294967296>>>0)>>>0,e[7][1]=H>>>0,Ke-=128}}});var tf=Q(Oo=>{var rv=te();Ht();var at=rv.asn1;Oo.privateKeyValidator={name:"PrivateKeyInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:at.Class.UNIVERSAL,type:at.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};Oo.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:at.Class.UNIVERSAL,type:at.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:at.Class.UNIVERSAL,type:at.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:at.Class.UNIVERSAL,type:at.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var mf=Q((ME,hf)=>{var lt=te();la();Bt();Po();ye();var uf=tf(),nv=uf.publicKeyValidator,av=uf.privateKeyValidator;typeof rf>"u"&&(rf=lt.jsbn.BigInteger);var rf,Vo=lt.util.ByteBuffer,Et=typeof Buffer>"u"?Uint8Array:Buffer;lt.pki=lt.pki||{};hf.exports=lt.pki.ed25519=lt.ed25519=lt.ed25519||{};var ce=lt.ed25519;ce.constants={};ce.constants.PUBLIC_KEY_BYTE_LENGTH=32;ce.constants.PRIVATE_KEY_BYTE_LENGTH=64;ce.constants.SEED_BYTE_LENGTH=32;ce.constants.SIGN_BYTE_LENGTH=64;ce.constants.HASH_BYTE_LENGTH=64;ce.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=lt.random.getBytesSync(ce.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==ce.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+ce.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=pr({message:t,encoding:"binary"});for(var r=new Et(ce.constants.PUBLIC_KEY_BYTE_LENGTH),n=new Et(ce.constants.PRIVATE_KEY_BYTE_LENGTH),a=0;a<32;++a)n[a]=t[a];return uv(r,n),{publicKey:r,privateKey:n}};ce.privateKeyFromAsn1=function(e){var t={},r=[],n=lt.asn1.validate(e,av,t,r);if(!n){var a=new Error("Invalid Key.");throw a.errors=r,a}var i=lt.asn1.derToOid(t.privateKeyOid),s=lt.oids.EdDSA25519;if(i!==s)throw new Error('Invalid OID "'+i+'"; OID must be "'+s+'".');var o=t.privateKey,u=pr({message:lt.asn1.fromDer(o).value,encoding:"binary"});return{privateKeyBytes:u}};ce.publicKeyFromAsn1=function(e){var t={},r=[],n=lt.asn1.validate(e,nv,t,r);if(!n){var a=new Error("Invalid Key.");throw a.errors=r,a}var i=lt.asn1.derToOid(t.publicKeyOid),s=lt.oids.EdDSA25519;if(i!==s)throw new Error('Invalid OID "'+i+'"; OID must be "'+s+'".');var o=t.ed25519PublicKey;if(o.length!==ce.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return pr({message:o,encoding:"binary"})};ce.publicKeyFromPrivateKey=function(e){e=e||{};var t=pr({message:e.privateKey,encoding:"binary"});if(t.length!==ce.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+ce.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new Et(ce.constants.PUBLIC_KEY_BYTE_LENGTH),n=0;n=0};function pr(e){var t=e.message;if(t instanceof Uint8Array||t instanceof Et)return t;var r=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),r="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,r);t=new Vo(t,r)}else if(!(t instanceof Vo))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var n=new Et(t.length()),a=0;a=32;--n){for(r=0,a=n-32,i=n-12;a>8,t[a]-=r*256;t[a]+=r,t[n]=0}for(r=0,a=0;a<32;++a)t[a]+=r-(t[31]>>4)*Uo[a],r=t[a]>>8,t[a]&=255;for(a=0;a<32;++a)t[a]-=r*Uo[a];for(n=0;n<32;++n)t[n+1]+=t[n]>>8,e[n]=t[n]&255}function Ko(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;lf(e,t)}function Ho(e,t){var r=Y(),n=Y(),a=Y(),i=Y(),s=Y(),o=Y(),u=Y(),l=Y(),c=Y();xn(r,e[1],e[0]),xn(c,t[1],t[0]),Ae(r,r,c),bn(n,e[0],e[1]),bn(c,t[0],t[1]),Ae(n,n,c),Ae(a,e[3],t[3]),Ae(a,a,sv),Ae(i,e[2],t[2]),bn(i,i,i),xn(s,n,r),xn(o,i,a),bn(u,i,a),bn(l,n,r),Ae(e[0],s,o),Ae(e[1],l,u),Ae(e[2],u,o),Ae(e[3],s,l)}function sf(e,t,r){for(var n=0;n<4;++n)pf(e[n],t[n],r)}function Go(e,t){var r=Y(),n=Y(),a=Y();mv(a,t[2]),Ae(r,t[0],a),Ae(n,t[1],a),Ei(e,n),e[31]^=ff(r)<<7}function Ei(e,t){var r,n,a,i=Y(),s=Y();for(r=0;r<16;++r)s[r]=t[r];for(Mo(s),Mo(s),Mo(s),n=0;n<2;++n){for(i[0]=s[0]-65517,r=1;r<15;++r)i[r]=s[r]-65535-(i[r-1]>>16&1),i[r-1]&=65535;i[15]=s[15]-32767-(i[14]>>16&1),a=i[15]>>16&1,i[14]&=65535,pf(s,i,1-a)}for(r=0;r<16;r++)e[2*r]=s[r]&255,e[2*r+1]=s[r]>>8}function fv(e,t){var r=Y(),n=Y(),a=Y(),i=Y(),s=Y(),o=Y(),u=Y();return Lr(e[2],Si),dv(e[1],t),Wr(a,e[1]),Ae(i,a,iv),xn(a,a,e[2]),bn(i,e[2],i),Wr(s,i),Wr(o,s),Ae(u,o,s),Ae(r,u,a),Ae(r,r,i),pv(r,r),Ae(r,r,a),Ae(r,r,i),Ae(r,r,i),Ae(e[0],r,i),Wr(n,e[0]),Ae(n,n,i),of(n,a)&&Ae(e[0],e[0],ov),Wr(n,e[0]),Ae(n,n,i),of(n,a)?-1:(ff(e[0])===t[31]>>7&&xn(e[0],Fo,e[0]),Ae(e[3],e[0],e[1]),0)}function dv(e,t){var r;for(r=0;r<16;++r)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function pv(e,t){var r=Y(),n;for(n=0;n<16;++n)r[n]=t[n];for(n=250;n>=0;--n)Wr(r,r),n!==1&&Ae(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}function of(e,t){var r=new Et(32),n=new Et(32);return Ei(r,e),Ei(n,t),cf(r,0,n,0)}function cf(e,t,r,n){return hv(e,t,r,n,32)}function hv(e,t,r,n,a){var i,s=0;for(i=0;i>>8)-1}function ff(e){var t=new Et(32);return Ei(t,e),t[0]&1}function df(e,t,r){var n,a;for(Lr(e[0],Fo),Lr(e[1],Si),Lr(e[2],Si),Lr(e[3],Fo),a=255;a>=0;--a)n=r[a/8|0]>>(a&7)&1,sf(e,t,n),Ho(t,e),Ho(e,e),sf(e,t,n)}function qo(e,t){var r=[Y(),Y(),Y(),Y()];Lr(r[0],nf),Lr(r[1],af),Lr(r[2],Si),Ae(r[3],nf,af),df(e,r,t)}function Lr(e,t){var r;for(r=0;r<16;r++)e[r]=t[r]|0}function mv(e,t){var r=Y(),n;for(n=0;n<16;++n)r[n]=t[n];for(n=253;n>=0;--n)Wr(r,r),n!==2&&n!==4&&Ae(r,r,t);for(n=0;n<16;++n)e[n]=r[n]}function Mo(e){var t,r,n=1;for(t=0;t<16;++t)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-n*65536;e[0]+=n-1+37*(n-1)}function pf(e,t,r){for(var n,a=~(r-1),i=0;i<16;++i)n=a&(e[i]^t[i]),e[i]^=n,t[i]^=n}function Y(e){var t,r=new Float64Array(16);if(e)for(t=0;t{var At=te();ye();Bt();la();vf.exports=At.kem=At.kem||{};var gf=At.jsbn.BigInteger;At.kem.rsa={};At.kem.rsa.create=function(e,t){t=t||{};var r=t.prng||At.random,n={};return n.encrypt=function(a,i){var s=Math.ceil(a.n.bitLength()/8),o;do o=new gf(At.util.bytesToHex(r.getBytesSync(s)),16).mod(a.n);while(o.compareTo(gf.ONE)<=0);o=At.util.hexToBytes(o.toString(16));var u=s-o.length;u>0&&(o=At.util.fillString(String.fromCharCode(0),u)+o);var l=a.encrypt(o,"NONE"),c=e.generate(o,i);return{encapsulation:l,key:c}},n.decrypt=function(a,i,s){var o=a.decrypt(i,"NONE");return e.generate(o,s)},n};At.kem.kdf1=function(e,t){yf(this,e,0,t||e.digestLength)};At.kem.kdf2=function(e,t){yf(this,e,1,t||e.digestLength)};function yf(e,t,r,n){e.generate=function(a,i){for(var s=new At.util.ByteBuffer,o=Math.ceil(i/n)+r,u=new At.util.ByteBuffer,l=r;l{var de=te();ye();Sf.exports=de.log=de.log||{};de.log.levels=["none","error","warning","info","debug","verbose","max"];var wi={},jo=[],ga=null;de.log.LEVEL_LOCKED=1<<1;de.log.NO_LEVEL_CHECK=1<<2;de.log.INTERPOLATE=1<<3;for(nr=0;nr"u"||t?e.flags|=de.log.LEVEL_LOCKED:e.flags&=~de.log.LEVEL_LOCKED};de.log.addLogger=function(e){jo.push(e)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(bf={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},ya=function(e,t){de.log.prepareStandard(t);var r=bf[t.level],n=[t.standard];n=n.concat(t.arguments.slice()),r.apply(console,n)},Sn=de.log.makeLogger(ya)):(ya=function(t,r){de.log.prepareStandardFull(r),console.log(r.standardFull)},Sn=de.log.makeLogger(ya)),de.log.setLevel(Sn,"debug"),de.log.addLogger(Sn),ga=Sn):console={log:function(){}};var Sn,bf,ya;ga!==null&&typeof window<"u"&&window.location&&(ma=new URL(window.location.href).searchParams,ma.has("console.level")&&de.log.setLevel(ga,ma.get("console.level").slice(-1)[0]),ma.has("console.lock")&&(xf=ma.get("console.lock").slice(-1)[0],xf=="true"&&de.log.lock(ga)));var ma,xf;de.log.consoleLogger=ga});var If=Q((KE,wf)=>{wf.exports=Xt();ri();mn();io();Po()});var Rf=Q((HE,Af)=>{var U=te();Ir();Ht();oa();Tr();Mr();bo();Bt();ye();yi();var E=U.asn1,gt=Af.exports=U.pkcs7=U.pkcs7||{};gt.messageFromPem=function(e){var t=U.pem.decode(e)[0];if(t.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var n=E.fromDer(t.body);return gt.messageFromAsn1(n)};gt.messageToPem=function(e,t){var r={type:"PKCS7",body:E.toDer(e.toAsn1()).getBytes()};return U.pem.encode(r,{maxline:t})};gt.messageFromAsn1=function(e){var t={},r=[];if(!E.validate(e,gt.asn1.contentInfoValidator,t,r)){var n=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw n.errors=r,n}var a=E.derToOid(t.contentType),i;switch(a){case U.pki.oids.envelopedData:i=gt.createEnvelopedData();break;case U.pki.oids.encryptedData:i=gt.createEncryptedData();break;case U.pki.oids.signedData:i=gt.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+a+" is not (yet) supported.")}return i.fromAsn1(t.content.value[0]),i};gt.createSignedData=function(){var e=null;return e={type:U.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(n){if(Xo(e,n,gt.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var a=e.rawCapture.certificates.value,i=0;i0&&s.value[0].value.push(E.create(E.Class.CONTEXT_SPECIFIC,0,!0,n)),i.length>0&&s.value[0].value.push(E.create(E.Class.CONTEXT_SPECIFIC,1,!0,i)),s.value[0].value.push(E.create(E.Class.UNIVERSAL,E.Type.SET,!0,e.signerInfos)),E.create(E.Class.UNIVERSAL,E.Type.SEQUENCE,!0,[E.create(E.Class.UNIVERSAL,E.Type.OID,!1,E.oidToDer(e.type).getBytes()),s])},addSigner:function(n){var a=n.issuer,i=n.serialNumber;if(n.certificate){var s=n.certificate;typeof s=="string"&&(s=U.pki.certificateFromPem(s)),a=s.issuer.attributes,i=s.serialNumber}var o=n.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof o=="string"&&(o=U.pki.privateKeyFromPem(o));var u=n.digestAlgorithm||U.pki.oids.sha1;switch(u){case U.pki.oids.sha1:case U.pki.oids.sha256:case U.pki.oids.sha384:case U.pki.oids.sha512:case U.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+u)}var l=n.authenticatedAttributes||[];if(l.length>0){for(var c=!1,f=!1,d=0;d0){for(var r=E.create(E.Class.CONTEXT_SPECIFIC,1,!0,[]),n=0;n=r&&a{var Xe=te();Ir();fn();ri();mn();ye();var Ti=_f.exports=Xe.ssh=Xe.ssh||{};Ti.privateKeyToPutty=function(e,t,r){r=r||"",t=t||"";var n="ssh-rsa",a=t===""?"none":"aes256-cbc",i="PuTTY-User-Key-File-2: "+n+`\r `;i+="Encryption: "+a+`\r `,i+="Comment: "+r+`\r `;var s=Xe.util.createBuffer();En(s,n),ar(s,e.e),ar(s,e.n);var o=Xe.util.encode64(s.bytes(),64),u=Math.floor(o.length/66)+1;i+="Public-Lines: "+u+`\r `,i+=o;var l=Xe.util.createBuffer();ar(l,e.d),ar(l,e.p),ar(l,e.q),ar(l,e.qInv);var c;if(!t)c=Xe.util.encode64(l.bytes(),64);else{var f=l.length()+16-1;f-=f%16;var d=Ii(l.bytes());d.truncate(d.length()-f+l.length()),l.putBuffer(d);var m=Xe.util.createBuffer();m.putBuffer(Ii("\0\0\0\0",t)),m.putBuffer(Ii("\0\0\0",t));var p=Xe.aes.createEncryptionCipher(m.truncate(8),"CBC");p.start(Xe.util.createBuffer().fillWithByte(0,16)),p.update(l.copy()),p.finish();var h=p.output;h.truncate(16),c=Xe.util.encode64(h.bytes(),64)}u=Math.floor(c.length/66)+1,i+=`\r Private-Lines: `+u+`\r `,i+=c;var C=Ii("putty-private-key-file-mac-key",t),b=Xe.util.createBuffer();En(b,n),En(b,a),En(b,r),b.putInt32(s.length()),b.putBuffer(s),b.putInt32(l.length()),b.putBuffer(l);var I=Xe.hmac.create();return I.start("sha1",C),I.update(b.bytes()),i+=`\r Private-MAC: `+I.digest().toHex()+`\r `,i};Ti.publicKeyToOpenSSH=function(e,t){var r="ssh-rsa";t=t||"";var n=Xe.util.createBuffer();return En(n,r),ar(n,e.e),ar(n,e.n),r+" "+Xe.util.encode64(n.bytes())+" "+t};Ti.privateKeyToOpenSSH=function(e,t){return t?Xe.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):Xe.pki.privateKeyToPem(e)};Ti.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||Xe.md.md5.create(),n="ssh-rsa",a=Xe.util.createBuffer();En(a,n),ar(a,e.e),ar(a,e.n),r.start(),r.update(a.getBytes());var i=r.digest();if(t.encoding==="hex"){var s=i.toHex();return t.delimiter?s.match(/.{2}/g).join(t.delimiter):s}else{if(t.encoding==="binary")return i.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return i};function ar(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var n=Xe.util.hexToBytes(r);e.putInt32(n.length),e.putBytes(n)}function En(e,t){e.putInt32(t.length),e.putString(t)}function Ii(){for(var e=Xe.md.sha1.create(),t=arguments.length,r=0;r{Nf.exports=te();Ir();Zc();Ht();Xa();oa();mf();fn();Cf();Ef();If();xo();oi();Mr();mo();wo();Rf();To();yo();so();hi();Bt();lo();Bf();ko();ye()});var qt,va,Lf=O(()=>{qt=zd(kf());zn();va=class{static async encrypt(t){let r=Mt()?.pk;if(r)try{let n=qt.default.pki.publicKeyFromPem(r),a=qt.default.random.getBytesSync(32),i=qt.default.cipher.createCipher("AES-GCM",a),s=qt.default.random.getBytesSync(12);i.start({iv:s}),i.update(qt.default.util.createBuffer(JSON.stringify(t),"utf8")),i.finish();let o=i.output.bytes(),u=i.mode.tag.bytes(),l=n.encrypt(a,"RSA-OAEP",{md:qt.default.md.sha256.create()});return{k:qt.default.util.encode64(l),i:qt.default.util.encode64(s),c:qt.default.util.encode64(o),t:qt.default.util.encode64(u)}}catch(n){throw console.error("Encryption failed:",n),new Error("Failed to encrypt data.")}else return JSON.stringify(t)}static secureEnv(){return Boolean(window.crypto?.subtle)}}});var Wt,Df=O(()=>{Wt=class{static timeExecution(t,r){return new Promise((n,a)=>{let i=Date.now();r().then(s=>{let u=Date.now()-i;this.timings[t]=u,n(s)}).catch(s=>{a(s)})})}static getTimings(){return{...this.timings}}static clearTimings(){this.timings={}}};Wt.timings={}});function wv(e){var t=e.appVersion;if(t.state!==Z.Success)return!1;if(/headless/i.test(t.value))return se.HeadlessChrome;if(/electron/i.test(t.value))return se.Electron;if(/slimerjs/i.test(t.value))return se.SlimerJS}function Ai(e,t){return e.indexOf(t)!==-1}function Dr(e,t){return e.indexOf(t)!==-1}function Iv(e,t){if("find"in e)return e.find(t);for(var r=0;r=5?vt.Chromium:wn(["ApplePayError"in r,"CSSPrimitiveValue"in r,"Counter"in r,n.vendor.indexOf("Apple")===0,"getStorageUpdates"in n,"WebKitMediaKeys"in r])>=4?vt.Webkit:wn(["buildID"in navigator,"MozAppearance"in((t=(e=document.documentElement)===null||e===void 0?void 0:e.style)!==null&&t!==void 0?t:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4?vt.Gecko:vt.Unknown}function Qo(){var e,t=(e=navigator.userAgent)===null||e===void 0?void 0:e.toLowerCase();return Dr(t,"wechat")?yt.WeChat:Dr(t,"firefox")?yt.Firefox:Dr(t,"opera")||Dr(t,"opr")?yt.Opera:Dr(t,"chrome")?yt.Chrome:Dr(t,"safari")?yt.Safari:Dr(t,"trident")||Dr(t,"msie")?yt.IE:yt.Unknown}function Rv(){var e=Ca(),t=e===vt.Chromium,r=e===vt.Gecko;if(!t&&!r)return!1;var n=window;return wn(["onorientationchange"in n,"orientation"in n,t&&!("SharedWorker"in n),r&&/android/i.test(navigator.appVersion)])>=2}function _v(){if(Ca()!==vt.Webkit)return!1;var e=window;return wn(["safari"in e,!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3}function Bv(){return document.hasFocus===void 0?!1:document.hasFocus()}function Nv(){var e=window;return wn([!("MediaSettingsRange"in e),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3}function kv(e){var t=e.evalLength;if(t.state===Z.Success){var r=t.value,n=Qo(),a=Ca();return r===37&&!Ai([vt.Webkit,vt.Gecko],a)||r===39&&!Ai([yt.IE],n)||r===33&&!Ai([vt.Chromium],a)}}function Lv(e){var t=e.functionBind;if(t.state===Z.NotFunction)return se.PhantomJS}function Dv(e){var t=e.languages;if(t.state===Z.Success&&t.value.length===0)return se.HeadlessChrome}function Pv(e){var t=e.mimeTypesConsistent;if(t.state===Z.Success&&!t.value)return se.Unknown}function Ov(e){var t=e.notificationPermissions,r=Qo();if(r!==yt.Chrome)return!1;if(t.state===Z.Success&&t.value)return se.HeadlessChrome}function Uv(e){var t=e.pluginsArray;if(t.state===Z.Success&&!t.value)return se.HeadlessChrome}function Mv(e){var t=e.pluginsLength;if(t.state===Z.Success){var r=Ca();if(!(r===vt.Chromium&&Rv()||r===vt.Webkit&&!_v())&&t.value===0)return se.HeadlessChrome}}function Vv(e){var t,r=e.process;if(r.state!==Z.Success)return!1;if(r.value.type==="renderer"||((t=r.value.versions)===null||t===void 0?void 0:t.electron)!=null)return se.Electron}function Fv(e){var t=e.productSub;if(t.state!==Z.Success)return!1;var r=Qo();if((r===yt.Chrome||r===yt.Safari||r===yt.Opera||r===yt.WeChat)&&t.value!=="20030107")return se.Unknown}function Kv(e){var t=e.userAgent;if(t.state!==Z.Success)return!1;if(/PhantomJS/i.test(t.value))return se.PhantomJS;if(/Headless/i.test(t.value))return se.HeadlessChrome;if(/Electron/i.test(t.value))return se.Electron;if(/slimerjs/i.test(t.value))return se.SlimerJS}function Hv(e){var t=e.webDriver;if(t.state===Z.Success&&t.value)return se.HeadlessChrome}function Gv(e){var t=e.webGL;if(t.state===Z.Success){var r=t.value,n=r.vendor,a=r.renderer;if(n=="Brian Paul"&&a=="Mesa OffScreen")return se.HeadlessChrome}}function qv(e){var t=e.windowExternal;if(t.state!==Z.Success)return!1;if(/Sequentum/i.test(t.value))return se.Sequentum}function Wv(e){var t=e.windowSize;if(t.state!==Z.Success)return!1;var r=t.value,n=r.outerWidth,a=r.outerHeight;if(Bv()&&n===0&&a===0)return se.HeadlessChrome}function zv(e){var t=e.distinctiveProps;if(t.state!==Z.Success)return!1;var r=t.value,n;for(n in r)if(r[n])return n}function Yv(){var e=navigator.appVersion;if(e==null)throw new Le(Z.Undefined,"navigator.appVersion is undefined");return e}function Xv(){if(document.documentElement===void 0)throw new Le(Z.Undefined,"document.documentElement is undefined");var e=document.documentElement;if(typeof e.getAttributeNames!="function")throw new Le(Z.NotFunction,"document.documentElement.getAttributeNames is not a function");return e.getAttributeNames()}function Zv(){try{null[0]()}catch(e){if(e instanceof Error&&e.stack!=null)return e.stack.toString()}throw new Le(Z.UnexpectedBehaviour,"errorTrace signal unexpected behaviour")}function Qv(){return eval.toString().length}function Jv(){if(Function.prototype.bind===void 0)throw new Le(Z.NotFunction,"Function.prototype.bind is undefined");return Function.prototype.bind.toString()}function $v(){var e=navigator,t=[],r=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(r!==void 0&&t.push([r]),Array.isArray(e.languages)){var n=Ca();n===vt.Chromium&&Nv()||t.push(e.languages)}else if(typeof e.languages=="string"){var a=e.languages;a&&t.push(a.split(","))}return t}function e1(){if(navigator.mimeTypes===void 0)throw new Le(Z.Undefined,"navigator.mimeTypes is undefined");for(var e=navigator.mimeTypes,t=Object.getPrototypeOf(e)===MimeTypeArray.prototype,r=0;r=.001))try{var e=new XMLHttpRequest;e.open("get","https://m1.openfpcdn.io/botd/v".concat(Ev,"/npm-monitoring"),!0),e.send()}catch(t){console.error(t)}}function Of(e){var t=e===void 0?{}:e,r=t.monitoring,n=r===void 0?!0:r;return Xn(this,void 0,void 0,function(){var a;return Zn(this,function(i){switch(i.label){case 0:return n&&m1(),a=new h1,[4,a.collect()];case 1:return i.sent(),[2,a]}})})}var Ev,Z,se,Le,vt,yt,jv,p1,h1,Uf=O(()=>{Rs();Ev="1.5.0";(function(e){e[e.Success=0]="Success",e[e.Undefined=-1]="Undefined",e[e.NotFunction=-2]="NotFunction",e[e.UnexpectedBehaviour=-3]="UnexpectedBehaviour",e[e.Null=-4]="Null"})(Z||(Z={}));(function(e){e.Awesomium="awesomium",e.Cef="cef",e.CefSharp="cefsharp",e.CoachJS="coachjs",e.Electron="electron",e.FMiner="fminer",e.Geb="geb",e.NightmareJS="nightmarejs",e.Phantomas="phantomas",e.PhantomJS="phantomjs",e.Rhino="rhino",e.Selenium="selenium",e.Sequentum="sequentum",e.SlimerJS="slimerjs",e.WebDriverIO="webdriverio",e.WebDriver="webdriver",e.HeadlessChrome="headless_chrome",e.Unknown="unknown"})(se||(se={}));Le=function(e){Pu(t,e);function t(r,n){var a=e.call(this,n)||this;return a.state=r,a.name="BotdError",Object.setPrototypeOf(a,t.prototype),a}return t}(Error);(function(e){e.Unknown="unknown",e.Chromium="chromium",e.Gecko="gecko",e.Webkit="webkit"})(vt||(vt={}));(function(e){e.Unknown="unknown",e.Chrome="chrome",e.Firefox="firefox",e.Opera="opera",e.Safari="safari",e.IE="internet_explorer",e.WeChat="wechat"})(yt||(yt={}));jv={detectAppVersion:wv,detectDocumentAttributes:Tv,detectErrorTrace:Av,detectEvalLengthInconsistency:kv,detectFunctionBind:Lv,detectLanguagesLengthInconsistency:Dv,detectNotificationPermissions:Ov,detectPluginsArray:Uv,detectPluginsLengthInconsistency:Mv,detectProcess:Vv,detectUserAgent:Kv,detectWebDriver:Hv,detectWebGL:Gv,detectWindowExternal:qv,detectWindowSize:Wv,detectMimeTypesConsistent:Pv,detectProductSub:Fv,detectDistinctiveProperties:zv};p1={userAgent:o1,appVersion:Yv,rtt:s1,windowSize:f1,pluginsLength:n1,pluginsArray:r1,errorTrace:Zv,productSub:i1,windowExternal:c1,mimeTypesConsistent:e1,evalLength:Qv,webGL:l1,webDriver:u1,languages:$v,notificationPermissions:t1,documentElementKeys:Xv,functionBind:Jv,process:a1,distinctiveProps:d1},h1=function(){function e(){this.components=void 0,this.detections=void 0}return e.prototype.getComponents=function(){return this.components},e.prototype.getDetections=function(){return this.detections},e.prototype.getSources=function(){return p1},e.prototype.getDetectors=function(){return jv},e.prototype.detect=function(){if(this.components===void 0)throw new Error("BotDetector.detect can't be called before BotDetector.collect");var t=this.components,r=this.getDetectors(),n={},a={bot:!1};for(var i in r){var s=r[i],o=s(t),u={bot:!1};typeof o=="string"?u={bot:!0,botKind:o}:o&&(u={bot:!0,botKind:se.Unknown}),n[i]=u,u.bot&&(a=u)}return this.detections=n,a},e.prototype.collect=function(){return Xn(this,void 0,void 0,function(){var t,r,n,a=this;return Zn(this,function(i){switch(i.label){case 0:return t=this.getSources(),r={},n=Object.keys(t),[4,Promise.all(n.map(function(s){return Xn(a,void 0,void 0,function(){var o,u,l,c,f;return Zn(this,function(d){switch(d.label){case 0:o=t[s],d.label=1;case 1:return d.trys.push([1,3,,4]),u=r,l=s,f={},[4,o()];case 2:return u[l]=(f.value=d.sent(),f.state=Z.Success,f),[3,4];case 3:return c=d.sent(),c instanceof Le?r[s]={state:c.state,error:"".concat(c.name,": ").concat(c.message)}:r[s]={state:Z.UnexpectedBehaviour,error:c instanceof Error?"".concat(c.name,": ").concat(c.message):String(c)},[3,4];case 4:return[2]}})})}))];case 1:return i.sent(),this.components=r,[2,this.components]}})})},e}()});var Jo,Mf,Vf=O(()=>{Uf();br();Jo=class{static async detect(){try{return await(await Of()).detect()}catch(t){return it.addError("Bot prescreen failed",t),Promise.reject(t)}}},Mf=Jo});var $o,Ff,Kf=O(()=>{br();$o=class{static async detect(){try{return{webdriver:navigator?.webdriver!==void 0}}catch(t){return it.addError("Webdriver detection failed",t),Promise.reject(t)}}},Ff=$o});var Ot,e0=O(()=>{Au();zn();br();Ts();ll();fl();pl();hl();ml();Ws();Lf();Df();Vf();Kf();rn.defaults.withCredentials=!0;Ot=class{static async formatRequest(t,r){try{t=`s_${t}`;let n=await va.encrypt(r);return JSON.stringify({type:t,data:n})}catch{}return JSON.stringify({type:t,data:r})}static async post(t,r,n,a,i,s){try{let o=Mt()?.api?.baseUrl;if(!o)throw console.error("Internal honeypot error: missing base url"),new Error("Missing base URL");let u=`${o}${t}`,l={identity:jn.getIdentity(),identities:jn.getIdentities()},c=new URLSearchParams(window.location.search).get("hp-passport");try{l={...l,...await Sr.get()}}catch{}let f=!navigator.geolocation.getCurrentPosition.toString().includes("[native code]")||window?.geoLocationStorage!==void 0,d=a||[];f&&d.push("blsf");let m={};try{let[b,I,S,_,B,N]=await Promise.all([Wt.timeExecution("bot",Mf.detect),Wt.timeExecution("languages",cl.get),Wt.timeExecution("performance",dl.get),Wt.timeExecution("screen",ta.get),Wt.timeExecution("timezone",ra.get),Wt.timeExecution("webdriver",Ff.detect)]);m={cbt:b,languages:I,performanceInfo:S,screen:_,timezone:B,webdriver:N}}catch{}let p={...n,...l,...m,session_id:i,device_id:s,library_version:ja,ctags:d,...c&&{passport:c}},h=await Ot.formatRequest(r,p);return(await rn.post(u,h,{headers:{"Content-Type":"application/json;charset=UTF-8"}})).data}catch(o){throw it.addError("Failed to communicate with the backend server"),Ot.postError(o),o}}static async postError(t){try{let n=Mt()?.api?.routes?.errors;if(!n)return;let a=await Ot.formatRequest("error",{message:t}),i=await rn.post(n,a,{headers:{"Content-Type":"application/json;charset=UTF-8"}})}catch{console.error("error HP10002")}}}});var Ri,t0=O(()=>{Ri=(e,t,r,n)=>{let a=0,i=s=>{try{let o=new URLSearchParams(window.location.search).has("hpdebug");(n?.debug===!0||o)&&console.log(`[hp] ${s}`)}catch{}};return{name:"honeypot-enrichment",type:"before",setup:async s=>{try{s.userId&&(n?.trackIdentities?(i(`setting user_id: ${s.userId}`),await r(s.userId)):i(`ignoring user_id since trackIdentities is set to false: ${s.userId}`))}catch{}let o=await t();i(`initialized plugin. honey=${JSON.stringify(o)}`)},execute:async s=>{try{let{user_id:o,event_type:u}=s;try{o&&(n?.trackIdentities?(i(`processing identify event: ${o}`),await r(o)):i(`ignoring identify event since trackIdentities is set to false: ${o}`))}catch{}let c=u.startsWith("[Amplitude] ")?u.replace("[Amplitude] ",""):u;a=a+1;let f=!1;if(n?.excludeEvents?.includes(c)||n?.includeEvents?.length&&!n?.includeEvents.includes(c)){if(n?.enrichEventProperties){let p={ignored:!0};s.event_properties={...s.event_properties,honey:p}}return i(`ignoring event: ${u}`),s}f||(i(`tracking event: ${u}`),await e(u,s.event_properties));let m=await t();return m?.geofenced&&m?.redirect_auto?(i(`dropping event: ${u}`),null):(n?.enrichEventProperties&&(s.event_properties={...s.event_properties,honey:m},i(`enriching event: ${u}. ${JSON.stringify(s.event_properties)}`)),s)}catch{return s}}}}});var r0,g1,Hf=O(()=>{t0();r0=class{constructor(){this.config=null;this.honey=null;this.id=[];this.q=[];this.didInit=!1;this.didLoad=!1;this.callbacks={};this.geofenced=!1;this._geoCaptcha=!1}setup(t){this.config=t}amplitudePlugin(t){return Ri(this.track.bind(this),this.get.bind(this),this.identify.bind(this),t)}geofence(){window.honeypot?.geofence&&window.honeypot.geofence(),this.geofenced=!0}async geoCaptcha(){return new Promise((t,r)=>{let n=Date.now(),a=()=>{window.honeypot?.geoCaptcha?t(window.honeypot.geoCaptcha()):Date.now()-n>=5e3?r(new Error("GeoCaptcha not available: Honeypot SDK did not initialize in time.")):setTimeout(a,100)};a()})}ensureHoneypot(){window.honeypot||(window.honeypot={q:[],id:[]})}async identify(t,r,n){if(this.ensureHoneypot(),window.honeypot?.identify)window.honeypot.identify(t,r,n);else{let a={id:t,...r?{properties:r}:{},...n?{type:n}:{}};Array.isArray(window.honeypot.id)||(window.honeypot.id=[]),window.honeypot.id.push(a)}}on(t,r){this.ensureHoneypot(),window.honeypot.on?window.honeypot.on(t,r):(window.honeypot.callbacks[t]??=[]).push(r)}async flow(t,r){return this.ensureHoneypot(),new Promise((n,a)=>{let i=Date.now(),s=()=>{window&&window.honeypot&&this.didInit?n(window.honeypot.flow(t,r)):Date.now()-i>=5e3?a(new Error("Flow could not be created. Did you call the load() method first?")):setTimeout(s,100)};s()})}async track(t,r={}){this.ensureHoneypot();try{if(window.honeypot?.track)return window.honeypot.track(t,r);{let n=this.q||[];n.push([t,r]),this.q=n}}catch(n){this.config?.debug&&console.error("Error tracking event:",n)}}async init(){}maybeTime(t,r){if(this.config?.debug){if(r){console.timeEnd(t);return}console.time(t)}}load(t,r,n){return this.didLoad=!0,new Promise(a=>{let i=document.createElement("script");i.async=!0;let s=new URL(t),o=null,u=null;try{o=window.location.href}catch{}try{u=document.title}catch{}s.searchParams.append("url",o||"URL not available"),s.searchParams.append("title",u||"Title not available");try{if(window.honeypot&&Array.isArray(window.honeypot.q)){let f=window.honeypot.q.map(d=>d[0]);s.searchParams.append("events",JSON.stringify(f))}}catch(f){this.config?.debug&&console.error("Error appending event names to the script URL:",f)}try{let f=["hpdebug","hpgeotest"],d=new URLSearchParams(window.location.search);f.forEach(m=>{d.has(m)&&s.searchParams.append(m,d.get(m)||"")})}catch{}r&&(s.searchParams.append("identity",r),n&&s.searchParams.append("type",n));let l=new URLSearchParams(window.location.search).get("georef");l&&s.searchParams.append("georef",l),this.maybeTime("load honeypot");try{let f=window?.honeypot?.id;if(f){let d=null;Array.isArray(f)&&f.length>0?d=f[0]?.id:d=f?.id,d&&s.searchParams.append("identity",d)}}catch{}i.src=s.toString(),document.head.appendChild(i);let c=this.config;i.onload=()=>{this.didInit=!0,this.maybeTime("load honeypot",!0);try{window.honeypot&&(window.honeypot.config=c)}catch{}a(window.honeypot)}})}setSessionId(t){}setDeviceId(t){}async get(t){if(!this.didLoad&&this.config?.url)try{if(await this.load(this.config.url),window.honeypot)return window.honeypot.get()}catch{throw new Error("Failed to load")}else if(this.didLoad&&!this.didInit)return new Promise((r,n)=>{let a=Date.now(),i=()=>{window.honeypot&&window.honeypot.get?r(window.honeypot.get()):Date.now()-a>=2e3?n(new Error("Timeout: Honeypot SDK did not initialize in time.")):setTimeout(i,50)};i()});return new Promise((r,n)=>{(()=>{if(window.honeypot&&window.honeypot.honey)r(window.honeypot.honey);else{if(window.honeypot?.get)return window.honeypot.get();n(new Error("Honey not found"))}})()})}},g1=new r0});var ba,Gf=O(()=>{t0();ba=class{amplitudePlugin(t){return Ri(this.track.bind(this),this.get.bind(this),this.identify.bind(this),t)}}});var qf=O(()=>{Hf();Gf()});function x1(e){return e.nodeType===e.ELEMENT_NODE}function Sa(e){let t=e?.host;return Boolean(t?.shadowRoot===e)}function Ea(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function S1(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function E1(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Li(e){try{let t=e.rules||e.cssRules;return t?S1(Array.from(t,od).join("")):null}catch{return null}}function od(e){let t;if(I1(e))try{t=Li(e.styleSheet)||E1(e)}catch{}else if(T1(e)&&e.selectorText.includes(":"))return w1(e.cssText);return t||e.cssText}function w1(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function I1(e){return"styleSheet"in e}function T1(e){return"selectorText"in e}function A1(){return new Di}function g0({element:e,maskInputOptions:t,tagName:r,type:n,value:a,maskInputFn:i}){let s=a||"",o=n&&jr(n);return(t[r.toLowerCase()]||o&&t[o])&&(i?s=i(s,e):s="*".repeat(s.length)),s}function jr(e){return e.toLowerCase()}function R1(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;nu!==0))return!1}return!0}function y0(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?jr(t):null}function ud(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,a=r.pathname.match(n);return a?.[1]??null}function ld(){return _1++}function N1(e){if(e instanceof HTMLFormElement)return"form";let t=jr(e.tagName);return B1.test(t)?"div":t}function k1(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}function Pi(e,t){return(e||"").replace(L1,(r,n,a,i,s,o)=>{let u=a||s||o,l=n||i||"";if(!u)return r;if(D1.test(u)||P1.test(u))return`url(${l}${u}${l})`;if(O1.test(u))return`url(${l}${u}${l})`;if(u[0]==="/")return`url(${l}${k1(t)+u}${l})`;let c=t.split("/"),f=u.split("/");c.pop();for(let d of f)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${l}${c.join("/")}${l})`})}function V1(e,t){if(t.trim()==="")return t;let r=0;function n(i){let s,o=i.exec(t.substring(r));return o?(s=o[0],r+=s.length,s):""}let a=[];for(;n(M1),!(r>=t.length);){let i=n(U1);if(i.slice(-1)===",")i=Rn(e,i.substring(0,i.length-1)),a.push(i);else{let s="";i=Rn(e,i);let o=!1;for(;;){let u=t.charAt(r);if(u===""){a.push((i+s).trim());break}else if(o)u===")"&&(o=!1);else if(u===","){r+=1,a.push((i+s).trim());break}else u==="("&&(o=!0);s+=u,r+=1}}}return a.join(", ")}function Rn(e,t){return!t||t.trim()===""?t:Ki(e,t)}function F1(e){return Boolean(e.tagName==="svg"||e.ownerSVGElement)}function Ki(e,t){let r=Xf.get(e);if(r||(r=e.createElement("a"),Xf.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function cd(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?Rn(e,n):r==="srcset"?V1(e,n):r==="style"?Pi(n,Ki(e)):t==="object"&&r==="data"?Rn(e,n):n)}function fd(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function K1(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let a=e.classList[n];if(t.test(a))return!0}if(r)return e.matches(r)}catch{}return!1}function Oi(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Oi(e.parentNode,t,r):!1;for(let n=e.classList.length;n--;){let a=e.classList[n];if(t.test(a))return!0}return r?Oi(e.parentNode,t,r):!1}function dd(e,t,r,n){try{let a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(a===null)return!1;if(typeof t=="string"){if(n){if(a.closest(`.${t}`))return!0}else if(a.classList.contains(t))return!0}else if(Oi(a,t,n))return!0;if(r){if(n){if(a.closest(r))return!0}else if(a.matches(r))return!0}}catch{}return!1}function H1(e,t,r){let n=e.contentWindow;if(!n)return;let a=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){let o=setTimeout(()=>{a||(t(),a=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),a=!0,t()});return}let s="about:blank";if(n.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function G1(e,t,r){let n=!1,a;try{a=e.sheet}catch{return}if(a)return;let i=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}function q1(e,t){let{doc:r,mirror:n,blockClass:a,blockSelector:i,needsMask:s,inlineStylesheet:o,maskInputOptions:u={},maskTextFn:l,maskInputFn:c,dataURLOptions:f={},inlineImages:d,recordCanvas:m,keepIframeSrcFn:p,newlyAddedElement:h=!1}=t,C=W1(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Je.Document,childNodes:[],compatMode:e.compatMode}:{type:Je.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Je.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return j1(e,{doc:r,blockClass:a,blockSelector:i,inlineStylesheet:o,maskInputOptions:u,maskInputFn:c,dataURLOptions:f,inlineImages:d,recordCanvas:m,keepIframeSrcFn:p,newlyAddedElement:h,rootId:C});case e.TEXT_NODE:return z1(e,{doc:r,needsMask:s,maskTextFn:l,rootId:C});case e.CDATA_SECTION_NODE:return{type:Je.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:Je.Comment,textContent:e.textContent||"",rootId:C};default:return!1}}function W1(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function z1(e,t){var r;let{needsMask:n,maskTextFn:a,rootId:i}=t,s=e.parentNode&&e.parentNode.tagName,o=e.textContent,u=s==="STYLE"?!0:void 0,l=s==="SCRIPT"?!0:void 0;if(u&&o){try{e.nextSibling||e.previousSibling||(r=e.parentNode.sheet)!=null&&r.cssRules&&(o=Li(e.parentNode.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}o=Pi(o,Ki(t.doc))}return l&&(o="SCRIPT_PLACEHOLDER"),!u&&!l&&o&&n&&(o=a?a(o,e.parentElement):o.replace(/[\S]/g,"*")),{type:Je.Text,textContent:o||"",isStyle:u,rootId:i}}function j1(e,t){let{doc:r,blockClass:n,blockSelector:a,inlineStylesheet:i,maskInputOptions:s={},maskInputFn:o,dataURLOptions:u={},inlineImages:l,recordCanvas:c,keepIframeSrcFn:f,newlyAddedElement:d=!1,rootId:m}=t,p=K1(e,n,a),h=N1(e),C={},b=e.attributes.length;for(let S=0;SB.href===e.href),_=null;S&&(_=Li(S)),_&&(delete C.rel,delete C.href,C._cssText=Pi(_,S.href))}if(h==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let S=Li(e.sheet);S&&(C._cssText=Pi(S,Ki(r)))}if(h==="input"||h==="textarea"||h==="select"){let S=e.value,_=e.checked;C.type!=="radio"&&C.type!=="checkbox"&&C.type!=="submit"&&C.type!=="button"&&S?C.value=g0({element:e,type:y0(e),tagName:h,value:S,maskInputOptions:s,maskInputFn:o}):_&&(C.checked=_)}if(h==="option"&&(e.selected&&!s.select?C.selected=!0:delete C.selected),h==="canvas"&&c){if(e.__context==="2d")R1(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let S=e.toDataURL(u.type,u.quality),_=r.createElement("canvas");_.width=e.width,_.height=e.height;let B=_.toDataURL(u.type,u.quality);S!==B&&(C.rr_dataURL=S)}}if(h==="img"&&l){In||(In=r.createElement("canvas"),Yf=In.getContext("2d"));let S=e,_=S.currentSrc||S.getAttribute("src")||"",B=S.crossOrigin,N=()=>{S.removeEventListener("load",N);try{In.width=S.naturalWidth,In.height=S.naturalHeight,Yf.drawImage(S,0,0),C.rr_dataURL=In.toDataURL(u.type,u.quality)}catch(G){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?N():S.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${_}! Error: ${G}`)}S.crossOrigin==="anonymous"&&(B?C.crossOrigin=B:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?N():S.addEventListener("load",N)}if(h==="audio"||h==="video"){let S=C;S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime,S.rr_mediaPlaybackRate=e.playbackRate,S.rr_mediaMuted=e.muted,S.rr_mediaLoop=e.loop,S.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),p){let{width:S,height:_}=e.getBoundingClientRect();C={class:C.class,rr_width:`${S}px`,rr_height:`${_}px`}}h==="iframe"&&!f(C.src)&&(e.contentDocument||(C.rr_src=C.src),delete C.src);let I;try{customElements.get(h)&&(I=!0)}catch{}return{type:Je.Element,tagName:h,attributes:C,childNodes:[],isSVG:F1(e)||void 0,needBlock:p,rootId:m,isCustom:I}}function Be(e){return e==null?"":e.toLowerCase()}function Y1(e,t){if(t.comment&&e.type===Je.Comment)return!0;if(e.type===Je.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ud(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Be(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Be(e.attributes.name)==="application-name"||Be(e.attributes.rel)==="icon"||Be(e.attributes.rel)==="apple-touch-icon"||Be(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Be(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Be(e.attributes.property).match(/^(og|twitter|fb):/)||Be(e.attributes.name).match(/^(og|twitter):/)||Be(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Be(e.attributes.name)==="robots"||Be(e.attributes.name)==="googlebot"||Be(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Be(e.attributes.name)==="author"||Be(e.attributes.name)==="generator"||Be(e.attributes.name)==="framework"||Be(e.attributes.name)==="publisher"||Be(e.attributes.name)==="progid"||Be(e.attributes.property).match(/^article:/)||Be(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Be(e.attributes.name)==="google-site-verification"||Be(e.attributes.name)==="yandex-verification"||Be(e.attributes.name)==="csrf-token"||Be(e.attributes.name)==="p:domain_verify"||Be(e.attributes.name)==="verify-v1"||Be(e.attributes.name)==="verification"||Be(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function _n(e,t){let{doc:r,mirror:n,blockClass:a,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:u=!1,inlineStylesheet:l=!0,maskInputOptions:c={},maskTextFn:f,maskInputFn:d,slimDOMOptions:m,dataURLOptions:p={},inlineImages:h=!1,recordCanvas:C=!1,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:S=5e3,onStylesheetLoad:_,stylesheetLoadTimeout:B=5e3,keepIframeSrcFn:N=()=>!1,newlyAddedElement:G=!1}=t,{needsMask:W}=t,{preserveWhiteSpace:re=!0}=t;!W&&e.childNodes&&(W=dd(e,s,o,W===void 0));let ee=q1(e,{doc:r,mirror:n,blockClass:a,blockSelector:i,needsMask:W,inlineStylesheet:l,maskInputOptions:c,maskTextFn:f,maskInputFn:d,dataURLOptions:p,inlineImages:h,recordCanvas:C,keepIframeSrcFn:N,newlyAddedElement:G});if(!ee)return console.warn(e,"not serialized"),null;let ne;n.hasNode(e)?ne=n.getId(e):Y1(ee,m)||!re&&ee.type===Je.Text&&!ee.isStyle&&!ee.textContent.replace(/^\s+|\s+$/gm,"").length?ne=Ia:ne=ld();let q=Object.assign(ee,{id:ne});if(n.add(e,q),ne===Ia)return null;b&&b(e);let Ve=!u;if(q.type===Je.Element){Ve=Ve&&!q.needBlock,delete q.needBlock;let Ee=e.shadowRoot;Ee&&Ea(Ee)&&(q.isShadowHost=!0)}if((q.type===Je.Document||q.type===Je.Element)&&Ve){m.headWhitespace&&q.type===Je.Element&&q.tagName==="head"&&(re=!1);let Ee={doc:r,mirror:n,blockClass:a,blockSelector:i,needsMask:W,maskTextClass:s,maskTextSelector:o,skipChild:u,inlineStylesheet:l,maskInputOptions:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:m,dataURLOptions:p,inlineImages:h,recordCanvas:C,preserveWhiteSpace:re,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:_,stylesheetLoadTimeout:B,keepIframeSrcFn:N};if(!(q.type===Je.Element&&q.tagName==="textarea"&&q.attributes.value!==void 0))for(let fe of Array.from(e.childNodes)){let be=_n(fe,Ee);be&&q.childNodes.push(be)}if(x1(e)&&e.shadowRoot)for(let fe of Array.from(e.shadowRoot.childNodes)){let be=_n(fe,Ee);be&&(Ea(e.shadowRoot)&&(be.isShadow=!0),q.childNodes.push(be))}}return e.parentNode&&Sa(e.parentNode)&&Ea(e.parentNode)&&(q.isShadow=!0),q.type===Je.Element&&q.tagName==="iframe"&&H1(e,()=>{let Ee=e.contentDocument;if(Ee&&I){let fe=_n(Ee,{doc:Ee,mirror:n,blockClass:a,blockSelector:i,needsMask:W,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:m,dataURLOptions:p,inlineImages:h,recordCanvas:C,preserveWhiteSpace:re,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:_,stylesheetLoadTimeout:B,keepIframeSrcFn:N});fe&&I(e,fe)}},S),q.type===Je.Element&&q.tagName==="link"&&typeof q.attributes.rel=="string"&&(q.attributes.rel==="stylesheet"||q.attributes.rel==="preload"&&typeof q.attributes.href=="string"&&ud(q.attributes.href)==="css")&&G1(e,()=>{if(_){let Ee=_n(e,{doc:r,mirror:n,blockClass:a,blockSelector:i,needsMask:W,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:m,dataURLOptions:p,inlineImages:h,recordCanvas:C,preserveWhiteSpace:re,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:_,stylesheetLoadTimeout:B,keepIframeSrcFn:N});Ee&&_(e,Ee)}},B),q}function X1(e,t){let{mirror:r=new Di,blockClass:n="rr-block",blockSelector:a=null,maskTextClass:i="rr-mask",maskTextSelector:s=null,inlineStylesheet:o=!0,inlineImages:u=!1,recordCanvas:l=!1,maskAllInputs:c=!1,maskTextFn:f,maskInputFn:d,slimDOM:m=!1,dataURLOptions:p,preserveWhiteSpace:h,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:_,keepIframeSrcFn:B=()=>!1}=t||{};return _n(e,{doc:e,mirror:r,blockClass:n,blockSelector:a,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:o,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:f,maskInputFn:d,slimDOMOptions:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:p,inlineImages:u,recordCanvas:l,preserveWhiteSpace:h,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:_,keepIframeSrcFn:B,newlyAddedElement:!1})}function Ct(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}function Ta(e,t,r={}){let n=null,a=0;return function(...i){let s=Date.now();!a&&r.leading===!1&&(a=s);let o=t-(s-a),u=this;o<=0||o>t?(n&&(clearTimeout(n),n=null),a=s,e.apply(u,i)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{a=r.leading===!1?0:Date.now(),n=null,e.apply(u,i)},o))}}function Hi(e,t,r,n,a=window){let i=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,n?r:{set(s){setTimeout(()=>{r.set.call(this,s)},0),i&&i.set&&i.set.call(this,s)}}),()=>Hi(e,t,i||{},!0)}function kn(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],a=r(n);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=a,()=>{e[t]=n}}catch{return()=>{}}}function pd(e){var t,r,n,a,i,s;let o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o?.documentElement.scrollLeft||((r=(t=o?.body)==null?void 0:t.parentElement)==null?void 0:r.scrollLeft)||((n=o?.body)==null?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:o?.documentElement.scrollTop||((i=(a=o?.body)==null?void 0:a.parentElement)==null?void 0:i.scrollTop)||((s=o?.body)==null?void 0:s.scrollTop)||0}}function hd(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function md(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function gd(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function bt(e,t,r,n){if(!e)return!1;let a=gd(e);if(!a)return!1;try{if(typeof t=="string"){if(a.classList.contains(t)||n&&a.closest("."+t)!==null)return!0}else if(Oi(a,t,n))return!0}catch{}return!!(r&&(a.matches(r)||n&&a.closest(r)!==null))}function Z1(e,t){return t.getId(e)!==-1}function n0(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===Ia}function yd(e,t){if(Sa(e))return!1;let r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?yd(e.parentNode,t):!0:!0}function i0(e){return Boolean(e.changedTouches)}function Q1(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function vd(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function Cd(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function s0(e){return Boolean(e?.shadowRoot)}function bd(e){var t,r;let n=null;return((r=(t=e.getRootNode)==null?void 0:t.call(e))==null?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(n=e.getRootNode().host),n}function J1(e){let t=e,r;for(;r=bd(t);)t=r;return t}function $1(e){let t=e.ownerDocument;if(!t)return!1;let r=J1(e);return t.contains(r)}function xd(e){let t=e.ownerDocument;return t?t.contains(e)||$1(e):!1}function Qf(e){return"__ln"in e}function c0(e,t){e.delete(t),t.childNodes.forEach(r=>c0(e,r))}function $f(e,t,r){return e.length===0?!1:eC(e,t,r)}function eC(e,t,r){let n=t.parentNode;for(;n;){let a=r.getId(n);if(e.some(i=>i.id===a))return!0;n=n.parentNode}return!1}function ed(e,t){return e.size===0?!1:Sd(e,t)}function Sd(e,t){let{parentNode:r}=t;return r?e.has(r)?!0:Sd(e,r):!1}function tC(e){wa=e}function rC(){wa=void 0}function Aa(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Ed(e,t){var r,n;let a=new l0;zr.push(a),a.init(e);let i=window.MutationObserver||window.__rrMutationObserver,s=(n=(r=window?.Zone)==null?void 0:r.__symbol__)==null?void 0:n.call(r,"MutationObserver");s&&window[s]&&(i=window[s]);let o=new i(ge(a.processMutations.bind(a)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function nC({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let a=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,s=[],o,u=Ta(ge(f=>{let d=Date.now()-o;e(s.map(m=>(m.timeOffset-=d,m)),f),s=[],o=null}),i),l=ge(Ta(ge(f=>{let d=Aa(f),{clientX:m,clientY:p}=i0(f)?f.changedTouches[0]:f;o||(o=Ui()),s.push({x:m,y:p,id:n.getId(d),timeOffset:Ui()-o}),u(typeof DragEvent<"u"&&f instanceof DragEvent?pe.Drag:f instanceof MouseEvent?pe.MouseMove:pe.TouchMove)}),a,{trailing:!1})),c=[Ct("mousemove",l,r),Ct("touchmove",l,r),Ct("drag",l,r)];return ge(()=>{c.forEach(f=>f())})}function aC({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:a,sampling:i}){if(i.mouseInteraction===!1)return()=>{};let s=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,o=[],u=null,l=c=>f=>{let d=Aa(f);if(bt(d,n,a,!0))return;let m=null,p=c;if("pointerType"in f){switch(f.pointerType){case"mouse":m=hr.Mouse;break;case"touch":m=hr.Touch;break;case"pen":m=hr.Pen;break}m===hr.Touch?wt[c]===wt.MouseDown?p="TouchStart":wt[c]===wt.MouseUp&&(p="TouchEnd"):hr.Pen}else i0(f)&&(m=hr.Touch);m!==null?(u=m,(p.startsWith("Touch")&&m===hr.Touch||p.startsWith("Mouse")&&m===hr.Mouse)&&(m=null)):wt[c]===wt.Click&&(m=u,u=null);let h=i0(f)?f.changedTouches[0]:f;if(!h)return;let C=r.getId(d),{clientX:b,clientY:I}=h;ge(e)({type:wt[p],id:C,x:b,y:I,...m!==null&&{pointerType:m}})};return Object.keys(wt).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&s[c]!==!1).forEach(c=>{let f=jr(c),d=l(c);if(window.PointerEvent)switch(wt[c]){case wt.MouseDown:case wt.MouseUp:f=f.replace("mouse","pointer");break;case wt.TouchStart:case wt.TouchEnd:return}o.push(Ct(f,d,t))}),ge(()=>{o.forEach(c=>c())})}function wd({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:a,sampling:i}){let s=ge(Ta(ge(o=>{let u=Aa(o);if(!u||bt(u,n,a,!0))return;let l=r.getId(u);if(u===t&&t.defaultView){let c=pd(t.defaultView);e({id:l,x:c.left,y:c.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return Ct("scroll",s,t)}function iC({viewportResizeCb:e},{win:t}){let r=-1,n=-1,a=ge(Ta(ge(()=>{let i=hd(),s=md();(r!==i||n!==s)&&(e({width:Number(s),height:Number(i)}),r=i,n=s)}),200));return Ct("resize",a,t)}function oC({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:a,ignoreClass:i,ignoreSelector:s,maskInputOptions:o,maskInputFn:u,sampling:l,userTriggeredOnInput:c}){function f(I){let S=Aa(I),_=I.isTrusted,B=S&&S.tagName;if(S&&B==="OPTION"&&(S=S.parentElement),!S||!B||sC.indexOf(B)<0||bt(S,n,a,!0)||S.classList.contains(i)||s&&S.matches(s))return;let N=S.value,G=!1,W=y0(S)||"";W==="radio"||W==="checkbox"?G=S.checked:(o[B.toLowerCase()]||o[W])&&(N=g0({element:S,maskInputOptions:o,tagName:B,type:W,value:N,maskInputFn:u})),d(S,c?{text:N,isChecked:G,userTriggered:_}:{text:N,isChecked:G});let re=S.name;W==="radio"&&re&&G&&t.querySelectorAll(`input[type="radio"][name="${re}"]`).forEach(ee=>{if(ee!==S){let ne=ee.value;d(ee,c?{text:ne,isChecked:!G,userTriggered:!1}:{text:ne,isChecked:!G})}})}function d(I,S){let _=td.get(I);if(!_||_.text!==S.text||_.isChecked!==S.isChecked){td.set(I,S);let B=r.getId(I);ge(e)({...S,id:B})}}let p=(l.input==="last"?["change"]:["input","change"]).map(I=>Ct(I,ge(f),t)),h=t.defaultView;if(!h)return()=>{p.forEach(I=>I())};let C=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),b=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&p.push(...b.map(I=>Hi(I[0],I[1],{set(){ge(f)({target:this,isTrusted:!1})}},!1,h))),ge(()=>{p.forEach(I=>I())})}function Mi(e){let t=[];function r(n,a){if(_i("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||_i("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||_i("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||_i("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let s=Array.from(n.parentRule.cssRules).indexOf(n);a.unshift(s)}else if(n.parentStyleSheet){let s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);a.unshift(s)}return a}return r(e,t)}function Pr(e,t,r){let n,a;return e?(e.ownerNode?n=t.getId(e.ownerNode):a=r.getId(e),{styleId:a,id:n}):{}}function uC({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let a=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:ge((c,f,d)=>{let[m,p]=d,{id:h,styleId:C}=Pr(f,t,r.styleMirror);return(h&&h!==-1||C&&C!==-1)&&e({id:h,styleId:C,adds:[{rule:m,index:p}]}),c.apply(f,d)})});let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ge((c,f,d)=>{let[m]=d,{id:p,styleId:h}=Pr(f,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,removes:[{index:m}]}),c.apply(f,d)})});let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:ge((c,f,d)=>{let[m]=d,{id:p,styleId:h}=Pr(f,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,replace:m}),c.apply(f,d)})}));let o;n.CSSStyleSheet.prototype.replaceSync&&(o=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:ge((c,f,d)=>{let[m]=d,{id:p,styleId:h}=Pr(f,t,r.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,replaceSync:m}),c.apply(f,d)})}));let u={};Bi("CSSGroupingRule")?u.CSSGroupingRule=n.CSSGroupingRule:(Bi("CSSMediaRule")&&(u.CSSMediaRule=n.CSSMediaRule),Bi("CSSConditionRule")&&(u.CSSConditionRule=n.CSSConditionRule),Bi("CSSSupportsRule")&&(u.CSSSupportsRule=n.CSSSupportsRule));let l={};return Object.entries(u).forEach(([c,f])=>{l[c]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(l[c].insertRule,{apply:ge((d,m,p)=>{let[h,C]=p,{id:b,styleId:I}=Pr(m.parentStyleSheet,t,r.styleMirror);return(b&&b!==-1||I&&I!==-1)&&e({id:b,styleId:I,adds:[{rule:h,index:[...Mi(m),C||0]}]}),d.apply(m,p)})}),f.prototype.deleteRule=new Proxy(l[c].deleteRule,{apply:ge((d,m,p)=>{let[h]=p,{id:C,styleId:b}=Pr(m.parentStyleSheet,t,r.styleMirror);return(C&&C!==-1||b&&b!==-1)&&e({id:C,styleId:b,removes:[{index:[...Mi(m),h]}]}),d.apply(m,p)})})}),ge(()=>{n.CSSStyleSheet.prototype.insertRule=a,n.CSSStyleSheet.prototype.deleteRule=i,s&&(n.CSSStyleSheet.prototype.replace=s),o&&(n.CSSStyleSheet.prototype.replaceSync=o),Object.entries(u).forEach(([c,f])=>{f.prototype.insertRule=l[c].insertRule,f.prototype.deleteRule=l[c].deleteRule})})}function Id({mirror:e,stylesheetManager:t},r){var n,a,i;let s=null;r.nodeName==="#document"?s=e.getId(r):s=e.getId(r.host);let o=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(i=(a=r.ownerDocument)==null?void 0:a.defaultView)==null?void 0:i.ShadowRoot,u=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return s===null||s===-1||!o||!u?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var l;return(l=u.get)==null?void 0:l.call(this)},set(l){var c;let f=(c=u.set)==null?void 0:c.call(this,l);if(s!==null&&s!==-1)try{t.adoptStyleSheets(l,s)}catch{}return f}}),ge(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))}function lC({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:a}){let i=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ge((o,u,l)=>{var c;let[f,d,m]=l;if(r.has(f))return i.apply(u,[f,d,m]);let{id:p,styleId:h}=Pr((c=u.parentRule)==null?void 0:c.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,set:{property:f,value:d,priority:m},index:Mi(u.parentRule)}),o.apply(u,l)})});let s=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:ge((o,u,l)=>{var c;let[f]=l;if(r.has(f))return s.apply(u,[f]);let{id:d,styleId:m}=Pr((c=u.parentRule)==null?void 0:c.parentStyleSheet,t,n.styleMirror);return(d&&d!==-1||m&&m!==-1)&&e({id:d,styleId:m,remove:{property:f},index:Mi(u.parentRule)}),o.apply(u,l)})}),ge(()=>{a.CSSStyleDeclaration.prototype.setProperty=i,a.CSSStyleDeclaration.prototype.removeProperty=s})}function cC({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:a,doc:i}){let s=ge(u=>Ta(ge(l=>{let c=Aa(l);if(!c||bt(c,t,r,!0))return;let{currentTime:f,volume:d,muted:m,playbackRate:p,loop:h}=c;e({type:u,id:n.getId(c),currentTime:f,volume:d,muted:m,playbackRate:p,loop:h})}),a.media||500)),o=[Ct("play",s(An.Play),i),Ct("pause",s(An.Pause),i),Ct("seeked",s(An.Seeked),i),Ct("volumechange",s(An.VolumeChange),i),Ct("ratechange",s(An.RateChange),i)];return ge(()=>{o.forEach(u=>u())})}function fC({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],a=new WeakMap,i=r.FontFace;r.FontFace=function(u,l,c){let f=new i(u,l,c);return a.set(f,{family:u,buffer:typeof l!="string",descriptors:c,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),f};let s=kn(t.fonts,"add",function(o){return function(u){return setTimeout(ge(()=>{let l=a.get(u);l&&(e(l),a.delete(u))}),0),o.apply(this,[u])}});return n.push(()=>{r.FontFace=i}),n.push(s),ge(()=>{n.forEach(o=>o())})}function dC(e){let{doc:t,mirror:r,blockClass:n,blockSelector:a,selectionCb:i}=e,s=!0,o=ge(()=>{let u=t.getSelection();if(!u||s&&u?.isCollapsed)return;s=u.isCollapsed||!1;let l=[],c=u.rangeCount||0;for(let f=0;f{}:kn(r.customElements,"define",function(a){return function(i,s,o){try{t({define:{name:i}})}catch{console.warn(`Custom element callback failed for ${i}`)}return a.apply(this,[i,s,o])}})}function hC(e,t){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:a,scrollCb:i,viewportResizeCb:s,inputCb:o,mediaInteractionCb:u,styleSheetRuleCb:l,styleDeclarationCb:c,canvasMutationCb:f,fontCb:d,selectionCb:m,customElementCb:p}=e;e.mutationCb=(...h)=>{t.mutation&&t.mutation(...h),r(...h)},e.mousemoveCb=(...h)=>{t.mousemove&&t.mousemove(...h),n(...h)},e.mouseInteractionCb=(...h)=>{t.mouseInteraction&&t.mouseInteraction(...h),a(...h)},e.scrollCb=(...h)=>{t.scroll&&t.scroll(...h),i(...h)},e.viewportResizeCb=(...h)=>{t.viewportResize&&t.viewportResize(...h),s(...h)},e.inputCb=(...h)=>{t.input&&t.input(...h),o(...h)},e.mediaInteractionCb=(...h)=>{t.mediaInteaction&&t.mediaInteaction(...h),u(...h)},e.styleSheetRuleCb=(...h)=>{t.styleSheetRule&&t.styleSheetRule(...h),l(...h)},e.styleDeclarationCb=(...h)=>{t.styleDeclaration&&t.styleDeclaration(...h),c(...h)},e.canvasMutationCb=(...h)=>{t.canvasMutation&&t.canvasMutation(...h),f(...h)},e.fontCb=(...h)=>{t.font&&t.font(...h),d(...h)},e.selectionCb=(...h)=>{t.selection&&t.selection(...h),m(...h)},e.customElementCb=(...h)=>{t.customElement&&t.customElement(...h),p(...h)}}function mC(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};hC(e,t);let n;e.recordDOM&&(n=Ed(e,e.doc));let a=nC(e),i=aC(e),s=wd(e),o=iC(e,{win:r}),u=oC(e),l=cC(e),c=()=>{},f=()=>{},d=()=>{},m=()=>{};e.recordDOM&&(c=uC(e,{win:r}),f=Id(e,e.doc),d=lC(e,{win:r}),e.collectFonts&&(m=fC(e)));let p=dC(e),h=pC(e),C=[];for(let b of e.plugins)C.push(b.observer(b.callback,r,b.options));return ge(()=>{zr.forEach(b=>b.reset()),n?.disconnect(),a(),i(),s(),o(),u(),l(),c(),f(),d(),m(),p(),h(),C.forEach(b=>b())})}function _i(e){return typeof window[e]<"u"}function Bi(e){return Boolean(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}function vC(e,t){let r=rd.get(e);return r||(r=new Map,rd.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Ni(e,t,r){if(e instanceof Array)return e.map(n=>Ni(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let n=e.constructor.name,a=yC(e);return{rr_type:n,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ni(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let n=e.constructor.name,{src:a}=e;return{rr_type:n,src:a}}else if(e instanceof HTMLCanvasElement){let n="HTMLImageElement",a=e.toDataURL();return{rr_type:n,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ni(e.data,t,r),e.width,e.height]};if(Rd(e,t)||typeof e=="object"){let n=e.constructor.name,a=Td(e,t,r);return{rr_type:n,index:a}}}}return e}function CC(e,t,r,n){let a=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of i)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!="function")continue;let o=kn(t.CanvasRenderingContext2D.prototype,s,function(u){return function(...l){return bt(this.canvas,r,n,!0)||setTimeout(()=>{let c=Ad(l,t,this);e(this.canvas,{type:Nn["2D"],property:s,args:c})},0),u.apply(this,l)}});a.push(o)}catch{let o=Hi(t.CanvasRenderingContext2D.prototype,s,{set(u){e(this.canvas,{type:Nn["2D"],property:s,args:[u],setter:!0})}});a.push(o)}return()=>{a.forEach(s=>s())}}function bC(e){return e==="experimental-webgl"?"webgl":e}function nd(e,t,r,n){let a=[];try{let i=kn(e.HTMLCanvasElement.prototype,"getContext",function(s){return function(o,...u){if(!bt(this,t,r,!0)){let l=bC(o);if("__context"in this||(this.__context=l),n&&["webgl","webgl2"].includes(l))if(u[0]&&typeof u[0]=="object"){let c=u[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return s.apply(this,[o,...u])}});a.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{a.forEach(i=>i())}}function ad(e,t,r,n,a,i,s){let o=[],u=Object.getOwnPropertyNames(e);for(let l of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;let c=kn(e,l,function(f){return function(...d){let m=f.apply(this,d);if(Td(m,s,this),"tagName"in this.canvas&&!bt(this.canvas,n,a,!0)){let p=Ad(d,s,this),h={type:t,property:l,args:p};r(this.canvas,h)}return m}});o.push(c)}catch{let c=Hi(e,l,{set(f){r(this.canvas,{type:t,property:l,args:[f],setter:!0})}});o.push(c)}return o}function xC(e,t,r,n,a){let i=[];return i.push(...ad(t.WebGLRenderingContext.prototype,Nn.WebGL,e,r,n,a,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...ad(t.WebGL2RenderingContext.prototype,Nn.WebGL2,e,r,n,a,t)),()=>{i.forEach(s=>s())}}function EC(e){let t;try{if(t=id&&(window.URL||window.webkitURL).createObjectURL(id),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+_d,{name:e?.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}function Ln(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:a="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:o=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:m,maskInputFn:p,maskTextFn:h,hooks:C,packFn:b,sampling:I={},dataURLOptions:S={},mousemoveWait:_,recordDOM:B=!0,recordCanvas:N=!1,recordCrossOriginIframes:G=!1,recordAfter:W=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:re=!1,collectFonts:ee=!1,inlineImages:ne=!1,plugins:q,keepIframeSrcFn:Ve=()=>!1,ignoreCSSAttributes:Ee=new Set([]),errorHandler:fe}=e;tC(fe);let be=G?window.parent===window:!0,H=!1;if(!be)try{window.parent.document&&(H=!1)}catch{H=!0}if(be&&!t)throw new Error("emit function is required");if(!be&&!H)return()=>{};_!==void 0&&I.mousemove===void 0&&(I.mousemove=_),zt.reset();let Ut=f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},jt=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};Q1();let Fe,De=0,Ke=X=>{for(let we of q||[])we.eventProcessor&&(X=we.eventProcessor(X));return b&&!H&&(X=b(X)),X};Ge=(X,we)=>{var ae;let ie=X;if(ie.timestamp=Ui(),(ae=zr[0])!=null&&ae.isFrozen()&&ie.type!==Ce.FullSnapshot&&!(ie.type===Ce.IncrementalSnapshot&&ie.data.source===pe.Mutation)&&zr.forEach(Ie=>Ie.unfreeze()),be)t?.(Ke(ie),we);else if(H){let Ie={type:"rrweb",event:Ke(ie),origin:window.location.origin,isCheckout:we};window.parent.postMessage(Ie,"*")}if(ie.type===Ce.FullSnapshot)Fe=ie,De=0;else if(ie.type===Ce.IncrementalSnapshot){if(ie.data.source===pe.Mutation&&ie.data.isAttachIframe)return;De++;let Ie=n&&De>=n,Te=r&&ie.timestamp-Fe.timestamp>r;(Ie||Te)&&ki(!0)}};let qe=X=>{Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Mutation,...X}})},Ze=X=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Scroll,...X}}),Qe=X=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.CanvasMutation,...X}}),$e=X=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.AdoptedStyleSheet,...X}}),Pe=new h0({mutationCb:qe,adoptedStyleSheetCb:$e}),Oe=new f0({mirror:zt,mutationCb:qe,stylesheetManager:Pe,recordCrossOriginIframes:G,wrappedEmit:Ge});for(let X of q||[])X.getMirror&&X.getMirror({nodeMirror:zt,crossOriginIframeMirror:Oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Oe.crossOriginIframeStyleMirror});let ze=new m0;a0=new p0({recordCanvas:N,mutationCb:Qe,win:window,blockClass:a,blockSelector:i,mirror:zt,sampling:I.canvas,dataURLOptions:S});let We=new d0({mutationCb:qe,scrollCb:Ze,bypassOptions:{blockClass:a,blockSelector:i,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:Ut,dataURLOptions:S,maskTextFn:h,maskInputFn:p,recordCanvas:N,inlineImages:ne,sampling:I,slimDOMOptions:jt,iframeManager:Oe,stylesheetManager:Pe,canvasManager:a0,keepIframeSrcFn:Ve,processedNodeManager:ze},mirror:zt});ki=(X=!1)=>{if(!B)return;Ge({type:Ce.Meta,data:{href:window.location.href,width:md(),height:hd()}},X),Pe.reset(),We.init(),zr.forEach(ae=>ae.lock());let we=X1(document,{mirror:zt,blockClass:a,blockSelector:i,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:Ut,maskTextFn:h,slimDOM:jt,dataURLOptions:S,recordCanvas:N,inlineImages:ne,onSerialize:ae=>{vd(ae,zt)&&Oe.addIframe(ae),Cd(ae,zt)&&Pe.trackLinkElement(ae),s0(ae)&&We.addShadowRoot(ae.shadowRoot,document)},onIframeLoad:(ae,ie)=>{Oe.attachIframe(ae,ie),We.observeAttachShadow(ae)},onStylesheetLoad:(ae,ie)=>{Pe.attachLinkElement(ae,ie)},keepIframeSrcFn:Ve});if(!we)return console.warn("Failed to snapshot the document");Ge({type:Ce.FullSnapshot,data:{node:we,initialOffset:pd(window)}},X),zr.forEach(ae=>ae.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Pe.adoptStyleSheets(document.adoptedStyleSheets,zt.getId(document))};try{let X=[],we=ie=>{var Ie;return ge(mC)({mutationCb:qe,mousemoveCb:(Te,Gi)=>Ge({type:Ce.IncrementalSnapshot,data:{source:Gi,positions:Te}}),mouseInteractionCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.MouseInteraction,...Te}}),scrollCb:Ze,viewportResizeCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.ViewportResize,...Te}}),inputCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Input,...Te}}),mediaInteractionCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.MediaInteraction,...Te}}),styleSheetRuleCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.StyleSheetRule,...Te}}),styleDeclarationCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.StyleDeclaration,...Te}}),canvasMutationCb:Qe,fontCb:Te=>Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Font,...Te}}),selectionCb:Te=>{Ge({type:Ce.IncrementalSnapshot,data:{source:pe.Selection,...Te}})},customElementCb:Te=>{Ge({type:Ce.IncrementalSnapshot,data:{source:pe.CustomElement,...Te}})},blockClass:a,ignoreClass:s,ignoreSelector:o,maskTextClass:u,maskTextSelector:l,maskInputOptions:Ut,inlineStylesheet:c,sampling:I,recordDOM:B,recordCanvas:N,inlineImages:ne,userTriggeredOnInput:re,collectFonts:ee,doc:ie,maskInputFn:p,maskTextFn:h,keepIframeSrcFn:Ve,blockSelector:i,slimDOMOptions:jt,dataURLOptions:S,mirror:zt,iframeManager:Oe,stylesheetManager:Pe,shadowDomManager:We,processedNodeManager:ze,canvasManager:a0,ignoreCSSAttributes:Ee,plugins:((Ie=q?.filter(Te=>Te.observer))==null?void 0:Ie.map(Te=>({observer:Te.observer,options:Te.options,callback:Gi=>Ge({type:Ce.Plugin,data:{plugin:Te.name,payload:Gi}})})))||[]},C)};Oe.addLoadListener(ie=>{try{X.push(we(ie.contentDocument))}catch(Ie){console.warn(Ie)}});let ae=()=>{ki(),X.push(we(document)),Fi=!0};return document.readyState==="interactive"||document.readyState==="complete"?ae():(X.push(Ct("DOMContentLoaded",()=>{Ge({type:Ce.DomContentLoaded,data:{}}),W==="DOMContentLoaded"&&ae()})),X.push(Ct("load",()=>{Ge({type:Ce.Load,data:{}}),W==="load"&&ae()},window))),()=>{X.forEach(ie=>ie()),ze.destroy(),Fi=!1,rC()}}catch(X){console.warn(X)}}var y1,v1,M,Wf,C1,b1,zf,Je,Di,jf,_1,B1,Ia,In,Yf,L1,D1,P1,O1,U1,M1,Xf,Tn,Zf,Ui,o0,Ce,pe,wt,hr,Nn,An,u0,Jf,l0,wa,ge,zr,sC,td,Vi,f0,d0,Bn,gC,xa,yC,rd,Td,Ad,Rd,_d,SC,id,p0,h0,m0,Ge,ki,a0,Fi,zt,sd,Bd=O(()=>{y1=Object.defineProperty,v1=(e,t,r)=>t in e?y1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,M=(e,t,r)=>(v1(e,typeof t!="symbol"?t+"":t,r),r),C1=Object.defineProperty,b1=(e,t,r)=>t in e?C1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zf=(e,t,r)=>(b1(e,typeof t!="symbol"?t+"":t,r),r),Je=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Je||{});Di=class{constructor(){zf(this,"idNodeMap",new Map),zf(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let a=this.nodeMetaMap.get(n);a&&this.nodeMetaMap.set(r,a)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};jf="__rrweb_original__";_1=1,B1=new RegExp("[^a-z0-9-_:]"),Ia=-2;L1=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,D1=/^(?:[a-z+]+:)?\/\//i,P1=/^www\..*/i,O1=/^(data:)([^,]*),(.*)/i;U1=/^[^ \t\n\r\u000c]+/,M1=/^[, \t\n\r\u000c]+/;Xf=new WeakMap;Tn=`Please stop import mirror directly. Instead of that,\r now you can use replayer.getMirror() to access the mirror instance of a replayer,\r or you can use record.mirror to access the mirror instance during recording.`,Zf={map:{},getId(){return console.error(Tn),-1},getNode(){return console.error(Tn),null},removeNodeFromMap(){console.error(Tn)},has(){return console.error(Tn),!1},reset(){console.error(Tn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Zf=new Proxy(Zf,{get(e,t,r){return t==="map"&&console.error(Tn),Reflect.get(e,t,r)}}));Ui=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ui=()=>new Date().getTime());o0=class{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};Ce=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Ce||{}),pe=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(pe||{}),wt=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(wt||{}),hr=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(hr||{}),Nn=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Nn||{}),An=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(An||{});u0=class{constructor(){M(this,"length",0),M(this,"head",null),M(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n`${e}@${t}`,l0=class{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,n=new u0,a=u=>{let l=u,c=Ia;for(;c===Ia;)l=l&&l.nextSibling,c=l&&this.mirror.getId(l);return c},i=u=>{if(!u.parentNode||!xd(u)||u.parentNode.tagName==="TEXTAREA")return;let l=Sa(u.parentNode)?this.mirror.getId(bd(u)):this.mirror.getId(u.parentNode),c=a(u);if(l===-1||c===-1)return n.addNode(u);let f=_n(u,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:d=>{vd(d,this.mirror)&&this.iframeManager.addIframe(d),Cd(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),s0(u)&&this.shadowDomManager.addShadowRoot(u.shadowRoot,this.doc)},onIframeLoad:(d,m)=>{this.iframeManager.attachIframe(d,m),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,m)=>{this.stylesheetManager.attachLinkElement(d,m)}});f&&(t.push({parentId:l,nextId:c,node:f}),r.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let u of this.movedSet)$f(this.removes,u,this.mirror)&&!this.movedSet.has(u.parentNode)||i(u);for(let u of this.addedSet)!ed(this.droppedSet,u)&&!$f(this.removes,u,this.mirror)||ed(this.movedSet,u)?i(u):this.droppedSet.add(u);let s=null;for(;n.length;){let u=null;if(s){let l=this.mirror.getId(s.value.parentNode),c=a(s.value);l!==-1&&c!==-1&&(u=s)}if(!u){let l=n.tail;for(;l;){let c=l;if(l=l.previous,c){let f=this.mirror.getId(c.value.parentNode);if(a(c.value)===-1)continue;if(f!==-1){u=c;break}else{let m=c.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let p=m.parentNode.host;if(this.mirror.getId(p)!==-1){u=c;break}}}}}}if(!u){for(;n.head;)n.removeNode(n.head.value);break}s=u.previous,n.removeNode(u.value),i(u.value)}let o={texts:this.texts.map(u=>{let l=u.node;return l.parentNode&&l.parentNode.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(l.parentNode),{id:this.mirror.getId(l),value:u.value}}).filter(u=>!r.has(u.id)).filter(u=>this.mirror.has(u.id)),attributes:this.attributes.map(u=>{let{attributes:l}=u;if(typeof l.style=="string"){let c=JSON.stringify(u.styleDiff),f=JSON.stringify(u._unchangedStyles);c.length!r.has(u.id)).filter(u=>this.mirror.has(u.id)),removes:this.removes,adds:t};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))}),M(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(t.childNodes,n=>n.textContent||"").join("")}),M(this,"processMutation",t=>{if(!n0(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let r=t.target.textContent;!bt(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:dd(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,gd(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=t.attributeName,a=t.target.getAttribute(n);if(n==="value"){let s=y0(r);a=g0({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:a,maskInputFn:this.maskInputFn})}if(bt(t.target,this.blockClass,this.blockSelector,!1)||a===t.oldValue)return;let i=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(a))if(!r.contentDocument)n="rr_src";else return;if(i||(i={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(t.target,i)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!fd(r.tagName,n)&&(i.attributes[n]=cd(this.doc,jr(r.tagName),jr(n),a),n==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let s=this.unattachedDoc.createElement("span");t.oldValue&&s.setAttribute("style",t.oldValue);for(let o of Array.from(r.style)){let u=r.style.getPropertyValue(o),l=r.style.getPropertyPriority(o);u!==s.style.getPropertyValue(o)||l!==s.style.getPropertyPriority(o)?l===""?i.styleDiff[o]=u:i.styleDiff[o]=[u,l]:i._unchangedStyles[o]=[u,l]}for(let o of Array.from(s.style))r.style.getPropertyValue(o)===""&&(i.styleDiff[o]=!1)}break}case"childList":{if(bt(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let n=this.mirror.getId(r),a=Sa(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);bt(t.target,this.blockClass,this.blockSelector,!1)||n0(r,this.mirror,this.slimDOMOptions)||!Z1(r,this.mirror)||(this.addedSet.has(r)?(c0(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||yd(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Jf(n,a)]?c0(this.movedSet,r):this.removes.push({parentId:a,id:n,isShadow:Sa(t.target)&&Ea(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}}),M(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(n0(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Jf(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);bt(t,this.blockClass,this.blockSelector,!1)||(t.childNodes.forEach(n=>this.genAdds(n)),s0(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};ge=e=>wa?(...r)=>{try{return e(...r)}catch(n){if(wa&&wa(n)===!0)return;throw n}}:e,zr=[];sC=["INPUT","TEXTAREA","SELECT"],td=new WeakMap;Vi=class{constructor(t){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,a){let i=n||this.getIdToRemoteIdMap(t),s=a||this.getRemoteIdToIdMap(t),o=i.get(r);return o||(o=this.generateIdFn(),i.set(r,o),s.set(o,r)),o}getIds(t,r){let n=this.getIdToRemoteIdMap(t),a=this.getRemoteIdToIdMap(t);return r.map(i=>this.getId(t,i,n,a))}getRemoteId(t,r,n){let a=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let i=a.get(r);return i||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(a=>this.getRemoteId(t,a,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},f0=class{constructor(t){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new Vi(ld)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Vi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var n,a;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=t.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(a=this.loadListener)==null||a.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let a=this.crossOriginIframeMap.get(t.source);if(!a)return;let i=this.transformCrossOriginEvent(a,r.data.event);i&&this.wrappedEmit(i,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case Ce.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let a=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,a),this.patchRootIdOnNode(r.data.node,a),{timestamp:r.timestamp,type:Ce.IncrementalSnapshot,data:{source:pe.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Ce.Meta:case Ce.Load:case Ce.DomContentLoaded:return!1;case Ce.Plugin:return r;case Ce.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case Ce.IncrementalSnapshot:switch(r.data.source){case pe.Mutation:return r.data.adds.forEach(a=>{this.replaceIds(a,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(a.node,t);let i=this.crossOriginIframeRootIdMap.get(t);i&&this.patchRootIdOnNode(a.node,i)}),r.data.removes.forEach(a=>{this.replaceIds(a,t,["parentId","id"])}),r.data.attributes.forEach(a=>{this.replaceIds(a,t,["id"])}),r.data.texts.forEach(a=>{this.replaceIds(a,t,["id"])}),r;case pe.Drag:case pe.TouchMove:case pe.MouseMove:return r.data.positions.forEach(a=>{this.replaceIds(a,t,["id"])}),r;case pe.ViewportResize:return!1;case pe.MediaInteraction:case pe.MouseInteraction:case pe.Scroll:case pe.CanvasMutation:case pe.Input:return this.replaceIds(r.data,t,["id"]),r;case pe.StyleSheetRule:case pe.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case pe.Font:return r;case pe.Selection:return r.data.ranges.forEach(a=>{this.replaceIds(a,t,["start","end"])}),r;case pe.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(a=>{this.replaceStyleIds(a,t,["styleId"])}),r}}return!1}replace(t,r,n,a){for(let i of a)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=t.getIds(n,r[i]):r[i]=t.getId(n,r[i]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Je.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}},d0=class{constructor(t){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Ea(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let n=Ed({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(wd({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Id({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){let n=this;this.restoreHandlers.push(kn(t.prototype,"attachShadow",function(a){return function(i){let s=a.call(this,i);return this.shadowRoot&&xd(this)&&n.addShadowRoot(this.shadowRoot,r),s}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Bn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gC=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(xa=0;xa>2],a+=Bn[(t[r]&3)<<4|t[r+1]>>4],a+=Bn[(t[r+1]&15)<<2|t[r+2]>>6],a+=Bn[t[r+2]&63];return n%3===2?a=a.substring(0,a.length-1)+"=":n%3===1&&(a=a.substring(0,a.length-2)+"=="),a},rd=new Map;Td=(e,t,r)=>{if(!e||!(Rd(e,t)||typeof e=="object"))return;let n=e.constructor.name,a=vC(r,n),i=a.indexOf(e);return i===-1&&(i=a.length,a.push(e)),i};Ad=(e,t,r)=>e.map(n=>Ni(n,t,r)),Rd=(e,t)=>{let n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(a=>typeof t[a]=="function");return Boolean(n.find(a=>e instanceof t[a]))};_d="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpCiAgICAgICAgcmV0dXJuIHRyYW5zcGFyZW50QmxvYk1hcC5nZXQoaWQpOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIHRyYW5zcGFyZW50QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICAgIHJldHVybiBiYXNlNjQ7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gIiI7CiAgICB9CiAgfQogIGNvbnN0IHdvcmtlciA9IHNlbGY7CiAgd29ya2VyLm9ubWVzc2FnZSA9IGFzeW5jIGZ1bmN0aW9uKGUpIHsKICAgIGlmICgiT2Zmc2NyZWVuQ2FudmFzIiBpbiBnbG9iYWxUaGlzKSB7CiAgICAgIGNvbnN0IHsgaWQsIGJpdG1hcCwgd2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMgfSA9IGUuZGF0YTsKICAgICAgY29uc3QgdHJhbnNwYXJlbnRCYXNlNjQgPSBnZXRUcmFuc3BhcmVudEJsb2JGb3IoCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0LAogICAgICAgIGRhdGFVUkxPcHRpb25zCiAgICAgICk7CiAgICAgIGNvbnN0IG9mZnNjcmVlbiA9IG5ldyBPZmZzY3JlZW5DYW52YXMod2lkdGgsIGhlaWdodCk7CiAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCIyZCIpOwogICAgICBjdHguZHJhd0ltYWdlKGJpdG1hcCwgMCwgMCk7CiAgICAgIGJpdG1hcC5jbG9zZSgpOwogICAgICBjb25zdCBibG9iID0gYXdhaXQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOwogICAgICBjb25zdCB0eXBlID0gYmxvYi50eXBlOwogICAgICBjb25zdCBhcnJheUJ1ZmZlciA9IGF3YWl0IGJsb2IuYXJyYXlCdWZmZXIoKTsKICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsKICAgICAgaWYgKCFsYXN0QmxvYk1hcC5oYXMoaWQpICYmIGF3YWl0IHRyYW5zcGFyZW50QmFzZTY0ID09PSBiYXNlNjQpIHsKICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOwogICAgICB9CiAgICAgIGlmIChsYXN0QmxvYk1hcC5nZXQoaWQpID09PSBiYXNlNjQpCiAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOwogICAgICB3b3JrZXIucG9zdE1lc3NhZ2UoewogICAgICAgIGlkLAogICAgICAgIHR5cGUsCiAgICAgICAgYmFzZTY0LAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodAogICAgICB9KTsKICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkOiBlLmRhdGEuaWQgfSk7CiAgICB9CiAgfTsKfSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1CWjFyN1JKRC5qcy5tYXAK",SC=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),id=typeof window<"u"&&window.Blob&&new Blob([SC(_d)],{type:"text/javascript;charset=utf-8"});p0=class{constructor(t){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(u,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(u)||this.pendingCanvasMutations.set(u,[]),this.pendingCanvasMutations.get(u).push(l)});let{sampling:r="all",win:n,blockClass:a,blockSelector:i,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,a,i),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,a,i,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,n,a,i){let s=nd(r,n,a,!0),o=new Map,u=new EC;u.onmessage=p=>{let{id:h}=p.data;if(o.set(h,!1),!("base64"in p.data))return;let{base64:C,type:b,width:I,height:S}=p.data;this.mutationCb({id:h,type:Nn["2D"],commands:[{property:"clearRect",args:[0,0,I,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:b}]},0,0]}]})};let l=1e3/t,c=0,f,d=()=>{let p=[];return r.document.querySelectorAll("canvas").forEach(h=>{bt(h,n,a,!0)||p.push(h)}),p},m=p=>{if(c&&p-c{var C;let b=this.mirror.getId(h);if(o.get(b)||h.width===0||h.height===0)return;if(o.set(b,!0),["webgl","webgl2"].includes(h.__context)){let S=h.getContext(h.__context);((C=S?.getContextAttributes())==null?void 0:C.preserveDrawingBuffer)===!1&&S.clear(S.COLOR_BUFFER_BIT)}let I=await createImageBitmap(h);u.postMessage({id:b,bitmap:I,width:h.width,height:h.height,dataURLOptions:i.dataURLOptions},[I])}),f=requestAnimationFrame(m)};f=requestAnimationFrame(m),this.resetObservers=()=>{s(),cancelAnimationFrame(f)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let a=nd(t,r,n,!1),i=CC(this.processMutation.bind(this),t,r,n),s=xC(this.processMutation.bind(this),t,r,n,this.mirror);this.resetObservers=()=>{a(),i(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;let a=n.map(s=>{let{type:o,...u}=s;return u}),{type:i}=n[0];this.mutationCb({id:r,type:i,commands:a}),this.pendingCanvasMutations.delete(t)}},h0=class{constructor(t){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new o0),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;let n={id:r,styleIds:[]},a=[];for(let i of t){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),a.push({styleId:s,rules:Array.from(i.rules||CSSRule,(o,u)=>({rule:od(o),index:u}))})),n.styleIds.push(s)}a.length>0&&(n.styles=a),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},m0=class{constructor(){M(this,"nodeMap",new WeakMap),M(this,"active",!1)}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(a=>a!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}},Fi=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Wf=e.contentWindow)==null?void 0:Wf.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}zt=A1();Ln.addCustomEvent=(e,t)=>{if(!Fi)throw new Error("please add custom event after start recording");Ge({type:Ce.Custom,data:{tag:e,payload:t}})};Ln.freezePage=()=>{zr.forEach(e=>e.freeze())};Ln.takeFullSnapshot=e=>{if(!Fi)throw new Error("please take full snapshot after start recording");ki(e)};Ln.mirror=zt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(sd||(sd={}))});var v0,wC,C0,Nd=O(()=>{e0();Bd();v0=class{constructor(){this.recordingEvents=[];this.batchInterval=1e4;this.intervalId=null}setEvent(t){this.event_name=t}maybeRecord(t){let n=t?.dataCapture?.sessionReplay,a=n?.maskAllInputs!==!1||!0;if(n?.enabled&&n?.id){this.startBatchSending(t);let i=Ln({maskAllInputs:a,emit:s=>{let o={recording_id:n.id,page_title:document.title,url:window.location.href,recording_data:s,timestamp:s?.timestamp,...this.event_name&&{event_name:this.event_name}};this.recordingEvents.push(o)}});window.addEventListener("unload",()=>{this.intervalId&&clearInterval(this.intervalId),this.sendBatch(t),i()})}}startBatchSending(t){this.intervalId=setInterval(()=>{this.sendBatch(t)},this.batchInterval)}async sendBatch(t){let r=t?.api?.routes?.sessionReplay;if(!r||this.recordingEvents.length===0)return;let n={events:[...this.recordingEvents]};try{console.log("Sending session recording batch"),this.recordingEvents=[],await Ot.post(r,"session_replay",n)}catch(a){console.error("Failed to send session recording batch:",a),this.recordingEvents.unshift(...n.events)}}},wC=new v0,C0=wC});var kd,Ld=O(()=>{kd=` /* Base styles */ .nicebox { color: black; width: 100%; font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif; font-size: 1.2em; height: 100%; line-height: 2em; top: 0; left: 0; position: fixed; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 1000; } .nicebox a, .nicebox button { color: #74716D; text-decoration: none; outline: none; } .nicebox a:hover, .nicebox a:focus { color: #c94e50; outline: none; } .nicebox__title { font-size: 1.5em; line-height: 2.5em; } .nicebox button { cursor: pointer; font-size: 1.2em; padding: 0.6em 1.2em; outline: none; border: none; color: #fff; background: #c94e50; position:relative; } .nicebox__overlay { position: absolute; z-index: 1; background: rgba(55, 58, 71, 0.9); width: 100%; height: 100%; top: 0; left: 0; opacity: 0; transition: opacity 0.3s ease-in-out; } .nicebox--open .nicebox__overlay { opacity: 1; pointer-events: auto; } .nicebox__content { width: 50%; max-width: 560px; min-width: 290px; background: #fff; padding: 2em 3em; text-align: center; position: relative; z-index: 5; opacity: 0; transform: scale(0.9); transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; } .nicebox--open .nicebox__content { opacity: 1; transform: scale(1); pointer-events: auto; } .nicebox__buttons { cursor: pointer; display: flex; gap: 10px; margin-top: 20px; justify-content: center; } /* fancy animation */ .nicebox.fancy.nicebox--open .nicebox__content, .nicebox.fancy.nicebox--close .nicebox__content { -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.fancy.nicebox--open .nicebox__content { -webkit-animation-name: fancy-anim-open; animation-name: fancy-anim-open; } .nicebox.fancy.nicebox--close .nicebox__content { -webkit-animation-name: fancy-anim-close; animation-name: fancy-anim-close; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-timing-function: ease-out; animation-timing-function: ease-out; } @-webkit-keyframes fancy-anim-open { 0% { opacity: 0; -webkit-transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 2.083333% { -webkit-transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 4.166667% { -webkit-transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 6.25% { -webkit-transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 8.333333% { -webkit-transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 10.416667% { -webkit-transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 12.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 14.583333% { -webkit-transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 16.666667% { -webkit-transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 18.75% { -webkit-transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 20.833333% { -webkit-transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 22.916667% { -webkit-transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 25% { -webkit-transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 27.083333% { -webkit-transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 29.166667% { -webkit-transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 31.25% { -webkit-transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 33.333333% { -webkit-transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 35.416667% { -webkit-transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 37.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 39.583333% { -webkit-transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 41.666667% { -webkit-transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 43.75% { -webkit-transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 45.833333% { -webkit-transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 47.916667% { -webkit-transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 50% { opacity: 1; -webkit-transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 52.083333% { -webkit-transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 54.166667% { -webkit-transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 56.25% { -webkit-transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 58.333333% { -webkit-transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 60.416667% { -webkit-transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 62.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 64.583333% { -webkit-transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 66.666667% { -webkit-transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 68.75% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 70.833333% { -webkit-transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 72.916667% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 75% { -webkit-transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 77.083333% { -webkit-transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 79.166667% { -webkit-transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 81.25% { -webkit-transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 83.333333% { -webkit-transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 85.416667% { -webkit-transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 87.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 89.583333% { -webkit-transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 91.666667% { -webkit-transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 93.75% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 95.833333% { -webkit-transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 97.916667% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 100% { opacity: 1; -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } } @keyframes fancy-anim-open { 0% { opacity: 0; -webkit-transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 2.083333% { -webkit-transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 4.166667% { -webkit-transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 6.25% { -webkit-transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 8.333333% { -webkit-transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 10.416667% { -webkit-transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 12.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 14.583333% { -webkit-transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 16.666667% { -webkit-transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 18.75% { -webkit-transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 20.833333% { -webkit-transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 22.916667% { -webkit-transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 25% { -webkit-transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 27.083333% { -webkit-transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 29.166667% { -webkit-transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 31.25% { -webkit-transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 33.333333% { -webkit-transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 35.416667% { -webkit-transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 37.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 39.583333% { -webkit-transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 41.666667% { -webkit-transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 43.75% { -webkit-transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 45.833333% { -webkit-transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 47.916667% { -webkit-transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 50% { opacity: 1; -webkit-transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 52.083333% { -webkit-transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 54.166667% { -webkit-transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 56.25% { -webkit-transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 58.333333% { -webkit-transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 60.416667% { -webkit-transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 62.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 64.583333% { -webkit-transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 66.666667% { -webkit-transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 68.75% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 70.833333% { -webkit-transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 72.916667% { -webkit-transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 75% { -webkit-transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 77.083333% { -webkit-transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 79.166667% { -webkit-transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 81.25% { -webkit-transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 83.333333% { -webkit-transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 85.416667% { -webkit-transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 87.5% { -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 89.583333% { -webkit-transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 91.666667% { -webkit-transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 93.75% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 95.833333% { -webkit-transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 97.916667% { -webkit-transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } 100% { opacity: 1; -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } } @-webkit-keyframes fancy-anim-close { 0% { opacity: 1; } 100% { opacity: 0; -webkit-transform: scale3d(0.8, 0.8, 1); } } @keyframes fancy-anim-close { 0% { opacity: 1; } 100% { opacity: 0; -webkit-transform: scale3d(0.8, 0.8, 1); transform: scale3d(0.8, 0.8, 1); } } /* simple animation */ .nicebox.simple.nicebox--open .nicebox__content, .nicebox.simple.nicebox--close .nicebox__content { animation-duration: 0.4s; animation-fill-mode: forwards; } .nicebox.simple.nicebox--open .nicebox__content { animation-name: simple-anim-open; animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1); } .nicebox.simple.nicebox--close .nicebox__content { animation-name: simple-anim-close; } @keyframes simple-anim-open { 0% { opacity: 0; transform: scale3d(0, 0, 1); } 100% { opacity: 1; transform: scale3d(1, 1, 1); } } @keyframes simple-anim-close { 0% { opacity: 1; } 100% { opacity: 0; transform: scale3d(0.5, 0.5, 1); } } /* Annie animation */ .nicebox.annie .nicebox__overlay { -webkit-transition-duration: 0.3s; transition-duration: 0.3s; } .nicebox.annie.nicebox--open .nicebox__content, .nicebox.annie.nicebox--close .nicebox__content { -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.annie.nicebox--open .nicebox__content { -webkit-animation-name: annie-anim-open; animation-name: annie-anim-open; } .nicebox.annie.nicebox--close .nicebox__content { -webkit-animation-name: annie-anim-close; animation-name: annie-anim-close; } .nicebox.annie.nicebox--open h2, .nicebox.annie.nicebox--open button { -webkit-animation: annie-anim-elem 0.3s both; animation: annie-anim-elem 0.3s both; } .nicebox.annie.nicebox--open h2 { -webkit-animation-delay: 0.05s; animation-delay: 0.05s; } .nicebox.annie.nicebox--open button { -webkit-animation-delay: 0.1s; animation-delay: 0.1s; } @-webkit-keyframes annie-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes annie-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes annie-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); } } @keyframes annie-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 50px, 0); transform: translate3d(0, 50px, 0); } } /* Inner elements animations */ @-webkit-keyframes annie-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes annie-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 25px, 0); transform: translate3d(0, 25px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } /* Cathy animation */ .nicebox.cathy .nicebox__overlay { -webkit-transition-duration: 0.4s; transition-duration: 0.4s; } .nicebox.cathy .nicebox__content { overflow: hidden; } .nicebox.cathy.nicebox--open .nicebox__content, .nicebox.cathy.nicebox--close .nicebox__content { -webkit-animation-duration: 0.4s; animation-duration: 0.4s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.cathy.nicebox--open .nicebox__content { -webkit-animation-name: cathy-anim-open; animation-name: cathy-anim-open; -webkit-animation-timing-function: cubic-bezier(0.7,0,0.3,1); animation-timing-function: cubic-bezier(0.7,0,0.3,1); } .nicebox.cathy.nicebox--close .nicebox__content { -webkit-animation-name: cathy-anim-close; animation-name: cathy-anim-close; } .nicebox.cathy.nicebox--open h2, .nicebox.cathy.nicebox--open p, .nicebox.cathy.nicebox--open input, .nicebox.cathy.nicebox--open button { -webkit-animation: cathy-anim-elem 0.4s both; animation: cathy-anim-elem 0.4s both; } .nicebox.cathy.nicebox--open h2 { -webkit-animation-delay: 0.27s; animation-delay: 0.27s; } .nicebox.cathy.nicebox--open p, .nicebox.cathy.nicebox--open input { -webkit-animation-delay: 0.25s; animation-delay: 0.25s; } .nicebox.cathy.nicebox--open button { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; } @-webkit-keyframes cathy-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, -400px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes cathy-anim-open { 0% { opacity: 0; -webkit-transform: translate3d(0, -400px, 0); transform: translate3d(0, -400px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes cathy-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); } } @keyframes cathy-anim-close { 0% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 100% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); transform: translate3d(0, 100px, 0); } } /* Inner elements animations */ @-webkit-keyframes cathy-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes cathy-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } /* Ken animation */ .nicebox.ken { -webkit-align-items: flex-start; align-items: flex-start; } .nicebox.ken.nicebox--open .nicebox__content, .nicebox.ken.nicebox--close .nicebox__content { opacity: 1; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } .nicebox.ken.nicebox--open .nicebox__content { -webkit-animation-name: ken-anim-open; animation-name: ken-anim-open; } .nicebox.ken.nicebox--close .nicebox__content { -webkit-animation-name: ken-anim-close; animation-name: ken-anim-close; } .nicebox.ken.nicebox--open h2, .nicebox.ken.nicebox--open button { -webkit-animation: ken-anim-elem 0.3s both; animation: anim-elem 0.3s both; } .nicebox.ken.nicebox--open h2 { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; } .nicebox.ken.nicebox--open button { -webkit-animation-delay: 0.05s; animation-delay: 0.05s; } @-webkit-keyframes ken-anim-open { 0% { -webkit-transform: translate3d(0, -100%, 0); } 100% { -webkit-transform: translate3d(0, 0, 0); } } @keyframes ken-anim-open { 0% { -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0); } 100% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } @-webkit-keyframes ken-anim-close { 0% { -webkit-transform: translate3d(0, 0, 0); } 100% { -webkit-transform: translate3d(0, -100%, 0); } } @keyframes ken-anim-close { 0% { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } 100% { -webkit-transform: translate3d(0, -100%, 0); transform: translate3d(0, -100%, 0); } } /* Inner elements animations */ @-webkit-keyframes ken-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes ken-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, -100px, 0); transform: translate3d(0, -100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } /* Alex animation */ .nicebox.alex { -webkit-align-items: flex-end; align-items: flex-end; } .nicebox.alex.nicebox--open .nicebox__content, .nicebox.alex.nicebox--close .nicebox__content { opacity: 1; -webkit-animation-duration: 0.3s; animation-duration: 0.3s; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; -webkit-transform-origin: 50% 100%; transform-origin: 50% 100%; -webkit-animation-timing-function: ease-in-out; animation-timing-function: ease-in-out; } .nicebox.alex.nicebox--open .nicebox__content { -webkit-animation-name: alex-anim-open; animation-name: alex-anim-open; } .nicebox.alex.nicebox--close .nicebox__content { -webkit-animation-name: alex-anim-close; animation-name: alex-anim-close; } .nicebox.alex.nicebox--open h2, .nicebox.alex.nicebox--open button { -webkit-animation: alex-anim-elem 0.3s both; animation: alex-anim-elem 0.3s both; } .nicebox.alex.nicebox--open h2 { -webkit-animation-delay: 0.15s; animation-delay: 0.15s; } .nicebox.alex.nicebox--open button { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; } @-webkit-keyframes alex-anim-open { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); } } @keyframes alex-anim-open { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); transform: perspective(1000px) rotate3d(1,0,0,90deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); transform: perspective(1000px) rotate3d(1,0,0,0deg); } } @-webkit-keyframes alex-anim-close { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); } } @keyframes alex-anim-close { 0% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,0deg); transform: perspective(1000px) rotate3d(1,0,0,0deg); } 100% { -webkit-transform: perspective(1000px) rotate3d(1,0,0,90deg); transform: perspective(1000px) rotate3d(1,0,0,90deg); } } /* Inner elements animations */ @-webkit-keyframes alex-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); } } @keyframes alex-anim-elem { 0% { opacity: 0; -webkit-transform: translate3d(0, 100px, 0); transform: translate3d(0, 100px, 0); } 100% { opacity: 1; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } } `});var Yr,Dd=O(()=>{Ld();Yr=class{static injectCSS(){let t="nicebox-styles";if(!document.getElementById(t)){let r=document.createElement("style");r.id=t,r.textContent=kd,document.head.appendChild(r)}}static cleanup(){if(this.modalContainer){this.modalContainer.classList.remove("nicebox--open"),this.modalContainer.classList.add("nicebox--close");let t=this.modalContainer.__config;setTimeout(()=>{this.modalContainer?.remove(),this.modalContainer=null,this.countdownInterval&&(clearInterval(this.countdownInterval),this.countdownInterval=null),t?.onDestroy?.()},300)}}static setLoading(t,r,n){let a=this.modalContainer?.querySelectorAll("button:not([disabled])");if(r){a?.forEach(s=>{s!==t&&(n?s.style.display="none":s.disabled=!0)});let i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("width","24"),i.setAttribute("height","24"),i.setAttribute("viewBox","0 0 24 24"),i.setAttribute("style",` position: absolute; top: -12px; right: -12px; `),i.innerHTML=` `,i.classList.add("loading-spinner"),t.appendChild(i)}else a?.forEach(s=>{n?s.style.display="":s.disabled=!1}),t.querySelector(".loading-spinner")?.remove()}static createModal(t){let r=document.createElement("div");r.__config=t,r.className="nicebox";let n=document.createElement("div");n.className="nicebox__overlay",r.appendChild(n);let a=document.createElement("div");a.className="nicebox__content",r.appendChild(a);let i=document.createElement("h2");if(i.textContent=t.title,i.className="nicebox__title",a.appendChild(i),t.description){let s=document.createElement("p");s.textContent=t.description,s.className="nicebox__description",a.appendChild(s)}if(t.timer){let s;t.showTimer&&(s=document.createElement("div"),s.className="nicebox__timer",s.style.position="absolute",s.style.top="10px",s.style.right="10px",a.appendChild(s));let o=()=>{let u=new Date,l=typeof t.timer=="string"?new Date(t.timer):t.timer,c=l?l.getTime()-u.getTime():0;if(c<=0){clearInterval(this.countdownInterval),t.timerExpiryLink?window.location.href=t.timerExpiryLink:this.cleanup();return}let f=Math.floor(c/1e3%60),d=Math.floor(c/(1e3*60)%60),m=Math.floor(c/(1e3*60*60)%24),p=Math.floor(c/(1e3*60*60*24));s&&(s.textContent=p>0?`${p}d ${m}h ${d}m`:m>0?`${m}h ${d}m`:`${d}m ${f}s`)};o(),this.countdownInterval=setInterval(o,1e3)}if(t.buttons?.length){let s=document.createElement("div");s.className="nicebox__buttons",t.buttons.forEach(o=>{let u=document.createElement("button");u.textContent=o.text;let l={setTitle:c=>{let f=this.modalContainer?.querySelector(".nicebox__title");f&&(f.textContent=c)},setDescription:c=>{let f=this.modalContainer?.querySelector(".nicebox__description");f&&(f.textContent=c)}};u.addEventListener("click",async()=>{if(!this.loading){this.loading=!0,this.setLoading(u,!0,o.hideOthersOnClick||!1);try{o?.click?(await o.click(l,o,u),this.cleanup()):o?.link=="close"?this.cleanup():o?.link&&(window.location.href=o?.link)}catch(c){let f=c?.message||"An unexpected error occurred. Please try again.";l.setDescription(f),console.error("Dialog error:",c)}finally{this.setLoading(u,!1,o.hideOthersOnClick||!1),this.loading=!1,u.disabled=!1,u.textContent=o?.text||u.textContent,o?.style&&Object.assign(u.style,o.style)}}}),o.style&&Object.assign(u.style,o.style),o.class&&u.classList.add(o.class),s.appendChild(u)}),a.appendChild(s)}return t.disallowOutsideClick?n.addEventListener("click",s=>s.stopPropagation()):n.addEventListener("click",this.cleanup.bind(this)),r}static fire(t){if(this.modalContainer)return;this.injectCSS(),this.cleanup();let r=this.createModal(t);t.animationClass&&r.classList.add(t.animationClass),document.body.appendChild(r),setTimeout(()=>{r.classList.add("nicebox--open")},0),this.modalContainer=r}};Yr.modalContainer=null,Yr.loading=!1,Yr.countdownInterval=null});var Ra,Pd=O(()=>{Ra=class{constructor(t){this.eventCallbacks=new Map;this.data=t}getState(){return this.data.state}isStarted(){return this.getState()!=="not started"}isCompleted(){return this.getState()==="completed"}_executeCallbacks(t){let r=this.eventCallbacks.get(t);if(r)for(let n of r)n(this)}setState(t,r){this.data.state=t,r&&(this.data.metadata=r),this._executeCallbacks("update")}start(t){return this.setState("started",t),this.data.start_time=new Date().getTime(),this.data.end_time=null,this}complete(t){return this.setState("completed",t),this.data.end_time=new Date().getTime(),this}clear(t){return this.setState("cleared",t),this.data.start_time=null,this.data.end_time=null,this._executeCallbacks("update"),this}on(t,r){let n=this.eventCallbacks.get(t)||[];n.push(r),this.eventCallbacks.set(t,n)}}});var Xr,Od=O(()=>{Pd();Xr=class{constructor(t){this.eventCallbacks=new Map;this.data=t,this.steps=new Map(t?.steps?.map(r=>[r.step_id,new Ra(r)]))}static async get(t,r){return new Xr({flow_id:t,instance_id:r,steps:[],state:"empty"})}getData(){return this.data}getState(){if(this.data?.state=="force completed")return this.data.state;if(!this.steps||this.steps.size==0)return"empty";let t=Array.from(this.steps.values()).some(n=>n.getState()==="started"),r=Array.from(this.steps.values()).every(n=>n.getState()==="completed");return t?"started":r?"completed":"not started"}isStarted(){return this.getState()!=="not started"}isCompleted(){let t=this.getState();return t==="completed"||t==="force completed"}step(t){let r=this.steps.get(t);if(!r){let n=new Ra({step_id:t,state:"not started"});this.steps.set(t,n);for(let[a,i]of this.eventCallbacks.entries())for(let s of i)n.on(a,s);r=n}return r}async complete(){try{this.setState("force completed")}catch(t){console.error("Error completing flow:",t)}}setState(t){this.data.state=t}clear(t=!1){if(this.setState("cleared"),t)for(let[r,n]of this.steps.entries())n.clear();return this}on(t,r){let n=this.eventCallbacks.get(t)||[];n.push(r),this.eventCallbacks.set(t,n);for(let[a,i]of this.steps.entries())i.on(t,r)}}});var b0,IC,mr,Ud=O(()=>{e0();zn();Ga();qf();qs();Ws();Ts();Nd();Dd();Od();new URLSearchParams(window.location.search).has("hpdebug")&&console.log(`hp${ja}`);b0=class extends ba{constructor(){super(...arguments);this.config=null;this.honey=null;this.id=null;this.sessionId=null;this.deviceId=null;this.q=[];this.didInit=!1;this.callbacks={};this.geofenceResults=null;this.intervalId=null;this.challengeInProgress=!1;this._ci=!1}setup(r){this.config=r}async _setup(r){Ru(r);try{C0.maybeRecord(r)}catch{et.debug("Error recording session")}et.setDebugMode(r?.debug===!0);try{this.didInit=!0;let n=window.navigator,a=this.maybeRescreen.bind(this);"connection"in n&&(n.connection||n?.mozConnection||n?.webkitConnection).addEventListener("change",()=>{et.debug("Connection changed"),a()}),r?.dataCapture?.consoleListener&&this.checkConsole()}catch(n){et.error("Could not setup Honeypot"),et.error(n)}}bubble(r){Yr.fire(r)}setSessionId(r){this.sessionId=r}setDeviceId(r){this.deviceId=r}async flow(r,n){try{let a=await Xr.get(r,n);return a.on("update",async i=>{a.data.state=a.getState(),await this.track(`${r} - ${i?.data?.step_id}`)}),a}catch(a){return console.log("Error fetching flow:",a.message),Promise.reject(a)}}async showChallenge(r){return this.challengeInProgress?Promise.reject("Challenge already in progress"):r?.allow?(this.challengeInProgress=!0,new Promise((n,a)=>{this.bubble({title:r?.title||"Error",description:r?.description||"You appear to be accessing this website from an unsupported region. To proceed, you'll need to share some more information about your location.",animationClass:r?.animation||"simple",disallowOutsideClick:!0,buttons:[{text:"Share location using browser",hideOthersOnClick:!0,style:{backgroundColor:r?.colors?.button||"white",color:r?.colors?.buttonText||"white",fontSize:"16px"},click:async(i,s,o)=>{try{i.setTitle("Requesting location..."),i.setDescription("Please grant access when prompted");let u=()=>new Promise((p,h)=>{navigator.geolocation.getCurrentPosition(p,async C=>{let b;switch(C.code){case C.PERMISSION_DENIED:b="You denied the request for Geolocation.";break;case C.POSITION_UNAVAILABLE:b="Location information is unavailable.";break;case C.TIMEOUT:b="The request to get your location timed out.";break;default:b="An unknown error occurred while fetching location.";break}let I=await this.track("__confirm",{error:C.code});p(I)})}),l=()=>new Promise((p,h)=>{let C=document.createElement("iframe");if(C.setAttribute("sandbox","allow-same-origin"),C.classList.add("hidden"),document.body.appendChild(C),!C.contentWindow){C.remove(),h(new Error("Iframe contentWindow is not available."));return}C.contentWindow.navigator.geolocation.getCurrentPosition(b=>{C.remove(),p(b)},async b=>{let I=await this.track("__confirm",{error:b.code});C.remove(),p(I)})}),[c,f]=await Promise.allSettled([u(),l()]);if(c.status==="rejected"&&f.status==="rejected")throw new Error("Failed to retrieve geolocation in both contexts.");i.setTitle("Confirming location..."),i.setDescription("Almost done");let d={p1:c.status==="fulfilled"?{latitude:c.value.coords.latitude,longitude:c.value.coords.longitude,accuracy:c.value.coords.accuracy,altitude:c.value.coords.altitude,altitudeAccuracy:c.value.coords.altitudeAccuracy,heading:c.value.coords.heading,speed:c.value.coords.speed}:null,p2:f.status==="fulfilled"?{latitude:f.value.coords.latitude,longitude:f.value.coords.longitude,accuracy:f.value.coords.accuracy,altitude:f.value.coords.altitude,altitudeAccuracy:f.value.coords.altitudeAccuracy,heading:f.value.coords.heading,speed:f.value.coords.speed}:null},m=await this.track("__confirm",d);m?.geofenced?(this.geofence(),n(m)):(await new Promise(p=>{setTimeout(()=>{i.setTitle("Success!"),i.setDescription("Your request was processed successfully."),s.text="Done",s.style={backgroundColor:"green"},p("ok")},2e3)}),n(m))}catch(u){i.setTitle("Error"),i.setDescription("An unexpected error occurred."),s.text="Redirecting",s.style={backgroundColor:"orange"},setTimeout(()=>{this.geofence(),a(u)},1e3)}}}]})})):await this.track("__confirm")}async checkConsole(){try{let r=(...a)=>{try{this._ci=!0,this.challengeInProgress&&(this.track("__confirm",{error:9}),this.geofence())}catch(i){et.error("Error in notify function:",i)}},n="_ci";console.debug(Object.defineProperties(new Error,{message:{get(){return r(n),""}},toString:{value(){return new Error().stack?.includes("toString@")&&r(n),""}}}))}catch(r){et.error("Error in listen method:",r)}}async identify(r,n={},a="account"){try{jn.setIdentity(r,n,a)}catch{}}async track(r,n={}){let a=Mt()?.api?.routes?.ping;if(!a)return Promise.reject("Internal honeypot error: no endpoint is configured");try{C0.setEvent(r)}catch{et.debug("Error setting event")}try{let s={event:{time:String(Date.now()),type:r,properties:n}};et.info("Payload"),et.info(JSON.stringify(s));let o=await Ot.post(a,"beacon",s,this._ci?["_ci"]:void 0,this.sessionId,this.deviceId);return this.honey=o?.honey,this.geofenceResults=o?.geofenceResults||null,this.processGeofenceResults(),this.get()}catch(i){return Promise.reject(i)}}async get(r){return r?await this.track("__empty"):this.honey?Promise.resolve(this.honey):Promise.reject("Honey not found")}async processPassport(){try{let r=Mt()?.api?.routes?.ping;return!r||!new URLSearchParams(window.location.search).has("hp-passport")?void 0:await new Promise((n,a)=>{this.bubble({title:"Check Passport",description:"Request a temporary passport",animationClass:"simple",disallowOutsideClick:!0,onDestroy:()=>n(!0),buttons:[{text:"Go",click:async(i,s,o)=>{try{let u=window.prompt("Enter the code you received"),c={event:{time:String(Date.now()),type:"__passport",properties:{code:u}}};if(i.setTitle("Verifying..."),i.setDescription("Please wait"),(await Ot.post(r,"beacon",c))?.status==="valid"){i.setTitle("Success!"),i.setDescription("Passport issued successfully");let d=new URL(window.location.href);d.searchParams.delete("hp-passport"),window.location.href=d.toString()}else{let d=await this.track("__confirm",{error:17});a(d)}}catch(u){let l=await this.track("__confirm",{error:17});a(u)}}}]})})}catch{}}async geoCaptcha(){try{let r=Mt()?.geoCaptcha;return r&&r?.title?await this.showChallenge(r):Promise.reject("GeoCaptcha not configured")}catch(r){return Promise.reject(r)}}processGeofenceResults(){if(!this.geofenceResults)return;let r=this.geofenceResults;if(r?.redirectUrl&&r?.challenge?.allow||new URLSearchParams(window.location.search).has("hpdebug-challenge")){let n=this.geofenceResults?.challenge||{};this.showChallenge(n)}else r?.redirectUrl&&r?.autoRedirect&&this.geofence();r?.rescreenEnabled&&r?.rescreenFrequencySeconds&&r.rescreenFrequencySeconds>=1?this.startRescreening(r.rescreenFrequencySeconds):this.stopRescreening()}async maybeRescreen(){return this.geofenceResults?.rescreenEnabled?await this.track("__rescreen"):Promise.resolve("skipped")}startRescreening(r){let n=this.maybeRescreen.bind(this);this.intervalId||(this.intervalId=setInterval(async()=>{let a=await n();et.info("Schedule results"),et.info(JSON.stringify(a))},r*1e3))}stopRescreening(){try{this.intervalId!==null&&(clearInterval(this.intervalId),this.intervalId=null)}catch{}}geofence(){try{let r=this.geofenceResults?.redirectUrl;r&&xt.isValidUrlOrPath(r)&&!xt.onRedirectPage(r)&&window.location.pathname!="/geo-unavailable"&&(window.location.href=r+"?georef="+this.geofenceResults?.ref)}catch{}}},IC=new b0,mr=IC});var TC=Q((Zw,Md)=>{Ud();window&&(window.honeypot&&(mr.id=window.honeypot.id||null,mr.config=window.honeypot.config||{},mr.q=window.honeypot.q||[],mr.fq=window.honeypot.fq||[],mr.callbacks=window.honeypot.callbacks||{},mr.geofenced=window.honeypot.geofenced||!1),window.honeypot=mr);Md.exports={honeypot:mr}});TC();})(); (async () => { await honeypot._setup({"api":{"baseUrl":"https://nternow-prod-as0n1.quill.run","routes":{"ping":"/58sj3ae84cd6","sessionReplay":"/9854wrdkhsue"}},"dataCapture":{"consoleListener":true,"sessionReplay":{"enabled":false,"id":"4022a761-e88d-4075-b3e4-3dc8648e996d","endpoint":"https://nternow-prod-as0n1.quill.run/"}},"pk":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkZZsv5bbSPByg4a3vE31\nnMEjdy0Pbt6Z4txa4lCgHxBBEk6QptrqTA3PBpJrrUcxpQ9xLOhRAYtWzanWf5OF\n1OxkdjCX2o7yOtVN0FfBj7OfVBH7zLztUShvduaKbqH6xNuS8fB7f8fImfzRBAv4\nZFouKETsjof+cw4VoQG0KxEbuXFkmAB8s1Rfc7nKR/C3KLEOgKrz8kOP6Lk1hmNt\nVaERLRLehLZI0qVesYSlotHeLQI6I86ef0Q7wRX3iXe1cUphR1aWKUwUcRUfeuqL\nXUVBi0Rt7PuE3c0m4nBVHxXXxaLeZV744QCvZ47HqoRJSYg+euaeXIRho7WjQRI2\nhQIDAQAB\n-----END PUBLIC KEY-----\n","geoCaptcha":{"animation":"simple","title":"Error","description":"You appear to be accessing this website from an unsupported region. To proceed, you'll need to share some more information about your location.","expiry_minutes":1440,"colors":{"button":"#2081E2"},"enabled":false,"allow":true}}); honeypot.honey = {"org_id":"549220db-8567-475d-a375-bbb61bffdc31","honeypot_name":"nternow-prod-as0n1","event_id":"fb622560-344d-40e2-9f28-50cf2bbe391a","events":["Page View"],"event_name":"Page View","event_time":"2025-04-30T07:00:48.621Z","ip_address":"3.147.72.3","ip_address_connecting":"3.147.72.3","ip_address_forwarded_for":null,"asn":16509,"as_organization":"Amazon.com","verified_bot_category":null,"unverified_bot_category":null,"city_name":"Columbus","country_name":"United States","country_code":"US","continent":"NA","region_name":"Ohio","region_code":"OH","latitude":39.9625,"longitude":-83.0061,"timezone":"America/New_York","identity_type":"unknown","identities":[],"handprint_id":"601bb14b-ccff-49dc-a1f3-b262f317ec4e","device_id":"601bb14b-ccff-49dc-a1f3-b262f317ec4e","session_id":"05589a3a-26f2-4337-a2e6-5954371cb7a8","ref":"4022a761-e88d-4075-b3e4-3dc8648e996d","referer":null,"ua":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","browser_name":"WebKit","browser_version":"537.36","browser_major":"537","engine_name":"WebKit","engine_version":"537.36","os_name":null,"os_version":null,"device_vendor":null,"device_model":null,"device_type":null,"cpu_architecture":null,"timezone_browser":"America/New_York","current_tags":["hosting_provider"],"session_tags":["hosting_provider"],"last_event_name":null,"last_event_date":"2025-04-30T07:00:48.621Z","seconds_since_last_event":0,"session_start_date":"2025-04-30T07:00:48.621Z","seconds_since_session_start":0,"session_total_event_count":1,"last_identity":{},"session_ips":["3.147.72.3"],"session_ip_count":1,"last_ip_address":"","last_connection_type":null,"last_asn":null,"last_as_organization":null,"last_city_name":null,"last_country_name":null,"last_country_code":null,"last_region_name":null,"last_timezone_browser":null,"last_timezone_ip":null,"tag_metadata":{},"connection_type":1,"geofence_vpn_rescreen_frequency_seconds":3,"geofence_triggered":false,"redirect_url":"","redirect_auto":false,"geofence_test_only":false,"geo_challenge_status":0,"geofence_event_count":0,"dynamic_features":{},"geofenced":false}; honeypot.geofenceResults = {"autoRedirect":false,"redirectUrl":null,"ref":null,"rescreenFrequencySeconds":-1,"challenge":{"animation":"simple","title":"Error","description":"You appear to be accessing this website from an unsupported region. To proceed, you'll need to share some more information about your location.","expiry_minutes":1440,"colors":{"button":"#2081E2"},"enabled":false,"allow":false}}; await honeypot.processPassport(); honeypot.processGeofenceResults(); })();