er Wilson
 * MIT Licensed
 */var i=n(255).Buffer,r=n(358),a=n(198),o=n(111)("express"),s=n(204),c=n(256).mime,l=n(359),d=n(362),u=n(249),p=n(353);function m(e){return function(t,n){var r=i.isBuffer(t)?t:i.from(t,n);return l(r,e)}}function h(e){return u.parse(e,{allowPrototypes:!0})}function g(){return{}}t.etag=m({weak:!1}),t.wetag=m({weak:!0}),t.isAbsolute=function(e){return"/"===e[0]||(":"===e[1]&&("\\"===e[2]||"/"===e[2])||("\\\\"===e.substring(0,2)||void 0))},t.flatten=o.function(s,"utils.flatten: use array-flatten npm module instead"),t.normalizeType=function(e){return~e.indexOf("/")?function(e){for(var t=e.split(/ *; */),n={value:t[0],quality:1,params:{}},i=1;i<t.length;++i){var r=t[i].split(/ *= */);"q"===r[0]?n.quality=parseFloat(r[1]):n.params[r[0]]=r[1]}return n}(e):{value:c.lookup(e),params:{}}},t.normalizeTypes=function(e){for(var n=[],i=0;i<e.length;++i)n.push(t.normalizeType(e[i]));return n},t.contentDisposition=o.function(r,"utils.contentDisposition: use content-disposition npm module instead"),t.compileETag=function(e){var n;if("function"==typeof e)return e;switch(e){case!0:case"weak":n=t.wetag;break;case!1:break;case"strong":n=t.etag;break;default:throw new TypeError("unknown value for etag function: "+e)}return n},t.compileQueryParser=function(e){var t;if("function"==typeof e)return e;switch(e){case!0:case"simple":t=p.parse;break;case!1:t=g;break;case"extended":t=h;break;default:throw new TypeError("unknown value for query parser function: "+e)}return t},t.compileTrust=function(e){return"function"==typeof e?e:!0===e?function(){return!0}:"number"==typeof e?function(t,n){return n<e}:("string"==typeof e&&(e=e.split(",").map((function(e){return e.trim()}))),d.compile(e||[]))},t.setCharset=function(e,t){if(!e||!t)return e;var n=a.parse(e);return n.parameters.charset=t,a.format(n)}},function(e,t,n){const i=n(1),r=n(4),a=n(23),o=n(15),s=n(46);const c=s.promisify(a.writeFile),l=s.promisify(a.readFile),d=s.promisify(a.mkdir),u=s.promisify(a.stat),p=s.promisify(a.unlink),m=s.promisify(a.readdir);t.getSentryCachePath=function(){return o.join(r.app.getPath("userData"),"sentry")},t.mkdirAsync=d,t.mkdirp=function e(t){return i.__awaiter(this,void 0,void 0,(function*(){const n=o.resolve(t);try{yield d(n,511)}catch(t){const i=t;i&&"ENOENT"===i.code&&(yield e(o.dirname(n)),yield d(n,511));try{if(!a.statSync(n).isDirectory())throw t}catch(e){throw t}}}))},t.readDirAsync=m,t.readFileAsync=l,t.statAsync=u,t.unlinkAsync=p,t.writeFileAsync=c},function(e,t,n){"use strict";n.r(t),n.d(t,"Hub",(function(){return s.a})),n.d(t,"SDK_VERSION",(function(){return c.a})),n.d(t,"SEMANTIC_ATTRIBUTE_SENTRY_OP",(function(){return l.b})),n.d(t,"SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN",(function(){return l.c})),n.d(t,"SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE",(function(){return l.d})),n.d(t,"SEMANTIC_ATTRIBUTE_SENTRY_SOURCE",(function(){return l.e})),n.d(t,"Scope",(function(){return d.a})),n.d(t,"addBreadcrumb",(function(){return u.a})),n.d(t,"addEventProcessor",(function(){return p.b})),n.d(t,"addGlobalEventProcessor",(function(){return m.a})),n.d(t,"addIntegration",(function(){return h.a})),n.d(t,"captureCheckIn",(function(){return u.b})),n.d(t,"captureEvent",(function(){return u.c})),n.d(t,"captureException",(function(){return u.d})),n.d(t,"captureMessage",(function(){return u.e})),n.d(t,"captureSession",(function(){return u.f})),n.d(t,"close",(function(){return u.g})),n.d(t,"configureScope",(function(){return u.h})),n.d(t,"continueTrace",(function(){return g.a})),n.d(t,"createTransport",(function(){return f.a})),n.d(t,"endSession",(function(){return u.i})),n.d(t,"extractTraceparentData",(function(){return b.a})),n.d(t,"flush",(function(){return u.j})),n.d(t,"functionToStringIntegration",(function(){return _.b})),n.d(t,"getActiveSpan",(function(){return g.b})),n.d(t,"getActiveTransaction",(function(){return b.b})),n.d(t,"getClient",(function(){return u.k})),n.d(t,"getCurrentHub",(function(){return s.c})),n.d(t,"getCurrentScope",(function(){return u.l})),n.d(t,"getGlobalScope",(function(){return d.b})),n.d(t,"getHubFromCarrier",(function(){return s.d})),n.d(t,"getIsolationScope",(function(){return s.e})),n.d(t,"getSpanStatusFromHttpCode",(function(){return v.b})),n.d(t,"inboundFiltersIntegration",(function(){return y.b})),n.d(t,"isInitialized",(function(){return u.m})),n.d(t,"lastEventId",(function(){return u.n})),n.d(t,"linkedErrorsIntegration",(function(){return I.b})),n.d(t,"makeMain",(function(){return s.g})),n.d(t,"metrics",(function(){return w.a})),n.d(t,"parameterize",(function(){return A.a})),n.d(t,"requestDataIntegration",(function(){return C.b})),n.d(t,"runWithAsyncContext",(function(){return s.h})),n.d(t,"setContext",(function(){return u.o})),n.d(t,"setCurrentClient",(function(){return E.b})),n.d(t,"setExtra",(function(){return u.p})),n.d(t,"setExtras",(function(){return u.q})),n.d(t,"setHttpStatus",(function(){return v.c})),n.d(t,"setMeasurement",(function(){return S.a})),n.d(t,"setTag",(function(){return u.r})),n.d(t,"setTags",(function(){return u.s})),n.d(t,"setUser",(function(){return u.t})),n.d(t,"spanStatusfromHttpCode",(function(){return v.d})),n.d(t,"startActiveSpan",(function(){return g.d})),n.d(t,"startInactiveSpan",(function(){return g.e})),n.d(t,"startSession",(function(){return u.u})),n.d(t,"startSpan",(function(){return g.f})),n.d(t,"startSpanManual",(function(){return g.g})),n.d(t,"startTransaction",(function(){return u.v})),n.d(t,"trace",(function(){return g.h})),n.d(t,"withActiveSpan",(function(){return u.w})),n.d(t,"withIsolationScope",(function(){return u.x})),n.d(t,"withMonitor",(function(){return u.y})),n.d(t,"withScope",(function(){return u.z})),n.d(t,"autoDiscoverNodePerformanceMonitoringIntegrations",(function(){return N})),n.d(t,"NodeClient",(function(){return k})),n.d(t,"makeNodeTransport",(function(){return Q})),n.d(t,"defaultIntegrations",(function(){return wt})),n.d(t,"defaultStackParser",(function(){return Ot})),n.d(t,"getDefaultIntegrations",(function(){return At})),n.d(t,"getSentryRelease",(function(){return St})),n.d(t,"init",(function(){return Ct})),n.d(t,"DEFAULT_USER_INCLUDES",(function(){return Rt.a})),n.d(t,"addRequestDataToEvent",(function(){return Rt.b})),n.d(t,"extractRequestData",(function(){return Rt.e})),n.d(t,"deepReadDirSync",(function(){return Nt})),n.d(t,"createGetModuleFromFilename",(function(){return It})),n.d(t,"enableAnrDetection",(function(){return xt})),n.d(t,"Handlers",(function(){return i})),n.d(t,"captureConsoleIntegration",(function(){return ln.a})),n.d(t,"debugIntegration",(function(){return dn.a})),n.d(t,"dedupeIntegration",(function(){return un.a})),n.d(t,"extraErrorDataIntegration",(function(){return pn.a})),n.d(t,"httpClientIntegration",(function(){return mn.a})),n.d(t,"reportingObserverIntegration",(function(){return hn.a})),n.d(t,"rewriteFramesIntegration",(function(){return gn.a})),n.d(t,"sessionTimingIntegration",(function(){return fn.a})),n.d(t,"consoleIntegration",(function(){return me})),n.d(t,"onUncaughtExceptionIntegration",(function(){return ct})),n.d(t,"onUnhandledRejectionIntegration",(function(){return dt})),n.d(t,"modulesIntegration",(function(){return at})),n.d(t,"contextLinesIntegration",(function(){return Te})),n.d(t,"nodeContextIntegration",(function(){return ye})),n.d(t,"localVariablesIntegration",(function(){return nt})),n.d(t,"spotlightIntegration",(function(){return mt})),n.d(t,"anrIntegration",(function(){return Tt.b})),n.d(t,"hapiErrorPlugin",(function(){return Yt})),n.d(t,"hapiIntegration",(function(){return Pt})),n.d(t,"Undici",(function(){return _t})),n.d(t,"nativeNodeFetchintegration",(function(){return bt})),n.d(t,"Http",(function(){return Xe})),n.d(t,"httpIntegration",(function(){return Me})),n.d(t,"trpcMiddleware",(function(){return kt})),n.d(t,"Integrations",(function(){return In})),n.d(t,"cron",(function(){return wn})),n.d(t,"getModuleFromFilename",(function(){return yn}));var i={};n.r(i),n.d(i,"extractRequestData",(function(){return Vt})),n.d(i,"parseRequest",(function(){return Wt})),n.d(i,"errorHandler",(function(){return jt})),n.d(i,"requestHandler",(function(){return Zt})),n.d(i,"tracingHandler",(function(){return Ft})),n.d(i,"trpcMiddleware",(function(){return Lt}));var r={};n.r(r),n.d(r,"Console",(function(){return he})),n.d(r,"Http",(function(){return Xe})),n.d(r,"OnUncaughtException",(function(){return lt})),n.d(r,"OnUnhandledRejection",(function(){return ut})),n.d(r,"Modules",(function(){return ot})),n.d(r,"ContextLines",(function(){return xe})),n.d(r,"Context",(function(){return Ie})),n.d(r,"RequestData",(function(){return C.a})),n.d(r,"LocalVariables",(function(){return tt})),n.d(r,"Undici",(function(){return _t})),n.d(r,"Spotlight",(function(){return ht})),n.d(r,"Anr",(function(){return Tt.a})),n.d(r,"Hapi",(function(){return Mt}));var a={};n.r(a),n.d(a,"Apollo",(function(){return zt})),n.d(a,"Express",(function(){return Qt})),n.d(a,"GraphQL",(function(){return tn})),n.d(a,"Mongo",(function(){return an})),n.d(a,"Mysql",(function(){return on})),n.d(a,"Postgres",(function(){return sn})),n.d(a,"Prisma",(function(){return cn}));var o=n(19),s=n(31),c=n(142),l=n(48),d=n(88),u=n(24),p=n(190),m=n(96),h=n(36),g=n(87),f=n(297),b=n(138),_=n(169),v=n(101),y=n(170),I=n(171),w=n(404),A=n(299),C=n(231),E=n(229),S=n(300),O=n(664),R=n(17);function N(){const e=O.a.map(e=>{try{return e()}catch(e){return}}).filter(e=>!!e);return 0===e.length&&R.c.warn("Performance monitoring integrations could not be automatically loaded."),e.filter(e=>!!e.loadDependency())}var T=n(39),x=n(46),B=n(405),G=n(301);class k extends B.a{constructor(e){Object(G.a)(e,"node"),e.transportOptions={textEncoder:new x.TextEncoder,...e.transportOptions};super({...e,platform:"node",runtime:{name:"node",version:global.process.version},serverName:e.serverName||global.process.env.SENTRY_NAME||T.hostname()})}}var V=n(220),W=n(68),F=n(141),Z=n(42),D=n(49),j=n(81),L=n(193),U=n(100),Y=n(291);const H=Symbol("AgentBaseInternalState");class P extends W.Agent{constructor(e){super(e),this[H]={}}isSecureEndpoint(e){if(e){if("boolean"==typeof e.secureEndpoint)return e.secureEndpoint;if("string"==typeof e.protocol)return"https:"===e.protocol}const{stack:t}=new Error;return"string"==typeof t&&t.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}createSocket(e,t,n){const i={...t,secureEndpoint:this.isSecureEndpoint(t)};Promise.resolve().then(()=>this.connect(e,i)).then(r=>{if(r instanceof W.Agent)return r.addRequest(e,i);this[H].currentSocket=r,super.createSocket(e,t,n)},n)}createConnection(){const e=this[H].currentSocket;if(this[H].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return Object(V.a)(this[H].defaultPort,()=>"https:"===this.protocol?443:80)}set defaultPort(e){this[H]&&(this[H].defaultPort=e)}get protocol(){return Object(V.a)(this[H].protocol,()=>this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[H]&&(this[H].protocol=e)}}function M(...e){R.c.log("[https-proxy-agent:parse-proxy-response]",...e)}function X(e){return new Promise((t,n)=>{let i=0;const r=[];function a(){const s=e.read();s?function(s){r.push(s),i+=s.length;const c=Buffer.concat(r,i),l=c.indexOf("\r\n\r\n");if(-1===l)return M("have not received end of HTTP headers yet..."),void a();const d=c.slice(0,l).toString("ascii").split("\r\n"),u=d.shift();if(!u)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));const p=u.split(" "),m=+p[1],h=p.slice(2).join(" "),g={};for(const t of d){if(!t)continue;const i=t.indexOf(":");if(-1===i)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${t}"`));const r=t.slice(0,i).toLowerCase(),a=t.slice(i+1).trimStart(),o=g[r];"string"==typeof o?g[r]=[o,a]:Array.isArray(o)?o.push(a):g[r]=a}M("got proxy server response: %o %o",u,g),o(),t({connect:{statusCode:m,statusText:h,headers:g},buffered:c})}(s):e.once("readable",a)}function o(){e.removeListener("end",s),e.removeListener("error",c),e.removeListener("readable",a)}function s(){o(),M("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(e){o(),M("onerror %o",e),n(e)}e.on("error",c),e.on("end",s),a()})}function K(...e){R.c.log("[https-proxy-agent]",...e)}class J extends P{static __initStatic(){this.protocols=["http","https"]}constructor(e,t){super(t),this.options={},this.proxy="string"==typeof e?new D.URL(e):e,this.proxyHeaders=Object(V.a)(Object(L.a)([t,"optionalAccess",e=>e.headers]),()=>({})),K("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?q(t,"headers"):null,host:n,port:i}}async connect(e,t){const{proxy:n}=this;if(!t.host)throw new TypeError('No "host" provided');let i;if("https:"===n.protocol){K("Creating `tls.Socket`: %o",this.connectOpts);const e=this.connectOpts.servername||this.connectOpts.host;i=Y.connect({...this.connectOpts,servername:e&&U.isIP(e)?void 0:e})}else K("Creating `net.Socket`: %o",this.connectOpts),i=U.connect(this.connectOpts);const r="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},a=U.isIPv6(t.host)?`[${t.host}]`:t.host;let o=`CONNECT ${a}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){const e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;r["Proxy-Authorization"]="Basic "+Buffer.from(e).toString("base64")}r.Host=`${a}:${t.port}`,r["Proxy-Connection"]||(r["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const e of Object.keys(r))o+=`${e}: ${r[e]}\r\n`;const s=X(i);i.write(o+"\r\n");const{connect:c,buffered:l}=await s;if(e.emit("proxyConnect",c),this.emit("proxyConnect",c,e),200===c.statusCode){if(e.once("socket",z),t.secureEndpoint){K("Upgrading socket connection to TLS");const e=t.servername||t.host;return Y.connect({...q(t,"host","path","port"),socket:i,servername:U.isIP(e)?void 0:e})}return i}i.destroy();const d=new U.Socket({writable:!1});return d.readable=!0,e.once("socket",e=>{K("Replaying proxy buffer for failed request"),e.push(l),e.push(null)}),d}}function z(e){e.resume()}function q(e,...t){const n={};let i;for(i in e)t.includes(i)||(n[i]=e[i]);return n}J.__initStatic();function Q(e){let t;try{t=new D.URL(e.url)}catch(t){return Object(R.b)(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")}),Object(f.a)(e,()=>Promise.resolve({}))}const n="https:"===t.protocol,i=function(e,t){const{no_proxy:n}=process.env;return n&&n.split(",").some(t=>e.host.endsWith(t)||e.hostname.endsWith(t))?void 0:t}(t,e.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),r=n?F:W,a=void 0!==e.keepAlive&&e.keepAlive,o=i?new J(i):new r.Agent({keepAlive:a,maxSockets:30,timeout:2e3}),s=function(e,t,n){const{hostname:i,pathname:r,port:a,protocol:o,search:s}=new D.URL(e.url);return function(c){return new Promise((l,d)=>{let u=function(e){return new Z.Readable({read(){this.push(e),this.push(null)}})}(c.body);const p={...e.headers};c.body.length>32768&&(p["content-encoding"]="gzip",u=u.pipe(Object(j.createGzip)()));const m=t.request({method:"POST",agent:n,headers:p,hostname:i,path:`${r}${s}`,port:a,protocol:o,ca:e.caCerts},e=>{e.on("data",()=>{}),e.on("end",()=>{}),e.setEncoding("utf8");const t=Object(V.a)(e.headers["retry-after"],()=>null),n=Object(V.a)(e.headers["x-sentry-rate-limits"],()=>null);l({statusCode:e.statusCode,headers:{"retry-after":t,"x-sentry-rate-limits":Array.isArray(n)?n[0]:n}})});m.on("error",d),u.pipe(m)})}}(e,Object(V.a)(e.httpModule,()=>r),o);return Object(f.a)(e,s)}var $=n(103),ee=n(30),te=n(112),ne=n(73),ie=n(292);function re(){return ie.active}function ae(){const e=re();if(e)return Object(s.b)(e),Object(s.d)(e)}function oe(e,t){const n=re();if(n&&Object(L.a)([t,"optionalAccess",e=>e.reuseExisting]))return e();const i=ie.create(),r=function(e){const t={};return Object(s.b)(t,e),Object(s.d)(t)}(n?Object(s.d)(n):void 0);return Object(s.j)(i,r),i.bind(()=>e())()}var se=n(223);let ce;function le(){function e(){return ce.getStore()}ce||(ce=new se.AsyncLocalStorage),Object(s.i)({getCurrentHub:e,runWithAsyncContext:function(t,n){const i=e();if(i&&Object(L.a)([n,"optionalAccess",e=>e.reuseExisting]))return t();const r=function(e){const t={};return Object(s.b)(t,e),Object(s.d)(t)}(i);return ce.run(r,()=>t())}})}function de(){ne.a.major>=14?le():Object(s.i)({getCurrentHub:ae,runWithAsyncContext:oe})}var ue=n(139),pe=n(189);const me=Object(h.d)(()=>({name:"Console",setupOnce(){},setup(e){Object(ue.a)(({args:t,level:n})=>{Object(u.k)()===e&&Object(u.a)({category:"console",level:Object(pe.b)(n),message:x.format.apply(void 0,t)},{input:[...t],level:n})})}})),he=Object(h.c)("Console",me);var ge=n(97),fe=n(23),be=n(15);const _e=Object(x.promisify)(fe.readFile),ve=Object(x.promisify)(fe.readdir),ye=Object(h.d)((e={})=>{let t;const n={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e};async function i(e){void 0===t&&(t=async function(){const e={};n.os&&(e.os=await async function(){const e=T.platform();switch(e){case"darwin":return async function(){const e={kernel_version:T.release(),name:"Mac OS X",version:"10."+(Number(T.release().split(".")[0])-4)};try{const t=await new Promise((e,t)=>{Object(ge.execFile)("/usr/bin/sw_vers",(n,i)=>{n?t(n):e(i)})});e.name=Ee(/^ProductName:\s+(.*)$/m,t),e.version=Ee(/^ProductVersion:\s+(.*)$/m,t),e.build=Ee(/^BuildVersion:\s+(.*)$/m,t)}catch(e){}return e}();case"linux":return async function(){const e={kernel_version:T.release(),name:"Linux"};try{const t=await ve("/etc"),n=Ae.find(e=>t.includes(e.name));if(!n)return e;const i=Object(be.join)("/etc",n.name),r=(await _e(i,{encoding:"utf-8"})).toLowerCase(),{distros:a}=n;e.name=a.find(e=>r.indexOf(Se(e))>=0)||a[0];const o=Se(e.name);e.version=Ce[o](r)}catch(e){}return e}();default:return{name:we[e]||e,version:T.release()}}}());n.app&&(e.app=function(){const e=process.memoryUsage().rss;return{app_start_time:new Date(Date.now()-1e3*process.uptime()).toISOString(),app_memory:e}}());n.device&&(e.device=function(e){const t={};let n;try{n=T.uptime&&T.uptime()}catch(e){}"number"==typeof n&&(t.boot_time=new Date(Date.now()-1e3*n).toISOString());t.arch=T.arch(),(!0===e||e.memory)&&(t.memory_size=T.totalmem(),t.free_memory=T.freemem());if(!0===e||e.cpu){const e=T.cpus();if(e&&e.length){const n=e[0];t.processor_count=e.length,t.cpu_description=n.model,t.processor_frequency=n.speed}}return t}(n.device));if(n.culture){const t=function(){try{if("string"!=typeof process.versions.icu)return;const e=new Date(9e8);if("enero"===new Intl.DateTimeFormat("es",{month:"long"}).format(e)){const e=Intl.DateTimeFormat().resolvedOptions();return{locale:e.locale,timezone:e.timeZone}}}catch(e){}return}();t&&(e.culture=t)}n.cloudResource&&(e.cloud_resource=process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0);return e}());const i=function(e){Object(L.a)([e,"optionalAccess",e=>e.app,"optionalAccess",e=>e.app_memory])&&(e.app.app_memory=process.memoryUsage().rss);Object(L.a)([e,"optionalAccess",e=>e.device,"optionalAccess",e=>e.free_memory])&&(e.device.free_memory=T.freemem());return e}(await t);return e.contexts={...e.contexts,app:{...i.app,...Object(L.a)([e,"access",e=>e.contexts,"optionalAccess",e=>e.app])},os:{...i.os,...Object(L.a)([e,"access",e=>e.contexts,"optionalAccess",e=>e.os])},device:{...i.device,...Object(L.a)([e,"access",e=>e.contexts,"optionalAccess",e=>e.device])},culture:{...i.culture,...Object(L.a)([e,"access",e=>e.contexts,"optionalAccess",e=>e.culture])},cloud_resource:{...i.cloud_resource,...Object(L.a)([e,"access",e=>e.contexts,"optionalAccess",e=>e.cloud_resource])}},e}return{name:"Context",setupOnce(){},processEvent:e=>i(e)}}),Ie=Object(h.c)("Context",ye);const we={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows"},Ae=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],Ce={alpine:e=>e,arch:e=>Ee(/distrib_release=(.*)/,e),centos:e=>Ee(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>Ee(/release (..)/,e),mint:e=>Ee(/distrib_release=(.*)/,e),red:e=>Ee(/release ([^ ]+)/,e),suse:e=>Ee(/VERSION = (.*)\n/,e),ubuntu:e=>Ee(/distrib_release=(.*)/,e)};function Ee(e,t){const n=e.exec(t);return n?n[1]:void 0}function Se(e){return e.split(" ")[0].toLowerCase()}var Oe=n(306),Re=n(32);const Ne=new Oe.a(100);const Te=Object(h.d)((e={})=>{const t=void 0!==e.frameContextLines?e.frameContextLines:7;return{name:"ContextLines",setupOnce(){},processEvent:e=>async function(e,t){const n={},i=[];if(t>0&&Object(L.a)([e,"access",e=>e.exception,"optionalAccess",e=>e.values]))for(const t of e.exception.values)if(Object(L.a)([t,"access",e=>e.stacktrace,"optionalAccess",e=>e.frames]))for(let e=t.stacktrace.frames.length-1;e>=0;e--){const r=t.stacktrace.frames[e];!r.filename||n[r.filename]||Ne.get(r.filename)||(i.push(Ge(r.filename)),n[r.filename]=1)}i.length>0&&await Promise.all(i);if(t>0&&Object(L.a)([e,"access",e=>e.exception,"optionalAccess",e=>e.values]))for(const n of e.exception.values)n.stacktrace&&n.stacktrace.frames&&await Be(n.stacktrace.frames,t);return e}(e,t)}}),xe=Object(h.c)("ContextLines",Te);function Be(e,t){for(const n of e)if(n.filename&&void 0===n.context_line){const e=Ne.get(n.filename);if(e)try{Object(Re.a)(e,n,t)}catch(e){}}}async function Ge(e){const t=Ne.get(e);if(null===t)return null;if(void 0!==t)return t;let n=null;try{n=(await(i=e,new Promise((e,t)=>{Object(fe.readFile)(i,"utf8",(n,i)=>{n?t(n):e(i)})}))).split("\n")}catch(e){}var i;return Ne.set(e,n),n}var ke=n(284),Ve=n(35),We=n(69),Fe=n(144),Ze=n(29),De=n(50),je=n(102);const Le="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Ue(e){const{protocol:t,hostname:n,port:i}=Pe(e),r=e.pathname||"/";return`${t}//${e.auth?function(e){const[t,n]=e.split(":");return`${t?"[Filtered]":""}:${n?"[Filtered]":""}@`}(e.auth):""}${n}${i}${r}`}function Ye(e,t,n){if(!e)return e;let[i,r]=e.split(" ");return t.host&&!t.protocol&&(t.protocol=Object(L.a)([n,"optionalAccess",e=>e.agent,"optionalAccess",e=>e.protocol]),r=Ue(t)),Object(L.a)([r,"optionalAccess",e=>e.startsWith,"call",e=>e("///")])&&(r=r.slice(2)),`${i} ${r}`}function He(e){const t={protocol:e.protocol,hostname:"string"==typeof e.hostname&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:`${e.pathname||""}${e.search||""}`,href:e.href};return""!==e.port&&(t.port=Number(e.port)),(e.username||e.password)&&(t.auth=`${e.username}:${e.password}`),t}function Pe(e){const t=e.protocol||"",n=e.hostname||e.host||"";return{protocol:t,hostname:n,port:!e.port||80===e.port||443===e.port||/^(.*):(\d+)$/.test(n)?"":":"+e.port}}const Me=Object(h.d)((e={})=>{const{breadcrumbs:t,tracing:n,shouldCreateSpanForRequest:i}=e,r={breadcrumbs:t,tracing:!1!==n&&Object(Ze.c)({enableIfHasTracingEnabled:!0!==n||void 0,shouldCreateSpanForRequest:i})};return new Xe(r)});class Xe{static __initStatic(){this.id="Http"}__init(){this.name=Xe.id}constructor(e={}){Xe.prototype.__init.call(this),this._breadcrumbs=void 0===e.breadcrumbs||e.breadcrumbs,this._tracing=e.tracing?!0===e.tracing?{}:e.tracing:void 0}setupOnce(e,t){const i=Object(L.a)([t,"call",e=>e(),"access",e=>e.getClient,"call",e=>e(),"optionalAccess",e=>e.getOptions,"call",e=>e()]),r=function(e,t){return void 0!==e&&(!e.enableIfHasTracingEnabled||Object(Fe.a)(t))}(this._tracing,i);if(!this._breadcrumbs&&!r)return;if(i&&"sentry"!==i.instrumenter)return void(Le&&R.c.log("HTTP Integration is skipped because of instrumenter configuration."));const a=function(e,t,n){return e?Object(L.a)([t,"optionalAccess",e=>e.shouldCreateSpanForRequest])||Object(L.a)([n,"optionalAccess",e=>e.shouldCreateSpanForRequest]):()=>!1}(r,this._tracing,i),o=Object(L.a)([i,"optionalAccess",e=>e.tracePropagationTargets])||Object(L.a)([this,"access",e=>e._tracing,"optionalAccess",e=>e.tracePropagationTargets]),s=n(68),c=Ke(s,this._breadcrumbs,a,o);if(Object(Ze.e)(s,"get",c),Object(Ze.e)(s,"request",c),ne.a.major>8){const e=n(141),t=Ke(e,this._breadcrumbs,a,o);Object(Ze.e)(e,"get",t),Object(Ze.e)(e,"request",t)}}}function Ke(e,t,n,i){const r=new Oe.a(100),a=new Oe.a(100);function o(e,t,n,i){Object(s.c)().getIntegration(Xe)&&Object(u.a)({category:"http",data:{status_code:i&&i.statusCode,...t},type:"http"},{event:e,request:n,response:i})}return function(c){return function(...l){const d=function(e,t){let n,i;if("function"==typeof t[t.length-1]&&(n=t.pop()),"string"==typeof t[0])i=He(new D.URL(t[0]));else if(t[0]instanceof D.URL)i=He(t[0]);else{i=t[0];try{const e=new D.URL(i.path||"",`${i.protocol||"http:"}//${i.hostname}`);i={pathname:e.pathname,search:e.search,hash:e.hash,...i}}catch(e){}}return 2===t.length&&(i={...i,...t[1]}),void 0===i.protocol&&(ne.a.major>8?i.protocol=Object(L.a)([Object(L.a)([e,"optionalAccess",e=>e.globalAgent]),"optionalAccess",e=>e.protocol])||Object(L.a)([i.agent,"optionalAccess",e=>e.protocol])||Object(L.a)([i._defaultAgent,"optionalAccess",e=>e.protocol]):i.protocol=Object(L.a)([i.agent,"optionalAccess",e=>e.protocol])||Object(L.a)([i._defaultAgent,"optionalAccess",e=>e.protocol])||Object(L.a)([Object(L.a)([e,"optionalAccess",e=>e.globalAgent]),"optionalAccess",e=>e.protocol])),n?[i,n]:[i]}(e,l),p=d[0],m=function(e){const{protocol:t,hostname:n,port:i}=Pe(e);return`${t}//${n}${i}${e.path?e.path:"/"}`}(p),h=Ue(p),f=Object(u.k)();if(Object(ke.a)(h,f))return c.apply(e,d);const b=Object(u.l)(),_=Object(s.e)(),y=Object(g.b)(),I=function(e,t){const n=t.method||"GET",i={url:e,"http.method":n};t.hash&&(i["http.fragment"]=t.hash.substring(1));t.search&&(i["http.query"]=t.search.substring(1));return i}(h,p),w=(e=>{if(void 0===n)return!0;const t=r.get(e);if(void 0!==t)return t;const i=n(e);return r.set(e,i),i})(m)?Object(L.a)([y,"optionalAccess",e=>e.startChild,"call",e=>e({op:"http.client",origin:"auto.http.node.http",description:`${I["http.method"]} ${I.url}`,data:I})]):void 0;if(f&&(e=>{if(void 0===i)return!0;const t=a.get(e);if(void 0!==t)return t;const n=Object(De.d)(e,i);return a.set(e,n),n})(m)){const{traceId:e,spanId:t,sampled:n,dsc:i}={..._.getPropagationContext(),...b.getPropagationContext()},r=w?Object(Ve.g)(w):Object(te.c)(e,t,n),a=Object(je.f)(i||(w?Object(We.b)(w):Object(We.a)(e,f,b)));!function(e,t,n,i){if((e.headers||{})["sentry-trace"])return;Le&&R.c.log(`[Tracing] Adding sentry-trace header ${n} to outgoing request to "${t}": `),e.headers={...e.headers,"sentry-trace":n,...i&&i.length>0&&{baggage:Je(e,i)}}}(p,h,r,a)}else Le&&R.c.log(`[Tracing] Not adding sentry-trace header to outgoing request (${h}) due to mismatching tracePropagationTargets option.`);return c.apply(e,d).once("response",(function(e){const n=this;t&&o("response",I,n,e),w&&(e.statusCode&&Object(v.c)(w,e.statusCode),w.updateName(Ye(Object(Ve.e)(w).description||"",p,n)||""),w.end())})).once("error",(function(){const e=this;t&&o("error",I,e),w&&(Object(v.c)(w,500),w.updateName(Ye(Object(Ve.e)(w).description||"",p,e)||""),w.end())}))}}}function Je(e,t){return e.headers&&e.headers.baggage?t?Array.isArray(e.headers.baggage)?[...e.headers.baggage,t]:[e.headers.baggage,t]:e.headers.baggage:t}function ze(e){return void 0!==e&&(0===e.length||"?"===e||"<anonymous>"===e)}function qe(e){if(void 0!==e)return e.slice(-10).reduce((e,t)=>`${e},${t.function},${t.lineno},${t.colno}`,"")}function Qe(e){let t=[],n=!1;function i(i){t=[],n||(n=!0,e(i))}return t.push(i),{add:function(e){t.push(e)},next:function(e){const n=t.pop()||i;try{n(e)}catch(t){i(e)}}}}Xe.__initStatic();class $e{constructor(){const{Session:e}=n(396);this._session=new e}configureAndConnect(e,t){this._session.connect(),this._session.on("Debugger.paused",t=>{e(t,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:t?"all":"uncaught"})}setPauseOnExceptions(e){this._session.post("Debugger.setPauseOnExceptions",{state:e?"all":"uncaught"})}getLocalVariables(e,t){this._getProperties(e,e=>{const{add:n,next:i}=Qe(t);for(const t of e)if(Object(L.a)([t,"optionalAccess",e=>e.value,"optionalAccess",e=>e.objectId])&&"Array"===Object(L.a)([t,"optionalAccess",e=>e.value,"access",e=>e.className])){const e=t.value.objectId;n(n=>this._unrollArray(e,t.name,n,i))}else if(Object(L.a)([t,"optionalAccess",e=>e.value,"optionalAccess",e=>e.objectId])&&"Object"===Object(L.a)([t,"optionalAccess",e=>e.value,"optionalAccess",e=>e.className])){const e=t.value.objectId;n(n=>this._unrollObject(e,t.name,n,i))}else null==Object(L.a)([t,"optionalAccess",e=>e.value,"optionalAccess",e=>e.value])&&null==Object(L.a)([t,"optionalAccess",e=>e.value,"optionalAccess",e=>e.description])||n(e=>this._unrollOther(t,e,i));i({})})}_getProperties(e,t){this._session.post("Runtime.getProperties",{objectId:e,ownProperties:!0},(e,n)=>{t(e?[]:n.result)})}_unrollArray(e,t,n,i){this._getProperties(e,e=>{n[t]=e.filter(e=>"length"!==e.name&&!isNaN(parseInt(e.name,10))).sort((e,t)=>parseInt(e.name,10)-parseInt(t.name,10)).map(e=>Object(L.a)([e,"optionalAccess",e=>e.value,"optionalAccess",e=>e.value])),i(n)})}_unrollObject(e,t,n,i){this._getProperties(e,e=>{n[t]=e.map(e=>[e.name,Object(L.a)([e,"optionalAccess",e=>e.value,"optionalAccess",e=>e.value])]).reduce((e,[t,n])=>(e[t]=n,e),{}),i(n)})}_unrollOther(e,t,n){null!=Object(L.a)([e,"optionalAccess",e=>e.value,"optionalAccess",e=>e.value])?t[e.name]=e.value.value:null!=Object(L.a)([e,"optionalAccess",e=>e.value,"optionalAccess",e=>e.description])&&"function"!==Object(L.a)([e,"optionalAccess",e=>e.value,"optionalAccess",e=>e.type])&&(t[e.name]=`<${e.value.description}>`),n(t)}}const et=Object(h.d)((e={},t=function(){try{return new $e}catch(e){return}}())=>{const n=new Oe.a(20);let i,r=!1;function a(e,{params:{reason:r,data:a,callFrames:o}},s){if("exception"!==r&&"promiseRejection"!==r)return void s();Object(L.a)([i,"optionalCall",e=>e()]);const c=function(e,t){if(void 0!==t)return qe(e(t,1))}(e,Object(L.a)([a,"optionalAccess",e=>e.description]));if(null==c)return void s();const{add:l,next:d}=Qe(e=>{n.set(c,e),s()});for(let e=0;e<Math.min(o.length,5);e++){const{scopeChain:n,functionName:i,this:r}=o[e],a=n.find(e=>"local"===e.type),s="global"!==r.className&&r.className?`${r.className}.${i}`:i;if(void 0===Object(L.a)([a,"optionalAccess",e=>e.object,"access",e=>e.objectId]))l(t=>{t[e]={function:s},d(t)});else{const n=a.object.objectId;l(i=>Object(L.a)([t,"optionalAccess",e=>e.getLocalVariables,"call",t=>t(n,t=>{i[e]={function:s,vars:t},d(i)})]))}}d([])}function o(e){const t=qe(Object(L.a)([e,"optionalAccess",e=>e.stacktrace,"optionalAccess",e=>e.frames]));if(void 0===t)return;const i=n.remove(t);if(void 0===i)return;const r=(Object(L.a)([e,"access",e=>e.stacktrace,"optionalAccess",e=>e.frames])||[]).filter(e=>"new Promise"!==e.function);for(let e=0;e<r.length;e++){const t=r.length-e-1;if(!r[t]||!i[e])break;void 0!==i[e].vars&&!1!==r[t].in_app&&(a=r[t].function,o=i[e].function,a===o||ze(a)&&ze(o))&&(r[t].vars=i[e].vars)}var a,o}return{name:"LocalVariables",setupOnce(){const n=Object(u.k)(),o=Object(L.a)([n,"optionalAccess",e=>e.getOptions,"call",e=>e()]);if(t&&Object(L.a)([o,"optionalAccess",e=>e.includeLocalVariables])){if(ne.a.major<18)return void R.c.log("The `LocalVariables` integration is only supported on Node >= v18.");const n=!1!==e.captureAllExceptions;if(t.configureAndConnect((e,t)=>a(o.stackParser,e,t),n),n){const n=e.maxExceptionsPerSecond||50;i=function(e,t,n){let i=0,r=5,a=0;return setInterval(()=>{0===a?i>e&&(r*=2,n(r),r>86400&&(r=86400),a=r):(a-=1,0===a&&t()),i=0},1e3).unref(),()=>{i+=1}}(n,()=>{R.c.log("Local variables rate-limit lifted."),Object(L.a)([t,"optionalAccess",e=>e.setPauseOnExceptions,"call",e=>e(!0)])},e=>{R.c.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${e} seconds.`),Object(L.a)([t,"optionalAccess",e=>e.setPauseOnExceptions,"call",e=>e(!1)])})}r=!0}},processEvent:e=>r?function(e){for(const t of Object(L.a)([e,"optionalAccess",e=>e.exception,"optionalAccess",e=>e.values])||[])o(t);return e}(e):e,_getCachedFramesCount:()=>n.size,_getFirstCachedFrame:()=>n.values()[0]}}),tt=Object(h.c)("LocalVariables",et),nt=et;let it;function rt(){const e=n.c[n.s]&&n.c[n.s].paths||[],t=function(){try{return n.c?Object.keys(n.c):[]}catch(e){return[]}}(),i={},r={};return t.forEach(t=>{let n=t;const a=()=>{const t=n;if(n=Object(be.dirname)(t),!n||t===n||r[t])return;if(e.indexOf(n)<0)return a();const o=Object(be.join)(t,"package.json");if(r[t]=!0,!Object(fe.existsSync)(o))return a();try{const e=JSON.parse(Object(fe.readFileSync)(o,"utf8"));i[e.name]=e.version}catch(e){}};a()}),i}const at=Object(h.d)(()=>({name:"Modules",setupOnce(){},processEvent:e=>(e.modules={...e.modules,...(it||(it=rt()),it)},e)})),ot=Object(h.c)("Modules",at);function st(e){Object(R.b)(()=>{console.error(e)});const t=Object(u.k)();void 0===t&&(Le&&R.c.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1));const n=t.getOptions(),i=n&&n.shutdownTimeout&&n.shutdownTimeout>0&&n.shutdownTimeout||2e3;t.close(i).then(e=>{e||Le&&R.c.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},e=>{Le&&R.c.error(e)})}const ct=Object(h.d)((e={})=>{const t={exitEvenIfOtherHandlersAreRegistered:!0,...e};return{name:"OnUncaughtException",setupOnce(){},setup(e){global.process.on("uncaughtException",function(e,t){let n,i=!1,r=!1,a=!1;const o=e.getOptions();return Object.assign(s=>{let c=st;t.onFatalError?c=t.onFatalError:o.onFatalError&&(c=o.onFatalError);const l=0===global.process.listeners("uncaughtException").reduce((e,t)=>"domainUncaughtExceptionClear"===t.name||t.tag&&"sentry_tracingErrorCallback"===t.tag||t._errorHandler?e:e+1,0),d=t.exitEvenIfOtherHandlersAreRegistered||l;i?d&&(a?(Le&&R.c.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),st(s)):r||(r=!0,setTimeout(()=>{a||(a=!0,c(n,s))},2e3))):(n=s,i=!0,Object(u.k)()===e&&Object(u.d)(s,{originalException:s,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"onuncaughtexception"}}),!a&&d&&(a=!0,c(s)))},{_errorHandler:!0})}(e,t))}}}),lt=Object(h.c)("OnUncaughtException",ct);const dt=Object(h.d)((e={})=>{const t=e.mode||"warn";return{name:"OnUnhandledRejection",setupOnce(){},setup(e){global.process.on("unhandledRejection",function(e,t){return function(n,i){Object(u.k)()===e&&(Object(u.d)(n,{originalException:i,captureContext:{extra:{unhandledPromiseRejection:!0}},mechanism:{handled:!1,type:"onunhandledrejection"}}),function(e,t){const n="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";"warn"===t.mode?Object(R.b)(()=>{console.warn(n),console.error(e&&e.stack?e.stack:e)}):"strict"===t.mode&&(Object(R.b)(()=>{console.warn(n)}),st(e))}(n,t))}}(e,{mode:t}))}}}),ut=Object(h.c)("OnUnhandledRejection",dt);var pt=n(44);const mt=Object(h.d)((e={})=>{const t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:"Spotlight",setupOnce(){},setup(e){"object"==typeof process&&process.env&&R.c.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?"),function(e,t){const n=function(e){try{return new D.URL(""+e)}catch(t){return void R.c.warn("[Spotlight] Invalid sidecar URL: "+e)}}(t.sidecarUrl);if(!n)return;let i=0;if("function"!=typeof e.on)return void R.c.warn("[Spotlight] Cannot connect to spotlight due to missing method on SDK client (`client.on`)");e.on("beforeEnvelope",e=>{if(i>3)return void R.c.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");const t=Object(pt.j)(e),r=function(){const{request:e}=W;if(t=e,"__sentry_original__"in t)return e.__sentry_original__;var t;return e}()({method:"POST",path:n.pathname,hostname:n.hostname,port:n.port,headers:{"Content-Type":"application/x-sentry-envelope"}},e=>{e.on("data",()=>{}),e.on("end",()=>{}),e.setEncoding("utf8")});r.on("error",()=>{i++,R.c.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),r.write(t),r.end()})}(e,t)}}}),ht=Object(h.c)("Spotlight",mt);var gt,ft=n(120);!function(e){e.RequestCreate="undici:request:create";e.RequestEnd="undici:request:headers";e.RequestError="undici:request:error"}(gt||(gt={}));const bt=Object(h.d)(e=>new _t(e));class _t{static __initStatic(){this.id="Undici"}__init(){this.name=_t.id}__init2(){this._createSpanUrlMap=new Oe.a(100)}__init3(){this._headersUrlMap=new Oe.a(100)}constructor(e={}){_t.prototype.__init.call(this),_t.prototype.__init2.call(this),_t.prototype.__init3.call(this),_t.prototype.__init4.call(this),_t.prototype.__init5.call(this),_t.prototype.__init6.call(this),this._options={breadcrumbs:void 0===e.breadcrumbs||e.breadcrumbs,tracing:e.tracing,shouldCreateSpanForRequest:e.shouldCreateSpanForRequest}}setupOnce(e){if(ne.a.major<16)return;let t;try{t=n(640)}catch(e){}t&&t.subscribe&&(t.subscribe(gt.RequestCreate,this._onRequestCreate),t.subscribe(gt.RequestEnd,this._onRequestEnd),t.subscribe(gt.RequestError,this._onRequestError))}_shouldCreateSpan(e){if(!1===this._options.tracing||void 0===this._options.tracing&&!Object(Fe.a)())return!1;if(void 0===this._options.shouldCreateSpanForRequest)return!0;const t=this._createSpanUrlMap.get(e);if(void 0!==t)return t;const n=this._options.shouldCreateSpanForRequest(e);return this._createSpanUrlMap.set(e,n),n}__init4(){this._onRequestCreate=e=>{if(!Object(L.a)([u.k,"call",e=>e(),"optionalAccess",e=>e.getIntegration,"call",e=>e(_t)]))return;const{request:t}=e,n=t.origin?t.origin.toString()+t.path:t.path,i=Object(u.k)();if(!i)return;if(Object(ke.a)(n,i)||void 0!==t.__sentry_span__)return;const r=i.getOptions(),a=Object(u.l)(),o=Object(s.e)(),c=Object(g.b)(),l=this._shouldCreateSpan(n)?function(e,t,n){const i=Object(ft.c)(n),r=t.method||"GET",a={"http.method":r};i.search&&(a["http.query"]=i.search);i.hash&&(a["http.fragment"]=i.hash);return Object(L.a)([e,"optionalAccess",e=>e.startChild,"call",e=>e({op:"http.client",origin:"auto.http.node.undici",description:`${r} ${Object(ft.b)(i)}`,data:a})])}(c,t,n):void 0;l&&(t.__sentry_span__=l);if((e=>{if(void 0===r.tracePropagationTargets)return!0;const t=this._headersUrlMap.get(e);if(void 0!==t)return t;const n=Object(De.d)(e,r.tracePropagationTargets);return this._headersUrlMap.set(e,n),n})(n)){const{traceId:e,spanId:n,sampled:r,dsc:s}={...o.getPropagationContext(),...a.getPropagationContext()};!function(e,t,n){let i;if(Array.isArray(e.headers))i=e.headers.some(e=>"sentry-trace"===e);else{const t=e.headers.split("\r\n");i=t.some(e=>e.startsWith("sentry-trace:"))}if(i)return;e.addHeader("sentry-trace",t),n&&e.addHeader("baggage",n)}(t,l?Object(Ve.g)(l):Object(te.c)(e,n,r),Object(je.f)(s||(l?Object(We.b)(l):Object(We.a)(e,i,a))))}}}__init5(){this._onRequestEnd=e=>{if(!Object(L.a)([u.k,"call",e=>e(),"optionalAccess",e=>e.getIntegration,"call",e=>e(_t)]))return;const{request:t,response:n}=e,i=t.origin?t.origin.toString()+t.path:t.path;if(Object(ke.a)(i,Object(u.k)()))return;const r=t.__sentry_span__;r&&(Object(v.c)(r,n.statusCode),r.end()),this._options.breadcrumbs&&Object(u.a)({category:"http",data:{method:t.method,status_code:n.statusCode,url:i},type:"http"},{event:"response",request:t,response:n})}}__init6(){this._onRequestError=e=>{if(!Object(L.a)([u.k,"call",e=>e(),"optionalAccess",e=>e.getIntegration,"call",e=>e(_t)]))return;const{request:t}=e,n=t.origin?t.origin.toString()+t.path:t.path;if(Object(ke.a)(n,Object(u.k)()))return;const i=t.__sentry_span__;i&&(i.setStatus("internal_error"),i.end()),this._options.breadcrumbs&&Object(u.a)({category:"http",data:{method:t.method,url:n},level:"error",type:"http"},{event:"error",request:t})}}}_t.__initStatic();var vt=n(104);function yt(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function It(e=(process.argv[1]?Object(vt.b)(process.argv[1]):process.cwd()),t="\\"===be.sep){const n=t?yt(e):e;return e=>{if(!e)return;const i=t?yt(e):e;let{dir:r,base:a,ext:o}=be.posix.parse(i);".js"!==o&&".mjs"!==o&&".cjs"!==o||(a=a.slice(0,-1*o.length)),r||(r=".");const s=r.lastIndexOf("/node_modules");if(s>-1)return`${r.slice(s+14).replace(/\//g,".")}:${a}`;if(r.startsWith(n)){let e=r.slice(n.length+1).replace(/\//g,".");return e&&(e+=":"),e+=a,e}return a}}const wt=[Object(y.b)(),Object(_.b)(),Object(I.b)(),Object(C.b)(),me(),Me(),bt(),ct(),dt(),Te(),nt(),ye(),at()];function At(e){const t=Object(s.f)(),n=Object(L.a)([t,"access",e=>e.__SENTRY__,"optionalAccess",e=>e.integrations])||[];return[...wt,...n]}function Ct(e={}){de(),void 0===e.defaultIntegrations&&(e.defaultIntegrations=At()),void 0===e.dsn&&process.env.SENTRY_DSN&&(e.dsn=process.env.SENTRY_DSN);const t=process.env.SENTRY_TRACES_SAMPLE_RATE;if(void 0===e.tracesSampleRate&&t){const n=parseFloat(t);isFinite(n)&&(e.tracesSampleRate=n)}if(void 0===e.release){const t=St();void 0!==t?e.release=t:e.autoSessionTracking=!1}void 0===e.environment&&process.env.SENTRY_ENVIRONMENT&&(e.environment=process.env.SENTRY_ENVIRONMENT),void 0===e.autoSessionTracking&&void 0!==e.dsn&&(e.autoSessionTracking=!0),void 0===e.instrumenter&&(e.instrumenter="sentry");const n={...e,stackParser:Object($.d)(e.stackParser||Ot),integrations:Object(h.e)(e),transport:e.transport||Q};if(Object(E.a)(e.clientClass||k,n),e.autoSessionTracking&&(Object(u.u)(),process.on("beforeExit",()=>{const e=Object(s.e)().getSession();e&&!["exited","crashed"].includes(e.status)&&Object(u.i)()})),function(){const e=(process.env.SENTRY_USE_ENVIRONMENT||"").toLowerCase();if(!["false","n","no","off","0"].includes(e)){const e=process.env.SENTRY_TRACE,t=process.env.SENTRY_BAGGAGE,n=Object(te.d)(e,t);Object(u.l)().setPropagationContext(n)}}(),e.spotlight){const t=Object(u.k)();if(t&&t.addIntegration){const n=t.getOptions().integrations;for(const e of n)t.addIntegration(e);t.addIntegration(mt({sidecarUrl:"string"==typeof e.spotlight?e.spotlight:void 0}))}}}function Et(e){if(void 0===e)return!1;const t=e&&e.getOptions();return!(!t||void 0===t.autoSessionTracking)&&t.autoSessionTracking}function St(e){return process.env.SENTRY_RELEASE?process.env.SENTRY_RELEASE:ee.a.SENTRY_RELEASE&&ee.a.SENTRY_RELEASE.id?ee.a.SENTRY_RELEASE.id:process.env.GITHUB_SHA||process.env.COMMIT_REF||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA||process.env.CF_PAGES_COMMIT_SHA||e}const Ot=Object($.a)(Object($.c)(It()));var Rt=n(105);function Nt(e){const t=be.resolve(e);if(!fe.existsSync(t))throw new Error(`Cannot read contents of ${t}. Directory does not exist.`);if(!fe.statSync(t).isDirectory())throw new Error(`Cannot read contents of ${t}, because it is not a directory.`);const n=e=>fe.readdirSync(e).reduce((t,i)=>{const r=be.join(e,i);return fe.statSync(r).isDirectory()?t.concat(n(r)):(t.push(r),t)},[]);return n(t).map(e=>be.relative(t,e))}var Tt=n(162);function xt(e){const t=Object(u.k)();return new Tt.a(e).setup(t),Promise.resolve()}var Bt=n(26),Gt=n(57);function kt(e={}){return function({path:t,type:n,next:i,rawInput:r}){const a=Object(L.a)([u.k,"call",e=>e(),"optionalAccess",e=>e.getOptions,"call",e=>e()]),o=Object(u.l)().getTransaction();if(o){o.updateName("trpc/"+t),o.setAttribute(l.e,"route"),o.op="rpc.server";const i={procedure_type:n};(void 0!==e.attachRpcInput?e.attachRpcInput:Object(L.a)([a,"optionalAccess",e=>e.sendDefaultPii]))&&(i.input=Object(Gt.a)(r)),o.setContext("trpc",i)}function s(e){e.ok||Object(u.d)(e.error,{mechanism:{handled:!1,data:{function:"trpcMiddleware"}}})}let c;try{c=i()}catch(e){throw Object(u.d)(e,{mechanism:{handled:!1,data:{function:"trpcMiddleware"}}}),e}return Object(Bt.o)(c)?Promise.resolve(c).then(e=>{s(e)},e=>{Object(u.d)(e,{mechanism:{handled:!1,data:{function:"trpcMiddleware"}}})}):s(c),c}}function Vt(e,t){return Object(Rt.e)(e,{include:t})}function Wt(e,t,n={}){return Object(Rt.b)(e,t,{include:n})}function Ft(){return function(e,t,n){const i=Object(L.a)([u.k,"call",e=>e(),"optionalAccess",e=>e.getOptions,"call",e=>e()]);if(!i||"sentry"!==i.instrumenter||"OPTIONS"===Object(L.a)([e,"access",e=>e.method,"optionalAccess",e=>e.toUpperCase,"call",e=>e()])||"HEAD"===Object(L.a)([e,"access",e=>e.method,"optionalAccess",e=>e.toUpperCase,"call",e=>e()]))return n();const r=e.headers&&Object(Bt.m)(e.headers["sentry-trace"])?e.headers["sentry-trace"]:void 0,a=Object(L.a)([e,"access",e=>e.headers,"optionalAccess",e=>e.baggage]);if(!Object(Fe.a)(i))return n();const[o,s]=Object(Rt.d)(e,{path:!0,method:!0}),c=Object(g.a)({sentryTrace:r,baggage:a},t=>Object(u.v)({name:o,op:"http.server",origin:"auto.http.node.tracingHandler",...t,data:{[l.e]:s},metadata:{...t.metadata,request:e}},{request:Object(Rt.e)(e)}));Object(u.l)().setSpan(c),t.__sentry_transaction=c,t.once("finish",()=>{setImmediate(()=>{Object(Rt.c)(c,e),Object(v.c)(c,t.statusCode),c.end()})}),n()}}function Zt(e){const t=function(e={}){let t;if("include"in e)t={include:e.include};else{const{ip:n,request:i,transaction:r,user:a}=e;(n||i||r||a)&&(t={include:Object(Ze.c)({ip:n,request:i,transaction:r,user:a})})}return t}(e),n=Object(u.k)();if(n&&Et(n)){n.initSessionFlusher();const e=Object(u.l)();e.getSession()&&e.setSession()}return function(n,i,r){if(e&&e.flushTimeout&&e.flushTimeout>0){const t=i.end;i.end=function(n,i,r){Object(u.j)(e.flushTimeout).then(()=>{t.call(this,n,i,r)}).then(null,e=>{Le&&R.c.error(e),t.call(this,n,i,r)})}}Object(s.h)(()=>{const e=Object(u.l)();e.setSDKProcessingMetadata({request:n,requestDataOptionsFromExpressHandler:t});Et(Object(u.k)())&&e.setRequestSession({status:"ok"}),i.once("finish",()=>{const e=Object(u.k)();Et(e)&&setImmediate(()=>{e&&e._captureRequestSession&&e._captureRequestSession()})}),r()})}}function Dt(e){return function(e){const t=e.status||e.statusCode||e.status_code||e.output&&e.output.statusCode;return t?parseInt(t,10):500}(e)>=500}function jt(e){return function(t,n,i,r){(e&&e.shouldHandleError||Dt)(t)?Object(u.z)(e=>{e.setSDKProcessingMetadata({request:n});const a=i.__sentry_transaction;a&&!Object(g.b)()&&e.setSpan(a);const o=Object(u.k)();if(o&&Et(o)){if(void 0!==o._sessionFlusher){const t=e.getRequestSession();t&&void 0!==t.status&&(t.status="crashed")}}const s=Object(u.d)(t,{mechanism:{type:"middleware",handled:!1}});i.sentry=s,r(t)}):r(t)}}const Lt=kt;function Ut(e){return e&&void 0!==e.statusCode}const Yt={name:"SentryHapiErrorPlugin",version:c.a,register:async function(e){e.events.on("request",(e,t)=>{const n=Object(b.b)();var i;(function(e){return e&&void 0!==e.error})(t)&&(i=t.error,Object(u.d)(i,{mechanism:{type:"hapi",handled:!1,data:{function:"hapiErrorPlugin"}}})),n&&(n.setStatus("internal_error"),n.end())})}},Ht={name:"SentryHapiTracingPlugin",version:c.a,register:async function(e){const t=e;t.ext("onPreHandler",(e,t)=>{const n=Object(g.a)({sentryTrace:e.headers["sentry-trace"]||void 0,baggage:e.headers.baggage||void 0},t=>Object(u.v)({...t,op:"hapi.request",name:e.route.path,description:`${e.route.method} ${e.path}`}));return Object(u.l)().setSpan(n),t.continue}),t.ext("onPreResponse",(e,t)=>{const n=Object(b.b)();if(e.response&&Ut(e.response)&&n){const t=e.response;t.header("sentry-trace",Object(Ve.g)(n));const i=Object(je.f)(Object(We.b)(n));i&&t.header("baggage",i)}return t.continue}),t.ext("onPostHandler",(e,t)=>{const n=Object(b.b)();return n&&(e.response&&Ut(e.response)&&Object(v.c)(n,e.response.statusCode),n.end()),t.continue})}},Pt=Object(h.d)((e={})=>{const t=e.server;return{name:"Hapi",setupOnce(){t&&Object(Ze.e)(t,"start",e=>async function(){await this.register(Ht),await this.register(Yt);return e.apply(this)})}}}),Mt=Object(h.c)("Hapi",Pt);var Xt=n(75),Kt=n(27);function Jt(e){const t=Object(L.a)([e,"call",e=>e(),"access",e=>e.getClient,"call",e=>e(),"optionalAccess",e=>e.getOptions,"call",e=>e()]);return"sentry"!==(Object(L.a)([t,"optionalAccess",e=>e.instrumenter])||"sentry")}class zt{static __initStatic(){this.id="Apollo"}constructor(e={useNestjs:!1}){this.name=zt.id,this._useNest=!!e.useNestjs}loadDependency(){return this._useNest?this._module=this._module||Object(Xt.c)("@nestjs/graphql"):this._module=this._module||Object(Xt.c)("apollo-server-core"),this._module}setupOnce(e,t){if(Jt(t))Kt.a&&R.c.log("Apollo Integration is skipped because of instrumenter configuration.");else if(this._useNest){const e=this.loadDependency();if(!e)return void(Kt.a&&R.c.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package."));Object(Ze.e)(e.GraphQLFactory.prototype,"mergeWithSchema",(function(e){return function(...n){return Object(Ze.e)(this.resolversExplorerService,"explore",(function(e){return function(){return qt(Object(Re.d)(e.call(this)),t)}})),e.call(this,...n)}}))}else{const e=this.loadDependency();if(!e)return void(Kt.a&&R.c.error("Apollo Integration was unable to require apollo-server-core package."));Object(Ze.e)(e.ApolloServerBase.prototype,"constructSchema",(function(e){return function(){if(!this.config.resolvers)return Kt.a&&(this.config.schema?(R.c.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),R.c.warn()):this.config.modules&&R.c.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),R.c.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),e.call(this);const n=Object(Re.d)(this.config.resolvers);return this.config.resolvers=qt(n,t),e.call(this)}}))}}}function qt(e,t){return e.map(e=>(Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{"function"==typeof e[n][i]&&function(e,t,n,i){Object(Ze.e)(e[t],n,(function(e){return function(...r){const a=i().getScope().getSpan(),o=Object(L.a)([a,"optionalAccess",e=>e.startChild,"call",e=>e({description:`${t}.${n}`,op:"graphql.resolve",origin:"auto.graphql.apollo"})]),s=e.call(this,...r);return Object(Bt.o)(s)?s.then(e=>(Object(L.a)([o,"optionalAccess",e=>e.end,"call",e=>e()]),e)):(Object(L.a)([o,"optionalAccess",e=>e.end,"call",e=>e()]),s)}}))}(e,n,i,t)})}),e))}zt.__initStatic();class Qt{static __initStatic(){this.id="Express"}constructor(e={}){this.name=Qt.id,this._router=e.router||e.app,this._methods=(Array.isArray(e.methods)?e.methods:[]).concat("use")}setupOnce(e,t){this._router?Jt(t)?Kt.a&&R.c.log("Express Integration is skipped because of instrumenter configuration."):(function(e,t=[]){t.forEach(t=>function(e,t){const n=e[t];return e[t]=function(...e){return n.call(this,...function(e,t){return e.map(e=>"function"==typeof e?$t(e,t):Array.isArray(e)?e.map(e=>"function"==typeof e?$t(e,t):e):e)}(e,t))},e}(e,t))}(this._router,this._methods),function(e){const t="settings"in e;t&&void 0===e._router&&e.lazyrouter&&e.lazyrouter();const n=t?e._router:e;if(!n)return Kt.a&&R.c.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(Kt.a&&R.c.debug("Routing instrumentation is currently only supported in Express 4."));const i=Object.getPrototypeOf(n),r=i.process_params;i.process_params=function(e,t,n,i,a){n._reconstructedRoute||(n._reconstructedRoute="");const{layerRoutePath:o,isRegex:s,isArray:c,numExtraSegments:d}=function(e){let t=Object(L.a)([e,"access",e=>e.route,"optionalAccess",e=>e.path]);const n=Object(Bt.l)(t),i=Array.isArray(t);if(!t){const[n]=ee.a.process.versions.node.split(".").map(Number);n>=16&&(t=((e,t,n)=>{if(!(e&&t&&n&&0!==Object.keys(n).length&&Object(L.a)([n,"access",e=>e[0],"optionalAccess",e=>e.offset])))return;const i=n.sort((e,t)=>e.offset-t.offset),r=new RegExp(t,t.flags+"d").exec(e);if(!r||!r.indices)return;const[,...a]=r.indices;if(a.length!==i.length)return;let o=e,s=0;return a.forEach((e,t)=>{if(e){const[n,r]=e,a=o.substring(0,n-s),c=":"+i[t].name,l=o.substring(r-s);o=a+c+l,s+=r-n-c.length}}),o})(e.path,e.regexp,e.keys))}if(!t)return{isRegex:n,isArray:i,numExtraSegments:0};const r=i?Math.max((a=t,a.reduce((e,t)=>e+Object(ft.a)(t.toString()),0)-Object(ft.a)(e.path||"")),0):0;var a;return{layerRoutePath:en(i,t),isRegex:n,isArray:i,numExtraSegments:r}}(e);let u;(o||s||c)&&(n._hasParameters=!0),u=o||(function(e,t,n){const i=Object(ft.d)(e||""),r=Object(L.a)([i,"optionalAccess",e=>e.split,"call",e=>e("/"),"access",e=>e.filter,"call",e=>e(e=>!!e)]);let a=0;const o=Object(L.a)([t,"optionalAccess",e=>e.split,"call",e=>e("/"),"access",e=>e.filter,"call",e=>e(e=>!!e),"access",e=>e.length])||0;return Object(L.a)([n,"optionalAccess",e=>e.split,"call",e=>e("/"),"access",e=>e.filter,"call",e=>e(e=>Object(L.a)([r,"optionalAccess",e=>e[o+a]])===e&&(a+=1,!0)),"access",e=>e.join,"call",e=>e("/")])}(n.originalUrl,n._reconstructedRoute,e.path)||"");const p=u.split("/").filter(e=>e.length>0&&(s||c||!e.includes("*"))).join("/");p&&p.length>0&&(n._reconstructedRoute+=`/${p}${s?"/":""}`);if(Object(ft.a)(Object(ft.d)(n.originalUrl||""))+d===Object(ft.a)(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl?Object(ft.d)(n.originalUrl):n.originalUrl);const e=i.__sentry_transaction,t=e&&Object(Ve.e)(e).data||{};if(e&&"custom"!==t[l.e]){const t=n._reconstructedRoute||"/",[i,r]=Object(Rt.d)(n,{path:!0,method:!0,customRoute:t});e.updateName(i),e.setAttribute(l.e,r)}}return r.call(this,e,t,n,i,a)}}(this._router)):Kt.a&&R.c.error("ExpressIntegration is missing an Express instance")}}function $t(e,t){const n=e.length;switch(n){case 2:return function(n,i){const r=i.__sentry_transaction;if(r){const n=r.startChild({description:e.name,op:"middleware.express."+t,origin:"auto.middleware.express"});i.once("finish",()=>{n.end()})}return e.call(this,n,i)};case 3:return function(n,i,r){const a=i.__sentry_transaction,o=Object(L.a)([a,"optionalAccess",e=>e.startChild,"call",n=>n({description:e.name,op:"middleware.express."+t,origin:"auto.middleware.express"})]);e.call(this,n,i,(function(...e){Object(L.a)([o,"optionalAccess",e=>e.end,"call",e=>e()]),r.call(this,...e)}))};case 4:return function(n,i,r,a){const o=r.__sentry_transaction,s=Object(L.a)([o,"optionalAccess",e=>e.startChild,"call",n=>n({description:e.name,op:"middleware.express."+t,origin:"auto.middleware.express"})]);e.call(this,n,i,r,(function(...e){Object(L.a)([s,"optionalAccess",e=>e.end,"call",e=>e()]),a.call(this,...e)}))};default:throw new Error("Express middleware takes 2-4 arguments. Got: "+n)}}Qt.__initStatic();function en(e,t){return e?t.map(e=>e.toString()).join(","):t&&t.toString()}class tn{static __initStatic(){this.id="GraphQL"}constructor(){this.name=tn.id}loadDependency(){return this._module=this._module||Object(Xt.c)("graphql/execution/execute.js")}setupOnce(e,t){if(Jt(t))return void(Kt.a&&R.c.log("GraphQL Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?Object(Ze.e)(n,"execute",(function(e){return function(...n){const i=t().getScope(),r=i.getSpan(),a=Object(L.a)([r,"optionalAccess",e=>e.startChild,"call",e=>e({description:"execute",op:"graphql.execute",origin:"auto.graphql.graphql"})]);Object(L.a)([i,"optionalAccess",e=>e.setSpan,"call",e=>e(a)]);const o=e.call(this,...n);return Object(Bt.o)(o)?o.then(e=>(Object(L.a)([a,"optionalAccess",e=>e.end,"call",e=>e()]),Object(L.a)([i,"optionalAccess",e=>e.setSpan,"call",e=>e(r)]),e)):(Object(L.a)([a,"optionalAccess",e=>e.end,"call",e=>e()]),Object(L.a)([i,"optionalAccess",e=>e.setSpan,"call",e=>e(r)]),o)}})):Kt.a&&R.c.error("GraphQL Integration was unable to require graphql/execution package.")}}tn.__initStatic();const nn=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],rn={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]};class an{static __initStatic(){this.id="Mongo"}constructor(e={}){this.name=an.id,this._operations=Array.isArray(e.operations)?e.operations:nn,this._describeOperations=!("describeOperations"in e)||e.describeOperations,this._useMongoose=!!e.useMongoose}loadDependency(){const e=this._useMongoose?"mongoose":"mongodb";return this._module=this._module||Object(Xt.c)(e)}setupOnce(e,t){if(Jt(t))return void(Kt.a&&R.c.log("Mongo Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();if(n)this._instrumentOperations(n.Collection,this._operations,t);else{const e=this._useMongoose?"mongoose":"mongodb";Kt.a&&R.c.error(`Mongo Integration was unable to require \`${e}\` package.`)}}_instrumentOperations(e,t,n){t.forEach(t=>this._patchOperation(e,t,n))}_patchOperation(e,t,n){if(!(t in e.prototype))return;const i=this._getSpanContextFromOperationArguments.bind(this);Object(Ze.e)(e.prototype,t,(function(e){return function(...r){const a=r[r.length-1],o=n(),s=o.getScope(),c=o.getClient(),l=s.getSpan(),d=Object(L.a)([c,"optionalAccess",e=>e.getOptions,"call",e=>e(),"access",e=>e.sendDefaultPii]);if("function"!=typeof a||"mapReduce"===t&&2===r.length){const n=Object(L.a)([l,"optionalAccess",e=>e.startChild,"call",e=>e(i(this,t,r,d))]),a=e.call(this,...r);if(Object(Bt.o)(a))return a.then(e=>(Object(L.a)([n,"optionalAccess",e=>e.end,"call",e=>e()]),e));if((u=a)&&"object"==typeof u&&u.once&&"function"==typeof u.once){const e=a;try{e.once("close",()=>{Object(L.a)([n,"optionalAccess",e=>e.end,"call",e=>e()])})}catch(e){Object(L.a)([n,"optionalAccess",e=>e.end,"call",e=>e()])}return e}return Object(L.a)([n,"optionalAccess",e=>e.end,"call",e=>e()]),a}var u;const p=Object(L.a)([l,"optionalAccess",e=>e.startChild,"call",e=>e(i(this,t,r.slice(0,-1)))]);return e.call(this,...r.slice(0,-1),(function(e,t){Object(L.a)([p,"optionalAccess",e=>e.end,"call",e=>e()]),a(e,t)}))}}))}_getSpanContextFromOperationArguments(e,t,n,i=!1){const r={"db.system":"mongodb","db.name":e.dbName,"db.operation":t,"db.mongodb.collection":e.collectionName},a={op:"db",origin:"auto.db.mongo",description:t,data:r},o=rn[t],s=Array.isArray(this._describeOperations)?this._describeOperations.includes(t):this._describeOperations;if(!o||!s||!i)return a;try{if("mapReduce"===t){const[e,t]=n;r[o[0]]="string"==typeof e?e:e.name||"<anonymous>",r[o[1]]="string"==typeof t?t:t.name||"<anonymous>"}else for(let e=0;e<o.length;e++)r["db.mongodb."+o[e]]=JSON.stringify(n[e])}catch(e){}return a}}an.__initStatic();class on{static __initStatic(){this.id="Mysql"}constructor(){this.name=on.id}loadDependency(){return this._module=this._module||Object(Xt.c)("mysql/lib/Connection.js")}setupOnce(e,t){if(Jt(t))return void(Kt.a&&R.c.log("Mysql Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();if(!n)return void(Kt.a&&R.c.error("Mysql Integration was unable to require `mysql` package."));let i=void 0;try{n.prototype.connect=new Proxy(n.prototype.connect,{apply:(e,t,n)=>(i||(i=t.config),e.apply(t,n))})}catch(e){Kt.a&&R.c.error("Mysql Integration was unable to instrument `mysql` config.")}function r(e){if(!e)return;const t=i?{"server.address":i.host,"server.port":i.port,"db.user":i.user}:{};Object.keys(t).forEach(n=>{e.setAttribute(n,t[n])}),e.end()}Object(Ze.e)(n,"createQuery",(function(e){return function(n,i,a){const o=t().getScope().getSpan(),s=Object(L.a)([o,"optionalAccess",e=>e.startChild,"call",e=>e({description:"string"==typeof n?n:n.sql,op:"db",origin:"auto.db.mysql",data:{"db.system":"mysql"}})]);if("function"==typeof a)return e.call(this,n,i,(function(e,t,n){r(s),a(e,t,n)}));if("function"==typeof i)return e.call(this,n,(function(e,t,n){r(s),i(e,t,n)}));const c=e.call(this,n,i);return c.on("end",()=>{r(s)}),c}}))}}on.__initStatic();class sn{static __initStatic(){this.id="Postgres"}constructor(e={}){this.name=sn.id,this._usePgNative=!!e.usePgNative,this._module=e.module}loadDependency(){return this._module=this._module||Object(Xt.c)("pg")}setupOnce(e,t){if(Jt(t))return void(Kt.a&&R.c.log("Postgres Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();if(!n)return void(Kt.a&&R.c.error("Postgres Integration was unable to require `pg` package."));const i=this._usePgNative?Object(L.a)([n,"access",e=>e.native,"optionalAccess",e=>e.Client]):n.Client;i?Object(Ze.e)(i.prototype,"query",(function(e){return function(n,i,r){const a=t().getScope().getSpan(),o={"db.system":"postgresql"};try{this.database&&(o["db.name"]=this.database),this.host&&(o["server.address"]=this.host),this.port&&(o["server.port"]=this.port),this.user&&(o["db.user"]=this.user)}catch(e){}const s=Object(L.a)([a,"optionalAccess",e=>e.startChild,"call",e=>e({description:"string"==typeof n?n:n.text,op:"db",origin:"auto.db.postgres",data:o})]);if("function"==typeof r)return e.call(this,n,i,(function(e,t){Object(L.a)([s,"optionalAccess",e=>e.end,"call",e=>e()]),r(e,t)}));if("function"==typeof i)return e.call(this,n,(function(e,t){Object(L.a)([s,"optionalAccess",e=>e.end,"call",e=>e()]),i(e,t)}));const c=void 0!==i?e.call(this,n,i):e.call(this,n);return Object(Bt.o)(c)?c.then(e=>(Object(L.a)([s,"optionalAccess",e=>e.end,"call",e=>e()]),e)):(Object(L.a)([s,"optionalAccess",e=>e.end,"call",e=>e()]),c)}})):Kt.a&&R.c.error("Postgres Integration was unable to access 'pg-native' bindings.")}}sn.__initStatic();class cn{static __initStatic(){this.id="Prisma"}constructor(e={}){if(this.name=cn.id,(t=e.client)&&t.$use&&!e.client._sentryInstrumented){Object(Ze.a)(e.client,"_sentryInstrumented",!0);const t={};try{const n=e.client._engineConfig;if(n){const{activeProvider:e,clientVersion:i}=n;e&&(t["db.system"]=e),i&&(t["db.prisma.version"]=i)}}catch(e){}e.client.$use((e,n)=>{if(Jt(s.c))return n(e);const i=e.action,r=e.model;return Object(g.f)({name:r?`${r} ${i}`:i,onlyIfParent:!0,op:"db.prisma",attributes:{[l.c]:"auto.db.prisma"},data:{...t,"db.operation":i}},()=>n(e))})}else Kt.a&&R.c.warn("Unsupported Prisma client provided to PrismaIntegration. Provided client:",e.client);var t}setupOnce(){}}cn.__initStatic();var ln=n(656),dn=n(657),un=n(658),pn=n(659),mn=n(660),hn=n(661),gn=n(662),fn=n(663);const bn=[["january","1"],["february","2"],["march","3"],["april","4"],["may","5"],["june","6"],["july","7"],["august","8"],["september","9"],["october","10"],["november","11"],["december","12"],["jan","1"],["feb","2"],["mar","3"],["apr","4"],["may","5"],["jun","6"],["jul","7"],["aug","8"],["sep","9"],["oct","10"],["nov","11"],["dec","12"],["sunday","0"],["monday","1"],["tuesday","2"],["wednesday","3"],["thursday","4"],["friday","5"],["saturday","6"],["sun","0"],["mon","1"],["tue","2"],["wed","3"],["thu","4"],["fri","5"],["sat","6"]];function _n(e){return bn.reduce((e,[t,n])=>e.replace(new RegExp(t,"gi"),n),e)}const vn="Automatic instrumentation of CronJob only supports crontab string";const yn=It(),In={...o.Integrations,...r,...a},wn={instrumentCron:function(e,t){let n=!1;return new Proxy(e,{construct(e,i){const[r,a,o,s,c,...l]=i;if("string"!=typeof r)throw new Error(vn);if(n)throw new Error(`A job named '${t}' has already been scheduled`);n=!0;const d=_n(r);return new e(r,(function(e,n){return Object(u.y)(t,()=>a(e,n),{schedule:{type:"crontab",value:d},timezone:c||void 0})}),o,s,c,...l)},get:(e,i)=>"from"===i?i=>{const{cronTime:r,onTick:a,timeZone:o}=i;if("string"!=typeof r)throw new Error(vn);if(n)throw new Error(`A job named '${t}' has already been scheduled`);n=!0;const s=_n(r);return i.onTick=(e,n)=>Object(u.y)(t,()=>a(e,n),{schedule:{type:"crontab",value:s},timezone:o||void 0}),e.from(i)}:e[i]})},instrumentNodeCron:function(e){return new Proxy(e,{get:(e,t)=>"schedule"===t&&e.schedule?new Proxy(e.schedule,{apply(e,t,n){const[i,,r]=n;if(!Object(L.a)([r,"optionalAccess",e=>e.name]))throw new Error('Missing "name" for scheduled job. A name is required for Sentry check-in monitoring.');return Object(u.y)(r.name,()=>e.apply(t,n),{schedule:{type:"crontab",value:_n(i)},timezone:Object(L.a)([r,"optionalAccess",e=>e.timezone])})}}):e[t]})},instrumentNodeSchedule:function(e){return new Proxy(e,{get:(e,t)=>"scheduleJob"===t?new Proxy(e.scheduleJob,{apply(e,t,n){const[i,r]=n;if("string"!=typeof i||"string"!=typeof r)throw new Error("Automatic instrumentation of 'node-schedule' requires the first parameter of 'scheduleJob' to be a job name string and the second parameter to be a crontab string");const a=i,o=r;return Object(u.y)(a,()=>e.apply(t,n),{schedule:{type:"crontab",value:_n(o)}})}}):e[t]})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return o}));var i=n(26),r=n(30);const a=Object(r.b)();function o(e,t={}){if(!e)return"<unknown>";try{let n=e;const i=5,r=[];let a=0,o=0;const c=" > ",l=c.length;let d;const u=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<i&&(d=s(n,u),!("html"===d||a>1&&o+r.length*l+d.length>=p));)r.push(d),o+=d.length,n=n.parentNode;return r.reverse().join(c)}catch(e){return"<unknown>"}}function s(e,t){const n=e,r=[];let o,s,c,l,d;if(!n||!n.tagName)return"";if(a.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(u&&u.length)u.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&r.push("#"+n.id),o=n.className,o&&Object(i.m)(o))for(s=o.split(/\s+/),d=0;d<s.length;d++)r.push("."+s[d]);const p=["aria-label","type","name","title","alt"];for(d=0;d<p.length;d++)c=p[d],l=n.getAttribute(c),l&&r.push(`[${c}="${l}"]`);return r.join("")}function c(){try{return a.document.location.href}catch(e){return""}}function l(e){return a.document&&a.document.querySelector?a.document.querySelector(e):null}function d(e){if(!a.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var i=n(29),r=n(89);function a(e){const t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return`${t}//${e.host}${n}${e.path?"/"+e.path:""}/api/`}function o(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${a(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return Object(i.i)({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}(e,r)}`}function s(e,t){const n=Object(r.c)(e);if(!n)return"";const i=a(n)+"embed/error-page/";let o="dsn="+Object(r.b)(n);for(const e in t)if("dsn"!==e&&"onClose"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(o+="&name="+encodeURIComponent(e.name)),e.email&&(o+="&email="+encodeURIComponent(e.email))}else o+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${i}?${o}`}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(30),r=n(41);let a=null;function o(e){Object(r.a)("error",e),Object(r.b)("error",s)}function s(){a=i.a.onerror,i.a.onerror=function(e,t,n,i,o){const s={column:i,error:o,line:n,msg:e,url:t};return Object(r.d)("error",s),!(!a||a.__SENTRY_LOADER__)&&a.apply(this,arguments)},i.a.onerror.__SENTRY_INSTRUMENTED__=!0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(30),r=n(41);let a=null;function o(e){const t="unhandledrejection";Object(r.a)(t,e),Object(r.b)(t,s)}function s(){a=i.a.onunhandledrejection,i.a.onunhandledrejection=function(e){const t=e;return Object(r.d)("unhandledrejection",t),!(a&&!a.__SENTRY_LOADER__)||a.apply(this,arguments)},i.a.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var i=n(112),r=n(31);function a(e){return(e||Object(r.c)()).getScope().getTransaction()}const o=i.b},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(17),r=n(29),a=n(30),o=n(41);function s(e){Object(o.a)("console",e),Object(o.b)("console",c)}function c(){"console"in a.a&&i.a.forEach((function(e){e in a.a.console&&Object(r.e)(a.a.console,e,(function(t){return i.d[e]=t,function(...t){const n={args:t,level:e};Object(o.d)("console",n);const r=i.d[e];r&&r.apply(a.a.console,t)}}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(29),r=n(79),a=n(30),o=n(41);function s(e){Object(o.a)("fetch",e),Object(o.b)("fetch",c)}function c(){Object(r.f)()&&Object(i.e)(a.a,"fetch",(function(e){return function(...t){const{method:n,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:d(t),method:l(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:d(t),method:l(t,"method")?String(t.method).toUpperCase():"GET"}}(t),r={args:t,fetchData:{method:n,url:i},startTimestamp:Date.now()};return Object(o.d)("fetch",{...r}),e.apply(a.a,t).then(e=>{const t={...r,endTimestamp:Date.now(),response:e};return Object(o.d)("fetch",t),e},e=>{const t={...r,endTimestamp:Date.now(),error:e};throw Object(o.d)("fetch",t),e})}}))}function l(e,t){return!!e&&"object"==typeof e&&!!e[t]}function d(e){return"string"==typeof e?e:e?l(e,"url")?e.url:e.toString?e.toString():"":""}},function(e,t){e.exports=require("https")},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i="7.112.0"},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return m}));var i=n(32),r=n(58),a=n(17),o=n(29),s=n(22),c=n(124),l=n(48),d=n(95),u=n(35),p=n(101);class m{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class h{constructor(e={}){this._traceId=e.traceId||Object(i.h)(),this._spanId=e.spanId||Object(i.h)().substring(16),this._startTime=e.startTimestamp||Object(r.d)(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[l.c]:e.origin||"manual",[l.b]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),void 0!==e.exclusiveTime&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[l.b]}set op(e){this.setAttribute(l.b,e)}get origin(){return this._attributes[l.c]}set origin(e){this.setAttribute(l.c,e)}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?u.b:u.a}}startChild(e){const t=new h({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t);const n=Object(d.a)(this);if(t.transaction=n,s.a&&n){const i=`[Tracing] Starting '${e&&e.op||"< unknown op >"}' span on transaction '${Object(u.e)(t).description||"< unknown name >"}' (${n.spanContext().spanId}).`;a.c.log(i),this._logMessage=i}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setAttribute(e,t){void 0===t?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach(t=>this.setAttribute(t,e[t]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return Object(p.c)(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return"ok"===this._status}finish(e){return this.end(e)}end(e){if(this._endTime)return;const t=Object(d.a)(this);if(s.a&&t&&t.spanContext().spanId!==this._spanId){const e=this._logMessage;e&&a.c.log(e.replace("Starting","Finishing"))}this._endTime=Object(u.d)(e)}toTraceparent(){return Object(u.g)(this)}toContext(){return Object(o.c)({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return Object(u.f)(this)}getSpanJSON(){return Object(o.c)({data:this._getData(),description:this._name,op:this._attributes[l.b],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[l.c],_metrics_summary:Object(c.a)(this),profile_id:this._attributes[l.a],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:e,_attributes:t}=this,n=Object.keys(e).length>0,i=Object.keys(t).length>0;if(n||i)return n&&i?{...e,...t}:n?e:t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n(24);function r(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=Object(i.k)(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}},function(e,t){e.exports=require("console")},function(e,t,n){"use strict";var i,r,a;n.d(t,"a",(function(){return a})),function(e){e[e.ASSERT=0]="ASSERT",e[e.REPLACE=1]="REPLACE",e[e.IGNORE=2]="IGNORE"}(i||(i={})),function(e){e[e.ASSERT=0]="ASSERT",e[e.IGNORE=1]="IGNORE"}(r||(r={})),function(e){e.TRAY="desktop_tray",e.DESKTOP_PERFORMANCE="desktop_perf",e.COLLAB_BROWSE="desktop_browse",e.CLIENT_SYNC_BOUNDARY="client_sync_boundary"}(a||(a={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}));const i="__platform/getInjectedValues",r="managed_electron_views"},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"d",(function(){return _})),n.d(t,"c",(function(){return v}));class i{constructor(){}async*createStream(){for(;;)yield await new Promise(e=>{this.resolveNext=e})}getStream(){if(this.generator)throw new Error("EventStream.getStream() can only be called once. Multiple concurrent consumers are not supported.");return this.generator=this.createStream(),this.generator}yieldEvent(e){this.resolveNext&&(this.resolveNext(e),this.resolveNext=void 0)}}var r=n(10),a=n(3),o=n(90),s=n(43),c=n(0);const l="META_ENGINE_API_EVENT_TO_TRANSPORT",d="BACKUP_ENGINE_API_EVENT_TO_TRANSPORT";function u(e,t){const n=o.e.get(e.$typeName);if(!n)throw new Error("No schema found for type: "+e.$typeName);if("message"!==n.kind)throw new Error("Schema is not a message type for type: "+e.$typeName);return Object(s.toJson)(n,e)}function p(e,t){const n="string"==typeof t?JSON.parse(t):t,i=Object(o.c)(e);return Object(s.fromJson)(i,n)}const m=e=>e.split("/").pop(),h={};let g;const f=new Map;class b{constructor(e){this.accountId=e,this.engineEventStreamMaps=new Map}async unary_unary(e,t,n){Object(c.b)(`[MetaEngineAPI: unary_unary] Invoking method: ${e} for account: ${this.accountId}`);const i=m(e),r=(e=>e.split("/")[1])(e);if(!i)throw new Error("Unknown path: "+e);if(!r)throw new Error("Unknown service for path: "+e);const a=t?{body:u(t),account_id:this.accountId}:{account_id:this.accountId},o=await(e=>{if(null==h[e])throw Object(c.b)(`RPC Service not initialized for ${e}: ${JSON.stringify(h,null,2)}`),new Error("DBX_ENGINE_API_PYTHON_TRANSPORT_CLIENT_UNINITIALIZED");return h[e]})(r).invokeCommand(i,a);if(o&&i){const t=p(e,o.body);if(void 0!==t)return t}return o?JSON.parse(o.body):void 0}async unary_stream(e,t,n){null==t||t.payload;const o=m(e);if("GetBackupPublishedEvents"===o||"GetPublishedEvents"===o){if(this.engineEventStreamMaps.has(o))return Object(r.c)(a.a.FENIX,this.unary_stream.name,"GetPublishedEvents"===o?"[MetaEngineAPI: unary_stream] Returning Existing event stream for id:":"[MetaEngineAPI: unary_stream] Returning Existing Backup event stream for id:",this.accountId),this.engineEventStreamMaps.get(o).getStream();Object(r.c)(a.a.FENIX,this.unary_stream.name,"GetPublishedEvents"===o?"[MetaEngineAPI: unary_stream] Creating New Event stream for id:":"[MetaEngineAPI: unary_stream] Creating New Backup Event stream for id:",this.accountId);const e=new i;return this.engineEventStreamMaps.set(o,e),e.getStream()}throw new Error("Unknown method for streaming: "+o)}yieldBackupEvent(e){var t;const n=p("/BackupServiceApi/GetBackupPublishedEvents",e.body);n&&(null===(t=this.engineEventStreamMaps.get("GetBackupPublishedEvents"))||void 0===t||t.yieldEvent(n))}yieldEvent(e){var t;const n=p("/SyncEngineApi/GetPublishedEvents",e.body);n&&(null===(t=this.engineEventStreamMaps.get("GetPublishedEvents"))||void 0===t||t.yieldEvent(n))}}async function _(e,t){for(const t of Object(o.b)())h[t]=e("fenix:meta_engine_api_python_transport_client:"+t,{});g=t,g.on(l,async e=>{const t=f.get(e.account_id);t&&t.yieldEvent(e)}),g.on(d,async e=>{const t=f.get(e.account_id);t&&t.yieldBackupEvent(e)})}function v(e){if(f.has(e))return f.get(e);const t=new b(e);return f.set(e,t),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c}));var i,r=n(1);!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(i||(i={}));var a=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r.code=n,r.originalMessage=i,r}return Object(r.__extends)(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),o=function(e){function t(t,n,r,a){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(r).join('", "'),'"'),i.INVALID_VALUE,a)||this}return Object(r.__extends)(t,e),t}(a),s=function(e){function t(t,n,r){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),i.INVALID_VALUE,r)||this}return Object(r.__extends)(t,e),t}(a),c=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),i.MISSING_VALUE,n)||this}return Object(r.__extends)(t,e),t}(a)},,function(e,t){e.exports=require("events")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=l;const i=n(235),r=n(84),a=n(128),o=n(195),s=n(153),c=n(173);function l(e,t){if((0,i.isMessage)(t,e))return t;const n=function(e){let t;if(function(e){switch(e.file.edition){case 999:return!1;case 998:return!0;default:return e.fields.some(e=>2!=e.presence&&"message"!=e.fieldKind&&!e.oneof)}}(e)){const n=b.get(e);let i,r;if(n)({prototype:i,members:r}=n);else{i={},r=new Set;for(const t of e.members)"oneof"!=t.kind&&("scalar"!=t.fieldKind&&"enum"!=t.fieldKind||2!=t.presence&&(r.add(t),i[t.localName]=_(t)));b.set(e,{prototype:i,members:r})}t=Object.create(i),t.$typeName=e.typeName;for(const n of e.members)if(!r.has(n)){if("field"==n.kind){if("message"==n.fieldKind)continue;if(("scalar"==n.fieldKind||"enum"==n.fieldKind)&&2!=n.presence)continue}t[n.localName]=_(n)}}else{t={$typeName:e.typeName};for(const n of e.members)"oneof"!=n.kind&&2!=n.presence||(t[n.localName]=_(n))}return t}(e);return void 0!==t&&function(e,t,n){for(const i of e.members){let e,r=n[i.localName];if(null!=r){if("oneof"==i.kind){const t=(0,s.unsafeOneofCase)(n,i);if(!t)continue;e=t,r=(0,s.unsafeGet)(n,t)}else e=i;switch(e.fieldKind){case"message":r=m(e,r);break;case"scalar":r=d(e,r);break;case"list":r=p(e,r);break;case"map":r=u(e,r)}(0,s.unsafeSet)(t,e,r)}}}(e,n,t),n}function d(e,t){return e.scalar==r.ScalarType.BYTES?h(t):t}function u(e,t){if((0,o.isObject)(t)){if(e.scalar==r.ScalarType.BYTES)return g(t,h);if("message"==e.mapKind)return g(t,t=>m(e,t))}return t}function p(e,t){if(Array.isArray(t)){if(e.scalar==r.ScalarType.BYTES)return t.map(h);if("message"==e.listKind)return t.map(t=>m(e,t))}return t}function m(e,t){if("message"==e.fieldKind&&!e.oneof&&(0,c.isWrapperDesc)(e.message))return d(e.message.fields[0],t);if((0,o.isObject)(t)){if("google.protobuf.Struct"==e.message.typeName&&"google.protobuf.Value"!==e.parent.typeName)return t;if(!(0,i.isMessage)(t,e.message))return l(e.message,t)}return t}function h(e){return Array.isArray(e)?new Uint8Array(e):e}function g(e,t){const n={};for(const i of Object.entries(e))n[i[0]]=t(i[1]);return n}const f=Symbol(),b=new WeakMap;function _(e){if("oneof"==e.kind)return{case:void 0};if("list"==e.fieldKind)return[];if("map"==e.fieldKind)return{};if("message"==e.fieldKind)return f;const t=e.getDefaultValue();return void 0!==t?"scalar"==e.fieldKind&&e.longAsString?t.toString():t:"scalar"==e.fieldKind?(0,a.scalarZeroValue)(e.scalar,e.longAsString):e.enum.values[0].number}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafeLocal=void 0,t.unsafeOneofCase=function(e,t){const n=e[t.localName].case;if(void 0===n)return n;return t.fields.find(e=>e.localName===n)},t.unsafeIsSet=function(e,t){const n=t.localName;if(t.oneof)return e[t.oneof.localName].case===n;if(2!=t.presence)return void 0!==e[n]&&Object.prototype.hasOwnProperty.call(e,n);switch(t.fieldKind){case"list":return e[n].length>0;case"map":return Object.keys(e[n]).length>0;case"scalar":return!(0,i.isScalarZeroValue)(t.scalar,e[n]);case"enum":return e[n]!==t.enum.values[0].number}throw new Error("message field with implicit presence")},t.unsafeIsSetExplicit=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&void 0!==e[t]},t.unsafeGet=function(e,t){if(t.oneof){const n=e[t.oneof.localName];return n.case===t.localName?n.value:void 0}return e[t.localName]},t.unsafeSet=function(e,t,n){t.oneof?e[t.oneof.localName]={case:t.localName,value:n}:e[t.localName]=n},t.unsafeClear=function(e,t){const n=t.localName;if(t.oneof){const i=t.oneof.localName;e[i].case===n&&(e[i]={case:void 0})}else if(2!=t.presence)delete e[n];else switch(t.fieldKind){case"map":e[n]={};break;case"list":e[n]=[];break;case"enum":e[n]=t.enum.values[0].number;break;case"scalar":e[n]=(0,i.scalarZeroValue)(t.scalar,t.longAsString)}};const i=n(128);t.unsafeLocal=Symbol.for("reflect unsafe local")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryReader=t.BinaryWriter=t.INT32_MIN=t.INT32_MAX=t.UINT32_MAX=t.FLOAT32_MIN=t.FLOAT32_MAX=t.WireType=void 0;const i=n(308),r=n(116),a=n(238);var o;!function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"}(o||(t.WireType=o={})),t.FLOAT32_MAX=34028234663852886e22,t.FLOAT32_MIN=-34028234663852886e22,t.UINT32_MAX=4294967295,t.INT32_MAX=2147483647,t.INT32_MIN=-2147483648;t.BinaryWriter=class{constructor(e=(0,a.getTextEncoding)().encodeUtf8){this.encodeUtf8=e,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(c(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return s(e),(0,i.varint32write)(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.encodeUtf8(e);return this.uint32(t.byteLength),this.raw(t)}float(e){!function(e){if("string"==typeof e){const t=e;if(e=Number(e),isNaN(e)&&"NaN"!==t)throw new Error("invalid float32: "+t)}else if("number"!=typeof e)throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>t.FLOAT32_MAX||e<t.FLOAT32_MIN))throw new Error("invalid float32: "+e)}(e);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){c(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){s(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return s(e),e=(e<<1^e>>31)>>>0,(0,i.varint32write)(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),i=r.protoInt64.enc(e);return n.setInt32(0,i.lo,!0),n.setInt32(4,i.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),i=r.protoInt64.uEnc(e);return n.setInt32(0,i.lo,!0),n.setInt32(4,i.hi,!0),this.raw(t)}int64(e){let t=r.protoInt64.enc(e);return(0,i.varint64write)(t.lo,t.hi,this.buf),this}sint64(e){let t=r.protoInt64.enc(e),n=t.hi>>31,a=t.lo<<1^n,o=(t.hi<<1|t.lo>>>31)^n;return(0,i.varint64write)(a,o,this.buf),this}uint64(e){let t=r.protoInt64.uEnc(e);return(0,i.varint64write)(t.lo,t.hi,this.buf),this}};function s(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>t.INT32_MAX||e<t.INT32_MIN)throw new Error("invalid int32: "+e)}function c(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw new Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>t.UINT32_MAX||e<0)throw new Error("invalid uint32: "+e)}t.BinaryReader=class{constructor(e,t=(0,a.getTextEncoding)().decodeUtf8){this.decodeUtf8=t,this.varint64=i.varint64read,this.uint32=i.varint32read,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.uint32(),t=e>>>3,n=7&e;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e,t){let n=this.pos;switch(e){case o.Varint:for(;128&this.buf[this.pos++];);break;case o.Bit64:this.pos+=4;case o.Bit32:this.pos+=4;break;case o.LengthDelimited:let n=this.uint32();this.pos+=n;break;case o.StartGroup:for(;;){const[e,n]=this.tag();if(n===o.EndGroup){if(void 0!==t&&e!==t)throw new Error("invalid end group tag");break}this.skip(n,e)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return r.protoInt64.dec(...this.varint64())}uint64(){return r.protoInt64.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,r.protoInt64.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return r.protoInt64.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return r.protoInt64.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.decodeUtf8(this.bytes())}}},function(e,t,n){"use strict";
/*!
 * http-errors
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2016 Douglas Christopher Wilson
 * MIT Licensed
 */var i,r=n(111)("http-errors"),a=n(199),o=n(200),s=n(130),c=n(497);function l(e){return Number(String(e).charAt(0)+"00")}function d(e,t){var n=Object.getOwnPropertyDescriptor(e,"name");n&&n.configurable&&(n.value=t,Object.defineProperty(e,"name",n))}function u(e){return"Error"!==e.substr(-5)?e+"Error":e}e.exports=function e(){for(var t,n,i=500,a={},s=0;s<arguments.length;s++){var c=arguments[s],d=typeof c;if("object"===d&&c instanceof Error)i=(t=c).status||t.statusCode||i;else if("number"===d&&0===s)i=c;else if("string"===d)n=c;else{if("object"!==d)throw new TypeError("argument #"+(s+1)+" unsupported type "+d);a=c}}"number"==typeof i&&(i<400||i>=600)&&r("non-error status code; use only 4xx or 5xx status codes");("number"!=typeof i||!o.message[i]&&(i<400||i>=600))&&(i=500);var u=e[i]||e[l(i)];t||(t=u?new u(n):new Error(n||o.message[i]),Error.captureStackTrace(t,e));u&&t instanceof u&&t.status===i||(t.expose=i<500,t.status=t.statusCode=i);for(var p in a)"status"!==p&&"statusCode"!==p&&(t[p]=a[p]);return t},e.exports.HttpError=function(){function e(){throw new TypeError("cannot construct abstract class")}return s(e,Error),e}(),e.exports.isHttpError=(i=e.exports.HttpError,function(e){return!(!e||"object"!=typeof e)&&(e instanceof i||e instanceof Error&&"boolean"==typeof e.expose&&"number"==typeof e.statusCode&&e.status===e.statusCode)}),function(e,t,n){t.forEach((function(t){var i,r=c(o.message[t]);switch(l(t)){case 400:i=function(e,t,n){var i=u(t);function r(e){var t=null!=e?e:o.message[n],s=new Error(t);return Error.captureStackTrace(s,r),a(s,r.prototype),Object.defineProperty(s,"message",{enumerable:!0,configurable:!0,value:t,writable:!0}),Object.defineProperty(s,"name",{enumerable:!1,configurable:!0,value:i,writable:!0}),s}return s(r,e),d(r,i),r.prototype.status=n,r.prototype.statusCode=n,r.prototype.expose=!0,r}(n,r,t);break;case 500:i=function(e,t,n){var i=u(t);function r(e){var t=null!=e?e:o.message[n],s=new Error(t);return Error.captureStackTrace(s,r),a(s,r.prototype),Object.defineProperty(s,"message",{enumerable:!0,configurable:!0,value:t,writable:!0}),Object.defineProperty(s,"name",{enumerable:!1,configurable:!0,value:i,writable:!0}),s}return s(r,e),d(r,i),r.prototype.status=n,r.prototype.statusCode=n,r.prototype.expose=!1,r}(n,r,t)}i&&(e[t]=i,e[r]=i)}))}(e.exports,o.codes,e.exports.HttpError)},function(e,t,n){"use strict";var i=n(529),r=n(530),a=n(531),o=n(532),s=n(350),c=n(177),l=n(533),d=Function,u=function(e){try{return d('"use strict"; return ('+e+").constructor;")()}catch(e){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(e){p=null}var m=function(){throw new c},h=p?function(){try{return m}catch(e){try{return p(arguments,"callee").get}catch(e){return m}}}():m,g=n(534)(),f=n(536)(),b=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),_={},v="undefined"!=typeof Uint8Array&&b?b(Uint8Array):void 0,y={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":r,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":_,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":a,"%ReferenceError%":o,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):void 0,"%Symbol%":g?Symbol:void 0,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":v,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet};if(b)try{null.error}catch(e){var I=b(b(e));y["%Error.prototype%"]=I}var w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(250),C=n(538),E=A.call(Function.call,Array.prototype.concat),S=A.call(Function.apply,Array.prototype.splice),O=A.call(Function.call,String.prototype.replace),R=A.call(Function.call,String.prototype.slice),N=A.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,B=function(e){var t=R(e,0,1),n=R(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var i=[];return O(e,T,(function(e,t,n,r){i[i.length]=n?O(r,x,"$1"):t||e})),i},G=function(e,t){var n,i=e;if(C(w,i)&&(i="%"+(n=w[i])[0]+"%"),C(y,i)){var r=y[i];if(r===_&&(r=function e(t){var n;if("%AsyncFunction%"===t)n=u("async function () {}");else if("%GeneratorFunction%"===t)n=u("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=u("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var r=e("%AsyncGenerator%");r&&b&&(n=b(r.prototype))}return y[t]=n,n}(i)),void 0===r&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=B(e),i=n.length>0?n[0]:"",r=G("%"+i+"%",t),a=r.name,o=r.value,l=!1,d=r.alias;d&&(i=d[0],S(n,E([0,1],d)));for(var u=1,m=!0;u<n.length;u+=1){var h=n[u],g=R(h,0,1),f=R(h,-1);if(('"'===g||"'"===g||"`"===g||'"'===f||"'"===f||"`"===f)&&g!==f)throw new s("property names with quotes must have matching quotes");if("constructor"!==h&&m||(l=!0),C(y,a="%"+(i+="."+h)+"%"))o=y[a];else if(null!=o){if(!(h in o)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(p&&u+1>=n.length){var b=p(o,h);o=(m=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:o[h]}else m=C(o,h),o=o[h];m&&!l&&(y[a]=o)}}return o}},function(e,t,n){"use strict";var i=n(206),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var a=Object.create(n(180));a.inherits=n(130);var o=n(364),s=n(367);a.inherits(u,o);for(var c=r(s.prototype),l=0;l<c.length;l++){var d=c[l];u.prototype[d]||(u.prototype[d]=s.prototype[d])}function u(e){if(!(this instanceof u))return new u(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||i.nextTick(m,this)}function m(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),u.prototype._destroy=function(e,t){this.push(null),this.end(),i.nextTick(t,e)}},function(e,t,n){const i=n(66);e.exports=(e,t,n=!1)=>{if(e instanceof i)return e;try{return new i(e,t)}catch(e){if(!n)return null;throw e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n(32),r=n(29),a=n(30),o=n(41);const s=a.a;let c,l,d;function u(e){Object(o.a)("dom",e),Object(o.b)("dom",p)}function p(){if(!s.document)return;const e=o.d.bind(null,"dom"),t=m(e,!0);s.document.addEventListener("click",t,!1),s.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=s[t]&&s[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(r.e)(n,"addEventListener",(function(t){return function(n,i,r){if("click"===n||"keypress"==n)try{const i=this,a=i.__sentry_instrumentation_handlers__=i.__sentry_instrumentation_handlers__||{},o=a[n]=a[n]||{refCount:0};if(!o.handler){const i=m(e);o.handler=i,t.call(this,n,i,r)}o.refCount++}catch(e){}return t.call(this,n,i,r)}})),Object(r.e)(n,"removeEventListener",(function(e){return function(t,n,i){if("click"===t||"keypress"==t)try{const n=this,r=n.__sentry_instrumentation_handlers__||{},a=r[t];a&&(a.refCount--,a.refCount<=0&&(e.call(this,t,a.handler,i),a.handler=void 0,delete r[t]),0===Object.keys(r).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,i)}})))})}function m(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const a=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,a))return;Object(r.a)(n,"_sentryCaptured",!0),a&&!a._sentryId&&Object(r.a)(a,"_sentryId",Object(i.h)());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==l)return!1;try{if(!e.target||e.target._sentryId!==d)return!1}catch(e){}return!0}(n)){e({event:n,name:o,global:t}),l=n.type,d=a?a._sentryId:void 0}clearTimeout(c),c=s.setTimeout(()=>{d=void 0,l=void 0},1e3)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n(29),r=n(30),a=n(219),o=n(41);const s=r.a;let c;function l(e){Object(o.a)("history",e),Object(o.b)("history",d)}function d(){if(!Object(a.a)())return;const e=s.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=c,t=String(n);c=t;const i={from:e,to:t};Object(o.d)("history",i)}return e.apply(this,t)}}s.onpopstate=function(...t){const n=s.location.href,i=c;c=n;const r={from:i,to:n};if(Object(o.d)("history",r),e)try{return e.apply(this,t)}catch(e){}},Object(i.e)(s.history,"pushState",t),Object(i.e)(s.history,"replaceState",t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return s}));var i=n(26),r=n(32),a=n(57),o=n(29);function s(e,t){return e(t.stack||"",1)}function c(e,t){const n={type:t.name||t.constructor.name,value:t.message},i=s(e,t);return i.length&&(n.stacktrace={frames:i}),n}function l(e,t,n,s){const l="function"==typeof e?e().getClient():e;let d=n;const u=s&&s.data&&s.data.mechanism||{handled:!0,type:"generic"};let p;if(!Object(i.d)(n)){if(Object(i.j)(n)){const e=l&&l.getOptions().normalizeDepth;p={__serialized__:Object(a.b)(n,e)};const t=function(e){if("name"in e&&"string"==typeof e.name){let t=`'${e.name}' captured as exception`;return"message"in e&&"string"==typeof e.message&&(t+=` with message '${e.message}'`),t}return"message"in e&&"string"==typeof e.message?e.message:"Object captured as exception with keys: "+Object(o.d)(e)}(n);d=s&&s.syntheticException||new Error(t),d.message=t}else d=s&&s.syntheticException||new Error(n),d.message=n;u.synthetic=!0}const m={exception:{values:[c(t,d)]}};return p&&(m.extra=p),Object(r.c)(m,void 0,void 0),Object(r.b)(m,u),{...m,event_id:s&&s.event_id}}function d(e,t,n="info",r,a){const o={event_id:r&&r.event_id,level:n};if(a&&r&&r.syntheticException){const n=s(e,r.syntheticException);n.length&&(o.exception={values:[{value:t,stacktrace:{frames:n}}]})}if(Object(i.i)(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return _}));var i=n(193),r=n(226),a=n(49),o=n(88),s=n(98),c=n(31),l=n(24),d=n(36),u=n(17),p=n(30),m=n(75),h=n(73),g=n(413);function f(e,...t){u.c.log("[ANR] "+e,...t)}function b(){const e=Object(o.b)().getScopeData();return Object(s.b)(e,Object(c.e)().getScopeData()),Object(s.b)(e,Object(l.l)().getScopeData()),e.attachments=[],e.eventProcessors=[],e}const _=Object(d.d)((t={})=>