import{d as e,f as t,l as n,p as r,s as i,u as a}from"./trace-api-CiCjX4Sz.js";var o=class e{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let t=this._entries.get(e);if(t)return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let e of t)n._entries.delete(e);return n}clear(){return new e}},s=Symbol(`BaggageEntryMetadata`),c=a.instance();function l(e={}){return new o(new Map(Object.entries(e)))}function u(e){return typeof e!=`string`&&(c.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=``),{__TYPE__:s,toString(){return e}}}var d={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},f={set(e,t,n){e!=null&&(e[t]=n)}},p=i.getInstance(),m=class{inject(e,t){}extract(e,t){return e}fields(){return[]}},h=n(`OpenTelemetry Baggage Key`);function g(e){return e.getValue(h)||void 0}function _(){return g(i.getInstance().active())}function v(e,t){return e.setValue(h,t)}function y(e){return e.deleteValue(h)}var b=`propagation`,x=new m,S=class n{constructor(){this.createBaggage=l,this.getBaggage=g,this.getActiveBaggage=_,this.setBaggage=v,this.deleteBaggage=y}static getInstance(){return this._instance||=new n,this._instance}setGlobalPropagator(e){return t(b,e,a.instance())}inject(e,t,n=f){return this._getGlobalPropagator().inject(e,t,n)}extract(e,t,n=d){return this._getGlobalPropagator().extract(e,t,n)}fields(){return this._getGlobalPropagator().fields()}disable(){r(b,a.instance())}_getGlobalPropagator(){return e(b)||x}}.getInstance();export{p as n,u as r,S as t};