@decocms/mesh 2.10.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BI-lv-P2.js → AlertCircle-Cso_Xxvk.js} +1 -1
- package/dist/client/assets/{ArrowLeft-WX776rGw.js → ArrowLeft-BrsZ2N_5.js} +1 -1
- package/dist/client/assets/{Check-Dh23dmDM.js → Check-JFkjTCfG.js} +1 -1
- package/dist/client/assets/{ChevronDown-CQl6wdMq.js → ChevronDown-HtFMO0lw.js} +1 -1
- package/dist/client/assets/{Clock-C2L66fjj.js → Clock-CW5u1cfj.js} +1 -1
- package/dist/client/assets/{Code01-BvYrq72o.js → Code01-CgNchnl3.js} +1 -1
- package/dist/client/assets/{Copy01-BX4_oHqx.js → Copy01-Dadp_RDG.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-9lU8MC-X.js → DotsHorizontal-B0A7sUYv.js} +1 -1
- package/dist/client/assets/{DotsVertical-BBtotCm7.js → DotsVertical-BHUUUCDx.js} +1 -1
- package/dist/client/assets/Edit01-CxRkZTQ1.js +1 -0
- package/dist/client/assets/{File06-lv7rH_v1.js → File06-D0TXCuMx.js} +1 -1
- package/dist/client/assets/{FilterLines-WZSp93Oe.js → FilterLines-_uykt7r4.js} +1 -1
- package/dist/client/assets/{FlipBackward-CqqvNJYu.js → FlipBackward-GGMv99yc.js} +1 -1
- package/dist/client/assets/{GitBranch01-DN-LFsG4.js → GitBranch01-BUTuezlq.js} +1 -1
- package/dist/client/assets/{Grid01-bigl9l-5.js → Grid01-BbdtRdR8.js} +1 -1
- package/dist/client/assets/{Inbox01-BIZdM9VF.js → Inbox01-CgwXLK3n.js} +1 -1
- package/dist/client/assets/{InfoCircle-FggQ2WMl.js → InfoCircle-D6qJG9Nl.js} +1 -1
- package/dist/client/assets/{Key01-BHIpjeh2.js → Key01-8ewaPBuD.js} +1 -1
- package/dist/client/assets/{LinkExternal01-YcVnQhq1.js → LinkExternal01-D0Wjfr3t.js} +1 -1
- package/dist/client/assets/{Loading01-nz4zkIiQ.js → Loading01-NW_f44Lz.js} +1 -1
- package/dist/client/assets/{Lock01-DJbaRRVq.js → Lock01-BTPtPjN4.js} +1 -1
- package/dist/client/assets/{Play-Dy3YBriV.js → Play-CIMfsFF1.js} +1 -1
- package/dist/client/assets/{Plus-DRzcJPy4.js → Plus-DaP4KLuJ.js} +1 -1
- package/dist/client/assets/{SearchMd-CGgWiIHk.js → SearchMd-tOSOFUes.js} +1 -1
- package/dist/client/assets/{Terminal-DDxodu0O.js → Terminal-ANRX3jJ8.js} +1 -1
- package/dist/client/assets/{Trash01-Nn4emH5w.js → Trash01-CjDzx3jP.js} +1 -1
- package/dist/client/assets/{X-CSDtf13Z.js → X-D3ljCSd1.js} +1 -1
- package/dist/client/assets/{XClose-Da4Q_9Br.js → XClose-Ba3zyI0J.js} +1 -1
- package/dist/client/assets/{alert-dialog-BrdP9Xiy.js → alert-dialog-_Gzpv9vf.js} +1 -1
- package/dist/client/assets/{auth-BkX07Kdp.js → auth-C9dSkS_x.js} +1 -1
- package/dist/client/assets/{auth-catchall-CgZMKj4U.js → auth-catchall-DRL5ZGJM.js} +1 -1
- package/dist/client/assets/{avatar-DVkpHhcq.js → avatar-D1o5pnzU.js} +1 -1
- package/dist/client/assets/{badge-DZOpuutl.js → badge-0b6sJe4S.js} +1 -1
- package/dist/client/assets/{card-VaGCmdRN.js → card-B3fsloDi.js} +1 -1
- package/dist/client/assets/{checkbox-B6_pb64c.js → checkbox-2xIaHvS4.js} +1 -1
- package/dist/client/assets/{collection-detail-BZTq36Jq.js → collection-detail-Bu5gtjud.js} +31 -31
- package/dist/client/assets/{collection-display-button-0kCgwjcX.js → collection-display-button-BGIcja12.js} +1 -1
- package/dist/client/assets/{collection-header-C5jLEW4T.js → collection-header-DhWbmVkk.js} +1 -1
- package/dist/client/assets/{collection-page-BxN-pfZ4.js → collection-page-B4ZjGX9V.js} +1 -1
- package/dist/client/assets/{collection-search-DCk3URyd.js → collection-search-CYZk6T6Z.js} +1 -1
- package/dist/client/assets/collection-tab-IeT0mJ-2.js +1 -0
- package/dist/client/assets/{collection-table-wrapper-DbtYisXO.js → collection-table-wrapper-D2niE2Ci.js} +1 -1
- package/dist/client/assets/connection-card-D0c_wvmz.js +1 -0
- package/dist/client/assets/connection-detail-BmNPUV8x.js +1 -0
- package/dist/client/assets/connections-U2y3agtD.js +1 -0
- package/dist/client/assets/constants-Cy709IUA.js +1 -0
- package/dist/client/assets/{create-organization-dialog-BcohdvN6.js → create-organization-dialog-D0WQQsLG.js} +1 -1
- package/dist/client/assets/{dialog-rGW8NOdv.js → dialog-BXeLl5mO.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DEdU2p2E.js → dropdown-menu-CnL8UM0z.js} +1 -1
- package/dist/client/assets/{empty-state-C6fFQCSt.js → empty-state-BmkZOMzL.js} +1 -1
- package/dist/client/assets/empty-state-DzS1Zp7m.js +2 -0
- package/dist/client/assets/{env-vars-editor-DtIOMaFz.js → env-vars-editor-B_mIaT86.js} +1 -1
- package/dist/client/assets/{error-boundary-B28JvE1I.js → error-boundary-BQnJ9S9E.js} +1 -1
- package/dist/client/assets/{extract-connection-data-fJTZE6Hc.js → extract-connection-data-DPoJQhk8.js} +1 -1
- package/dist/client/assets/{form-CE1tfcze.js → form-DrOt6d2d.js} +1 -1
- package/dist/client/assets/gateway-detail-CniDbJPb.js +1 -0
- package/dist/client/assets/gateways-DmEpJOpx.js +1 -0
- package/dist/client/assets/{home-lONkAboE.js → home-HrkEcREJ.js} +1 -1
- package/dist/client/assets/{index-CJEYCkTv.js → index-Bb8rHnPb.js} +1 -1
- package/dist/client/assets/index-CBIrwxtj.js +88 -0
- package/dist/client/assets/index-ChrSnaFS.css +1 -0
- package/dist/client/assets/{index-Dc4mPG7D.js → index-DMNk-OUX.js} +3 -3
- package/dist/client/assets/index-GoXtajA4.js +25 -0
- package/dist/client/assets/{index-CGbuv4sL.js → index-XOpbMEap.js} +1 -1
- package/dist/client/assets/{input-CLQFaB_P.js → input-68J17rBp.js} +1 -1
- package/dist/client/assets/{layout-D-qTqL0P.js → layout-Olb4shdE.js} +1 -1
- package/dist/client/assets/{lazy-highlighter-CM_r6Qg6.js → lazy-highlighter-Ccgc_fxj.js} +1 -1
- package/dist/client/assets/localstorage-keys-C62ZbWuB.js +1 -0
- package/dist/client/assets/{login-CY0fBMtA.js → login-UTKAAaeX.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DwoWo555.js → mcp-oauth-Db8WtQ8u.js} +1 -1
- package/dist/client/assets/mcp-server-detail-BvVQovUz.js +1 -0
- package/dist/client/assets/members-V-vtwMYY.js +3 -0
- package/dist/client/assets/{monaco-editor-CGmVJ7Sz.js → monaco-editor-B_MycISs.js} +1 -1
- package/dist/client/assets/{monitoring-8m7n1ABH.js → monitoring-CBmCnQ7i.js} +20 -20
- package/dist/client/assets/{oauth-callback-C3UTt1IM.js → oauth-callback-BYBqbF1w.js} +1 -1
- package/dist/client/assets/page-DYF0Qz3l.js +1 -0
- package/dist/client/assets/page-DrIZd1pO.js +35 -0
- package/dist/client/assets/{pin-to-sidebar-button-DmlmCu_p.js → pin-to-sidebar-button-B1xHHS9n.js} +1 -1
- package/dist/client/assets/{popover-Bt6Irkfs.js → popover-DC9U4d6e.js} +1 -1
- package/dist/client/assets/{project-context-provider-jIErvTKU.js → project-context-provider-BJIP5a-U.js} +1 -1
- package/dist/client/assets/{resizable-BDACILOB.js → resizable-CW5_SPIS.js} +1 -1
- package/dist/client/assets/{resource-tabs-B9UXtdu9.js → resource-tabs-BKSlcL1W.js} +1 -1
- package/dist/client/assets/{select-CXOQrDyU.js → select-B9KJyTZZ.js} +1 -1
- package/dist/client/assets/{settings-Cml1v0xs.js → settings-CYg4YPRI.js} +1 -1
- package/dist/client/assets/shell-layout-KIN6fL5j.js +3 -0
- package/dist/client/assets/{spinner-C-rDsJGC.js → spinner-B0sczm1j.js} +1 -1
- package/dist/client/assets/{switch-C2oVrx7C.js → switch-BuVvmF04.js} +1 -1
- package/dist/client/assets/{textarea-DxDFaLzd.js → textarea-BAUX8Qgd.js} +1 -1
- package/dist/client/assets/thread-history-popover-Dv63nk6L.js +20 -0
- package/dist/client/assets/tool-set-selector-DMsE0yRo.js +1 -0
- package/dist/client/assets/tools-list-Dgf0oqyC.js +1 -0
- package/dist/client/assets/{use-binding-C_WCv3Kw.js → use-binding-Dj4lal1A.js} +1 -1
- package/dist/client/assets/use-connection-DoWszS3j.js +1 -0
- package/dist/client/assets/{use-connection-resources-DAy5w-Ms.js → use-connection-resources-BywYCfzc.js} +1 -1
- package/dist/client/assets/use-create-gateway-Ca5SEa8I.js +1 -0
- package/dist/client/assets/use-gateway-CRpsitbG.js +1 -0
- package/dist/client/assets/{use-gateway-system-prompt-B0FWJC8i.js → use-gateway-system-prompt-B4ia2QxW.js} +1 -1
- package/dist/client/assets/{use-list-state-D9IMsf4Z.js → use-list-state-CPUcOhR_.js} +1 -1
- package/dist/client/assets/use-mcp-L2lisTXg.js +1 -0
- package/dist/client/assets/{use-members-BrVgN1Nv.js → use-members-7eRdYOTr.js} +1 -1
- package/dist/client/assets/{use-mobile-BmTi-FB3.js → use-mobile--ytA5LT5.js} +1 -1
- package/dist/client/assets/use-organization-settings-D6rXW2c_.js +1 -0
- package/dist/client/assets/use-tool-call-BBonHr6l.js +1 -0
- package/dist/client/assets/{value-Duay7dd7.js → value-Bd2XBV_y.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-Q_4Hio7O.js → view-mode-toggle-BpjQ6V4P.js} +1 -1
- package/dist/client/assets/well-known-mcp-D13f-8h2.js +1 -0
- package/dist/client/assets/workflow-CjynHD6b.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +161 -133
- package/dist/server/migrate.js +2 -2
- package/dist/server/server.js +162 -134
- package/package.json +1 -1
- package/dist/client/assets/collection-tab-BK4lXf-5.js +0 -1
- package/dist/client/assets/connection-card-CtcQXchE.js +0 -1
- package/dist/client/assets/connection-detail-Dtnc6jAX.js +0 -1
- package/dist/client/assets/connections-BkTTX2-6.js +0 -1
- package/dist/client/assets/constants-D7HtiX2k.js +0 -1
- package/dist/client/assets/gateway-detail-DpvUxeca.js +0 -1
- package/dist/client/assets/gateways-DPTsKKk2.js +0 -1
- package/dist/client/assets/index-B-_GLG4a.js +0 -25
- package/dist/client/assets/index-DjBifmxL.js +0 -88
- package/dist/client/assets/index-KJvlasGf.css +0 -1
- package/dist/client/assets/localstorage-keys-Csxol0-8.js +0 -1
- package/dist/client/assets/mcp-server-detail-BfkMNCXA.js +0 -1
- package/dist/client/assets/members-DlfrW4qm.js +0 -3
- package/dist/client/assets/page-CjTfwiJs.js +0 -1
- package/dist/client/assets/page-Cm8i9onu.js +0 -35
- package/dist/client/assets/shell-layout-BC-hIRVP.js +0 -3
- package/dist/client/assets/thread-history-popover-D_x2TXEl.js +0 -72
- package/dist/client/assets/tool-set-selector-B03cDU_f.js +0 -1
- package/dist/client/assets/tools-list-CCvCpz3e.js +0 -1
- package/dist/client/assets/use-connection-D1oWmd80.js +0 -2
- package/dist/client/assets/use-gateway-DEBoqh3W.js +0 -1
- package/dist/client/assets/use-mcp-BSK2ddKq.js +0 -1
- package/dist/client/assets/use-organization-settings-DPGpmRIO.js +0 -1
- package/dist/client/assets/use-tool-call-B5UsmKnA.js +0 -1
- package/dist/client/assets/useQuery-CjN7yze9.js +0 -1
- package/dist/client/assets/well-known-mcp-7PcWXInp.js +0 -1
- package/dist/client/assets/workflow-C6xPZGlX.js +0 -1
package/dist/server/migrate.js
CHANGED
|
@@ -208,7 +208,7 @@ To resolve the conflict:`,(0,IC.getConflictResolutionRecipe)(G,Q))}Y=J}else u20.
|
|
|
208
208
|
`).join(`
|
|
209
209
|
`+Z),Q.push(G+"m+"+iC.exports.humanize(this.diff)+"\x1B[0m")}else Q[0]=br4()+X+" "+Q[0]}function br4(){if(Mk0.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function fr4(...Q){return process.stderr.write(nC.formatWithOptions(Mk0.inspectOpts,...Q)+`
|
|
210
210
|
`)}function hr4(Q){if(Q)process.env.DEBUG=Q;else delete process.env.DEBUG}function xr4(){return process.env.DEBUG}function gr4(Q){Q.inspectOpts={};let X=Object.keys(Mk0.inspectOpts);for(let Y=0;Y<X.length;Y++)Q.inspectOpts[X[Y]]=Mk0.inspectOpts[X[Y]]}iC.exports=Vn()(Mk0);var{formatters:wk0}=iC.exports;wk0.o=function(Q){return this.inspectOpts.colors=this.useColors,nC.inspect(Q,this.inspectOpts).split(`
|
|
211
|
-
`).map((X)=>X.trim()).join(" ")};wk0.O=function(Q){return this.inspectOpts.colors=this.useColors,nC.inspect(Q,this.inspectOpts)}});var Ak0=I((dY1,Un)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)Un.exports=Uk0();else Un.exports=Tk0()});var Dn=I((pY1,Ek0)=>{var Bn=z0("path").sep;Ek0.exports=function(Q){var X=Q.split(Bn),Y=X.lastIndexOf("node_modules");if(Y===-1)return;if(!X[Y+1])return;var J=X[Y+1][0]==="@",G=J?X[Y+1]+"/"+X[Y+2]:X[Y+1],Z=J?3:2,W="",K=Y+Z-1;for(var $=0;$<=K;$++)if($===K)W+=X[$];else W+=X[$]+Bn;var H="",F=X.length-1;for(var q=Y+Z;q<=F;q++)if(q===F)H+=X[q];else H+=X[q]+Bn;return{name:G,basedir:W,path:H}}});var Ln=I((cY1,On)=>{var Iq=z0("path"),_J=z0("module"),v8=Ak0()("require-in-the-middle"),ir4=Dn();On.exports=_N;On.exports.Hook=_N;var Nn,aC;if(_J.isBuiltin)aC=_J.isBuiltin;else if(_J.builtinModules)aC=(Q)=>{if(Q.startsWith("node:"))return!0;if(Nn===void 0)Nn=new Set(_J.builtinModules);return Nn.has(Q)};else throw Error("'require-in-the-middle' requires Node.js >=v9.3.0 or >=v8.10.0");var ar4=/([/\\]index)?(\.js)?$/;class Ik0{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(Q,X){if(this._localCache.has(Q))return!0;else if(!X){let Y=z0.cache[Q];return!!(Y&&(this._kRitmExports in Y))}else return!1}get(Q,X){let Y=this._localCache.get(Q);if(Y!==void 0)return Y;else if(!X){let J=z0.cache[Q];return J&&J[this._kRitmExports]}}set(Q,X,Y){if(Y)this._localCache.set(Q,X);else if(Q in z0.cache)z0.cache[Q][this._kRitmExports]=X;else v8('non-core module is unexpectedly not in require.cache: "%s"',Q),this._localCache.set(Q,X)}}function _N(Q,X,Y){if(this instanceof _N===!1)return new _N(Q,X,Y);if(typeof Q==="function")Y=Q,Q=null,X=null;else if(typeof X==="function")Y=X,X=null;if(typeof _J._resolveFilename!=="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof _J._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at https://github.com/nodejs/require-in-the-middle/issues",process.version);return}this._cache=new Ik0,this._unhooked=!1,this._origRequire=_J.prototype.require;let J=this,G=new Set,Z=X?X.internals===!0:!1,W=Array.isArray(Q);if(v8("registering require hook"),this._require=_J.prototype.require=function($){if(J._unhooked===!0)return v8("ignoring require call - module is soft-unhooked"),J._origRequire.apply(this,arguments);return K.call(this,arguments,!1)},typeof process.getBuiltinModule==="function")this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function($){if(J._unhooked===!0)return v8("ignoring process.getBuiltinModule call - module is soft-unhooked"),J._origGetBuiltinModule.apply(this,arguments);return K.call(this,arguments,!0)};function K($,H){let F=$[0],q=aC(F),V;if(q){if(V=F,F.startsWith("node:")){let E=F.slice(5);if(aC(E))V=E}}else if(H)return v8("call to process.getBuiltinModule with unknown built-in id"),J._origGetBuiltinModule.apply(this,$);else try{V=_J._resolveFilename(F,this)}catch(E){return v8('Module._resolveFilename("%s") threw %j, calling original Module.require',F,E.message),J._origRequire.apply(this,$)}let U,D;if(v8("processing %s module require('%s'): %s",q===!0?"core":"non-core",F,V),J._cache.has(V,q)===!0)return v8("returning already patched cached module: %s",V),J._cache.get(V,q);let N=G.has(V);if(N===!1)G.add(V);let O=H?J._origGetBuiltinModule.apply(this,$):J._origRequire.apply(this,$);if(N===!0)return v8("module is in the process of being patched already - ignoring: %s",V),O;if(G.delete(V),q===!0){if(W===!0&&Q.includes(V)===!1)return v8("ignoring core module not on whitelist: %s",V),O;U=V}else if(W===!0&&Q.includes(V)){let E=Iq.parse(V);U=E.name,D=E.dir}else{let E=ir4(V);if(E===void 0)return v8("could not parse filename: %s",V),O;U=E.name,D=E.basedir;let C=rr4(E);v8("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",U,F,C,D);let A=!1;if(W){if(!F.startsWith(".")&&Q.includes(F))U=F,A=!0;if(!Q.includes(U)&&!Q.includes(C))return O;if(Q.includes(C)&&C!==U)U=C,A=!0}if(!A){let T;try{T=z0.resolve(U,{paths:[D]})}catch(j){return v8("could not resolve module: %s",U),J._cache.set(V,O,q),O}if(T!==V)if(Z===!0)U=U+Iq.sep+Iq.relative(D,V),v8("preparing to process require of internal file: %s",U);else return v8("ignoring require of non-main module file: %s",T),J._cache.set(V,O,q),O}}J._cache.set(V,O,q),v8("calling require hook: %s",U);let L=Y(O,U,D);return J._cache.set(V,L,q),v8("returning module: %s",U),L}}_N.prototype.unhook=function(){if(this._unhooked=!0,this._require===_J.prototype.require)_J.prototype.require=this._origRequire,v8("require unhook successful");else v8("require unhook unsuccessful");if(process.getBuiltinModule!==void 0)if(this._getBuiltinModule===process.getBuiltinModule)process.getBuiltinModule=this._origGetBuiltinModule,v8("process.getBuiltinModule unhook successful");else v8("process.getBuiltinModule unhook unsuccessful")};function rr4(Q){let X=Iq.sep!=="/"?Q.path.split(Iq.sep).join("/"):Q.path;return Iq.posix.join(Q.name,X).replace(ar4,"")}});var Sk0=I((Ck0)=>{Object.defineProperty(Ck0,"__esModule",{value:!0});Ck0.ModuleNameTrie=Ck0.ModuleNameSeparator=void 0;Ck0.ModuleNameSeparator="/";class wn{hooks=[];children=new Map}class jk0{_trie=new wn;_counter=0;insert(Q){let X=this._trie;for(let Y of Q.moduleName.split(Ck0.ModuleNameSeparator)){let J=X.children.get(Y);if(!J)J=new wn,X.children.set(Y,J);X=J}X.hooks.push({hook:Q,insertedId:this._counter++})}search(Q,{maintainInsertionOrder:X,fullOnly:Y}={}){let J=this._trie,G=[],Z=!0;for(let W of Q.split(Ck0.ModuleNameSeparator)){let K=J.children.get(W);if(!K){Z=!1;break}if(!Y)G.push(...K.hooks);J=K}if(Y&&Z)G.push(...J.hooks);if(G.length===0)return[];if(G.length===1)return[G[0].hook];if(X)G.sort((W,K)=>W.insertedId-K.insertedId);return G.map(({hook:W})=>W)}}Ck0.ModuleNameTrie=jk0});var yk0=I((kk0)=>{Object.defineProperty(kk0,"__esModule",{value:!0});kk0.RequireInTheMiddleSingleton=void 0;var or4=Ln(),vk0=z0("path"),Pn=Sk0(),sr4=["afterEach","after","beforeEach","before","describe","it"].every((Q)=>{return typeof global[Q]==="function"});class rC{_moduleNameTrie=new Pn.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new or4.Hook(null,{internals:!0},(Q,X,Y)=>{let J=tr4(X),G=this._moduleNameTrie.search(J,{maintainInsertionOrder:!0,fullOnly:Y===void 0});for(let{onRequire:Z}of G)Q=Z(Q,X,Y);return Q})}register(Q,X){let Y={moduleName:Q,onRequire:X};return this._moduleNameTrie.insert(Y),Y}static getInstance(){if(sr4)return new rC;return this._instance=this._instance??new rC}}kk0.RequireInTheMiddleSingleton=rC;function tr4(Q){return vk0.sep!==Pn.ModuleNameSeparator?Q.split(vk0.sep).join(Pn.ModuleNameSeparator):Q}});var uk0=I((Jo4)=>{var bk0=[],Tn=new WeakMap,fk0=new WeakMap,hk0=new Map,xk0=[],er4={set(Q,X,Y){return Tn.get(Q)[X](Y)},get(Q,X){if(X===Symbol.toStringTag)return"Module";let Y=fk0.get(Q)[X];if(typeof Y==="function")return Y()},defineProperty(Q,X,Y){if(!("value"in Y))throw Error("Getters/setters are not supported for exports property descriptors.");return Tn.get(Q)[X](Y.value)}};function Qo4(Q,X,Y,J,G){hk0.set(Q,G),Tn.set(X,Y),fk0.set(X,J);let Z=new Proxy(X,er4);bk0.forEach((W)=>W(Q,Z,G)),xk0.push([Q,Z,G])}var gk0=!1;function Xo4(){return gk0}function Yo4(Q){gk0=Q}Jo4.register=Qo4;Jo4.importHooks=bk0;Jo4.specifiers=hk0;Jo4.toHook=xk0;Jo4.getExperimentalPatchInternals=Xo4;Jo4.setExperimentalPatchInternals=Yo4});var nk0=I((oY1,jq)=>{var mk0=z0("path"),Fo4=Dn(),{fileURLToPath:lk0}=z0("url"),{MessageChannel:qo4}=z0("worker_threads"),{importHooks:An,specifiers:Vo4,toHook:zo4,getExperimentalPatchInternals:Uo4}=uk0();function pk0(Q){An.push(Q),zo4.forEach(([X,Y,J])=>Q(X,Y,J))}function ck0(Q){let X=An.indexOf(Q);if(X>-1)An.splice(X,1)}function dk0(Q,X,Y,J){let G=Q(X,Y,J);if(G&&G!==X)X.default=G}var En;function Bo4(){let{port1:Q,port2:X}=new qo4,Y=0,J;En=(K)=>{Y++,Q.postMessage(K)},Q.on("message",()=>{if(Y--,J&&Y<=0)J()}).unref();function G(){let K=setInterval(()=>{},1000),$=new Promise((H)=>{J=H}).then(()=>{clearInterval(K)});if(Y===0)J();return $}let Z=X;return{registerOptions:{data:{addHookMessagePort:Z,include:[]},transferList:[Z]},addHookMessagePort:Z,waitForAllMessagesAcknowledged:G}}function yN(Q,X,Y){if(this instanceof yN===!1)return new yN(Q,X,Y);if(typeof Q==="function")Y=Q,Q=null,X=null;else if(typeof X==="function")Y=X,X=null;let J=X?X.internals===!0:!1;if(En&&Array.isArray(Q))En(Q);this._iitmHook=(G,Z,W)=>{let K=G,$=G.startsWith("node:"),H;if($)G=G.replace(/^node:/,"");else{if(G.startsWith("file://"))try{G=lk0(G)}catch(q){}let F=Fo4(G);if(F)G=F.name,H=F.basedir}if(Q)for(let F of Q){let q=F===G,V=F===W;if(q||V){if(H){if(J)G=G+mk0.sep+mk0.relative(H,lk0(K));else if(!Uo4()&&!V&&!H.endsWith(Vo4.get(K)))continue}dk0(Y,Z,G,H)}}else dk0(Y,Z,G,H)},pk0(this._iitmHook)}yN.prototype.unhook=function(){ck0(this._iitmHook)};jq.exports=yN;jq.exports.Hook=yN;jq.exports.addHook=pk0;jq.exports.removeHook=ck0;jq.exports.createAddHookMessageChannel=Bo4});var In=I((ik0)=>{Object.defineProperty(ik0,"__esModule",{value:!0});ik0.isWrapped=ik0.safeExecuteInTheMiddleAsync=ik0.safeExecuteInTheMiddle=void 0;function Do4(Q,X,Y){let J,G;try{G=Q()}catch(Z){J=Z}finally{if(X(J,G),J&&!Y)throw J;return G}}ik0.safeExecuteInTheMiddle=Do4;async function No4(Q,X,Y){let J,G;try{G=await Q()}catch(Z){J=Z}finally{if(X(J,G),J&&!Y)throw J;return G}}ik0.safeExecuteInTheMiddleAsync=No4;function Oo4(Q){return typeof Q==="function"&&typeof Q.__original==="function"&&typeof Q.__unwrap==="function"&&Q.__wrapped===!0}ik0.isWrapped=Oo4});var Q_0=I((tk0)=>{Object.defineProperty(tk0,"__esModule",{value:!0});tk0.InstrumentationBase=void 0;var bN=z0("path"),rk0=z0("util"),Mo4=Jk0(),jn=Fn(),Po4=Hk0(),To4=yk0(),Ao4=nk0(),fN=G4(),Eo4=Ln(),Io4=z0("fs"),jo4=In();class sk0 extends Po4.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=To4.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(Q,X,Y){super(Q,X,Y);let J=this.init();if(J&&!Array.isArray(J))J=[J];if(this._modules=J||[],this._config.enabled)this.enable()}_wrap=(Q,X,Y)=>{if((0,jo4.isWrapped)(Q[X]))this._unwrap(Q,X);if(!rk0.types.isProxy(Q))return(0,jn.wrap)(Q,X,Y);else{let J=(0,jn.wrap)(Object.assign({},Q),X,Y);return Object.defineProperty(Q,X,{value:J}),J}};_unwrap=(Q,X)=>{if(!rk0.types.isProxy(Q))return(0,jn.unwrap)(Q,X);else return Object.defineProperty(Q,X,{value:Q[X]})};_massWrap=(Q,X,Y)=>{if(!Q){fN.diag.error("must provide one or more modules to patch");return}else if(!Array.isArray(Q))Q=[Q];if(!(X&&Array.isArray(X))){fN.diag.error("must provide one or more functions to wrap on modules");return}Q.forEach((J)=>{X.forEach((G)=>{this._wrap(J,G,Y)})})};_massUnwrap=(Q,X)=>{if(!Q){fN.diag.error("must provide one or more modules to patch");return}else if(!Array.isArray(Q))Q=[Q];if(!(X&&Array.isArray(X))){fN.diag.error("must provide one or more functions to wrap on modules");return}Q.forEach((Y)=>{X.forEach((J)=>{this._unwrap(Y,J)})})};_warnOnPreloadedModules(){this._modules.forEach((Q)=>{let{name:X}=Q;try{let Y=z0.resolve(X);if(z0.cache[Y])this._diag.warn(`Module ${X} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${X}`)}catch{}})}_extractPackageVersion(Q){try{let X=(0,Io4.readFileSync)(bN.join(Q,"package.json"),{encoding:"utf8"}),Y=JSON.parse(X).version;return typeof Y==="string"?Y:void 0}catch{fN.diag.warn("Failed extracting version",Q)}return}_onRequire(Q,X,Y,J){if(!J){if(typeof Q.patch==="function"){if(Q.moduleExports=X,this._enabled)return this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:Q.name}),Q.patch(X)}return X}let G=this._extractPackageVersion(J);if(Q.moduleVersion=G,Q.name===Y){if(ok0(Q.supportedVersions,G,Q.includePrerelease)){if(typeof Q.patch==="function"){if(Q.moduleExports=X,this._enabled)return this._diag.debug("Applying instrumentation patch for module on require hook",{module:Q.name,version:Q.moduleVersion,baseDir:J}),Q.patch(X,Q.moduleVersion)}}return X}let Z=Q.files??[],W=bN.normalize(Y);return Z.filter(($)=>$.name===W).filter(($)=>ok0($.supportedVersions,G,Q.includePrerelease)).reduce(($,H)=>{if(H.moduleExports=$,this._enabled)return this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:Q.name,version:Q.moduleVersion,fileName:H.name,baseDir:J}),H.patch($,Q.moduleVersion);return $},X)}enable(){if(this._enabled)return;if(this._enabled=!0,this._hooks.length>0){for(let Q of this._modules){if(typeof Q.patch==="function"&&Q.moduleExports)this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:Q.name,version:Q.moduleVersion}),Q.patch(Q.moduleExports,Q.moduleVersion);for(let X of Q.files)if(X.moduleExports)this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:Q.name,version:Q.moduleVersion,fileName:X.name}),X.patch(X.moduleExports,Q.moduleVersion)}return}this._warnOnPreloadedModules();for(let Q of this._modules){let X=(Z,W,K)=>{if(!K&&bN.isAbsolute(W)){let $=bN.parse(W);W=$.name,K=$.dir}return this._onRequire(Q,Z,W,K)},Y=(Z,W,K)=>{return this._onRequire(Q,Z,W,K)},J=bN.isAbsolute(Q.name)?new Eo4.Hook([Q.name],{internals:!0},Y):this._requireInTheMiddleSingleton.register(Q.name,Y);this._hooks.push(J);let G=new Ao4.Hook([Q.name],{internals:!1},X);this._hooks.push(G)}}disable(){if(!this._enabled)return;this._enabled=!1;for(let Q of this._modules){if(typeof Q.unpatch==="function"&&Q.moduleExports)this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:Q.name,version:Q.moduleVersion}),Q.unpatch(Q.moduleExports,Q.moduleVersion);for(let X of Q.files)if(X.moduleExports)this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:Q.name,version:Q.moduleVersion,fileName:X.name}),X.unpatch(X.moduleExports,Q.moduleVersion)}}isEnabled(){return this._enabled}}tk0.InstrumentationBase=sk0;function ok0(Q,X,Y){if(typeof X>"u")return Q.includes("*");return Q.some((J)=>{return(0,Mo4.satisfies)(X,J,{includePrerelease:Y})})}});var X_0=I((Cn)=>{Object.defineProperty(Cn,"__esModule",{value:!0});Cn.normalize=void 0;var Co4=z0("path");Object.defineProperty(Cn,"normalize",{enumerable:!0,get:function(){return Co4.normalize}})});var Y_0=I((oC)=>{Object.defineProperty(oC,"__esModule",{value:!0});oC.normalize=oC.InstrumentationBase=void 0;var So4=Q_0();Object.defineProperty(oC,"InstrumentationBase",{enumerable:!0,get:function(){return So4.InstrumentationBase}});var vo4=X_0();Object.defineProperty(oC,"normalize",{enumerable:!0,get:function(){return vo4.normalize}})});var Rn=I((sC)=>{Object.defineProperty(sC,"__esModule",{value:!0});sC.normalize=sC.InstrumentationBase=void 0;var J_0=Y_0();Object.defineProperty(sC,"InstrumentationBase",{enumerable:!0,get:function(){return J_0.InstrumentationBase}});Object.defineProperty(sC,"normalize",{enumerable:!0,get:function(){return J_0.normalize}})});var K_0=I((W_0)=>{Object.defineProperty(W_0,"__esModule",{value:!0});W_0.InstrumentationNodeModuleDefinition=void 0;class G_0{name;supportedVersions;patch;unpatch;files;constructor(Q,X,Y,J,G){this.name=Q,this.supportedVersions=X,this.patch=Y,this.unpatch=J,this.files=G||[]}}W_0.InstrumentationNodeModuleDefinition=G_0});var q_0=I((H_0)=>{Object.defineProperty(H_0,"__esModule",{value:!0});H_0.InstrumentationNodeModuleFile=void 0;var yo4=Rn();class $_0{supportedVersions;patch;unpatch;name;constructor(Q,X,Y,J){this.supportedVersions=X,this.patch=Y,this.unpatch=J,this.name=(0,yo4.normalize)(Q)}}H_0.InstrumentationNodeModuleFile=$_0});var B_0=I((z_0)=>{Object.defineProperty(z_0,"__esModule",{value:!0});z_0.semconvStabilityFromStr=z_0.SemconvStability=void 0;var tC;(function(Q){Q[Q.STABLE=1]="STABLE",Q[Q.OLD=2]="OLD",Q[Q.DUPLICATE=3]="DUPLICATE"})(tC=z_0.SemconvStability||(z_0.SemconvStability={}));function bo4(Q,X){let Y=tC.OLD,J=X?.split(",").map((G)=>G.trim()).filter((G)=>G!=="");for(let G of J??[])if(G.toLowerCase()===Q+"/dup"){Y=tC.DUPLICATE;break}else if(G.toLowerCase()===Q)Y=tC.STABLE;return Y}z_0.semconvStabilityFromStr=bo4});var N_0=I((yJ)=>{Object.defineProperty(yJ,"__esModule",{value:!0});yJ.semconvStabilityFromStr=yJ.SemconvStability=yJ.safeExecuteInTheMiddleAsync=yJ.safeExecuteInTheMiddle=yJ.isWrapped=yJ.InstrumentationNodeModuleFile=yJ.InstrumentationNodeModuleDefinition=yJ.InstrumentationBase=yJ.registerInstrumentations=void 0;var fo4=nv0();Object.defineProperty(yJ,"registerInstrumentations",{enumerable:!0,get:function(){return fo4.registerInstrumentations}});var ho4=Rn();Object.defineProperty(yJ,"InstrumentationBase",{enumerable:!0,get:function(){return ho4.InstrumentationBase}});var xo4=K_0();Object.defineProperty(yJ,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return xo4.InstrumentationNodeModuleDefinition}});var go4=q_0();Object.defineProperty(yJ,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return go4.InstrumentationNodeModuleFile}});var Sn=In();Object.defineProperty(yJ,"isWrapped",{enumerable:!0,get:function(){return Sn.isWrapped}});Object.defineProperty(yJ,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return Sn.safeExecuteInTheMiddle}});Object.defineProperty(yJ,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return Sn.safeExecuteInTheMiddleAsync}});var D_0=B_0();Object.defineProperty(yJ,"SemconvStability",{enumerable:!0,get:function(){return D_0.SemconvStability}});Object.defineProperty(yJ,"semconvStabilityFromStr",{enumerable:!0,get:function(){return D_0.semconvStabilityFromStr}})});var M_0=I((L_0)=>{Object.defineProperty(L_0,"__esModule",{value:!0});L_0.OTLPExporterBase=void 0;class O_0{_delegate;constructor(Q){this._delegate=Q}export(Q,X){this._delegate.export(Q,X)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}L_0.OTLPExporterBase=O_0});var eC=I((T_0)=>{Object.defineProperty(T_0,"__esModule",{value:!0});T_0.OTLPExporterError=void 0;class P_0 extends Error{code;name="OTLPExporterError";data;constructor(Q,X,Y){super(Q);this.data=Y,this.code=X}}T_0.OTLPExporterError=P_0});var hN=I((I_0)=>{Object.defineProperty(I_0,"__esModule",{value:!0});I_0.getSharedConfigurationDefaults=I_0.mergeOtlpSharedConfigurationWithDefaults=I_0.wrapStaticHeadersInFunction=I_0.validateTimeoutMillis=void 0;function E_0(Q){if(Number.isFinite(Q)&&Q>0)return Q;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Q}')`)}I_0.validateTimeoutMillis=E_0;function mo4(Q){if(Q==null)return;return()=>Q}I_0.wrapStaticHeadersInFunction=mo4;function lo4(Q,X,Y){return{timeoutMillis:E_0(Q.timeoutMillis??X.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Q.concurrencyLimit??X.concurrencyLimit??Y.concurrencyLimit,compression:Q.compression??X.compression??Y.compression}}I_0.mergeOtlpSharedConfigurationWithDefaults=lo4;function do4(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}I_0.getSharedConfigurationDefaults=do4});var R_0=I((C_0)=>{Object.defineProperty(C_0,"__esModule",{value:!0});C_0.CompressionAlgorithm=void 0;var io4;(function(Q){Q.NONE="none",Q.GZIP="gzip"})(io4=C_0.CompressionAlgorithm||(C_0.CompressionAlgorithm={}))});var kn=I((v_0)=>{Object.defineProperty(v_0,"__esModule",{value:!0});v_0.createBoundedQueueExportPromiseHandler=void 0;class S_0{_concurrencyLimit;_sendingPromises=[];constructor(Q){this._concurrencyLimit=Q}pushPromise(Q){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Q);let X=()=>{let Y=this._sendingPromises.indexOf(Q);this._sendingPromises.splice(Y,1)};Q.then(X,X)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function ao4(Q){return new S_0(Q.concurrencyLimit)}v_0.createBoundedQueueExportPromiseHandler=ao4});var b_0=I((__0)=>{Object.defineProperty(__0,"__esModule",{value:!0});__0.createLoggingPartialSuccessResponseHandler=void 0;var ro4=G4();function oo4(Q){return Object.prototype.hasOwnProperty.call(Q,"partialSuccess")}function so4(){return{handleResponse(Q){if(Q==null||!oo4(Q)||Q.partialSuccess==null||Object.keys(Q.partialSuccess).length===0)return;ro4.diag.warn("Received Partial Success response:",JSON.stringify(Q.partialSuccess))}}}__0.createLoggingPartialSuccessResponseHandler=so4});var _n=I((x_0)=>{Object.defineProperty(x_0,"__esModule",{value:!0});x_0.createOtlpExportDelegate=void 0;var Y$=l4(),f_0=eC(),to4=b_0(),eo4=G4();class h_0{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(Q,X,Y,J,G){this._transport=Q,this._serializer=X,this._responseHandler=Y,this._promiseQueue=J,this._timeout=G,this._diagLogger=eo4.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Q,X){if(this._diagLogger.debug("items to be sent",Q),this._promiseQueue.hasReachedLimit()){X({code:Y$.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Q);if(Y==null){X({code:Y$.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((J)=>{if(J.status==="success"){if(J.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(J.data))}catch(G){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",G,J.data)}X({code:Y$.ExportResultCode.SUCCESS});return}else if(J.status==="failure"&&J.error){X({code:Y$.ExportResultCode.FAILED,error:J.error});return}else if(J.status==="retryable")X({code:Y$.ExportResultCode.FAILED,error:new f_0.OTLPExporterError("Export failed with retryable status")});else X({code:Y$.ExportResultCode.FAILED,error:new f_0.OTLPExporterError("Export failed with unknown error")})},(J)=>X({code:Y$.ExportResultCode.FAILED,error:J})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function Qs4(Q,X){return new h_0(Q.transport,Q.serializer,(0,to4.createLoggingPartialSuccessResponseHandler)(),Q.promiseHandler,X.timeout)}x_0.createOtlpExportDelegate=Qs4});var l_0=I((u_0)=>{Object.defineProperty(u_0,"__esModule",{value:!0});u_0.createOtlpNetworkExportDelegate=void 0;var Xs4=kn(),Ys4=_n();function Js4(Q,X,Y){return(0,Ys4.createOtlpExportDelegate)({transport:Y,serializer:X,promiseHandler:(0,Xs4.createBoundedQueueExportPromiseHandler)(Q)},{timeout:Q.timeoutMillis})}u_0.createOtlpNetworkExportDelegate=Js4});var r5=I((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.createOtlpNetworkExportDelegate=FZ.CompressionAlgorithm=FZ.getSharedConfigurationDefaults=FZ.mergeOtlpSharedConfigurationWithDefaults=FZ.OTLPExporterError=FZ.OTLPExporterBase=void 0;var Gs4=M_0();Object.defineProperty(FZ,"OTLPExporterBase",{enumerable:!0,get:function(){return Gs4.OTLPExporterBase}});var Ws4=eC();Object.defineProperty(FZ,"OTLPExporterError",{enumerable:!0,get:function(){return Ws4.OTLPExporterError}});var d_0=hN();Object.defineProperty(FZ,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return d_0.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(FZ,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return d_0.getSharedConfigurationDefaults}});var Zs4=R_0();Object.defineProperty(FZ,"CompressionAlgorithm",{enumerable:!0,get:function(){return Zs4.CompressionAlgorithm}});var Ks4=l_0();Object.defineProperty(FZ,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return Ks4.createOtlpNetworkExportDelegate}})});var yn=I((vJ1,p_0)=>{p_0.exports=Hs4;function Hs4(Q,X){var Y=Array(arguments.length-1),J=0,G=2,Z=!0;while(G<arguments.length)Y[J++]=arguments[G++];return new Promise(function(K,$){Y[J]=function(F){if(Z)if(Z=!1,F)$(F);else{var q=Array(arguments.length-1),V=0;while(V<q.length)q[V++]=arguments[V];K.apply(null,q)}};try{Q.apply(X||null,Y)}catch(H){if(Z)Z=!1,$(H)}})}});var a_0=I((i_0)=>{var Q2=i_0;Q2.length=function(X){var Y=X.length;if(!Y)return 0;var J=0;while(--Y%4>1&&X.charAt(Y)==="=")++J;return Math.ceil(X.length*3)/4-J};var Cq=Array(64),n_0=Array(123);for(QJ=0;QJ<64;)n_0[Cq[QJ]=QJ<26?QJ+65:QJ<52?QJ+71:QJ<62?QJ-4:QJ-59|43]=QJ++;var QJ;Q2.encode=function(X,Y,J){var G=null,Z=[],W=0,K=0,$;while(Y<J){var H=X[Y++];switch(K){case 0:Z[W++]=Cq[H>>2],$=(H&3)<<4,K=1;break;case 1:Z[W++]=Cq[$|H>>4],$=(H&15)<<2,K=2;break;case 2:Z[W++]=Cq[$|H>>6],Z[W++]=Cq[H&63],K=0;break}if(W>8191)(G||(G=[])).push(String.fromCharCode.apply(String,Z)),W=0}if(K){if(Z[W++]=Cq[$],Z[W++]=61,K===1)Z[W++]=61}if(G){if(W)G.push(String.fromCharCode.apply(String,Z.slice(0,W)));return G.join("")}return String.fromCharCode.apply(String,Z.slice(0,W))};var c_0="invalid encoding";Q2.decode=function(X,Y,J){var G=J,Z=0,W;for(var K=0;K<X.length;){var $=X.charCodeAt(K++);if($===61&&Z>1)break;if(($=n_0[$])===void 0)throw Error(c_0);switch(Z){case 0:W=$,Z=1;break;case 1:Y[J++]=W<<2|($&48)>>4,W=$,Z=2;break;case 2:Y[J++]=(W&15)<<4|($&60)>>2,W=$,Z=3;break;case 3:Y[J++]=(W&3)<<6|$,Z=0;break}}if(Z===1)throw Error(c_0);return J-G};Q2.test=function(X){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(X)}});var o_0=I((_J1,r_0)=>{r_0.exports=X2;function X2(){this._listeners={}}X2.prototype.on=function(X,Y,J){return(this._listeners[X]||(this._listeners[X]=[])).push({fn:Y,ctx:J||this}),this};X2.prototype.off=function(X,Y){if(X===void 0)this._listeners={};else if(Y===void 0)this._listeners[X]=[];else{var J=this._listeners[X];for(var G=0;G<J.length;)if(J[G].fn===Y)J.splice(G,1);else++G}return this};X2.prototype.emit=function(X){var Y=this._listeners[X];if(Y){var J=[],G=1;for(;G<arguments.length;)J.push(arguments[G++]);for(G=0;G<Y.length;)Y[G].fn.apply(Y[G++].ctx,J)}return this}});var Jy0=I((yJ1,Yy0)=>{Yy0.exports=s_0(s_0);function s_0(Q){if(typeof Float32Array<"u")(function(){var X=new Float32Array([-0]),Y=new Uint8Array(X.buffer),J=Y[3]===128;function G($,H,F){X[0]=$,H[F]=Y[0],H[F+1]=Y[1],H[F+2]=Y[2],H[F+3]=Y[3]}function Z($,H,F){X[0]=$,H[F]=Y[3],H[F+1]=Y[2],H[F+2]=Y[1],H[F+3]=Y[0]}Q.writeFloatLE=J?G:Z,Q.writeFloatBE=J?Z:G;function W($,H){return Y[0]=$[H],Y[1]=$[H+1],Y[2]=$[H+2],Y[3]=$[H+3],X[0]}function K($,H){return Y[3]=$[H],Y[2]=$[H+1],Y[1]=$[H+2],Y[0]=$[H+3],X[0]}Q.readFloatLE=J?W:K,Q.readFloatBE=J?K:W})();else(function(){function X(J,G,Z,W){var K=G<0?1:0;if(K)G=-G;if(G===0)J(1/G>0?0:2147483648,Z,W);else if(isNaN(G))J(2143289344,Z,W);else if(G>340282346638528860000000000000000000000)J((K<<31|2139095040)>>>0,Z,W);else if(G<0.000000000000000000000000000000000000011754943508222875)J((K<<31|Math.round(G/0.000000000000000000000000000000000000000000001401298464324817))>>>0,Z,W);else{var $=Math.floor(Math.log(G)/Math.LN2),H=Math.round(G*Math.pow(2,-$)*8388608)&8388607;J((K<<31|$+127<<23|H)>>>0,Z,W)}}Q.writeFloatLE=X.bind(null,t_0),Q.writeFloatBE=X.bind(null,e_0);function Y(J,G,Z){var W=J(G,Z),K=(W>>31)*2+1,$=W>>>23&255,H=W&8388607;return $===255?H?NaN:K*(1/0):$===0?K*0.000000000000000000000000000000000000000000001401298464324817*H:K*Math.pow(2,$-150)*(H+8388608)}Q.readFloatLE=Y.bind(null,Qy0),Q.readFloatBE=Y.bind(null,Xy0)})();if(typeof Float64Array<"u")(function(){var X=new Float64Array([-0]),Y=new Uint8Array(X.buffer),J=Y[7]===128;function G($,H,F){X[0]=$,H[F]=Y[0],H[F+1]=Y[1],H[F+2]=Y[2],H[F+3]=Y[3],H[F+4]=Y[4],H[F+5]=Y[5],H[F+6]=Y[6],H[F+7]=Y[7]}function Z($,H,F){X[0]=$,H[F]=Y[7],H[F+1]=Y[6],H[F+2]=Y[5],H[F+3]=Y[4],H[F+4]=Y[3],H[F+5]=Y[2],H[F+6]=Y[1],H[F+7]=Y[0]}Q.writeDoubleLE=J?G:Z,Q.writeDoubleBE=J?Z:G;function W($,H){return Y[0]=$[H],Y[1]=$[H+1],Y[2]=$[H+2],Y[3]=$[H+3],Y[4]=$[H+4],Y[5]=$[H+5],Y[6]=$[H+6],Y[7]=$[H+7],X[0]}function K($,H){return Y[7]=$[H],Y[6]=$[H+1],Y[5]=$[H+2],Y[4]=$[H+3],Y[3]=$[H+4],Y[2]=$[H+5],Y[1]=$[H+6],Y[0]=$[H+7],X[0]}Q.readDoubleLE=J?W:K,Q.readDoubleBE=J?K:W})();else(function(){function X(J,G,Z,W,K,$){var H=W<0?1:0;if(H)W=-W;if(W===0)J(0,K,$+G),J(1/W>0?0:2147483648,K,$+Z);else if(isNaN(W))J(0,K,$+G),J(2146959360,K,$+Z);else if(W>179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)J(0,K,$+G),J((H<<31|2146435072)>>>0,K,$+Z);else{var F;if(W<0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014)F=W/0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005,J(F>>>0,K,$+G),J((H<<31|F/4294967296)>>>0,K,$+Z);else{var q=Math.floor(Math.log(W)/Math.LN2);if(q===1024)q=1023;F=W*Math.pow(2,-q),J(F*4503599627370496>>>0,K,$+G),J((H<<31|q+1023<<20|F*1048576&1048575)>>>0,K,$+Z)}}}Q.writeDoubleLE=X.bind(null,t_0,0,4),Q.writeDoubleBE=X.bind(null,e_0,4,0);function Y(J,G,Z,W,K){var $=J(W,K+G),H=J(W,K+Z),F=(H>>31)*2+1,q=H>>>20&2047,V=4294967296*(H&1048575)+$;return q===2047?V?NaN:F*(1/0):q===0?F*0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005*V:F*Math.pow(2,q-1075)*(V+4503599627370496)}Q.readDoubleLE=Y.bind(null,Qy0,0,4),Q.readDoubleBE=Y.bind(null,Xy0,4,0)})();return Q}function t_0(Q,X,Y){X[Y]=Q&255,X[Y+1]=Q>>>8&255,X[Y+2]=Q>>>16&255,X[Y+3]=Q>>>24}function e_0(Q,X,Y){X[Y]=Q>>>24,X[Y+1]=Q>>>16&255,X[Y+2]=Q>>>8&255,X[Y+3]=Q&255}function Qy0(Q,X){return(Q[X]|Q[X+1]<<8|Q[X+2]<<16|Q[X+3]<<24)>>>0}function Xy0(Q,X){return(Q[X]<<24|Q[X+1]<<16|Q[X+2]<<8|Q[X+3])>>>0}});var hn=I((Gy0,bn)=>{bn.exports=Fs4;function Fs4(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(Q){}return null}});var Zy0=I((Wy0)=>{var xn=Wy0;xn.length=function(X){var Y=0,J=0;for(var G=0;G<X.length;++G)if(J=X.charCodeAt(G),J<128)Y+=1;else if(J<2048)Y+=2;else if((J&64512)===55296&&(X.charCodeAt(G+1)&64512)===56320)++G,Y+=4;else Y+=3;return Y};xn.read=function(X,Y,J){var G=J-Y;if(G<1)return"";var Z=null,W=[],K=0,$;while(Y<J){if($=X[Y++],$<128)W[K++]=$;else if($>191&&$<224)W[K++]=($&31)<<6|X[Y++]&63;else if($>239&&$<365)$=(($&7)<<18|(X[Y++]&63)<<12|(X[Y++]&63)<<6|X[Y++]&63)-65536,W[K++]=55296+($>>10),W[K++]=56320+($&1023);else W[K++]=($&15)<<12|(X[Y++]&63)<<6|X[Y++]&63;if(K>8191)(Z||(Z=[])).push(String.fromCharCode.apply(String,W)),K=0}if(Z){if(K)Z.push(String.fromCharCode.apply(String,W.slice(0,K)));return Z.join("")}return String.fromCharCode.apply(String,W.slice(0,K))};xn.write=function(X,Y,J){var G=J,Z,W;for(var K=0;K<X.length;++K)if(Z=X.charCodeAt(K),Z<128)Y[J++]=Z;else if(Z<2048)Y[J++]=Z>>6|192,Y[J++]=Z&63|128;else if((Z&64512)===55296&&((W=X.charCodeAt(K+1))&64512)===56320)Z=65536+((Z&1023)<<10)+(W&1023),++K,Y[J++]=Z>>18|240,Y[J++]=Z>>12&63|128,Y[J++]=Z>>6&63|128,Y[J++]=Z&63|128;else Y[J++]=Z>>12|224,Y[J++]=Z>>6&63|128,Y[J++]=Z&63|128;return J-G}});var $y0=I((fJ1,Ky0)=>{Ky0.exports=qs4;function qs4(Q,X,Y){var J=Y||8192,G=J>>>1,Z=null,W=J;return function($){if($<1||$>G)return Q($);if(W+$>J)Z=Q(J),W=0;var H=X.call(Z,W,W+=$);if(W&7)W=(W|7)+1;return H}}});var Fy0=I((hJ1,Hy0)=>{Hy0.exports=M9;var xN=o5();function M9(Q,X){this.lo=Q>>>0,this.hi=X>>>0}var J$=M9.zero=new M9(0,0);J$.toNumber=function(){return 0};J$.zzEncode=J$.zzDecode=function(){return this};J$.length=function(){return 1};var Vs4=M9.zeroHash="\x00\x00\x00\x00\x00\x00\x00\x00";M9.fromNumber=function(X){if(X===0)return J$;var Y=X<0;if(Y)X=-X;var J=X>>>0,G=(X-J)/4294967296>>>0;if(Y){if(G=~G>>>0,J=~J>>>0,++J>4294967295){if(J=0,++G>4294967295)G=0}}return new M9(J,G)};M9.from=function(X){if(typeof X==="number")return M9.fromNumber(X);if(xN.isString(X))if(xN.Long)X=xN.Long.fromString(X);else return M9.fromNumber(parseInt(X,10));return X.low||X.high?new M9(X.low>>>0,X.high>>>0):J$};M9.prototype.toNumber=function(X){if(!X&&this.hi>>>31){var Y=~this.lo+1>>>0,J=~this.hi>>>0;if(!Y)J=J+1>>>0;return-(Y+J*4294967296)}return this.lo+this.hi*4294967296};M9.prototype.toLong=function(X){return xN.Long?new xN.Long(this.lo|0,this.hi|0,Boolean(X)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(X)}};var qZ=String.prototype.charCodeAt;M9.fromHash=function(X){if(X===Vs4)return J$;return new M9((qZ.call(X,0)|qZ.call(X,1)<<8|qZ.call(X,2)<<16|qZ.call(X,3)<<24)>>>0,(qZ.call(X,4)|qZ.call(X,5)<<8|qZ.call(X,6)<<16|qZ.call(X,7)<<24)>>>0)};M9.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};M9.prototype.zzEncode=function(){var X=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^X)>>>0,this.lo=(this.lo<<1^X)>>>0,this};M9.prototype.zzDecode=function(){var X=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^X)>>>0,this.hi=(this.hi>>>1^X)>>>0,this};M9.prototype.length=function(){var X=this.lo,Y=(this.lo>>>28|this.hi<<4)>>>0,J=this.hi>>>24;return J===0?Y===0?X<16384?X<128?1:2:X<2097152?3:4:Y<16384?Y<128?5:6:Y<2097152?7:8:J<128?9:10}});var o5=I((gn)=>{var R4=gn;R4.asPromise=yn();R4.base64=a_0();R4.EventEmitter=o_0();R4.float=Jy0();R4.inquire=hn();R4.utf8=Zy0();R4.pool=$y0();R4.LongBits=Fy0();R4.isNode=Boolean(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);R4.global=R4.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||gn;R4.emptyArray=Object.freeze?Object.freeze([]):[];R4.emptyObject=Object.freeze?Object.freeze({}):{};R4.isInteger=Number.isInteger||function(X){return typeof X==="number"&&isFinite(X)&&Math.floor(X)===X};R4.isString=function(X){return typeof X==="string"||X instanceof String};R4.isObject=function(X){return X&&typeof X==="object"};R4.isset=R4.isSet=function(X,Y){var J=X[Y];if(J!=null&&X.hasOwnProperty(Y))return typeof J!=="object"||(Array.isArray(J)?J.length:Object.keys(J).length)>0;return!1};R4.Buffer=function(){try{var Q=R4.inquire("buffer").Buffer;return Q.prototype.utf8Write?Q:null}catch(X){return null}}();R4._Buffer_from=null;R4._Buffer_allocUnsafe=null;R4.newBuffer=function(X){return typeof X==="number"?R4.Buffer?R4._Buffer_allocUnsafe(X):new R4.Array(X):R4.Buffer?R4._Buffer_from(X):typeof Uint8Array>"u"?X:new Uint8Array(X)};R4.Array=typeof Uint8Array<"u"?Uint8Array:Array;R4.Long=R4.global.dcodeIO&&R4.global.dcodeIO.Long||R4.global.Long||R4.inquire("long");R4.key2Re=/^true|false|0|1$/;R4.key32Re=/^-?(?:0|[1-9][0-9]*)$/;R4.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;R4.longToHash=function(X){return X?R4.LongBits.from(X).toHash():R4.LongBits.zeroHash};R4.longFromHash=function(X,Y){var J=R4.LongBits.fromHash(X);if(R4.Long)return R4.Long.fromBits(J.lo,J.hi,Y);return J.toNumber(Boolean(Y))};function qy0(Q,X,Y){for(var J=Object.keys(X),G=0;G<J.length;++G)if(Q[J[G]]===void 0||!Y)Q[J[G]]=X[J[G]];return Q}R4.merge=qy0;R4.lcFirst=function(X){return X.charAt(0).toLowerCase()+X.substring(1)};function Vy0(Q){function X(Y,J){if(!(this instanceof X))return new X(Y,J);if(Object.defineProperty(this,"message",{get:function(){return Y}}),Error.captureStackTrace)Error.captureStackTrace(this,X);else Object.defineProperty(this,"stack",{value:Error().stack||""});if(J)qy0(this,J)}return X.prototype=Object.create(Error.prototype,{constructor:{value:X,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return Q},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),X}R4.newError=Vy0;R4.ProtocolError=Vy0("ProtocolError");R4.oneOfGetter=function(X){var Y={};for(var J=0;J<X.length;++J)Y[X[J]]=1;return function(){for(var G=Object.keys(this),Z=G.length-1;Z>-1;--Z)if(Y[G[Z]]===1&&this[G[Z]]!==void 0&&this[G[Z]]!==null)return G[Z]}};R4.oneOfSetter=function(X){return function(Y){for(var J=0;J<X.length;++J)if(X[J]!==Y)delete this[X[J]]}};R4.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};R4._configure=function(){var Q=R4.Buffer;if(!Q){R4._Buffer_from=R4._Buffer_allocUnsafe=null;return}R4._Buffer_from=Q.from!==Uint8Array.from&&Q.from||function(Y,J){return new Q(Y,J)},R4._Buffer_allocUnsafe=Q.allocUnsafe||function(Y){return new Q(Y)}}});var J2=I((gJ1,Dy0)=>{Dy0.exports=e6;var XJ=o5(),un,Y2=XJ.LongBits,zy0=XJ.base64,Uy0=XJ.utf8;function gN(Q,X,Y){this.fn=Q,this.len=X,this.next=void 0,this.val=Y}function ln(){}function zs4(Q){this.head=Q.head,this.tail=Q.tail,this.len=Q.len,this.next=Q.states}function e6(){this.len=0,this.head=new gN(ln,0,0),this.tail=this.head,this.states=null}var By0=function(){return XJ.Buffer?function(){return(e6.create=function(){return new un})()}:function(){return new e6}};e6.create=By0();e6.alloc=function(X){return new XJ.Array(X)};if(XJ.Array!==Array)e6.alloc=XJ.pool(e6.alloc,XJ.Array.prototype.subarray);e6.prototype._push=function(X,Y,J){return this.tail=this.tail.next=new gN(X,Y,J),this.len+=Y,this};function dn(Q,X,Y){X[Y]=Q&255}function Us4(Q,X,Y){while(Q>127)X[Y++]=Q&127|128,Q>>>=7;X[Y]=Q}function pn(Q,X){this.len=Q,this.next=void 0,this.val=X}pn.prototype=Object.create(gN.prototype);pn.prototype.fn=Us4;e6.prototype.uint32=function(X){return this.len+=(this.tail=this.tail.next=new pn((X=X>>>0)<128?1:X<16384?2:X<2097152?3:X<268435456?4:5,X)).len,this};e6.prototype.int32=function(X){return X<0?this._push(cn,10,Y2.fromNumber(X)):this.uint32(X)};e6.prototype.sint32=function(X){return this.uint32((X<<1^X>>31)>>>0)};function cn(Q,X,Y){while(Q.hi)X[Y++]=Q.lo&127|128,Q.lo=(Q.lo>>>7|Q.hi<<25)>>>0,Q.hi>>>=7;while(Q.lo>127)X[Y++]=Q.lo&127|128,Q.lo=Q.lo>>>7;X[Y++]=Q.lo}e6.prototype.uint64=function(X){var Y=Y2.from(X);return this._push(cn,Y.length(),Y)};e6.prototype.int64=e6.prototype.uint64;e6.prototype.sint64=function(X){var Y=Y2.from(X).zzEncode();return this._push(cn,Y.length(),Y)};e6.prototype.bool=function(X){return this._push(dn,1,X?1:0)};function mn(Q,X,Y){X[Y]=Q&255,X[Y+1]=Q>>>8&255,X[Y+2]=Q>>>16&255,X[Y+3]=Q>>>24}e6.prototype.fixed32=function(X){return this._push(mn,4,X>>>0)};e6.prototype.sfixed32=e6.prototype.fixed32;e6.prototype.fixed64=function(X){var Y=Y2.from(X);return this._push(mn,4,Y.lo)._push(mn,4,Y.hi)};e6.prototype.sfixed64=e6.prototype.fixed64;e6.prototype.float=function(X){return this._push(XJ.float.writeFloatLE,4,X)};e6.prototype.double=function(X){return this._push(XJ.float.writeDoubleLE,8,X)};var Bs4=XJ.Array.prototype.set?function(X,Y,J){Y.set(X,J)}:function(X,Y,J){for(var G=0;G<X.length;++G)Y[J+G]=X[G]};e6.prototype.bytes=function(X){var Y=X.length>>>0;if(!Y)return this._push(dn,1,0);if(XJ.isString(X)){var J=e6.alloc(Y=zy0.length(X));zy0.decode(X,J,0),X=J}return this.uint32(Y)._push(Bs4,Y,X)};e6.prototype.string=function(X){var Y=Uy0.length(X);return Y?this.uint32(Y)._push(Uy0.write,Y,X):this._push(dn,1,0)};e6.prototype.fork=function(){return this.states=new zs4(this),this.head=this.tail=new gN(ln,0,0),this.len=0,this};e6.prototype.reset=function(){if(this.states)this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next;else this.head=this.tail=new gN(ln,0,0),this.len=0;return this};e6.prototype.ldelim=function(){var X=this.head,Y=this.tail,J=this.len;if(this.reset().uint32(J),J)this.tail.next=X.next,this.tail=Y,this.len+=J;return this};e6.prototype.finish=function(){var X=this.head.next,Y=this.constructor.alloc(this.len),J=0;while(X)X.fn(X.val,Y,J),J+=X.len,X=X.next;return Y};e6._configure=function(Q){un=Q,e6.create=By0(),un._configure()}});var Ly0=I((uJ1,Oy0)=>{Oy0.exports=s5;var Ny0=J2();(s5.prototype=Object.create(Ny0.prototype)).constructor=s5;var VZ=o5();function s5(){Ny0.call(this)}s5._configure=function(){s5.alloc=VZ._Buffer_allocUnsafe,s5.writeBytesBuffer=VZ.Buffer&&VZ.Buffer.prototype instanceof Uint8Array&&VZ.Buffer.prototype.set.name==="set"?function(X,Y,J){Y.set(X,J)}:function(X,Y,J){if(X.copy)X.copy(Y,J,0,X.length);else for(var G=0;G<X.length;)Y[J++]=X[G++]}};s5.prototype.bytes=function(X){if(VZ.isString(X))X=VZ._Buffer_from(X,"base64");var Y=X.length>>>0;if(this.uint32(Y),Y)this._push(s5.writeBytesBuffer,Y,X);return this};function Ds4(Q,X,Y){if(Q.length<40)VZ.utf8.write(Q,X,Y);else if(X.utf8Write)X.utf8Write(Q,Y);else X.write(Q,Y)}s5.prototype.string=function(X){var Y=VZ.Buffer.byteLength(X);if(this.uint32(Y),Y)this._push(Ds4,Y,X);return this};s5._configure()});var W2=I((mJ1,Ay0)=>{Ay0.exports=k8;var bJ=o5(),an,Py0=bJ.LongBits,Ns4=bJ.utf8;function fJ(Q,X){return RangeError("index out of range: "+Q.pos+" + "+(X||1)+" > "+Q.len)}function k8(Q){this.buf=Q,this.pos=0,this.len=Q.length}var wy0=typeof Uint8Array<"u"?function(X){if(X instanceof Uint8Array||Array.isArray(X))return new k8(X);throw Error("illegal buffer")}:function(X){if(Array.isArray(X))return new k8(X);throw Error("illegal buffer")},Ty0=function(){return bJ.Buffer?function(Y){return(k8.create=function(G){return bJ.Buffer.isBuffer(G)?new an(G):wy0(G)})(Y)}:wy0};k8.create=Ty0();k8.prototype._slice=bJ.Array.prototype.subarray||bJ.Array.prototype.slice;k8.prototype.uint32=function(){var X=4294967295;return function(){if(X=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128)return X;if(X=(X|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)return X;if(X=(X|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)return X;if(X=(X|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)return X;if(X=(X|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128)return X;if((this.pos+=5)>this.len)throw this.pos=this.len,fJ(this,10);return X}}();k8.prototype.int32=function(){return this.uint32()|0};k8.prototype.sint32=function(){var X=this.uint32();return X>>>1^-(X&1)|0};function nn(){var Q=new Py0(0,0),X=0;if(this.len-this.pos>4){for(;X<4;++X)if(Q.lo=(Q.lo|(this.buf[this.pos]&127)<<X*7)>>>0,this.buf[this.pos++]<128)return Q;if(Q.lo=(Q.lo|(this.buf[this.pos]&127)<<28)>>>0,Q.hi=(Q.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return Q;X=0}else{for(;X<3;++X){if(this.pos>=this.len)throw fJ(this);if(Q.lo=(Q.lo|(this.buf[this.pos]&127)<<X*7)>>>0,this.buf[this.pos++]<128)return Q}return Q.lo=(Q.lo|(this.buf[this.pos++]&127)<<X*7)>>>0,Q}if(this.len-this.pos>4){for(;X<5;++X)if(Q.hi=(Q.hi|(this.buf[this.pos]&127)<<X*7+3)>>>0,this.buf[this.pos++]<128)return Q}else for(;X<5;++X){if(this.pos>=this.len)throw fJ(this);if(Q.hi=(Q.hi|(this.buf[this.pos]&127)<<X*7+3)>>>0,this.buf[this.pos++]<128)return Q}throw Error("invalid varint encoding")}k8.prototype.bool=function(){return this.uint32()!==0};function G2(Q,X){return(Q[X-4]|Q[X-3]<<8|Q[X-2]<<16|Q[X-1]<<24)>>>0}k8.prototype.fixed32=function(){if(this.pos+4>this.len)throw fJ(this,4);return G2(this.buf,this.pos+=4)};k8.prototype.sfixed32=function(){if(this.pos+4>this.len)throw fJ(this,4);return G2(this.buf,this.pos+=4)|0};function My0(){if(this.pos+8>this.len)throw fJ(this,8);return new Py0(G2(this.buf,this.pos+=4),G2(this.buf,this.pos+=4))}k8.prototype.float=function(){if(this.pos+4>this.len)throw fJ(this,4);var X=bJ.float.readFloatLE(this.buf,this.pos);return this.pos+=4,X};k8.prototype.double=function(){if(this.pos+8>this.len)throw fJ(this,4);var X=bJ.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,X};k8.prototype.bytes=function(){var X=this.uint32(),Y=this.pos,J=this.pos+X;if(J>this.len)throw fJ(this,X);if(this.pos+=X,Array.isArray(this.buf))return this.buf.slice(Y,J);if(Y===J){var G=bJ.Buffer;return G?G.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,Y,J)};k8.prototype.string=function(){var X=this.bytes();return Ns4.read(X,0,X.length)};k8.prototype.skip=function(X){if(typeof X==="number"){if(this.pos+X>this.len)throw fJ(this,X);this.pos+=X}else do if(this.pos>=this.len)throw fJ(this);while(this.buf[this.pos++]&128);return this};k8.prototype.skipType=function(Q){switch(Q){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:while((Q=this.uint32()&7)!==4)this.skipType(Q);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+Q+" at offset "+this.pos)}return this};k8._configure=function(Q){an=Q,k8.create=Ty0(),an._configure();var X=bJ.Long?"toLong":"toNumber";bJ.merge(k8.prototype,{int64:function(){return nn.call(this)[X](!1)},uint64:function(){return nn.call(this)[X](!0)},sint64:function(){return nn.call(this).zzDecode()[X](!1)},fixed64:function(){return My0.call(this)[X](!0)},sfixed64:function(){return My0.call(this)[X](!1)}})}});var Cy0=I((lJ1,jy0)=>{jy0.exports=G$;var Iy0=W2();(G$.prototype=Object.create(Iy0.prototype)).constructor=G$;var Ey0=o5();function G$(Q){Iy0.call(this,Q)}G$._configure=function(){if(Ey0.Buffer)G$.prototype._slice=Ey0.Buffer.prototype.slice};G$.prototype.string=function(){var X=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+X,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+X,this.len))};G$._configure()});var Sy0=I((dJ1,Ry0)=>{Ry0.exports=uN;var rn=o5();(uN.prototype=Object.create(rn.EventEmitter.prototype)).constructor=uN;function uN(Q,X,Y){if(typeof Q!=="function")throw TypeError("rpcImpl must be a function");rn.EventEmitter.call(this),this.rpcImpl=Q,this.requestDelimited=Boolean(X),this.responseDelimited=Boolean(Y)}uN.prototype.rpcCall=function Q(X,Y,J,G,Z){if(!G)throw TypeError("request must be specified");var W=this;if(!Z)return rn.asPromise(Q,W,X,Y,J,G);if(!W.rpcImpl){setTimeout(function(){Z(Error("already ended"))},0);return}try{return W.rpcImpl(X,Y[W.requestDelimited?"encodeDelimited":"encode"](G).finish(),function($,H){if($)return W.emit("error",$,X),Z($);if(H===null){W.end(!0);return}if(!(H instanceof J))try{H=J[W.responseDelimited?"decodeDelimited":"decode"](H)}catch(F){return W.emit("error",F,X),Z(F)}return W.emit("data",H,X),Z(null,H)})}catch(K){W.emit("error",K,X),setTimeout(function(){Z(K)},0);return}};uN.prototype.end=function(X){if(this.rpcImpl){if(!X)this.rpcImpl(null,null,null);this.rpcImpl=null,this.emit("end").off()}return this}});var on=I((vy0)=>{var Os4=vy0;Os4.Service=Sy0()});var sn=I((cJ1,ky0)=>{ky0.exports={}});var tn=I((yy0)=>{var MX=yy0;MX.build="minimal";MX.Writer=J2();MX.BufferWriter=Ly0();MX.Reader=W2();MX.BufferReader=Cy0();MX.util=o5();MX.rpc=on();MX.roots=sn();MX.configure=_y0;function _y0(){MX.util._configure(),MX.Writer._configure(MX.BufferWriter),MX.Reader._configure(MX.BufferReader)}_y0()});var Z2=I((by0,fy0)=>{Object.defineProperty(by0,"__esModule",{value:!0});var _4=tn(),V0=_4.Reader,J6=_4.Writer,h=_4.util,f=_4.roots.default||(_4.roots.default={});f.opentelemetry=function(){var Q={};return Q.proto=function(){var X={};return X.common=function(){var Y={};return Y.v1=function(){var J={};return J.AnyValue=function(){function G(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.stringValue=null,G.prototype.boolValue=null,G.prototype.intValue=null,G.prototype.doubleValue=null,G.prototype.arrayValue=null,G.prototype.kvlistValue=null,G.prototype.bytesValue=null;var Z;return Object.defineProperty(G.prototype,"value",{get:h.oneOfGetter(Z=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.stringValue!=null&&Object.hasOwnProperty.call(K,"stringValue"))$.uint32(10).string(K.stringValue);if(K.boolValue!=null&&Object.hasOwnProperty.call(K,"boolValue"))$.uint32(16).bool(K.boolValue);if(K.intValue!=null&&Object.hasOwnProperty.call(K,"intValue"))$.uint32(24).int64(K.intValue);if(K.doubleValue!=null&&Object.hasOwnProperty.call(K,"doubleValue"))$.uint32(33).double(K.doubleValue);if(K.arrayValue!=null&&Object.hasOwnProperty.call(K,"arrayValue"))f.opentelemetry.proto.common.v1.ArrayValue.encode(K.arrayValue,$.uint32(42).fork()).ldelim();if(K.kvlistValue!=null&&Object.hasOwnProperty.call(K,"kvlistValue"))f.opentelemetry.proto.common.v1.KeyValueList.encode(K.kvlistValue,$.uint32(50).fork()).ldelim();if(K.bytesValue!=null&&Object.hasOwnProperty.call(K,"bytesValue"))$.uint32(58).bytes(K.bytesValue);return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.common.v1.AnyValue;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.stringValue=K.string();break}case 2:{q.boolValue=K.bool();break}case 3:{q.intValue=K.int64();break}case 4:{q.doubleValue=K.double();break}case 5:{q.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.decode(K,K.uint32());break}case 6:{q.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.decode(K,K.uint32());break}case 7:{q.bytesValue=K.bytes();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.stringValue!=null&&K.hasOwnProperty("stringValue")){if($.value=1,!h.isString(K.stringValue))return"stringValue: string expected"}if(K.boolValue!=null&&K.hasOwnProperty("boolValue")){if($.value===1)return"value: multiple values";if($.value=1,typeof K.boolValue!=="boolean")return"boolValue: boolean expected"}if(K.intValue!=null&&K.hasOwnProperty("intValue")){if($.value===1)return"value: multiple values";if($.value=1,!h.isInteger(K.intValue)&&!(K.intValue&&h.isInteger(K.intValue.low)&&h.isInteger(K.intValue.high)))return"intValue: integer|Long expected"}if(K.doubleValue!=null&&K.hasOwnProperty("doubleValue")){if($.value===1)return"value: multiple values";if($.value=1,typeof K.doubleValue!=="number")return"doubleValue: number expected"}if(K.arrayValue!=null&&K.hasOwnProperty("arrayValue")){if($.value===1)return"value: multiple values";$.value=1;{var H=f.opentelemetry.proto.common.v1.ArrayValue.verify(K.arrayValue);if(H)return"arrayValue."+H}}if(K.kvlistValue!=null&&K.hasOwnProperty("kvlistValue")){if($.value===1)return"value: multiple values";$.value=1;{var H=f.opentelemetry.proto.common.v1.KeyValueList.verify(K.kvlistValue);if(H)return"kvlistValue."+H}}if(K.bytesValue!=null&&K.hasOwnProperty("bytesValue")){if($.value===1)return"value: multiple values";if($.value=1,!(K.bytesValue&&typeof K.bytesValue.length==="number"||h.isString(K.bytesValue)))return"bytesValue: buffer expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.common.v1.AnyValue)return K;var $=new f.opentelemetry.proto.common.v1.AnyValue;if(K.stringValue!=null)$.stringValue=String(K.stringValue);if(K.boolValue!=null)$.boolValue=Boolean(K.boolValue);if(K.intValue!=null){if(h.Long)($.intValue=h.Long.fromValue(K.intValue)).unsigned=!1;else if(typeof K.intValue==="string")$.intValue=parseInt(K.intValue,10);else if(typeof K.intValue==="number")$.intValue=K.intValue;else if(typeof K.intValue==="object")$.intValue=new h.LongBits(K.intValue.low>>>0,K.intValue.high>>>0).toNumber()}if(K.doubleValue!=null)$.doubleValue=Number(K.doubleValue);if(K.arrayValue!=null){if(typeof K.arrayValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");$.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.fromObject(K.arrayValue)}if(K.kvlistValue!=null){if(typeof K.kvlistValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");$.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.fromObject(K.kvlistValue)}if(K.bytesValue!=null){if(typeof K.bytesValue==="string")h.base64.decode(K.bytesValue,$.bytesValue=h.newBuffer(h.base64.length(K.bytesValue)),0);else if(K.bytesValue.length>=0)$.bytesValue=K.bytesValue}return $},G.toObject=function(K,$){if(!$)$={};var H={};if(K.stringValue!=null&&K.hasOwnProperty("stringValue")){if(H.stringValue=K.stringValue,$.oneofs)H.value="stringValue"}if(K.boolValue!=null&&K.hasOwnProperty("boolValue")){if(H.boolValue=K.boolValue,$.oneofs)H.value="boolValue"}if(K.intValue!=null&&K.hasOwnProperty("intValue")){if(typeof K.intValue==="number")H.intValue=$.longs===String?String(K.intValue):K.intValue;else H.intValue=$.longs===String?h.Long.prototype.toString.call(K.intValue):$.longs===Number?new h.LongBits(K.intValue.low>>>0,K.intValue.high>>>0).toNumber():K.intValue;if($.oneofs)H.value="intValue"}if(K.doubleValue!=null&&K.hasOwnProperty("doubleValue")){if(H.doubleValue=$.json&&!isFinite(K.doubleValue)?String(K.doubleValue):K.doubleValue,$.oneofs)H.value="doubleValue"}if(K.arrayValue!=null&&K.hasOwnProperty("arrayValue")){if(H.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.toObject(K.arrayValue,$),$.oneofs)H.value="arrayValue"}if(K.kvlistValue!=null&&K.hasOwnProperty("kvlistValue")){if(H.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.toObject(K.kvlistValue,$),$.oneofs)H.value="kvlistValue"}if(K.bytesValue!=null&&K.hasOwnProperty("bytesValue")){if(H.bytesValue=$.bytes===String?h.base64.encode(K.bytesValue,0,K.bytesValue.length):$.bytes===Array?Array.prototype.slice.call(K.bytesValue):K.bytesValue,$.oneofs)H.value="bytesValue"}return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.common.v1.AnyValue"},G}(),J.ArrayValue=function(){function G(Z){if(this.values=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.values=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.values!=null&&W.values.length)for(var $=0;$<W.values.length;++$)f.opentelemetry.proto.common.v1.AnyValue.encode(W.values[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.ArrayValue;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.values&&F.values.length))F.values=[];F.values.push(f.opentelemetry.proto.common.v1.AnyValue.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.values!=null&&W.hasOwnProperty("values")){if(!Array.isArray(W.values))return"values: array expected";for(var K=0;K<W.values.length;++K){var $=f.opentelemetry.proto.common.v1.AnyValue.verify(W.values[K]);if($)return"values."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.ArrayValue)return W;var K=new f.opentelemetry.proto.common.v1.ArrayValue;if(W.values){if(!Array.isArray(W.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");K.values=[];for(var $=0;$<W.values.length;++$){if(typeof W.values[$]!=="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");K.values[$]=f.opentelemetry.proto.common.v1.AnyValue.fromObject(W.values[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.values=[];if(W.values&&W.values.length){$.values=[];for(var H=0;H<W.values.length;++H)$.values[H]=f.opentelemetry.proto.common.v1.AnyValue.toObject(W.values[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.ArrayValue"},G}(),J.KeyValueList=function(){function G(Z){if(this.values=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.values=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.values!=null&&W.values.length)for(var $=0;$<W.values.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.values[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.KeyValueList;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.values&&F.values.length))F.values=[];F.values.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.values!=null&&W.hasOwnProperty("values")){if(!Array.isArray(W.values))return"values: array expected";for(var K=0;K<W.values.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.values[K]);if($)return"values."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.KeyValueList)return W;var K=new f.opentelemetry.proto.common.v1.KeyValueList;if(W.values){if(!Array.isArray(W.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");K.values=[];for(var $=0;$<W.values.length;++$){if(typeof W.values[$]!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");K.values[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.values[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.values=[];if(W.values&&W.values.length){$.values=[];for(var H=0;H<W.values.length;++H)$.values[H]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.values[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.KeyValueList"},G}(),J.KeyValue=function(){function G(Z){if(Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.key=null,G.prototype.value=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.key!=null&&Object.hasOwnProperty.call(W,"key"))K.uint32(10).string(W.key);if(W.value!=null&&Object.hasOwnProperty.call(W,"value"))f.opentelemetry.proto.common.v1.AnyValue.encode(W.value,K.uint32(18).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.KeyValue;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.key=W.string();break}case 2:{F.value=f.opentelemetry.proto.common.v1.AnyValue.decode(W,W.uint32());break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.key!=null&&W.hasOwnProperty("key")){if(!h.isString(W.key))return"key: string expected"}if(W.value!=null&&W.hasOwnProperty("value")){var K=f.opentelemetry.proto.common.v1.AnyValue.verify(W.value);if(K)return"value."+K}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.KeyValue)return W;var K=new f.opentelemetry.proto.common.v1.KeyValue;if(W.key!=null)K.key=String(W.key);if(W.value!=null){if(typeof W.value!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");K.value=f.opentelemetry.proto.common.v1.AnyValue.fromObject(W.value)}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.defaults)$.key="",$.value=null;if(W.key!=null&&W.hasOwnProperty("key"))$.key=W.key;if(W.value!=null&&W.hasOwnProperty("value"))$.value=f.opentelemetry.proto.common.v1.AnyValue.toObject(W.value,K);return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.KeyValue"},G}(),J.InstrumentationScope=function(){function G(Z){if(this.attributes=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.name=null,G.prototype.version=null,G.prototype.attributes=h.emptyArray,G.prototype.droppedAttributesCount=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.name!=null&&Object.hasOwnProperty.call(W,"name"))K.uint32(10).string(W.name);if(W.version!=null&&Object.hasOwnProperty.call(W,"version"))K.uint32(18).string(W.version);if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(26).fork()).ldelim();if(W.droppedAttributesCount!=null&&Object.hasOwnProperty.call(W,"droppedAttributesCount"))K.uint32(32).uint32(W.droppedAttributesCount);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.InstrumentationScope;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.name=W.string();break}case 2:{F.version=W.string();break}case 3:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 4:{F.droppedAttributesCount=W.uint32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.name!=null&&W.hasOwnProperty("name")){if(!h.isString(W.name))return"name: string expected"}if(W.version!=null&&W.hasOwnProperty("version")){if(!h.isString(W.version))return"version: string expected"}if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var K=0;K<W.attributes.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[K]);if($)return"attributes."+$}}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(W.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.InstrumentationScope)return W;var K=new f.opentelemetry.proto.common.v1.InstrumentationScope;if(W.name!=null)K.name=String(W.name);if(W.version!=null)K.version=String(W.version);if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.droppedAttributesCount!=null)K.droppedAttributesCount=W.droppedAttributesCount>>>0;return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.attributes=[];if(K.defaults)$.name="",$.version="",$.droppedAttributesCount=0;if(W.name!=null&&W.hasOwnProperty("name"))$.name=W.name;if(W.version!=null&&W.hasOwnProperty("version"))$.version=W.version;if(W.attributes&&W.attributes.length){$.attributes=[];for(var H=0;H<W.attributes.length;++H)$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[H],K)}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount"))$.droppedAttributesCount=W.droppedAttributesCount;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.InstrumentationScope"},G}(),J.EntityRef=function(){function G(Z){if(this.idKeys=[],this.descriptionKeys=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.schemaUrl=null,G.prototype.type=null,G.prototype.idKeys=h.emptyArray,G.prototype.descriptionKeys=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(10).string(W.schemaUrl);if(W.type!=null&&Object.hasOwnProperty.call(W,"type"))K.uint32(18).string(W.type);if(W.idKeys!=null&&W.idKeys.length)for(var $=0;$<W.idKeys.length;++$)K.uint32(26).string(W.idKeys[$]);if(W.descriptionKeys!=null&&W.descriptionKeys.length)for(var $=0;$<W.descriptionKeys.length;++$)K.uint32(34).string(W.descriptionKeys[$]);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.EntityRef;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.schemaUrl=W.string();break}case 2:{F.type=W.string();break}case 3:{if(!(F.idKeys&&F.idKeys.length))F.idKeys=[];F.idKeys.push(W.string());break}case 4:{if(!(F.descriptionKeys&&F.descriptionKeys.length))F.descriptionKeys=[];F.descriptionKeys.push(W.string());break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}if(W.type!=null&&W.hasOwnProperty("type")){if(!h.isString(W.type))return"type: string expected"}if(W.idKeys!=null&&W.hasOwnProperty("idKeys")){if(!Array.isArray(W.idKeys))return"idKeys: array expected";for(var K=0;K<W.idKeys.length;++K)if(!h.isString(W.idKeys[K]))return"idKeys: string[] expected"}if(W.descriptionKeys!=null&&W.hasOwnProperty("descriptionKeys")){if(!Array.isArray(W.descriptionKeys))return"descriptionKeys: array expected";for(var K=0;K<W.descriptionKeys.length;++K)if(!h.isString(W.descriptionKeys[K]))return"descriptionKeys: string[] expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.EntityRef)return W;var K=new f.opentelemetry.proto.common.v1.EntityRef;if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);if(W.type!=null)K.type=String(W.type);if(W.idKeys){if(!Array.isArray(W.idKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.idKeys: array expected");K.idKeys=[];for(var $=0;$<W.idKeys.length;++$)K.idKeys[$]=String(W.idKeys[$])}if(W.descriptionKeys){if(!Array.isArray(W.descriptionKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.descriptionKeys: array expected");K.descriptionKeys=[];for(var $=0;$<W.descriptionKeys.length;++$)K.descriptionKeys[$]=String(W.descriptionKeys[$])}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.idKeys=[],$.descriptionKeys=[];if(K.defaults)$.schemaUrl="",$.type="";if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;if(W.type!=null&&W.hasOwnProperty("type"))$.type=W.type;if(W.idKeys&&W.idKeys.length){$.idKeys=[];for(var H=0;H<W.idKeys.length;++H)$.idKeys[H]=W.idKeys[H]}if(W.descriptionKeys&&W.descriptionKeys.length){$.descriptionKeys=[];for(var H=0;H<W.descriptionKeys.length;++H)$.descriptionKeys[H]=W.descriptionKeys[H]}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.EntityRef"},G}(),J}(),Y}(),X.resource=function(){var Y={};return Y.v1=function(){var J={};return J.Resource=function(){function G(Z){if(this.attributes=[],this.entityRefs=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.attributes=h.emptyArray,G.prototype.droppedAttributesCount=null,G.prototype.entityRefs=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(10).fork()).ldelim();if(W.droppedAttributesCount!=null&&Object.hasOwnProperty.call(W,"droppedAttributesCount"))K.uint32(16).uint32(W.droppedAttributesCount);if(W.entityRefs!=null&&W.entityRefs.length)for(var $=0;$<W.entityRefs.length;++$)f.opentelemetry.proto.common.v1.EntityRef.encode(W.entityRefs[$],K.uint32(26).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.resource.v1.Resource;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 2:{F.droppedAttributesCount=W.uint32();break}case 3:{if(!(F.entityRefs&&F.entityRefs.length))F.entityRefs=[];F.entityRefs.push(f.opentelemetry.proto.common.v1.EntityRef.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var K=0;K<W.attributes.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[K]);if($)return"attributes."+$}}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(W.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(W.entityRefs!=null&&W.hasOwnProperty("entityRefs")){if(!Array.isArray(W.entityRefs))return"entityRefs: array expected";for(var K=0;K<W.entityRefs.length;++K){var $=f.opentelemetry.proto.common.v1.EntityRef.verify(W.entityRefs[K]);if($)return"entityRefs."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.resource.v1.Resource)return W;var K=new f.opentelemetry.proto.resource.v1.Resource;if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.droppedAttributesCount!=null)K.droppedAttributesCount=W.droppedAttributesCount>>>0;if(W.entityRefs){if(!Array.isArray(W.entityRefs))throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: array expected");K.entityRefs=[];for(var $=0;$<W.entityRefs.length;++$){if(typeof W.entityRefs[$]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: object expected");K.entityRefs[$]=f.opentelemetry.proto.common.v1.EntityRef.fromObject(W.entityRefs[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.attributes=[],$.entityRefs=[];if(K.defaults)$.droppedAttributesCount=0;if(W.attributes&&W.attributes.length){$.attributes=[];for(var H=0;H<W.attributes.length;++H)$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[H],K)}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount"))$.droppedAttributesCount=W.droppedAttributesCount;if(W.entityRefs&&W.entityRefs.length){$.entityRefs=[];for(var H=0;H<W.entityRefs.length;++H)$.entityRefs[H]=f.opentelemetry.proto.common.v1.EntityRef.toObject(W.entityRefs[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.resource.v1.Resource"},G}(),J}(),Y}(),X.trace=function(){var Y={};return Y.v1=function(){var J={};return J.TracesData=function(){function G(Z){if(this.resourceSpans=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resourceSpans=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resourceSpans!=null&&W.resourceSpans.length)for(var $=0;$<W.resourceSpans.length;++$)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(W.resourceSpans[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.TracesData;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.resourceSpans&&F.resourceSpans.length))F.resourceSpans=[];F.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resourceSpans!=null&&W.hasOwnProperty("resourceSpans")){if(!Array.isArray(W.resourceSpans))return"resourceSpans: array expected";for(var K=0;K<W.resourceSpans.length;++K){var $=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(W.resourceSpans[K]);if($)return"resourceSpans."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.TracesData)return W;var K=new f.opentelemetry.proto.trace.v1.TracesData;if(W.resourceSpans){if(!Array.isArray(W.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");K.resourceSpans=[];for(var $=0;$<W.resourceSpans.length;++$){if(typeof W.resourceSpans[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");K.resourceSpans[$]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(W.resourceSpans[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.resourceSpans=[];if(W.resourceSpans&&W.resourceSpans.length){$.resourceSpans=[];for(var H=0;H<W.resourceSpans.length;++H)$.resourceSpans[H]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(W.resourceSpans[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.TracesData"},G}(),J.ResourceSpans=function(){function G(Z){if(this.scopeSpans=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resource=null,G.prototype.scopeSpans=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resource!=null&&Object.hasOwnProperty.call(W,"resource"))f.opentelemetry.proto.resource.v1.Resource.encode(W.resource,K.uint32(10).fork()).ldelim();if(W.scopeSpans!=null&&W.scopeSpans.length)for(var $=0;$<W.scopeSpans.length;++$)f.opentelemetry.proto.trace.v1.ScopeSpans.encode(W.scopeSpans[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.ResourceSpans;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.resource=f.opentelemetry.proto.resource.v1.Resource.decode(W,W.uint32());break}case 2:{if(!(F.scopeSpans&&F.scopeSpans.length))F.scopeSpans=[];F.scopeSpans.push(f.opentelemetry.proto.trace.v1.ScopeSpans.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resource!=null&&W.hasOwnProperty("resource")){var K=f.opentelemetry.proto.resource.v1.Resource.verify(W.resource);if(K)return"resource."+K}if(W.scopeSpans!=null&&W.hasOwnProperty("scopeSpans")){if(!Array.isArray(W.scopeSpans))return"scopeSpans: array expected";for(var $=0;$<W.scopeSpans.length;++$){var K=f.opentelemetry.proto.trace.v1.ScopeSpans.verify(W.scopeSpans[$]);if(K)return"scopeSpans."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.ResourceSpans)return W;var K=new f.opentelemetry.proto.trace.v1.ResourceSpans;if(W.resource!=null){if(typeof W.resource!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");K.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(W.resource)}if(W.scopeSpans){if(!Array.isArray(W.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");K.scopeSpans=[];for(var $=0;$<W.scopeSpans.length;++$){if(typeof W.scopeSpans[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");K.scopeSpans[$]=f.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(W.scopeSpans[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.scopeSpans=[];if(K.defaults)$.resource=null,$.schemaUrl="";if(W.resource!=null&&W.hasOwnProperty("resource"))$.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(W.resource,K);if(W.scopeSpans&&W.scopeSpans.length){$.scopeSpans=[];for(var H=0;H<W.scopeSpans.length;++H)$.scopeSpans[H]=f.opentelemetry.proto.trace.v1.ScopeSpans.toObject(W.scopeSpans[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.ResourceSpans"},G}(),J.ScopeSpans=function(){function G(Z){if(this.spans=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.scope=null,G.prototype.spans=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.scope!=null&&Object.hasOwnProperty.call(W,"scope"))f.opentelemetry.proto.common.v1.InstrumentationScope.encode(W.scope,K.uint32(10).fork()).ldelim();if(W.spans!=null&&W.spans.length)for(var $=0;$<W.spans.length;++$)f.opentelemetry.proto.trace.v1.Span.encode(W.spans[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.ScopeSpans;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(W,W.uint32());break}case 2:{if(!(F.spans&&F.spans.length))F.spans=[];F.spans.push(f.opentelemetry.proto.trace.v1.Span.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.scope!=null&&W.hasOwnProperty("scope")){var K=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(W.scope);if(K)return"scope."+K}if(W.spans!=null&&W.hasOwnProperty("spans")){if(!Array.isArray(W.spans))return"spans: array expected";for(var $=0;$<W.spans.length;++$){var K=f.opentelemetry.proto.trace.v1.Span.verify(W.spans[$]);if(K)return"spans."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.ScopeSpans)return W;var K=new f.opentelemetry.proto.trace.v1.ScopeSpans;if(W.scope!=null){if(typeof W.scope!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");K.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(W.scope)}if(W.spans){if(!Array.isArray(W.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");K.spans=[];for(var $=0;$<W.spans.length;++$){if(typeof W.spans[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");K.spans[$]=f.opentelemetry.proto.trace.v1.Span.fromObject(W.spans[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.spans=[];if(K.defaults)$.scope=null,$.schemaUrl="";if(W.scope!=null&&W.hasOwnProperty("scope"))$.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(W.scope,K);if(W.spans&&W.spans.length){$.spans=[];for(var H=0;H<W.spans.length;++H)$.spans[H]=f.opentelemetry.proto.trace.v1.Span.toObject(W.spans[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.ScopeSpans"},G}(),J.Span=function(){function G(Z){if(this.attributes=[],this.events=[],this.links=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.traceId=null,G.prototype.spanId=null,G.prototype.traceState=null,G.prototype.parentSpanId=null,G.prototype.flags=null,G.prototype.name=null,G.prototype.kind=null,G.prototype.startTimeUnixNano=null,G.prototype.endTimeUnixNano=null,G.prototype.attributes=h.emptyArray,G.prototype.droppedAttributesCount=null,G.prototype.events=h.emptyArray,G.prototype.droppedEventsCount=null,G.prototype.links=h.emptyArray,G.prototype.droppedLinksCount=null,G.prototype.status=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.traceId!=null&&Object.hasOwnProperty.call(W,"traceId"))K.uint32(10).bytes(W.traceId);if(W.spanId!=null&&Object.hasOwnProperty.call(W,"spanId"))K.uint32(18).bytes(W.spanId);if(W.traceState!=null&&Object.hasOwnProperty.call(W,"traceState"))K.uint32(26).string(W.traceState);if(W.parentSpanId!=null&&Object.hasOwnProperty.call(W,"parentSpanId"))K.uint32(34).bytes(W.parentSpanId);if(W.name!=null&&Object.hasOwnProperty.call(W,"name"))K.uint32(42).string(W.name);if(W.kind!=null&&Object.hasOwnProperty.call(W,"kind"))K.uint32(48).int32(W.kind);if(W.startTimeUnixNano!=null&&Object.hasOwnProperty.call(W,"startTimeUnixNano"))K.uint32(57).fixed64(W.startTimeUnixNano);if(W.endTimeUnixNano!=null&&Object.hasOwnProperty.call(W,"endTimeUnixNano"))K.uint32(65).fixed64(W.endTimeUnixNano);if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(74).fork()).ldelim();if(W.droppedAttributesCount!=null&&Object.hasOwnProperty.call(W,"droppedAttributesCount"))K.uint32(80).uint32(W.droppedAttributesCount);if(W.events!=null&&W.events.length)for(var $=0;$<W.events.length;++$)f.opentelemetry.proto.trace.v1.Span.Event.encode(W.events[$],K.uint32(90).fork()).ldelim();if(W.droppedEventsCount!=null&&Object.hasOwnProperty.call(W,"droppedEventsCount"))K.uint32(96).uint32(W.droppedEventsCount);if(W.links!=null&&W.links.length)for(var $=0;$<W.links.length;++$)f.opentelemetry.proto.trace.v1.Span.Link.encode(W.links[$],K.uint32(106).fork()).ldelim();if(W.droppedLinksCount!=null&&Object.hasOwnProperty.call(W,"droppedLinksCount"))K.uint32(112).uint32(W.droppedLinksCount);if(W.status!=null&&Object.hasOwnProperty.call(W,"status"))f.opentelemetry.proto.trace.v1.Status.encode(W.status,K.uint32(122).fork()).ldelim();if(W.flags!=null&&Object.hasOwnProperty.call(W,"flags"))K.uint32(133).fixed32(W.flags);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.Span;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.traceId=W.bytes();break}case 2:{F.spanId=W.bytes();break}case 3:{F.traceState=W.string();break}case 4:{F.parentSpanId=W.bytes();break}case 16:{F.flags=W.fixed32();break}case 5:{F.name=W.string();break}case 6:{F.kind=W.int32();break}case 7:{F.startTimeUnixNano=W.fixed64();break}case 8:{F.endTimeUnixNano=W.fixed64();break}case 9:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 10:{F.droppedAttributesCount=W.uint32();break}case 11:{if(!(F.events&&F.events.length))F.events=[];F.events.push(f.opentelemetry.proto.trace.v1.Span.Event.decode(W,W.uint32()));break}case 12:{F.droppedEventsCount=W.uint32();break}case 13:{if(!(F.links&&F.links.length))F.links=[];F.links.push(f.opentelemetry.proto.trace.v1.Span.Link.decode(W,W.uint32()));break}case 14:{F.droppedLinksCount=W.uint32();break}case 15:{F.status=f.opentelemetry.proto.trace.v1.Status.decode(W,W.uint32());break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.traceId!=null&&W.hasOwnProperty("traceId")){if(!(W.traceId&&typeof W.traceId.length==="number"||h.isString(W.traceId)))return"traceId: buffer expected"}if(W.spanId!=null&&W.hasOwnProperty("spanId")){if(!(W.spanId&&typeof W.spanId.length==="number"||h.isString(W.spanId)))return"spanId: buffer expected"}if(W.traceState!=null&&W.hasOwnProperty("traceState")){if(!h.isString(W.traceState))return"traceState: string expected"}if(W.parentSpanId!=null&&W.hasOwnProperty("parentSpanId")){if(!(W.parentSpanId&&typeof W.parentSpanId.length==="number"||h.isString(W.parentSpanId)))return"parentSpanId: buffer expected"}if(W.flags!=null&&W.hasOwnProperty("flags")){if(!h.isInteger(W.flags))return"flags: integer expected"}if(W.name!=null&&W.hasOwnProperty("name")){if(!h.isString(W.name))return"name: string expected"}if(W.kind!=null&&W.hasOwnProperty("kind"))switch(W.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(W.startTimeUnixNano!=null&&W.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(W.startTimeUnixNano)&&!(W.startTimeUnixNano&&h.isInteger(W.startTimeUnixNano.low)&&h.isInteger(W.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(W.endTimeUnixNano!=null&&W.hasOwnProperty("endTimeUnixNano")){if(!h.isInteger(W.endTimeUnixNano)&&!(W.endTimeUnixNano&&h.isInteger(W.endTimeUnixNano.low)&&h.isInteger(W.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected"}if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var K=0;K<W.attributes.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[K]);if($)return"attributes."+$}}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(W.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(W.events!=null&&W.hasOwnProperty("events")){if(!Array.isArray(W.events))return"events: array expected";for(var K=0;K<W.events.length;++K){var $=f.opentelemetry.proto.trace.v1.Span.Event.verify(W.events[K]);if($)return"events."+$}}if(W.droppedEventsCount!=null&&W.hasOwnProperty("droppedEventsCount")){if(!h.isInteger(W.droppedEventsCount))return"droppedEventsCount: integer expected"}if(W.links!=null&&W.hasOwnProperty("links")){if(!Array.isArray(W.links))return"links: array expected";for(var K=0;K<W.links.length;++K){var $=f.opentelemetry.proto.trace.v1.Span.Link.verify(W.links[K]);if($)return"links."+$}}if(W.droppedLinksCount!=null&&W.hasOwnProperty("droppedLinksCount")){if(!h.isInteger(W.droppedLinksCount))return"droppedLinksCount: integer expected"}if(W.status!=null&&W.hasOwnProperty("status")){var $=f.opentelemetry.proto.trace.v1.Status.verify(W.status);if($)return"status."+$}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.Span)return W;var K=new f.opentelemetry.proto.trace.v1.Span;if(W.traceId!=null){if(typeof W.traceId==="string")h.base64.decode(W.traceId,K.traceId=h.newBuffer(h.base64.length(W.traceId)),0);else if(W.traceId.length>=0)K.traceId=W.traceId}if(W.spanId!=null){if(typeof W.spanId==="string")h.base64.decode(W.spanId,K.spanId=h.newBuffer(h.base64.length(W.spanId)),0);else if(W.spanId.length>=0)K.spanId=W.spanId}if(W.traceState!=null)K.traceState=String(W.traceState);if(W.parentSpanId!=null){if(typeof W.parentSpanId==="string")h.base64.decode(W.parentSpanId,K.parentSpanId=h.newBuffer(h.base64.length(W.parentSpanId)),0);else if(W.parentSpanId.length>=0)K.parentSpanId=W.parentSpanId}if(W.flags!=null)K.flags=W.flags>>>0;if(W.name!=null)K.name=String(W.name);switch(W.kind){default:if(typeof W.kind==="number"){K.kind=W.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:K.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:K.kind=1;break;case"SPAN_KIND_SERVER":case 2:K.kind=2;break;case"SPAN_KIND_CLIENT":case 3:K.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:K.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:K.kind=5;break}if(W.startTimeUnixNano!=null){if(h.Long)(K.startTimeUnixNano=h.Long.fromValue(W.startTimeUnixNano)).unsigned=!1;else if(typeof W.startTimeUnixNano==="string")K.startTimeUnixNano=parseInt(W.startTimeUnixNano,10);else if(typeof W.startTimeUnixNano==="number")K.startTimeUnixNano=W.startTimeUnixNano;else if(typeof W.startTimeUnixNano==="object")K.startTimeUnixNano=new h.LongBits(W.startTimeUnixNano.low>>>0,W.startTimeUnixNano.high>>>0).toNumber()}if(W.endTimeUnixNano!=null){if(h.Long)(K.endTimeUnixNano=h.Long.fromValue(W.endTimeUnixNano)).unsigned=!1;else if(typeof W.endTimeUnixNano==="string")K.endTimeUnixNano=parseInt(W.endTimeUnixNano,10);else if(typeof W.endTimeUnixNano==="number")K.endTimeUnixNano=W.endTimeUnixNano;else if(typeof W.endTimeUnixNano==="object")K.endTimeUnixNano=new h.LongBits(W.endTimeUnixNano.low>>>0,W.endTimeUnixNano.high>>>0).toNumber()}if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.droppedAttributesCount!=null)K.droppedAttributesCount=W.droppedAttributesCount>>>0;if(W.events){if(!Array.isArray(W.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");K.events=[];for(var $=0;$<W.events.length;++$){if(typeof W.events[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");K.events[$]=f.opentelemetry.proto.trace.v1.Span.Event.fromObject(W.events[$])}}if(W.droppedEventsCount!=null)K.droppedEventsCount=W.droppedEventsCount>>>0;if(W.links){if(!Array.isArray(W.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");K.links=[];for(var $=0;$<W.links.length;++$){if(typeof W.links[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");K.links[$]=f.opentelemetry.proto.trace.v1.Span.Link.fromObject(W.links[$])}}if(W.droppedLinksCount!=null)K.droppedLinksCount=W.droppedLinksCount>>>0;if(W.status!=null){if(typeof W.status!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");K.status=f.opentelemetry.proto.trace.v1.Status.fromObject(W.status)}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.attributes=[],$.events=[],$.links=[];if(K.defaults){if(K.bytes===String)$.traceId="";else if($.traceId=[],K.bytes!==Array)$.traceId=h.newBuffer($.traceId);if(K.bytes===String)$.spanId="";else if($.spanId=[],K.bytes!==Array)$.spanId=h.newBuffer($.spanId);if($.traceState="",K.bytes===String)$.parentSpanId="";else if($.parentSpanId=[],K.bytes!==Array)$.parentSpanId=h.newBuffer($.parentSpanId);if($.name="",$.kind=K.enums===String?"SPAN_KIND_UNSPECIFIED":0,h.Long){var H=new h.Long(0,0,!1);$.startTimeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.startTimeUnixNano=K.longs===String?"0":0;if(h.Long){var H=new h.Long(0,0,!1);$.endTimeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.endTimeUnixNano=K.longs===String?"0":0;$.droppedAttributesCount=0,$.droppedEventsCount=0,$.droppedLinksCount=0,$.status=null,$.flags=0}if(W.traceId!=null&&W.hasOwnProperty("traceId"))$.traceId=K.bytes===String?h.base64.encode(W.traceId,0,W.traceId.length):K.bytes===Array?Array.prototype.slice.call(W.traceId):W.traceId;if(W.spanId!=null&&W.hasOwnProperty("spanId"))$.spanId=K.bytes===String?h.base64.encode(W.spanId,0,W.spanId.length):K.bytes===Array?Array.prototype.slice.call(W.spanId):W.spanId;if(W.traceState!=null&&W.hasOwnProperty("traceState"))$.traceState=W.traceState;if(W.parentSpanId!=null&&W.hasOwnProperty("parentSpanId"))$.parentSpanId=K.bytes===String?h.base64.encode(W.parentSpanId,0,W.parentSpanId.length):K.bytes===Array?Array.prototype.slice.call(W.parentSpanId):W.parentSpanId;if(W.name!=null&&W.hasOwnProperty("name"))$.name=W.name;if(W.kind!=null&&W.hasOwnProperty("kind"))$.kind=K.enums===String?f.opentelemetry.proto.trace.v1.Span.SpanKind[W.kind]===void 0?W.kind:f.opentelemetry.proto.trace.v1.Span.SpanKind[W.kind]:W.kind;if(W.startTimeUnixNano!=null&&W.hasOwnProperty("startTimeUnixNano"))if(typeof W.startTimeUnixNano==="number")$.startTimeUnixNano=K.longs===String?String(W.startTimeUnixNano):W.startTimeUnixNano;else $.startTimeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.startTimeUnixNano):K.longs===Number?new h.LongBits(W.startTimeUnixNano.low>>>0,W.startTimeUnixNano.high>>>0).toNumber():W.startTimeUnixNano;if(W.endTimeUnixNano!=null&&W.hasOwnProperty("endTimeUnixNano"))if(typeof W.endTimeUnixNano==="number")$.endTimeUnixNano=K.longs===String?String(W.endTimeUnixNano):W.endTimeUnixNano;else $.endTimeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.endTimeUnixNano):K.longs===Number?new h.LongBits(W.endTimeUnixNano.low>>>0,W.endTimeUnixNano.high>>>0).toNumber():W.endTimeUnixNano;if(W.attributes&&W.attributes.length){$.attributes=[];for(var F=0;F<W.attributes.length;++F)$.attributes[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[F],K)}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount"))$.droppedAttributesCount=W.droppedAttributesCount;if(W.events&&W.events.length){$.events=[];for(var F=0;F<W.events.length;++F)$.events[F]=f.opentelemetry.proto.trace.v1.Span.Event.toObject(W.events[F],K)}if(W.droppedEventsCount!=null&&W.hasOwnProperty("droppedEventsCount"))$.droppedEventsCount=W.droppedEventsCount;if(W.links&&W.links.length){$.links=[];for(var F=0;F<W.links.length;++F)$.links[F]=f.opentelemetry.proto.trace.v1.Span.Link.toObject(W.links[F],K)}if(W.droppedLinksCount!=null&&W.hasOwnProperty("droppedLinksCount"))$.droppedLinksCount=W.droppedLinksCount;if(W.status!=null&&W.hasOwnProperty("status"))$.status=f.opentelemetry.proto.trace.v1.Status.toObject(W.status,K);if(W.flags!=null&&W.hasOwnProperty("flags"))$.flags=W.flags;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.Span"},G.SpanKind=function(){var Z={},W=Object.create(Z);return W[Z[0]="SPAN_KIND_UNSPECIFIED"]=0,W[Z[1]="SPAN_KIND_INTERNAL"]=1,W[Z[2]="SPAN_KIND_SERVER"]=2,W[Z[3]="SPAN_KIND_CLIENT"]=3,W[Z[4]="SPAN_KIND_PRODUCER"]=4,W[Z[5]="SPAN_KIND_CONSUMER"]=5,W}(),G.Event=function(){function Z(W){if(this.attributes=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.timeUnixNano=null,Z.prototype.name=null,Z.prototype.attributes=h.emptyArray,Z.prototype.droppedAttributesCount=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(9).fixed64(K.timeUnixNano);if(K.name!=null&&Object.hasOwnProperty.call(K,"name"))$.uint32(18).string(K.name);if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(26).fork()).ldelim();if(K.droppedAttributesCount!=null&&Object.hasOwnProperty.call(K,"droppedAttributesCount"))$.uint32(32).uint32(K.droppedAttributesCount);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.trace.v1.Span.Event;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.timeUnixNano=K.fixed64();break}case 2:{q.name=K.string();break}case 3:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 4:{q.droppedAttributesCount=K.uint32();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.name!=null&&K.hasOwnProperty("name")){if(!h.isString(K.name))return"name: string expected"}if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var $=0;$<K.attributes.length;++$){var H=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[$]);if(H)return"attributes."+H}}if(K.droppedAttributesCount!=null&&K.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(K.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.trace.v1.Span.Event)return K;var $=new f.opentelemetry.proto.trace.v1.Span.Event;if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.name!=null)$.name=String(K.name);if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.droppedAttributesCount!=null)$.droppedAttributesCount=K.droppedAttributesCount>>>0;return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.attributes=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;H.name="",H.droppedAttributesCount=0}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.name!=null&&K.hasOwnProperty("name"))H.name=K.name;if(K.attributes&&K.attributes.length){H.attributes=[];for(var q=0;q<K.attributes.length;++q)H.attributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[q],$)}if(K.droppedAttributesCount!=null&&K.hasOwnProperty("droppedAttributesCount"))H.droppedAttributesCount=K.droppedAttributesCount;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.trace.v1.Span.Event"},Z}(),G.Link=function(){function Z(W){if(this.attributes=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.traceId=null,Z.prototype.spanId=null,Z.prototype.traceState=null,Z.prototype.attributes=h.emptyArray,Z.prototype.droppedAttributesCount=null,Z.prototype.flags=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.traceId!=null&&Object.hasOwnProperty.call(K,"traceId"))$.uint32(10).bytes(K.traceId);if(K.spanId!=null&&Object.hasOwnProperty.call(K,"spanId"))$.uint32(18).bytes(K.spanId);if(K.traceState!=null&&Object.hasOwnProperty.call(K,"traceState"))$.uint32(26).string(K.traceState);if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(34).fork()).ldelim();if(K.droppedAttributesCount!=null&&Object.hasOwnProperty.call(K,"droppedAttributesCount"))$.uint32(40).uint32(K.droppedAttributesCount);if(K.flags!=null&&Object.hasOwnProperty.call(K,"flags"))$.uint32(53).fixed32(K.flags);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.trace.v1.Span.Link;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.traceId=K.bytes();break}case 2:{q.spanId=K.bytes();break}case 3:{q.traceState=K.string();break}case 4:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 5:{q.droppedAttributesCount=K.uint32();break}case 6:{q.flags=K.fixed32();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.traceId!=null&&K.hasOwnProperty("traceId")){if(!(K.traceId&&typeof K.traceId.length==="number"||h.isString(K.traceId)))return"traceId: buffer expected"}if(K.spanId!=null&&K.hasOwnProperty("spanId")){if(!(K.spanId&&typeof K.spanId.length==="number"||h.isString(K.spanId)))return"spanId: buffer expected"}if(K.traceState!=null&&K.hasOwnProperty("traceState")){if(!h.isString(K.traceState))return"traceState: string expected"}if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var $=0;$<K.attributes.length;++$){var H=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[$]);if(H)return"attributes."+H}}if(K.droppedAttributesCount!=null&&K.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(K.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(K.flags!=null&&K.hasOwnProperty("flags")){if(!h.isInteger(K.flags))return"flags: integer expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.trace.v1.Span.Link)return K;var $=new f.opentelemetry.proto.trace.v1.Span.Link;if(K.traceId!=null){if(typeof K.traceId==="string")h.base64.decode(K.traceId,$.traceId=h.newBuffer(h.base64.length(K.traceId)),0);else if(K.traceId.length>=0)$.traceId=K.traceId}if(K.spanId!=null){if(typeof K.spanId==="string")h.base64.decode(K.spanId,$.spanId=h.newBuffer(h.base64.length(K.spanId)),0);else if(K.spanId.length>=0)$.spanId=K.spanId}if(K.traceState!=null)$.traceState=String(K.traceState);if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.droppedAttributesCount!=null)$.droppedAttributesCount=K.droppedAttributesCount>>>0;if(K.flags!=null)$.flags=K.flags>>>0;return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.attributes=[];if($.defaults){if($.bytes===String)H.traceId="";else if(H.traceId=[],$.bytes!==Array)H.traceId=h.newBuffer(H.traceId);if($.bytes===String)H.spanId="";else if(H.spanId=[],$.bytes!==Array)H.spanId=h.newBuffer(H.spanId);H.traceState="",H.droppedAttributesCount=0,H.flags=0}if(K.traceId!=null&&K.hasOwnProperty("traceId"))H.traceId=$.bytes===String?h.base64.encode(K.traceId,0,K.traceId.length):$.bytes===Array?Array.prototype.slice.call(K.traceId):K.traceId;if(K.spanId!=null&&K.hasOwnProperty("spanId"))H.spanId=$.bytes===String?h.base64.encode(K.spanId,0,K.spanId.length):$.bytes===Array?Array.prototype.slice.call(K.spanId):K.spanId;if(K.traceState!=null&&K.hasOwnProperty("traceState"))H.traceState=K.traceState;if(K.attributes&&K.attributes.length){H.attributes=[];for(var F=0;F<K.attributes.length;++F)H.attributes[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[F],$)}if(K.droppedAttributesCount!=null&&K.hasOwnProperty("droppedAttributesCount"))H.droppedAttributesCount=K.droppedAttributesCount;if(K.flags!=null&&K.hasOwnProperty("flags"))H.flags=K.flags;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.trace.v1.Span.Link"},Z}(),G}(),J.Status=function(){function G(Z){if(Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.message=null,G.prototype.code=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.message!=null&&Object.hasOwnProperty.call(W,"message"))K.uint32(18).string(W.message);if(W.code!=null&&Object.hasOwnProperty.call(W,"code"))K.uint32(24).int32(W.code);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.Status;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 2:{F.message=W.string();break}case 3:{F.code=W.int32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.message!=null&&W.hasOwnProperty("message")){if(!h.isString(W.message))return"message: string expected"}if(W.code!=null&&W.hasOwnProperty("code"))switch(W.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.Status)return W;var K=new f.opentelemetry.proto.trace.v1.Status;if(W.message!=null)K.message=String(W.message);switch(W.code){default:if(typeof W.code==="number"){K.code=W.code;break}break;case"STATUS_CODE_UNSET":case 0:K.code=0;break;case"STATUS_CODE_OK":case 1:K.code=1;break;case"STATUS_CODE_ERROR":case 2:K.code=2;break}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.defaults)$.message="",$.code=K.enums===String?"STATUS_CODE_UNSET":0;if(W.message!=null&&W.hasOwnProperty("message"))$.message=W.message;if(W.code!=null&&W.hasOwnProperty("code"))$.code=K.enums===String?f.opentelemetry.proto.trace.v1.Status.StatusCode[W.code]===void 0?W.code:f.opentelemetry.proto.trace.v1.Status.StatusCode[W.code]:W.code;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.Status"},G.StatusCode=function(){var Z={},W=Object.create(Z);return W[Z[0]="STATUS_CODE_UNSET"]=0,W[Z[1]="STATUS_CODE_OK"]=1,W[Z[2]="STATUS_CODE_ERROR"]=2,W}(),G}(),J.SpanFlags=function(){var G={},Z=Object.create(G);return Z[G[0]="SPAN_FLAGS_DO_NOT_USE"]=0,Z[G[255]="SPAN_FLAGS_TRACE_FLAGS_MASK"]=255,Z[G[256]="SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK"]=256,Z[G[512]="SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK"]=512,Z}(),J}(),Y}(),X.collector=function(){var Y={};return Y.trace=function(){var J={};return J.v1=function(){var G={};return G.TraceService=function(){function Z(W,K,$){_4.rpc.Service.call(this,W,K,$)}return(Z.prototype=Object.create(_4.rpc.Service.prototype)).constructor=Z,Z.create=function(K,$,H){return new this(K,$,H)},Object.defineProperty(Z.prototype.export=function W(K,$){return this.rpcCall(W,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,K,$)},"name",{value:"Export"}),Z}(),G.ExportTraceServiceRequest=function(){function Z(W){if(this.resourceSpans=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.resourceSpans=h.emptyArray,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.resourceSpans!=null&&K.resourceSpans.length)for(var H=0;H<K.resourceSpans.length;++H)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(K.resourceSpans[H],$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{if(!(q.resourceSpans&&q.resourceSpans.length))q.resourceSpans=[];q.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(K,K.uint32()));break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.resourceSpans!=null&&K.hasOwnProperty("resourceSpans")){if(!Array.isArray(K.resourceSpans))return"resourceSpans: array expected";for(var $=0;$<K.resourceSpans.length;++$){var H=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(K.resourceSpans[$]);if(H)return"resourceSpans."+H}}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return K;var $=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(K.resourceSpans){if(!Array.isArray(K.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");$.resourceSpans=[];for(var H=0;H<K.resourceSpans.length;++H){if(typeof K.resourceSpans[H]!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");$.resourceSpans[H]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(K.resourceSpans[H])}}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.resourceSpans=[];if(K.resourceSpans&&K.resourceSpans.length){H.resourceSpans=[];for(var F=0;F<K.resourceSpans.length;++F)H.resourceSpans[F]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(K.resourceSpans[F],$)}return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},Z}(),G.ExportTraceServiceResponse=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.partialSuccess=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.partialSuccess!=null&&Object.hasOwnProperty.call(K,"partialSuccess"))f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(K.partialSuccess,$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(K,K.uint32());break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess")){var $=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(K.partialSuccess);if($)return"partialSuccess."+$}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return K;var $=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(K.partialSuccess!=null){if(typeof K.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");$.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(K.partialSuccess)}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults)H.partialSuccess=null;if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess"))H.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(K.partialSuccess,$);return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},Z}(),G.ExportTracePartialSuccess=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.rejectedSpans=null,Z.prototype.errorMessage=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.rejectedSpans!=null&&Object.hasOwnProperty.call(K,"rejectedSpans"))$.uint32(8).int64(K.rejectedSpans);if(K.errorMessage!=null&&Object.hasOwnProperty.call(K,"errorMessage"))$.uint32(18).string(K.errorMessage);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.rejectedSpans=K.int64();break}case 2:{q.errorMessage=K.string();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.rejectedSpans!=null&&K.hasOwnProperty("rejectedSpans")){if(!h.isInteger(K.rejectedSpans)&&!(K.rejectedSpans&&h.isInteger(K.rejectedSpans.low)&&h.isInteger(K.rejectedSpans.high)))return"rejectedSpans: integer|Long expected"}if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage")){if(!h.isString(K.errorMessage))return"errorMessage: string expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return K;var $=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;if(K.rejectedSpans!=null){if(h.Long)($.rejectedSpans=h.Long.fromValue(K.rejectedSpans)).unsigned=!1;else if(typeof K.rejectedSpans==="string")$.rejectedSpans=parseInt(K.rejectedSpans,10);else if(typeof K.rejectedSpans==="number")$.rejectedSpans=K.rejectedSpans;else if(typeof K.rejectedSpans==="object")$.rejectedSpans=new h.LongBits(K.rejectedSpans.low>>>0,K.rejectedSpans.high>>>0).toNumber()}if(K.errorMessage!=null)$.errorMessage=String(K.errorMessage);return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.rejectedSpans=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.rejectedSpans=$.longs===String?"0":0;H.errorMessage=""}if(K.rejectedSpans!=null&&K.hasOwnProperty("rejectedSpans"))if(typeof K.rejectedSpans==="number")H.rejectedSpans=$.longs===String?String(K.rejectedSpans):K.rejectedSpans;else H.rejectedSpans=$.longs===String?h.Long.prototype.toString.call(K.rejectedSpans):$.longs===Number?new h.LongBits(K.rejectedSpans.low>>>0,K.rejectedSpans.high>>>0).toNumber():K.rejectedSpans;if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage"))H.errorMessage=K.errorMessage;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},Z}(),G}(),J}(),Y.metrics=function(){var J={};return J.v1=function(){var G={};return G.MetricsService=function(){function Z(W,K,$){_4.rpc.Service.call(this,W,K,$)}return(Z.prototype=Object.create(_4.rpc.Service.prototype)).constructor=Z,Z.create=function(K,$,H){return new this(K,$,H)},Object.defineProperty(Z.prototype.export=function W(K,$){return this.rpcCall(W,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,K,$)},"name",{value:"Export"}),Z}(),G.ExportMetricsServiceRequest=function(){function Z(W){if(this.resourceMetrics=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.resourceMetrics=h.emptyArray,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.resourceMetrics!=null&&K.resourceMetrics.length)for(var H=0;H<K.resourceMetrics.length;++H)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(K.resourceMetrics[H],$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{if(!(q.resourceMetrics&&q.resourceMetrics.length))q.resourceMetrics=[];q.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(K,K.uint32()));break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.resourceMetrics!=null&&K.hasOwnProperty("resourceMetrics")){if(!Array.isArray(K.resourceMetrics))return"resourceMetrics: array expected";for(var $=0;$<K.resourceMetrics.length;++$){var H=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(K.resourceMetrics[$]);if(H)return"resourceMetrics."+H}}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return K;var $=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(K.resourceMetrics){if(!Array.isArray(K.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");$.resourceMetrics=[];for(var H=0;H<K.resourceMetrics.length;++H){if(typeof K.resourceMetrics[H]!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");$.resourceMetrics[H]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(K.resourceMetrics[H])}}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.resourceMetrics=[];if(K.resourceMetrics&&K.resourceMetrics.length){H.resourceMetrics=[];for(var F=0;F<K.resourceMetrics.length;++F)H.resourceMetrics[F]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(K.resourceMetrics[F],$)}return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},Z}(),G.ExportMetricsServiceResponse=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.partialSuccess=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.partialSuccess!=null&&Object.hasOwnProperty.call(K,"partialSuccess"))f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(K.partialSuccess,$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(K,K.uint32());break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess")){var $=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(K.partialSuccess);if($)return"partialSuccess."+$}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return K;var $=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(K.partialSuccess!=null){if(typeof K.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");$.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(K.partialSuccess)}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults)H.partialSuccess=null;if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess"))H.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(K.partialSuccess,$);return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},Z}(),G.ExportMetricsPartialSuccess=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.rejectedDataPoints=null,Z.prototype.errorMessage=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.rejectedDataPoints!=null&&Object.hasOwnProperty.call(K,"rejectedDataPoints"))$.uint32(8).int64(K.rejectedDataPoints);if(K.errorMessage!=null&&Object.hasOwnProperty.call(K,"errorMessage"))$.uint32(18).string(K.errorMessage);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.rejectedDataPoints=K.int64();break}case 2:{q.errorMessage=K.string();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.rejectedDataPoints!=null&&K.hasOwnProperty("rejectedDataPoints")){if(!h.isInteger(K.rejectedDataPoints)&&!(K.rejectedDataPoints&&h.isInteger(K.rejectedDataPoints.low)&&h.isInteger(K.rejectedDataPoints.high)))return"rejectedDataPoints: integer|Long expected"}if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage")){if(!h.isString(K.errorMessage))return"errorMessage: string expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return K;var $=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;if(K.rejectedDataPoints!=null){if(h.Long)($.rejectedDataPoints=h.Long.fromValue(K.rejectedDataPoints)).unsigned=!1;else if(typeof K.rejectedDataPoints==="string")$.rejectedDataPoints=parseInt(K.rejectedDataPoints,10);else if(typeof K.rejectedDataPoints==="number")$.rejectedDataPoints=K.rejectedDataPoints;else if(typeof K.rejectedDataPoints==="object")$.rejectedDataPoints=new h.LongBits(K.rejectedDataPoints.low>>>0,K.rejectedDataPoints.high>>>0).toNumber()}if(K.errorMessage!=null)$.errorMessage=String(K.errorMessage);return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.rejectedDataPoints=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.rejectedDataPoints=$.longs===String?"0":0;H.errorMessage=""}if(K.rejectedDataPoints!=null&&K.hasOwnProperty("rejectedDataPoints"))if(typeof K.rejectedDataPoints==="number")H.rejectedDataPoints=$.longs===String?String(K.rejectedDataPoints):K.rejectedDataPoints;else H.rejectedDataPoints=$.longs===String?h.Long.prototype.toString.call(K.rejectedDataPoints):$.longs===Number?new h.LongBits(K.rejectedDataPoints.low>>>0,K.rejectedDataPoints.high>>>0).toNumber():K.rejectedDataPoints;if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage"))H.errorMessage=K.errorMessage;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},Z}(),G}(),J}(),Y.logs=function(){var J={};return J.v1=function(){var G={};return G.LogsService=function(){function Z(W,K,$){_4.rpc.Service.call(this,W,K,$)}return(Z.prototype=Object.create(_4.rpc.Service.prototype)).constructor=Z,Z.create=function(K,$,H){return new this(K,$,H)},Object.defineProperty(Z.prototype.export=function W(K,$){return this.rpcCall(W,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,K,$)},"name",{value:"Export"}),Z}(),G.ExportLogsServiceRequest=function(){function Z(W){if(this.resourceLogs=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.resourceLogs=h.emptyArray,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.resourceLogs!=null&&K.resourceLogs.length)for(var H=0;H<K.resourceLogs.length;++H)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(K.resourceLogs[H],$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{if(!(q.resourceLogs&&q.resourceLogs.length))q.resourceLogs=[];q.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(K,K.uint32()));break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.resourceLogs!=null&&K.hasOwnProperty("resourceLogs")){if(!Array.isArray(K.resourceLogs))return"resourceLogs: array expected";for(var $=0;$<K.resourceLogs.length;++$){var H=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(K.resourceLogs[$]);if(H)return"resourceLogs."+H}}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return K;var $=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(K.resourceLogs){if(!Array.isArray(K.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");$.resourceLogs=[];for(var H=0;H<K.resourceLogs.length;++H){if(typeof K.resourceLogs[H]!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");$.resourceLogs[H]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(K.resourceLogs[H])}}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.resourceLogs=[];if(K.resourceLogs&&K.resourceLogs.length){H.resourceLogs=[];for(var F=0;F<K.resourceLogs.length;++F)H.resourceLogs[F]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(K.resourceLogs[F],$)}return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},Z}(),G.ExportLogsServiceResponse=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.partialSuccess=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.partialSuccess!=null&&Object.hasOwnProperty.call(K,"partialSuccess"))f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(K.partialSuccess,$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(K,K.uint32());break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess")){var $=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(K.partialSuccess);if($)return"partialSuccess."+$}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return K;var $=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(K.partialSuccess!=null){if(typeof K.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");$.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(K.partialSuccess)}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults)H.partialSuccess=null;if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess"))H.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(K.partialSuccess,$);return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},Z}(),G.ExportLogsPartialSuccess=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.rejectedLogRecords=null,Z.prototype.errorMessage=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.rejectedLogRecords!=null&&Object.hasOwnProperty.call(K,"rejectedLogRecords"))$.uint32(8).int64(K.rejectedLogRecords);if(K.errorMessage!=null&&Object.hasOwnProperty.call(K,"errorMessage"))$.uint32(18).string(K.errorMessage);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.rejectedLogRecords=K.int64();break}case 2:{q.errorMessage=K.string();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.rejectedLogRecords!=null&&K.hasOwnProperty("rejectedLogRecords")){if(!h.isInteger(K.rejectedLogRecords)&&!(K.rejectedLogRecords&&h.isInteger(K.rejectedLogRecords.low)&&h.isInteger(K.rejectedLogRecords.high)))return"rejectedLogRecords: integer|Long expected"}if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage")){if(!h.isString(K.errorMessage))return"errorMessage: string expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return K;var $=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;if(K.rejectedLogRecords!=null){if(h.Long)($.rejectedLogRecords=h.Long.fromValue(K.rejectedLogRecords)).unsigned=!1;else if(typeof K.rejectedLogRecords==="string")$.rejectedLogRecords=parseInt(K.rejectedLogRecords,10);else if(typeof K.rejectedLogRecords==="number")$.rejectedLogRecords=K.rejectedLogRecords;else if(typeof K.rejectedLogRecords==="object")$.rejectedLogRecords=new h.LongBits(K.rejectedLogRecords.low>>>0,K.rejectedLogRecords.high>>>0).toNumber()}if(K.errorMessage!=null)$.errorMessage=String(K.errorMessage);return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.rejectedLogRecords=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.rejectedLogRecords=$.longs===String?"0":0;H.errorMessage=""}if(K.rejectedLogRecords!=null&&K.hasOwnProperty("rejectedLogRecords"))if(typeof K.rejectedLogRecords==="number")H.rejectedLogRecords=$.longs===String?String(K.rejectedLogRecords):K.rejectedLogRecords;else H.rejectedLogRecords=$.longs===String?h.Long.prototype.toString.call(K.rejectedLogRecords):$.longs===Number?new h.LongBits(K.rejectedLogRecords.low>>>0,K.rejectedLogRecords.high>>>0).toNumber():K.rejectedLogRecords;if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage"))H.errorMessage=K.errorMessage;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},Z}(),G}(),J}(),Y}(),X.metrics=function(){var Y={};return Y.v1=function(){var J={};return J.MetricsData=function(){function G(Z){if(this.resourceMetrics=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resourceMetrics=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resourceMetrics!=null&&W.resourceMetrics.length)for(var $=0;$<W.resourceMetrics.length;++$)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(W.resourceMetrics[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.MetricsData;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.resourceMetrics&&F.resourceMetrics.length))F.resourceMetrics=[];F.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resourceMetrics!=null&&W.hasOwnProperty("resourceMetrics")){if(!Array.isArray(W.resourceMetrics))return"resourceMetrics: array expected";for(var K=0;K<W.resourceMetrics.length;++K){var $=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(W.resourceMetrics[K]);if($)return"resourceMetrics."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.MetricsData)return W;var K=new f.opentelemetry.proto.metrics.v1.MetricsData;if(W.resourceMetrics){if(!Array.isArray(W.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");K.resourceMetrics=[];for(var $=0;$<W.resourceMetrics.length;++$){if(typeof W.resourceMetrics[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");K.resourceMetrics[$]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(W.resourceMetrics[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.resourceMetrics=[];if(W.resourceMetrics&&W.resourceMetrics.length){$.resourceMetrics=[];for(var H=0;H<W.resourceMetrics.length;++H)$.resourceMetrics[H]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(W.resourceMetrics[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.MetricsData"},G}(),J.ResourceMetrics=function(){function G(Z){if(this.scopeMetrics=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resource=null,G.prototype.scopeMetrics=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resource!=null&&Object.hasOwnProperty.call(W,"resource"))f.opentelemetry.proto.resource.v1.Resource.encode(W.resource,K.uint32(10).fork()).ldelim();if(W.scopeMetrics!=null&&W.scopeMetrics.length)for(var $=0;$<W.scopeMetrics.length;++$)f.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(W.scopeMetrics[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.resource=f.opentelemetry.proto.resource.v1.Resource.decode(W,W.uint32());break}case 2:{if(!(F.scopeMetrics&&F.scopeMetrics.length))F.scopeMetrics=[];F.scopeMetrics.push(f.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resource!=null&&W.hasOwnProperty("resource")){var K=f.opentelemetry.proto.resource.v1.Resource.verify(W.resource);if(K)return"resource."+K}if(W.scopeMetrics!=null&&W.hasOwnProperty("scopeMetrics")){if(!Array.isArray(W.scopeMetrics))return"scopeMetrics: array expected";for(var $=0;$<W.scopeMetrics.length;++$){var K=f.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(W.scopeMetrics[$]);if(K)return"scopeMetrics."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.ResourceMetrics)return W;var K=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;if(W.resource!=null){if(typeof W.resource!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");K.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(W.resource)}if(W.scopeMetrics){if(!Array.isArray(W.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");K.scopeMetrics=[];for(var $=0;$<W.scopeMetrics.length;++$){if(typeof W.scopeMetrics[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");K.scopeMetrics[$]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(W.scopeMetrics[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.scopeMetrics=[];if(K.defaults)$.resource=null,$.schemaUrl="";if(W.resource!=null&&W.hasOwnProperty("resource"))$.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(W.resource,K);if(W.scopeMetrics&&W.scopeMetrics.length){$.scopeMetrics=[];for(var H=0;H<W.scopeMetrics.length;++H)$.scopeMetrics[H]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(W.scopeMetrics[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},G}(),J.ScopeMetrics=function(){function G(Z){if(this.metrics=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.scope=null,G.prototype.metrics=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.scope!=null&&Object.hasOwnProperty.call(W,"scope"))f.opentelemetry.proto.common.v1.InstrumentationScope.encode(W.scope,K.uint32(10).fork()).ldelim();if(W.metrics!=null&&W.metrics.length)for(var $=0;$<W.metrics.length;++$)f.opentelemetry.proto.metrics.v1.Metric.encode(W.metrics[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(W,W.uint32());break}case 2:{if(!(F.metrics&&F.metrics.length))F.metrics=[];F.metrics.push(f.opentelemetry.proto.metrics.v1.Metric.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.scope!=null&&W.hasOwnProperty("scope")){var K=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(W.scope);if(K)return"scope."+K}if(W.metrics!=null&&W.hasOwnProperty("metrics")){if(!Array.isArray(W.metrics))return"metrics: array expected";for(var $=0;$<W.metrics.length;++$){var K=f.opentelemetry.proto.metrics.v1.Metric.verify(W.metrics[$]);if(K)return"metrics."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.ScopeMetrics)return W;var K=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;if(W.scope!=null){if(typeof W.scope!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");K.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(W.scope)}if(W.metrics){if(!Array.isArray(W.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");K.metrics=[];for(var $=0;$<W.metrics.length;++$){if(typeof W.metrics[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");K.metrics[$]=f.opentelemetry.proto.metrics.v1.Metric.fromObject(W.metrics[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.metrics=[];if(K.defaults)$.scope=null,$.schemaUrl="";if(W.scope!=null&&W.hasOwnProperty("scope"))$.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(W.scope,K);if(W.metrics&&W.metrics.length){$.metrics=[];for(var H=0;H<W.metrics.length;++H)$.metrics[H]=f.opentelemetry.proto.metrics.v1.Metric.toObject(W.metrics[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},G}(),J.Metric=function(){function G(W){if(this.metadata=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.name=null,G.prototype.description=null,G.prototype.unit=null,G.prototype.gauge=null,G.prototype.sum=null,G.prototype.histogram=null,G.prototype.exponentialHistogram=null,G.prototype.summary=null,G.prototype.metadata=h.emptyArray;var Z;return Object.defineProperty(G.prototype,"data",{get:h.oneOfGetter(Z=["gauge","sum","histogram","exponentialHistogram","summary"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.name!=null&&Object.hasOwnProperty.call(K,"name"))$.uint32(10).string(K.name);if(K.description!=null&&Object.hasOwnProperty.call(K,"description"))$.uint32(18).string(K.description);if(K.unit!=null&&Object.hasOwnProperty.call(K,"unit"))$.uint32(26).string(K.unit);if(K.gauge!=null&&Object.hasOwnProperty.call(K,"gauge"))f.opentelemetry.proto.metrics.v1.Gauge.encode(K.gauge,$.uint32(42).fork()).ldelim();if(K.sum!=null&&Object.hasOwnProperty.call(K,"sum"))f.opentelemetry.proto.metrics.v1.Sum.encode(K.sum,$.uint32(58).fork()).ldelim();if(K.histogram!=null&&Object.hasOwnProperty.call(K,"histogram"))f.opentelemetry.proto.metrics.v1.Histogram.encode(K.histogram,$.uint32(74).fork()).ldelim();if(K.exponentialHistogram!=null&&Object.hasOwnProperty.call(K,"exponentialHistogram"))f.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(K.exponentialHistogram,$.uint32(82).fork()).ldelim();if(K.summary!=null&&Object.hasOwnProperty.call(K,"summary"))f.opentelemetry.proto.metrics.v1.Summary.encode(K.summary,$.uint32(90).fork()).ldelim();if(K.metadata!=null&&K.metadata.length)for(var H=0;H<K.metadata.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.metadata[H],$.uint32(98).fork()).ldelim();return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.Metric;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.name=K.string();break}case 2:{q.description=K.string();break}case 3:{q.unit=K.string();break}case 5:{q.gauge=f.opentelemetry.proto.metrics.v1.Gauge.decode(K,K.uint32());break}case 7:{q.sum=f.opentelemetry.proto.metrics.v1.Sum.decode(K,K.uint32());break}case 9:{q.histogram=f.opentelemetry.proto.metrics.v1.Histogram.decode(K,K.uint32());break}case 10:{q.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(K,K.uint32());break}case 11:{q.summary=f.opentelemetry.proto.metrics.v1.Summary.decode(K,K.uint32());break}case 12:{if(!(q.metadata&&q.metadata.length))q.metadata=[];q.metadata.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.name!=null&&K.hasOwnProperty("name")){if(!h.isString(K.name))return"name: string expected"}if(K.description!=null&&K.hasOwnProperty("description")){if(!h.isString(K.description))return"description: string expected"}if(K.unit!=null&&K.hasOwnProperty("unit")){if(!h.isString(K.unit))return"unit: string expected"}if(K.gauge!=null&&K.hasOwnProperty("gauge")){$.data=1;{var H=f.opentelemetry.proto.metrics.v1.Gauge.verify(K.gauge);if(H)return"gauge."+H}}if(K.sum!=null&&K.hasOwnProperty("sum")){if($.data===1)return"data: multiple values";$.data=1;{var H=f.opentelemetry.proto.metrics.v1.Sum.verify(K.sum);if(H)return"sum."+H}}if(K.histogram!=null&&K.hasOwnProperty("histogram")){if($.data===1)return"data: multiple values";$.data=1;{var H=f.opentelemetry.proto.metrics.v1.Histogram.verify(K.histogram);if(H)return"histogram."+H}}if(K.exponentialHistogram!=null&&K.hasOwnProperty("exponentialHistogram")){if($.data===1)return"data: multiple values";$.data=1;{var H=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(K.exponentialHistogram);if(H)return"exponentialHistogram."+H}}if(K.summary!=null&&K.hasOwnProperty("summary")){if($.data===1)return"data: multiple values";$.data=1;{var H=f.opentelemetry.proto.metrics.v1.Summary.verify(K.summary);if(H)return"summary."+H}}if(K.metadata!=null&&K.hasOwnProperty("metadata")){if(!Array.isArray(K.metadata))return"metadata: array expected";for(var F=0;F<K.metadata.length;++F){var H=f.opentelemetry.proto.common.v1.KeyValue.verify(K.metadata[F]);if(H)return"metadata."+H}}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.Metric)return K;var $=new f.opentelemetry.proto.metrics.v1.Metric;if(K.name!=null)$.name=String(K.name);if(K.description!=null)$.description=String(K.description);if(K.unit!=null)$.unit=String(K.unit);if(K.gauge!=null){if(typeof K.gauge!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");$.gauge=f.opentelemetry.proto.metrics.v1.Gauge.fromObject(K.gauge)}if(K.sum!=null){if(typeof K.sum!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");$.sum=f.opentelemetry.proto.metrics.v1.Sum.fromObject(K.sum)}if(K.histogram!=null){if(typeof K.histogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");$.histogram=f.opentelemetry.proto.metrics.v1.Histogram.fromObject(K.histogram)}if(K.exponentialHistogram!=null){if(typeof K.exponentialHistogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");$.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(K.exponentialHistogram)}if(K.summary!=null){if(typeof K.summary!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");$.summary=f.opentelemetry.proto.metrics.v1.Summary.fromObject(K.summary)}if(K.metadata){if(!Array.isArray(K.metadata))throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: array expected");$.metadata=[];for(var H=0;H<K.metadata.length;++H){if(typeof K.metadata[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: object expected");$.metadata[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.metadata[H])}}return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.metadata=[];if($.defaults)H.name="",H.description="",H.unit="";if(K.name!=null&&K.hasOwnProperty("name"))H.name=K.name;if(K.description!=null&&K.hasOwnProperty("description"))H.description=K.description;if(K.unit!=null&&K.hasOwnProperty("unit"))H.unit=K.unit;if(K.gauge!=null&&K.hasOwnProperty("gauge")){if(H.gauge=f.opentelemetry.proto.metrics.v1.Gauge.toObject(K.gauge,$),$.oneofs)H.data="gauge"}if(K.sum!=null&&K.hasOwnProperty("sum")){if(H.sum=f.opentelemetry.proto.metrics.v1.Sum.toObject(K.sum,$),$.oneofs)H.data="sum"}if(K.histogram!=null&&K.hasOwnProperty("histogram")){if(H.histogram=f.opentelemetry.proto.metrics.v1.Histogram.toObject(K.histogram,$),$.oneofs)H.data="histogram"}if(K.exponentialHistogram!=null&&K.hasOwnProperty("exponentialHistogram")){if(H.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(K.exponentialHistogram,$),$.oneofs)H.data="exponentialHistogram"}if(K.summary!=null&&K.hasOwnProperty("summary")){if(H.summary=f.opentelemetry.proto.metrics.v1.Summary.toObject(K.summary,$),$.oneofs)H.data="summary"}if(K.metadata&&K.metadata.length){H.metadata=[];for(var F=0;F<K.metadata.length;++F)H.metadata[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.metadata[F],$)}return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.Metric"},G}(),J.Gauge=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.Gauge;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.Gauge)return W;var K=new f.opentelemetry.proto.metrics.v1.Gauge;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(W.dataPoints[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(W.dataPoints[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.Gauge"},G}(),J.Sum=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.prototype.aggregationTemporality=null,G.prototype.isMonotonic=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();if(W.aggregationTemporality!=null&&Object.hasOwnProperty.call(W,"aggregationTemporality"))K.uint32(16).int32(W.aggregationTemporality);if(W.isMonotonic!=null&&Object.hasOwnProperty.call(W,"isMonotonic"))K.uint32(24).bool(W.isMonotonic);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.Sum;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(W,W.uint32()));break}case 2:{F.aggregationTemporality=W.int32();break}case 3:{F.isMonotonic=W.bool();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))switch(W.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}if(W.isMonotonic!=null&&W.hasOwnProperty("isMonotonic")){if(typeof W.isMonotonic!=="boolean")return"isMonotonic: boolean expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.Sum)return W;var K=new f.opentelemetry.proto.metrics.v1.Sum;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(W.dataPoints[$])}}switch(W.aggregationTemporality){default:if(typeof W.aggregationTemporality==="number"){K.aggregationTemporality=W.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:K.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:K.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:K.aggregationTemporality=2;break}if(W.isMonotonic!=null)K.isMonotonic=Boolean(W.isMonotonic);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(K.defaults)$.aggregationTemporality=K.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,$.isMonotonic=!1;if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(W.dataPoints[H],K)}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))$.aggregationTemporality=K.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]===void 0?W.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]:W.aggregationTemporality;if(W.isMonotonic!=null&&W.hasOwnProperty("isMonotonic"))$.isMonotonic=W.isMonotonic;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.Sum"},G}(),J.Histogram=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.prototype.aggregationTemporality=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();if(W.aggregationTemporality!=null&&Object.hasOwnProperty.call(W,"aggregationTemporality"))K.uint32(16).int32(W.aggregationTemporality);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.Histogram;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(W,W.uint32()));break}case 2:{F.aggregationTemporality=W.int32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))switch(W.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.Histogram)return W;var K=new f.opentelemetry.proto.metrics.v1.Histogram;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(W.dataPoints[$])}}switch(W.aggregationTemporality){default:if(typeof W.aggregationTemporality==="number"){K.aggregationTemporality=W.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:K.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:K.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:K.aggregationTemporality=2;break}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(K.defaults)$.aggregationTemporality=K.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(W.dataPoints[H],K)}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))$.aggregationTemporality=K.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]===void 0?W.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]:W.aggregationTemporality;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.Histogram"},G}(),J.ExponentialHistogram=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.prototype.aggregationTemporality=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();if(W.aggregationTemporality!=null&&Object.hasOwnProperty.call(W,"aggregationTemporality"))K.uint32(16).int32(W.aggregationTemporality);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(W,W.uint32()));break}case 2:{F.aggregationTemporality=W.int32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))switch(W.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogram)return W;var K=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(W.dataPoints[$])}}switch(W.aggregationTemporality){default:if(typeof W.aggregationTemporality==="number"){K.aggregationTemporality=W.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:K.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:K.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:K.aggregationTemporality=2;break}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(K.defaults)$.aggregationTemporality=K.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(W.dataPoints[H],K)}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))$.aggregationTemporality=K.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]===void 0?W.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]:W.aggregationTemporality;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},G}(),J.Summary=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.Summary;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.Summary)return W;var K=new f.opentelemetry.proto.metrics.v1.Summary;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(W.dataPoints[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(W.dataPoints[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.Summary"},G}(),J.AggregationTemporality=function(){var G={},Z=Object.create(G);return Z[G[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,Z[G[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,Z[G[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,Z}(),J.DataPointFlags=function(){var G={},Z=Object.create(G);return Z[G[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,Z[G[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,Z}(),J.NumberDataPoint=function(){function G(W){if(this.attributes=[],this.exemplars=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.attributes=h.emptyArray,G.prototype.startTimeUnixNano=null,G.prototype.timeUnixNano=null,G.prototype.asDouble=null,G.prototype.asInt=null,G.prototype.exemplars=h.emptyArray,G.prototype.flags=null;var Z;return Object.defineProperty(G.prototype,"value",{get:h.oneOfGetter(Z=["asDouble","asInt"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.startTimeUnixNano!=null&&Object.hasOwnProperty.call(K,"startTimeUnixNano"))$.uint32(17).fixed64(K.startTimeUnixNano);if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(25).fixed64(K.timeUnixNano);if(K.asDouble!=null&&Object.hasOwnProperty.call(K,"asDouble"))$.uint32(33).double(K.asDouble);if(K.exemplars!=null&&K.exemplars.length)for(var H=0;H<K.exemplars.length;++H)f.opentelemetry.proto.metrics.v1.Exemplar.encode(K.exemplars[H],$.uint32(42).fork()).ldelim();if(K.asInt!=null&&Object.hasOwnProperty.call(K,"asInt"))$.uint32(49).sfixed64(K.asInt);if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(58).fork()).ldelim();if(K.flags!=null&&Object.hasOwnProperty.call(K,"flags"))$.uint32(64).uint32(K.flags);return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 7:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 2:{q.startTimeUnixNano=K.fixed64();break}case 3:{q.timeUnixNano=K.fixed64();break}case 4:{q.asDouble=K.double();break}case 6:{q.asInt=K.sfixed64();break}case 5:{if(!(q.exemplars&&q.exemplars.length))q.exemplars=[];q.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(K,K.uint32()));break}case 8:{q.flags=K.uint32();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var H=0;H<K.attributes.length;++H){var F=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[H]);if(F)return"attributes."+F}}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(K.startTimeUnixNano)&&!(K.startTimeUnixNano&&h.isInteger(K.startTimeUnixNano.low)&&h.isInteger(K.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.asDouble!=null&&K.hasOwnProperty("asDouble")){if($.value=1,typeof K.asDouble!=="number")return"asDouble: number expected"}if(K.asInt!=null&&K.hasOwnProperty("asInt")){if($.value===1)return"value: multiple values";if($.value=1,!h.isInteger(K.asInt)&&!(K.asInt&&h.isInteger(K.asInt.low)&&h.isInteger(K.asInt.high)))return"asInt: integer|Long expected"}if(K.exemplars!=null&&K.hasOwnProperty("exemplars")){if(!Array.isArray(K.exemplars))return"exemplars: array expected";for(var H=0;H<K.exemplars.length;++H){var F=f.opentelemetry.proto.metrics.v1.Exemplar.verify(K.exemplars[H]);if(F)return"exemplars."+F}}if(K.flags!=null&&K.hasOwnProperty("flags")){if(!h.isInteger(K.flags))return"flags: integer expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.NumberDataPoint)return K;var $=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.startTimeUnixNano!=null){if(h.Long)($.startTimeUnixNano=h.Long.fromValue(K.startTimeUnixNano)).unsigned=!1;else if(typeof K.startTimeUnixNano==="string")$.startTimeUnixNano=parseInt(K.startTimeUnixNano,10);else if(typeof K.startTimeUnixNano==="number")$.startTimeUnixNano=K.startTimeUnixNano;else if(typeof K.startTimeUnixNano==="object")$.startTimeUnixNano=new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber()}if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.asDouble!=null)$.asDouble=Number(K.asDouble);if(K.asInt!=null){if(h.Long)($.asInt=h.Long.fromValue(K.asInt)).unsigned=!1;else if(typeof K.asInt==="string")$.asInt=parseInt(K.asInt,10);else if(typeof K.asInt==="number")$.asInt=K.asInt;else if(typeof K.asInt==="object")$.asInt=new h.LongBits(K.asInt.low>>>0,K.asInt.high>>>0).toNumber()}if(K.exemplars){if(!Array.isArray(K.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");$.exemplars=[];for(var H=0;H<K.exemplars.length;++H){if(typeof K.exemplars[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");$.exemplars[H]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(K.exemplars[H])}}if(K.flags!=null)$.flags=K.flags>>>0;return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.exemplars=[],H.attributes=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.startTimeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.startTimeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;H.flags=0}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano"))if(typeof K.startTimeUnixNano==="number")H.startTimeUnixNano=$.longs===String?String(K.startTimeUnixNano):K.startTimeUnixNano;else H.startTimeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.startTimeUnixNano):$.longs===Number?new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber():K.startTimeUnixNano;if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.asDouble!=null&&K.hasOwnProperty("asDouble")){if(H.asDouble=$.json&&!isFinite(K.asDouble)?String(K.asDouble):K.asDouble,$.oneofs)H.value="asDouble"}if(K.exemplars&&K.exemplars.length){H.exemplars=[];for(var q=0;q<K.exemplars.length;++q)H.exemplars[q]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(K.exemplars[q],$)}if(K.asInt!=null&&K.hasOwnProperty("asInt")){if(typeof K.asInt==="number")H.asInt=$.longs===String?String(K.asInt):K.asInt;else H.asInt=$.longs===String?h.Long.prototype.toString.call(K.asInt):$.longs===Number?new h.LongBits(K.asInt.low>>>0,K.asInt.high>>>0).toNumber():K.asInt;if($.oneofs)H.value="asInt"}if(K.attributes&&K.attributes.length){H.attributes=[];for(var q=0;q<K.attributes.length;++q)H.attributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[q],$)}if(K.flags!=null&&K.hasOwnProperty("flags"))H.flags=K.flags;return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},G}(),J.HistogramDataPoint=function(){function G(W){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.attributes=h.emptyArray,G.prototype.startTimeUnixNano=null,G.prototype.timeUnixNano=null,G.prototype.count=null,G.prototype.sum=null,G.prototype.bucketCounts=h.emptyArray,G.prototype.explicitBounds=h.emptyArray,G.prototype.exemplars=h.emptyArray,G.prototype.flags=null,G.prototype.min=null,G.prototype.max=null;var Z;return Object.defineProperty(G.prototype,"_sum",{get:h.oneOfGetter(Z=["sum"]),set:h.oneOfSetter(Z)}),Object.defineProperty(G.prototype,"_min",{get:h.oneOfGetter(Z=["min"]),set:h.oneOfSetter(Z)}),Object.defineProperty(G.prototype,"_max",{get:h.oneOfGetter(Z=["max"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.startTimeUnixNano!=null&&Object.hasOwnProperty.call(K,"startTimeUnixNano"))$.uint32(17).fixed64(K.startTimeUnixNano);if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(25).fixed64(K.timeUnixNano);if(K.count!=null&&Object.hasOwnProperty.call(K,"count"))$.uint32(33).fixed64(K.count);if(K.sum!=null&&Object.hasOwnProperty.call(K,"sum"))$.uint32(41).double(K.sum);if(K.bucketCounts!=null&&K.bucketCounts.length){$.uint32(50).fork();for(var H=0;H<K.bucketCounts.length;++H)$.fixed64(K.bucketCounts[H]);$.ldelim()}if(K.explicitBounds!=null&&K.explicitBounds.length){$.uint32(58).fork();for(var H=0;H<K.explicitBounds.length;++H)$.double(K.explicitBounds[H]);$.ldelim()}if(K.exemplars!=null&&K.exemplars.length)for(var H=0;H<K.exemplars.length;++H)f.opentelemetry.proto.metrics.v1.Exemplar.encode(K.exemplars[H],$.uint32(66).fork()).ldelim();if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(74).fork()).ldelim();if(K.flags!=null&&Object.hasOwnProperty.call(K,"flags"))$.uint32(80).uint32(K.flags);if(K.min!=null&&Object.hasOwnProperty.call(K,"min"))$.uint32(89).double(K.min);if(K.max!=null&&Object.hasOwnProperty.call(K,"max"))$.uint32(97).double(K.max);return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 9:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 2:{q.startTimeUnixNano=K.fixed64();break}case 3:{q.timeUnixNano=K.fixed64();break}case 4:{q.count=K.fixed64();break}case 5:{q.sum=K.double();break}case 6:{if(!(q.bucketCounts&&q.bucketCounts.length))q.bucketCounts=[];if((V&7)===2){var U=K.uint32()+K.pos;while(K.pos<U)q.bucketCounts.push(K.fixed64())}else q.bucketCounts.push(K.fixed64());break}case 7:{if(!(q.explicitBounds&&q.explicitBounds.length))q.explicitBounds=[];if((V&7)===2){var U=K.uint32()+K.pos;while(K.pos<U)q.explicitBounds.push(K.double())}else q.explicitBounds.push(K.double());break}case 8:{if(!(q.exemplars&&q.exemplars.length))q.exemplars=[];q.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(K,K.uint32()));break}case 10:{q.flags=K.uint32();break}case 11:{q.min=K.double();break}case 12:{q.max=K.double();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var H=0;H<K.attributes.length;++H){var F=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[H]);if(F)return"attributes."+F}}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(K.startTimeUnixNano)&&!(K.startTimeUnixNano&&h.isInteger(K.startTimeUnixNano.low)&&h.isInteger(K.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.count!=null&&K.hasOwnProperty("count")){if(!h.isInteger(K.count)&&!(K.count&&h.isInteger(K.count.low)&&h.isInteger(K.count.high)))return"count: integer|Long expected"}if(K.sum!=null&&K.hasOwnProperty("sum")){if($._sum=1,typeof K.sum!=="number")return"sum: number expected"}if(K.bucketCounts!=null&&K.hasOwnProperty("bucketCounts")){if(!Array.isArray(K.bucketCounts))return"bucketCounts: array expected";for(var H=0;H<K.bucketCounts.length;++H)if(!h.isInteger(K.bucketCounts[H])&&!(K.bucketCounts[H]&&h.isInteger(K.bucketCounts[H].low)&&h.isInteger(K.bucketCounts[H].high)))return"bucketCounts: integer|Long[] expected"}if(K.explicitBounds!=null&&K.hasOwnProperty("explicitBounds")){if(!Array.isArray(K.explicitBounds))return"explicitBounds: array expected";for(var H=0;H<K.explicitBounds.length;++H)if(typeof K.explicitBounds[H]!=="number")return"explicitBounds: number[] expected"}if(K.exemplars!=null&&K.hasOwnProperty("exemplars")){if(!Array.isArray(K.exemplars))return"exemplars: array expected";for(var H=0;H<K.exemplars.length;++H){var F=f.opentelemetry.proto.metrics.v1.Exemplar.verify(K.exemplars[H]);if(F)return"exemplars."+F}}if(K.flags!=null&&K.hasOwnProperty("flags")){if(!h.isInteger(K.flags))return"flags: integer expected"}if(K.min!=null&&K.hasOwnProperty("min")){if($._min=1,typeof K.min!=="number")return"min: number expected"}if(K.max!=null&&K.hasOwnProperty("max")){if($._max=1,typeof K.max!=="number")return"max: number expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.HistogramDataPoint)return K;var $=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.startTimeUnixNano!=null){if(h.Long)($.startTimeUnixNano=h.Long.fromValue(K.startTimeUnixNano)).unsigned=!1;else if(typeof K.startTimeUnixNano==="string")$.startTimeUnixNano=parseInt(K.startTimeUnixNano,10);else if(typeof K.startTimeUnixNano==="number")$.startTimeUnixNano=K.startTimeUnixNano;else if(typeof K.startTimeUnixNano==="object")$.startTimeUnixNano=new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber()}if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.count!=null){if(h.Long)($.count=h.Long.fromValue(K.count)).unsigned=!1;else if(typeof K.count==="string")$.count=parseInt(K.count,10);else if(typeof K.count==="number")$.count=K.count;else if(typeof K.count==="object")$.count=new h.LongBits(K.count.low>>>0,K.count.high>>>0).toNumber()}if(K.sum!=null)$.sum=Number(K.sum);if(K.bucketCounts){if(!Array.isArray(K.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");$.bucketCounts=[];for(var H=0;H<K.bucketCounts.length;++H)if(h.Long)($.bucketCounts[H]=h.Long.fromValue(K.bucketCounts[H])).unsigned=!1;else if(typeof K.bucketCounts[H]==="string")$.bucketCounts[H]=parseInt(K.bucketCounts[H],10);else if(typeof K.bucketCounts[H]==="number")$.bucketCounts[H]=K.bucketCounts[H];else if(typeof K.bucketCounts[H]==="object")$.bucketCounts[H]=new h.LongBits(K.bucketCounts[H].low>>>0,K.bucketCounts[H].high>>>0).toNumber()}if(K.explicitBounds){if(!Array.isArray(K.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");$.explicitBounds=[];for(var H=0;H<K.explicitBounds.length;++H)$.explicitBounds[H]=Number(K.explicitBounds[H])}if(K.exemplars){if(!Array.isArray(K.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");$.exemplars=[];for(var H=0;H<K.exemplars.length;++H){if(typeof K.exemplars[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");$.exemplars[H]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(K.exemplars[H])}}if(K.flags!=null)$.flags=K.flags>>>0;if(K.min!=null)$.min=Number(K.min);if(K.max!=null)$.max=Number(K.max);return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.bucketCounts=[],H.explicitBounds=[],H.exemplars=[],H.attributes=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.startTimeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.startTimeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.count=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.count=$.longs===String?"0":0;H.flags=0}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano"))if(typeof K.startTimeUnixNano==="number")H.startTimeUnixNano=$.longs===String?String(K.startTimeUnixNano):K.startTimeUnixNano;else H.startTimeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.startTimeUnixNano):$.longs===Number?new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber():K.startTimeUnixNano;if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.count!=null&&K.hasOwnProperty("count"))if(typeof K.count==="number")H.count=$.longs===String?String(K.count):K.count;else H.count=$.longs===String?h.Long.prototype.toString.call(K.count):$.longs===Number?new h.LongBits(K.count.low>>>0,K.count.high>>>0).toNumber():K.count;if(K.sum!=null&&K.hasOwnProperty("sum")){if(H.sum=$.json&&!isFinite(K.sum)?String(K.sum):K.sum,$.oneofs)H._sum="sum"}if(K.bucketCounts&&K.bucketCounts.length){H.bucketCounts=[];for(var q=0;q<K.bucketCounts.length;++q)if(typeof K.bucketCounts[q]==="number")H.bucketCounts[q]=$.longs===String?String(K.bucketCounts[q]):K.bucketCounts[q];else H.bucketCounts[q]=$.longs===String?h.Long.prototype.toString.call(K.bucketCounts[q]):$.longs===Number?new h.LongBits(K.bucketCounts[q].low>>>0,K.bucketCounts[q].high>>>0).toNumber():K.bucketCounts[q]}if(K.explicitBounds&&K.explicitBounds.length){H.explicitBounds=[];for(var q=0;q<K.explicitBounds.length;++q)H.explicitBounds[q]=$.json&&!isFinite(K.explicitBounds[q])?String(K.explicitBounds[q]):K.explicitBounds[q]}if(K.exemplars&&K.exemplars.length){H.exemplars=[];for(var q=0;q<K.exemplars.length;++q)H.exemplars[q]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(K.exemplars[q],$)}if(K.attributes&&K.attributes.length){H.attributes=[];for(var q=0;q<K.attributes.length;++q)H.attributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[q],$)}if(K.flags!=null&&K.hasOwnProperty("flags"))H.flags=K.flags;if(K.min!=null&&K.hasOwnProperty("min")){if(H.min=$.json&&!isFinite(K.min)?String(K.min):K.min,$.oneofs)H._min="min"}if(K.max!=null&&K.hasOwnProperty("max")){if(H.max=$.json&&!isFinite(K.max)?String(K.max):K.max,$.oneofs)H._max="max"}return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},G}(),J.ExponentialHistogramDataPoint=function(){function G(W){if(this.attributes=[],this.exemplars=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.attributes=h.emptyArray,G.prototype.startTimeUnixNano=null,G.prototype.timeUnixNano=null,G.prototype.count=null,G.prototype.sum=null,G.prototype.scale=null,G.prototype.zeroCount=null,G.prototype.positive=null,G.prototype.negative=null,G.prototype.flags=null,G.prototype.exemplars=h.emptyArray,G.prototype.min=null,G.prototype.max=null,G.prototype.zeroThreshold=null;var Z;return Object.defineProperty(G.prototype,"_sum",{get:h.oneOfGetter(Z=["sum"]),set:h.oneOfSetter(Z)}),Object.defineProperty(G.prototype,"_min",{get:h.oneOfGetter(Z=["min"]),set:h.oneOfSetter(Z)}),Object.defineProperty(G.prototype,"_max",{get:h.oneOfGetter(Z=["max"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(10).fork()).ldelim();if(K.startTimeUnixNano!=null&&Object.hasOwnProperty.call(K,"startTimeUnixNano"))$.uint32(17).fixed64(K.startTimeUnixNano);if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(25).fixed64(K.timeUnixNano);if(K.count!=null&&Object.hasOwnProperty.call(K,"count"))$.uint32(33).fixed64(K.count);if(K.sum!=null&&Object.hasOwnProperty.call(K,"sum"))$.uint32(41).double(K.sum);if(K.scale!=null&&Object.hasOwnProperty.call(K,"scale"))$.uint32(48).sint32(K.scale);if(K.zeroCount!=null&&Object.hasOwnProperty.call(K,"zeroCount"))$.uint32(57).fixed64(K.zeroCount);if(K.positive!=null&&Object.hasOwnProperty.call(K,"positive"))f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(K.positive,$.uint32(66).fork()).ldelim();if(K.negative!=null&&Object.hasOwnProperty.call(K,"negative"))f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(K.negative,$.uint32(74).fork()).ldelim();if(K.flags!=null&&Object.hasOwnProperty.call(K,"flags"))$.uint32(80).uint32(K.flags);if(K.exemplars!=null&&K.exemplars.length)for(var H=0;H<K.exemplars.length;++H)f.opentelemetry.proto.metrics.v1.Exemplar.encode(K.exemplars[H],$.uint32(90).fork()).ldelim();if(K.min!=null&&Object.hasOwnProperty.call(K,"min"))$.uint32(97).double(K.min);if(K.max!=null&&Object.hasOwnProperty.call(K,"max"))$.uint32(105).double(K.max);if(K.zeroThreshold!=null&&Object.hasOwnProperty.call(K,"zeroThreshold"))$.uint32(113).double(K.zeroThreshold);return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 2:{q.startTimeUnixNano=K.fixed64();break}case 3:{q.timeUnixNano=K.fixed64();break}case 4:{q.count=K.fixed64();break}case 5:{q.sum=K.double();break}case 6:{q.scale=K.sint32();break}case 7:{q.zeroCount=K.fixed64();break}case 8:{q.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(K,K.uint32());break}case 9:{q.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(K,K.uint32());break}case 10:{q.flags=K.uint32();break}case 11:{if(!(q.exemplars&&q.exemplars.length))q.exemplars=[];q.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(K,K.uint32()));break}case 12:{q.min=K.double();break}case 13:{q.max=K.double();break}case 14:{q.zeroThreshold=K.double();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var H=0;H<K.attributes.length;++H){var F=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[H]);if(F)return"attributes."+F}}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(K.startTimeUnixNano)&&!(K.startTimeUnixNano&&h.isInteger(K.startTimeUnixNano.low)&&h.isInteger(K.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.count!=null&&K.hasOwnProperty("count")){if(!h.isInteger(K.count)&&!(K.count&&h.isInteger(K.count.low)&&h.isInteger(K.count.high)))return"count: integer|Long expected"}if(K.sum!=null&&K.hasOwnProperty("sum")){if($._sum=1,typeof K.sum!=="number")return"sum: number expected"}if(K.scale!=null&&K.hasOwnProperty("scale")){if(!h.isInteger(K.scale))return"scale: integer expected"}if(K.zeroCount!=null&&K.hasOwnProperty("zeroCount")){if(!h.isInteger(K.zeroCount)&&!(K.zeroCount&&h.isInteger(K.zeroCount.low)&&h.isInteger(K.zeroCount.high)))return"zeroCount: integer|Long expected"}if(K.positive!=null&&K.hasOwnProperty("positive")){var F=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(K.positive);if(F)return"positive."+F}if(K.negative!=null&&K.hasOwnProperty("negative")){var F=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(K.negative);if(F)return"negative."+F}if(K.flags!=null&&K.hasOwnProperty("flags")){if(!h.isInteger(K.flags))return"flags: integer expected"}if(K.exemplars!=null&&K.hasOwnProperty("exemplars")){if(!Array.isArray(K.exemplars))return"exemplars: array expected";for(var H=0;H<K.exemplars.length;++H){var F=f.opentelemetry.proto.metrics.v1.Exemplar.verify(K.exemplars[H]);if(F)return"exemplars."+F}}if(K.min!=null&&K.hasOwnProperty("min")){if($._min=1,typeof K.min!=="number")return"min: number expected"}if(K.max!=null&&K.hasOwnProperty("max")){if($._max=1,typeof K.max!=="number")return"max: number expected"}if(K.zeroThreshold!=null&&K.hasOwnProperty("zeroThreshold")){if(typeof K.zeroThreshold!=="number")return"zeroThreshold: number expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return K;var $=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.startTimeUnixNano!=null){if(h.Long)($.startTimeUnixNano=h.Long.fromValue(K.startTimeUnixNano)).unsigned=!1;else if(typeof K.startTimeUnixNano==="string")$.startTimeUnixNano=parseInt(K.startTimeUnixNano,10);else if(typeof K.startTimeUnixNano==="number")$.startTimeUnixNano=K.startTimeUnixNano;else if(typeof K.startTimeUnixNano==="object")$.startTimeUnixNano=new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber()}if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.count!=null){if(h.Long)($.count=h.Long.fromValue(K.count)).unsigned=!1;else if(typeof K.count==="string")$.count=parseInt(K.count,10);else if(typeof K.count==="number")$.count=K.count;else if(typeof K.count==="object")$.count=new h.LongBits(K.count.low>>>0,K.count.high>>>0).toNumber()}if(K.sum!=null)$.sum=Number(K.sum);if(K.scale!=null)$.scale=K.scale|0;if(K.zeroCount!=null){if(h.Long)($.zeroCount=h.Long.fromValue(K.zeroCount)).unsigned=!1;else if(typeof K.zeroCount==="string")$.zeroCount=parseInt(K.zeroCount,10);else if(typeof K.zeroCount==="number")$.zeroCount=K.zeroCount;else if(typeof K.zeroCount==="object")$.zeroCount=new h.LongBits(K.zeroCount.low>>>0,K.zeroCount.high>>>0).toNumber()}if(K.positive!=null){if(typeof K.positive!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");$.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(K.positive)}if(K.negative!=null){if(typeof K.negative!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");$.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(K.negative)}if(K.flags!=null)$.flags=K.flags>>>0;if(K.exemplars){if(!Array.isArray(K.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");$.exemplars=[];for(var H=0;H<K.exemplars.length;++H){if(typeof K.exemplars[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");$.exemplars[H]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(K.exemplars[H])}}if(K.min!=null)$.min=Number(K.min);if(K.max!=null)$.max=Number(K.max);if(K.zeroThreshold!=null)$.zeroThreshold=Number(K.zeroThreshold);return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.attributes=[],H.exemplars=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.startTimeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.startTimeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.count=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.count=$.longs===String?"0":0;if(H.scale=0,h.Long){var F=new h.Long(0,0,!1);H.zeroCount=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.zeroCount=$.longs===String?"0":0;H.positive=null,H.negative=null,H.flags=0,H.zeroThreshold=0}if(K.attributes&&K.attributes.length){H.attributes=[];for(var q=0;q<K.attributes.length;++q)H.attributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[q],$)}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano"))if(typeof K.startTimeUnixNano==="number")H.startTimeUnixNano=$.longs===String?String(K.startTimeUnixNano):K.startTimeUnixNano;else H.startTimeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.startTimeUnixNano):$.longs===Number?new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber():K.startTimeUnixNano;if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.count!=null&&K.hasOwnProperty("count"))if(typeof K.count==="number")H.count=$.longs===String?String(K.count):K.count;else H.count=$.longs===String?h.Long.prototype.toString.call(K.count):$.longs===Number?new h.LongBits(K.count.low>>>0,K.count.high>>>0).toNumber():K.count;if(K.sum!=null&&K.hasOwnProperty("sum")){if(H.sum=$.json&&!isFinite(K.sum)?String(K.sum):K.sum,$.oneofs)H._sum="sum"}if(K.scale!=null&&K.hasOwnProperty("scale"))H.scale=K.scale;if(K.zeroCount!=null&&K.hasOwnProperty("zeroCount"))if(typeof K.zeroCount==="number")H.zeroCount=$.longs===String?String(K.zeroCount):K.zeroCount;else H.zeroCount=$.longs===String?h.Long.prototype.toString.call(K.zeroCount):$.longs===Number?new h.LongBits(K.zeroCount.low>>>0,K.zeroCount.high>>>0).toNumber():K.zeroCount;if(K.positive!=null&&K.hasOwnProperty("positive"))H.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(K.positive,$);if(K.negative!=null&&K.hasOwnProperty("negative"))H.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(K.negative,$);if(K.flags!=null&&K.hasOwnProperty("flags"))H.flags=K.flags;if(K.exemplars&&K.exemplars.length){H.exemplars=[];for(var q=0;q<K.exemplars.length;++q)H.exemplars[q]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(K.exemplars[q],$)}if(K.min!=null&&K.hasOwnProperty("min")){if(H.min=$.json&&!isFinite(K.min)?String(K.min):K.min,$.oneofs)H._min="min"}if(K.max!=null&&K.hasOwnProperty("max")){if(H.max=$.json&&!isFinite(K.max)?String(K.max):K.max,$.oneofs)H._max="max"}if(K.zeroThreshold!=null&&K.hasOwnProperty("zeroThreshold"))H.zeroThreshold=$.json&&!isFinite(K.zeroThreshold)?String(K.zeroThreshold):K.zeroThreshold;return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},G.Buckets=function(){function W(K){if(this.bucketCounts=[],K){for(var $=Object.keys(K),H=0;H<$.length;++H)if(K[$[H]]!=null)this[$[H]]=K[$[H]]}}return W.prototype.offset=null,W.prototype.bucketCounts=h.emptyArray,W.create=function($){return new W($)},W.encode=function($,H){if(!H)H=J6.create();if($.offset!=null&&Object.hasOwnProperty.call($,"offset"))H.uint32(8).sint32($.offset);if($.bucketCounts!=null&&$.bucketCounts.length){H.uint32(18).fork();for(var F=0;F<$.bucketCounts.length;++F)H.uint64($.bucketCounts[F]);H.ldelim()}return H},W.encodeDelimited=function($,H){return this.encode($,H).ldelim()},W.decode=function($,H,F){if(!($ instanceof V0))$=V0.create($);var q=H===void 0?$.len:$.pos+H,V=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;while($.pos<q){var U=$.uint32();if(U===F)break;switch(U>>>3){case 1:{V.offset=$.sint32();break}case 2:{if(!(V.bucketCounts&&V.bucketCounts.length))V.bucketCounts=[];if((U&7)===2){var D=$.uint32()+$.pos;while($.pos<D)V.bucketCounts.push($.uint64())}else V.bucketCounts.push($.uint64());break}default:$.skipType(U&7);break}}return V},W.decodeDelimited=function($){if(!($ instanceof V0))$=new V0($);return this.decode($,$.uint32())},W.verify=function($){if(typeof $!=="object"||$===null)return"object expected";if($.offset!=null&&$.hasOwnProperty("offset")){if(!h.isInteger($.offset))return"offset: integer expected"}if($.bucketCounts!=null&&$.hasOwnProperty("bucketCounts")){if(!Array.isArray($.bucketCounts))return"bucketCounts: array expected";for(var H=0;H<$.bucketCounts.length;++H)if(!h.isInteger($.bucketCounts[H])&&!($.bucketCounts[H]&&h.isInteger($.bucketCounts[H].low)&&h.isInteger($.bucketCounts[H].high)))return"bucketCounts: integer|Long[] expected"}return null},W.fromObject=function($){if($ instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return $;var H=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if($.offset!=null)H.offset=$.offset|0;if($.bucketCounts){if(!Array.isArray($.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");H.bucketCounts=[];for(var F=0;F<$.bucketCounts.length;++F)if(h.Long)(H.bucketCounts[F]=h.Long.fromValue($.bucketCounts[F])).unsigned=!0;else if(typeof $.bucketCounts[F]==="string")H.bucketCounts[F]=parseInt($.bucketCounts[F],10);else if(typeof $.bucketCounts[F]==="number")H.bucketCounts[F]=$.bucketCounts[F];else if(typeof $.bucketCounts[F]==="object")H.bucketCounts[F]=new h.LongBits($.bucketCounts[F].low>>>0,$.bucketCounts[F].high>>>0).toNumber(!0)}return H},W.toObject=function($,H){if(!H)H={};var F={};if(H.arrays||H.defaults)F.bucketCounts=[];if(H.defaults)F.offset=0;if($.offset!=null&&$.hasOwnProperty("offset"))F.offset=$.offset;if($.bucketCounts&&$.bucketCounts.length){F.bucketCounts=[];for(var q=0;q<$.bucketCounts.length;++q)if(typeof $.bucketCounts[q]==="number")F.bucketCounts[q]=H.longs===String?String($.bucketCounts[q]):$.bucketCounts[q];else F.bucketCounts[q]=H.longs===String?h.Long.prototype.toString.call($.bucketCounts[q]):H.longs===Number?new h.LongBits($.bucketCounts[q].low>>>0,$.bucketCounts[q].high>>>0).toNumber(!0):$.bucketCounts[q]}return F},W.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},W.getTypeUrl=function($){if($===void 0)$="type.googleapis.com";return $+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},W}(),G}(),J.SummaryDataPoint=function(){function G(Z){if(this.attributes=[],this.quantileValues=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.attributes=h.emptyArray,G.prototype.startTimeUnixNano=null,G.prototype.timeUnixNano=null,G.prototype.count=null,G.prototype.sum=null,G.prototype.quantileValues=h.emptyArray,G.prototype.flags=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.startTimeUnixNano!=null&&Object.hasOwnProperty.call(W,"startTimeUnixNano"))K.uint32(17).fixed64(W.startTimeUnixNano);if(W.timeUnixNano!=null&&Object.hasOwnProperty.call(W,"timeUnixNano"))K.uint32(25).fixed64(W.timeUnixNano);if(W.count!=null&&Object.hasOwnProperty.call(W,"count"))K.uint32(33).fixed64(W.count);if(W.sum!=null&&Object.hasOwnProperty.call(W,"sum"))K.uint32(41).double(W.sum);if(W.quantileValues!=null&&W.quantileValues.length)for(var $=0;$<W.quantileValues.length;++$)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(W.quantileValues[$],K.uint32(50).fork()).ldelim();if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(58).fork()).ldelim();if(W.flags!=null&&Object.hasOwnProperty.call(W,"flags"))K.uint32(64).uint32(W.flags);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 7:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 2:{F.startTimeUnixNano=W.fixed64();break}case 3:{F.timeUnixNano=W.fixed64();break}case 4:{F.count=W.fixed64();break}case 5:{F.sum=W.double();break}case 6:{if(!(F.quantileValues&&F.quantileValues.length))F.quantileValues=[];F.quantileValues.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(W,W.uint32()));break}case 8:{F.flags=W.uint32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var K=0;K<W.attributes.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[K]);if($)return"attributes."+$}}if(W.startTimeUnixNano!=null&&W.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(W.startTimeUnixNano)&&!(W.startTimeUnixNano&&h.isInteger(W.startTimeUnixNano.low)&&h.isInteger(W.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(W.timeUnixNano!=null&&W.hasOwnProperty("timeUnixNano")){if(!h.isInteger(W.timeUnixNano)&&!(W.timeUnixNano&&h.isInteger(W.timeUnixNano.low)&&h.isInteger(W.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(W.count!=null&&W.hasOwnProperty("count")){if(!h.isInteger(W.count)&&!(W.count&&h.isInteger(W.count.low)&&h.isInteger(W.count.high)))return"count: integer|Long expected"}if(W.sum!=null&&W.hasOwnProperty("sum")){if(typeof W.sum!=="number")return"sum: number expected"}if(W.quantileValues!=null&&W.hasOwnProperty("quantileValues")){if(!Array.isArray(W.quantileValues))return"quantileValues: array expected";for(var K=0;K<W.quantileValues.length;++K){var $=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(W.quantileValues[K]);if($)return"quantileValues."+$}}if(W.flags!=null&&W.hasOwnProperty("flags")){if(!h.isInteger(W.flags))return"flags: integer expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint)return W;var K=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.startTimeUnixNano!=null){if(h.Long)(K.startTimeUnixNano=h.Long.fromValue(W.startTimeUnixNano)).unsigned=!1;else if(typeof W.startTimeUnixNano==="string")K.startTimeUnixNano=parseInt(W.startTimeUnixNano,10);else if(typeof W.startTimeUnixNano==="number")K.startTimeUnixNano=W.startTimeUnixNano;else if(typeof W.startTimeUnixNano==="object")K.startTimeUnixNano=new h.LongBits(W.startTimeUnixNano.low>>>0,W.startTimeUnixNano.high>>>0).toNumber()}if(W.timeUnixNano!=null){if(h.Long)(K.timeUnixNano=h.Long.fromValue(W.timeUnixNano)).unsigned=!1;else if(typeof W.timeUnixNano==="string")K.timeUnixNano=parseInt(W.timeUnixNano,10);else if(typeof W.timeUnixNano==="number")K.timeUnixNano=W.timeUnixNano;else if(typeof W.timeUnixNano==="object")K.timeUnixNano=new h.LongBits(W.timeUnixNano.low>>>0,W.timeUnixNano.high>>>0).toNumber()}if(W.count!=null){if(h.Long)(K.count=h.Long.fromValue(W.count)).unsigned=!1;else if(typeof W.count==="string")K.count=parseInt(W.count,10);else if(typeof W.count==="number")K.count=W.count;else if(typeof W.count==="object")K.count=new h.LongBits(W.count.low>>>0,W.count.high>>>0).toNumber()}if(W.sum!=null)K.sum=Number(W.sum);if(W.quantileValues){if(!Array.isArray(W.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");K.quantileValues=[];for(var $=0;$<W.quantileValues.length;++$){if(typeof W.quantileValues[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");K.quantileValues[$]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(W.quantileValues[$])}}if(W.flags!=null)K.flags=W.flags>>>0;return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.quantileValues=[],$.attributes=[];if(K.defaults){if(h.Long){var H=new h.Long(0,0,!1);$.startTimeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.startTimeUnixNano=K.longs===String?"0":0;if(h.Long){var H=new h.Long(0,0,!1);$.timeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.timeUnixNano=K.longs===String?"0":0;if(h.Long){var H=new h.Long(0,0,!1);$.count=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.count=K.longs===String?"0":0;$.sum=0,$.flags=0}if(W.startTimeUnixNano!=null&&W.hasOwnProperty("startTimeUnixNano"))if(typeof W.startTimeUnixNano==="number")$.startTimeUnixNano=K.longs===String?String(W.startTimeUnixNano):W.startTimeUnixNano;else $.startTimeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.startTimeUnixNano):K.longs===Number?new h.LongBits(W.startTimeUnixNano.low>>>0,W.startTimeUnixNano.high>>>0).toNumber():W.startTimeUnixNano;if(W.timeUnixNano!=null&&W.hasOwnProperty("timeUnixNano"))if(typeof W.timeUnixNano==="number")$.timeUnixNano=K.longs===String?String(W.timeUnixNano):W.timeUnixNano;else $.timeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.timeUnixNano):K.longs===Number?new h.LongBits(W.timeUnixNano.low>>>0,W.timeUnixNano.high>>>0).toNumber():W.timeUnixNano;if(W.count!=null&&W.hasOwnProperty("count"))if(typeof W.count==="number")$.count=K.longs===String?String(W.count):W.count;else $.count=K.longs===String?h.Long.prototype.toString.call(W.count):K.longs===Number?new h.LongBits(W.count.low>>>0,W.count.high>>>0).toNumber():W.count;if(W.sum!=null&&W.hasOwnProperty("sum"))$.sum=K.json&&!isFinite(W.sum)?String(W.sum):W.sum;if(W.quantileValues&&W.quantileValues.length){$.quantileValues=[];for(var F=0;F<W.quantileValues.length;++F)$.quantileValues[F]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(W.quantileValues[F],K)}if(W.attributes&&W.attributes.length){$.attributes=[];for(var F=0;F<W.attributes.length;++F)$.attributes[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[F],K)}if(W.flags!=null&&W.hasOwnProperty("flags"))$.flags=W.flags;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},G.ValueAtQuantile=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.quantile=null,Z.prototype.value=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.quantile!=null&&Object.hasOwnProperty.call(K,"quantile"))$.uint32(9).double(K.quantile);if(K.value!=null&&Object.hasOwnProperty.call(K,"value"))$.uint32(17).double(K.value);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.quantile=K.double();break}case 2:{q.value=K.double();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.quantile!=null&&K.hasOwnProperty("quantile")){if(typeof K.quantile!=="number")return"quantile: number expected"}if(K.value!=null&&K.hasOwnProperty("value")){if(typeof K.value!=="number")return"value: number expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return K;var $=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;if(K.quantile!=null)$.quantile=Number(K.quantile);if(K.value!=null)$.value=Number(K.value);return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults)H.quantile=0,H.value=0;if(K.quantile!=null&&K.hasOwnProperty("quantile"))H.quantile=$.json&&!isFinite(K.quantile)?String(K.quantile):K.quantile;if(K.value!=null&&K.hasOwnProperty("value"))H.value=$.json&&!isFinite(K.value)?String(K.value):K.value;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},Z}(),G}(),J.Exemplar=function(){function G(W){if(this.filteredAttributes=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.filteredAttributes=h.emptyArray,G.prototype.timeUnixNano=null,G.prototype.asDouble=null,G.prototype.asInt=null,G.prototype.spanId=null,G.prototype.traceId=null;var Z;return Object.defineProperty(G.prototype,"value",{get:h.oneOfGetter(Z=["asDouble","asInt"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(17).fixed64(K.timeUnixNano);if(K.asDouble!=null&&Object.hasOwnProperty.call(K,"asDouble"))$.uint32(25).double(K.asDouble);if(K.spanId!=null&&Object.hasOwnProperty.call(K,"spanId"))$.uint32(34).bytes(K.spanId);if(K.traceId!=null&&Object.hasOwnProperty.call(K,"traceId"))$.uint32(42).bytes(K.traceId);if(K.asInt!=null&&Object.hasOwnProperty.call(K,"asInt"))$.uint32(49).sfixed64(K.asInt);if(K.filteredAttributes!=null&&K.filteredAttributes.length)for(var H=0;H<K.filteredAttributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.filteredAttributes[H],$.uint32(58).fork()).ldelim();return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.Exemplar;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 7:{if(!(q.filteredAttributes&&q.filteredAttributes.length))q.filteredAttributes=[];q.filteredAttributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 2:{q.timeUnixNano=K.fixed64();break}case 3:{q.asDouble=K.double();break}case 6:{q.asInt=K.sfixed64();break}case 4:{q.spanId=K.bytes();break}case 5:{q.traceId=K.bytes();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.filteredAttributes!=null&&K.hasOwnProperty("filteredAttributes")){if(!Array.isArray(K.filteredAttributes))return"filteredAttributes: array expected";for(var H=0;H<K.filteredAttributes.length;++H){var F=f.opentelemetry.proto.common.v1.KeyValue.verify(K.filteredAttributes[H]);if(F)return"filteredAttributes."+F}}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.asDouble!=null&&K.hasOwnProperty("asDouble")){if($.value=1,typeof K.asDouble!=="number")return"asDouble: number expected"}if(K.asInt!=null&&K.hasOwnProperty("asInt")){if($.value===1)return"value: multiple values";if($.value=1,!h.isInteger(K.asInt)&&!(K.asInt&&h.isInteger(K.asInt.low)&&h.isInteger(K.asInt.high)))return"asInt: integer|Long expected"}if(K.spanId!=null&&K.hasOwnProperty("spanId")){if(!(K.spanId&&typeof K.spanId.length==="number"||h.isString(K.spanId)))return"spanId: buffer expected"}if(K.traceId!=null&&K.hasOwnProperty("traceId")){if(!(K.traceId&&typeof K.traceId.length==="number"||h.isString(K.traceId)))return"traceId: buffer expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.Exemplar)return K;var $=new f.opentelemetry.proto.metrics.v1.Exemplar;if(K.filteredAttributes){if(!Array.isArray(K.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");$.filteredAttributes=[];for(var H=0;H<K.filteredAttributes.length;++H){if(typeof K.filteredAttributes[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");$.filteredAttributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.filteredAttributes[H])}}if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.asDouble!=null)$.asDouble=Number(K.asDouble);if(K.asInt!=null){if(h.Long)($.asInt=h.Long.fromValue(K.asInt)).unsigned=!1;else if(typeof K.asInt==="string")$.asInt=parseInt(K.asInt,10);else if(typeof K.asInt==="number")$.asInt=K.asInt;else if(typeof K.asInt==="object")$.asInt=new h.LongBits(K.asInt.low>>>0,K.asInt.high>>>0).toNumber()}if(K.spanId!=null){if(typeof K.spanId==="string")h.base64.decode(K.spanId,$.spanId=h.newBuffer(h.base64.length(K.spanId)),0);else if(K.spanId.length>=0)$.spanId=K.spanId}if(K.traceId!=null){if(typeof K.traceId==="string")h.base64.decode(K.traceId,$.traceId=h.newBuffer(h.base64.length(K.traceId)),0);else if(K.traceId.length>=0)$.traceId=K.traceId}return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.filteredAttributes=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;if($.bytes===String)H.spanId="";else if(H.spanId=[],$.bytes!==Array)H.spanId=h.newBuffer(H.spanId);if($.bytes===String)H.traceId="";else if(H.traceId=[],$.bytes!==Array)H.traceId=h.newBuffer(H.traceId)}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.asDouble!=null&&K.hasOwnProperty("asDouble")){if(H.asDouble=$.json&&!isFinite(K.asDouble)?String(K.asDouble):K.asDouble,$.oneofs)H.value="asDouble"}if(K.spanId!=null&&K.hasOwnProperty("spanId"))H.spanId=$.bytes===String?h.base64.encode(K.spanId,0,K.spanId.length):$.bytes===Array?Array.prototype.slice.call(K.spanId):K.spanId;if(K.traceId!=null&&K.hasOwnProperty("traceId"))H.traceId=$.bytes===String?h.base64.encode(K.traceId,0,K.traceId.length):$.bytes===Array?Array.prototype.slice.call(K.traceId):K.traceId;if(K.asInt!=null&&K.hasOwnProperty("asInt")){if(typeof K.asInt==="number")H.asInt=$.longs===String?String(K.asInt):K.asInt;else H.asInt=$.longs===String?h.Long.prototype.toString.call(K.asInt):$.longs===Number?new h.LongBits(K.asInt.low>>>0,K.asInt.high>>>0).toNumber():K.asInt;if($.oneofs)H.value="asInt"}if(K.filteredAttributes&&K.filteredAttributes.length){H.filteredAttributes=[];for(var q=0;q<K.filteredAttributes.length;++q)H.filteredAttributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.filteredAttributes[q],$)}return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.Exemplar"},G}(),J}(),Y}(),X.logs=function(){var Y={};return Y.v1=function(){var J={};return J.LogsData=function(){function G(Z){if(this.resourceLogs=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resourceLogs=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resourceLogs!=null&&W.resourceLogs.length)for(var $=0;$<W.resourceLogs.length;++$)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(W.resourceLogs[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.logs.v1.LogsData;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.resourceLogs&&F.resourceLogs.length))F.resourceLogs=[];F.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resourceLogs!=null&&W.hasOwnProperty("resourceLogs")){if(!Array.isArray(W.resourceLogs))return"resourceLogs: array expected";for(var K=0;K<W.resourceLogs.length;++K){var $=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(W.resourceLogs[K]);if($)return"resourceLogs."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.logs.v1.LogsData)return W;var K=new f.opentelemetry.proto.logs.v1.LogsData;if(W.resourceLogs){if(!Array.isArray(W.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");K.resourceLogs=[];for(var $=0;$<W.resourceLogs.length;++$){if(typeof W.resourceLogs[$]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");K.resourceLogs[$]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(W.resourceLogs[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.resourceLogs=[];if(W.resourceLogs&&W.resourceLogs.length){$.resourceLogs=[];for(var H=0;H<W.resourceLogs.length;++H)$.resourceLogs[H]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(W.resourceLogs[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.logs.v1.LogsData"},G}(),J.ResourceLogs=function(){function G(Z){if(this.scopeLogs=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resource=null,G.prototype.scopeLogs=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resource!=null&&Object.hasOwnProperty.call(W,"resource"))f.opentelemetry.proto.resource.v1.Resource.encode(W.resource,K.uint32(10).fork()).ldelim();if(W.scopeLogs!=null&&W.scopeLogs.length)for(var $=0;$<W.scopeLogs.length;++$)f.opentelemetry.proto.logs.v1.ScopeLogs.encode(W.scopeLogs[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.logs.v1.ResourceLogs;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.resource=f.opentelemetry.proto.resource.v1.Resource.decode(W,W.uint32());break}case 2:{if(!(F.scopeLogs&&F.scopeLogs.length))F.scopeLogs=[];F.scopeLogs.push(f.opentelemetry.proto.logs.v1.ScopeLogs.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resource!=null&&W.hasOwnProperty("resource")){var K=f.opentelemetry.proto.resource.v1.Resource.verify(W.resource);if(K)return"resource."+K}if(W.scopeLogs!=null&&W.hasOwnProperty("scopeLogs")){if(!Array.isArray(W.scopeLogs))return"scopeLogs: array expected";for(var $=0;$<W.scopeLogs.length;++$){var K=f.opentelemetry.proto.logs.v1.ScopeLogs.verify(W.scopeLogs[$]);if(K)return"scopeLogs."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.logs.v1.ResourceLogs)return W;var K=new f.opentelemetry.proto.logs.v1.ResourceLogs;if(W.resource!=null){if(typeof W.resource!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");K.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(W.resource)}if(W.scopeLogs){if(!Array.isArray(W.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");K.scopeLogs=[];for(var $=0;$<W.scopeLogs.length;++$){if(typeof W.scopeLogs[$]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");K.scopeLogs[$]=f.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(W.scopeLogs[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.scopeLogs=[];if(K.defaults)$.resource=null,$.schemaUrl="";if(W.resource!=null&&W.hasOwnProperty("resource"))$.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(W.resource,K);if(W.scopeLogs&&W.scopeLogs.length){$.scopeLogs=[];for(var H=0;H<W.scopeLogs.length;++H)$.scopeLogs[H]=f.opentelemetry.proto.logs.v1.ScopeLogs.toObject(W.scopeLogs[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.logs.v1.ResourceLogs"},G}(),J.ScopeLogs=function(){function G(Z){if(this.logRecords=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.scope=null,G.prototype.logRecords=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.scope!=null&&Object.hasOwnProperty.call(W,"scope"))f.opentelemetry.proto.common.v1.InstrumentationScope.encode(W.scope,K.uint32(10).fork()).ldelim();if(W.logRecords!=null&&W.logRecords.length)for(var $=0;$<W.logRecords.length;++$)f.opentelemetry.proto.logs.v1.LogRecord.encode(W.logRecords[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.logs.v1.ScopeLogs;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(W,W.uint32());break}case 2:{if(!(F.logRecords&&F.logRecords.length))F.logRecords=[];F.logRecords.push(f.opentelemetry.proto.logs.v1.LogRecord.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.scope!=null&&W.hasOwnProperty("scope")){var K=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(W.scope);if(K)return"scope."+K}if(W.logRecords!=null&&W.hasOwnProperty("logRecords")){if(!Array.isArray(W.logRecords))return"logRecords: array expected";for(var $=0;$<W.logRecords.length;++$){var K=f.opentelemetry.proto.logs.v1.LogRecord.verify(W.logRecords[$]);if(K)return"logRecords."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.logs.v1.ScopeLogs)return W;var K=new f.opentelemetry.proto.logs.v1.ScopeLogs;if(W.scope!=null){if(typeof W.scope!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");K.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(W.scope)}if(W.logRecords){if(!Array.isArray(W.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");K.logRecords=[];for(var $=0;$<W.logRecords.length;++$){if(typeof W.logRecords[$]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");K.logRecords[$]=f.opentelemetry.proto.logs.v1.LogRecord.fromObject(W.logRecords[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.logRecords=[];if(K.defaults)$.scope=null,$.schemaUrl="";if(W.scope!=null&&W.hasOwnProperty("scope"))$.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(W.scope,K);if(W.logRecords&&W.logRecords.length){$.logRecords=[];for(var H=0;H<W.logRecords.length;++H)$.logRecords[H]=f.opentelemetry.proto.logs.v1.LogRecord.toObject(W.logRecords[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.logs.v1.ScopeLogs"},G}(),J.SeverityNumber=function(){var G={},Z=Object.create(G);return Z[G[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,Z[G[1]="SEVERITY_NUMBER_TRACE"]=1,Z[G[2]="SEVERITY_NUMBER_TRACE2"]=2,Z[G[3]="SEVERITY_NUMBER_TRACE3"]=3,Z[G[4]="SEVERITY_NUMBER_TRACE4"]=4,Z[G[5]="SEVERITY_NUMBER_DEBUG"]=5,Z[G[6]="SEVERITY_NUMBER_DEBUG2"]=6,Z[G[7]="SEVERITY_NUMBER_DEBUG3"]=7,Z[G[8]="SEVERITY_NUMBER_DEBUG4"]=8,Z[G[9]="SEVERITY_NUMBER_INFO"]=9,Z[G[10]="SEVERITY_NUMBER_INFO2"]=10,Z[G[11]="SEVERITY_NUMBER_INFO3"]=11,Z[G[12]="SEVERITY_NUMBER_INFO4"]=12,Z[G[13]="SEVERITY_NUMBER_WARN"]=13,Z[G[14]="SEVERITY_NUMBER_WARN2"]=14,Z[G[15]="SEVERITY_NUMBER_WARN3"]=15,Z[G[16]="SEVERITY_NUMBER_WARN4"]=16,Z[G[17]="SEVERITY_NUMBER_ERROR"]=17,Z[G[18]="SEVERITY_NUMBER_ERROR2"]=18,Z[G[19]="SEVERITY_NUMBER_ERROR3"]=19,Z[G[20]="SEVERITY_NUMBER_ERROR4"]=20,Z[G[21]="SEVERITY_NUMBER_FATAL"]=21,Z[G[22]="SEVERITY_NUMBER_FATAL2"]=22,Z[G[23]="SEVERITY_NUMBER_FATAL3"]=23,Z[G[24]="SEVERITY_NUMBER_FATAL4"]=24,Z}(),J.LogRecordFlags=function(){var G={},Z=Object.create(G);return Z[G[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,Z[G[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,Z}(),J.LogRecord=function(){function G(Z){if(this.attributes=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.timeUnixNano=null,G.prototype.observedTimeUnixNano=null,G.prototype.severityNumber=null,G.prototype.severityText=null,G.prototype.body=null,G.prototype.attributes=h.emptyArray,G.prototype.droppedAttributesCount=null,G.prototype.flags=null,G.prototype.traceId=null,G.prototype.spanId=null,G.prototype.eventName=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.timeUnixNano!=null&&Object.hasOwnProperty.call(W,"timeUnixNano"))K.uint32(9).fixed64(W.timeUnixNano);if(W.severityNumber!=null&&Object.hasOwnProperty.call(W,"severityNumber"))K.uint32(16).int32(W.severityNumber);if(W.severityText!=null&&Object.hasOwnProperty.call(W,"severityText"))K.uint32(26).string(W.severityText);if(W.body!=null&&Object.hasOwnProperty.call(W,"body"))f.opentelemetry.proto.common.v1.AnyValue.encode(W.body,K.uint32(42).fork()).ldelim();if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(50).fork()).ldelim();if(W.droppedAttributesCount!=null&&Object.hasOwnProperty.call(W,"droppedAttributesCount"))K.uint32(56).uint32(W.droppedAttributesCount);if(W.flags!=null&&Object.hasOwnProperty.call(W,"flags"))K.uint32(69).fixed32(W.flags);if(W.traceId!=null&&Object.hasOwnProperty.call(W,"traceId"))K.uint32(74).bytes(W.traceId);if(W.spanId!=null&&Object.hasOwnProperty.call(W,"spanId"))K.uint32(82).bytes(W.spanId);if(W.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(W,"observedTimeUnixNano"))K.uint32(89).fixed64(W.observedTimeUnixNano);if(W.eventName!=null&&Object.hasOwnProperty.call(W,"eventName"))K.uint32(98).string(W.eventName);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.logs.v1.LogRecord;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.timeUnixNano=W.fixed64();break}case 11:{F.observedTimeUnixNano=W.fixed64();break}case 2:{F.severityNumber=W.int32();break}case 3:{F.severityText=W.string();break}case 5:{F.body=f.opentelemetry.proto.common.v1.AnyValue.decode(W,W.uint32());break}case 6:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 7:{F.droppedAttributesCount=W.uint32();break}case 8:{F.flags=W.fixed32();break}case 9:{F.traceId=W.bytes();break}case 10:{F.spanId=W.bytes();break}case 12:{F.eventName=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.timeUnixNano!=null&&W.hasOwnProperty("timeUnixNano")){if(!h.isInteger(W.timeUnixNano)&&!(W.timeUnixNano&&h.isInteger(W.timeUnixNano.low)&&h.isInteger(W.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(W.observedTimeUnixNano!=null&&W.hasOwnProperty("observedTimeUnixNano")){if(!h.isInteger(W.observedTimeUnixNano)&&!(W.observedTimeUnixNano&&h.isInteger(W.observedTimeUnixNano.low)&&h.isInteger(W.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected"}if(W.severityNumber!=null&&W.hasOwnProperty("severityNumber"))switch(W.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(W.severityText!=null&&W.hasOwnProperty("severityText")){if(!h.isString(W.severityText))return"severityText: string expected"}if(W.body!=null&&W.hasOwnProperty("body")){var K=f.opentelemetry.proto.common.v1.AnyValue.verify(W.body);if(K)return"body."+K}if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var $=0;$<W.attributes.length;++$){var K=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[$]);if(K)return"attributes."+K}}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(W.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(W.flags!=null&&W.hasOwnProperty("flags")){if(!h.isInteger(W.flags))return"flags: integer expected"}if(W.traceId!=null&&W.hasOwnProperty("traceId")){if(!(W.traceId&&typeof W.traceId.length==="number"||h.isString(W.traceId)))return"traceId: buffer expected"}if(W.spanId!=null&&W.hasOwnProperty("spanId")){if(!(W.spanId&&typeof W.spanId.length==="number"||h.isString(W.spanId)))return"spanId: buffer expected"}if(W.eventName!=null&&W.hasOwnProperty("eventName")){if(!h.isString(W.eventName))return"eventName: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.logs.v1.LogRecord)return W;var K=new f.opentelemetry.proto.logs.v1.LogRecord;if(W.timeUnixNano!=null){if(h.Long)(K.timeUnixNano=h.Long.fromValue(W.timeUnixNano)).unsigned=!1;else if(typeof W.timeUnixNano==="string")K.timeUnixNano=parseInt(W.timeUnixNano,10);else if(typeof W.timeUnixNano==="number")K.timeUnixNano=W.timeUnixNano;else if(typeof W.timeUnixNano==="object")K.timeUnixNano=new h.LongBits(W.timeUnixNano.low>>>0,W.timeUnixNano.high>>>0).toNumber()}if(W.observedTimeUnixNano!=null){if(h.Long)(K.observedTimeUnixNano=h.Long.fromValue(W.observedTimeUnixNano)).unsigned=!1;else if(typeof W.observedTimeUnixNano==="string")K.observedTimeUnixNano=parseInt(W.observedTimeUnixNano,10);else if(typeof W.observedTimeUnixNano==="number")K.observedTimeUnixNano=W.observedTimeUnixNano;else if(typeof W.observedTimeUnixNano==="object")K.observedTimeUnixNano=new h.LongBits(W.observedTimeUnixNano.low>>>0,W.observedTimeUnixNano.high>>>0).toNumber()}switch(W.severityNumber){default:if(typeof W.severityNumber==="number"){K.severityNumber=W.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:K.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:K.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:K.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:K.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:K.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:K.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:K.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:K.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:K.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:K.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:K.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:K.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:K.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:K.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:K.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:K.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:K.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:K.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:K.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:K.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:K.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:K.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:K.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:K.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:K.severityNumber=24;break}if(W.severityText!=null)K.severityText=String(W.severityText);if(W.body!=null){if(typeof W.body!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");K.body=f.opentelemetry.proto.common.v1.AnyValue.fromObject(W.body)}if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.droppedAttributesCount!=null)K.droppedAttributesCount=W.droppedAttributesCount>>>0;if(W.flags!=null)K.flags=W.flags>>>0;if(W.traceId!=null){if(typeof W.traceId==="string")h.base64.decode(W.traceId,K.traceId=h.newBuffer(h.base64.length(W.traceId)),0);else if(W.traceId.length>=0)K.traceId=W.traceId}if(W.spanId!=null){if(typeof W.spanId==="string")h.base64.decode(W.spanId,K.spanId=h.newBuffer(h.base64.length(W.spanId)),0);else if(W.spanId.length>=0)K.spanId=W.spanId}if(W.eventName!=null)K.eventName=String(W.eventName);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.attributes=[];if(K.defaults){if(h.Long){var H=new h.Long(0,0,!1);$.timeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.timeUnixNano=K.longs===String?"0":0;if($.severityNumber=K.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,$.severityText="",$.body=null,$.droppedAttributesCount=0,$.flags=0,K.bytes===String)$.traceId="";else if($.traceId=[],K.bytes!==Array)$.traceId=h.newBuffer($.traceId);if(K.bytes===String)$.spanId="";else if($.spanId=[],K.bytes!==Array)$.spanId=h.newBuffer($.spanId);if(h.Long){var H=new h.Long(0,0,!1);$.observedTimeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.observedTimeUnixNano=K.longs===String?"0":0;$.eventName=""}if(W.timeUnixNano!=null&&W.hasOwnProperty("timeUnixNano"))if(typeof W.timeUnixNano==="number")$.timeUnixNano=K.longs===String?String(W.timeUnixNano):W.timeUnixNano;else $.timeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.timeUnixNano):K.longs===Number?new h.LongBits(W.timeUnixNano.low>>>0,W.timeUnixNano.high>>>0).toNumber():W.timeUnixNano;if(W.severityNumber!=null&&W.hasOwnProperty("severityNumber"))$.severityNumber=K.enums===String?f.opentelemetry.proto.logs.v1.SeverityNumber[W.severityNumber]===void 0?W.severityNumber:f.opentelemetry.proto.logs.v1.SeverityNumber[W.severityNumber]:W.severityNumber;if(W.severityText!=null&&W.hasOwnProperty("severityText"))$.severityText=W.severityText;if(W.body!=null&&W.hasOwnProperty("body"))$.body=f.opentelemetry.proto.common.v1.AnyValue.toObject(W.body,K);if(W.attributes&&W.attributes.length){$.attributes=[];for(var F=0;F<W.attributes.length;++F)$.attributes[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[F],K)}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount"))$.droppedAttributesCount=W.droppedAttributesCount;if(W.flags!=null&&W.hasOwnProperty("flags"))$.flags=W.flags;if(W.traceId!=null&&W.hasOwnProperty("traceId"))$.traceId=K.bytes===String?h.base64.encode(W.traceId,0,W.traceId.length):K.bytes===Array?Array.prototype.slice.call(W.traceId):W.traceId;if(W.spanId!=null&&W.hasOwnProperty("spanId"))$.spanId=K.bytes===String?h.base64.encode(W.spanId,0,W.spanId.length):K.bytes===Array?Array.prototype.slice.call(W.spanId):W.spanId;if(W.observedTimeUnixNano!=null&&W.hasOwnProperty("observedTimeUnixNano"))if(typeof W.observedTimeUnixNano==="number")$.observedTimeUnixNano=K.longs===String?String(W.observedTimeUnixNano):W.observedTimeUnixNano;else $.observedTimeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.observedTimeUnixNano):K.longs===Number?new h.LongBits(W.observedTimeUnixNano.low>>>0,W.observedTimeUnixNano.high>>>0).toNumber():W.observedTimeUnixNano;if(W.eventName!=null&&W.hasOwnProperty("eventName"))$.eventName=W.eventName;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.logs.v1.LogRecord"},G}(),J}(),Y}(),X}(),Q}();fy0.exports=f});var uy0=I((xy0)=>{Object.defineProperty(xy0,"__esModule",{value:!0});xy0.hexToBinary=void 0;function hy0(Q){if(Q>=48&&Q<=57)return Q-48;if(Q>=97&&Q<=102)return Q-87;return Q-55}function Ls4(Q){let X=new Uint8Array(Q.length/2),Y=0;for(let J=0;J<Q.length;J+=2){let G=hy0(Q.charCodeAt(J)),Z=hy0(Q.charCodeAt(J+1));X[Y++]=G<<4|Z}return X}xy0.hexToBinary=Ls4});var K2=I((cy0)=>{Object.defineProperty(cy0,"__esModule",{value:!0});cy0.getOtlpEncoder=cy0.encodeAsString=cy0.encodeAsLongBits=cy0.toLongBits=cy0.hrTimeToNanos=void 0;var ws4=l4(),en=uy0();function Qi(Q){let X=BigInt(1e9);return BigInt(Math.trunc(Q[0]))*X+BigInt(Math.trunc(Q[1]))}cy0.hrTimeToNanos=Qi;function ly0(Q){let X=Number(BigInt.asUintN(32,Q)),Y=Number(BigInt.asUintN(32,Q>>BigInt(32)));return{low:X,high:Y}}cy0.toLongBits=ly0;function Xi(Q){let X=Qi(Q);return ly0(X)}cy0.encodeAsLongBits=Xi;function dy0(Q){return Qi(Q).toString()}cy0.encodeAsString=dy0;var Ms4=typeof BigInt<"u"?dy0:ws4.hrTimeToNanoseconds;function my0(Q){return Q}function py0(Q){if(Q===void 0)return;return(0,en.hexToBinary)(Q)}var Ps4={encodeHrTime:Xi,encodeSpanContext:en.hexToBinary,encodeOptionalSpanContext:py0};function Ts4(Q){if(Q===void 0)return Ps4;let X=Q.useLongBits??!0,Y=Q.useHex??!1;return{encodeHrTime:X?Xi:Ms4,encodeSpanContext:Y?my0:en.hexToBinary,encodeOptionalSpanContext:Y?my0:py0}}cy0.getOtlpEncoder=Ts4});var $2=I((ay0)=>{Object.defineProperty(ay0,"__esModule",{value:!0});ay0.toAnyValue=ay0.toKeyValue=ay0.toAttributes=ay0.createInstrumentationScope=ay0.createResource=void 0;function Cs4(Q){let X={attributes:iy0(Q.attributes),droppedAttributesCount:0},Y=Q.schemaUrl;if(Y&&Y!=="")X.schemaUrl=Y;return X}ay0.createResource=Cs4;function Rs4(Q){return{name:Q.name,version:Q.version}}ay0.createInstrumentationScope=Rs4;function iy0(Q){return Object.keys(Q).map((X)=>Yi(X,Q[X]))}ay0.toAttributes=iy0;function Yi(Q,X){return{key:Q,value:Ji(X)}}ay0.toKeyValue=Yi;function Ji(Q){let X=typeof Q;if(X==="string")return{stringValue:Q};if(X==="number"){if(!Number.isInteger(Q))return{doubleValue:Q};return{intValue:Q}}if(X==="boolean")return{boolValue:Q};if(Q instanceof Uint8Array)return{bytesValue:Q};if(Array.isArray(Q))return{arrayValue:{values:Q.map(Ji)}};if(X==="object"&&Q!=null)return{kvlistValue:{values:Object.entries(Q).map(([Y,J])=>Yi(Y,J))}};return{}}ay0.toAnyValue=Ji});var Gi=I((sy0)=>{Object.defineProperty(sy0,"__esModule",{value:!0});sy0.toLogAttributes=sy0.createExportLogsServiceRequest=void 0;var ys4=K2(),H2=$2();function bs4(Q,X){let Y=(0,ys4.getOtlpEncoder)(X);return{resourceLogs:hs4(Q,Y)}}sy0.createExportLogsServiceRequest=bs4;function fs4(Q){let X=new Map;for(let Y of Q){let{resource:J,instrumentationScope:{name:G,version:Z="",schemaUrl:W=""}}=Y,K=X.get(J);if(!K)K=new Map,X.set(J,K);let $=`${G}@${Z}:${W}`,H=K.get($);if(!H)H=[],K.set($,H);H.push(Y)}return X}function hs4(Q,X){let Y=fs4(Q);return Array.from(Y,([J,G])=>{let Z=(0,H2.createResource)(J);return{resource:Z,scopeLogs:Array.from(G,([,W])=>{return{scope:(0,H2.createInstrumentationScope)(W[0].instrumentationScope),logRecords:W.map((K)=>xs4(K,X)),schemaUrl:W[0].instrumentationScope.schemaUrl}}),schemaUrl:Z.schemaUrl}})}function xs4(Q,X){return{timeUnixNano:X.encodeHrTime(Q.hrTime),observedTimeUnixNano:X.encodeHrTime(Q.hrTimeObserved),severityNumber:gs4(Q.severityNumber),severityText:Q.severityText,body:(0,H2.toAnyValue)(Q.body),eventName:Q.eventName,attributes:oy0(Q.attributes),droppedAttributesCount:Q.droppedAttributesCount,flags:Q.spanContext?.traceFlags,traceId:X.encodeOptionalSpanContext(Q.spanContext?.traceId),spanId:X.encodeOptionalSpanContext(Q.spanContext?.spanId)}}function gs4(Q){return Q}function oy0(Q){return Object.keys(Q).map((X)=>(0,H2.toKeyValue)(X,Q[X]))}sy0.toLogAttributes=oy0});var Yb0=I((Qb0)=>{Object.defineProperty(Qb0,"__esModule",{value:!0});Qb0.ProtobufLogsSerializer=void 0;var ey0=Z2(),ms4=Gi(),ls4=ey0.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,ds4=ey0.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;Qb0.ProtobufLogsSerializer={serializeRequest:(Q)=>{let X=(0,ms4.createExportLogsServiceRequest)(Q);return ds4.encode(X).finish()},deserializeResponse:(Q)=>{return ls4.decode(Q)}}});var Jb0=I((Wi)=>{Object.defineProperty(Wi,"__esModule",{value:!0});Wi.ProtobufLogsSerializer=void 0;var ps4=Yb0();Object.defineProperty(Wi,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return ps4.ProtobufLogsSerializer}})});var Wb0=I((Gb0)=>{Object.defineProperty(Gb0,"__esModule",{value:!0});Gb0.EAggregationTemporality=void 0;var ns4;(function(Q){Q[Q.AGGREGATION_TEMPORALITY_UNSPECIFIED=0]="AGGREGATION_TEMPORALITY_UNSPECIFIED",Q[Q.AGGREGATION_TEMPORALITY_DELTA=1]="AGGREGATION_TEMPORALITY_DELTA",Q[Q.AGGREGATION_TEMPORALITY_CUMULATIVE=2]="AGGREGATION_TEMPORALITY_CUMULATIVE"})(ns4=Gb0.EAggregationTemporality||(Gb0.EAggregationTemporality={}))});var Ki=I((Vb0)=>{Object.defineProperty(Vb0,"__esModule",{value:!0});Vb0.createExportMetricsServiceRequest=Vb0.toMetric=Vb0.toScopeMetrics=Vb0.toResourceMetrics=void 0;var Zb0=G4(),Rq=D7(),Kb0=Wb0(),is4=K2(),mN=$2();function Hb0(Q,X){let Y=(0,is4.getOtlpEncoder)(X),J=(0,mN.createResource)(Q.resource);return{resource:J,schemaUrl:J.schemaUrl,scopeMetrics:Fb0(Q.scopeMetrics,Y)}}Vb0.toResourceMetrics=Hb0;function Fb0(Q,X){return Array.from(Q.map((Y)=>({scope:(0,mN.createInstrumentationScope)(Y.scope),metrics:Y.metrics.map((J)=>qb0(J,X)),schemaUrl:Y.scope.schemaUrl})))}Vb0.toScopeMetrics=Fb0;function qb0(Q,X){let Y={name:Q.descriptor.name,description:Q.descriptor.description,unit:Q.descriptor.unit},J=ss4(Q.aggregationTemporality);switch(Q.dataPointType){case Rq.DataPointType.SUM:Y.sum={aggregationTemporality:J,isMonotonic:Q.isMonotonic,dataPoints:$b0(Q,X)};break;case Rq.DataPointType.GAUGE:Y.gauge={dataPoints:$b0(Q,X)};break;case Rq.DataPointType.HISTOGRAM:Y.histogram={aggregationTemporality:J,dataPoints:rs4(Q,X)};break;case Rq.DataPointType.EXPONENTIAL_HISTOGRAM:Y.exponentialHistogram={aggregationTemporality:J,dataPoints:os4(Q,X)};break}return Y}Vb0.toMetric=qb0;function as4(Q,X,Y){let J={attributes:(0,mN.toAttributes)(Q.attributes),startTimeUnixNano:Y.encodeHrTime(Q.startTime),timeUnixNano:Y.encodeHrTime(Q.endTime)};switch(X){case Zb0.ValueType.INT:J.asInt=Q.value;break;case Zb0.ValueType.DOUBLE:J.asDouble=Q.value;break}return J}function $b0(Q,X){return Q.dataPoints.map((Y)=>{return as4(Y,Q.descriptor.valueType,X)})}function rs4(Q,X){return Q.dataPoints.map((Y)=>{let J=Y.value;return{attributes:(0,mN.toAttributes)(Y.attributes),bucketCounts:J.buckets.counts,explicitBounds:J.buckets.boundaries,count:J.count,sum:J.sum,min:J.min,max:J.max,startTimeUnixNano:X.encodeHrTime(Y.startTime),timeUnixNano:X.encodeHrTime(Y.endTime)}})}function os4(Q,X){return Q.dataPoints.map((Y)=>{let J=Y.value;return{attributes:(0,mN.toAttributes)(Y.attributes),count:J.count,min:J.min,max:J.max,sum:J.sum,positive:{offset:J.positive.offset,bucketCounts:J.positive.bucketCounts},negative:{offset:J.negative.offset,bucketCounts:J.negative.bucketCounts},scale:J.scale,zeroCount:J.zeroCount,startTimeUnixNano:X.encodeHrTime(Y.startTime),timeUnixNano:X.encodeHrTime(Y.endTime)}})}function ss4(Q){switch(Q){case Rq.AggregationTemporality.DELTA:return Kb0.EAggregationTemporality.AGGREGATION_TEMPORALITY_DELTA;case Rq.AggregationTemporality.CUMULATIVE:return Kb0.EAggregationTemporality.AGGREGATION_TEMPORALITY_CUMULATIVE}}function ts4(Q,X){return{resourceMetrics:Q.map((Y)=>Hb0(Y,X))}}Vb0.createExportMetricsServiceRequest=ts4});var Nb0=I((Bb0)=>{Object.defineProperty(Bb0,"__esModule",{value:!0});Bb0.ProtobufMetricsSerializer=void 0;var Ub0=Z2(),Yt4=Ki(),Jt4=Ub0.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,Gt4=Ub0.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;Bb0.ProtobufMetricsSerializer={serializeRequest:(Q)=>{let X=(0,Yt4.createExportMetricsServiceRequest)([Q]);return Gt4.encode(X).finish()},deserializeResponse:(Q)=>{return Jt4.decode(Q)}}});var Ob0=I(($i)=>{Object.defineProperty($i,"__esModule",{value:!0});$i.ProtobufMetricsSerializer=void 0;var Wt4=Nb0();Object.defineProperty($i,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return Wt4.ProtobufMetricsSerializer}})});var Hi=I((Tb0)=>{Object.defineProperty(Tb0,"__esModule",{value:!0});Tb0.createExportTraceServiceRequest=Tb0.toOtlpSpanEvent=Tb0.toOtlpLink=Tb0.sdkSpanToOtlpSpan=void 0;var lN=$2(),Kt4=K2(),$t4=256,Ht4=512;function Lb0(Q,X){let Y=Q&255|$t4;if(X)Y|=Ht4;return Y}function wb0(Q,X){let Y=Q.spanContext(),J=Q.status,G=Q.parentSpanContext?.spanId?X.encodeSpanContext(Q.parentSpanContext?.spanId):void 0;return{traceId:X.encodeSpanContext(Y.traceId),spanId:X.encodeSpanContext(Y.spanId),parentSpanId:G,traceState:Y.traceState?.serialize(),name:Q.name,kind:Q.kind==null?0:Q.kind+1,startTimeUnixNano:X.encodeHrTime(Q.startTime),endTimeUnixNano:X.encodeHrTime(Q.endTime),attributes:(0,lN.toAttributes)(Q.attributes),droppedAttributesCount:Q.droppedAttributesCount,events:Q.events.map((Z)=>Pb0(Z,X)),droppedEventsCount:Q.droppedEventsCount,status:{code:J.code,message:J.message},links:Q.links.map((Z)=>Mb0(Z,X)),droppedLinksCount:Q.droppedLinksCount,flags:Lb0(Y.traceFlags,Q.parentSpanContext?.isRemote)}}Tb0.sdkSpanToOtlpSpan=wb0;function Mb0(Q,X){return{attributes:Q.attributes?(0,lN.toAttributes)(Q.attributes):[],spanId:X.encodeSpanContext(Q.context.spanId),traceId:X.encodeSpanContext(Q.context.traceId),traceState:Q.context.traceState?.serialize(),droppedAttributesCount:Q.droppedAttributesCount||0,flags:Lb0(Q.context.traceFlags,Q.context.isRemote)}}Tb0.toOtlpLink=Mb0;function Pb0(Q,X){return{attributes:Q.attributes?(0,lN.toAttributes)(Q.attributes):[],name:Q.name,timeUnixNano:X.encodeHrTime(Q.time),droppedAttributesCount:Q.droppedAttributesCount||0}}Tb0.toOtlpSpanEvent=Pb0;function Ft4(Q,X){let Y=(0,Kt4.getOtlpEncoder)(X);return{resourceSpans:Vt4(Q,Y)}}Tb0.createExportTraceServiceRequest=Ft4;function qt4(Q){let X=new Map;for(let Y of Q){let J=X.get(Y.resource);if(!J)J=new Map,X.set(Y.resource,J);let G=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,Z=J.get(G);if(!Z)Z=[],J.set(G,Z);Z.push(Y)}return X}function Vt4(Q,X){let Y=qt4(Q),J=[],G=Y.entries(),Z=G.next();while(!Z.done){let[W,K]=Z.value,$=[],H=K.values(),F=H.next();while(!F.done){let U=F.value;if(U.length>0){let D=U.map((N)=>wb0(N,X));$.push({scope:(0,lN.createInstrumentationScope)(U[0].instrumentationScope),spans:D,schemaUrl:U[0].instrumentationScope.schemaUrl})}F=H.next()}let q=(0,lN.createResource)(W),V={resource:q,scopeSpans:$,schemaUrl:q.schemaUrl};J.push(V),Z=G.next()}return J}});var Cb0=I((Ib0)=>{Object.defineProperty(Ib0,"__esModule",{value:!0});Ib0.ProtobufTraceSerializer=void 0;var Eb0=Z2(),Dt4=Hi(),Nt4=Eb0.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,Ot4=Eb0.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;Ib0.ProtobufTraceSerializer={serializeRequest:(Q)=>{let X=(0,Dt4.createExportTraceServiceRequest)(Q);return Ot4.encode(X).finish()},deserializeResponse:(Q)=>{return Nt4.decode(Q)}}});var Rb0=I((Fi)=>{Object.defineProperty(Fi,"__esModule",{value:!0});Fi.ProtobufTraceSerializer=void 0;var Lt4=Cb0();Object.defineProperty(Fi,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return Lt4.ProtobufTraceSerializer}})});var kb0=I((Sb0)=>{Object.defineProperty(Sb0,"__esModule",{value:!0});Sb0.JsonLogsSerializer=void 0;var Mt4=Gi();Sb0.JsonLogsSerializer={serializeRequest:(Q)=>{let X=(0,Mt4.createExportLogsServiceRequest)(Q,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(X))},deserializeResponse:(Q)=>{if(Q.length===0)return{};return JSON.parse(new TextDecoder().decode(Q))}}});var _b0=I((qi)=>{Object.defineProperty(qi,"__esModule",{value:!0});qi.JsonLogsSerializer=void 0;var Pt4=kb0();Object.defineProperty(qi,"JsonLogsSerializer",{enumerable:!0,get:function(){return Pt4.JsonLogsSerializer}})});var fb0=I((yb0)=>{Object.defineProperty(yb0,"__esModule",{value:!0});yb0.JsonMetricsSerializer=void 0;var At4=Ki();yb0.JsonMetricsSerializer={serializeRequest:(Q)=>{let X=(0,At4.createExportMetricsServiceRequest)([Q],{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(X))},deserializeResponse:(Q)=>{if(Q.length===0)return{};return JSON.parse(new TextDecoder().decode(Q))}}});var hb0=I((Vi)=>{Object.defineProperty(Vi,"__esModule",{value:!0});Vi.JsonMetricsSerializer=void 0;var Et4=fb0();Object.defineProperty(Vi,"JsonMetricsSerializer",{enumerable:!0,get:function(){return Et4.JsonMetricsSerializer}})});var ub0=I((xb0)=>{Object.defineProperty(xb0,"__esModule",{value:!0});xb0.JsonTraceSerializer=void 0;var jt4=Hi();xb0.JsonTraceSerializer={serializeRequest:(Q)=>{let X=(0,jt4.createExportTraceServiceRequest)(Q,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(X))},deserializeResponse:(Q)=>{if(Q.length===0)return{};return JSON.parse(new TextDecoder().decode(Q))}}});var mb0=I((zi)=>{Object.defineProperty(zi,"__esModule",{value:!0});zi.JsonTraceSerializer=void 0;var Ct4=ub0();Object.defineProperty(zi,"JsonTraceSerializer",{enumerable:!0,get:function(){return Ct4.JsonTraceSerializer}})});var t5=I((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.JsonTraceSerializer=zZ.JsonMetricsSerializer=zZ.JsonLogsSerializer=zZ.ProtobufTraceSerializer=zZ.ProtobufMetricsSerializer=zZ.ProtobufLogsSerializer=void 0;var St4=Jb0();Object.defineProperty(zZ,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return St4.ProtobufLogsSerializer}});var vt4=Ob0();Object.defineProperty(zZ,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return vt4.ProtobufMetricsSerializer}});var kt4=Rb0();Object.defineProperty(zZ,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return kt4.ProtobufTraceSerializer}});var _t4=_b0();Object.defineProperty(zZ,"JsonLogsSerializer",{enumerable:!0,get:function(){return _t4.JsonLogsSerializer}});var yt4=hb0();Object.defineProperty(zZ,"JsonMetricsSerializer",{enumerable:!0,get:function(){return yt4.JsonMetricsSerializer}});var bt4=mb0();Object.defineProperty(zZ,"JsonTraceSerializer",{enumerable:!0,get:function(){return bt4.JsonTraceSerializer}})});var pb0=I((lb0)=>{Object.defineProperty(lb0,"__esModule",{value:!0});lb0.validateAndNormalizeHeaders=void 0;var ht4=G4();function xt4(Q){return()=>{let X={};return Object.entries(Q?.()??{}).forEach(([Y,J])=>{if(typeof J<"u")X[Y]=String(J);else ht4.diag.warn(`Header "${Y}" has invalid value (${J}) and will be ignored`)}),X}}lb0.validateAndNormalizeHeaders=xt4});var ab0=I((nb0)=>{Object.defineProperty(nb0,"__esModule",{value:!0});nb0.getHttpConfigurationDefaults=nb0.mergeOtlpHttpConfigurationWithDefaults=void 0;var cb0=hN(),gt4=pb0();function ut4(Q,X,Y){let J={...Y()},G={};return()=>{if(X!=null)Object.assign(G,X());if(Q!=null)Object.assign(G,Q());return Object.assign(G,J)}}function mt4(Q){if(Q==null)return;try{let X=globalThis.location?.href;return new URL(Q,X).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Q}'`)}}function lt4(Q,X,Y){return{...(0,cb0.mergeOtlpSharedConfigurationWithDefaults)(Q,X,Y),headers:ut4((0,gt4.validateAndNormalizeHeaders)(Q.headers),X.headers,Y.headers),url:mt4(Q.url)??X.url??Y.url}}nb0.mergeOtlpHttpConfigurationWithDefaults=lt4;function dt4(Q,X){return{...(0,cb0.getSharedConfigurationDefaults)(),headers:()=>Q,url:"http://localhost:4318/"+X}}nb0.getHttpConfigurationDefaults=dt4});var F2=I((sb0)=>{Object.defineProperty(sb0,"__esModule",{value:!0});sb0.getNodeHttpConfigurationDefaults=sb0.mergeOtlpNodeHttpConfigurationWithDefaults=sb0.httpAgentFactoryFromOptions=void 0;var rb0=ab0();function ob0(Q){return async(X)=>{let Y=X==="http:",J=Y?import("http"):import("https"),{Agent:G}=await J;if(Y){let{ca:Z,cert:W,key:K,...$}=Q;return new G($)}return new G(Q)}}sb0.httpAgentFactoryFromOptions=ob0;function ct4(Q,X,Y){return{...(0,rb0.mergeOtlpHttpConfigurationWithDefaults)(Q,X,Y),agentFactory:Q.agentFactory??X.agentFactory??Y.agentFactory,userAgent:Q.userAgent}}sb0.mergeOtlpNodeHttpConfigurationWithDefaults=ct4;function nt4(Q,X){return{...(0,rb0.getHttpConfigurationDefaults)(Q,X),agentFactory:ob0({keepAlive:!0})}}sb0.getNodeHttpConfigurationDefaults=nt4});var Xf0=I((eb0)=>{Object.defineProperty(eb0,"__esModule",{value:!0});eb0.parseRetryAfterToMills=eb0.isExportRetryable=void 0;function rt4(Q){return[429,502,503,504].includes(Q)}eb0.isExportRetryable=rt4;function ot4(Q){if(Q==null)return;let X=Number.parseInt(Q,10);if(Number.isInteger(X))return X>0?X*1000:-1;let Y=new Date(Q).getTime()-Date.now();if(Y>=0)return Y;return 0}eb0.parseRetryAfterToMills=ot4});var Gf0=I((Yf0)=>{Object.defineProperty(Yf0,"__esModule",{value:!0});Yf0.VERSION=void 0;Yf0.VERSION="0.207.0"});var Ff0=I(($f0)=>{Object.defineProperty($f0,"__esModule",{value:!0});$f0.compressAndSend=$f0.sendWithHttp=void 0;var tt4=z0("zlib"),et4=z0("stream"),Wf0=Xf0(),Qe4=eC(),Xe4=Gf0(),Zf0=`OTel-OTLP-Exporter-JavaScript/${Xe4.VERSION}`;function Ye4(Q,X,Y,J,G,Z){let W=new URL(X.url),K={...X.headers()};if(X.userAgent)K["User-Agent"]=`${X.userAgent} ${Zf0}`;else K["User-Agent"]=Zf0;let $={hostname:W.hostname,port:W.port,path:W.pathname,method:"POST",headers:K,agent:Y},H=Q($,(F)=>{let q=[];F.on("data",(V)=>q.push(V)),F.on("end",()=>{if(F.statusCode&&F.statusCode<299)G({status:"success",data:Buffer.concat(q)});else if(F.statusCode&&(0,Wf0.isExportRetryable)(F.statusCode))G({status:"retryable",retryInMillis:(0,Wf0.parseRetryAfterToMills)(F.headers["retry-after"])});else{let V=new Qe4.OTLPExporterError(F.statusMessage,F.statusCode,Buffer.concat(q).toString());G({status:"failure",error:V})}})});H.setTimeout(Z,()=>{H.destroy(),G({status:"failure",error:Error("Request Timeout")})}),H.on("error",(F)=>{G({status:"failure",error:F})}),Kf0(H,X.compression,J,(F)=>{G({status:"failure",error:F})})}$f0.sendWithHttp=Ye4;function Kf0(Q,X,Y,J){let G=Je4(Y);if(X==="gzip")Q.setHeader("Content-Encoding","gzip"),G=G.on("error",J).pipe(tt4.createGzip()).on("error",J);G.pipe(Q).on("error",J)}$f0.compressAndSend=Kf0;function Je4(Q){let X=new et4.Readable;return X.push(Q),X.push(null),X}});var Uf0=I((Vf0)=>{Object.defineProperty(Vf0,"__esModule",{value:!0});Vf0.createHttpExporterTransport=void 0;var We4=Ff0();class qf0{_parameters;_utils=null;constructor(Q){this._parameters=Q}async send(Q,X){let{agent:Y,request:J}=await this._loadUtils();return new Promise((G)=>{(0,We4.sendWithHttp)(J,this._parameters,Y,Q,(Z)=>{G(Z)},X)})}shutdown(){}async _loadUtils(){let Q=this._utils;if(Q===null){let X=new URL(this._parameters.url).protocol,[Y,J]=await Promise.all([this._parameters.agentFactory(X),Ze4(X)]);Q=this._utils={agent:Y,request:J}}return Q}}async function Ze4(Q){let X=Q==="http:"?import("http"):import("https"),{request:Y}=await X;return Y}function Ke4(Q){return new qf0(Q)}Vf0.createHttpExporterTransport=Ke4});var Lf0=I((Nf0)=>{Object.defineProperty(Nf0,"__esModule",{value:!0});Nf0.createRetryingTransport=void 0;var $e4=5,He4=1000,Fe4=5000,qe4=1.5,Bf0=0.2;function Ve4(){return Math.random()*(2*Bf0)-Bf0}class Df0{_transport;constructor(Q){this._transport=Q}retry(Q,X,Y){return new Promise((J,G)=>{setTimeout(()=>{this._transport.send(Q,X).then(J,G)},Y)})}async send(Q,X){let Y=Date.now()+X,J=await this._transport.send(Q,X),G=$e4,Z=He4;while(J.status==="retryable"&&G>0){G--;let W=Math.max(Math.min(Z,Fe4)+Ve4(),0);Z=Z*qe4;let K=J.retryInMillis??W,$=Y-Date.now();if(K>$)return J;J=await this.retry(Q,$,K)}return J}shutdown(){return this._transport.shutdown()}}function ze4(Q){return new Df0(Q.transport)}Nf0.createRetryingTransport=ze4});var Pf0=I((wf0)=>{Object.defineProperty(wf0,"__esModule",{value:!0});wf0.createOtlpHttpExportDelegate=void 0;var Ue4=_n(),Be4=Uf0(),De4=kn(),Ne4=Lf0();function Oe4(Q,X){return(0,Ue4.createOtlpExportDelegate)({transport:(0,Ne4.createRetryingTransport)({transport:(0,Be4.createHttpExporterTransport)(Q)}),serializer:X,promiseHandler:(0,De4.createBoundedQueueExportPromiseHandler)(Q)},{timeout:Q.timeoutMillis})}wf0.createOtlpHttpExportDelegate=Oe4});var Ui=I((jf0)=>{Object.defineProperty(jf0,"__esModule",{value:!0});jf0.getSharedConfigurationFromEnvironment=void 0;var Ef0=l4(),If0=G4();function Tf0(Q){let X=(0,Ef0.getNumberFromEnv)(Q);if(X!=null){if(Number.isFinite(X)&&X>0)return X;If0.diag.warn(`Configuration: ${Q} is invalid, expected number greater than 0 (actual: ${X})`)}return}function Le4(Q){let X=Tf0(`OTEL_EXPORTER_OTLP_${Q}_TIMEOUT`),Y=Tf0("OTEL_EXPORTER_OTLP_TIMEOUT");return X??Y}function Af0(Q){let X=(0,Ef0.getStringFromEnv)(Q)?.trim();if(X==null||X==="none"||X==="gzip")return X;If0.diag.warn(`Configuration: ${Q} is invalid, expected 'none' or 'gzip' (actual: '${X}')`);return}function we4(Q){let X=Af0(`OTEL_EXPORTER_OTLP_${Q}_COMPRESSION`),Y=Af0("OTEL_EXPORTER_OTLP_COMPRESSION");return X??Y}function Me4(Q){return{timeoutMillis:Le4(Q),compression:we4(Q)}}jf0.getSharedConfigurationFromEnvironment=Me4});var vf0=I((Rf0)=>{Object.defineProperty(Rf0,"__esModule",{value:!0});Rf0.getNodeHttpConfigurationFromEnvironment=void 0;var Pe4=z0("fs"),Te4=z0("path"),e5=l4(),q2=G4(),Ae4=Ui(),Ee4=hN(),Ie4=F2();function je4(Q){let X=(0,e5.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Q}_HEADERS`),Y=(0,e5.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),J=(0,e5.parseKeyPairsIntoRecord)(X),G=(0,e5.parseKeyPairsIntoRecord)(Y);if(Object.keys(J).length===0&&Object.keys(G).length===0)return;return Object.assign({},(0,e5.parseKeyPairsIntoRecord)(Y),(0,e5.parseKeyPairsIntoRecord)(X))}function Ce4(Q){try{return new URL(Q).toString()}catch{q2.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Q}', falling back to undefined`);return}}function Re4(Q,X){try{new URL(Q)}catch{q2.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Q}', falling back to undefined`);return}if(!Q.endsWith("/"))Q=Q+"/";Q+=X;try{new URL(Q)}catch{q2.diag.warn(`Configuration: Provided URL appended with '${X}' is not a valid URL, using 'undefined' instead of '${Q}'`);return}return Q}function Se4(Q){let X=(0,e5.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if(X===void 0)return;return Re4(X,Q)}function ve4(Q){let X=(0,e5.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Q}_ENDPOINT`);if(X===void 0)return;return Ce4(X)}function Bi(Q,X,Y){let J=(0,e5.getStringFromEnv)(Q),G=(0,e5.getStringFromEnv)(X),Z=J??G;if(Z!=null)try{return Pe4.readFileSync(Te4.resolve(process.cwd(),Z))}catch{q2.diag.warn(Y);return}else return}function ke4(Q){return Bi(`OTEL_EXPORTER_OTLP_${Q}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function _e4(Q){return Bi(`OTEL_EXPORTER_OTLP_${Q}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function ye4(Q){return Bi(`OTEL_EXPORTER_OTLP_${Q}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function be4(Q,X){return{...(0,Ae4.getSharedConfigurationFromEnvironment)(Q),url:ve4(Q)??Se4(X),headers:(0,Ee4.wrapStaticHeadersInFunction)(je4(Q)),agentFactory:(0,Ie4.httpAgentFactoryFromOptions)({keepAlive:!0,ca:ye4(Q),cert:ke4(Q),key:_e4(Q)})}}Rf0.getNodeHttpConfigurationFromEnvironment=be4});var bf0=I((_f0)=>{Object.defineProperty(_f0,"__esModule",{value:!0});_f0.convertLegacyHttpOptions=void 0;var fe4=G4(),he4=hN(),kf0=F2(),xe4=O7(),ge4=vf0();function ue4(Q){if(typeof Q.httpAgentOptions==="function")return Q.httpAgentOptions;let X=Q.httpAgentOptions;if(Q.keepAlive!=null)X={keepAlive:Q.keepAlive,...X};if(X!=null)return(0,xe4.httpAgentFactoryFromOptions)(X);else return}function me4(Q,X,Y,J){if(Q.metadata)fe4.diag.warn("Metadata cannot be set when using http");return(0,kf0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Q.url,headers:(0,he4.wrapStaticHeadersInFunction)(Q.headers),concurrencyLimit:Q.concurrencyLimit,timeoutMillis:Q.timeoutMillis,compression:Q.compression,agentFactory:ue4(Q),userAgent:Q.userAgent},(0,ge4.getNodeHttpConfigurationFromEnvironment)(X,Y),(0,kf0.getNodeHttpConfigurationDefaults)(J,Y))}_f0.convertLegacyHttpOptions=me4});var O7=I((Sq)=>{Object.defineProperty(Sq,"__esModule",{value:!0});Sq.convertLegacyHttpOptions=Sq.getSharedConfigurationFromEnvironment=Sq.createOtlpHttpExportDelegate=Sq.httpAgentFactoryFromOptions=void 0;var le4=F2();Object.defineProperty(Sq,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return le4.httpAgentFactoryFromOptions}});var de4=Pf0();Object.defineProperty(Sq,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return de4.createOtlpHttpExportDelegate}});var pe4=Ui();Object.defineProperty(Sq,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return pe4.getSharedConfigurationFromEnvironment}});var ce4=bf0();Object.defineProperty(Sq,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return ce4.convertLegacyHttpOptions}})});var uf0=I((xf0)=>{Object.defineProperty(xf0,"__esModule",{value:!0});xf0.OTLPLogExporter=void 0;var ie4=r5(),ae4=t5(),ff0=O7();class hf0 extends ie4.OTLPExporterBase{constructor(Q={}){super((0,ff0.createOtlpHttpExportDelegate)((0,ff0.convertLegacyHttpOptions)(Q,"LOGS","v1/logs",{"Content-Type":"application/json"}),ae4.JsonLogsSerializer))}}xf0.OTLPLogExporter=hf0});var mf0=I((Di)=>{Object.defineProperty(Di,"__esModule",{value:!0});Di.OTLPLogExporter=void 0;var re4=uf0();Object.defineProperty(Di,"OTLPLogExporter",{enumerable:!0,get:function(){return re4.OTLPLogExporter}})});var lf0=I((Ni)=>{Object.defineProperty(Ni,"__esModule",{value:!0});Ni.OTLPLogExporter=void 0;var se4=mf0();Object.defineProperty(Ni,"OTLPLogExporter",{enumerable:!0,get:function(){return se4.OTLPLogExporter}})});var df0=I((Oi)=>{Object.defineProperty(Oi,"__esModule",{value:!0});Oi.OTLPLogExporter=void 0;var ee4=lf0();Object.defineProperty(Oi,"OTLPLogExporter",{enumerable:!0,get:function(){return ee4.OTLPLogExporter}})});var nf0=I((pf0)=>{Object.defineProperty(pf0,"__esModule",{value:!0});pf0.VERSION=void 0;pf0.VERSION="0.207.0"});var z6=I((of0)=>{Object.defineProperty(of0,"__esModule",{value:!0});of0.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=of0.DEFAULT_MAX_SEND_MESSAGE_LENGTH=of0.Propagate=of0.LogVerbosity=of0.Status=void 0;var if0;(function(Q){Q[Q.OK=0]="OK",Q[Q.CANCELLED=1]="CANCELLED",Q[Q.UNKNOWN=2]="UNKNOWN",Q[Q.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Q[Q.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Q[Q.NOT_FOUND=5]="NOT_FOUND",Q[Q.ALREADY_EXISTS=6]="ALREADY_EXISTS",Q[Q.PERMISSION_DENIED=7]="PERMISSION_DENIED",Q[Q.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Q[Q.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Q[Q.ABORTED=10]="ABORTED",Q[Q.OUT_OF_RANGE=11]="OUT_OF_RANGE",Q[Q.UNIMPLEMENTED=12]="UNIMPLEMENTED",Q[Q.INTERNAL=13]="INTERNAL",Q[Q.UNAVAILABLE=14]="UNAVAILABLE",Q[Q.DATA_LOSS=15]="DATA_LOSS",Q[Q.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(if0||(of0.Status=if0={}));var af0;(function(Q){Q[Q.DEBUG=0]="DEBUG",Q[Q.INFO=1]="INFO",Q[Q.ERROR=2]="ERROR",Q[Q.NONE=3]="NONE"})(af0||(of0.LogVerbosity=af0={}));var rf0;(function(Q){Q[Q.DEADLINE=1]="DEADLINE",Q[Q.CENSUS_STATS_CONTEXT=2]="CENSUS_STATS_CONTEXT",Q[Q.CENSUS_TRACING_CONTEXT=4]="CENSUS_TRACING_CONTEXT",Q[Q.CANCELLATION=8]="CANCELLATION",Q[Q.DEFAULTS=65535]="DEFAULTS"})(rf0||(of0.Propagate=rf0={}));of0.DEFAULT_MAX_SEND_MESSAGE_LENGTH=-1;of0.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=4194304});var Li=I((u51,W06)=>{W06.exports={name:"@grpc/grpc-js",version:"1.14.3",description:"gRPC Library for Node - pure JS implementation",homepage:"https://grpc.io/",repository:"https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",main:"build/src/index.js",engines:{node:">=12.10.0"},keywords:[],author:{name:"Google Inc."},types:"build/src/index.d.ts",license:"Apache-2.0",devDependencies:{"@grpc/proto-loader":"file:../proto-loader","@types/gulp":"^4.0.17","@types/gulp-mocha":"0.0.37","@types/lodash":"^4.14.202","@types/mocha":"^10.0.6","@types/ncp":"^2.0.8","@types/node":">=20.11.20","@types/pify":"^5.0.4","@types/semver":"^7.5.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","@typescript-eslint/typescript-estree":"^7.1.0","clang-format":"^1.8.0",eslint:"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1",execa:"^2.0.3",gulp:"^4.0.2","gulp-mocha":"^6.0.0",lodash:"^4.17.21",madge:"^5.0.1","mocha-jenkins-reporter":"^0.4.1",ncp:"^2.0.0",pify:"^4.0.1",prettier:"^2.8.8",rimraf:"^3.0.2",semver:"^7.6.0","ts-node":"^10.9.2",typescript:"^5.3.3"},contributors:[{name:"Google Inc."}],scripts:{build:"npm run compile",clean:"rimraf ./build",compile:"tsc -p .",format:'clang-format -i -style="{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}" src/*.ts test/*.ts',lint:"eslint src/*.ts test/*.ts",prepare:"npm run copy-protos && npm run generate-types && npm run generate-test-types && npm run compile",test:"gulp test",check:"npm run lint",fix:"eslint --fix src/*.ts test/*.ts",pretest:"npm run generate-types && npm run generate-test-types && npm run compile",posttest:"npm run check && madge -c ./build/src","generate-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs proto/ proto/xds/ proto/protoc-gen-validate/ -O src/generated/ --grpcLib ../index channelz.proto xds/service/orca/v3/orca.proto","generate-test-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto echo_service.proto","copy-protos":"node ./copy-protos"},dependencies:{"@grpc/proto-loader":"^0.8.0","@js-sdsl/ordered-map":"^4.4.2"},files:["src/**/*.ts","build/src/**/*.{js,d.ts,js.map}","proto/**/*.proto","proto/**/LICENSE","LICENSE","deps/envoy-api/envoy/api/v2/**/*.proto","deps/envoy-api/envoy/config/**/*.proto","deps/envoy-api/envoy/service/**/*.proto","deps/envoy-api/envoy/type/**/*.proto","deps/udpa/udpa/**/*.proto","deps/googleapis/google/api/*.proto","deps/googleapis/google/rpc/*.proto","deps/protoc-gen-validate/validate/**/*.proto"]}});var h1=I((Qh0)=>{var wi,Mi,Pi,Ti;Object.defineProperty(Qh0,"__esModule",{value:!0});Qh0.log=Qh0.setLoggerVerbosity=Qh0.setLogger=Qh0.getLogger=void 0;Qh0.trace=D06;Qh0.isTracerEnabled=ef0;var UZ=z6(),Z06=z0("process"),K06=Li().version,$06={error:(Q,...X)=>{console.error("E "+Q,...X)},info:(Q,...X)=>{console.error("I "+Q,...X)},debug:(Q,...X)=>{console.error("D "+Q,...X)}},W$=$06,vq=UZ.LogVerbosity.ERROR,H06=(Mi=(wi=process.env.GRPC_NODE_VERBOSITY)!==null&&wi!==void 0?wi:process.env.GRPC_VERBOSITY)!==null&&Mi!==void 0?Mi:"";switch(H06.toUpperCase()){case"DEBUG":vq=UZ.LogVerbosity.DEBUG;break;case"INFO":vq=UZ.LogVerbosity.INFO;break;case"ERROR":vq=UZ.LogVerbosity.ERROR;break;case"NONE":vq=UZ.LogVerbosity.NONE;break;default:}var F06=()=>{return W$};Qh0.getLogger=F06;var q06=(Q)=>{W$=Q};Qh0.setLogger=q06;var V06=(Q)=>{vq=Q};Qh0.setLoggerVerbosity=V06;var z06=(Q,...X)=>{let Y;if(Q>=vq){switch(Q){case UZ.LogVerbosity.DEBUG:Y=W$.debug;break;case UZ.LogVerbosity.INFO:Y=W$.info;break;case UZ.LogVerbosity.ERROR:Y=W$.error;break}if(!Y)Y=W$.error;if(Y)Y.bind(W$)(...X)}};Qh0.log=z06;var U06=(Ti=(Pi=process.env.GRPC_NODE_TRACE)!==null&&Pi!==void 0?Pi:process.env.GRPC_TRACE)!==null&&Ti!==void 0?Ti:"",Ai=new Set,tf0=new Set;for(let Q of U06.split(","))if(Q.startsWith("-"))tf0.add(Q.substring(1));else Ai.add(Q);var B06=Ai.has("all");function D06(Q,X,Y){if(ef0(X))Qh0.log(Q,new Date().toISOString()+" | v"+K06+" "+Z06.pid+" | "+X+" | "+Y)}function ef0(Q){return!tf0.has(Q)&&(B06||Ai.has(Q))}});var V2=I((Xh0)=>{Object.defineProperty(Xh0,"__esModule",{value:!0});Xh0.getErrorMessage=P06;Xh0.getErrorCode=T06;function P06(Q){if(Q instanceof Error)return Q.message;else return String(Q)}function T06(Q){if(typeof Q==="object"&&Q!==null&&"code"in Q&&typeof Q.code==="number")return Q.code;else return null}});var P9=I((Gh0)=>{Object.defineProperty(Gh0,"__esModule",{value:!0});Gh0.Metadata=void 0;var I06=h1(),j06=z6(),C06=V2(),R06=/^[:0-9a-z_.-]+$/,S06=/^[ -~]*$/;function v06(Q){return R06.test(Q)}function k06(Q){return S06.test(Q)}function Jh0(Q){return Q.endsWith("-bin")}function _06(Q){return!Q.startsWith("grpc-")}function z2(Q){return Q.toLowerCase()}function Yh0(Q,X){if(!v06(Q))throw Error('Metadata key "'+Q+'" contains illegal characters');if(X!==null&&X!==void 0)if(Jh0(Q)){if(!Buffer.isBuffer(X))throw Error("keys that end with '-bin' must have Buffer values")}else{if(Buffer.isBuffer(X))throw Error("keys that don't end with '-bin' must have String values");if(!k06(X))throw Error('Metadata string value "'+X+'" contains illegal characters')}}class U2{constructor(Q={}){this.internalRepr=new Map,this.opaqueData=new Map,this.options=Q}set(Q,X){Q=z2(Q),Yh0(Q,X),this.internalRepr.set(Q,[X])}add(Q,X){Q=z2(Q),Yh0(Q,X);let Y=this.internalRepr.get(Q);if(Y===void 0)this.internalRepr.set(Q,[X]);else Y.push(X)}remove(Q){Q=z2(Q),this.internalRepr.delete(Q)}get(Q){return Q=z2(Q),this.internalRepr.get(Q)||[]}getMap(){let Q={};for(let[X,Y]of this.internalRepr)if(Y.length>0){let J=Y[0];Q[X]=Buffer.isBuffer(J)?Buffer.from(J):J}return Q}clone(){let Q=new U2(this.options),X=Q.internalRepr;for(let[Y,J]of this.internalRepr){let G=J.map((Z)=>{if(Buffer.isBuffer(Z))return Buffer.from(Z);else return Z});X.set(Y,G)}return Q}merge(Q){for(let[X,Y]of Q.internalRepr){let J=(this.internalRepr.get(X)||[]).concat(Y);this.internalRepr.set(X,J)}}setOptions(Q){this.options=Q}getOptions(){return this.options}toHttp2Headers(){let Q={};for(let[X,Y]of this.internalRepr){if(X.startsWith(":"))continue;Q[X]=Y.map(y06)}return Q}toJSON(){let Q={};for(let[X,Y]of this.internalRepr)Q[X]=Y;return Q}setOpaque(Q,X){this.opaqueData.set(Q,X)}getOpaque(Q){return this.opaqueData.get(Q)}static fromHttp2Headers(Q){let X=new U2;for(let Y of Object.keys(Q)){if(Y.charAt(0)===":")continue;let J=Q[Y];try{if(Jh0(Y)){if(Array.isArray(J))J.forEach((G)=>{X.add(Y,Buffer.from(G,"base64"))});else if(J!==void 0)if(_06(Y))J.split(",").forEach((G)=>{X.add(Y,Buffer.from(G.trim(),"base64"))});else X.add(Y,Buffer.from(J,"base64"))}else if(Array.isArray(J))J.forEach((G)=>{X.add(Y,G)});else if(J!==void 0)X.add(Y,J)}catch(G){let Z=`Failed to add metadata entry ${Y}: ${J}. ${(0,C06.getErrorMessage)(G)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;(0,I06.log)(j06.LogVerbosity.ERROR,Z)}}return X}}Gh0.Metadata=U2;var y06=(Q)=>{return Buffer.isBuffer(Q)?Q.toString("base64"):Q}});var D2=I((Zh0)=>{Object.defineProperty(Zh0,"__esModule",{value:!0});Zh0.CallCredentials=void 0;var Ii=P9();function b06(Q){return"getRequestHeaders"in Q&&typeof Q.getRequestHeaders==="function"}class kq{static createFromMetadataGenerator(Q){return new ji(Q)}static createFromGoogleCredential(Q){return kq.createFromMetadataGenerator((X,Y)=>{let J;if(b06(Q))J=Q.getRequestHeaders(X.service_url);else J=new Promise((G,Z)=>{Q.getRequestMetadata(X.service_url,(W,K)=>{if(W){Z(W);return}if(!K){Z(Error("Headers not set by metadata plugin"));return}G(K)})});J.then((G)=>{let Z=new Ii.Metadata;for(let W of Object.keys(G))Z.add(W,G[W]);Y(null,Z)},(G)=>{Y(G)})})}static createEmpty(){return new Ci}}Zh0.CallCredentials=kq;class B2 extends kq{constructor(Q){super();this.creds=Q}async generateMetadata(Q){let X=new Ii.Metadata,Y=await Promise.all(this.creds.map((J)=>J.generateMetadata(Q)));for(let J of Y)X.merge(J);return X}compose(Q){return new B2(this.creds.concat([Q]))}_equals(Q){if(this===Q)return!0;if(Q instanceof B2)return this.creds.every((X,Y)=>X._equals(Q.creds[Y]));else return!1}}class ji extends kq{constructor(Q){super();this.metadataGenerator=Q}generateMetadata(Q){return new Promise((X,Y)=>{this.metadataGenerator(Q,(J,G)=>{if(G!==void 0)X(G);else Y(J)})})}compose(Q){return new B2([this,Q])}_equals(Q){if(this===Q)return!0;if(Q instanceof ji)return this.metadataGenerator===Q.metadataGenerator;else return!1}}class Ci extends kq{generateMetadata(Q){return Promise.resolve(new Ii.Metadata)}compose(Q){return Q}_equals(Q){return Q instanceof Ci}}});var Si=I((Hh0)=>{Object.defineProperty(Hh0,"__esModule",{value:!0});Hh0.CIPHER_SUITES=void 0;Hh0.getDefaultRootsData=h06;var f06=z0("fs");Hh0.CIPHER_SUITES=process.env.GRPC_SSL_CIPHER_SUITES;var $h0=process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH,Ri=null;function h06(){if($h0){if(Ri===null)Ri=f06.readFileSync($h0);return Ri}return null}});var nQ=I((Vh0)=>{Object.defineProperty(Vh0,"__esModule",{value:!0});Vh0.parseUri=u06;Vh0.splitHostPort=m06;Vh0.combineHostPort=l06;Vh0.uriToString=d06;var g06=/^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/;function u06(Q){let X=g06.exec(Q);if(X===null)return null;return{scheme:X[1],authority:X[2],path:X[3]}}var qh0=/^\d+$/;function m06(Q){if(Q.startsWith("[")){let X=Q.indexOf("]");if(X===-1)return null;let Y=Q.substring(1,X);if(Y.indexOf(":")===-1)return null;if(Q.length>X+1)if(Q[X+1]===":"){let J=Q.substring(X+2);if(qh0.test(J))return{host:Y,port:+J};else return null}else return null;else return{host:Y}}else{let X=Q.split(":");if(X.length===2)if(qh0.test(X[1]))return{host:X[0],port:+X[1]};else return null;else return{host:Q}}}function l06(Q){if(Q.port===void 0)return Q.host;else if(Q.host.includes(":"))return`[${Q.host}]:${Q.port}`;else return`${Q.host}:${Q.port}`}function d06(Q){let X="";if(Q.scheme!==void 0)X+=Q.scheme+":";if(Q.authority!==void 0)X+="//"+Q.authority+"/";return X+=Q.path,X}});var hJ=I((zh0)=>{Object.defineProperty(zh0,"__esModule",{value:!0});zh0.CHANNEL_ARGS_CONFIG_SELECTOR_KEY=void 0;zh0.registerResolver=a06;zh0.registerDefaultScheme=r06;zh0.createResolver=o06;zh0.getDefaultAuthority=s06;zh0.mapUriDefaultScheme=t06;var ki=nQ();zh0.CHANNEL_ARGS_CONFIG_SELECTOR_KEY="grpc.internal.config_selector";var _q={},vi=null;function a06(Q,X){_q[Q]=X}function r06(Q){vi=Q}function o06(Q,X,Y){if(Q.scheme!==void 0&&Q.scheme in _q)return new _q[Q.scheme](Q,X,Y);else throw Error(`No resolver could be created for target ${(0,ki.uriToString)(Q)}`)}function s06(Q){if(Q.scheme!==void 0&&Q.scheme in _q)return _q[Q.scheme].getDefaultAuthority(Q);else throw Error(`Invalid target ${(0,ki.uriToString)(Q)}`)}function t06(Q){if(Q.scheme===void 0||!(Q.scheme in _q))if(vi!==null)return{scheme:vi,authority:void 0,path:(0,ki.uriToString)(Q)};else return null;return Q}});var bq=I((Oh0)=>{Object.defineProperty(Oh0,"__esModule",{value:!0});Oh0.ChannelCredentials=void 0;Oh0.createCertificateProviderChannelCredentials=K46;var pN=z0("tls"),L2=D2(),yi=Si(),Bh0=nQ(),G46=hJ(),W46=h1(),Z46=z6();function _i(Q,X){if(Q&&!(Q instanceof Buffer))throw TypeError(`${X}, if provided, must be a Buffer.`)}class yq{compose(Q){return new O2(this,Q)}static createSsl(Q,X,Y,J){var G;if(_i(Q,"Root certificate"),_i(X,"Private key"),_i(Y,"Certificate chain"),X&&!Y)throw Error("Private key must be given with accompanying certificate chain");if(!X&&Y)throw Error("Certificate chain must be given with accompanying private key");let Z=(0,pN.createSecureContext)({ca:(G=Q!==null&&Q!==void 0?Q:(0,yi.getDefaultRootsData)())!==null&&G!==void 0?G:void 0,key:X!==null&&X!==void 0?X:void 0,cert:Y!==null&&Y!==void 0?Y:void 0,ciphers:yi.CIPHER_SUITES});return new N2(Z,J!==null&&J!==void 0?J:{})}static createFromSecureContext(Q,X){return new N2(Q,X!==null&&X!==void 0?X:{})}static createInsecure(){return new bi}}Oh0.ChannelCredentials=yq;class bi extends yq{constructor(){super()}compose(Q){throw Error("Cannot compose insecure credentials")}_isSecure(){return!1}_equals(Q){return Q instanceof bi}_createSecureConnector(Q,X,Y){return{connect(J){return Promise.resolve({socket:J,secure:!1})},waitForReady:()=>{return Promise.resolve()},getCallCredentials:()=>{return Y!==null&&Y!==void 0?Y:L2.CallCredentials.createEmpty()},destroy(){}}}}function Dh0(Q,X,Y,J){var G,Z;let W={secureContext:Q},K=Y;if("grpc.http_connect_target"in J){let q=(0,Bh0.parseUri)(J["grpc.http_connect_target"]);if(q)K=q}let $=(0,G46.getDefaultAuthority)(K),H=(0,Bh0.splitHostPort)($),F=(G=H===null||H===void 0?void 0:H.host)!==null&&G!==void 0?G:$;if(W.host=F,X.checkServerIdentity)W.checkServerIdentity=X.checkServerIdentity;if(X.rejectUnauthorized!==void 0)W.rejectUnauthorized=X.rejectUnauthorized;if(W.ALPNProtocols=["h2"],J["grpc.ssl_target_name_override"]){let q=J["grpc.ssl_target_name_override"],V=(Z=W.checkServerIdentity)!==null&&Z!==void 0?Z:pN.checkServerIdentity;W.checkServerIdentity=(U,D)=>{return V(q,D)},W.servername=q}else W.servername=F;if(J["grpc-node.tls_enable_trace"])W.enableTrace=!0;return W}class Nh0{constructor(Q,X){this.connectionOptions=Q,this.callCredentials=X}connect(Q){let X=Object.assign({socket:Q},this.connectionOptions);return new Promise((Y,J)=>{let G=(0,pN.connect)(X,()=>{var Z;if(((Z=this.connectionOptions.rejectUnauthorized)!==null&&Z!==void 0?Z:!0)&&!G.authorized){J(G.authorizationError);return}Y({socket:G,secure:!0})});G.on("error",(Z)=>{J(Z)})})}waitForReady(){return Promise.resolve()}getCallCredentials(){return this.callCredentials}destroy(){}}class N2 extends yq{constructor(Q,X){super();this.secureContext=Q,this.verifyOptions=X}_isSecure(){return!0}_equals(Q){if(this===Q)return!0;if(Q instanceof N2)return this.secureContext===Q.secureContext&&this.verifyOptions.checkServerIdentity===Q.verifyOptions.checkServerIdentity;else return!1}_createSecureConnector(Q,X,Y){let J=Dh0(this.secureContext,this.verifyOptions,Q,X);return new Nh0(J,Y!==null&&Y!==void 0?Y:L2.CallCredentials.createEmpty())}}class dN extends yq{constructor(Q,X,Y){super();this.caCertificateProvider=Q,this.identityCertificateProvider=X,this.verifyOptions=Y,this.refcount=0,this.latestCaUpdate=void 0,this.latestIdentityUpdate=void 0,this.caCertificateUpdateListener=this.handleCaCertificateUpdate.bind(this),this.identityCertificateUpdateListener=this.handleIdentityCertitificateUpdate.bind(this),this.secureContextWatchers=[]}_isSecure(){return!0}_equals(Q){var X,Y;if(this===Q)return!0;if(Q instanceof dN)return this.caCertificateProvider===Q.caCertificateProvider&&this.identityCertificateProvider===Q.identityCertificateProvider&&((X=this.verifyOptions)===null||X===void 0?void 0:X.checkServerIdentity)===((Y=Q.verifyOptions)===null||Y===void 0?void 0:Y.checkServerIdentity);else return!1}ref(){var Q;if(this.refcount===0)this.caCertificateProvider.addCaCertificateListener(this.caCertificateUpdateListener),(Q=this.identityCertificateProvider)===null||Q===void 0||Q.addIdentityCertificateListener(this.identityCertificateUpdateListener);this.refcount+=1}unref(){var Q;if(this.refcount-=1,this.refcount===0)this.caCertificateProvider.removeCaCertificateListener(this.caCertificateUpdateListener),(Q=this.identityCertificateProvider)===null||Q===void 0||Q.removeIdentityCertificateListener(this.identityCertificateUpdateListener)}_createSecureConnector(Q,X,Y){return this.ref(),new dN.SecureConnectorImpl(this,Q,X,Y!==null&&Y!==void 0?Y:L2.CallCredentials.createEmpty())}maybeUpdateWatchers(){if(this.hasReceivedUpdates()){for(let Q of this.secureContextWatchers)Q(this.getLatestSecureContext());this.secureContextWatchers=[]}}handleCaCertificateUpdate(Q){this.latestCaUpdate=Q,this.maybeUpdateWatchers()}handleIdentityCertitificateUpdate(Q){this.latestIdentityUpdate=Q,this.maybeUpdateWatchers()}hasReceivedUpdates(){if(this.latestCaUpdate===void 0)return!1;if(this.identityCertificateProvider&&this.latestIdentityUpdate===void 0)return!1;return!0}getSecureContext(){if(this.hasReceivedUpdates())return Promise.resolve(this.getLatestSecureContext());else return new Promise((Q)=>{this.secureContextWatchers.push(Q)})}getLatestSecureContext(){var Q,X;if(!this.latestCaUpdate)return null;if(this.identityCertificateProvider!==null&&!this.latestIdentityUpdate)return null;try{return(0,pN.createSecureContext)({ca:this.latestCaUpdate.caCertificate,key:(Q=this.latestIdentityUpdate)===null||Q===void 0?void 0:Q.privateKey,cert:(X=this.latestIdentityUpdate)===null||X===void 0?void 0:X.certificate,ciphers:yi.CIPHER_SUITES})}catch(Y){return(0,W46.log)(Z46.LogVerbosity.ERROR,"Failed to createSecureContext with error "+Y.message),null}}}dN.SecureConnectorImpl=class{constructor(Q,X,Y,J){this.parent=Q,this.channelTarget=X,this.options=Y,this.callCredentials=J}connect(Q){return new Promise((X,Y)=>{let J=this.parent.getLatestSecureContext();if(!J){Y(Error("Failed to load credentials"));return}if(Q.closed)Y(Error("Socket closed while loading credentials"));let G=Dh0(J,this.parent.verifyOptions,this.channelTarget,this.options),Z=Object.assign({socket:Q},G),W=()=>{Y(Error("Socket closed"))},K=(H)=>{Y(H)},$=(0,pN.connect)(Z,()=>{var H;if($.removeListener("close",W),$.removeListener("error",K),((H=this.parent.verifyOptions.rejectUnauthorized)!==null&&H!==void 0?H:!0)&&!$.authorized){Y($.authorizationError);return}X({socket:$,secure:!0})});$.once("close",W),$.once("error",K)})}async waitForReady(){await this.parent.getSecureContext()}getCallCredentials(){return this.callCredentials}destroy(){this.parent.unref()}};function K46(Q,X,Y){return new dN(Q,X,Y!==null&&Y!==void 0?Y:{})}class O2 extends yq{constructor(Q,X){super();if(this.channelCredentials=Q,this.callCredentials=X,!Q._isSecure())throw Error("Cannot compose insecure credentials")}compose(Q){let X=this.callCredentials.compose(Q);return new O2(this.channelCredentials,X)}_isSecure(){return!0}_equals(Q){if(this===Q)return!0;if(Q instanceof O2)return this.channelCredentials._equals(Q.channelCredentials)&&this.callCredentials._equals(Q.callCredentials);else return!1}_createSecureConnector(Q,X,Y){let J=this.callCredentials.compose(Y!==null&&Y!==void 0?Y:L2.CallCredentials.createEmpty());return this.channelCredentials._createSecureConnector(Q,X,J)}}});var DZ=I((Mh0)=>{Object.defineProperty(Mh0,"__esModule",{value:!0});Mh0.createChildChannelControlHelper=q46;Mh0.registerLoadBalancerType=V46;Mh0.registerDefaultLoadBalancerType=z46;Mh0.createLoadBalancer=U46;Mh0.isLoadBalancerNameRegistered=B46;Mh0.parseLoadBalancingConfig=wh0;Mh0.getDefaultConfig=D46;Mh0.selectLbConfigFromList=N46;var H46=h1(),F46=z6();function q46(Q,X){var Y,J,G,Z,W,K,$,H,F,q;return{createSubchannel:(J=(Y=X.createSubchannel)===null||Y===void 0?void 0:Y.bind(X))!==null&&J!==void 0?J:Q.createSubchannel.bind(Q),updateState:(Z=(G=X.updateState)===null||G===void 0?void 0:G.bind(X))!==null&&Z!==void 0?Z:Q.updateState.bind(Q),requestReresolution:(K=(W=X.requestReresolution)===null||W===void 0?void 0:W.bind(X))!==null&&K!==void 0?K:Q.requestReresolution.bind(Q),addChannelzChild:(H=($=X.addChannelzChild)===null||$===void 0?void 0:$.bind(X))!==null&&H!==void 0?H:Q.addChannelzChild.bind(Q),removeChannelzChild:(q=(F=X.removeChannelzChild)===null||F===void 0?void 0:F.bind(X))!==null&&q!==void 0?q:Q.removeChannelzChild.bind(Q)}}var BZ={},cN=null;function V46(Q,X,Y){BZ[Q]={LoadBalancer:X,LoadBalancingConfig:Y}}function z46(Q){cN=Q}function U46(Q,X){let Y=Q.getLoadBalancerName();if(Y in BZ)return new BZ[Y].LoadBalancer(X);else return null}function B46(Q){return Q in BZ}function wh0(Q){let X=Object.keys(Q);if(X.length!==1)throw Error("Provided load balancing config has multiple conflicting entries");let Y=X[0];if(Y in BZ)try{return BZ[Y].LoadBalancingConfig.createFromJson(Q[Y])}catch(J){throw Error(`${Y}: ${J.message}`)}else throw Error(`Unrecognized load balancing config name ${Y}`)}function D46(){if(!cN)throw Error("No default load balancer type registered");return new BZ[cN].LoadBalancingConfig}function N46(Q,X=!1){for(let Y of Q)try{return wh0(Y)}catch(J){(0,H46.log)(F46.LogVerbosity.DEBUG,"Config parsing failed with error",J.message);continue}if(X)if(cN)return new BZ[cN].LoadBalancingConfig;else return null;else return null}});var fi=I((Ah0)=>{Object.defineProperty(Ah0,"__esModule",{value:!0});Ah0.validateRetryThrottling=Ph0;Ah0.validateServiceConfig=Th0;Ah0.extractAndSelectServiceConfig=b46;var I46=z0("os"),w2=z6(),M2=/^\d+(\.\d{1,9})?s$/,j46="node";function C46(Q){if("service"in Q&&Q.service!==""){if(typeof Q.service!=="string")throw Error(`Invalid method config name: invalid service: expected type string, got ${typeof Q.service}`);if("method"in Q&&Q.method!==""){if(typeof Q.method!=="string")throw Error(`Invalid method config name: invalid method: expected type string, got ${typeof Q.service}`);return{service:Q.service,method:Q.method}}else return{service:Q.service}}else{if("method"in Q&&Q.method!==void 0)throw Error("Invalid method config name: method set with empty or unset service");return{}}}function R46(Q){if(!("maxAttempts"in Q)||!Number.isInteger(Q.maxAttempts)||Q.maxAttempts<2)throw Error("Invalid method config retry policy: maxAttempts must be an integer at least 2");if(!("initialBackoff"in Q)||typeof Q.initialBackoff!=="string"||!M2.test(Q.initialBackoff))throw Error("Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer or decimal followed by s");if(!("maxBackoff"in Q)||typeof Q.maxBackoff!=="string"||!M2.test(Q.maxBackoff))throw Error("Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer or decimal followed by s");if(!("backoffMultiplier"in Q)||typeof Q.backoffMultiplier!=="number"||Q.backoffMultiplier<=0)throw Error("Invalid method config retry policy: backoffMultiplier must be a number greater than 0");if(!(("retryableStatusCodes"in Q)&&Array.isArray(Q.retryableStatusCodes)))throw Error("Invalid method config retry policy: retryableStatusCodes is required");if(Q.retryableStatusCodes.length===0)throw Error("Invalid method config retry policy: retryableStatusCodes must be non-empty");for(let X of Q.retryableStatusCodes)if(typeof X==="number"){if(!Object.values(w2.Status).includes(X))throw Error("Invalid method config retry policy: retryableStatusCodes value not in status code range")}else if(typeof X==="string"){if(!Object.values(w2.Status).includes(X.toUpperCase()))throw Error("Invalid method config retry policy: retryableStatusCodes value not a status code name")}else throw Error("Invalid method config retry policy: retryableStatusCodes value must be a string or number");return{maxAttempts:Q.maxAttempts,initialBackoff:Q.initialBackoff,maxBackoff:Q.maxBackoff,backoffMultiplier:Q.backoffMultiplier,retryableStatusCodes:Q.retryableStatusCodes}}function S46(Q){if(!("maxAttempts"in Q)||!Number.isInteger(Q.maxAttempts)||Q.maxAttempts<2)throw Error("Invalid method config hedging policy: maxAttempts must be an integer at least 2");if("hedgingDelay"in Q&&(typeof Q.hedgingDelay!=="string"||!M2.test(Q.hedgingDelay)))throw Error("Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s");if("nonFatalStatusCodes"in Q&&Array.isArray(Q.nonFatalStatusCodes))for(let Y of Q.nonFatalStatusCodes)if(typeof Y==="number"){if(!Object.values(w2.Status).includes(Y))throw Error("Invalid method config hedging policy: nonFatalStatusCodes value not in status code range")}else if(typeof Y==="string"){if(!Object.values(w2.Status).includes(Y.toUpperCase()))throw Error("Invalid method config hedging policy: nonFatalStatusCodes value not a status code name")}else throw Error("Invalid method config hedging policy: nonFatalStatusCodes value must be a string or number");let X={maxAttempts:Q.maxAttempts};if(Q.hedgingDelay)X.hedgingDelay=Q.hedgingDelay;if(Q.nonFatalStatusCodes)X.nonFatalStatusCodes=Q.nonFatalStatusCodes;return X}function v46(Q){var X;let Y={name:[]};if(!("name"in Q)||!Array.isArray(Q.name))throw Error("Invalid method config: invalid name array");for(let J of Q.name)Y.name.push(C46(J));if("waitForReady"in Q){if(typeof Q.waitForReady!=="boolean")throw Error("Invalid method config: invalid waitForReady");Y.waitForReady=Q.waitForReady}if("timeout"in Q)if(typeof Q.timeout==="object"){if(!("seconds"in Q.timeout)||typeof Q.timeout.seconds!=="number")throw Error("Invalid method config: invalid timeout.seconds");if(!("nanos"in Q.timeout)||typeof Q.timeout.nanos!=="number")throw Error("Invalid method config: invalid timeout.nanos");Y.timeout=Q.timeout}else if(typeof Q.timeout==="string"&&M2.test(Q.timeout)){let J=Q.timeout.substring(0,Q.timeout.length-1).split(".");Y.timeout={seconds:J[0]|0,nanos:((X=J[1])!==null&&X!==void 0?X:0)|0}}else throw Error("Invalid method config: invalid timeout");if("maxRequestBytes"in Q){if(typeof Q.maxRequestBytes!=="number")throw Error("Invalid method config: invalid maxRequestBytes");Y.maxRequestBytes=Q.maxRequestBytes}if("maxResponseBytes"in Q){if(typeof Q.maxResponseBytes!=="number")throw Error("Invalid method config: invalid maxRequestBytes");Y.maxResponseBytes=Q.maxResponseBytes}if("retryPolicy"in Q)if("hedgingPolicy"in Q)throw Error("Invalid method config: retryPolicy and hedgingPolicy cannot both be specified");else Y.retryPolicy=R46(Q.retryPolicy);else if("hedgingPolicy"in Q)Y.hedgingPolicy=S46(Q.hedgingPolicy);return Y}function Ph0(Q){if(!("maxTokens"in Q)||typeof Q.maxTokens!=="number"||Q.maxTokens<=0||Q.maxTokens>1000)throw Error("Invalid retryThrottling: maxTokens must be a number in (0, 1000]");if(!("tokenRatio"in Q)||typeof Q.tokenRatio!=="number"||Q.tokenRatio<=0)throw Error("Invalid retryThrottling: tokenRatio must be a number greater than 0");return{maxTokens:+Q.maxTokens.toFixed(3),tokenRatio:+Q.tokenRatio.toFixed(3)}}function k46(Q){if(!(typeof Q==="object"&&Q!==null))throw Error(`Invalid loadBalancingConfig: unexpected type ${typeof Q}`);let X=Object.keys(Q);if(X.length>1)throw Error(`Invalid loadBalancingConfig: unexpected multiple keys ${X}`);if(X.length===0)throw Error("Invalid loadBalancingConfig: load balancing policy name required");return{[X[0]]:Q[X[0]]}}function Th0(Q){let X={loadBalancingConfig:[],methodConfig:[]};if("loadBalancingPolicy"in Q)if(typeof Q.loadBalancingPolicy==="string")X.loadBalancingPolicy=Q.loadBalancingPolicy;else throw Error("Invalid service config: invalid loadBalancingPolicy");if("loadBalancingConfig"in Q)if(Array.isArray(Q.loadBalancingConfig))for(let J of Q.loadBalancingConfig)X.loadBalancingConfig.push(k46(J));else throw Error("Invalid service config: invalid loadBalancingConfig");if("methodConfig"in Q){if(Array.isArray(Q.methodConfig))for(let J of Q.methodConfig)X.methodConfig.push(v46(J))}if("retryThrottling"in Q)X.retryThrottling=Ph0(Q.retryThrottling);let Y=[];for(let J of X.methodConfig)for(let G of J.name){for(let Z of Y)if(G.service===Z.service&&G.method===Z.method)throw Error(`Invalid service config: duplicate name ${G.service}/${G.method}`);Y.push(G)}return X}function _46(Q){if(!("serviceConfig"in Q))throw Error("Invalid service config choice: missing service config");let X={serviceConfig:Th0(Q.serviceConfig)};if("clientLanguage"in Q)if(Array.isArray(Q.clientLanguage)){X.clientLanguage=[];for(let J of Q.clientLanguage)if(typeof J==="string")X.clientLanguage.push(J);else throw Error("Invalid service config choice: invalid clientLanguage")}else throw Error("Invalid service config choice: invalid clientLanguage");if("clientHostname"in Q)if(Array.isArray(Q.clientHostname)){X.clientHostname=[];for(let J of Q.clientHostname)if(typeof J==="string")X.clientHostname.push(J);else throw Error("Invalid service config choice: invalid clientHostname")}else throw Error("Invalid service config choice: invalid clientHostname");if("percentage"in Q)if(typeof Q.percentage==="number"&&0<=Q.percentage&&Q.percentage<=100)X.percentage=Q.percentage;else throw Error("Invalid service config choice: invalid percentage");let Y=["clientLanguage","percentage","clientHostname","serviceConfig"];for(let J in Q)if(!Y.includes(J))throw Error(`Invalid service config choice: unexpected field ${J}`);return X}function y46(Q,X){if(!Array.isArray(Q))throw Error("Invalid service config list");for(let Y of Q){let J=_46(Y);if(typeof J.percentage==="number"&&X>J.percentage)continue;if(Array.isArray(J.clientHostname)){let G=!1;for(let Z of J.clientHostname)if(Z===I46.hostname())G=!0;if(!G)continue}if(Array.isArray(J.clientLanguage)){let G=!1;for(let Z of J.clientLanguage)if(Z===j46)G=!0;if(!G)continue}return J.serviceConfig}throw Error("No matching service config found")}function b46(Q,X){for(let Y of Q)if(Y.length>0&&Y[0].startsWith("grpc_config=")){let J=Y.join("").substring(12),G=JSON.parse(J);return y46(G,X)}return null}});var iQ=I((Ih0)=>{Object.defineProperty(Ih0,"__esModule",{value:!0});Ih0.ConnectivityState=void 0;var Eh0;(function(Q){Q[Q.IDLE=0]="IDLE",Q[Q.CONNECTING=1]="CONNECTING",Q[Q.READY=2]="READY",Q[Q.TRANSIENT_FAILURE=3]="TRANSIENT_FAILURE",Q[Q.SHUTDOWN=4]="SHUTDOWN"})(Eh0||(Ih0.ConnectivityState=Eh0={}))});var L7=I((Sh0)=>{Object.defineProperty(Sh0,"__esModule",{value:!0});Sh0.QueuePicker=Sh0.UnavailablePicker=Sh0.PickResultType=void 0;var g46=P9(),u46=z6(),P2;(function(Q){Q[Q.COMPLETE=0]="COMPLETE",Q[Q.QUEUE=1]="QUEUE",Q[Q.TRANSIENT_FAILURE=2]="TRANSIENT_FAILURE",Q[Q.DROP=3]="DROP"})(P2||(Sh0.PickResultType=P2={}));class Ch0{constructor(Q){this.status=Object.assign({code:u46.Status.UNAVAILABLE,details:"No connection established",metadata:new g46.Metadata},Q)}pick(Q){return{pickResultType:P2.TRANSIENT_FAILURE,subchannel:null,status:this.status,onCallStarted:null,onCallEnded:null}}}Sh0.UnavailablePicker=Ch0;class Rh0{constructor(Q,X){this.loadBalancer=Q,this.childPicker=X,this.calledExitIdle=!1}pick(Q){if(!this.calledExitIdle)process.nextTick(()=>{this.loadBalancer.exitIdle()}),this.calledExitIdle=!0;if(this.childPicker)return this.childPicker.pick(Q);else return{pickResultType:P2.QUEUE,subchannel:null,status:null,onCallStarted:null,onCallEnded:null}}}Sh0.QueuePicker=Rh0});var fq=I((kh0)=>{Object.defineProperty(kh0,"__esModule",{value:!0});kh0.BackoffTimeout=void 0;var d46=z6(),p46=h1(),c46="backoff",n46=1000,i46=1.6,a46=120000,r46=0.2;function o46(Q,X){return Math.random()*(X-Q)+Q}class T2{constructor(Q,X){if(this.callback=Q,this.initialDelay=n46,this.multiplier=i46,this.maxDelay=a46,this.jitter=r46,this.running=!1,this.hasRef=!0,this.startTime=new Date,this.endTime=new Date,this.id=T2.getNextId(),X){if(X.initialDelay)this.initialDelay=X.initialDelay;if(X.multiplier)this.multiplier=X.multiplier;if(X.jitter)this.jitter=X.jitter;if(X.maxDelay)this.maxDelay=X.maxDelay}this.trace("constructed initialDelay="+this.initialDelay+" multiplier="+this.multiplier+" jitter="+this.jitter+" maxDelay="+this.maxDelay),this.nextDelay=this.initialDelay,this.timerId=setTimeout(()=>{},0),clearTimeout(this.timerId)}static getNextId(){return this.nextId++}trace(Q){p46.trace(d46.LogVerbosity.DEBUG,c46,"{"+this.id+"} "+Q)}runTimer(Q){var X,Y;if(this.trace("runTimer(delay="+Q+")"),this.endTime=this.startTime,this.endTime.setMilliseconds(this.endTime.getMilliseconds()+Q),clearTimeout(this.timerId),this.timerId=setTimeout(()=>{this.trace("timer fired"),this.running=!1,this.callback()},Q),!this.hasRef)(Y=(X=this.timerId).unref)===null||Y===void 0||Y.call(X)}runOnce(){this.trace("runOnce()"),this.running=!0,this.startTime=new Date,this.runTimer(this.nextDelay);let Q=Math.min(this.nextDelay*this.multiplier,this.maxDelay),X=Q*this.jitter;this.nextDelay=Q+o46(-X,X)}stop(){this.trace("stop()"),clearTimeout(this.timerId),this.running=!1}reset(){if(this.trace("reset() running="+this.running),this.nextDelay=this.initialDelay,this.running){let Q=new Date,X=this.startTime;if(X.setMilliseconds(X.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),Q<X)this.runTimer(X.getTime()-Q.getTime());else this.running=!1}}isRunning(){return this.running}ref(){var Q,X;this.hasRef=!0,(X=(Q=this.timerId).ref)===null||X===void 0||X.call(Q)}unref(){var Q,X;this.hasRef=!1,(X=(Q=this.timerId).unref)===null||X===void 0||X.call(Q)}getEndTime(){return this.endTime}}kh0.BackoffTimeout=T2;T2.nextId=0});var A2=I((bh0)=>{Object.defineProperty(bh0,"__esModule",{value:!0});bh0.ChildLoadBalancerHandler=void 0;var s46=DZ(),t46=iQ(),e46="child_load_balancer_helper";class yh0{constructor(Q){this.channelControlHelper=Q,this.currentChild=null,this.pendingChild=null,this.latestConfig=null,this.ChildPolicyHelper=class{constructor(X){this.parent=X,this.child=null}createSubchannel(X,Y){return this.parent.channelControlHelper.createSubchannel(X,Y)}updateState(X,Y,J){var G;if(this.calledByPendingChild()){if(X===t46.ConnectivityState.CONNECTING)return;(G=this.parent.currentChild)===null||G===void 0||G.destroy(),this.parent.currentChild=this.parent.pendingChild,this.parent.pendingChild=null}else if(!this.calledByCurrentChild())return;this.parent.channelControlHelper.updateState(X,Y,J)}requestReresolution(){var X;let Y=(X=this.parent.pendingChild)!==null&&X!==void 0?X:this.parent.currentChild;if(this.child===Y)this.parent.channelControlHelper.requestReresolution()}setChild(X){this.child=X}addChannelzChild(X){this.parent.channelControlHelper.addChannelzChild(X)}removeChannelzChild(X){this.parent.channelControlHelper.removeChannelzChild(X)}calledByPendingChild(){return this.child===this.parent.pendingChild}calledByCurrentChild(){return this.child===this.parent.currentChild}}}configUpdateRequiresNewPolicyInstance(Q,X){return Q.getLoadBalancerName()!==X.getLoadBalancerName()}updateAddressList(Q,X,Y,J){let G;if(this.currentChild===null||this.latestConfig===null||this.configUpdateRequiresNewPolicyInstance(this.latestConfig,X)){let Z=new this.ChildPolicyHelper(this),W=(0,s46.createLoadBalancer)(X,Z);if(Z.setChild(W),this.currentChild===null)this.currentChild=W,G=this.currentChild;else{if(this.pendingChild)this.pendingChild.destroy();this.pendingChild=W,G=this.pendingChild}}else if(this.pendingChild===null)G=this.currentChild;else G=this.pendingChild;return this.latestConfig=X,G.updateAddressList(Q,X,Y,J)}exitIdle(){if(this.currentChild){if(this.currentChild.exitIdle(),this.pendingChild)this.pendingChild.exitIdle()}}resetBackoff(){if(this.currentChild){if(this.currentChild.resetBackoff(),this.pendingChild)this.pendingChild.resetBackoff()}}destroy(){if(this.currentChild)this.currentChild.destroy(),this.currentChild=null;if(this.pendingChild)this.pendingChild.destroy(),this.pendingChild=null}getTypeName(){return e46}}bh0.ChildLoadBalancerHandler=yh0});var lh0=I((uh0)=>{Object.defineProperty(uh0,"__esModule",{value:!0});uh0.ResolvingLoadBalancer=void 0;var Q66=DZ(),X66=fi(),PX=iQ(),hh0=hJ(),nN=L7(),Y66=fq(),hi=z6(),J66=P9(),G66=h1(),W66=z6(),Z66=nQ(),K66=A2(),$66="resolving_load_balancer";function xh0(Q){G66.trace(W66.LogVerbosity.DEBUG,$66,Q)}var H66=["SERVICE_AND_METHOD","SERVICE","EMPTY"];function F66(Q,X,Y,J){for(let G of Y.name)switch(J){case"EMPTY":if(!G.service&&!G.method)return!0;break;case"SERVICE":if(G.service===Q&&!G.method)return!0;break;case"SERVICE_AND_METHOD":if(G.service===Q&&G.method===X)return!0}return!1}function q66(Q,X,Y,J){for(let G of Y)if(F66(Q,X,G,J))return G;return null}function V66(Q){return{invoke(X,Y){var J,G;let Z=X.split("/").filter(($)=>$.length>0),W=(J=Z[0])!==null&&J!==void 0?J:"",K=(G=Z[1])!==null&&G!==void 0?G:"";if(Q&&Q.methodConfig)for(let $ of H66){let H=q66(W,K,Q.methodConfig,$);if(H)return{methodConfig:H,pickInformation:{},status:hi.Status.OK,dynamicFilterFactories:[]}}return{methodConfig:{name:[]},pickInformation:{},status:hi.Status.OK,dynamicFilterFactories:[]}},unref(){}}}class gh0{constructor(Q,X,Y,J,G){if(this.target=Q,this.channelControlHelper=X,this.channelOptions=Y,this.onSuccessfulResolution=J,this.onFailedResolution=G,this.latestChildState=PX.ConnectivityState.IDLE,this.latestChildPicker=new nN.QueuePicker(this),this.latestChildErrorMessage=null,this.currentState=PX.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1,Y["grpc.service_config"])this.defaultServiceConfig=(0,X66.validateServiceConfig)(JSON.parse(Y["grpc.service_config"]));else this.defaultServiceConfig={loadBalancingConfig:[],methodConfig:[]};this.updateState(PX.ConnectivityState.IDLE,new nN.QueuePicker(this),null),this.childLoadBalancer=new K66.ChildLoadBalancerHandler({createSubchannel:X.createSubchannel.bind(X),requestReresolution:()=>{if(this.backoffTimeout.isRunning())xh0("requestReresolution delayed by backoff timer until "+this.backoffTimeout.getEndTime().toISOString()),this.continueResolving=!0;else this.updateResolution()},updateState:(W,K,$)=>{this.latestChildState=W,this.latestChildPicker=K,this.latestChildErrorMessage=$,this.updateState(W,K,$)},addChannelzChild:X.addChannelzChild.bind(X),removeChannelzChild:X.removeChannelzChild.bind(X)}),this.innerResolver=(0,hh0.createResolver)(Q,this.handleResolverResult.bind(this),Y);let Z={initialDelay:Y["grpc.initial_reconnect_backoff_ms"],maxDelay:Y["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new Y66.BackoffTimeout(()=>{if(this.continueResolving)this.updateResolution(),this.continueResolving=!1;else this.updateState(this.latestChildState,this.latestChildPicker,this.latestChildErrorMessage)},Z),this.backoffTimeout.unref()}handleResolverResult(Q,X,Y,J){var G,Z;this.backoffTimeout.stop(),this.backoffTimeout.reset();let W=!0,K=null;if(Y===null)K=this.defaultServiceConfig;else if(Y.ok)K=Y.value;else if(this.previousServiceConfig!==null)K=this.previousServiceConfig;else W=!1,this.handleResolutionFailure(Y.error);if(K!==null){let $=(G=K===null||K===void 0?void 0:K.loadBalancingConfig)!==null&&G!==void 0?G:[],H=(0,Q66.selectLbConfigFromList)($,!0);if(H===null)W=!1,this.handleResolutionFailure({code:hi.Status.UNAVAILABLE,details:"All load balancer options in service config are not compatible",metadata:new J66.Metadata});else W=this.childLoadBalancer.updateAddressList(Q,H,Object.assign(Object.assign({},this.channelOptions),X),J)}if(W)this.onSuccessfulResolution(K,(Z=X[hh0.CHANNEL_ARGS_CONFIG_SELECTOR_KEY])!==null&&Z!==void 0?Z:V66(K));return W}updateResolution(){if(this.innerResolver.updateResolution(),this.currentState===PX.ConnectivityState.IDLE)this.updateState(PX.ConnectivityState.CONNECTING,this.latestChildPicker,this.latestChildErrorMessage);this.backoffTimeout.runOnce()}updateState(Q,X,Y){if(xh0((0,Z66.uriToString)(this.target)+" "+PX.ConnectivityState[this.currentState]+" -> "+PX.ConnectivityState[Q]),Q===PX.ConnectivityState.IDLE)X=new nN.QueuePicker(this,X);this.currentState=Q,this.channelControlHelper.updateState(Q,X,Y)}handleResolutionFailure(Q){if(this.latestChildState===PX.ConnectivityState.IDLE)this.updateState(PX.ConnectivityState.TRANSIENT_FAILURE,new nN.UnavailablePicker(Q),Q.details),this.onFailedResolution(Q)}exitIdle(){if(this.currentState===PX.ConnectivityState.IDLE||this.currentState===PX.ConnectivityState.TRANSIENT_FAILURE)if(this.backoffTimeout.isRunning())this.continueResolving=!0;else this.updateResolution();this.childLoadBalancer.exitIdle()}updateAddressList(Q,X){throw Error("updateAddressList not supported on ResolvingLoadBalancer")}resetBackoff(){this.backoffTimeout.reset(),this.childLoadBalancer.resetBackoff()}destroy(){this.childLoadBalancer.destroy(),this.innerResolver.destroy(),this.backoffTimeout.reset(),this.backoffTimeout.stop(),this.latestChildState=PX.ConnectivityState.IDLE,this.latestChildPicker=new nN.QueuePicker(this),this.currentState=PX.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1}getTypeName(){return"resolving_load_balancer"}}uh0.ResolvingLoadBalancer=gh0});var ch0=I((dh0)=>{Object.defineProperty(dh0,"__esModule",{value:!0});dh0.recognizedOptions=void 0;dh0.channelOptionsEqual=z66;dh0.recognizedOptions={"grpc.ssl_target_name_override":!0,"grpc.primary_user_agent":!0,"grpc.secondary_user_agent":!0,"grpc.default_authority":!0,"grpc.keepalive_time_ms":!0,"grpc.keepalive_timeout_ms":!0,"grpc.keepalive_permit_without_calls":!0,"grpc.service_config":!0,"grpc.max_concurrent_streams":!0,"grpc.initial_reconnect_backoff_ms":!0,"grpc.max_reconnect_backoff_ms":!0,"grpc.use_local_subchannel_pool":!0,"grpc.max_send_message_length":!0,"grpc.max_receive_message_length":!0,"grpc.enable_http_proxy":!0,"grpc.enable_channelz":!0,"grpc.dns_min_time_between_resolutions_ms":!0,"grpc.enable_retries":!0,"grpc.per_rpc_retry_buffer_size":!0,"grpc.retry_buffer_size":!0,"grpc.max_connection_age_ms":!0,"grpc.max_connection_age_grace_ms":!0,"grpc-node.max_session_memory":!0,"grpc.service_config_disable_resolution":!0,"grpc.client_idle_timeout_ms":!0,"grpc-node.tls_enable_trace":!0,"grpc.lb.ring_hash.ring_size_cap":!0,"grpc-node.retry_max_attempts_limit":!0,"grpc-node.flow_control_window":!0,"grpc.server_call_metric_recording":!0};function z66(Q,X){let Y=Object.keys(Q).sort(),J=Object.keys(X).sort();if(Y.length!==J.length)return!1;for(let G=0;G<Y.length;G+=1){if(Y[G]!==J[G])return!1;if(Q[Y[G]]!==X[J[G]])return!1}return!0}});var TX=I((oh0)=>{Object.defineProperty(oh0,"__esModule",{value:!0});oh0.EndpointMap=void 0;oh0.isTcpSubchannelAddress=aN;oh0.subchannelAddressEqual=E2;oh0.subchannelAddressToString=ih0;oh0.stringToSubchannelAddress=D66;oh0.endpointEqual=N66;oh0.endpointToString=O66;oh0.endpointHasAddress=ah0;var nh0=z0("net");function aN(Q){return"port"in Q}function E2(Q,X){if(!Q&&!X)return!0;if(!Q||!X)return!1;if(aN(Q))return aN(X)&&Q.host===X.host&&Q.port===X.port;else return!aN(X)&&Q.path===X.path}function ih0(Q){if(aN(Q))if((0,nh0.isIPv6)(Q.host))return"["+Q.host+"]:"+Q.port;else return Q.host+":"+Q.port;else return Q.path}var B66=443;function D66(Q,X){if((0,nh0.isIP)(Q))return{host:Q,port:X!==null&&X!==void 0?X:B66};else return{path:Q}}function N66(Q,X){if(Q.addresses.length!==X.addresses.length)return!1;for(let Y=0;Y<Q.addresses.length;Y++)if(!E2(Q.addresses[Y],X.addresses[Y]))return!1;return!0}function O66(Q){return"["+Q.addresses.map(ih0).join(", ")+"]"}function ah0(Q,X){for(let Y of Q.addresses)if(E2(Y,X))return!0;return!1}function iN(Q,X){if(Q.addresses.length!==X.addresses.length)return!1;for(let Y of Q.addresses){let J=!1;for(let G of X.addresses)if(E2(Y,G)){J=!0;break}if(!J)return!1}return!0}class rh0{constructor(){this.map=new Set}get size(){return this.map.size}getForSubchannelAddress(Q){for(let X of this.map)if(ah0(X.key,Q))return X.value;return}deleteMissing(Q){let X=[];for(let Y of this.map){let J=!1;for(let G of Q)if(iN(G,Y.key))J=!0;if(!J)X.push(Y.value),this.map.delete(Y)}return X}get(Q){for(let X of this.map)if(iN(Q,X.key))return X.value;return}set(Q,X){for(let Y of this.map)if(iN(Q,Y.key)){Y.value=X;return}this.map.add({key:Q,value:X})}delete(Q){for(let X of this.map)if(iN(Q,X.key)){this.map.delete(X);return}}has(Q){for(let X of this.map)if(iN(Q,X.key))return!0;return!1}clear(){this.map.clear()}*keys(){for(let Q of this.map)yield Q.key}*values(){for(let Q of this.map)yield Q.value}*entries(){for(let Q of this.map)yield[Q.key,Q.value]}}oh0.EndpointMap=rh0});var Zx0=I((Wx0)=>{Object.defineProperty(Wx0,"t",{value:!0});class xi{constructor(Q,X,Y=1){this.i=void 0,this.h=void 0,this.o=void 0,this.u=Q,this.l=X,this.p=Y}I(){let Q=this,X=Q.o.o===Q;if(X&&Q.p===1)Q=Q.h;else if(Q.i){Q=Q.i;while(Q.h)Q=Q.h}else{if(X)return Q.o;let Y=Q.o;while(Y.i===Q)Q=Y,Y=Q.o;Q=Y}return Q}B(){let Q=this;if(Q.h){Q=Q.h;while(Q.i)Q=Q.i;return Q}else{let X=Q.o;while(X.h===Q)Q=X,X=Q.o;if(Q.h!==X)return X;else return Q}}_(){let Q=this.o,X=this.h,Y=X.i;if(Q.o===this)Q.o=X;else if(Q.i===this)Q.i=X;else Q.h=X;if(X.o=Q,X.i=this,this.o=X,this.h=Y,Y)Y.o=this;return X}g(){let Q=this.o,X=this.i,Y=X.h;if(Q.o===this)Q.o=X;else if(Q.i===this)Q.i=X;else Q.h=X;if(X.o=Q,X.h=this,this.o=X,this.i=Y,Y)Y.o=this;return X}}class th0 extends xi{constructor(){super(...arguments);this.M=1}_(){let Q=super._();return this.O(),Q.O(),Q}g(){let Q=super.g();return this.O(),Q.O(),Q}O(){if(this.M=1,this.i)this.M+=this.i.M;if(this.h)this.M+=this.h.M}}class eh0{constructor(Q=0){this.iteratorType=Q}equals(Q){return this.T===Q.T}}class Qx0{constructor(){this.m=0}get length(){return this.m}size(){return this.m}empty(){return this.m===0}}class Xx0 extends Qx0{}function Z$(){throw RangeError("Iterator access denied!")}class Yx0 extends Xx0{constructor(Q=function(Y,J){if(Y<J)return-1;if(Y>J)return 1;return 0},X=!1){super();this.v=void 0,this.A=Q,this.enableIndex=X,this.N=X?th0:xi,this.C=new this.N}R(Q,X){let Y=this.C;while(Q){let J=this.A(Q.u,X);if(J<0)Q=Q.h;else if(J>0)Y=Q,Q=Q.i;else return Q}return Y}K(Q,X){let Y=this.C;while(Q)if(this.A(Q.u,X)<=0)Q=Q.h;else Y=Q,Q=Q.i;return Y}L(Q,X){let Y=this.C;while(Q){let J=this.A(Q.u,X);if(J<0)Y=Q,Q=Q.h;else if(J>0)Q=Q.i;else return Q}return Y}k(Q,X){let Y=this.C;while(Q)if(this.A(Q.u,X)<0)Y=Q,Q=Q.h;else Q=Q.i;return Y}P(Q){while(!0){let X=Q.o;if(X===this.C)return;if(Q.p===1){Q.p=0;return}if(Q===X.i){let Y=X.h;if(Y.p===1)if(Y.p=0,X.p=1,X===this.v)this.v=X._();else X._();else if(Y.h&&Y.h.p===1){if(Y.p=X.p,X.p=0,Y.h.p=0,X===this.v)this.v=X._();else X._();return}else if(Y.i&&Y.i.p===1)Y.p=1,Y.i.p=0,Y.g();else Y.p=1,Q=X}else{let Y=X.i;if(Y.p===1)if(Y.p=0,X.p=1,X===this.v)this.v=X.g();else X.g();else if(Y.i&&Y.i.p===1){if(Y.p=X.p,X.p=0,Y.i.p=0,X===this.v)this.v=X.g();else X.g();return}else if(Y.h&&Y.h.p===1)Y.p=1,Y.h.p=0,Y._();else Y.p=1,Q=X}}}S(Q){if(this.m===1){this.clear();return}let X=Q;while(X.i||X.h){if(X.h){X=X.h;while(X.i)X=X.i}else X=X.i;let J=Q.u;Q.u=X.u,X.u=J;let G=Q.l;Q.l=X.l,X.l=G,Q=X}if(this.C.i===X)this.C.i=X.o;else if(this.C.h===X)this.C.h=X.o;this.P(X);let Y=X.o;if(X===Y.i)Y.i=void 0;else Y.h=void 0;if(this.m-=1,this.v.p=0,this.enableIndex)while(Y!==this.C)Y.M-=1,Y=Y.o}U(Q){let X=typeof Q==="number"?Q:void 0,Y=typeof Q==="function"?Q:void 0,J=typeof Q>"u"?[]:void 0,G=0,Z=this.v,W=[];while(W.length||Z)if(Z)W.push(Z),Z=Z.i;else{if(Z=W.pop(),G===X)return Z;J&&J.push(Z),Y&&Y(Z,G,this),G+=1,Z=Z.h}return J}j(Q){while(!0){let X=Q.o;if(X.p===0)return;let Y=X.o;if(X===Y.i){let J=Y.h;if(J&&J.p===1){if(J.p=X.p=0,Y===this.v)return;Y.p=1,Q=Y;continue}else if(Q===X.h){if(Q.p=0,Q.i)Q.i.o=X;if(Q.h)Q.h.o=Y;if(X.h=Q.i,Y.i=Q.h,Q.i=X,Q.h=Y,Y===this.v)this.v=Q,this.C.o=Q;else{let G=Y.o;if(G.i===Y)G.i=Q;else G.h=Q}Q.o=Y.o,X.o=Q,Y.o=Q,Y.p=1}else{if(X.p=0,Y===this.v)this.v=Y.g();else Y.g();Y.p=1;return}}else{let J=Y.i;if(J&&J.p===1){if(J.p=X.p=0,Y===this.v)return;Y.p=1,Q=Y;continue}else if(Q===X.i){if(Q.p=0,Q.i)Q.i.o=Y;if(Q.h)Q.h.o=X;if(Y.h=Q.i,X.i=Q.h,Q.i=Y,Q.h=X,Y===this.v)this.v=Q,this.C.o=Q;else{let G=Y.o;if(G.i===Y)G.i=Q;else G.h=Q}Q.o=Y.o,X.o=Q,Y.o=Q,Y.p=1}else{if(X.p=0,Y===this.v)this.v=Y._();else Y._();Y.p=1;return}}if(this.enableIndex)X.O(),Y.O(),Q.O();return}}q(Q,X,Y){if(this.v===void 0)return this.m+=1,this.v=new this.N(Q,X,0),this.v.o=this.C,this.C.o=this.C.i=this.C.h=this.v,this.m;let J,G=this.C.i,Z=this.A(G.u,Q);if(Z===0)return G.l=X,this.m;else if(Z>0)G.i=new this.N(Q,X),G.i.o=G,J=G.i,this.C.i=J;else{let W=this.C.h,K=this.A(W.u,Q);if(K===0)return W.l=X,this.m;else if(K<0)W.h=new this.N(Q,X),W.h.o=W,J=W.h,this.C.h=J;else{if(Y!==void 0){let $=Y.T;if($!==this.C){let H=this.A($.u,Q);if(H===0)return $.l=X,this.m;else if(H>0){let F=$.I(),q=this.A(F.u,Q);if(q===0)return F.l=X,this.m;else if(q<0)if(J=new this.N(Q,X),F.h===void 0)F.h=J,J.o=F;else $.i=J,J.o=$}}}if(J===void 0){J=this.v;while(!0){let $=this.A(J.u,Q);if($>0){if(J.i===void 0){J.i=new this.N(Q,X),J.i.o=J,J=J.i;break}J=J.i}else if($<0){if(J.h===void 0){J.h=new this.N(Q,X),J.h.o=J,J=J.h;break}J=J.h}else return J.l=X,this.m}}}}if(this.enableIndex){let W=J.o;while(W!==this.C)W.M+=1,W=W.o}return this.j(J),this.m+=1,this.m}H(Q,X){while(Q){let Y=this.A(Q.u,X);if(Y<0)Q=Q.h;else if(Y>0)Q=Q.i;else return Q}return Q||this.C}clear(){this.m=0,this.v=void 0,this.C.o=void 0,this.C.i=this.C.h=void 0}updateKeyByIterator(Q,X){let Y=Q.T;if(Y===this.C)Z$();if(this.m===1)return Y.u=X,!0;let J=Y.B().u;if(Y===this.C.i){if(this.A(J,X)>0)return Y.u=X,!0;return!1}let G=Y.I().u;if(Y===this.C.h){if(this.A(G,X)<0)return Y.u=X,!0;return!1}if(this.A(G,X)>=0||this.A(J,X)<=0)return!1;return Y.u=X,!0}eraseElementByPos(Q){if(Q<0||Q>this.m-1)throw RangeError();let X=this.U(Q);return this.S(X),this.m}eraseElementByKey(Q){if(this.m===0)return!1;let X=this.H(this.v,Q);if(X===this.C)return!1;return this.S(X),!0}eraseElementByIterator(Q){let X=Q.T;if(X===this.C)Z$();let Y=X.h===void 0;if(Q.iteratorType===0){if(Y)Q.next()}else if(!Y||X.i===void 0)Q.next();return this.S(X),Q}getHeight(){if(this.m===0)return 0;function Q(X){if(!X)return 0;return Math.max(Q(X.i),Q(X.h))+1}return Q(this.v)}}class Jx0 extends eh0{constructor(Q,X,Y){super(Y);if(this.T=Q,this.C=X,this.iteratorType===0)this.pre=function(){if(this.T===this.C.i)Z$();return this.T=this.T.I(),this},this.next=function(){if(this.T===this.C)Z$();return this.T=this.T.B(),this};else this.pre=function(){if(this.T===this.C.h)Z$();return this.T=this.T.B(),this},this.next=function(){if(this.T===this.C)Z$();return this.T=this.T.I(),this}}get index(){let Q=this.T,X=this.C.o;if(Q===this.C){if(X)return X.M-1;return 0}let Y=0;if(Q.i)Y+=Q.i.M;while(Q!==X){let J=Q.o;if(Q===J.h){if(Y+=1,J.i)Y+=J.i.M}Q=J}return Y}isAccessible(){return this.T!==this.C}}class xJ extends Jx0{constructor(Q,X,Y,J){super(Q,X,J);this.container=Y}get pointer(){if(this.T===this.C)Z$();let Q=this;return new Proxy([],{get(X,Y){if(Y==="0")return Q.T.u;else if(Y==="1")return Q.T.l;return X[0]=Q.T.u,X[1]=Q.T.l,X[Y]},set(X,Y,J){if(Y!=="1")throw TypeError("prop must be 1");return Q.T.l=J,!0}})}copy(){return new xJ(this.T,this.C,this.container,this.iteratorType)}}class Gx0 extends Yx0{constructor(Q=[],X,Y){super(X,Y);let J=this;Q.forEach(function(G){J.setElement(G[0],G[1])})}begin(){return new xJ(this.C.i||this.C,this.C,this)}end(){return new xJ(this.C,this.C,this)}rBegin(){return new xJ(this.C.h||this.C,this.C,this,1)}rEnd(){return new xJ(this.C,this.C,this,1)}front(){if(this.m===0)return;let Q=this.C.i;return[Q.u,Q.l]}back(){if(this.m===0)return;let Q=this.C.h;return[Q.u,Q.l]}lowerBound(Q){let X=this.R(this.v,Q);return new xJ(X,this.C,this)}upperBound(Q){let X=this.K(this.v,Q);return new xJ(X,this.C,this)}reverseLowerBound(Q){let X=this.L(this.v,Q);return new xJ(X,this.C,this)}reverseUpperBound(Q){let X=this.k(this.v,Q);return new xJ(X,this.C,this)}forEach(Q){this.U(function(X,Y,J){Q([X.u,X.l],Y,J)})}setElement(Q,X,Y){return this.q(Q,X,Y)}getElementByPos(Q){if(Q<0||Q>this.m-1)throw RangeError();let X=this.U(Q);return[X.u,X.l]}find(Q){let X=this.H(this.v,Q);return new xJ(X,this.C,this)}getElementByKey(Q){return this.H(this.v,Q).l}union(Q){let X=this;return Q.forEach(function(Y){X.setElement(Y[0],Y[1])}),this.m}*[Symbol.iterator](){let Q=this.m,X=this.U();for(let Y=0;Y<Q;++Y){let J=X[Y];yield[J.u,J.l]}}}Wx0.OrderedMap=Gx0});var I2=I(($x0)=>{Object.defineProperty($x0,"__esModule",{value:!0});$x0.registerAdminService=j66;$x0.addAdminServicesToServer=C66;var Kx0=[];function j66(Q,X){Kx0.push({getServiceDefinition:Q,getHandlers:X})}function C66(Q){for(let{getServiceDefinition:X,getHandlers:Y}of Kx0)Q.addService(X(),Y())}});var Bx0=I((zx0)=>{Object.defineProperty(zx0,"__esModule",{value:!0});zx0.ClientDuplexStreamImpl=zx0.ClientWritableStreamImpl=zx0.ClientReadableStreamImpl=zx0.ClientUnaryCallImpl=void 0;zx0.callErrorFromStatus=k66;var v66=z0("events"),gi=z0("stream"),rN=z6();function k66(Q,X){let Y=`${Q.code} ${rN.Status[Q.code]}: ${Q.details}`,G=`${Error(Y).stack}
|
|
211
|
+
`).map((X)=>X.trim()).join(" ")};wk0.O=function(Q){return this.inspectOpts.colors=this.useColors,nC.inspect(Q,this.inspectOpts)}});var Ak0=I((dY1,Un)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)Un.exports=Uk0();else Un.exports=Tk0()});var Dn=I((pY1,Ek0)=>{var Bn=z0("path").sep;Ek0.exports=function(Q){var X=Q.split(Bn),Y=X.lastIndexOf("node_modules");if(Y===-1)return;if(!X[Y+1])return;var J=X[Y+1][0]==="@",G=J?X[Y+1]+"/"+X[Y+2]:X[Y+1],Z=J?3:2,W="",K=Y+Z-1;for(var $=0;$<=K;$++)if($===K)W+=X[$];else W+=X[$]+Bn;var H="",F=X.length-1;for(var q=Y+Z;q<=F;q++)if(q===F)H+=X[q];else H+=X[q]+Bn;return{name:G,basedir:W,path:H}}});var Ln=I((cY1,On)=>{var Iq=z0("path"),_J=z0("module"),v8=Ak0()("require-in-the-middle"),ir4=Dn();On.exports=_N;On.exports.Hook=_N;var Nn,aC;if(_J.isBuiltin)aC=_J.isBuiltin;else if(_J.builtinModules)aC=(Q)=>{if(Q.startsWith("node:"))return!0;if(Nn===void 0)Nn=new Set(_J.builtinModules);return Nn.has(Q)};else throw Error("'require-in-the-middle' requires Node.js >=v9.3.0 or >=v8.10.0");var ar4=/([/\\]index)?(\.js)?$/;class Ik0{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(Q,X){if(this._localCache.has(Q))return!0;else if(!X){let Y=z0.cache[Q];return!!(Y&&(this._kRitmExports in Y))}else return!1}get(Q,X){let Y=this._localCache.get(Q);if(Y!==void 0)return Y;else if(!X){let J=z0.cache[Q];return J&&J[this._kRitmExports]}}set(Q,X,Y){if(Y)this._localCache.set(Q,X);else if(Q in z0.cache)z0.cache[Q][this._kRitmExports]=X;else v8('non-core module is unexpectedly not in require.cache: "%s"',Q),this._localCache.set(Q,X)}}function _N(Q,X,Y){if(this instanceof _N===!1)return new _N(Q,X,Y);if(typeof Q==="function")Y=Q,Q=null,X=null;else if(typeof X==="function")Y=X,X=null;if(typeof _J._resolveFilename!=="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof _J._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at https://github.com/nodejs/require-in-the-middle/issues",process.version);return}this._cache=new Ik0,this._unhooked=!1,this._origRequire=_J.prototype.require;let J=this,G=new Set,Z=X?X.internals===!0:!1,W=Array.isArray(Q);if(v8("registering require hook"),this._require=_J.prototype.require=function($){if(J._unhooked===!0)return v8("ignoring require call - module is soft-unhooked"),J._origRequire.apply(this,arguments);return K.call(this,arguments,!1)},typeof process.getBuiltinModule==="function")this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function($){if(J._unhooked===!0)return v8("ignoring process.getBuiltinModule call - module is soft-unhooked"),J._origGetBuiltinModule.apply(this,arguments);return K.call(this,arguments,!0)};function K($,H){let F=$[0],q=aC(F),V;if(q){if(V=F,F.startsWith("node:")){let E=F.slice(5);if(aC(E))V=E}}else if(H)return v8("call to process.getBuiltinModule with unknown built-in id"),J._origGetBuiltinModule.apply(this,$);else try{V=_J._resolveFilename(F,this)}catch(E){return v8('Module._resolveFilename("%s") threw %j, calling original Module.require',F,E.message),J._origRequire.apply(this,$)}let U,D;if(v8("processing %s module require('%s'): %s",q===!0?"core":"non-core",F,V),J._cache.has(V,q)===!0)return v8("returning already patched cached module: %s",V),J._cache.get(V,q);let N=G.has(V);if(N===!1)G.add(V);let O=H?J._origGetBuiltinModule.apply(this,$):J._origRequire.apply(this,$);if(N===!0)return v8("module is in the process of being patched already - ignoring: %s",V),O;if(G.delete(V),q===!0){if(W===!0&&Q.includes(V)===!1)return v8("ignoring core module not on whitelist: %s",V),O;U=V}else if(W===!0&&Q.includes(V)){let E=Iq.parse(V);U=E.name,D=E.dir}else{let E=ir4(V);if(E===void 0)return v8("could not parse filename: %s",V),O;U=E.name,D=E.basedir;let C=rr4(E);v8("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",U,F,C,D);let A=!1;if(W){if(!F.startsWith(".")&&Q.includes(F))U=F,A=!0;if(!Q.includes(U)&&!Q.includes(C))return O;if(Q.includes(C)&&C!==U)U=C,A=!0}if(!A){let T;try{T=z0.resolve(U,{paths:[D]})}catch(j){return v8("could not resolve module: %s",U),J._cache.set(V,O,q),O}if(T!==V)if(Z===!0)U=U+Iq.sep+Iq.relative(D,V),v8("preparing to process require of internal file: %s",U);else return v8("ignoring require of non-main module file: %s",T),J._cache.set(V,O,q),O}}J._cache.set(V,O,q),v8("calling require hook: %s",U);let L=Y(O,U,D);return J._cache.set(V,L,q),v8("returning module: %s",U),L}}_N.prototype.unhook=function(){if(this._unhooked=!0,this._require===_J.prototype.require)_J.prototype.require=this._origRequire,v8("require unhook successful");else v8("require unhook unsuccessful");if(process.getBuiltinModule!==void 0)if(this._getBuiltinModule===process.getBuiltinModule)process.getBuiltinModule=this._origGetBuiltinModule,v8("process.getBuiltinModule unhook successful");else v8("process.getBuiltinModule unhook unsuccessful")};function rr4(Q){let X=Iq.sep!=="/"?Q.path.split(Iq.sep).join("/"):Q.path;return Iq.posix.join(Q.name,X).replace(ar4,"")}});var Sk0=I((Ck0)=>{Object.defineProperty(Ck0,"__esModule",{value:!0});Ck0.ModuleNameTrie=Ck0.ModuleNameSeparator=void 0;Ck0.ModuleNameSeparator="/";class wn{hooks=[];children=new Map}class jk0{_trie=new wn;_counter=0;insert(Q){let X=this._trie;for(let Y of Q.moduleName.split(Ck0.ModuleNameSeparator)){let J=X.children.get(Y);if(!J)J=new wn,X.children.set(Y,J);X=J}X.hooks.push({hook:Q,insertedId:this._counter++})}search(Q,{maintainInsertionOrder:X,fullOnly:Y}={}){let J=this._trie,G=[],Z=!0;for(let W of Q.split(Ck0.ModuleNameSeparator)){let K=J.children.get(W);if(!K){Z=!1;break}if(!Y)G.push(...K.hooks);J=K}if(Y&&Z)G.push(...J.hooks);if(G.length===0)return[];if(G.length===1)return[G[0].hook];if(X)G.sort((W,K)=>W.insertedId-K.insertedId);return G.map(({hook:W})=>W)}}Ck0.ModuleNameTrie=jk0});var yk0=I((kk0)=>{Object.defineProperty(kk0,"__esModule",{value:!0});kk0.RequireInTheMiddleSingleton=void 0;var or4=Ln(),vk0=z0("path"),Pn=Sk0(),sr4=["afterEach","after","beforeEach","before","describe","it"].every((Q)=>{return typeof global[Q]==="function"});class rC{_moduleNameTrie=new Pn.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new or4.Hook(null,{internals:!0},(Q,X,Y)=>{let J=tr4(X),G=this._moduleNameTrie.search(J,{maintainInsertionOrder:!0,fullOnly:Y===void 0});for(let{onRequire:Z}of G)Q=Z(Q,X,Y);return Q})}register(Q,X){let Y={moduleName:Q,onRequire:X};return this._moduleNameTrie.insert(Y),Y}static getInstance(){if(sr4)return new rC;return this._instance=this._instance??new rC}}kk0.RequireInTheMiddleSingleton=rC;function tr4(Q){return vk0.sep!==Pn.ModuleNameSeparator?Q.split(vk0.sep).join(Pn.ModuleNameSeparator):Q}});var uk0=I((Jo4)=>{var bk0=[],Tn=new WeakMap,fk0=new WeakMap,hk0=new Map,xk0=[],er4={set(Q,X,Y){let J=Tn.get(Q),G=J&&J[X];if(typeof G==="function")return G(Y);return!0},get(Q,X){if(X===Symbol.toStringTag)return"Module";let Y=fk0.get(Q)[X];if(typeof Y==="function")return Y()},defineProperty(Q,X,Y){if(!("value"in Y))throw Error("Getters/setters are not supported for exports property descriptors.");let J=Tn.get(Q),G=J&&J[X];if(typeof G==="function")return G(Y.value);return!0}};function Qo4(Q,X,Y,J,G){hk0.set(Q,G),Tn.set(X,Y),fk0.set(X,J);let Z=new Proxy(X,er4);bk0.forEach((W)=>W(Q,Z,G)),xk0.push([Q,Z,G])}var gk0=!1;function Xo4(){return gk0}function Yo4(Q){gk0=Q}Jo4.register=Qo4;Jo4.importHooks=bk0;Jo4.specifiers=hk0;Jo4.toHook=xk0;Jo4.getExperimentalPatchInternals=Xo4;Jo4.setExperimentalPatchInternals=Yo4});var nk0=I((oY1,jq)=>{var mk0=z0("path"),Fo4=Dn(),{fileURLToPath:lk0}=z0("url"),{MessageChannel:qo4}=z0("worker_threads"),{importHooks:An,specifiers:Vo4,toHook:zo4,getExperimentalPatchInternals:Uo4}=uk0();function pk0(Q){An.push(Q),zo4.forEach(([X,Y,J])=>Q(X,Y,J))}function ck0(Q){let X=An.indexOf(Q);if(X>-1)An.splice(X,1)}function dk0(Q,X,Y,J){let G=Q(X,Y,J);if(G&&G!==X){if("default"in X)X.default=G}}var En;function Bo4(){let{port1:Q,port2:X}=new qo4,Y=0,J;En=(K)=>{Y++,Q.postMessage(K)},Q.on("message",()=>{if(Y--,J&&Y<=0)J()}).unref();function G(){let K=setInterval(()=>{},1000),$=new Promise((H)=>{J=H}).then(()=>{clearInterval(K)});if(Y===0)J();return $}let Z=X;return{registerOptions:{data:{addHookMessagePort:Z,include:[]},transferList:[Z]},addHookMessagePort:Z,waitForAllMessagesAcknowledged:G}}function yN(Q,X,Y){if(this instanceof yN===!1)return new yN(Q,X,Y);if(typeof Q==="function")Y=Q,Q=null,X=null;else if(typeof X==="function")Y=X,X=null;let J=X?X.internals===!0:!1;if(En&&Array.isArray(Q))En(Q);this._iitmHook=(G,Z,W)=>{let K=G,$=G.startsWith("node:"),H;if($)G=G.replace(/^node:/,"");else{if(G.startsWith("file://")){let q=Error.stackTraceLimit;Error.stackTraceLimit=0;try{G=lk0(G)}catch(V){}Error.stackTraceLimit=q}let F=Fo4(G);if(F)G=F.name,H=F.basedir}if(Q)for(let F of Q){let q=F===G,V=F===W;if(q||V){if(H){if(J)G=G+mk0.sep+mk0.relative(H,lk0(K));else if(!Uo4()&&!V&&!H.endsWith(Vo4.get(K)))continue}dk0(Y,Z,G,H)}}else dk0(Y,Z,G,H)},pk0(this._iitmHook)}yN.prototype.unhook=function(){ck0(this._iitmHook)};jq.exports=yN;jq.exports.Hook=yN;jq.exports.addHook=pk0;jq.exports.removeHook=ck0;jq.exports.createAddHookMessageChannel=Bo4});var In=I((ik0)=>{Object.defineProperty(ik0,"__esModule",{value:!0});ik0.isWrapped=ik0.safeExecuteInTheMiddleAsync=ik0.safeExecuteInTheMiddle=void 0;function Do4(Q,X,Y){let J,G;try{G=Q()}catch(Z){J=Z}finally{if(X(J,G),J&&!Y)throw J;return G}}ik0.safeExecuteInTheMiddle=Do4;async function No4(Q,X,Y){let J,G;try{G=await Q()}catch(Z){J=Z}finally{if(X(J,G),J&&!Y)throw J;return G}}ik0.safeExecuteInTheMiddleAsync=No4;function Oo4(Q){return typeof Q==="function"&&typeof Q.__original==="function"&&typeof Q.__unwrap==="function"&&Q.__wrapped===!0}ik0.isWrapped=Oo4});var Q_0=I((tk0)=>{Object.defineProperty(tk0,"__esModule",{value:!0});tk0.InstrumentationBase=void 0;var bN=z0("path"),rk0=z0("util"),Mo4=Jk0(),jn=Fn(),Po4=Hk0(),To4=yk0(),Ao4=nk0(),fN=G4(),Eo4=Ln(),Io4=z0("fs"),jo4=In();class sk0 extends Po4.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=To4.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(Q,X,Y){super(Q,X,Y);let J=this.init();if(J&&!Array.isArray(J))J=[J];if(this._modules=J||[],this._config.enabled)this.enable()}_wrap=(Q,X,Y)=>{if((0,jo4.isWrapped)(Q[X]))this._unwrap(Q,X);if(!rk0.types.isProxy(Q))return(0,jn.wrap)(Q,X,Y);else{let J=(0,jn.wrap)(Object.assign({},Q),X,Y);return Object.defineProperty(Q,X,{value:J}),J}};_unwrap=(Q,X)=>{if(!rk0.types.isProxy(Q))return(0,jn.unwrap)(Q,X);else return Object.defineProperty(Q,X,{value:Q[X]})};_massWrap=(Q,X,Y)=>{if(!Q){fN.diag.error("must provide one or more modules to patch");return}else if(!Array.isArray(Q))Q=[Q];if(!(X&&Array.isArray(X))){fN.diag.error("must provide one or more functions to wrap on modules");return}Q.forEach((J)=>{X.forEach((G)=>{this._wrap(J,G,Y)})})};_massUnwrap=(Q,X)=>{if(!Q){fN.diag.error("must provide one or more modules to patch");return}else if(!Array.isArray(Q))Q=[Q];if(!(X&&Array.isArray(X))){fN.diag.error("must provide one or more functions to wrap on modules");return}Q.forEach((Y)=>{X.forEach((J)=>{this._unwrap(Y,J)})})};_warnOnPreloadedModules(){this._modules.forEach((Q)=>{let{name:X}=Q;try{let Y=z0.resolve(X);if(z0.cache[Y])this._diag.warn(`Module ${X} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${X}`)}catch{}})}_extractPackageVersion(Q){try{let X=(0,Io4.readFileSync)(bN.join(Q,"package.json"),{encoding:"utf8"}),Y=JSON.parse(X).version;return typeof Y==="string"?Y:void 0}catch{fN.diag.warn("Failed extracting version",Q)}return}_onRequire(Q,X,Y,J){if(!J){if(typeof Q.patch==="function"){if(Q.moduleExports=X,this._enabled)return this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:Q.name}),Q.patch(X)}return X}let G=this._extractPackageVersion(J);if(Q.moduleVersion=G,Q.name===Y){if(ok0(Q.supportedVersions,G,Q.includePrerelease)){if(typeof Q.patch==="function"){if(Q.moduleExports=X,this._enabled)return this._diag.debug("Applying instrumentation patch for module on require hook",{module:Q.name,version:Q.moduleVersion,baseDir:J}),Q.patch(X,Q.moduleVersion)}}return X}let Z=Q.files??[],W=bN.normalize(Y);return Z.filter(($)=>$.name===W).filter(($)=>ok0($.supportedVersions,G,Q.includePrerelease)).reduce(($,H)=>{if(H.moduleExports=$,this._enabled)return this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:Q.name,version:Q.moduleVersion,fileName:H.name,baseDir:J}),H.patch($,Q.moduleVersion);return $},X)}enable(){if(this._enabled)return;if(this._enabled=!0,this._hooks.length>0){for(let Q of this._modules){if(typeof Q.patch==="function"&&Q.moduleExports)this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:Q.name,version:Q.moduleVersion}),Q.patch(Q.moduleExports,Q.moduleVersion);for(let X of Q.files)if(X.moduleExports)this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:Q.name,version:Q.moduleVersion,fileName:X.name}),X.patch(X.moduleExports,Q.moduleVersion)}return}this._warnOnPreloadedModules();for(let Q of this._modules){let X=(Z,W,K)=>{if(!K&&bN.isAbsolute(W)){let $=bN.parse(W);W=$.name,K=$.dir}return this._onRequire(Q,Z,W,K)},Y=(Z,W,K)=>{return this._onRequire(Q,Z,W,K)},J=bN.isAbsolute(Q.name)?new Eo4.Hook([Q.name],{internals:!0},Y):this._requireInTheMiddleSingleton.register(Q.name,Y);this._hooks.push(J);let G=new Ao4.Hook([Q.name],{internals:!1},X);this._hooks.push(G)}}disable(){if(!this._enabled)return;this._enabled=!1;for(let Q of this._modules){if(typeof Q.unpatch==="function"&&Q.moduleExports)this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:Q.name,version:Q.moduleVersion}),Q.unpatch(Q.moduleExports,Q.moduleVersion);for(let X of Q.files)if(X.moduleExports)this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:Q.name,version:Q.moduleVersion,fileName:X.name}),X.unpatch(X.moduleExports,Q.moduleVersion)}}isEnabled(){return this._enabled}}tk0.InstrumentationBase=sk0;function ok0(Q,X,Y){if(typeof X>"u")return Q.includes("*");return Q.some((J)=>{return(0,Mo4.satisfies)(X,J,{includePrerelease:Y})})}});var X_0=I((Cn)=>{Object.defineProperty(Cn,"__esModule",{value:!0});Cn.normalize=void 0;var Co4=z0("path");Object.defineProperty(Cn,"normalize",{enumerable:!0,get:function(){return Co4.normalize}})});var Y_0=I((oC)=>{Object.defineProperty(oC,"__esModule",{value:!0});oC.normalize=oC.InstrumentationBase=void 0;var So4=Q_0();Object.defineProperty(oC,"InstrumentationBase",{enumerable:!0,get:function(){return So4.InstrumentationBase}});var vo4=X_0();Object.defineProperty(oC,"normalize",{enumerable:!0,get:function(){return vo4.normalize}})});var Rn=I((sC)=>{Object.defineProperty(sC,"__esModule",{value:!0});sC.normalize=sC.InstrumentationBase=void 0;var J_0=Y_0();Object.defineProperty(sC,"InstrumentationBase",{enumerable:!0,get:function(){return J_0.InstrumentationBase}});Object.defineProperty(sC,"normalize",{enumerable:!0,get:function(){return J_0.normalize}})});var K_0=I((W_0)=>{Object.defineProperty(W_0,"__esModule",{value:!0});W_0.InstrumentationNodeModuleDefinition=void 0;class G_0{name;supportedVersions;patch;unpatch;files;constructor(Q,X,Y,J,G){this.name=Q,this.supportedVersions=X,this.patch=Y,this.unpatch=J,this.files=G||[]}}W_0.InstrumentationNodeModuleDefinition=G_0});var q_0=I((H_0)=>{Object.defineProperty(H_0,"__esModule",{value:!0});H_0.InstrumentationNodeModuleFile=void 0;var yo4=Rn();class $_0{supportedVersions;patch;unpatch;name;constructor(Q,X,Y,J){this.supportedVersions=X,this.patch=Y,this.unpatch=J,this.name=(0,yo4.normalize)(Q)}}H_0.InstrumentationNodeModuleFile=$_0});var B_0=I((z_0)=>{Object.defineProperty(z_0,"__esModule",{value:!0});z_0.semconvStabilityFromStr=z_0.SemconvStability=void 0;var tC;(function(Q){Q[Q.STABLE=1]="STABLE",Q[Q.OLD=2]="OLD",Q[Q.DUPLICATE=3]="DUPLICATE"})(tC=z_0.SemconvStability||(z_0.SemconvStability={}));function bo4(Q,X){let Y=tC.OLD,J=X?.split(",").map((G)=>G.trim()).filter((G)=>G!=="");for(let G of J??[])if(G.toLowerCase()===Q+"/dup"){Y=tC.DUPLICATE;break}else if(G.toLowerCase()===Q)Y=tC.STABLE;return Y}z_0.semconvStabilityFromStr=bo4});var N_0=I((yJ)=>{Object.defineProperty(yJ,"__esModule",{value:!0});yJ.semconvStabilityFromStr=yJ.SemconvStability=yJ.safeExecuteInTheMiddleAsync=yJ.safeExecuteInTheMiddle=yJ.isWrapped=yJ.InstrumentationNodeModuleFile=yJ.InstrumentationNodeModuleDefinition=yJ.InstrumentationBase=yJ.registerInstrumentations=void 0;var fo4=nv0();Object.defineProperty(yJ,"registerInstrumentations",{enumerable:!0,get:function(){return fo4.registerInstrumentations}});var ho4=Rn();Object.defineProperty(yJ,"InstrumentationBase",{enumerable:!0,get:function(){return ho4.InstrumentationBase}});var xo4=K_0();Object.defineProperty(yJ,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return xo4.InstrumentationNodeModuleDefinition}});var go4=q_0();Object.defineProperty(yJ,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return go4.InstrumentationNodeModuleFile}});var Sn=In();Object.defineProperty(yJ,"isWrapped",{enumerable:!0,get:function(){return Sn.isWrapped}});Object.defineProperty(yJ,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return Sn.safeExecuteInTheMiddle}});Object.defineProperty(yJ,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return Sn.safeExecuteInTheMiddleAsync}});var D_0=B_0();Object.defineProperty(yJ,"SemconvStability",{enumerable:!0,get:function(){return D_0.SemconvStability}});Object.defineProperty(yJ,"semconvStabilityFromStr",{enumerable:!0,get:function(){return D_0.semconvStabilityFromStr}})});var M_0=I((L_0)=>{Object.defineProperty(L_0,"__esModule",{value:!0});L_0.OTLPExporterBase=void 0;class O_0{_delegate;constructor(Q){this._delegate=Q}export(Q,X){this._delegate.export(Q,X)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}}L_0.OTLPExporterBase=O_0});var eC=I((T_0)=>{Object.defineProperty(T_0,"__esModule",{value:!0});T_0.OTLPExporterError=void 0;class P_0 extends Error{code;name="OTLPExporterError";data;constructor(Q,X,Y){super(Q);this.data=Y,this.code=X}}T_0.OTLPExporterError=P_0});var hN=I((I_0)=>{Object.defineProperty(I_0,"__esModule",{value:!0});I_0.getSharedConfigurationDefaults=I_0.mergeOtlpSharedConfigurationWithDefaults=I_0.wrapStaticHeadersInFunction=I_0.validateTimeoutMillis=void 0;function E_0(Q){if(Number.isFinite(Q)&&Q>0)return Q;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${Q}')`)}I_0.validateTimeoutMillis=E_0;function mo4(Q){if(Q==null)return;return()=>Q}I_0.wrapStaticHeadersInFunction=mo4;function lo4(Q,X,Y){return{timeoutMillis:E_0(Q.timeoutMillis??X.timeoutMillis??Y.timeoutMillis),concurrencyLimit:Q.concurrencyLimit??X.concurrencyLimit??Y.concurrencyLimit,compression:Q.compression??X.compression??Y.compression}}I_0.mergeOtlpSharedConfigurationWithDefaults=lo4;function do4(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}I_0.getSharedConfigurationDefaults=do4});var R_0=I((C_0)=>{Object.defineProperty(C_0,"__esModule",{value:!0});C_0.CompressionAlgorithm=void 0;var io4;(function(Q){Q.NONE="none",Q.GZIP="gzip"})(io4=C_0.CompressionAlgorithm||(C_0.CompressionAlgorithm={}))});var kn=I((v_0)=>{Object.defineProperty(v_0,"__esModule",{value:!0});v_0.createBoundedQueueExportPromiseHandler=void 0;class S_0{_concurrencyLimit;_sendingPromises=[];constructor(Q){this._concurrencyLimit=Q}pushPromise(Q){if(this.hasReachedLimit())throw Error("Concurrency Limit reached");this._sendingPromises.push(Q);let X=()=>{let Y=this._sendingPromises.indexOf(Q);this._sendingPromises.splice(Y,1)};Q.then(X,X)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}}function ao4(Q){return new S_0(Q.concurrencyLimit)}v_0.createBoundedQueueExportPromiseHandler=ao4});var b_0=I((__0)=>{Object.defineProperty(__0,"__esModule",{value:!0});__0.createLoggingPartialSuccessResponseHandler=void 0;var ro4=G4();function oo4(Q){return Object.prototype.hasOwnProperty.call(Q,"partialSuccess")}function so4(){return{handleResponse(Q){if(Q==null||!oo4(Q)||Q.partialSuccess==null||Object.keys(Q.partialSuccess).length===0)return;ro4.diag.warn("Received Partial Success response:",JSON.stringify(Q.partialSuccess))}}}__0.createLoggingPartialSuccessResponseHandler=so4});var _n=I((x_0)=>{Object.defineProperty(x_0,"__esModule",{value:!0});x_0.createOtlpExportDelegate=void 0;var Y$=l4(),f_0=eC(),to4=b_0(),eo4=G4();class h_0{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(Q,X,Y,J,G){this._transport=Q,this._serializer=X,this._responseHandler=Y,this._promiseQueue=J,this._timeout=G,this._diagLogger=eo4.diag.createComponentLogger({namespace:"OTLPExportDelegate"})}export(Q,X){if(this._diagLogger.debug("items to be sent",Q),this._promiseQueue.hasReachedLimit()){X({code:Y$.ExportResultCode.FAILED,error:Error("Concurrent export limit reached")});return}let Y=this._serializer.serializeRequest(Q);if(Y==null){X({code:Y$.ExportResultCode.FAILED,error:Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(Y,this._timeout).then((J)=>{if(J.status==="success"){if(J.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(J.data))}catch(G){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",G,J.data)}X({code:Y$.ExportResultCode.SUCCESS});return}else if(J.status==="failure"&&J.error){X({code:Y$.ExportResultCode.FAILED,error:J.error});return}else if(J.status==="retryable")X({code:Y$.ExportResultCode.FAILED,error:new f_0.OTLPExporterError("Export failed with retryable status")});else X({code:Y$.ExportResultCode.FAILED,error:new f_0.OTLPExporterError("Export failed with unknown error")})},(J)=>X({code:Y$.ExportResultCode.FAILED,error:J})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug("shutdown started"),await this.forceFlush(),this._transport.shutdown()}}function Qs4(Q,X){return new h_0(Q.transport,Q.serializer,(0,to4.createLoggingPartialSuccessResponseHandler)(),Q.promiseHandler,X.timeout)}x_0.createOtlpExportDelegate=Qs4});var l_0=I((u_0)=>{Object.defineProperty(u_0,"__esModule",{value:!0});u_0.createOtlpNetworkExportDelegate=void 0;var Xs4=kn(),Ys4=_n();function Js4(Q,X,Y){return(0,Ys4.createOtlpExportDelegate)({transport:Y,serializer:X,promiseHandler:(0,Xs4.createBoundedQueueExportPromiseHandler)(Q)},{timeout:Q.timeoutMillis})}u_0.createOtlpNetworkExportDelegate=Js4});var r5=I((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.createOtlpNetworkExportDelegate=FZ.CompressionAlgorithm=FZ.getSharedConfigurationDefaults=FZ.mergeOtlpSharedConfigurationWithDefaults=FZ.OTLPExporterError=FZ.OTLPExporterBase=void 0;var Gs4=M_0();Object.defineProperty(FZ,"OTLPExporterBase",{enumerable:!0,get:function(){return Gs4.OTLPExporterBase}});var Ws4=eC();Object.defineProperty(FZ,"OTLPExporterError",{enumerable:!0,get:function(){return Ws4.OTLPExporterError}});var d_0=hN();Object.defineProperty(FZ,"mergeOtlpSharedConfigurationWithDefaults",{enumerable:!0,get:function(){return d_0.mergeOtlpSharedConfigurationWithDefaults}});Object.defineProperty(FZ,"getSharedConfigurationDefaults",{enumerable:!0,get:function(){return d_0.getSharedConfigurationDefaults}});var Zs4=R_0();Object.defineProperty(FZ,"CompressionAlgorithm",{enumerable:!0,get:function(){return Zs4.CompressionAlgorithm}});var Ks4=l_0();Object.defineProperty(FZ,"createOtlpNetworkExportDelegate",{enumerable:!0,get:function(){return Ks4.createOtlpNetworkExportDelegate}})});var yn=I((vJ1,p_0)=>{p_0.exports=Hs4;function Hs4(Q,X){var Y=Array(arguments.length-1),J=0,G=2,Z=!0;while(G<arguments.length)Y[J++]=arguments[G++];return new Promise(function(K,$){Y[J]=function(F){if(Z)if(Z=!1,F)$(F);else{var q=Array(arguments.length-1),V=0;while(V<q.length)q[V++]=arguments[V];K.apply(null,q)}};try{Q.apply(X||null,Y)}catch(H){if(Z)Z=!1,$(H)}})}});var a_0=I((i_0)=>{var Q2=i_0;Q2.length=function(X){var Y=X.length;if(!Y)return 0;var J=0;while(--Y%4>1&&X.charAt(Y)==="=")++J;return Math.ceil(X.length*3)/4-J};var Cq=Array(64),n_0=Array(123);for(QJ=0;QJ<64;)n_0[Cq[QJ]=QJ<26?QJ+65:QJ<52?QJ+71:QJ<62?QJ-4:QJ-59|43]=QJ++;var QJ;Q2.encode=function(X,Y,J){var G=null,Z=[],W=0,K=0,$;while(Y<J){var H=X[Y++];switch(K){case 0:Z[W++]=Cq[H>>2],$=(H&3)<<4,K=1;break;case 1:Z[W++]=Cq[$|H>>4],$=(H&15)<<2,K=2;break;case 2:Z[W++]=Cq[$|H>>6],Z[W++]=Cq[H&63],K=0;break}if(W>8191)(G||(G=[])).push(String.fromCharCode.apply(String,Z)),W=0}if(K){if(Z[W++]=Cq[$],Z[W++]=61,K===1)Z[W++]=61}if(G){if(W)G.push(String.fromCharCode.apply(String,Z.slice(0,W)));return G.join("")}return String.fromCharCode.apply(String,Z.slice(0,W))};var c_0="invalid encoding";Q2.decode=function(X,Y,J){var G=J,Z=0,W;for(var K=0;K<X.length;){var $=X.charCodeAt(K++);if($===61&&Z>1)break;if(($=n_0[$])===void 0)throw Error(c_0);switch(Z){case 0:W=$,Z=1;break;case 1:Y[J++]=W<<2|($&48)>>4,W=$,Z=2;break;case 2:Y[J++]=(W&15)<<4|($&60)>>2,W=$,Z=3;break;case 3:Y[J++]=(W&3)<<6|$,Z=0;break}}if(Z===1)throw Error(c_0);return J-G};Q2.test=function(X){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(X)}});var o_0=I((_J1,r_0)=>{r_0.exports=X2;function X2(){this._listeners={}}X2.prototype.on=function(X,Y,J){return(this._listeners[X]||(this._listeners[X]=[])).push({fn:Y,ctx:J||this}),this};X2.prototype.off=function(X,Y){if(X===void 0)this._listeners={};else if(Y===void 0)this._listeners[X]=[];else{var J=this._listeners[X];for(var G=0;G<J.length;)if(J[G].fn===Y)J.splice(G,1);else++G}return this};X2.prototype.emit=function(X){var Y=this._listeners[X];if(Y){var J=[],G=1;for(;G<arguments.length;)J.push(arguments[G++]);for(G=0;G<Y.length;)Y[G].fn.apply(Y[G++].ctx,J)}return this}});var Jy0=I((yJ1,Yy0)=>{Yy0.exports=s_0(s_0);function s_0(Q){if(typeof Float32Array<"u")(function(){var X=new Float32Array([-0]),Y=new Uint8Array(X.buffer),J=Y[3]===128;function G($,H,F){X[0]=$,H[F]=Y[0],H[F+1]=Y[1],H[F+2]=Y[2],H[F+3]=Y[3]}function Z($,H,F){X[0]=$,H[F]=Y[3],H[F+1]=Y[2],H[F+2]=Y[1],H[F+3]=Y[0]}Q.writeFloatLE=J?G:Z,Q.writeFloatBE=J?Z:G;function W($,H){return Y[0]=$[H],Y[1]=$[H+1],Y[2]=$[H+2],Y[3]=$[H+3],X[0]}function K($,H){return Y[3]=$[H],Y[2]=$[H+1],Y[1]=$[H+2],Y[0]=$[H+3],X[0]}Q.readFloatLE=J?W:K,Q.readFloatBE=J?K:W})();else(function(){function X(J,G,Z,W){var K=G<0?1:0;if(K)G=-G;if(G===0)J(1/G>0?0:2147483648,Z,W);else if(isNaN(G))J(2143289344,Z,W);else if(G>340282346638528860000000000000000000000)J((K<<31|2139095040)>>>0,Z,W);else if(G<0.000000000000000000000000000000000000011754943508222875)J((K<<31|Math.round(G/0.000000000000000000000000000000000000000000001401298464324817))>>>0,Z,W);else{var $=Math.floor(Math.log(G)/Math.LN2),H=Math.round(G*Math.pow(2,-$)*8388608)&8388607;J((K<<31|$+127<<23|H)>>>0,Z,W)}}Q.writeFloatLE=X.bind(null,t_0),Q.writeFloatBE=X.bind(null,e_0);function Y(J,G,Z){var W=J(G,Z),K=(W>>31)*2+1,$=W>>>23&255,H=W&8388607;return $===255?H?NaN:K*(1/0):$===0?K*0.000000000000000000000000000000000000000000001401298464324817*H:K*Math.pow(2,$-150)*(H+8388608)}Q.readFloatLE=Y.bind(null,Qy0),Q.readFloatBE=Y.bind(null,Xy0)})();if(typeof Float64Array<"u")(function(){var X=new Float64Array([-0]),Y=new Uint8Array(X.buffer),J=Y[7]===128;function G($,H,F){X[0]=$,H[F]=Y[0],H[F+1]=Y[1],H[F+2]=Y[2],H[F+3]=Y[3],H[F+4]=Y[4],H[F+5]=Y[5],H[F+6]=Y[6],H[F+7]=Y[7]}function Z($,H,F){X[0]=$,H[F]=Y[7],H[F+1]=Y[6],H[F+2]=Y[5],H[F+3]=Y[4],H[F+4]=Y[3],H[F+5]=Y[2],H[F+6]=Y[1],H[F+7]=Y[0]}Q.writeDoubleLE=J?G:Z,Q.writeDoubleBE=J?Z:G;function W($,H){return Y[0]=$[H],Y[1]=$[H+1],Y[2]=$[H+2],Y[3]=$[H+3],Y[4]=$[H+4],Y[5]=$[H+5],Y[6]=$[H+6],Y[7]=$[H+7],X[0]}function K($,H){return Y[7]=$[H],Y[6]=$[H+1],Y[5]=$[H+2],Y[4]=$[H+3],Y[3]=$[H+4],Y[2]=$[H+5],Y[1]=$[H+6],Y[0]=$[H+7],X[0]}Q.readDoubleLE=J?W:K,Q.readDoubleBE=J?K:W})();else(function(){function X(J,G,Z,W,K,$){var H=W<0?1:0;if(H)W=-W;if(W===0)J(0,K,$+G),J(1/W>0?0:2147483648,K,$+Z);else if(isNaN(W))J(0,K,$+G),J(2146959360,K,$+Z);else if(W>179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)J(0,K,$+G),J((H<<31|2146435072)>>>0,K,$+Z);else{var F;if(W<0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014)F=W/0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005,J(F>>>0,K,$+G),J((H<<31|F/4294967296)>>>0,K,$+Z);else{var q=Math.floor(Math.log(W)/Math.LN2);if(q===1024)q=1023;F=W*Math.pow(2,-q),J(F*4503599627370496>>>0,K,$+G),J((H<<31|q+1023<<20|F*1048576&1048575)>>>0,K,$+Z)}}}Q.writeDoubleLE=X.bind(null,t_0,0,4),Q.writeDoubleBE=X.bind(null,e_0,4,0);function Y(J,G,Z,W,K){var $=J(W,K+G),H=J(W,K+Z),F=(H>>31)*2+1,q=H>>>20&2047,V=4294967296*(H&1048575)+$;return q===2047?V?NaN:F*(1/0):q===0?F*0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005*V:F*Math.pow(2,q-1075)*(V+4503599627370496)}Q.readDoubleLE=Y.bind(null,Qy0,0,4),Q.readDoubleBE=Y.bind(null,Xy0,4,0)})();return Q}function t_0(Q,X,Y){X[Y]=Q&255,X[Y+1]=Q>>>8&255,X[Y+2]=Q>>>16&255,X[Y+3]=Q>>>24}function e_0(Q,X,Y){X[Y]=Q>>>24,X[Y+1]=Q>>>16&255,X[Y+2]=Q>>>8&255,X[Y+3]=Q&255}function Qy0(Q,X){return(Q[X]|Q[X+1]<<8|Q[X+2]<<16|Q[X+3]<<24)>>>0}function Xy0(Q,X){return(Q[X]<<24|Q[X+1]<<16|Q[X+2]<<8|Q[X+3])>>>0}});var hn=I((Gy0,bn)=>{bn.exports=Fs4;function Fs4(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(Q){}return null}});var Zy0=I((Wy0)=>{var xn=Wy0;xn.length=function(X){var Y=0,J=0;for(var G=0;G<X.length;++G)if(J=X.charCodeAt(G),J<128)Y+=1;else if(J<2048)Y+=2;else if((J&64512)===55296&&(X.charCodeAt(G+1)&64512)===56320)++G,Y+=4;else Y+=3;return Y};xn.read=function(X,Y,J){var G=J-Y;if(G<1)return"";var Z=null,W=[],K=0,$;while(Y<J){if($=X[Y++],$<128)W[K++]=$;else if($>191&&$<224)W[K++]=($&31)<<6|X[Y++]&63;else if($>239&&$<365)$=(($&7)<<18|(X[Y++]&63)<<12|(X[Y++]&63)<<6|X[Y++]&63)-65536,W[K++]=55296+($>>10),W[K++]=56320+($&1023);else W[K++]=($&15)<<12|(X[Y++]&63)<<6|X[Y++]&63;if(K>8191)(Z||(Z=[])).push(String.fromCharCode.apply(String,W)),K=0}if(Z){if(K)Z.push(String.fromCharCode.apply(String,W.slice(0,K)));return Z.join("")}return String.fromCharCode.apply(String,W.slice(0,K))};xn.write=function(X,Y,J){var G=J,Z,W;for(var K=0;K<X.length;++K)if(Z=X.charCodeAt(K),Z<128)Y[J++]=Z;else if(Z<2048)Y[J++]=Z>>6|192,Y[J++]=Z&63|128;else if((Z&64512)===55296&&((W=X.charCodeAt(K+1))&64512)===56320)Z=65536+((Z&1023)<<10)+(W&1023),++K,Y[J++]=Z>>18|240,Y[J++]=Z>>12&63|128,Y[J++]=Z>>6&63|128,Y[J++]=Z&63|128;else Y[J++]=Z>>12|224,Y[J++]=Z>>6&63|128,Y[J++]=Z&63|128;return J-G}});var $y0=I((fJ1,Ky0)=>{Ky0.exports=qs4;function qs4(Q,X,Y){var J=Y||8192,G=J>>>1,Z=null,W=J;return function($){if($<1||$>G)return Q($);if(W+$>J)Z=Q(J),W=0;var H=X.call(Z,W,W+=$);if(W&7)W=(W|7)+1;return H}}});var Fy0=I((hJ1,Hy0)=>{Hy0.exports=M9;var xN=o5();function M9(Q,X){this.lo=Q>>>0,this.hi=X>>>0}var J$=M9.zero=new M9(0,0);J$.toNumber=function(){return 0};J$.zzEncode=J$.zzDecode=function(){return this};J$.length=function(){return 1};var Vs4=M9.zeroHash="\x00\x00\x00\x00\x00\x00\x00\x00";M9.fromNumber=function(X){if(X===0)return J$;var Y=X<0;if(Y)X=-X;var J=X>>>0,G=(X-J)/4294967296>>>0;if(Y){if(G=~G>>>0,J=~J>>>0,++J>4294967295){if(J=0,++G>4294967295)G=0}}return new M9(J,G)};M9.from=function(X){if(typeof X==="number")return M9.fromNumber(X);if(xN.isString(X))if(xN.Long)X=xN.Long.fromString(X);else return M9.fromNumber(parseInt(X,10));return X.low||X.high?new M9(X.low>>>0,X.high>>>0):J$};M9.prototype.toNumber=function(X){if(!X&&this.hi>>>31){var Y=~this.lo+1>>>0,J=~this.hi>>>0;if(!Y)J=J+1>>>0;return-(Y+J*4294967296)}return this.lo+this.hi*4294967296};M9.prototype.toLong=function(X){return xN.Long?new xN.Long(this.lo|0,this.hi|0,Boolean(X)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(X)}};var qZ=String.prototype.charCodeAt;M9.fromHash=function(X){if(X===Vs4)return J$;return new M9((qZ.call(X,0)|qZ.call(X,1)<<8|qZ.call(X,2)<<16|qZ.call(X,3)<<24)>>>0,(qZ.call(X,4)|qZ.call(X,5)<<8|qZ.call(X,6)<<16|qZ.call(X,7)<<24)>>>0)};M9.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};M9.prototype.zzEncode=function(){var X=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^X)>>>0,this.lo=(this.lo<<1^X)>>>0,this};M9.prototype.zzDecode=function(){var X=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^X)>>>0,this.hi=(this.hi>>>1^X)>>>0,this};M9.prototype.length=function(){var X=this.lo,Y=(this.lo>>>28|this.hi<<4)>>>0,J=this.hi>>>24;return J===0?Y===0?X<16384?X<128?1:2:X<2097152?3:4:Y<16384?Y<128?5:6:Y<2097152?7:8:J<128?9:10}});var o5=I((gn)=>{var R4=gn;R4.asPromise=yn();R4.base64=a_0();R4.EventEmitter=o_0();R4.float=Jy0();R4.inquire=hn();R4.utf8=Zy0();R4.pool=$y0();R4.LongBits=Fy0();R4.isNode=Boolean(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);R4.global=R4.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||gn;R4.emptyArray=Object.freeze?Object.freeze([]):[];R4.emptyObject=Object.freeze?Object.freeze({}):{};R4.isInteger=Number.isInteger||function(X){return typeof X==="number"&&isFinite(X)&&Math.floor(X)===X};R4.isString=function(X){return typeof X==="string"||X instanceof String};R4.isObject=function(X){return X&&typeof X==="object"};R4.isset=R4.isSet=function(X,Y){var J=X[Y];if(J!=null&&X.hasOwnProperty(Y))return typeof J!=="object"||(Array.isArray(J)?J.length:Object.keys(J).length)>0;return!1};R4.Buffer=function(){try{var Q=R4.inquire("buffer").Buffer;return Q.prototype.utf8Write?Q:null}catch(X){return null}}();R4._Buffer_from=null;R4._Buffer_allocUnsafe=null;R4.newBuffer=function(X){return typeof X==="number"?R4.Buffer?R4._Buffer_allocUnsafe(X):new R4.Array(X):R4.Buffer?R4._Buffer_from(X):typeof Uint8Array>"u"?X:new Uint8Array(X)};R4.Array=typeof Uint8Array<"u"?Uint8Array:Array;R4.Long=R4.global.dcodeIO&&R4.global.dcodeIO.Long||R4.global.Long||R4.inquire("long");R4.key2Re=/^true|false|0|1$/;R4.key32Re=/^-?(?:0|[1-9][0-9]*)$/;R4.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;R4.longToHash=function(X){return X?R4.LongBits.from(X).toHash():R4.LongBits.zeroHash};R4.longFromHash=function(X,Y){var J=R4.LongBits.fromHash(X);if(R4.Long)return R4.Long.fromBits(J.lo,J.hi,Y);return J.toNumber(Boolean(Y))};function qy0(Q,X,Y){for(var J=Object.keys(X),G=0;G<J.length;++G)if(Q[J[G]]===void 0||!Y)Q[J[G]]=X[J[G]];return Q}R4.merge=qy0;R4.lcFirst=function(X){return X.charAt(0).toLowerCase()+X.substring(1)};function Vy0(Q){function X(Y,J){if(!(this instanceof X))return new X(Y,J);if(Object.defineProperty(this,"message",{get:function(){return Y}}),Error.captureStackTrace)Error.captureStackTrace(this,X);else Object.defineProperty(this,"stack",{value:Error().stack||""});if(J)qy0(this,J)}return X.prototype=Object.create(Error.prototype,{constructor:{value:X,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return Q},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),X}R4.newError=Vy0;R4.ProtocolError=Vy0("ProtocolError");R4.oneOfGetter=function(X){var Y={};for(var J=0;J<X.length;++J)Y[X[J]]=1;return function(){for(var G=Object.keys(this),Z=G.length-1;Z>-1;--Z)if(Y[G[Z]]===1&&this[G[Z]]!==void 0&&this[G[Z]]!==null)return G[Z]}};R4.oneOfSetter=function(X){return function(Y){for(var J=0;J<X.length;++J)if(X[J]!==Y)delete this[X[J]]}};R4.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};R4._configure=function(){var Q=R4.Buffer;if(!Q){R4._Buffer_from=R4._Buffer_allocUnsafe=null;return}R4._Buffer_from=Q.from!==Uint8Array.from&&Q.from||function(Y,J){return new Q(Y,J)},R4._Buffer_allocUnsafe=Q.allocUnsafe||function(Y){return new Q(Y)}}});var J2=I((gJ1,Dy0)=>{Dy0.exports=e6;var XJ=o5(),un,Y2=XJ.LongBits,zy0=XJ.base64,Uy0=XJ.utf8;function gN(Q,X,Y){this.fn=Q,this.len=X,this.next=void 0,this.val=Y}function ln(){}function zs4(Q){this.head=Q.head,this.tail=Q.tail,this.len=Q.len,this.next=Q.states}function e6(){this.len=0,this.head=new gN(ln,0,0),this.tail=this.head,this.states=null}var By0=function(){return XJ.Buffer?function(){return(e6.create=function(){return new un})()}:function(){return new e6}};e6.create=By0();e6.alloc=function(X){return new XJ.Array(X)};if(XJ.Array!==Array)e6.alloc=XJ.pool(e6.alloc,XJ.Array.prototype.subarray);e6.prototype._push=function(X,Y,J){return this.tail=this.tail.next=new gN(X,Y,J),this.len+=Y,this};function dn(Q,X,Y){X[Y]=Q&255}function Us4(Q,X,Y){while(Q>127)X[Y++]=Q&127|128,Q>>>=7;X[Y]=Q}function pn(Q,X){this.len=Q,this.next=void 0,this.val=X}pn.prototype=Object.create(gN.prototype);pn.prototype.fn=Us4;e6.prototype.uint32=function(X){return this.len+=(this.tail=this.tail.next=new pn((X=X>>>0)<128?1:X<16384?2:X<2097152?3:X<268435456?4:5,X)).len,this};e6.prototype.int32=function(X){return X<0?this._push(cn,10,Y2.fromNumber(X)):this.uint32(X)};e6.prototype.sint32=function(X){return this.uint32((X<<1^X>>31)>>>0)};function cn(Q,X,Y){while(Q.hi)X[Y++]=Q.lo&127|128,Q.lo=(Q.lo>>>7|Q.hi<<25)>>>0,Q.hi>>>=7;while(Q.lo>127)X[Y++]=Q.lo&127|128,Q.lo=Q.lo>>>7;X[Y++]=Q.lo}e6.prototype.uint64=function(X){var Y=Y2.from(X);return this._push(cn,Y.length(),Y)};e6.prototype.int64=e6.prototype.uint64;e6.prototype.sint64=function(X){var Y=Y2.from(X).zzEncode();return this._push(cn,Y.length(),Y)};e6.prototype.bool=function(X){return this._push(dn,1,X?1:0)};function mn(Q,X,Y){X[Y]=Q&255,X[Y+1]=Q>>>8&255,X[Y+2]=Q>>>16&255,X[Y+3]=Q>>>24}e6.prototype.fixed32=function(X){return this._push(mn,4,X>>>0)};e6.prototype.sfixed32=e6.prototype.fixed32;e6.prototype.fixed64=function(X){var Y=Y2.from(X);return this._push(mn,4,Y.lo)._push(mn,4,Y.hi)};e6.prototype.sfixed64=e6.prototype.fixed64;e6.prototype.float=function(X){return this._push(XJ.float.writeFloatLE,4,X)};e6.prototype.double=function(X){return this._push(XJ.float.writeDoubleLE,8,X)};var Bs4=XJ.Array.prototype.set?function(X,Y,J){Y.set(X,J)}:function(X,Y,J){for(var G=0;G<X.length;++G)Y[J+G]=X[G]};e6.prototype.bytes=function(X){var Y=X.length>>>0;if(!Y)return this._push(dn,1,0);if(XJ.isString(X)){var J=e6.alloc(Y=zy0.length(X));zy0.decode(X,J,0),X=J}return this.uint32(Y)._push(Bs4,Y,X)};e6.prototype.string=function(X){var Y=Uy0.length(X);return Y?this.uint32(Y)._push(Uy0.write,Y,X):this._push(dn,1,0)};e6.prototype.fork=function(){return this.states=new zs4(this),this.head=this.tail=new gN(ln,0,0),this.len=0,this};e6.prototype.reset=function(){if(this.states)this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next;else this.head=this.tail=new gN(ln,0,0),this.len=0;return this};e6.prototype.ldelim=function(){var X=this.head,Y=this.tail,J=this.len;if(this.reset().uint32(J),J)this.tail.next=X.next,this.tail=Y,this.len+=J;return this};e6.prototype.finish=function(){var X=this.head.next,Y=this.constructor.alloc(this.len),J=0;while(X)X.fn(X.val,Y,J),J+=X.len,X=X.next;return Y};e6._configure=function(Q){un=Q,e6.create=By0(),un._configure()}});var Ly0=I((uJ1,Oy0)=>{Oy0.exports=s5;var Ny0=J2();(s5.prototype=Object.create(Ny0.prototype)).constructor=s5;var VZ=o5();function s5(){Ny0.call(this)}s5._configure=function(){s5.alloc=VZ._Buffer_allocUnsafe,s5.writeBytesBuffer=VZ.Buffer&&VZ.Buffer.prototype instanceof Uint8Array&&VZ.Buffer.prototype.set.name==="set"?function(X,Y,J){Y.set(X,J)}:function(X,Y,J){if(X.copy)X.copy(Y,J,0,X.length);else for(var G=0;G<X.length;)Y[J++]=X[G++]}};s5.prototype.bytes=function(X){if(VZ.isString(X))X=VZ._Buffer_from(X,"base64");var Y=X.length>>>0;if(this.uint32(Y),Y)this._push(s5.writeBytesBuffer,Y,X);return this};function Ds4(Q,X,Y){if(Q.length<40)VZ.utf8.write(Q,X,Y);else if(X.utf8Write)X.utf8Write(Q,Y);else X.write(Q,Y)}s5.prototype.string=function(X){var Y=VZ.Buffer.byteLength(X);if(this.uint32(Y),Y)this._push(Ds4,Y,X);return this};s5._configure()});var W2=I((mJ1,Ay0)=>{Ay0.exports=k8;var bJ=o5(),an,Py0=bJ.LongBits,Ns4=bJ.utf8;function fJ(Q,X){return RangeError("index out of range: "+Q.pos+" + "+(X||1)+" > "+Q.len)}function k8(Q){this.buf=Q,this.pos=0,this.len=Q.length}var wy0=typeof Uint8Array<"u"?function(X){if(X instanceof Uint8Array||Array.isArray(X))return new k8(X);throw Error("illegal buffer")}:function(X){if(Array.isArray(X))return new k8(X);throw Error("illegal buffer")},Ty0=function(){return bJ.Buffer?function(Y){return(k8.create=function(G){return bJ.Buffer.isBuffer(G)?new an(G):wy0(G)})(Y)}:wy0};k8.create=Ty0();k8.prototype._slice=bJ.Array.prototype.subarray||bJ.Array.prototype.slice;k8.prototype.uint32=function(){var X=4294967295;return function(){if(X=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128)return X;if(X=(X|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)return X;if(X=(X|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)return X;if(X=(X|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)return X;if(X=(X|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128)return X;if((this.pos+=5)>this.len)throw this.pos=this.len,fJ(this,10);return X}}();k8.prototype.int32=function(){return this.uint32()|0};k8.prototype.sint32=function(){var X=this.uint32();return X>>>1^-(X&1)|0};function nn(){var Q=new Py0(0,0),X=0;if(this.len-this.pos>4){for(;X<4;++X)if(Q.lo=(Q.lo|(this.buf[this.pos]&127)<<X*7)>>>0,this.buf[this.pos++]<128)return Q;if(Q.lo=(Q.lo|(this.buf[this.pos]&127)<<28)>>>0,Q.hi=(Q.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return Q;X=0}else{for(;X<3;++X){if(this.pos>=this.len)throw fJ(this);if(Q.lo=(Q.lo|(this.buf[this.pos]&127)<<X*7)>>>0,this.buf[this.pos++]<128)return Q}return Q.lo=(Q.lo|(this.buf[this.pos++]&127)<<X*7)>>>0,Q}if(this.len-this.pos>4){for(;X<5;++X)if(Q.hi=(Q.hi|(this.buf[this.pos]&127)<<X*7+3)>>>0,this.buf[this.pos++]<128)return Q}else for(;X<5;++X){if(this.pos>=this.len)throw fJ(this);if(Q.hi=(Q.hi|(this.buf[this.pos]&127)<<X*7+3)>>>0,this.buf[this.pos++]<128)return Q}throw Error("invalid varint encoding")}k8.prototype.bool=function(){return this.uint32()!==0};function G2(Q,X){return(Q[X-4]|Q[X-3]<<8|Q[X-2]<<16|Q[X-1]<<24)>>>0}k8.prototype.fixed32=function(){if(this.pos+4>this.len)throw fJ(this,4);return G2(this.buf,this.pos+=4)};k8.prototype.sfixed32=function(){if(this.pos+4>this.len)throw fJ(this,4);return G2(this.buf,this.pos+=4)|0};function My0(){if(this.pos+8>this.len)throw fJ(this,8);return new Py0(G2(this.buf,this.pos+=4),G2(this.buf,this.pos+=4))}k8.prototype.float=function(){if(this.pos+4>this.len)throw fJ(this,4);var X=bJ.float.readFloatLE(this.buf,this.pos);return this.pos+=4,X};k8.prototype.double=function(){if(this.pos+8>this.len)throw fJ(this,4);var X=bJ.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,X};k8.prototype.bytes=function(){var X=this.uint32(),Y=this.pos,J=this.pos+X;if(J>this.len)throw fJ(this,X);if(this.pos+=X,Array.isArray(this.buf))return this.buf.slice(Y,J);if(Y===J){var G=bJ.Buffer;return G?G.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,Y,J)};k8.prototype.string=function(){var X=this.bytes();return Ns4.read(X,0,X.length)};k8.prototype.skip=function(X){if(typeof X==="number"){if(this.pos+X>this.len)throw fJ(this,X);this.pos+=X}else do if(this.pos>=this.len)throw fJ(this);while(this.buf[this.pos++]&128);return this};k8.prototype.skipType=function(Q){switch(Q){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:while((Q=this.uint32()&7)!==4)this.skipType(Q);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+Q+" at offset "+this.pos)}return this};k8._configure=function(Q){an=Q,k8.create=Ty0(),an._configure();var X=bJ.Long?"toLong":"toNumber";bJ.merge(k8.prototype,{int64:function(){return nn.call(this)[X](!1)},uint64:function(){return nn.call(this)[X](!0)},sint64:function(){return nn.call(this).zzDecode()[X](!1)},fixed64:function(){return My0.call(this)[X](!0)},sfixed64:function(){return My0.call(this)[X](!1)}})}});var Cy0=I((lJ1,jy0)=>{jy0.exports=G$;var Iy0=W2();(G$.prototype=Object.create(Iy0.prototype)).constructor=G$;var Ey0=o5();function G$(Q){Iy0.call(this,Q)}G$._configure=function(){if(Ey0.Buffer)G$.prototype._slice=Ey0.Buffer.prototype.slice};G$.prototype.string=function(){var X=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+X,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+X,this.len))};G$._configure()});var Sy0=I((dJ1,Ry0)=>{Ry0.exports=uN;var rn=o5();(uN.prototype=Object.create(rn.EventEmitter.prototype)).constructor=uN;function uN(Q,X,Y){if(typeof Q!=="function")throw TypeError("rpcImpl must be a function");rn.EventEmitter.call(this),this.rpcImpl=Q,this.requestDelimited=Boolean(X),this.responseDelimited=Boolean(Y)}uN.prototype.rpcCall=function Q(X,Y,J,G,Z){if(!G)throw TypeError("request must be specified");var W=this;if(!Z)return rn.asPromise(Q,W,X,Y,J,G);if(!W.rpcImpl){setTimeout(function(){Z(Error("already ended"))},0);return}try{return W.rpcImpl(X,Y[W.requestDelimited?"encodeDelimited":"encode"](G).finish(),function($,H){if($)return W.emit("error",$,X),Z($);if(H===null){W.end(!0);return}if(!(H instanceof J))try{H=J[W.responseDelimited?"decodeDelimited":"decode"](H)}catch(F){return W.emit("error",F,X),Z(F)}return W.emit("data",H,X),Z(null,H)})}catch(K){W.emit("error",K,X),setTimeout(function(){Z(K)},0);return}};uN.prototype.end=function(X){if(this.rpcImpl){if(!X)this.rpcImpl(null,null,null);this.rpcImpl=null,this.emit("end").off()}return this}});var on=I((vy0)=>{var Os4=vy0;Os4.Service=Sy0()});var sn=I((cJ1,ky0)=>{ky0.exports={}});var tn=I((yy0)=>{var MX=yy0;MX.build="minimal";MX.Writer=J2();MX.BufferWriter=Ly0();MX.Reader=W2();MX.BufferReader=Cy0();MX.util=o5();MX.rpc=on();MX.roots=sn();MX.configure=_y0;function _y0(){MX.util._configure(),MX.Writer._configure(MX.BufferWriter),MX.Reader._configure(MX.BufferReader)}_y0()});var Z2=I((by0,fy0)=>{Object.defineProperty(by0,"__esModule",{value:!0});var _4=tn(),V0=_4.Reader,J6=_4.Writer,h=_4.util,f=_4.roots.default||(_4.roots.default={});f.opentelemetry=function(){var Q={};return Q.proto=function(){var X={};return X.common=function(){var Y={};return Y.v1=function(){var J={};return J.AnyValue=function(){function G(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.stringValue=null,G.prototype.boolValue=null,G.prototype.intValue=null,G.prototype.doubleValue=null,G.prototype.arrayValue=null,G.prototype.kvlistValue=null,G.prototype.bytesValue=null;var Z;return Object.defineProperty(G.prototype,"value",{get:h.oneOfGetter(Z=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.stringValue!=null&&Object.hasOwnProperty.call(K,"stringValue"))$.uint32(10).string(K.stringValue);if(K.boolValue!=null&&Object.hasOwnProperty.call(K,"boolValue"))$.uint32(16).bool(K.boolValue);if(K.intValue!=null&&Object.hasOwnProperty.call(K,"intValue"))$.uint32(24).int64(K.intValue);if(K.doubleValue!=null&&Object.hasOwnProperty.call(K,"doubleValue"))$.uint32(33).double(K.doubleValue);if(K.arrayValue!=null&&Object.hasOwnProperty.call(K,"arrayValue"))f.opentelemetry.proto.common.v1.ArrayValue.encode(K.arrayValue,$.uint32(42).fork()).ldelim();if(K.kvlistValue!=null&&Object.hasOwnProperty.call(K,"kvlistValue"))f.opentelemetry.proto.common.v1.KeyValueList.encode(K.kvlistValue,$.uint32(50).fork()).ldelim();if(K.bytesValue!=null&&Object.hasOwnProperty.call(K,"bytesValue"))$.uint32(58).bytes(K.bytesValue);return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.common.v1.AnyValue;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.stringValue=K.string();break}case 2:{q.boolValue=K.bool();break}case 3:{q.intValue=K.int64();break}case 4:{q.doubleValue=K.double();break}case 5:{q.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.decode(K,K.uint32());break}case 6:{q.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.decode(K,K.uint32());break}case 7:{q.bytesValue=K.bytes();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.stringValue!=null&&K.hasOwnProperty("stringValue")){if($.value=1,!h.isString(K.stringValue))return"stringValue: string expected"}if(K.boolValue!=null&&K.hasOwnProperty("boolValue")){if($.value===1)return"value: multiple values";if($.value=1,typeof K.boolValue!=="boolean")return"boolValue: boolean expected"}if(K.intValue!=null&&K.hasOwnProperty("intValue")){if($.value===1)return"value: multiple values";if($.value=1,!h.isInteger(K.intValue)&&!(K.intValue&&h.isInteger(K.intValue.low)&&h.isInteger(K.intValue.high)))return"intValue: integer|Long expected"}if(K.doubleValue!=null&&K.hasOwnProperty("doubleValue")){if($.value===1)return"value: multiple values";if($.value=1,typeof K.doubleValue!=="number")return"doubleValue: number expected"}if(K.arrayValue!=null&&K.hasOwnProperty("arrayValue")){if($.value===1)return"value: multiple values";$.value=1;{var H=f.opentelemetry.proto.common.v1.ArrayValue.verify(K.arrayValue);if(H)return"arrayValue."+H}}if(K.kvlistValue!=null&&K.hasOwnProperty("kvlistValue")){if($.value===1)return"value: multiple values";$.value=1;{var H=f.opentelemetry.proto.common.v1.KeyValueList.verify(K.kvlistValue);if(H)return"kvlistValue."+H}}if(K.bytesValue!=null&&K.hasOwnProperty("bytesValue")){if($.value===1)return"value: multiple values";if($.value=1,!(K.bytesValue&&typeof K.bytesValue.length==="number"||h.isString(K.bytesValue)))return"bytesValue: buffer expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.common.v1.AnyValue)return K;var $=new f.opentelemetry.proto.common.v1.AnyValue;if(K.stringValue!=null)$.stringValue=String(K.stringValue);if(K.boolValue!=null)$.boolValue=Boolean(K.boolValue);if(K.intValue!=null){if(h.Long)($.intValue=h.Long.fromValue(K.intValue)).unsigned=!1;else if(typeof K.intValue==="string")$.intValue=parseInt(K.intValue,10);else if(typeof K.intValue==="number")$.intValue=K.intValue;else if(typeof K.intValue==="object")$.intValue=new h.LongBits(K.intValue.low>>>0,K.intValue.high>>>0).toNumber()}if(K.doubleValue!=null)$.doubleValue=Number(K.doubleValue);if(K.arrayValue!=null){if(typeof K.arrayValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");$.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.fromObject(K.arrayValue)}if(K.kvlistValue!=null){if(typeof K.kvlistValue!=="object")throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");$.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.fromObject(K.kvlistValue)}if(K.bytesValue!=null){if(typeof K.bytesValue==="string")h.base64.decode(K.bytesValue,$.bytesValue=h.newBuffer(h.base64.length(K.bytesValue)),0);else if(K.bytesValue.length>=0)$.bytesValue=K.bytesValue}return $},G.toObject=function(K,$){if(!$)$={};var H={};if(K.stringValue!=null&&K.hasOwnProperty("stringValue")){if(H.stringValue=K.stringValue,$.oneofs)H.value="stringValue"}if(K.boolValue!=null&&K.hasOwnProperty("boolValue")){if(H.boolValue=K.boolValue,$.oneofs)H.value="boolValue"}if(K.intValue!=null&&K.hasOwnProperty("intValue")){if(typeof K.intValue==="number")H.intValue=$.longs===String?String(K.intValue):K.intValue;else H.intValue=$.longs===String?h.Long.prototype.toString.call(K.intValue):$.longs===Number?new h.LongBits(K.intValue.low>>>0,K.intValue.high>>>0).toNumber():K.intValue;if($.oneofs)H.value="intValue"}if(K.doubleValue!=null&&K.hasOwnProperty("doubleValue")){if(H.doubleValue=$.json&&!isFinite(K.doubleValue)?String(K.doubleValue):K.doubleValue,$.oneofs)H.value="doubleValue"}if(K.arrayValue!=null&&K.hasOwnProperty("arrayValue")){if(H.arrayValue=f.opentelemetry.proto.common.v1.ArrayValue.toObject(K.arrayValue,$),$.oneofs)H.value="arrayValue"}if(K.kvlistValue!=null&&K.hasOwnProperty("kvlistValue")){if(H.kvlistValue=f.opentelemetry.proto.common.v1.KeyValueList.toObject(K.kvlistValue,$),$.oneofs)H.value="kvlistValue"}if(K.bytesValue!=null&&K.hasOwnProperty("bytesValue")){if(H.bytesValue=$.bytes===String?h.base64.encode(K.bytesValue,0,K.bytesValue.length):$.bytes===Array?Array.prototype.slice.call(K.bytesValue):K.bytesValue,$.oneofs)H.value="bytesValue"}return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.common.v1.AnyValue"},G}(),J.ArrayValue=function(){function G(Z){if(this.values=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.values=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.values!=null&&W.values.length)for(var $=0;$<W.values.length;++$)f.opentelemetry.proto.common.v1.AnyValue.encode(W.values[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.ArrayValue;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.values&&F.values.length))F.values=[];F.values.push(f.opentelemetry.proto.common.v1.AnyValue.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.values!=null&&W.hasOwnProperty("values")){if(!Array.isArray(W.values))return"values: array expected";for(var K=0;K<W.values.length;++K){var $=f.opentelemetry.proto.common.v1.AnyValue.verify(W.values[K]);if($)return"values."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.ArrayValue)return W;var K=new f.opentelemetry.proto.common.v1.ArrayValue;if(W.values){if(!Array.isArray(W.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");K.values=[];for(var $=0;$<W.values.length;++$){if(typeof W.values[$]!=="object")throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");K.values[$]=f.opentelemetry.proto.common.v1.AnyValue.fromObject(W.values[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.values=[];if(W.values&&W.values.length){$.values=[];for(var H=0;H<W.values.length;++H)$.values[H]=f.opentelemetry.proto.common.v1.AnyValue.toObject(W.values[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.ArrayValue"},G}(),J.KeyValueList=function(){function G(Z){if(this.values=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.values=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.values!=null&&W.values.length)for(var $=0;$<W.values.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.values[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.KeyValueList;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.values&&F.values.length))F.values=[];F.values.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.values!=null&&W.hasOwnProperty("values")){if(!Array.isArray(W.values))return"values: array expected";for(var K=0;K<W.values.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.values[K]);if($)return"values."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.KeyValueList)return W;var K=new f.opentelemetry.proto.common.v1.KeyValueList;if(W.values){if(!Array.isArray(W.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");K.values=[];for(var $=0;$<W.values.length;++$){if(typeof W.values[$]!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");K.values[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.values[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.values=[];if(W.values&&W.values.length){$.values=[];for(var H=0;H<W.values.length;++H)$.values[H]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.values[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.KeyValueList"},G}(),J.KeyValue=function(){function G(Z){if(Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.key=null,G.prototype.value=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.key!=null&&Object.hasOwnProperty.call(W,"key"))K.uint32(10).string(W.key);if(W.value!=null&&Object.hasOwnProperty.call(W,"value"))f.opentelemetry.proto.common.v1.AnyValue.encode(W.value,K.uint32(18).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.KeyValue;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.key=W.string();break}case 2:{F.value=f.opentelemetry.proto.common.v1.AnyValue.decode(W,W.uint32());break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.key!=null&&W.hasOwnProperty("key")){if(!h.isString(W.key))return"key: string expected"}if(W.value!=null&&W.hasOwnProperty("value")){var K=f.opentelemetry.proto.common.v1.AnyValue.verify(W.value);if(K)return"value."+K}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.KeyValue)return W;var K=new f.opentelemetry.proto.common.v1.KeyValue;if(W.key!=null)K.key=String(W.key);if(W.value!=null){if(typeof W.value!=="object")throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");K.value=f.opentelemetry.proto.common.v1.AnyValue.fromObject(W.value)}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.defaults)$.key="",$.value=null;if(W.key!=null&&W.hasOwnProperty("key"))$.key=W.key;if(W.value!=null&&W.hasOwnProperty("value"))$.value=f.opentelemetry.proto.common.v1.AnyValue.toObject(W.value,K);return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.KeyValue"},G}(),J.InstrumentationScope=function(){function G(Z){if(this.attributes=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.name=null,G.prototype.version=null,G.prototype.attributes=h.emptyArray,G.prototype.droppedAttributesCount=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.name!=null&&Object.hasOwnProperty.call(W,"name"))K.uint32(10).string(W.name);if(W.version!=null&&Object.hasOwnProperty.call(W,"version"))K.uint32(18).string(W.version);if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(26).fork()).ldelim();if(W.droppedAttributesCount!=null&&Object.hasOwnProperty.call(W,"droppedAttributesCount"))K.uint32(32).uint32(W.droppedAttributesCount);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.InstrumentationScope;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.name=W.string();break}case 2:{F.version=W.string();break}case 3:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 4:{F.droppedAttributesCount=W.uint32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.name!=null&&W.hasOwnProperty("name")){if(!h.isString(W.name))return"name: string expected"}if(W.version!=null&&W.hasOwnProperty("version")){if(!h.isString(W.version))return"version: string expected"}if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var K=0;K<W.attributes.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[K]);if($)return"attributes."+$}}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(W.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.InstrumentationScope)return W;var K=new f.opentelemetry.proto.common.v1.InstrumentationScope;if(W.name!=null)K.name=String(W.name);if(W.version!=null)K.version=String(W.version);if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.droppedAttributesCount!=null)K.droppedAttributesCount=W.droppedAttributesCount>>>0;return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.attributes=[];if(K.defaults)$.name="",$.version="",$.droppedAttributesCount=0;if(W.name!=null&&W.hasOwnProperty("name"))$.name=W.name;if(W.version!=null&&W.hasOwnProperty("version"))$.version=W.version;if(W.attributes&&W.attributes.length){$.attributes=[];for(var H=0;H<W.attributes.length;++H)$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[H],K)}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount"))$.droppedAttributesCount=W.droppedAttributesCount;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.InstrumentationScope"},G}(),J.EntityRef=function(){function G(Z){if(this.idKeys=[],this.descriptionKeys=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.schemaUrl=null,G.prototype.type=null,G.prototype.idKeys=h.emptyArray,G.prototype.descriptionKeys=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(10).string(W.schemaUrl);if(W.type!=null&&Object.hasOwnProperty.call(W,"type"))K.uint32(18).string(W.type);if(W.idKeys!=null&&W.idKeys.length)for(var $=0;$<W.idKeys.length;++$)K.uint32(26).string(W.idKeys[$]);if(W.descriptionKeys!=null&&W.descriptionKeys.length)for(var $=0;$<W.descriptionKeys.length;++$)K.uint32(34).string(W.descriptionKeys[$]);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.common.v1.EntityRef;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.schemaUrl=W.string();break}case 2:{F.type=W.string();break}case 3:{if(!(F.idKeys&&F.idKeys.length))F.idKeys=[];F.idKeys.push(W.string());break}case 4:{if(!(F.descriptionKeys&&F.descriptionKeys.length))F.descriptionKeys=[];F.descriptionKeys.push(W.string());break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}if(W.type!=null&&W.hasOwnProperty("type")){if(!h.isString(W.type))return"type: string expected"}if(W.idKeys!=null&&W.hasOwnProperty("idKeys")){if(!Array.isArray(W.idKeys))return"idKeys: array expected";for(var K=0;K<W.idKeys.length;++K)if(!h.isString(W.idKeys[K]))return"idKeys: string[] expected"}if(W.descriptionKeys!=null&&W.hasOwnProperty("descriptionKeys")){if(!Array.isArray(W.descriptionKeys))return"descriptionKeys: array expected";for(var K=0;K<W.descriptionKeys.length;++K)if(!h.isString(W.descriptionKeys[K]))return"descriptionKeys: string[] expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.common.v1.EntityRef)return W;var K=new f.opentelemetry.proto.common.v1.EntityRef;if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);if(W.type!=null)K.type=String(W.type);if(W.idKeys){if(!Array.isArray(W.idKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.idKeys: array expected");K.idKeys=[];for(var $=0;$<W.idKeys.length;++$)K.idKeys[$]=String(W.idKeys[$])}if(W.descriptionKeys){if(!Array.isArray(W.descriptionKeys))throw TypeError(".opentelemetry.proto.common.v1.EntityRef.descriptionKeys: array expected");K.descriptionKeys=[];for(var $=0;$<W.descriptionKeys.length;++$)K.descriptionKeys[$]=String(W.descriptionKeys[$])}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.idKeys=[],$.descriptionKeys=[];if(K.defaults)$.schemaUrl="",$.type="";if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;if(W.type!=null&&W.hasOwnProperty("type"))$.type=W.type;if(W.idKeys&&W.idKeys.length){$.idKeys=[];for(var H=0;H<W.idKeys.length;++H)$.idKeys[H]=W.idKeys[H]}if(W.descriptionKeys&&W.descriptionKeys.length){$.descriptionKeys=[];for(var H=0;H<W.descriptionKeys.length;++H)$.descriptionKeys[H]=W.descriptionKeys[H]}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.common.v1.EntityRef"},G}(),J}(),Y}(),X.resource=function(){var Y={};return Y.v1=function(){var J={};return J.Resource=function(){function G(Z){if(this.attributes=[],this.entityRefs=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.attributes=h.emptyArray,G.prototype.droppedAttributesCount=null,G.prototype.entityRefs=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(10).fork()).ldelim();if(W.droppedAttributesCount!=null&&Object.hasOwnProperty.call(W,"droppedAttributesCount"))K.uint32(16).uint32(W.droppedAttributesCount);if(W.entityRefs!=null&&W.entityRefs.length)for(var $=0;$<W.entityRefs.length;++$)f.opentelemetry.proto.common.v1.EntityRef.encode(W.entityRefs[$],K.uint32(26).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.resource.v1.Resource;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 2:{F.droppedAttributesCount=W.uint32();break}case 3:{if(!(F.entityRefs&&F.entityRefs.length))F.entityRefs=[];F.entityRefs.push(f.opentelemetry.proto.common.v1.EntityRef.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var K=0;K<W.attributes.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[K]);if($)return"attributes."+$}}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(W.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(W.entityRefs!=null&&W.hasOwnProperty("entityRefs")){if(!Array.isArray(W.entityRefs))return"entityRefs: array expected";for(var K=0;K<W.entityRefs.length;++K){var $=f.opentelemetry.proto.common.v1.EntityRef.verify(W.entityRefs[K]);if($)return"entityRefs."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.resource.v1.Resource)return W;var K=new f.opentelemetry.proto.resource.v1.Resource;if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.droppedAttributesCount!=null)K.droppedAttributesCount=W.droppedAttributesCount>>>0;if(W.entityRefs){if(!Array.isArray(W.entityRefs))throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: array expected");K.entityRefs=[];for(var $=0;$<W.entityRefs.length;++$){if(typeof W.entityRefs[$]!=="object")throw TypeError(".opentelemetry.proto.resource.v1.Resource.entityRefs: object expected");K.entityRefs[$]=f.opentelemetry.proto.common.v1.EntityRef.fromObject(W.entityRefs[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.attributes=[],$.entityRefs=[];if(K.defaults)$.droppedAttributesCount=0;if(W.attributes&&W.attributes.length){$.attributes=[];for(var H=0;H<W.attributes.length;++H)$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[H],K)}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount"))$.droppedAttributesCount=W.droppedAttributesCount;if(W.entityRefs&&W.entityRefs.length){$.entityRefs=[];for(var H=0;H<W.entityRefs.length;++H)$.entityRefs[H]=f.opentelemetry.proto.common.v1.EntityRef.toObject(W.entityRefs[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.resource.v1.Resource"},G}(),J}(),Y}(),X.trace=function(){var Y={};return Y.v1=function(){var J={};return J.TracesData=function(){function G(Z){if(this.resourceSpans=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resourceSpans=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resourceSpans!=null&&W.resourceSpans.length)for(var $=0;$<W.resourceSpans.length;++$)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(W.resourceSpans[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.TracesData;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.resourceSpans&&F.resourceSpans.length))F.resourceSpans=[];F.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resourceSpans!=null&&W.hasOwnProperty("resourceSpans")){if(!Array.isArray(W.resourceSpans))return"resourceSpans: array expected";for(var K=0;K<W.resourceSpans.length;++K){var $=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(W.resourceSpans[K]);if($)return"resourceSpans."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.TracesData)return W;var K=new f.opentelemetry.proto.trace.v1.TracesData;if(W.resourceSpans){if(!Array.isArray(W.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");K.resourceSpans=[];for(var $=0;$<W.resourceSpans.length;++$){if(typeof W.resourceSpans[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");K.resourceSpans[$]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(W.resourceSpans[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.resourceSpans=[];if(W.resourceSpans&&W.resourceSpans.length){$.resourceSpans=[];for(var H=0;H<W.resourceSpans.length;++H)$.resourceSpans[H]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(W.resourceSpans[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.TracesData"},G}(),J.ResourceSpans=function(){function G(Z){if(this.scopeSpans=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resource=null,G.prototype.scopeSpans=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resource!=null&&Object.hasOwnProperty.call(W,"resource"))f.opentelemetry.proto.resource.v1.Resource.encode(W.resource,K.uint32(10).fork()).ldelim();if(W.scopeSpans!=null&&W.scopeSpans.length)for(var $=0;$<W.scopeSpans.length;++$)f.opentelemetry.proto.trace.v1.ScopeSpans.encode(W.scopeSpans[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.ResourceSpans;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.resource=f.opentelemetry.proto.resource.v1.Resource.decode(W,W.uint32());break}case 2:{if(!(F.scopeSpans&&F.scopeSpans.length))F.scopeSpans=[];F.scopeSpans.push(f.opentelemetry.proto.trace.v1.ScopeSpans.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resource!=null&&W.hasOwnProperty("resource")){var K=f.opentelemetry.proto.resource.v1.Resource.verify(W.resource);if(K)return"resource."+K}if(W.scopeSpans!=null&&W.hasOwnProperty("scopeSpans")){if(!Array.isArray(W.scopeSpans))return"scopeSpans: array expected";for(var $=0;$<W.scopeSpans.length;++$){var K=f.opentelemetry.proto.trace.v1.ScopeSpans.verify(W.scopeSpans[$]);if(K)return"scopeSpans."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.ResourceSpans)return W;var K=new f.opentelemetry.proto.trace.v1.ResourceSpans;if(W.resource!=null){if(typeof W.resource!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");K.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(W.resource)}if(W.scopeSpans){if(!Array.isArray(W.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");K.scopeSpans=[];for(var $=0;$<W.scopeSpans.length;++$){if(typeof W.scopeSpans[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");K.scopeSpans[$]=f.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(W.scopeSpans[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.scopeSpans=[];if(K.defaults)$.resource=null,$.schemaUrl="";if(W.resource!=null&&W.hasOwnProperty("resource"))$.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(W.resource,K);if(W.scopeSpans&&W.scopeSpans.length){$.scopeSpans=[];for(var H=0;H<W.scopeSpans.length;++H)$.scopeSpans[H]=f.opentelemetry.proto.trace.v1.ScopeSpans.toObject(W.scopeSpans[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.ResourceSpans"},G}(),J.ScopeSpans=function(){function G(Z){if(this.spans=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.scope=null,G.prototype.spans=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.scope!=null&&Object.hasOwnProperty.call(W,"scope"))f.opentelemetry.proto.common.v1.InstrumentationScope.encode(W.scope,K.uint32(10).fork()).ldelim();if(W.spans!=null&&W.spans.length)for(var $=0;$<W.spans.length;++$)f.opentelemetry.proto.trace.v1.Span.encode(W.spans[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.ScopeSpans;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(W,W.uint32());break}case 2:{if(!(F.spans&&F.spans.length))F.spans=[];F.spans.push(f.opentelemetry.proto.trace.v1.Span.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.scope!=null&&W.hasOwnProperty("scope")){var K=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(W.scope);if(K)return"scope."+K}if(W.spans!=null&&W.hasOwnProperty("spans")){if(!Array.isArray(W.spans))return"spans: array expected";for(var $=0;$<W.spans.length;++$){var K=f.opentelemetry.proto.trace.v1.Span.verify(W.spans[$]);if(K)return"spans."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.ScopeSpans)return W;var K=new f.opentelemetry.proto.trace.v1.ScopeSpans;if(W.scope!=null){if(typeof W.scope!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");K.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(W.scope)}if(W.spans){if(!Array.isArray(W.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");K.spans=[];for(var $=0;$<W.spans.length;++$){if(typeof W.spans[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");K.spans[$]=f.opentelemetry.proto.trace.v1.Span.fromObject(W.spans[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.spans=[];if(K.defaults)$.scope=null,$.schemaUrl="";if(W.scope!=null&&W.hasOwnProperty("scope"))$.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(W.scope,K);if(W.spans&&W.spans.length){$.spans=[];for(var H=0;H<W.spans.length;++H)$.spans[H]=f.opentelemetry.proto.trace.v1.Span.toObject(W.spans[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.ScopeSpans"},G}(),J.Span=function(){function G(Z){if(this.attributes=[],this.events=[],this.links=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.traceId=null,G.prototype.spanId=null,G.prototype.traceState=null,G.prototype.parentSpanId=null,G.prototype.flags=null,G.prototype.name=null,G.prototype.kind=null,G.prototype.startTimeUnixNano=null,G.prototype.endTimeUnixNano=null,G.prototype.attributes=h.emptyArray,G.prototype.droppedAttributesCount=null,G.prototype.events=h.emptyArray,G.prototype.droppedEventsCount=null,G.prototype.links=h.emptyArray,G.prototype.droppedLinksCount=null,G.prototype.status=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.traceId!=null&&Object.hasOwnProperty.call(W,"traceId"))K.uint32(10).bytes(W.traceId);if(W.spanId!=null&&Object.hasOwnProperty.call(W,"spanId"))K.uint32(18).bytes(W.spanId);if(W.traceState!=null&&Object.hasOwnProperty.call(W,"traceState"))K.uint32(26).string(W.traceState);if(W.parentSpanId!=null&&Object.hasOwnProperty.call(W,"parentSpanId"))K.uint32(34).bytes(W.parentSpanId);if(W.name!=null&&Object.hasOwnProperty.call(W,"name"))K.uint32(42).string(W.name);if(W.kind!=null&&Object.hasOwnProperty.call(W,"kind"))K.uint32(48).int32(W.kind);if(W.startTimeUnixNano!=null&&Object.hasOwnProperty.call(W,"startTimeUnixNano"))K.uint32(57).fixed64(W.startTimeUnixNano);if(W.endTimeUnixNano!=null&&Object.hasOwnProperty.call(W,"endTimeUnixNano"))K.uint32(65).fixed64(W.endTimeUnixNano);if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(74).fork()).ldelim();if(W.droppedAttributesCount!=null&&Object.hasOwnProperty.call(W,"droppedAttributesCount"))K.uint32(80).uint32(W.droppedAttributesCount);if(W.events!=null&&W.events.length)for(var $=0;$<W.events.length;++$)f.opentelemetry.proto.trace.v1.Span.Event.encode(W.events[$],K.uint32(90).fork()).ldelim();if(W.droppedEventsCount!=null&&Object.hasOwnProperty.call(W,"droppedEventsCount"))K.uint32(96).uint32(W.droppedEventsCount);if(W.links!=null&&W.links.length)for(var $=0;$<W.links.length;++$)f.opentelemetry.proto.trace.v1.Span.Link.encode(W.links[$],K.uint32(106).fork()).ldelim();if(W.droppedLinksCount!=null&&Object.hasOwnProperty.call(W,"droppedLinksCount"))K.uint32(112).uint32(W.droppedLinksCount);if(W.status!=null&&Object.hasOwnProperty.call(W,"status"))f.opentelemetry.proto.trace.v1.Status.encode(W.status,K.uint32(122).fork()).ldelim();if(W.flags!=null&&Object.hasOwnProperty.call(W,"flags"))K.uint32(133).fixed32(W.flags);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.Span;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.traceId=W.bytes();break}case 2:{F.spanId=W.bytes();break}case 3:{F.traceState=W.string();break}case 4:{F.parentSpanId=W.bytes();break}case 16:{F.flags=W.fixed32();break}case 5:{F.name=W.string();break}case 6:{F.kind=W.int32();break}case 7:{F.startTimeUnixNano=W.fixed64();break}case 8:{F.endTimeUnixNano=W.fixed64();break}case 9:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 10:{F.droppedAttributesCount=W.uint32();break}case 11:{if(!(F.events&&F.events.length))F.events=[];F.events.push(f.opentelemetry.proto.trace.v1.Span.Event.decode(W,W.uint32()));break}case 12:{F.droppedEventsCount=W.uint32();break}case 13:{if(!(F.links&&F.links.length))F.links=[];F.links.push(f.opentelemetry.proto.trace.v1.Span.Link.decode(W,W.uint32()));break}case 14:{F.droppedLinksCount=W.uint32();break}case 15:{F.status=f.opentelemetry.proto.trace.v1.Status.decode(W,W.uint32());break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.traceId!=null&&W.hasOwnProperty("traceId")){if(!(W.traceId&&typeof W.traceId.length==="number"||h.isString(W.traceId)))return"traceId: buffer expected"}if(W.spanId!=null&&W.hasOwnProperty("spanId")){if(!(W.spanId&&typeof W.spanId.length==="number"||h.isString(W.spanId)))return"spanId: buffer expected"}if(W.traceState!=null&&W.hasOwnProperty("traceState")){if(!h.isString(W.traceState))return"traceState: string expected"}if(W.parentSpanId!=null&&W.hasOwnProperty("parentSpanId")){if(!(W.parentSpanId&&typeof W.parentSpanId.length==="number"||h.isString(W.parentSpanId)))return"parentSpanId: buffer expected"}if(W.flags!=null&&W.hasOwnProperty("flags")){if(!h.isInteger(W.flags))return"flags: integer expected"}if(W.name!=null&&W.hasOwnProperty("name")){if(!h.isString(W.name))return"name: string expected"}if(W.kind!=null&&W.hasOwnProperty("kind"))switch(W.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:break}if(W.startTimeUnixNano!=null&&W.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(W.startTimeUnixNano)&&!(W.startTimeUnixNano&&h.isInteger(W.startTimeUnixNano.low)&&h.isInteger(W.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(W.endTimeUnixNano!=null&&W.hasOwnProperty("endTimeUnixNano")){if(!h.isInteger(W.endTimeUnixNano)&&!(W.endTimeUnixNano&&h.isInteger(W.endTimeUnixNano.low)&&h.isInteger(W.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected"}if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var K=0;K<W.attributes.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[K]);if($)return"attributes."+$}}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(W.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(W.events!=null&&W.hasOwnProperty("events")){if(!Array.isArray(W.events))return"events: array expected";for(var K=0;K<W.events.length;++K){var $=f.opentelemetry.proto.trace.v1.Span.Event.verify(W.events[K]);if($)return"events."+$}}if(W.droppedEventsCount!=null&&W.hasOwnProperty("droppedEventsCount")){if(!h.isInteger(W.droppedEventsCount))return"droppedEventsCount: integer expected"}if(W.links!=null&&W.hasOwnProperty("links")){if(!Array.isArray(W.links))return"links: array expected";for(var K=0;K<W.links.length;++K){var $=f.opentelemetry.proto.trace.v1.Span.Link.verify(W.links[K]);if($)return"links."+$}}if(W.droppedLinksCount!=null&&W.hasOwnProperty("droppedLinksCount")){if(!h.isInteger(W.droppedLinksCount))return"droppedLinksCount: integer expected"}if(W.status!=null&&W.hasOwnProperty("status")){var $=f.opentelemetry.proto.trace.v1.Status.verify(W.status);if($)return"status."+$}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.Span)return W;var K=new f.opentelemetry.proto.trace.v1.Span;if(W.traceId!=null){if(typeof W.traceId==="string")h.base64.decode(W.traceId,K.traceId=h.newBuffer(h.base64.length(W.traceId)),0);else if(W.traceId.length>=0)K.traceId=W.traceId}if(W.spanId!=null){if(typeof W.spanId==="string")h.base64.decode(W.spanId,K.spanId=h.newBuffer(h.base64.length(W.spanId)),0);else if(W.spanId.length>=0)K.spanId=W.spanId}if(W.traceState!=null)K.traceState=String(W.traceState);if(W.parentSpanId!=null){if(typeof W.parentSpanId==="string")h.base64.decode(W.parentSpanId,K.parentSpanId=h.newBuffer(h.base64.length(W.parentSpanId)),0);else if(W.parentSpanId.length>=0)K.parentSpanId=W.parentSpanId}if(W.flags!=null)K.flags=W.flags>>>0;if(W.name!=null)K.name=String(W.name);switch(W.kind){default:if(typeof W.kind==="number"){K.kind=W.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:K.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:K.kind=1;break;case"SPAN_KIND_SERVER":case 2:K.kind=2;break;case"SPAN_KIND_CLIENT":case 3:K.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:K.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:K.kind=5;break}if(W.startTimeUnixNano!=null){if(h.Long)(K.startTimeUnixNano=h.Long.fromValue(W.startTimeUnixNano)).unsigned=!1;else if(typeof W.startTimeUnixNano==="string")K.startTimeUnixNano=parseInt(W.startTimeUnixNano,10);else if(typeof W.startTimeUnixNano==="number")K.startTimeUnixNano=W.startTimeUnixNano;else if(typeof W.startTimeUnixNano==="object")K.startTimeUnixNano=new h.LongBits(W.startTimeUnixNano.low>>>0,W.startTimeUnixNano.high>>>0).toNumber()}if(W.endTimeUnixNano!=null){if(h.Long)(K.endTimeUnixNano=h.Long.fromValue(W.endTimeUnixNano)).unsigned=!1;else if(typeof W.endTimeUnixNano==="string")K.endTimeUnixNano=parseInt(W.endTimeUnixNano,10);else if(typeof W.endTimeUnixNano==="number")K.endTimeUnixNano=W.endTimeUnixNano;else if(typeof W.endTimeUnixNano==="object")K.endTimeUnixNano=new h.LongBits(W.endTimeUnixNano.low>>>0,W.endTimeUnixNano.high>>>0).toNumber()}if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.droppedAttributesCount!=null)K.droppedAttributesCount=W.droppedAttributesCount>>>0;if(W.events){if(!Array.isArray(W.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");K.events=[];for(var $=0;$<W.events.length;++$){if(typeof W.events[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");K.events[$]=f.opentelemetry.proto.trace.v1.Span.Event.fromObject(W.events[$])}}if(W.droppedEventsCount!=null)K.droppedEventsCount=W.droppedEventsCount>>>0;if(W.links){if(!Array.isArray(W.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");K.links=[];for(var $=0;$<W.links.length;++$){if(typeof W.links[$]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");K.links[$]=f.opentelemetry.proto.trace.v1.Span.Link.fromObject(W.links[$])}}if(W.droppedLinksCount!=null)K.droppedLinksCount=W.droppedLinksCount>>>0;if(W.status!=null){if(typeof W.status!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");K.status=f.opentelemetry.proto.trace.v1.Status.fromObject(W.status)}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.attributes=[],$.events=[],$.links=[];if(K.defaults){if(K.bytes===String)$.traceId="";else if($.traceId=[],K.bytes!==Array)$.traceId=h.newBuffer($.traceId);if(K.bytes===String)$.spanId="";else if($.spanId=[],K.bytes!==Array)$.spanId=h.newBuffer($.spanId);if($.traceState="",K.bytes===String)$.parentSpanId="";else if($.parentSpanId=[],K.bytes!==Array)$.parentSpanId=h.newBuffer($.parentSpanId);if($.name="",$.kind=K.enums===String?"SPAN_KIND_UNSPECIFIED":0,h.Long){var H=new h.Long(0,0,!1);$.startTimeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.startTimeUnixNano=K.longs===String?"0":0;if(h.Long){var H=new h.Long(0,0,!1);$.endTimeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.endTimeUnixNano=K.longs===String?"0":0;$.droppedAttributesCount=0,$.droppedEventsCount=0,$.droppedLinksCount=0,$.status=null,$.flags=0}if(W.traceId!=null&&W.hasOwnProperty("traceId"))$.traceId=K.bytes===String?h.base64.encode(W.traceId,0,W.traceId.length):K.bytes===Array?Array.prototype.slice.call(W.traceId):W.traceId;if(W.spanId!=null&&W.hasOwnProperty("spanId"))$.spanId=K.bytes===String?h.base64.encode(W.spanId,0,W.spanId.length):K.bytes===Array?Array.prototype.slice.call(W.spanId):W.spanId;if(W.traceState!=null&&W.hasOwnProperty("traceState"))$.traceState=W.traceState;if(W.parentSpanId!=null&&W.hasOwnProperty("parentSpanId"))$.parentSpanId=K.bytes===String?h.base64.encode(W.parentSpanId,0,W.parentSpanId.length):K.bytes===Array?Array.prototype.slice.call(W.parentSpanId):W.parentSpanId;if(W.name!=null&&W.hasOwnProperty("name"))$.name=W.name;if(W.kind!=null&&W.hasOwnProperty("kind"))$.kind=K.enums===String?f.opentelemetry.proto.trace.v1.Span.SpanKind[W.kind]===void 0?W.kind:f.opentelemetry.proto.trace.v1.Span.SpanKind[W.kind]:W.kind;if(W.startTimeUnixNano!=null&&W.hasOwnProperty("startTimeUnixNano"))if(typeof W.startTimeUnixNano==="number")$.startTimeUnixNano=K.longs===String?String(W.startTimeUnixNano):W.startTimeUnixNano;else $.startTimeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.startTimeUnixNano):K.longs===Number?new h.LongBits(W.startTimeUnixNano.low>>>0,W.startTimeUnixNano.high>>>0).toNumber():W.startTimeUnixNano;if(W.endTimeUnixNano!=null&&W.hasOwnProperty("endTimeUnixNano"))if(typeof W.endTimeUnixNano==="number")$.endTimeUnixNano=K.longs===String?String(W.endTimeUnixNano):W.endTimeUnixNano;else $.endTimeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.endTimeUnixNano):K.longs===Number?new h.LongBits(W.endTimeUnixNano.low>>>0,W.endTimeUnixNano.high>>>0).toNumber():W.endTimeUnixNano;if(W.attributes&&W.attributes.length){$.attributes=[];for(var F=0;F<W.attributes.length;++F)$.attributes[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[F],K)}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount"))$.droppedAttributesCount=W.droppedAttributesCount;if(W.events&&W.events.length){$.events=[];for(var F=0;F<W.events.length;++F)$.events[F]=f.opentelemetry.proto.trace.v1.Span.Event.toObject(W.events[F],K)}if(W.droppedEventsCount!=null&&W.hasOwnProperty("droppedEventsCount"))$.droppedEventsCount=W.droppedEventsCount;if(W.links&&W.links.length){$.links=[];for(var F=0;F<W.links.length;++F)$.links[F]=f.opentelemetry.proto.trace.v1.Span.Link.toObject(W.links[F],K)}if(W.droppedLinksCount!=null&&W.hasOwnProperty("droppedLinksCount"))$.droppedLinksCount=W.droppedLinksCount;if(W.status!=null&&W.hasOwnProperty("status"))$.status=f.opentelemetry.proto.trace.v1.Status.toObject(W.status,K);if(W.flags!=null&&W.hasOwnProperty("flags"))$.flags=W.flags;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.Span"},G.SpanKind=function(){var Z={},W=Object.create(Z);return W[Z[0]="SPAN_KIND_UNSPECIFIED"]=0,W[Z[1]="SPAN_KIND_INTERNAL"]=1,W[Z[2]="SPAN_KIND_SERVER"]=2,W[Z[3]="SPAN_KIND_CLIENT"]=3,W[Z[4]="SPAN_KIND_PRODUCER"]=4,W[Z[5]="SPAN_KIND_CONSUMER"]=5,W}(),G.Event=function(){function Z(W){if(this.attributes=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.timeUnixNano=null,Z.prototype.name=null,Z.prototype.attributes=h.emptyArray,Z.prototype.droppedAttributesCount=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(9).fixed64(K.timeUnixNano);if(K.name!=null&&Object.hasOwnProperty.call(K,"name"))$.uint32(18).string(K.name);if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(26).fork()).ldelim();if(K.droppedAttributesCount!=null&&Object.hasOwnProperty.call(K,"droppedAttributesCount"))$.uint32(32).uint32(K.droppedAttributesCount);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.trace.v1.Span.Event;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.timeUnixNano=K.fixed64();break}case 2:{q.name=K.string();break}case 3:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 4:{q.droppedAttributesCount=K.uint32();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.name!=null&&K.hasOwnProperty("name")){if(!h.isString(K.name))return"name: string expected"}if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var $=0;$<K.attributes.length;++$){var H=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[$]);if(H)return"attributes."+H}}if(K.droppedAttributesCount!=null&&K.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(K.droppedAttributesCount))return"droppedAttributesCount: integer expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.trace.v1.Span.Event)return K;var $=new f.opentelemetry.proto.trace.v1.Span.Event;if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.name!=null)$.name=String(K.name);if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.droppedAttributesCount!=null)$.droppedAttributesCount=K.droppedAttributesCount>>>0;return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.attributes=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;H.name="",H.droppedAttributesCount=0}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.name!=null&&K.hasOwnProperty("name"))H.name=K.name;if(K.attributes&&K.attributes.length){H.attributes=[];for(var q=0;q<K.attributes.length;++q)H.attributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[q],$)}if(K.droppedAttributesCount!=null&&K.hasOwnProperty("droppedAttributesCount"))H.droppedAttributesCount=K.droppedAttributesCount;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.trace.v1.Span.Event"},Z}(),G.Link=function(){function Z(W){if(this.attributes=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.traceId=null,Z.prototype.spanId=null,Z.prototype.traceState=null,Z.prototype.attributes=h.emptyArray,Z.prototype.droppedAttributesCount=null,Z.prototype.flags=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.traceId!=null&&Object.hasOwnProperty.call(K,"traceId"))$.uint32(10).bytes(K.traceId);if(K.spanId!=null&&Object.hasOwnProperty.call(K,"spanId"))$.uint32(18).bytes(K.spanId);if(K.traceState!=null&&Object.hasOwnProperty.call(K,"traceState"))$.uint32(26).string(K.traceState);if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(34).fork()).ldelim();if(K.droppedAttributesCount!=null&&Object.hasOwnProperty.call(K,"droppedAttributesCount"))$.uint32(40).uint32(K.droppedAttributesCount);if(K.flags!=null&&Object.hasOwnProperty.call(K,"flags"))$.uint32(53).fixed32(K.flags);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.trace.v1.Span.Link;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.traceId=K.bytes();break}case 2:{q.spanId=K.bytes();break}case 3:{q.traceState=K.string();break}case 4:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 5:{q.droppedAttributesCount=K.uint32();break}case 6:{q.flags=K.fixed32();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.traceId!=null&&K.hasOwnProperty("traceId")){if(!(K.traceId&&typeof K.traceId.length==="number"||h.isString(K.traceId)))return"traceId: buffer expected"}if(K.spanId!=null&&K.hasOwnProperty("spanId")){if(!(K.spanId&&typeof K.spanId.length==="number"||h.isString(K.spanId)))return"spanId: buffer expected"}if(K.traceState!=null&&K.hasOwnProperty("traceState")){if(!h.isString(K.traceState))return"traceState: string expected"}if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var $=0;$<K.attributes.length;++$){var H=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[$]);if(H)return"attributes."+H}}if(K.droppedAttributesCount!=null&&K.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(K.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(K.flags!=null&&K.hasOwnProperty("flags")){if(!h.isInteger(K.flags))return"flags: integer expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.trace.v1.Span.Link)return K;var $=new f.opentelemetry.proto.trace.v1.Span.Link;if(K.traceId!=null){if(typeof K.traceId==="string")h.base64.decode(K.traceId,$.traceId=h.newBuffer(h.base64.length(K.traceId)),0);else if(K.traceId.length>=0)$.traceId=K.traceId}if(K.spanId!=null){if(typeof K.spanId==="string")h.base64.decode(K.spanId,$.spanId=h.newBuffer(h.base64.length(K.spanId)),0);else if(K.spanId.length>=0)$.spanId=K.spanId}if(K.traceState!=null)$.traceState=String(K.traceState);if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.droppedAttributesCount!=null)$.droppedAttributesCount=K.droppedAttributesCount>>>0;if(K.flags!=null)$.flags=K.flags>>>0;return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.attributes=[];if($.defaults){if($.bytes===String)H.traceId="";else if(H.traceId=[],$.bytes!==Array)H.traceId=h.newBuffer(H.traceId);if($.bytes===String)H.spanId="";else if(H.spanId=[],$.bytes!==Array)H.spanId=h.newBuffer(H.spanId);H.traceState="",H.droppedAttributesCount=0,H.flags=0}if(K.traceId!=null&&K.hasOwnProperty("traceId"))H.traceId=$.bytes===String?h.base64.encode(K.traceId,0,K.traceId.length):$.bytes===Array?Array.prototype.slice.call(K.traceId):K.traceId;if(K.spanId!=null&&K.hasOwnProperty("spanId"))H.spanId=$.bytes===String?h.base64.encode(K.spanId,0,K.spanId.length):$.bytes===Array?Array.prototype.slice.call(K.spanId):K.spanId;if(K.traceState!=null&&K.hasOwnProperty("traceState"))H.traceState=K.traceState;if(K.attributes&&K.attributes.length){H.attributes=[];for(var F=0;F<K.attributes.length;++F)H.attributes[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[F],$)}if(K.droppedAttributesCount!=null&&K.hasOwnProperty("droppedAttributesCount"))H.droppedAttributesCount=K.droppedAttributesCount;if(K.flags!=null&&K.hasOwnProperty("flags"))H.flags=K.flags;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.trace.v1.Span.Link"},Z}(),G}(),J.Status=function(){function G(Z){if(Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.message=null,G.prototype.code=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.message!=null&&Object.hasOwnProperty.call(W,"message"))K.uint32(18).string(W.message);if(W.code!=null&&Object.hasOwnProperty.call(W,"code"))K.uint32(24).int32(W.code);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.trace.v1.Status;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 2:{F.message=W.string();break}case 3:{F.code=W.int32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.message!=null&&W.hasOwnProperty("message")){if(!h.isString(W.message))return"message: string expected"}if(W.code!=null&&W.hasOwnProperty("code"))switch(W.code){default:return"code: enum value expected";case 0:case 1:case 2:break}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.trace.v1.Status)return W;var K=new f.opentelemetry.proto.trace.v1.Status;if(W.message!=null)K.message=String(W.message);switch(W.code){default:if(typeof W.code==="number"){K.code=W.code;break}break;case"STATUS_CODE_UNSET":case 0:K.code=0;break;case"STATUS_CODE_OK":case 1:K.code=1;break;case"STATUS_CODE_ERROR":case 2:K.code=2;break}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.defaults)$.message="",$.code=K.enums===String?"STATUS_CODE_UNSET":0;if(W.message!=null&&W.hasOwnProperty("message"))$.message=W.message;if(W.code!=null&&W.hasOwnProperty("code"))$.code=K.enums===String?f.opentelemetry.proto.trace.v1.Status.StatusCode[W.code]===void 0?W.code:f.opentelemetry.proto.trace.v1.Status.StatusCode[W.code]:W.code;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.trace.v1.Status"},G.StatusCode=function(){var Z={},W=Object.create(Z);return W[Z[0]="STATUS_CODE_UNSET"]=0,W[Z[1]="STATUS_CODE_OK"]=1,W[Z[2]="STATUS_CODE_ERROR"]=2,W}(),G}(),J.SpanFlags=function(){var G={},Z=Object.create(G);return Z[G[0]="SPAN_FLAGS_DO_NOT_USE"]=0,Z[G[255]="SPAN_FLAGS_TRACE_FLAGS_MASK"]=255,Z[G[256]="SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK"]=256,Z[G[512]="SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK"]=512,Z}(),J}(),Y}(),X.collector=function(){var Y={};return Y.trace=function(){var J={};return J.v1=function(){var G={};return G.TraceService=function(){function Z(W,K,$){_4.rpc.Service.call(this,W,K,$)}return(Z.prototype=Object.create(_4.rpc.Service.prototype)).constructor=Z,Z.create=function(K,$,H){return new this(K,$,H)},Object.defineProperty(Z.prototype.export=function W(K,$){return this.rpcCall(W,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,K,$)},"name",{value:"Export"}),Z}(),G.ExportTraceServiceRequest=function(){function Z(W){if(this.resourceSpans=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.resourceSpans=h.emptyArray,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.resourceSpans!=null&&K.resourceSpans.length)for(var H=0;H<K.resourceSpans.length;++H)f.opentelemetry.proto.trace.v1.ResourceSpans.encode(K.resourceSpans[H],$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{if(!(q.resourceSpans&&q.resourceSpans.length))q.resourceSpans=[];q.resourceSpans.push(f.opentelemetry.proto.trace.v1.ResourceSpans.decode(K,K.uint32()));break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.resourceSpans!=null&&K.hasOwnProperty("resourceSpans")){if(!Array.isArray(K.resourceSpans))return"resourceSpans: array expected";for(var $=0;$<K.resourceSpans.length;++$){var H=f.opentelemetry.proto.trace.v1.ResourceSpans.verify(K.resourceSpans[$]);if(H)return"resourceSpans."+H}}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return K;var $=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(K.resourceSpans){if(!Array.isArray(K.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");$.resourceSpans=[];for(var H=0;H<K.resourceSpans.length;++H){if(typeof K.resourceSpans[H]!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");$.resourceSpans[H]=f.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(K.resourceSpans[H])}}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.resourceSpans=[];if(K.resourceSpans&&K.resourceSpans.length){H.resourceSpans=[];for(var F=0;F<K.resourceSpans.length;++F)H.resourceSpans[F]=f.opentelemetry.proto.trace.v1.ResourceSpans.toObject(K.resourceSpans[F],$)}return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},Z}(),G.ExportTraceServiceResponse=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.partialSuccess=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.partialSuccess!=null&&Object.hasOwnProperty.call(K,"partialSuccess"))f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(K.partialSuccess,$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(K,K.uint32());break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess")){var $=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(K.partialSuccess);if($)return"partialSuccess."+$}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return K;var $=new f.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(K.partialSuccess!=null){if(typeof K.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");$.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(K.partialSuccess)}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults)H.partialSuccess=null;if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess"))H.partialSuccess=f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(K.partialSuccess,$);return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},Z}(),G.ExportTracePartialSuccess=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.rejectedSpans=null,Z.prototype.errorMessage=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.rejectedSpans!=null&&Object.hasOwnProperty.call(K,"rejectedSpans"))$.uint32(8).int64(K.rejectedSpans);if(K.errorMessage!=null&&Object.hasOwnProperty.call(K,"errorMessage"))$.uint32(18).string(K.errorMessage);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.rejectedSpans=K.int64();break}case 2:{q.errorMessage=K.string();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.rejectedSpans!=null&&K.hasOwnProperty("rejectedSpans")){if(!h.isInteger(K.rejectedSpans)&&!(K.rejectedSpans&&h.isInteger(K.rejectedSpans.low)&&h.isInteger(K.rejectedSpans.high)))return"rejectedSpans: integer|Long expected"}if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage")){if(!h.isString(K.errorMessage))return"errorMessage: string expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return K;var $=new f.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;if(K.rejectedSpans!=null){if(h.Long)($.rejectedSpans=h.Long.fromValue(K.rejectedSpans)).unsigned=!1;else if(typeof K.rejectedSpans==="string")$.rejectedSpans=parseInt(K.rejectedSpans,10);else if(typeof K.rejectedSpans==="number")$.rejectedSpans=K.rejectedSpans;else if(typeof K.rejectedSpans==="object")$.rejectedSpans=new h.LongBits(K.rejectedSpans.low>>>0,K.rejectedSpans.high>>>0).toNumber()}if(K.errorMessage!=null)$.errorMessage=String(K.errorMessage);return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.rejectedSpans=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.rejectedSpans=$.longs===String?"0":0;H.errorMessage=""}if(K.rejectedSpans!=null&&K.hasOwnProperty("rejectedSpans"))if(typeof K.rejectedSpans==="number")H.rejectedSpans=$.longs===String?String(K.rejectedSpans):K.rejectedSpans;else H.rejectedSpans=$.longs===String?h.Long.prototype.toString.call(K.rejectedSpans):$.longs===Number?new h.LongBits(K.rejectedSpans.low>>>0,K.rejectedSpans.high>>>0).toNumber():K.rejectedSpans;if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage"))H.errorMessage=K.errorMessage;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},Z}(),G}(),J}(),Y.metrics=function(){var J={};return J.v1=function(){var G={};return G.MetricsService=function(){function Z(W,K,$){_4.rpc.Service.call(this,W,K,$)}return(Z.prototype=Object.create(_4.rpc.Service.prototype)).constructor=Z,Z.create=function(K,$,H){return new this(K,$,H)},Object.defineProperty(Z.prototype.export=function W(K,$){return this.rpcCall(W,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,K,$)},"name",{value:"Export"}),Z}(),G.ExportMetricsServiceRequest=function(){function Z(W){if(this.resourceMetrics=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.resourceMetrics=h.emptyArray,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.resourceMetrics!=null&&K.resourceMetrics.length)for(var H=0;H<K.resourceMetrics.length;++H)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(K.resourceMetrics[H],$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{if(!(q.resourceMetrics&&q.resourceMetrics.length))q.resourceMetrics=[];q.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(K,K.uint32()));break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.resourceMetrics!=null&&K.hasOwnProperty("resourceMetrics")){if(!Array.isArray(K.resourceMetrics))return"resourceMetrics: array expected";for(var $=0;$<K.resourceMetrics.length;++$){var H=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(K.resourceMetrics[$]);if(H)return"resourceMetrics."+H}}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return K;var $=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(K.resourceMetrics){if(!Array.isArray(K.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");$.resourceMetrics=[];for(var H=0;H<K.resourceMetrics.length;++H){if(typeof K.resourceMetrics[H]!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");$.resourceMetrics[H]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(K.resourceMetrics[H])}}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.resourceMetrics=[];if(K.resourceMetrics&&K.resourceMetrics.length){H.resourceMetrics=[];for(var F=0;F<K.resourceMetrics.length;++F)H.resourceMetrics[F]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(K.resourceMetrics[F],$)}return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},Z}(),G.ExportMetricsServiceResponse=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.partialSuccess=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.partialSuccess!=null&&Object.hasOwnProperty.call(K,"partialSuccess"))f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(K.partialSuccess,$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(K,K.uint32());break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess")){var $=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(K.partialSuccess);if($)return"partialSuccess."+$}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return K;var $=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(K.partialSuccess!=null){if(typeof K.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");$.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(K.partialSuccess)}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults)H.partialSuccess=null;if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess"))H.partialSuccess=f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(K.partialSuccess,$);return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},Z}(),G.ExportMetricsPartialSuccess=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.rejectedDataPoints=null,Z.prototype.errorMessage=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.rejectedDataPoints!=null&&Object.hasOwnProperty.call(K,"rejectedDataPoints"))$.uint32(8).int64(K.rejectedDataPoints);if(K.errorMessage!=null&&Object.hasOwnProperty.call(K,"errorMessage"))$.uint32(18).string(K.errorMessage);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.rejectedDataPoints=K.int64();break}case 2:{q.errorMessage=K.string();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.rejectedDataPoints!=null&&K.hasOwnProperty("rejectedDataPoints")){if(!h.isInteger(K.rejectedDataPoints)&&!(K.rejectedDataPoints&&h.isInteger(K.rejectedDataPoints.low)&&h.isInteger(K.rejectedDataPoints.high)))return"rejectedDataPoints: integer|Long expected"}if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage")){if(!h.isString(K.errorMessage))return"errorMessage: string expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return K;var $=new f.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;if(K.rejectedDataPoints!=null){if(h.Long)($.rejectedDataPoints=h.Long.fromValue(K.rejectedDataPoints)).unsigned=!1;else if(typeof K.rejectedDataPoints==="string")$.rejectedDataPoints=parseInt(K.rejectedDataPoints,10);else if(typeof K.rejectedDataPoints==="number")$.rejectedDataPoints=K.rejectedDataPoints;else if(typeof K.rejectedDataPoints==="object")$.rejectedDataPoints=new h.LongBits(K.rejectedDataPoints.low>>>0,K.rejectedDataPoints.high>>>0).toNumber()}if(K.errorMessage!=null)$.errorMessage=String(K.errorMessage);return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.rejectedDataPoints=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.rejectedDataPoints=$.longs===String?"0":0;H.errorMessage=""}if(K.rejectedDataPoints!=null&&K.hasOwnProperty("rejectedDataPoints"))if(typeof K.rejectedDataPoints==="number")H.rejectedDataPoints=$.longs===String?String(K.rejectedDataPoints):K.rejectedDataPoints;else H.rejectedDataPoints=$.longs===String?h.Long.prototype.toString.call(K.rejectedDataPoints):$.longs===Number?new h.LongBits(K.rejectedDataPoints.low>>>0,K.rejectedDataPoints.high>>>0).toNumber():K.rejectedDataPoints;if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage"))H.errorMessage=K.errorMessage;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},Z}(),G}(),J}(),Y.logs=function(){var J={};return J.v1=function(){var G={};return G.LogsService=function(){function Z(W,K,$){_4.rpc.Service.call(this,W,K,$)}return(Z.prototype=Object.create(_4.rpc.Service.prototype)).constructor=Z,Z.create=function(K,$,H){return new this(K,$,H)},Object.defineProperty(Z.prototype.export=function W(K,$){return this.rpcCall(W,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,K,$)},"name",{value:"Export"}),Z}(),G.ExportLogsServiceRequest=function(){function Z(W){if(this.resourceLogs=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.resourceLogs=h.emptyArray,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.resourceLogs!=null&&K.resourceLogs.length)for(var H=0;H<K.resourceLogs.length;++H)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(K.resourceLogs[H],$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{if(!(q.resourceLogs&&q.resourceLogs.length))q.resourceLogs=[];q.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(K,K.uint32()));break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.resourceLogs!=null&&K.hasOwnProperty("resourceLogs")){if(!Array.isArray(K.resourceLogs))return"resourceLogs: array expected";for(var $=0;$<K.resourceLogs.length;++$){var H=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(K.resourceLogs[$]);if(H)return"resourceLogs."+H}}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return K;var $=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(K.resourceLogs){if(!Array.isArray(K.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");$.resourceLogs=[];for(var H=0;H<K.resourceLogs.length;++H){if(typeof K.resourceLogs[H]!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");$.resourceLogs[H]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(K.resourceLogs[H])}}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.resourceLogs=[];if(K.resourceLogs&&K.resourceLogs.length){H.resourceLogs=[];for(var F=0;F<K.resourceLogs.length;++F)H.resourceLogs[F]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(K.resourceLogs[F],$)}return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},Z}(),G.ExportLogsServiceResponse=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.partialSuccess=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.partialSuccess!=null&&Object.hasOwnProperty.call(K,"partialSuccess"))f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(K.partialSuccess,$.uint32(10).fork()).ldelim();return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(K,K.uint32());break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess")){var $=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(K.partialSuccess);if($)return"partialSuccess."+$}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return K;var $=new f.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(K.partialSuccess!=null){if(typeof K.partialSuccess!=="object")throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");$.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(K.partialSuccess)}return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults)H.partialSuccess=null;if(K.partialSuccess!=null&&K.hasOwnProperty("partialSuccess"))H.partialSuccess=f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(K.partialSuccess,$);return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},Z}(),G.ExportLogsPartialSuccess=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.rejectedLogRecords=null,Z.prototype.errorMessage=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.rejectedLogRecords!=null&&Object.hasOwnProperty.call(K,"rejectedLogRecords"))$.uint32(8).int64(K.rejectedLogRecords);if(K.errorMessage!=null&&Object.hasOwnProperty.call(K,"errorMessage"))$.uint32(18).string(K.errorMessage);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.rejectedLogRecords=K.int64();break}case 2:{q.errorMessage=K.string();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.rejectedLogRecords!=null&&K.hasOwnProperty("rejectedLogRecords")){if(!h.isInteger(K.rejectedLogRecords)&&!(K.rejectedLogRecords&&h.isInteger(K.rejectedLogRecords.low)&&h.isInteger(K.rejectedLogRecords.high)))return"rejectedLogRecords: integer|Long expected"}if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage")){if(!h.isString(K.errorMessage))return"errorMessage: string expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return K;var $=new f.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;if(K.rejectedLogRecords!=null){if(h.Long)($.rejectedLogRecords=h.Long.fromValue(K.rejectedLogRecords)).unsigned=!1;else if(typeof K.rejectedLogRecords==="string")$.rejectedLogRecords=parseInt(K.rejectedLogRecords,10);else if(typeof K.rejectedLogRecords==="number")$.rejectedLogRecords=K.rejectedLogRecords;else if(typeof K.rejectedLogRecords==="object")$.rejectedLogRecords=new h.LongBits(K.rejectedLogRecords.low>>>0,K.rejectedLogRecords.high>>>0).toNumber()}if(K.errorMessage!=null)$.errorMessage=String(K.errorMessage);return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.rejectedLogRecords=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.rejectedLogRecords=$.longs===String?"0":0;H.errorMessage=""}if(K.rejectedLogRecords!=null&&K.hasOwnProperty("rejectedLogRecords"))if(typeof K.rejectedLogRecords==="number")H.rejectedLogRecords=$.longs===String?String(K.rejectedLogRecords):K.rejectedLogRecords;else H.rejectedLogRecords=$.longs===String?h.Long.prototype.toString.call(K.rejectedLogRecords):$.longs===Number?new h.LongBits(K.rejectedLogRecords.low>>>0,K.rejectedLogRecords.high>>>0).toNumber():K.rejectedLogRecords;if(K.errorMessage!=null&&K.hasOwnProperty("errorMessage"))H.errorMessage=K.errorMessage;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},Z}(),G}(),J}(),Y}(),X.metrics=function(){var Y={};return Y.v1=function(){var J={};return J.MetricsData=function(){function G(Z){if(this.resourceMetrics=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resourceMetrics=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resourceMetrics!=null&&W.resourceMetrics.length)for(var $=0;$<W.resourceMetrics.length;++$)f.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(W.resourceMetrics[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.MetricsData;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.resourceMetrics&&F.resourceMetrics.length))F.resourceMetrics=[];F.resourceMetrics.push(f.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resourceMetrics!=null&&W.hasOwnProperty("resourceMetrics")){if(!Array.isArray(W.resourceMetrics))return"resourceMetrics: array expected";for(var K=0;K<W.resourceMetrics.length;++K){var $=f.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(W.resourceMetrics[K]);if($)return"resourceMetrics."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.MetricsData)return W;var K=new f.opentelemetry.proto.metrics.v1.MetricsData;if(W.resourceMetrics){if(!Array.isArray(W.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");K.resourceMetrics=[];for(var $=0;$<W.resourceMetrics.length;++$){if(typeof W.resourceMetrics[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");K.resourceMetrics[$]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(W.resourceMetrics[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.resourceMetrics=[];if(W.resourceMetrics&&W.resourceMetrics.length){$.resourceMetrics=[];for(var H=0;H<W.resourceMetrics.length;++H)$.resourceMetrics[H]=f.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(W.resourceMetrics[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.MetricsData"},G}(),J.ResourceMetrics=function(){function G(Z){if(this.scopeMetrics=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resource=null,G.prototype.scopeMetrics=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resource!=null&&Object.hasOwnProperty.call(W,"resource"))f.opentelemetry.proto.resource.v1.Resource.encode(W.resource,K.uint32(10).fork()).ldelim();if(W.scopeMetrics!=null&&W.scopeMetrics.length)for(var $=0;$<W.scopeMetrics.length;++$)f.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(W.scopeMetrics[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.resource=f.opentelemetry.proto.resource.v1.Resource.decode(W,W.uint32());break}case 2:{if(!(F.scopeMetrics&&F.scopeMetrics.length))F.scopeMetrics=[];F.scopeMetrics.push(f.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resource!=null&&W.hasOwnProperty("resource")){var K=f.opentelemetry.proto.resource.v1.Resource.verify(W.resource);if(K)return"resource."+K}if(W.scopeMetrics!=null&&W.hasOwnProperty("scopeMetrics")){if(!Array.isArray(W.scopeMetrics))return"scopeMetrics: array expected";for(var $=0;$<W.scopeMetrics.length;++$){var K=f.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(W.scopeMetrics[$]);if(K)return"scopeMetrics."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.ResourceMetrics)return W;var K=new f.opentelemetry.proto.metrics.v1.ResourceMetrics;if(W.resource!=null){if(typeof W.resource!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");K.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(W.resource)}if(W.scopeMetrics){if(!Array.isArray(W.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");K.scopeMetrics=[];for(var $=0;$<W.scopeMetrics.length;++$){if(typeof W.scopeMetrics[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");K.scopeMetrics[$]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(W.scopeMetrics[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.scopeMetrics=[];if(K.defaults)$.resource=null,$.schemaUrl="";if(W.resource!=null&&W.hasOwnProperty("resource"))$.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(W.resource,K);if(W.scopeMetrics&&W.scopeMetrics.length){$.scopeMetrics=[];for(var H=0;H<W.scopeMetrics.length;++H)$.scopeMetrics[H]=f.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(W.scopeMetrics[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},G}(),J.ScopeMetrics=function(){function G(Z){if(this.metrics=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.scope=null,G.prototype.metrics=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.scope!=null&&Object.hasOwnProperty.call(W,"scope"))f.opentelemetry.proto.common.v1.InstrumentationScope.encode(W.scope,K.uint32(10).fork()).ldelim();if(W.metrics!=null&&W.metrics.length)for(var $=0;$<W.metrics.length;++$)f.opentelemetry.proto.metrics.v1.Metric.encode(W.metrics[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(W,W.uint32());break}case 2:{if(!(F.metrics&&F.metrics.length))F.metrics=[];F.metrics.push(f.opentelemetry.proto.metrics.v1.Metric.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.scope!=null&&W.hasOwnProperty("scope")){var K=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(W.scope);if(K)return"scope."+K}if(W.metrics!=null&&W.hasOwnProperty("metrics")){if(!Array.isArray(W.metrics))return"metrics: array expected";for(var $=0;$<W.metrics.length;++$){var K=f.opentelemetry.proto.metrics.v1.Metric.verify(W.metrics[$]);if(K)return"metrics."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.ScopeMetrics)return W;var K=new f.opentelemetry.proto.metrics.v1.ScopeMetrics;if(W.scope!=null){if(typeof W.scope!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");K.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(W.scope)}if(W.metrics){if(!Array.isArray(W.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");K.metrics=[];for(var $=0;$<W.metrics.length;++$){if(typeof W.metrics[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");K.metrics[$]=f.opentelemetry.proto.metrics.v1.Metric.fromObject(W.metrics[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.metrics=[];if(K.defaults)$.scope=null,$.schemaUrl="";if(W.scope!=null&&W.hasOwnProperty("scope"))$.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(W.scope,K);if(W.metrics&&W.metrics.length){$.metrics=[];for(var H=0;H<W.metrics.length;++H)$.metrics[H]=f.opentelemetry.proto.metrics.v1.Metric.toObject(W.metrics[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},G}(),J.Metric=function(){function G(W){if(this.metadata=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.name=null,G.prototype.description=null,G.prototype.unit=null,G.prototype.gauge=null,G.prototype.sum=null,G.prototype.histogram=null,G.prototype.exponentialHistogram=null,G.prototype.summary=null,G.prototype.metadata=h.emptyArray;var Z;return Object.defineProperty(G.prototype,"data",{get:h.oneOfGetter(Z=["gauge","sum","histogram","exponentialHistogram","summary"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.name!=null&&Object.hasOwnProperty.call(K,"name"))$.uint32(10).string(K.name);if(K.description!=null&&Object.hasOwnProperty.call(K,"description"))$.uint32(18).string(K.description);if(K.unit!=null&&Object.hasOwnProperty.call(K,"unit"))$.uint32(26).string(K.unit);if(K.gauge!=null&&Object.hasOwnProperty.call(K,"gauge"))f.opentelemetry.proto.metrics.v1.Gauge.encode(K.gauge,$.uint32(42).fork()).ldelim();if(K.sum!=null&&Object.hasOwnProperty.call(K,"sum"))f.opentelemetry.proto.metrics.v1.Sum.encode(K.sum,$.uint32(58).fork()).ldelim();if(K.histogram!=null&&Object.hasOwnProperty.call(K,"histogram"))f.opentelemetry.proto.metrics.v1.Histogram.encode(K.histogram,$.uint32(74).fork()).ldelim();if(K.exponentialHistogram!=null&&Object.hasOwnProperty.call(K,"exponentialHistogram"))f.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(K.exponentialHistogram,$.uint32(82).fork()).ldelim();if(K.summary!=null&&Object.hasOwnProperty.call(K,"summary"))f.opentelemetry.proto.metrics.v1.Summary.encode(K.summary,$.uint32(90).fork()).ldelim();if(K.metadata!=null&&K.metadata.length)for(var H=0;H<K.metadata.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.metadata[H],$.uint32(98).fork()).ldelim();return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.Metric;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.name=K.string();break}case 2:{q.description=K.string();break}case 3:{q.unit=K.string();break}case 5:{q.gauge=f.opentelemetry.proto.metrics.v1.Gauge.decode(K,K.uint32());break}case 7:{q.sum=f.opentelemetry.proto.metrics.v1.Sum.decode(K,K.uint32());break}case 9:{q.histogram=f.opentelemetry.proto.metrics.v1.Histogram.decode(K,K.uint32());break}case 10:{q.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(K,K.uint32());break}case 11:{q.summary=f.opentelemetry.proto.metrics.v1.Summary.decode(K,K.uint32());break}case 12:{if(!(q.metadata&&q.metadata.length))q.metadata=[];q.metadata.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.name!=null&&K.hasOwnProperty("name")){if(!h.isString(K.name))return"name: string expected"}if(K.description!=null&&K.hasOwnProperty("description")){if(!h.isString(K.description))return"description: string expected"}if(K.unit!=null&&K.hasOwnProperty("unit")){if(!h.isString(K.unit))return"unit: string expected"}if(K.gauge!=null&&K.hasOwnProperty("gauge")){$.data=1;{var H=f.opentelemetry.proto.metrics.v1.Gauge.verify(K.gauge);if(H)return"gauge."+H}}if(K.sum!=null&&K.hasOwnProperty("sum")){if($.data===1)return"data: multiple values";$.data=1;{var H=f.opentelemetry.proto.metrics.v1.Sum.verify(K.sum);if(H)return"sum."+H}}if(K.histogram!=null&&K.hasOwnProperty("histogram")){if($.data===1)return"data: multiple values";$.data=1;{var H=f.opentelemetry.proto.metrics.v1.Histogram.verify(K.histogram);if(H)return"histogram."+H}}if(K.exponentialHistogram!=null&&K.hasOwnProperty("exponentialHistogram")){if($.data===1)return"data: multiple values";$.data=1;{var H=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(K.exponentialHistogram);if(H)return"exponentialHistogram."+H}}if(K.summary!=null&&K.hasOwnProperty("summary")){if($.data===1)return"data: multiple values";$.data=1;{var H=f.opentelemetry.proto.metrics.v1.Summary.verify(K.summary);if(H)return"summary."+H}}if(K.metadata!=null&&K.hasOwnProperty("metadata")){if(!Array.isArray(K.metadata))return"metadata: array expected";for(var F=0;F<K.metadata.length;++F){var H=f.opentelemetry.proto.common.v1.KeyValue.verify(K.metadata[F]);if(H)return"metadata."+H}}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.Metric)return K;var $=new f.opentelemetry.proto.metrics.v1.Metric;if(K.name!=null)$.name=String(K.name);if(K.description!=null)$.description=String(K.description);if(K.unit!=null)$.unit=String(K.unit);if(K.gauge!=null){if(typeof K.gauge!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");$.gauge=f.opentelemetry.proto.metrics.v1.Gauge.fromObject(K.gauge)}if(K.sum!=null){if(typeof K.sum!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");$.sum=f.opentelemetry.proto.metrics.v1.Sum.fromObject(K.sum)}if(K.histogram!=null){if(typeof K.histogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");$.histogram=f.opentelemetry.proto.metrics.v1.Histogram.fromObject(K.histogram)}if(K.exponentialHistogram!=null){if(typeof K.exponentialHistogram!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");$.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(K.exponentialHistogram)}if(K.summary!=null){if(typeof K.summary!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");$.summary=f.opentelemetry.proto.metrics.v1.Summary.fromObject(K.summary)}if(K.metadata){if(!Array.isArray(K.metadata))throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: array expected");$.metadata=[];for(var H=0;H<K.metadata.length;++H){if(typeof K.metadata[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Metric.metadata: object expected");$.metadata[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.metadata[H])}}return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.metadata=[];if($.defaults)H.name="",H.description="",H.unit="";if(K.name!=null&&K.hasOwnProperty("name"))H.name=K.name;if(K.description!=null&&K.hasOwnProperty("description"))H.description=K.description;if(K.unit!=null&&K.hasOwnProperty("unit"))H.unit=K.unit;if(K.gauge!=null&&K.hasOwnProperty("gauge")){if(H.gauge=f.opentelemetry.proto.metrics.v1.Gauge.toObject(K.gauge,$),$.oneofs)H.data="gauge"}if(K.sum!=null&&K.hasOwnProperty("sum")){if(H.sum=f.opentelemetry.proto.metrics.v1.Sum.toObject(K.sum,$),$.oneofs)H.data="sum"}if(K.histogram!=null&&K.hasOwnProperty("histogram")){if(H.histogram=f.opentelemetry.proto.metrics.v1.Histogram.toObject(K.histogram,$),$.oneofs)H.data="histogram"}if(K.exponentialHistogram!=null&&K.hasOwnProperty("exponentialHistogram")){if(H.exponentialHistogram=f.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(K.exponentialHistogram,$),$.oneofs)H.data="exponentialHistogram"}if(K.summary!=null&&K.hasOwnProperty("summary")){if(H.summary=f.opentelemetry.proto.metrics.v1.Summary.toObject(K.summary,$),$.oneofs)H.data="summary"}if(K.metadata&&K.metadata.length){H.metadata=[];for(var F=0;F<K.metadata.length;++F)H.metadata[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.metadata[F],$)}return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.Metric"},G}(),J.Gauge=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.Gauge;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.Gauge)return W;var K=new f.opentelemetry.proto.metrics.v1.Gauge;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(W.dataPoints[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(W.dataPoints[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.Gauge"},G}(),J.Sum=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.prototype.aggregationTemporality=null,G.prototype.isMonotonic=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();if(W.aggregationTemporality!=null&&Object.hasOwnProperty.call(W,"aggregationTemporality"))K.uint32(16).int32(W.aggregationTemporality);if(W.isMonotonic!=null&&Object.hasOwnProperty.call(W,"isMonotonic"))K.uint32(24).bool(W.isMonotonic);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.Sum;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(W,W.uint32()));break}case 2:{F.aggregationTemporality=W.int32();break}case 3:{F.isMonotonic=W.bool();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))switch(W.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}if(W.isMonotonic!=null&&W.hasOwnProperty("isMonotonic")){if(typeof W.isMonotonic!=="boolean")return"isMonotonic: boolean expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.Sum)return W;var K=new f.opentelemetry.proto.metrics.v1.Sum;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(W.dataPoints[$])}}switch(W.aggregationTemporality){default:if(typeof W.aggregationTemporality==="number"){K.aggregationTemporality=W.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:K.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:K.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:K.aggregationTemporality=2;break}if(W.isMonotonic!=null)K.isMonotonic=Boolean(W.isMonotonic);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(K.defaults)$.aggregationTemporality=K.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,$.isMonotonic=!1;if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(W.dataPoints[H],K)}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))$.aggregationTemporality=K.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]===void 0?W.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]:W.aggregationTemporality;if(W.isMonotonic!=null&&W.hasOwnProperty("isMonotonic"))$.isMonotonic=W.isMonotonic;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.Sum"},G}(),J.Histogram=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.prototype.aggregationTemporality=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();if(W.aggregationTemporality!=null&&Object.hasOwnProperty.call(W,"aggregationTemporality"))K.uint32(16).int32(W.aggregationTemporality);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.Histogram;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(W,W.uint32()));break}case 2:{F.aggregationTemporality=W.int32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))switch(W.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.Histogram)return W;var K=new f.opentelemetry.proto.metrics.v1.Histogram;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(W.dataPoints[$])}}switch(W.aggregationTemporality){default:if(typeof W.aggregationTemporality==="number"){K.aggregationTemporality=W.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:K.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:K.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:K.aggregationTemporality=2;break}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(K.defaults)$.aggregationTemporality=K.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(W.dataPoints[H],K)}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))$.aggregationTemporality=K.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]===void 0?W.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]:W.aggregationTemporality;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.Histogram"},G}(),J.ExponentialHistogram=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.prototype.aggregationTemporality=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();if(W.aggregationTemporality!=null&&Object.hasOwnProperty.call(W,"aggregationTemporality"))K.uint32(16).int32(W.aggregationTemporality);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(W,W.uint32()));break}case 2:{F.aggregationTemporality=W.int32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))switch(W.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:break}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogram)return W;var K=new f.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(W.dataPoints[$])}}switch(W.aggregationTemporality){default:if(typeof W.aggregationTemporality==="number"){K.aggregationTemporality=W.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:K.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:K.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:K.aggregationTemporality=2;break}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(K.defaults)$.aggregationTemporality=K.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0;if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(W.dataPoints[H],K)}if(W.aggregationTemporality!=null&&W.hasOwnProperty("aggregationTemporality"))$.aggregationTemporality=K.enums===String?f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]===void 0?W.aggregationTemporality:f.opentelemetry.proto.metrics.v1.AggregationTemporality[W.aggregationTemporality]:W.aggregationTemporality;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},G}(),J.Summary=function(){function G(Z){if(this.dataPoints=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.dataPoints=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.dataPoints!=null&&W.dataPoints.length)for(var $=0;$<W.dataPoints.length;++$)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(W.dataPoints[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.Summary;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.dataPoints&&F.dataPoints.length))F.dataPoints=[];F.dataPoints.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.dataPoints!=null&&W.hasOwnProperty("dataPoints")){if(!Array.isArray(W.dataPoints))return"dataPoints: array expected";for(var K=0;K<W.dataPoints.length;++K){var $=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(W.dataPoints[K]);if($)return"dataPoints."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.Summary)return W;var K=new f.opentelemetry.proto.metrics.v1.Summary;if(W.dataPoints){if(!Array.isArray(W.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");K.dataPoints=[];for(var $=0;$<W.dataPoints.length;++$){if(typeof W.dataPoints[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");K.dataPoints[$]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(W.dataPoints[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.dataPoints=[];if(W.dataPoints&&W.dataPoints.length){$.dataPoints=[];for(var H=0;H<W.dataPoints.length;++H)$.dataPoints[H]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(W.dataPoints[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.Summary"},G}(),J.AggregationTemporality=function(){var G={},Z=Object.create(G);return Z[G[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,Z[G[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,Z[G[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,Z}(),J.DataPointFlags=function(){var G={},Z=Object.create(G);return Z[G[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,Z[G[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,Z}(),J.NumberDataPoint=function(){function G(W){if(this.attributes=[],this.exemplars=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.attributes=h.emptyArray,G.prototype.startTimeUnixNano=null,G.prototype.timeUnixNano=null,G.prototype.asDouble=null,G.prototype.asInt=null,G.prototype.exemplars=h.emptyArray,G.prototype.flags=null;var Z;return Object.defineProperty(G.prototype,"value",{get:h.oneOfGetter(Z=["asDouble","asInt"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.startTimeUnixNano!=null&&Object.hasOwnProperty.call(K,"startTimeUnixNano"))$.uint32(17).fixed64(K.startTimeUnixNano);if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(25).fixed64(K.timeUnixNano);if(K.asDouble!=null&&Object.hasOwnProperty.call(K,"asDouble"))$.uint32(33).double(K.asDouble);if(K.exemplars!=null&&K.exemplars.length)for(var H=0;H<K.exemplars.length;++H)f.opentelemetry.proto.metrics.v1.Exemplar.encode(K.exemplars[H],$.uint32(42).fork()).ldelim();if(K.asInt!=null&&Object.hasOwnProperty.call(K,"asInt"))$.uint32(49).sfixed64(K.asInt);if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(58).fork()).ldelim();if(K.flags!=null&&Object.hasOwnProperty.call(K,"flags"))$.uint32(64).uint32(K.flags);return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 7:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 2:{q.startTimeUnixNano=K.fixed64();break}case 3:{q.timeUnixNano=K.fixed64();break}case 4:{q.asDouble=K.double();break}case 6:{q.asInt=K.sfixed64();break}case 5:{if(!(q.exemplars&&q.exemplars.length))q.exemplars=[];q.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(K,K.uint32()));break}case 8:{q.flags=K.uint32();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var H=0;H<K.attributes.length;++H){var F=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[H]);if(F)return"attributes."+F}}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(K.startTimeUnixNano)&&!(K.startTimeUnixNano&&h.isInteger(K.startTimeUnixNano.low)&&h.isInteger(K.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.asDouble!=null&&K.hasOwnProperty("asDouble")){if($.value=1,typeof K.asDouble!=="number")return"asDouble: number expected"}if(K.asInt!=null&&K.hasOwnProperty("asInt")){if($.value===1)return"value: multiple values";if($.value=1,!h.isInteger(K.asInt)&&!(K.asInt&&h.isInteger(K.asInt.low)&&h.isInteger(K.asInt.high)))return"asInt: integer|Long expected"}if(K.exemplars!=null&&K.hasOwnProperty("exemplars")){if(!Array.isArray(K.exemplars))return"exemplars: array expected";for(var H=0;H<K.exemplars.length;++H){var F=f.opentelemetry.proto.metrics.v1.Exemplar.verify(K.exemplars[H]);if(F)return"exemplars."+F}}if(K.flags!=null&&K.hasOwnProperty("flags")){if(!h.isInteger(K.flags))return"flags: integer expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.NumberDataPoint)return K;var $=new f.opentelemetry.proto.metrics.v1.NumberDataPoint;if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.startTimeUnixNano!=null){if(h.Long)($.startTimeUnixNano=h.Long.fromValue(K.startTimeUnixNano)).unsigned=!1;else if(typeof K.startTimeUnixNano==="string")$.startTimeUnixNano=parseInt(K.startTimeUnixNano,10);else if(typeof K.startTimeUnixNano==="number")$.startTimeUnixNano=K.startTimeUnixNano;else if(typeof K.startTimeUnixNano==="object")$.startTimeUnixNano=new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber()}if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.asDouble!=null)$.asDouble=Number(K.asDouble);if(K.asInt!=null){if(h.Long)($.asInt=h.Long.fromValue(K.asInt)).unsigned=!1;else if(typeof K.asInt==="string")$.asInt=parseInt(K.asInt,10);else if(typeof K.asInt==="number")$.asInt=K.asInt;else if(typeof K.asInt==="object")$.asInt=new h.LongBits(K.asInt.low>>>0,K.asInt.high>>>0).toNumber()}if(K.exemplars){if(!Array.isArray(K.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");$.exemplars=[];for(var H=0;H<K.exemplars.length;++H){if(typeof K.exemplars[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");$.exemplars[H]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(K.exemplars[H])}}if(K.flags!=null)$.flags=K.flags>>>0;return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.exemplars=[],H.attributes=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.startTimeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.startTimeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;H.flags=0}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano"))if(typeof K.startTimeUnixNano==="number")H.startTimeUnixNano=$.longs===String?String(K.startTimeUnixNano):K.startTimeUnixNano;else H.startTimeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.startTimeUnixNano):$.longs===Number?new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber():K.startTimeUnixNano;if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.asDouble!=null&&K.hasOwnProperty("asDouble")){if(H.asDouble=$.json&&!isFinite(K.asDouble)?String(K.asDouble):K.asDouble,$.oneofs)H.value="asDouble"}if(K.exemplars&&K.exemplars.length){H.exemplars=[];for(var q=0;q<K.exemplars.length;++q)H.exemplars[q]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(K.exemplars[q],$)}if(K.asInt!=null&&K.hasOwnProperty("asInt")){if(typeof K.asInt==="number")H.asInt=$.longs===String?String(K.asInt):K.asInt;else H.asInt=$.longs===String?h.Long.prototype.toString.call(K.asInt):$.longs===Number?new h.LongBits(K.asInt.low>>>0,K.asInt.high>>>0).toNumber():K.asInt;if($.oneofs)H.value="asInt"}if(K.attributes&&K.attributes.length){H.attributes=[];for(var q=0;q<K.attributes.length;++q)H.attributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[q],$)}if(K.flags!=null&&K.hasOwnProperty("flags"))H.flags=K.flags;return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},G}(),J.HistogramDataPoint=function(){function G(W){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.attributes=h.emptyArray,G.prototype.startTimeUnixNano=null,G.prototype.timeUnixNano=null,G.prototype.count=null,G.prototype.sum=null,G.prototype.bucketCounts=h.emptyArray,G.prototype.explicitBounds=h.emptyArray,G.prototype.exemplars=h.emptyArray,G.prototype.flags=null,G.prototype.min=null,G.prototype.max=null;var Z;return Object.defineProperty(G.prototype,"_sum",{get:h.oneOfGetter(Z=["sum"]),set:h.oneOfSetter(Z)}),Object.defineProperty(G.prototype,"_min",{get:h.oneOfGetter(Z=["min"]),set:h.oneOfSetter(Z)}),Object.defineProperty(G.prototype,"_max",{get:h.oneOfGetter(Z=["max"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.startTimeUnixNano!=null&&Object.hasOwnProperty.call(K,"startTimeUnixNano"))$.uint32(17).fixed64(K.startTimeUnixNano);if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(25).fixed64(K.timeUnixNano);if(K.count!=null&&Object.hasOwnProperty.call(K,"count"))$.uint32(33).fixed64(K.count);if(K.sum!=null&&Object.hasOwnProperty.call(K,"sum"))$.uint32(41).double(K.sum);if(K.bucketCounts!=null&&K.bucketCounts.length){$.uint32(50).fork();for(var H=0;H<K.bucketCounts.length;++H)$.fixed64(K.bucketCounts[H]);$.ldelim()}if(K.explicitBounds!=null&&K.explicitBounds.length){$.uint32(58).fork();for(var H=0;H<K.explicitBounds.length;++H)$.double(K.explicitBounds[H]);$.ldelim()}if(K.exemplars!=null&&K.exemplars.length)for(var H=0;H<K.exemplars.length;++H)f.opentelemetry.proto.metrics.v1.Exemplar.encode(K.exemplars[H],$.uint32(66).fork()).ldelim();if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(74).fork()).ldelim();if(K.flags!=null&&Object.hasOwnProperty.call(K,"flags"))$.uint32(80).uint32(K.flags);if(K.min!=null&&Object.hasOwnProperty.call(K,"min"))$.uint32(89).double(K.min);if(K.max!=null&&Object.hasOwnProperty.call(K,"max"))$.uint32(97).double(K.max);return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 9:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 2:{q.startTimeUnixNano=K.fixed64();break}case 3:{q.timeUnixNano=K.fixed64();break}case 4:{q.count=K.fixed64();break}case 5:{q.sum=K.double();break}case 6:{if(!(q.bucketCounts&&q.bucketCounts.length))q.bucketCounts=[];if((V&7)===2){var U=K.uint32()+K.pos;while(K.pos<U)q.bucketCounts.push(K.fixed64())}else q.bucketCounts.push(K.fixed64());break}case 7:{if(!(q.explicitBounds&&q.explicitBounds.length))q.explicitBounds=[];if((V&7)===2){var U=K.uint32()+K.pos;while(K.pos<U)q.explicitBounds.push(K.double())}else q.explicitBounds.push(K.double());break}case 8:{if(!(q.exemplars&&q.exemplars.length))q.exemplars=[];q.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(K,K.uint32()));break}case 10:{q.flags=K.uint32();break}case 11:{q.min=K.double();break}case 12:{q.max=K.double();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var H=0;H<K.attributes.length;++H){var F=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[H]);if(F)return"attributes."+F}}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(K.startTimeUnixNano)&&!(K.startTimeUnixNano&&h.isInteger(K.startTimeUnixNano.low)&&h.isInteger(K.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.count!=null&&K.hasOwnProperty("count")){if(!h.isInteger(K.count)&&!(K.count&&h.isInteger(K.count.low)&&h.isInteger(K.count.high)))return"count: integer|Long expected"}if(K.sum!=null&&K.hasOwnProperty("sum")){if($._sum=1,typeof K.sum!=="number")return"sum: number expected"}if(K.bucketCounts!=null&&K.hasOwnProperty("bucketCounts")){if(!Array.isArray(K.bucketCounts))return"bucketCounts: array expected";for(var H=0;H<K.bucketCounts.length;++H)if(!h.isInteger(K.bucketCounts[H])&&!(K.bucketCounts[H]&&h.isInteger(K.bucketCounts[H].low)&&h.isInteger(K.bucketCounts[H].high)))return"bucketCounts: integer|Long[] expected"}if(K.explicitBounds!=null&&K.hasOwnProperty("explicitBounds")){if(!Array.isArray(K.explicitBounds))return"explicitBounds: array expected";for(var H=0;H<K.explicitBounds.length;++H)if(typeof K.explicitBounds[H]!=="number")return"explicitBounds: number[] expected"}if(K.exemplars!=null&&K.hasOwnProperty("exemplars")){if(!Array.isArray(K.exemplars))return"exemplars: array expected";for(var H=0;H<K.exemplars.length;++H){var F=f.opentelemetry.proto.metrics.v1.Exemplar.verify(K.exemplars[H]);if(F)return"exemplars."+F}}if(K.flags!=null&&K.hasOwnProperty("flags")){if(!h.isInteger(K.flags))return"flags: integer expected"}if(K.min!=null&&K.hasOwnProperty("min")){if($._min=1,typeof K.min!=="number")return"min: number expected"}if(K.max!=null&&K.hasOwnProperty("max")){if($._max=1,typeof K.max!=="number")return"max: number expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.HistogramDataPoint)return K;var $=new f.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.startTimeUnixNano!=null){if(h.Long)($.startTimeUnixNano=h.Long.fromValue(K.startTimeUnixNano)).unsigned=!1;else if(typeof K.startTimeUnixNano==="string")$.startTimeUnixNano=parseInt(K.startTimeUnixNano,10);else if(typeof K.startTimeUnixNano==="number")$.startTimeUnixNano=K.startTimeUnixNano;else if(typeof K.startTimeUnixNano==="object")$.startTimeUnixNano=new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber()}if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.count!=null){if(h.Long)($.count=h.Long.fromValue(K.count)).unsigned=!1;else if(typeof K.count==="string")$.count=parseInt(K.count,10);else if(typeof K.count==="number")$.count=K.count;else if(typeof K.count==="object")$.count=new h.LongBits(K.count.low>>>0,K.count.high>>>0).toNumber()}if(K.sum!=null)$.sum=Number(K.sum);if(K.bucketCounts){if(!Array.isArray(K.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");$.bucketCounts=[];for(var H=0;H<K.bucketCounts.length;++H)if(h.Long)($.bucketCounts[H]=h.Long.fromValue(K.bucketCounts[H])).unsigned=!1;else if(typeof K.bucketCounts[H]==="string")$.bucketCounts[H]=parseInt(K.bucketCounts[H],10);else if(typeof K.bucketCounts[H]==="number")$.bucketCounts[H]=K.bucketCounts[H];else if(typeof K.bucketCounts[H]==="object")$.bucketCounts[H]=new h.LongBits(K.bucketCounts[H].low>>>0,K.bucketCounts[H].high>>>0).toNumber()}if(K.explicitBounds){if(!Array.isArray(K.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");$.explicitBounds=[];for(var H=0;H<K.explicitBounds.length;++H)$.explicitBounds[H]=Number(K.explicitBounds[H])}if(K.exemplars){if(!Array.isArray(K.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");$.exemplars=[];for(var H=0;H<K.exemplars.length;++H){if(typeof K.exemplars[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");$.exemplars[H]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(K.exemplars[H])}}if(K.flags!=null)$.flags=K.flags>>>0;if(K.min!=null)$.min=Number(K.min);if(K.max!=null)$.max=Number(K.max);return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.bucketCounts=[],H.explicitBounds=[],H.exemplars=[],H.attributes=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.startTimeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.startTimeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.count=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.count=$.longs===String?"0":0;H.flags=0}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano"))if(typeof K.startTimeUnixNano==="number")H.startTimeUnixNano=$.longs===String?String(K.startTimeUnixNano):K.startTimeUnixNano;else H.startTimeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.startTimeUnixNano):$.longs===Number?new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber():K.startTimeUnixNano;if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.count!=null&&K.hasOwnProperty("count"))if(typeof K.count==="number")H.count=$.longs===String?String(K.count):K.count;else H.count=$.longs===String?h.Long.prototype.toString.call(K.count):$.longs===Number?new h.LongBits(K.count.low>>>0,K.count.high>>>0).toNumber():K.count;if(K.sum!=null&&K.hasOwnProperty("sum")){if(H.sum=$.json&&!isFinite(K.sum)?String(K.sum):K.sum,$.oneofs)H._sum="sum"}if(K.bucketCounts&&K.bucketCounts.length){H.bucketCounts=[];for(var q=0;q<K.bucketCounts.length;++q)if(typeof K.bucketCounts[q]==="number")H.bucketCounts[q]=$.longs===String?String(K.bucketCounts[q]):K.bucketCounts[q];else H.bucketCounts[q]=$.longs===String?h.Long.prototype.toString.call(K.bucketCounts[q]):$.longs===Number?new h.LongBits(K.bucketCounts[q].low>>>0,K.bucketCounts[q].high>>>0).toNumber():K.bucketCounts[q]}if(K.explicitBounds&&K.explicitBounds.length){H.explicitBounds=[];for(var q=0;q<K.explicitBounds.length;++q)H.explicitBounds[q]=$.json&&!isFinite(K.explicitBounds[q])?String(K.explicitBounds[q]):K.explicitBounds[q]}if(K.exemplars&&K.exemplars.length){H.exemplars=[];for(var q=0;q<K.exemplars.length;++q)H.exemplars[q]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(K.exemplars[q],$)}if(K.attributes&&K.attributes.length){H.attributes=[];for(var q=0;q<K.attributes.length;++q)H.attributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[q],$)}if(K.flags!=null&&K.hasOwnProperty("flags"))H.flags=K.flags;if(K.min!=null&&K.hasOwnProperty("min")){if(H.min=$.json&&!isFinite(K.min)?String(K.min):K.min,$.oneofs)H._min="min"}if(K.max!=null&&K.hasOwnProperty("max")){if(H.max=$.json&&!isFinite(K.max)?String(K.max):K.max,$.oneofs)H._max="max"}return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},G}(),J.ExponentialHistogramDataPoint=function(){function G(W){if(this.attributes=[],this.exemplars=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.attributes=h.emptyArray,G.prototype.startTimeUnixNano=null,G.prototype.timeUnixNano=null,G.prototype.count=null,G.prototype.sum=null,G.prototype.scale=null,G.prototype.zeroCount=null,G.prototype.positive=null,G.prototype.negative=null,G.prototype.flags=null,G.prototype.exemplars=h.emptyArray,G.prototype.min=null,G.prototype.max=null,G.prototype.zeroThreshold=null;var Z;return Object.defineProperty(G.prototype,"_sum",{get:h.oneOfGetter(Z=["sum"]),set:h.oneOfSetter(Z)}),Object.defineProperty(G.prototype,"_min",{get:h.oneOfGetter(Z=["min"]),set:h.oneOfSetter(Z)}),Object.defineProperty(G.prototype,"_max",{get:h.oneOfGetter(Z=["max"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.attributes!=null&&K.attributes.length)for(var H=0;H<K.attributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.attributes[H],$.uint32(10).fork()).ldelim();if(K.startTimeUnixNano!=null&&Object.hasOwnProperty.call(K,"startTimeUnixNano"))$.uint32(17).fixed64(K.startTimeUnixNano);if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(25).fixed64(K.timeUnixNano);if(K.count!=null&&Object.hasOwnProperty.call(K,"count"))$.uint32(33).fixed64(K.count);if(K.sum!=null&&Object.hasOwnProperty.call(K,"sum"))$.uint32(41).double(K.sum);if(K.scale!=null&&Object.hasOwnProperty.call(K,"scale"))$.uint32(48).sint32(K.scale);if(K.zeroCount!=null&&Object.hasOwnProperty.call(K,"zeroCount"))$.uint32(57).fixed64(K.zeroCount);if(K.positive!=null&&Object.hasOwnProperty.call(K,"positive"))f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(K.positive,$.uint32(66).fork()).ldelim();if(K.negative!=null&&Object.hasOwnProperty.call(K,"negative"))f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(K.negative,$.uint32(74).fork()).ldelim();if(K.flags!=null&&Object.hasOwnProperty.call(K,"flags"))$.uint32(80).uint32(K.flags);if(K.exemplars!=null&&K.exemplars.length)for(var H=0;H<K.exemplars.length;++H)f.opentelemetry.proto.metrics.v1.Exemplar.encode(K.exemplars[H],$.uint32(90).fork()).ldelim();if(K.min!=null&&Object.hasOwnProperty.call(K,"min"))$.uint32(97).double(K.min);if(K.max!=null&&Object.hasOwnProperty.call(K,"max"))$.uint32(105).double(K.max);if(K.zeroThreshold!=null&&Object.hasOwnProperty.call(K,"zeroThreshold"))$.uint32(113).double(K.zeroThreshold);return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{if(!(q.attributes&&q.attributes.length))q.attributes=[];q.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 2:{q.startTimeUnixNano=K.fixed64();break}case 3:{q.timeUnixNano=K.fixed64();break}case 4:{q.count=K.fixed64();break}case 5:{q.sum=K.double();break}case 6:{q.scale=K.sint32();break}case 7:{q.zeroCount=K.fixed64();break}case 8:{q.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(K,K.uint32());break}case 9:{q.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(K,K.uint32());break}case 10:{q.flags=K.uint32();break}case 11:{if(!(q.exemplars&&q.exemplars.length))q.exemplars=[];q.exemplars.push(f.opentelemetry.proto.metrics.v1.Exemplar.decode(K,K.uint32()));break}case 12:{q.min=K.double();break}case 13:{q.max=K.double();break}case 14:{q.zeroThreshold=K.double();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.attributes!=null&&K.hasOwnProperty("attributes")){if(!Array.isArray(K.attributes))return"attributes: array expected";for(var H=0;H<K.attributes.length;++H){var F=f.opentelemetry.proto.common.v1.KeyValue.verify(K.attributes[H]);if(F)return"attributes."+F}}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(K.startTimeUnixNano)&&!(K.startTimeUnixNano&&h.isInteger(K.startTimeUnixNano.low)&&h.isInteger(K.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.count!=null&&K.hasOwnProperty("count")){if(!h.isInteger(K.count)&&!(K.count&&h.isInteger(K.count.low)&&h.isInteger(K.count.high)))return"count: integer|Long expected"}if(K.sum!=null&&K.hasOwnProperty("sum")){if($._sum=1,typeof K.sum!=="number")return"sum: number expected"}if(K.scale!=null&&K.hasOwnProperty("scale")){if(!h.isInteger(K.scale))return"scale: integer expected"}if(K.zeroCount!=null&&K.hasOwnProperty("zeroCount")){if(!h.isInteger(K.zeroCount)&&!(K.zeroCount&&h.isInteger(K.zeroCount.low)&&h.isInteger(K.zeroCount.high)))return"zeroCount: integer|Long expected"}if(K.positive!=null&&K.hasOwnProperty("positive")){var F=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(K.positive);if(F)return"positive."+F}if(K.negative!=null&&K.hasOwnProperty("negative")){var F=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(K.negative);if(F)return"negative."+F}if(K.flags!=null&&K.hasOwnProperty("flags")){if(!h.isInteger(K.flags))return"flags: integer expected"}if(K.exemplars!=null&&K.hasOwnProperty("exemplars")){if(!Array.isArray(K.exemplars))return"exemplars: array expected";for(var H=0;H<K.exemplars.length;++H){var F=f.opentelemetry.proto.metrics.v1.Exemplar.verify(K.exemplars[H]);if(F)return"exemplars."+F}}if(K.min!=null&&K.hasOwnProperty("min")){if($._min=1,typeof K.min!=="number")return"min: number expected"}if(K.max!=null&&K.hasOwnProperty("max")){if($._max=1,typeof K.max!=="number")return"max: number expected"}if(K.zeroThreshold!=null&&K.hasOwnProperty("zeroThreshold")){if(typeof K.zeroThreshold!=="number")return"zeroThreshold: number expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return K;var $=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(K.attributes){if(!Array.isArray(K.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");$.attributes=[];for(var H=0;H<K.attributes.length;++H){if(typeof K.attributes[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");$.attributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.attributes[H])}}if(K.startTimeUnixNano!=null){if(h.Long)($.startTimeUnixNano=h.Long.fromValue(K.startTimeUnixNano)).unsigned=!1;else if(typeof K.startTimeUnixNano==="string")$.startTimeUnixNano=parseInt(K.startTimeUnixNano,10);else if(typeof K.startTimeUnixNano==="number")$.startTimeUnixNano=K.startTimeUnixNano;else if(typeof K.startTimeUnixNano==="object")$.startTimeUnixNano=new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber()}if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.count!=null){if(h.Long)($.count=h.Long.fromValue(K.count)).unsigned=!1;else if(typeof K.count==="string")$.count=parseInt(K.count,10);else if(typeof K.count==="number")$.count=K.count;else if(typeof K.count==="object")$.count=new h.LongBits(K.count.low>>>0,K.count.high>>>0).toNumber()}if(K.sum!=null)$.sum=Number(K.sum);if(K.scale!=null)$.scale=K.scale|0;if(K.zeroCount!=null){if(h.Long)($.zeroCount=h.Long.fromValue(K.zeroCount)).unsigned=!1;else if(typeof K.zeroCount==="string")$.zeroCount=parseInt(K.zeroCount,10);else if(typeof K.zeroCount==="number")$.zeroCount=K.zeroCount;else if(typeof K.zeroCount==="object")$.zeroCount=new h.LongBits(K.zeroCount.low>>>0,K.zeroCount.high>>>0).toNumber()}if(K.positive!=null){if(typeof K.positive!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");$.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(K.positive)}if(K.negative!=null){if(typeof K.negative!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");$.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(K.negative)}if(K.flags!=null)$.flags=K.flags>>>0;if(K.exemplars){if(!Array.isArray(K.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");$.exemplars=[];for(var H=0;H<K.exemplars.length;++H){if(typeof K.exemplars[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");$.exemplars[H]=f.opentelemetry.proto.metrics.v1.Exemplar.fromObject(K.exemplars[H])}}if(K.min!=null)$.min=Number(K.min);if(K.max!=null)$.max=Number(K.max);if(K.zeroThreshold!=null)$.zeroThreshold=Number(K.zeroThreshold);return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.attributes=[],H.exemplars=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.startTimeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.startTimeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;if(h.Long){var F=new h.Long(0,0,!1);H.count=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.count=$.longs===String?"0":0;if(H.scale=0,h.Long){var F=new h.Long(0,0,!1);H.zeroCount=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.zeroCount=$.longs===String?"0":0;H.positive=null,H.negative=null,H.flags=0,H.zeroThreshold=0}if(K.attributes&&K.attributes.length){H.attributes=[];for(var q=0;q<K.attributes.length;++q)H.attributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.attributes[q],$)}if(K.startTimeUnixNano!=null&&K.hasOwnProperty("startTimeUnixNano"))if(typeof K.startTimeUnixNano==="number")H.startTimeUnixNano=$.longs===String?String(K.startTimeUnixNano):K.startTimeUnixNano;else H.startTimeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.startTimeUnixNano):$.longs===Number?new h.LongBits(K.startTimeUnixNano.low>>>0,K.startTimeUnixNano.high>>>0).toNumber():K.startTimeUnixNano;if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.count!=null&&K.hasOwnProperty("count"))if(typeof K.count==="number")H.count=$.longs===String?String(K.count):K.count;else H.count=$.longs===String?h.Long.prototype.toString.call(K.count):$.longs===Number?new h.LongBits(K.count.low>>>0,K.count.high>>>0).toNumber():K.count;if(K.sum!=null&&K.hasOwnProperty("sum")){if(H.sum=$.json&&!isFinite(K.sum)?String(K.sum):K.sum,$.oneofs)H._sum="sum"}if(K.scale!=null&&K.hasOwnProperty("scale"))H.scale=K.scale;if(K.zeroCount!=null&&K.hasOwnProperty("zeroCount"))if(typeof K.zeroCount==="number")H.zeroCount=$.longs===String?String(K.zeroCount):K.zeroCount;else H.zeroCount=$.longs===String?h.Long.prototype.toString.call(K.zeroCount):$.longs===Number?new h.LongBits(K.zeroCount.low>>>0,K.zeroCount.high>>>0).toNumber():K.zeroCount;if(K.positive!=null&&K.hasOwnProperty("positive"))H.positive=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(K.positive,$);if(K.negative!=null&&K.hasOwnProperty("negative"))H.negative=f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(K.negative,$);if(K.flags!=null&&K.hasOwnProperty("flags"))H.flags=K.flags;if(K.exemplars&&K.exemplars.length){H.exemplars=[];for(var q=0;q<K.exemplars.length;++q)H.exemplars[q]=f.opentelemetry.proto.metrics.v1.Exemplar.toObject(K.exemplars[q],$)}if(K.min!=null&&K.hasOwnProperty("min")){if(H.min=$.json&&!isFinite(K.min)?String(K.min):K.min,$.oneofs)H._min="min"}if(K.max!=null&&K.hasOwnProperty("max")){if(H.max=$.json&&!isFinite(K.max)?String(K.max):K.max,$.oneofs)H._max="max"}if(K.zeroThreshold!=null&&K.hasOwnProperty("zeroThreshold"))H.zeroThreshold=$.json&&!isFinite(K.zeroThreshold)?String(K.zeroThreshold):K.zeroThreshold;return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},G.Buckets=function(){function W(K){if(this.bucketCounts=[],K){for(var $=Object.keys(K),H=0;H<$.length;++H)if(K[$[H]]!=null)this[$[H]]=K[$[H]]}}return W.prototype.offset=null,W.prototype.bucketCounts=h.emptyArray,W.create=function($){return new W($)},W.encode=function($,H){if(!H)H=J6.create();if($.offset!=null&&Object.hasOwnProperty.call($,"offset"))H.uint32(8).sint32($.offset);if($.bucketCounts!=null&&$.bucketCounts.length){H.uint32(18).fork();for(var F=0;F<$.bucketCounts.length;++F)H.uint64($.bucketCounts[F]);H.ldelim()}return H},W.encodeDelimited=function($,H){return this.encode($,H).ldelim()},W.decode=function($,H,F){if(!($ instanceof V0))$=V0.create($);var q=H===void 0?$.len:$.pos+H,V=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;while($.pos<q){var U=$.uint32();if(U===F)break;switch(U>>>3){case 1:{V.offset=$.sint32();break}case 2:{if(!(V.bucketCounts&&V.bucketCounts.length))V.bucketCounts=[];if((U&7)===2){var D=$.uint32()+$.pos;while($.pos<D)V.bucketCounts.push($.uint64())}else V.bucketCounts.push($.uint64());break}default:$.skipType(U&7);break}}return V},W.decodeDelimited=function($){if(!($ instanceof V0))$=new V0($);return this.decode($,$.uint32())},W.verify=function($){if(typeof $!=="object"||$===null)return"object expected";if($.offset!=null&&$.hasOwnProperty("offset")){if(!h.isInteger($.offset))return"offset: integer expected"}if($.bucketCounts!=null&&$.hasOwnProperty("bucketCounts")){if(!Array.isArray($.bucketCounts))return"bucketCounts: array expected";for(var H=0;H<$.bucketCounts.length;++H)if(!h.isInteger($.bucketCounts[H])&&!($.bucketCounts[H]&&h.isInteger($.bucketCounts[H].low)&&h.isInteger($.bucketCounts[H].high)))return"bucketCounts: integer|Long[] expected"}return null},W.fromObject=function($){if($ instanceof f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return $;var H=new f.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if($.offset!=null)H.offset=$.offset|0;if($.bucketCounts){if(!Array.isArray($.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");H.bucketCounts=[];for(var F=0;F<$.bucketCounts.length;++F)if(h.Long)(H.bucketCounts[F]=h.Long.fromValue($.bucketCounts[F])).unsigned=!0;else if(typeof $.bucketCounts[F]==="string")H.bucketCounts[F]=parseInt($.bucketCounts[F],10);else if(typeof $.bucketCounts[F]==="number")H.bucketCounts[F]=$.bucketCounts[F];else if(typeof $.bucketCounts[F]==="object")H.bucketCounts[F]=new h.LongBits($.bucketCounts[F].low>>>0,$.bucketCounts[F].high>>>0).toNumber(!0)}return H},W.toObject=function($,H){if(!H)H={};var F={};if(H.arrays||H.defaults)F.bucketCounts=[];if(H.defaults)F.offset=0;if($.offset!=null&&$.hasOwnProperty("offset"))F.offset=$.offset;if($.bucketCounts&&$.bucketCounts.length){F.bucketCounts=[];for(var q=0;q<$.bucketCounts.length;++q)if(typeof $.bucketCounts[q]==="number")F.bucketCounts[q]=H.longs===String?String($.bucketCounts[q]):$.bucketCounts[q];else F.bucketCounts[q]=H.longs===String?h.Long.prototype.toString.call($.bucketCounts[q]):H.longs===Number?new h.LongBits($.bucketCounts[q].low>>>0,$.bucketCounts[q].high>>>0).toNumber(!0):$.bucketCounts[q]}return F},W.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},W.getTypeUrl=function($){if($===void 0)$="type.googleapis.com";return $+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},W}(),G}(),J.SummaryDataPoint=function(){function G(Z){if(this.attributes=[],this.quantileValues=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.attributes=h.emptyArray,G.prototype.startTimeUnixNano=null,G.prototype.timeUnixNano=null,G.prototype.count=null,G.prototype.sum=null,G.prototype.quantileValues=h.emptyArray,G.prototype.flags=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.startTimeUnixNano!=null&&Object.hasOwnProperty.call(W,"startTimeUnixNano"))K.uint32(17).fixed64(W.startTimeUnixNano);if(W.timeUnixNano!=null&&Object.hasOwnProperty.call(W,"timeUnixNano"))K.uint32(25).fixed64(W.timeUnixNano);if(W.count!=null&&Object.hasOwnProperty.call(W,"count"))K.uint32(33).fixed64(W.count);if(W.sum!=null&&Object.hasOwnProperty.call(W,"sum"))K.uint32(41).double(W.sum);if(W.quantileValues!=null&&W.quantileValues.length)for(var $=0;$<W.quantileValues.length;++$)f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(W.quantileValues[$],K.uint32(50).fork()).ldelim();if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(58).fork()).ldelim();if(W.flags!=null&&Object.hasOwnProperty.call(W,"flags"))K.uint32(64).uint32(W.flags);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 7:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 2:{F.startTimeUnixNano=W.fixed64();break}case 3:{F.timeUnixNano=W.fixed64();break}case 4:{F.count=W.fixed64();break}case 5:{F.sum=W.double();break}case 6:{if(!(F.quantileValues&&F.quantileValues.length))F.quantileValues=[];F.quantileValues.push(f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(W,W.uint32()));break}case 8:{F.flags=W.uint32();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var K=0;K<W.attributes.length;++K){var $=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[K]);if($)return"attributes."+$}}if(W.startTimeUnixNano!=null&&W.hasOwnProperty("startTimeUnixNano")){if(!h.isInteger(W.startTimeUnixNano)&&!(W.startTimeUnixNano&&h.isInteger(W.startTimeUnixNano.low)&&h.isInteger(W.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected"}if(W.timeUnixNano!=null&&W.hasOwnProperty("timeUnixNano")){if(!h.isInteger(W.timeUnixNano)&&!(W.timeUnixNano&&h.isInteger(W.timeUnixNano.low)&&h.isInteger(W.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(W.count!=null&&W.hasOwnProperty("count")){if(!h.isInteger(W.count)&&!(W.count&&h.isInteger(W.count.low)&&h.isInteger(W.count.high)))return"count: integer|Long expected"}if(W.sum!=null&&W.hasOwnProperty("sum")){if(typeof W.sum!=="number")return"sum: number expected"}if(W.quantileValues!=null&&W.hasOwnProperty("quantileValues")){if(!Array.isArray(W.quantileValues))return"quantileValues: array expected";for(var K=0;K<W.quantileValues.length;++K){var $=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(W.quantileValues[K]);if($)return"quantileValues."+$}}if(W.flags!=null&&W.hasOwnProperty("flags")){if(!h.isInteger(W.flags))return"flags: integer expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint)return W;var K=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.startTimeUnixNano!=null){if(h.Long)(K.startTimeUnixNano=h.Long.fromValue(W.startTimeUnixNano)).unsigned=!1;else if(typeof W.startTimeUnixNano==="string")K.startTimeUnixNano=parseInt(W.startTimeUnixNano,10);else if(typeof W.startTimeUnixNano==="number")K.startTimeUnixNano=W.startTimeUnixNano;else if(typeof W.startTimeUnixNano==="object")K.startTimeUnixNano=new h.LongBits(W.startTimeUnixNano.low>>>0,W.startTimeUnixNano.high>>>0).toNumber()}if(W.timeUnixNano!=null){if(h.Long)(K.timeUnixNano=h.Long.fromValue(W.timeUnixNano)).unsigned=!1;else if(typeof W.timeUnixNano==="string")K.timeUnixNano=parseInt(W.timeUnixNano,10);else if(typeof W.timeUnixNano==="number")K.timeUnixNano=W.timeUnixNano;else if(typeof W.timeUnixNano==="object")K.timeUnixNano=new h.LongBits(W.timeUnixNano.low>>>0,W.timeUnixNano.high>>>0).toNumber()}if(W.count!=null){if(h.Long)(K.count=h.Long.fromValue(W.count)).unsigned=!1;else if(typeof W.count==="string")K.count=parseInt(W.count,10);else if(typeof W.count==="number")K.count=W.count;else if(typeof W.count==="object")K.count=new h.LongBits(W.count.low>>>0,W.count.high>>>0).toNumber()}if(W.sum!=null)K.sum=Number(W.sum);if(W.quantileValues){if(!Array.isArray(W.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");K.quantileValues=[];for(var $=0;$<W.quantileValues.length;++$){if(typeof W.quantileValues[$]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");K.quantileValues[$]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(W.quantileValues[$])}}if(W.flags!=null)K.flags=W.flags>>>0;return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.quantileValues=[],$.attributes=[];if(K.defaults){if(h.Long){var H=new h.Long(0,0,!1);$.startTimeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.startTimeUnixNano=K.longs===String?"0":0;if(h.Long){var H=new h.Long(0,0,!1);$.timeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.timeUnixNano=K.longs===String?"0":0;if(h.Long){var H=new h.Long(0,0,!1);$.count=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.count=K.longs===String?"0":0;$.sum=0,$.flags=0}if(W.startTimeUnixNano!=null&&W.hasOwnProperty("startTimeUnixNano"))if(typeof W.startTimeUnixNano==="number")$.startTimeUnixNano=K.longs===String?String(W.startTimeUnixNano):W.startTimeUnixNano;else $.startTimeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.startTimeUnixNano):K.longs===Number?new h.LongBits(W.startTimeUnixNano.low>>>0,W.startTimeUnixNano.high>>>0).toNumber():W.startTimeUnixNano;if(W.timeUnixNano!=null&&W.hasOwnProperty("timeUnixNano"))if(typeof W.timeUnixNano==="number")$.timeUnixNano=K.longs===String?String(W.timeUnixNano):W.timeUnixNano;else $.timeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.timeUnixNano):K.longs===Number?new h.LongBits(W.timeUnixNano.low>>>0,W.timeUnixNano.high>>>0).toNumber():W.timeUnixNano;if(W.count!=null&&W.hasOwnProperty("count"))if(typeof W.count==="number")$.count=K.longs===String?String(W.count):W.count;else $.count=K.longs===String?h.Long.prototype.toString.call(W.count):K.longs===Number?new h.LongBits(W.count.low>>>0,W.count.high>>>0).toNumber():W.count;if(W.sum!=null&&W.hasOwnProperty("sum"))$.sum=K.json&&!isFinite(W.sum)?String(W.sum):W.sum;if(W.quantileValues&&W.quantileValues.length){$.quantileValues=[];for(var F=0;F<W.quantileValues.length;++F)$.quantileValues[F]=f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(W.quantileValues[F],K)}if(W.attributes&&W.attributes.length){$.attributes=[];for(var F=0;F<W.attributes.length;++F)$.attributes[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[F],K)}if(W.flags!=null&&W.hasOwnProperty("flags"))$.flags=W.flags;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},G.ValueAtQuantile=function(){function Z(W){if(W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}return Z.prototype.quantile=null,Z.prototype.value=null,Z.create=function(K){return new Z(K)},Z.encode=function(K,$){if(!$)$=J6.create();if(K.quantile!=null&&Object.hasOwnProperty.call(K,"quantile"))$.uint32(9).double(K.quantile);if(K.value!=null&&Object.hasOwnProperty.call(K,"value"))$.uint32(17).double(K.value);return $},Z.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},Z.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 1:{q.quantile=K.double();break}case 2:{q.value=K.double();break}default:K.skipType(V&7);break}}return q},Z.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},Z.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";if(K.quantile!=null&&K.hasOwnProperty("quantile")){if(typeof K.quantile!=="number")return"quantile: number expected"}if(K.value!=null&&K.hasOwnProperty("value")){if(typeof K.value!=="number")return"value: number expected"}return null},Z.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return K;var $=new f.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;if(K.quantile!=null)$.quantile=Number(K.quantile);if(K.value!=null)$.value=Number(K.value);return $},Z.toObject=function(K,$){if(!$)$={};var H={};if($.defaults)H.quantile=0,H.value=0;if(K.quantile!=null&&K.hasOwnProperty("quantile"))H.quantile=$.json&&!isFinite(K.quantile)?String(K.quantile):K.quantile;if(K.value!=null&&K.hasOwnProperty("value"))H.value=$.json&&!isFinite(K.value)?String(K.value):K.value;return H},Z.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},Z.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},Z}(),G}(),J.Exemplar=function(){function G(W){if(this.filteredAttributes=[],W){for(var K=Object.keys(W),$=0;$<K.length;++$)if(W[K[$]]!=null)this[K[$]]=W[K[$]]}}G.prototype.filteredAttributes=h.emptyArray,G.prototype.timeUnixNano=null,G.prototype.asDouble=null,G.prototype.asInt=null,G.prototype.spanId=null,G.prototype.traceId=null;var Z;return Object.defineProperty(G.prototype,"value",{get:h.oneOfGetter(Z=["asDouble","asInt"]),set:h.oneOfSetter(Z)}),G.create=function(K){return new G(K)},G.encode=function(K,$){if(!$)$=J6.create();if(K.timeUnixNano!=null&&Object.hasOwnProperty.call(K,"timeUnixNano"))$.uint32(17).fixed64(K.timeUnixNano);if(K.asDouble!=null&&Object.hasOwnProperty.call(K,"asDouble"))$.uint32(25).double(K.asDouble);if(K.spanId!=null&&Object.hasOwnProperty.call(K,"spanId"))$.uint32(34).bytes(K.spanId);if(K.traceId!=null&&Object.hasOwnProperty.call(K,"traceId"))$.uint32(42).bytes(K.traceId);if(K.asInt!=null&&Object.hasOwnProperty.call(K,"asInt"))$.uint32(49).sfixed64(K.asInt);if(K.filteredAttributes!=null&&K.filteredAttributes.length)for(var H=0;H<K.filteredAttributes.length;++H)f.opentelemetry.proto.common.v1.KeyValue.encode(K.filteredAttributes[H],$.uint32(58).fork()).ldelim();return $},G.encodeDelimited=function(K,$){return this.encode(K,$).ldelim()},G.decode=function(K,$,H){if(!(K instanceof V0))K=V0.create(K);var F=$===void 0?K.len:K.pos+$,q=new f.opentelemetry.proto.metrics.v1.Exemplar;while(K.pos<F){var V=K.uint32();if(V===H)break;switch(V>>>3){case 7:{if(!(q.filteredAttributes&&q.filteredAttributes.length))q.filteredAttributes=[];q.filteredAttributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(K,K.uint32()));break}case 2:{q.timeUnixNano=K.fixed64();break}case 3:{q.asDouble=K.double();break}case 6:{q.asInt=K.sfixed64();break}case 4:{q.spanId=K.bytes();break}case 5:{q.traceId=K.bytes();break}default:K.skipType(V&7);break}}return q},G.decodeDelimited=function(K){if(!(K instanceof V0))K=new V0(K);return this.decode(K,K.uint32())},G.verify=function(K){if(typeof K!=="object"||K===null)return"object expected";var $={};if(K.filteredAttributes!=null&&K.hasOwnProperty("filteredAttributes")){if(!Array.isArray(K.filteredAttributes))return"filteredAttributes: array expected";for(var H=0;H<K.filteredAttributes.length;++H){var F=f.opentelemetry.proto.common.v1.KeyValue.verify(K.filteredAttributes[H]);if(F)return"filteredAttributes."+F}}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano")){if(!h.isInteger(K.timeUnixNano)&&!(K.timeUnixNano&&h.isInteger(K.timeUnixNano.low)&&h.isInteger(K.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(K.asDouble!=null&&K.hasOwnProperty("asDouble")){if($.value=1,typeof K.asDouble!=="number")return"asDouble: number expected"}if(K.asInt!=null&&K.hasOwnProperty("asInt")){if($.value===1)return"value: multiple values";if($.value=1,!h.isInteger(K.asInt)&&!(K.asInt&&h.isInteger(K.asInt.low)&&h.isInteger(K.asInt.high)))return"asInt: integer|Long expected"}if(K.spanId!=null&&K.hasOwnProperty("spanId")){if(!(K.spanId&&typeof K.spanId.length==="number"||h.isString(K.spanId)))return"spanId: buffer expected"}if(K.traceId!=null&&K.hasOwnProperty("traceId")){if(!(K.traceId&&typeof K.traceId.length==="number"||h.isString(K.traceId)))return"traceId: buffer expected"}return null},G.fromObject=function(K){if(K instanceof f.opentelemetry.proto.metrics.v1.Exemplar)return K;var $=new f.opentelemetry.proto.metrics.v1.Exemplar;if(K.filteredAttributes){if(!Array.isArray(K.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");$.filteredAttributes=[];for(var H=0;H<K.filteredAttributes.length;++H){if(typeof K.filteredAttributes[H]!=="object")throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");$.filteredAttributes[H]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(K.filteredAttributes[H])}}if(K.timeUnixNano!=null){if(h.Long)($.timeUnixNano=h.Long.fromValue(K.timeUnixNano)).unsigned=!1;else if(typeof K.timeUnixNano==="string")$.timeUnixNano=parseInt(K.timeUnixNano,10);else if(typeof K.timeUnixNano==="number")$.timeUnixNano=K.timeUnixNano;else if(typeof K.timeUnixNano==="object")$.timeUnixNano=new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber()}if(K.asDouble!=null)$.asDouble=Number(K.asDouble);if(K.asInt!=null){if(h.Long)($.asInt=h.Long.fromValue(K.asInt)).unsigned=!1;else if(typeof K.asInt==="string")$.asInt=parseInt(K.asInt,10);else if(typeof K.asInt==="number")$.asInt=K.asInt;else if(typeof K.asInt==="object")$.asInt=new h.LongBits(K.asInt.low>>>0,K.asInt.high>>>0).toNumber()}if(K.spanId!=null){if(typeof K.spanId==="string")h.base64.decode(K.spanId,$.spanId=h.newBuffer(h.base64.length(K.spanId)),0);else if(K.spanId.length>=0)$.spanId=K.spanId}if(K.traceId!=null){if(typeof K.traceId==="string")h.base64.decode(K.traceId,$.traceId=h.newBuffer(h.base64.length(K.traceId)),0);else if(K.traceId.length>=0)$.traceId=K.traceId}return $},G.toObject=function(K,$){if(!$)$={};var H={};if($.arrays||$.defaults)H.filteredAttributes=[];if($.defaults){if(h.Long){var F=new h.Long(0,0,!1);H.timeUnixNano=$.longs===String?F.toString():$.longs===Number?F.toNumber():F}else H.timeUnixNano=$.longs===String?"0":0;if($.bytes===String)H.spanId="";else if(H.spanId=[],$.bytes!==Array)H.spanId=h.newBuffer(H.spanId);if($.bytes===String)H.traceId="";else if(H.traceId=[],$.bytes!==Array)H.traceId=h.newBuffer(H.traceId)}if(K.timeUnixNano!=null&&K.hasOwnProperty("timeUnixNano"))if(typeof K.timeUnixNano==="number")H.timeUnixNano=$.longs===String?String(K.timeUnixNano):K.timeUnixNano;else H.timeUnixNano=$.longs===String?h.Long.prototype.toString.call(K.timeUnixNano):$.longs===Number?new h.LongBits(K.timeUnixNano.low>>>0,K.timeUnixNano.high>>>0).toNumber():K.timeUnixNano;if(K.asDouble!=null&&K.hasOwnProperty("asDouble")){if(H.asDouble=$.json&&!isFinite(K.asDouble)?String(K.asDouble):K.asDouble,$.oneofs)H.value="asDouble"}if(K.spanId!=null&&K.hasOwnProperty("spanId"))H.spanId=$.bytes===String?h.base64.encode(K.spanId,0,K.spanId.length):$.bytes===Array?Array.prototype.slice.call(K.spanId):K.spanId;if(K.traceId!=null&&K.hasOwnProperty("traceId"))H.traceId=$.bytes===String?h.base64.encode(K.traceId,0,K.traceId.length):$.bytes===Array?Array.prototype.slice.call(K.traceId):K.traceId;if(K.asInt!=null&&K.hasOwnProperty("asInt")){if(typeof K.asInt==="number")H.asInt=$.longs===String?String(K.asInt):K.asInt;else H.asInt=$.longs===String?h.Long.prototype.toString.call(K.asInt):$.longs===Number?new h.LongBits(K.asInt.low>>>0,K.asInt.high>>>0).toNumber():K.asInt;if($.oneofs)H.value="asInt"}if(K.filteredAttributes&&K.filteredAttributes.length){H.filteredAttributes=[];for(var q=0;q<K.filteredAttributes.length;++q)H.filteredAttributes[q]=f.opentelemetry.proto.common.v1.KeyValue.toObject(K.filteredAttributes[q],$)}return H},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(K){if(K===void 0)K="type.googleapis.com";return K+"/opentelemetry.proto.metrics.v1.Exemplar"},G}(),J}(),Y}(),X.logs=function(){var Y={};return Y.v1=function(){var J={};return J.LogsData=function(){function G(Z){if(this.resourceLogs=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resourceLogs=h.emptyArray,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resourceLogs!=null&&W.resourceLogs.length)for(var $=0;$<W.resourceLogs.length;++$)f.opentelemetry.proto.logs.v1.ResourceLogs.encode(W.resourceLogs[$],K.uint32(10).fork()).ldelim();return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.logs.v1.LogsData;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{if(!(F.resourceLogs&&F.resourceLogs.length))F.resourceLogs=[];F.resourceLogs.push(f.opentelemetry.proto.logs.v1.ResourceLogs.decode(W,W.uint32()));break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resourceLogs!=null&&W.hasOwnProperty("resourceLogs")){if(!Array.isArray(W.resourceLogs))return"resourceLogs: array expected";for(var K=0;K<W.resourceLogs.length;++K){var $=f.opentelemetry.proto.logs.v1.ResourceLogs.verify(W.resourceLogs[K]);if($)return"resourceLogs."+$}}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.logs.v1.LogsData)return W;var K=new f.opentelemetry.proto.logs.v1.LogsData;if(W.resourceLogs){if(!Array.isArray(W.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");K.resourceLogs=[];for(var $=0;$<W.resourceLogs.length;++$){if(typeof W.resourceLogs[$]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");K.resourceLogs[$]=f.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(W.resourceLogs[$])}}return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.resourceLogs=[];if(W.resourceLogs&&W.resourceLogs.length){$.resourceLogs=[];for(var H=0;H<W.resourceLogs.length;++H)$.resourceLogs[H]=f.opentelemetry.proto.logs.v1.ResourceLogs.toObject(W.resourceLogs[H],K)}return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.logs.v1.LogsData"},G}(),J.ResourceLogs=function(){function G(Z){if(this.scopeLogs=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.resource=null,G.prototype.scopeLogs=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.resource!=null&&Object.hasOwnProperty.call(W,"resource"))f.opentelemetry.proto.resource.v1.Resource.encode(W.resource,K.uint32(10).fork()).ldelim();if(W.scopeLogs!=null&&W.scopeLogs.length)for(var $=0;$<W.scopeLogs.length;++$)f.opentelemetry.proto.logs.v1.ScopeLogs.encode(W.scopeLogs[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.logs.v1.ResourceLogs;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.resource=f.opentelemetry.proto.resource.v1.Resource.decode(W,W.uint32());break}case 2:{if(!(F.scopeLogs&&F.scopeLogs.length))F.scopeLogs=[];F.scopeLogs.push(f.opentelemetry.proto.logs.v1.ScopeLogs.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.resource!=null&&W.hasOwnProperty("resource")){var K=f.opentelemetry.proto.resource.v1.Resource.verify(W.resource);if(K)return"resource."+K}if(W.scopeLogs!=null&&W.hasOwnProperty("scopeLogs")){if(!Array.isArray(W.scopeLogs))return"scopeLogs: array expected";for(var $=0;$<W.scopeLogs.length;++$){var K=f.opentelemetry.proto.logs.v1.ScopeLogs.verify(W.scopeLogs[$]);if(K)return"scopeLogs."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.logs.v1.ResourceLogs)return W;var K=new f.opentelemetry.proto.logs.v1.ResourceLogs;if(W.resource!=null){if(typeof W.resource!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");K.resource=f.opentelemetry.proto.resource.v1.Resource.fromObject(W.resource)}if(W.scopeLogs){if(!Array.isArray(W.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");K.scopeLogs=[];for(var $=0;$<W.scopeLogs.length;++$){if(typeof W.scopeLogs[$]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");K.scopeLogs[$]=f.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(W.scopeLogs[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.scopeLogs=[];if(K.defaults)$.resource=null,$.schemaUrl="";if(W.resource!=null&&W.hasOwnProperty("resource"))$.resource=f.opentelemetry.proto.resource.v1.Resource.toObject(W.resource,K);if(W.scopeLogs&&W.scopeLogs.length){$.scopeLogs=[];for(var H=0;H<W.scopeLogs.length;++H)$.scopeLogs[H]=f.opentelemetry.proto.logs.v1.ScopeLogs.toObject(W.scopeLogs[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.logs.v1.ResourceLogs"},G}(),J.ScopeLogs=function(){function G(Z){if(this.logRecords=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.scope=null,G.prototype.logRecords=h.emptyArray,G.prototype.schemaUrl=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.scope!=null&&Object.hasOwnProperty.call(W,"scope"))f.opentelemetry.proto.common.v1.InstrumentationScope.encode(W.scope,K.uint32(10).fork()).ldelim();if(W.logRecords!=null&&W.logRecords.length)for(var $=0;$<W.logRecords.length;++$)f.opentelemetry.proto.logs.v1.LogRecord.encode(W.logRecords[$],K.uint32(18).fork()).ldelim();if(W.schemaUrl!=null&&Object.hasOwnProperty.call(W,"schemaUrl"))K.uint32(26).string(W.schemaUrl);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.logs.v1.ScopeLogs;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.decode(W,W.uint32());break}case 2:{if(!(F.logRecords&&F.logRecords.length))F.logRecords=[];F.logRecords.push(f.opentelemetry.proto.logs.v1.LogRecord.decode(W,W.uint32()));break}case 3:{F.schemaUrl=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.scope!=null&&W.hasOwnProperty("scope")){var K=f.opentelemetry.proto.common.v1.InstrumentationScope.verify(W.scope);if(K)return"scope."+K}if(W.logRecords!=null&&W.hasOwnProperty("logRecords")){if(!Array.isArray(W.logRecords))return"logRecords: array expected";for(var $=0;$<W.logRecords.length;++$){var K=f.opentelemetry.proto.logs.v1.LogRecord.verify(W.logRecords[$]);if(K)return"logRecords."+K}}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl")){if(!h.isString(W.schemaUrl))return"schemaUrl: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.logs.v1.ScopeLogs)return W;var K=new f.opentelemetry.proto.logs.v1.ScopeLogs;if(W.scope!=null){if(typeof W.scope!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");K.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(W.scope)}if(W.logRecords){if(!Array.isArray(W.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");K.logRecords=[];for(var $=0;$<W.logRecords.length;++$){if(typeof W.logRecords[$]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");K.logRecords[$]=f.opentelemetry.proto.logs.v1.LogRecord.fromObject(W.logRecords[$])}}if(W.schemaUrl!=null)K.schemaUrl=String(W.schemaUrl);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.logRecords=[];if(K.defaults)$.scope=null,$.schemaUrl="";if(W.scope!=null&&W.hasOwnProperty("scope"))$.scope=f.opentelemetry.proto.common.v1.InstrumentationScope.toObject(W.scope,K);if(W.logRecords&&W.logRecords.length){$.logRecords=[];for(var H=0;H<W.logRecords.length;++H)$.logRecords[H]=f.opentelemetry.proto.logs.v1.LogRecord.toObject(W.logRecords[H],K)}if(W.schemaUrl!=null&&W.hasOwnProperty("schemaUrl"))$.schemaUrl=W.schemaUrl;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.logs.v1.ScopeLogs"},G}(),J.SeverityNumber=function(){var G={},Z=Object.create(G);return Z[G[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,Z[G[1]="SEVERITY_NUMBER_TRACE"]=1,Z[G[2]="SEVERITY_NUMBER_TRACE2"]=2,Z[G[3]="SEVERITY_NUMBER_TRACE3"]=3,Z[G[4]="SEVERITY_NUMBER_TRACE4"]=4,Z[G[5]="SEVERITY_NUMBER_DEBUG"]=5,Z[G[6]="SEVERITY_NUMBER_DEBUG2"]=6,Z[G[7]="SEVERITY_NUMBER_DEBUG3"]=7,Z[G[8]="SEVERITY_NUMBER_DEBUG4"]=8,Z[G[9]="SEVERITY_NUMBER_INFO"]=9,Z[G[10]="SEVERITY_NUMBER_INFO2"]=10,Z[G[11]="SEVERITY_NUMBER_INFO3"]=11,Z[G[12]="SEVERITY_NUMBER_INFO4"]=12,Z[G[13]="SEVERITY_NUMBER_WARN"]=13,Z[G[14]="SEVERITY_NUMBER_WARN2"]=14,Z[G[15]="SEVERITY_NUMBER_WARN3"]=15,Z[G[16]="SEVERITY_NUMBER_WARN4"]=16,Z[G[17]="SEVERITY_NUMBER_ERROR"]=17,Z[G[18]="SEVERITY_NUMBER_ERROR2"]=18,Z[G[19]="SEVERITY_NUMBER_ERROR3"]=19,Z[G[20]="SEVERITY_NUMBER_ERROR4"]=20,Z[G[21]="SEVERITY_NUMBER_FATAL"]=21,Z[G[22]="SEVERITY_NUMBER_FATAL2"]=22,Z[G[23]="SEVERITY_NUMBER_FATAL3"]=23,Z[G[24]="SEVERITY_NUMBER_FATAL4"]=24,Z}(),J.LogRecordFlags=function(){var G={},Z=Object.create(G);return Z[G[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,Z[G[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,Z}(),J.LogRecord=function(){function G(Z){if(this.attributes=[],Z){for(var W=Object.keys(Z),K=0;K<W.length;++K)if(Z[W[K]]!=null)this[W[K]]=Z[W[K]]}}return G.prototype.timeUnixNano=null,G.prototype.observedTimeUnixNano=null,G.prototype.severityNumber=null,G.prototype.severityText=null,G.prototype.body=null,G.prototype.attributes=h.emptyArray,G.prototype.droppedAttributesCount=null,G.prototype.flags=null,G.prototype.traceId=null,G.prototype.spanId=null,G.prototype.eventName=null,G.create=function(W){return new G(W)},G.encode=function(W,K){if(!K)K=J6.create();if(W.timeUnixNano!=null&&Object.hasOwnProperty.call(W,"timeUnixNano"))K.uint32(9).fixed64(W.timeUnixNano);if(W.severityNumber!=null&&Object.hasOwnProperty.call(W,"severityNumber"))K.uint32(16).int32(W.severityNumber);if(W.severityText!=null&&Object.hasOwnProperty.call(W,"severityText"))K.uint32(26).string(W.severityText);if(W.body!=null&&Object.hasOwnProperty.call(W,"body"))f.opentelemetry.proto.common.v1.AnyValue.encode(W.body,K.uint32(42).fork()).ldelim();if(W.attributes!=null&&W.attributes.length)for(var $=0;$<W.attributes.length;++$)f.opentelemetry.proto.common.v1.KeyValue.encode(W.attributes[$],K.uint32(50).fork()).ldelim();if(W.droppedAttributesCount!=null&&Object.hasOwnProperty.call(W,"droppedAttributesCount"))K.uint32(56).uint32(W.droppedAttributesCount);if(W.flags!=null&&Object.hasOwnProperty.call(W,"flags"))K.uint32(69).fixed32(W.flags);if(W.traceId!=null&&Object.hasOwnProperty.call(W,"traceId"))K.uint32(74).bytes(W.traceId);if(W.spanId!=null&&Object.hasOwnProperty.call(W,"spanId"))K.uint32(82).bytes(W.spanId);if(W.observedTimeUnixNano!=null&&Object.hasOwnProperty.call(W,"observedTimeUnixNano"))K.uint32(89).fixed64(W.observedTimeUnixNano);if(W.eventName!=null&&Object.hasOwnProperty.call(W,"eventName"))K.uint32(98).string(W.eventName);return K},G.encodeDelimited=function(W,K){return this.encode(W,K).ldelim()},G.decode=function(W,K,$){if(!(W instanceof V0))W=V0.create(W);var H=K===void 0?W.len:W.pos+K,F=new f.opentelemetry.proto.logs.v1.LogRecord;while(W.pos<H){var q=W.uint32();if(q===$)break;switch(q>>>3){case 1:{F.timeUnixNano=W.fixed64();break}case 11:{F.observedTimeUnixNano=W.fixed64();break}case 2:{F.severityNumber=W.int32();break}case 3:{F.severityText=W.string();break}case 5:{F.body=f.opentelemetry.proto.common.v1.AnyValue.decode(W,W.uint32());break}case 6:{if(!(F.attributes&&F.attributes.length))F.attributes=[];F.attributes.push(f.opentelemetry.proto.common.v1.KeyValue.decode(W,W.uint32()));break}case 7:{F.droppedAttributesCount=W.uint32();break}case 8:{F.flags=W.fixed32();break}case 9:{F.traceId=W.bytes();break}case 10:{F.spanId=W.bytes();break}case 12:{F.eventName=W.string();break}default:W.skipType(q&7);break}}return F},G.decodeDelimited=function(W){if(!(W instanceof V0))W=new V0(W);return this.decode(W,W.uint32())},G.verify=function(W){if(typeof W!=="object"||W===null)return"object expected";if(W.timeUnixNano!=null&&W.hasOwnProperty("timeUnixNano")){if(!h.isInteger(W.timeUnixNano)&&!(W.timeUnixNano&&h.isInteger(W.timeUnixNano.low)&&h.isInteger(W.timeUnixNano.high)))return"timeUnixNano: integer|Long expected"}if(W.observedTimeUnixNano!=null&&W.hasOwnProperty("observedTimeUnixNano")){if(!h.isInteger(W.observedTimeUnixNano)&&!(W.observedTimeUnixNano&&h.isInteger(W.observedTimeUnixNano.low)&&h.isInteger(W.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected"}if(W.severityNumber!=null&&W.hasOwnProperty("severityNumber"))switch(W.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:break}if(W.severityText!=null&&W.hasOwnProperty("severityText")){if(!h.isString(W.severityText))return"severityText: string expected"}if(W.body!=null&&W.hasOwnProperty("body")){var K=f.opentelemetry.proto.common.v1.AnyValue.verify(W.body);if(K)return"body."+K}if(W.attributes!=null&&W.hasOwnProperty("attributes")){if(!Array.isArray(W.attributes))return"attributes: array expected";for(var $=0;$<W.attributes.length;++$){var K=f.opentelemetry.proto.common.v1.KeyValue.verify(W.attributes[$]);if(K)return"attributes."+K}}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount")){if(!h.isInteger(W.droppedAttributesCount))return"droppedAttributesCount: integer expected"}if(W.flags!=null&&W.hasOwnProperty("flags")){if(!h.isInteger(W.flags))return"flags: integer expected"}if(W.traceId!=null&&W.hasOwnProperty("traceId")){if(!(W.traceId&&typeof W.traceId.length==="number"||h.isString(W.traceId)))return"traceId: buffer expected"}if(W.spanId!=null&&W.hasOwnProperty("spanId")){if(!(W.spanId&&typeof W.spanId.length==="number"||h.isString(W.spanId)))return"spanId: buffer expected"}if(W.eventName!=null&&W.hasOwnProperty("eventName")){if(!h.isString(W.eventName))return"eventName: string expected"}return null},G.fromObject=function(W){if(W instanceof f.opentelemetry.proto.logs.v1.LogRecord)return W;var K=new f.opentelemetry.proto.logs.v1.LogRecord;if(W.timeUnixNano!=null){if(h.Long)(K.timeUnixNano=h.Long.fromValue(W.timeUnixNano)).unsigned=!1;else if(typeof W.timeUnixNano==="string")K.timeUnixNano=parseInt(W.timeUnixNano,10);else if(typeof W.timeUnixNano==="number")K.timeUnixNano=W.timeUnixNano;else if(typeof W.timeUnixNano==="object")K.timeUnixNano=new h.LongBits(W.timeUnixNano.low>>>0,W.timeUnixNano.high>>>0).toNumber()}if(W.observedTimeUnixNano!=null){if(h.Long)(K.observedTimeUnixNano=h.Long.fromValue(W.observedTimeUnixNano)).unsigned=!1;else if(typeof W.observedTimeUnixNano==="string")K.observedTimeUnixNano=parseInt(W.observedTimeUnixNano,10);else if(typeof W.observedTimeUnixNano==="number")K.observedTimeUnixNano=W.observedTimeUnixNano;else if(typeof W.observedTimeUnixNano==="object")K.observedTimeUnixNano=new h.LongBits(W.observedTimeUnixNano.low>>>0,W.observedTimeUnixNano.high>>>0).toNumber()}switch(W.severityNumber){default:if(typeof W.severityNumber==="number"){K.severityNumber=W.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:K.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:K.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:K.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:K.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:K.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:K.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:K.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:K.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:K.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:K.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:K.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:K.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:K.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:K.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:K.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:K.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:K.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:K.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:K.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:K.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:K.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:K.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:K.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:K.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:K.severityNumber=24;break}if(W.severityText!=null)K.severityText=String(W.severityText);if(W.body!=null){if(typeof W.body!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");K.body=f.opentelemetry.proto.common.v1.AnyValue.fromObject(W.body)}if(W.attributes){if(!Array.isArray(W.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");K.attributes=[];for(var $=0;$<W.attributes.length;++$){if(typeof W.attributes[$]!=="object")throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");K.attributes[$]=f.opentelemetry.proto.common.v1.KeyValue.fromObject(W.attributes[$])}}if(W.droppedAttributesCount!=null)K.droppedAttributesCount=W.droppedAttributesCount>>>0;if(W.flags!=null)K.flags=W.flags>>>0;if(W.traceId!=null){if(typeof W.traceId==="string")h.base64.decode(W.traceId,K.traceId=h.newBuffer(h.base64.length(W.traceId)),0);else if(W.traceId.length>=0)K.traceId=W.traceId}if(W.spanId!=null){if(typeof W.spanId==="string")h.base64.decode(W.spanId,K.spanId=h.newBuffer(h.base64.length(W.spanId)),0);else if(W.spanId.length>=0)K.spanId=W.spanId}if(W.eventName!=null)K.eventName=String(W.eventName);return K},G.toObject=function(W,K){if(!K)K={};var $={};if(K.arrays||K.defaults)$.attributes=[];if(K.defaults){if(h.Long){var H=new h.Long(0,0,!1);$.timeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.timeUnixNano=K.longs===String?"0":0;if($.severityNumber=K.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,$.severityText="",$.body=null,$.droppedAttributesCount=0,$.flags=0,K.bytes===String)$.traceId="";else if($.traceId=[],K.bytes!==Array)$.traceId=h.newBuffer($.traceId);if(K.bytes===String)$.spanId="";else if($.spanId=[],K.bytes!==Array)$.spanId=h.newBuffer($.spanId);if(h.Long){var H=new h.Long(0,0,!1);$.observedTimeUnixNano=K.longs===String?H.toString():K.longs===Number?H.toNumber():H}else $.observedTimeUnixNano=K.longs===String?"0":0;$.eventName=""}if(W.timeUnixNano!=null&&W.hasOwnProperty("timeUnixNano"))if(typeof W.timeUnixNano==="number")$.timeUnixNano=K.longs===String?String(W.timeUnixNano):W.timeUnixNano;else $.timeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.timeUnixNano):K.longs===Number?new h.LongBits(W.timeUnixNano.low>>>0,W.timeUnixNano.high>>>0).toNumber():W.timeUnixNano;if(W.severityNumber!=null&&W.hasOwnProperty("severityNumber"))$.severityNumber=K.enums===String?f.opentelemetry.proto.logs.v1.SeverityNumber[W.severityNumber]===void 0?W.severityNumber:f.opentelemetry.proto.logs.v1.SeverityNumber[W.severityNumber]:W.severityNumber;if(W.severityText!=null&&W.hasOwnProperty("severityText"))$.severityText=W.severityText;if(W.body!=null&&W.hasOwnProperty("body"))$.body=f.opentelemetry.proto.common.v1.AnyValue.toObject(W.body,K);if(W.attributes&&W.attributes.length){$.attributes=[];for(var F=0;F<W.attributes.length;++F)$.attributes[F]=f.opentelemetry.proto.common.v1.KeyValue.toObject(W.attributes[F],K)}if(W.droppedAttributesCount!=null&&W.hasOwnProperty("droppedAttributesCount"))$.droppedAttributesCount=W.droppedAttributesCount;if(W.flags!=null&&W.hasOwnProperty("flags"))$.flags=W.flags;if(W.traceId!=null&&W.hasOwnProperty("traceId"))$.traceId=K.bytes===String?h.base64.encode(W.traceId,0,W.traceId.length):K.bytes===Array?Array.prototype.slice.call(W.traceId):W.traceId;if(W.spanId!=null&&W.hasOwnProperty("spanId"))$.spanId=K.bytes===String?h.base64.encode(W.spanId,0,W.spanId.length):K.bytes===Array?Array.prototype.slice.call(W.spanId):W.spanId;if(W.observedTimeUnixNano!=null&&W.hasOwnProperty("observedTimeUnixNano"))if(typeof W.observedTimeUnixNano==="number")$.observedTimeUnixNano=K.longs===String?String(W.observedTimeUnixNano):W.observedTimeUnixNano;else $.observedTimeUnixNano=K.longs===String?h.Long.prototype.toString.call(W.observedTimeUnixNano):K.longs===Number?new h.LongBits(W.observedTimeUnixNano.low>>>0,W.observedTimeUnixNano.high>>>0).toNumber():W.observedTimeUnixNano;if(W.eventName!=null&&W.hasOwnProperty("eventName"))$.eventName=W.eventName;return $},G.prototype.toJSON=function(){return this.constructor.toObject(this,_4.util.toJSONOptions)},G.getTypeUrl=function(W){if(W===void 0)W="type.googleapis.com";return W+"/opentelemetry.proto.logs.v1.LogRecord"},G}(),J}(),Y}(),X}(),Q}();fy0.exports=f});var uy0=I((xy0)=>{Object.defineProperty(xy0,"__esModule",{value:!0});xy0.hexToBinary=void 0;function hy0(Q){if(Q>=48&&Q<=57)return Q-48;if(Q>=97&&Q<=102)return Q-87;return Q-55}function Ls4(Q){let X=new Uint8Array(Q.length/2),Y=0;for(let J=0;J<Q.length;J+=2){let G=hy0(Q.charCodeAt(J)),Z=hy0(Q.charCodeAt(J+1));X[Y++]=G<<4|Z}return X}xy0.hexToBinary=Ls4});var K2=I((cy0)=>{Object.defineProperty(cy0,"__esModule",{value:!0});cy0.getOtlpEncoder=cy0.encodeAsString=cy0.encodeAsLongBits=cy0.toLongBits=cy0.hrTimeToNanos=void 0;var ws4=l4(),en=uy0();function Qi(Q){let X=BigInt(1e9);return BigInt(Math.trunc(Q[0]))*X+BigInt(Math.trunc(Q[1]))}cy0.hrTimeToNanos=Qi;function ly0(Q){let X=Number(BigInt.asUintN(32,Q)),Y=Number(BigInt.asUintN(32,Q>>BigInt(32)));return{low:X,high:Y}}cy0.toLongBits=ly0;function Xi(Q){let X=Qi(Q);return ly0(X)}cy0.encodeAsLongBits=Xi;function dy0(Q){return Qi(Q).toString()}cy0.encodeAsString=dy0;var Ms4=typeof BigInt<"u"?dy0:ws4.hrTimeToNanoseconds;function my0(Q){return Q}function py0(Q){if(Q===void 0)return;return(0,en.hexToBinary)(Q)}var Ps4={encodeHrTime:Xi,encodeSpanContext:en.hexToBinary,encodeOptionalSpanContext:py0};function Ts4(Q){if(Q===void 0)return Ps4;let X=Q.useLongBits??!0,Y=Q.useHex??!1;return{encodeHrTime:X?Xi:Ms4,encodeSpanContext:Y?my0:en.hexToBinary,encodeOptionalSpanContext:Y?my0:py0}}cy0.getOtlpEncoder=Ts4});var $2=I((ay0)=>{Object.defineProperty(ay0,"__esModule",{value:!0});ay0.toAnyValue=ay0.toKeyValue=ay0.toAttributes=ay0.createInstrumentationScope=ay0.createResource=void 0;function Cs4(Q){let X={attributes:iy0(Q.attributes),droppedAttributesCount:0},Y=Q.schemaUrl;if(Y&&Y!=="")X.schemaUrl=Y;return X}ay0.createResource=Cs4;function Rs4(Q){return{name:Q.name,version:Q.version}}ay0.createInstrumentationScope=Rs4;function iy0(Q){return Object.keys(Q).map((X)=>Yi(X,Q[X]))}ay0.toAttributes=iy0;function Yi(Q,X){return{key:Q,value:Ji(X)}}ay0.toKeyValue=Yi;function Ji(Q){let X=typeof Q;if(X==="string")return{stringValue:Q};if(X==="number"){if(!Number.isInteger(Q))return{doubleValue:Q};return{intValue:Q}}if(X==="boolean")return{boolValue:Q};if(Q instanceof Uint8Array)return{bytesValue:Q};if(Array.isArray(Q))return{arrayValue:{values:Q.map(Ji)}};if(X==="object"&&Q!=null)return{kvlistValue:{values:Object.entries(Q).map(([Y,J])=>Yi(Y,J))}};return{}}ay0.toAnyValue=Ji});var Gi=I((sy0)=>{Object.defineProperty(sy0,"__esModule",{value:!0});sy0.toLogAttributes=sy0.createExportLogsServiceRequest=void 0;var ys4=K2(),H2=$2();function bs4(Q,X){let Y=(0,ys4.getOtlpEncoder)(X);return{resourceLogs:hs4(Q,Y)}}sy0.createExportLogsServiceRequest=bs4;function fs4(Q){let X=new Map;for(let Y of Q){let{resource:J,instrumentationScope:{name:G,version:Z="",schemaUrl:W=""}}=Y,K=X.get(J);if(!K)K=new Map,X.set(J,K);let $=`${G}@${Z}:${W}`,H=K.get($);if(!H)H=[],K.set($,H);H.push(Y)}return X}function hs4(Q,X){let Y=fs4(Q);return Array.from(Y,([J,G])=>{let Z=(0,H2.createResource)(J);return{resource:Z,scopeLogs:Array.from(G,([,W])=>{return{scope:(0,H2.createInstrumentationScope)(W[0].instrumentationScope),logRecords:W.map((K)=>xs4(K,X)),schemaUrl:W[0].instrumentationScope.schemaUrl}}),schemaUrl:Z.schemaUrl}})}function xs4(Q,X){return{timeUnixNano:X.encodeHrTime(Q.hrTime),observedTimeUnixNano:X.encodeHrTime(Q.hrTimeObserved),severityNumber:gs4(Q.severityNumber),severityText:Q.severityText,body:(0,H2.toAnyValue)(Q.body),eventName:Q.eventName,attributes:oy0(Q.attributes),droppedAttributesCount:Q.droppedAttributesCount,flags:Q.spanContext?.traceFlags,traceId:X.encodeOptionalSpanContext(Q.spanContext?.traceId),spanId:X.encodeOptionalSpanContext(Q.spanContext?.spanId)}}function gs4(Q){return Q}function oy0(Q){return Object.keys(Q).map((X)=>(0,H2.toKeyValue)(X,Q[X]))}sy0.toLogAttributes=oy0});var Yb0=I((Qb0)=>{Object.defineProperty(Qb0,"__esModule",{value:!0});Qb0.ProtobufLogsSerializer=void 0;var ey0=Z2(),ms4=Gi(),ls4=ey0.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,ds4=ey0.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;Qb0.ProtobufLogsSerializer={serializeRequest:(Q)=>{let X=(0,ms4.createExportLogsServiceRequest)(Q);return ds4.encode(X).finish()},deserializeResponse:(Q)=>{return ls4.decode(Q)}}});var Jb0=I((Wi)=>{Object.defineProperty(Wi,"__esModule",{value:!0});Wi.ProtobufLogsSerializer=void 0;var ps4=Yb0();Object.defineProperty(Wi,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return ps4.ProtobufLogsSerializer}})});var Wb0=I((Gb0)=>{Object.defineProperty(Gb0,"__esModule",{value:!0});Gb0.EAggregationTemporality=void 0;var ns4;(function(Q){Q[Q.AGGREGATION_TEMPORALITY_UNSPECIFIED=0]="AGGREGATION_TEMPORALITY_UNSPECIFIED",Q[Q.AGGREGATION_TEMPORALITY_DELTA=1]="AGGREGATION_TEMPORALITY_DELTA",Q[Q.AGGREGATION_TEMPORALITY_CUMULATIVE=2]="AGGREGATION_TEMPORALITY_CUMULATIVE"})(ns4=Gb0.EAggregationTemporality||(Gb0.EAggregationTemporality={}))});var Ki=I((Vb0)=>{Object.defineProperty(Vb0,"__esModule",{value:!0});Vb0.createExportMetricsServiceRequest=Vb0.toMetric=Vb0.toScopeMetrics=Vb0.toResourceMetrics=void 0;var Zb0=G4(),Rq=D7(),Kb0=Wb0(),is4=K2(),mN=$2();function Hb0(Q,X){let Y=(0,is4.getOtlpEncoder)(X),J=(0,mN.createResource)(Q.resource);return{resource:J,schemaUrl:J.schemaUrl,scopeMetrics:Fb0(Q.scopeMetrics,Y)}}Vb0.toResourceMetrics=Hb0;function Fb0(Q,X){return Array.from(Q.map((Y)=>({scope:(0,mN.createInstrumentationScope)(Y.scope),metrics:Y.metrics.map((J)=>qb0(J,X)),schemaUrl:Y.scope.schemaUrl})))}Vb0.toScopeMetrics=Fb0;function qb0(Q,X){let Y={name:Q.descriptor.name,description:Q.descriptor.description,unit:Q.descriptor.unit},J=ss4(Q.aggregationTemporality);switch(Q.dataPointType){case Rq.DataPointType.SUM:Y.sum={aggregationTemporality:J,isMonotonic:Q.isMonotonic,dataPoints:$b0(Q,X)};break;case Rq.DataPointType.GAUGE:Y.gauge={dataPoints:$b0(Q,X)};break;case Rq.DataPointType.HISTOGRAM:Y.histogram={aggregationTemporality:J,dataPoints:rs4(Q,X)};break;case Rq.DataPointType.EXPONENTIAL_HISTOGRAM:Y.exponentialHistogram={aggregationTemporality:J,dataPoints:os4(Q,X)};break}return Y}Vb0.toMetric=qb0;function as4(Q,X,Y){let J={attributes:(0,mN.toAttributes)(Q.attributes),startTimeUnixNano:Y.encodeHrTime(Q.startTime),timeUnixNano:Y.encodeHrTime(Q.endTime)};switch(X){case Zb0.ValueType.INT:J.asInt=Q.value;break;case Zb0.ValueType.DOUBLE:J.asDouble=Q.value;break}return J}function $b0(Q,X){return Q.dataPoints.map((Y)=>{return as4(Y,Q.descriptor.valueType,X)})}function rs4(Q,X){return Q.dataPoints.map((Y)=>{let J=Y.value;return{attributes:(0,mN.toAttributes)(Y.attributes),bucketCounts:J.buckets.counts,explicitBounds:J.buckets.boundaries,count:J.count,sum:J.sum,min:J.min,max:J.max,startTimeUnixNano:X.encodeHrTime(Y.startTime),timeUnixNano:X.encodeHrTime(Y.endTime)}})}function os4(Q,X){return Q.dataPoints.map((Y)=>{let J=Y.value;return{attributes:(0,mN.toAttributes)(Y.attributes),count:J.count,min:J.min,max:J.max,sum:J.sum,positive:{offset:J.positive.offset,bucketCounts:J.positive.bucketCounts},negative:{offset:J.negative.offset,bucketCounts:J.negative.bucketCounts},scale:J.scale,zeroCount:J.zeroCount,startTimeUnixNano:X.encodeHrTime(Y.startTime),timeUnixNano:X.encodeHrTime(Y.endTime)}})}function ss4(Q){switch(Q){case Rq.AggregationTemporality.DELTA:return Kb0.EAggregationTemporality.AGGREGATION_TEMPORALITY_DELTA;case Rq.AggregationTemporality.CUMULATIVE:return Kb0.EAggregationTemporality.AGGREGATION_TEMPORALITY_CUMULATIVE}}function ts4(Q,X){return{resourceMetrics:Q.map((Y)=>Hb0(Y,X))}}Vb0.createExportMetricsServiceRequest=ts4});var Nb0=I((Bb0)=>{Object.defineProperty(Bb0,"__esModule",{value:!0});Bb0.ProtobufMetricsSerializer=void 0;var Ub0=Z2(),Yt4=Ki(),Jt4=Ub0.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,Gt4=Ub0.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;Bb0.ProtobufMetricsSerializer={serializeRequest:(Q)=>{let X=(0,Yt4.createExportMetricsServiceRequest)([Q]);return Gt4.encode(X).finish()},deserializeResponse:(Q)=>{return Jt4.decode(Q)}}});var Ob0=I(($i)=>{Object.defineProperty($i,"__esModule",{value:!0});$i.ProtobufMetricsSerializer=void 0;var Wt4=Nb0();Object.defineProperty($i,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return Wt4.ProtobufMetricsSerializer}})});var Hi=I((Tb0)=>{Object.defineProperty(Tb0,"__esModule",{value:!0});Tb0.createExportTraceServiceRequest=Tb0.toOtlpSpanEvent=Tb0.toOtlpLink=Tb0.sdkSpanToOtlpSpan=void 0;var lN=$2(),Kt4=K2(),$t4=256,Ht4=512;function Lb0(Q,X){let Y=Q&255|$t4;if(X)Y|=Ht4;return Y}function wb0(Q,X){let Y=Q.spanContext(),J=Q.status,G=Q.parentSpanContext?.spanId?X.encodeSpanContext(Q.parentSpanContext?.spanId):void 0;return{traceId:X.encodeSpanContext(Y.traceId),spanId:X.encodeSpanContext(Y.spanId),parentSpanId:G,traceState:Y.traceState?.serialize(),name:Q.name,kind:Q.kind==null?0:Q.kind+1,startTimeUnixNano:X.encodeHrTime(Q.startTime),endTimeUnixNano:X.encodeHrTime(Q.endTime),attributes:(0,lN.toAttributes)(Q.attributes),droppedAttributesCount:Q.droppedAttributesCount,events:Q.events.map((Z)=>Pb0(Z,X)),droppedEventsCount:Q.droppedEventsCount,status:{code:J.code,message:J.message},links:Q.links.map((Z)=>Mb0(Z,X)),droppedLinksCount:Q.droppedLinksCount,flags:Lb0(Y.traceFlags,Q.parentSpanContext?.isRemote)}}Tb0.sdkSpanToOtlpSpan=wb0;function Mb0(Q,X){return{attributes:Q.attributes?(0,lN.toAttributes)(Q.attributes):[],spanId:X.encodeSpanContext(Q.context.spanId),traceId:X.encodeSpanContext(Q.context.traceId),traceState:Q.context.traceState?.serialize(),droppedAttributesCount:Q.droppedAttributesCount||0,flags:Lb0(Q.context.traceFlags,Q.context.isRemote)}}Tb0.toOtlpLink=Mb0;function Pb0(Q,X){return{attributes:Q.attributes?(0,lN.toAttributes)(Q.attributes):[],name:Q.name,timeUnixNano:X.encodeHrTime(Q.time),droppedAttributesCount:Q.droppedAttributesCount||0}}Tb0.toOtlpSpanEvent=Pb0;function Ft4(Q,X){let Y=(0,Kt4.getOtlpEncoder)(X);return{resourceSpans:Vt4(Q,Y)}}Tb0.createExportTraceServiceRequest=Ft4;function qt4(Q){let X=new Map;for(let Y of Q){let J=X.get(Y.resource);if(!J)J=new Map,X.set(Y.resource,J);let G=`${Y.instrumentationScope.name}@${Y.instrumentationScope.version||""}:${Y.instrumentationScope.schemaUrl||""}`,Z=J.get(G);if(!Z)Z=[],J.set(G,Z);Z.push(Y)}return X}function Vt4(Q,X){let Y=qt4(Q),J=[],G=Y.entries(),Z=G.next();while(!Z.done){let[W,K]=Z.value,$=[],H=K.values(),F=H.next();while(!F.done){let U=F.value;if(U.length>0){let D=U.map((N)=>wb0(N,X));$.push({scope:(0,lN.createInstrumentationScope)(U[0].instrumentationScope),spans:D,schemaUrl:U[0].instrumentationScope.schemaUrl})}F=H.next()}let q=(0,lN.createResource)(W),V={resource:q,scopeSpans:$,schemaUrl:q.schemaUrl};J.push(V),Z=G.next()}return J}});var Cb0=I((Ib0)=>{Object.defineProperty(Ib0,"__esModule",{value:!0});Ib0.ProtobufTraceSerializer=void 0;var Eb0=Z2(),Dt4=Hi(),Nt4=Eb0.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,Ot4=Eb0.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;Ib0.ProtobufTraceSerializer={serializeRequest:(Q)=>{let X=(0,Dt4.createExportTraceServiceRequest)(Q);return Ot4.encode(X).finish()},deserializeResponse:(Q)=>{return Nt4.decode(Q)}}});var Rb0=I((Fi)=>{Object.defineProperty(Fi,"__esModule",{value:!0});Fi.ProtobufTraceSerializer=void 0;var Lt4=Cb0();Object.defineProperty(Fi,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return Lt4.ProtobufTraceSerializer}})});var kb0=I((Sb0)=>{Object.defineProperty(Sb0,"__esModule",{value:!0});Sb0.JsonLogsSerializer=void 0;var Mt4=Gi();Sb0.JsonLogsSerializer={serializeRequest:(Q)=>{let X=(0,Mt4.createExportLogsServiceRequest)(Q,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(X))},deserializeResponse:(Q)=>{if(Q.length===0)return{};return JSON.parse(new TextDecoder().decode(Q))}}});var _b0=I((qi)=>{Object.defineProperty(qi,"__esModule",{value:!0});qi.JsonLogsSerializer=void 0;var Pt4=kb0();Object.defineProperty(qi,"JsonLogsSerializer",{enumerable:!0,get:function(){return Pt4.JsonLogsSerializer}})});var fb0=I((yb0)=>{Object.defineProperty(yb0,"__esModule",{value:!0});yb0.JsonMetricsSerializer=void 0;var At4=Ki();yb0.JsonMetricsSerializer={serializeRequest:(Q)=>{let X=(0,At4.createExportMetricsServiceRequest)([Q],{useLongBits:!1});return new TextEncoder().encode(JSON.stringify(X))},deserializeResponse:(Q)=>{if(Q.length===0)return{};return JSON.parse(new TextDecoder().decode(Q))}}});var hb0=I((Vi)=>{Object.defineProperty(Vi,"__esModule",{value:!0});Vi.JsonMetricsSerializer=void 0;var Et4=fb0();Object.defineProperty(Vi,"JsonMetricsSerializer",{enumerable:!0,get:function(){return Et4.JsonMetricsSerializer}})});var ub0=I((xb0)=>{Object.defineProperty(xb0,"__esModule",{value:!0});xb0.JsonTraceSerializer=void 0;var jt4=Hi();xb0.JsonTraceSerializer={serializeRequest:(Q)=>{let X=(0,jt4.createExportTraceServiceRequest)(Q,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(X))},deserializeResponse:(Q)=>{if(Q.length===0)return{};return JSON.parse(new TextDecoder().decode(Q))}}});var mb0=I((zi)=>{Object.defineProperty(zi,"__esModule",{value:!0});zi.JsonTraceSerializer=void 0;var Ct4=ub0();Object.defineProperty(zi,"JsonTraceSerializer",{enumerable:!0,get:function(){return Ct4.JsonTraceSerializer}})});var t5=I((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.JsonTraceSerializer=zZ.JsonMetricsSerializer=zZ.JsonLogsSerializer=zZ.ProtobufTraceSerializer=zZ.ProtobufMetricsSerializer=zZ.ProtobufLogsSerializer=void 0;var St4=Jb0();Object.defineProperty(zZ,"ProtobufLogsSerializer",{enumerable:!0,get:function(){return St4.ProtobufLogsSerializer}});var vt4=Ob0();Object.defineProperty(zZ,"ProtobufMetricsSerializer",{enumerable:!0,get:function(){return vt4.ProtobufMetricsSerializer}});var kt4=Rb0();Object.defineProperty(zZ,"ProtobufTraceSerializer",{enumerable:!0,get:function(){return kt4.ProtobufTraceSerializer}});var _t4=_b0();Object.defineProperty(zZ,"JsonLogsSerializer",{enumerable:!0,get:function(){return _t4.JsonLogsSerializer}});var yt4=hb0();Object.defineProperty(zZ,"JsonMetricsSerializer",{enumerable:!0,get:function(){return yt4.JsonMetricsSerializer}});var bt4=mb0();Object.defineProperty(zZ,"JsonTraceSerializer",{enumerable:!0,get:function(){return bt4.JsonTraceSerializer}})});var pb0=I((lb0)=>{Object.defineProperty(lb0,"__esModule",{value:!0});lb0.validateAndNormalizeHeaders=void 0;var ht4=G4();function xt4(Q){return()=>{let X={};return Object.entries(Q?.()??{}).forEach(([Y,J])=>{if(typeof J<"u")X[Y]=String(J);else ht4.diag.warn(`Header "${Y}" has invalid value (${J}) and will be ignored`)}),X}}lb0.validateAndNormalizeHeaders=xt4});var ab0=I((nb0)=>{Object.defineProperty(nb0,"__esModule",{value:!0});nb0.getHttpConfigurationDefaults=nb0.mergeOtlpHttpConfigurationWithDefaults=void 0;var cb0=hN(),gt4=pb0();function ut4(Q,X,Y){let J={...Y()},G={};return()=>{if(X!=null)Object.assign(G,X());if(Q!=null)Object.assign(G,Q());return Object.assign(G,J)}}function mt4(Q){if(Q==null)return;try{let X=globalThis.location?.href;return new URL(Q,X).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${Q}'`)}}function lt4(Q,X,Y){return{...(0,cb0.mergeOtlpSharedConfigurationWithDefaults)(Q,X,Y),headers:ut4((0,gt4.validateAndNormalizeHeaders)(Q.headers),X.headers,Y.headers),url:mt4(Q.url)??X.url??Y.url}}nb0.mergeOtlpHttpConfigurationWithDefaults=lt4;function dt4(Q,X){return{...(0,cb0.getSharedConfigurationDefaults)(),headers:()=>Q,url:"http://localhost:4318/"+X}}nb0.getHttpConfigurationDefaults=dt4});var F2=I((sb0)=>{Object.defineProperty(sb0,"__esModule",{value:!0});sb0.getNodeHttpConfigurationDefaults=sb0.mergeOtlpNodeHttpConfigurationWithDefaults=sb0.httpAgentFactoryFromOptions=void 0;var rb0=ab0();function ob0(Q){return async(X)=>{let Y=X==="http:",J=Y?import("http"):import("https"),{Agent:G}=await J;if(Y){let{ca:Z,cert:W,key:K,...$}=Q;return new G($)}return new G(Q)}}sb0.httpAgentFactoryFromOptions=ob0;function ct4(Q,X,Y){return{...(0,rb0.mergeOtlpHttpConfigurationWithDefaults)(Q,X,Y),agentFactory:Q.agentFactory??X.agentFactory??Y.agentFactory,userAgent:Q.userAgent}}sb0.mergeOtlpNodeHttpConfigurationWithDefaults=ct4;function nt4(Q,X){return{...(0,rb0.getHttpConfigurationDefaults)(Q,X),agentFactory:ob0({keepAlive:!0})}}sb0.getNodeHttpConfigurationDefaults=nt4});var Xf0=I((eb0)=>{Object.defineProperty(eb0,"__esModule",{value:!0});eb0.parseRetryAfterToMills=eb0.isExportRetryable=void 0;function rt4(Q){return[429,502,503,504].includes(Q)}eb0.isExportRetryable=rt4;function ot4(Q){if(Q==null)return;let X=Number.parseInt(Q,10);if(Number.isInteger(X))return X>0?X*1000:-1;let Y=new Date(Q).getTime()-Date.now();if(Y>=0)return Y;return 0}eb0.parseRetryAfterToMills=ot4});var Gf0=I((Yf0)=>{Object.defineProperty(Yf0,"__esModule",{value:!0});Yf0.VERSION=void 0;Yf0.VERSION="0.207.0"});var Ff0=I(($f0)=>{Object.defineProperty($f0,"__esModule",{value:!0});$f0.compressAndSend=$f0.sendWithHttp=void 0;var tt4=z0("zlib"),et4=z0("stream"),Wf0=Xf0(),Qe4=eC(),Xe4=Gf0(),Zf0=`OTel-OTLP-Exporter-JavaScript/${Xe4.VERSION}`;function Ye4(Q,X,Y,J,G,Z){let W=new URL(X.url),K={...X.headers()};if(X.userAgent)K["User-Agent"]=`${X.userAgent} ${Zf0}`;else K["User-Agent"]=Zf0;let $={hostname:W.hostname,port:W.port,path:W.pathname,method:"POST",headers:K,agent:Y},H=Q($,(F)=>{let q=[];F.on("data",(V)=>q.push(V)),F.on("end",()=>{if(F.statusCode&&F.statusCode<299)G({status:"success",data:Buffer.concat(q)});else if(F.statusCode&&(0,Wf0.isExportRetryable)(F.statusCode))G({status:"retryable",retryInMillis:(0,Wf0.parseRetryAfterToMills)(F.headers["retry-after"])});else{let V=new Qe4.OTLPExporterError(F.statusMessage,F.statusCode,Buffer.concat(q).toString());G({status:"failure",error:V})}})});H.setTimeout(Z,()=>{H.destroy(),G({status:"failure",error:Error("Request Timeout")})}),H.on("error",(F)=>{G({status:"failure",error:F})}),Kf0(H,X.compression,J,(F)=>{G({status:"failure",error:F})})}$f0.sendWithHttp=Ye4;function Kf0(Q,X,Y,J){let G=Je4(Y);if(X==="gzip")Q.setHeader("Content-Encoding","gzip"),G=G.on("error",J).pipe(tt4.createGzip()).on("error",J);G.pipe(Q).on("error",J)}$f0.compressAndSend=Kf0;function Je4(Q){let X=new et4.Readable;return X.push(Q),X.push(null),X}});var Uf0=I((Vf0)=>{Object.defineProperty(Vf0,"__esModule",{value:!0});Vf0.createHttpExporterTransport=void 0;var We4=Ff0();class qf0{_parameters;_utils=null;constructor(Q){this._parameters=Q}async send(Q,X){let{agent:Y,request:J}=await this._loadUtils();return new Promise((G)=>{(0,We4.sendWithHttp)(J,this._parameters,Y,Q,(Z)=>{G(Z)},X)})}shutdown(){}async _loadUtils(){let Q=this._utils;if(Q===null){let X=new URL(this._parameters.url).protocol,[Y,J]=await Promise.all([this._parameters.agentFactory(X),Ze4(X)]);Q=this._utils={agent:Y,request:J}}return Q}}async function Ze4(Q){let X=Q==="http:"?import("http"):import("https"),{request:Y}=await X;return Y}function Ke4(Q){return new qf0(Q)}Vf0.createHttpExporterTransport=Ke4});var Lf0=I((Nf0)=>{Object.defineProperty(Nf0,"__esModule",{value:!0});Nf0.createRetryingTransport=void 0;var $e4=5,He4=1000,Fe4=5000,qe4=1.5,Bf0=0.2;function Ve4(){return Math.random()*(2*Bf0)-Bf0}class Df0{_transport;constructor(Q){this._transport=Q}retry(Q,X,Y){return new Promise((J,G)=>{setTimeout(()=>{this._transport.send(Q,X).then(J,G)},Y)})}async send(Q,X){let Y=Date.now()+X,J=await this._transport.send(Q,X),G=$e4,Z=He4;while(J.status==="retryable"&&G>0){G--;let W=Math.max(Math.min(Z,Fe4)+Ve4(),0);Z=Z*qe4;let K=J.retryInMillis??W,$=Y-Date.now();if(K>$)return J;J=await this.retry(Q,$,K)}return J}shutdown(){return this._transport.shutdown()}}function ze4(Q){return new Df0(Q.transport)}Nf0.createRetryingTransport=ze4});var Pf0=I((wf0)=>{Object.defineProperty(wf0,"__esModule",{value:!0});wf0.createOtlpHttpExportDelegate=void 0;var Ue4=_n(),Be4=Uf0(),De4=kn(),Ne4=Lf0();function Oe4(Q,X){return(0,Ue4.createOtlpExportDelegate)({transport:(0,Ne4.createRetryingTransport)({transport:(0,Be4.createHttpExporterTransport)(Q)}),serializer:X,promiseHandler:(0,De4.createBoundedQueueExportPromiseHandler)(Q)},{timeout:Q.timeoutMillis})}wf0.createOtlpHttpExportDelegate=Oe4});var Ui=I((jf0)=>{Object.defineProperty(jf0,"__esModule",{value:!0});jf0.getSharedConfigurationFromEnvironment=void 0;var Ef0=l4(),If0=G4();function Tf0(Q){let X=(0,Ef0.getNumberFromEnv)(Q);if(X!=null){if(Number.isFinite(X)&&X>0)return X;If0.diag.warn(`Configuration: ${Q} is invalid, expected number greater than 0 (actual: ${X})`)}return}function Le4(Q){let X=Tf0(`OTEL_EXPORTER_OTLP_${Q}_TIMEOUT`),Y=Tf0("OTEL_EXPORTER_OTLP_TIMEOUT");return X??Y}function Af0(Q){let X=(0,Ef0.getStringFromEnv)(Q)?.trim();if(X==null||X==="none"||X==="gzip")return X;If0.diag.warn(`Configuration: ${Q} is invalid, expected 'none' or 'gzip' (actual: '${X}')`);return}function we4(Q){let X=Af0(`OTEL_EXPORTER_OTLP_${Q}_COMPRESSION`),Y=Af0("OTEL_EXPORTER_OTLP_COMPRESSION");return X??Y}function Me4(Q){return{timeoutMillis:Le4(Q),compression:we4(Q)}}jf0.getSharedConfigurationFromEnvironment=Me4});var vf0=I((Rf0)=>{Object.defineProperty(Rf0,"__esModule",{value:!0});Rf0.getNodeHttpConfigurationFromEnvironment=void 0;var Pe4=z0("fs"),Te4=z0("path"),e5=l4(),q2=G4(),Ae4=Ui(),Ee4=hN(),Ie4=F2();function je4(Q){let X=(0,e5.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Q}_HEADERS`),Y=(0,e5.getStringFromEnv)("OTEL_EXPORTER_OTLP_HEADERS"),J=(0,e5.parseKeyPairsIntoRecord)(X),G=(0,e5.parseKeyPairsIntoRecord)(Y);if(Object.keys(J).length===0&&Object.keys(G).length===0)return;return Object.assign({},(0,e5.parseKeyPairsIntoRecord)(Y),(0,e5.parseKeyPairsIntoRecord)(X))}function Ce4(Q){try{return new URL(Q).toString()}catch{q2.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Q}', falling back to undefined`);return}}function Re4(Q,X){try{new URL(Q)}catch{q2.diag.warn(`Configuration: Could not parse environment-provided export URL: '${Q}', falling back to undefined`);return}if(!Q.endsWith("/"))Q=Q+"/";Q+=X;try{new URL(Q)}catch{q2.diag.warn(`Configuration: Provided URL appended with '${X}' is not a valid URL, using 'undefined' instead of '${Q}'`);return}return Q}function Se4(Q){let X=(0,e5.getStringFromEnv)("OTEL_EXPORTER_OTLP_ENDPOINT");if(X===void 0)return;return Re4(X,Q)}function ve4(Q){let X=(0,e5.getStringFromEnv)(`OTEL_EXPORTER_OTLP_${Q}_ENDPOINT`);if(X===void 0)return;return Ce4(X)}function Bi(Q,X,Y){let J=(0,e5.getStringFromEnv)(Q),G=(0,e5.getStringFromEnv)(X),Z=J??G;if(Z!=null)try{return Pe4.readFileSync(Te4.resolve(process.cwd(),Z))}catch{q2.diag.warn(Y);return}else return}function ke4(Q){return Bi(`OTEL_EXPORTER_OTLP_${Q}_CLIENT_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE","Failed to read client certificate chain file")}function _e4(Q){return Bi(`OTEL_EXPORTER_OTLP_${Q}_CLIENT_KEY`,"OTEL_EXPORTER_OTLP_CLIENT_KEY","Failed to read client certificate private key file")}function ye4(Q){return Bi(`OTEL_EXPORTER_OTLP_${Q}_CERTIFICATE`,"OTEL_EXPORTER_OTLP_CERTIFICATE","Failed to read root certificate file")}function be4(Q,X){return{...(0,Ae4.getSharedConfigurationFromEnvironment)(Q),url:ve4(Q)??Se4(X),headers:(0,Ee4.wrapStaticHeadersInFunction)(je4(Q)),agentFactory:(0,Ie4.httpAgentFactoryFromOptions)({keepAlive:!0,ca:ye4(Q),cert:ke4(Q),key:_e4(Q)})}}Rf0.getNodeHttpConfigurationFromEnvironment=be4});var bf0=I((_f0)=>{Object.defineProperty(_f0,"__esModule",{value:!0});_f0.convertLegacyHttpOptions=void 0;var fe4=G4(),he4=hN(),kf0=F2(),xe4=O7(),ge4=vf0();function ue4(Q){if(typeof Q.httpAgentOptions==="function")return Q.httpAgentOptions;let X=Q.httpAgentOptions;if(Q.keepAlive!=null)X={keepAlive:Q.keepAlive,...X};if(X!=null)return(0,xe4.httpAgentFactoryFromOptions)(X);else return}function me4(Q,X,Y,J){if(Q.metadata)fe4.diag.warn("Metadata cannot be set when using http");return(0,kf0.mergeOtlpNodeHttpConfigurationWithDefaults)({url:Q.url,headers:(0,he4.wrapStaticHeadersInFunction)(Q.headers),concurrencyLimit:Q.concurrencyLimit,timeoutMillis:Q.timeoutMillis,compression:Q.compression,agentFactory:ue4(Q),userAgent:Q.userAgent},(0,ge4.getNodeHttpConfigurationFromEnvironment)(X,Y),(0,kf0.getNodeHttpConfigurationDefaults)(J,Y))}_f0.convertLegacyHttpOptions=me4});var O7=I((Sq)=>{Object.defineProperty(Sq,"__esModule",{value:!0});Sq.convertLegacyHttpOptions=Sq.getSharedConfigurationFromEnvironment=Sq.createOtlpHttpExportDelegate=Sq.httpAgentFactoryFromOptions=void 0;var le4=F2();Object.defineProperty(Sq,"httpAgentFactoryFromOptions",{enumerable:!0,get:function(){return le4.httpAgentFactoryFromOptions}});var de4=Pf0();Object.defineProperty(Sq,"createOtlpHttpExportDelegate",{enumerable:!0,get:function(){return de4.createOtlpHttpExportDelegate}});var pe4=Ui();Object.defineProperty(Sq,"getSharedConfigurationFromEnvironment",{enumerable:!0,get:function(){return pe4.getSharedConfigurationFromEnvironment}});var ce4=bf0();Object.defineProperty(Sq,"convertLegacyHttpOptions",{enumerable:!0,get:function(){return ce4.convertLegacyHttpOptions}})});var uf0=I((xf0)=>{Object.defineProperty(xf0,"__esModule",{value:!0});xf0.OTLPLogExporter=void 0;var ie4=r5(),ae4=t5(),ff0=O7();class hf0 extends ie4.OTLPExporterBase{constructor(Q={}){super((0,ff0.createOtlpHttpExportDelegate)((0,ff0.convertLegacyHttpOptions)(Q,"LOGS","v1/logs",{"Content-Type":"application/json"}),ae4.JsonLogsSerializer))}}xf0.OTLPLogExporter=hf0});var mf0=I((Di)=>{Object.defineProperty(Di,"__esModule",{value:!0});Di.OTLPLogExporter=void 0;var re4=uf0();Object.defineProperty(Di,"OTLPLogExporter",{enumerable:!0,get:function(){return re4.OTLPLogExporter}})});var lf0=I((Ni)=>{Object.defineProperty(Ni,"__esModule",{value:!0});Ni.OTLPLogExporter=void 0;var se4=mf0();Object.defineProperty(Ni,"OTLPLogExporter",{enumerable:!0,get:function(){return se4.OTLPLogExporter}})});var df0=I((Oi)=>{Object.defineProperty(Oi,"__esModule",{value:!0});Oi.OTLPLogExporter=void 0;var ee4=lf0();Object.defineProperty(Oi,"OTLPLogExporter",{enumerable:!0,get:function(){return ee4.OTLPLogExporter}})});var nf0=I((pf0)=>{Object.defineProperty(pf0,"__esModule",{value:!0});pf0.VERSION=void 0;pf0.VERSION="0.207.0"});var z6=I((of0)=>{Object.defineProperty(of0,"__esModule",{value:!0});of0.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=of0.DEFAULT_MAX_SEND_MESSAGE_LENGTH=of0.Propagate=of0.LogVerbosity=of0.Status=void 0;var if0;(function(Q){Q[Q.OK=0]="OK",Q[Q.CANCELLED=1]="CANCELLED",Q[Q.UNKNOWN=2]="UNKNOWN",Q[Q.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Q[Q.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Q[Q.NOT_FOUND=5]="NOT_FOUND",Q[Q.ALREADY_EXISTS=6]="ALREADY_EXISTS",Q[Q.PERMISSION_DENIED=7]="PERMISSION_DENIED",Q[Q.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Q[Q.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Q[Q.ABORTED=10]="ABORTED",Q[Q.OUT_OF_RANGE=11]="OUT_OF_RANGE",Q[Q.UNIMPLEMENTED=12]="UNIMPLEMENTED",Q[Q.INTERNAL=13]="INTERNAL",Q[Q.UNAVAILABLE=14]="UNAVAILABLE",Q[Q.DATA_LOSS=15]="DATA_LOSS",Q[Q.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(if0||(of0.Status=if0={}));var af0;(function(Q){Q[Q.DEBUG=0]="DEBUG",Q[Q.INFO=1]="INFO",Q[Q.ERROR=2]="ERROR",Q[Q.NONE=3]="NONE"})(af0||(of0.LogVerbosity=af0={}));var rf0;(function(Q){Q[Q.DEADLINE=1]="DEADLINE",Q[Q.CENSUS_STATS_CONTEXT=2]="CENSUS_STATS_CONTEXT",Q[Q.CENSUS_TRACING_CONTEXT=4]="CENSUS_TRACING_CONTEXT",Q[Q.CANCELLATION=8]="CANCELLATION",Q[Q.DEFAULTS=65535]="DEFAULTS"})(rf0||(of0.Propagate=rf0={}));of0.DEFAULT_MAX_SEND_MESSAGE_LENGTH=-1;of0.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=4194304});var Li=I((u51,W06)=>{W06.exports={name:"@grpc/grpc-js",version:"1.14.3",description:"gRPC Library for Node - pure JS implementation",homepage:"https://grpc.io/",repository:"https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",main:"build/src/index.js",engines:{node:">=12.10.0"},keywords:[],author:{name:"Google Inc."},types:"build/src/index.d.ts",license:"Apache-2.0",devDependencies:{"@grpc/proto-loader":"file:../proto-loader","@types/gulp":"^4.0.17","@types/gulp-mocha":"0.0.37","@types/lodash":"^4.14.202","@types/mocha":"^10.0.6","@types/ncp":"^2.0.8","@types/node":">=20.11.20","@types/pify":"^5.0.4","@types/semver":"^7.5.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","@typescript-eslint/typescript-estree":"^7.1.0","clang-format":"^1.8.0",eslint:"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1",execa:"^2.0.3",gulp:"^4.0.2","gulp-mocha":"^6.0.0",lodash:"^4.17.21",madge:"^5.0.1","mocha-jenkins-reporter":"^0.4.1",ncp:"^2.0.0",pify:"^4.0.1",prettier:"^2.8.8",rimraf:"^3.0.2",semver:"^7.6.0","ts-node":"^10.9.2",typescript:"^5.3.3"},contributors:[{name:"Google Inc."}],scripts:{build:"npm run compile",clean:"rimraf ./build",compile:"tsc -p .",format:'clang-format -i -style="{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}" src/*.ts test/*.ts',lint:"eslint src/*.ts test/*.ts",prepare:"npm run copy-protos && npm run generate-types && npm run generate-test-types && npm run compile",test:"gulp test",check:"npm run lint",fix:"eslint --fix src/*.ts test/*.ts",pretest:"npm run generate-types && npm run generate-test-types && npm run compile",posttest:"npm run check && madge -c ./build/src","generate-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs proto/ proto/xds/ proto/protoc-gen-validate/ -O src/generated/ --grpcLib ../index channelz.proto xds/service/orca/v3/orca.proto","generate-test-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto echo_service.proto","copy-protos":"node ./copy-protos"},dependencies:{"@grpc/proto-loader":"^0.8.0","@js-sdsl/ordered-map":"^4.4.2"},files:["src/**/*.ts","build/src/**/*.{js,d.ts,js.map}","proto/**/*.proto","proto/**/LICENSE","LICENSE","deps/envoy-api/envoy/api/v2/**/*.proto","deps/envoy-api/envoy/config/**/*.proto","deps/envoy-api/envoy/service/**/*.proto","deps/envoy-api/envoy/type/**/*.proto","deps/udpa/udpa/**/*.proto","deps/googleapis/google/api/*.proto","deps/googleapis/google/rpc/*.proto","deps/protoc-gen-validate/validate/**/*.proto"]}});var h1=I((Qh0)=>{var wi,Mi,Pi,Ti;Object.defineProperty(Qh0,"__esModule",{value:!0});Qh0.log=Qh0.setLoggerVerbosity=Qh0.setLogger=Qh0.getLogger=void 0;Qh0.trace=D06;Qh0.isTracerEnabled=ef0;var UZ=z6(),Z06=z0("process"),K06=Li().version,$06={error:(Q,...X)=>{console.error("E "+Q,...X)},info:(Q,...X)=>{console.error("I "+Q,...X)},debug:(Q,...X)=>{console.error("D "+Q,...X)}},W$=$06,vq=UZ.LogVerbosity.ERROR,H06=(Mi=(wi=process.env.GRPC_NODE_VERBOSITY)!==null&&wi!==void 0?wi:process.env.GRPC_VERBOSITY)!==null&&Mi!==void 0?Mi:"";switch(H06.toUpperCase()){case"DEBUG":vq=UZ.LogVerbosity.DEBUG;break;case"INFO":vq=UZ.LogVerbosity.INFO;break;case"ERROR":vq=UZ.LogVerbosity.ERROR;break;case"NONE":vq=UZ.LogVerbosity.NONE;break;default:}var F06=()=>{return W$};Qh0.getLogger=F06;var q06=(Q)=>{W$=Q};Qh0.setLogger=q06;var V06=(Q)=>{vq=Q};Qh0.setLoggerVerbosity=V06;var z06=(Q,...X)=>{let Y;if(Q>=vq){switch(Q){case UZ.LogVerbosity.DEBUG:Y=W$.debug;break;case UZ.LogVerbosity.INFO:Y=W$.info;break;case UZ.LogVerbosity.ERROR:Y=W$.error;break}if(!Y)Y=W$.error;if(Y)Y.bind(W$)(...X)}};Qh0.log=z06;var U06=(Ti=(Pi=process.env.GRPC_NODE_TRACE)!==null&&Pi!==void 0?Pi:process.env.GRPC_TRACE)!==null&&Ti!==void 0?Ti:"",Ai=new Set,tf0=new Set;for(let Q of U06.split(","))if(Q.startsWith("-"))tf0.add(Q.substring(1));else Ai.add(Q);var B06=Ai.has("all");function D06(Q,X,Y){if(ef0(X))Qh0.log(Q,new Date().toISOString()+" | v"+K06+" "+Z06.pid+" | "+X+" | "+Y)}function ef0(Q){return!tf0.has(Q)&&(B06||Ai.has(Q))}});var V2=I((Xh0)=>{Object.defineProperty(Xh0,"__esModule",{value:!0});Xh0.getErrorMessage=P06;Xh0.getErrorCode=T06;function P06(Q){if(Q instanceof Error)return Q.message;else return String(Q)}function T06(Q){if(typeof Q==="object"&&Q!==null&&"code"in Q&&typeof Q.code==="number")return Q.code;else return null}});var P9=I((Gh0)=>{Object.defineProperty(Gh0,"__esModule",{value:!0});Gh0.Metadata=void 0;var I06=h1(),j06=z6(),C06=V2(),R06=/^[:0-9a-z_.-]+$/,S06=/^[ -~]*$/;function v06(Q){return R06.test(Q)}function k06(Q){return S06.test(Q)}function Jh0(Q){return Q.endsWith("-bin")}function _06(Q){return!Q.startsWith("grpc-")}function z2(Q){return Q.toLowerCase()}function Yh0(Q,X){if(!v06(Q))throw Error('Metadata key "'+Q+'" contains illegal characters');if(X!==null&&X!==void 0)if(Jh0(Q)){if(!Buffer.isBuffer(X))throw Error("keys that end with '-bin' must have Buffer values")}else{if(Buffer.isBuffer(X))throw Error("keys that don't end with '-bin' must have String values");if(!k06(X))throw Error('Metadata string value "'+X+'" contains illegal characters')}}class U2{constructor(Q={}){this.internalRepr=new Map,this.opaqueData=new Map,this.options=Q}set(Q,X){Q=z2(Q),Yh0(Q,X),this.internalRepr.set(Q,[X])}add(Q,X){Q=z2(Q),Yh0(Q,X);let Y=this.internalRepr.get(Q);if(Y===void 0)this.internalRepr.set(Q,[X]);else Y.push(X)}remove(Q){Q=z2(Q),this.internalRepr.delete(Q)}get(Q){return Q=z2(Q),this.internalRepr.get(Q)||[]}getMap(){let Q={};for(let[X,Y]of this.internalRepr)if(Y.length>0){let J=Y[0];Q[X]=Buffer.isBuffer(J)?Buffer.from(J):J}return Q}clone(){let Q=new U2(this.options),X=Q.internalRepr;for(let[Y,J]of this.internalRepr){let G=J.map((Z)=>{if(Buffer.isBuffer(Z))return Buffer.from(Z);else return Z});X.set(Y,G)}return Q}merge(Q){for(let[X,Y]of Q.internalRepr){let J=(this.internalRepr.get(X)||[]).concat(Y);this.internalRepr.set(X,J)}}setOptions(Q){this.options=Q}getOptions(){return this.options}toHttp2Headers(){let Q={};for(let[X,Y]of this.internalRepr){if(X.startsWith(":"))continue;Q[X]=Y.map(y06)}return Q}toJSON(){let Q={};for(let[X,Y]of this.internalRepr)Q[X]=Y;return Q}setOpaque(Q,X){this.opaqueData.set(Q,X)}getOpaque(Q){return this.opaqueData.get(Q)}static fromHttp2Headers(Q){let X=new U2;for(let Y of Object.keys(Q)){if(Y.charAt(0)===":")continue;let J=Q[Y];try{if(Jh0(Y)){if(Array.isArray(J))J.forEach((G)=>{X.add(Y,Buffer.from(G,"base64"))});else if(J!==void 0)if(_06(Y))J.split(",").forEach((G)=>{X.add(Y,Buffer.from(G.trim(),"base64"))});else X.add(Y,Buffer.from(J,"base64"))}else if(Array.isArray(J))J.forEach((G)=>{X.add(Y,G)});else if(J!==void 0)X.add(Y,J)}catch(G){let Z=`Failed to add metadata entry ${Y}: ${J}. ${(0,C06.getErrorMessage)(G)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;(0,I06.log)(j06.LogVerbosity.ERROR,Z)}}return X}}Gh0.Metadata=U2;var y06=(Q)=>{return Buffer.isBuffer(Q)?Q.toString("base64"):Q}});var D2=I((Zh0)=>{Object.defineProperty(Zh0,"__esModule",{value:!0});Zh0.CallCredentials=void 0;var Ii=P9();function b06(Q){return"getRequestHeaders"in Q&&typeof Q.getRequestHeaders==="function"}class kq{static createFromMetadataGenerator(Q){return new ji(Q)}static createFromGoogleCredential(Q){return kq.createFromMetadataGenerator((X,Y)=>{let J;if(b06(Q))J=Q.getRequestHeaders(X.service_url);else J=new Promise((G,Z)=>{Q.getRequestMetadata(X.service_url,(W,K)=>{if(W){Z(W);return}if(!K){Z(Error("Headers not set by metadata plugin"));return}G(K)})});J.then((G)=>{let Z=new Ii.Metadata;for(let W of Object.keys(G))Z.add(W,G[W]);Y(null,Z)},(G)=>{Y(G)})})}static createEmpty(){return new Ci}}Zh0.CallCredentials=kq;class B2 extends kq{constructor(Q){super();this.creds=Q}async generateMetadata(Q){let X=new Ii.Metadata,Y=await Promise.all(this.creds.map((J)=>J.generateMetadata(Q)));for(let J of Y)X.merge(J);return X}compose(Q){return new B2(this.creds.concat([Q]))}_equals(Q){if(this===Q)return!0;if(Q instanceof B2)return this.creds.every((X,Y)=>X._equals(Q.creds[Y]));else return!1}}class ji extends kq{constructor(Q){super();this.metadataGenerator=Q}generateMetadata(Q){return new Promise((X,Y)=>{this.metadataGenerator(Q,(J,G)=>{if(G!==void 0)X(G);else Y(J)})})}compose(Q){return new B2([this,Q])}_equals(Q){if(this===Q)return!0;if(Q instanceof ji)return this.metadataGenerator===Q.metadataGenerator;else return!1}}class Ci extends kq{generateMetadata(Q){return Promise.resolve(new Ii.Metadata)}compose(Q){return Q}_equals(Q){return Q instanceof Ci}}});var Si=I((Hh0)=>{Object.defineProperty(Hh0,"__esModule",{value:!0});Hh0.CIPHER_SUITES=void 0;Hh0.getDefaultRootsData=h06;var f06=z0("fs");Hh0.CIPHER_SUITES=process.env.GRPC_SSL_CIPHER_SUITES;var $h0=process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH,Ri=null;function h06(){if($h0){if(Ri===null)Ri=f06.readFileSync($h0);return Ri}return null}});var nQ=I((Vh0)=>{Object.defineProperty(Vh0,"__esModule",{value:!0});Vh0.parseUri=u06;Vh0.splitHostPort=m06;Vh0.combineHostPort=l06;Vh0.uriToString=d06;var g06=/^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/;function u06(Q){let X=g06.exec(Q);if(X===null)return null;return{scheme:X[1],authority:X[2],path:X[3]}}var qh0=/^\d+$/;function m06(Q){if(Q.startsWith("[")){let X=Q.indexOf("]");if(X===-1)return null;let Y=Q.substring(1,X);if(Y.indexOf(":")===-1)return null;if(Q.length>X+1)if(Q[X+1]===":"){let J=Q.substring(X+2);if(qh0.test(J))return{host:Y,port:+J};else return null}else return null;else return{host:Y}}else{let X=Q.split(":");if(X.length===2)if(qh0.test(X[1]))return{host:X[0],port:+X[1]};else return null;else return{host:Q}}}function l06(Q){if(Q.port===void 0)return Q.host;else if(Q.host.includes(":"))return`[${Q.host}]:${Q.port}`;else return`${Q.host}:${Q.port}`}function d06(Q){let X="";if(Q.scheme!==void 0)X+=Q.scheme+":";if(Q.authority!==void 0)X+="//"+Q.authority+"/";return X+=Q.path,X}});var hJ=I((zh0)=>{Object.defineProperty(zh0,"__esModule",{value:!0});zh0.CHANNEL_ARGS_CONFIG_SELECTOR_KEY=void 0;zh0.registerResolver=a06;zh0.registerDefaultScheme=r06;zh0.createResolver=o06;zh0.getDefaultAuthority=s06;zh0.mapUriDefaultScheme=t06;var ki=nQ();zh0.CHANNEL_ARGS_CONFIG_SELECTOR_KEY="grpc.internal.config_selector";var _q={},vi=null;function a06(Q,X){_q[Q]=X}function r06(Q){vi=Q}function o06(Q,X,Y){if(Q.scheme!==void 0&&Q.scheme in _q)return new _q[Q.scheme](Q,X,Y);else throw Error(`No resolver could be created for target ${(0,ki.uriToString)(Q)}`)}function s06(Q){if(Q.scheme!==void 0&&Q.scheme in _q)return _q[Q.scheme].getDefaultAuthority(Q);else throw Error(`Invalid target ${(0,ki.uriToString)(Q)}`)}function t06(Q){if(Q.scheme===void 0||!(Q.scheme in _q))if(vi!==null)return{scheme:vi,authority:void 0,path:(0,ki.uriToString)(Q)};else return null;return Q}});var bq=I((Oh0)=>{Object.defineProperty(Oh0,"__esModule",{value:!0});Oh0.ChannelCredentials=void 0;Oh0.createCertificateProviderChannelCredentials=K46;var pN=z0("tls"),L2=D2(),yi=Si(),Bh0=nQ(),G46=hJ(),W46=h1(),Z46=z6();function _i(Q,X){if(Q&&!(Q instanceof Buffer))throw TypeError(`${X}, if provided, must be a Buffer.`)}class yq{compose(Q){return new O2(this,Q)}static createSsl(Q,X,Y,J){var G;if(_i(Q,"Root certificate"),_i(X,"Private key"),_i(Y,"Certificate chain"),X&&!Y)throw Error("Private key must be given with accompanying certificate chain");if(!X&&Y)throw Error("Certificate chain must be given with accompanying private key");let Z=(0,pN.createSecureContext)({ca:(G=Q!==null&&Q!==void 0?Q:(0,yi.getDefaultRootsData)())!==null&&G!==void 0?G:void 0,key:X!==null&&X!==void 0?X:void 0,cert:Y!==null&&Y!==void 0?Y:void 0,ciphers:yi.CIPHER_SUITES});return new N2(Z,J!==null&&J!==void 0?J:{})}static createFromSecureContext(Q,X){return new N2(Q,X!==null&&X!==void 0?X:{})}static createInsecure(){return new bi}}Oh0.ChannelCredentials=yq;class bi extends yq{constructor(){super()}compose(Q){throw Error("Cannot compose insecure credentials")}_isSecure(){return!1}_equals(Q){return Q instanceof bi}_createSecureConnector(Q,X,Y){return{connect(J){return Promise.resolve({socket:J,secure:!1})},waitForReady:()=>{return Promise.resolve()},getCallCredentials:()=>{return Y!==null&&Y!==void 0?Y:L2.CallCredentials.createEmpty()},destroy(){}}}}function Dh0(Q,X,Y,J){var G,Z;let W={secureContext:Q},K=Y;if("grpc.http_connect_target"in J){let q=(0,Bh0.parseUri)(J["grpc.http_connect_target"]);if(q)K=q}let $=(0,G46.getDefaultAuthority)(K),H=(0,Bh0.splitHostPort)($),F=(G=H===null||H===void 0?void 0:H.host)!==null&&G!==void 0?G:$;if(W.host=F,X.checkServerIdentity)W.checkServerIdentity=X.checkServerIdentity;if(X.rejectUnauthorized!==void 0)W.rejectUnauthorized=X.rejectUnauthorized;if(W.ALPNProtocols=["h2"],J["grpc.ssl_target_name_override"]){let q=J["grpc.ssl_target_name_override"],V=(Z=W.checkServerIdentity)!==null&&Z!==void 0?Z:pN.checkServerIdentity;W.checkServerIdentity=(U,D)=>{return V(q,D)},W.servername=q}else W.servername=F;if(J["grpc-node.tls_enable_trace"])W.enableTrace=!0;return W}class Nh0{constructor(Q,X){this.connectionOptions=Q,this.callCredentials=X}connect(Q){let X=Object.assign({socket:Q},this.connectionOptions);return new Promise((Y,J)=>{let G=(0,pN.connect)(X,()=>{var Z;if(((Z=this.connectionOptions.rejectUnauthorized)!==null&&Z!==void 0?Z:!0)&&!G.authorized){J(G.authorizationError);return}Y({socket:G,secure:!0})});G.on("error",(Z)=>{J(Z)})})}waitForReady(){return Promise.resolve()}getCallCredentials(){return this.callCredentials}destroy(){}}class N2 extends yq{constructor(Q,X){super();this.secureContext=Q,this.verifyOptions=X}_isSecure(){return!0}_equals(Q){if(this===Q)return!0;if(Q instanceof N2)return this.secureContext===Q.secureContext&&this.verifyOptions.checkServerIdentity===Q.verifyOptions.checkServerIdentity;else return!1}_createSecureConnector(Q,X,Y){let J=Dh0(this.secureContext,this.verifyOptions,Q,X);return new Nh0(J,Y!==null&&Y!==void 0?Y:L2.CallCredentials.createEmpty())}}class dN extends yq{constructor(Q,X,Y){super();this.caCertificateProvider=Q,this.identityCertificateProvider=X,this.verifyOptions=Y,this.refcount=0,this.latestCaUpdate=void 0,this.latestIdentityUpdate=void 0,this.caCertificateUpdateListener=this.handleCaCertificateUpdate.bind(this),this.identityCertificateUpdateListener=this.handleIdentityCertitificateUpdate.bind(this),this.secureContextWatchers=[]}_isSecure(){return!0}_equals(Q){var X,Y;if(this===Q)return!0;if(Q instanceof dN)return this.caCertificateProvider===Q.caCertificateProvider&&this.identityCertificateProvider===Q.identityCertificateProvider&&((X=this.verifyOptions)===null||X===void 0?void 0:X.checkServerIdentity)===((Y=Q.verifyOptions)===null||Y===void 0?void 0:Y.checkServerIdentity);else return!1}ref(){var Q;if(this.refcount===0)this.caCertificateProvider.addCaCertificateListener(this.caCertificateUpdateListener),(Q=this.identityCertificateProvider)===null||Q===void 0||Q.addIdentityCertificateListener(this.identityCertificateUpdateListener);this.refcount+=1}unref(){var Q;if(this.refcount-=1,this.refcount===0)this.caCertificateProvider.removeCaCertificateListener(this.caCertificateUpdateListener),(Q=this.identityCertificateProvider)===null||Q===void 0||Q.removeIdentityCertificateListener(this.identityCertificateUpdateListener)}_createSecureConnector(Q,X,Y){return this.ref(),new dN.SecureConnectorImpl(this,Q,X,Y!==null&&Y!==void 0?Y:L2.CallCredentials.createEmpty())}maybeUpdateWatchers(){if(this.hasReceivedUpdates()){for(let Q of this.secureContextWatchers)Q(this.getLatestSecureContext());this.secureContextWatchers=[]}}handleCaCertificateUpdate(Q){this.latestCaUpdate=Q,this.maybeUpdateWatchers()}handleIdentityCertitificateUpdate(Q){this.latestIdentityUpdate=Q,this.maybeUpdateWatchers()}hasReceivedUpdates(){if(this.latestCaUpdate===void 0)return!1;if(this.identityCertificateProvider&&this.latestIdentityUpdate===void 0)return!1;return!0}getSecureContext(){if(this.hasReceivedUpdates())return Promise.resolve(this.getLatestSecureContext());else return new Promise((Q)=>{this.secureContextWatchers.push(Q)})}getLatestSecureContext(){var Q,X;if(!this.latestCaUpdate)return null;if(this.identityCertificateProvider!==null&&!this.latestIdentityUpdate)return null;try{return(0,pN.createSecureContext)({ca:this.latestCaUpdate.caCertificate,key:(Q=this.latestIdentityUpdate)===null||Q===void 0?void 0:Q.privateKey,cert:(X=this.latestIdentityUpdate)===null||X===void 0?void 0:X.certificate,ciphers:yi.CIPHER_SUITES})}catch(Y){return(0,W46.log)(Z46.LogVerbosity.ERROR,"Failed to createSecureContext with error "+Y.message),null}}}dN.SecureConnectorImpl=class{constructor(Q,X,Y,J){this.parent=Q,this.channelTarget=X,this.options=Y,this.callCredentials=J}connect(Q){return new Promise((X,Y)=>{let J=this.parent.getLatestSecureContext();if(!J){Y(Error("Failed to load credentials"));return}if(Q.closed)Y(Error("Socket closed while loading credentials"));let G=Dh0(J,this.parent.verifyOptions,this.channelTarget,this.options),Z=Object.assign({socket:Q},G),W=()=>{Y(Error("Socket closed"))},K=(H)=>{Y(H)},$=(0,pN.connect)(Z,()=>{var H;if($.removeListener("close",W),$.removeListener("error",K),((H=this.parent.verifyOptions.rejectUnauthorized)!==null&&H!==void 0?H:!0)&&!$.authorized){Y($.authorizationError);return}X({socket:$,secure:!0})});$.once("close",W),$.once("error",K)})}async waitForReady(){await this.parent.getSecureContext()}getCallCredentials(){return this.callCredentials}destroy(){this.parent.unref()}};function K46(Q,X,Y){return new dN(Q,X,Y!==null&&Y!==void 0?Y:{})}class O2 extends yq{constructor(Q,X){super();if(this.channelCredentials=Q,this.callCredentials=X,!Q._isSecure())throw Error("Cannot compose insecure credentials")}compose(Q){let X=this.callCredentials.compose(Q);return new O2(this.channelCredentials,X)}_isSecure(){return!0}_equals(Q){if(this===Q)return!0;if(Q instanceof O2)return this.channelCredentials._equals(Q.channelCredentials)&&this.callCredentials._equals(Q.callCredentials);else return!1}_createSecureConnector(Q,X,Y){let J=this.callCredentials.compose(Y!==null&&Y!==void 0?Y:L2.CallCredentials.createEmpty());return this.channelCredentials._createSecureConnector(Q,X,J)}}});var DZ=I((Mh0)=>{Object.defineProperty(Mh0,"__esModule",{value:!0});Mh0.createChildChannelControlHelper=q46;Mh0.registerLoadBalancerType=V46;Mh0.registerDefaultLoadBalancerType=z46;Mh0.createLoadBalancer=U46;Mh0.isLoadBalancerNameRegistered=B46;Mh0.parseLoadBalancingConfig=wh0;Mh0.getDefaultConfig=D46;Mh0.selectLbConfigFromList=N46;var H46=h1(),F46=z6();function q46(Q,X){var Y,J,G,Z,W,K,$,H,F,q;return{createSubchannel:(J=(Y=X.createSubchannel)===null||Y===void 0?void 0:Y.bind(X))!==null&&J!==void 0?J:Q.createSubchannel.bind(Q),updateState:(Z=(G=X.updateState)===null||G===void 0?void 0:G.bind(X))!==null&&Z!==void 0?Z:Q.updateState.bind(Q),requestReresolution:(K=(W=X.requestReresolution)===null||W===void 0?void 0:W.bind(X))!==null&&K!==void 0?K:Q.requestReresolution.bind(Q),addChannelzChild:(H=($=X.addChannelzChild)===null||$===void 0?void 0:$.bind(X))!==null&&H!==void 0?H:Q.addChannelzChild.bind(Q),removeChannelzChild:(q=(F=X.removeChannelzChild)===null||F===void 0?void 0:F.bind(X))!==null&&q!==void 0?q:Q.removeChannelzChild.bind(Q)}}var BZ={},cN=null;function V46(Q,X,Y){BZ[Q]={LoadBalancer:X,LoadBalancingConfig:Y}}function z46(Q){cN=Q}function U46(Q,X){let Y=Q.getLoadBalancerName();if(Y in BZ)return new BZ[Y].LoadBalancer(X);else return null}function B46(Q){return Q in BZ}function wh0(Q){let X=Object.keys(Q);if(X.length!==1)throw Error("Provided load balancing config has multiple conflicting entries");let Y=X[0];if(Y in BZ)try{return BZ[Y].LoadBalancingConfig.createFromJson(Q[Y])}catch(J){throw Error(`${Y}: ${J.message}`)}else throw Error(`Unrecognized load balancing config name ${Y}`)}function D46(){if(!cN)throw Error("No default load balancer type registered");return new BZ[cN].LoadBalancingConfig}function N46(Q,X=!1){for(let Y of Q)try{return wh0(Y)}catch(J){(0,H46.log)(F46.LogVerbosity.DEBUG,"Config parsing failed with error",J.message);continue}if(X)if(cN)return new BZ[cN].LoadBalancingConfig;else return null;else return null}});var fi=I((Ah0)=>{Object.defineProperty(Ah0,"__esModule",{value:!0});Ah0.validateRetryThrottling=Ph0;Ah0.validateServiceConfig=Th0;Ah0.extractAndSelectServiceConfig=b46;var I46=z0("os"),w2=z6(),M2=/^\d+(\.\d{1,9})?s$/,j46="node";function C46(Q){if("service"in Q&&Q.service!==""){if(typeof Q.service!=="string")throw Error(`Invalid method config name: invalid service: expected type string, got ${typeof Q.service}`);if("method"in Q&&Q.method!==""){if(typeof Q.method!=="string")throw Error(`Invalid method config name: invalid method: expected type string, got ${typeof Q.service}`);return{service:Q.service,method:Q.method}}else return{service:Q.service}}else{if("method"in Q&&Q.method!==void 0)throw Error("Invalid method config name: method set with empty or unset service");return{}}}function R46(Q){if(!("maxAttempts"in Q)||!Number.isInteger(Q.maxAttempts)||Q.maxAttempts<2)throw Error("Invalid method config retry policy: maxAttempts must be an integer at least 2");if(!("initialBackoff"in Q)||typeof Q.initialBackoff!=="string"||!M2.test(Q.initialBackoff))throw Error("Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer or decimal followed by s");if(!("maxBackoff"in Q)||typeof Q.maxBackoff!=="string"||!M2.test(Q.maxBackoff))throw Error("Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer or decimal followed by s");if(!("backoffMultiplier"in Q)||typeof Q.backoffMultiplier!=="number"||Q.backoffMultiplier<=0)throw Error("Invalid method config retry policy: backoffMultiplier must be a number greater than 0");if(!(("retryableStatusCodes"in Q)&&Array.isArray(Q.retryableStatusCodes)))throw Error("Invalid method config retry policy: retryableStatusCodes is required");if(Q.retryableStatusCodes.length===0)throw Error("Invalid method config retry policy: retryableStatusCodes must be non-empty");for(let X of Q.retryableStatusCodes)if(typeof X==="number"){if(!Object.values(w2.Status).includes(X))throw Error("Invalid method config retry policy: retryableStatusCodes value not in status code range")}else if(typeof X==="string"){if(!Object.values(w2.Status).includes(X.toUpperCase()))throw Error("Invalid method config retry policy: retryableStatusCodes value not a status code name")}else throw Error("Invalid method config retry policy: retryableStatusCodes value must be a string or number");return{maxAttempts:Q.maxAttempts,initialBackoff:Q.initialBackoff,maxBackoff:Q.maxBackoff,backoffMultiplier:Q.backoffMultiplier,retryableStatusCodes:Q.retryableStatusCodes}}function S46(Q){if(!("maxAttempts"in Q)||!Number.isInteger(Q.maxAttempts)||Q.maxAttempts<2)throw Error("Invalid method config hedging policy: maxAttempts must be an integer at least 2");if("hedgingDelay"in Q&&(typeof Q.hedgingDelay!=="string"||!M2.test(Q.hedgingDelay)))throw Error("Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s");if("nonFatalStatusCodes"in Q&&Array.isArray(Q.nonFatalStatusCodes))for(let Y of Q.nonFatalStatusCodes)if(typeof Y==="number"){if(!Object.values(w2.Status).includes(Y))throw Error("Invalid method config hedging policy: nonFatalStatusCodes value not in status code range")}else if(typeof Y==="string"){if(!Object.values(w2.Status).includes(Y.toUpperCase()))throw Error("Invalid method config hedging policy: nonFatalStatusCodes value not a status code name")}else throw Error("Invalid method config hedging policy: nonFatalStatusCodes value must be a string or number");let X={maxAttempts:Q.maxAttempts};if(Q.hedgingDelay)X.hedgingDelay=Q.hedgingDelay;if(Q.nonFatalStatusCodes)X.nonFatalStatusCodes=Q.nonFatalStatusCodes;return X}function v46(Q){var X;let Y={name:[]};if(!("name"in Q)||!Array.isArray(Q.name))throw Error("Invalid method config: invalid name array");for(let J of Q.name)Y.name.push(C46(J));if("waitForReady"in Q){if(typeof Q.waitForReady!=="boolean")throw Error("Invalid method config: invalid waitForReady");Y.waitForReady=Q.waitForReady}if("timeout"in Q)if(typeof Q.timeout==="object"){if(!("seconds"in Q.timeout)||typeof Q.timeout.seconds!=="number")throw Error("Invalid method config: invalid timeout.seconds");if(!("nanos"in Q.timeout)||typeof Q.timeout.nanos!=="number")throw Error("Invalid method config: invalid timeout.nanos");Y.timeout=Q.timeout}else if(typeof Q.timeout==="string"&&M2.test(Q.timeout)){let J=Q.timeout.substring(0,Q.timeout.length-1).split(".");Y.timeout={seconds:J[0]|0,nanos:((X=J[1])!==null&&X!==void 0?X:0)|0}}else throw Error("Invalid method config: invalid timeout");if("maxRequestBytes"in Q){if(typeof Q.maxRequestBytes!=="number")throw Error("Invalid method config: invalid maxRequestBytes");Y.maxRequestBytes=Q.maxRequestBytes}if("maxResponseBytes"in Q){if(typeof Q.maxResponseBytes!=="number")throw Error("Invalid method config: invalid maxRequestBytes");Y.maxResponseBytes=Q.maxResponseBytes}if("retryPolicy"in Q)if("hedgingPolicy"in Q)throw Error("Invalid method config: retryPolicy and hedgingPolicy cannot both be specified");else Y.retryPolicy=R46(Q.retryPolicy);else if("hedgingPolicy"in Q)Y.hedgingPolicy=S46(Q.hedgingPolicy);return Y}function Ph0(Q){if(!("maxTokens"in Q)||typeof Q.maxTokens!=="number"||Q.maxTokens<=0||Q.maxTokens>1000)throw Error("Invalid retryThrottling: maxTokens must be a number in (0, 1000]");if(!("tokenRatio"in Q)||typeof Q.tokenRatio!=="number"||Q.tokenRatio<=0)throw Error("Invalid retryThrottling: tokenRatio must be a number greater than 0");return{maxTokens:+Q.maxTokens.toFixed(3),tokenRatio:+Q.tokenRatio.toFixed(3)}}function k46(Q){if(!(typeof Q==="object"&&Q!==null))throw Error(`Invalid loadBalancingConfig: unexpected type ${typeof Q}`);let X=Object.keys(Q);if(X.length>1)throw Error(`Invalid loadBalancingConfig: unexpected multiple keys ${X}`);if(X.length===0)throw Error("Invalid loadBalancingConfig: load balancing policy name required");return{[X[0]]:Q[X[0]]}}function Th0(Q){let X={loadBalancingConfig:[],methodConfig:[]};if("loadBalancingPolicy"in Q)if(typeof Q.loadBalancingPolicy==="string")X.loadBalancingPolicy=Q.loadBalancingPolicy;else throw Error("Invalid service config: invalid loadBalancingPolicy");if("loadBalancingConfig"in Q)if(Array.isArray(Q.loadBalancingConfig))for(let J of Q.loadBalancingConfig)X.loadBalancingConfig.push(k46(J));else throw Error("Invalid service config: invalid loadBalancingConfig");if("methodConfig"in Q){if(Array.isArray(Q.methodConfig))for(let J of Q.methodConfig)X.methodConfig.push(v46(J))}if("retryThrottling"in Q)X.retryThrottling=Ph0(Q.retryThrottling);let Y=[];for(let J of X.methodConfig)for(let G of J.name){for(let Z of Y)if(G.service===Z.service&&G.method===Z.method)throw Error(`Invalid service config: duplicate name ${G.service}/${G.method}`);Y.push(G)}return X}function _46(Q){if(!("serviceConfig"in Q))throw Error("Invalid service config choice: missing service config");let X={serviceConfig:Th0(Q.serviceConfig)};if("clientLanguage"in Q)if(Array.isArray(Q.clientLanguage)){X.clientLanguage=[];for(let J of Q.clientLanguage)if(typeof J==="string")X.clientLanguage.push(J);else throw Error("Invalid service config choice: invalid clientLanguage")}else throw Error("Invalid service config choice: invalid clientLanguage");if("clientHostname"in Q)if(Array.isArray(Q.clientHostname)){X.clientHostname=[];for(let J of Q.clientHostname)if(typeof J==="string")X.clientHostname.push(J);else throw Error("Invalid service config choice: invalid clientHostname")}else throw Error("Invalid service config choice: invalid clientHostname");if("percentage"in Q)if(typeof Q.percentage==="number"&&0<=Q.percentage&&Q.percentage<=100)X.percentage=Q.percentage;else throw Error("Invalid service config choice: invalid percentage");let Y=["clientLanguage","percentage","clientHostname","serviceConfig"];for(let J in Q)if(!Y.includes(J))throw Error(`Invalid service config choice: unexpected field ${J}`);return X}function y46(Q,X){if(!Array.isArray(Q))throw Error("Invalid service config list");for(let Y of Q){let J=_46(Y);if(typeof J.percentage==="number"&&X>J.percentage)continue;if(Array.isArray(J.clientHostname)){let G=!1;for(let Z of J.clientHostname)if(Z===I46.hostname())G=!0;if(!G)continue}if(Array.isArray(J.clientLanguage)){let G=!1;for(let Z of J.clientLanguage)if(Z===j46)G=!0;if(!G)continue}return J.serviceConfig}throw Error("No matching service config found")}function b46(Q,X){for(let Y of Q)if(Y.length>0&&Y[0].startsWith("grpc_config=")){let J=Y.join("").substring(12),G=JSON.parse(J);return y46(G,X)}return null}});var iQ=I((Ih0)=>{Object.defineProperty(Ih0,"__esModule",{value:!0});Ih0.ConnectivityState=void 0;var Eh0;(function(Q){Q[Q.IDLE=0]="IDLE",Q[Q.CONNECTING=1]="CONNECTING",Q[Q.READY=2]="READY",Q[Q.TRANSIENT_FAILURE=3]="TRANSIENT_FAILURE",Q[Q.SHUTDOWN=4]="SHUTDOWN"})(Eh0||(Ih0.ConnectivityState=Eh0={}))});var L7=I((Sh0)=>{Object.defineProperty(Sh0,"__esModule",{value:!0});Sh0.QueuePicker=Sh0.UnavailablePicker=Sh0.PickResultType=void 0;var g46=P9(),u46=z6(),P2;(function(Q){Q[Q.COMPLETE=0]="COMPLETE",Q[Q.QUEUE=1]="QUEUE",Q[Q.TRANSIENT_FAILURE=2]="TRANSIENT_FAILURE",Q[Q.DROP=3]="DROP"})(P2||(Sh0.PickResultType=P2={}));class Ch0{constructor(Q){this.status=Object.assign({code:u46.Status.UNAVAILABLE,details:"No connection established",metadata:new g46.Metadata},Q)}pick(Q){return{pickResultType:P2.TRANSIENT_FAILURE,subchannel:null,status:this.status,onCallStarted:null,onCallEnded:null}}}Sh0.UnavailablePicker=Ch0;class Rh0{constructor(Q,X){this.loadBalancer=Q,this.childPicker=X,this.calledExitIdle=!1}pick(Q){if(!this.calledExitIdle)process.nextTick(()=>{this.loadBalancer.exitIdle()}),this.calledExitIdle=!0;if(this.childPicker)return this.childPicker.pick(Q);else return{pickResultType:P2.QUEUE,subchannel:null,status:null,onCallStarted:null,onCallEnded:null}}}Sh0.QueuePicker=Rh0});var fq=I((kh0)=>{Object.defineProperty(kh0,"__esModule",{value:!0});kh0.BackoffTimeout=void 0;var d46=z6(),p46=h1(),c46="backoff",n46=1000,i46=1.6,a46=120000,r46=0.2;function o46(Q,X){return Math.random()*(X-Q)+Q}class T2{constructor(Q,X){if(this.callback=Q,this.initialDelay=n46,this.multiplier=i46,this.maxDelay=a46,this.jitter=r46,this.running=!1,this.hasRef=!0,this.startTime=new Date,this.endTime=new Date,this.id=T2.getNextId(),X){if(X.initialDelay)this.initialDelay=X.initialDelay;if(X.multiplier)this.multiplier=X.multiplier;if(X.jitter)this.jitter=X.jitter;if(X.maxDelay)this.maxDelay=X.maxDelay}this.trace("constructed initialDelay="+this.initialDelay+" multiplier="+this.multiplier+" jitter="+this.jitter+" maxDelay="+this.maxDelay),this.nextDelay=this.initialDelay,this.timerId=setTimeout(()=>{},0),clearTimeout(this.timerId)}static getNextId(){return this.nextId++}trace(Q){p46.trace(d46.LogVerbosity.DEBUG,c46,"{"+this.id+"} "+Q)}runTimer(Q){var X,Y;if(this.trace("runTimer(delay="+Q+")"),this.endTime=this.startTime,this.endTime.setMilliseconds(this.endTime.getMilliseconds()+Q),clearTimeout(this.timerId),this.timerId=setTimeout(()=>{this.trace("timer fired"),this.running=!1,this.callback()},Q),!this.hasRef)(Y=(X=this.timerId).unref)===null||Y===void 0||Y.call(X)}runOnce(){this.trace("runOnce()"),this.running=!0,this.startTime=new Date,this.runTimer(this.nextDelay);let Q=Math.min(this.nextDelay*this.multiplier,this.maxDelay),X=Q*this.jitter;this.nextDelay=Q+o46(-X,X)}stop(){this.trace("stop()"),clearTimeout(this.timerId),this.running=!1}reset(){if(this.trace("reset() running="+this.running),this.nextDelay=this.initialDelay,this.running){let Q=new Date,X=this.startTime;if(X.setMilliseconds(X.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),Q<X)this.runTimer(X.getTime()-Q.getTime());else this.running=!1}}isRunning(){return this.running}ref(){var Q,X;this.hasRef=!0,(X=(Q=this.timerId).ref)===null||X===void 0||X.call(Q)}unref(){var Q,X;this.hasRef=!1,(X=(Q=this.timerId).unref)===null||X===void 0||X.call(Q)}getEndTime(){return this.endTime}}kh0.BackoffTimeout=T2;T2.nextId=0});var A2=I((bh0)=>{Object.defineProperty(bh0,"__esModule",{value:!0});bh0.ChildLoadBalancerHandler=void 0;var s46=DZ(),t46=iQ(),e46="child_load_balancer_helper";class yh0{constructor(Q){this.channelControlHelper=Q,this.currentChild=null,this.pendingChild=null,this.latestConfig=null,this.ChildPolicyHelper=class{constructor(X){this.parent=X,this.child=null}createSubchannel(X,Y){return this.parent.channelControlHelper.createSubchannel(X,Y)}updateState(X,Y,J){var G;if(this.calledByPendingChild()){if(X===t46.ConnectivityState.CONNECTING)return;(G=this.parent.currentChild)===null||G===void 0||G.destroy(),this.parent.currentChild=this.parent.pendingChild,this.parent.pendingChild=null}else if(!this.calledByCurrentChild())return;this.parent.channelControlHelper.updateState(X,Y,J)}requestReresolution(){var X;let Y=(X=this.parent.pendingChild)!==null&&X!==void 0?X:this.parent.currentChild;if(this.child===Y)this.parent.channelControlHelper.requestReresolution()}setChild(X){this.child=X}addChannelzChild(X){this.parent.channelControlHelper.addChannelzChild(X)}removeChannelzChild(X){this.parent.channelControlHelper.removeChannelzChild(X)}calledByPendingChild(){return this.child===this.parent.pendingChild}calledByCurrentChild(){return this.child===this.parent.currentChild}}}configUpdateRequiresNewPolicyInstance(Q,X){return Q.getLoadBalancerName()!==X.getLoadBalancerName()}updateAddressList(Q,X,Y,J){let G;if(this.currentChild===null||this.latestConfig===null||this.configUpdateRequiresNewPolicyInstance(this.latestConfig,X)){let Z=new this.ChildPolicyHelper(this),W=(0,s46.createLoadBalancer)(X,Z);if(Z.setChild(W),this.currentChild===null)this.currentChild=W,G=this.currentChild;else{if(this.pendingChild)this.pendingChild.destroy();this.pendingChild=W,G=this.pendingChild}}else if(this.pendingChild===null)G=this.currentChild;else G=this.pendingChild;return this.latestConfig=X,G.updateAddressList(Q,X,Y,J)}exitIdle(){if(this.currentChild){if(this.currentChild.exitIdle(),this.pendingChild)this.pendingChild.exitIdle()}}resetBackoff(){if(this.currentChild){if(this.currentChild.resetBackoff(),this.pendingChild)this.pendingChild.resetBackoff()}}destroy(){if(this.currentChild)this.currentChild.destroy(),this.currentChild=null;if(this.pendingChild)this.pendingChild.destroy(),this.pendingChild=null}getTypeName(){return e46}}bh0.ChildLoadBalancerHandler=yh0});var lh0=I((uh0)=>{Object.defineProperty(uh0,"__esModule",{value:!0});uh0.ResolvingLoadBalancer=void 0;var Q66=DZ(),X66=fi(),PX=iQ(),hh0=hJ(),nN=L7(),Y66=fq(),hi=z6(),J66=P9(),G66=h1(),W66=z6(),Z66=nQ(),K66=A2(),$66="resolving_load_balancer";function xh0(Q){G66.trace(W66.LogVerbosity.DEBUG,$66,Q)}var H66=["SERVICE_AND_METHOD","SERVICE","EMPTY"];function F66(Q,X,Y,J){for(let G of Y.name)switch(J){case"EMPTY":if(!G.service&&!G.method)return!0;break;case"SERVICE":if(G.service===Q&&!G.method)return!0;break;case"SERVICE_AND_METHOD":if(G.service===Q&&G.method===X)return!0}return!1}function q66(Q,X,Y,J){for(let G of Y)if(F66(Q,X,G,J))return G;return null}function V66(Q){return{invoke(X,Y){var J,G;let Z=X.split("/").filter(($)=>$.length>0),W=(J=Z[0])!==null&&J!==void 0?J:"",K=(G=Z[1])!==null&&G!==void 0?G:"";if(Q&&Q.methodConfig)for(let $ of H66){let H=q66(W,K,Q.methodConfig,$);if(H)return{methodConfig:H,pickInformation:{},status:hi.Status.OK,dynamicFilterFactories:[]}}return{methodConfig:{name:[]},pickInformation:{},status:hi.Status.OK,dynamicFilterFactories:[]}},unref(){}}}class gh0{constructor(Q,X,Y,J,G){if(this.target=Q,this.channelControlHelper=X,this.channelOptions=Y,this.onSuccessfulResolution=J,this.onFailedResolution=G,this.latestChildState=PX.ConnectivityState.IDLE,this.latestChildPicker=new nN.QueuePicker(this),this.latestChildErrorMessage=null,this.currentState=PX.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1,Y["grpc.service_config"])this.defaultServiceConfig=(0,X66.validateServiceConfig)(JSON.parse(Y["grpc.service_config"]));else this.defaultServiceConfig={loadBalancingConfig:[],methodConfig:[]};this.updateState(PX.ConnectivityState.IDLE,new nN.QueuePicker(this),null),this.childLoadBalancer=new K66.ChildLoadBalancerHandler({createSubchannel:X.createSubchannel.bind(X),requestReresolution:()=>{if(this.backoffTimeout.isRunning())xh0("requestReresolution delayed by backoff timer until "+this.backoffTimeout.getEndTime().toISOString()),this.continueResolving=!0;else this.updateResolution()},updateState:(W,K,$)=>{this.latestChildState=W,this.latestChildPicker=K,this.latestChildErrorMessage=$,this.updateState(W,K,$)},addChannelzChild:X.addChannelzChild.bind(X),removeChannelzChild:X.removeChannelzChild.bind(X)}),this.innerResolver=(0,hh0.createResolver)(Q,this.handleResolverResult.bind(this),Y);let Z={initialDelay:Y["grpc.initial_reconnect_backoff_ms"],maxDelay:Y["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new Y66.BackoffTimeout(()=>{if(this.continueResolving)this.updateResolution(),this.continueResolving=!1;else this.updateState(this.latestChildState,this.latestChildPicker,this.latestChildErrorMessage)},Z),this.backoffTimeout.unref()}handleResolverResult(Q,X,Y,J){var G,Z;this.backoffTimeout.stop(),this.backoffTimeout.reset();let W=!0,K=null;if(Y===null)K=this.defaultServiceConfig;else if(Y.ok)K=Y.value;else if(this.previousServiceConfig!==null)K=this.previousServiceConfig;else W=!1,this.handleResolutionFailure(Y.error);if(K!==null){let $=(G=K===null||K===void 0?void 0:K.loadBalancingConfig)!==null&&G!==void 0?G:[],H=(0,Q66.selectLbConfigFromList)($,!0);if(H===null)W=!1,this.handleResolutionFailure({code:hi.Status.UNAVAILABLE,details:"All load balancer options in service config are not compatible",metadata:new J66.Metadata});else W=this.childLoadBalancer.updateAddressList(Q,H,Object.assign(Object.assign({},this.channelOptions),X),J)}if(W)this.onSuccessfulResolution(K,(Z=X[hh0.CHANNEL_ARGS_CONFIG_SELECTOR_KEY])!==null&&Z!==void 0?Z:V66(K));return W}updateResolution(){if(this.innerResolver.updateResolution(),this.currentState===PX.ConnectivityState.IDLE)this.updateState(PX.ConnectivityState.CONNECTING,this.latestChildPicker,this.latestChildErrorMessage);this.backoffTimeout.runOnce()}updateState(Q,X,Y){if(xh0((0,Z66.uriToString)(this.target)+" "+PX.ConnectivityState[this.currentState]+" -> "+PX.ConnectivityState[Q]),Q===PX.ConnectivityState.IDLE)X=new nN.QueuePicker(this,X);this.currentState=Q,this.channelControlHelper.updateState(Q,X,Y)}handleResolutionFailure(Q){if(this.latestChildState===PX.ConnectivityState.IDLE)this.updateState(PX.ConnectivityState.TRANSIENT_FAILURE,new nN.UnavailablePicker(Q),Q.details),this.onFailedResolution(Q)}exitIdle(){if(this.currentState===PX.ConnectivityState.IDLE||this.currentState===PX.ConnectivityState.TRANSIENT_FAILURE)if(this.backoffTimeout.isRunning())this.continueResolving=!0;else this.updateResolution();this.childLoadBalancer.exitIdle()}updateAddressList(Q,X){throw Error("updateAddressList not supported on ResolvingLoadBalancer")}resetBackoff(){this.backoffTimeout.reset(),this.childLoadBalancer.resetBackoff()}destroy(){this.childLoadBalancer.destroy(),this.innerResolver.destroy(),this.backoffTimeout.reset(),this.backoffTimeout.stop(),this.latestChildState=PX.ConnectivityState.IDLE,this.latestChildPicker=new nN.QueuePicker(this),this.currentState=PX.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1}getTypeName(){return"resolving_load_balancer"}}uh0.ResolvingLoadBalancer=gh0});var ch0=I((dh0)=>{Object.defineProperty(dh0,"__esModule",{value:!0});dh0.recognizedOptions=void 0;dh0.channelOptionsEqual=z66;dh0.recognizedOptions={"grpc.ssl_target_name_override":!0,"grpc.primary_user_agent":!0,"grpc.secondary_user_agent":!0,"grpc.default_authority":!0,"grpc.keepalive_time_ms":!0,"grpc.keepalive_timeout_ms":!0,"grpc.keepalive_permit_without_calls":!0,"grpc.service_config":!0,"grpc.max_concurrent_streams":!0,"grpc.initial_reconnect_backoff_ms":!0,"grpc.max_reconnect_backoff_ms":!0,"grpc.use_local_subchannel_pool":!0,"grpc.max_send_message_length":!0,"grpc.max_receive_message_length":!0,"grpc.enable_http_proxy":!0,"grpc.enable_channelz":!0,"grpc.dns_min_time_between_resolutions_ms":!0,"grpc.enable_retries":!0,"grpc.per_rpc_retry_buffer_size":!0,"grpc.retry_buffer_size":!0,"grpc.max_connection_age_ms":!0,"grpc.max_connection_age_grace_ms":!0,"grpc-node.max_session_memory":!0,"grpc.service_config_disable_resolution":!0,"grpc.client_idle_timeout_ms":!0,"grpc-node.tls_enable_trace":!0,"grpc.lb.ring_hash.ring_size_cap":!0,"grpc-node.retry_max_attempts_limit":!0,"grpc-node.flow_control_window":!0,"grpc.server_call_metric_recording":!0};function z66(Q,X){let Y=Object.keys(Q).sort(),J=Object.keys(X).sort();if(Y.length!==J.length)return!1;for(let G=0;G<Y.length;G+=1){if(Y[G]!==J[G])return!1;if(Q[Y[G]]!==X[J[G]])return!1}return!0}});var TX=I((oh0)=>{Object.defineProperty(oh0,"__esModule",{value:!0});oh0.EndpointMap=void 0;oh0.isTcpSubchannelAddress=aN;oh0.subchannelAddressEqual=E2;oh0.subchannelAddressToString=ih0;oh0.stringToSubchannelAddress=D66;oh0.endpointEqual=N66;oh0.endpointToString=O66;oh0.endpointHasAddress=ah0;var nh0=z0("net");function aN(Q){return"port"in Q}function E2(Q,X){if(!Q&&!X)return!0;if(!Q||!X)return!1;if(aN(Q))return aN(X)&&Q.host===X.host&&Q.port===X.port;else return!aN(X)&&Q.path===X.path}function ih0(Q){if(aN(Q))if((0,nh0.isIPv6)(Q.host))return"["+Q.host+"]:"+Q.port;else return Q.host+":"+Q.port;else return Q.path}var B66=443;function D66(Q,X){if((0,nh0.isIP)(Q))return{host:Q,port:X!==null&&X!==void 0?X:B66};else return{path:Q}}function N66(Q,X){if(Q.addresses.length!==X.addresses.length)return!1;for(let Y=0;Y<Q.addresses.length;Y++)if(!E2(Q.addresses[Y],X.addresses[Y]))return!1;return!0}function O66(Q){return"["+Q.addresses.map(ih0).join(", ")+"]"}function ah0(Q,X){for(let Y of Q.addresses)if(E2(Y,X))return!0;return!1}function iN(Q,X){if(Q.addresses.length!==X.addresses.length)return!1;for(let Y of Q.addresses){let J=!1;for(let G of X.addresses)if(E2(Y,G)){J=!0;break}if(!J)return!1}return!0}class rh0{constructor(){this.map=new Set}get size(){return this.map.size}getForSubchannelAddress(Q){for(let X of this.map)if(ah0(X.key,Q))return X.value;return}deleteMissing(Q){let X=[];for(let Y of this.map){let J=!1;for(let G of Q)if(iN(G,Y.key))J=!0;if(!J)X.push(Y.value),this.map.delete(Y)}return X}get(Q){for(let X of this.map)if(iN(Q,X.key))return X.value;return}set(Q,X){for(let Y of this.map)if(iN(Q,Y.key)){Y.value=X;return}this.map.add({key:Q,value:X})}delete(Q){for(let X of this.map)if(iN(Q,X.key)){this.map.delete(X);return}}has(Q){for(let X of this.map)if(iN(Q,X.key))return!0;return!1}clear(){this.map.clear()}*keys(){for(let Q of this.map)yield Q.key}*values(){for(let Q of this.map)yield Q.value}*entries(){for(let Q of this.map)yield[Q.key,Q.value]}}oh0.EndpointMap=rh0});var Zx0=I((Wx0)=>{Object.defineProperty(Wx0,"t",{value:!0});class xi{constructor(Q,X,Y=1){this.i=void 0,this.h=void 0,this.o=void 0,this.u=Q,this.l=X,this.p=Y}I(){let Q=this,X=Q.o.o===Q;if(X&&Q.p===1)Q=Q.h;else if(Q.i){Q=Q.i;while(Q.h)Q=Q.h}else{if(X)return Q.o;let Y=Q.o;while(Y.i===Q)Q=Y,Y=Q.o;Q=Y}return Q}B(){let Q=this;if(Q.h){Q=Q.h;while(Q.i)Q=Q.i;return Q}else{let X=Q.o;while(X.h===Q)Q=X,X=Q.o;if(Q.h!==X)return X;else return Q}}_(){let Q=this.o,X=this.h,Y=X.i;if(Q.o===this)Q.o=X;else if(Q.i===this)Q.i=X;else Q.h=X;if(X.o=Q,X.i=this,this.o=X,this.h=Y,Y)Y.o=this;return X}g(){let Q=this.o,X=this.i,Y=X.h;if(Q.o===this)Q.o=X;else if(Q.i===this)Q.i=X;else Q.h=X;if(X.o=Q,X.h=this,this.o=X,this.i=Y,Y)Y.o=this;return X}}class th0 extends xi{constructor(){super(...arguments);this.M=1}_(){let Q=super._();return this.O(),Q.O(),Q}g(){let Q=super.g();return this.O(),Q.O(),Q}O(){if(this.M=1,this.i)this.M+=this.i.M;if(this.h)this.M+=this.h.M}}class eh0{constructor(Q=0){this.iteratorType=Q}equals(Q){return this.T===Q.T}}class Qx0{constructor(){this.m=0}get length(){return this.m}size(){return this.m}empty(){return this.m===0}}class Xx0 extends Qx0{}function Z$(){throw RangeError("Iterator access denied!")}class Yx0 extends Xx0{constructor(Q=function(Y,J){if(Y<J)return-1;if(Y>J)return 1;return 0},X=!1){super();this.v=void 0,this.A=Q,this.enableIndex=X,this.N=X?th0:xi,this.C=new this.N}R(Q,X){let Y=this.C;while(Q){let J=this.A(Q.u,X);if(J<0)Q=Q.h;else if(J>0)Y=Q,Q=Q.i;else return Q}return Y}K(Q,X){let Y=this.C;while(Q)if(this.A(Q.u,X)<=0)Q=Q.h;else Y=Q,Q=Q.i;return Y}L(Q,X){let Y=this.C;while(Q){let J=this.A(Q.u,X);if(J<0)Y=Q,Q=Q.h;else if(J>0)Q=Q.i;else return Q}return Y}k(Q,X){let Y=this.C;while(Q)if(this.A(Q.u,X)<0)Y=Q,Q=Q.h;else Q=Q.i;return Y}P(Q){while(!0){let X=Q.o;if(X===this.C)return;if(Q.p===1){Q.p=0;return}if(Q===X.i){let Y=X.h;if(Y.p===1)if(Y.p=0,X.p=1,X===this.v)this.v=X._();else X._();else if(Y.h&&Y.h.p===1){if(Y.p=X.p,X.p=0,Y.h.p=0,X===this.v)this.v=X._();else X._();return}else if(Y.i&&Y.i.p===1)Y.p=1,Y.i.p=0,Y.g();else Y.p=1,Q=X}else{let Y=X.i;if(Y.p===1)if(Y.p=0,X.p=1,X===this.v)this.v=X.g();else X.g();else if(Y.i&&Y.i.p===1){if(Y.p=X.p,X.p=0,Y.i.p=0,X===this.v)this.v=X.g();else X.g();return}else if(Y.h&&Y.h.p===1)Y.p=1,Y.h.p=0,Y._();else Y.p=1,Q=X}}}S(Q){if(this.m===1){this.clear();return}let X=Q;while(X.i||X.h){if(X.h){X=X.h;while(X.i)X=X.i}else X=X.i;let J=Q.u;Q.u=X.u,X.u=J;let G=Q.l;Q.l=X.l,X.l=G,Q=X}if(this.C.i===X)this.C.i=X.o;else if(this.C.h===X)this.C.h=X.o;this.P(X);let Y=X.o;if(X===Y.i)Y.i=void 0;else Y.h=void 0;if(this.m-=1,this.v.p=0,this.enableIndex)while(Y!==this.C)Y.M-=1,Y=Y.o}U(Q){let X=typeof Q==="number"?Q:void 0,Y=typeof Q==="function"?Q:void 0,J=typeof Q>"u"?[]:void 0,G=0,Z=this.v,W=[];while(W.length||Z)if(Z)W.push(Z),Z=Z.i;else{if(Z=W.pop(),G===X)return Z;J&&J.push(Z),Y&&Y(Z,G,this),G+=1,Z=Z.h}return J}j(Q){while(!0){let X=Q.o;if(X.p===0)return;let Y=X.o;if(X===Y.i){let J=Y.h;if(J&&J.p===1){if(J.p=X.p=0,Y===this.v)return;Y.p=1,Q=Y;continue}else if(Q===X.h){if(Q.p=0,Q.i)Q.i.o=X;if(Q.h)Q.h.o=Y;if(X.h=Q.i,Y.i=Q.h,Q.i=X,Q.h=Y,Y===this.v)this.v=Q,this.C.o=Q;else{let G=Y.o;if(G.i===Y)G.i=Q;else G.h=Q}Q.o=Y.o,X.o=Q,Y.o=Q,Y.p=1}else{if(X.p=0,Y===this.v)this.v=Y.g();else Y.g();Y.p=1;return}}else{let J=Y.i;if(J&&J.p===1){if(J.p=X.p=0,Y===this.v)return;Y.p=1,Q=Y;continue}else if(Q===X.i){if(Q.p=0,Q.i)Q.i.o=Y;if(Q.h)Q.h.o=X;if(Y.h=Q.i,X.i=Q.h,Q.i=Y,Q.h=X,Y===this.v)this.v=Q,this.C.o=Q;else{let G=Y.o;if(G.i===Y)G.i=Q;else G.h=Q}Q.o=Y.o,X.o=Q,Y.o=Q,Y.p=1}else{if(X.p=0,Y===this.v)this.v=Y._();else Y._();Y.p=1;return}}if(this.enableIndex)X.O(),Y.O(),Q.O();return}}q(Q,X,Y){if(this.v===void 0)return this.m+=1,this.v=new this.N(Q,X,0),this.v.o=this.C,this.C.o=this.C.i=this.C.h=this.v,this.m;let J,G=this.C.i,Z=this.A(G.u,Q);if(Z===0)return G.l=X,this.m;else if(Z>0)G.i=new this.N(Q,X),G.i.o=G,J=G.i,this.C.i=J;else{let W=this.C.h,K=this.A(W.u,Q);if(K===0)return W.l=X,this.m;else if(K<0)W.h=new this.N(Q,X),W.h.o=W,J=W.h,this.C.h=J;else{if(Y!==void 0){let $=Y.T;if($!==this.C){let H=this.A($.u,Q);if(H===0)return $.l=X,this.m;else if(H>0){let F=$.I(),q=this.A(F.u,Q);if(q===0)return F.l=X,this.m;else if(q<0)if(J=new this.N(Q,X),F.h===void 0)F.h=J,J.o=F;else $.i=J,J.o=$}}}if(J===void 0){J=this.v;while(!0){let $=this.A(J.u,Q);if($>0){if(J.i===void 0){J.i=new this.N(Q,X),J.i.o=J,J=J.i;break}J=J.i}else if($<0){if(J.h===void 0){J.h=new this.N(Q,X),J.h.o=J,J=J.h;break}J=J.h}else return J.l=X,this.m}}}}if(this.enableIndex){let W=J.o;while(W!==this.C)W.M+=1,W=W.o}return this.j(J),this.m+=1,this.m}H(Q,X){while(Q){let Y=this.A(Q.u,X);if(Y<0)Q=Q.h;else if(Y>0)Q=Q.i;else return Q}return Q||this.C}clear(){this.m=0,this.v=void 0,this.C.o=void 0,this.C.i=this.C.h=void 0}updateKeyByIterator(Q,X){let Y=Q.T;if(Y===this.C)Z$();if(this.m===1)return Y.u=X,!0;let J=Y.B().u;if(Y===this.C.i){if(this.A(J,X)>0)return Y.u=X,!0;return!1}let G=Y.I().u;if(Y===this.C.h){if(this.A(G,X)<0)return Y.u=X,!0;return!1}if(this.A(G,X)>=0||this.A(J,X)<=0)return!1;return Y.u=X,!0}eraseElementByPos(Q){if(Q<0||Q>this.m-1)throw RangeError();let X=this.U(Q);return this.S(X),this.m}eraseElementByKey(Q){if(this.m===0)return!1;let X=this.H(this.v,Q);if(X===this.C)return!1;return this.S(X),!0}eraseElementByIterator(Q){let X=Q.T;if(X===this.C)Z$();let Y=X.h===void 0;if(Q.iteratorType===0){if(Y)Q.next()}else if(!Y||X.i===void 0)Q.next();return this.S(X),Q}getHeight(){if(this.m===0)return 0;function Q(X){if(!X)return 0;return Math.max(Q(X.i),Q(X.h))+1}return Q(this.v)}}class Jx0 extends eh0{constructor(Q,X,Y){super(Y);if(this.T=Q,this.C=X,this.iteratorType===0)this.pre=function(){if(this.T===this.C.i)Z$();return this.T=this.T.I(),this},this.next=function(){if(this.T===this.C)Z$();return this.T=this.T.B(),this};else this.pre=function(){if(this.T===this.C.h)Z$();return this.T=this.T.B(),this},this.next=function(){if(this.T===this.C)Z$();return this.T=this.T.I(),this}}get index(){let Q=this.T,X=this.C.o;if(Q===this.C){if(X)return X.M-1;return 0}let Y=0;if(Q.i)Y+=Q.i.M;while(Q!==X){let J=Q.o;if(Q===J.h){if(Y+=1,J.i)Y+=J.i.M}Q=J}return Y}isAccessible(){return this.T!==this.C}}class xJ extends Jx0{constructor(Q,X,Y,J){super(Q,X,J);this.container=Y}get pointer(){if(this.T===this.C)Z$();let Q=this;return new Proxy([],{get(X,Y){if(Y==="0")return Q.T.u;else if(Y==="1")return Q.T.l;return X[0]=Q.T.u,X[1]=Q.T.l,X[Y]},set(X,Y,J){if(Y!=="1")throw TypeError("prop must be 1");return Q.T.l=J,!0}})}copy(){return new xJ(this.T,this.C,this.container,this.iteratorType)}}class Gx0 extends Yx0{constructor(Q=[],X,Y){super(X,Y);let J=this;Q.forEach(function(G){J.setElement(G[0],G[1])})}begin(){return new xJ(this.C.i||this.C,this.C,this)}end(){return new xJ(this.C,this.C,this)}rBegin(){return new xJ(this.C.h||this.C,this.C,this,1)}rEnd(){return new xJ(this.C,this.C,this,1)}front(){if(this.m===0)return;let Q=this.C.i;return[Q.u,Q.l]}back(){if(this.m===0)return;let Q=this.C.h;return[Q.u,Q.l]}lowerBound(Q){let X=this.R(this.v,Q);return new xJ(X,this.C,this)}upperBound(Q){let X=this.K(this.v,Q);return new xJ(X,this.C,this)}reverseLowerBound(Q){let X=this.L(this.v,Q);return new xJ(X,this.C,this)}reverseUpperBound(Q){let X=this.k(this.v,Q);return new xJ(X,this.C,this)}forEach(Q){this.U(function(X,Y,J){Q([X.u,X.l],Y,J)})}setElement(Q,X,Y){return this.q(Q,X,Y)}getElementByPos(Q){if(Q<0||Q>this.m-1)throw RangeError();let X=this.U(Q);return[X.u,X.l]}find(Q){let X=this.H(this.v,Q);return new xJ(X,this.C,this)}getElementByKey(Q){return this.H(this.v,Q).l}union(Q){let X=this;return Q.forEach(function(Y){X.setElement(Y[0],Y[1])}),this.m}*[Symbol.iterator](){let Q=this.m,X=this.U();for(let Y=0;Y<Q;++Y){let J=X[Y];yield[J.u,J.l]}}}Wx0.OrderedMap=Gx0});var I2=I(($x0)=>{Object.defineProperty($x0,"__esModule",{value:!0});$x0.registerAdminService=j66;$x0.addAdminServicesToServer=C66;var Kx0=[];function j66(Q,X){Kx0.push({getServiceDefinition:Q,getHandlers:X})}function C66(Q){for(let{getServiceDefinition:X,getHandlers:Y}of Kx0)Q.addService(X(),Y())}});var Bx0=I((zx0)=>{Object.defineProperty(zx0,"__esModule",{value:!0});zx0.ClientDuplexStreamImpl=zx0.ClientWritableStreamImpl=zx0.ClientReadableStreamImpl=zx0.ClientUnaryCallImpl=void 0;zx0.callErrorFromStatus=k66;var v66=z0("events"),gi=z0("stream"),rN=z6();function k66(Q,X){let Y=`${Q.code} ${rN.Status[Q.code]}: ${Q.details}`,G=`${Error(Y).stack}
|
|
212
212
|
for call at
|
|
213
213
|
${X}`;return Object.assign(Error(Y),Q,{stack:G})}class Hx0 extends v66.EventEmitter{constructor(){super()}cancel(){var Q;(Q=this.call)===null||Q===void 0||Q.cancelWithStatus(rN.Status.CANCELLED,"Cancelled on client")}getPeer(){var Q,X;return(X=(Q=this.call)===null||Q===void 0?void 0:Q.getPeer())!==null&&X!==void 0?X:"unknown"}getAuthContext(){var Q,X;return(X=(Q=this.call)===null||Q===void 0?void 0:Q.getAuthContext())!==null&&X!==void 0?X:null}}zx0.ClientUnaryCallImpl=Hx0;class Fx0 extends gi.Readable{constructor(Q){super({objectMode:!0});this.deserialize=Q}cancel(){var Q;(Q=this.call)===null||Q===void 0||Q.cancelWithStatus(rN.Status.CANCELLED,"Cancelled on client")}getPeer(){var Q,X;return(X=(Q=this.call)===null||Q===void 0?void 0:Q.getPeer())!==null&&X!==void 0?X:"unknown"}getAuthContext(){var Q,X;return(X=(Q=this.call)===null||Q===void 0?void 0:Q.getAuthContext())!==null&&X!==void 0?X:null}_read(Q){var X;(X=this.call)===null||X===void 0||X.startRead()}}zx0.ClientReadableStreamImpl=Fx0;class qx0 extends gi.Writable{constructor(Q){super({objectMode:!0});this.serialize=Q}cancel(){var Q;(Q=this.call)===null||Q===void 0||Q.cancelWithStatus(rN.Status.CANCELLED,"Cancelled on client")}getPeer(){var Q,X;return(X=(Q=this.call)===null||Q===void 0?void 0:Q.getPeer())!==null&&X!==void 0?X:"unknown"}getAuthContext(){var Q,X;return(X=(Q=this.call)===null||Q===void 0?void 0:Q.getAuthContext())!==null&&X!==void 0?X:null}_write(Q,X,Y){var J;let G={callback:Y},Z=Number(X);if(!Number.isNaN(Z))G.flags=Z;(J=this.call)===null||J===void 0||J.sendMessageWithContext(G,Q)}_final(Q){var X;(X=this.call)===null||X===void 0||X.halfClose(),Q()}}zx0.ClientWritableStreamImpl=qx0;class Vx0 extends gi.Duplex{constructor(Q,X){super({objectMode:!0});this.serialize=Q,this.deserialize=X}cancel(){var Q;(Q=this.call)===null||Q===void 0||Q.cancelWithStatus(rN.Status.CANCELLED,"Cancelled on client")}getPeer(){var Q,X;return(X=(Q=this.call)===null||Q===void 0?void 0:Q.getPeer())!==null&&X!==void 0?X:"unknown"}getAuthContext(){var Q,X;return(X=(Q=this.call)===null||Q===void 0?void 0:Q.getAuthContext())!==null&&X!==void 0?X:null}_read(Q){var X;(X=this.call)===null||X===void 0||X.startRead()}_write(Q,X,Y){var J;let G={callback:Y},Z=Number(X);if(!Number.isNaN(Z))G.flags=Z;(J=this.call)===null||J===void 0||J.sendMessageWithContext(G,Q)}_final(Q){var X;(X=this.call)===null||X===void 0||X.halfClose(),Q()}}zx0.ClientDuplexStreamImpl=Vx0});var K$=I((Nx0)=>{Object.defineProperty(Nx0,"__esModule",{value:!0});Nx0.InterceptingListenerImpl=void 0;Nx0.statusOrFromValue=x66;Nx0.statusOrFromError=g66;Nx0.isInterceptingListener=u66;var h66=P9();function x66(Q){return{ok:!0,value:Q}}function g66(Q){var X;return{ok:!1,error:Object.assign(Object.assign({},Q),{metadata:(X=Q.metadata)!==null&&X!==void 0?X:new h66.Metadata})}}function u66(Q){return Q.onReceiveMetadata!==void 0&&Q.onReceiveMetadata.length===1}class Dx0{constructor(Q,X){this.listener=Q,this.nextListener=X,this.processingMetadata=!1,this.hasPendingMessage=!1,this.processingMessage=!1,this.pendingStatus=null}processPendingMessage(){if(this.hasPendingMessage)this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1}processPendingStatus(){if(this.pendingStatus)this.nextListener.onReceiveStatus(this.pendingStatus)}onReceiveMetadata(Q){this.processingMetadata=!0,this.listener.onReceiveMetadata(Q,(X)=>{this.processingMetadata=!1,this.nextListener.onReceiveMetadata(X),this.processPendingMessage(),this.processPendingStatus()})}onReceiveMessage(Q){this.processingMessage=!0,this.listener.onReceiveMessage(Q,(X)=>{if(this.processingMessage=!1,this.processingMetadata)this.pendingMessage=X,this.hasPendingMessage=!0;else this.nextListener.onReceiveMessage(X),this.processPendingStatus()})}onReceiveStatus(Q){this.listener.onReceiveStatus(Q,(X)=>{if(this.processingMetadata||this.processingMessage)this.pendingStatus=X;else this.nextListener.onReceiveStatus(X)})}}Nx0.InterceptingListenerImpl=Dx0});var li=I((jx0)=>{Object.defineProperty(jx0,"__esModule",{value:!0});jx0.InterceptingCall=jx0.RequesterBuilder=jx0.ListenerBuilder=jx0.InterceptorConfigurationError=void 0;jx0.getInterceptingCall=i66;var p66=P9(),Lx0=K$(),wx0=z6(),Mx0=V2();class sN extends Error{constructor(Q){super(Q);this.name="InterceptorConfigurationError",Error.captureStackTrace(this,sN)}}jx0.InterceptorConfigurationError=sN;class Px0{constructor(){this.metadata=void 0,this.message=void 0,this.status=void 0}withOnReceiveMetadata(Q){return this.metadata=Q,this}withOnReceiveMessage(Q){return this.message=Q,this}withOnReceiveStatus(Q){return this.status=Q,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveStatus:this.status}}}jx0.ListenerBuilder=Px0;class Tx0{constructor(){this.start=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withStart(Q){return this.start=Q,this}withSendMessage(Q){return this.message=Q,this}withHalfClose(Q){return this.halfClose=Q,this}withCancel(Q){return this.cancel=Q,this}build(){return{start:this.start,sendMessage:this.message,halfClose:this.halfClose,cancel:this.cancel}}}jx0.RequesterBuilder=Tx0;var ui={onReceiveMetadata:(Q,X)=>{X(Q)},onReceiveMessage:(Q,X)=>{X(Q)},onReceiveStatus:(Q,X)=>{X(Q)}},oN={start:(Q,X,Y)=>{Y(Q,X)},sendMessage:(Q,X)=>{X(Q)},halfClose:(Q)=>{Q()},cancel:(Q)=>{Q()}};class Ax0{constructor(Q,X){var Y,J,G,Z;if(this.nextCall=Q,this.processingMetadata=!1,this.pendingMessageContext=null,this.processingMessage=!1,this.pendingHalfClose=!1,X)this.requester={start:(Y=X.start)!==null&&Y!==void 0?Y:oN.start,sendMessage:(J=X.sendMessage)!==null&&J!==void 0?J:oN.sendMessage,halfClose:(G=X.halfClose)!==null&&G!==void 0?G:oN.halfClose,cancel:(Z=X.cancel)!==null&&Z!==void 0?Z:oN.cancel};else this.requester=oN}cancelWithStatus(Q,X){this.requester.cancel(()=>{this.nextCall.cancelWithStatus(Q,X)})}getPeer(){return this.nextCall.getPeer()}processPendingMessage(){if(this.pendingMessageContext)this.nextCall.sendMessageWithContext(this.pendingMessageContext,this.pendingMessage),this.pendingMessageContext=null,this.pendingMessage=null}processPendingHalfClose(){if(this.pendingHalfClose)this.nextCall.halfClose()}start(Q,X){var Y,J,G,Z,W,K;let $={onReceiveMetadata:(J=(Y=X===null||X===void 0?void 0:X.onReceiveMetadata)===null||Y===void 0?void 0:Y.bind(X))!==null&&J!==void 0?J:(H)=>{},onReceiveMessage:(Z=(G=X===null||X===void 0?void 0:X.onReceiveMessage)===null||G===void 0?void 0:G.bind(X))!==null&&Z!==void 0?Z:(H)=>{},onReceiveStatus:(K=(W=X===null||X===void 0?void 0:X.onReceiveStatus)===null||W===void 0?void 0:W.bind(X))!==null&&K!==void 0?K:(H)=>{}};this.processingMetadata=!0,this.requester.start(Q,$,(H,F)=>{var q,V,U;this.processingMetadata=!1;let D;if((0,Lx0.isInterceptingListener)(F))D=F;else{let N={onReceiveMetadata:(q=F.onReceiveMetadata)!==null&&q!==void 0?q:ui.onReceiveMetadata,onReceiveMessage:(V=F.onReceiveMessage)!==null&&V!==void 0?V:ui.onReceiveMessage,onReceiveStatus:(U=F.onReceiveStatus)!==null&&U!==void 0?U:ui.onReceiveStatus};D=new Lx0.InterceptingListenerImpl(N,$)}this.nextCall.start(H,D),this.processPendingMessage(),this.processPendingHalfClose()})}sendMessageWithContext(Q,X){this.processingMessage=!0,this.requester.sendMessage(X,(Y)=>{if(this.processingMessage=!1,this.processingMetadata)this.pendingMessageContext=Q,this.pendingMessage=X;else this.nextCall.sendMessageWithContext(Q,Y),this.processPendingHalfClose()})}sendMessage(Q){this.sendMessageWithContext({},Q)}startRead(){this.nextCall.startRead()}halfClose(){this.requester.halfClose(()=>{if(this.processingMetadata||this.processingMessage)this.pendingHalfClose=!0;else this.nextCall.halfClose()})}getAuthContext(){return this.nextCall.getAuthContext()}}jx0.InterceptingCall=Ax0;function c66(Q,X,Y){var J,G;let Z=(J=Y.deadline)!==null&&J!==void 0?J:1/0,W=Y.host,K=(G=Y.parent)!==null&&G!==void 0?G:null,$=Y.propagate_flags,H=Y.credentials,F=Q.createCall(X,Z,W,K,$);if(H)F.setCredentials(H);return F}class mi{constructor(Q,X){this.call=Q,this.methodDefinition=X}cancelWithStatus(Q,X){this.call.cancelWithStatus(Q,X)}getPeer(){return this.call.getPeer()}sendMessageWithContext(Q,X){let Y;try{Y=this.methodDefinition.requestSerialize(X)}catch(J){this.call.cancelWithStatus(wx0.Status.INTERNAL,`Request message serialization failure: ${(0,Mx0.getErrorMessage)(J)}`);return}this.call.sendMessageWithContext(Q,Y)}sendMessage(Q){this.sendMessageWithContext({},Q)}start(Q,X){let Y=null;this.call.start(Q,{onReceiveMetadata:(J)=>{var G;(G=X===null||X===void 0?void 0:X.onReceiveMetadata)===null||G===void 0||G.call(X,J)},onReceiveMessage:(J)=>{var G;let Z;try{Z=this.methodDefinition.responseDeserialize(J)}catch(W){Y={code:wx0.Status.INTERNAL,details:`Response message parsing error: ${(0,Mx0.getErrorMessage)(W)}`,metadata:new p66.Metadata},this.call.cancelWithStatus(Y.code,Y.details);return}(G=X===null||X===void 0?void 0:X.onReceiveMessage)===null||G===void 0||G.call(X,Z)},onReceiveStatus:(J)=>{var G,Z;if(Y)(G=X===null||X===void 0?void 0:X.onReceiveStatus)===null||G===void 0||G.call(X,Y);else(Z=X===null||X===void 0?void 0:X.onReceiveStatus)===null||Z===void 0||Z.call(X,J)}})}startRead(){this.call.startRead()}halfClose(){this.call.halfClose()}getAuthContext(){return this.call.getAuthContext()}}class Ex0 extends mi{constructor(Q,X){super(Q,X)}start(Q,X){var Y,J;let G=!1,Z={onReceiveMetadata:(J=(Y=X===null||X===void 0?void 0:X.onReceiveMetadata)===null||Y===void 0?void 0:Y.bind(X))!==null&&J!==void 0?J:(W)=>{},onReceiveMessage:(W)=>{var K;G=!0,(K=X===null||X===void 0?void 0:X.onReceiveMessage)===null||K===void 0||K.call(X,W)},onReceiveStatus:(W)=>{var K,$;if(!G)(K=X===null||X===void 0?void 0:X.onReceiveMessage)===null||K===void 0||K.call(X,null);($=X===null||X===void 0?void 0:X.onReceiveStatus)===null||$===void 0||$.call(X,W)}};super.start(Q,Z),this.call.startRead()}}class Ix0 extends mi{}function n66(Q,X,Y){let J=c66(Q,Y.path,X);if(Y.responseStream)return new Ix0(J,Y);else return new Ex0(J,Y)}function i66(Q,X,Y,J){if(Q.clientInterceptors.length>0&&Q.clientInterceptorProviders.length>0)throw new sN("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(Q.callInterceptors.length>0&&Q.callInterceptorProviders.length>0)throw new sN("Both interceptors and interceptor_providers were passed as call options. Only one of these is allowed.");let G=[];if(Q.callInterceptors.length>0||Q.callInterceptorProviders.length>0)G=[].concat(Q.callInterceptors,Q.callInterceptorProviders.map((K)=>K(X))).filter((K)=>K);else G=[].concat(Q.clientInterceptors,Q.clientInterceptorProviders.map((K)=>K(X))).filter((K)=>K);let Z=Object.assign({},Y,{method_definition:X});return G.reduceRight((K,$)=>{return(H)=>$(H,K)},(K)=>n66(J,K,X))(Z)}});var pi=I((Sx0)=>{Object.defineProperty(Sx0,"__esModule",{value:!0});Sx0.Client=void 0;var QG=Bx0(),t66=ci(),e66=iQ(),NZ=z6(),hq=P9(),j2=li(),gJ=Symbol(),xq=Symbol(),gq=Symbol(),w7=Symbol();function di(Q){return typeof Q==="function"}function uq(Q){var X;return((X=Q.stack)===null||X===void 0?void 0:X.split(`
|
|
214
214
|
`).slice(1).join(`
|
|
@@ -1048,7 +1048,7 @@ Please refer to the documentation here: https://better-auth.com/docs/plugins/org
|
|
|
1048
1048
|
</script>
|
|
1049
1049
|
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference" ${J}></script>
|
|
1050
1050
|
</body>
|
|
1051
|
-
</html>`},Jd=(Q)=>{let X=Q?.path??"/reference";return{id:"open-api",endpoints:{generateOpenAPISchema:R0("/open-api/generate-schema",{method:"GET"},async(Y)=>{let J=await QH0(Y.context,Y.context.options);return Y.json(J)}),openAPIReference:R0(X,{method:"GET",metadata:{isAction:!1}},async(Y)=>{if(Q?.disableDefaultReference)throw new p("NOT_FOUND");let J=await QH0(Y.context,Y.context.options);return new Response(qT4(J,Q?.theme,Q?.nonce),{headers:{"Content-Type":"text/html"}})})}}};HQ();z5();A8();K9();e0();var es6=g6(async()=>{return{}}),Qt6=g6({use:[c1]},async(Q)=>{return{session:Q.context.session}}),Xt6=z1({YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_SLUG_ALREADY_TAKEN:"Organization slug already taken",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER:"You cannot leave the organization without an owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION:"Email verification required before accepting or rejecting invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"You are not allowed to invite a user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached",USER_IS_NOT_A_MEMBER_OF_THE_TEAM:"User is not a member of the team",YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM:"You are not allowed to list the members of this team",YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM:"You do not have an active team",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER:"You are not allowed to create a new member",YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER:"You are not allowed to remove a team member",YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION:"You are not allowed to access this organization as an owner",YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION:"You are not a member of this organization",MISSING_AC_INSTANCE:"Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information",YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE:"You must be in an organization to create a role",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE:"You are not allowed to create a role",YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE:"You are not allowed to update a role",YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE:"You are not allowed to delete a role",YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE:"You are not allowed to read a role",YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE:"You are not allowed to list a role",YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE:"You are not allowed to get a role",TOO_MANY_ROLES:"This organization has too many roles",INVALID_RESOURCE:"The provided permission includes an invalid resource",ROLE_NAME_IS_ALREADY_TAKEN:"That role name is already taken",CANNOT_DELETE_A_PRE_DEFINED_ROLE:"Cannot delete a pre-defined role"});var Yt6=Number.POSITIVE_INFINITY;var YH0=M(),zT4=W4(["pending","accepted","rejected","canceled"]).default("pending"),Jt6=m({id:M().default(h8),name:M(),slug:M(),logo:M().nullish().optional(),metadata:l0(M(),i6()).or(M().transform((Q)=>JSON.parse(Q))).optional(),createdAt:f4()}),Gt6=m({id:M().default(h8),organizationId:M(),userId:E4.string(),role:YH0,createdAt:f4().default(()=>new Date)}),Wt6=m({id:M().default(h8),organizationId:M(),email:M(),role:YH0,status:zT4,teamId:M().nullish(),inviterId:M(),expiresAt:f4(),createdAt:f4().default(()=>new Date)}),Zt6=m({id:M().default(h8),name:M().min(1),organizationId:M(),createdAt:f4(),updatedAt:f4().optional()}),Kt6=m({id:M().default(h8),teamId:M(),userId:M(),createdAt:f4().default(()=>new Date)}),$t6=m({id:M().default(h8),organizationId:M(),role:M(),permission:l0(M(),N0(M())),createdAt:f4().default(()=>new Date),updatedAt:f4().optional()}),XH0=["admin","member","owner"],Ht6=x4([W4(XH0),N0(W4(XH0))]);a1();A8();K9();var Lt6=z1({INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",PHONE_NUMBER_NOT_EXIST:"phone number isn't registered",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified",PHONE_NUMBER_CANNOT_BE_UPDATED:"Phone number cannot be updated",SEND_OTP_NOT_IMPLEMENTED:"sendOTP not implemented",TOO_MANY_ATTEMPTS:"Too many attempts"});a1();FQ();A8();K9();X9();v1();var UT4=z1({OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"});A8();K9();var BT4=z1({INVALID_USERNAME_OR_PASSWORD:"Invalid username or password",EMAIL_NOT_VERIFIED:"Email not verified",UNEXPECTED_ERROR:"Unexpected error",USERNAME_IS_ALREADY_TAKEN:"Username is already taken. Please try another.",USERNAME_TOO_SHORT:"Username is too short",USERNAME_TOO_LONG:"Username is too long",INVALID_USERNAME:"Username is invalid",INVALID_DISPLAY_USERNAME:"Display username is invalid"});var aF={enabled:!0,batchSize:250,flushIntervalMs:300,maxQueueSize:1e4,redactor:"regex"};import{existsSync as JH0,readFileSync as GH0}from"fs";var kj={emailAndPassword:{enabled:!0}},WH0=process.env.CONFIG_PATH||"./config.json",ZH0=process.env.AUTH_CONFIG_PATH||"./auth-config.json";function DT4(){if(JH0(WH0))try{let Q=GH0(WH0,"utf-8"),X=JSON.parse(Q);return{auth:kj,monitoring:aF,...X}}catch{return{auth:kj,monitoring:aF}}if(JH0(ZH0))try{let Q=GH0(ZH0,"utf-8");return{auth:JSON.parse(Q),monitoring:aF}}catch{return{auth:kj,monitoring:aF}}return{auth:kj,monitoring:aF}}var Gd=DT4();import{existsSync as J36,mkdirSync as G36}from"fs";import{Kysely as fi0,PostgresDialect as hi0,sql as bi0}from"kysely";import{BunWorkerDialect as xi0}from"kysely-bun-worker";import*as gi0 from"path";var cY=n1(bd(),1),O41=cY.default.Client,gd=cY.default.Pool,L41=cY.default.Connection,w41=cY.default.types,M41=cY.default.Query,P41=cY.default.DatabaseError,T41=cY.default.escapeIdentifier,A41=cY.default.escapeLiteral,E41=cY.default.Result,I41=cY.default.TypeOverrides,j41=cY.default.defaults;var tR=n1(G4(),1),vi0=n1(Mi0(),1),ki0=n1(Si0(),1),_i0=n1(Mo(),1),X36=new ki0.PrometheusExporter({preventServerStart:!0}),Y36=new vi0.NodeSDK({serviceName:"mcp-mesh",traceExporter:new _i0.OTLPTraceExporter({url:process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||process.env.OTEL_EXPORTER_OTLP_ENDPOINT||"http://localhost:4318/v1/traces"}),metricReader:X36});Y36.start();var FK1=tR.trace.getTracer("mcp-mesh","1.0.0"),yi0=tR.metrics.getMeter("mcp-mesh","1.0.0");var W36=yi0.createHistogram("db.query.duration",{description:"Database query execution duration in milliseconds",unit:"ms"}),Z36=400,ui0=(Q)=>{let X={"db.statement":Q.query.sql,"db.status":Q.level==="error"?"error":"success"};if(Q.queryDurationMillis>Z36)console.error("Slow query detected:",{durationMs:Q.queryDurationMillis,sql:Q.query.sql,params:Q.query.parameters});if(W36.record(Q.queryDurationMillis,X),Q.level==="error")console.error("Query failed:",{durationMs:Q.queryDurationMillis,error:Q.error,sql:Q.query.sql})},mi0={keepAlive:!0,keepAliveInitialDelayMillis:1e4,idleTimeoutMillis:300000,connectionTimeoutMillis:30000,allowExitOnIdle:!0};function K36(Q){let X=new gd({connectionString:Q.connectionString,max:Q.options?.maxConnections||10,ssl:process.env.DATABASE_PG_SSL==="true"?!0:!1,...mi0}),Y=new hi0({pool:X});return{type:"postgres",db:new fi0({dialect:Y,log:ui0}),pool:X}}function li0(Q){if(Q===":memory:")return":memory:";if(Q.includes("://"))return new URL(Q).pathname;return Q}function di0(Q){if(Q!==":memory:"&&Q!=="/"&&Q){let X=Q.substring(0,Q.lastIndexOf("/"));if(X&&X!=="/"&&!J36(X))try{G36(X,{recursive:!0})}catch{return console.warn(`Failed to create directory ${X}, using in-memory database`),":memory:"}}return Q}function $36(Q){let X=li0(Q.connectionString);X=di0(X);let Y=new xi0({url:X||":memory:"}),J=new fi0({dialect:Y,log:ui0});if(X!==":memory:"&&Q.options?.enableWAL!==!1)bi0`PRAGMA journal_mode = WAL;`.execute(J).catch(()=>{});if(X!==":memory:"){let G=Q.options?.busyTimeout||5000;bi0`PRAGMA busy_timeout = ${G};`.execute(J).catch(()=>{})}return{type:"sqlite",db:J}}function pi0(Q){let X=Q||"file:./data/mesh.db";if(X===":memory:")return{type:"sqlite",connectionString:":memory:"};X=X.startsWith("/")?`file://${X}`:X;let Y=URL.canParse(X)?new URL(X):null,J=Y?.protocol.replace(":","")??X.split("://")[0];switch(J){case"postgres":case"postgresql":return{type:"postgres",connectionString:X};case"sqlite":case"file":if(!Y?.pathname)throw Error("Invalid database URL: "+X);return{type:"sqlite",connectionString:Y.pathname};default:throw Error(`Unsupported database protocol: ${J}. Supported protocols: postgres://, postgresql://, sqlite://, file://`)}}function ro(){return process.env.DATABASE_URL||`file:${gi0.join(process.cwd(),"data/mesh.db")}`}function ci0(Q){let X=pi0(Q);if(X.type==="postgres")return new hi0({pool:new gd({connectionString:X.connectionString,max:X.options?.maxConnections||10,ssl:process.env.DATABASE_PG_SSL==="true"?!0:!1,...mi0})});let Y=li0(X.connectionString);return Y=di0(Y),new xi0({url:Y||":memory:"})}function H36(Q){let X=pi0(Q);if(X.type==="postgres")return K36(X);return $36(X)}async function ni0(Q){if(await Q.db.destroy(),Q.type==="postgres"&&!Q.pool.ended)await Q.pool.end()}var ao=null;function pO(){if(!ao)ao=H36(ro());return ao}class oo{apiKey;constructor(Q){this.apiKey=Q}async sendEmail({to:Q,from:X,subject:Y,html:J}){let G=await fetch("https://api.resend.com/emails",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({to:Q,from:X,subject:Y,html:J})});if(!G.ok)throw Error(`Failed to send email: ${G.statusText}`)}}class so{apiKey;constructor(Q){this.apiKey=Q}async sendEmail({to:Q,from:X,subject:Y,html:J}){let G=await fetch("https://api.sendgrid.com/v3/mail/send",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({personalizations:[{to:[{email:Q}]}],from:{email:X},subject:Y,content:[{type:"text/html",value:J}]})});if(!G.ok){let Z=await G.text();throw Error(`Failed to send email via SendGrid: ${G.statusText} - ${Z}`)}}}var F36=(Q)=>{let X=new oo(Q.config.apiKey);return async({to:Y,subject:J,html:G})=>{await X.sendEmail({to:Y,from:Q.config.fromEmail,subject:J,html:G})}},q36=(Q)=>{let X=new so(Q.config.apiKey);return async({to:Y,subject:J,html:G})=>{await X.sendEmail({to:Y,from:Q.config.fromEmail,subject:J,html:G})}},V36={resend:F36,sendgrid:q36};function eR(Q){let X=V36[Q.provider];if(!X)throw Error(`Unknown email provider: ${Q.provider}`);return X(Q)}function QS(Q,X){return Q.find((Y)=>Y.id===X)}var ii0=(Q,X)=>{let Y=QS(X,Q.emailProviderId);if(!Y)throw Error(`Email provider with id '${Q.emailProviderId}' not found`);let J=eR(Y);return{sendMagicLink:async({email:G,url:Z})=>{await J({to:G,subject:"Magic Link",html:`<p>Click <a href="${Z}">here</a> to login</p>`})}}};YS();import{createCipheriv as z36,createDecipheriv as U36,randomBytes as si0}from"crypto";var ti0="aes-256-gcm",cO=16,ei0=16,Qa0=32;class to{key;constructor(Q){if(Buffer.from(Q,"base64").length===Qa0)this.key=Buffer.from(Q,"base64");else{let X=z0("crypto");this.key=X.createHash("sha256").update(Q).digest()}}async encrypt(Q){let X=si0(cO),Y=z36(ti0,this.key,X),J=Y.update(Q,"utf8");J=Buffer.concat([J,Y.final()]);let G=Y.getAuthTag();return Buffer.concat([X,G,J]).toString("base64")}async decrypt(Q){let X=Buffer.from(Q,"base64"),Y=X.subarray(0,cO),J=X.subarray(cO,cO+ei0),G=X.subarray(cO+ei0),Z=U36(ti0,this.key,Y);Z.setAuthTag(J);let W=Z.update(G);return W=Buffer.concat([W,Z.final()]),W.toString("utf8")}static generateKey(){return si0(Qa0).toString("base64")}}kZ();eo();var M36=["connection_headers","oauth_config","configuration_scopes","metadata","tools","bindings"];class Qs{db;vault;constructor(Q,X){this.db=Q;this.vault=X}async create(Q){let X=Q.id??JS("conn"),Y=new Date().toISOString(),J=await this.findById(X);if(J){if(J.organization_id!==Q.organization_id)throw Error("Connection ID already exists");return this.update(X,Q)}let G=await this.serializeConnection({...Q,id:Q.id??X,status:"active",created_at:Y,updated_at:Y});await this.db.insertInto("connections").values(G).execute();let Z=await this.findById(X);if(!Z)throw Error(`Failed to create connection with id: ${X}`);return Z}async findById(Q,X){let Y=this.db.selectFrom("connections").selectAll().where("id","=",Q);if(X)Y=Y.where("organization_id","=",X);let J=await Y.executeTakeFirst();return J?this.deserializeConnection(J):null}async list(Q){let X=await this.db.selectFrom("connections").selectAll().where("organization_id","=",Q).execute();return Promise.all(X.map((Y)=>this.deserializeConnection(Y)))}async update(Q,X){if(Object.keys(X).length===0){let G=await this.findById(Q);if(!G)throw Error("Connection not found");return G}let Y=await this.serializeConnection({...X,updated_at:new Date().toISOString()});await this.db.updateTable("connections").set(Y).where("id","=",Q).execute();let J=await this.findById(Q);if(!J)throw Error("Connection not found after update");return J}async delete(Q){await this.db.deleteFrom("connections").where("id","=",Q).execute()}async testConnection(Q,X){let Y=await this.findById(Q);if(!Y)throw Error("Connection not found");let J=Date.now();if(Y.connection_type==="STDIO")return{healthy:!0,latencyMs:Date.now()-J};if(!Y.connection_url)return{healthy:!1,latencyMs:Date.now()-J};try{let G=Y.connection_headers,Z=await fetch(Y.connection_url,{method:"POST",headers:{"Content-Type":"application/json",...Y.connection_token&&{Authorization:`Bearer ${Y.connection_token}`},...G?.headers,...X},body:JSON.stringify({jsonrpc:"2.0",method:"ping",id:1})});return{healthy:Z.ok||Z.status===404,latencyMs:Date.now()-J}}catch{return{healthy:!1,latencyMs:Date.now()-J}}}async serializeConnection(Q){let X={};for(let[Y,J]of Object.entries(Q)){if(J===void 0)continue;if(Y==="connection_token"&&J)X[Y]=await this.vault.encrypt(J);else if(Y==="configuration_state"&&J){let G=JSON.stringify(J);X[Y]=await this.vault.encrypt(G)}else if(Y==="connection_headers"&&J){let G=J;if(nO(G)&&G.envVars){let Z={};for(let[W,K]of Object.entries(G.envVars))Z[W]=await this.vault.encrypt(K);X[Y]=JSON.stringify({...G,envVars:Z})}else X[Y]=JSON.stringify(G)}else if(M36.includes(Y))X[Y]=J?JSON.stringify(J):null;else X[Y]=J}return X}async deserializeConnection(Q){let X=null;if(Q.connection_token)try{X=await this.vault.decrypt(Q.connection_token)}catch(Z){console.error("Failed to decrypt connection token:",Z)}let Y=null;if(Q.configuration_state)try{let Z=await this.vault.decrypt(Q.configuration_state);Y=JSON.parse(Z)}catch(Z){console.error("Failed to decrypt configuration state:",Z)}let J=null;if(Q.connection_headers)try{let Z=JSON.parse(Q.connection_headers);if(nO(Z)&&Z.envVars){let W={};for(let[K,$]of Object.entries(Z.envVars))try{W[K]=await this.vault.decrypt($)}catch{W[K]=$}J={...Z,envVars:W}}else J=Z}catch(Z){console.error("Failed to parse connection_headers:",Z)}let G=(Z)=>{if(Z===null)return null;if(typeof Z==="string")try{return JSON.parse(Z)}catch{return null}return Z};return{id:Q.id,organization_id:Q.organization_id,created_by:Q.created_by,title:Q.title,description:Q.description,icon:Q.icon,app_name:Q.app_name,app_id:Q.app_id,connection_type:Q.connection_type,connection_url:Q.connection_url,connection_token:X,connection_headers:J,oauth_config:G(Q.oauth_config),configuration_state:Y,configuration_scopes:G(Q.configuration_scopes),metadata:G(Q.metadata),tools:G(Q.tools),bindings:G(Q.bindings),status:Q.status,created_at:Q.created_at,updated_at:Q.updated_at}}}Qk();e0();function VM6(Q){return[{permissions:{self:["*"]},getTools:async()=>{let{ALL_TOOLS:X}=await Promise.resolve().then(() => (w14(),L14));return X.map((Y)=>{return{name:Y.name,inputSchema:w.toJSONSchema(Y.inputSchema,{unrepresentable:"any"}),outputSchema:Y.outputSchema?w.toJSONSchema(Y.outputSchema,{unrepresentable:"any"}):void 0,description:Y.description}})},data:oi0(process.env.BASE_URL||"http://localhost:3000")},{data:ri0()},{data:ai0(Q)}]}async function M14(Q,X){try{let Y=pO(),J=new to(process.env.ENCRYPTION_KEY||""),G=new Qs(Y.db,J),Z=VM6(Q);await Promise.all(Z.map(async(W)=>{let K=null;if(W.permissions)K=(await Gz.api.createApiKey({body:{name:`${W.data.app_name??crypto.randomUUID()}-mcp`,userId:X,permissions:W.permissions,rateLimitEnabled:!1,metadata:{organization:{id:Q},purpose:"default-org-connections"}}}))?.key;let $=await W.getTools?.()??await tV({id:"pending",title:W.data.title,connection_type:W.data.connection_type,connection_url:W.data.connection_url,connection_token:W.data.connection_token,connection_headers:W.data.connection_headers}).catch(()=>null),H=W.data.id?W.data.id.startsWith(`${Q}_`)?W.data.id:`${Q}_${W.data.id}`:void 0,F=await G.create({...W.data,id:H,tools:$,organization_id:Q,created_by:X,connection_token:W.data.connection_token??K})}))}catch(Y){console.error("Error creating default MCP connections:",Y)}}var P14=["owner","admin"];var zM6=(Q)=>{return{defaultSSO:[{domain:Q.domain,providerId:Q.providerId,oidcConfig:{issuer:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/v2.0`,pkce:!0,clientId:Q.MS_CLIENT_ID,clientSecret:Q.MS_CLIENT_SECRET,discoveryEndpoint:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/v2.0/.well-known/openid-configuration`,authorizationEndpoint:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/oauth2/v2.0/authorize`,tokenEndpoint:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/oauth2/v2.0/token`,jwksEndpoint:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/discovery/v2.0/keys`,userInfoEndpoint:"https://graph.microsoft.com/oidc/userinfo",tokenEndpointAuthentication:"client_secret_post",scopes:Q.scopes,mapping:{id:"sub",email:"email",emailVerified:"email_verified",name:"name",image:"picture",extraFields:{emailVerified:"email_verified"}}}}]}},T14=(Q)=>{if(Q.providerId==="microsoft")return zM6(Q);throw Error(`Unsupported provider: ${Q.providerId}`)};function UM6(Q){return Q.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var A14=["labs","agent","studio","workspace","systems","core","cloud","works"],E14=["capybara","guarana","deco","samba","feijoada","capoeira","carnival"];function BM6(){let Q=Math.floor(Math.random()*E14.length),X=Math.floor(Math.random()*A14.length),Y=E14[Q]??"deco",J=A14[X]??"studio";return`${Y}-${J}`}var DM6=Object.values(Ux()).map((Q)=>Q.map((X)=>X.name)).flat(),NM6={...Oj,self:["*",...DM6]},Hk=c5(NM6),OM6=Hk.newRole({self:["*"],...fD.statements}),LM6=Hk.newRole({self:["*"],...fD.statements}),wM6=Hk.newRole({self:["*"],...fD.statements}),I14=Object.values(Ux()).map((Q)=>Q.map((X)=>`self:${X.name}`)).flat(),qY=Gd.auth,j14=void 0;if(qY.inviteEmailProviderId&&qY.emailProviders&&qY.emailProviders.length>0){let Q=QS(qY.emailProviders,qY.inviteEmailProviderId);if(Q){let X=eR(Q);j14=async(Y)=>{let J=Y.inviter.user?.name||Y.inviter.user?.email,G=`${process.env.BASE_URL||"http://localhost:3000"}/auth/accept-invitation?invitationId=${Y.invitation.id}`;await X({to:Y.email,subject:`Invitation to join ${Y.organization.name}`,html:`
|
|
1051
|
+
</html>`},Jd=(Q)=>{let X=Q?.path??"/reference";return{id:"open-api",endpoints:{generateOpenAPISchema:R0("/open-api/generate-schema",{method:"GET"},async(Y)=>{let J=await QH0(Y.context,Y.context.options);return Y.json(J)}),openAPIReference:R0(X,{method:"GET",metadata:{isAction:!1}},async(Y)=>{if(Q?.disableDefaultReference)throw new p("NOT_FOUND");let J=await QH0(Y.context,Y.context.options);return new Response(qT4(J,Q?.theme,Q?.nonce),{headers:{"Content-Type":"text/html"}})})}}};HQ();z5();A8();K9();e0();var es6=g6(async()=>{return{}}),Qt6=g6({use:[c1]},async(Q)=>{return{session:Q.context.session}}),Xt6=z1({YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_SLUG_ALREADY_TAKEN:"Organization slug already taken",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER:"You cannot leave the organization without an owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION:"Email verification required before accepting or rejecting invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"You are not allowed to invite a user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached",USER_IS_NOT_A_MEMBER_OF_THE_TEAM:"User is not a member of the team",YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM:"You are not allowed to list the members of this team",YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM:"You do not have an active team",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER:"You are not allowed to create a new member",YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER:"You are not allowed to remove a team member",YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION:"You are not allowed to access this organization as an owner",YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION:"You are not a member of this organization",MISSING_AC_INSTANCE:"Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information",YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE:"You must be in an organization to create a role",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE:"You are not allowed to create a role",YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE:"You are not allowed to update a role",YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE:"You are not allowed to delete a role",YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE:"You are not allowed to read a role",YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE:"You are not allowed to list a role",YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE:"You are not allowed to get a role",TOO_MANY_ROLES:"This organization has too many roles",INVALID_RESOURCE:"The provided permission includes an invalid resource",ROLE_NAME_IS_ALREADY_TAKEN:"That role name is already taken",CANNOT_DELETE_A_PRE_DEFINED_ROLE:"Cannot delete a pre-defined role"});var Yt6=Number.POSITIVE_INFINITY;var YH0=M(),zT4=W4(["pending","accepted","rejected","canceled"]).default("pending"),Jt6=m({id:M().default(h8),name:M(),slug:M(),logo:M().nullish().optional(),metadata:l0(M(),i6()).or(M().transform((Q)=>JSON.parse(Q))).optional(),createdAt:f4()}),Gt6=m({id:M().default(h8),organizationId:M(),userId:E4.string(),role:YH0,createdAt:f4().default(()=>new Date)}),Wt6=m({id:M().default(h8),organizationId:M(),email:M(),role:YH0,status:zT4,teamId:M().nullish(),inviterId:M(),expiresAt:f4(),createdAt:f4().default(()=>new Date)}),Zt6=m({id:M().default(h8),name:M().min(1),organizationId:M(),createdAt:f4(),updatedAt:f4().optional()}),Kt6=m({id:M().default(h8),teamId:M(),userId:M(),createdAt:f4().default(()=>new Date)}),$t6=m({id:M().default(h8),organizationId:M(),role:M(),permission:l0(M(),N0(M())),createdAt:f4().default(()=>new Date),updatedAt:f4().optional()}),XH0=["admin","member","owner"],Ht6=x4([W4(XH0),N0(W4(XH0))]);a1();A8();K9();var Lt6=z1({INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",PHONE_NUMBER_NOT_EXIST:"phone number isn't registered",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified",PHONE_NUMBER_CANNOT_BE_UPDATED:"Phone number cannot be updated",SEND_OTP_NOT_IMPLEMENTED:"sendOTP not implemented",TOO_MANY_ATTEMPTS:"Too many attempts"});a1();FQ();A8();K9();X9();v1();var UT4=z1({OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"});A8();K9();var BT4=z1({INVALID_USERNAME_OR_PASSWORD:"Invalid username or password",EMAIL_NOT_VERIFIED:"Email not verified",UNEXPECTED_ERROR:"Unexpected error",USERNAME_IS_ALREADY_TAKEN:"Username is already taken. Please try another.",USERNAME_TOO_SHORT:"Username is too short",USERNAME_TOO_LONG:"Username is too long",INVALID_USERNAME:"Username is invalid",INVALID_DISPLAY_USERNAME:"Display username is invalid"});var aF={enabled:!0,batchSize:250,flushIntervalMs:300,maxQueueSize:1e4,redactor:"regex"};import{existsSync as JH0,readFileSync as GH0}from"fs";var kj={emailAndPassword:{enabled:!0}},WH0=process.env.CONFIG_PATH||"./config.json",ZH0=process.env.AUTH_CONFIG_PATH||"./auth-config.json";function DT4(){if(JH0(WH0))try{let Q=GH0(WH0,"utf-8"),X=JSON.parse(Q);return{auth:kj,monitoring:aF,...X}}catch{return{auth:kj,monitoring:aF}}if(JH0(ZH0))try{let Q=GH0(ZH0,"utf-8");return{auth:JSON.parse(Q),monitoring:aF}}catch{return{auth:kj,monitoring:aF}}return{auth:kj,monitoring:aF}}var Gd=DT4();import{existsSync as J36,mkdirSync as G36}from"fs";import{Kysely as fi0,PostgresDialect as hi0,sql as bi0}from"kysely";import{BunWorkerDialect as xi0}from"kysely-bun-worker";import*as gi0 from"path";var cY=n1(bd(),1),O41=cY.default.Client,gd=cY.default.Pool,L41=cY.default.Connection,w41=cY.default.types,M41=cY.default.Query,P41=cY.default.DatabaseError,T41=cY.default.escapeIdentifier,A41=cY.default.escapeLiteral,E41=cY.default.Result,I41=cY.default.TypeOverrides,j41=cY.default.defaults;var tR=n1(G4(),1),vi0=n1(Mi0(),1),ki0=n1(Si0(),1),_i0=n1(Mo(),1),X36=new ki0.PrometheusExporter({preventServerStart:!0}),Y36=new vi0.NodeSDK({serviceName:"mcp-mesh",traceExporter:new _i0.OTLPTraceExporter({url:process.env.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||process.env.OTEL_EXPORTER_OTLP_ENDPOINT||"http://localhost:4318/v1/traces"}),metricReader:X36});Y36.start();var FK1=tR.trace.getTracer("mcp-mesh","1.0.0"),yi0=tR.metrics.getMeter("mcp-mesh","1.0.0");var W36=yi0.createHistogram("db.query.duration",{description:"Database query execution duration in milliseconds",unit:"ms"}),Z36=400,ui0=(Q)=>{let X={"db.statement":Q.query.sql,"db.status":Q.level==="error"?"error":"success"};if(Q.queryDurationMillis>Z36)console.error("Slow query detected:",{durationMs:Q.queryDurationMillis,sql:Q.query.sql,params:Q.query.parameters});if(W36.record(Q.queryDurationMillis,X),Q.level==="error")console.error("Query failed:",{durationMs:Q.queryDurationMillis,error:Q.error,sql:Q.query.sql})},mi0={keepAlive:!0,keepAliveInitialDelayMillis:1e4,idleTimeoutMillis:300000,connectionTimeoutMillis:30000,allowExitOnIdle:!0};function K36(Q){let X=new gd({connectionString:Q.connectionString,max:Q.options?.maxConnections||10,ssl:process.env.DATABASE_PG_SSL==="true"?!0:!1,...mi0}),Y=new hi0({pool:X});return{type:"postgres",db:new fi0({dialect:Y,log:ui0}),pool:X}}function li0(Q){if(Q===":memory:")return":memory:";if(Q.includes("://"))return new URL(Q).pathname;return Q}function di0(Q){if(Q!==":memory:"&&Q!=="/"&&Q){let X=Q.substring(0,Q.lastIndexOf("/"));if(X&&X!=="/"&&!J36(X))try{G36(X,{recursive:!0})}catch{return console.warn(`Failed to create directory ${X}, using in-memory database`),":memory:"}}return Q}function $36(Q){let X=li0(Q.connectionString);X=di0(X);let Y=new xi0({url:X||":memory:"}),J=new fi0({dialect:Y,log:ui0});if(X!==":memory:"&&Q.options?.enableWAL!==!1)bi0`PRAGMA journal_mode = WAL;`.execute(J).catch(()=>{});if(X!==":memory:"){let G=Q.options?.busyTimeout||5000;bi0`PRAGMA busy_timeout = ${G};`.execute(J).catch(()=>{})}return{type:"sqlite",db:J}}function pi0(Q){let X=Q||"file:./data/mesh.db";if(X===":memory:")return{type:"sqlite",connectionString:":memory:"};X=X.startsWith("/")?`file://${X}`:X;let Y=URL.canParse(X)?new URL(X):null,J=Y?.protocol.replace(":","")??X.split("://")[0];switch(J){case"postgres":case"postgresql":return{type:"postgres",connectionString:X};case"sqlite":case"file":if(!Y?.pathname)throw Error("Invalid database URL: "+X);return{type:"sqlite",connectionString:Y.pathname};default:throw Error(`Unsupported database protocol: ${J}. Supported protocols: postgres://, postgresql://, sqlite://, file://`)}}function ro(){return process.env.DATABASE_URL||`file:${gi0.join(process.cwd(),"data/mesh.db")}`}function ci0(Q){let X=pi0(Q);if(X.type==="postgres")return new hi0({pool:new gd({connectionString:X.connectionString,max:X.options?.maxConnections||10,ssl:process.env.DATABASE_PG_SSL==="true"?!0:!1,...mi0})});let Y=li0(X.connectionString);return Y=di0(Y),new xi0({url:Y||":memory:"})}function H36(Q){let X=pi0(Q);if(X.type==="postgres")return K36(X);return $36(X)}async function ni0(Q){if(await Q.db.destroy(),Q.type==="postgres"&&!Q.pool.ended)await Q.pool.end()}var ao=null;function pO(){if(!ao)ao=H36(ro());return ao}class oo{apiKey;constructor(Q){this.apiKey=Q}async sendEmail({to:Q,from:X,subject:Y,html:J}){let G=await fetch("https://api.resend.com/emails",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({to:Q,from:X,subject:Y,html:J})});if(!G.ok)throw Error(`Failed to send email: ${G.statusText}`)}}class so{apiKey;constructor(Q){this.apiKey=Q}async sendEmail({to:Q,from:X,subject:Y,html:J}){let G=await fetch("https://api.sendgrid.com/v3/mail/send",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.apiKey}`},body:JSON.stringify({personalizations:[{to:[{email:Q}]}],from:{email:X},subject:Y,content:[{type:"text/html",value:J}]})});if(!G.ok){let Z=await G.text();throw Error(`Failed to send email via SendGrid: ${G.statusText} - ${Z}`)}}}var F36=(Q)=>{let X=new oo(Q.config.apiKey);return async({to:Y,subject:J,html:G})=>{await X.sendEmail({to:Y,from:Q.config.fromEmail,subject:J,html:G})}},q36=(Q)=>{let X=new so(Q.config.apiKey);return async({to:Y,subject:J,html:G})=>{await X.sendEmail({to:Y,from:Q.config.fromEmail,subject:J,html:G})}},V36={resend:F36,sendgrid:q36};function eR(Q){let X=V36[Q.provider];if(!X)throw Error(`Unknown email provider: ${Q.provider}`);return X(Q)}function QS(Q,X){return Q.find((Y)=>Y.id===X)}var ii0=(Q,X)=>{let Y=QS(X,Q.emailProviderId);if(!Y)throw Error(`Email provider with id '${Q.emailProviderId}' not found`);let J=eR(Y);return{sendMagicLink:async({email:G,url:Z})=>{await J({to:G,subject:"Magic Link",html:`<p>Click <a href="${Z}">here</a> to login</p>`})}}};YS();import{createCipheriv as z36,createDecipheriv as U36,randomBytes as si0}from"crypto";var ti0="aes-256-gcm",cO=16,ei0=16,Qa0=32;class to{key;constructor(Q){if(Buffer.from(Q,"base64").length===Qa0)this.key=Buffer.from(Q,"base64");else{let X=z0("crypto");this.key=X.createHash("sha256").update(Q).digest()}}async encrypt(Q){let X=si0(cO),Y=z36(ti0,this.key,X),J=Y.update(Q,"utf8");J=Buffer.concat([J,Y.final()]);let G=Y.getAuthTag();return Buffer.concat([X,G,J]).toString("base64")}async decrypt(Q){let X=Buffer.from(Q,"base64"),Y=X.subarray(0,cO),J=X.subarray(cO,cO+ei0),G=X.subarray(cO+ei0),Z=U36(ti0,this.key,Y);Z.setAuthTag(J);let W=Z.update(G);return W=Buffer.concat([W,Z.final()]),W.toString("utf8")}static generateKey(){return si0(Qa0).toString("base64")}}kZ();eo();var M36=["connection_headers","oauth_config","configuration_scopes","metadata","tools","bindings"];class Qs{db;vault;constructor(Q,X){this.db=Q;this.vault=X}async create(Q){let X=Q.id??JS("conn"),Y=new Date().toISOString(),J=await this.findById(X);if(J){if(J.organization_id!==Q.organization_id)throw Error("Connection ID already exists");return this.update(X,Q)}let G=await this.serializeConnection({...Q,id:Q.id??X,status:"active",created_at:Y,updated_at:Y});await this.db.insertInto("connections").values(G).execute();let Z=await this.findById(X);if(!Z)throw Error(`Failed to create connection with id: ${X}`);return Z}async findById(Q,X){let Y=this.db.selectFrom("connections").selectAll().where("id","=",Q);if(X)Y=Y.where("organization_id","=",X);let J=await Y.executeTakeFirst();return J?this.deserializeConnection(J):null}async list(Q){let X=await this.db.selectFrom("connections").selectAll().where("organization_id","=",Q).execute();return Promise.all(X.map((Y)=>this.deserializeConnection(Y)))}async update(Q,X){if(Object.keys(X).length===0){let G=await this.findById(Q);if(!G)throw Error("Connection not found");return G}let Y=await this.serializeConnection({...X,updated_at:new Date().toISOString()});await this.db.updateTable("connections").set(Y).where("id","=",Q).execute();let J=await this.findById(Q);if(!J)throw Error("Connection not found after update");return J}async delete(Q){await this.db.deleteFrom("connections").where("id","=",Q).execute()}async testConnection(Q,X){let Y=await this.findById(Q);if(!Y)throw Error("Connection not found");let J=Date.now();if(Y.connection_type==="STDIO")return{healthy:!0,latencyMs:Date.now()-J};if(!Y.connection_url)return{healthy:!1,latencyMs:Date.now()-J};try{let G=Y.connection_headers,Z=await fetch(Y.connection_url,{method:"POST",headers:{"Content-Type":"application/json",...Y.connection_token&&{Authorization:`Bearer ${Y.connection_token}`},...G?.headers,...X},body:JSON.stringify({jsonrpc:"2.0",method:"ping",id:1})});return{healthy:Z.ok||Z.status===404,latencyMs:Date.now()-J}}catch{return{healthy:!1,latencyMs:Date.now()-J}}}async serializeConnection(Q){let X={};for(let[Y,J]of Object.entries(Q)){if(J===void 0)continue;if(Y==="connection_token"&&J)X[Y]=await this.vault.encrypt(J);else if(Y==="configuration_state"&&J){let G=JSON.stringify(J);X[Y]=await this.vault.encrypt(G)}else if(Y==="connection_headers"&&J){let G=J;if(nO(G)&&G.envVars){let Z={};for(let[W,K]of Object.entries(G.envVars))Z[W]=await this.vault.encrypt(K);X[Y]=JSON.stringify({...G,envVars:Z})}else X[Y]=JSON.stringify(G)}else if(M36.includes(Y))X[Y]=J?JSON.stringify(J):null;else X[Y]=J}return X}async deserializeConnection(Q){let X=null;if(Q.connection_token)try{X=await this.vault.decrypt(Q.connection_token)}catch(Z){console.error("Failed to decrypt connection token:",Z)}let Y=null;if(Q.configuration_state)try{let Z=await this.vault.decrypt(Q.configuration_state);Y=JSON.parse(Z)}catch(Z){console.error("Failed to decrypt configuration state:",Z)}let J=null;if(Q.connection_headers)try{let Z=JSON.parse(Q.connection_headers);if(nO(Z)&&Z.envVars){let W={};for(let[K,$]of Object.entries(Z.envVars))try{W[K]=await this.vault.decrypt($)}catch{W[K]=$}J={...Z,envVars:W}}else J=Z}catch(Z){console.error("Failed to parse connection_headers:",Z)}let G=(Z)=>{if(Z===null)return null;if(typeof Z==="string")try{return JSON.parse(Z)}catch{return null}return Z};return{id:Q.id,organization_id:Q.organization_id,created_by:Q.created_by,title:Q.title,description:Q.description,icon:Q.icon,app_name:Q.app_name,app_id:Q.app_id,connection_type:Q.connection_type,connection_url:Q.connection_url,connection_token:X,connection_headers:J,oauth_config:G(Q.oauth_config),configuration_state:Y,configuration_scopes:G(Q.configuration_scopes),metadata:G(Q.metadata),tools:G(Q.tools),bindings:G(Q.bindings),status:Q.status,created_at:Q.created_at,updated_at:Q.updated_at}}}Qk();e0();function VM6(Q){return[{permissions:{self:["*"]},getTools:async()=>{let{ALL_TOOLS:X}=await Promise.resolve().then(() => (w14(),L14));return X.map((Y)=>{return{name:Y.name,inputSchema:w.toJSONSchema(Y.inputSchema,{unrepresentable:"any"}),outputSchema:Y.outputSchema?w.toJSONSchema(Y.outputSchema,{unrepresentable:"any"}):void 0,description:Y.description}})},data:oi0(process.env.BASE_URL||"http://localhost:3000")},{data:ri0()},{data:ai0(Q)}]}async function M14(Q,X){try{let Y=pO(),J=new to(process.env.ENCRYPTION_KEY||""),G=new Qs(Y.db,J),Z=VM6(Q);await Promise.all(Z.map(async(W)=>{let K=null;if(W.permissions)K=(await Gz.api.createApiKey({body:{name:`${W.data.app_name??crypto.randomUUID()}-mcp`,userId:X,permissions:W.permissions,rateLimitEnabled:!1,metadata:{organization:{id:Q},purpose:"default-org-connections"}}}))?.key;let $=await W.getTools?.()??await tV({id:"pending",title:W.data.title,connection_type:W.data.connection_type,connection_url:W.data.connection_url,connection_token:W.data.connection_token,connection_headers:W.data.connection_headers}).catch(()=>null),H=W.data.id?W.data.id.startsWith(`${Q}_`)?W.data.id:`${Q}_${W.data.id}`:void 0;await G.create({...W.data,id:H,tools:$,organization_id:Q,created_by:X,connection_token:W.data.connection_token??K})}))}catch(Y){console.error("Error creating default MCP connections:",Y)}}var P14=["owner","admin"];var zM6=(Q)=>{return{defaultSSO:[{domain:Q.domain,providerId:Q.providerId,oidcConfig:{issuer:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/v2.0`,pkce:!0,clientId:Q.MS_CLIENT_ID,clientSecret:Q.MS_CLIENT_SECRET,discoveryEndpoint:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/v2.0/.well-known/openid-configuration`,authorizationEndpoint:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/oauth2/v2.0/authorize`,tokenEndpoint:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/oauth2/v2.0/token`,jwksEndpoint:`https://login.microsoftonline.com/${Q.MS_TENANT_ID}/discovery/v2.0/keys`,userInfoEndpoint:"https://graph.microsoft.com/oidc/userinfo",tokenEndpointAuthentication:"client_secret_post",scopes:Q.scopes,mapping:{id:"sub",email:"email",emailVerified:"email_verified",name:"name",image:"picture",extraFields:{emailVerified:"email_verified"}}}}]}},T14=(Q)=>{if(Q.providerId==="microsoft")return zM6(Q);throw Error(`Unsupported provider: ${Q.providerId}`)};function UM6(Q){return Q.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var A14=["labs","agent","studio","workspace","systems","core","cloud","works"],E14=["capybara","guarana","deco","samba","feijoada","capoeira","carnival"];function BM6(){let Q=Math.floor(Math.random()*E14.length),X=Math.floor(Math.random()*A14.length),Y=E14[Q]??"deco",J=A14[X]??"studio";return`${Y}-${J}`}var DM6=Object.values(Ux()).map((Q)=>Q.map((X)=>X.name)).flat(),NM6={...Oj,self:["*",...DM6]},Hk=c5(NM6),OM6=Hk.newRole({self:["*"],...fD.statements}),LM6=Hk.newRole({self:["*"],...fD.statements}),wM6=Hk.newRole({self:["*"],...fD.statements}),I14=Object.values(Ux()).map((Q)=>Q.map((X)=>`self:${X.name}`)).flat(),qY=Gd.auth,j14=void 0;if(qY.inviteEmailProviderId&&qY.emailProviders&&qY.emailProviders.length>0){let Q=QS(qY.emailProviders,qY.inviteEmailProviderId);if(Q){let X=eR(Q);j14=async(Y)=>{let J=Y.inviter.user?.name||Y.inviter.user?.email,G=`${process.env.BASE_URL||"http://localhost:3000"}/auth/accept-invitation?invitationId=${Y.invitation.id}`;await X({to:Y.email,subject:`Invitation to join ${Y.organization.name}`,html:`
|
|
1052
1052
|
<h2>You've been invited!</h2>
|
|
1053
1053
|
<p>${J} has invited you to join <strong>${Y.organization.name}</strong>.</p>
|
|
1054
1054
|
<p><a href="${G}">Click here to accept the invitation</a></p>
|