@icanbwell/composite 1.1311.3 → 1.1312.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/655.index.js +2 -2
- package/655.index.js.map +1 -1
- package/index.js +1 -1
- package/native.js +1 -1
- package/package.json +3 -3
package/655.index.js
CHANGED
|
@@ -13792,7 +13792,7 @@ End of stack for Error object`:u.name+": "+u.message}return u});function s(o){re
|
|
|
13792
13792
|
NoResponse
|
|
13793
13793
|
}
|
|
13794
13794
|
}
|
|
13795
|
-
`));var T4e,b4e,C4e,Yre,R4e,O4e,nR,Qre;const lPt=(t,e={})=>{const r=O4e(),[n,i]=b4e({data:void 0,error:void 0,loading:!e.skip,networkStatus:e.skip?nR.ready:nR.loading}),s=C4e(!0),a=Yre(()=>e,[JSON.stringify(e)]),o=Yre(()=>t,[t]);return R4e(()=>{if(a.skip){i({data:void 0,error:void 0,loading:!1,networkStatus:nR.ready});return}return T4e(void 0,void 0,void 0,function*(){i(c=>Object.assign(Object.assign({},c),{loading:!0,error:null}));try{const c=yield r.query(Object.assign({query:o},a));s.current&&i(c)}catch(c){s.current&&i({data:void 0,loading:!1,error:c instanceof Qre?c:new Qre({errorMessage:c.message}),networkStatus:nR.error})}}),()=>{s.current=!1}},[o,a,r]),n};var Wre,iR,cs,P4e,I4e,M4e,w4e,N4e,D4e,Kre,Zre,L4e,$4e,x4e,U4e,F4e,k4e,G4e,V4e,B4e,j4e,z4e,H4e,q4e,Y4e,Q4e,W4e,K4e,Z4e,X4e;const dPt=t=>cs(P4e,t),fPt=t=>cs(I4e,t),hPt=t=>cs(M4e,t),pPt=t=>cs(w4e,t),_Pt=t=>cs(N4e,t),mPt=t=>cs(D4e,t),gPt=t=>cs(Kre,t),vPt=t=>Wre(Kre,t),SPt=t=>cs(Zre,t),yPt=t=>Wre(Zre,t),EPt=t=>cs(L4e,t),APt=t=>cs($4e,t),TPt=t=>cs(x4e,t),bPt=t=>cs(U4e,t),CPt=t=>cs(F4e,t),RPt=t=>cs(k4e,t),OPt=t=>cs(G4e,t),PPt=t=>cs(V4e,t),IPt=t=>cs(B4e,t),MPt=t=>iR(j4e,t),wPt=t=>cs(z4e,t),NPt=t=>cs(H4e,t),DPt=t=>cs(q4e,t),LPt=t=>cs(Y4e,t),$Pt=t=>iR(Q4e,t),xPt=t=>iR(W4e,t),UPt=t=>iR(K4e,t),FPt=t=>X4e(Z4e,t);var J4e,wU,sR,e6e,t6e,r6e,n6e,i6e,Xre,s6e;const kPt=t=>wU(e6e,t),GPt=t=>wU(t6e,t),VPt=t=>wU(r6e,t),BPt=t=>sR(n6e,t),jPt=t=>sR(i6e,t),zPt=t=>sR(Xre,t),HPt=t=>J4e(Xre,t),qPt=t=>sR(s6e,t);var YPt=p(82451),NU,a6e,DU,Jre,ene,tne,o6e,aR;const oR=null,QPt=t=>{const e=aR({},oR,t);return DU(Jre,e)},WPt=t=>{const e=aR({},oR,t);return NU(Jre,e)},KPt=t=>{const e=aR({},oR,t);return DU(ene,e)},ZPt=t=>{const e=aR({},oR,t);return NU(ene,e)},XPt=t=>DU(tne,t),JPt=t=>NU(tne,t),eIt=t=>a6e(o6e,t);var u6e,c6e;const rne=null;function tIt(t={}){return u6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:rne})}))}function rIt(t={}){return c6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:rne})}))}var l6e,d6e;const nne=null;function nIt(t={}){return l6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:nne})}))}function iIt(t={}){return d6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:nne})}))}var f6e,h6e;const ine=null;function sIt(t={}){return f6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:ine})}))}function aIt(t={}){return h6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:ine})}))}var sne,p6e,_6e;const oIt=t=>sne(p6e,t),uIt=t=>sne(_6e,t);var ane=p(50046),m6e=!1,one=yo,g6e=Rs,v6e=pc,S6e=Us,LU=w9,y6e=tU,E6e=Ax,A6e=IC,T6e=Cx,R_=Object.assign,une=Object.defineProperty,b6e=g6e([].concat),C6e=!R_||S6e(function(){if(one&&R_({b:1},R_(une({},"a",{enumerable:!0,get:function(){une(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(i){e[i]=i}),R_({},t)[r]!==7||LU(R_({},e)).join("")!==n})?function(e,r){for(var n=A6e(e),i=arguments.length,s=1,a=y6e.f,o=E6e.f;i>s;)for(var u=T6e(arguments[s++]),c=a?b6e(LU(u),a(u)):LU(u),l=c.length,d=0,f;l>d;)f=c[d++],(!one||v6e(o,u,f))&&(n[f]=u[f]);return n}:R_,R6e=wd,cne=C6e;R6e({target:"Object",stat:!0,arity:2,forced:Object.assign!==cne},{assign:cne});var O6e=Us,lne=!O6e(function(){return Object.isExtensible(Object.preventExtensions({}))}),P6e=uS,$U=function(t,e,r){for(var n in e)P6e(t,n,e[n],r);return t},dne={exports:{}},fne={},I6e=Rs,M6e=I6e([].slice),w6e=m_,N6e=g_,hne=xC.f,D6e=M6e,pne=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],L6e=function(t){try{return hne(t)}catch{return D6e(pne)}};fne.f=function(e){return pne&&w6e(e)==="Window"?L6e(e):hne(N6e(e))};var $6e=Us,x6e=$6e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),U6e=Us,F6e=Ta,k6e=m_,_ne=x6e,uR=Object.isExtensible,G6e=U6e(function(){uR(1)}),V6e=G6e||_ne?function(e){return!F6e(e)||_ne&&k6e(e)==="ArrayBuffer"?!1:uR?uR(e):!0}:uR,B6e=wd,j6e=Rs,z6e=wC,H6e=Ta,xU=Eo,q6e=qo.f,mne=xC,Y6e=fne,UU=V6e,Q6e=xx,W6e=lne,gne=!1,hl=Q6e("meta"),K6e=0,FU=function(t){q6e(t,hl,{value:{objectID:"O"+K6e++,weakData:{}}})},Z6e=function(t,e){if(!H6e(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!xU(t,hl)){if(!UU(t))return"F";if(!e)return"E";FU(t)}return t[hl].objectID},X6e=function(t,e){if(!xU(t,hl)){if(!UU(t))return!0;if(!e)return!1;FU(t)}return t[hl].weakData},J6e=function(t){return W6e&&gne&&UU(t)&&!xU(t,hl)&&FU(t),t},e5e=function(){t5e.enable=function(){},gne=!0;var t=mne.f,e=j6e([].splice),r={};r[hl]=1,t(r).length&&(mne.f=function(n){for(var i=t(n),s=0,a=i.length;s<a;s++)if(i[s]===hl){e(i,s,1);break}return i},B6e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Y6e.f}))},t5e=dne.exports={enable:e5e,fastKey:Z6e,getWeakData:X6e,onFreeze:J6e};z6e[hl]=!0;var kU=dne.exports,r5e=m_,n5e=Rs,i5e=function(t){if(r5e(t)==="Function")return n5e(t)},vne=i5e,s5e=v_,a5e=bC,o5e=vne(vne.bind),Sne=function(t,e){return s5e(t),e===void 0?t:a5e?o5e(t,e):function(){return t.apply(e,arguments)}},u5e=io,c5e=lS,l5e=u5e("iterator"),d5e=Array.prototype,f5e=function(t){return t!==void 0&&(c5e.Array===t||d5e[l5e]===t)},h5e=nU,yne=PC,p5e=iS,_5e=lS,m5e=io,g5e=m5e("iterator"),Ene=function(t){if(!p5e(t))return yne(t,g5e)||yne(t,"@@iterator")||_5e[h5e(t)]},v5e=pc,S5e=v_,y5e=Yo,E5e=Mx,A5e=Ene,T5e=TypeError,b5e=function(t,e){var r=arguments.length<2?A5e(t):e;if(S5e(r))return y5e(v5e(r,t));throw new T5e(E5e(t)+" is not iterable")},C5e=pc,Ane=Yo,R5e=PC,GU=function(t,e,r){var n,i;Ane(t);try{if(n=R5e(t,"return"),!n){if(e==="throw")throw r;return r}n=C5e(n,t)}catch(s){i=!0,n=s}if(e==="throw")throw r;if(i)throw n;return Ane(n),r},O5e=Sne,P5e=pc,I5e=Yo,M5e=Mx,w5e=f5e,N5e=Xx,Tne=RC,D5e=b5e,L5e=Ene,bne=GU,$5e=TypeError,cR=function(t,e){this.stopped=t,this.result=e},Cne=cR.prototype,VU=function(t,e,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),s=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),o=!!(r&&r.INTERRUPTED),u=O5e(e,n),c,l,d,f,_,m,E,S=function(w){return c&&bne(c,"normal",w),new cR(!0,w)},C=function(w){return i?(I5e(w),o?u(w[0],w[1],S):u(w[0],w[1])):o?u(w,S):u(w)};if(s)c=t.iterator;else if(a)c=t;else{if(l=L5e(t),!l)throw new $5e(M5e(t)+" is not iterable");if(w5e(l)){for(d=0,f=N5e(t);f>d;d++)if(_=C(t[d]),_&&Tne(Cne,_))return _;return new cR(!1)}c=D5e(t,l)}for(m=s?t.next:c.next;!(E=P5e(m,c)).done;){try{_=C(E.value)}catch(w){bne(c,"throw",w)}if(typeof _=="object"&&_&&Tne(Cne,_))return _}return new cR(!1)},x5e=RC,U5e=TypeError,BU=function(t,e){if(x5e(e,t))return t;throw new U5e("Incorrect invocation")},F5e=io,Rne=F5e("iterator"),One=!1;try{var k5e=0,Pne={next:function(){return{done:!!k5e++}},return:function(){One=!0}};Pne[Rne]=function(){return this},Array.from(Pne,function(){throw 2})}catch{}var G5e=function(t,e){try{if(!e&&!One)return!1}catch{return!1}var r=!1;try{var n={};n[Rne]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},V5e=wd,B5e=ja,j5e=Rs,Ine=f9,z5e=uS,H5e=kU,q5e=VU,Y5e=BU,Q5e=Qs,W5e=iS,jU=Ta,zU=Us,K5e=G5e,Z5e=jC,X5e=g9,J5e=function(t,e,r){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,s=n?"set":"add",a=B5e[t],o=a&&a.prototype,u=a,c={},l=function(C){var w=j5e(o[C]);z5e(o,C,C==="add"?function(V){return w(this,V===0?0:V),this}:C==="delete"?function(x){return i&&!jU(x)?!1:w(this,x===0?0:x)}:C==="get"?function(V){return i&&!jU(V)?void 0:w(this,V===0?0:V)}:C==="has"?function(V){return i&&!jU(V)?!1:w(this,V===0?0:V)}:function(V,H){return w(this,V===0?0:V,H),this})},d=Ine(t,!Q5e(a)||!(i||o.forEach&&!zU(function(){new a().entries().next()})));if(d)u=r.getConstructor(e,t,n,s),H5e.enable();else if(Ine(t,!0)){var f=new u,_=f[s](i?{}:-0,1)!==f,m=zU(function(){f.has(1)}),E=K5e(function(C){new a(C)}),S=!i&&zU(function(){for(var C=new a,w=5;w--;)C[s](w,w);return!C.has(-0)});E||(u=e(function(C,w){Y5e(C,o);var x=X5e(new a,C,u);return W5e(w)||q5e(w,x[s],{that:x,AS_ENTRIES:n}),x}),u.prototype=o,o.constructor=u),(m||S)&&(l("delete"),l("has"),n&&l("get")),(S||_)&&l(s),i&&o.clear&&delete o.clear}return c[t]=u,V5e({global:!0,constructor:!0,forced:u!==a},c),Z5e(u,t),i||r.setStrong(u,t,n),u},e9e=m_,t9e=Array.isArray||function(e){return e9e(e)==="Array"},r9e=Rs,n9e=Us,Mne=Qs,i9e=nU,s9e=sS,a9e=X5,wne=function(){},Nne=s9e("Reflect","construct"),HU=/^\s*(?:class|function)\b/,o9e=r9e(HU.exec),u9e=!HU.test(wne),_S=function(e){if(!Mne(e))return!1;try{return Nne(wne,[],e),!0}catch{return!1}},Dne=function(e){if(!Mne(e))return!1;switch(i9e(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return u9e||!!o9e(HU,a9e(e))}catch{return!0}};Dne.sham=!0;var c9e=!Nne||n9e(function(){var t;return _S(_S.call)||!_S(Object)||!_S(function(){t=!0})||t})?Dne:_S,Lne=t9e,l9e=c9e,d9e=Ta,f9e=io,h9e=f9e("species"),$ne=Array,p9e=function(t){var e;return Lne(t)&&(e=t.constructor,l9e(e)&&(e===$ne||Lne(e.prototype))?e=void 0:d9e(e)&&(e=e[h9e],e===null&&(e=void 0))),e===void 0?$ne:e},_9e=p9e,m9e=function(t,e){return new(_9e(t))(e===0?0:e)},g9e=Sne,v9e=Rs,S9e=Cx,y9e=IC,E9e=Xx,A9e=m9e,xne=v9e([].push),Une=function(t){var e=t===1,r=t===2,n=t===3,i=t===4,s=t===6,a=t===7,o=t===5||s;return function(u,c,l,d){for(var f=y9e(u),_=S9e(f),m=E9e(_),E=g9e(c,l),S=0,C=d||A9e,w=e?C(u,m):r||a?C(u,0):void 0,x,V;m>S;S++)if((o||S in _)&&(x=_[S],V=E(x,S,f),t))if(e)w[S]=V;else if(V)switch(t){case 3:return!0;case 5:return x;case 6:return S;case 2:xne(w,x)}else switch(t){case 4:return!1;case 7:xne(w,x)}return s?-1:n||i?i:w}},T9e={find:Une(5),findIndex:Une(6)},b9e=Rs,Fne=$U,lR=kU.getWeakData,C9e=BU,R9e=Yo,O9e=iS,qU=Ta,P9e=VU,kne=T9e,Gne=Eo,Vne=oS,I9e=Vne.set,M9e=Vne.getterFor,w9e=kne.find,N9e=kne.findIndex,D9e=b9e([].splice),L9e=0,dR=function(t){return t.frozen||(t.frozen=new Bne)},Bne=function(){this.entries=[]},YU=function(t,e){return w9e(t.entries,function(r){return r[0]===e})};Bne.prototype={get:function(t){var e=YU(this,t);if(e)return e[1]},has:function(t){return!!YU(this,t)},set:function(t,e){var r=YU(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=N9e(this.entries,function(r){return r[0]===t});return~e&&D9e(this.entries,e,1),!!~e}};var $9e={getConstructor:function(t,e,r,n){var i=t(function(u,c){C9e(u,s),I9e(u,{type:e,id:L9e++,frozen:void 0}),O9e(c)||P9e(c,u[n],{that:u,AS_ENTRIES:r})}),s=i.prototype,a=M9e(e),o=function(u,c,l){var d=a(u),f=lR(R9e(c),!0);return f===!0?dR(d).set(c,l):f[d.id]=l,u};return Fne(s,{delete:function(u){var c=a(this);if(!qU(u))return!1;var l=lR(u);return l===!0?dR(c).delete(u):l&&Gne(l,c.id)&&delete l[c.id]},has:function(c){var l=a(this);if(!qU(c))return!1;var d=lR(c);return d===!0?dR(l).has(c):d&&Gne(d,l.id)}}),Fne(s,r?{get:function(c){var l=a(this);if(qU(c)){var d=lR(c);return d===!0?dR(l).get(c):d?d[l.id]:void 0}},set:function(c,l){return o(this,c,l)}}:{add:function(c){return o(this,c,!0)}}),i}},x9e=lne,jne=ja,fR=Rs,zne=$U,U9e=kU,F9e=J5e,Hne=$9e,hR=Ta,pR=oS.enforce,k9e=Us,G9e=e9,mS=Object,V9e=Array.isArray,_R=mS.isExtensible,qne=mS.isFrozen,B9e=mS.isSealed,Yne=mS.freeze,j9e=mS.seal,z9e=!jne.ActiveXObject&&"ActiveXObject"in jne,gS,Qne=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Wne=F9e("WeakMap",Qne,Hne),O_=Wne.prototype,mR=fR(O_.set),H9e=function(){return x9e&&k9e(function(){var t=Yne([]);return mR(new Wne,t,1),!qne(t)})};if(G9e)if(z9e){gS=Hne.getConstructor(Qne,"WeakMap",!0),U9e.enable();var Kne=fR(O_.delete),gR=fR(O_.has),Zne=fR(O_.get);zne(O_,{delete:function(t){if(hR(t)&&!_R(t)){var e=pR(this);return e.frozen||(e.frozen=new gS),Kne(this,t)||e.frozen.delete(t)}return Kne(this,t)},has:function(e){if(hR(e)&&!_R(e)){var r=pR(this);return r.frozen||(r.frozen=new gS),gR(this,e)||r.frozen.has(e)}return gR(this,e)},get:function(e){if(hR(e)&&!_R(e)){var r=pR(this);return r.frozen||(r.frozen=new gS),gR(this,e)?Zne(this,e):r.frozen.get(e)}return Zne(this,e)},set:function(e,r){if(hR(e)&&!_R(e)){var n=pR(this);n.frozen||(n.frozen=new gS),gR(this,e)?mR(this,e,r):n.frozen.set(e,r)}else mR(this,e,r);return this}})}else H9e()&&zne(O_,{set:function(e,r){var n;return V9e(e)&&(qne(e)?n=Yne:B9e(e)&&(n=j9e)),mR(this,e,r),n&&n(e),this}});var Xne=a9,q9e=qo,Y9e=function(t,e,r){return r.get&&Xne(r.get,e,{getter:!0}),r.set&&Xne(r.set,e,{setter:!0}),q9e.f(t,e,r)},Q9e=yo,W9e=qo,K9e=nS,Z9e=function(t,e,r){Q9e?W9e.f(t,e,K9e(0,r)):t[e]=r},X9e=wd,J9e=ja,e7e=BU,t7e=Yo,r7e=Qs,n7e=hU,i7e=Y9e,s7e=Z9e,a7e=Us,QU=Eo,o7e=io,Sc=BC.IteratorPrototype,u7e=yo,WU="constructor",Jne="Iterator",eie=o7e("toStringTag"),tie=TypeError,KU=J9e[Jne],rie=!r7e(KU)||KU.prototype!==Sc||!a7e(function(){KU({})}),ZU=function(){if(e7e(this,Sc),n7e(this)===Sc)throw new tie("Abstract class Iterator not directly constructable")},nie=function(t,e){u7e?i7e(Sc,t,{configurable:!0,get:function(){return e},set:function(r){if(t7e(this),this===Sc)throw new tie("You can't redefine this property");QU(this,t)?this[t]=r:s7e(this,t,r)}}):Sc[t]=e};QU(Sc,eie)||nie(eie,Jne),(rie||!QU(Sc,WU)||Sc[WU]===Object)&&nie(WU,ZU),ZU.prototype=Sc,X9e({global:!0,constructor:!0,forced:rie},{Iterator:ZU});var iie=function(t){return{iterator:t,next:t.next,done:!1}},c7e=wd,l7e=VU,d7e=v_,f7e=Yo,h7e=iie;c7e({target:"Iterator",proto:!0,real:!0},{every:function(e){f7e(this),d7e(e);var r=h7e(this),n=0;return!l7e(r,function(i,s){if(!e(i,n++))return s()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var p7e=pc,_7e=cU,m7e=Md,g7e=$U,v7e=io,sie=oS,S7e=PC,y7e=BC.IteratorPrototype,XU=W9,JU=GU,E7e=v7e("toStringTag"),aie="IteratorHelper",oie="WrapForValidIterator",A7e=sie.set,uie=function(t){var e=sie.getterFor(t?oie:aie);return g7e(_7e(y7e),{next:function(){var n=e(this);if(t)return n.nextHandler();try{var i=n.done?void 0:n.nextHandler();return XU(i,n.done)}catch(s){throw n.done=!0,s}},return:function(){var r=e(this),n=r.iterator;if(r.done=!0,t){var i=S7e(n,"return");return i?p7e(i,n):XU(void 0,!0)}if(r.inner)try{JU(r.inner.iterator,"normal")}catch(s){return JU(n,"throw",s)}return JU(n,"normal"),XU(void 0,!0)}})},T7e=uie(!0),cie=uie(!1);m7e(cie,E7e,"Iterator Helper");var b7e=function(t,e){var r=function(i,s){s?(s.iterator=i.iterator,s.next=i.next):s=i,s.type=e?oie:aie,s.nextHandler=t,s.counter=0,s.done=!1,A7e(this,s)};return r.prototype=e?T7e:cie,r},C7e=Yo,R7e=GU,O7e=function(t,e,r,n){try{return n?e(C7e(r)[0],r[1]):e(r)}catch(i){R7e(t,"throw",i)}},P7e=wd,I7e=pc,M7e=v_,lie=Yo,w7e=iie,N7e=b7e,D7e=O7e,L7e=m6e,$7e=N7e(function(){for(var t=this.iterator,e=this.predicate,r=this.next,n,i,s;;){if(n=lie(I7e(r,t)),i=this.done=!!n.done,i)return;if(s=n.value,D7e(t,e,[s,this.counter++],!0))return s}});P7e({target:"Iterator",proto:!0,real:!0,forced:L7e},{filter:function(e){return lie(this),M7e(e),new $7e(w7e(this),{predicate:e})}});var vS,vR;class die{constructor(){this.type="backend",vS.set(this,void 0),vR.set(this,void 0)}init(e,{clientSlug:r,apiClient:n}){if(!n)throw e.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');Nd(this,vS,r,"f"),Nd(this,vR,CU(n),"f")}read(e,r,n){return qC(this,void 0,void 0,function*(){try{const{translation:i}=yield wn(this,vR,"f").getClientTranslations({name:wn(this,vS,"f"),key:r,lang:e});n(null,i?.json||{})}catch{const s=`Error fetching translation with key "${r}" and client "${wn(this,vS,"f")||"N/A"}".`;n(s,null)}})}}vS=new WeakMap,vR=new WeakMap,die.type="backend";var P_;class fie{constructor(e){this.type="logger",P_.set(this,void 0),Nd(this,P_,e,"f")}log([e,r,...n]){wn(this,P_,"f").info({meta:r},e,...n)}warn([e,r,...n]){wn(this,P_,"f").error({meta:r},e,...n)}error([e,r,...n]){wn(this,P_,"f").error({meta:r},e,...n)}}P_=new WeakMap,fie.type="logger";var so,SR,Th,SS,Ws,bh;const hie="appLanguage";class e1{constructor({keys:e,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:s,parent:a,debug:o=!1,remoteConfig:u={}}){Th.set(this,void 0),SS.set(this,void 0),Ws.set(this,void 0),bh.set(this,void 0),Nd(this,Th,e,"f"),Nd(this,SS,n,"f"),Nd(this,bh,r,"f");const c={lng:i,fallbackNS:wn(this,SS,"f"),debug:o,defaultNS:e,returnNull:!1};a?Nd(this,Ws,a.cloneInstance(c),"f"):(Nd(this,Ws,Ba.createInstance(),"f"),s&&wn(this,Ws,"f").use(new fie(s.child({library:"@icanbwell/i18n"}))),u.apiClient&&wn(this,Ws,"f").use(die),wn(this,Ws,"f").init(Object.assign(Object.assign({},c),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:u,saveMissing:!0,missingKeyHandler:(l,d,f)=>wn(this,Ws,"f").services.logger.error(`missing key: ${f}; language: ${l}; key: ${d}`)}))),this.t=wn(this,Ws,"f").t,so.resolvedLanguage=wn(this,Ws,"f").resolvedLanguage||i}load(){return qC(this,void 0,void 0,function*(){var e;const r=(yield(e=wn(this,bh,"f"))===null||e===void 0?void 0:e.storage.getItem(hie))||so.resolvedLanguage;r!==so.resolvedLanguage&&(yield wn(this,Ws,"f").changeLanguage(r),so.resolvedLanguage=r),yield wn(this,Ws,"f").loadNamespaces(wn(this,Th,"f"));const n=wn(this,Th,"f").filter(i=>!wn(this,Ws,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return wn(so,so,"f",SR).emit("changeLanguage",r),this})}child(e){return new so(Object.assign(Object.assign({},e),{nativeBridge:wn(this,bh,"f"),fallbackKeys:[...wn(this,SS,"f"),...wn(this,Th,"f")],parent:wn(this,Ws,"f"),defaultLanguage:wn(this,Ws,"f").language}))}get isLoaded(){return wn(this,Th,"f").every(e=>wn(this,Ws,"f").hasResourceBundle(wn(this,Ws,"f").language,e))}changeLanguage(e){return qC(this,void 0,void 0,function*(){var r,n;so.resolvedLanguage=e,yield wn(this,Ws,"f").changeLanguage(e),wn(so,so,"f",SR).emit("changeLanguage",e),yield(r=wn(this,bh,"f"))===null||r===void 0?void 0:r.storage.setItem(hie,e),(n=wn(this,bh,"f"))===null||n===void 0||n.reloadView(!0)})}get resolvedLanguage(){return so.resolvedLanguage}onChangeLanguage(e){wn(so,so,"f",SR).on("changeLanguage",e)}}so=e1,Th=new WeakMap,SS=new WeakMap,Ws=new WeakMap,bh=new WeakMap,SR={value:new ane},e1.resolvedLanguage="en";var t1=p(79609),yS;(function(t){t.one="1.0.0"})(yS||(yS={}));const yR="orchestrator:native-bridge",x7e={id:yR,dependencies:{featureServices:{}},create:()=>({[yS.one]:()=>({featureService:t1.b})})};var ES;(function(t){t.one="1.0.0"})(ES||(ES={}));const ER="orchestrator:translation-service",U7e={id:ER,dependencies:{featureServices:{[Uo]:tl.one,[Ku]:od.one,[Ss]:mo.one,[Qv]:h_.one,[yR]:yS.one}},create:({featureServices:t})=>{const e=t[Uo],r=t[Ku],n=t[Qv],{slug:i}=t[Ss].getClientContext(),s=t[yR],a=new e1({keys:[],nativeBridge:s,defaultLanguage:"en",logger:r,remoteConfig:{clientSlug:i,apiClient:e}});return n.setProfileProperties({language:a.resolvedLanguage}),a.onChangeLanguage(o=>n.setProfileProperties({language:o})),{[ES.one]:()=>({featureService:a})}}};var I_,M_,AR,Ao,AS,TR;const bR="tokens",r1="delegationContext",n1="userSessionId";class F7e{constructor({apiClient:e,stateService:r,identityGatewaySdk:n,storage:i,logger:s}){I_.set(this,void 0),M_.set(this,void 0),AR.set(this,void 0),Ao.set(this,void 0),AS.set(this,void 0),TR.set(this,[]),(0,ee().__classPrivateFieldSet)(this,I_,e,"f"),(0,ee().__classPrivateFieldSet)(this,M_,r,"f"),(0,ee().__classPrivateFieldSet)(this,AR,n,"f"),(0,ee().__classPrivateFieldSet)(this,Ao,i,"f"),(0,ee().__classPrivateFieldSet)(this,AS,s,"f")}registerPreLogoutHandler(e){(0,ee().__classPrivateFieldGet)(this,TR,"f").push(e)}getStoredTokens(){const e=(0,ee().__classPrivateFieldGet)(this,Ao,"f").getItem(bR);return e?JSON.parse(e):void 0}removeStoredTokens(){(0,ee().__classPrivateFieldGet)(this,Ao,"f").removeItem(bR),this.clearSessionId(),this.clearDelegationContext()}clearSessionId(){(0,ee().__classPrivateFieldGet)(this,Ao,"f").removeItem(n1)}ensureSessionId(){var e;try{if((0,ee().__classPrivateFieldGet)(this,Ao,"f").getItem(n1))return;(0,ee().__classPrivateFieldGet)(this,Ao,"f").setItem(n1,JSON.stringify({sessionId:crypto.randomUUID()}))}catch(r){(e=(0,ee().__classPrivateFieldGet)(this,AS,"f"))===null||e===void 0||e.error(r instanceof Error?r:new Error(String(r)),"Failed to mint session id")}}storeTokens(e){const r=Object.assign(Object.assign({},e),{idToken:Object.assign(Object.assign({},e.idToken),{payload:(0,je().normalizeTokenPayload)(e.idToken.payload)})});return(0,ee().__classPrivateFieldGet)(this,Ao,"f").setItem(bR,JSON.stringify(r)),r}storeDelegationContext(e){(0,ee().__classPrivateFieldGet)(this,Ao,"f").setItem(r1,JSON.stringify(e))}getDelegationContext(){var e,r;const n=(0,ee().__classPrivateFieldGet)(this,Ao,"f").getItem(r1);if(!n)return null;try{const i=JSON.parse(n);return!i?.consentId||!(!((r=(e=i?.delegateTokens)===null||e===void 0?void 0:e.accessToken)===null||r===void 0)&&r.jwtToken)?null:i}catch{return null}}clearDelegationContext(){(0,ee().__classPrivateFieldGet)(this,Ao,"f").removeItem(r1)}logout(){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var e;for(const s of(0,ee().__classPrivateFieldGet)(this,TR,"f"))try{yield s()}catch(a){(e=(0,ee().__classPrivateFieldGet)(this,AS,"f"))===null||e===void 0||e.error(a instanceof Error?a:new Error(String(a)),"Pre-logout handler failed")}const r=(0,ee().__classPrivateFieldGet)(this,M_,"f").getUserTokenData().accessToken.jwtToken,{key:n,variant:i}=(0,ee().__classPrivateFieldGet)(this,M_,"f").getClientContext();i!==Jc.GUEST&&(yield(0,ee().__classPrivateFieldGet)(this,AR,"f").logout({accessToken:r},{context:{headers:{clientKey:n}}})),(0,ee().__classPrivateFieldGet)(this,I_,"f").stop(),(0,ee().__classPrivateFieldGet)(this,I_,"f").clearAuth(),yield(0,ee().__classPrivateFieldGet)(this,I_,"f").clearStore(),(0,ee().__classPrivateFieldGet)(this,M_,"f").logoutUser(),(0,ee().__classPrivateFieldGet)(this,Ao,"f").removeItem(bR),this.clearSessionId(),this.clearDelegationContext()})}}I_=new WeakMap,M_=new WeakMap,AR=new WeakMap,Ao=new WeakMap,AS=new WeakMap,TR=new WeakMap;var TS;(function(t){t.one="1.0.0"})(TS||(TS={}));const CR="orchestrator:identity-utils",k7e={id:CR,dependencies:{featureServices:{[Uo]:tl.one,[Ku]:od.one,[Ss]:mo.one,[Qv]:h_.one}},create:({featureServices:t})=>{const e=t[Uo];return{[TS.one]:()=>({featureService:new F7e({apiClient:e,stateService:t[Ss],identityGatewaySdk:Q7(e),storage:window.sessionStorage,logger:t[Ku]})})}}};var RR;(function(t){t.one="1.0.0"})(RR||(RR={}));const pie="orchestrator:globaleventemitter-service",G7e=t=>({id:pie,create:()=>({[RR.one]:()=>({featureService:t})})});var OR;(function(t){t.one="1.0.0"})(OR||(OR={}));const _ie="orchestrator:reboot-controller",V7e=t=>({id:_ie,create:()=>({[OR.one]:()=>({featureService:t})})}),PR="orchestrator:bwell-sdk";var bS;(function(t){t.one="1.0.0"})(bS||(bS={}));const B7e=t=>({id:PR,dependencies:{featureServices:{[Ss]:mo.one,[ER]:ES.one,[Ku]:od.one}},create:({featureServices:e})=>{const r=e[Ss],n=e[ER],i=e[Ku],s=t;let a=!1,o=!1;const u=_=>{if(typeof _=="string")return _;if(_&&typeof _=="object"&&"message"in _){const m=_.message;return typeof m=="string"?m:String(m)}return String(_)},c=_=>/uninitialized|not been initialized/i.test(u(_)),l=_=>{try{s.language.setLanguage(_)}catch(m){if(c(m)){o||(o=!0,i.info({},"embeddable-core: Deferring language switch until SDK initialization completes"));return}i.info({error:u(m)},"embeddable-core: Non-fatal language switch issue in SDK")}},d=_=>{try{const m=s.language.getLanguage();_!==m&&l(_)}catch(m){if(c(m))return;i.info({error:u(m)},"embeddable-core: Non-fatal language read issue in SDK")}},f=()=>{var _;!((_=r.getUser().tokenData)===null||_===void 0)&&_.idToken&&(l(n.resolvedLanguage),a||(a=!0,n.onChangeLanguage(d)))};return r.getStore().subscribe(f),{[bS.one]:()=>({featureService:s})}}});class ua extends Error{constructor(e,r){super(e),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(e){return e instanceof ua}}class cIt extends ua{constructor(e="Authentication Error"){super(e),this.name="AuthenticationError"}}class lIt extends ua{constructor(e="Illegal Argument Error"){super(e),this.name="IllegalArgumentError"}}class dIt extends ua{constructor(e="Illegal State Error"){super(e),this.name="IllegalStateError"}}class j7e extends ua{constructor(e="Invalid Client Key Error"){super(e),this.name="InvalidClientKeyError"}}class i1 extends ua{constructor(e,r){super(e),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class w_ extends ua{constructor(e="Invalid Token Error"){super(e),this.name="InvalidTokenError"}}class z7e extends ua{constructor(e,r){super(e),this.status=r,this.name="NetworkError"}}class H7e extends ua{constructor(e){super(e.message()),this.operationOutcome=e,this.name="OperationOutcomeError"}}class s1 extends ua{constructor(e,r){super(e),this.data=r,this.name="UnknownError"}}class IR extends ua{constructor(e){super(e.join(". ")),this.errors=e,this.name="ValidationError"}}class Yt{constructor(e,r){this.data=e,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(e){return new Yt(void 0,e)}}var mie=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},MR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},CS,RS;class tr{static success(e){return new q7e(e)}static failure(e){return new wR(e)}}class q7e extends tr{constructor(e){super(),CS.set(this,void 0),mie(this,CS,e,"f")}data(){return MR(this,CS,"f")}error(){throw MR(this,CS,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new Yt(this.data())}}CS=new WeakMap;class wR extends tr{constructor(e){super(),RS.set(this,void 0),mie(this,RS,e,"f")}data(){throw MR(this,RS,"f")}error(){return MR(this,RS,"f")}success(){return!1}failure(){return!0}intoFailure(){return tr.failure(this.error())}toQueryResult(){return new Yt(void 0,this.error())}}RS=new WeakMap;var a1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},OS;class gie{constructor(){OS.set(this,[])}add(e){a1(this,OS,"f").push(e)}errors(){return a1(this,OS,"f")}hasErrors(){return a1(this,OS,"f").length>0}}OS=new WeakMap;var vie=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},o1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},PS,NR;class Y7e{constructor(e){PS.set(this,void 0),NR.set(this,void 0),vie(this,NR,e,"f"),vie(this,PS,this.transformInput(e),"f")}validate(){return tr.success(null)}data(){return o1(this,PS,"f")}toJSON(){return o1(this,PS,"f")}transformInput(e){return e}input(){return o1(this,NR,"f")}}PS=new WeakMap,NR=new WeakMap;class _n extends Y7e{validate(){const e=new gie;return this.validator.validate(this.input(),e),e.hasErrors()?tr.failure(new IR(e.errors())):tr.success(null)}}var Sie=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},DR,yie,Eie;const Aie=100,Q7e=20;class Fs{constructor(){DR.add(this)}validate(e,r){Sie(this,DR,"m",yie).call(this,e.page,r),Sie(this,DR,"m",Eie).call(this,e.pageSize,r)}}DR=new WeakSet,yie=function(e,r){e<0&&r.add("page must be a positive number")},Eie=function(e,r){e!==void 0&&(e<=0&&r.add("Page size must be greater than 0"),e>Aie&&r.add(`Page size must not exceed ${Aie}`))};class Os extends _n{constructor(){super(...arguments),this.validator=new Fs}transformInput(e){return Object.assign({pageSize:Q7e},e)}}const Tie=/^data:([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*(?:;[A-Za-z0-9!#$&^_.+-]+=[A-Za-z0-9!#$&^_.+-]+)*);base64,([A-Za-z0-9+/]+={0,2})$/;function W7e(t){return Tie.test(t)}function bie(t){var e,r;const n=Tie.exec(t);return n===null?null:{contentType:(e=n[1])!==null&&e!==void 0?e:"",data:(r=n[2])!==null&&r!==void 0?r:""}}const Cie=10*1024*1024,K7e=Math.ceil(Cie/3)*4;function u1(){return new Date().toISOString()}function Z7e(){var t;return!(typeof process>"u"||((t=process.versions)===null||t===void 0?void 0:t.node)===void 0)}function X7e(){return typeof window<"u"}function Rie(){if(X7e())return"browser";if(Z7e())return"node";throw new Error("Invalid runtime")}function Oie(t){switch(Rie()){case"browser":return t.browser();case"node":return t.node()}}function Pie(t){switch(Rie()){case"node":return Buffer.from(t,"base64").toString("utf-8");case"browser":return atob(t)}}function Wr(t){return t!=null}function Ks(t){return t==null}function fIt(t){return Wr(t)&&t!==""}function Ps(t){return t==null||t===""}function Zs(t){return t===void 0}function On(t){return t!==void 0}function J7e(t){return JSON.parse(Pie(t)).env}const eZe=3;function Iie(t){const e=t.split("."),r=e[1];if(r===void 0||e.length!==eZe)throw new w_("Token is missing data and may be corrupted");try{return JSON.parse(Pie(r))}catch(n){const i=n;throw new w_(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function Mie(t){const r=Iie(t).exp;if(typeof r!="number")throw new w_("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const tZe="custom:clientFhirPersonId",rZe="custom:bwellFhirPatientId";function nZe(t){const e=Iie(t),r=e[rZe],n=e[tZe];return Wr(r)&&Wr(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function Is(t){return t.trim()===""}const wie="1.117.0";function iZe(){return wie}var c1;(function(t){t.Arrived="ARRIVED",t.Booked="BOOKED",t.Cancelled="CANCELLED",t.CheckedIn="CHECKED_IN",t.EnteredInError="ENTERED_IN_ERROR",t.Fulfilled="FULFILLED",t.Noshow="NOSHOW",t.Pending="PENDING",t.Proposed="PROPOSED",t.Waitlist="WAITLIST"})(c1||(c1={}));var Nie;(function(t){t.Guest="GUEST",t.Other="OTHER",t.Self="SELF"})(Nie||(Nie={}));var Die;(function(t){t.Guest="GUEST"})(Die||(Die={}));var LR;(function(t){t.CmsNetworkShareMyRecords="CMS_NETWORK_SHARE_MY_RECORDS",t.CommunicationPreferencesPhi="COMMUNICATION_PREFERENCES_PHI",t.DataSharing="DATA_SHARING",t.DirectImportRecords="DIRECT_IMPORT_RECORDS",t.HealthCircleAdolescent="HEALTH_CIRCLE_ADOLESCENT",t.HealthCircleMinor="HEALTH_CIRCLE_MINOR",t.HealthMatch="HEALTH_MATCH",t.IasImportRecords="IAS_IMPORT_RECORDS",t.MobileCommunicationPreferences="MOBILE_COMMUNICATION_PREFERENCES",t.PersonalizedHealthOffersAndAds="PERSONALIZED_HEALTH_OFFERS_AND_ADS",t.ProaAttestation="PROA_ATTESTATION",t.Tos="TOS"})(LR||(LR={}));var Lie;(function(t){t.Complete="COMPLETE",t.Error="ERROR",t.Partial="PARTIAL",t.Queued="QUEUED"})(Lie||(Lie={}));var $ie;(function(t){t.Institutional="INSTITUTIONAL",t.Oral="ORAL",t.Pharmacy="PHARMACY",t.Professional="PROFESSIONAL",t.Vision="VISION"})($ie||($ie={}));var xie;(function(t){t.Bwell="bwell"})(xie||(xie={}));var Uie;(function(t){t.Bwell="BWELL"})(Uie||(Uie={}));var Fie;(function(t){t.Basic="BASIC",t.Identity="IDENTITY",t.Oauth="OAUTH"})(Fie||(Fie={}));var l1;(function(t){t.Deny="DENY",t.Permit="PERMIT"})(l1||(l1={}));var d1;(function(t){t.Active="ACTIVE",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Inactive="INACTIVE",t.Proposed="PROPOSED",t.Rejected="REJECTED"})(d1||(d1={}));var kie;(function(t){t.Medical="MEDICAL",t.Pharmacy="PHARMACY"})(kie||(kie={}));var Gie;(function(t){t.Usd="USD"})(Gie||(Gie={}));var Vie;(function(t){t.Accepted="ACCEPTED",t.Rejected="REJECTED"})(Vie||(Vie={}));var Bie;(function(t){t.AccessEnded="ACCESS_ENDED",t.Connected="CONNECTED",t.Deleted="DELETED",t.Disconnected="DISCONNECTED",t.Error="ERROR",t.Expired="EXPIRED"})(Bie||(Bie={}));var jie;(function(t){t.Clinical="CLINICAL",t.Device="DEVICE",t.Insurance="INSURANCE",t.Lab="LAB",t.Pharmacy="PHARMACY",t.Practitioner="PRACTITIONER"})(jie||(jie={}));var $R;(function(t){t.Connecthub="connecthub",t.Nppes="nppes"})($R||($R={}));var zie;(function(t){t.Connecthub="CONNECTHUB",t.Nppes="NPPES"})(zie||(zie={}));var Hie;(function(t){t.Fri="FRI",t.Mon="MON",t.Sat="SAT",t.Sun="SUN",t.Thu="THU",t.Tue="TUE",t.Wed="WED"})(Hie||(Hie={}));var qie;(function(t){t.Deleted="DELETED"})(qie||(qie={}));var Yie;(function(t){t.Kilometers="KILOMETERS",t.Meters="METERS",t.Miles="MILES"})(Yie||(Yie={}));var Qie;(function(t){t.BwellPatient="BWELL_PATIENT",t.BwellPerson="BWELL_PERSON",t.ClientPatient="CLIENT_PATIENT",t.ClientPerson="CLIENT_PERSON"})(Qie||(Qie={}));var Wie;(function(t){t.Active="active",t.EnteredInError="entered_in_error",t.Error="error",t.Off="off",t.Suspended="suspended",t.Test="test"})(Wie||(Wie={}));var Kie;(function(t){t.Active="ACTIVE",t.EnteredInError="ENTERED_IN_ERROR",t.Error="ERROR",t.Off="OFF",t.Suspended="SUSPENDED",t.Test="TEST"})(Kie||(Kie={}));var f1;(function(t){t.CustomEvent="CUSTOM_EVENT",t.MobilePushOpen="MOBILE_PUSH_OPEN"})(f1||(f1={}));var h1;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(h1||(h1={}));var p1;(function(t){t.Person="Person"})(p1||(p1={}));var _1;(function(t){t.Characteristic="characteristic",t.Communication="communication",t.Gender="gender",t.Specialty="specialty"})(_1||(_1={}));var Zie;(function(t){t.Characteristic="CHARACTERISTIC",t.Communication="COMMUNICATION",t.Gender="GENDER",t.InsurancePlan="INSURANCE_PLAN",t.Specialty="SPECIALTY"})(Zie||(Zie={}));var Xie;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(Xie||(Xie={}));var Jie;(function(t){t.Female="FEMALE",t.Male="MALE",t.Other="OTHER",t.Unknown="UNKNOWN"})(Jie||(Jie={}));var ese;(function(t){t.AllergyIntolerance="ALLERGY_INTOLERANCE",t.CarePlan="CARE_PLAN",t.Condition="CONDITION",t.Encounter="ENCOUNTER",t.Immunization="IMMUNIZATION",t.Labs="LABS",t.Medications="MEDICATIONS",t.Procedure="PROCEDURE",t.VitalSigns="VITAL_SIGNS"})(ese||(ese={}));var tse;(function(t){t.Official="_official",t.Old="_old",t.Secondary="_secondary",t.Temp="_temp",t.Usual="_usual"})(tse||(tse={}));var rse;(function(t){t.Cognito="COGNITO",t.Descope="DESCOPE"})(rse||(rse={}));var nse;(function(t){t.Direct="DIRECT",t.DirectIas="DIRECT_IAS",t.Ial2="IAL2",t.IndirectIas="INDIRECT_IAS",t.Proa="PROA"})(nse||(nse={}));var ise;(function(t){t.Clicked="clicked"})(ise||(ise={}));var sse;(function(t){t.Clicked="CLICKED"})(sse||(sse={}));var m1;(function(t){t.Debug="DEBUG",t.Error="ERROR",t.Info="INFO",t.Verbose="VERBOSE",t.Warn="WARN"})(m1||(m1={}));var ase;(function(t){t.Sms="SMS"})(ase||(ase={}));var g1;(function(t){t.Activity="ACTIVITY",t.Exam="EXAM",t.Imaging="IMAGING",t.Laboratory="LABORATORY",t.Procedure="PROCEDURE",t.SocialHistory="SOCIAL_HISTORY",t.Survey="SURVEY",t.Therapy="THERAPY",t.VitalSigns="VITAL_SIGNS"})(g1||(g1={}));var ose;(function(t){t.CancelDelete="CANCEL_DELETE",t.ConfirmDelete="CONFIRM_DELETE",t.DeletionInProgress="DELETION_IN_PROGRESS",t.ImmediateExecution="IMMEDIATE_EXECUTION",t.RequestDelete="REQUEST_DELETE"})(ose||(ose={}));var v1;(function(t){t.C19Vaccine="C19Vaccine",t.Device="Device",t.Insurance="Insurance",t.Laboratory="Laboratory",t.Pharmacy="Pharmacy",t.Provider="Provider",t.Bus="bus",t.Cg="cg",t.Crs="crs",t.Dept="dept",t.Edu="edu",t.Govt="govt",t.Ins="ins",t.Other="other",t.Pay="pay",t.Prov="prov",t.Reli="reli",t.Team="team"})(v1||(v1={}));var use;(function(t){t.Bus="BUS",t.C19Vaccine="C19VACCINE",t.Cg="CG",t.Crs="CRS",t.Dept="DEPT",t.Device="DEVICE",t.Edu="EDU",t.Govt="GOVT",t.Ins="INS",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Other="OTHER",t.Pay="PAY",t.Pharmacy="PHARMACY",t.Prov="PROV",t.Provider="PROVIDER",t.Reli="RELI",t.Team="TEAM"})(use||(use={}));var cse;(function(t){t.Add="add",t.Copy="copy",t.Move="move",t.Remove="remove",t.Replace="replace",t.Test="test"})(cse||(cse={}));var lse;(function(t){t.ExistingPatients="EXISTING_PATIENTS",t.NewPatients="NEW_PATIENTS"})(lse||(lse={}));var dse;(function(t){t.Patient="Patient",t.Person="Person"})(dse||(dse={}));var fse;(function(t){t.IdentityProofing="IDENTITY_PROOFING"})(fse||(fse={}));var hse;(function(t){t.Practice="practice",t.Practitioner="practitioner"})(hse||(hse={}));var pse;(function(t){t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(pse||(pse={}));var _se;(function(t){t.QuestionnaireResponse="QuestionnaireResponse"})(_se||(_se={}));var mse;(function(t){t.Closed="CLOSED",t.Hold="HOLD",t.New="NEW",t.Open="OPEN",t.Pending="PENDING",t.Solved="SOLVED"})(mse||(mse={}));var gse;(function(t){t.AllergyIntolerance="ALLERGY_INTOLERANCE",t.CarePlan="CARE_PLAN",t.Condition="CONDITION",t.DocumentReference="DOCUMENT_REFERENCE",t.Encounter="ENCOUNTER",t.Immunization="IMMUNIZATION",t.MedicationDispense="MEDICATION_DISPENSE",t.MedicationRequest="MEDICATION_REQUEST",t.MedicationStatement="MEDICATION_STATEMENT",t.Observation="OBSERVATION",t.Procedure="PROCEDURE"})(gse||(gse={}));var vse;(function(t){t.DataConnections="DATA_CONNECTIONS",t.FindCare="FIND_CARE"})(vse||(vse={}));var Sse;(function(t){t.Device="DEVICE",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Pharmacy="PHARMACY",t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(Sse||(Sse={}));var yse;(function(t){t.Abortion="ABORTION",t.AbuseNeglect="ABUSE_NEGLECT",t.DomesticViolence="DOMESTIC_VIOLENCE",t.GenderAffirming="GENDER_AFFIRMING",t.GeneticTesting="GENETIC_TESTING",t.HivAids="HIV_AIDS",t.Mammography="MAMMOGRAPHY",t.MentalHealth="MENTAL_HEALTH",t.ReproductiveHealthcare="REPRODUCTIVE_HEALTHCARE",t.SexualAssault="SEXUAL_ASSAULT",t.Std="STD",t.SubstanceAbuse="SUBSTANCE_ABUSE",t.SubstanceAlcohol="SUBSTANCE_ALCOHOL"})(yse||(yse={}));var Ese;(function(t){t.UpdatedAt="UPDATED_AT"})(Ese||(Ese={}));var S1;(function(t){t.Content="content",t.Distance="distance",t.Relevance="relevance"})(S1||(S1={}));var Ase;(function(t){t.Content="CONTENT",t.DataSourceRank="DATA_SOURCE_RANK",t.Distance="DISTANCE",t.Name="NAME",t.NextAvailable="NEXT_AVAILABLE",t.OnlineBookingAvailable="ONLINE_BOOKING_AVAILABLE",t.Rating="RATING",t.Relevance="RELEVANCE"})(Ase||(Ase={}));var xR;(function(t){t.Asc="asc",t.Desc="desc"})(xR||(xR={}));var Tse;(function(t){t.Asc="ASC",t.Desc="DESC"})(Tse||(Tse={}));var bse;(function(t){t.CareSearch="CARE_SEARCH",t.Proa="PROA",t.ProviderDetails="PROVIDER_DETAILS",t.Sayt="SAYT",t.Unspecified="UNSPECIFIED"})(bse||(bse={}));var Cse;(function(t){t.DataDeleted="DATA_DELETED",t.Deleting="DELETING",t.Error="ERROR",t.Pending="PENDING",t.Retrieved="RETRIEVED",t.Retrieving="RETRIEVING"})(Cse||(Cse={}));var y1;(function(t){t.Accepted="ACCEPTED",t.Cancelled="CANCELLED",t.Completed="COMPLETED",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.OnHold="ON_HOLD",t.Ready="READY",t.Received="RECEIVED",t.Rejected="REJECTED",t.Requested="REQUESTED"})(y1||(y1={}));var UR;(function(t){t.Accurate="accurate",t.Estimate="estimate"})(UR||(UR={}));var Rse;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(Rse||(Rse={}));var Ose;(function(t){t.PersonMatchError="PERSON_MATCH_ERROR",t.ServerError="SERVER_ERROR"})(Ose||(Ose={}));const sZe=new Set(Object.values(h1));function Pse(t){return sZe.has(t)}const aZe=new Set(Object.values(d1));function oZe(t){return aZe.has(t)}const uZe=new Set(Object.values(LR));function Ise(t){return uZe.has(t)}const cZe=new Set(Object.values(l1));function lZe(t){return cZe.has(t)}class dZe{validate(e,r){!Zs(e.gender)&&!Pse(e.gender)&&r.add(`Invalid gender value: "${e.gender}"`),!Zs(e.middleNames)&&e.middleNames.length>0&&Zs(e.firstName)&&r.add("middleNames requires firstName to be provided")}}class hIt extends _n{constructor(){super(...arguments),this.validator=new dZe}}class fZe{validate(e,r){Ise(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!Zs(e.organizationId)&&Is(e.organizationId)&&r.add("organizationId cannot be empty")}}class pIt extends _n{constructor(){super(...arguments),this.validator=new fZe}}class hZe{validate(e,r){oZe(e.status)||r.add(`Invalid consent status: "${e.status}"`),lZe(e.provision)||r.add(`Invalid consent provision type: "${e.provision}"`),Ise(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!Zs(e.organizationId)&&Is(e.organizationId)&&r.add("organizationId cannot be empty"),e.category===LR.ProaAttestation&&Zs(e.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class _It extends _n{constructor(){super(...arguments),this.validator=new hZe}}class pZe{validate(e,r){Ps(e.exportId)&&r.add("exportId is required"),Ps(e.password)&&r.add("password is required")}}class mIt extends _n{constructor(){super(...arguments),this.validator=new pZe}}var gIt;class vIt extends null{}var To=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},za,Ld,Mse,wse,Nse,Dse,Lse,$se;class Ch{constructor(){za.add(this)}validate(e,r){if(!e.values||e.values.length===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const n of e.values)To(this,za,"m",Mse).call(this,n,r)}}za=new WeakSet,Ld=function(e,r){e&&e!==null&&isNaN(e.getTime())&&r.add("The date is not valid")},Mse=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:u,approximately:c}=e,d=[n,i,s,a,o,u,c].filter(f=>f!=null).length;if(d===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}To(this,za,"m",wse).call(this,e,d,r),To(this,za,"m",Lse).call(this,e,r),To(this,za,"m",$se).call(this,e,r)},wse=function(e,r,n){const{equals:i,notEquals:s,approximately:a}=e;if(i&&r>1){n.add("The equals value cannot be set with any other values");return}if(s&&r>1){n.add("The notEquals value cannot be set with any other values");return}if(a&&r>1){n.add("The approximately value cannot be set with any other values");return}To(this,za,"m",Nse).call(this,e,n),To(this,za,"m",Dse).call(this,e,n)},Nse=function(e,r){e.greaterThan&&e.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},Dse=function(e,r){e.lessThan&&e.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},Lse=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:u,approximately:c}=e;n&&To(this,za,"m",Ld).call(this,n,r),i&&To(this,za,"m",Ld).call(this,i,r),s&&To(this,za,"m",Ld).call(this,s,r),a&&To(this,za,"m",Ld).call(this,a,r),o&&To(this,za,"m",Ld).call(this,o,r),u&&To(this,za,"m",Ld).call(this,u,r),c&&To(this,za,"m",Ld).call(this,c,r)},$se=function(e,r){const{greaterThan:n,greaterThanOrEqualTo:i,lessThan:s,lessThanOrEqualTo:a}=e;n&&a&&n>=a&&r.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&s&&i>=s&&r.add("The greaterThanOrEqualTo value must be less than the lessThan value"),n&&s&&n>=s&&r.add("The greaterThan value must be less than the lessThan value"),i&&a&&i>=a&&r.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var E1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},IS;class $d{constructor(){IS.set(this,new _Ze)}validate(e,r){var n;if(e.value===void 0&&e.values===void 0&&e.notEquals===void 0){r.add("Either SearchToken value or values or notEquals must be provided");return}if(e.value!==void 0&&E1(this,IS,"f").validate(e.value,r),e.values!==void 0&&e.values.length===0){r.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(n=e.values)!==null&&n!==void 0?n:[])E1(this,IS,"f").validate(i,r);if(e.notEquals!==void 0){if(e.notEquals.values!==void 0){if(e.notEquals.values.length===0){r.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of e.notEquals.values)E1(this,IS,"f").validate(i,r)}e.notEquals.code===void 0&&e.notEquals.value===void 0&&e.notEquals.system===void 0&&e.notEquals.values===void 0&&r.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}IS=new WeakMap;class _Ze{validate(e,r){!e.system&&!e.code&&r.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var SIt,Rh=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},A1,T1,b1,C1,R1,O1,P1;class I1 extends Fs{constructor(){super(...arguments),A1.set(this,new $d),T1.set(this,new Ch)}validate(e,r){super.validate(e,r),e.groupCode&&Rh(this,A1,"f").validate(e.groupCode,r),e.lastUpdated&&Rh(this,T1,"f").validate(e.lastUpdated,r)}}A1=new WeakMap,T1=new WeakMap;class mZe{validate(e,r){e.length===0&&r.add("Prescription array must not be empty.")}}class xse extends Fs{constructor(){super(...arguments),b1.set(this,new mZe),C1.set(this,new Ch)}validate(e,r){super.validate(e,r),e.lastUpdated!==void 0&&Rh(this,C1,"f").validate(e.lastUpdated,r),e.prescription!==void 0&&Rh(this,b1,"f").validate(e.prescription,r)}}b1=new WeakMap,C1=new WeakMap;class gZe extends Fs{validate(e,r){var n;super.validate(e,r),!((n=e?.ids)===null||n===void 0)&&n.length||r.add("ids must not be empty")}}class vZe extends Os{constructor(){super(...arguments),this.validator=new I1}}class yIt extends null{}class EIt extends null{}class AIt extends null{}class TIt extends null{}class SZe extends I1{constructor(){super(...arguments),R1.set(this,new $d)}validate(e,r){super.validate(e,r),e.category!==void 0&&Rh(this,R1,"f").validate(e.category,r)}}R1=new WeakMap;class bIt extends Os{constructor(){super(...arguments),this.validator=new SZe}}class CIt extends null{}class RIt extends null{}class OIt extends null{}class PIt extends null{}class IIt extends null{}class MIt extends null{}class wIt extends null{}class NIt extends null{}class DIt extends null{}class LIt extends null{}class $It extends null{}class xIt extends null{}class UIt extends null{}class FIt extends null{}class kIt extends null{}class yZe extends xse{constructor(){super(...arguments),O1.set(this,new $d)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&Rh(this,O1,"f").validate(e.medicationCode,r)}}O1=new WeakMap;class GIt extends Os{constructor(){super(...arguments),this.validator=new xse}}class VIt extends Os{constructor(){super(...arguments),this.validator=new yZe}}class EZe extends I1{constructor(){super(...arguments),P1.set(this,new $d)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&Rh(this,P1,"f").validate(e.medicationCode,r)}}P1=new WeakMap;class BIt extends vZe{constructor(){super(...arguments),this.validator=new EZe}}class jIt extends null{}class zIt extends null{}class HIt extends Os{constructor(){super(...arguments),this.validator=new gZe}}class AZe{validate(e,r){Is(e.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class qIt extends _n{constructor(){super(...arguments),this.validator=new AZe}}class TZe{validate(e,r){Is(e.bodySystemId)&&r.add("The body system score request must contain a body system id.")}}class YIt extends _n{constructor(){super(...arguments),this.validator=new TZe}}class bZe extends Fs{validate(e,r){Is(e.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(e,r)}}class QIt extends Os{constructor(){super(...arguments),this.validator=new bZe}}class CZe extends Fs{validate(e,r){Is(e.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(e,r)}}class WIt extends Os{constructor(){super(...arguments),this.validator=new CZe}}var Use;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(Use||(Use={}));class RZe{validate(e,r){Ks(e)&&r.add("input must be provided."),Ps(e.id)&&r.add("id must be a non-empty string."),Ks(e.status)&&r.add("status is required.")}}class KIt extends _n{constructor(){super(...arguments),this.validator=new RZe}}class OZe{validate(e,r){if(Ps(e.file)){r.add("File content is required");return}const n=bie(e.file);if(n===null){r.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)");return}n.data.length>K7e&&r.add(`File content must not exceed ${Cie/(1024*1024)} MB`)}}class ZIt extends _n{constructor(){super(...arguments),this.validator=new OZe}}const PZe=new Set(Object.values(y1));function M1(t){return PZe.has(t)}var IZe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},w1,Fse;class MZe extends Fs{constructor(){super(...arguments),w1.add(this)}validate(e,r){if(super.validate(e,r),!Zs(e.status)){const n=Array.isArray(e.status)?e.status:[e.status];for(const i of n)IZe(this,w1,"m",Fse).call(this,i,r)}}}w1=new WeakSet,Fse=function(e,r){M1(e)||r.add(`Invalid task status: "${e}"`)};class XIt extends Os{constructor(){super(...arguments),this.validator=new MZe}}class wZe{validate(e,r){M1(e.newStatus)||r.add(`Invalid task status: "${e.newStatus}"`)}}class JIt extends _n{constructor(){super(...arguments),this.validator=new wZe}}class NZe{validate(e,r){M1(e.newStatus)||r.add(`Invalid task status: "${e.newStatus}"`)}}class eMt extends _n{constructor(){super(...arguments),this.validator=new NZe}transformInput(e){return{id:e.taskId,status:e.newStatus}}}var FR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},N_,kse,Gse,Vse,Bse;class tMt extends Os{constructor(){super(...arguments),this.validator=new DZe}}class DZe extends Fs{constructor(){super(...arguments),N_.add(this)}validate(e,r){super.validate(e,r),On(e.organizationTypeFilters)&&FR(this,N_,"m",kse).call(this,e.organizationTypeFilters,r),On(e.sortBy)&&FR(this,N_,"m",Gse).call(this,e.sortBy,r),On(e.filterFields)&&FR(this,N_,"m",Vse).call(this,e.filterFields,r),On(e.gender)&&FR(this,N_,"m",Bse).call(this,e.gender,r)}}N_=new WeakSet,kse=function(e,r){for(const n of e)$Ze(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},Gse=function(e,r){On(e.field)&&!UZe(e.field)&&r.add(`Invalid sortBy.field value: "${e.field}"`),On(e.order)&&!kZe(e.order)&&r.add(`Invalid sortBy.order value: "${e.order}"`)},Vse=function(e,r){for(const n of e)VZe(n)||r.add(`Invalid filterField value: "${n}"`)},Bse=function(e,r){Pse(e)||r.add(`Invalid gender value: "${e}"`)};const LZe=new Set(Object.values(v1));function $Ze(t){return LZe.has(t)}const xZe=new Set(Object.values(S1));function UZe(t){return xZe.has(t)}const FZe=new Set(Object.values(xR));function kZe(t){return FZe.has(t)}const GZe=new Set(Object.values(_1));function VZe(t){return GZe.has(t)}var rMt;class nMt extends null{}class iMt extends Os{constructor(){super(...arguments),this.validator=new BZe}}class BZe extends Fs{validate(e,r){super.validate(e,r)}}const jZe="data-connection-status";var zZe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},N1;const HZe="connectionId cannot be null or empty",qZe="username cannot be null or empty",YZe="password cannot be null or empty",QZe="integrationType array cannot be empty",WZe="integrationType array cannot contain blank or empty strings",KZe="status array cannot be empty",ZZe="status array cannot contain blank or empty strings";class jse{validate(e,r){e.connectionId===""&&r.add(HZe)}}class XZe{constructor(){N1.set(this,new jse)}validate(e,r){zZe(this,N1,"f").validate(e,r),e.integrationType!=="DIRECT"&&(Ps(e.username)&&r.add(qZe),Ps(e.password)&&r.add(YZe))}}N1=new WeakMap;class JZe extends _n{constructor(){super(...arguments),this.validator=new jse}}class sMt extends null{}class aMt extends null{}class oMt extends JZe{constructor(){super(...arguments),this.validator=new XZe}transformInput(e){var r,n,i;return{connectionId:e.connectionId,username:(r=e.username)!==null&&r!==void 0?r:null,password:(n=e.password)!==null&&n!==void 0?n:null,integrationType:(i=e.integrationType)!==null&&i!==void 0?i:null}}}class uMt extends _n{constructor(){super(...arguments),this.validator={validate:(e,r)=>{e.integrationType!==void 0&&e.integrationType!==null&&(e.integrationType.length===0&&r.add(QZe),e.integrationType.some(n=>n===""||n.trim()==="")&&r.add(WZe)),e.status!==void 0&&e.status!==null&&(e.status.length===0&&r.add(KZe),e.status.some(n=>n===""||n.trim()==="")&&r.add(ZZe))}}}data(){return this.input()}}const eXe="deviceToken is required",tXe="platformName must be a valid DevicePlatform value",rXe="applicationName is required",nXe="connectionId is required";var D1;(function(t){t.IOS="IOS",t.ANDROID="ANDROID"})(D1||(D1={}));const iXe=new Set(Object.values(D1));function sXe(t){return iXe.has(t)}function aXe(t){return!sXe(t)}class zse{validate(e,r){Is(e.deviceToken)&&r.add(eXe)}}class oXe extends zse{validate(e,r){super.validate(e,r),aXe(e.platformName.toUpperCase())&&r.add(tXe),Is(e.applicationName)&&r.add(rXe)}}class cMt extends _n{constructor(){super(...arguments),this.validator=new oXe}}class lMt extends _n{constructor(){super(...arguments),this.validator=new zse}}class L1{validate(e,r){Is(e.connectionId)&&r.add(nXe)}}class dMt extends _n{constructor(){super(...arguments),this.validator=new L1}}class fMt extends _n{constructor(){super(...arguments),this.validator=new L1}}class hMt extends _n{constructor(){super(...arguments),this.validator=new L1}}const uXe="string parameter serializedNotification must be provided",cXe="serialized notification must have a non-empty notification_id field of type string",Hse="serialized notification must have an itbl object containing a non-empty messageId field of type string",lXe="parsed notification must be a non-null object.",dXe="serialized notification is not valid JSON.";class fXe{validate(e,r){if(Zs(e.serializedNotification)||typeof e.serializedNotification!="string"||Is(e.serializedNotification)){r.add(uXe);return}let n=null;try{n=JSON.parse(e.serializedNotification)}catch{r.add(dXe);return}if(typeof n!="object"||n===null){r.add(lXe);return}const{itbl:i,notification_id:s}=n;if((Zs(s)||typeof s!="string"||Is(s))&&r.add(cXe),typeof i!="object"||Ks(i)){r.add(Hse);return}(Zs(i.messageId)||typeof i.messageId!="string"||Is(i.messageId))&&r.add(Hse)}}class pMt extends _n{constructor(){super(...arguments),this.validator=new fXe}}var $1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},MS;class hXe extends Fs{constructor(){super(...arguments),MS.set(this,new Ch)}validate(e,r){(Zs(e.coverage)||Is(e.coverage))&&r.add("The claim summary request must contain a coverage ID."),On(e.dateReceived)&&$1(this,MS,"f").validate(e.dateReceived,r),On(e.servicePeriod)&&$1(this,MS,"f").validate(e.servicePeriod,r),On(e.dateProcessed)&&$1(this,MS,"f").validate(e.dateProcessed,r),super.validate(e,r)}}MS=new WeakMap;class _Mt extends Os{constructor(){super(...arguments),this.validator=new hXe}}const pXe="SearchReference value should be a non-empty string";class qse{validate(e,r){Ks(e.value)||(typeof e.value!="string"||Is(e.value))&&r.add(pXe)}}const _Xe="SearchStringValue should be a non-empty string";class wS{validate(e,r){if(Ks(e.values))return;let n=!1;for(const i of e.values)Is(i)&&(n=!0);n&&r.add(_Xe)}}var kR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},x1,U1,GR;class mXe extends Fs{constructor(){super(...arguments),x1.set(this,new wS),U1.set(this,new Ch),GR.set(this,new qse)}validate(e,r){super.validate(e,r),On(e.id)&&kR(this,x1,"f").validate(e.id,r),On(e.lastUpdated)&&kR(this,U1,"f").validate(e.lastUpdated,r),On(e.beneficiary)&&kR(this,GR,"f").validate(e.beneficiary,r),On(e.patient)&&kR(this,GR,"f").validate(e.patient,r)}}x1=new WeakMap,U1=new WeakMap,GR=new WeakMap;class mMt extends Os{constructor(){super(...arguments),this.validator=new mXe}}class gXe extends Fs{validate(e,r){super.validate(e,r)}}class gMt extends Os{constructor(){super(...arguments),this.validator=new gXe}}class vXe{validate(e,r){(Zs(e.claimId)||Is(e.claimId))&&r.add("The EOB document request must contain a claimId.")}}class vMt extends _n{constructor(){super(...arguments),this.validator=new vXe}}var Oh=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},F1,VR,NS,k1;class SXe extends Fs{constructor(){super(...arguments),F1.set(this,new wS),VR.set(this,new Ch),NS.set(this,new qse),k1.set(this,new $d)}validate(e,r){super.validate(e,r),On(e.id)&&Oh(this,F1,"f").validate(e.id,r),On(e.lastUpdated)&&Oh(this,VR,"f").validate(e.lastUpdated,r),On(e.created)&&Oh(this,VR,"f").validate(e.created,r),On(e.patient)&&Oh(this,NS,"f").validate(e.patient,r),On(e.provider)&&Oh(this,NS,"f").validate(e.provider,r),On(e.coverage)&&Oh(this,NS,"f").validate(e.coverage,r),On(e.status)&&Oh(this,k1,"f").validate(e.status,r)}}F1=new WeakMap,VR=new WeakMap,NS=new WeakMap,k1=new WeakMap;class SMt extends Os{constructor(){super(...arguments),this.validator=new SXe}}var G1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},V1,B1,j1;class yXe{constructor(){V1.set(this,new Ch),B1.set(this,new wS),j1.set(this,new $d)}validate(e,r){var n;Wr(e._source)&&G1(this,B1,"f").validate(e._source,r),Wr(e.date)&&G1(this,V1,"f").validate(e.date,r),Wr(e._count)&&e._count<0&&r.add("Value of count cannot be less than 0"),Wr(e._getpagesoffset)&&e._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),Wr((n=e.supporting_info)===null||n===void 0?void 0:n.value)&&Is(e.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),Wr(e.status)&&G1(this,j1,"f").validate(e.status,r)}}V1=new WeakMap,B1=new WeakMap,j1=new WeakMap;class yMt extends _n{constructor(){super(...arguments),this.validator=new yXe}}class EXe{validate(e,r){if(!Ks(e.cancelationReason)){if(Ks(e.cancelationReason.coding)||e.cancelationReason.coding.length===0){r.add("cancelationReason must have at least one coding");return}for(const n of e.cancelationReason.coding)(Ks(n?.code)||Ks(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class EMt extends _n{constructor(){super(...arguments),this.validator=new EXe}}class AXe{validate(e,r){if(Ks(e.notificationPreferences)||e.notificationPreferences.length===0){r.add("notificationPreferences is required and must not be empty");return}e.notificationPreferences.forEach((n,i)=>{Ks(n.method)&&r.add(`notificationPreferences[${i}].method is required`),Ks(n.enabled)&&r.add(`notificationPreferences[${i}].enabled is required`)})}}class AMt extends _n{constructor(){super(...arguments),this.validator=new AXe}}class TXe{validate(e,r){var n;Ps((n=e.organization.value)===null||n===void 0?void 0:n.trim())&&r.add("Organization reference is required and must have a non-empty value.")}}class TMt extends _n{constructor(){super(...arguments),this.validator=new TXe}}class BR{validate(e,r,n={}){const{requireRole:i=!0}=n;Wr(e.id)?Is(e.id)?r.add("Member id cannot be empty"):e.id.length>255&&r.add("Member id cannot exceed 255 characters"):r.add("Member id is required"),Wr(e.type)?Is(e.type)&&r.add("Member type cannot be empty"):r.add("Member type is required");const s=Wr(e.role);if(i&&!s&&r.add("Member role is required"),s&&e.role)for(let a=0;a<e.role.length;a++){const o=e.role[a];Wr(o)?Is(o)&&r.add(`Role ${a}: Cannot be blank`):r.add(`Role ${a}: Cannot be null or undefined`)}}}class bMt extends _n{constructor(){super(...arguments),this.validator=new BR}}class bXe{constructor(){this.updateValidator=new BR}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!1})}}class CMt extends _n{constructor(){super(...arguments),this.validator=new bXe}}class CXe{constructor(){this.updateValidator=new BR}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!0})}}class RMt extends _n{constructor(){super(...arguments),this.validator=new CXe}}class RXe{constructor(){this.updateValidator=new BR}validate(e,r){if(!Wr(e.members)){r.add("Members array is required");return}if(e.members.length===0){r.add("Members array cannot be empty");return}for(let n=0;n<e.members.length;n++){const i=e.members[n];if(!Wr(i)){r.add(`Member ${n}: Cannot be null or undefined`);continue}const s=new gie;this.updateValidator.validate(i,s,{requireRole:!0});for(const a of s.errors())r.add(`Member ${n}: ${a}`)}}}class OMt extends _n{constructor(){super(...arguments),this.validator=new RXe}}class OXe extends Fs{validate(e,r){super.validate(e,r)}}class PXe extends Os{constructor(){super(...arguments),this.validator=new OXe}}class IXe{validate(e,r){const n=e.questionnaireResponse;if(Ks(n)){r.add("questionnaireResponse is required");return}if((Ps(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ps(n.status)&&r.add("questionnaireResponse.status is required"),Ps(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Ks(n.contained)||n.contained.length===0)r.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const s of n.contained){if(Ks(s)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(s.resourceType==="Questionnaire"){i=s;break}}if(Ks(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}Ps(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class PMt extends _n{constructor(){super(...arguments),this.validator=new IXe}}class MXe{validate(e,r){const n=e.questionnaireResponse;if(Ks(n)){r.add("questionnaireResponse is required");return}(Ps(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ps(n.status)&&r.add("questionnaireResponse.status is required"),Ps(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required")}}class IMt extends _n{constructor(){super(...arguments),this.validator=new MXe}}var jR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},z1,H1,zR;class wXe extends Fs{constructor(){super(...arguments),z1.set(this,new Ch),H1.set(this,new wS),zR.set(this,new $d)}validate(e,r){super.validate(e,r),Wr(e.id)&&jR(this,H1,"f").validate(e.id,r),Wr(e.lastUpdated)&&jR(this,z1,"f").validate(e.lastUpdated,r),Wr(e.status)&&jR(this,zR,"f").validate(e.status,r),Wr(e.tag)&&jR(this,zR,"f").validate(e.tag,r)}}z1=new WeakMap,H1=new WeakMap,zR=new WeakMap;class MMt extends Os{constructor(){super(...arguments),this.validator=new wXe}}var D_=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},HR,L_;class NXe extends Fs{constructor(){super(...arguments),HR.set(this,new wS),L_.set(this,new $d)}validate(e,r){super.validate(e,r),Wr(e.id)&&D_(this,HR,"f").validate(e.id,r),Wr(e.name)&&D_(this,HR,"f").validate(e.name,r),Wr(e.tag)&&D_(this,L_,"f").validate(e.tag,r),Wr(e.security)&&D_(this,L_,"f").validate(e.security,r),Wr(e.context)&&D_(this,L_,"f").validate(e.context,r),Wr(e.identifier)&&D_(this,L_,"f").validate(e.identifier,r)}}HR=new WeakMap,L_=new WeakMap;class wMt extends Os{constructor(){super(...arguments),this.validator=new NXe}}class DXe extends Fs{validate(e,r){super.validate(e,r)}}class NMt extends Os{constructor(){super(...arguments),this.validator=new DXe}}class LXe{validate(e,r){e.file.trim()||r.add("File content is required"),e.file.trim()&&!W7e(e.file)&&r.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"),e.fileName.trim()||r.add("File name is required")}}class DMt extends _n{constructor(){super(...arguments),this.validator=new LXe}}class $Xe{validate(e,r){e.attachmentId.trim()||r.add("Attachment ID is required")}}class LMt extends _n{constructor(){super(...arguments),this.validator=new $Xe}}class xXe{validate(e,r){e.subject.trim()||r.add("Subject is required"),e.comment.body.trim()||r.add("Comment body is required"),e.fields.category.trim()||r.add("Category is required")}}class $Mt extends _n{constructor(){super(...arguments),this.validator=new xXe}}class UXe extends Fs{validate(e,r){super.validate(e,r)}}class xMt extends Os{constructor(){super(...arguments),this.validator=new UXe}}class FXe extends Fs{validate(e,r){e.requestId<0&&r.add("requestId must be a non-negative number"),super.validate(e,r)}}class UMt extends Os{constructor(){super(...arguments),this.validator=new FXe}}class kXe{validate(e,r){e.requestId<0&&r.add("Request ID must be a non-negative integer"),Ps(e.body.trim())&&r.add("Comment body is required")}}class FMt extends _n{constructor(){super(...arguments),this.validator=new kXe}}class GXe{validate(e,r){Ps(e.attachmentId.trim())&&r.add("attachmentId must be a non-empty string"),e.requestId<0&&r.add("requestId must be a non-negative number")}}class kMt extends _n{constructor(){super(...arguments),this.validator=new GXe}}const VXe="code cannot be null or empty";class BXe{validate(e,r){Ps(e.code)&&r.add(VXe)}}class GMt extends _n{constructor(){super(...arguments),this.validator=new BXe}}const jXe="consentId cannot be null or empty";class zXe{validate(e,r){Ps(e.consentId)&&r.add(jXe)}}class HXe extends _n{constructor(){super(...arguments),this.validator=new zXe}}var q1=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})};class Y1{constructor(e=new Map){this.storage=e}get(e){return q1(this,void 0,void 0,function*(){return this.storage.get(e)})}set(e,r){return q1(this,void 0,void 0,function*(){this.storage.set(e,r)})}delete(e){return q1(this,void 0,void 0,function*(){return this.storage.delete(e)})}}const qXe={logLevel:m1.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new Y1,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var pl;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(pl||(pl={}));var YXe=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Yse=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},DS,an;(function(t){t[t.VERBOSE=0]="VERBOSE",t[t.DEBUG=1]="DEBUG",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.FATAL=5]="FATAL"})(an||(an={}));const QXe={[an.VERBOSE]:"VERBOSE",[an.DEBUG]:"DEBUG",[an.INFO]:"INFO",[an.WARN]:"WARN",[an.ERROR]:"ERROR",[an.FATAL]:"FATAL"};class $_{constructor(e){DS.set(this,void 0),YXe(this,DS,e,"f")}get severity(){return Yse(this,DS,"f")}shouldLog(e){return e>=Yse(this,DS,"f")}static severityText(e){return QXe[e]}static severityFromText(e){switch(e){case"VERBOSE":return an.VERBOSE;case"DEBUG":return an.DEBUG;case"INFO":return an.INFO;case"WARN":return an.WARN;case"ERROR":return an.ERROR;case"FATAL":return an.FATAL;default:throw new Error(`Invalid severity text: ${e}`)}}}DS=new WeakMap;var Q1=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},yc=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},xd,Qse,qR,LS,YR,Ph;class Wse{constructor(e,r,n){xd.add(this),qR.set(this,void 0),LS.set(this,void 0),YR.set(this,void 0),Q1(this,qR,n,"f"),Q1(this,LS,new $_(e),"f"),Q1(this,YR,r,"f")}name(){return yc(this,qR,"f")}severity(){return yc(this,LS,"f").severity}verbose(e,r){yc(this,xd,"m",Ph).call(this,an.VERBOSE,e,r)}debug(e,r){yc(this,xd,"m",Ph).call(this,an.DEBUG,e,r)}info(e,r){yc(this,xd,"m",Ph).call(this,an.INFO,e,r)}warn(e,r){yc(this,xd,"m",Ph).call(this,an.WARN,e,r)}error(e,r){let n;r instanceof tr&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),yc(this,xd,"m",Ph).call(this,an.ERROR,e,n)}fatal(e,r){yc(this,xd,"m",Ph).call(this,an.FATAL,e,r)}static otelSeverityNumber(e){switch(e){case an.VERBOSE:return pl.TRACE;case an.DEBUG:return pl.DEBUG;case an.INFO:return pl.INFO;case an.WARN:return pl.WARN;case an.ERROR:return pl.ERROR;case an.FATAL:return pl.FATAL;default:return pl.UNSPECIFIED}}}Qse=Wse,qR=new WeakMap,LS=new WeakMap,YR=new WeakMap,xd=new WeakSet,Ph=function(e,r,n){yc(this,LS,"f").shouldLog(e)&&yc(this,YR,"f").emit({timestamp:Date.now(),severityNumber:Qse.otelSeverityNumber(e),severityText:$_.severityText(e),body:r,attributes:n??{}})};var Kse=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Zse=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},QR,WR;class WXe{constructor(e,r){QR.set(this,void 0),WR.set(this,void 0),Kse(this,WR,e,"f"),Kse(this,QR,r.loggerProvider(),"f")}getLogger(e){const r=e??"default",n=Zse(this,QR,"f").getLogger(r);return new Wse(Zse(this,WR,"f"),n,r)}}QR=new WeakMap,WR=new WeakMap;class KXe{format(e,r,n,i){let a=`[${new Date().toISOString()}] ${$_.severityText(e)}`;return n!==void 0&&(a+=` (${n})`),a+=`: ${r}`,i===void 0?[a]:[a,i]}}var W1=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ms=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ec,Ac,_l;class ZXe{constructor(e,r){Ec.set(this,void 0),Ac.set(this,void 0),_l.set(this,void 0),W1(this,Ac,new $_(e),"f"),W1(this,Ec,r,"f"),W1(this,_l,new KXe,"f")}name(){return Ms(this,Ec,"f")}severity(){return Ms(this,Ac,"f").severity}verbose(e,r){Ms(this,Ac,"f").shouldLog(an.VERBOSE)&&console.debug(...Ms(this,_l,"f").format(an.VERBOSE,e,Ms(this,Ec,"f"),r))}debug(e,r){Ms(this,Ac,"f").shouldLog(an.DEBUG)&&console.debug(...Ms(this,_l,"f").format(an.DEBUG,e,Ms(this,Ec,"f"),r))}info(e,r){Ms(this,Ac,"f").shouldLog(an.INFO)&&console.info(...Ms(this,_l,"f").format(an.INFO,e,Ms(this,Ec,"f"),r))}warn(e,r){Ms(this,Ac,"f").shouldLog(an.WARN)&&console.warn(...Ms(this,_l,"f").format(an.WARN,e,Ms(this,Ec,"f"),r))}error(e,r){let n=r;r instanceof tr&&(n=r.failure()?r.error():r.data()),Ms(this,Ac,"f").shouldLog(an.ERROR)&&console.error(...Ms(this,_l,"f").format(an.ERROR,e,Ms(this,Ec,"f"),n))}fatal(e,r){Ms(this,Ac,"f").shouldLog(an.FATAL)&&console.error(...Ms(this,_l,"f").format(an.FATAL,e,Ms(this,Ec,"f"),r))}}Ec=new WeakMap,Ac=new WeakMap,_l=new WeakMap;var XXe=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},JXe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},KR;class ws{constructor(e=an.FATAL){KR.set(this,void 0),XXe(this,KR,e,"f")}getLogger(e){return new ZXe(JXe(this,KR,"f"),e)}}KR=new WeakMap;var eJe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},K1,Xse;class tJe{constructor(){K1.add(this)}createLogProvider(e,r){switch(eJe(this,K1,"m",Xse).call(this,e)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new WXe(e.logLevel,r);case"console":return new ws(e.logLevel)}}}K1=new WeakSet,Xse=function(e){return e.telemetry.enabled?"otel":"console"};var pi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ml=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Qo,x_,Ud,U_,Fd,Ih,Jse,eae,tae,rae,nae,iae,sae,aae,oae,uae;class ZR{constructor(e){Qo.add(this),x_.set(this,void 0),Ud.set(this,void 0),U_.set(this,void 0),Fd.set(this,void 0),Ih.set(this,void 0),this.bwellConfig=pi(this,Qo,"m",nae).call(this,e),ml(this,x_,$_.severityFromText(this.bwellConfig.logLevel),"f"),ml(this,Ih,pi(this,Qo,"m",uae).call(this),"f"),ml(this,U_,pi(this,Qo,"m",sae).call(this),"f"),ml(this,Ud,pi(this,Qo,"m",aae).call(this),"f"),ml(this,Fd,pi(this,Qo,"m",oae).call(this),"f")}static initialize(e){try{const r=new ZR(e);return tr.success(r)}catch(r){if(ua.isBwellError(r))return tr.failure(r);throw r}}get logLevel(){return pi(this,x_,"f")}get graphQL(){return pi(this,U_,"f")}get telemetry(){return pi(this,Ud,"f")}get http(){return pi(this,Fd,"f")}get context(){return pi(this,Ih,"f")}setContextUser(e){pi(this,Ih,"f").user=e}mergeRemoteConfig(e){ml(this,x_,pi(this,Qo,"m",Jse).call(this,e),"f"),ml(this,U_,pi(this,Qo,"m",eae).call(this,e),"f"),ml(this,Ud,Object.freeze(pi(this,Qo,"m",tae).call(this,e)),"f"),ml(this,Fd,Object.freeze(pi(this,Qo,"m",rae).call(this,e)),"f")}}x_=new WeakMap,Ud=new WeakMap,U_=new WeakMap,Fd=new WeakMap,Ih=new WeakMap,Qo=new WeakSet,Jse=function(e){var r;const n=(r=e?.logLevel)!==null&&r!==void 0?r:null;return n===null?pi(this,x_,"f"):$_.severityFromText(n)},eae=function(e){var r;const n=(r=e?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return pi(this,U_,"f");const{authedApiUrl:i,unauthedApiUrl:s}=this.bwellConfig.overrides;return{unauthApiUrl:s??n.url,apiUrl:i??n.authUrl}},tae=function(e){var r,n;const i=(r=e?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return pi(this,Ud,"f");const s=(n=i.enabled)!==null&&n!==void 0?n:pi(this,Ud,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let a;try{a=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(a.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},pi(this,Ud,"f")),{enabled:s,collectorUrl:i.collectorUrl})},rae=function(e){var r,n,i;const s=(r=e?.httpClient)!==null&&r!==void 0?r:null;return s===null?pi(this,Fd,"f"):{timeout:(n=s.requestTimeout)!==null&&n!==void 0?n:pi(this,Fd,"f").timeout,retryPolicy:(i=s.retry)!==null&&i!==void 0?i:pi(this,Fd,"f").retryPolicy}},nae=function(e){return Object.assign(Object.assign({},qXe),e)},iae=function(){try{return J7e(this.bwellConfig.clientKey)}catch{throw new j7e("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},sae=function(){var e,r;return{apiUrl:(e=this.bwellConfig.overrides.authedApiUrl)!==null&&e!==void 0?e:`https://api-gateway.${pi(this,Ih,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${pi(this,Ih,"f").env}.icanbwell.com/federated-graph/graphql`}},aae=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},oae=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},uae=function(){return{clientKey:this.bwellConfig.clientKey,env:pi(this,Qo,"m",iae).call(this),user:null}};var rJe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},cae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},XR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},F_,JR;class nJe{constructor(e,r=new ws){F_.set(this,void 0),JR.set(this,void 0),cae(this,JR,e,"f"),cae(this,F_,r.getLogger("ConfigManager"),"f")}initialize(e){return rJe(this,void 0,void 0,function*(){const r=ZR.initialize(e);if(r.failure())return r;const n=r.data();XR(this,F_,"f").verbose("Initializing SDK Configuration");const i=yield XR(this,JR,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const s=i.data();try{n.mergeRemoteConfig(s)}catch(a){XR(this,F_,"f").error("Error merging SDK config with remote config.",a)}return XR(this,F_,"f").info("Remote SDK Configuration merged with user config"),tr.success(n)})}}F_=new WeakMap,JR=new WeakMap;class kd extends Error{response;request;constructor(e,r){const n=`${kd.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,kd.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,kd)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${String(e.status)})`}}const lae=t=>t.toUpperCase(),Z1=t=>typeof t=="function"?t():t,dae=(t,e)=>t.map((r,n)=>[r,e[n]]),k_=t=>{let e={};return t instanceof Headers?e=iJe(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):t&&(e=t),e},iJe=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},sJe=t=>{try{const e=t();return aJe(e)?e.catch(r=>fae(r)):e}catch(e){return fae(e)}},fae=t=>t instanceof Error?t:new Error(String(t)),aJe=t=>typeof t=="object"&&t!==null&&"then"in t&&typeof t.then=="function"&&"catch"in t&&typeof t.catch=="function"&&"finally"in t&&typeof t.finally=="function",X1=t=>{throw new Error(`Unhandled case: ${String(t)}`)},eO=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),VMt=t=>Object.entries(t),BMt=t=>Object.values(t),jMt=(t,e)=>Object.fromEntries(Object.entries(t).map(([r,n])=>[r,e(n,r)])),zMt=t=>t.charAt(0).toLowerCase()+t.slice(1);function HMt(t){if(!Array.isArray(t))throw new Error(`Expected array. Got: ${String(t)}`)}function qMt(t){if(t===null||typeof t!="object")throw new Error(`Expected object. Got: ${String(t)}`)}const YMt=t=>t.charAt(0).toUpperCase()+t.slice(1),QMt=t=>{let e=!1,r,n;return{promise:new Promise((s,a)=>{r=s,n=a}),isResolved:()=>e,resolve:s=>{if(e=!0,t?.strict&&e)throw new Error(`Deferred is already resolved. Attempted to resolve with: ${JSON.stringify(s)}`);r(s)},reject:s=>n(s)}},oJe=(...t)=>{process.env.DEBUG&&console.log(...t)},WMt=(...t)=>(...e)=>{oJe(...t,...e)},KMt=t=>{const e=[],r=[];for(const n of t)n instanceof Error?e.push(n):r.push(n);return[r,e]};var uJe;const ZMt=async(...t)=>{const e=cJe(t);return new uJe(e.url).batchRequests(e)},cJe=t=>t.length===1?t[0]:{url:t[0],documents:t[1],requestHeaders:t[2],signal:void 0},lJe=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};var dJe;const XMt=async(...t)=>{const[e,r,...n]=t,i=fJe(e,r,...n);return new dJe(i.url).rawRequest({...i})},fJe=(t,e,...r)=>{const[n,i]=r;return typeof t=="string"?{url:t,query:e,variables:n,requestHeaders:i,signal:void 0}:t},hJe=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0};var pJe=p(42455);const JMt="Accept",J1="Content-Type",eF="application/json",hae="application/graphql-response+json",ewt=null,pae=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),_Je=t=>{const e=t.toLowerCase();return e.includes(hae)||e.includes(eF)},_ae=t=>{try{if(Array.isArray(t))return{_tag:"Batch",executionResults:t.map(mae)};if(eO(t))return{_tag:"Single",executionResult:mae(t)};throw new Error(`Invalid execution result: result is not object or array.
|
|
13795
|
+
`));var T4e,b4e,C4e,Yre,R4e,O4e,nR,Qre;const lPt=(t,e={})=>{const r=O4e(),[n,i]=b4e({data:void 0,error:void 0,loading:!e.skip,networkStatus:e.skip?nR.ready:nR.loading}),s=C4e(!0),a=Yre(()=>e,[JSON.stringify(e)]),o=Yre(()=>t,[t]);return R4e(()=>{if(a.skip){i({data:void 0,error:void 0,loading:!1,networkStatus:nR.ready});return}return T4e(void 0,void 0,void 0,function*(){i(c=>Object.assign(Object.assign({},c),{loading:!0,error:null}));try{const c=yield r.query(Object.assign({query:o},a));s.current&&i(c)}catch(c){s.current&&i({data:void 0,loading:!1,error:c instanceof Qre?c:new Qre({errorMessage:c.message}),networkStatus:nR.error})}}),()=>{s.current=!1}},[o,a,r]),n};var Wre,iR,cs,P4e,I4e,M4e,w4e,N4e,D4e,Kre,Zre,L4e,$4e,x4e,U4e,F4e,k4e,G4e,V4e,B4e,j4e,z4e,H4e,q4e,Y4e,Q4e,W4e,K4e,Z4e,X4e;const dPt=t=>cs(P4e,t),fPt=t=>cs(I4e,t),hPt=t=>cs(M4e,t),pPt=t=>cs(w4e,t),_Pt=t=>cs(N4e,t),mPt=t=>cs(D4e,t),gPt=t=>cs(Kre,t),vPt=t=>Wre(Kre,t),SPt=t=>cs(Zre,t),yPt=t=>Wre(Zre,t),EPt=t=>cs(L4e,t),APt=t=>cs($4e,t),TPt=t=>cs(x4e,t),bPt=t=>cs(U4e,t),CPt=t=>cs(F4e,t),RPt=t=>cs(k4e,t),OPt=t=>cs(G4e,t),PPt=t=>cs(V4e,t),IPt=t=>cs(B4e,t),MPt=t=>iR(j4e,t),wPt=t=>cs(z4e,t),NPt=t=>cs(H4e,t),DPt=t=>cs(q4e,t),LPt=t=>cs(Y4e,t),$Pt=t=>iR(Q4e,t),xPt=t=>iR(W4e,t),UPt=t=>iR(K4e,t),FPt=t=>X4e(Z4e,t);var J4e,wU,sR,e6e,t6e,r6e,n6e,i6e,Xre,s6e;const kPt=t=>wU(e6e,t),GPt=t=>wU(t6e,t),VPt=t=>wU(r6e,t),BPt=t=>sR(n6e,t),jPt=t=>sR(i6e,t),zPt=t=>sR(Xre,t),HPt=t=>J4e(Xre,t),qPt=t=>sR(s6e,t);var YPt=p(82451),NU,a6e,DU,Jre,ene,tne,o6e,aR;const oR=null,QPt=t=>{const e=aR({},oR,t);return DU(Jre,e)},WPt=t=>{const e=aR({},oR,t);return NU(Jre,e)},KPt=t=>{const e=aR({},oR,t);return DU(ene,e)},ZPt=t=>{const e=aR({},oR,t);return NU(ene,e)},XPt=t=>DU(tne,t),JPt=t=>NU(tne,t),eIt=t=>a6e(o6e,t);var u6e,c6e;const rne=null;function tIt(t={}){return u6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:rne})}))}function rIt(t={}){return c6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:rne})}))}var l6e,d6e;const nne=null;function nIt(t={}){return l6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:nne})}))}function iIt(t={}){return d6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:nne})}))}var f6e,h6e;const ine=null;function sIt(t={}){return f6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:ine})}))}function aIt(t={}){return h6e(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:ine})}))}var sne,p6e,_6e;const oIt=t=>sne(p6e,t),uIt=t=>sne(_6e,t);var ane=p(50046),m6e=!1,one=yo,g6e=Rs,v6e=pc,S6e=Us,LU=w9,y6e=tU,E6e=Ax,A6e=IC,T6e=Cx,R_=Object.assign,une=Object.defineProperty,b6e=g6e([].concat),C6e=!R_||S6e(function(){if(one&&R_({b:1},R_(une({},"a",{enumerable:!0,get:function(){une(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(i){e[i]=i}),R_({},t)[r]!==7||LU(R_({},e)).join("")!==n})?function(e,r){for(var n=A6e(e),i=arguments.length,s=1,a=y6e.f,o=E6e.f;i>s;)for(var u=T6e(arguments[s++]),c=a?b6e(LU(u),a(u)):LU(u),l=c.length,d=0,f;l>d;)f=c[d++],(!one||v6e(o,u,f))&&(n[f]=u[f]);return n}:R_,R6e=wd,cne=C6e;R6e({target:"Object",stat:!0,arity:2,forced:Object.assign!==cne},{assign:cne});var O6e=Us,lne=!O6e(function(){return Object.isExtensible(Object.preventExtensions({}))}),P6e=uS,$U=function(t,e,r){for(var n in e)P6e(t,n,e[n],r);return t},dne={exports:{}},fne={},I6e=Rs,M6e=I6e([].slice),w6e=m_,N6e=g_,hne=xC.f,D6e=M6e,pne=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],L6e=function(t){try{return hne(t)}catch{return D6e(pne)}};fne.f=function(e){return pne&&w6e(e)==="Window"?L6e(e):hne(N6e(e))};var $6e=Us,x6e=$6e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),U6e=Us,F6e=Ta,k6e=m_,_ne=x6e,uR=Object.isExtensible,G6e=U6e(function(){uR(1)}),V6e=G6e||_ne?function(e){return!F6e(e)||_ne&&k6e(e)==="ArrayBuffer"?!1:uR?uR(e):!0}:uR,B6e=wd,j6e=Rs,z6e=wC,H6e=Ta,xU=Eo,q6e=qo.f,mne=xC,Y6e=fne,UU=V6e,Q6e=xx,W6e=lne,gne=!1,hl=Q6e("meta"),K6e=0,FU=function(t){q6e(t,hl,{value:{objectID:"O"+K6e++,weakData:{}}})},Z6e=function(t,e){if(!H6e(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!xU(t,hl)){if(!UU(t))return"F";if(!e)return"E";FU(t)}return t[hl].objectID},X6e=function(t,e){if(!xU(t,hl)){if(!UU(t))return!0;if(!e)return!1;FU(t)}return t[hl].weakData},J6e=function(t){return W6e&&gne&&UU(t)&&!xU(t,hl)&&FU(t),t},e5e=function(){t5e.enable=function(){},gne=!0;var t=mne.f,e=j6e([].splice),r={};r[hl]=1,t(r).length&&(mne.f=function(n){for(var i=t(n),s=0,a=i.length;s<a;s++)if(i[s]===hl){e(i,s,1);break}return i},B6e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Y6e.f}))},t5e=dne.exports={enable:e5e,fastKey:Z6e,getWeakData:X6e,onFreeze:J6e};z6e[hl]=!0;var kU=dne.exports,r5e=m_,n5e=Rs,i5e=function(t){if(r5e(t)==="Function")return n5e(t)},vne=i5e,s5e=v_,a5e=bC,o5e=vne(vne.bind),Sne=function(t,e){return s5e(t),e===void 0?t:a5e?o5e(t,e):function(){return t.apply(e,arguments)}},u5e=io,c5e=lS,l5e=u5e("iterator"),d5e=Array.prototype,f5e=function(t){return t!==void 0&&(c5e.Array===t||d5e[l5e]===t)},h5e=nU,yne=PC,p5e=iS,_5e=lS,m5e=io,g5e=m5e("iterator"),Ene=function(t){if(!p5e(t))return yne(t,g5e)||yne(t,"@@iterator")||_5e[h5e(t)]},v5e=pc,S5e=v_,y5e=Yo,E5e=Mx,A5e=Ene,T5e=TypeError,b5e=function(t,e){var r=arguments.length<2?A5e(t):e;if(S5e(r))return y5e(v5e(r,t));throw new T5e(E5e(t)+" is not iterable")},C5e=pc,Ane=Yo,R5e=PC,GU=function(t,e,r){var n,i;Ane(t);try{if(n=R5e(t,"return"),!n){if(e==="throw")throw r;return r}n=C5e(n,t)}catch(s){i=!0,n=s}if(e==="throw")throw r;if(i)throw n;return Ane(n),r},O5e=Sne,P5e=pc,I5e=Yo,M5e=Mx,w5e=f5e,N5e=Xx,Tne=RC,D5e=b5e,L5e=Ene,bne=GU,$5e=TypeError,cR=function(t,e){this.stopped=t,this.result=e},Cne=cR.prototype,VU=function(t,e,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),s=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),o=!!(r&&r.INTERRUPTED),u=O5e(e,n),c,l,d,f,_,m,E,S=function(w){return c&&bne(c,"normal",w),new cR(!0,w)},C=function(w){return i?(I5e(w),o?u(w[0],w[1],S):u(w[0],w[1])):o?u(w,S):u(w)};if(s)c=t.iterator;else if(a)c=t;else{if(l=L5e(t),!l)throw new $5e(M5e(t)+" is not iterable");if(w5e(l)){for(d=0,f=N5e(t);f>d;d++)if(_=C(t[d]),_&&Tne(Cne,_))return _;return new cR(!1)}c=D5e(t,l)}for(m=s?t.next:c.next;!(E=P5e(m,c)).done;){try{_=C(E.value)}catch(w){bne(c,"throw",w)}if(typeof _=="object"&&_&&Tne(Cne,_))return _}return new cR(!1)},x5e=RC,U5e=TypeError,BU=function(t,e){if(x5e(e,t))return t;throw new U5e("Incorrect invocation")},F5e=io,Rne=F5e("iterator"),One=!1;try{var k5e=0,Pne={next:function(){return{done:!!k5e++}},return:function(){One=!0}};Pne[Rne]=function(){return this},Array.from(Pne,function(){throw 2})}catch{}var G5e=function(t,e){try{if(!e&&!One)return!1}catch{return!1}var r=!1;try{var n={};n[Rne]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},V5e=wd,B5e=ja,j5e=Rs,Ine=f9,z5e=uS,H5e=kU,q5e=VU,Y5e=BU,Q5e=Qs,W5e=iS,jU=Ta,zU=Us,K5e=G5e,Z5e=jC,X5e=g9,J5e=function(t,e,r){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,s=n?"set":"add",a=B5e[t],o=a&&a.prototype,u=a,c={},l=function(C){var w=j5e(o[C]);z5e(o,C,C==="add"?function(V){return w(this,V===0?0:V),this}:C==="delete"?function(x){return i&&!jU(x)?!1:w(this,x===0?0:x)}:C==="get"?function(V){return i&&!jU(V)?void 0:w(this,V===0?0:V)}:C==="has"?function(V){return i&&!jU(V)?!1:w(this,V===0?0:V)}:function(V,H){return w(this,V===0?0:V,H),this})},d=Ine(t,!Q5e(a)||!(i||o.forEach&&!zU(function(){new a().entries().next()})));if(d)u=r.getConstructor(e,t,n,s),H5e.enable();else if(Ine(t,!0)){var f=new u,_=f[s](i?{}:-0,1)!==f,m=zU(function(){f.has(1)}),E=K5e(function(C){new a(C)}),S=!i&&zU(function(){for(var C=new a,w=5;w--;)C[s](w,w);return!C.has(-0)});E||(u=e(function(C,w){Y5e(C,o);var x=X5e(new a,C,u);return W5e(w)||q5e(w,x[s],{that:x,AS_ENTRIES:n}),x}),u.prototype=o,o.constructor=u),(m||S)&&(l("delete"),l("has"),n&&l("get")),(S||_)&&l(s),i&&o.clear&&delete o.clear}return c[t]=u,V5e({global:!0,constructor:!0,forced:u!==a},c),Z5e(u,t),i||r.setStrong(u,t,n),u},e9e=m_,t9e=Array.isArray||function(e){return e9e(e)==="Array"},r9e=Rs,n9e=Us,Mne=Qs,i9e=nU,s9e=sS,a9e=X5,wne=function(){},Nne=s9e("Reflect","construct"),HU=/^\s*(?:class|function)\b/,o9e=r9e(HU.exec),u9e=!HU.test(wne),_S=function(e){if(!Mne(e))return!1;try{return Nne(wne,[],e),!0}catch{return!1}},Dne=function(e){if(!Mne(e))return!1;switch(i9e(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return u9e||!!o9e(HU,a9e(e))}catch{return!0}};Dne.sham=!0;var c9e=!Nne||n9e(function(){var t;return _S(_S.call)||!_S(Object)||!_S(function(){t=!0})||t})?Dne:_S,Lne=t9e,l9e=c9e,d9e=Ta,f9e=io,h9e=f9e("species"),$ne=Array,p9e=function(t){var e;return Lne(t)&&(e=t.constructor,l9e(e)&&(e===$ne||Lne(e.prototype))?e=void 0:d9e(e)&&(e=e[h9e],e===null&&(e=void 0))),e===void 0?$ne:e},_9e=p9e,m9e=function(t,e){return new(_9e(t))(e===0?0:e)},g9e=Sne,v9e=Rs,S9e=Cx,y9e=IC,E9e=Xx,A9e=m9e,xne=v9e([].push),Une=function(t){var e=t===1,r=t===2,n=t===3,i=t===4,s=t===6,a=t===7,o=t===5||s;return function(u,c,l,d){for(var f=y9e(u),_=S9e(f),m=E9e(_),E=g9e(c,l),S=0,C=d||A9e,w=e?C(u,m):r||a?C(u,0):void 0,x,V;m>S;S++)if((o||S in _)&&(x=_[S],V=E(x,S,f),t))if(e)w[S]=V;else if(V)switch(t){case 3:return!0;case 5:return x;case 6:return S;case 2:xne(w,x)}else switch(t){case 4:return!1;case 7:xne(w,x)}return s?-1:n||i?i:w}},T9e={find:Une(5),findIndex:Une(6)},b9e=Rs,Fne=$U,lR=kU.getWeakData,C9e=BU,R9e=Yo,O9e=iS,qU=Ta,P9e=VU,kne=T9e,Gne=Eo,Vne=oS,I9e=Vne.set,M9e=Vne.getterFor,w9e=kne.find,N9e=kne.findIndex,D9e=b9e([].splice),L9e=0,dR=function(t){return t.frozen||(t.frozen=new Bne)},Bne=function(){this.entries=[]},YU=function(t,e){return w9e(t.entries,function(r){return r[0]===e})};Bne.prototype={get:function(t){var e=YU(this,t);if(e)return e[1]},has:function(t){return!!YU(this,t)},set:function(t,e){var r=YU(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=N9e(this.entries,function(r){return r[0]===t});return~e&&D9e(this.entries,e,1),!!~e}};var $9e={getConstructor:function(t,e,r,n){var i=t(function(u,c){C9e(u,s),I9e(u,{type:e,id:L9e++,frozen:void 0}),O9e(c)||P9e(c,u[n],{that:u,AS_ENTRIES:r})}),s=i.prototype,a=M9e(e),o=function(u,c,l){var d=a(u),f=lR(R9e(c),!0);return f===!0?dR(d).set(c,l):f[d.id]=l,u};return Fne(s,{delete:function(u){var c=a(this);if(!qU(u))return!1;var l=lR(u);return l===!0?dR(c).delete(u):l&&Gne(l,c.id)&&delete l[c.id]},has:function(c){var l=a(this);if(!qU(c))return!1;var d=lR(c);return d===!0?dR(l).has(c):d&&Gne(d,l.id)}}),Fne(s,r?{get:function(c){var l=a(this);if(qU(c)){var d=lR(c);return d===!0?dR(l).get(c):d?d[l.id]:void 0}},set:function(c,l){return o(this,c,l)}}:{add:function(c){return o(this,c,!0)}}),i}},x9e=lne,jne=ja,fR=Rs,zne=$U,U9e=kU,F9e=J5e,Hne=$9e,hR=Ta,pR=oS.enforce,k9e=Us,G9e=e9,mS=Object,V9e=Array.isArray,_R=mS.isExtensible,qne=mS.isFrozen,B9e=mS.isSealed,Yne=mS.freeze,j9e=mS.seal,z9e=!jne.ActiveXObject&&"ActiveXObject"in jne,gS,Qne=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Wne=F9e("WeakMap",Qne,Hne),O_=Wne.prototype,mR=fR(O_.set),H9e=function(){return x9e&&k9e(function(){var t=Yne([]);return mR(new Wne,t,1),!qne(t)})};if(G9e)if(z9e){gS=Hne.getConstructor(Qne,"WeakMap",!0),U9e.enable();var Kne=fR(O_.delete),gR=fR(O_.has),Zne=fR(O_.get);zne(O_,{delete:function(t){if(hR(t)&&!_R(t)){var e=pR(this);return e.frozen||(e.frozen=new gS),Kne(this,t)||e.frozen.delete(t)}return Kne(this,t)},has:function(e){if(hR(e)&&!_R(e)){var r=pR(this);return r.frozen||(r.frozen=new gS),gR(this,e)||r.frozen.has(e)}return gR(this,e)},get:function(e){if(hR(e)&&!_R(e)){var r=pR(this);return r.frozen||(r.frozen=new gS),gR(this,e)?Zne(this,e):r.frozen.get(e)}return Zne(this,e)},set:function(e,r){if(hR(e)&&!_R(e)){var n=pR(this);n.frozen||(n.frozen=new gS),gR(this,e)?mR(this,e,r):n.frozen.set(e,r)}else mR(this,e,r);return this}})}else H9e()&&zne(O_,{set:function(e,r){var n;return V9e(e)&&(qne(e)?n=Yne:B9e(e)&&(n=j9e)),mR(this,e,r),n&&n(e),this}});var Xne=a9,q9e=qo,Y9e=function(t,e,r){return r.get&&Xne(r.get,e,{getter:!0}),r.set&&Xne(r.set,e,{setter:!0}),q9e.f(t,e,r)},Q9e=yo,W9e=qo,K9e=nS,Z9e=function(t,e,r){Q9e?W9e.f(t,e,K9e(0,r)):t[e]=r},X9e=wd,J9e=ja,e7e=BU,t7e=Yo,r7e=Qs,n7e=hU,i7e=Y9e,s7e=Z9e,a7e=Us,QU=Eo,o7e=io,Sc=BC.IteratorPrototype,u7e=yo,WU="constructor",Jne="Iterator",eie=o7e("toStringTag"),tie=TypeError,KU=J9e[Jne],rie=!r7e(KU)||KU.prototype!==Sc||!a7e(function(){KU({})}),ZU=function(){if(e7e(this,Sc),n7e(this)===Sc)throw new tie("Abstract class Iterator not directly constructable")},nie=function(t,e){u7e?i7e(Sc,t,{configurable:!0,get:function(){return e},set:function(r){if(t7e(this),this===Sc)throw new tie("You can't redefine this property");QU(this,t)?this[t]=r:s7e(this,t,r)}}):Sc[t]=e};QU(Sc,eie)||nie(eie,Jne),(rie||!QU(Sc,WU)||Sc[WU]===Object)&&nie(WU,ZU),ZU.prototype=Sc,X9e({global:!0,constructor:!0,forced:rie},{Iterator:ZU});var iie=function(t){return{iterator:t,next:t.next,done:!1}},c7e=wd,l7e=VU,d7e=v_,f7e=Yo,h7e=iie;c7e({target:"Iterator",proto:!0,real:!0},{every:function(e){f7e(this),d7e(e);var r=h7e(this),n=0;return!l7e(r,function(i,s){if(!e(i,n++))return s()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var p7e=pc,_7e=cU,m7e=Md,g7e=$U,v7e=io,sie=oS,S7e=PC,y7e=BC.IteratorPrototype,XU=W9,JU=GU,E7e=v7e("toStringTag"),aie="IteratorHelper",oie="WrapForValidIterator",A7e=sie.set,uie=function(t){var e=sie.getterFor(t?oie:aie);return g7e(_7e(y7e),{next:function(){var n=e(this);if(t)return n.nextHandler();try{var i=n.done?void 0:n.nextHandler();return XU(i,n.done)}catch(s){throw n.done=!0,s}},return:function(){var r=e(this),n=r.iterator;if(r.done=!0,t){var i=S7e(n,"return");return i?p7e(i,n):XU(void 0,!0)}if(r.inner)try{JU(r.inner.iterator,"normal")}catch(s){return JU(n,"throw",s)}return JU(n,"normal"),XU(void 0,!0)}})},T7e=uie(!0),cie=uie(!1);m7e(cie,E7e,"Iterator Helper");var b7e=function(t,e){var r=function(i,s){s?(s.iterator=i.iterator,s.next=i.next):s=i,s.type=e?oie:aie,s.nextHandler=t,s.counter=0,s.done=!1,A7e(this,s)};return r.prototype=e?T7e:cie,r},C7e=Yo,R7e=GU,O7e=function(t,e,r,n){try{return n?e(C7e(r)[0],r[1]):e(r)}catch(i){R7e(t,"throw",i)}},P7e=wd,I7e=pc,M7e=v_,lie=Yo,w7e=iie,N7e=b7e,D7e=O7e,L7e=m6e,$7e=N7e(function(){for(var t=this.iterator,e=this.predicate,r=this.next,n,i,s;;){if(n=lie(I7e(r,t)),i=this.done=!!n.done,i)return;if(s=n.value,D7e(t,e,[s,this.counter++],!0))return s}});P7e({target:"Iterator",proto:!0,real:!0,forced:L7e},{filter:function(e){return lie(this),M7e(e),new $7e(w7e(this),{predicate:e})}});var vS,vR;class die{constructor(){this.type="backend",vS.set(this,void 0),vR.set(this,void 0)}init(e,{clientSlug:r,apiClient:n}){if(!n)throw e.logger.error('"apiClient" not supplied to "QueryBackend".'),new Error('"apiClient" required for "QueryBackend".');Nd(this,vS,r,"f"),Nd(this,vR,CU(n),"f")}read(e,r,n){return qC(this,void 0,void 0,function*(){try{const{translation:i}=yield wn(this,vR,"f").getClientTranslations({name:wn(this,vS,"f"),key:r,lang:e});n(null,i?.json||{})}catch{const s=`Error fetching translation with key "${r}" and client "${wn(this,vS,"f")||"N/A"}".`;n(s,null)}})}}vS=new WeakMap,vR=new WeakMap,die.type="backend";var P_;class fie{constructor(e){this.type="logger",P_.set(this,void 0),Nd(this,P_,e,"f")}log([e,r,...n]){wn(this,P_,"f").info({meta:r},e,...n)}warn([e,r,...n]){wn(this,P_,"f").error({meta:r},e,...n)}error([e,r,...n]){wn(this,P_,"f").error({meta:r},e,...n)}}P_=new WeakMap,fie.type="logger";var so,SR,Th,SS,Ws,bh;const hie="appLanguage";class e1{constructor({keys:e,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:s,parent:a,debug:o=!1,remoteConfig:u={}}){Th.set(this,void 0),SS.set(this,void 0),Ws.set(this,void 0),bh.set(this,void 0),Nd(this,Th,e,"f"),Nd(this,SS,n,"f"),Nd(this,bh,r,"f");const c={lng:i,fallbackNS:wn(this,SS,"f"),debug:o,defaultNS:e,returnNull:!1};a?Nd(this,Ws,a.cloneInstance(c),"f"):(Nd(this,Ws,Ba.createInstance(),"f"),s&&wn(this,Ws,"f").use(new fie(s.child({library:"@icanbwell/i18n"}))),u.apiClient&&wn(this,Ws,"f").use(die),wn(this,Ws,"f").init(Object.assign(Object.assign({},c),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:u,saveMissing:!0,missingKeyHandler:(l,d,f)=>wn(this,Ws,"f").services.logger.error(`missing key: ${f}; language: ${l}; key: ${d}`)}))),this.t=wn(this,Ws,"f").t,so.resolvedLanguage=wn(this,Ws,"f").resolvedLanguage||i}load(){return qC(this,void 0,void 0,function*(){var e;const r=(yield(e=wn(this,bh,"f"))===null||e===void 0?void 0:e.storage.getItem(hie))||so.resolvedLanguage;r!==so.resolvedLanguage&&(yield wn(this,Ws,"f").changeLanguage(r),so.resolvedLanguage=r),yield wn(this,Ws,"f").loadNamespaces(wn(this,Th,"f"));const n=wn(this,Th,"f").filter(i=>!wn(this,Ws,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return wn(so,so,"f",SR).emit("changeLanguage",r),this})}child(e){return new so(Object.assign(Object.assign({},e),{nativeBridge:wn(this,bh,"f"),fallbackKeys:[...wn(this,SS,"f"),...wn(this,Th,"f")],parent:wn(this,Ws,"f"),defaultLanguage:wn(this,Ws,"f").language}))}get isLoaded(){return wn(this,Th,"f").every(e=>wn(this,Ws,"f").hasResourceBundle(wn(this,Ws,"f").language,e))}changeLanguage(e){return qC(this,void 0,void 0,function*(){var r,n;so.resolvedLanguage=e,yield wn(this,Ws,"f").changeLanguage(e),wn(so,so,"f",SR).emit("changeLanguage",e),yield(r=wn(this,bh,"f"))===null||r===void 0?void 0:r.storage.setItem(hie,e),(n=wn(this,bh,"f"))===null||n===void 0||n.reloadView(!0)})}get resolvedLanguage(){return so.resolvedLanguage}onChangeLanguage(e){wn(so,so,"f",SR).on("changeLanguage",e)}}so=e1,Th=new WeakMap,SS=new WeakMap,Ws=new WeakMap,bh=new WeakMap,SR={value:new ane},e1.resolvedLanguage="en";var t1=p(79609),yS;(function(t){t.one="1.0.0"})(yS||(yS={}));const yR="orchestrator:native-bridge",x7e={id:yR,dependencies:{featureServices:{}},create:()=>({[yS.one]:()=>({featureService:t1.b})})};var ES;(function(t){t.one="1.0.0"})(ES||(ES={}));const ER="orchestrator:translation-service",U7e={id:ER,dependencies:{featureServices:{[Uo]:tl.one,[Ku]:od.one,[Ss]:mo.one,[Qv]:h_.one,[yR]:yS.one}},create:({featureServices:t})=>{const e=t[Uo],r=t[Ku],n=t[Qv],{slug:i}=t[Ss].getClientContext(),s=t[yR],a=new e1({keys:[],nativeBridge:s,defaultLanguage:"en",logger:r,remoteConfig:{clientSlug:i,apiClient:e}});return n.setProfileProperties({language:a.resolvedLanguage}),a.onChangeLanguage(o=>n.setProfileProperties({language:o})),{[ES.one]:()=>({featureService:a})}}};var I_,M_,AR,Ao,AS,TR;const bR="tokens",r1="delegationContext",n1="userSessionId";class F7e{constructor({apiClient:e,stateService:r,identityGatewaySdk:n,storage:i,logger:s}){I_.set(this,void 0),M_.set(this,void 0),AR.set(this,void 0),Ao.set(this,void 0),AS.set(this,void 0),TR.set(this,[]),(0,ee().__classPrivateFieldSet)(this,I_,e,"f"),(0,ee().__classPrivateFieldSet)(this,M_,r,"f"),(0,ee().__classPrivateFieldSet)(this,AR,n,"f"),(0,ee().__classPrivateFieldSet)(this,Ao,i,"f"),(0,ee().__classPrivateFieldSet)(this,AS,s,"f")}registerPreLogoutHandler(e){(0,ee().__classPrivateFieldGet)(this,TR,"f").push(e)}getStoredTokens(){const e=(0,ee().__classPrivateFieldGet)(this,Ao,"f").getItem(bR);return e?JSON.parse(e):void 0}removeStoredTokens(){(0,ee().__classPrivateFieldGet)(this,Ao,"f").removeItem(bR),this.clearSessionId(),this.clearDelegationContext()}clearSessionId(){(0,ee().__classPrivateFieldGet)(this,Ao,"f").removeItem(n1)}ensureSessionId(){var e;try{if((0,ee().__classPrivateFieldGet)(this,Ao,"f").getItem(n1))return;(0,ee().__classPrivateFieldGet)(this,Ao,"f").setItem(n1,JSON.stringify({sessionId:crypto.randomUUID()}))}catch(r){(e=(0,ee().__classPrivateFieldGet)(this,AS,"f"))===null||e===void 0||e.error(r instanceof Error?r:new Error(String(r)),"Failed to mint session id")}}storeTokens(e){const r=Object.assign(Object.assign({},e),{idToken:Object.assign(Object.assign({},e.idToken),{payload:(0,je().normalizeTokenPayload)(e.idToken.payload)})});return(0,ee().__classPrivateFieldGet)(this,Ao,"f").setItem(bR,JSON.stringify(r)),r}storeDelegationContext(e){(0,ee().__classPrivateFieldGet)(this,Ao,"f").setItem(r1,JSON.stringify(e))}getDelegationContext(){var e,r;const n=(0,ee().__classPrivateFieldGet)(this,Ao,"f").getItem(r1);if(!n)return null;try{const i=JSON.parse(n);return!i?.consentId||!(!((r=(e=i?.delegateTokens)===null||e===void 0?void 0:e.accessToken)===null||r===void 0)&&r.jwtToken)?null:i}catch{return null}}clearDelegationContext(){(0,ee().__classPrivateFieldGet)(this,Ao,"f").removeItem(r1)}logout(){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var e;for(const s of(0,ee().__classPrivateFieldGet)(this,TR,"f"))try{yield s()}catch(a){(e=(0,ee().__classPrivateFieldGet)(this,AS,"f"))===null||e===void 0||e.error(a instanceof Error?a:new Error(String(a)),"Pre-logout handler failed")}const r=(0,ee().__classPrivateFieldGet)(this,M_,"f").getUserTokenData().accessToken.jwtToken,{key:n,variant:i}=(0,ee().__classPrivateFieldGet)(this,M_,"f").getClientContext();i!==Jc.GUEST&&(yield(0,ee().__classPrivateFieldGet)(this,AR,"f").logout({accessToken:r},{context:{headers:{clientKey:n}}})),(0,ee().__classPrivateFieldGet)(this,I_,"f").stop(),(0,ee().__classPrivateFieldGet)(this,I_,"f").clearAuth(),yield(0,ee().__classPrivateFieldGet)(this,I_,"f").clearStore(),(0,ee().__classPrivateFieldGet)(this,M_,"f").logoutUser(),(0,ee().__classPrivateFieldGet)(this,Ao,"f").removeItem(bR),this.clearSessionId(),this.clearDelegationContext()})}}I_=new WeakMap,M_=new WeakMap,AR=new WeakMap,Ao=new WeakMap,AS=new WeakMap,TR=new WeakMap;var TS;(function(t){t.one="1.0.0"})(TS||(TS={}));const CR="orchestrator:identity-utils",k7e={id:CR,dependencies:{featureServices:{[Uo]:tl.one,[Ku]:od.one,[Ss]:mo.one,[Qv]:h_.one}},create:({featureServices:t})=>{const e=t[Uo];return{[TS.one]:()=>({featureService:new F7e({apiClient:e,stateService:t[Ss],identityGatewaySdk:Q7(e),storage:window.sessionStorage,logger:t[Ku]})})}}};var RR;(function(t){t.one="1.0.0"})(RR||(RR={}));const pie="orchestrator:globaleventemitter-service",G7e=t=>({id:pie,create:()=>({[RR.one]:()=>({featureService:t})})});var OR;(function(t){t.one="1.0.0"})(OR||(OR={}));const _ie="orchestrator:reboot-controller",V7e=t=>({id:_ie,create:()=>({[OR.one]:()=>({featureService:t})})}),PR="orchestrator:bwell-sdk";var bS;(function(t){t.one="1.0.0"})(bS||(bS={}));const B7e=t=>({id:PR,dependencies:{featureServices:{[Ss]:mo.one,[ER]:ES.one,[Ku]:od.one}},create:({featureServices:e})=>{const r=e[Ss],n=e[ER],i=e[Ku],s=t;let a=!1,o=!1;const u=_=>{if(typeof _=="string")return _;if(_&&typeof _=="object"&&"message"in _){const m=_.message;return typeof m=="string"?m:String(m)}return String(_)},c=_=>/uninitialized|not been initialized/i.test(u(_)),l=_=>{try{s.language.setLanguage(_)}catch(m){if(c(m)){o||(o=!0,i.info({},"embeddable-core: Deferring language switch until SDK initialization completes"));return}i.info({error:u(m)},"embeddable-core: Non-fatal language switch issue in SDK")}},d=_=>{try{const m=s.language.getLanguage();_!==m&&l(_)}catch(m){if(c(m))return;i.info({error:u(m)},"embeddable-core: Non-fatal language read issue in SDK")}},f=()=>{var _;!((_=r.getUser().tokenData)===null||_===void 0)&&_.idToken&&(l(n.resolvedLanguage),a||(a=!0,n.onChangeLanguage(d)))};return r.getStore().subscribe(f),{[bS.one]:()=>({featureService:s})}}});class ua extends Error{constructor(e,r){super(e),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(e){return e instanceof ua}}class cIt extends ua{constructor(e="Authentication Error"){super(e),this.name="AuthenticationError"}}class lIt extends ua{constructor(e="Illegal Argument Error"){super(e),this.name="IllegalArgumentError"}}class dIt extends ua{constructor(e="Illegal State Error"){super(e),this.name="IllegalStateError"}}class j7e extends ua{constructor(e="Invalid Client Key Error"){super(e),this.name="InvalidClientKeyError"}}class i1 extends ua{constructor(e,r){super(e),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class w_ extends ua{constructor(e="Invalid Token Error"){super(e),this.name="InvalidTokenError"}}class z7e extends ua{constructor(e,r){super(e),this.status=r,this.name="NetworkError"}}class H7e extends ua{constructor(e){super(e.message()),this.operationOutcome=e,this.name="OperationOutcomeError"}}class s1 extends ua{constructor(e,r){super(e),this.data=r,this.name="UnknownError"}}class IR extends ua{constructor(e){super(e.join(". ")),this.errors=e,this.name="ValidationError"}}class Yt{constructor(e,r){this.data=e,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(e){return new Yt(void 0,e)}}var mie=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},MR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},CS,RS;class tr{static success(e){return new q7e(e)}static failure(e){return new wR(e)}}class q7e extends tr{constructor(e){super(),CS.set(this,void 0),mie(this,CS,e,"f")}data(){return MR(this,CS,"f")}error(){throw MR(this,CS,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new Yt(this.data())}}CS=new WeakMap;class wR extends tr{constructor(e){super(),RS.set(this,void 0),mie(this,RS,e,"f")}data(){throw MR(this,RS,"f")}error(){return MR(this,RS,"f")}success(){return!1}failure(){return!0}intoFailure(){return tr.failure(this.error())}toQueryResult(){return new Yt(void 0,this.error())}}RS=new WeakMap;var a1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},OS;class gie{constructor(){OS.set(this,[])}add(e){a1(this,OS,"f").push(e)}errors(){return a1(this,OS,"f")}hasErrors(){return a1(this,OS,"f").length>0}}OS=new WeakMap;var vie=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},o1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},PS,NR;class Y7e{constructor(e){PS.set(this,void 0),NR.set(this,void 0),vie(this,NR,e,"f"),vie(this,PS,this.transformInput(e),"f")}validate(){return tr.success(null)}data(){return o1(this,PS,"f")}toJSON(){return o1(this,PS,"f")}transformInput(e){return e}input(){return o1(this,NR,"f")}}PS=new WeakMap,NR=new WeakMap;class _n extends Y7e{validate(){const e=new gie;return this.validator.validate(this.input(),e),e.hasErrors()?tr.failure(new IR(e.errors())):tr.success(null)}}var Sie=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},DR,yie,Eie;const Aie=100,Q7e=20;class Fs{constructor(){DR.add(this)}validate(e,r){Sie(this,DR,"m",yie).call(this,e.page,r),Sie(this,DR,"m",Eie).call(this,e.pageSize,r)}}DR=new WeakSet,yie=function(e,r){e<0&&r.add("page must be a positive number")},Eie=function(e,r){e!==void 0&&(e<=0&&r.add("Page size must be greater than 0"),e>Aie&&r.add(`Page size must not exceed ${Aie}`))};class Os extends _n{constructor(){super(...arguments),this.validator=new Fs}transformInput(e){return Object.assign({pageSize:Q7e},e)}}const Tie=/^data:([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*\/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*(?:;[A-Za-z0-9!#$&^_.+-]+=[A-Za-z0-9!#$&^_.+-]+)*);base64,([A-Za-z0-9+/]+={0,2})$/;function W7e(t){return Tie.test(t)}function bie(t){var e,r;const n=Tie.exec(t);return n===null?null:{contentType:(e=n[1])!==null&&e!==void 0?e:"",data:(r=n[2])!==null&&r!==void 0?r:""}}const Cie=10*1024*1024,K7e=Math.ceil(Cie/3)*4;function u1(){return new Date().toISOString()}function Z7e(){var t;return!(typeof process>"u"||((t=process.versions)===null||t===void 0?void 0:t.node)===void 0)}function X7e(){return typeof window<"u"}function Rie(){if(X7e())return"browser";if(Z7e())return"node";throw new Error("Invalid runtime")}function Oie(t){switch(Rie()){case"browser":return t.browser();case"node":return t.node()}}function Pie(t){switch(Rie()){case"node":return Buffer.from(t,"base64").toString("utf-8");case"browser":return atob(t)}}function Wr(t){return t!=null}function Ks(t){return t==null}function fIt(t){return Wr(t)&&t!==""}function Ps(t){return t==null||t===""}function Zs(t){return t===void 0}function On(t){return t!==void 0}function J7e(t){return JSON.parse(Pie(t)).env}const eZe=3;function Iie(t){const e=t.split("."),r=e[1];if(r===void 0||e.length!==eZe)throw new w_("Token is missing data and may be corrupted");try{return JSON.parse(Pie(r))}catch(n){const i=n;throw new w_(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function Mie(t){const r=Iie(t).exp;if(typeof r!="number")throw new w_("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const tZe="custom:clientFhirPersonId",rZe="custom:bwellFhirPatientId";function nZe(t){const e=Iie(t),r=e[rZe],n=e[tZe];return Wr(r)&&Wr(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}function Is(t){return t.trim()===""}const wie="1.118.0";function iZe(){return wie}var c1;(function(t){t.Arrived="ARRIVED",t.Booked="BOOKED",t.Cancelled="CANCELLED",t.CheckedIn="CHECKED_IN",t.EnteredInError="ENTERED_IN_ERROR",t.Fulfilled="FULFILLED",t.Noshow="NOSHOW",t.Pending="PENDING",t.Proposed="PROPOSED",t.Waitlist="WAITLIST"})(c1||(c1={}));var Nie;(function(t){t.Guest="GUEST",t.Other="OTHER",t.Self="SELF"})(Nie||(Nie={}));var Die;(function(t){t.Guest="GUEST"})(Die||(Die={}));var LR;(function(t){t.CmsNetworkShareMyRecords="CMS_NETWORK_SHARE_MY_RECORDS",t.CommunicationPreferencesPhi="COMMUNICATION_PREFERENCES_PHI",t.DataSharing="DATA_SHARING",t.DirectImportRecords="DIRECT_IMPORT_RECORDS",t.HealthCircleAdolescent="HEALTH_CIRCLE_ADOLESCENT",t.HealthCircleMinor="HEALTH_CIRCLE_MINOR",t.HealthMatch="HEALTH_MATCH",t.IasImportRecords="IAS_IMPORT_RECORDS",t.MobileCommunicationPreferences="MOBILE_COMMUNICATION_PREFERENCES",t.PersonalizedHealthOffersAndAds="PERSONALIZED_HEALTH_OFFERS_AND_ADS",t.ProaAttestation="PROA_ATTESTATION",t.Tos="TOS"})(LR||(LR={}));var Lie;(function(t){t.Complete="COMPLETE",t.Error="ERROR",t.Partial="PARTIAL",t.Queued="QUEUED"})(Lie||(Lie={}));var $ie;(function(t){t.Institutional="INSTITUTIONAL",t.Oral="ORAL",t.Pharmacy="PHARMACY",t.Professional="PROFESSIONAL",t.Vision="VISION"})($ie||($ie={}));var xie;(function(t){t.Bwell="bwell"})(xie||(xie={}));var Uie;(function(t){t.Bwell="BWELL"})(Uie||(Uie={}));var Fie;(function(t){t.Basic="BASIC",t.Identity="IDENTITY",t.Oauth="OAUTH"})(Fie||(Fie={}));var l1;(function(t){t.Deny="DENY",t.Permit="PERMIT"})(l1||(l1={}));var d1;(function(t){t.Active="ACTIVE",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Inactive="INACTIVE",t.Proposed="PROPOSED",t.Rejected="REJECTED"})(d1||(d1={}));var kie;(function(t){t.Medical="MEDICAL",t.Pharmacy="PHARMACY"})(kie||(kie={}));var Gie;(function(t){t.Usd="USD"})(Gie||(Gie={}));var Vie;(function(t){t.Accepted="ACCEPTED",t.Rejected="REJECTED"})(Vie||(Vie={}));var Bie;(function(t){t.AccessEnded="ACCESS_ENDED",t.Connected="CONNECTED",t.Deleted="DELETED",t.Disconnected="DISCONNECTED",t.Error="ERROR",t.Expired="EXPIRED"})(Bie||(Bie={}));var jie;(function(t){t.Clinical="CLINICAL",t.Device="DEVICE",t.Insurance="INSURANCE",t.Lab="LAB",t.Pharmacy="PHARMACY",t.Practitioner="PRACTITIONER"})(jie||(jie={}));var $R;(function(t){t.Connecthub="connecthub",t.Nppes="nppes"})($R||($R={}));var zie;(function(t){t.Connecthub="CONNECTHUB",t.Nppes="NPPES"})(zie||(zie={}));var Hie;(function(t){t.Fri="FRI",t.Mon="MON",t.Sat="SAT",t.Sun="SUN",t.Thu="THU",t.Tue="TUE",t.Wed="WED"})(Hie||(Hie={}));var qie;(function(t){t.Deleted="DELETED"})(qie||(qie={}));var Yie;(function(t){t.Kilometers="KILOMETERS",t.Meters="METERS",t.Miles="MILES"})(Yie||(Yie={}));var Qie;(function(t){t.BwellPatient="BWELL_PATIENT",t.BwellPerson="BWELL_PERSON",t.ClientPatient="CLIENT_PATIENT",t.ClientPerson="CLIENT_PERSON"})(Qie||(Qie={}));var Wie;(function(t){t.Active="active",t.EnteredInError="entered_in_error",t.Error="error",t.Off="off",t.Suspended="suspended",t.Test="test"})(Wie||(Wie={}));var Kie;(function(t){t.Active="ACTIVE",t.EnteredInError="ENTERED_IN_ERROR",t.Error="ERROR",t.Off="OFF",t.Suspended="SUSPENDED",t.Test="TEST"})(Kie||(Kie={}));var f1;(function(t){t.CustomEvent="CUSTOM_EVENT",t.MobilePushOpen="MOBILE_PUSH_OPEN"})(f1||(f1={}));var h1;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(h1||(h1={}));var p1;(function(t){t.Person="Person"})(p1||(p1={}));var _1;(function(t){t.Characteristic="characteristic",t.Communication="communication",t.Gender="gender",t.Specialty="specialty"})(_1||(_1={}));var Zie;(function(t){t.Characteristic="CHARACTERISTIC",t.Communication="COMMUNICATION",t.Gender="GENDER",t.InsurancePlan="INSURANCE_PLAN",t.Specialty="SPECIALTY"})(Zie||(Zie={}));var Xie;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(Xie||(Xie={}));var Jie;(function(t){t.Female="FEMALE",t.Male="MALE",t.Other="OTHER",t.Unknown="UNKNOWN"})(Jie||(Jie={}));var ese;(function(t){t.AllergyIntolerance="ALLERGY_INTOLERANCE",t.CarePlan="CARE_PLAN",t.Condition="CONDITION",t.Encounter="ENCOUNTER",t.Immunization="IMMUNIZATION",t.Labs="LABS",t.Medications="MEDICATIONS",t.Procedure="PROCEDURE",t.VitalSigns="VITAL_SIGNS"})(ese||(ese={}));var tse;(function(t){t.Official="_official",t.Old="_old",t.Secondary="_secondary",t.Temp="_temp",t.Usual="_usual"})(tse||(tse={}));var rse;(function(t){t.Cognito="COGNITO",t.Descope="DESCOPE"})(rse||(rse={}));var nse;(function(t){t.Direct="DIRECT",t.DirectIas="DIRECT_IAS",t.Ial2="IAL2",t.IndirectIas="INDIRECT_IAS",t.Proa="PROA"})(nse||(nse={}));var ise;(function(t){t.Clicked="clicked"})(ise||(ise={}));var sse;(function(t){t.Clicked="CLICKED"})(sse||(sse={}));var m1;(function(t){t.Debug="DEBUG",t.Error="ERROR",t.Info="INFO",t.Verbose="VERBOSE",t.Warn="WARN"})(m1||(m1={}));var ase;(function(t){t.Sms="SMS"})(ase||(ase={}));var g1;(function(t){t.Activity="ACTIVITY",t.Exam="EXAM",t.Imaging="IMAGING",t.Laboratory="LABORATORY",t.Procedure="PROCEDURE",t.SocialHistory="SOCIAL_HISTORY",t.Survey="SURVEY",t.Therapy="THERAPY",t.VitalSigns="VITAL_SIGNS"})(g1||(g1={}));var ose;(function(t){t.CancelDelete="CANCEL_DELETE",t.ConfirmDelete="CONFIRM_DELETE",t.DeletionInProgress="DELETION_IN_PROGRESS",t.ImmediateExecution="IMMEDIATE_EXECUTION",t.RequestDelete="REQUEST_DELETE"})(ose||(ose={}));var v1;(function(t){t.C19Vaccine="C19Vaccine",t.Device="Device",t.Insurance="Insurance",t.Laboratory="Laboratory",t.Pharmacy="Pharmacy",t.Provider="Provider",t.Bus="bus",t.Cg="cg",t.Crs="crs",t.Dept="dept",t.Edu="edu",t.Govt="govt",t.Ins="ins",t.Other="other",t.Pay="pay",t.Prov="prov",t.Reli="reli",t.Team="team"})(v1||(v1={}));var use;(function(t){t.Bus="BUS",t.C19Vaccine="C19VACCINE",t.Cg="CG",t.Crs="CRS",t.Dept="DEPT",t.Device="DEVICE",t.Edu="EDU",t.Govt="GOVT",t.Ins="INS",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Other="OTHER",t.Pay="PAY",t.Pharmacy="PHARMACY",t.Prov="PROV",t.Provider="PROVIDER",t.Reli="RELI",t.Team="TEAM"})(use||(use={}));var cse;(function(t){t.Add="add",t.Copy="copy",t.Move="move",t.Remove="remove",t.Replace="replace",t.Test="test"})(cse||(cse={}));var lse;(function(t){t.ExistingPatients="EXISTING_PATIENTS",t.NewPatients="NEW_PATIENTS"})(lse||(lse={}));var dse;(function(t){t.Patient="Patient",t.Person="Person"})(dse||(dse={}));var fse;(function(t){t.IdentityProofing="IDENTITY_PROOFING"})(fse||(fse={}));var hse;(function(t){t.Practice="practice",t.Practitioner="practitioner"})(hse||(hse={}));var pse;(function(t){t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(pse||(pse={}));var _se;(function(t){t.QuestionnaireResponse="QuestionnaireResponse"})(_se||(_se={}));var mse;(function(t){t.Closed="CLOSED",t.Hold="HOLD",t.New="NEW",t.Open="OPEN",t.Pending="PENDING",t.Solved="SOLVED"})(mse||(mse={}));var gse;(function(t){t.AllergyIntolerance="ALLERGY_INTOLERANCE",t.CarePlan="CARE_PLAN",t.Condition="CONDITION",t.DocumentReference="DOCUMENT_REFERENCE",t.Encounter="ENCOUNTER",t.Immunization="IMMUNIZATION",t.MedicationDispense="MEDICATION_DISPENSE",t.MedicationRequest="MEDICATION_REQUEST",t.MedicationStatement="MEDICATION_STATEMENT",t.Observation="OBSERVATION",t.Procedure="PROCEDURE"})(gse||(gse={}));var vse;(function(t){t.DataConnections="DATA_CONNECTIONS",t.FindCare="FIND_CARE"})(vse||(vse={}));var Sse;(function(t){t.Device="DEVICE",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Pharmacy="PHARMACY",t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(Sse||(Sse={}));var yse;(function(t){t.Abortion="ABORTION",t.AbuseNeglect="ABUSE_NEGLECT",t.DomesticViolence="DOMESTIC_VIOLENCE",t.GenderAffirming="GENDER_AFFIRMING",t.GeneticTesting="GENETIC_TESTING",t.HivAids="HIV_AIDS",t.Mammography="MAMMOGRAPHY",t.MentalHealth="MENTAL_HEALTH",t.ReproductiveHealthcare="REPRODUCTIVE_HEALTHCARE",t.SexualAssault="SEXUAL_ASSAULT",t.Std="STD",t.SubstanceAbuse="SUBSTANCE_ABUSE",t.SubstanceAlcohol="SUBSTANCE_ALCOHOL"})(yse||(yse={}));var Ese;(function(t){t.UpdatedAt="UPDATED_AT"})(Ese||(Ese={}));var S1;(function(t){t.Content="content",t.Distance="distance",t.Relevance="relevance"})(S1||(S1={}));var Ase;(function(t){t.Content="CONTENT",t.DataSourceRank="DATA_SOURCE_RANK",t.Distance="DISTANCE",t.Name="NAME",t.NextAvailable="NEXT_AVAILABLE",t.OnlineBookingAvailable="ONLINE_BOOKING_AVAILABLE",t.Rating="RATING",t.Relevance="RELEVANCE"})(Ase||(Ase={}));var xR;(function(t){t.Asc="asc",t.Desc="desc"})(xR||(xR={}));var Tse;(function(t){t.Asc="ASC",t.Desc="DESC"})(Tse||(Tse={}));var bse;(function(t){t.CareSearch="CARE_SEARCH",t.Proa="PROA",t.ProviderDetails="PROVIDER_DETAILS",t.Sayt="SAYT",t.Unspecified="UNSPECIFIED"})(bse||(bse={}));var Cse;(function(t){t.DataDeleted="DATA_DELETED",t.Deleting="DELETING",t.Error="ERROR",t.Pending="PENDING",t.Retrieved="RETRIEVED",t.Retrieving="RETRIEVING"})(Cse||(Cse={}));var y1;(function(t){t.Accepted="ACCEPTED",t.Cancelled="CANCELLED",t.Completed="COMPLETED",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Failed="FAILED",t.InProgress="IN_PROGRESS",t.OnHold="ON_HOLD",t.Ready="READY",t.Received="RECEIVED",t.Rejected="REJECTED",t.Requested="REQUESTED"})(y1||(y1={}));var UR;(function(t){t.Accurate="accurate",t.Estimate="estimate"})(UR||(UR={}));var Rse;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(Rse||(Rse={}));var Ose;(function(t){t.PersonMatchError="PERSON_MATCH_ERROR",t.ServerError="SERVER_ERROR"})(Ose||(Ose={}));const sZe=new Set(Object.values(h1));function Pse(t){return sZe.has(t)}const aZe=new Set(Object.values(d1));function oZe(t){return aZe.has(t)}const uZe=new Set(Object.values(LR));function Ise(t){return uZe.has(t)}const cZe=new Set(Object.values(l1));function lZe(t){return cZe.has(t)}class dZe{validate(e,r){!Zs(e.gender)&&!Pse(e.gender)&&r.add(`Invalid gender value: "${e.gender}"`),!Zs(e.middleNames)&&e.middleNames.length>0&&Zs(e.firstName)&&r.add("middleNames requires firstName to be provided")}}class hIt extends _n{constructor(){super(...arguments),this.validator=new dZe}}class fZe{validate(e,r){Ise(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!Zs(e.organizationId)&&Is(e.organizationId)&&r.add("organizationId cannot be empty")}}class pIt extends _n{constructor(){super(...arguments),this.validator=new fZe}}class hZe{validate(e,r){oZe(e.status)||r.add(`Invalid consent status: "${e.status}"`),lZe(e.provision)||r.add(`Invalid consent provision type: "${e.provision}"`),Ise(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!Zs(e.organizationId)&&Is(e.organizationId)&&r.add("organizationId cannot be empty"),e.category===LR.ProaAttestation&&Zs(e.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class _It extends _n{constructor(){super(...arguments),this.validator=new hZe}}class pZe{validate(e,r){Ps(e.exportId)&&r.add("exportId is required"),Ps(e.password)&&r.add("password is required")}}class mIt extends _n{constructor(){super(...arguments),this.validator=new pZe}}var gIt;class vIt extends null{}var To=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},za,Ld,Mse,wse,Nse,Dse,Lse,$se;class Ch{constructor(){za.add(this)}validate(e,r){if(!e.values||e.values.length===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}for(const n of e.values)To(this,za,"m",Mse).call(this,n,r)}}za=new WeakSet,Ld=function(e,r){e&&e!==null&&isNaN(e.getTime())&&r.add("The date is not valid")},Mse=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:u,approximately:c}=e,d=[n,i,s,a,o,u,c].filter(f=>f!=null).length;if(d===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}To(this,za,"m",wse).call(this,e,d,r),To(this,za,"m",Lse).call(this,e,r),To(this,za,"m",$se).call(this,e,r)},wse=function(e,r,n){const{equals:i,notEquals:s,approximately:a}=e;if(i&&r>1){n.add("The equals value cannot be set with any other values");return}if(s&&r>1){n.add("The notEquals value cannot be set with any other values");return}if(a&&r>1){n.add("The approximately value cannot be set with any other values");return}To(this,za,"m",Nse).call(this,e,n),To(this,za,"m",Dse).call(this,e,n)},Nse=function(e,r){e.greaterThan&&e.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},Dse=function(e,r){e.lessThan&&e.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},Lse=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:u,approximately:c}=e;n&&To(this,za,"m",Ld).call(this,n,r),i&&To(this,za,"m",Ld).call(this,i,r),s&&To(this,za,"m",Ld).call(this,s,r),a&&To(this,za,"m",Ld).call(this,a,r),o&&To(this,za,"m",Ld).call(this,o,r),u&&To(this,za,"m",Ld).call(this,u,r),c&&To(this,za,"m",Ld).call(this,c,r)},$se=function(e,r){const{greaterThan:n,greaterThanOrEqualTo:i,lessThan:s,lessThanOrEqualTo:a}=e;n&&a&&n>=a&&r.add("The greaterThan value must be less than the lessThanOrEqualTo value"),i&&s&&i>=s&&r.add("The greaterThanOrEqualTo value must be less than the lessThan value"),n&&s&&n>=s&&r.add("The greaterThan value must be less than the lessThan value"),i&&a&&i>=a&&r.add("The greaterThanOrEqualTo value must be less than the lessThanOrEqualTo value")};var E1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},IS;class $d{constructor(){IS.set(this,new _Ze)}validate(e,r){var n;if(e.value===void 0&&e.values===void 0&&e.notEquals===void 0){r.add("Either SearchToken value or values or notEquals must be provided");return}if(e.value!==void 0&&E1(this,IS,"f").validate(e.value,r),e.values!==void 0&&e.values.length===0){r.add("At least one Coding must be set to instantiate a SearchToken");return}for(const i of(n=e.values)!==null&&n!==void 0?n:[])E1(this,IS,"f").validate(i,r);if(e.notEquals!==void 0){if(e.notEquals.values!==void 0){if(e.notEquals.values.length===0){r.add("If notEquals values are provided, at least one Coding must be set");return}for(const i of e.notEquals.values)E1(this,IS,"f").validate(i,r)}e.notEquals.code===void 0&&e.notEquals.value===void 0&&e.notEquals.system===void 0&&e.notEquals.values===void 0&&r.add("NotEquals must have at least one non-null property (code, value, system, or values)")}}}IS=new WeakMap;class _Ze{validate(e,r){!e.system&&!e.code&&r.add("Each Coding in the list must have at least one non-null and non-empty value for system or code")}}var SIt,Rh=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},A1,T1,b1,C1,R1,O1,P1;class I1 extends Fs{constructor(){super(...arguments),A1.set(this,new $d),T1.set(this,new Ch)}validate(e,r){super.validate(e,r),e.groupCode&&Rh(this,A1,"f").validate(e.groupCode,r),e.lastUpdated&&Rh(this,T1,"f").validate(e.lastUpdated,r)}}A1=new WeakMap,T1=new WeakMap;class mZe{validate(e,r){e.length===0&&r.add("Prescription array must not be empty.")}}class xse extends Fs{constructor(){super(...arguments),b1.set(this,new mZe),C1.set(this,new Ch)}validate(e,r){super.validate(e,r),e.lastUpdated!==void 0&&Rh(this,C1,"f").validate(e.lastUpdated,r),e.prescription!==void 0&&Rh(this,b1,"f").validate(e.prescription,r)}}b1=new WeakMap,C1=new WeakMap;class gZe extends Fs{validate(e,r){var n;super.validate(e,r),!((n=e?.ids)===null||n===void 0)&&n.length||r.add("ids must not be empty")}}class vZe extends Os{constructor(){super(...arguments),this.validator=new I1}}class yIt extends null{}class EIt extends null{}class AIt extends null{}class TIt extends null{}class SZe extends I1{constructor(){super(...arguments),R1.set(this,new $d)}validate(e,r){super.validate(e,r),e.category!==void 0&&Rh(this,R1,"f").validate(e.category,r)}}R1=new WeakMap;class bIt extends Os{constructor(){super(...arguments),this.validator=new SZe}}class CIt extends null{}class RIt extends null{}class OIt extends null{}class PIt extends null{}class IIt extends null{}class MIt extends null{}class wIt extends null{}class NIt extends null{}class DIt extends null{}class LIt extends null{}class $It extends null{}class xIt extends null{}class UIt extends null{}class FIt extends null{}class kIt extends null{}class yZe extends xse{constructor(){super(...arguments),O1.set(this,new $d)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&Rh(this,O1,"f").validate(e.medicationCode,r)}}O1=new WeakMap;class GIt extends Os{constructor(){super(...arguments),this.validator=new xse}}class VIt extends Os{constructor(){super(...arguments),this.validator=new yZe}}class EZe extends I1{constructor(){super(...arguments),P1.set(this,new $d)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&Rh(this,P1,"f").validate(e.medicationCode,r)}}P1=new WeakMap;class BIt extends vZe{constructor(){super(...arguments),this.validator=new EZe}}class jIt extends null{}class zIt extends null{}class HIt extends Os{constructor(){super(...arguments),this.validator=new gZe}}class AZe{validate(e,r){Is(e.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class qIt extends _n{constructor(){super(...arguments),this.validator=new AZe}}class TZe{validate(e,r){Is(e.bodySystemId)&&r.add("The body system score request must contain a body system id.")}}class YIt extends _n{constructor(){super(...arguments),this.validator=new TZe}}class bZe extends Fs{validate(e,r){Is(e.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(e,r)}}class QIt extends Os{constructor(){super(...arguments),this.validator=new bZe}}class CZe extends Fs{validate(e,r){Is(e.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(e,r)}}class WIt extends Os{constructor(){super(...arguments),this.validator=new CZe}}var Use;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(Use||(Use={}));class RZe{validate(e,r){Ks(e)&&r.add("input must be provided."),Ps(e.id)&&r.add("id must be a non-empty string."),Ks(e.status)&&r.add("status is required.")}}class KIt extends _n{constructor(){super(...arguments),this.validator=new RZe}}class OZe{validate(e,r){if(Ps(e.file)){r.add("File content is required");return}const n=bie(e.file);if(n===null){r.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)");return}n.data.length>K7e&&r.add(`File content must not exceed ${Cie/(1024*1024)} MB`)}}class ZIt extends _n{constructor(){super(...arguments),this.validator=new OZe}}const PZe=new Set(Object.values(y1));function M1(t){return PZe.has(t)}var IZe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},w1,Fse;class MZe extends Fs{constructor(){super(...arguments),w1.add(this)}validate(e,r){if(super.validate(e,r),!Zs(e.status)){const n=Array.isArray(e.status)?e.status:[e.status];for(const i of n)IZe(this,w1,"m",Fse).call(this,i,r)}}}w1=new WeakSet,Fse=function(e,r){M1(e)||r.add(`Invalid task status: "${e}"`)};class XIt extends Os{constructor(){super(...arguments),this.validator=new MZe}}class wZe{validate(e,r){M1(e.newStatus)||r.add(`Invalid task status: "${e.newStatus}"`)}}class JIt extends _n{constructor(){super(...arguments),this.validator=new wZe}}class NZe{validate(e,r){M1(e.newStatus)||r.add(`Invalid task status: "${e.newStatus}"`)}}class eMt extends _n{constructor(){super(...arguments),this.validator=new NZe}transformInput(e){return{id:e.taskId,status:e.newStatus}}}var FR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},N_,kse,Gse,Vse,Bse;class tMt extends Os{constructor(){super(...arguments),this.validator=new DZe}}class DZe extends Fs{constructor(){super(...arguments),N_.add(this)}validate(e,r){super.validate(e,r),On(e.organizationTypeFilters)&&FR(this,N_,"m",kse).call(this,e.organizationTypeFilters,r),On(e.sortBy)&&FR(this,N_,"m",Gse).call(this,e.sortBy,r),On(e.filterFields)&&FR(this,N_,"m",Vse).call(this,e.filterFields,r),On(e.gender)&&FR(this,N_,"m",Bse).call(this,e.gender,r)}}N_=new WeakSet,kse=function(e,r){for(const n of e)$Ze(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},Gse=function(e,r){On(e.field)&&!UZe(e.field)&&r.add(`Invalid sortBy.field value: "${e.field}"`),On(e.order)&&!kZe(e.order)&&r.add(`Invalid sortBy.order value: "${e.order}"`)},Vse=function(e,r){for(const n of e)VZe(n)||r.add(`Invalid filterField value: "${n}"`)},Bse=function(e,r){Pse(e)||r.add(`Invalid gender value: "${e}"`)};const LZe=new Set(Object.values(v1));function $Ze(t){return LZe.has(t)}const xZe=new Set(Object.values(S1));function UZe(t){return xZe.has(t)}const FZe=new Set(Object.values(xR));function kZe(t){return FZe.has(t)}const GZe=new Set(Object.values(_1));function VZe(t){return GZe.has(t)}var rMt;class nMt extends null{}class iMt extends Os{constructor(){super(...arguments),this.validator=new BZe}}class BZe extends Fs{validate(e,r){super.validate(e,r)}}const jZe="data-connection-status";var zZe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},N1;const HZe="connectionId cannot be null or empty",qZe="username cannot be null or empty",YZe="password cannot be null or empty",QZe="integrationType array cannot be empty",WZe="integrationType array cannot contain blank or empty strings",KZe="status array cannot be empty",ZZe="status array cannot contain blank or empty strings";class jse{validate(e,r){e.connectionId===""&&r.add(HZe)}}class XZe{constructor(){N1.set(this,new jse)}validate(e,r){zZe(this,N1,"f").validate(e,r),e.integrationType!=="DIRECT"&&(Ps(e.username)&&r.add(qZe),Ps(e.password)&&r.add(YZe))}}N1=new WeakMap;class JZe extends _n{constructor(){super(...arguments),this.validator=new jse}}class sMt extends null{}class aMt extends null{}class oMt extends JZe{constructor(){super(...arguments),this.validator=new XZe}transformInput(e){var r,n,i;return{connectionId:e.connectionId,username:(r=e.username)!==null&&r!==void 0?r:null,password:(n=e.password)!==null&&n!==void 0?n:null,integrationType:(i=e.integrationType)!==null&&i!==void 0?i:null}}}class uMt extends _n{constructor(){super(...arguments),this.validator={validate:(e,r)=>{e.integrationType!==void 0&&e.integrationType!==null&&(e.integrationType.length===0&&r.add(QZe),e.integrationType.some(n=>n===""||n.trim()==="")&&r.add(WZe)),e.status!==void 0&&e.status!==null&&(e.status.length===0&&r.add(KZe),e.status.some(n=>n===""||n.trim()==="")&&r.add(ZZe))}}}data(){return this.input()}}const eXe="deviceToken is required",tXe="platformName must be a valid DevicePlatform value",rXe="applicationName is required",nXe="connectionId is required";var D1;(function(t){t.IOS="IOS",t.ANDROID="ANDROID"})(D1||(D1={}));const iXe=new Set(Object.values(D1));function sXe(t){return iXe.has(t)}function aXe(t){return!sXe(t)}class zse{validate(e,r){Is(e.deviceToken)&&r.add(eXe)}}class oXe extends zse{validate(e,r){super.validate(e,r),aXe(e.platformName.toUpperCase())&&r.add(tXe),Is(e.applicationName)&&r.add(rXe)}}class cMt extends _n{constructor(){super(...arguments),this.validator=new oXe}}class lMt extends _n{constructor(){super(...arguments),this.validator=new zse}}class L1{validate(e,r){Is(e.connectionId)&&r.add(nXe)}}class dMt extends _n{constructor(){super(...arguments),this.validator=new L1}}class fMt extends _n{constructor(){super(...arguments),this.validator=new L1}}class hMt extends _n{constructor(){super(...arguments),this.validator=new L1}}const uXe="string parameter serializedNotification must be provided",cXe="serialized notification must have a non-empty notification_id field of type string",Hse="serialized notification must have an itbl object containing a non-empty messageId field of type string",lXe="parsed notification must be a non-null object.",dXe="serialized notification is not valid JSON.";class fXe{validate(e,r){if(Zs(e.serializedNotification)||typeof e.serializedNotification!="string"||Is(e.serializedNotification)){r.add(uXe);return}let n=null;try{n=JSON.parse(e.serializedNotification)}catch{r.add(dXe);return}if(typeof n!="object"||n===null){r.add(lXe);return}const{itbl:i,notification_id:s}=n;if((Zs(s)||typeof s!="string"||Is(s))&&r.add(cXe),typeof i!="object"||Ks(i)){r.add(Hse);return}(Zs(i.messageId)||typeof i.messageId!="string"||Is(i.messageId))&&r.add(Hse)}}class pMt extends _n{constructor(){super(...arguments),this.validator=new fXe}}var $1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},MS;class hXe extends Fs{constructor(){super(...arguments),MS.set(this,new Ch)}validate(e,r){(Zs(e.coverage)||Is(e.coverage))&&r.add("The claim summary request must contain a coverage ID."),On(e.dateReceived)&&$1(this,MS,"f").validate(e.dateReceived,r),On(e.servicePeriod)&&$1(this,MS,"f").validate(e.servicePeriod,r),On(e.dateProcessed)&&$1(this,MS,"f").validate(e.dateProcessed,r),super.validate(e,r)}}MS=new WeakMap;class _Mt extends Os{constructor(){super(...arguments),this.validator=new hXe}}const pXe="SearchReference value should be a non-empty string";class qse{validate(e,r){Ks(e.value)||(typeof e.value!="string"||Is(e.value))&&r.add(pXe)}}const _Xe="SearchStringValue should be a non-empty string";class wS{validate(e,r){if(Ks(e.values))return;let n=!1;for(const i of e.values)Is(i)&&(n=!0);n&&r.add(_Xe)}}var kR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},x1,U1,GR;class mXe extends Fs{constructor(){super(...arguments),x1.set(this,new wS),U1.set(this,new Ch),GR.set(this,new qse)}validate(e,r){super.validate(e,r),On(e.id)&&kR(this,x1,"f").validate(e.id,r),On(e.lastUpdated)&&kR(this,U1,"f").validate(e.lastUpdated,r),On(e.beneficiary)&&kR(this,GR,"f").validate(e.beneficiary,r),On(e.patient)&&kR(this,GR,"f").validate(e.patient,r)}}x1=new WeakMap,U1=new WeakMap,GR=new WeakMap;class mMt extends Os{constructor(){super(...arguments),this.validator=new mXe}}class gXe extends Fs{validate(e,r){super.validate(e,r)}}class gMt extends Os{constructor(){super(...arguments),this.validator=new gXe}}class vXe{validate(e,r){(Zs(e.claimId)||Is(e.claimId))&&r.add("The EOB document request must contain a claimId.")}}class vMt extends _n{constructor(){super(...arguments),this.validator=new vXe}}var Oh=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},F1,VR,NS,k1;class SXe extends Fs{constructor(){super(...arguments),F1.set(this,new wS),VR.set(this,new Ch),NS.set(this,new qse),k1.set(this,new $d)}validate(e,r){super.validate(e,r),On(e.id)&&Oh(this,F1,"f").validate(e.id,r),On(e.lastUpdated)&&Oh(this,VR,"f").validate(e.lastUpdated,r),On(e.created)&&Oh(this,VR,"f").validate(e.created,r),On(e.patient)&&Oh(this,NS,"f").validate(e.patient,r),On(e.provider)&&Oh(this,NS,"f").validate(e.provider,r),On(e.coverage)&&Oh(this,NS,"f").validate(e.coverage,r),On(e.status)&&Oh(this,k1,"f").validate(e.status,r)}}F1=new WeakMap,VR=new WeakMap,NS=new WeakMap,k1=new WeakMap;class SMt extends Os{constructor(){super(...arguments),this.validator=new SXe}}var G1=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},V1,B1,j1;class yXe{constructor(){V1.set(this,new Ch),B1.set(this,new wS),j1.set(this,new $d)}validate(e,r){var n;Wr(e._source)&&G1(this,B1,"f").validate(e._source,r),Wr(e.date)&&G1(this,V1,"f").validate(e.date,r),Wr(e._count)&&e._count<0&&r.add("Value of count cannot be less than 0"),Wr(e._getpagesoffset)&&e._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),Wr((n=e.supporting_info)===null||n===void 0?void 0:n.value)&&Is(e.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),Wr(e.status)&&G1(this,j1,"f").validate(e.status,r)}}V1=new WeakMap,B1=new WeakMap,j1=new WeakMap;class yMt extends _n{constructor(){super(...arguments),this.validator=new yXe}}class EXe{validate(e,r){if(!Ks(e.cancelationReason)){if(Ks(e.cancelationReason.coding)||e.cancelationReason.coding.length===0){r.add("cancelationReason must have at least one coding");return}for(const n of e.cancelationReason.coding)(Ks(n?.code)||Ks(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class EMt extends _n{constructor(){super(...arguments),this.validator=new EXe}}class AXe{validate(e,r){if(Ks(e.notificationPreferences)||e.notificationPreferences.length===0){r.add("notificationPreferences is required and must not be empty");return}e.notificationPreferences.forEach((n,i)=>{Ks(n.method)&&r.add(`notificationPreferences[${i}].method is required`),Ks(n.enabled)&&r.add(`notificationPreferences[${i}].enabled is required`)})}}class AMt extends _n{constructor(){super(...arguments),this.validator=new AXe}}class TXe{validate(e,r){var n;Ps((n=e.organization.value)===null||n===void 0?void 0:n.trim())&&r.add("Organization reference is required and must have a non-empty value.")}}class TMt extends _n{constructor(){super(...arguments),this.validator=new TXe}}class BR{validate(e,r,n={}){const{requireRole:i=!0}=n;Wr(e.id)?Is(e.id)?r.add("Member id cannot be empty"):e.id.length>255&&r.add("Member id cannot exceed 255 characters"):r.add("Member id is required"),Wr(e.type)?Is(e.type)&&r.add("Member type cannot be empty"):r.add("Member type is required");const s=Wr(e.role);if(i&&!s&&r.add("Member role is required"),s&&e.role)for(let a=0;a<e.role.length;a++){const o=e.role[a];Wr(o)?Is(o)&&r.add(`Role ${a}: Cannot be blank`):r.add(`Role ${a}: Cannot be null or undefined`)}}}class bMt extends _n{constructor(){super(...arguments),this.validator=new BR}}class bXe{constructor(){this.updateValidator=new BR}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!1})}}class CMt extends _n{constructor(){super(...arguments),this.validator=new bXe}}class CXe{constructor(){this.updateValidator=new BR}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!0})}}class RMt extends _n{constructor(){super(...arguments),this.validator=new CXe}}class RXe{constructor(){this.updateValidator=new BR}validate(e,r){if(!Wr(e.members)){r.add("Members array is required");return}if(e.members.length===0){r.add("Members array cannot be empty");return}for(let n=0;n<e.members.length;n++){const i=e.members[n];if(!Wr(i)){r.add(`Member ${n}: Cannot be null or undefined`);continue}const s=new gie;this.updateValidator.validate(i,s,{requireRole:!0});for(const a of s.errors())r.add(`Member ${n}: ${a}`)}}}class OMt extends _n{constructor(){super(...arguments),this.validator=new RXe}}class OXe extends Fs{validate(e,r){super.validate(e,r)}}class PXe extends Os{constructor(){super(...arguments),this.validator=new OXe}}class IXe{validate(e,r){const n=e.questionnaireResponse;if(Ks(n)){r.add("questionnaireResponse is required");return}if((Ps(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ps(n.status)&&r.add("questionnaireResponse.status is required"),Ps(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),Ks(n.contained)||n.contained.length===0)r.add("questionnaireResponse.contained must have at least one item");else{let i=null;for(const s of n.contained){if(Ks(s)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(s.resourceType==="Questionnaire"){i=s;break}}if(Ks(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}Ps(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class PMt extends _n{constructor(){super(...arguments),this.validator=new IXe}}class MXe{validate(e,r){const n=e.questionnaireResponse;if(Ks(n)){r.add("questionnaireResponse is required");return}(Ps(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),Ps(n.status)&&r.add("questionnaireResponse.status is required"),Ps(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required")}}class IMt extends _n{constructor(){super(...arguments),this.validator=new MXe}}var jR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},z1,H1,zR;class wXe extends Fs{constructor(){super(...arguments),z1.set(this,new Ch),H1.set(this,new wS),zR.set(this,new $d)}validate(e,r){super.validate(e,r),Wr(e.id)&&jR(this,H1,"f").validate(e.id,r),Wr(e.lastUpdated)&&jR(this,z1,"f").validate(e.lastUpdated,r),Wr(e.status)&&jR(this,zR,"f").validate(e.status,r),Wr(e.tag)&&jR(this,zR,"f").validate(e.tag,r)}}z1=new WeakMap,H1=new WeakMap,zR=new WeakMap;class MMt extends Os{constructor(){super(...arguments),this.validator=new wXe}}var D_=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},HR,L_;class NXe extends Fs{constructor(){super(...arguments),HR.set(this,new wS),L_.set(this,new $d)}validate(e,r){super.validate(e,r),Wr(e.id)&&D_(this,HR,"f").validate(e.id,r),Wr(e.name)&&D_(this,HR,"f").validate(e.name,r),Wr(e.tag)&&D_(this,L_,"f").validate(e.tag,r),Wr(e.security)&&D_(this,L_,"f").validate(e.security,r),Wr(e.context)&&D_(this,L_,"f").validate(e.context,r),Wr(e.identifier)&&D_(this,L_,"f").validate(e.identifier,r)}}HR=new WeakMap,L_=new WeakMap;class wMt extends Os{constructor(){super(...arguments),this.validator=new NXe}}class DXe extends Fs{validate(e,r){super.validate(e,r)}}class NMt extends Os{constructor(){super(...arguments),this.validator=new DXe}}class LXe{validate(e,r){e.file.trim()||r.add("File content is required"),e.file.trim()&&!W7e(e.file)&&r.add("File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"),e.fileName.trim()||r.add("File name is required")}}class DMt extends _n{constructor(){super(...arguments),this.validator=new LXe}}class $Xe{validate(e,r){e.attachmentId.trim()||r.add("Attachment ID is required")}}class LMt extends _n{constructor(){super(...arguments),this.validator=new $Xe}}class xXe{validate(e,r){var n;e.subject.trim()||r.add("Subject is required"),e.comment.body.trim()||r.add("Comment body is required"),e.fields.category.trim()||r.add("Category is required"),!((n=e.emailCcs)===null||n===void 0)&&n.some(i=>!i.email.trim())&&r.add("CC email is required")}}class $Mt extends _n{constructor(){super(...arguments),this.validator=new xXe}}class UXe extends Fs{validate(e,r){super.validate(e,r)}}class xMt extends Os{constructor(){super(...arguments),this.validator=new UXe}}class FXe extends Fs{validate(e,r){e.requestId<0&&r.add("requestId must be a non-negative number"),super.validate(e,r)}}class UMt extends Os{constructor(){super(...arguments),this.validator=new FXe}}class kXe{validate(e,r){e.requestId<0&&r.add("Request ID must be a non-negative integer"),Ps(e.body.trim())&&r.add("Comment body is required")}}class FMt extends _n{constructor(){super(...arguments),this.validator=new kXe}}class GXe{validate(e,r){Ps(e.attachmentId.trim())&&r.add("attachmentId must be a non-empty string"),e.requestId<0&&r.add("requestId must be a non-negative number")}}class kMt extends _n{constructor(){super(...arguments),this.validator=new GXe}}const VXe="code cannot be null or empty";class BXe{validate(e,r){Ps(e.code)&&r.add(VXe)}}class GMt extends _n{constructor(){super(...arguments),this.validator=new BXe}}const jXe="consentId cannot be null or empty";class zXe{validate(e,r){Ps(e.consentId)&&r.add(jXe)}}class HXe extends _n{constructor(){super(...arguments),this.validator=new zXe}}var q1=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})};class Y1{constructor(e=new Map){this.storage=e}get(e){return q1(this,void 0,void 0,function*(){return this.storage.get(e)})}set(e,r){return q1(this,void 0,void 0,function*(){this.storage.set(e,r)})}delete(e){return q1(this,void 0,void 0,function*(){return this.storage.delete(e)})}}const qXe={logLevel:m1.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new Y1,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var pl;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(pl||(pl={}));var YXe=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Yse=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},DS,an;(function(t){t[t.VERBOSE=0]="VERBOSE",t[t.DEBUG=1]="DEBUG",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.FATAL=5]="FATAL"})(an||(an={}));const QXe={[an.VERBOSE]:"VERBOSE",[an.DEBUG]:"DEBUG",[an.INFO]:"INFO",[an.WARN]:"WARN",[an.ERROR]:"ERROR",[an.FATAL]:"FATAL"};class $_{constructor(e){DS.set(this,void 0),YXe(this,DS,e,"f")}get severity(){return Yse(this,DS,"f")}shouldLog(e){return e>=Yse(this,DS,"f")}static severityText(e){return QXe[e]}static severityFromText(e){switch(e){case"VERBOSE":return an.VERBOSE;case"DEBUG":return an.DEBUG;case"INFO":return an.INFO;case"WARN":return an.WARN;case"ERROR":return an.ERROR;case"FATAL":return an.FATAL;default:throw new Error(`Invalid severity text: ${e}`)}}}DS=new WeakMap;var Q1=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},yc=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},xd,Qse,qR,LS,YR,Ph;class Wse{constructor(e,r,n){xd.add(this),qR.set(this,void 0),LS.set(this,void 0),YR.set(this,void 0),Q1(this,qR,n,"f"),Q1(this,LS,new $_(e),"f"),Q1(this,YR,r,"f")}name(){return yc(this,qR,"f")}severity(){return yc(this,LS,"f").severity}verbose(e,r){yc(this,xd,"m",Ph).call(this,an.VERBOSE,e,r)}debug(e,r){yc(this,xd,"m",Ph).call(this,an.DEBUG,e,r)}info(e,r){yc(this,xd,"m",Ph).call(this,an.INFO,e,r)}warn(e,r){yc(this,xd,"m",Ph).call(this,an.WARN,e,r)}error(e,r){let n;r instanceof tr&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),yc(this,xd,"m",Ph).call(this,an.ERROR,e,n)}fatal(e,r){yc(this,xd,"m",Ph).call(this,an.FATAL,e,r)}static otelSeverityNumber(e){switch(e){case an.VERBOSE:return pl.TRACE;case an.DEBUG:return pl.DEBUG;case an.INFO:return pl.INFO;case an.WARN:return pl.WARN;case an.ERROR:return pl.ERROR;case an.FATAL:return pl.FATAL;default:return pl.UNSPECIFIED}}}Qse=Wse,qR=new WeakMap,LS=new WeakMap,YR=new WeakMap,xd=new WeakSet,Ph=function(e,r,n){yc(this,LS,"f").shouldLog(e)&&yc(this,YR,"f").emit({timestamp:Date.now(),severityNumber:Qse.otelSeverityNumber(e),severityText:$_.severityText(e),body:r,attributes:n??{}})};var Kse=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Zse=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},QR,WR;class WXe{constructor(e,r){QR.set(this,void 0),WR.set(this,void 0),Kse(this,WR,e,"f"),Kse(this,QR,r.loggerProvider(),"f")}getLogger(e){const r=e??"default",n=Zse(this,QR,"f").getLogger(r);return new Wse(Zse(this,WR,"f"),n,r)}}QR=new WeakMap,WR=new WeakMap;class KXe{format(e,r,n,i){let a=`[${new Date().toISOString()}] ${$_.severityText(e)}`;return n!==void 0&&(a+=` (${n})`),a+=`: ${r}`,i===void 0?[a]:[a,i]}}var W1=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ms=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ec,Ac,_l;class ZXe{constructor(e,r){Ec.set(this,void 0),Ac.set(this,void 0),_l.set(this,void 0),W1(this,Ac,new $_(e),"f"),W1(this,Ec,r,"f"),W1(this,_l,new KXe,"f")}name(){return Ms(this,Ec,"f")}severity(){return Ms(this,Ac,"f").severity}verbose(e,r){Ms(this,Ac,"f").shouldLog(an.VERBOSE)&&console.debug(...Ms(this,_l,"f").format(an.VERBOSE,e,Ms(this,Ec,"f"),r))}debug(e,r){Ms(this,Ac,"f").shouldLog(an.DEBUG)&&console.debug(...Ms(this,_l,"f").format(an.DEBUG,e,Ms(this,Ec,"f"),r))}info(e,r){Ms(this,Ac,"f").shouldLog(an.INFO)&&console.info(...Ms(this,_l,"f").format(an.INFO,e,Ms(this,Ec,"f"),r))}warn(e,r){Ms(this,Ac,"f").shouldLog(an.WARN)&&console.warn(...Ms(this,_l,"f").format(an.WARN,e,Ms(this,Ec,"f"),r))}error(e,r){let n=r;r instanceof tr&&(n=r.failure()?r.error():r.data()),Ms(this,Ac,"f").shouldLog(an.ERROR)&&console.error(...Ms(this,_l,"f").format(an.ERROR,e,Ms(this,Ec,"f"),n))}fatal(e,r){Ms(this,Ac,"f").shouldLog(an.FATAL)&&console.error(...Ms(this,_l,"f").format(an.FATAL,e,Ms(this,Ec,"f"),r))}}Ec=new WeakMap,Ac=new WeakMap,_l=new WeakMap;var XXe=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},JXe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},KR;class ws{constructor(e=an.FATAL){KR.set(this,void 0),XXe(this,KR,e,"f")}getLogger(e){return new ZXe(JXe(this,KR,"f"),e)}}KR=new WeakMap;var eJe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},K1,Xse;class tJe{constructor(){K1.add(this)}createLogProvider(e,r){switch(eJe(this,K1,"m",Xse).call(this,e)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new WXe(e.logLevel,r);case"console":return new ws(e.logLevel)}}}K1=new WeakSet,Xse=function(e){return e.telemetry.enabled?"otel":"console"};var pi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ml=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Qo,x_,Ud,U_,Fd,Ih,Jse,eae,tae,rae,nae,iae,sae,aae,oae,uae;class ZR{constructor(e){Qo.add(this),x_.set(this,void 0),Ud.set(this,void 0),U_.set(this,void 0),Fd.set(this,void 0),Ih.set(this,void 0),this.bwellConfig=pi(this,Qo,"m",nae).call(this,e),ml(this,x_,$_.severityFromText(this.bwellConfig.logLevel),"f"),ml(this,Ih,pi(this,Qo,"m",uae).call(this),"f"),ml(this,U_,pi(this,Qo,"m",sae).call(this),"f"),ml(this,Ud,pi(this,Qo,"m",aae).call(this),"f"),ml(this,Fd,pi(this,Qo,"m",oae).call(this),"f")}static initialize(e){try{const r=new ZR(e);return tr.success(r)}catch(r){if(ua.isBwellError(r))return tr.failure(r);throw r}}get logLevel(){return pi(this,x_,"f")}get graphQL(){return pi(this,U_,"f")}get telemetry(){return pi(this,Ud,"f")}get http(){return pi(this,Fd,"f")}get context(){return pi(this,Ih,"f")}setContextUser(e){pi(this,Ih,"f").user=e}mergeRemoteConfig(e){ml(this,x_,pi(this,Qo,"m",Jse).call(this,e),"f"),ml(this,U_,pi(this,Qo,"m",eae).call(this,e),"f"),ml(this,Ud,Object.freeze(pi(this,Qo,"m",tae).call(this,e)),"f"),ml(this,Fd,Object.freeze(pi(this,Qo,"m",rae).call(this,e)),"f")}}x_=new WeakMap,Ud=new WeakMap,U_=new WeakMap,Fd=new WeakMap,Ih=new WeakMap,Qo=new WeakSet,Jse=function(e){var r;const n=(r=e?.logLevel)!==null&&r!==void 0?r:null;return n===null?pi(this,x_,"f"):$_.severityFromText(n)},eae=function(e){var r;const n=(r=e?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return pi(this,U_,"f");const{authedApiUrl:i,unauthedApiUrl:s}=this.bwellConfig.overrides;return{unauthApiUrl:s??n.url,apiUrl:i??n.authUrl}},tae=function(e){var r,n;const i=(r=e?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return pi(this,Ud,"f");const s=(n=i.enabled)!==null&&n!==void 0?n:pi(this,Ud,"f").enabled;if(i.collectorUrl.endsWith("/"))throw new Error('Telemetry config "collectorUrl" cannot end with a trailing slash.');let a;try{a=new URL(i.collectorUrl)}catch{throw new Error('Telemetry config "collectorUrl" malformed/is not a proper URL.')}if(a.pathname!=="/")throw new Error('Telemetry config "collectorUrl" cannot contain a path.');return Object.assign(Object.assign({},pi(this,Ud,"f")),{enabled:s,collectorUrl:i.collectorUrl})},rae=function(e){var r,n,i;const s=(r=e?.httpClient)!==null&&r!==void 0?r:null;return s===null?pi(this,Fd,"f"):{timeout:(n=s.requestTimeout)!==null&&n!==void 0?n:pi(this,Fd,"f").timeout,retryPolicy:(i=s.retry)!==null&&i!==void 0?i:pi(this,Fd,"f").retryPolicy}},nae=function(e){return Object.assign(Object.assign({},qXe),e)},iae=function(){try{return J7e(this.bwellConfig.clientKey)}catch{throw new j7e("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},sae=function(){var e,r;return{apiUrl:(e=this.bwellConfig.overrides.authedApiUrl)!==null&&e!==void 0?e:`https://api-gateway.${pi(this,Ih,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${pi(this,Ih,"f").env}.icanbwell.com/federated-graph/graphql`}},aae=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},oae=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},uae=function(){return{clientKey:this.bwellConfig.clientKey,env:pi(this,Qo,"m",iae).call(this),user:null}};var rJe=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},cae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},XR=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},F_,JR;class nJe{constructor(e,r=new ws){F_.set(this,void 0),JR.set(this,void 0),cae(this,JR,e,"f"),cae(this,F_,r.getLogger("ConfigManager"),"f")}initialize(e){return rJe(this,void 0,void 0,function*(){const r=ZR.initialize(e);if(r.failure())return r;const n=r.data();XR(this,F_,"f").verbose("Initializing SDK Configuration");const i=yield XR(this,JR,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const s=i.data();try{n.mergeRemoteConfig(s)}catch(a){XR(this,F_,"f").error("Error merging SDK config with remote config.",a)}return XR(this,F_,"f").info("Remote SDK Configuration merged with user config"),tr.success(n)})}}F_=new WeakMap,JR=new WeakMap;class kd extends Error{response;request;constructor(e,r){const n=`${kd.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,kd.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,kd)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${String(e.status)})`}}const lae=t=>t.toUpperCase(),Z1=t=>typeof t=="function"?t():t,dae=(t,e)=>t.map((r,n)=>[r,e[n]]),k_=t=>{let e={};return t instanceof Headers?e=iJe(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):t&&(e=t),e},iJe=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},sJe=t=>{try{const e=t();return aJe(e)?e.catch(r=>fae(r)):e}catch(e){return fae(e)}},fae=t=>t instanceof Error?t:new Error(String(t)),aJe=t=>typeof t=="object"&&t!==null&&"then"in t&&typeof t.then=="function"&&"catch"in t&&typeof t.catch=="function"&&"finally"in t&&typeof t.finally=="function",X1=t=>{throw new Error(`Unhandled case: ${String(t)}`)},eO=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),VMt=t=>Object.entries(t),BMt=t=>Object.values(t),jMt=(t,e)=>Object.fromEntries(Object.entries(t).map(([r,n])=>[r,e(n,r)])),zMt=t=>t.charAt(0).toLowerCase()+t.slice(1);function HMt(t){if(!Array.isArray(t))throw new Error(`Expected array. Got: ${String(t)}`)}function qMt(t){if(t===null||typeof t!="object")throw new Error(`Expected object. Got: ${String(t)}`)}const YMt=t=>t.charAt(0).toUpperCase()+t.slice(1),QMt=t=>{let e=!1,r,n;return{promise:new Promise((s,a)=>{r=s,n=a}),isResolved:()=>e,resolve:s=>{if(e=!0,t?.strict&&e)throw new Error(`Deferred is already resolved. Attempted to resolve with: ${JSON.stringify(s)}`);r(s)},reject:s=>n(s)}},oJe=(...t)=>{process.env.DEBUG&&console.log(...t)},WMt=(...t)=>(...e)=>{oJe(...t,...e)},KMt=t=>{const e=[],r=[];for(const n of t)n instanceof Error?e.push(n):r.push(n);return[r,e]};var uJe;const ZMt=async(...t)=>{const e=cJe(t);return new uJe(e.url).batchRequests(e)},cJe=t=>t.length===1?t[0]:{url:t[0],documents:t[1],requestHeaders:t[2],signal:void 0},lJe=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};var dJe;const XMt=async(...t)=>{const[e,r,...n]=t,i=fJe(e,r,...n);return new dJe(i.url).rawRequest({...i})},fJe=(t,e,...r)=>{const[n,i]=r;return typeof t=="string"?{url:t,query:e,variables:n,requestHeaders:i,signal:void 0}:t},hJe=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0};var pJe=p(42455);const JMt="Accept",J1="Content-Type",eF="application/json",hae="application/graphql-response+json",ewt=null,pae=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),_Je=t=>{const e=t.toLowerCase();return e.includes(hae)||e.includes(eF)},_ae=t=>{try{if(Array.isArray(t))return{_tag:"Batch",executionResults:t.map(mae)};if(eO(t))return{_tag:"Single",executionResult:mae(t)};throw new Error(`Invalid execution result: result is not object or array.
|
|
13796
13796
|
Got:
|
|
13797
13797
|
${String(t)}`)}catch(e){return e}},mae=t=>{if(typeof t!="object"||t===null)throw new Error("Invalid execution result: result is not object");let e,r,n;if("errors"in t){if(!eO(t.errors)&&!Array.isArray(t.errors))throw new Error("Invalid execution result: errors is not plain object OR array");e=t.errors}if("data"in t){if(!eO(t.data)&&t.data!==null)throw new Error("Invalid execution result: data is not plain object");r=t.data}if("extensions"in t){if(!eO(t.extensions))throw new Error("Invalid execution result: extensions is not plain object");n=t.extensions}return{data:r,errors:e,extensions:n}},mJe=t=>t._tag==="Batch"?t.executionResults.some(gae):gae(t.executionResult),gae=t=>Array.isArray(t.errors)?t.errors.length>0:!!t.errors,vae=t=>typeof t=="object"&&t!==null&&"kind"in t&&t.kind===pJe.b.OPERATION_DEFINITION;var gJe=p(5157),vJe=p(92704);const SJe=t=>{let e;const r=t.definitions.filter(vae);return r.length===1&&(e=r[0].name?.value),e},yJe=t=>{let e=!1;const r=t.definitions.filter(vae);return r.length===1&&(e=r[0].operation==="mutation"),e},tF=(t,e)=>{const r=typeof t=="string"||"kind"in t?t:String(t),n=typeof r=="string"?r:(0,vJe.y)(r);let i=!1,s;if(e)return{expression:n,isMutation:i,operationName:s};const a=sJe(()=>typeof r=="string"?(0,gJe.qg)(r):r);return a instanceof Error?{expression:n,isMutation:i,operationName:s}:(s=SJe(a),i=yJe(a),{expression:n,operationName:s,isMutation:i})},rF=JSON,nF=async t=>{const e={...t,method:t.request._tag==="Single"?t.request.document.isMutation?"POST":lae(t.method??"post"):t.request.hasMutations?"POST":lae(t.method??"post"),fetchOptions:{...t.fetchOptions,errorPolicy:t.fetchOptions.errorPolicy??"none"}},n=await AJe(e.method)(e),i=await n.text();let s;try{s=EJe(i,n.headers.get(J1),t.fetchOptions.jsonSerializer??rF)}catch(o){s=o}const a={status:n.status,headers:n.headers,body:i};if(!n.ok){if(s instanceof Error)return new kd({...a},{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables});const o=s._tag==="Batch"?{...s.executionResults,...a}:{...s.executionResult,...a};return new kd(o,{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables})}if(s instanceof Error)throw s;if(mJe(s)&&e.fetchOptions.errorPolicy==="none"){const o=s._tag==="Batch"?{...s.executionResults,...a}:{...s.executionResult,...a};return new kd(o,{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables})}switch(s._tag){case"Single":return{...a,...Sae(e)(s.executionResult)};case"Batch":return{...a,data:s.executionResults.map(Sae(e))};default:X1(s)}},Sae=t=>e=>({extensions:e.extensions,data:e.data,errors:t.fetchOptions.errorPolicy==="all"?e.errors:void 0}),EJe=(t,e,r)=>e&&_Je(e)?_ae(r.parse(t)):_ae(t),AJe=t=>async e=>{const r=new Headers(e.headers);let n=null,i;r.has("Accept")||r.set("Accept",[hae,eF].join(", ")),t==="POST"?(i=(e.fetchOptions.jsonSerializer??rF).stringify(TJe(e)),typeof i=="string"&&!r.has(J1)&&r.set(J1,eF)):n=bJe(e);const s={method:t,headers:r,body:i,...e.fetchOptions};let a=new URL(e.url),o=s;if(e.middleware){const c=await Promise.resolve(e.middleware({...s,url:e.url,operationName:e.request._tag==="Single"?e.request.document.operationName:void 0,variables:e.request.variables})),{url:l,...d}=c;a=new URL(l),o=d}return n&&n.forEach((c,l)=>{a.searchParams.append(l,c)}),await(e.fetch??fetch)(a,o)},TJe=t=>{switch(t.request._tag){case"Single":return{query:t.request.document.expression,variables:t.request.variables,operationName:t.request.document.operationName};case"Batch":return dae(t.request.query,t.request.variables??[]).map(([e,r])=>({query:e,variables:r}));default:throw X1(t.request)}},bJe=t=>{const e=t.fetchOptions.jsonSerializer??rF,r=new URLSearchParams;switch(t.request._tag){case"Single":return r.append("query",pae(t.request.document.expression)),t.request.variables&&r.append("variables",e.stringify(t.request.variables)),t.request.document.operationName&&r.append("operationName",t.request.document.operationName),r;case"Batch":{const n=t.request.variables?.map(a=>e.stringify(a))??[],i=t.request.query.map(pae),s=dae(i,n).map(([a,o])=>({query:a,variables:o}));return r.append("query",e.stringify(s)),r}default:throw X1(t.request)}};class CJe{url;requestConfig;constructor(e,r={}){this.url=e,this.requestConfig=r}rawRequest=async(...e)=>{const[r,n,i]=e,s=hJe(r,n,i),{headers:a,fetch:o=globalThis.fetch,method:u="POST",requestMiddleware:c,responseMiddleware:l,excludeOperationName:d,...f}=this.requestConfig,{url:_}=this;s.signal!==void 0&&(f.signal=s.signal);const m=tF(s.query,d),E=await nF({url:_,request:{_tag:"Single",document:m,variables:s.variables},headers:{...k_(Z1(a)),...k_(s.requestHeaders)},fetch:o,method:u,fetchOptions:f,middleware:c});if(l&&await l(E,{operationName:m.operationName,variables:n,url:this.url}),E instanceof Error)throw E;return E};async request(e,...r){const[n,i]=r,s=OJe(e,n,i),{headers:a,fetch:o=globalThis.fetch,method:u="POST",requestMiddleware:c,responseMiddleware:l,excludeOperationName:d,...f}=this.requestConfig,{url:_}=this;s.signal!==void 0&&(f.signal=s.signal);const m=tF(s.document,d),E=await nF({url:_,request:{_tag:"Single",document:m,variables:s.variables},headers:{...k_(Z1(a)),...k_(s.requestHeaders)},fetch:o,method:u,fetchOptions:f,middleware:c});if(l&&await l(E,{operationName:m.operationName,variables:s.variables,url:this.url}),E instanceof Error)throw E;return E.data}async batchRequests(e,r){const n=lJe(e,r),{headers:i,excludeOperationName:s,...a}=this.requestConfig;n.signal!==void 0&&(a.signal=n.signal);const o=n.documents.map(({document:f})=>tF(f,s)),u=o.map(({expression:f})=>f),c=o.some(({isMutation:f})=>f),l=n.documents.map(({variables:f})=>f),d=await nF({url:this.url,request:{_tag:"Batch",operationName:void 0,query:u,hasMutations:c,variables:l},headers:{...k_(Z1(i)),...k_(n.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(d,{operationName:void 0,variables:l,url:this.url}),d instanceof Error)throw d;return d.data}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,r){const{headers:n}=this.requestConfig;return n?n[e]=r:this.requestConfig.headers={[e]:r},this}setEndpoint(e){return this.url=e,this}}var RJe;async function twt(t,e,...r){const n=PJe(t,e,...r);return new RJe(n.url).request({...n})}const OJe=(t,e,r)=>t.document?t:{document:t,variables:e,requestHeaders:r,signal:void 0},PJe=(t,e,...r)=>{const[n,i]=r;return typeof t=="string"?{url:t,document:e,variables:n,requestHeaders:i,signal:void 0}:t};var rwt;const nwt=null,ls=`
|
|
13798
13798
|
fragment CodingFields on Coding {
|
|
@@ -18900,7 +18900,7 @@ ${ks}`,ert=`
|
|
|
18900
18900
|
errorCode
|
|
18901
18901
|
}
|
|
18902
18902
|
}
|
|
18903
|
-
`,urt=(t,e,r,n)=>t();function crt(t,e=urt){return{getTasks(r,n){return e(i=>t.rawRequest(cet,r,Object.assign(Object.assign({},n),i)),"getTasks","query",r)},setTaskStatus(r,n){return e(i=>t.rawRequest(det,r,Object.assign(Object.assign({},n),i)),"setTaskStatus","mutation",r)},taskUpdateStatus(r,n){return e(i=>t.rawRequest(fet,r,Object.assign(Object.assign({},n),i)),"taskUpdateStatus","mutation",r)},activateDirectConnection(r,n){return e(i=>t.rawRequest(het,r,Object.assign(Object.assign({},n),i)),"activateDirectConnection","mutation",r)},createConnection(r,n){return e(i=>t.rawRequest(pet,r,Object.assign(Object.assign({},n),i)),"createConnection","mutation",r)},deleteConnection(r,n){return e(i=>t.rawRequest(_et,r,Object.assign(Object.assign({},n),i)),"deleteConnection","mutation",r)},disconnectConnection(r,n){return e(i=>t.rawRequest(met,r,Object.assign(Object.assign({},n),i)),"disconnectConnection","mutation",r)},getDataSource(r,n){return e(i=>t.rawRequest(get,r,Object.assign(Object.assign({},n),i)),"getDataSource","query",r)},getMemberConnections(r,n){return e(i=>t.rawRequest(vet,r,Object.assign(Object.assign({},n),i)),"getMemberConnections","query",r)},getOauthUrl(r,n){return e(i=>t.rawRequest(yet,r,Object.assign(Object.assign({},n),i)),"getOauthUrl","query",r)},AcceptDataSharingInvitation(r,n){return e(i=>t.rawRequest(Eet,r,Object.assign(Object.assign({},n),i)),"AcceptDataSharingInvitation","mutation",r)},GetDataSharingAccess(r,n){return e(i=>t.rawRequest(Aet,r,Object.assign(Object.assign({},n),i)),"GetDataSharingAccess","query",r)},GetDataSharingGrants(r,n){return e(i=>t.rawRequest(Tet,r,Object.assign(Object.assign({},n),i)),"GetDataSharingGrants","query",r)},RequestDataSharingToken(r,n){return e(i=>t.rawRequest(bet,r,Object.assign(Object.assign({},n),i)),"RequestDataSharingToken","mutation",r)},getDeviceProviderStatus(r,n){return e(i=>t.rawRequest(Cet,r,Object.assign(Object.assign({},n),i)),"getDeviceProviderStatus","query",r)},getDeviceProviders(r,n){return e(i=>t.rawRequest(Ret,r,Object.assign(Object.assign({},n),i)),"getDeviceProviders","query",r)},getDeviceUserStatus(r,n){return e(i=>t.rawRequest(Oet,r,Object.assign(Object.assign({},n),i)),"getDeviceUserStatus","query",r)},setupMobileSync(r,n){return e(i=>t.rawRequest(Pet,r,Object.assign(Object.assign({},n),i)),"setupMobileSync","mutation",r)},updateDeviceRegistration(r,n){return e(i=>t.rawRequest(Iet,r,Object.assign(Object.assign({},n),i)),"updateDeviceRegistration","mutation",r)},publishEvent(r,n){return e(i=>t.rawRequest(Met,r,Object.assign(Object.assign({},n),i)),"publishEvent","mutation",r)},getClaimSummary(r,n){return e(i=>t.rawRequest(wet,r,Object.assign(Object.assign({},n),i)),"getClaimSummary","query",r)},getCoverageSummary(r,n){return e(i=>t.rawRequest(Net,r,Object.assign(Object.assign({},n),i)),"getCoverageSummary","query",r)},getCoverages(r,n){return e(i=>t.rawRequest(Det,r,Object.assign(Object.assign({},n),i)),"getCoverages","query",r)},getEOBDocument(r,n){return e(i=>t.rawRequest(Let,r,Object.assign(Object.assign({},n),i)),"getEOBDocument","query",r)},getExplanationOfBenefits(r,n){return e(i=>t.rawRequest($et,r,Object.assign(Object.assign({},n),i)),"getExplanationOfBenefits","query",r)},getBinary(r,n){return e(i=>t.rawRequest(xet,r,Object.assign(Object.assign({},n),i)),"getBinary","query",r)},getFHIR(r,n){return e(i=>t.rawRequest(Uet,r,Object.assign(Object.assign({},n),i)),"getFHIR","query",r)},getBodySystemScore(r,n){return e(i=>t.rawRequest(Fet,r,Object.assign(Object.assign({},n),i)),"getBodySystemScore","query",r)},getHealthScore(r,n){return e(i=>t.rawRequest(ket,r,Object.assign(Object.assign({},n),i)),"getHealthScore","query",r)},getDiagnosticReports(r,n){return e(i=>t.rawRequest(Get,r,Object.assign(Object.assign({},n),i)),"getDiagnosticReports","query",r)},getAllergyIntoleranceGroups(r,n){return e(i=>t.rawRequest(Vet,r,Object.assign(Object.assign({},n),i)),"getAllergyIntoleranceGroups","query",r)},getAllergyIntolerances(r,n){return e(i=>t.rawRequest(Bet,r,Object.assign(Object.assign({},n),i)),"getAllergyIntolerances","query",r)},getCarePlanGroups(r,n){return e(i=>t.rawRequest(jet,r,Object.assign(Object.assign({},n),i)),"getCarePlanGroups","query",r)},getCarePlans(r,n){return e(i=>t.rawRequest(zet,r,Object.assign(Object.assign({},n),i)),"getCarePlans","query",r)},getCareTeams(r,n){return e(i=>t.rawRequest(Het,r,Object.assign(Object.assign({},n),i)),"getCareTeams","query",r)},getConditionGroups(r,n){return e(i=>t.rawRequest(qet,r,Object.assign(Object.assign({},n),i)),"getConditionGroups","query",r)},getConditions(r,n){return e(i=>t.rawRequest(Yet,r,Object.assign(Object.assign({},n),i)),"getConditions","query",r)},getDeviceMetrics(r,n){return e(i=>t.rawRequest(Qet,r,Object.assign(Object.assign({},n),i)),"getDeviceMetrics","query",r)},getDeviceMetricsGroups(r,n){return e(i=>t.rawRequest(Wet,r,Object.assign(Object.assign({},n),i)),"getDeviceMetricsGroups","query",r)},getDiagnosticReportLabGroups(r,n){return e(i=>t.rawRequest(Ket,r,Object.assign(Object.assign({},n),i)),"getDiagnosticReportLabGroups","query",r)},getDocumentReferences(r,n){return e(i=>t.rawRequest(Zet,r,Object.assign(Object.assign({},n),i)),"getDocumentReferences","query",r)},getDocumentReferencesList(r,n){return e(i=>t.rawRequest(Xet,r,Object.assign(Object.assign({},n),i)),"getDocumentReferencesList","query",r)},getEncountersGroup(r,n){return e(i=>t.rawRequest(Jet,r,Object.assign(Object.assign({},n),i)),"getEncountersGroup","query",r)},getEncounterQuery(r,n){return e(i=>t.rawRequest(ett,r,Object.assign(Object.assign({},n),i)),"getEncounterQuery","query",r)},GetHealthSummary(r,n){return e(i=>t.rawRequest(ttt,r,Object.assign(Object.assign({},n),i)),"GetHealthSummary","query",r)},getImmunizationGroups(r,n){return e(i=>t.rawRequest(rtt,r,Object.assign(Object.assign({},n),i)),"getImmunizationGroups","query",r)},getImmunizations(r,n){return e(i=>t.rawRequest(ntt,r,Object.assign(Object.assign({},n),i)),"getImmunizations","query",r)},getObservations(r,n){return e(i=>t.rawRequest(itt,r,Object.assign(Object.assign({},n),i)),"getObservations","query",r)},getProcedureGroups(r,n){return e(i=>t.rawRequest(stt,r,Object.assign(Object.assign({},n),i)),"getProcedureGroups","query",r)},GetProcedures(r,n){return e(i=>t.rawRequest(att,r,Object.assign(Object.assign({},n),i)),"GetProcedures","query",r)},getVitalSignGroups(r,n){return e(i=>t.rawRequest(ott,r,Object.assign(Object.assign({},n),i)),"getVitalSignGroups","query",r)},getVitalSigns(r,n){return e(i=>t.rawRequest(utt,r,Object.assign(Object.assign({},n),i)),"getVitalSigns","query",r)},UploadDocument(r,n){return e(i=>t.rawRequest(ctt,r,Object.assign(Object.assign({},n),i)),"UploadDocument","mutation",r)},getLabGroups(r,n){return e(i=>t.rawRequest(ltt,r,Object.assign(Object.assign({},n),i)),"getLabGroups","query",r)},getLabKnowledge(r,n){return e(i=>t.rawRequest(dtt,r,Object.assign(Object.assign({},n),i)),"getLabKnowledge","query",r)},getLabs(r,n){return e(i=>t.rawRequest(ftt,r,Object.assign(Object.assign({},n),i)),"getLabs","query",r)},getMedicationDispense(r,n){return e(i=>t.rawRequest(htt,r,Object.assign(Object.assign({},n),i)),"getMedicationDispense","query",r)},getMedicationGroups(r,n){return e(i=>t.rawRequest(ptt,r,Object.assign(Object.assign({},n),i)),"getMedicationGroups","query",r)},getMedicationKnowledge(r,n){return e(i=>t.rawRequest(_tt,r,Object.assign(Object.assign({},n),i)),"getMedicationKnowledge","query",r)},getMedicationPricing(r,n){return e(i=>t.rawRequest(mtt,r,Object.assign(Object.assign({},n),i)),"getMedicationPricing","query",r)},getMedicationRequest(r,n){return e(i=>t.rawRequest(gtt,r,Object.assign(Object.assign({},n),i)),"getMedicationRequest","query",r)},getMedicationStatements(r,n){return e(i=>t.rawRequest(vtt,r,Object.assign(Object.assign({},n),i)),"getMedicationStatements","query",r)},updateMedicationStatement(r,n){return e(i=>t.rawRequest(Stt,r,Object.assign(Object.assign({},n),i)),"updateMedicationStatement","mutation",r)},appointments(r,n){return e(i=>t.rawRequest(ytt,r,Object.assign(Object.assign({},n),i)),"appointments","query",r)},cancelAppointment(r,n){return e(i=>t.rawRequest(Ett,r,Object.assign(Object.assign({},n),i)),"cancelAppointment","mutation",r)},cancelationReasons(r,n){return e(i=>t.rawRequest(Att,r,Object.assign(Object.assign({},n),i)),"cancelationReasons","query",r)},updateAppointmentNotificationPreferences(r,n){return e(i=>t.rawRequest(Ttt,r,Object.assign(Object.assign({},n),i)),"updateAppointmentNotificationPreferences","mutation",r)},addCareTeamMember(r,n){return e(i=>t.rawRequest(btt,r,Object.assign(Object.assign({},n),i)),"addCareTeamMember","mutation",r)},addCareTeamMembers(r,n){return e(i=>t.rawRequest(Ctt,r,Object.assign(Object.assign({},n),i)),"addCareTeamMembers","mutation",r)},CareTeamMembers(r,n){return e(i=>t.rawRequest(Rtt,r,Object.assign(Object.assign({},n),i)),"CareTeamMembers","query",r)},removeCareTeamMember(r,n){return e(i=>t.rawRequest(Ott,r,Object.assign(Object.assign({},n),i)),"removeCareTeamMember","mutation",r)},updateCareTeamMember(r,n){return e(i=>t.rawRequest(Ptt,r,Object.assign(Object.assign({},n),i)),"updateCareTeamMember","mutation",r)},getMemberPlanIdentifiers(r,n){return e(i=>t.rawRequest(Itt,r,Object.assign(Object.assign({},n),i)),"getMemberPlanIdentifiers","query",r)},authenticate(r,n){return e(i=>t.rawRequest(Mtt,r,Object.assign(Object.assign({},n),i)),"authenticate","query",r)},createGuestAccessToken(r,n){return e(i=>t.rawRequest(wtt,r,Object.assign(Object.assign({},n),i)),"createGuestAccessToken","mutation",r)},ExchangeAuthCode(r,n){return e(i=>t.rawRequest(Ntt,r,Object.assign(Object.assign({},n),i)),"ExchangeAuthCode","mutation",r)},initialize(r,n){return e(i=>t.rawRequest(Dtt,r,Object.assign(Object.assign({},n),i)),"initialize","query",r)},login(r,n){return e(i=>t.rawRequest(Ltt,r,Object.assign(Object.assign({},n),i)),"login","query",r)},refreshTokens(r,n){return e(i=>t.rawRequest($tt,r,Object.assign(Object.assign({},n),i)),"refreshTokens","query",r)},nextQuestion(r,n){return e(i=>t.rawRequest(xtt,r,Object.assign(Object.assign({},n),i)),"nextQuestion","mutation",r)},getQuestionnaireResponseList(r,n){return e(i=>t.rawRequest(Utt,r,Object.assign(Object.assign({},n),i)),"getQuestionnaireResponseList","query",r)},getQuestionnaireResponses(r,n){return e(i=>t.rawRequest(Ftt,r,Object.assign(Object.assign({},n),i)),"getQuestionnaireResponses","query",r)},getQuestionnaires(r,n){return e(i=>t.rawRequest(ktt,r,Object.assign(Object.assign({},n),i)),"getQuestionnaires","query",r)},saveQuestionnaireResponse(r,n){return e(i=>t.rawRequest(Gtt,r,Object.assign(Object.assign({},n),i)),"saveQuestionnaireResponse","mutation",r)},providerSearch(r,n){return e(i=>t.rawRequest(Vtt,r,Object.assign(Object.assign({},n),i)),"providerSearch","query",r)},requestConnection(r,n){return e(i=>t.rawRequest(Btt,r,Object.assign(Object.assign({},n),i)),"requestConnection","mutation",r)},SearchHealthResources(r,n){return e(i=>t.rawRequest(jtt,r,Object.assign(Object.assign({},n),i)),"SearchHealthResources","query",r)},CreateSupportComment(r,n){return e(i=>t.rawRequest(ztt,r,Object.assign(Object.assign({},n),i)),"CreateSupportComment","mutation",r)},CreateSupportRequest(r,n){return e(i=>t.rawRequest(Htt,r,Object.assign(Object.assign({},n),i)),"CreateSupportRequest","mutation",r)},DeleteSupportAttachment(r,n){return e(i=>t.rawRequest(qtt,r,Object.assign(Object.assign({},n),i)),"DeleteSupportAttachment","mutation",r)},getSupportArticles(r,n){return e(i=>t.rawRequest(Ytt,r,Object.assign(Object.assign({},n),i)),"getSupportArticles","query",r)},GetSupportAttachment(r,n){return e(i=>t.rawRequest(Qtt,r,Object.assign(Object.assign({},n),i)),"GetSupportAttachment","query",r)},GetSupportCategories(r,n){return e(i=>t.rawRequest(Wtt,r,Object.assign(Object.assign({},n),i)),"GetSupportCategories","query",r)},getSupportComments(r,n){return e(i=>t.rawRequest(Ktt,r,Object.assign(Object.assign({},n),i)),"getSupportComments","query",r)},getSupportRequests(r,n){return e(i=>t.rawRequest(Ztt,r,Object.assign(Object.assign({},n),i)),"getSupportRequests","query",r)},UploadSupportAttachment(r,n){return e(i=>t.rawRequest(Xtt,r,Object.assign(Object.assign({},n),i)),"UploadSupportAttachment","mutation",r)},createConsent(r,n){return e(i=>t.rawRequest(Jtt,r,Object.assign(Object.assign({},n),i)),"createConsent","mutation",r)},CreateDataExportDirectDownloadUrl(r,n){return e(i=>t.rawRequest(ert,r,Object.assign(Object.assign({},n),i)),"CreateDataExportDirectDownloadUrl","mutation",r)},CreateVerificationUrl(r,n){return e(i=>t.rawRequest(trt,r,Object.assign(Object.assign({},n),i)),"CreateVerificationUrl","mutation",r)},delete(r,n){return e(i=>t.rawRequest(rrt,r,Object.assign(Object.assign({},n),i)),"delete","mutation",r)},GetAccessHistory(r,n){return e(i=>t.rawRequest(nrt,r,Object.assign(Object.assign({},n),i)),"GetAccessHistory","query",r)},getProfile(r,n){return e(i=>t.rawRequest(irt,r,Object.assign(Object.assign({},n),i)),"getProfile","query",r)},searchConsent(r,n){return e(i=>t.rawRequest(srt,r,Object.assign(Object.assign({},n),i)),"searchConsent","query",r)},updateUserProfile(r,n){return e(i=>t.rawRequest(art,r,Object.assign(Object.assign({},n),i)),"updateUserProfile","mutation",r)},VerificationStatus(r,n){return e(i=>t.rawRequest(ort,r,Object.assign(Object.assign({},n),i)),"VerificationStatus","query",r)}}}const lrt=[{name:"Edge",tokens:["Edg"]},{name:"Chrome",tokens:["CriOS","Chrome"]},{name:"Firefox",tokens:["FxiOS","Firefox"]},{name:"Safari",tokens:["Safari"]}];function drt(t){for(const e of lrt)if(e.tokens.some(r=>t.includes(r)))return e.name;return"Unknown"}function frt(){return Oie({node:()=>`Node/${process.versions.node}`,browser:()=>`Browser/${drt(navigator.userAgent)}`})}var hrt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})};const prt="bwell-typescript-v1";function Dae(t,e,r){let n;e!==void 0&&(n=_rt(e));const i={"apollographql-client-name":prt,"apollographql-client-version":wie,"bwell-platform":frt()};r!=null&&(i["accept-language"]=r);const s=new CJe(t,{errorPolicy:"all",mode:"cors",requestMiddleware:n,headers:i});return{client:s,sdk:crt(s)}}function _rt(t){return e=>hrt(this,void 0,void 0,function*(){const n=(yield t.getAccessToken()).data();return Object.assign(Object.assign({},e),{headers:Object.assign(Object.assign({},e.headers),{Authorization:`Bearer ${n}`})})})}var mrt=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Lae=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kS;const $ae="accept-language";class grt{constructor(e){kS.set(this,void 0),mrt(this,kS,e,"f")}setLanguage(e){Lae(this,kS,"f").setHeader($ae,e)}getLanguage(){var e;const r=Lae(this,kS,"f").requestConfig.headers;return(e=r?.[$ae])!==null&&e!==void 0?e:null}}kS=new WeakMap;const vrt="INFORMATION",lwt="WARNING",xae="ERROR",Srt="FATAL";class sO{constructor(e){this.issue=e}message(){var e,r;const n=[];for(const i of this.issue){const s=(r=(e=i.details)===null||e===void 0?void 0:e.text)===null||r===void 0?void 0:r.trim();s==null||s.length===0||n.push(s)}return n.join(", ")}success(){for(const e of this.issue){const r=e.severity.toUpperCase();if(r===xae||r===Srt)return!1}return!0}static error(e){return new sO([{severity:xae,code:"EXCEPTION",details:{text:e.message}}])}static success(){return new sO([{severity:vrt,code:"INFORMATIONAL",details:{}}])}}function yrt(t){for(const e of t){const r=Uae(e);if(r!==null){if(r.code==="500")return!0;for(const n of r.resource.issue)if(n.code==="exception")return!0}}return!1}function lF(t=[]){const e=[];let r=!1;for(const s of t){const a=Uae(s);if(a!==null){r=!0;for(const o of a.resource.issue)e.push(o)}}if(!r)return null;const n=new sO(e),i=new H7e(n);if(Ps(i.message)){const s=t.map(a=>a.message).join(", ");i.message=Ps(s)?"Unknown error. Contact b.well support for further assistance.":s}return i}function Uae(t){const e=t.extensions,r=e?.code,n=e?.resource;return r===void 0||n===void 0||!Ert(n)?null:{code:r,resource:n}}function Ert(t){const e=t.issue;return e===void 0?!1:Array.isArray(e)}var Fae=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},aO=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},V_,dF,fF;class bo{constructor(){V_.add(this)}handleTransaction(e){return Fae(this,void 0,void 0,function*(){try{const r=yield e,n=lF(r.errors);return n!==null?tr.failure(n):tr.success(r.data)}catch(r){if(ua.isBwellError(r))return tr.failure(r);if(aO(this,V_,"m",dF).call(this,r))return aO(this,V_,"m",fF).call(this,r);throw r}})}handleQuery(e){return Fae(this,void 0,void 0,function*(){try{const r=yield e,n=lF(r.errors);return new Yt(r.data,n)}catch(r){if(ua.isBwellError(r))return new Yt(void 0,r);if(aO(this,V_,"m",dF).call(this,r)){const n=aO(this,V_,"m",fF).call(this,r);return Yt.error(n.error())}throw r}})}validateRequest(e){return e===void 0?tr.success(null):e.validate()}}V_=new WeakSet,dF=function(e){return e instanceof kd},fF=function(e){if(e.response.status>299)return new wR(new z7e("Network error",e.response.status));const r=e.response.errors;if(r!==void 0){if(yrt(r))return new wR(new s1("Internal server error",r));const n=lF(r);if(n!==null)return tr.failure(n)}return new wR(new s1("Unknown error",e))};var Vd=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Tc,vl,B_;(function(t){t.ACTIVITY_CONTENT="https://www.icanbwell.com/contentDescription",t.ACTIVITY_ID="https://www.icanbwell.com/activityId",t.ACTIVITY_TOPIC="https://www.icanbwell.com/activityTopic",t.ACTIVITY_TYPE="https://www.icanbwell.com/activityType",t.PERFORMER_TYPE="https://www.icanbwell.com/performerType"})(B_||(B_={}));class Art{constructor(){Tc.add(this)}create(e){var r;const n=e.data(),i={page:n.page,pageSize:n.pageSize};return On(n.id)&&(i.id=Vd(this,Tc,"m",vl).call(this,n.id)),On(n.activityId)&&(i.identifier=Vd(this,Tc,"m",vl).call(this,n.activityId,B_.ACTIVITY_ID)),On(n.activityType)&&(i.code=Vd(this,Tc,"m",vl).call(this,n.activityType,B_.ACTIVITY_TYPE)),On(n.code)&&(i.code=n.code),On(n.activityTopic)&&(i.tag=Vd(this,Tc,"m",vl).call(this,n.activityTopic,B_.ACTIVITY_TOPIC)),On(n.status)&&(i.status=Vd(this,Tc,"m",vl).call(this,n.status)),On(n.subject)&&(i.subject=Vd(this,Tc,"m",vl).call(this,n.subject)),On(n.performerType)&&(i.performer=Vd(this,Tc,"m",vl).call(this,n.performerType,B_.PERFORMER_TYPE)),On(n.basedOn)&&(i.basedOn=Vd(this,Tc,"m",vl).call(this,n.basedOn)),i.sortMethod=n.smartSort===!0?"smartSort":"",On(n.enrichContent)&&(i.enrichContent=n.enrichContent),i.contentLanguage=(r=n.contentLanguage)!==null&&r!==void 0?r:"en",{request:i}}}Tc=new WeakSet,vl=function(e,r){const i={value:(Array.isArray(e)?e:[e]).join(",")};return On(r)&&(i.system=r),{values:[i]}};var hF=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},kae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ca=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ha,j_,pF;class Trt extends bo{constructor(e,r=new ws){super(),Ha.set(this,void 0),j_.set(this,void 0),pF.set(this,new Art),kae(this,j_,e,"f"),kae(this,Ha,r.getLogger("GraphQLActivityManager"),"f")}getTasks(e){return hF(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Ca(this,Ha,"f").verbose("calling getTask query...");const i=yield this.handleQuery(Ca(this,j_,"f").getTasks(Ca(this,pF,"f").create(e)));return Ca(this,Ha,"f").verbose("getTask query complete"),i.hasError()?Ca(this,Ha,"f").error("getTask query error",i.error):Ca(this,Ha,"f").info("successfully called getTask query"),new Yt((r=i.data)===null||r===void 0?void 0:r.getTasks,i.error)})}updateTaskStatus(e){return hF(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Ca(this,Ha,"f").verbose("calling taskUpdateStatus mutation");const n=yield this.handleTransaction(Ca(this,j_,"f").taskUpdateStatus(e.data()));return Ca(this,Ha,"f").verbose("taskUpdateStatus mutation complete"),n.failure()?(Ca(this,Ha,"f").error("taskUpdateStatus error",n),n.intoFailure()):(Ca(this,Ha,"f").info("taskUpdateStatus mutation success"),tr.success(n.data().taskUpdateStatus))})}setTaskStatus(e){return hF(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Ca(this,Ha,"f").verbose("calling setTaskStatus mutation");const n=yield this.handleTransaction(Ca(this,j_,"f").setTaskStatus(e.data()));return Ca(this,Ha,"f").verbose("setTaskStatus mutation complete"),n.failure()?(Ca(this,Ha,"f").error("setTaskStatus error",n),n.intoFailure()):(Ca(this,Ha,"f").info("setTaskStatus mutation success"),tr.success(n.data().updateTaskStatus))})}}Ha=new WeakMap,j_=new WeakMap,pF=new WeakMap;var wh=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},_F=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},vn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},bc,Un,oO;class brt extends bo{constructor(e,r=new ws,n=new Crt){super(),bc.set(this,void 0),Un.set(this,void 0),oO.set(this,void 0),_F(this,bc,e,"f"),_F(this,Un,r.getLogger("GraphQLConnectionManager"),"f"),_F(this,oO,n,"f")}getMemberConnections(e){return wh(this,void 0,void 0,function*(){var r,n;if(e){const a=this.validateRequest(e);if(a.failure())return a.toQueryResult()}vn(this,Un,"f").verbose("calling getMemberConnections...");const i=e?e.data():{},s=yield this.handleQuery(vn(this,bc,"f").getMemberConnections({integrationType:(r=i.integrationType)!==null&&r!==void 0?r:null,status:(n=i.status)!==null&&n!==void 0?n:null}));return vn(this,Un,"f").verbose("getMemberConnections complete"),s.hasError()?vn(this,Un,"f").error("getMemberConnections failed",s.error):vn(this,Un,"f").info("successfully called getMemberConnections"),vn(this,oO,"f").create(s)})}getDataSource(e){return wh(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();vn(this,Un,"f").verbose("calling getDataSources...");const i=yield this.handleQuery(vn(this,bc,"f").getDataSource(Object.assign({},e.data())));return vn(this,Un,"f").verbose("getDataSources complete"),i.hasError()?vn(this,Un,"f").error("getDataSources failed",i.error):vn(this,Un,"f").info("successfully called getDataSources"),new Yt((r=i.data)===null||r===void 0?void 0:r.getDataSource,i.error)})}createConnection(e){return wh(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();vn(this,Un,"f").verbose("calling createConnection...");const n=yield this.handleTransaction(vn(this,bc,"f").createConnection(e.data()));return vn(this,Un,"f").verbose("createConnection complete"),n.failure()?(vn(this,Un,"f").error("createConnection failed",n),n.intoFailure()):(vn(this,Un,"f").info("successfully called createConnection"),tr.success(n.data().createConnection))})}disconnectConnection(e){return wh(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();vn(this,Un,"f").verbose("calling disconnectConnection...");const n=yield this.handleTransaction(vn(this,bc,"f").disconnectConnection(Object.assign({},e.data())));return vn(this,Un,"f").verbose("disconnectConnection complete"),n.failure()?(vn(this,Un,"f").error("disconnectConnection failed",n),n.intoFailure()):(vn(this,Un,"f").info("successfully called disconnectConnection"),tr.success(n.data().disconnectConnection))})}deleteConnection(e){return wh(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();vn(this,Un,"f").verbose("calling deleteConnection...");const n=yield this.handleTransaction(vn(this,bc,"f").deleteConnection(Object.assign({},e.data())));return vn(this,Un,"f").verbose("deleteConnection complete"),n.failure()?(vn(this,Un,"f").error("deleteConnection failed",n),n.intoFailure()):(vn(this,Un,"f").info("successfully called deleteConnection"),tr.success(n.data().deleteConnection))})}activateDirectConnection(e){return wh(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();vn(this,Un,"f").verbose("calling activateDirectConnection...");const n=yield this.handleTransaction(vn(this,bc,"f").activateDirectConnection(Object.assign({},e.data())));return vn(this,Un,"f").verbose("activateDirectConnection complete"),n.failure()?(vn(this,Un,"f").error("activateDirectConnection failed",n),n.intoFailure()):(vn(this,Un,"f").info("successfully called activateDirectConnection"),tr.success(n.data().activateDirectConnection))})}getOauthUrl(e){return wh(this,void 0,void 0,function*(){var r,n,i,s;const a=this.validateRequest(e);if(a.failure())return a.toQueryResult();vn(this,Un,"f").verbose("calling getOauthUrl...");const o=e.data(),u=yield this.handleQuery(vn(this,bc,"f").getOauthUrl({connectionId:o.connectionId,connectUrl:(r=o.connectUrl)!==null&&r!==void 0?r:null,successUrl:(n=o.successUrl)!==null&&n!==void 0?n:null,failureUrl:(i=o.failureUrl)!==null&&i!==void 0?i:null}));return vn(this,Un,"f").verbose("getOauthUrl complete"),u.hasError()?vn(this,Un,"f").error("getOauthUrl failed",u.error):vn(this,Un,"f").info("successfully called getOauthUrl"),new Yt((s=u.data)===null||s===void 0?void 0:s.getOauthUrl,u.error)})}}bc=new WeakMap,Un=new WeakMap,oO=new WeakMap;class Crt{create(e){var r,n,i,s,a,o;const u=new Map,c=(i=(n=(r=e.data)===null||r===void 0?void 0:r.subscription_subscription)===null||n===void 0?void 0:n.entry)!==null&&i!==void 0?i:[];for(const d of c)if(Wr((s=d?.resource)===null||s===void 0?void 0:s.service_slug)&&Wr(d?.resource.subscriptionStatus))for(const f of d.resource.subscriptionStatus)u.set(d.resource.service_slug,{error:f?.error,extension:f?.extension});const l=(o=(a=e.data)===null||a===void 0?void 0:a.getMemberConnections)!==null&&o!==void 0?o:[];return new Yt(l.map(d=>{var f;const _=u.get(d.id);if(Ks(_))return Object.assign(Object.assign({},d),{syncErrors:[]});const m=(f=_.extension)===null||f===void 0?void 0:f.find(E=>E?.id===jZe);return Object.assign(Object.assign({},d),{syncErrors:_.error,syncStatus:m?m.valueString:d.syncStatus})}),e.error)}}var uO=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Gae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Xs=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Nh,ca;class Rrt extends bo{constructor(e,r=new ws){super(),Nh.set(this,void 0),ca.set(this,void 0),Gae(this,Nh,e,"f"),Gae(this,ca,r.getLogger("GraphQLDataSharingManager"),"f")}getDataSharingGrants(){return uO(this,void 0,void 0,function*(){var e;Xs(this,ca,"f").verbose("calling getDataSharingGrants query...");const r=yield this.handleQuery(Xs(this,Nh,"f").GetDataSharingGrants());return Xs(this,ca,"f").verbose("getDataSharingGrants query complete."),r.hasError()&&Xs(this,ca,"f").error("getDataSharingGrants query error",r.error),new Yt((e=r.data)===null||e===void 0?void 0:e.dataSharingGrants,r.error)})}getDataSharingAccess(){return uO(this,void 0,void 0,function*(){var e;Xs(this,ca,"f").verbose("calling getDataSharingAccess query...");const r=yield this.handleQuery(Xs(this,Nh,"f").GetDataSharingAccess());return Xs(this,ca,"f").verbose("getDataSharingAccess query complete."),r.hasError()&&Xs(this,ca,"f").error("getDataSharingAccess query error",r.error),new Yt((e=r.data)===null||e===void 0?void 0:e.dataSharingAccess,r.error)})}acceptDataSharingInvitation(e){return uO(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Xs(this,ca,"f").verbose("calling acceptDataSharingInvitation mutation...");const n=yield this.handleTransaction(Xs(this,Nh,"f").AcceptDataSharingInvitation(Object.assign({},e.data())));return Xs(this,ca,"f").verbose("acceptDataSharingInvitation mutation complete."),n.failure()?(Xs(this,ca,"f").error("acceptDataSharingInvitation mutation failed",n),n.intoFailure()):(Xs(this,ca,"f").info("successfully called acceptDataSharingInvitation mutation"),tr.success(n.data().acceptDataSharingInvitation))})}requestDataSharingToken(e){return uO(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Xs(this,ca,"f").verbose("calling requestDataSharingToken mutation...");const n=yield this.handleTransaction(Xs(this,Nh,"f").RequestDataSharingToken({input:e.data()}));return Xs(this,ca,"f").verbose("requestDataSharingToken mutation complete."),n.failure()?(Xs(this,ca,"f").error("requestDataSharingToken mutation failed",n),n.intoFailure()):(Xs(this,ca,"f").info("successfully called requestDataSharingToken mutation"),tr.success(n.data().requestDataSharingToken))})}}Nh=new WeakMap,ca=new WeakMap;class Ort{create(e){return{deviceToken:e.data().deviceToken,platformName:"",applicationName:"",notificationPreference:!1}}}class Prt{create(e){return Object.assign(Object.assign({},e.data()),{notificationPreference:!0})}}var z_=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Vae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Dn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Sl,si,mF,gF;class Irt extends bo{constructor(e,r=new ws){super(),Sl.set(this,void 0),si.set(this,void 0),mF.set(this,new Ort),gF.set(this,new Prt),Vae(this,Sl,e,"f"),Vae(this,si,r.getLogger("GraphQLDeviceManager"),"f")}registerDevice(e){return z_(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=Dn(this,gF,"f").create(e);Dn(this,si,"f").verbose("calling updateDeviceRegistration to register device...");const i=yield this.handleTransaction(Dn(this,Sl,"f").updateDeviceRegistration(n));return Dn(this,si,"f").verbose("updateDeviceRegistration complete for registration."),i.failure()?(Dn(this,si,"f").error("updateDeviceRegistration failed",i),i.intoFailure()):(Dn(this,si,"f").info("successfully called updateDeviceRegistration for registration."),tr.success(i.data().updateDeviceRegistration))})}deregisterDevice(e){return z_(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Dn(this,si,"f").verbose("calling updateDeviceRegistration to deregister device...");const n=Dn(this,mF,"f").create(e),i=yield this.handleTransaction(Dn(this,Sl,"f").updateDeviceRegistration(n));return Dn(this,si,"f").verbose("updateDeviceRegistration complete for deregistration."),i.failure()?(Dn(this,si,"f").error("updateDeviceRegistration failed",i),i.intoFailure()):(Dn(this,si,"f").info("successfully called updateDeviceRegistration for deregistration."),tr.success(i.data().updateDeviceRegistration))})}getDeviceProviders(){return z_(this,void 0,void 0,function*(){var e;Dn(this,si,"f").verbose("calling getDeviceProviders...");const r=yield this.handleQuery(Dn(this,Sl,"f").getDeviceProviders());return Dn(this,si,"f").verbose("getDeviceProviders complete"),r.hasError()?Dn(this,si,"f").error("getDeviceProviders failed",r.error):Dn(this,si,"f").info("successfully called getDeviceProviders"),new Yt((e=r.data)===null||e===void 0?void 0:e.getDeviceProviders,r.error)})}getDeviceUserStatus(e){return z_(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();Dn(this,si,"f").verbose("calling getDeviceUserStatus...");const i=yield this.handleQuery(Dn(this,Sl,"f").getDeviceUserStatus({connectionId:e.data().connectionId}));return Dn(this,si,"f").verbose("getDeviceUserStatus complete"),i.hasError()?Dn(this,si,"f").error("getDeviceUserStatus failed",i.error):Dn(this,si,"f").info("successfully called getDeviceUserStatus"),new Yt((r=i.data)===null||r===void 0?void 0:r.getDeviceUserStatus,i.error)})}getDeviceProviderStatus(e){return z_(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();Dn(this,si,"f").verbose("calling getDeviceProviderStatus...");const i=yield this.handleQuery(Dn(this,Sl,"f").getDeviceProviderStatus({connectionId:e.data().connectionId}));return Dn(this,si,"f").verbose("getDeviceProviderStatus complete"),i.hasError()?Dn(this,si,"f").error("getDeviceProviderStatus failed",i.error):Dn(this,si,"f").info("successfully called getDeviceProviderStatus"),new Yt((r=i.data)===null||r===void 0?void 0:r.getDeviceProviderStatus,i.error)})}setupMobileSync(e){return z_(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Dn(this,si,"f").verbose("calling setupMobileSync...");const n=yield this.handleTransaction(Dn(this,Sl,"f").setupMobileSync({connectionId:e.data().connectionId}));return Dn(this,si,"f").verbose("setupMobileSync complete"),n.failure()?(Dn(this,si,"f").error("setupMobileSync failed",n),n.intoFailure()):(Dn(this,si,"f").info("successfully called setupMobileSync"),tr.success(n.data().setupMobileSync))})}}Sl=new WeakMap,si=new WeakMap,mF=new WeakMap,gF=new WeakMap;class Mrt{create(e){const r=JSON.parse(e.data().serializedNotification);return{notificationId:r.notification_id,messageId:r.itbl.messageId,eventType:f1.MobilePushOpen}}}var wrt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},vF=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Dh=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},cO,Bd,lO;class Nrt extends bo{constructor(e,r=new ws,n=new Mrt){super(),cO.set(this,void 0),Bd.set(this,void 0),lO.set(this,void 0),vF(this,cO,e,"f"),vF(this,Bd,r.getLogger("GraphQLEventManager"),"f"),vF(this,lO,n,"f")}handleNotification(e){return wrt(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Dh(this,Bd,"f").debug("Calling publishEvent");let n;try{n=Dh(this,lO,"f").create(e)}catch(s){return Dh(this,Bd,"f").error("Error creating publishEvent request",s),tr.failure(new s1("Error creating publishEvent request"))}const i=yield this.handleTransaction(Dh(this,cO,"f").publishEvent(n));return Dh(this,Bd,"f").debug("publishEvent completed"),i.failure()?(Dh(this,Bd,"f").error("publishEvent mutation error",i),i.intoFailure()):(Dh(this,Bd,"f").info("publishEvent mutation success"),tr.success(i.data().publishEvent))})}}cO=new WeakMap,Bd=new WeakMap,lO=new WeakMap;class Drt{create(e){var r,n,i,s;const a=e.data(),o=(n=(r=a.sortBy)===null||r===void 0?void 0:r.map(u=>u.order===xR.Desc?`-${u.field}`:u.field))!==null&&n!==void 0?n:null;return{request:{coverage:a.coverage,claimType:(i=a.claimType)!==null&&i!==void 0?i:null,claimStatus:(s=a.claimStatus)!==null&&s!==void 0?s:null,dateProcessed:a.dateProcessed,dateReceived:a.dateReceived,servicePeriod:a.servicePeriod,page:a.page,pageSize:a.pageSize,sort:o,memberFilter:a.memberFilter}}}}class Lrt{create(e){var r,n,i,s,a,o,u,c;const l=e?.data();return{id:(r=l?.id)!==null&&r!==void 0?r:null,lastUpdated:(n=l?.lastUpdated)!==null&&n!==void 0?n:null,sort:(i=l?.sort)!==null&&i!==void 0?i:null,page:(s=l?.page)!==null&&s!==void 0?s:null,pageSize:(a=l?.pageSize)!==null&&a!==void 0?a:null,patient:(o=l?.patient)!==null&&o!==void 0?o:null,beneficiary:(u=l?.beneficiary)!==null&&u!==void 0?u:null,total:(c=l?.total)!==null&&c!==void 0?c:UR.Accurate}}}class $rt{create(e){var r,n,i,s,a,o,u,c,l,d;const f=e?.data();return{page:(r=f?.page)!==null&&r!==void 0?r:null,pageSize:(n=f?.pageSize)!==null&&n!==void 0?n:null,id:(i=f?.id)!==null&&i!==void 0?i:null,lastUpdated:(s=f?.lastUpdated)!==null&&s!==void 0?s:null,patient:(a=f?.patient)!==null&&a!==void 0?a:null,provider:(o=f?.provider)!==null&&o!==void 0?o:null,coverage:(u=f?.coverage)!==null&&u!==void 0?u:null,status:(c=f?.status)!==null&&c!==void 0?c:null,created:(l=f?.created)!==null&&l!==void 0?l:null,sort:(d=f?.sort)!==null&&d!==void 0?d:null,total:UR.Accurate}}}var GS=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Bae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},qi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Js,jd,SF,yF,EF;class xrt extends bo{constructor(e,r=new ws){super(),Js.set(this,void 0),jd.set(this,void 0),SF.set(this,new Lrt),yF.set(this,new $rt),EF.set(this,new Drt),Bae(this,jd,e,"f"),Bae(this,Js,r.getLogger("GraphQLFinancialManager"),"f")}getCoverages(e){return GS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();qi(this,Js,"f").verbose("calling getCoverages...");const i=yield this.handleQuery(qi(this,jd,"f").getCoverages(qi(this,SF,"f").create(e)));return qi(this,Js,"f").verbose("getCoverages complete"),i.hasError()&&qi(this,Js,"f").error("getCoverages errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.coverages,i.error)})}getCoverageSummary(e){return GS(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();qi(this,Js,"f").verbose("calling getCoverageSummary...");const s=yield this.handleQuery(qi(this,jd,"f").getCoverageSummary({request:(r=e?.data())!==null&&r!==void 0?r:null}));return qi(this,Js,"f").verbose("getCoverageSummary complete"),s.hasError()&&qi(this,Js,"f").error("getCoverageSummary errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getCoverageSummary,s.error)})}getEOBDocument(e){return GS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();qi(this,Js,"f").verbose("calling getEOBDocument...");const i=yield this.handleQuery(qi(this,jd,"f").getEOBDocument({claimId:e.data().claimId}));return qi(this,Js,"f").verbose("getEOBDocument complete"),i.hasError()&&qi(this,Js,"f").error("getEOBDocument errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getEOBDocument,i.error)})}getExplanationOfBenefits(e){return GS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();qi(this,Js,"f").verbose("calling getExplanationOfBenefits...");const i=yield this.handleQuery(qi(this,jd,"f").getExplanationOfBenefits(qi(this,yF,"f").create(e)));return qi(this,Js,"f").verbose("getExplanationOfBenefits complete"),i.hasError()&&qi(this,Js,"f").error("getExplanationOfBenefits errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.explanationOfBenefits,i.error)})}getClaimSummary(e){return GS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();qi(this,Js,"f").verbose("calling getClaimSummary...");const i=yield this.handleQuery(qi(this,jd,"f").getClaimSummary(qi(this,EF,"f").create(e)));return qi(this,Js,"f").verbose("getClaimSummary complete"),i.hasError()&&qi(this,Js,"f").error("getClaimSummary errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getClaimSummary,i.error)})}}Js=new WeakMap,jd=new WeakMap,SF=new WeakMap,yF=new WeakMap,EF=new WeakMap;function dO(t,e){const r=(t.role||[]).map(i=>({text:i})),n={id:t.id,member:{reference:`${t.type}/${t.id}`},role:r};return e!==void 0&&(n.period=e),n}class Urt{create(e){const r=e.data();return{participant:dO(r,{start:u1(),end:null})}}}class Frt{create(e){const r=e.data(),n=u1();return{participant:r.members.map(s=>dO(s,{start:n,end:null}))}}}class krt{create(e){var r,n,i,s,a,o,u,c,l;const d=e.data();return{source:(r=d._source)!==null&&r!==void 0?r:null,id:(n=d._id)!==null&&n!==void 0?n:null,count:(i=d._count)!==null&&i!==void 0?i:25,getPagesOffset:(s=d._getpagesoffset)!==null&&s!==void 0?s:0,total:(a=d._total)!==null&&a!==void 0?a:null,date:(o=d.date)!==null&&o!==void 0?o:null,sort:(u=d._sort)!==null&&u!==void 0?u:null,supportingInformation:(c=d.supporting_info)!==null&&c!==void 0?c:null,status:(l=d.status)!==null&&l!==void 0?l:null}}}class Grt{create(e){const r=e.data();return{appointment:{id:r.id,status:c1.Cancelled,cancelationReason:r.cancelationReason}}}}class Vrt{create(e){var r,n;const i=e.data();return{pageNumber:(r=i.page)!==null&&r!==void 0?r:0,pageSize:(n=i.pageSize)!==null&&n!==void 0?n:20}}}class Brt{create(e){const r=e.data();return{participant:dO(r,{end:u1()})}}}class jrt{create(e){const r=e.data();return{appointment:{id:r.id,notificationPreferences:r.notificationPreferences.map(n=>({method:n.method,enabled:n.enabled,data:n.data}))}}}}class zrt{create(e){const r=e.data();return{participant:dO(r)}}}var Cc=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},jae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Xr,Co,AF,TF,bF,CF,RF,OF,PF,IF;class Hrt extends bo{constructor(e,r=new ws){super(),Xr.set(this,void 0),Co.set(this,void 0),AF.set(this,new krt),TF.set(this,new Grt),bF.set(this,new jrt),CF.set(this,new Brt),RF.set(this,new Urt),OF.set(this,new Frt),PF.set(this,new zrt),IF.set(this,new Vrt),jae(this,Co,e,"f"),jae(this,Xr,r.getLogger("GraphQLHealthSpaceManager"),"f")}getAppointments(e){return Cc(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();pr(this,Xr,"f").verbose("calling appointments query...");const i=yield this.handleQuery(pr(this,Co,"f").appointments(pr(this,AF,"f").create(e)));return pr(this,Xr,"f").verbose("appointments query complete"),i.hasError()?pr(this,Xr,"f").error("appointments query error",i.error):pr(this,Xr,"f").info("successfully called appointments query"),new Yt((r=i.data)===null||r===void 0?void 0:r.appointments,i.error)})}cancelAppointment(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling cancel appointment mutation...");const n=yield this.handleTransaction(pr(this,Co,"f").cancelAppointment(pr(this,TF,"f").create(e)));return pr(this,Xr,"f").verbose("cancel appointment mutation complete"),n.failure()?(pr(this,Xr,"f").error("cancel appointment mutation error",n),n.intoFailure()):(pr(this,Xr,"f").info("successfully called cancel appointment mutation"),tr.success(n.data().updateAppointment))})}updateAppointmentNotificationPreferences(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling update appointment notification preference mutation...");const n=yield this.handleTransaction(pr(this,Co,"f").updateAppointmentNotificationPreferences(pr(this,bF,"f").create(e)));return pr(this,Xr,"f").verbose("update appointment notification preference mutation complete"),n.failure()?(pr(this,Xr,"f").error("update appointment notification preference mutation error",n),n.intoFailure()):(pr(this,Xr,"f").info("successfully called update appointment notification preference mutation"),tr.success(n.data().updateAppointment))})}getCancelationReasons(e){return Cc(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();pr(this,Xr,"f").verbose("calling cancelationReasons query...");const i=yield this.handleQuery(pr(this,Co,"f").cancelationReasons(e.data()));return pr(this,Xr,"f").verbose("cancelationReasons query complete"),i.hasError()?pr(this,Xr,"f").error("cancelationReasons query error",i.error):pr(this,Xr,"f").info("successfully called cancelationReasons query"),new Yt((r=i.data)===null||r===void 0?void 0:r.cancelationReasons,i.error)})}removeCareTeamMember(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling removeCareTeamMember mutation...");const n=yield this.handleTransaction(pr(this,Co,"f").removeCareTeamMember(pr(this,CF,"f").create(e)));return pr(this,Xr,"f").verbose("removeCareTeamMember mutation completed"),n.failure()?(pr(this,Xr,"f").error("removeCareTeamMember mutation error",n),n.intoFailure()):(pr(this,Xr,"f").info("successfully called removeCareTeamMember mutation"),tr.success(n.data()))})}addCareTeamMember(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling addCareTeamMember mutation...");const n=yield this.handleTransaction(pr(this,Co,"f").addCareTeamMember(pr(this,RF,"f").create(e)));return pr(this,Xr,"f").verbose("addCareTeamMember mutation completed"),n.failure()?(pr(this,Xr,"f").error("addCareTeamMember mutation error",n),n.intoFailure()):(pr(this,Xr,"f").info("successfully called addCareTeamMember mutation"),tr.success(n.data()))})}addCareTeamMembers(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling addCareTeamMembers mutation...");const n=pr(this,OF,"f").create(e),i=yield this.handleTransaction(pr(this,Co,"f").addCareTeamMembers(n));return pr(this,Xr,"f").verbose("addCareTeamMembers mutation completed"),i.failure()?(pr(this,Xr,"f").error("addCareTeamMembers mutation error",i),i.intoFailure()):(pr(this,Xr,"f").info("successfully called addCareTeamMembers mutation"),tr.success(i.data()))})}updateCareTeamMember(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling updateCareTeamMember mutation...");const n=pr(this,PF,"f").create(e),i=yield this.handleTransaction(pr(this,Co,"f").updateCareTeamMember(n));return pr(this,Xr,"f").verbose("updateCareTeamMember mutation completed"),i.failure()?i.intoFailure():tr.success(i.data())})}getCareTeamMembers(e){return Cc(this,void 0,void 0,function*(){var r;const n=e??new PXe({page:0}),i=this.validateRequest(n);if(i.failure())return i.toQueryResult();pr(this,Xr,"f").verbose("calling getCareTeamMembers query...");const s=pr(this,IF,"f").create(n),a=yield this.handleQuery(pr(this,Co,"f").CareTeamMembers(s));return pr(this,Xr,"f").verbose("getCareTeamMembers query complete"),a.hasError()?pr(this,Xr,"f").error("getCareTeamMembers query error",a.error):pr(this,Xr,"f").info("successfully called getCareTeamMembers query"),new Yt((r=a.data)===null||r===void 0?void 0:r.careTeamMembers,a.error)})}getMemberPlanIdentifiers(){return Cc(this,void 0,void 0,function*(){var e;pr(this,Xr,"f").verbose("calling getMemberPlanIdentifiers query...");const r=yield this.handleQuery(pr(this,Co,"f").getMemberPlanIdentifiers());return pr(this,Xr,"f").verbose("getMemberPlanIdentifiers query complete"),r.hasError()?pr(this,Xr,"f").error("getMemberPlanIdentifiers query error",r.error):pr(this,Xr,"f").info("successfully called getMemberPlanIdentifiers query"),new Yt((e=r.data)===null||e===void 0?void 0:e.memberPlanIdentifiers,r.error)})}}Xr=new WeakMap,Co=new WeakMap,AF=new WeakMap,TF=new WeakMap,bF=new WeakMap,CF=new WeakMap,RF=new WeakMap,OF=new WeakMap,PF=new WeakMap,IF=new WeakMap;class qrt{create(e){var r;const{id:n,page:i,pageSize:s,sort:a}=(r=e?.data())!==null&&r!==void 0?r:{};return{id:n?{values:n}:null,pageSize:s??null,page:i??null,sort:a??null}}}class Yrt{create(e){var r;const n=(r=e.data)===null||r===void 0?void 0:r.getMedicationDispense;if(!n)return new Yt(void 0,e.error);const i=Object.assign(Object.assign({},n),n?.resources&&{resources:n?.resources.map(s=>{var a,o,u,c,l,d,f;return Object.assign(Object.assign({},s),s.medication&&{medication:Object.assign(Object.assign({},s.medication),((a=s.medication)===null||a===void 0?void 0:a.resource)&&{resource:Object.assign(Object.assign({},(o=s.medication)===null||o===void 0?void 0:o.resource),((c=(u=s.medication)===null||u===void 0?void 0:u.resource)===null||c===void 0?void 0:c.ingredient)&&{ingredient:(f=(d=(l=s.medication)===null||l===void 0?void 0:l.resource)===null||d===void 0?void 0:d.ingredient)===null||f===void 0?void 0:f.map(_=>{var m,E;return Object.assign(Object.assign({},_),((m=_?.itemReference)===null||m===void 0?void 0:m.itemReferenceResource)&&{itemReference:{resource:(E=_?.itemReference)===null||E===void 0?void 0:E.itemReferenceResource}})})})})})})});return new Yt(i,e.error)}}class Qrt{create(e){var r;const n=(r=e.data)===null||r===void 0?void 0:r.getMedicationRequest;if(!n)return new Yt(void 0,e.error);const i=Object.assign(Object.assign({},n),n?.resources&&{resources:n?.resources.map(s=>{var a,o,u,c,l,d,f;return Object.assign(Object.assign({},s),s.medication&&{medication:Object.assign(Object.assign({},s.medication),((a=s.medication)===null||a===void 0?void 0:a.resource)&&{resource:Object.assign(Object.assign({},(o=s.medication)===null||o===void 0?void 0:o.resource),((c=(u=s.medication)===null||u===void 0?void 0:u.resource)===null||c===void 0?void 0:c.ingredient)&&{ingredient:(f=(d=(l=s.medication)===null||l===void 0?void 0:l.resource)===null||d===void 0?void 0:d.ingredient)===null||f===void 0?void 0:f.map(_=>{var m,E;return Object.assign(Object.assign({},_),((m=_?.itemReference)===null||m===void 0?void 0:m.itemReferenceResource)&&{itemReference:{resource:(E=_?.itemReference)===null||E===void 0?void 0:E.itemReferenceResource}})})})})})})});return new Yt(i,e.error)}}class Wrt{create(e){const r=e.data();return{input:{id:r.id,status:r.status}}}}class Krt{create(e){const r=e.data(),n=bie(r.file);if(n===null)throw new IR(["File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"]);const i=n.contentType;return{input:{data:n.data,contentType:i,title:r.title,typeCoding:r.typeCoding!==void 0?{system:r.typeCoding.system,code:r.typeCoding.code,display:r.typeCoding.display}:void 0}}}}class Zrt{create(e){var r,n,i,s,a;if(e.id===null||e.id===void 0)throw new IR(["uploadDocument response is missing required field: id"]);if(e.resourceType===null||e.resourceType===void 0)throw new IR(["uploadDocument response is missing required field: resourceType"]);return{id:e.id,resourceType:e.resourceType,status:(r=e.status)!==null&&r!==void 0?r:void 0,category:(n=e.category)===null||n===void 0?void 0:n.map(o=>{var u,c;return{coding:(u=o?.coding)===null||u===void 0?void 0:u.map(l=>{var d;return{system:l?.system,code:l?.code,display:(d=l?.display)!==null&&d!==void 0?d:void 0}}),text:(c=o?.text)!==null&&c!==void 0?c:void 0}}),subject:e.subject?{reference:(i=e.subject.reference)!==null&&i!==void 0?i:void 0,display:(s=e.subject.display)!==null&&s!==void 0?s:void 0}:void 0,content:(a=e.content)===null||a===void 0?void 0:a.map(o=>{var u,c;return{attachment:o?.attachment?{contentType:(u=o.attachment.contentType)!==null&&u!==void 0?u:void 0,title:(c=o.attachment.title)!==null&&c!==void 0?c:void 0}:void 0}})}}}var Sn=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},zd=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},st=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},on,Tt,fO,hO,pO,_O,mO,gO;class Xrt extends bo{constructor(e,r=new ws,n=new Qrt,i=new Yrt,s=new qrt,a=new Wrt,o=new Krt,u=new Zrt){super(),on.set(this,void 0),Tt.set(this,void 0),fO.set(this,void 0),hO.set(this,void 0),pO.set(this,void 0),_O.set(this,void 0),mO.set(this,void 0),gO.set(this,void 0),zd(this,on,e,"f"),zd(this,Tt,r.getLogger("GraphQLHealthManager"),"f"),zd(this,fO,n,"f"),zd(this,hO,i,"f"),zd(this,pO,s,"f"),zd(this,_O,a,"f"),zd(this,mO,o,"f"),zd(this,gO,u,"f")}getHealthSummary(){return Sn(this,void 0,void 0,function*(){var e;st(this,Tt,"f").verbose("calling getHealthSummary...");const r=yield this.handleQuery(st(this,on,"f").GetHealthSummary());return st(this,Tt,"f").verbose("getHealthSummary complete"),r.hasError()?st(this,Tt,"f").error("getHealthSummary failed",r.error):st(this,Tt,"f").info("successfully called getHealthSummary"),new Yt((e=r.data)===null||e===void 0?void 0:e.getHealthSummary,r.error)})}getAllergyIntolerances(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getAllergyIntolerances...");const s=yield this.handleQuery(st(this,on,"f").getAllergyIntolerances({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getAllergyIntolerances complete"),s.hasError()&&st(this,Tt,"f").error("getAllergyIntolerances errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getAllergyIntolerances,s.error)})}getAllergyIntoleranceGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getAllergyIntoleranceGroups...");const s=yield this.handleQuery(st(this,on,"f").getAllergyIntoleranceGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getAllergyIntoleranceGroups complete"),s.hasError()&&st(this,Tt,"f").error("getAllergyIntoleranceGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getAllergyIntoleranceGroups,s.error)})}getConditions(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getConditions...");const s=yield this.handleQuery(st(this,on,"f").getConditions({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getConditions complete"),s.hasError()&&st(this,Tt,"f").error("getConditions errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getConditions,s.error)})}getConditionGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getConditionGroups...");const s=yield this.handleQuery(st(this,on,"f").getConditionGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getConditionGroups complete"),s.hasError()&&st(this,Tt,"f").error("getConditionGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getConditionGroups,s.error)})}getDiagnosticReports(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getDiagnosticReports...");const i=yield this.handleQuery(st(this,on,"f").getDiagnosticReports(st(this,pO,"f").create(e)));return st(this,Tt,"f").verbose("getDiagnosticReports complete"),i.hasError()&&st(this,Tt,"f").error("getDiagnosticReports errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.diagnosticReports,i.error)})}getDocumentReferences(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getDocumentReferences...");const s=yield this.handleQuery(st(this,on,"f").getDocumentReferences({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getDocumentReferences complete"),s.hasError()&&st(this,Tt,"f").error("getDocumentReferences errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getDocumentReferences,s.error)})}getDocumentReferencesList(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getDocumentReferencesList...");const s=yield this.handleQuery(st(this,on,"f").getDocumentReferencesList({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getDocumentReferencesList complete"),s.hasError()&&st(this,Tt,"f").error("getDocumentReferencesList errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getDocumentReferences,s.error)})}getBinary(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getBinary...");const i=yield this.handleQuery(st(this,on,"f").getBinary({request:e.data()}));return st(this,Tt,"f").verbose("getBinary complete"),i.hasError()&&st(this,Tt,"f").error("getBinary errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getBinary,i.error)})}getLabs(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getLabs...");const s=yield this.handleQuery(st(this,on,"f").getLabs({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getLabs complete"),s.hasError()&&st(this,Tt,"f").error("getLabs errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getLabs,s.error)})}getLabGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getLabGroups...");const s=yield this.handleQuery(st(this,on,"f").getLabGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getLabGroups complete"),s.hasError()&&st(this,Tt,"f").error("getLabGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getLabGroups,s.error)})}getCarePlans(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getCarePlans...");const s=yield this.handleQuery(st(this,on,"f").getCarePlans({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getCarePlans complete"),s.hasError()&&st(this,Tt,"f").error("getCarePlans errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getCarePlans,s.error)})}getCarePlanGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getCarePlanGroups...");const s=yield this.handleQuery(st(this,on,"f").getCarePlanGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getCarePlanGroups complete"),s.hasError()&&st(this,Tt,"f").error("getCarePlanGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getCarePlanGroups,s.error)})}getCareTeams(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getCareTeams");const s=yield this.handleQuery(st(this,on,"f").getCareTeams({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getCareTeams complete"),s.hasError()&&st(this,Tt,"f").error("getCareTeams errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getCareTeams,s.error)})}getEncounters(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getEncounters...");const s=yield this.handleQuery(st(this,on,"f").getEncounterQuery({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getEncounters complete"),s.hasError()&&st(this,Tt,"f").error("getEncounters errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getEncounters,s.error)})}getEncounterGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getEncounterGroups...");const s=yield this.handleQuery(st(this,on,"f").getEncountersGroup({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getEncounterGroups complete"),s.hasError()&&st(this,Tt,"f").error("getEncounterGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getEncounterGroups,s.error)})}getImmunizations(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getImmunizations...");const s=yield this.handleQuery(st(this,on,"f").getImmunizations({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getImmunizations complete"),s.hasError()&&st(this,Tt,"f").error("getImmunizations errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getImmunizations,s.error)})}getImmunizationGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getImmunizationGroups...");const s=yield this.handleQuery(st(this,on,"f").getImmunizationGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getImmunizationGroups complete"),s.hasError()&&st(this,Tt,"f").error("getImmunizationGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getImmunizationGroups,s.error)})}getProcedures(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getProcedures...");const s=yield this.handleQuery(st(this,on,"f").GetProcedures({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getProcedures complete"),s.hasError()&&st(this,Tt,"f").error("getProcedures errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getProcedures,s.error)})}getProcedureGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getProcedureGroups...");const s=yield this.handleQuery(st(this,on,"f").getProcedureGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getProcedureGroups complete"),s.hasError()&&st(this,Tt,"f").error("getProcedureGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getProcedureGroups,s.error)})}getVitalSigns(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getVitalSigns...");const i=e?.data(),s=yield this.handleQuery(st(this,on,"f").getObservations({request:Object.assign(Object.assign({},i),{category:g1.VitalSigns})}));return st(this,Tt,"f").verbose("getVitalSigns complete"),s.hasError()&&st(this,Tt,"f").error("getVitalSigns errors",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getObservations,s.error)})}getVitalSignGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getVitalSignGroups...");const s=yield this.handleQuery(st(this,on,"f").getVitalSignGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getVitalSignGroups complete"),s.hasError()&&st(this,Tt,"f").error("getVitalSignGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getVitalSignGroups,s.error)})}getDeviceMetrics(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getDeviceMetrics...");const i=e?.data(),s=yield this.handleQuery(st(this,on,"f").getDeviceMetrics({request:Object.assign({},i)}));return st(this,Tt,"f").verbose("getDeviceMetrics complete"),s.hasError()&&st(this,Tt,"f").error("getDeviceMetrics errors",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getDeviceMetrics,s.error)})}getDeviceMetricsGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getDeviceMetricsGroups...");const s=yield this.handleQuery(st(this,on,"f").getDeviceMetricsGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getDeviceMetricsGroups complete"),s.hasError()&&st(this,Tt,"f").error("getDeviceMetricsGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getDeviceMetricsGroups,s.error)})}getMedicationDispense(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationDispense...");const i=yield this.handleQuery(st(this,on,"f").getMedicationDispense({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getMedicationDispense complete"),i.hasError()&&st(this,Tt,"f").error("getMedicationDispense errors",i.error),st(this,hO,"f").create(i)})}getMedicationRequest(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationRequest...");const i=yield this.handleQuery(st(this,on,"f").getMedicationRequest({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getMedicationRequest complete"),i.hasError()&&st(this,Tt,"f").error("getMedicationRequest errors",i.error),st(this,fO,"f").create(i)})}getMedicationStatements(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationStatements...");const s=yield this.handleQuery(st(this,on,"f").getMedicationStatements({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getMedicationStatements complete"),s.hasError()&&st(this,Tt,"f").error("getMedicationStatements errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getMedicationStatements,s.error)})}updateMedicationStatement(e){return Sn(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();st(this,Tt,"f").verbose("calling updateMedicationStatement...");const n=yield this.handleTransaction(st(this,on,"f").updateMedicationStatement(st(this,_O,"f").create(e)));return st(this,Tt,"f").verbose("updateMedicationStatement complete"),n.failure()?(st(this,Tt,"f").error("updateMedicationStatement failed",n.error()),n.intoFailure()):tr.success(n.data().updateMedicationStatement)})}uploadDocument(e){return Sn(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();st(this,Tt,"f").verbose("calling uploadDocument mutation...");const n=yield this.handleTransaction(st(this,on,"f").UploadDocument(st(this,mO,"f").create(e)));return st(this,Tt,"f").verbose("uploadDocument mutation complete"),n.failure()?(st(this,Tt,"f").error("uploadDocument mutation failed",n.error()),n.intoFailure()):tr.success(st(this,gO,"f").create(n.data().uploadDocument))})}getMedicationGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationGroups...");const s=yield this.handleQuery(st(this,on,"f").getMedicationGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getMedicationGroups complete"),s.hasError()&&st(this,Tt,"f").error("getMedicationGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getMedicationGroups,s.error)})}getMedicationKnowledge(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationKnowledge...");const i=yield this.handleQuery(st(this,on,"f").getMedicationKnowledge({request:e.data()}));return st(this,Tt,"f").verbose("getMedicationKnowledge complete"),i.hasError()&&st(this,Tt,"f").error("getMedicationKnowledge errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getMedicationKnowledge,i.error)})}getLabKnowledge(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getLabKnowledge...");const i=yield this.handleQuery(st(this,on,"f").getLabKnowledge({request:e.data()}));return st(this,Tt,"f").verbose("getLabKnowledge complete"),i.hasError()&&st(this,Tt,"f").error("getLabKnowledge errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getLabKnowledge,i.error)})}getMedicationPricing(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationPricing...");const i=yield this.handleQuery(st(this,on,"f").getMedicationPricing({request:e.data()}));return st(this,Tt,"f").verbose("getMedicationPricing complete"),i.hasError()&&st(this,Tt,"f").error("getMedicationPricing errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getMedicationPricing,i.error)})}getDiagnosticReportLabGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getDiagnosticReportLabGroups...");const s=yield this.handleQuery(st(this,on,"f").getDiagnosticReportLabGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getDiagnosticReportLabGroups complete"),s.hasError()&&st(this,Tt,"f").error("getDiagnosticReportLabGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getDiagnosticReportLabGroups,s.error)})}getHealthScore(){return Sn(this,void 0,void 0,function*(){var e;st(this,Tt,"f").verbose("calling getHealthScore...");const r=yield this.handleQuery(st(this,on,"f").getHealthScore());return st(this,Tt,"f").verbose("getHealthScore complete"),r.hasError()&&st(this,Tt,"f").error("getHealthScore errors",r.error),new Yt((e=r.data)===null||e===void 0?void 0:e.getHealthScore.resource,r.error)})}getBodySystemScore(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getBodySystemScore...");const i=yield this.handleQuery(st(this,on,"f").getBodySystemScore({request:e.data()}));return st(this,Tt,"f").verbose("getBodySystemScore complete"),i.hasError()&&st(this,Tt,"f").error("getBodySystemScore errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getBodySystemScore.resource,i.error)})}}on=new WeakMap,Tt=new WeakMap,fO=new WeakMap,hO=new WeakMap,pO=new WeakMap,_O=new WeakMap,mO=new WeakMap,gO=new WeakMap;class zae{create(e){var r,n,i,s,a,o,u,c,l;const d=e.data();return{id:(r=d.id)!==null&&r!==void 0?r:null,lastUpdated:(n=d.lastUpdated)!==null&&n!==void 0?n:null,sort:(i=d.sort)!==null&&i!==void 0?i:null,pageSize:(s=d.pageSize)!==null&&s!==void 0?s:20,page:d.page,questionnaire:(a=d.questionnaire)!==null&&a!==void 0?a:null,status:(o=d.status)!==null&&o!==void 0?o:null,patient:(u=d.patient)!==null&&u!==void 0?u:null,tag:(c=d.tag)!==null&&c!==void 0?c:null,total:(l=d.total)!==null&&l!==void 0?l:null}}}class Jrt{create(e){var r,n,i,s,a,o,u;const c=e.data();return{page:c.page,pageSize:c.pageSize,id:(r=c.id)!==null&&r!==void 0?r:null,name:(n=c.name)!==null&&n!==void 0?n:null,sort:(i=c.sort)!==null&&i!==void 0?i:null,context:(s=c.context)!==null&&s!==void 0?s:null,identifier:(a=c.identifier)!==null&&a!==void 0?a:null,security:(o=c.security)!==null&&o!==void 0?o:null,tag:(u=c.tag)!==null&&u!==void 0?u:null}}}var VS=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Hae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},bi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ns,Hd,MF,wF,NF;class ent extends bo{constructor(e,r=new ws){super(),Ns.set(this,void 0),Hd.set(this,void 0),MF.set(this,new zae),wF.set(this,new zae),NF.set(this,new Jrt),Hae(this,Hd,e,"f"),Hae(this,Ns,r.getLogger("GraphQLQuestionnaireManager"),"f")}nextQuestion(e){return VS(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r.intoFailure();bi(this,Ns,"f").verbose("calling nextQuestion mutation...");const n=yield this.handleTransaction(bi(this,Hd,"f").nextQuestion(e.data()));return bi(this,Ns,"f").verbose("nextQuestion mutation complete"),n.failure()?(bi(this,Ns,"f").error("nextQuestion mutation failed",n.error()),n.intoFailure()):(bi(this,Ns,"f").info("successfully called nextQuestion mutation"),tr.success(n.data().nextQuestion))})}saveQuestionnaireResponse(e){return VS(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r.intoFailure();bi(this,Ns,"f").verbose("calling saveQuestionnaireResponse mutation...");const n=yield this.handleTransaction(bi(this,Hd,"f").saveQuestionnaireResponse(e.data()));return bi(this,Ns,"f").verbose("saveQuestionnaireResponse mutation complete"),n.failure()?(bi(this,Ns,"f").error("saveQuestionnaireResponse mutation failed",n.error()),n.intoFailure()):(bi(this,Ns,"f").info("successfully called saveQuestionnaireResponse mutation"),tr.success(n.data().saveQuestionnaireResponse))})}getQuestionnaireResponses(e){return VS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();bi(this,Ns,"f").verbose("calling getQuestionnaireResponses...");const i=yield this.handleQuery(bi(this,Hd,"f").getQuestionnaireResponses(bi(this,MF,"f").create(e)));return bi(this,Ns,"f").verbose("getQuestionnaireResponses complete"),i.hasError()&&bi(this,Ns,"f").error("getQuestionnaireResponses errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.questionnaireResponses,i.error)})}getQuestionnaireResponseList(e){return VS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();bi(this,Ns,"f").verbose("calling getQuestionnaireResponseList...");const i=yield this.handleQuery(bi(this,Hd,"f").getQuestionnaireResponseList(bi(this,wF,"f").create(e)));return bi(this,Ns,"f").verbose("getQuestionnaireResponseList complete"),i.hasError()&&bi(this,Ns,"f").error("getQuestionnaireResponseList errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.questionnaireResponses,i.error)})}getQuestionnaires(e){return VS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();bi(this,Ns,"f").verbose("calling getQuestionnaires...");const i=yield this.handleQuery(bi(this,Hd,"f").getQuestionnaires(bi(this,NF,"f").create(e)));return bi(this,Ns,"f").verbose("getQuestionnaires complete"),i.hasError()&&bi(this,Ns,"f").error("getQuestionnaires errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.questionnaires,i.error)})}}Ns=new WeakMap,Hd=new WeakMap,MF=new WeakMap,wF=new WeakMap,NF=new WeakMap;class DF{create(e){var r,n,i,s,a,o,u,c,l;const d=e.data(),f=null,_=(r=d.searchTerm)!==null&&r!==void 0?r:null,m=(n=d.specialtyFilters)!==null&&n!==void 0?n:null,E=(i=d.includePopulatedPROAonly)!==null&&i!==void 0?i:!1,S=(s=d.organizationTypeFilters)!==null&&s!==void 0?s:null,C=(a=d.gender)!==null&&a!==void 0?a:null,w=(o=d.location)!==null&&o!==void 0?o:null;let x=null;On(d.sortBy)&&(x={field:(u=d.sortBy.field)!==null&&u!==void 0?u:null,order:(c=d.sortBy.order)!==null&&c!==void 0?c:null});const V=(l=d.filterFields)!==null&&l!==void 0?l:null,H=d.page,W=d.pageSize;return{client:f,searchTerm:_,specialtyFilters:m,includePopulatedPROAonly:E,organizationTypeFilters:S,gender:C,location:w,sortBy:x,filterFields:V,page:H,pageSize:W}}}var tnt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},LF;class rnt{constructor(){LF.set(this,new DF)}create(e){const r=tnt(this,LF,"f").create(e);return r.client={data_sets:[$R.Connecthub]},r}}LF=new WeakMap;var nnt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},$F;class int{constructor(){$F.set(this,new DF)}create(e){const r=nnt(this,$F,"f").create(e);return r.client={data_sets:[$R.Nppes]},r}}$F=new WeakMap;class snt{create(e){var r,n,i,s;const a=e.data();return{institution:(r=a.institution)!==null&&r!==void 0?r:null,provider:(n=a.provider)!==null&&n!==void 0?n:null,city:(i=a.city)!==null&&i!==void 0?i:null,state:(s=a.state)!==null&&s!==void 0?s:null}}}class ant{create(e){var r,n,i,s,a,o,u,c;const l=e.data();return{searchInput:{client:l.client,searchContext:l.searchContext,filters:(r=l.filters)!==null&&r!==void 0?r:null,orderBy:(n=l.orderBy)!==null&&n!==void 0?n:null,paging:{pageNumber:(i=l.page)!==null&&i!==void 0?i:null,pageSize:(s=l.pageSize)!==null&&s!==void 0?s:null},search:(a=l.search)!==null&&a!==void 0?a:null,searchLocation:(o=l.searchLocation)!==null&&o!==void 0?o:null,user:(u=l.user)!==null&&u!==void 0?u:null,filterValues:(c=l.filterValues)!==null&&c!==void 0?c:null}}}}var BS=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},qae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Vn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qd,Yi,xF,UF,FF,kF,GF;class ont extends bo{constructor(e,r=new ws){super(),qd.set(this,void 0),Yi.set(this,void 0),xF.set(this,new DF),UF.set(this,new int),FF.set(this,new rnt),kF.set(this,new snt),GF.set(this,new ant),qae(this,qd,e,"f"),qae(this,Yi,r.getLogger("GraphQLSearchManager"),"f")}searchHealthResources(e){return BS(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Vn(this,Yi,"f").verbose("calling searchHealthResources query");const i=yield this.handleQuery(Vn(this,qd,"f").SearchHealthResources(Vn(this,GF,"f").create(e)));return Vn(this,Yi,"f").verbose("searchHealthResources query complete"),i.hasError()?Vn(this,Yi,"f").error("searchHealthResources query failed",i.error):Vn(this,Yi,"f").info("successfully called searchHealthResources query"),new Yt((r=i.data)===null||r===void 0?void 0:r.searchHealthResources,i.error)})}search(e){return BS(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Vn(this,Yi,"f").verbose("calling providerSearch search query");const i=yield this.handleQuery(Vn(this,qd,"f").providerSearch(Vn(this,xF,"f").create(e)));return Vn(this,Yi,"f").verbose("providerSearch search query complete"),i.hasError()?Vn(this,Yi,"f").error("providerSearch search query failed",i.error):Vn(this,Yi,"f").info("successfully called providerSearch search query"),new Yt((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}searchProviders(e){return BS(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Vn(this,Yi,"f").verbose("calling providerSearch searchProviders query");const i=yield this.handleQuery(Vn(this,qd,"f").providerSearch(Vn(this,UF,"f").create(e)));return Vn(this,Yi,"f").verbose("providerSearch searchProviders query complete"),i.hasError()?Vn(this,Yi,"f").error("providerSearch searchProviders query failed",i.error):Vn(this,Yi,"f").info("successfully called providerSearch searchProviders query"),new Yt((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}searchConnections(e){return BS(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Vn(this,Yi,"f").verbose("calling providerSearch searchConnections query");const i=yield this.handleQuery(Vn(this,qd,"f").providerSearch(Vn(this,FF,"f").create(e)));return Vn(this,Yi,"f").verbose("providerSearch searchConnections query complete"),i.hasError()?Vn(this,Yi,"f").error("providerSearch searchConnections query failed",i.error):Vn(this,Yi,"f").info("successfully called providerSearch searchConnections query"),new Yt((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}requestConnection(e){return BS(this,void 0,void 0,function*(){Vn(this,Yi,"f").verbose("calling requestConnection mutation");const r=yield this.handleTransaction(Vn(this,qd,"f").requestConnection(Vn(this,kF,"f").create(e)));return Vn(this,Yi,"f").verbose("requestConnection mutation complete"),r.failure()?(Vn(this,Yi,"f").error("requestConnection mutation failed",r),r.intoFailure()):(Vn(this,Yi,"f").info("requestConnection request success"),tr.success(r.data().requestConnection))})}}qd=new WeakMap,Yi=new WeakMap,xF=new WeakMap,UF=new WeakMap,FF=new WeakMap,kF=new WeakMap,GF=new WeakMap;class unt{create(e){const r=e.data();return{input:{requestId:r.requestId,body:r.body,uploads:r.uploads}}}}class cnt{create(e){const r=e.data();return{input:{subject:r.subject,comment:{body:r.comment.body,uploads:r.comment.uploads},fields:{category:r.fields.category},email:r.email,name:r.name,metadata:r.metadata}}}}class lnt{create(e){return{input:{attachmentId:e.data().attachmentId}}}}class dnt{create(e){var r,n,i,s,a;const o=e.data();return{input:{page:(r=o?.page)!==null&&r!==void 0?r:null,pageSize:(n=o?.pageSize)!==null&&n!==void 0?n:null,search:(i=o?.search)!==null&&i!==void 0?i:null,labelNames:(s=o?.labelNames)!==null&&s!==void 0?s:null,locale:(a=o?.locale)!==null&&a!==void 0?a:null}}}}class fnt{create(e){const r=e.data();return{input:{requestId:r.requestId,attachmentId:r.attachmentId}}}}class hnt{create(e){var r,n,i;const s=e.data();return{input:{requestId:s.requestId,page:(r=s.page)!==null&&r!==void 0?r:null,pageSize:(n=s.pageSize)!==null&&n!==void 0?n:null,sortOrder:(i=s.sortOrder)!==null&&i!==void 0?i:null}}}}class pnt{create(e){var r,n,i,s,a,o;const u=e?.data();return{input:{page:(r=u?.page)!==null&&r!==void 0?r:null,pageSize:(n=u?.pageSize)!==null&&n!==void 0?n:null,search:(i=u?.search)!==null&&i!==void 0?i:null,sortBy:(s=u?.sortBy)!==null&&s!==void 0?s:null,sortOrder:(a=u?.sortOrder)!==null&&a!==void 0?a:null,status:(o=u?.status)!==null&&o!==void 0?o:[],ids:u?.ids}}}}class _nt{create(e){const r=e.data();return{input:{file:r.file,fileName:r.fileName}}}}var yl=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Rc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},wr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Wo,Pn,vO,SO,yO,EO,AO,TO,bO,CO;class mnt extends bo{constructor(e,r=new ws,n=new pnt,i=new _nt,s=new lnt,a=new cnt,o=new dnt,u=new hnt,c=new unt,l=new fnt){super(),Wo.set(this,void 0),Pn.set(this,void 0),vO.set(this,void 0),SO.set(this,void 0),yO.set(this,void 0),EO.set(this,void 0),AO.set(this,void 0),TO.set(this,void 0),bO.set(this,void 0),CO.set(this,void 0),Rc(this,Wo,e,"f"),Rc(this,Pn,r.getLogger("GraphQLSupportManager"),"f"),Rc(this,vO,n,"f"),Rc(this,SO,i,"f"),Rc(this,yO,s,"f"),Rc(this,EO,a,"f"),Rc(this,AO,o,"f"),Rc(this,TO,u,"f"),Rc(this,bO,c,"f"),Rc(this,CO,l,"f")}getSupportRequests(e){return yl(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();const i=wr(this,vO,"f").create(e);wr(this,Pn,"f").verbose("calling getSupportRequests query...");const s=yield this.handleQuery(wr(this,Wo,"f").getSupportRequests(i));return wr(this,Pn,"f").verbose("getSupportRequests query complete."),s.hasError()&&wr(this,Pn,"f").error("getSupportRequests query error",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getSupportRequests,s.error)})}uploadSupportAttachment(e){return yl(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=wr(this,SO,"f").create(e);wr(this,Pn,"f").verbose("calling uploadSupportAttachment mutation...");const i=yield this.handleTransaction(wr(this,Wo,"f").UploadSupportAttachment(n));return wr(this,Pn,"f").verbose("uploadSupportAttachment mutation complete."),i.failure()?(wr(this,Pn,"f").error("uploadSupportAttachment mutation error",i),i.intoFailure()):(wr(this,Pn,"f").info("uploadSupportAttachment mutation success"),tr.success(i.data().uploadSupportAttachment))})}deleteSupportAttachment(e){return yl(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=wr(this,yO,"f").create(e);wr(this,Pn,"f").verbose("calling deleteSupportAttachment mutation...");const i=yield this.handleTransaction(wr(this,Wo,"f").DeleteSupportAttachment(n));return wr(this,Pn,"f").verbose("deleteSupportAttachment mutation complete."),i.failure()?(wr(this,Pn,"f").error("deleteSupportAttachment mutation error",i),i.intoFailure()):(wr(this,Pn,"f").info("deleteSupportAttachment mutation success"),tr.success(i.data().deleteSupportAttachment))})}createSupportRequest(e){return yl(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=wr(this,EO,"f").create(e);wr(this,Pn,"f").verbose("calling createSupportRequest mutation...");const i=yield this.handleTransaction(wr(this,Wo,"f").CreateSupportRequest(n));return wr(this,Pn,"f").verbose("createSupportRequest mutation complete."),i.failure()?(wr(this,Pn,"f").error("createSupportRequest mutation error",i),i.intoFailure()):(wr(this,Pn,"f").info("createSupportRequest mutation success"),tr.success(i.data().createSupportRequest))})}getSupportCategories(){return yl(this,void 0,void 0,function*(){var e;wr(this,Pn,"f").verbose("calling getSupportCategories query...");const r=yield this.handleQuery(wr(this,Wo,"f").GetSupportCategories());return wr(this,Pn,"f").verbose("getSupportCategories query complete."),r.hasError()&&wr(this,Pn,"f").error("getSupportCategories query error",r.error),new Yt((e=r.data)===null||e===void 0?void 0:e.getSupportCategories,r.error)})}getSupportArticles(e){return yl(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();const i=wr(this,AO,"f").create(e);wr(this,Pn,"f").verbose("calling getSupportArticles query...");const s=yield this.handleQuery(wr(this,Wo,"f").getSupportArticles(i));return wr(this,Pn,"f").verbose("getSupportArticles query complete."),s.hasError()&&wr(this,Pn,"f").error("getSupportArticles query error",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getSupportArticles,s.error)})}getSupportComments(e){return yl(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();const i=wr(this,TO,"f").create(e);wr(this,Pn,"f").verbose("calling getSupportComments query...");const s=yield this.handleQuery(wr(this,Wo,"f").getSupportComments(i));return wr(this,Pn,"f").verbose("getSupportComments query complete."),s.hasError()&&wr(this,Pn,"f").error("getSupportComments query error",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getSupportComments,s.error)})}createSupportComment(e){return yl(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=wr(this,bO,"f").create(e);wr(this,Pn,"f").verbose("calling createSupportComment mutation...");const i=yield this.handleTransaction(wr(this,Wo,"f").CreateSupportComment(n));return wr(this,Pn,"f").verbose("createSupportComment mutation complete."),i.failure()?(wr(this,Pn,"f").error("createSupportComment mutation error",i),i.intoFailure()):(wr(this,Pn,"f").info("createSupportComment mutation success"),tr.success(i.data().createSupportComment))})}getSupportAttachment(e){return yl(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();const i=wr(this,CO,"f").create(e);wr(this,Pn,"f").verbose("calling getSupportAttachment query...");const s=yield this.handleQuery(wr(this,Wo,"f").GetSupportAttachment(i));return wr(this,Pn,"f").verbose("getSupportAttachment query complete."),s.hasError()&&wr(this,Pn,"f").error("getSupportAttachment query error",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getSupportAttachment,s.error)})}}Wo=new WeakMap,Pn=new WeakMap,vO=new WeakMap,SO=new WeakMap,yO=new WeakMap,EO=new WeakMap,AO=new WeakMap,TO=new WeakMap,bO=new WeakMap,CO=new WeakMap;const gnt="http://www.icanbwell.com/consent-category";class vnt{create(e){const r=e.data(),n={status:r.status,provision:{type:r.provision}};return On(r.organizationId)&&(n.organization=[{type:"Organization",reference:`Organization/${r.organizationId}`}]),On(r.category)&&(n.category=[{coding:[{system:gnt,code:r.category}]}]),{consentInput:n}}}class Snt{create(e){const r=e.data();return{exportId:r.exportId,password:r.password}}}class ynt{create(e){var r,n;const i=e.data();return{callbackURL:(r=i.callbackUrl)!==null&&r!==void 0?r:null,includeAttributeMatchingCheck:(n=i.includeAttributeMatchingCheck)!==null&&n!==void 0?n:null}}}class Ent{create(e){var r;const n=e.data();return{categoryCode:n.category,organizationId:(r=n.organizationId)!==null&&r!==void 0?r:null}}}var H_=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Yd,VF,Yae,Qae,Wae,Kae;class Ant{constructor(){Yd.add(this)}create(e){const r=e.data(),n={resourceType:p1.Person};return H_(this,Yd,"m",VF).call(this,"id",r.id,n),H_(this,Yd,"m",VF).call(this,"birthDate",r.birthDate,n),H_(this,Yd,"m",Yae).call(this,r,n),H_(this,Yd,"m",Wae).call(this,r,n),H_(this,Yd,"m",Qae).call(this,r,n),H_(this,Yd,"m",Kae).call(this,r,n),{person:n}}}Yd=new WeakSet,VF=function(e,r,n){Zs(r)||(n[e]=r)},Yae=function(e,r){let n=!1;const{firstName:i,middleNames:s,lastName:a}=e,o={};Wr(i)&&(n=!0,o.given=Wr(s)&&s.length>0?[i,...s]:[i]),Wr(a)&&(n=!0,o.family=a),n&&(r.name=[o])},Qae=function(e,r){let n=!1;const{addressUnit:i,addressStreet:s,city:a,stateOrProvidence:o,postageOrZipCode:u}=e,c={};if(Wr(i)||Wr(s)){n=!0;const l=[];Wr(s)&&l.push(s),Wr(i)&&l.push(i),c.line=l}Wr(a)&&(n=!0,c.city=a),Wr(o)&&(n=!0,c.state=o),Wr(u)&&(n=!0,c.postalCode=u),n&&(r.address=[c])},Wae=function(e,r){const n=e.gender;Zs(n)||(r.gender=n)},Kae=function(e,r){const n=[],{homePhone:i,mobilePhone:s,workPhone:a,email:o}=e;Wr(i)&&n.push({system:"phone",use:"home",value:i}),Wr(s)&&n.push({system:"phone",use:"mobile",value:s}),Wr(a)&&n.push({system:"phone",use:"work",value:a}),Wr(o)&&n.push({system:"email",value:o}),n.length!==0&&(r.telecom=n)};var El=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Zae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Cr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ko,un,BF,jF,zF,HF,qF;class Tnt extends bo{constructor(e,r=new ws){super(),Ko.set(this,void 0),un.set(this,void 0),BF.set(this,new vnt),jF.set(this,new Ant),zF.set(this,new Ent),HF.set(this,new Snt),qF.set(this,new ynt),Zae(this,Ko,e,"f"),Zae(this,un,r.getLogger("GraphQLUserManager"),"f")}getProfile(){return El(this,void 0,void 0,function*(){var e;Cr(this,un,"f").verbose("calling getProfile...");const r=yield this.handleQuery(Cr(this,Ko,"f").getProfile());return Cr(this,un,"f").verbose("getProfile complete"),r.hasError()?Cr(this,un,"f").error("getProfile failed",r.error):Cr(this,un,"f").info("successfully called getProfile"),new Yt((e=r.data)===null||e===void 0?void 0:e.userProfile,r.error)})}getAccessHistory(){return El(this,void 0,void 0,function*(){var e;Cr(this,un,"f").verbose("calling getAccessHistory...");const r=yield this.handleQuery(Cr(this,Ko,"f").GetAccessHistory());return Cr(this,un,"f").verbose("getAccessHistory complete"),r.hasError()?Cr(this,un,"f").error("getAccessHistory failed",r.error):Cr(this,un,"f").info("successfully called getAccessHistory"),new Yt((e=r.data)===null||e===void 0?void 0:e.getAccessHistory,r.error)})}delete(){return El(this,void 0,void 0,function*(){Cr(this,un,"f").verbose("calling delete...");const e=yield this.handleTransaction(Cr(this,Ko,"f").delete());return Cr(this,un,"f").verbose("delete complete"),e.failure()?(Cr(this,un,"f").error("delete failed",e.error()),e.intoFailure()):(Cr(this,un,"f").info("successfully called delete"),tr.success(null))})}updateProfile(e){return El(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Cr(this,un,"f").verbose("calling updateUserProfile");const n=yield this.handleTransaction(Cr(this,Ko,"f").updateUserProfile(Cr(this,jF,"f").create(e)));return Cr(this,un,"f").verbose("updateUserProfile complete"),n.failure()?(Cr(this,un,"f").error("updateUserProfile error",n),n.intoFailure()):(Cr(this,un,"f").info("updateUserProfile success"),tr.success(n.data().updateUserProfile))})}getConsents(e){return El(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();Cr(this,un,"f").verbose("calling consent search query...");let i;e!==void 0&&(i=Cr(this,zF,"f").create(e));const s=yield this.handleQuery(Cr(this,Ko,"f").searchConsent(i));return Cr(this,un,"f").verbose("consent search query complete"),s.hasError()?Cr(this,un,"f").error("consent search failed",s.error):Cr(this,un,"f").info("successfully called consent search query"),new Yt((r=s.data)===null||r===void 0?void 0:r.search,s.error)})}createConsent(e){return El(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Cr(this,un,"f").verbose("calling createConsent mutation...");const n=yield this.handleTransaction(Cr(this,Ko,"f").createConsent(Cr(this,BF,"f").create(e)));return Cr(this,un,"f").verbose("createConsent mutation complete"),n.failure()?(Cr(this,un,"f").error("createConsent mutation error",n),n.intoFailure()):(Cr(this,un,"f").info("createConsent mutation success"),tr.success(n.data().createConsent))})}createDataExportDirectDownloadUrl(e){return El(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Cr(this,un,"f").verbose("calling createDataExportDirectDownloadUrl mutation...");const n=yield this.handleTransaction(Cr(this,Ko,"f").CreateDataExportDirectDownloadUrl(Cr(this,HF,"f").create(e)));return Cr(this,un,"f").verbose("createDataExportDirectDownloadUrl mutation complete"),n.failure()?(Cr(this,un,"f").error("createDataExportDirectDownloadUrl mutation error",n),n.intoFailure()):(Cr(this,un,"f").info("createDataExportDirectDownloadUrl mutation success"),tr.success(n.data().createDataExportDirectDownloadUrl))})}createVerificationUrl(e){return El(this,void 0,void 0,function*(){Cr(this,un,"f").verbose("calling createVerificationUrl mutation...");const r=yield this.handleTransaction(Cr(this,Ko,"f").CreateVerificationUrl(Cr(this,qF,"f").create(e)));return Cr(this,un,"f").verbose("createVerificationUrl complete"),r.failure()?(Cr(this,un,"f").error("createVerificationUrl error",r),r.intoFailure()):(Cr(this,un,"f").info("createVerificationUrl success"),tr.success(r.data().createVerificationUrl))})}getVerificationStatus(){return El(this,void 0,void 0,function*(){Cr(this,un,"f").verbose("calling getVerificationStatus query...");const e=yield this.handleTransaction(Cr(this,Ko,"f").VerificationStatus());return Cr(this,un,"f").verbose("getVerificationStatus complete"),e.failure()?(Cr(this,un,"f").error("getVerificationStatus error",e),e.intoFailure()):(Cr(this,un,"f").info("getVerificationStatus success"),tr.success(e.data().verificationStatus))})}}Ko=new WeakMap,un=new WeakMap,BF=new WeakMap,jF=new WeakMap,zF=new WeakMap,HF=new WeakMap,qF=new WeakMap;var Xae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ro=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},RO,qa;class bnt{constructor(e,r,n){RO.set(this,void 0),qa.set(this,void 0),Xae(this,RO,r.getLogger("GraphQLAPIProvider"),"f"),Xae(this,qa,e,"f"),Ro(this,RO,"f").verbose("initializing GraphQLClient"),this.activity=new Trt(Ro(this,qa,"f"),r),this.connection=new brt(Ro(this,qa,"f"),r),this.device=new Irt(Ro(this,qa,"f"),r),this.event=new Nrt(Ro(this,qa,"f"),r),this.health=new Xrt(Ro(this,qa,"f"),r),this.financial=new xrt(Ro(this,qa,"f"),r),this.healthSpace=new Hrt(Ro(this,qa,"f"),r),this.user=new Tnt(Ro(this,qa,"f"),r),this.search=new ont(Ro(this,qa,"f"),r),this.questionnaire=new ent(Ro(this,qa,"f"),r),this.support=new mnt(Ro(this,qa,"f"),r),this.dataSharing=new Rrt(Ro(this,qa,"f"),r),this.language=new grt(n)}}RO=new WeakMap,qa=new WeakMap;class Cnt{createApiProvider(e,r,n){const{sdk:i,client:s}=Dae(e.graphQL.apiUrl,r,e.bwellConfig.language);return new bnt(i,n,s)}}var q_=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Jae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Bn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Rnt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},Al,ai;class Ont extends bo{constructor(e,r=new ws){super(),Al.set(this,void 0),ai.set(this,void 0),Jae(this,Al,e,"f"),Jae(this,ai,r.getLogger("GraphQLIdentityManager"),"f")}initialize(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("executing initialize query...",{clientKey:e});const r=yield this.handleTransaction(Bn(this,Al,"f").initialize({clientKey:e}));return Bn(this,ai,"f").verbose("initialize query complete",r),r.failure()?(Bn(this,ai,"f").error("initialize failed.",r),r.intoFailure()):(Bn(this,ai,"f").info("successfully called initialize"),tr.success(r.data().initSdk))})}authenticateWithOauth(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("exectuting oauth authenticate query...");const r=yield this.handleTransaction(Bn(this,Al,"f").authenticate({},{Authorization:e.jweToken,ClientKey:e.clientKey}));if(Bn(this,ai,"f").verbose("oauth authenticate query complete",r),r.failure())return Bn(this,ai,"f").error("oauth authenticate failed",r),r.intoFailure();Bn(this,ai,"f").info("oauth authenticate success");const n=r.data(),i={accessToken:n.getToken.accessToken.jwtToken,idToken:n.getToken.idToken.jwtToken,refreshToken:n.getToken.refreshToken.token};return tr.success(i)})}authenticateWithUsernamePassword(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("exectuting username/password authenticate query...");const r=yield this.handleTransaction(Bn(this,Al,"f").login({email:e.email,password:e.password},{ClientKey:e.clientKey}));if(Bn(this,ai,"f").verbose("username/password authenticate query complete",r),r.failure())return Bn(this,ai,"f").error("username/password authenticate failed",r),r.intoFailure();Bn(this,ai,"f").info("username/password authenticate success");const n=r.data(),i={accessToken:n.login.accessToken.jwtToken,idToken:n.login.idToken.jwtToken,refreshToken:n.login.refreshToken.token};return tr.success(i)})}authenticateWithAuthCode(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("executing authenticateWithAuthCode query...");const r=yield this.handleTransaction(Bn(this,Al,"f").ExchangeAuthCode({authCode:e.authCode}));if(Bn(this,ai,"f").verbose("authenticateWithAuthCode query complete",r),r.failure())return Bn(this,ai,"f").error("authenticateWithAuthCode failed",r),r.intoFailure();Bn(this,ai,"f").info("authenticateWithAuthCode successful");const n=r.data(),i={accessToken:n.exchangeAuthCode.accessToken.jwtToken,idToken:n.exchangeAuthCode.idToken.jwtToken,refreshToken:n.exchangeAuthCode.refreshToken.token};return tr.success(i)})}refreshAccessToken(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("executing refreshAccessToken query...");const r=yield this.handleTransaction(Bn(this,Al,"f").refreshTokens({},{refresh_token:e.refreshToken,clientkey:e.clientKey}));return Bn(this,ai,"f").verbose("refreshAccessToken query complete",r),r.failure()?(Bn(this,ai,"f").error("refreshAccessToken failed",r),r.intoFailure()):(Bn(this,ai,"f").info("refreshAccessToken successful"),tr.success(r.data().refresh))})}createGuestAccessToken(e){return q_(this,void 0,void 0,function*(){const{jweToken:r}=e,n=Rnt(e,["jweToken"]),i=r?{Authorization:`Bearer ${r}`}:void 0;Bn(this,ai,"f").verbose("executing createGuestAccessToken mutation...",n);const s=yield this.handleTransaction(Bn(this,Al,"f").createGuestAccessToken(n,i));if(Bn(this,ai,"f").verbose("createGuestAccessToken mutation complete",s),s.failure())return Bn(this,ai,"f").error("createGuestAccessToken failed",s),s.intoFailure();Bn(this,ai,"f").info("createGuestAccessToken successful");const a=s.data();return tr.success(a.createGuestAccessToken)})}}Al=new WeakMap,ai=new WeakMap;class Pnt{createIdentityManager(e,r){const{sdk:n}=Dae(e.graphQL.unauthApiUrl);return new Ont(n,r)}}function YF(t,e){const r=Object.keys(t);return r.length===e.length&&r.every(n=>e.includes(n))}function eoe(t){return"token"in t&&YF(t,["token"])}function toe(t){return"email"in t&&"password"in t&&YF(t,["email","password"])}function roe(t){return"authCode"in t&&YF(t,["authCode"])}var Int=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},QF=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},jS=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},OO,Y_,PO;class Mnt{constructor(e,r,n=new ws){OO.set(this,void 0),Y_.set(this,void 0),PO.set(this,void 0),QF(this,OO,r,"f"),QF(this,PO,e,"f"),QF(this,Y_,n.getLogger("OAuthStrategy"),"f")}authenticate(e){return Int(this,void 0,void 0,function*(){if(!eoe(e))return jS(this,Y_,"f").error("Incorrect credentials type provided to OAuthStrategy"),tr.failure(new i1("Expected OAuthCredentials",e));jS(this,Y_,"f").verbose("authenticating via OAuth strategy...");const r=yield jS(this,OO,"f").authenticateWithOauth({jweToken:e.token,clientKey:jS(this,PO,"f").context.clientKey});return jS(this,Y_,"f").verbose("finished OAuth authentication"),r})}}OO=new WeakMap,Y_=new WeakMap,PO=new WeakMap;var wnt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},WF=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},zS=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},IO,Q_,MO;class Nnt{constructor(e,r,n=new ws){IO.set(this,void 0),Q_.set(this,void 0),MO.set(this,void 0),WF(this,IO,r,"f"),WF(this,MO,e,"f"),WF(this,Q_,n.getLogger("AuthCodeStrategy"),"f")}authenticate(e){return wnt(this,void 0,void 0,function*(){if(!roe(e))return zS(this,Q_,"f").error("Incorrect credentials type provided to AuthCodeStrategy"),tr.failure(new i1("Expected AuthCodeCredentials",e));zS(this,Q_,"f").verbose("authenticating via AuthCode strategy...");const r=yield zS(this,IO,"f").authenticateWithAuthCode({authCode:e.authCode,clientKey:zS(this,MO,"f").context.clientKey});return zS(this,Q_,"f").verbose("finished AuthCode authentication"),r})}}IO=new WeakMap,Q_=new WeakMap,MO=new WeakMap;var Dnt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},KF=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},HS=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},wO,W_,NO;class Lnt{constructor(e,r,n=new ws){wO.set(this,void 0),W_.set(this,void 0),NO.set(this,void 0),KF(this,wO,r,"f"),KF(this,NO,e,"f"),KF(this,W_,n.getLogger("UsernamePasswordStrategy"),"f")}authenticate(e){return Dnt(this,void 0,void 0,function*(){if(!toe(e))return HS(this,W_,"f").error("Invalid credentials type provided to UsernamePasswordStrategy. Please provide username and password."),tr.failure(new i1("Expected UserPassCredentials",e));HS(this,W_,"f").verbose("authenticating via UsernamePassword strategy...");const r=yield HS(this,wO,"f").authenticateWithUsernamePassword({clientKey:HS(this,NO,"f").context.clientKey,email:e.email,password:e.password});return HS(this,W_,"f").verbose("finished OAuth authentication"),r})}}wO=new WeakMap,W_=new WeakMap,NO=new WeakMap;class $nt{createAuthStrategy(e,r,n,i=new ws){if(toe(n))return new Lnt(e,r,i);if(eoe(n))return new Mnt(e,r,i);if(roe(n))return new Nnt(e,r,i);throw new Error("Invalid credentials type provided; expected UserPassCredentials, OauthCredentials or AuthCodeCredentials.")}}const noe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function xnt(t){const e=new Set([t]),r=new Set,n=t.match(noe);if(!n)return()=>!1;const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(u){return u===t};function s(o){return r.add(o),!1}function a(o){return e.add(o),!0}return function(u){if(e.has(u))return!0;if(r.has(u))return!1;const c=u.match(noe);if(!c)return s(u);const l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||i.major!==l.major?s(u):i.major===0?i.minor===l.minor&&i.patch<=l.patch?a(u):s(u):i.minor<=l.minor?a(u):s(u)}}const Unt=xnt("1.9.1"),Fnt="1.9.1".split(".")[0],qS=Symbol.for(`opentelemetry.js.api.${Fnt}`),YS=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof globalThis=="object"?globalThis:{};function QS(t,e,r,n=!1){var i;const s=YS[qS]=(i=YS[qS])!==null&&i!==void 0?i:{version:"1.9.1"};if(!n&&s[t]){const a=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${t}`);return r.error(a.stack||a.message),!1}if(s.version!=="1.9.1"){const a=new Error(`@opentelemetry/api: Registration of version v${s.version} for ${t} does not match previously registered API v1.9.1`);return r.error(a.stack||a.message),!1}return s[t]=e,r.debug(`@opentelemetry/api: Registered a global for ${t} v1.9.1.`),!0}function Lh(t){var e,r;const n=(e=YS[qS])===null||e===void 0?void 0:e.version;if(!(!n||!Unt(n)))return(r=YS[qS])===null||r===void 0?void 0:r[t]}function WS(t,e){e.debug(`@opentelemetry/api: Unregistering a global for ${t} v1.9.1.`);const r=YS[qS];r&&delete r[t]}function ZF(t){return Symbol.for(t)}class DO{constructor(e){const r=this;r._currentContext=e?new Map(e):new Map,r.getValue=n=>r._currentContext.get(n),r.setValue=(n,i)=>{const s=new DO(r._currentContext);return s._currentContext.set(n,i),s},r.deleteValue=n=>{const i=new DO(r._currentContext);return i._currentContext.delete(n),i}}}const K_=new DO;class knt{active(){return K_}with(e,r,n,...i){return r.call(n,...i)}bind(e,r){return r}enable(){return this}disable(){return this}}class Gnt{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return KS("debug",this._namespace,e)}error(...e){return KS("error",this._namespace,e)}info(...e){return KS("info",this._namespace,e)}warn(...e){return KS("warn",this._namespace,e)}verbose(...e){return KS("verbose",this._namespace,e)}}function KS(t,e,r){const n=Lh("diag");if(n)return n[t](e,...r)}var ds;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(ds||(ds={}));function Vnt(t,e){t<ds.NONE?t=ds.NONE:t>ds.ALL&&(t=ds.ALL),e=e||{};function r(n,i){const s=e[n];return typeof s=="function"&&t>=i?s.bind(e):function(){}}return{error:r("error",ds.ERROR),warn:r("warn",ds.WARN),info:r("info",ds.INFO),debug:r("debug",ds.DEBUG),verbose:r("verbose",ds.VERBOSE)}}const Bnt="diag";class Zo{static instance(){return this._instance||(this._instance=new Zo),this._instance}constructor(){function e(i){return function(...s){const a=Lh("diag");if(a)return a[i](...s)}}const r=this,n=(i,s={logLevel:ds.INFO})=>{var a,o,u;if(i===r){const d=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((a=d.stack)!==null&&a!==void 0?a:d.message),!1}typeof s=="number"&&(s={logLevel:s});const c=Lh("diag"),l=Vnt((o=s.logLevel)!==null&&o!==void 0?o:ds.INFO,i);if(c&&!s.suppressOverrideMessage){const d=(u=new Error().stack)!==null&&u!==void 0?u:"<failed to generate stacktrace>";c.warn(`Current logger will be overwritten from ${d}`),l.warn(`Current logger will overwrite one already registered from ${d}`)}return QS("diag",l,r,!0)};r.setLogger=n,r.disable=()=>{WS(Bnt,r)},r.createComponentLogger=i=>new Gnt(i),r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}}const XF="context",jnt=new knt;class Z_{constructor(){}static getInstance(){return this._instance||(this._instance=new Z_),this._instance}setGlobalContextManager(e){return QS(XF,e,Zo.instance())}active(){return this._getContextManager().active()}with(e,r,n,...i){return this._getContextManager().with(e,r,n,...i)}bind(e,r){return this._getContextManager().bind(e,r)}_getContextManager(){return Lh(XF)||jnt}disable(){this._getContextManager().disable(),WS(XF,Zo.instance())}}var Tl;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(Tl||(Tl={}));const ioe="0000000000000000",soe="00000000000000000000000000000000",aoe={traceId:soe,spanId:ioe,traceFlags:Tl.NONE};class ZS{constructor(e=aoe){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,r){return this}setAttributes(e){return this}addEvent(e,r){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,r){}}const JF=ZF("OpenTelemetry Context Key SPAN");function ek(t){return t.getValue(JF)||void 0}function znt(){return ek(Z_.getInstance().active())}function tk(t,e){return t.setValue(JF,e)}function Hnt(t){return t.deleteValue(JF)}function qnt(t,e){return tk(t,new ZS(e))}function ooe(t){var e;return(e=ek(t))===null||e===void 0?void 0:e.spanContext()}const LO=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]);function uoe(t,e){if(typeof t!="string"||t.length!==e)return!1;let r=0;for(let n=0;n<t.length;n+=4)r+=(LO[t.charCodeAt(n)]|0)+(LO[t.charCodeAt(n+1)]|0)+(LO[t.charCodeAt(n+2)]|0)+(LO[t.charCodeAt(n+3)]|0);return r===e}function coe(t){return uoe(t,32)&&t!==soe}function Ynt(t){return uoe(t,16)&&t!==ioe}function XS(t){return coe(t.traceId)&&Ynt(t.spanId)}function Qnt(t){return new ZS(t)}const rk=Z_.getInstance();class loe{startSpan(e,r,n=rk.active()){if(!!r?.root)return new ZS;const s=n&&ooe(n);return Wnt(s)&&XS(s)?new ZS(s):new ZS}startActiveSpan(e,r,n,i){let s,a,o;if(arguments.length<2)return;arguments.length===2?o=r:arguments.length===3?(s=r,o=n):(s=r,a=n,o=i);const u=a??rk.active(),c=this.startSpan(e,s,u),l=tk(u,c);return rk.with(l,o,void 0,c)}}function Wnt(t){return t!==null&&typeof t=="object"&&"spanId"in t&&typeof t.spanId=="string"&&"traceId"in t&&typeof t.traceId=="string"&&"traceFlags"in t&&typeof t.traceFlags=="number"}const Knt=new loe;class Znt{constructor(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}startSpan(e,r,n){return this._getTracer().startSpan(e,r,n)}startActiveSpan(e,r,n,i){const s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)}_getTracer(){if(this._delegate)return this._delegate;const e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Knt}}class Xnt{getTracer(e,r,n){return new loe}}const Jnt=new Xnt;class doe{getTracer(e,r,n){var i;return(i=this.getDelegateTracer(e,r,n))!==null&&i!==void 0?i:new Znt(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Jnt}setDelegate(e){this._delegate=e}getDelegateTracer(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,r,n)}}const nk="trace";class ik{constructor(){this._proxyTracerProvider=new doe,this.wrapSpanContext=Qnt,this.isSpanContextValid=XS,this.deleteSpan=Hnt,this.getSpan=ek,this.getActiveSpan=znt,this.getSpanContext=ooe,this.setSpan=tk,this.setSpanContext=qnt}static getInstance(){return this._instance||(this._instance=new ik),this._instance}setGlobalTracerProvider(e){const r=QS(nk,this._proxyTracerProvider,Zo.instance());return r&&this._proxyTracerProvider.setDelegate(e),r}getTracerProvider(){return Lh(nk)||this._proxyTracerProvider}getTracer(e,r){return this.getTracerProvider().getTracer(e,r)}disable(){WS(nk,Zo.instance()),this._proxyTracerProvider=new doe}}const ao=ik.getInstance();var sk=ZF("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function foe(t){return t.setValue(sk,!0)}function dwt(t){return t.deleteValue(sk)}function ak(t){return t.getValue(sk)===!0}var ok="[_0-9a-z-*/]",eit="[a-z]"+ok+"{0,255}",tit="[a-z0-9]"+ok+"{0,240}@[a-z]"+ok+"{0,13}",rit=new RegExp("^(?:"+eit+"|"+tit+")$"),nit=/^[ -~]{0,255}[!-~]$/,iit=/,|=/;function sit(t){return rit.test(t)}function ait(t){return nit.test(t)&&!iit.test(t)}var hoe=32,oit=512,poe=",",_oe="=",uit=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+_oe+e.get(n)),r},[]).join(poe)},t.prototype._parse=function(e){e.length>oit||(this._internalState=e.split(poe).reverse().reduce(function(r,n){var i=n.trim(),s=i.indexOf(_oe);if(s!==-1){var a=i.slice(0,s),o=i.slice(s+1,n.length);sit(a)&&ait(o)&&r.set(a,o)}return r},new Map),this._internalState.size>hoe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,hoe))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),uk="traceparent",ck="tracestate",cit="00",lit="(?!ff)[\\da-f]{2}",dit="(?![0]{32})[\\da-f]{32}",fit="(?![0]{16})[\\da-f]{16}",hit="[\\da-f]{2}",pit=new RegExp("^\\s?("+lit+")-("+dit+")-("+fit+")-("+hit+")(-.*)?\\s?$");function _it(t){var e=pit.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var moe=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=ao.getSpanContext(e);if(!(!i||ak(e)||!XS(i))){var s=cit+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Tl.NONE).toString(16);n.set(r,uk,s),i.traceState&&n.set(r,ck,i.traceState.serialize())}},t.prototype.extract=function(e,r,n){var i=n.get(r,uk);if(!i)return e;var s=Array.isArray(i)?i[0]:i;if(typeof s!="string")return e;var a=_it(s);if(!a)return e;a.isRemote=!0;var o=n.get(r,ck);if(o){var u=Array.isArray(o)?o.join(","):o;a.traceState=new uit(typeof u=="string"?u:void 0)}return ao.setSpanContext(e,a)},t.prototype.fields=function(){return[uk,ck]},t}();const yr=Zo.instance();var mit=function(){function t(){var e=this;this._promise=new Promise(function(r,n){e._resolve=r,e._reject=n})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}(),git=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},vit=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},$O=function(){function t(e,r){this._callback=e,this._that=r,this._isCalled=!1,this._deferred=new mit}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,vit([this._that],git(n),!1))).then(function(s){return r._deferred.resolve(s)},function(s){return r._deferred.reject(s)})}catch(s){this._deferred.reject(s)}}return this._deferred.promise},t}(),Qd;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Qd||(Qd={}));var Oc;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(Oc||(Oc={}));var Sit=",",yit=["OTEL_SDK_DISABLED"];function Eit(t){return yit.indexOf(t)>-1}var Ait=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Tit(t){return Ait.indexOf(t)>-1}var bit=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function Cit(t){return bit.indexOf(t)>-1}var JS=1/0,ey=128,Rit=128,Oit=128,goe={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:ds.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:JS,OTEL_ATTRIBUTE_COUNT_LIMIT:ey,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:JS,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ey,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:JS,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ey,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Rit,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Oit,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Oc.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function Pit(t,e,r){if(!(typeof r[t]>"u")){var n=String(r[t]);e[t]=n.toLowerCase()==="true"}}function Iit(t,e,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[t]<"u"){var s=Number(r[t]);isNaN(s)||(s<n?e[t]=n:s>i?e[t]=i:e[t]=s)}}function Mit(t,e,r,n){n===void 0&&(n=Sit);var i=r[t];typeof i=="string"&&(e[t]=i.split(n).map(function(s){return s.trim()}))}var wit={ALL:ds.ALL,VERBOSE:ds.VERBOSE,DEBUG:ds.DEBUG,INFO:ds.INFO,WARN:ds.WARN,ERROR:ds.ERROR,NONE:ds.NONE};function Nit(t,e,r){var n=r[t];if(typeof n=="string"){var i=wit[n.toUpperCase()];i!=null&&(e[t]=i)}}function voe(t){var e={};for(var r in goe){var n=r;switch(n){case"OTEL_LOG_LEVEL":Nit(n,e,t);break;default:if(Eit(n))Pit(n,e,t);else if(Tit(n))Iit(n,e,t);else if(Cit(n))Mit(n,e,t);else{var i=t[n];typeof i<"u"&&i!==null&&(e[n]=String(i))}}}return e}var Soe=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof globalThis=="object"?globalThis:{};function la(){var t=voe(Soe);return Object.assign({},goe,t)}function yoe(){return voe(Soe)}var Dit=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},Eoe=1e4,Lit=5,$it=1e3,xit=5e3,Uit=1.5;function Fit(t){t===void 0&&(t={});var e={};return Object.entries(t).forEach(function(r){var n=Dit(r,2),i=n[0],s=n[1];typeof s<"u"?e[i]=String(s):yr.warn('Header "'+i+'" has invalid value ('+s+") and will be ignored")}),e}function kit(t,e){return t.endsWith("/")||(t=t+"/"),t+e}function Git(t){try{var e=new URL(t);return e.pathname===""&&(e.pathname=e.pathname+"/"),e.toString()}catch{return yr.warn("Could not parse export URL: '"+t+"'"),t}}function Vit(t){return typeof t=="number"?t<=0?Aoe(t,Eoe):t:Bit()}function Bit(){var t,e=Number((t=la().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&t!==void 0?t:la().OTEL_EXPORTER_OTLP_TIMEOUT);return e<=0?Aoe(e,Eoe):e}function Aoe(t,e){return yr.warn("Timeout must be greater than 0",t),e}function jit(t){var e=[429,502,503,504];return e.includes(t)}function zit(t){if(t==null)return-1;var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var r=new Date(t).getTime()-Date.now();return r>=0?r:0}var Hit=function(){function t(e){e===void 0&&(e={}),this._sendingPromises=[],this.url=this.getDefaultUrl(e),typeof e.hostname=="string"&&(this.hostname=e.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new $O(this._shutdown,this),this._concurrencyLimit=typeof e.concurrencyLimit=="number"?e.concurrencyLimit:30,this.timeoutMillis=Vit(e.timeoutMillis),this.onInit(e)}return t.prototype.export=function(e,r){if(this._shutdownOnce.isCalled){r({code:Qd.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){r({code:Qd.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(e).then(function(){r({code:Qd.SUCCESS})}).catch(function(n){r({code:Qd.FAILED,error:n})})},t.prototype._export=function(e){var r=this;return new Promise(function(n,i){try{yr.debug("items to be sent",e),r.send(e,n,i)}catch(s){i(s)}})},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then(function(){})},t.prototype._shutdown=function(){return yr.debug("shutdown started"),this.onShutdown(),this.forceFlush()},t}(),qit=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ty=function(t){qit(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.name="OTLPExporterError",s.data=i,s.code=n,s}return e}(Error),xO=function(){return xO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xO.apply(this,arguments)},Yit=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function Qit(t,e,r,n,i){if(navigator.sendBeacon(e,new Blob([t],r)))yr.debug("sendBeacon - can send",t),n();else{var s=new ty("sendBeacon - cannot send "+t);i(s)}}function Wit(t,e,r,n,i,s){var a,o,u=!1,c=setTimeout(function(){if(clearTimeout(a),u=!0,o.readyState===XMLHttpRequest.DONE){var d=new ty("Request Timeout");s(d)}else o.abort()},n),l=function(d,f){d===void 0&&(d=Lit),f===void 0&&(f=$it),o=new XMLHttpRequest,o.open("POST",e);var _={Accept:"application/json","Content-Type":"application/json"};Object.entries(xO(xO({},_),r)).forEach(function(m){var E=Yit(m,2),S=E[0],C=E[1];o.setRequestHeader(S,C)}),o.send(t),o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE&&u===!1)if(o.status>=200&&o.status<=299)yr.debug("xhr success",t),i(),clearTimeout(c),clearTimeout(a);else if(o.status&&jit(o.status)&&d>0){var m=void 0;f=Uit*f,o.getResponseHeader("Retry-After")?m=zit(o.getResponseHeader("Retry-After")):m=Math.round(Math.random()*(xit-f)+f),a=setTimeout(function(){l(d-1,f)},m)}else{var E=new ty("Failed to export with XHR (status: "+o.status+")",o.status);s(E),clearTimeout(c),clearTimeout(a)}},o.onabort=function(){if(u){var m=new ty("Request Timeout");s(m)}clearTimeout(c),clearTimeout(a)},o.onerror=function(){if(u){var m=new ty("Request Timeout");s(m)}clearTimeout(c),clearTimeout(a)}};l()}class X_{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const r=this._entries.get(e);if(r)return Object.assign({},r)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(e,r){const n=new X_(this._entries);return n._entries.set(e,r),n}removeEntry(e){const r=new X_(this._entries);return r._entries.delete(e),r}removeEntries(...e){const r=new X_(this._entries);for(const n of e)r._entries.delete(n);return r}clear(){return new X_}}const Kit=Symbol("BaggageEntryMetadata"),Zit=Zo.instance();function Xit(t={}){return new X_(new Map(Object.entries(t)))}function Jit(t){return typeof t!="string"&&(Zit.error(`Cannot create baggage metadata from unknown type: ${typeof t}`),t=""),{__TYPE__:Kit,toString(){return t}}}var est="=",lk=";",dk=",",fk="baggage",Toe=180,boe=4096,Coe=8192,tst=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function rst(t){return t.reduce(function(e,r){var n=""+e+(e!==""?dk:"")+r;return n.length>Coe?e:n},"")}function nst(t){return t.getAllEntries().map(function(e){var r=tst(e,2),n=r[0],i=r[1],s=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(s+=lk+i.metadata.toString()),s})}function Roe(t){var e=t.split(lk);if(!(e.length<=0)){var r=e.shift();if(r){var n=r.indexOf(est);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),a;return e.length>0&&(a=Jit(e.join(lk))),{key:i,value:s,metadata:a}}}}}function Ooe(t,e,r,n){for(var i=0;i<t.length&&r<Toe;){var s=t.indexOf(dk,i),a=s===-1?t.length:s,o=a-i;if(o<=boe){var u=Roe(t.substring(i,a));if(u){var c=(r===0?0:1)+o;if(n+c>Coe)break;e[u.key]=u.metadata?{value:u.value,metadata:u.metadata}:{value:u.value},r++,n+=c}}if(s===-1)break;i=s+1}return[r,n]}function Poe(t){return typeof t!="string"||t.length===0?{}:t.split(dk).map(function(e){return Roe(e)}).filter(function(e){return e!==void 0&&e.value.length>0}).reduce(function(e,r){return e[r.key]=r.value,e},{})}var ist=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),UO=function(){return UO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},UO.apply(this,arguments)},sst=function(t){ist(e,t);function e(r,n,i){r===void 0&&(r={});var s=t.call(this,r)||this;return s._useXHR=!1,s._serializer=n,s._contentType=i,s._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",s._useXHR?s._headers=Object.assign({},Fit(r.headers),Poe(la().OTEL_EXPORTER_OTLP_HEADERS)):s._headers={},s}return e.prototype.onInit=function(){},e.prototype.onShutdown=function(){},e.prototype.send=function(r,n,i){var s=this,a;if(this._shutdownOnce.isCalled){yr.debug("Shutdown already started. Cannot send objects");return}var o=(a=this._serializer.serializeRequest(r))!==null&&a!==void 0?a:new Uint8Array,u=new Promise(function(l,d){s._useXHR?Wit(o,s.url,UO(UO({},s._headers),{"Content-Type":s._contentType}),s.timeoutMillis,l,d):Qit(o,s.url,{type:s._contentType},l,d)}).then(n,i);this._sendingPromises.push(u);var c=function(){var l=s._sendingPromises.indexOf(u);s._sendingPromises.splice(l,1)};u.then(c,c)},e}(Hit),Wd=performance,Ioe=9,ast=6,ost=Math.pow(10,ast),FO=Math.pow(10,Ioe);function Kd(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*ost);return[r,n]}function hk(){var t=Wd.timeOrigin;if(typeof t!="number"){var e=Wd;t=e.timing&&e.timing.fetchStart}return t}function kO(t){var e=Kd(hk()),r=Kd(typeof t=="number"?t:Wd.now());return woe(e,r)}function $h(t){if(pk(t))return t;if(typeof t=="number")return t<hk()?kO(t):Kd(t);if(t instanceof Date)return Kd(t.getTime());throw TypeError("Invalid input type")}function ust(t,e){var r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=FO),[r,n]}function fwt(t){var e=Ioe,r=""+"0".repeat(e)+t[1]+"Z",n=r.substr(r.length-e-1),i=new Date(t[0]*1e3).toISOString();return i.replace("000Z",n)}function bl(t){return t[0]*FO+t[1]}function hwt(t){return t[0]*1e3+t[1]/1e6}function pwt(t){return t[0]*1e6+t[1]/1e3}function pk(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Moe(t){return pk(t)||typeof t=="number"||t instanceof Date}function woe(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=FO&&(r[1]-=FO,r[0]+=1),r}function Noe(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function _k(t){for(var e=new Uint8Array(t.length/2),r=0,n=0;n<t.length;n+=2){var i=Noe(t.charCodeAt(n)),s=Noe(t.charCodeAt(n+1));e[r++]=i<<4|s}return e}function Doe(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function cst(t){var e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}function Loe(t){var e=Doe(t);return cst(e)}function lst(t){var e=Doe(t);return e.toString()}var dst=typeof BigInt<"u"?lst:bl;function $oe(t){return t}function xoe(t){if(t!==void 0)return _k(t)}var fst={encodeHrTime:Loe,encodeSpanContext:_k,encodeOptionalSpanContext:xoe};function hst(t){var e,r;if(t===void 0)return fst;var n=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(r=t.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Loe:dst,encodeSpanContext:i?$oe:_k,encodeOptionalSpanContext:i?$oe:xoe}}var pst=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function _st(t){return{name:t.name,version:t.version}}function mst(t){return Object.keys(t).map(function(e){return mk(e,t[e])})}function mk(t,e){return{key:t,value:gk(e)}}function gk(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(gk)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(r){var n=pst(r,2),i=n[0],s=n[1];return mk(i,s)})}}:{}}function gst(t){return{attributes:mst(t.attributes),droppedAttributesCount:0}}var vst=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Uoe=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function Sst(t,e){var r=hst(e);return{resourceLogs:Est(t,r)}}function yst(t){var e,r,n=new Map;try{for(var i=vst(t),s=i.next();!s.done;s=i.next()){var a=s.value,o=a.resource,u=a.instrumentationScope,c=u.name,l=u.version,d=l===void 0?"":l,f=u.schemaUrl,_=f===void 0?"":f,m=n.get(o);m||(m=new Map,n.set(o,m));var E=c+"@"+d+":"+_,S=m.get(E);S||(S=[],m.set(E,S)),S.push(a)}}catch(C){e={error:C}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function Est(t,e){var r=yst(t);return Array.from(r,function(n){var i=Uoe(n,2),s=i[0],a=i[1];return{resource:gst(s),scopeLogs:Array.from(a,function(o){var u=Uoe(o,2),c=u[1];return{scope:_st(c[0].instrumentationScope),logRecords:c.map(function(l){return Ast(l,e)}),schemaUrl:c[0].instrumentationScope.schemaUrl}}),schemaUrl:void 0}})}function Ast(t,e){var r,n,i;return{timeUnixNano:e.encodeHrTime(t.hrTime),observedTimeUnixNano:e.encodeHrTime(t.hrTimeObserved),severityNumber:t.severityNumber,severityText:t.severityText,body:gk(t.body),attributes:Tst(t.attributes),droppedAttributesCount:t.droppedAttributesCount,flags:(r=t.spanContext)===null||r===void 0?void 0:r.traceFlags,traceId:e.encodeOptionalSpanContext((n=t.spanContext)===null||n===void 0?void 0:n.traceId),spanId:e.encodeOptionalSpanContext((i=t.spanContext)===null||i===void 0?void 0:i.spanId)}}function _wt(t){return t}function Tst(t){return Object.keys(t).map(function(e){return mk(e,t[e])})}var mwt,gwt,vwt=null,Swt=null,bst={serializeRequest:function(t){var e=Sst(t,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},Foe="v1/logs",Cst="http://localhost:4318/"+Foe;function Rst(t){return typeof t.url=="string"?t.url:la().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length>0?Git(la().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT):la().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?kit(la().OTEL_EXPORTER_OTLP_ENDPOINT,Foe):Cst}var Ost=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ry=function(){return ry=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ry.apply(this,arguments)},Pst=function(t){Ost(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,ry({timeoutMillis:la().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT},r),bst,"application/json")||this;return n._headers=ry(ry({},n._headers),Poe(la().OTEL_EXPORTER_OTLP_LOGS_HEADERS)),n}return e.prototype.getDefaultUrl=function(r){return Rst(r)},e}(sst),ywt,Ewt="cloud.provider",Awt="cloud.account.id",Twt="cloud.region",bwt="cloud.availability_zone",Cwt="cloud.platform",Rwt="aws.ecs.container.arn",Owt="aws.ecs.cluster.arn",Pwt="aws.ecs.launchtype",Iwt="aws.ecs.task.arn",Mwt="aws.ecs.task.family",wwt="aws.ecs.task.revision",Nwt="aws.eks.cluster.arn",Dwt="aws.log.group.names",Lwt="aws.log.group.arns",$wt="aws.log.stream.names",xwt="aws.log.stream.arns",Uwt="container.name",Fwt="container.id",kwt="container.runtime",Gwt="container.image.name",Vwt="container.image.tag",Bwt="deployment.environment",jwt="device.id",zwt="device.model.identifier",Hwt="device.model.name",qwt="faas.name",Ywt="faas.id",Qwt="faas.version",Wwt="faas.instance",Kwt="faas.max_memory",Zwt="host.id",Xwt="host.name",Jwt="host.type",e0t="host.arch",t0t="host.image.name",r0t="host.image.id",n0t="host.image.version",i0t="k8s.cluster.name",s0t="k8s.node.name",a0t="k8s.node.uid",o0t="k8s.namespace.name",u0t="k8s.pod.uid",c0t="k8s.pod.name",l0t="k8s.container.name",d0t="k8s.replicaset.uid",f0t="k8s.replicaset.name",h0t="k8s.deployment.uid",p0t="k8s.deployment.name",_0t="k8s.statefulset.uid",m0t="k8s.statefulset.name",g0t="k8s.daemonset.uid",v0t="k8s.daemonset.name",S0t="k8s.job.uid",y0t="k8s.job.name",E0t="k8s.cronjob.uid",A0t="k8s.cronjob.name",T0t="os.type",b0t="os.description",C0t="os.name",R0t="os.version",O0t="process.pid",P0t="process.executable.name",I0t="process.executable.path",M0t="process.command",w0t="process.command_line",N0t="process.command_args",D0t="process.owner",L0t="process.runtime.name",$0t="process.runtime.version",x0t="process.runtime.description",Ist="service.name",U0t="service.namespace",F0t="service.instance.id",k0t="service.version",Mst="telemetry.sdk.name",wst="telemetry.sdk.language",Nst="telemetry.sdk.version",G0t="telemetry.auto.version",V0t="webengine.name",B0t="webengine.version",j0t="webengine.description",z0t=null,H0t=null,q0t=null,Y0t=null,Q0t=null,W0t=null,K0t=null,Z0t=null,X0t=null,J0t=null,eNt=null,tNt=null,rNt=null,nNt=null,iNt=null,sNt=null,aNt=null,oNt=null,uNt=null,cNt=null,lNt=null,dNt=null,fNt=null,hNt=null,pNt=null,_Nt=null,mNt=null,gNt=null,vNt=null,SNt=null,yNt=null,ENt=null,ANt=null,TNt=null,bNt=null,CNt=null,RNt=null,ONt=null,PNt=null,INt=null,MNt=null,wNt=null,NNt=null,DNt=null,LNt=null,$Nt=null,xNt=null,UNt=null,FNt=null,kNt=null,GNt=null,VNt=null,BNt=null,jNt=null,zNt=null,HNt=null,qNt=null,YNt=null,QNt=null,WNt=null,KNt=null,ZNt=null,XNt=null,JNt=null,eDt=null,tDt=null,rDt=null,nDt=null,iDt=null,sDt=null,Dst=Ist,aDt=null,oDt=null,uDt=null,koe=Mst,Goe=wst,Voe=Nst,cDt=null,lDt=null,dDt=null,fDt=null,hDt=null,pDt="alibaba_cloud",_Dt="aws",mDt="azure",gDt="gcp",vDt=null,SDt=null,yDt=null,EDt=null,ADt=null,TDt="alibaba_cloud_ecs",bDt="alibaba_cloud_fc",CDt="aws_ec2",RDt="aws_ecs",ODt="aws_eks",PDt="aws_lambda",IDt="aws_elastic_beanstalk",MDt="azure_vm",wDt="azure_container_instances",NDt="azure_aks",DDt="azure_functions",LDt="azure_app_service",$Dt="gcp_compute_engine",xDt="gcp_cloud_run",UDt="gcp_kubernetes_engine",FDt="gcp_cloud_functions",kDt="gcp_app_engine",GDt=null,VDt=null,BDt=null,jDt=null,zDt=null,HDt=null,qDt=null,YDt=null,QDt=null,WDt=null,KDt=null,ZDt=null,XDt=null,JDt=null,eLt=null,tLt=null,rLt=null,nLt=null,iLt="ec2",sLt="fargate",aLt=null,oLt=null,uLt=null,cLt="amd64",lLt="arm32",dLt="arm64",fLt="ia64",hLt="ppc32",pLt="ppc64",_Lt="x86",mLt=null,gLt=null,vLt=null,SLt=null,yLt=null,ELt=null,ALt=null,TLt=null,bLt="windows",CLt="linux",RLt="darwin",OLt="freebsd",PLt="netbsd",ILt="openbsd",MLt="dragonflybsd",wLt="hpux",NLt="aix",DLt="solaris",LLt="z_os",$Lt=null,xLt=null,ULt=null,FLt=null,kLt=null,GLt=null,VLt=null,BLt=null,jLt=null,zLt=null,HLt=null,qLt=null,YLt="cpp",QLt="dotnet",WLt="erlang",KLt="go",ZLt="java",XLt="nodejs",JLt="php",e$t="python",t$t="ruby",r$t="webjs",n$t=null,i$t=null,s$t=null,a$t=null,o$t=null,u$t=null,c$t=null,l$t=null,d$t=null,f$t=null,h$t=null,Lst="1.25.1",p$t,_$t="cloud.provider",m$t="cloud.account.id",g$t="cloud.region",v$t="cloud.availability_zone",S$t="cloud.platform",y$t="aws.ecs.container.arn",E$t="aws.ecs.cluster.arn",A$t="aws.ecs.launchtype",T$t="aws.ecs.task.arn",b$t="aws.ecs.task.family",C$t="aws.ecs.task.revision",R$t="aws.eks.cluster.arn",O$t="aws.log.group.names",P$t="aws.log.group.arns",I$t="aws.log.stream.names",M$t="aws.log.stream.arns",w$t="container.name",N$t="container.id",D$t="container.runtime",L$t="container.image.name",$$t="container.image.tag",x$t="deployment.environment",U$t="device.id",F$t="device.model.identifier",k$t="device.model.name",G$t="faas.name",V$t="faas.id",B$t="faas.version",j$t="faas.instance",z$t="faas.max_memory",H$t="host.id",q$t="host.name",Y$t="host.type",Q$t="host.arch",W$t="host.image.name",K$t="host.image.id",Z$t="host.image.version",X$t="k8s.cluster.name",J$t="k8s.node.name",ext="k8s.node.uid",txt="k8s.namespace.name",rxt="k8s.pod.uid",nxt="k8s.pod.name",ixt="k8s.container.name",sxt="k8s.replicaset.uid",axt="k8s.replicaset.name",oxt="k8s.deployment.uid",uxt="k8s.deployment.name",cxt="k8s.statefulset.uid",lxt="k8s.statefulset.name",dxt="k8s.daemonset.uid",fxt="k8s.daemonset.name",hxt="k8s.job.uid",pxt="k8s.job.name",_xt="k8s.cronjob.uid",mxt="k8s.cronjob.name",gxt="os.type",vxt="os.description",Sxt="os.name",yxt="os.version",Ext="process.pid",Axt="process.executable.name",Txt="process.executable.path",bxt="process.command",Cxt="process.command_line",Rxt="process.command_args",Oxt="process.owner",$st="process.runtime.name",Pxt="process.runtime.version",Ixt="process.runtime.description",Mxt="service.name",wxt="service.namespace",Nxt="service.instance.id",Dxt="service.version",xst="telemetry.sdk.name",Ust="telemetry.sdk.language",Fst="telemetry.sdk.version",Lxt="telemetry.auto.version",$xt="webengine.name",xxt="webengine.version",Uxt="webengine.description",Fxt=null,kxt=null,Gxt=null,Vxt=null,Bxt=null,jxt=null,zxt=null,Hxt=null,qxt=null,Yxt=null,Qxt=null,Wxt=null,Kxt=null,Zxt=null,Xxt=null,Jxt=null,eUt=null,tUt=null,rUt=null,nUt=null,iUt=null,sUt=null,aUt=null,oUt=null,uUt=null,cUt=null,lUt=null,dUt=null,fUt=null,hUt=null,pUt=null,_Ut=null,mUt=null,gUt=null,vUt=null,SUt=null,yUt=null,EUt=null,AUt=null,TUt=null,bUt=null,CUt=null,RUt=null,OUt=null,PUt=null,IUt=null,MUt=null,wUt=null,NUt=null,DUt=null,LUt=null,$Ut=null,xUt=null,UUt=null,FUt=null,kUt=null,GUt=null,VUt=null,BUt=null,jUt=null,zUt=null,HUt=null,qUt=null,YUt=null,QUt=null,WUt=null,KUt=null,kst=$st,ZUt=null,XUt=null,JUt=null,e1t=null,t1t=null,r1t=null,Gst=xst,Vst=Ust,Bst=Fst,n1t=null,i1t=null,s1t=null,a1t=null,o1t=null,u1t="alibaba_cloud",c1t="aws",l1t="azure",d1t="gcp",f1t=null,h1t=null,p1t=null,_1t=null,m1t=null,g1t="alibaba_cloud_ecs",v1t="alibaba_cloud_fc",S1t="aws_ec2",y1t="aws_ecs",E1t="aws_eks",A1t="aws_lambda",T1t="aws_elastic_beanstalk",b1t="azure_vm",C1t="azure_container_instances",R1t="azure_aks",O1t="azure_functions",P1t="azure_app_service",I1t="gcp_compute_engine",M1t="gcp_cloud_run",w1t="gcp_kubernetes_engine",N1t="gcp_cloud_functions",D1t="gcp_app_engine",L1t=null,$1t=null,x1t=null,U1t=null,F1t=null,k1t=null,G1t=null,V1t=null,B1t=null,j1t=null,z1t=null,H1t=null,q1t=null,Y1t=null,Q1t=null,W1t=null,K1t=null,Z1t=null,X1t="ec2",J1t="fargate",eFt=null,tFt=null,rFt=null,nFt="amd64",iFt="arm32",sFt="arm64",aFt="ia64",oFt="ppc32",uFt="ppc64",cFt="x86",lFt=null,dFt=null,fFt=null,hFt=null,pFt=null,_Ft=null,mFt=null,gFt=null,vFt="windows",SFt="linux",yFt="darwin",EFt="freebsd",AFt="netbsd",TFt="openbsd",bFt="dragonflybsd",CFt="hpux",RFt="aix",OFt="solaris",PFt="z_os",IFt=null,MFt=null,wFt=null,NFt=null,DFt=null,LFt=null,$Ft=null,xFt=null,UFt=null,FFt=null,kFt=null,GFt=null,VFt="cpp",BFt="dotnet",jFt="erlang",zFt="go",HFt="java",qFt="nodejs",YFt="php",QFt="python",WFt="ruby",jst="webjs",KFt=null,ZFt=null,XFt=null,JFt=null,ekt=null,tkt=null,rkt=null,nkt=null,ikt=null,zst=jst,skt=null,J_,em=(J_={},J_[Gst]="opentelemetry",J_[kst]="browser",J_[Vst]=zst,J_[Bst]=Lst,J_);function Hst(){return"unknown_service"}var Zd=function(){return Zd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Zd.apply(this,arguments)},qst=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Yst=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Qst=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},GO=function(){function t(e,r){var n=this,i;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return yr.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[Dst]=Hst(),e[Goe]=em[Goe],e[koe]=em[koe],e[Voe]=em[Voe],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&yr.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return qst(this,void 0,void 0,function(){return Yst(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var r=this,n;if(!e)return this;var i=Zd(Zd({},this._syncAttributes),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(i);var s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(a){var o,u=Qst(a,2),c=u[0],l=u[1];return Zd(Zd(Zd(Zd({},r._syncAttributes),c),(o=e._syncAttributes)!==null&&o!==void 0?o:e.attributes),l)});return new t(i,s)},t.EMPTY=new t({}),t}(),Boe=function(){function t(){}return t.prototype.emit=function(e){},t}(),Wst=new Boe,akt,okt="cloud.provider",ukt="cloud.account.id",ckt="cloud.region",lkt="cloud.availability_zone",dkt="cloud.platform",fkt="aws.ecs.container.arn",hkt="aws.ecs.cluster.arn",pkt="aws.ecs.launchtype",_kt="aws.ecs.task.arn",mkt="aws.ecs.task.family",gkt="aws.ecs.task.revision",vkt="aws.eks.cluster.arn",Skt="aws.log.group.names",ykt="aws.log.group.arns",Ekt="aws.log.stream.names",Akt="aws.log.stream.arns",Tkt="container.name",bkt="container.id",Ckt="container.runtime",Rkt="container.image.name",Okt="container.image.tag",Pkt="deployment.environment",Ikt="device.id",Mkt="device.model.identifier",wkt="device.model.name",Nkt="faas.name",Dkt="faas.id",Lkt="faas.version",$kt="faas.instance",xkt="faas.max_memory",Ukt="host.id",Fkt="host.name",kkt="host.type",Gkt="host.arch",Vkt="host.image.name",Bkt="host.image.id",jkt="host.image.version",zkt="k8s.cluster.name",Hkt="k8s.node.name",qkt="k8s.node.uid",Ykt="k8s.namespace.name",Qkt="k8s.pod.uid",Wkt="k8s.pod.name",Kkt="k8s.container.name",Zkt="k8s.replicaset.uid",Xkt="k8s.replicaset.name",Jkt="k8s.deployment.uid",eGt="k8s.deployment.name",tGt="k8s.statefulset.uid",rGt="k8s.statefulset.name",nGt="k8s.daemonset.uid",iGt="k8s.daemonset.name",sGt="k8s.job.uid",aGt="k8s.job.name",oGt="k8s.cronjob.uid",uGt="k8s.cronjob.name",cGt="os.type",lGt="os.description",dGt="os.name",fGt="os.version",hGt="process.pid",pGt="process.executable.name",_Gt="process.executable.path",mGt="process.command",gGt="process.command_line",vGt="process.command_args",SGt="process.owner",yGt="process.runtime.name",EGt="process.runtime.version",AGt="process.runtime.description",Kst="service.name",TGt="service.namespace",bGt="service.instance.id",CGt="service.version",Zst="telemetry.sdk.name",Xst="telemetry.sdk.language",Jst="telemetry.sdk.version",RGt="telemetry.auto.version",OGt="webengine.name",PGt="webengine.version",IGt="webengine.description",MGt=null,wGt=null,NGt=null,DGt=null,LGt=null,$Gt=null,xGt=null,UGt=null,FGt=null,kGt=null,GGt=null,VGt=null,BGt=null,jGt=null,zGt=null,HGt=null,qGt=null,YGt=null,QGt=null,WGt=null,KGt=null,ZGt=null,XGt=null,JGt=null,eVt=null,tVt=null,rVt=null,nVt=null,iVt=null,sVt=null,aVt=null,oVt=null,uVt=null,cVt=null,lVt=null,dVt=null,fVt=null,hVt=null,pVt=null,_Vt=null,mVt=null,gVt=null,vVt=null,SVt=null,yVt=null,EVt=null,AVt=null,TVt=null,bVt=null,CVt=null,RVt=null,OVt=null,PVt=null,IVt=null,MVt=null,wVt=null,NVt=null,DVt=null,LVt=null,$Vt=null,xVt=null,UVt=null,FVt=null,kVt=null,GVt=null,VVt=null,BVt=null,jVt=null,zVt=null,HVt=null,eat=Kst,qVt=null,YVt=null,QVt=null,joe=Zst,zoe=Xst,Hoe=Jst,WVt=null,KVt=null,ZVt=null,XVt=null,JVt=null,eBt="alibaba_cloud",tBt="aws",rBt="azure",nBt="gcp",iBt=null,sBt=null,aBt=null,oBt=null,uBt=null,cBt="alibaba_cloud_ecs",lBt="alibaba_cloud_fc",dBt="aws_ec2",fBt="aws_ecs",hBt="aws_eks",pBt="aws_lambda",_Bt="aws_elastic_beanstalk",mBt="azure_vm",gBt="azure_container_instances",vBt="azure_aks",SBt="azure_functions",yBt="azure_app_service",EBt="gcp_compute_engine",ABt="gcp_cloud_run",TBt="gcp_kubernetes_engine",bBt="gcp_cloud_functions",CBt="gcp_app_engine",RBt=null,OBt=null,PBt=null,IBt=null,MBt=null,wBt=null,NBt=null,DBt=null,LBt=null,$Bt=null,xBt=null,UBt=null,FBt=null,kBt=null,GBt=null,VBt=null,BBt=null,jBt=null,zBt="ec2",HBt="fargate",qBt=null,YBt=null,QBt=null,WBt="amd64",KBt="arm32",ZBt="arm64",XBt="ia64",JBt="ppc32",ejt="ppc64",tjt="x86",rjt=null,njt=null,ijt=null,sjt=null,ajt=null,ojt=null,ujt=null,cjt=null,ljt="windows",djt="linux",fjt="darwin",hjt="freebsd",pjt="netbsd",_jt="openbsd",mjt="dragonflybsd",gjt="hpux",vjt="aix",Sjt="solaris",yjt="z_os",Ejt=null,Ajt=null,Tjt=null,bjt=null,Cjt=null,Rjt=null,Ojt=null,Pjt=null,Ijt=null,Mjt=null,wjt=null,Njt=null,Djt="cpp",Ljt="dotnet",$jt="erlang",xjt="go",Ujt="java",Fjt="nodejs",kjt="php",Gjt="python",Vjt="ruby",Bjt="webjs",jjt=null,zjt=null,Hjt=null,qjt=null,Yjt=null,Qjt=null,Wjt=null,Kjt=null,Zjt=null,Xjt=null,Jjt=null;function tat(){return"unknown_service"}var Xd=function(){return Xd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Xd.apply(this,arguments)},rat=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},nat=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},iat=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},qoe=function(){function t(e,r){var n=this,i;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return yr.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[eat]=tat(),e[zoe]=em[zoe],e[joe]=em[joe],e[Hoe]=em[Hoe],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&yr.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return rat(this,void 0,void 0,function(){return nat(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var r=this,n;if(!e)return this;var i=Xd(Xd({},this._syncAttributes),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(i);var s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(a){var o,u=iat(a,2),c=u[0],l=u[1];return Xd(Xd(Xd(Xd({},r._syncAttributes),c),(o=e._syncAttributes)!==null&&o!==void 0?o:e.attributes),l)});return new t(i,s)},t.EMPTY=new t({}),t}(),sat="[object Object]",aat="[object Null]",oat="[object Undefined]",uat=Function.prototype,Yoe=uat.toString,cat=Yoe.call(Object),lat=dat(Object.getPrototypeOf,Object),Qoe=Object.prototype,Woe=Qoe.hasOwnProperty,xh=Symbol?Symbol.toStringTag:void 0,Koe=Qoe.toString;function dat(t,e){return function(r){return t(e(r))}}function Zoe(t){if(!fat(t)||hat(t)!==sat)return!1;var e=lat(t);if(e===null)return!0;var r=Woe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Yoe.call(r)===cat}function fat(t){return t!=null&&typeof t=="object"}function hat(t){return t==null?t===void 0?oat:aat:xh&&xh in Object(t)?pat(t):_at(t)}function pat(t){var e=Woe.call(t,xh),r=t[xh],n=!1;try{t[xh]=void 0,n=!0}catch{}var i=Koe.call(t);return n&&(e?t[xh]=r:delete t[xh]),i}function _at(t){return Koe.call(t)}var mat=20;function Xoe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=t.shift(),n=new WeakMap;t.length>0;)r=Joe(r,t.shift(),0,n);return r}function vk(t){return VO(t)?t.slice():t}function Joe(t,e,r,n){r===void 0&&(r=0);var i;if(!(r>mat)){if(r++,BO(t)||BO(e)||tue(e))i=vk(e);else if(VO(t)){if(i=t.slice(),VO(e))for(var s=0,a=e.length;s<a;s++)i.push(vk(e[s]));else if(ny(e))for(var o=Object.keys(e),s=0,a=o.length;s<a;s++){var u=o[s];i[u]=vk(e[u])}}else if(ny(t))if(ny(e)){if(!gat(t,e))return e;i=Object.assign({},t);for(var o=Object.keys(e),s=0,a=o.length;s<a;s++){var u=o[s],c=e[u];if(BO(c))typeof c>"u"?delete i[u]:i[u]=c;else{var l=i[u],d=c;if(eue(t,u,n)||eue(e,u,n))delete i[u];else{if(ny(l)&&ny(d)){var f=n.get(l)||[],_=n.get(d)||[];f.push({obj:t,key:u}),_.push({obj:e,key:u}),n.set(l,f),n.set(d,_)}i[u]=Joe(i[u],c,r,n)}}}}else i=e;return i}}function eue(t,e,r){for(var n=r.get(t[e])||[],i=0,s=n.length;i<s;i++){var a=n[i];if(a.key===e&&a.obj===t)return!0}return!1}function VO(t){return Array.isArray(t)}function tue(t){return typeof t=="function"}function ny(t){return!BO(t)&&!VO(t)&&!tue(t)&&typeof t=="object"}function BO(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function gat(t,e){return!(!Zoe(t)||!Zoe(e))}const Ya=Z_.getInstance();var rue=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vat=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function jO(t){var e,r,n={};if(typeof t!="object"||t==null)return n;try{for(var i=rue(Object.entries(t)),s=i.next();!s.done;s=i.next()){var a=vat(s.value,2),o=a[0],u=a[1];if(!Sat(o)){yr.warn("Invalid attribute key: "+o);continue}if(!zO(u)){yr.warn("Invalid attribute value set for key: "+o);continue}Array.isArray(u)?n[o]=u.slice():n[o]=u}}catch(c){e={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function Sat(t){return typeof t=="string"&&t.length>0}function zO(t){return t==null?!0:Array.isArray(t)?yat(t):nue(t)}function yat(t){var e,r,n;try{for(var i=rue(t),s=i.next();!s.done;s=i.next()){var a=s.value;if(a!=null){if(!n){if(nue(a)){n=typeof a;continue}return!1}if(typeof a!==n)return!1}}}catch(o){e={error:o}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return!0}function nue(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var Eat=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Aat=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},Tat=function(){function t(e,r,n){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var i=n.timestamp,s=n.observedTimestamp,a=n.severityNumber,o=n.severityText,u=n.body,c=n.attributes,l=c===void 0?{}:c,d=n.context,f=Date.now();if(this.hrTime=$h(i??f),this.hrTimeObserved=$h(s??f),d){var _=ao.getSpanContext(d);_&&XS(_)&&(this.spanContext=_)}this.severityNumber=a,this.severityText=o,this.body=u,this.resource=e.resource,this.instrumentationScope=r,this._logRecordLimits=e.logRecordLimits,this.setAttributes(l)}return Object.defineProperty(t.prototype,"severityText",{get:function(){return this._severityText},set:function(e){this._isLogRecordReadonly()||(this._severityText=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(e){this._isLogRecordReadonly()||(this._severityNumber=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"body",{get:function(){return this._body},set:function(e){this._isLogRecordReadonly()||(this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),t.prototype.setAttribute=function(e,r){return this._isLogRecordReadonly()?this:r===null?this:e.length===0?(yr.warn("Invalid attribute key: "+e),this):!zO(r)&&!(typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length>0)?(yr.warn("Invalid attribute value set for key: "+e),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.droppedAttributesCount===1&&yr.warn("Dropping extra attributes."),this):(zO(r)?this.attributes[e]=this._truncateToSize(r):this.attributes[e]=r,this))},t.prototype.setAttributes=function(e){var r,n;try{for(var i=Eat(Object.entries(e)),s=i.next();!s.done;s=i.next()){var a=Aat(s.value,2),o=a[0],u=a[1];this.setAttribute(o,u)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},t.prototype.setBody=function(e){return this.body=e,this},t.prototype.setSeverityNumber=function(e){return this.severityNumber=e,this},t.prototype.setSeverityText=function(e){return this.severityText=e,this},t.prototype._makeReadonly=function(){this._isReadonly=!0},t.prototype._truncateToSize=function(e){var r=this,n=this._logRecordLimits.attributeValueLengthLimit;return n<=0?(yr.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):e},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substring(0,r)},t.prototype._isLogRecordReadonly=function(){return this._isReadonly&&yr.warn("Can not execute the operation on emitted log record"),this._isReadonly},t}(),Sk=function(){return Sk=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Sk.apply(this,arguments)},bat=function(){function t(e,r){this.instrumentationScope=e,this._sharedState=r}return t.prototype.emit=function(e){var r=e.context||Ya.active(),n=new Tat(this._sharedState,this.instrumentationScope,Sk({context:r},e));this._sharedState.activeProcessor.onEmit(n,r),n._makeReadonly()},t}();function Cat(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:la().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:la().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function Rat(t){var e,r,n,i,s,a,o=yoe();return{attributeCountLimit:(n=(r=(e=t.attributeCountLimit)!==null&&e!==void 0?e:o.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&r!==void 0?r:o.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:ey,attributeValueLengthLimit:(a=(s=(i=t.attributeValueLengthLimit)!==null&&i!==void 0?i:o.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&s!==void 0?s:o.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:JS}}var Oat=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pat=function(t){Oat(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return e}(Error);function iue(t,e){var r,n=new Promise(function(s,a){r=setTimeout(function(){a(new Pat("Operation timed out."))},e)});return Promise.race([t,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}var sue=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},aue=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Iat=function(){function t(e,r){this.processors=e,this.forceFlushTimeoutMillis=r}return t.prototype.forceFlush=function(){return sue(this,void 0,void 0,function(){var e;return aue(this,function(r){switch(r.label){case 0:return e=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(n){return iue(n.forceFlush(),e)}))];case 1:return r.sent(),[2]}})})},t.prototype.onEmit=function(e,r){this.processors.forEach(function(n){return n.onEmit(e,r)})},t.prototype.shutdown=function(){return sue(this,void 0,void 0,function(){return aue(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.processors.map(function(r){return r.shutdown()}))];case 1:return e.sent(),[2]}})})},t}(),Mat=function(){function t(){}return t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.onEmit=function(e,r){},t.prototype.shutdown=function(){return Promise.resolve()},t}(),wat=function(){function t(e,r,n){this.resource=e,this.forceFlushTimeoutMillis=r,this.logRecordLimits=n,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Mat}return t}(),Nat="unknown",Dat=function(){function t(e){e===void 0&&(e={});var r,n=Xoe({},Cat(),e),i=qoe.default().merge((r=n.resource)!==null&&r!==void 0?r:qoe.empty());this._sharedState=new wat(i,n.forceFlushTimeoutMillis,Rat(n.logRecordLimits)),this._shutdownOnce=new $O(this._shutdown,this)}return t.prototype.getLogger=function(e,r,n){if(this._shutdownOnce.isCalled)return yr.warn("A shutdown LoggerProvider cannot provide a Logger"),Wst;e||yr.warn("Logger requested without instrumentation scope name.");var i=e||Nat,s=i+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._sharedState.loggers.has(s)||this._sharedState.loggers.set(s,new bat({name:i,version:r,schemaUrl:n?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(s)},t.prototype.addLogRecordProcessor=function(e){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(r){return yr.error("Error while trying to shutdown current log record processor",r)}),this._sharedState.registeredLogRecordProcessors.push(e),this._sharedState.activeProcessor=new Iat(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(yr.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},t.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(yr.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},t}();function Lat(){return function(t){yr.error($at(t))}}function $at(t){return typeof t=="string"?t:JSON.stringify(xat(t))}function xat(t){for(var e={},r=t;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!e[n]){var i=r[n];i&&(e[n]=String(i))}}),r=Object.getPrototypeOf(r);return e}var oue=Lat();function ezt(t){oue=t}function Pc(t){try{oue(t)}catch{}}function tzt(t){}function Uat(t,e){return new Promise(function(r){Ya.with(foe(Ya.active()),function(){t.export(e,function(n){r(n)})})})}var Fat={_export:Uat},kat=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Gat=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Vat=function(){function t(e,r){var n,i,s,a;this._exporter=e,this._finishedLogRecords=[];var o=la();this._maxExportBatchSize=(n=r?.maxExportBatchSize)!==null&&n!==void 0?n:o.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(i=r?.maxQueueSize)!==null&&i!==void 0?i:o.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(s=r?.scheduledDelayMillis)!==null&&s!==void 0?s:o.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(a=r?.exportTimeoutMillis)!==null&&a!==void 0?a:o.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new $O(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(yr.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.onEmit=function(e){this._shutdownOnce.isCalled||this._addToBuffer(e)},t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return kat(this,void 0,void 0,function(){return Gat(this,function(e){switch(e.label){case 0:return this.onShutdown(),[4,this._flushAll()];case 1:return e.sent(),[4,this._exporter.shutdown()];case 2:return e.sent(),[2]}})})},t.prototype._addToBuffer=function(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())},t.prototype._flushAll=function(){var e=this;return new Promise(function(r,n){for(var i=[],s=Math.ceil(e._finishedLogRecords.length/e._maxExportBatchSize),a=0;a<s;a++)i.push(e._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise(function(r,n){iue(e._export(e._finishedLogRecords.splice(0,e._maxExportBatchSize)),e._exportTimeoutMillis).then(function(){return r()}).catch(n)})},t.prototype._maybeStartTimer=function(){var e=this;this._timer===void 0&&(this._timer=setTimeout(function(){e._flushOneBatch().then(function(){e._finishedLogRecords.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(r){Pc(r)})},this._scheduledDelayMillis),this._timer,void 0)},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t.prototype._export=function(e){var r=this,n=function(){return Fat._export(r._exporter,e).then(function(s){var a;s.code!==Qd.SUCCESS&&Pc((a=s.error)!==null&&a!==void 0?a:new Error("BatchLogRecordProcessor: log record export failed (status "+s+")"))}).catch(Pc)},i=e.map(function(s){return s.resource}).filter(function(s){return s.asyncAttributesPending});return i.length===0?n():Promise.all(i.map(function(s){var a;return(a=s.waitForAsyncAttributes)===null||a===void 0?void 0:a.call(s)})).then(n,Pc)},t}(),Bat=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),jat=function(t){Bat(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i._onInit(n),i}return e.prototype.onShutdown=function(){typeof document>"u"||(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e.prototype._onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide===!0||typeof document>"u"||(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush()},this._pageHideListener=function(){n.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e}(Vat);class zat{inject(e,r){}extract(e,r){return e}fields(){return[]}}const Hat={get(t,e){if(t!=null)return t[e]},keys(t){return t==null?[]:Object.keys(t)}},qat={set(t,e,r){t!=null&&(t[e]=r)}},yk=ZF("OpenTelemetry Baggage Key");function uue(t){return t.getValue(yk)||void 0}function Yat(){return uue(Z_.getInstance().active())}function Qat(t,e){return t.setValue(yk,e)}function Wat(t){return t.deleteValue(yk)}const Ek="propagation",Kat=new zat;class Ak{constructor(){this.createBaggage=Xit,this.getBaggage=uue,this.getActiveBaggage=Yat,this.setBaggage=Qat,this.deleteBaggage=Wat}static getInstance(){return this._instance||(this._instance=new Ak),this._instance}setGlobalPropagator(e){return QS(Ek,e,Zo.instance())}inject(e,r,n=qat){return this._getGlobalPropagator().inject(e,r,n)}extract(e,r,n=Hat){return this._getGlobalPropagator().extract(e,r,n)}fields(){return this._getGlobalPropagator().fields()}disable(){WS(Ek,Zo.instance())}_getGlobalPropagator(){return Lh(Ek)||Kat}}const tm=Ak.getInstance();var Zat=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xat=function(){function t(e){e===void 0&&(e={});var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return t.prototype.inject=function(e,r,n){var i,s;try{for(var a=Zat(this._propagators),o=a.next();!o.done;o=a.next()){var u=o.value;try{u.inject(e,r,n)}catch(c){yr.warn("Failed to inject with "+u.constructor.name+". Err: "+c.message)}}}catch(c){i={error:c}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,r,n){return this._propagators.reduce(function(i,s){try{return s.extract(i,r,n)}catch(a){yr.warn("Failed to inject with "+s.constructor.name+". Err: "+a.message)}return i},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),cue=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},Jat=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=tm.getBaggage(e);if(!(!i||ak(e))){var s=nst(i).filter(function(o){return o.length<=boe}).slice(0,Toe),a=rst(s);a.length>0&&n.set(r,fk,a)}},t.prototype.extract=function(e,r,n){var i,s,a=n.get(r,fk);if(!a)return e;var o={},u=0,c=0;if(Array.isArray(a))for(var l=0;l<a.length;l++)i=cue(Ooe(a[l],o,u,c),2),u=i[0],c=i[1];else s=cue(Ooe(a,o,u,c),1),u=s[0];return u===0?e:tm.setBaggage(e,tm.createBaggage(o))},t.prototype.fields=function(){return[fk]},t}(),HO;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(HO||(HO={}));var qO;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(qO||(qO={}));var Tk;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Tk||(Tk={}));var rzt,nzt="aws.lambda.invoked_arn",izt="db.system",szt="db.connection_string",azt="db.user",ozt="db.jdbc.driver_classname",uzt="db.name",czt="db.statement",lzt="db.operation",dzt="db.mssql.instance_name",fzt="db.cassandra.keyspace",hzt="db.cassandra.page_size",pzt="db.cassandra.consistency_level",_zt="db.cassandra.table",mzt="db.cassandra.idempotence",gzt="db.cassandra.speculative_execution_count",vzt="db.cassandra.coordinator.id",Szt="db.cassandra.coordinator.dc",yzt="db.hbase.namespace",Ezt="db.redis.database_index",Azt="db.mongodb.collection",Tzt="db.sql.table",eot="exception.type",tot="exception.message",rot="exception.stacktrace",bzt="exception.escaped",Czt="faas.trigger",Rzt="faas.execution",Ozt="faas.document.collection",Pzt="faas.document.operation",Izt="faas.document.time",Mzt="faas.document.name",wzt="faas.time",Nzt="faas.cron",Dzt="faas.coldstart",Lzt="faas.invoked_name",$zt="faas.invoked_provider",xzt="faas.invoked_region",Uzt="net.transport",Fzt="net.peer.ip",kzt="net.peer.port",Gzt="net.peer.name",Vzt="net.host.ip",Bzt="net.host.port",jzt="net.host.name",zzt="net.host.connection.type",Hzt="net.host.connection.subtype",qzt="net.host.carrier.name",Yzt="net.host.carrier.mcc",Qzt="net.host.carrier.mnc",Wzt="net.host.carrier.icc",Kzt="peer.service",Zzt="enduser.id",Xzt="enduser.role",Jzt="enduser.scope",eHt="thread.id",tHt="thread.name",rHt="code.function",nHt="code.namespace",iHt="code.filepath",sHt="code.lineno",aHt="http.method",oHt="http.url",uHt="http.target",cHt="http.host",lHt="http.scheme",dHt="http.status_code",fHt="http.flavor",hHt="http.user_agent",pHt="http.request_content_length",_Ht="http.request_content_length_uncompressed",mHt="http.response_content_length",gHt="http.response_content_length_uncompressed",vHt="http.server_name",SHt="http.route",yHt="http.client_ip",EHt="aws.dynamodb.table_names",AHt="aws.dynamodb.consumed_capacity",THt="aws.dynamodb.item_collection_metrics",bHt="aws.dynamodb.provisioned_read_capacity",CHt="aws.dynamodb.provisioned_write_capacity",RHt="aws.dynamodb.consistent_read",OHt="aws.dynamodb.projection",PHt="aws.dynamodb.limit",IHt="aws.dynamodb.attributes_to_get",MHt="aws.dynamodb.index_name",wHt="aws.dynamodb.select",NHt="aws.dynamodb.global_secondary_indexes",DHt="aws.dynamodb.local_secondary_indexes",LHt="aws.dynamodb.exclusive_start_table",$Ht="aws.dynamodb.table_count",xHt="aws.dynamodb.scan_forward",UHt="aws.dynamodb.segment",FHt="aws.dynamodb.total_segments",kHt="aws.dynamodb.count",GHt="aws.dynamodb.scanned_count",VHt="aws.dynamodb.attribute_definitions",BHt="aws.dynamodb.global_secondary_index_updates",jHt="messaging.system",zHt="messaging.destination",HHt="messaging.destination_kind",qHt="messaging.temp_destination",YHt="messaging.protocol",QHt="messaging.protocol_version",WHt="messaging.url",KHt="messaging.message_id",ZHt="messaging.conversation_id",XHt="messaging.message_payload_size_bytes",JHt="messaging.message_payload_compressed_size_bytes",e8t="messaging.operation",t8t="messaging.consumer_id",r8t="messaging.rabbitmq.routing_key",n8t="messaging.kafka.message_key",i8t="messaging.kafka.consumer_group",s8t="messaging.kafka.client_id",a8t="messaging.kafka.partition",o8t="messaging.kafka.tombstone",u8t="rpc.system",c8t="rpc.service",l8t="rpc.method",d8t="rpc.grpc.status_code",f8t="rpc.jsonrpc.version",h8t="rpc.jsonrpc.request_id",p8t="rpc.jsonrpc.error_code",_8t="rpc.jsonrpc.error_message",m8t="message.type",g8t="message.id",v8t="message.compressed_size",S8t="message.uncompressed_size",y8t=null,E8t=null,A8t=null,T8t=null,b8t=null,C8t=null,R8t=null,O8t=null,P8t=null,I8t=null,M8t=null,w8t=null,N8t=null,D8t=null,L8t=null,$8t=null,x8t=null,U8t=null,F8t=null,k8t=null,G8t=null,bk=eot,Ck=tot,not=rot,V8t=null,B8t=null,j8t=null,z8t=null,H8t=null,q8t=null,Y8t=null,Q8t=null,W8t=null,K8t=null,Z8t=null,X8t=null,J8t=null,eqt=null,tqt=null,rqt=null,nqt=null,iqt=null,sqt=null,aqt=null,oqt=null,uqt=null,cqt=null,lqt=null,dqt=null,fqt=null,hqt=null,pqt=null,_qt=null,mqt=null,gqt=null,vqt=null,Sqt=null,yqt=null,Eqt=null,Aqt=null,Tqt=null,bqt=null,Cqt=null,Rqt=null,Oqt=null,Pqt=null,Iqt=null,Mqt=null,wqt=null,Nqt=null,Dqt=null,Lqt=null,$qt=null,xqt=null,Uqt=null,Fqt=null,kqt=null,Gqt=null,Vqt=null,Bqt=null,jqt=null,zqt=null,Hqt=null,qqt=null,Yqt=null,Qqt=null,Wqt=null,Kqt=null,Zqt=null,Xqt=null,Jqt=null,eYt=null,tYt=null,rYt=null,nYt=null,iYt=null,sYt=null,aYt=null,oYt=null,uYt=null,cYt=null,lYt=null,dYt=null,fYt=null,hYt=null,pYt=null,_Yt=null,mYt=null,gYt=null,vYt=null,SYt=null,yYt=null,EYt=null,AYt=null,TYt=null,bYt=null,CYt=null,RYt=null,OYt=null,PYt=null,IYt=null,MYt=null,wYt=null,NYt=null,DYt=null,LYt=null,$Yt=null,xYt=null,UYt=null,FYt="other_sql",kYt="mssql",GYt="mysql",VYt="oracle",BYt="db2",jYt="postgresql",zYt="redshift",HYt="hive",qYt="cloudscape",YYt="hsqldb",QYt="progress",WYt="maxdb",KYt="hanadb",ZYt="ingres",XYt="firstsql",JYt="edb",eQt="cache",tQt="adabas",rQt="firebird",nQt="derby",iQt="filemaker",sQt="informix",aQt="instantdb",oQt="interbase",uQt="mariadb",cQt="netezza",lQt="pervasive",dQt="pointbase",fQt="sqlite",hQt="sybase",pQt="teradata",_Qt="vertica",mQt="h2",gQt="coldfusion",vQt="cassandra",SQt="hbase",yQt="mongodb",EQt="redis",AQt="couchbase",TQt="couchdb",bQt="cosmosdb",CQt="dynamodb",RQt="neo4j",OQt="geode",PQt="elasticsearch",IQt="memcached",MQt="cockroachdb",wQt=null,NQt=null,DQt=null,LQt=null,$Qt=null,xQt=null,UQt=null,FQt=null,kQt=null,GQt=null,VQt=null,BQt=null,jQt=null,zQt=null,HQt=null,qQt=null,YQt=null,QQt=null,WQt=null,KQt=null,ZQt=null,XQt=null,JQt=null,eWt=null,tWt=null,rWt=null,nWt=null,iWt=null,sWt=null,aWt=null,oWt=null,uWt=null,cWt=null,lWt=null,dWt=null,fWt=null,hWt=null,pWt=null,_Wt=null,mWt=null,gWt=null,vWt=null,SWt=null,yWt=null,EWt=null,AWt=null,TWt=null,bWt=null,CWt="all",RWt="each_quorum",OWt="quorum",PWt="local_quorum",IWt="one",MWt="two",wWt="three",NWt="local_one",DWt="any",LWt="serial",$Wt="local_serial",xWt=null,UWt=null,FWt=null,kWt=null,GWt=null,VWt=null,BWt=null,jWt=null,zWt=null,HWt=null,qWt=null,YWt=null,QWt="datasource",WWt="http",KWt="pubsub",ZWt="timer",XWt="other",JWt=null,e3t=null,t3t=null,r3t=null,n3t=null,i3t=null,s3t="insert",a3t="edit",o3t="delete",u3t=null,c3t=null,l3t=null,d3t=null,f3t="alibaba_cloud",h3t="aws",p3t="azure",_3t="gcp",m3t=null,g3t=null,v3t=null,S3t=null,y3t=null,E3t="ip_tcp",A3t="ip_udp",T3t="ip",b3t="unix",C3t="pipe",R3t="inproc",O3t="other",P3t=null,I3t=null,M3t=null,w3t=null,N3t=null,D3t=null,L3t=null,$3t=null,x3t="wifi",U3t="wired",F3t="cell",k3t="unavailable",G3t="unknown",V3t=null,B3t=null,j3t=null,z3t=null,H3t=null,q3t=null,Y3t="gprs",Q3t="edge",W3t="umts",K3t="cdma",Z3t="evdo_0",X3t="evdo_a",J3t="cdma2000_1xrtt",eKt="hsdpa",tKt="hsupa",rKt="hspa",nKt="iden",iKt="evdo_b",sKt="lte",aKt="ehrpd",oKt="hspap",uKt="gsm",cKt="td_scdma",lKt="iwlan",dKt="nr",fKt="nrnsa",hKt="lte_ca",pKt=null,_Kt=null,mKt=null,gKt=null,vKt=null,SKt=null,yKt=null,EKt=null,AKt=null,TKt=null,bKt=null,CKt=null,RKt=null,OKt=null,PKt=null,IKt=null,MKt=null,wKt=null,NKt=null,DKt=null,LKt=null,$Kt=null,xKt="1.0",UKt="1.1",FKt="2.0",kKt="SPDY",GKt="QUIC",VKt=null,BKt=null,jKt=null,zKt=null,HKt=null,qKt=null,YKt="queue",QKt="topic",WKt=null,KKt=null,ZKt=null,XKt="receive",JKt="process",e2t=null,t2t=null,r2t=null,n2t=0,i2t=1,s2t=2,a2t=3,o2t=4,u2t=5,c2t=6,l2t=7,d2t=8,f2t=9,h2t=10,p2t=11,_2t=12,m2t=13,g2t=14,v2t=15,S2t=16,y2t=null,E2t=null,A2t=null,T2t=null,b2t=null,C2t=null,R2t=null,O2t=null,P2t=null,I2t=null,M2t=null,w2t=null,N2t=null,D2t=null,L2t=null,$2t=null,x2t=null,U2t=null,F2t="SENT",k2t="RECEIVED",G2t=null,V2t=null,B2t=null,iot="exception",Rk=function(){return Rk=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Rk.apply(this,arguments)},sot=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lue=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},aot=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},oot=function(){function t(e,r,n,i,s,a,o,u,c,l){o===void 0&&(o=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Tk.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=a,this.kind=s,this.links=o;var d=Date.now();this._performanceStartTime=Wd.now(),this._performanceOffset=d-(this._performanceStartTime+hk()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??d),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return r==null||this._isSpanEnded()?this:e.length===0?(yr.warn("Invalid attribute key: "+e),this):zO(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this):(yr.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var r,n;try{for(var i=sot(Object.entries(e)),s=i.next();!s.done;s=i.next()){var a=lue(s.value,2),o=a[0],u=a[1];this.setAttribute(o,u)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},t.prototype.addEvent=function(e,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return yr.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&yr.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Moe(r)&&(Moe(n)||(n=r),r=void 0);var i=jO(r);return this.events.push({name:e,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var r;return(r=this.links).push.apply(r,aot([],lue(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Rk({},e),this.status.message!=null&&typeof e.message!="string"&&(yr.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){yr.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(e),this._duration=ust(this.startTime,this.endTime),this._duration[0]<0&&(yr.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&yr.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=Wd.now())return kO(e+this._performanceOffset);if(typeof e=="number")return Kd(e);if(e instanceof Date)return Kd(e.getTime());if(pk(e))return e;if(this._startTimeProvided)return Kd(Date.now());var r=Wd.now()-this._performanceStartTime;return woe(this.startTime,Kd(r))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,r){var n={};typeof e=="string"?n[Ck]=e:e&&(e.code?n[bk]=e.code.toString():e.name&&(n[bk]=e.name),e.message&&(n[Ck]=e.message),e.stack&&(n[not]=e.stack)),n[bk]||n[Ck]?this.addEvent(iot,n,r):yr.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&yr.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substring(0,r)},t.prototype._truncateToSize=function(e){var r=this,n=this._attributeValueLengthLimit;return n<=0?(yr.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):e},t}(),rm;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(rm||(rm={}));var YO=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:rm.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),nm=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:rm.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),Ok=function(){function t(e){var r,n,i,s;this._root=e.root,this._root||(Pc(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new nm),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new nm,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new YO,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new nm,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new YO}return t.prototype.shouldSample=function(e,r,n,i,s,a){var o=ao.getSpanContext(e);return!o||!XS(o)?this._root.shouldSample(e,r,n,i,s,a):o.isRemote?o.traceFlags&Tl.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,i,s,a):this._remoteParentNotSampled.shouldSample(e,r,n,i,s,a):o.traceFlags&Tl.SAMPLED?this._localParentSampled.shouldSample(e,r,n,i,s,a):this._localParentNotSampled.shouldSample(e,r,n,i,s,a)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),due=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,r){return{decision:coe(r)&&this._accumulate(r)<this._upperBound?rm.RECORD_AND_SAMPLED:rm.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var r=0,n=0;n<e.length/8;n++){var i=n*8,s=parseInt(e.slice(i,i+8),16);r=(r^s)>>>0}return r},t}(),uot=Oc.AlwaysOn,im=1;function fue(){var t=la();return{sampler:hue(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function hue(t){switch(t===void 0&&(t=la()),t.OTEL_TRACES_SAMPLER){case Oc.AlwaysOn:return new nm;case Oc.AlwaysOff:return new YO;case Oc.ParentBasedAlwaysOn:return new Ok({root:new nm});case Oc.ParentBasedAlwaysOff:return new Ok({root:new YO});case Oc.TraceIdRatio:return new due(pue(t));case Oc.ParentBasedTraceIdRatio:return new Ok({root:new due(pue(t))});default:return yr.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+uot+'".'),new nm}}function pue(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return yr.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+im+"."),im;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(yr.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+im+"."),im):e<0||e>1?(yr.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+im+"."),im):e}function cot(t){var e={sampler:hue()},r=fue(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function lot(t){var e,r,n,i,s,a,o,u,c,l,d,f,_=Object.assign({},t.spanLimits),m=yoe();return _.attributeCountLimit=(a=(s=(i=(r=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&r!==void 0?r:(n=t.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:m.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:m.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:ey,_.attributeValueLengthLimit=(f=(d=(l=(u=(o=t.spanLimits)===null||o===void 0?void 0:o.attributeValueLengthLimit)!==null&&u!==void 0?u:(c=t.generalLimits)===null||c===void 0?void 0:c.attributeValueLengthLimit)!==null&&l!==void 0?l:m.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:m.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:JS,Object.assign({},t,{spanLimits:_})}var dot=8,fot=16,hot=function(){function t(){this.generateTraceId=_ue(fot),this.generateSpanId=_ue(dot)}return t}(),QO=Array(32);function _ue(t){return function(){for(var r=0;r<t*2;r++)QO[r]=Math.floor(Math.random()*16)+48,QO[r]>=58&&(QO[r]+=39);return String.fromCharCode.apply(null,QO.slice(0,t*2))}}var pot=function(){function t(e,r,n){this._tracerProvider=n;var i=cot(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new hot,this.resource=n.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,r,n){var i,s,a;r===void 0&&(r={}),n===void 0&&(n=Ya.active()),r.root&&(n=ao.deleteSpan(n));var o=ao.getSpan(n);if(ak(n)){yr.debug("Instrumentation suppressed, returning Noop Span");var u=ao.wrapSpanContext(aoe);return u}var c=o?.spanContext(),l=this._idGenerator.generateSpanId(),d,f,_;!c||!ao.isSpanContextValid(c)?d=this._idGenerator.generateTraceId():(d=c.traceId,f=c.traceState,_=c.spanId);var m=(i=r.kind)!==null&&i!==void 0?i:HO.INTERNAL,E=((s=r.links)!==null&&s!==void 0?s:[]).map(function(W){return{context:W.context,attributes:jO(W.attributes)}}),S=jO(r.attributes),C=this._sampler.shouldSample(n,d,e,m,S,E);f=(a=C.traceState)!==null&&a!==void 0?a:f;var w=C.decision===qO.RECORD_AND_SAMPLED?Tl.SAMPLED:Tl.NONE,x={traceId:d,spanId:l,traceFlags:w,traceState:f};if(C.decision===qO.NOT_RECORD){yr.debug("Recording is off, propagating context in a non-recording span");var u=ao.wrapSpanContext(x);return u}var V=jO(Object.assign(S,C.attributes)),H=new oot(this,n,e,x,m,_,E,r.startTime,void 0,V);return H},t.prototype.startActiveSpan=function(e,r,n,i){var s,a,o;if(!(arguments.length<2)){arguments.length===2?o=r:arguments.length===3?(s=r,o=n):(s=r,a=n,o=i);var u=a??Ya.active(),c=this.startSpan(e,s,u),l=ao.setSpan(u,c);return Ya.with(l,o,void 0,c)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),WO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mue=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,r,n=[];try{for(var i=WO(this._spanProcessors),s=i.next();!s.done;s=i.next()){var a=s.value;n.push(a.forceFlush())}}catch(o){e={error:o}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return new Promise(function(o){Promise.all(n).then(function(){o()}).catch(function(u){Pc(u||new Error("MultiSpanProcessor: forceFlush failed")),o()})})},t.prototype.onStart=function(e,r){var n,i;try{for(var s=WO(this._spanProcessors),a=s.next();!a.done;a=s.next()){var o=a.value;o.onStart(e,r)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(e){var r,n;try{for(var i=WO(this._spanProcessors),s=i.next();!s.done;s=i.next()){var a=s.value;a.onEnd(e)}}catch(o){r={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.shutdown=function(){var e,r,n=[];try{for(var i=WO(this._spanProcessors),s=i.next();!s.done;s=i.next()){var a=s.value;n.push(a.shutdown())}}catch(o){e={error:o}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return new Promise(function(o,u){Promise.all(n).then(function(){o()},u)})},t}(),_ot=function(){function t(){}return t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}(),mot=function(){function t(e,r){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=la();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new $O(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(yr.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Tl.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&yr.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(yr.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(r,n){for(var i=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),a=0,o=s;a<o;a++)i.push(e._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},e._exportTimeoutMillis);Ya.with(foe(Ya.active()),function(){var s;e._finishedSpans.length<=e._maxExportBatchSize?(s=e._finishedSpans,e._finishedSpans=[]):s=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var a=function(){return e._exporter.export(s,function(d){var f;clearTimeout(i),d.code===Qd.SUCCESS?r():n((f=d.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},o=null,u=0,c=s.length;u<c;u++){var l=s[u];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(o??(o=[]),o.push(l.resource.waitForAsyncAttributes()))}o===null?a():Promise.all(o).then(a,function(d){Pc(d),n(d)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var r=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(n){e._isExporting=!1,Pc(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis),this._timer,void 0)}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}(),got=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vot=function(t){got(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.onInit(n),i}return e.prototype.onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){Pc(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){Pc(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(mot),Sot=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},yot=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},Uh;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Uh||(Uh={}));var Eot=function(){function t(e){e===void 0&&(e={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Xoe({},fue(),lot(e));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:GO.empty(),i.mergeResourceWithDefaults&&(this.resource=GO.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=e.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=yot([],Sot(e.spanProcessors),!1),this.activeSpanProcessor=new mue(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var a=new vot(s);this.activeSpanProcessor=a}else this.activeSpanProcessor=new _ot}}return t.prototype.getTracer=function(e,r,n){var i=e+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new pot({name:e,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(i)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return yr.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new mue(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),ao.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&Ya.setGlobalContextManager(e.contextManager),e.propagator&&tm.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var s,a=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),s=Uh.timeout},e);n.forceFlush().then(function(){clearTimeout(a),s!==Uh.timeout&&(s=Uh.resolved,i(s))}).catch(function(o){clearTimeout(a),s=Uh.error,i(o)})})});return new Promise(function(n,i){Promise.all(r).then(function(s){var a=s.filter(function(o){return o!==Uh.resolved});a.length>0?i(a):n()}).catch(function(s){return i([s])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var r;return(r=this.constructor._registeredPropagators.get(e))===null||r===void 0?void 0:r()},t.prototype._getSpanExporter=function(e){var r;return(r=this.constructor._registeredExporters.get(e))===null||r===void 0?void 0:r()},t.prototype._buildPropagatorFromEnv=function(){var e=this,r=Array.from(new Set(la().OTEL_PROPAGATORS)),n=r.map(function(s){var a=e._getPropagator(s);return a||yr.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),a}),i=n.reduce(function(s,a){return a&&s.push(a),s},[]);if(i.length!==0)return r.length===1?i[0]:new Xat({propagators:i})},t.prototype._buildExporterFromEnv=function(){var e=la().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var r=this._getSpanExporter(e);return r||yr.error('Exporter "'+e+'" requested through environment variable is unavailable.'),r}},t._registeredPropagators=new Map([["tracecontext",function(){return new moe}],["baggage",function(){return new Jat}]]),t._registeredExporters=new Map,t}(),Aot=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},Tot=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},bot=function(){function t(){this._enabled=!1,this._currentContext=K_}return t.prototype._bindFunction=function(e,r){e===void 0&&(e=K_);var n=this,i=function(){for(var s=this,a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return n.with(e,function(){return r.apply(s,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(e,r){return e===void 0&&(e=this.active()),typeof r=="function"?this._bindFunction(e,r):r},t.prototype.disable=function(){return this._currentContext=K_,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=K_,this)},t.prototype.with=function(e,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];var a=this._currentContext;this._currentContext=e||K_;try{return r.call.apply(r,Tot([n],Aot(i),!1))}finally{this._currentContext=a}},t}(),Cot=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rot=function(t){Cot(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,r)||this;if(r.contextManager)throw"contextManager should be defined in register method not in constructor";if(r.propagator)throw"propagator should be defined in register method not in constructor";return n}return e.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new bot),r.contextManager&&r.contextManager.enable(),t.prototype.register.call(this,r)},e}(Eot),j2t;const z2t="cloud.provider",H2t="cloud.account.id",q2t="cloud.region",Y2t="cloud.availability_zone",Q2t="cloud.platform",W2t="aws.ecs.container.arn",K2t="aws.ecs.cluster.arn",Z2t="aws.ecs.launchtype",X2t="aws.ecs.task.arn",J2t="aws.ecs.task.family",e4t="aws.ecs.task.revision",t4t="aws.eks.cluster.arn",r4t="aws.log.group.names",n4t="aws.log.group.arns",i4t="aws.log.stream.names",s4t="aws.log.stream.arns",a4t="container.name",o4t="container.id",u4t="container.runtime",c4t="container.image.name",l4t="container.image.tag",Oot="deployment.environment",d4t="device.id",f4t="device.model.identifier",h4t="device.model.name",p4t="faas.name",_4t="faas.id",m4t="faas.version",g4t="faas.instance",v4t="faas.max_memory",S4t="host.id",y4t="host.name",E4t="host.type",A4t="host.arch",T4t="host.image.name",b4t="host.image.id",C4t="host.image.version",R4t="k8s.cluster.name",O4t="k8s.node.name",P4t="k8s.node.uid",I4t="k8s.namespace.name",M4t="k8s.pod.uid",w4t="k8s.pod.name",N4t="k8s.container.name",D4t="k8s.replicaset.uid",L4t="k8s.replicaset.name",$4t="k8s.deployment.uid",x4t="k8s.deployment.name",U4t="k8s.statefulset.uid",F4t="k8s.statefulset.name",k4t="k8s.daemonset.uid",G4t="k8s.daemonset.name",V4t="k8s.job.uid",B4t="k8s.job.name",j4t="k8s.cronjob.uid",z4t="k8s.cronjob.name",H4t="os.type",q4t="os.description",Y4t="os.name",Q4t="os.version",W4t="process.pid",K4t="process.executable.name",Z4t="process.executable.path",X4t="process.command",J4t="process.command_line",e6t="process.command_args",t6t="process.owner",r6t="process.runtime.name",n6t="process.runtime.version",i6t="process.runtime.description",Pot="service.name",Iot="service.namespace",s6t="service.instance.id",Mot="service.version",a6t="telemetry.sdk.name",wot="telemetry.sdk.language",o6t="telemetry.sdk.version",u6t="telemetry.auto.version",c6t="webengine.name",l6t="webengine.version",d6t="webengine.description",f6t=null,h6t=null,p6t=null,_6t=null,m6t=null,g6t=null,v6t=null,S6t=null,y6t=null,E6t=null,A6t=null,T6t=null,b6t=null,C6t=null,R6t=null,O6t=null,P6t=null,I6t=null,M6t=null,w6t=null,N6t=null,Not=Oot,D6t=null,L6t=null,$6t=null,x6t=null,U6t=null,F6t=null,k6t=null,G6t=null,V6t=null,B6t=null,j6t=null,z6t=null,H6t=null,q6t=null,Y6t=null,Q6t=null,W6t=null,K6t=null,Z6t=null,X6t=null,J6t=null,e5t=null,t5t=null,r5t=null,n5t=null,i5t=null,s5t=null,a5t=null,o5t=null,u5t=null,c5t=null,l5t=null,d5t=null,f5t=null,h5t=null,p5t=null,_5t=null,m5t=null,g5t=null,v5t=null,S5t=null,y5t=null,E5t=null,A5t=null,T5t=null,b5t=null,C5t=null,R5t=null,Dot=Pot,Lot=Iot,O5t=null,$ot=Mot,P5t=null,xot=wot,I5t=null,M5t=null,w5t=null,N5t=null,D5t=null,L5t=null,$5t="alibaba_cloud",x5t="aws",U5t="azure",F5t="gcp",k5t=null,G5t=null,V5t=null,B5t=null,j5t=null,z5t="alibaba_cloud_ecs",H5t="alibaba_cloud_fc",q5t="aws_ec2",Y5t="aws_ecs",Q5t="aws_eks",W5t="aws_lambda",K5t="aws_elastic_beanstalk",Z5t="azure_vm",X5t="azure_container_instances",J5t="azure_aks",e9t="azure_functions",t9t="azure_app_service",r9t="gcp_compute_engine",n9t="gcp_cloud_run",i9t="gcp_kubernetes_engine",s9t="gcp_cloud_functions",a9t="gcp_app_engine",o9t=null,u9t=null,c9t=null,l9t=null,d9t=null,f9t=null,h9t=null,p9t=null,_9t=null,m9t=null,g9t=null,v9t=null,S9t=null,y9t=null,E9t=null,A9t=null,T9t=null,b9t=null,C9t="ec2",R9t="fargate",O9t=null,P9t=null,I9t=null,M9t="amd64",w9t="arm32",N9t="arm64",D9t="ia64",L9t="ppc32",$9t="ppc64",x9t="x86",U9t=null,F9t=null,k9t=null,G9t=null,V9t=null,B9t=null,j9t=null,z9t=null,H9t="windows",q9t="linux",Y9t="darwin",Q9t="freebsd",W9t="netbsd",K9t="openbsd",Z9t="dragonflybsd",X9t="hpux",J9t="aix",e7t="solaris",t7t="z_os",r7t=null,n7t=null,i7t=null,s7t=null,a7t=null,o7t=null,u7t=null,c7t=null,l7t=null,d7t=null,f7t=null,h7t=null,p7t="cpp",_7t="dotnet",m7t="erlang",g7t="go",v7t="java",S7t="nodejs",y7t="php",E7t="python",A7t="ruby",T7t="webjs",b7t=null,C7t=null,R7t=null,O7t=null,P7t=null,I7t=null,M7t=null,w7t=null,N7t=null,D7t=null,L7t=null;var Uot=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Fot=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};function kot(t,e,r){var n,i;try{i=t()}catch(s){n=s}finally{if(e(n,i),n&&!r)throw n;return i}}function $7t(t,e,r){return Uot(this,void 0,void 0,function(){var n,i,s;return Fot(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,t()];case 1:return i=a.sent(),[3,4];case 2:return s=a.sent(),n=s,[3,4];case 3:if(e(n,i),n&&!r)throw n;return[2,i];case 4:return[2]}})})}function gue(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}class Got{constructor(){}createGauge(e,r){return Wot}createHistogram(e,r){return Kot}createCounter(e,r){return Qot}createUpDownCounter(e,r){return Zot}createObservableGauge(e,r){return Jot}createObservableCounter(e,r){return Xot}createObservableUpDownCounter(e,r){return eut}addBatchObservableCallback(e,r){}removeBatchObservableCallback(e){}}class KO{}class Vot extends KO{add(e,r){}}class Bot extends KO{add(e,r){}}class jot extends KO{record(e,r){}}class zot extends KO{record(e,r){}}class Pk{addCallback(e){}removeCallback(e){}}class Hot extends Pk{}class qot extends Pk{}class Yot extends Pk{}const vue=new Got,Qot=new Vot,Wot=new jot,Kot=new zot,Zot=new Bot,Xot=new Hot,Jot=new qot,eut=new Yot;function x7t(){return vue}class tut{getMeter(e,r,n){return vue}}const rut=new tut,Ik="metrics";class Mk{constructor(){}static getInstance(){return this._instance||(this._instance=new Mk),this._instance}setGlobalMeterProvider(e){return QS(Ik,e,Zo.instance())}getMeterProvider(){return Lh(Ik)||rut}getMeter(e,r,n){return this.getMeterProvider().getMeter(e,r,n)}disable(){WS(Ik,Zo.instance())}}const nut=Mk.getInstance();var iut=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof globalThis=="object"?globalThis:{},ZO=Symbol.for("io.opentelemetry.js.api.logs"),iy=iut;function sut(t,e,r){return function(n){return n===t?e:r}}var Sue=1,aut=function(){function t(){}return t.prototype.getLogger=function(e,r,n){return new Boe},t}(),yue=new aut,out=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return iy[ZO]?this.getLoggerProvider():(iy[ZO]=sut(Sue,e,yue),e)},t.prototype.getLoggerProvider=function(){var e,r;return(r=(e=iy[ZO])===null||e===void 0?void 0:e.call(iy,Sue))!==null&&r!==void 0?r:yue},t.prototype.getLogger=function(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)},t.prototype.disable=function(){delete iy[ZO]},t}(),uut=out.getInstance();Hr();var XO=function(){return XO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},XO.apply(this,arguments)},cut=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._wrap=Hr().wrap,this._unwrap=Hr().unwrap,this._massWrap=Hr().massWrap,this._massUnwrap=Hr().massUnwrap,this._config=XO({enabled:!0},n),this._diag=yr.createComponentLogger({namespace:e}),this._tracer=ao.getTracer(e,r),this._meter=nut.getMeter(e,r),this._logger=uut.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=XO({},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}},t}(),lut=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),dut=function(t){lut(e,t);function e(r,n,i){var s=t.call(this,r,n,i)||this;return s._config.enabled&&s.enable(),s}return e}(cut),fut=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Eue(t,e){return typeof e=="string"?t===e:!!t.match(e)}function hut(t,e){var r,n;if(!e)return!1;try{for(var i=fut(e),s=i.next();!s.done;s=i.next()){var a=s.value;if(Eue(t,a))return!0}}catch(o){r={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var U7t,F7t="aws.lambda.invoked_arn",k7t="db.system",G7t="db.connection_string",V7t="db.user",B7t="db.jdbc.driver_classname",j7t="db.name",z7t="db.statement",H7t="db.operation",q7t="db.mssql.instance_name",Y7t="db.cassandra.keyspace",Q7t="db.cassandra.page_size",W7t="db.cassandra.consistency_level",K7t="db.cassandra.table",Z7t="db.cassandra.idempotence",X7t="db.cassandra.speculative_execution_count",J7t="db.cassandra.coordinator.id",eZt="db.cassandra.coordinator.dc",tZt="db.hbase.namespace",rZt="db.redis.database_index",nZt="db.mongodb.collection",iZt="db.sql.table",sZt="exception.type",aZt="exception.message",oZt="exception.stacktrace",uZt="exception.escaped",cZt="faas.trigger",lZt="faas.execution",dZt="faas.document.collection",fZt="faas.document.operation",hZt="faas.document.time",pZt="faas.document.name",_Zt="faas.time",mZt="faas.cron",gZt="faas.coldstart",vZt="faas.invoked_name",SZt="faas.invoked_provider",yZt="faas.invoked_region",EZt="net.transport",AZt="net.peer.ip",TZt="net.peer.port",bZt="net.peer.name",CZt="net.host.ip",RZt="net.host.port",OZt="net.host.name",PZt="net.host.connection.type",IZt="net.host.connection.subtype",MZt="net.host.carrier.name",wZt="net.host.carrier.mcc",NZt="net.host.carrier.mnc",DZt="net.host.carrier.icc",LZt="peer.service",$Zt="enduser.id",xZt="enduser.role",UZt="enduser.scope",FZt="thread.id",kZt="thread.name",GZt="code.function",VZt="code.namespace",BZt="code.filepath",jZt="code.lineno",put="http.method",_ut="http.url",zZt="http.target",mut="http.host",gut="http.scheme",vut="http.status_code",HZt="http.flavor",Sut="http.user_agent",qZt="http.request_content_length",YZt="http.request_content_length_uncompressed",yut="http.response_content_length",Eut="http.response_content_length_uncompressed",QZt="http.server_name",WZt="http.route",KZt="http.client_ip",ZZt="aws.dynamodb.table_names",XZt="aws.dynamodb.consumed_capacity",JZt="aws.dynamodb.item_collection_metrics",eXt="aws.dynamodb.provisioned_read_capacity",tXt="aws.dynamodb.provisioned_write_capacity",rXt="aws.dynamodb.consistent_read",nXt="aws.dynamodb.projection",iXt="aws.dynamodb.limit",sXt="aws.dynamodb.attributes_to_get",aXt="aws.dynamodb.index_name",oXt="aws.dynamodb.select",uXt="aws.dynamodb.global_secondary_indexes",cXt="aws.dynamodb.local_secondary_indexes",lXt="aws.dynamodb.exclusive_start_table",dXt="aws.dynamodb.table_count",fXt="aws.dynamodb.scan_forward",hXt="aws.dynamodb.segment",pXt="aws.dynamodb.total_segments",_Xt="aws.dynamodb.count",mXt="aws.dynamodb.scanned_count",gXt="aws.dynamodb.attribute_definitions",vXt="aws.dynamodb.global_secondary_index_updates",SXt="messaging.system",yXt="messaging.destination",EXt="messaging.destination_kind",AXt="messaging.temp_destination",TXt="messaging.protocol",bXt="messaging.protocol_version",CXt="messaging.url",RXt="messaging.message_id",OXt="messaging.conversation_id",PXt="messaging.message_payload_size_bytes",IXt="messaging.message_payload_compressed_size_bytes",MXt="messaging.operation",wXt="messaging.consumer_id",NXt="messaging.rabbitmq.routing_key",DXt="messaging.kafka.message_key",LXt="messaging.kafka.consumer_group",$Xt="messaging.kafka.client_id",xXt="messaging.kafka.partition",UXt="messaging.kafka.tombstone",FXt="rpc.system",kXt="rpc.service",GXt="rpc.method",VXt="rpc.grpc.status_code",BXt="rpc.jsonrpc.version",jXt="rpc.jsonrpc.request_id",zXt="rpc.jsonrpc.error_code",HXt="rpc.jsonrpc.error_message",qXt="message.type",YXt="message.id",QXt="message.compressed_size",WXt="message.uncompressed_size",KXt=null,ZXt=null,XXt=null,JXt=null,eJt=null,tJt=null,rJt=null,nJt=null,iJt=null,sJt=null,aJt=null,oJt=null,uJt=null,cJt=null,lJt=null,dJt=null,fJt=null,hJt=null,pJt=null,_Jt=null,mJt=null,gJt=null,vJt=null,SJt=null,yJt=null,EJt=null,AJt=null,TJt=null,bJt=null,CJt=null,RJt=null,OJt=null,PJt=null,IJt=null,MJt=null,wJt=null,NJt=null,DJt=null,LJt=null,$Jt=null,xJt=null,UJt=null,FJt=null,kJt=null,GJt=null,VJt=null,BJt=null,jJt=null,zJt=null,HJt=null,qJt=null,YJt=null,QJt=null,WJt=null,KJt=null,ZJt=null,XJt=null,JJt=null,eer=null,ter=null,Aut=put,Tut=_ut,rer=null,but=mut,Cut=gut,Rut=vut,ner=null,Out=Sut,ier=null,ser=null,Put=yut,Iut=Eut,aer=null,oer=null,uer=null,cer=null,ler=null,der=null,fer=null,her=null,per=null,_er=null,mer=null,ger=null,ver=null,Ser=null,yer=null,Eer=null,Aer=null,Ter=null,ber=null,Cer=null,Rer=null,Oer=null,Per=null,Ier=null,Mer=null,wer=null,Ner=null,Der=null,Ler=null,$er=null,xer=null,Uer=null,Fer=null,ker=null,Ger=null,Ver=null,Ber=null,jer=null,zer=null,Her=null,qer=null,Yer=null,Qer=null,Wer=null,Ker=null,Zer=null,Xer=null,Jer=null,etr=null,ttr=null,rtr=null,ntr=null,itr=null,str=null,atr=null,otr=null,utr=null,ctr="other_sql",ltr="mssql",dtr="mysql",ftr="oracle",htr="db2",ptr="postgresql",_tr="redshift",mtr="hive",gtr="cloudscape",vtr="hsqldb",Str="progress",ytr="maxdb",Etr="hanadb",Atr="ingres",Ttr="firstsql",btr="edb",Ctr="cache",Rtr="adabas",Otr="firebird",Ptr="derby",Itr="filemaker",Mtr="informix",wtr="instantdb",Ntr="interbase",Dtr="mariadb",Ltr="netezza",$tr="pervasive",xtr="pointbase",Utr="sqlite",Ftr="sybase",ktr="teradata",Gtr="vertica",Vtr="h2",Btr="coldfusion",jtr="cassandra",ztr="hbase",Htr="mongodb",qtr="redis",Ytr="couchbase",Qtr="couchdb",Wtr="cosmosdb",Ktr="dynamodb",Ztr="neo4j",Xtr="geode",Jtr="elasticsearch",err="memcached",trr="cockroachdb",rrr=null,nrr=null,irr=null,srr=null,arr=null,orr=null,urr=null,crr=null,lrr=null,drr=null,frr=null,hrr=null,prr=null,_rr=null,mrr=null,grr=null,vrr=null,Srr=null,yrr=null,Err=null,Arr=null,Trr=null,brr=null,Crr=null,Rrr=null,Orr=null,Prr=null,Irr=null,Mrr=null,wrr=null,Nrr=null,Drr=null,Lrr=null,$rr=null,xrr=null,Urr=null,Frr=null,krr=null,Grr=null,Vrr=null,Brr=null,jrr=null,zrr=null,Hrr=null,qrr=null,Yrr=null,Qrr=null,Wrr=null,Krr="all",Zrr="each_quorum",Xrr="quorum",Jrr="local_quorum",enr="one",tnr="two",rnr="three",nnr="local_one",inr="any",snr="serial",anr="local_serial",onr=null,unr=null,cnr=null,lnr=null,dnr=null,fnr=null,hnr=null,pnr=null,_nr=null,mnr=null,gnr=null,vnr=null,Snr="datasource",ynr="http",Enr="pubsub",Anr="timer",Tnr="other",bnr=null,Cnr=null,Rnr=null,Onr=null,Pnr=null,Inr=null,Mnr="insert",wnr="edit",Nnr="delete",Dnr=null,Lnr=null,$nr=null,xnr=null,Unr="alibaba_cloud",Fnr="aws",knr="azure",Gnr="gcp",Vnr=null,Bnr=null,jnr=null,znr=null,Hnr=null,qnr="ip_tcp",Ynr="ip_udp",Qnr="ip",Wnr="unix",Knr="pipe",Znr="inproc",Xnr="other",Jnr=null,eir=null,tir=null,rir=null,nir=null,iir=null,sir=null,air=null,oir="wifi",uir="wired",cir="cell",lir="unavailable",dir="unknown",fir=null,hir=null,pir=null,_ir=null,mir=null,gir=null,vir="gprs",Sir="edge",yir="umts",Eir="cdma",Air="evdo_0",Tir="evdo_a",bir="cdma2000_1xrtt",Cir="hsdpa",Rir="hsupa",Oir="hspa",Pir="iden",Iir="evdo_b",Mir="lte",wir="ehrpd",Nir="hspap",Dir="gsm",Lir="td_scdma",$ir="iwlan",xir="nr",Uir="nrnsa",Fir="lte_ca",kir=null,Gir=null,Vir=null,Bir=null,jir=null,zir=null,Hir=null,qir=null,Yir=null,Qir=null,Wir=null,Kir=null,Zir=null,Xir=null,Jir=null,esr=null,tsr=null,rsr=null,nsr=null,isr=null,ssr=null,asr=null,osr="1.0",usr="1.1",csr="2.0",lsr="SPDY",dsr="QUIC",fsr=null,hsr=null,psr=null,_sr=null,msr=null,gsr=null,vsr="queue",Ssr="topic",ysr=null,Esr=null,Asr=null,Tsr="receive",bsr="process",Csr=null,Rsr=null,Osr=null,Psr=0,Isr=1,Msr=2,wsr=3,Nsr=4,Dsr=5,Lsr=6,$sr=7,xsr=8,Usr=9,Fsr=10,ksr=11,Gsr=12,Vsr=13,Bsr=14,jsr=15,zsr=16,Hsr=null,qsr=null,Ysr=null,Qsr=null,Wsr=null,Ksr=null,Zsr=null,Xsr=null,Jsr=null,ear=null,tar=null,rar=null,nar=null,iar=null,sar=null,aar=null,oar=null,uar=null,car="SENT",lar="RECEIVED",dar=null,far=null,har=null,Ci;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(Ci||(Ci={}));var wk;function Mut(){return wk||(wk=document.createElement("a")),wk}function Nk(t,e){return e in t}function Cl(t,e,r,n){var i=void 0,s=void 0;Nk(r,e)&&typeof r[e]=="number"&&(i=r[e]);var a=n||Ci.FETCH_START;if(Nk(r,a)&&typeof r[a]=="number"&&(s=r[a]),i!==void 0&&s!==void 0&&i>=s)return t.addEvent(e,i),t}function Aue(t,e){Cl(t,Ci.FETCH_START,e),Cl(t,Ci.DOMAIN_LOOKUP_START,e),Cl(t,Ci.DOMAIN_LOOKUP_END,e),Cl(t,Ci.CONNECT_START,e),Nk(e,"name")&&e.name.startsWith("https:")&&Cl(t,Ci.SECURE_CONNECTION_START,e),Cl(t,Ci.CONNECT_END,e),Cl(t,Ci.REQUEST_START,e),Cl(t,Ci.RESPONSE_START,e),Cl(t,Ci.RESPONSE_END,e);var r=e[Ci.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute(Put,r);var n=e[Ci.DECODED_BODY_SIZE];n!==void 0&&r!==n&&t.setAttribute(Iut,n)}function wut(t){return t.slice().sort(function(e,r){var n=e[Ci.FETCH_START],i=r[Ci.FETCH_START];return n>i?1:n<i?-1:0})}function Tue(){return typeof location<"u"?location.origin:void 0}function Nut(t,e,r,n,i,s){i===void 0&&(i=new WeakSet);var a=Jd(t);t=a.toString();var o=Lut(t,e,r,n,i,s);if(o.length===0)return{mainRequest:void 0};if(o.length===1)return{mainRequest:o[0]};var u=wut(o);if(a.origin!==Tue()&&u.length>1){var c=u[0],l=Dut(u,c[Ci.RESPONSE_END],r),d=c[Ci.RESPONSE_END],f=l[Ci.FETCH_START];return f<d&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}else return{mainRequest:o[0]}}function Dut(t,e,r){for(var n=bl(r),i=bl($h(e)),s=t[1],a,o=t.length,u=1;u<o;u++){var c=t[u],l=bl($h(c[Ci.FETCH_START])),d=bl($h(c[Ci.RESPONSE_END])),f=n-d;l>=i&&(!a||f<a)&&(a=f,s=c)}return s}function Lut(t,e,r,n,i,s){var a=bl(e),o=bl(r),u=n.filter(function(c){var l=bl($h(c[Ci.FETCH_START])),d=bl($h(c[Ci.RESPONSE_END]));return c.initiatorType.toLowerCase()===(s||"xmlhttprequest")&&c.name===t&&l>=a&&d<=o});return u.length>0&&(u=u.filter(function(c){return!i.has(c)})),u}function Jd(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=Mut();return e.href=t,e}function par(t){var e=Jd(t);return e.href}function $ut(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var r=Uut(t,e);if(e&&r.indexOf("@id")>0)return r;var n="";return t.parentNode&&(n+=$ut(t.parentNode,!1)),n+=r,n}function xut(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var r=Array.from(t.parentNode.childNodes);return r=r.filter(function(n){var i=n.localName;return e.indexOf(n.nodeType)>=0&&i===t.localName}),r.length>=1?r.indexOf(t)+1:0}function Uut(t,e){var r=t.nodeType,n=xut(t),i="";if(r===Node.ELEMENT_NODE){var s=t.getAttribute("id");if(e&&s)return'//*[@id="'+s+'"]';i=t.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else if(r===Node.COMMENT_NODE)i="comment()";else return"";return i&&n>1?"/"+i+"["+n+"]":"/"+i}function Fut(t,e){var r=e||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=Jd(t);return n.origin===Tue()?!0:r.some(function(i){return Eue(t,i)})}var Rl;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(Rl||(Rl={}));var bue="0.52.1",Dk;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Dk||(Dk={}));var kut=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gut=300,Vut=function(t){kut(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",bue,r)||this;return n.component="xml-http-request",n.version=bue,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return e.prototype.init=function(){},e.prototype._addHeaders=function(r,n){var i=Jd(n).href;if(!Fut(i,this.getConfig().propagateTraceHeaderCorsUrls)){var s={};tm.inject(Ya.active(),s),Object.keys(s).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};tm.inject(Ya.active(),a),Object.keys(a).forEach(function(o){r.setRequestHeader(o,String(a[o]))})},e.prototype._addChildSpan=function(r,n){var i=this;Ya.with(ao.setSpan(Ya.active(),r),function(){var s=i.tracer.startSpan("CORS Preflight",{startTime:n[Ci.FETCH_START]});i.getConfig().ignoreNetworkEvents||Aue(s,n),s.end(n[Ci.RESPONSE_END])})},e.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var s=Jd(i);n.status!==void 0&&r.setAttribute(Rut,n.status),n.statusText!==void 0&&r.setAttribute(Dk.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(but,s.host),r.setAttribute(Cut,s.protocol.replace(":","")),r.setAttribute(Out,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(r,n){var i=this,s=this.getConfig().applyCustomAttributesOnSpan;typeof s=="function"&&kot(function(){return s(r,n)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)},!0)},e.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(s){var a=s.getEntries(),o=Jd(n);a.forEach(function(u){u.initiatorType==="xmlhttprequest"&&u.name===o.href&&i.createdResources&&i.createdResources.entries.push(u)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(Wd.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(r,n,i,s,a){if(!(!i||!s||!a||!r.createdResources)){var o=r.createdResources.entries;(!o||!o.length)&&(o=Wd.getEntriesByType("resource"));var u=Nut(Jd(i).href,s,a,o,this._usedResources);if(u.mainRequest){var c=u.mainRequest;this._markResourceAsUsed(c);var l=u.corsPreFlightRequest;l&&(this._addChildSpan(n,l),this._markResourceAsUsed(l)),this.getConfig().ignoreNetworkEvents||Aue(n,c)}}},e.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},e.prototype._createSpan=function(r,n,i){var s;if(hut(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var a=i.toUpperCase(),o=this.tracer.startSpan(a,{kind:HO.CLIENT,attributes:(s={},s[Aut]=i,s[Tut]=Jd(n).toString(),s)});return o.addEvent(Rl.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:o,spanUrl:n}),o},e.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},e.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var u=a[0],c=a[1];return i._createSpan(this,c,u),n.apply(this,a)}}},e.prototype._patchSend=function(){var r=this;function n(l,d,f,_){var m=d.callbackToRemoveEvents;typeof m=="function"&&m();var E=d.span,S=d.spanUrl,C=d.sendStartTime;E&&(r._findResourceAndAddNetworkEvents(d,E,S,C,f),E.addEvent(l,_),r._addFinalSpanAttributes(E,d,S),E.end(_),r._tasksCount--),r._clearResources()}function i(l,d){var f=r._xhrMem.get(d);if(f){f.status=d.status,f.statusText=d.statusText,r._xhrMem.delete(d),f.span&&r._applyAttributesAfterXHR(f.span,d);var _=kO(),m=Date.now();setTimeout(function(){n(l,f,_,m)},Gut)}}function s(){i(Rl.EVENT_ERROR,this)}function a(){i(Rl.EVENT_ABORT,this)}function o(){i(Rl.EVENT_TIMEOUT,this)}function u(){this.status<299?i(Rl.EVENT_LOAD,this):i(Rl.EVENT_ERROR,this)}function c(l){l.removeEventListener("abort",a),l.removeEventListener("error",s),l.removeEventListener("load",u),l.removeEventListener("timeout",o);var d=r._xhrMem.get(l);d&&(d.callbackToRemoveEvents=void 0)}return function(l){return function(){for(var f=this,_=[],m=0;m<arguments.length;m++)_[m]=arguments[m];var E=r._xhrMem.get(this);if(!E)return l.apply(this,_);var S=E.span,C=E.spanUrl;return S&&C&&Ya.with(ao.setSpan(Ya.active(),S),function(){r._tasksCount++,E.sendStartTime=kO(),S.addEvent(Rl.METHOD_SEND),f.addEventListener("abort",a),f.addEventListener("error",s),f.addEventListener("load",u),f.addEventListener("timeout",o),E.callbackToRemoveEvents=function(){c(f),E.createdResources&&E.createdResources.observer.disconnect()},r._addHeaders(f,C),r._addResourceObserver(f,C)}),l.apply(this,_)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),gue(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),gue(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},e.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},e}(dut);const But="https?://api-gateway.[a-zA-Z]+.icanbwell.com",Cue=new RegExp(`^(?!${But})`);function _ar(t){return Cue.test(t)}function jut(t){return Oie({node:()=>null,browser:()=>new Vut({ignoreUrls:[Cue],propagateTraceHeaderCorsUrls:[t.graphQL.apiUrl,t.graphQL.unauthApiUrl]})})}var Ic=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Lk=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},sm,am,sy,JO,Rue,Oue,Pue,Iue;class zut{constructor(e){sm.add(this),am.set(this,void 0),sy.set(this,void 0),JO.set(this,void 0),Lk(this,am,Ic(this,sm,"m",Rue).call(this,e),"f"),Lk(this,sy,Ic(this,sm,"m",Oue).call(this),"f"),Lk(this,JO,Ic(this,sm,"m",Pue).call(this,e),"f"),this.fetchInstrumentation=Ic(this,sm,"m",Iue).call(this,e)}loggerProvider(){return Ic(this,JO,"f")}resource(){return Ic(this,am,"f")}tracerProvider(){return Ic(this,sy,"f")}}am=new WeakMap,sy=new WeakMap,JO=new WeakMap,sm=new WeakSet,Rue=function(e){var r,n,i,s;return GO.default().merge(new GO({[Dot]:"bwell-sdk-typescript",[$ot]:iZe(),[xot]:"typescript",[Lot]:"com.bwell",[Not]:e.context.env,"client.key":e.context.clientKey,"user.id":(n=(r=e.context.user)===null||r===void 0?void 0:r.clientFhirPersonId)!==null&&n!==void 0?n:"","user.bwell-person-id":(s=(i=e.context.user)===null||i===void 0?void 0:i.bwellFhirPersonId)!==null&&s!==void 0?s:""}))},Oue=function(){const e=new Rot({resource:Ic(this,am,"f")});return e.register({propagator:new moe}),e},Pue=function(e){const r=new Dat({resource:Ic(this,am,"f")}),n=new Pst({url:`${e.telemetry.collectorUrl}/otlp-http/v1/logs`}),i=new jat(n);return r.addLogRecordProcessor(i),r},Iue=function(e){const r=jut(e);return r===null?null:(r.setTracerProvider(Ic(this,sy,"f")),r)};var ef=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},ay=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},fs=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Fh,tf,eP,oy,Xo,om,$k,Mue,wue,xk,Nue;class Due{constructor(e,r,n,i){Fh.add(this),eP.set(this,void 0),oy.set(this,void 0),Xo.set(this,void 0),om.set(this,void 0),ay(this,eP,r,"f"),ay(this,oy,n.getLogger("TokenManager"),"f"),ay(this,Xo,i,"f")}static initialize(e,r){return ef(this,arguments,void 0,function*(n,i,s=new ws,a=new Y1){const o=fs(tf,tf,"m",$k).call(tf,n.accessToken);if(o.failure())return o.intoFailure();const u=new tf(Object.assign(Object.assign({},n),{expiration:o.data()}),i,s,a);try{yield Promise.all([a.set("idToken",n.idToken),a.set("clientKey",n.clientKey),a.set("accessToken",n.accessToken),a.set("refreshToken",n.refreshToken),a.set("expiration",o.data().toISOString())])}catch{return tr.failure(new w_("Failed to set tokens in token storage"))}return tr.success(u)})}getAccessToken(){return ef(this,void 0,void 0,function*(){if(yield fs(this,Fh,"m",wue).call(this)){const n=yield fs(this,Fh,"m",xk).call(this);if(n.failure())return n.intoFailure()}const r=yield fs(this,Xo,"f").get("accessToken");return Zs(r)?tr.failure(new w_("accessToken not found in token storage")):tr.success(r)})}getIdToken(){return ef(this,void 0,void 0,function*(){return yield fs(this,Xo,"f").get("idToken")})}refreshAccessToken(){return ef(this,void 0,void 0,function*(){return fs(this,Fh,"m",xk).call(this)})}}tf=Due,eP=new WeakMap,oy=new WeakMap,Xo=new WeakMap,om=new WeakMap,Fh=new WeakSet,$k=function(e){try{const r=Mie(e);return tr.success(new Date(r))}catch(r){if(!ua.isBwellError(r))throw r;return tr.failure(r)}},Mue=function(){return ef(this,void 0,void 0,function*(){const e=yield fs(this,Xo,"f").get("expiration");if(Zs(e))throw new Error("expiration not found in token storage");return new Date(e)})},wue=function(){return ef(this,void 0,void 0,function*(){const r=(yield fs(this,Fh,"m",Mue).call(this)).getTime(),n=Date.now();return r<n})},xk=function(){return ef(this,void 0,void 0,function*(){if(fs(this,om,"f")!==void 0)return fs(this,om,"f");const e=fs(this,Fh,"m",Nue).call(this);ay(this,om,e,"f");try{return yield e}finally{ay(this,om,void 0,"f")}})},Nue=function(){return ef(this,void 0,void 0,function*(){fs(this,oy,"f").verbose("refreshing access token...");const[e,r]=yield Promise.all([fs(this,Xo,"f").get("refreshToken"),fs(this,Xo,"f").get("clientKey")]);if(Zs(e)||Zs(r))return tr.failure(new w_("refreshToken or clientKey not found in token storage"));const n=yield fs(this,eP,"f").refreshAccessToken({refreshToken:e,clientKey:r});if(fs(this,oy,"f").verbose("refreshing access token complete"),n.failure())return n.intoFailure();const i=n.data();yield fs(this,Xo,"f").set("accessToken",i.accessToken),yield fs(this,Xo,"f").set("idToken",i.idToken);const s=i.refreshToken;typeof s=="string"&&s.trim().length>0&&(yield fs(this,Xo,"f").set("refreshToken",s.trim()));const a=fs(tf,tf,"m",$k).call(tf,i.accessToken);return a.failure()?a.intoFailure():(yield fs(this,Xo,"f").set("expiration",a.data().toISOString()),tr.success(null))})};var uy=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Oo=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},dr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Gi,um,Po,cy,Uk,Fk,kk,Gk,Mc,ly,kh,Gh,tP,cm,Vk,oo,Bk,jk,zk,Lue;class Hut{constructor(e){Gi.add(this),um.set(this,void 0),Po.set(this,void 0),cy.set(this,void 0),Uk.set(this,new tJe),Fk.set(this,new Cnt),kk.set(this,new Pnt),Gk.set(this,new $nt),Mc.set(this,void 0),ly.set(this,void 0),kh.set(this,void 0),Gh.set(this,void 0),tP.set(this,void 0),cm.set(this,void 0),Oo(this,um,e,"f"),Oo(this,Po,ZR.initialize(dr(this,um,"f")).data(),"f"),Oo(this,cy,dr(this,Gi,"m",zk).call(this),"f"),Oo(this,Mc,dr(this,Gi,"m",jk).call(this),"f"),Oo(this,kh,dr(this,Mc,"f").getLogger("BWellSDK"),"f"),Oo(this,Gh,dr(this,kk,"f").createIdentityManager(dr(this,Po,"f"),dr(this,Mc,"f")),"f"),Oo(this,tP,new nJe(dr(this,Gh,"f")),"f")}initialize(){return uy(this,void 0,void 0,function*(){dr(this,kh,"f").verbose("initializing SDKConfig...");const e=yield dr(this,tP,"f").initialize(dr(this,um,"f"));return e.failure()?e.intoFailure():(dr(this,kh,"f").verbose("SDK Config initialized successfully"),Oo(this,Po,e.data(),"f"),dr(this,Gi,"m",Bk).call(this),tr.success(null))})}authenticate(e){return uy(this,void 0,void 0,function*(){const n=yield dr(this,Gk,"f").createAuthStrategy(dr(this,Po,"f"),dr(this,Gh,"f"),e,dr(this,Mc,"f")).authenticate(e);if(n.failure())return n.intoFailure();const i=n.data();return dr(this,Gi,"m",Vk).call(this,i)})}setAuthTokens(e){return uy(this,void 0,void 0,function*(){const r=yield dr(this,Gi,"m",Vk).call(this,e);if(r.failure())return r.intoFailure();if(dr(this,cm,"f")===void 0)throw new Error("TokenManager not set");const n=e.refreshToken;if(!(typeof n=="string"&&n.trim().length>0))return tr.success(null);const s=Mie(e.accessToken);if(Date.now()<s)return tr.success(null);const a=yield dr(this,cm,"f").refreshAccessToken();return a.failure()?a.intoFailure():tr.success(null)})}createGuestAccessToken(e){return uy(this,void 0,void 0,function*(){return dr(this,Gh,"f").createGuestAccessToken(Object.assign({clientKey:dr(this,Po,"f").context.clientKey},e&&{jweToken:e}))})}get health(){return dr(this,Gi,"m",oo).call(this).health}get healthSpace(){return dr(this,Gi,"m",oo).call(this).healthSpace}get user(){return dr(this,Gi,"m",oo).call(this).user}get connection(){return dr(this,Gi,"m",oo).call(this).connection}get activity(){return dr(this,Gi,"m",oo).call(this).activity}get device(){return dr(this,Gi,"m",oo).call(this).device}get event(){return dr(this,Gi,"m",oo).call(this).event}get search(){return dr(this,Gi,"m",oo).call(this).search}get financial(){return dr(this,Gi,"m",oo).call(this).financial}get language(){return dr(this,Gi,"m",oo).call(this).language}get questionnaire(){return dr(this,Gi,"m",oo).call(this).questionnaire}get support(){return dr(this,Gi,"m",oo).call(this).support}get dataSharing(){return dr(this,Gi,"m",oo).call(this).dataSharing}}um=new WeakMap,Po=new WeakMap,cy=new WeakMap,Uk=new WeakMap,Fk=new WeakMap,kk=new WeakMap,Gk=new WeakMap,Mc=new WeakMap,ly=new WeakMap,kh=new WeakMap,Gh=new WeakMap,tP=new WeakMap,cm=new WeakMap,Gi=new WeakSet,Vk=function(e){return uy(this,void 0,void 0,function*(){try{const i=nZe(e.idToken);Wr(i)&&dr(this,Po,"f").setContextUser(i)}catch(i){if(ua.isBwellError(i))return tr.failure(i);throw i}const r=Object.assign(Object.assign({},e),{clientKey:dr(this,Po,"f").context.clientKey}),n=yield Due.initialize(r,dr(this,Gh,"f"),dr(this,Mc,"f"),dr(this,um,"f").tokenStorage);return n.failure()?n.intoFailure():(Oo(this,cm,n.data(),"f"),dr(this,Gi,"m",Bk).call(this),Oo(this,ly,dr(this,Gi,"m",Lue).call(this,dr(this,cm,"f")),"f"),tr.success(null))})},oo=function(){if(dr(this,ly,"f")===void 0)throw new Error("Unintialized");return dr(this,ly,"f")},Bk=function(){dr(this,kh,"f").verbose("reinitializing SDK dependencies"),Oo(this,cy,dr(this,Gi,"m",zk).call(this),"f"),Oo(this,Mc,dr(this,Gi,"m",jk).call(this),"f"),Oo(this,kh,dr(this,Mc,"f").getLogger("BwellSDK"),"f")},jk=function(){return dr(this,Uk,"f").createLogProvider(dr(this,Po,"f"),dr(this,cy,"f"))},zk=function(){if(dr(this,Po,"f").telemetry.enabled)return new zut(dr(this,Po,"f"))},Lue=function(e){return dr(this,Fk,"f").createApiProvider(dr(this,Po,"f"),e,dr(this,Mc,"f"))};function qut(t){try{return JSON.parse(atob(t))}catch{}}function $ue(t){var e,r,n;const i=qut(t);if(!i?.env)return id.C;const s={rest:{endpoints:{}}};for(const a in(e=id.C===null||id.C===void 0?void 0:id.C.rest)===null||e===void 0?void 0:e.endpoints){const o=(r=id.C===null||id.C===void 0?void 0:id.C.rest)===null||r===void 0?void 0:r.endpoints[a];typeof o=="string"&&(!((n=s?.rest)===null||n===void 0)&&n.endpoints)&&(s.rest.endpoints[a]=o.replace(".prod.",`.${i.env}.`))}return s}const Yut=6e4;function rP(t,e=Date.now()){try{const{exp:r}=(0,je().decodeJwt)(t);return typeof r!="number"?!1:r*1e3<e+Yut}catch{return!1}}var Jo,eu,lm,dy,Qa,wc,fy,rf,hy,Ol,dm,Hk,xue,qk,Uue,Fue,kue,Yk;const Gue="dataSharing";class Qut{constructor({stateService:e,apiClient:r,bwellSdk:n,sdkTokenStorage:i,identityUtils:s,navigationService:a}){Jo.add(this),eu.set(this,void 0),lm.set(this,void 0),dy.set(this,void 0),Qa.set(this,void 0),wc.set(this,void 0),fy.set(this,void 0),rf.set(this,!1),hy.set(this,null),Ol.set(this,void 0),dm.set(this,0),(0,ee().__classPrivateFieldSet)(this,eu,e,"f"),(0,ee().__classPrivateFieldSet)(this,lm,r,"f"),(0,ee().__classPrivateFieldSet)(this,dy,n,"f"),(0,ee().__classPrivateFieldSet)(this,Qa,i,"f"),(0,ee().__classPrivateFieldSet)(this,wc,s,"f"),(0,ee().__classPrivateFieldSet)(this,fy,a,"f"),(0,ee().__classPrivateFieldGet)(this,Qa,"f").setRefreshHandler(()=>this.refreshDelegatedToken()),(0,ee().__classPrivateFieldGet)(this,wc,"f").registerPreLogoutHandler(()=>{(0,ee().__classPrivateFieldGet)(this,Qa,"f").clearDelegatedTokens()})}startImpersonation(e,r){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var n,i,s;if(!e?.trim())throw new Error("consentId is required for startImpersonation.");if((0,ee().__classPrivateFieldGet)(this,rf,"f"))throw new Error("Impersonation transition already in progress.");(0,ee().__classPrivateFieldSet)(this,rf,!0,"f"),(0,ee().__classPrivateFieldGet)(this,Qa,"f").cancelHostSessionWaits(),(0,ee().__classPrivateFieldGet)(this,Jo,"m",Hk).call(this);try{(0,ee().__classPrivateFieldGet)(this,hy,"f")||(0,ee().__classPrivateFieldSet)(this,hy,(0,ee().__classPrivateFieldGet)(this,Jo,"m",kue).call(this),"f");const a=yield(0,ee().__classPrivateFieldGet)(this,hy,"f"),{accessToken:o,delegateTokens:u}=yield(0,ee().__classPrivateFieldGet)(this,Jo,"m",qk).call(this,e),{key:c}=(0,ee().__classPrivateFieldGet)(this,eu,"f").getClientContext();(0,ee().__classPrivateFieldGet)(this,lm,"f").enableAuth({tokens:{accessToken:o,idToken:o},onRefresh:(0,ee().__classPrivateFieldGet)(this,Jo,"m",Yk).call(this,c)});const l=(0,ee().__classPrivateFieldGet)(this,Jo,"m",Fue).call(this,o);r&&(yield r());const d=(0,ee().__classPrivateFieldGet)(this,eu,"f").getStore();if(a&&d.dispatch(ZE.setAccessControlConfig(a)),d.dispatch(ZE.startImpersonation({consentId:e,accessLevel:l})),d.dispatch(Og.replace({tokenData:u})),a){const f=l??cw.VIEW,_=(s=(i=(n=a.roles)===null||n===void 0?void 0:n[f])===null||i===void 0?void 0:i.block)!==null&&s!==void 0?s:[];(0,ee().__classPrivateFieldGet)(this,fy,"f").setBlockedRoutes(Gue,_)}}finally{(0,ee().__classPrivateFieldSet)(this,rf,!1,"f")}})}endImpersonation(e){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var r,n;if(this.isImpersonating()){if((0,ee().__classPrivateFieldGet)(this,rf,"f"))throw new Error("Impersonation transition already in progress.");(0,ee().__classPrivateFieldSet)(this,rf,!0,"f"),(0,ee().__classPrivateFieldGet)(this,Jo,"m",Hk).call(this);try{const i=(0,ee().__classPrivateFieldGet)(this,wc,"f").getStoredTokens();if(!i)throw new Error("Cannot end impersonation: no root user tokens found.");(0,ee().__classPrivateFieldGet)(this,Qa,"f").clearDelegatedTokens(),(0,ee().__classPrivateFieldGet)(this,wc,"f").clearDelegationContext();const{key:s}=(0,ee().__classPrivateFieldGet)(this,eu,"f").getClientContext();(0,ee().__classPrivateFieldGet)(this,lm,"f").enableAuth({tokens:{accessToken:i.accessToken.jwtToken,idToken:i.idToken.jwtToken},onRefresh:(0,ee().__classPrivateFieldGet)(this,Jo,"m",Yk).call(this,s),proactiveRefresh:!!(!((n=(r=i.refreshToken)===null||r===void 0?void 0:r.token)===null||n===void 0)&&n.trim())}),e&&(yield e());const a=(0,ee().__classPrivateFieldGet)(this,eu,"f").getStore();a.dispatch(ZE.endImpersonation()),a.dispatch(Og.replace({tokenData:i})),(0,ee().__classPrivateFieldGet)(this,fy,"f").clearBlockedRoutes(Gue)}finally{(0,ee().__classPrivateFieldSet)(this,rf,!1,"f")}}})}isImpersonating(){return dw((0,ee().__classPrivateFieldGet)(this,eu,"f").getState())}getDataSharingConsentId(){return oge((0,ee().__classPrivateFieldGet)(this,eu,"f").getState())}refreshDelegatedToken(){if(!(0,ee().__classPrivateFieldGet)(this,Ol,"f")){const e=(0,ee().__classPrivateFieldGet)(this,Jo,"m",xue).call(this,(0,ee().__classPrivateFieldGet)(this,dm,"f")).finally(()=>{(0,ee().__classPrivateFieldGet)(this,Ol,"f")===e&&(0,ee().__classPrivateFieldSet)(this,Ol,void 0,"f")});(0,ee().__classPrivateFieldSet)(this,Ol,e,"f")}return(0,ee().__classPrivateFieldGet)(this,Ol,"f")}}eu=new WeakMap,lm=new WeakMap,dy=new WeakMap,Qa=new WeakMap,wc=new WeakMap,fy=new WeakMap,rf=new WeakMap,hy=new WeakMap,Ol=new WeakMap,dm=new WeakMap,Jo=new WeakSet,Hk=function(){var e;(0,ee().__classPrivateFieldSet)(this,dm,(e=(0,ee().__classPrivateFieldGet)(this,dm,"f"),e++,e),"f"),(0,ee().__classPrivateFieldSet)(this,Ol,void 0,"f")},xue=function(e){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var r,n,i;const s=()=>e!==(0,ee().__classPrivateFieldGet)(this,dm,"f"),a=()=>{if(s())throw new Error("Impersonation changed during the delegated token re-mint.")},o=(0,ee().__classPrivateFieldGet)(this,wc,"f").getDelegationContext(),u=(r=this.getDataSharingConsentId())!==null&&r!==void 0?r:o?.consentId;if(!u)throw new Error("Cannot refresh delegated token: no consent ID found.");const c=(i=(n=(0,ee().__classPrivateFieldGet)(this,wc,"f").getStoredTokens())===null||n===void 0?void 0:n.accessToken)===null||i===void 0?void 0:i.jwtToken;c&&rP(c)&&(yield(0,ee().__classPrivateFieldGet)(this,Qa,"f").waitForRootRenewal(),a());const l=(0,ee().__classPrivateFieldGet)(this,Qa,"f").getDelegatedAccessToken();(0,ee().__classPrivateFieldGet)(this,Qa,"f").clearDelegatedTokens();try{const{accessToken:d}=yield(0,ee().__classPrivateFieldGet)(this,Jo,"m",qk).call(this,u,a);return(0,ee().__classPrivateFieldGet)(this,eu,"f").updateTokens({accessToken:d,idToken:d}),{accessToken:d,idToken:d}}catch(d){throw l&&!s()&&(0,ee().__classPrivateFieldGet)(this,Qa,"f").setDelegatedTokens({accessToken:l,idToken:l}),d}})},qk=function(e,r){return(0,ee().__awaiter)(this,void 0,void 0,function*(){const n=yield(0,ee().__classPrivateFieldGet)(this,dy,"f").dataSharing.requestDataSharingToken(new HXe({consentId:e}));if(r?.(),n.failure())throw new Error(n.error().message);const i=n.data().access_token;(0,ee().__classPrivateFieldGet)(this,Qa,"f").setDelegatedTokens({accessToken:i,idToken:i});const s=(0,ee().__classPrivateFieldGet)(this,Jo,"m",Uue).call(this,i);return(0,ee().__classPrivateFieldGet)(this,wc,"f").storeDelegationContext({consentId:e,delegateTokens:s}),{accessToken:i,delegateTokens:s}})},Uue=function(e){const r=(0,je().decodeJwt)(e),n=(0,je().normalizeTokenPayload)((0,je().decodeJwt)(e));return{accessToken:{jwtToken:e,payload:r},idToken:{jwtToken:e,payload:n},refreshToken:{}}},Fue=function(e){var r;try{const i=(0,je().decodeJwt)(e).act,s=(r=i?.role)===null||r===void 0?void 0:r.toLowerCase();return s===cw.ADMIN||s===cw.VIEW?s:null}catch{return null}},kue=function(){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var e,r,n,i,s;try{const{slug:a}=(0,ee().__classPrivateFieldGet)(this,eu,"f").getClientContext(),u=yield CU((0,ee().__classPrivateFieldGet)(this,lm,"f")).getHealthCircleConfig({clientSlug:a}),c=(n=(r=(e=u?.clientConfiguration)===null||e===void 0?void 0:e.healthCircle)===null||r===void 0?void 0:r.accessControl)===null||n===void 0?void 0:n.roles;return c?{roles:Object.assign(Object.assign({},((i=c.view)===null||i===void 0?void 0:i.block)&&{view:{block:c.view.block}}),((s=c.admin)===null||s===void 0?void 0:s.block)&&{admin:{block:c.admin.block}})}:null}catch{return null}})},Yk=function(e){return()=>(0,ee().__awaiter)(this,void 0,void 0,function*(){var r,n;if((0,ee().__classPrivateFieldGet)(this,Ol,"f")||(0,ee().__classPrivateFieldGet)(this,Qa,"f").isImpersonating)return this.refreshDelegatedToken();const i=(n=(r=(0,ee().__classPrivateFieldGet)(this,wc,"f").getStoredTokens())===null||r===void 0?void 0:r.refreshToken)===null||n===void 0?void 0:n.token;if(!i)return(0,ee().__classPrivateFieldGet)(this,Qa,"f").waitForHostSession();const s=$ue(e),o=yield new(je()).Auth(new(kn()).ApiClient(s),(0,ee().__classPrivateFieldGet)(this,dy,"f"),(0,ee().__classPrivateFieldGet)(this,Qa,"f")).refreshTokens(i,e);return(0,ee().__classPrivateFieldGet)(this,eu,"f").updateTokens(o),o})};var nP;(function(t){t.one="1.0.0"})(nP||(nP={}));const Vue="orchestrator:data-sharing",Wut=t=>({id:Vue,dependencies:{featureServices:{[Ss]:mo.one,[Uo]:tl.one,[PR]:bS.one,[CR]:TS.one,[gC]:Zv.one}},create:({featureServices:e})=>{const r=e[Ss],n=e[Uo],i=e[PR],s=e[CR],a=e[gC],o=new Qut({stateService:r,apiClient:n,bwellSdk:i,sdkTokenStorage:t,identityUtils:s,navigationService:a});return{[nP.one]:()=>({featureService:o})}}});var iP,Nc,fm,hm,Vh,Pl,Bh,Bue,jue;const zue=15e3;class Hue extends Y1{constructor(){super(...arguments),iP.add(this),Nc.set(this,new Map),fm.set(this,!1),hm.set(this,void 0),Vh.set(this,void 0),Pl.set(this,[]),Bh.set(this,[])}get(e){const r=Object.create(null,{get:{get:()=>super.get}});return(0,ee().__awaiter)(this,void 0,void 0,function*(){return(0,ee().__classPrivateFieldGet)(this,fm,"f")?(e==="expiration"&&(0,ee().__classPrivateFieldGet)(this,hm,"f")&&(0,ee().__classPrivateFieldGet)(this,iP,"m",Bue).call(this)&&(yield(0,ee().__classPrivateFieldGet)(this,iP,"m",jue).call(this)),(0,ee().__classPrivateFieldGet)(this,Nc,"f").get(e)):r.get.call(this,e)})}setRefreshHandler(e){(0,ee().__classPrivateFieldSet)(this,hm,e,"f")}waitForHostSession(e=zue){return new Promise((r,n)=>{const i={resolve:a=>{clearTimeout(s),r(a)},reject:a=>{clearTimeout(s),n(a)}},s=setTimeout(()=>{(0,ee().__classPrivateFieldSet)(this,Pl,(0,ee().__classPrivateFieldGet)(this,Pl,"f").filter(a=>a!==i),"f"),n(new Error(`No host session received within ${e}ms.`))},e);(0,ee().__classPrivateFieldGet)(this,Pl,"f").push(i)})}notifyHostSession(e){const r=(0,ee().__classPrivateFieldGet)(this,Pl,"f");(0,ee().__classPrivateFieldSet)(this,Pl,[],"f"),r.forEach(n=>n.resolve(e))}cancelHostSessionWaits(){const e=(0,ee().__classPrivateFieldGet)(this,Pl,"f");(0,ee().__classPrivateFieldSet)(this,Pl,[],"f"),e.forEach(r=>r.reject(new Error("Host session wait cancelled.")))}waitForRootRenewal(e=zue){return new Promise(r=>{const n=()=>{clearTimeout(i),r()},i=setTimeout(()=>{(0,ee().__classPrivateFieldSet)(this,Bh,(0,ee().__classPrivateFieldGet)(this,Bh,"f").filter(s=>s!==n),"f"),r()},e);(0,ee().__classPrivateFieldGet)(this,Bh,"f").push(n)})}notifyRootRenewal(){const e=(0,ee().__classPrivateFieldGet)(this,Bh,"f");(0,ee().__classPrivateFieldSet)(this,Bh,[],"f"),e.forEach(r=>r())}setDelegatedTokens(e){(0,ee().__classPrivateFieldGet)(this,Nc,"f").set("accessToken",e.accessToken),(0,ee().__classPrivateFieldGet)(this,Nc,"f").set("idToken",e.idToken);const r=(0,je().decodeJwt)(e.accessToken);r.exp&&(0,ee().__classPrivateFieldGet)(this,Nc,"f").set("expiration",new Date(r.exp*1e3).toISOString()),r.clientKey&&(0,ee().__classPrivateFieldGet)(this,Nc,"f").set("clientKey",r.clientKey),(0,ee().__classPrivateFieldSet)(this,fm,!0,"f")}clearDelegatedTokens(){(0,ee().__classPrivateFieldGet)(this,Nc,"f").clear(),(0,ee().__classPrivateFieldSet)(this,fm,!1,"f")}getDelegatedAccessToken(){return(0,ee().__classPrivateFieldGet)(this,Nc,"f").get("accessToken")}get isImpersonating(){return(0,ee().__classPrivateFieldGet)(this,fm,"f")}}Nc=new WeakMap,fm=new WeakMap,hm=new WeakMap,Vh=new WeakMap,Pl=new WeakMap,Bh=new WeakMap,iP=new WeakSet,Bue=function(){const e=(0,ee().__classPrivateFieldGet)(this,Nc,"f").get("accessToken");return e?rP(e):!1},jue=function(){return(0,ee().__awaiter)(this,void 0,void 0,function*(){if((0,ee().__classPrivateFieldGet)(this,Vh,"f")){yield(0,ee().__classPrivateFieldGet)(this,Vh,"f");return}(0,ee().__classPrivateFieldSet)(this,Vh,(0,ee().__awaiter)(this,void 0,void 0,function*(){try{(0,ee().__classPrivateFieldGet)(this,hm,"f")&&(yield(0,ee().__classPrivateFieldGet)(this,hm,"f").call(this))}catch{}}),"f"),yield(0,ee().__classPrivateFieldGet)(this,Vh,"f"),(0,ee().__classPrivateFieldSet)(this,Vh,void 0,"f")})};const Xt={apiClient:CM,theme:OM,analytics:PM,auth:IM,logging:MM,state:$s,navigation:wM,featureFlags:RM,translation:NM,identityUtils:DM,nativeBridge:LM,globalEventEmitter:$M,rebootController:xM,bwellSdk:UM,dataSharing:FM},mar=Object.keys(Xt).reduce((t,e)=>{const{id:r,version:n}=Xt[e];return Object.assign(Object.assign({},t),{[e]:{id:r,version:n}})},{});var Kut=p(78561),gar=p(97107),que;const Sar=null;function Ct(t,e,r){function n(o,u){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(t))return;o._zod.traits.add(t),e(o,u);const c=a.prototype,l=Object.keys(c);for(let d=0;d<l.length;d++){const f=l[d];f in o||(o[f]=c[f].bind(o))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function a(o){var u;const c=r?.Parent?new s:this;n(c,o),(u=c._zod).deferred??(u.deferred=[]);for(const l of c._zod.deferred)l();return c}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}const yar=Symbol("zod_brand");class pm extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Yue extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(que=globalThis).__zod_globalConfig??(que.__zod_globalConfig={});const sP=globalThis.__zod_globalConfig;function Il(t){return t&&Object.assign(sP,t),sP}var Zut;const Xut=/^[cC][0-9a-z]{6,}$/,Jut=/^[0-9a-z]+$/,ect=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,tct=/^[0-9a-vA-V]{20}$/,rct=/^[A-Za-z0-9]{27}$/,nct=/^[a-zA-Z0-9_-]{21}$/,ict=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ear=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,sct=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Que=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Aar=null,Tar=null,bar=null,act=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Car=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Rar=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Oar=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Par=null,Iar=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,oct="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function uct(){return new RegExp(oct,"u")}const cct=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,lct=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Mar=t=>{const e=Zut.escapeRegex(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},dct=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,fct=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,hct=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Wue=/^[A-Za-z0-9_-]*$/,war=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Nar=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,pct=/^https?$/,_ct=/^\+[1-9]\d{6,14}$/,Kue="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",mct=new RegExp(`^${Kue}$`);function Zue(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function gct(t){return new RegExp(`^${Zue(t)}$`)}function vct(t){const e=Zue({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${e}(?:${r.join("|")})`;return new RegExp(`^${Kue}T(?:${n})$`)}const Sct=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Dar=/^-?\d+n?$/,Lar=/^-?\d+$/,yct=/^-?\d+(?:\.\d+)?$/,Ect=/^(?:true|false)$/i,$ar=/^null$/i,xar=/^undefined$/i,Act=/^[^A-Z]*$/,Tct=/^[^a-z]*$/,Uar=/^[0-9a-fA-F]*$/;function Far(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function kar(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}const Gar=/^[0-9a-fA-F]{32}$/,Var=null,Bar=null,jar=/^[0-9a-fA-F]{40}$/,zar=null,Har=null,qar=/^[0-9a-fA-F]{64}$/,Yar=null,Qar=null,War=/^[0-9a-fA-F]{96}$/,Kar=null,Zar=null,Xar=/^[0-9a-fA-F]{128}$/,Jar=null,eor=null;function tor(t){return t}function ror(t){return t}function nor(t){}function ior(t){throw new Error("Unexpected value in exhaustive check")}function sor(t){}function Xue(t){const e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function aor(t,e="|"){return t.map(r=>Oct(r)).join(e)}function Qk(t,e){return typeof e=="bigint"?e.toString():e}function Wk(t){return{get value(){{const r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Kk(t){return t==null}function Zk(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function oor(t,e){const r=t/e,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}const Jue=Symbol("evaluating");function Wn(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Jue)return n===void 0&&(n=Jue,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function uor(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function jh(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ml(...t){const e={};for(const r of t){const n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function cor(t){return Ml(t._zod.def)}function lor(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function dor(t){const e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{const i={};for(let s=0;s<e.length;s++)i[e[s]]=n[s];return i})}function hor(t=10){const e="abcdefghijklmnopqrstuvwxyz";let r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function ece(t){return JSON.stringify(t)}function bct(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const tce="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function aP(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Cct=Wk(()=>{if(sP.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function _m(t){if(aP(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const r=e.prototype;return!(aP(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function rce(t){return _m(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function por(t){let e=0;for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}const _or=t=>{const e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Rct=new Set(["string","number","symbol"]),mor=null;function oP(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nf(t,e,r){const n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function Or(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function gor(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,s){return e??(e=t()),Reflect.set(e,n,i,s)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function Oct(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Pct(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const vor={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Sor=null;function Ict(t,e){const r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Ml(t._zod.def,{get shape(){const a={};for(const o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(a[o]=r.shape[o])}return jh(this,"shape",a),a},checks:[]});return nf(t,s)}function Mct(t,e){const r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Ml(t._zod.def,{get shape(){const a={...t._zod.def.shape};for(const o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete a[o]}return jh(this,"shape",a),a},checks:[]});return nf(t,s)}function wct(t,e){if(!_m(e))throw new Error("Invalid input to extend: expected a plain object");const r=t._zod.def.checks;if(r&&r.length>0){const s=t._zod.def.shape;for(const a in e)if(Object.getOwnPropertyDescriptor(s,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Ml(t._zod.def,{get shape(){const s={...t._zod.def.shape,...e};return jh(this,"shape",s),s}});return nf(t,i)}function Nct(t,e){if(!_m(e))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Ml(t._zod.def,{get shape(){const n={...t._zod.def.shape,...e};return jh(this,"shape",n),n}});return nf(t,r)}function Dct(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=Ml(t._zod.def,{get shape(){const n={...t._zod.def.shape,...e._zod.def.shape};return jh(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return nf(t,r)}function Lct(t,e,r){const i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=Ml(e._zod.def,{get shape(){const o=e._zod.def.shape,u={...o};if(r)for(const c in r){if(!(c in o))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(u[c]=t?new t({type:"optional",innerType:o[c]}):o[c])}else for(const c in o)u[c]=t?new t({type:"optional",innerType:o[c]}):o[c];return jh(this,"shape",u),u},checks:[]});return nf(e,a)}function $ct(t,e,r){const n=Ml(e._zod.def,{get shape(){const i=e._zod.def.shape,s={...i};if(r)for(const a in r){if(!(a in s))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=new t({type:"nonoptional",innerType:i[a]}))}else for(const a in i)s[a]=new t({type:"nonoptional",innerType:i[a]});return jh(this,"shape",s),s}});return nf(e,n)}function mm(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function xct(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function gm(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function uP(t){return typeof t=="string"?t:t?.message}function wl(t,e,r){const n=t.message?t.message:uP(t.inst?._zod.def?.error?.(t))??uP(e?.error?.(t))??uP(r.customError?.(t))??uP(r.localeError?.(t))??"Invalid input",{inst:i,continue:s,input:a,...o}=t;return o.path??(o.path=[]),o.message=n,e?.reportInput&&(o.input=a),o}function yor(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Xk(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Eor(t){const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";const r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function py(...t){const[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function Aor(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Uct(t){const e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Fct(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Tor(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return Uct(e+r)}function bor(t){return Fct(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Cor(t){const e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function Ror(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}class Oor{constructor(...e){}}var Por,Ior,kct;const tu=Ct("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Mor=null,wor=null,Nor=null,Dor=null,Lor=null,$or=null,xor=null,Uor=null,For=null,Gct=Ct("$ZodCheckMaxLength",(t,e)=>{var r;tu.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!Kk(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{const i=n.value;if(i.length<=e.maximum)return;const a=Xk(i);n.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Vct=Ct("$ZodCheckMinLength",(t,e)=>{var r;tu.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!Kk(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{const i=n.value;if(i.length>=e.minimum)return;const a=Xk(i);n.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Bct=Ct("$ZodCheckLengthEquals",(t,e)=>{var r;tu.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!Kk(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{const i=n.value,s=i.length;if(s===e.length)return;const a=Xk(i),o=s>e.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),cP=Ct("$ZodCheckStringFormat",(t,e)=>{var r,n;tu.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),jct=Ct("$ZodCheckRegex",(t,e)=>{cP.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),zct=Ct("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Act),cP.init(t,e)}),Hct=Ct("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Tct),cP.init(t,e)}),qct=Ct("$ZodCheckIncludes",(t,e)=>{tu.init(t,e);const r=oP(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Yct=Ct("$ZodCheckStartsWith",(t,e)=>{tu.init(t,e);const r=new RegExp(`^${oP(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),Qct=Ct("$ZodCheckEndsWith",(t,e)=>{tu.init(t,e);const r=new RegExp(`.*${oP(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function kor(t,e,r){t.issues.length&&e.issues.push(...kct.prefixIssues(r,t.issues))}const Gor=null,Vor=null,Wct=Ct("$ZodCheckOverwrite",(t,e)=>{tu.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});class Kct{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const n=e.split(`
|
|
18903
|
+
`,urt=(t,e,r,n)=>t();function crt(t,e=urt){return{getTasks(r,n){return e(i=>t.rawRequest(cet,r,Object.assign(Object.assign({},n),i)),"getTasks","query",r)},setTaskStatus(r,n){return e(i=>t.rawRequest(det,r,Object.assign(Object.assign({},n),i)),"setTaskStatus","mutation",r)},taskUpdateStatus(r,n){return e(i=>t.rawRequest(fet,r,Object.assign(Object.assign({},n),i)),"taskUpdateStatus","mutation",r)},activateDirectConnection(r,n){return e(i=>t.rawRequest(het,r,Object.assign(Object.assign({},n),i)),"activateDirectConnection","mutation",r)},createConnection(r,n){return e(i=>t.rawRequest(pet,r,Object.assign(Object.assign({},n),i)),"createConnection","mutation",r)},deleteConnection(r,n){return e(i=>t.rawRequest(_et,r,Object.assign(Object.assign({},n),i)),"deleteConnection","mutation",r)},disconnectConnection(r,n){return e(i=>t.rawRequest(met,r,Object.assign(Object.assign({},n),i)),"disconnectConnection","mutation",r)},getDataSource(r,n){return e(i=>t.rawRequest(get,r,Object.assign(Object.assign({},n),i)),"getDataSource","query",r)},getMemberConnections(r,n){return e(i=>t.rawRequest(vet,r,Object.assign(Object.assign({},n),i)),"getMemberConnections","query",r)},getOauthUrl(r,n){return e(i=>t.rawRequest(yet,r,Object.assign(Object.assign({},n),i)),"getOauthUrl","query",r)},AcceptDataSharingInvitation(r,n){return e(i=>t.rawRequest(Eet,r,Object.assign(Object.assign({},n),i)),"AcceptDataSharingInvitation","mutation",r)},GetDataSharingAccess(r,n){return e(i=>t.rawRequest(Aet,r,Object.assign(Object.assign({},n),i)),"GetDataSharingAccess","query",r)},GetDataSharingGrants(r,n){return e(i=>t.rawRequest(Tet,r,Object.assign(Object.assign({},n),i)),"GetDataSharingGrants","query",r)},RequestDataSharingToken(r,n){return e(i=>t.rawRequest(bet,r,Object.assign(Object.assign({},n),i)),"RequestDataSharingToken","mutation",r)},getDeviceProviderStatus(r,n){return e(i=>t.rawRequest(Cet,r,Object.assign(Object.assign({},n),i)),"getDeviceProviderStatus","query",r)},getDeviceProviders(r,n){return e(i=>t.rawRequest(Ret,r,Object.assign(Object.assign({},n),i)),"getDeviceProviders","query",r)},getDeviceUserStatus(r,n){return e(i=>t.rawRequest(Oet,r,Object.assign(Object.assign({},n),i)),"getDeviceUserStatus","query",r)},setupMobileSync(r,n){return e(i=>t.rawRequest(Pet,r,Object.assign(Object.assign({},n),i)),"setupMobileSync","mutation",r)},updateDeviceRegistration(r,n){return e(i=>t.rawRequest(Iet,r,Object.assign(Object.assign({},n),i)),"updateDeviceRegistration","mutation",r)},publishEvent(r,n){return e(i=>t.rawRequest(Met,r,Object.assign(Object.assign({},n),i)),"publishEvent","mutation",r)},getClaimSummary(r,n){return e(i=>t.rawRequest(wet,r,Object.assign(Object.assign({},n),i)),"getClaimSummary","query",r)},getCoverageSummary(r,n){return e(i=>t.rawRequest(Net,r,Object.assign(Object.assign({},n),i)),"getCoverageSummary","query",r)},getCoverages(r,n){return e(i=>t.rawRequest(Det,r,Object.assign(Object.assign({},n),i)),"getCoverages","query",r)},getEOBDocument(r,n){return e(i=>t.rawRequest(Let,r,Object.assign(Object.assign({},n),i)),"getEOBDocument","query",r)},getExplanationOfBenefits(r,n){return e(i=>t.rawRequest($et,r,Object.assign(Object.assign({},n),i)),"getExplanationOfBenefits","query",r)},getBinary(r,n){return e(i=>t.rawRequest(xet,r,Object.assign(Object.assign({},n),i)),"getBinary","query",r)},getFHIR(r,n){return e(i=>t.rawRequest(Uet,r,Object.assign(Object.assign({},n),i)),"getFHIR","query",r)},getBodySystemScore(r,n){return e(i=>t.rawRequest(Fet,r,Object.assign(Object.assign({},n),i)),"getBodySystemScore","query",r)},getHealthScore(r,n){return e(i=>t.rawRequest(ket,r,Object.assign(Object.assign({},n),i)),"getHealthScore","query",r)},getDiagnosticReports(r,n){return e(i=>t.rawRequest(Get,r,Object.assign(Object.assign({},n),i)),"getDiagnosticReports","query",r)},getAllergyIntoleranceGroups(r,n){return e(i=>t.rawRequest(Vet,r,Object.assign(Object.assign({},n),i)),"getAllergyIntoleranceGroups","query",r)},getAllergyIntolerances(r,n){return e(i=>t.rawRequest(Bet,r,Object.assign(Object.assign({},n),i)),"getAllergyIntolerances","query",r)},getCarePlanGroups(r,n){return e(i=>t.rawRequest(jet,r,Object.assign(Object.assign({},n),i)),"getCarePlanGroups","query",r)},getCarePlans(r,n){return e(i=>t.rawRequest(zet,r,Object.assign(Object.assign({},n),i)),"getCarePlans","query",r)},getCareTeams(r,n){return e(i=>t.rawRequest(Het,r,Object.assign(Object.assign({},n),i)),"getCareTeams","query",r)},getConditionGroups(r,n){return e(i=>t.rawRequest(qet,r,Object.assign(Object.assign({},n),i)),"getConditionGroups","query",r)},getConditions(r,n){return e(i=>t.rawRequest(Yet,r,Object.assign(Object.assign({},n),i)),"getConditions","query",r)},getDeviceMetrics(r,n){return e(i=>t.rawRequest(Qet,r,Object.assign(Object.assign({},n),i)),"getDeviceMetrics","query",r)},getDeviceMetricsGroups(r,n){return e(i=>t.rawRequest(Wet,r,Object.assign(Object.assign({},n),i)),"getDeviceMetricsGroups","query",r)},getDiagnosticReportLabGroups(r,n){return e(i=>t.rawRequest(Ket,r,Object.assign(Object.assign({},n),i)),"getDiagnosticReportLabGroups","query",r)},getDocumentReferences(r,n){return e(i=>t.rawRequest(Zet,r,Object.assign(Object.assign({},n),i)),"getDocumentReferences","query",r)},getDocumentReferencesList(r,n){return e(i=>t.rawRequest(Xet,r,Object.assign(Object.assign({},n),i)),"getDocumentReferencesList","query",r)},getEncountersGroup(r,n){return e(i=>t.rawRequest(Jet,r,Object.assign(Object.assign({},n),i)),"getEncountersGroup","query",r)},getEncounterQuery(r,n){return e(i=>t.rawRequest(ett,r,Object.assign(Object.assign({},n),i)),"getEncounterQuery","query",r)},GetHealthSummary(r,n){return e(i=>t.rawRequest(ttt,r,Object.assign(Object.assign({},n),i)),"GetHealthSummary","query",r)},getImmunizationGroups(r,n){return e(i=>t.rawRequest(rtt,r,Object.assign(Object.assign({},n),i)),"getImmunizationGroups","query",r)},getImmunizations(r,n){return e(i=>t.rawRequest(ntt,r,Object.assign(Object.assign({},n),i)),"getImmunizations","query",r)},getObservations(r,n){return e(i=>t.rawRequest(itt,r,Object.assign(Object.assign({},n),i)),"getObservations","query",r)},getProcedureGroups(r,n){return e(i=>t.rawRequest(stt,r,Object.assign(Object.assign({},n),i)),"getProcedureGroups","query",r)},GetProcedures(r,n){return e(i=>t.rawRequest(att,r,Object.assign(Object.assign({},n),i)),"GetProcedures","query",r)},getVitalSignGroups(r,n){return e(i=>t.rawRequest(ott,r,Object.assign(Object.assign({},n),i)),"getVitalSignGroups","query",r)},getVitalSigns(r,n){return e(i=>t.rawRequest(utt,r,Object.assign(Object.assign({},n),i)),"getVitalSigns","query",r)},UploadDocument(r,n){return e(i=>t.rawRequest(ctt,r,Object.assign(Object.assign({},n),i)),"UploadDocument","mutation",r)},getLabGroups(r,n){return e(i=>t.rawRequest(ltt,r,Object.assign(Object.assign({},n),i)),"getLabGroups","query",r)},getLabKnowledge(r,n){return e(i=>t.rawRequest(dtt,r,Object.assign(Object.assign({},n),i)),"getLabKnowledge","query",r)},getLabs(r,n){return e(i=>t.rawRequest(ftt,r,Object.assign(Object.assign({},n),i)),"getLabs","query",r)},getMedicationDispense(r,n){return e(i=>t.rawRequest(htt,r,Object.assign(Object.assign({},n),i)),"getMedicationDispense","query",r)},getMedicationGroups(r,n){return e(i=>t.rawRequest(ptt,r,Object.assign(Object.assign({},n),i)),"getMedicationGroups","query",r)},getMedicationKnowledge(r,n){return e(i=>t.rawRequest(_tt,r,Object.assign(Object.assign({},n),i)),"getMedicationKnowledge","query",r)},getMedicationPricing(r,n){return e(i=>t.rawRequest(mtt,r,Object.assign(Object.assign({},n),i)),"getMedicationPricing","query",r)},getMedicationRequest(r,n){return e(i=>t.rawRequest(gtt,r,Object.assign(Object.assign({},n),i)),"getMedicationRequest","query",r)},getMedicationStatements(r,n){return e(i=>t.rawRequest(vtt,r,Object.assign(Object.assign({},n),i)),"getMedicationStatements","query",r)},updateMedicationStatement(r,n){return e(i=>t.rawRequest(Stt,r,Object.assign(Object.assign({},n),i)),"updateMedicationStatement","mutation",r)},appointments(r,n){return e(i=>t.rawRequest(ytt,r,Object.assign(Object.assign({},n),i)),"appointments","query",r)},cancelAppointment(r,n){return e(i=>t.rawRequest(Ett,r,Object.assign(Object.assign({},n),i)),"cancelAppointment","mutation",r)},cancelationReasons(r,n){return e(i=>t.rawRequest(Att,r,Object.assign(Object.assign({},n),i)),"cancelationReasons","query",r)},updateAppointmentNotificationPreferences(r,n){return e(i=>t.rawRequest(Ttt,r,Object.assign(Object.assign({},n),i)),"updateAppointmentNotificationPreferences","mutation",r)},addCareTeamMember(r,n){return e(i=>t.rawRequest(btt,r,Object.assign(Object.assign({},n),i)),"addCareTeamMember","mutation",r)},addCareTeamMembers(r,n){return e(i=>t.rawRequest(Ctt,r,Object.assign(Object.assign({},n),i)),"addCareTeamMembers","mutation",r)},CareTeamMembers(r,n){return e(i=>t.rawRequest(Rtt,r,Object.assign(Object.assign({},n),i)),"CareTeamMembers","query",r)},removeCareTeamMember(r,n){return e(i=>t.rawRequest(Ott,r,Object.assign(Object.assign({},n),i)),"removeCareTeamMember","mutation",r)},updateCareTeamMember(r,n){return e(i=>t.rawRequest(Ptt,r,Object.assign(Object.assign({},n),i)),"updateCareTeamMember","mutation",r)},getMemberPlanIdentifiers(r,n){return e(i=>t.rawRequest(Itt,r,Object.assign(Object.assign({},n),i)),"getMemberPlanIdentifiers","query",r)},authenticate(r,n){return e(i=>t.rawRequest(Mtt,r,Object.assign(Object.assign({},n),i)),"authenticate","query",r)},createGuestAccessToken(r,n){return e(i=>t.rawRequest(wtt,r,Object.assign(Object.assign({},n),i)),"createGuestAccessToken","mutation",r)},ExchangeAuthCode(r,n){return e(i=>t.rawRequest(Ntt,r,Object.assign(Object.assign({},n),i)),"ExchangeAuthCode","mutation",r)},initialize(r,n){return e(i=>t.rawRequest(Dtt,r,Object.assign(Object.assign({},n),i)),"initialize","query",r)},login(r,n){return e(i=>t.rawRequest(Ltt,r,Object.assign(Object.assign({},n),i)),"login","query",r)},refreshTokens(r,n){return e(i=>t.rawRequest($tt,r,Object.assign(Object.assign({},n),i)),"refreshTokens","query",r)},nextQuestion(r,n){return e(i=>t.rawRequest(xtt,r,Object.assign(Object.assign({},n),i)),"nextQuestion","mutation",r)},getQuestionnaireResponseList(r,n){return e(i=>t.rawRequest(Utt,r,Object.assign(Object.assign({},n),i)),"getQuestionnaireResponseList","query",r)},getQuestionnaireResponses(r,n){return e(i=>t.rawRequest(Ftt,r,Object.assign(Object.assign({},n),i)),"getQuestionnaireResponses","query",r)},getQuestionnaires(r,n){return e(i=>t.rawRequest(ktt,r,Object.assign(Object.assign({},n),i)),"getQuestionnaires","query",r)},saveQuestionnaireResponse(r,n){return e(i=>t.rawRequest(Gtt,r,Object.assign(Object.assign({},n),i)),"saveQuestionnaireResponse","mutation",r)},providerSearch(r,n){return e(i=>t.rawRequest(Vtt,r,Object.assign(Object.assign({},n),i)),"providerSearch","query",r)},requestConnection(r,n){return e(i=>t.rawRequest(Btt,r,Object.assign(Object.assign({},n),i)),"requestConnection","mutation",r)},SearchHealthResources(r,n){return e(i=>t.rawRequest(jtt,r,Object.assign(Object.assign({},n),i)),"SearchHealthResources","query",r)},CreateSupportComment(r,n){return e(i=>t.rawRequest(ztt,r,Object.assign(Object.assign({},n),i)),"CreateSupportComment","mutation",r)},CreateSupportRequest(r,n){return e(i=>t.rawRequest(Htt,r,Object.assign(Object.assign({},n),i)),"CreateSupportRequest","mutation",r)},DeleteSupportAttachment(r,n){return e(i=>t.rawRequest(qtt,r,Object.assign(Object.assign({},n),i)),"DeleteSupportAttachment","mutation",r)},getSupportArticles(r,n){return e(i=>t.rawRequest(Ytt,r,Object.assign(Object.assign({},n),i)),"getSupportArticles","query",r)},GetSupportAttachment(r,n){return e(i=>t.rawRequest(Qtt,r,Object.assign(Object.assign({},n),i)),"GetSupportAttachment","query",r)},GetSupportCategories(r,n){return e(i=>t.rawRequest(Wtt,r,Object.assign(Object.assign({},n),i)),"GetSupportCategories","query",r)},getSupportComments(r,n){return e(i=>t.rawRequest(Ktt,r,Object.assign(Object.assign({},n),i)),"getSupportComments","query",r)},getSupportRequests(r,n){return e(i=>t.rawRequest(Ztt,r,Object.assign(Object.assign({},n),i)),"getSupportRequests","query",r)},UploadSupportAttachment(r,n){return e(i=>t.rawRequest(Xtt,r,Object.assign(Object.assign({},n),i)),"UploadSupportAttachment","mutation",r)},createConsent(r,n){return e(i=>t.rawRequest(Jtt,r,Object.assign(Object.assign({},n),i)),"createConsent","mutation",r)},CreateDataExportDirectDownloadUrl(r,n){return e(i=>t.rawRequest(ert,r,Object.assign(Object.assign({},n),i)),"CreateDataExportDirectDownloadUrl","mutation",r)},CreateVerificationUrl(r,n){return e(i=>t.rawRequest(trt,r,Object.assign(Object.assign({},n),i)),"CreateVerificationUrl","mutation",r)},delete(r,n){return e(i=>t.rawRequest(rrt,r,Object.assign(Object.assign({},n),i)),"delete","mutation",r)},GetAccessHistory(r,n){return e(i=>t.rawRequest(nrt,r,Object.assign(Object.assign({},n),i)),"GetAccessHistory","query",r)},getProfile(r,n){return e(i=>t.rawRequest(irt,r,Object.assign(Object.assign({},n),i)),"getProfile","query",r)},searchConsent(r,n){return e(i=>t.rawRequest(srt,r,Object.assign(Object.assign({},n),i)),"searchConsent","query",r)},updateUserProfile(r,n){return e(i=>t.rawRequest(art,r,Object.assign(Object.assign({},n),i)),"updateUserProfile","mutation",r)},VerificationStatus(r,n){return e(i=>t.rawRequest(ort,r,Object.assign(Object.assign({},n),i)),"VerificationStatus","query",r)}}}const lrt=[{name:"Edge",tokens:["Edg"]},{name:"Chrome",tokens:["CriOS","Chrome"]},{name:"Firefox",tokens:["FxiOS","Firefox"]},{name:"Safari",tokens:["Safari"]}];function drt(t){for(const e of lrt)if(e.tokens.some(r=>t.includes(r)))return e.name;return"Unknown"}function frt(){return Oie({node:()=>`Node/${process.versions.node}`,browser:()=>`Browser/${drt(navigator.userAgent)}`})}var hrt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})};const prt="bwell-typescript-v1";function Dae(t,e,r){let n;e!==void 0&&(n=_rt(e));const i={"apollographql-client-name":prt,"apollographql-client-version":wie,"bwell-platform":frt()};r!=null&&(i["accept-language"]=r);const s=new CJe(t,{errorPolicy:"all",mode:"cors",requestMiddleware:n,headers:i});return{client:s,sdk:crt(s)}}function _rt(t){return e=>hrt(this,void 0,void 0,function*(){const n=(yield t.getAccessToken()).data();return Object.assign(Object.assign({},e),{headers:Object.assign(Object.assign({},e.headers),{Authorization:`Bearer ${n}`})})})}var mrt=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Lae=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kS;const $ae="accept-language";class grt{constructor(e){kS.set(this,void 0),mrt(this,kS,e,"f")}setLanguage(e){Lae(this,kS,"f").setHeader($ae,e)}getLanguage(){var e;const r=Lae(this,kS,"f").requestConfig.headers;return(e=r?.[$ae])!==null&&e!==void 0?e:null}}kS=new WeakMap;const vrt="INFORMATION",lwt="WARNING",xae="ERROR",Srt="FATAL";class sO{constructor(e){this.issue=e}message(){var e,r;const n=[];for(const i of this.issue){const s=(r=(e=i.details)===null||e===void 0?void 0:e.text)===null||r===void 0?void 0:r.trim();s==null||s.length===0||n.push(s)}return n.join(", ")}success(){for(const e of this.issue){const r=e.severity.toUpperCase();if(r===xae||r===Srt)return!1}return!0}static error(e){return new sO([{severity:xae,code:"EXCEPTION",details:{text:e.message}}])}static success(){return new sO([{severity:vrt,code:"INFORMATIONAL",details:{}}])}}function yrt(t){for(const e of t){const r=Uae(e);if(r!==null){if(r.code==="500")return!0;for(const n of r.resource.issue)if(n.code==="exception")return!0}}return!1}function lF(t=[]){const e=[];let r=!1;for(const s of t){const a=Uae(s);if(a!==null){r=!0;for(const o of a.resource.issue)e.push(o)}}if(!r)return null;const n=new sO(e),i=new H7e(n);if(Ps(i.message)){const s=t.map(a=>a.message).join(", ");i.message=Ps(s)?"Unknown error. Contact b.well support for further assistance.":s}return i}function Uae(t){const e=t.extensions,r=e?.code,n=e?.resource;return r===void 0||n===void 0||!Ert(n)?null:{code:r,resource:n}}function Ert(t){const e=t.issue;return e===void 0?!1:Array.isArray(e)}var Fae=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},aO=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},V_,dF,fF;class bo{constructor(){V_.add(this)}handleTransaction(e){return Fae(this,void 0,void 0,function*(){try{const r=yield e,n=lF(r.errors);return n!==null?tr.failure(n):tr.success(r.data)}catch(r){if(ua.isBwellError(r))return tr.failure(r);if(aO(this,V_,"m",dF).call(this,r))return aO(this,V_,"m",fF).call(this,r);throw r}})}handleQuery(e){return Fae(this,void 0,void 0,function*(){try{const r=yield e,n=lF(r.errors);return new Yt(r.data,n)}catch(r){if(ua.isBwellError(r))return new Yt(void 0,r);if(aO(this,V_,"m",dF).call(this,r)){const n=aO(this,V_,"m",fF).call(this,r);return Yt.error(n.error())}throw r}})}validateRequest(e){return e===void 0?tr.success(null):e.validate()}}V_=new WeakSet,dF=function(e){return e instanceof kd},fF=function(e){if(e.response.status>299)return new wR(new z7e("Network error",e.response.status));const r=e.response.errors;if(r!==void 0){if(yrt(r))return new wR(new s1("Internal server error",r));const n=lF(r);if(n!==null)return tr.failure(n)}return new wR(new s1("Unknown error",e))};var Vd=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Tc,vl,B_;(function(t){t.ACTIVITY_CONTENT="https://www.icanbwell.com/contentDescription",t.ACTIVITY_ID="https://www.icanbwell.com/activityId",t.ACTIVITY_TOPIC="https://www.icanbwell.com/activityTopic",t.ACTIVITY_TYPE="https://www.icanbwell.com/activityType",t.PERFORMER_TYPE="https://www.icanbwell.com/performerType"})(B_||(B_={}));class Art{constructor(){Tc.add(this)}create(e){var r;const n=e.data(),i={page:n.page,pageSize:n.pageSize};return On(n.id)&&(i.id=Vd(this,Tc,"m",vl).call(this,n.id)),On(n.activityId)&&(i.identifier=Vd(this,Tc,"m",vl).call(this,n.activityId,B_.ACTIVITY_ID)),On(n.activityType)&&(i.code=Vd(this,Tc,"m",vl).call(this,n.activityType,B_.ACTIVITY_TYPE)),On(n.code)&&(i.code=n.code),On(n.activityTopic)&&(i.tag=Vd(this,Tc,"m",vl).call(this,n.activityTopic,B_.ACTIVITY_TOPIC)),On(n.status)&&(i.status=Vd(this,Tc,"m",vl).call(this,n.status)),On(n.subject)&&(i.subject=Vd(this,Tc,"m",vl).call(this,n.subject)),On(n.performerType)&&(i.performer=Vd(this,Tc,"m",vl).call(this,n.performerType,B_.PERFORMER_TYPE)),On(n.basedOn)&&(i.basedOn=Vd(this,Tc,"m",vl).call(this,n.basedOn)),i.sortMethod=n.smartSort===!0?"smartSort":"",On(n.enrichContent)&&(i.enrichContent=n.enrichContent),i.contentLanguage=(r=n.contentLanguage)!==null&&r!==void 0?r:"en",{request:i}}}Tc=new WeakSet,vl=function(e,r){const i={value:(Array.isArray(e)?e:[e]).join(",")};return On(r)&&(i.system=r),{values:[i]}};var hF=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},kae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ca=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ha,j_,pF;class Trt extends bo{constructor(e,r=new ws){super(),Ha.set(this,void 0),j_.set(this,void 0),pF.set(this,new Art),kae(this,j_,e,"f"),kae(this,Ha,r.getLogger("GraphQLActivityManager"),"f")}getTasks(e){return hF(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Ca(this,Ha,"f").verbose("calling getTask query...");const i=yield this.handleQuery(Ca(this,j_,"f").getTasks(Ca(this,pF,"f").create(e)));return Ca(this,Ha,"f").verbose("getTask query complete"),i.hasError()?Ca(this,Ha,"f").error("getTask query error",i.error):Ca(this,Ha,"f").info("successfully called getTask query"),new Yt((r=i.data)===null||r===void 0?void 0:r.getTasks,i.error)})}updateTaskStatus(e){return hF(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Ca(this,Ha,"f").verbose("calling taskUpdateStatus mutation");const n=yield this.handleTransaction(Ca(this,j_,"f").taskUpdateStatus(e.data()));return Ca(this,Ha,"f").verbose("taskUpdateStatus mutation complete"),n.failure()?(Ca(this,Ha,"f").error("taskUpdateStatus error",n),n.intoFailure()):(Ca(this,Ha,"f").info("taskUpdateStatus mutation success"),tr.success(n.data().taskUpdateStatus))})}setTaskStatus(e){return hF(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Ca(this,Ha,"f").verbose("calling setTaskStatus mutation");const n=yield this.handleTransaction(Ca(this,j_,"f").setTaskStatus(e.data()));return Ca(this,Ha,"f").verbose("setTaskStatus mutation complete"),n.failure()?(Ca(this,Ha,"f").error("setTaskStatus error",n),n.intoFailure()):(Ca(this,Ha,"f").info("setTaskStatus mutation success"),tr.success(n.data().updateTaskStatus))})}}Ha=new WeakMap,j_=new WeakMap,pF=new WeakMap;var wh=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},_F=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},vn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},bc,Un,oO;class brt extends bo{constructor(e,r=new ws,n=new Crt){super(),bc.set(this,void 0),Un.set(this,void 0),oO.set(this,void 0),_F(this,bc,e,"f"),_F(this,Un,r.getLogger("GraphQLConnectionManager"),"f"),_F(this,oO,n,"f")}getMemberConnections(e){return wh(this,void 0,void 0,function*(){var r,n;if(e){const a=this.validateRequest(e);if(a.failure())return a.toQueryResult()}vn(this,Un,"f").verbose("calling getMemberConnections...");const i=e?e.data():{},s=yield this.handleQuery(vn(this,bc,"f").getMemberConnections({integrationType:(r=i.integrationType)!==null&&r!==void 0?r:null,status:(n=i.status)!==null&&n!==void 0?n:null}));return vn(this,Un,"f").verbose("getMemberConnections complete"),s.hasError()?vn(this,Un,"f").error("getMemberConnections failed",s.error):vn(this,Un,"f").info("successfully called getMemberConnections"),vn(this,oO,"f").create(s)})}getDataSource(e){return wh(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();vn(this,Un,"f").verbose("calling getDataSources...");const i=yield this.handleQuery(vn(this,bc,"f").getDataSource(Object.assign({},e.data())));return vn(this,Un,"f").verbose("getDataSources complete"),i.hasError()?vn(this,Un,"f").error("getDataSources failed",i.error):vn(this,Un,"f").info("successfully called getDataSources"),new Yt((r=i.data)===null||r===void 0?void 0:r.getDataSource,i.error)})}createConnection(e){return wh(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();vn(this,Un,"f").verbose("calling createConnection...");const n=yield this.handleTransaction(vn(this,bc,"f").createConnection(e.data()));return vn(this,Un,"f").verbose("createConnection complete"),n.failure()?(vn(this,Un,"f").error("createConnection failed",n),n.intoFailure()):(vn(this,Un,"f").info("successfully called createConnection"),tr.success(n.data().createConnection))})}disconnectConnection(e){return wh(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();vn(this,Un,"f").verbose("calling disconnectConnection...");const n=yield this.handleTransaction(vn(this,bc,"f").disconnectConnection(Object.assign({},e.data())));return vn(this,Un,"f").verbose("disconnectConnection complete"),n.failure()?(vn(this,Un,"f").error("disconnectConnection failed",n),n.intoFailure()):(vn(this,Un,"f").info("successfully called disconnectConnection"),tr.success(n.data().disconnectConnection))})}deleteConnection(e){return wh(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();vn(this,Un,"f").verbose("calling deleteConnection...");const n=yield this.handleTransaction(vn(this,bc,"f").deleteConnection(Object.assign({},e.data())));return vn(this,Un,"f").verbose("deleteConnection complete"),n.failure()?(vn(this,Un,"f").error("deleteConnection failed",n),n.intoFailure()):(vn(this,Un,"f").info("successfully called deleteConnection"),tr.success(n.data().deleteConnection))})}activateDirectConnection(e){return wh(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();vn(this,Un,"f").verbose("calling activateDirectConnection...");const n=yield this.handleTransaction(vn(this,bc,"f").activateDirectConnection(Object.assign({},e.data())));return vn(this,Un,"f").verbose("activateDirectConnection complete"),n.failure()?(vn(this,Un,"f").error("activateDirectConnection failed",n),n.intoFailure()):(vn(this,Un,"f").info("successfully called activateDirectConnection"),tr.success(n.data().activateDirectConnection))})}getOauthUrl(e){return wh(this,void 0,void 0,function*(){var r,n,i,s;const a=this.validateRequest(e);if(a.failure())return a.toQueryResult();vn(this,Un,"f").verbose("calling getOauthUrl...");const o=e.data(),u=yield this.handleQuery(vn(this,bc,"f").getOauthUrl({connectionId:o.connectionId,connectUrl:(r=o.connectUrl)!==null&&r!==void 0?r:null,successUrl:(n=o.successUrl)!==null&&n!==void 0?n:null,failureUrl:(i=o.failureUrl)!==null&&i!==void 0?i:null}));return vn(this,Un,"f").verbose("getOauthUrl complete"),u.hasError()?vn(this,Un,"f").error("getOauthUrl failed",u.error):vn(this,Un,"f").info("successfully called getOauthUrl"),new Yt((s=u.data)===null||s===void 0?void 0:s.getOauthUrl,u.error)})}}bc=new WeakMap,Un=new WeakMap,oO=new WeakMap;class Crt{create(e){var r,n,i,s,a,o;const u=new Map,c=(i=(n=(r=e.data)===null||r===void 0?void 0:r.subscription_subscription)===null||n===void 0?void 0:n.entry)!==null&&i!==void 0?i:[];for(const d of c)if(Wr((s=d?.resource)===null||s===void 0?void 0:s.service_slug)&&Wr(d?.resource.subscriptionStatus))for(const f of d.resource.subscriptionStatus)u.set(d.resource.service_slug,{error:f?.error,extension:f?.extension});const l=(o=(a=e.data)===null||a===void 0?void 0:a.getMemberConnections)!==null&&o!==void 0?o:[];return new Yt(l.map(d=>{var f;const _=u.get(d.id);if(Ks(_))return Object.assign(Object.assign({},d),{syncErrors:[]});const m=(f=_.extension)===null||f===void 0?void 0:f.find(E=>E?.id===jZe);return Object.assign(Object.assign({},d),{syncErrors:_.error,syncStatus:m?m.valueString:d.syncStatus})}),e.error)}}var uO=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Gae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Xs=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Nh,ca;class Rrt extends bo{constructor(e,r=new ws){super(),Nh.set(this,void 0),ca.set(this,void 0),Gae(this,Nh,e,"f"),Gae(this,ca,r.getLogger("GraphQLDataSharingManager"),"f")}getDataSharingGrants(){return uO(this,void 0,void 0,function*(){var e;Xs(this,ca,"f").verbose("calling getDataSharingGrants query...");const r=yield this.handleQuery(Xs(this,Nh,"f").GetDataSharingGrants());return Xs(this,ca,"f").verbose("getDataSharingGrants query complete."),r.hasError()&&Xs(this,ca,"f").error("getDataSharingGrants query error",r.error),new Yt((e=r.data)===null||e===void 0?void 0:e.dataSharingGrants,r.error)})}getDataSharingAccess(){return uO(this,void 0,void 0,function*(){var e;Xs(this,ca,"f").verbose("calling getDataSharingAccess query...");const r=yield this.handleQuery(Xs(this,Nh,"f").GetDataSharingAccess());return Xs(this,ca,"f").verbose("getDataSharingAccess query complete."),r.hasError()&&Xs(this,ca,"f").error("getDataSharingAccess query error",r.error),new Yt((e=r.data)===null||e===void 0?void 0:e.dataSharingAccess,r.error)})}acceptDataSharingInvitation(e){return uO(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Xs(this,ca,"f").verbose("calling acceptDataSharingInvitation mutation...");const n=yield this.handleTransaction(Xs(this,Nh,"f").AcceptDataSharingInvitation(Object.assign({},e.data())));return Xs(this,ca,"f").verbose("acceptDataSharingInvitation mutation complete."),n.failure()?(Xs(this,ca,"f").error("acceptDataSharingInvitation mutation failed",n),n.intoFailure()):(Xs(this,ca,"f").info("successfully called acceptDataSharingInvitation mutation"),tr.success(n.data().acceptDataSharingInvitation))})}requestDataSharingToken(e){return uO(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Xs(this,ca,"f").verbose("calling requestDataSharingToken mutation...");const n=yield this.handleTransaction(Xs(this,Nh,"f").RequestDataSharingToken({input:e.data()}));return Xs(this,ca,"f").verbose("requestDataSharingToken mutation complete."),n.failure()?(Xs(this,ca,"f").error("requestDataSharingToken mutation failed",n),n.intoFailure()):(Xs(this,ca,"f").info("successfully called requestDataSharingToken mutation"),tr.success(n.data().requestDataSharingToken))})}}Nh=new WeakMap,ca=new WeakMap;class Ort{create(e){return{deviceToken:e.data().deviceToken,platformName:"",applicationName:"",notificationPreference:!1}}}class Prt{create(e){return Object.assign(Object.assign({},e.data()),{notificationPreference:!0})}}var z_=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Vae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Dn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Sl,si,mF,gF;class Irt extends bo{constructor(e,r=new ws){super(),Sl.set(this,void 0),si.set(this,void 0),mF.set(this,new Ort),gF.set(this,new Prt),Vae(this,Sl,e,"f"),Vae(this,si,r.getLogger("GraphQLDeviceManager"),"f")}registerDevice(e){return z_(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=Dn(this,gF,"f").create(e);Dn(this,si,"f").verbose("calling updateDeviceRegistration to register device...");const i=yield this.handleTransaction(Dn(this,Sl,"f").updateDeviceRegistration(n));return Dn(this,si,"f").verbose("updateDeviceRegistration complete for registration."),i.failure()?(Dn(this,si,"f").error("updateDeviceRegistration failed",i),i.intoFailure()):(Dn(this,si,"f").info("successfully called updateDeviceRegistration for registration."),tr.success(i.data().updateDeviceRegistration))})}deregisterDevice(e){return z_(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Dn(this,si,"f").verbose("calling updateDeviceRegistration to deregister device...");const n=Dn(this,mF,"f").create(e),i=yield this.handleTransaction(Dn(this,Sl,"f").updateDeviceRegistration(n));return Dn(this,si,"f").verbose("updateDeviceRegistration complete for deregistration."),i.failure()?(Dn(this,si,"f").error("updateDeviceRegistration failed",i),i.intoFailure()):(Dn(this,si,"f").info("successfully called updateDeviceRegistration for deregistration."),tr.success(i.data().updateDeviceRegistration))})}getDeviceProviders(){return z_(this,void 0,void 0,function*(){var e;Dn(this,si,"f").verbose("calling getDeviceProviders...");const r=yield this.handleQuery(Dn(this,Sl,"f").getDeviceProviders());return Dn(this,si,"f").verbose("getDeviceProviders complete"),r.hasError()?Dn(this,si,"f").error("getDeviceProviders failed",r.error):Dn(this,si,"f").info("successfully called getDeviceProviders"),new Yt((e=r.data)===null||e===void 0?void 0:e.getDeviceProviders,r.error)})}getDeviceUserStatus(e){return z_(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();Dn(this,si,"f").verbose("calling getDeviceUserStatus...");const i=yield this.handleQuery(Dn(this,Sl,"f").getDeviceUserStatus({connectionId:e.data().connectionId}));return Dn(this,si,"f").verbose("getDeviceUserStatus complete"),i.hasError()?Dn(this,si,"f").error("getDeviceUserStatus failed",i.error):Dn(this,si,"f").info("successfully called getDeviceUserStatus"),new Yt((r=i.data)===null||r===void 0?void 0:r.getDeviceUserStatus,i.error)})}getDeviceProviderStatus(e){return z_(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();Dn(this,si,"f").verbose("calling getDeviceProviderStatus...");const i=yield this.handleQuery(Dn(this,Sl,"f").getDeviceProviderStatus({connectionId:e.data().connectionId}));return Dn(this,si,"f").verbose("getDeviceProviderStatus complete"),i.hasError()?Dn(this,si,"f").error("getDeviceProviderStatus failed",i.error):Dn(this,si,"f").info("successfully called getDeviceProviderStatus"),new Yt((r=i.data)===null||r===void 0?void 0:r.getDeviceProviderStatus,i.error)})}setupMobileSync(e){return z_(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Dn(this,si,"f").verbose("calling setupMobileSync...");const n=yield this.handleTransaction(Dn(this,Sl,"f").setupMobileSync({connectionId:e.data().connectionId}));return Dn(this,si,"f").verbose("setupMobileSync complete"),n.failure()?(Dn(this,si,"f").error("setupMobileSync failed",n),n.intoFailure()):(Dn(this,si,"f").info("successfully called setupMobileSync"),tr.success(n.data().setupMobileSync))})}}Sl=new WeakMap,si=new WeakMap,mF=new WeakMap,gF=new WeakMap;class Mrt{create(e){const r=JSON.parse(e.data().serializedNotification);return{notificationId:r.notification_id,messageId:r.itbl.messageId,eventType:f1.MobilePushOpen}}}var wrt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},vF=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Dh=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},cO,Bd,lO;class Nrt extends bo{constructor(e,r=new ws,n=new Mrt){super(),cO.set(this,void 0),Bd.set(this,void 0),lO.set(this,void 0),vF(this,cO,e,"f"),vF(this,Bd,r.getLogger("GraphQLEventManager"),"f"),vF(this,lO,n,"f")}handleNotification(e){return wrt(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();Dh(this,Bd,"f").debug("Calling publishEvent");let n;try{n=Dh(this,lO,"f").create(e)}catch(s){return Dh(this,Bd,"f").error("Error creating publishEvent request",s),tr.failure(new s1("Error creating publishEvent request"))}const i=yield this.handleTransaction(Dh(this,cO,"f").publishEvent(n));return Dh(this,Bd,"f").debug("publishEvent completed"),i.failure()?(Dh(this,Bd,"f").error("publishEvent mutation error",i),i.intoFailure()):(Dh(this,Bd,"f").info("publishEvent mutation success"),tr.success(i.data().publishEvent))})}}cO=new WeakMap,Bd=new WeakMap,lO=new WeakMap;class Drt{create(e){var r,n,i,s;const a=e.data(),o=(n=(r=a.sortBy)===null||r===void 0?void 0:r.map(u=>u.order===xR.Desc?`-${u.field}`:u.field))!==null&&n!==void 0?n:null;return{request:{coverage:a.coverage,claimType:(i=a.claimType)!==null&&i!==void 0?i:null,claimStatus:(s=a.claimStatus)!==null&&s!==void 0?s:null,dateProcessed:a.dateProcessed,dateReceived:a.dateReceived,servicePeriod:a.servicePeriod,page:a.page,pageSize:a.pageSize,sort:o,memberFilter:a.memberFilter}}}}class Lrt{create(e){var r,n,i,s,a,o,u,c;const l=e?.data();return{id:(r=l?.id)!==null&&r!==void 0?r:null,lastUpdated:(n=l?.lastUpdated)!==null&&n!==void 0?n:null,sort:(i=l?.sort)!==null&&i!==void 0?i:null,page:(s=l?.page)!==null&&s!==void 0?s:null,pageSize:(a=l?.pageSize)!==null&&a!==void 0?a:null,patient:(o=l?.patient)!==null&&o!==void 0?o:null,beneficiary:(u=l?.beneficiary)!==null&&u!==void 0?u:null,total:(c=l?.total)!==null&&c!==void 0?c:UR.Accurate}}}class $rt{create(e){var r,n,i,s,a,o,u,c,l,d;const f=e?.data();return{page:(r=f?.page)!==null&&r!==void 0?r:null,pageSize:(n=f?.pageSize)!==null&&n!==void 0?n:null,id:(i=f?.id)!==null&&i!==void 0?i:null,lastUpdated:(s=f?.lastUpdated)!==null&&s!==void 0?s:null,patient:(a=f?.patient)!==null&&a!==void 0?a:null,provider:(o=f?.provider)!==null&&o!==void 0?o:null,coverage:(u=f?.coverage)!==null&&u!==void 0?u:null,status:(c=f?.status)!==null&&c!==void 0?c:null,created:(l=f?.created)!==null&&l!==void 0?l:null,sort:(d=f?.sort)!==null&&d!==void 0?d:null,total:UR.Accurate}}}var GS=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Bae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},qi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Js,jd,SF,yF,EF;class xrt extends bo{constructor(e,r=new ws){super(),Js.set(this,void 0),jd.set(this,void 0),SF.set(this,new Lrt),yF.set(this,new $rt),EF.set(this,new Drt),Bae(this,jd,e,"f"),Bae(this,Js,r.getLogger("GraphQLFinancialManager"),"f")}getCoverages(e){return GS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();qi(this,Js,"f").verbose("calling getCoverages...");const i=yield this.handleQuery(qi(this,jd,"f").getCoverages(qi(this,SF,"f").create(e)));return qi(this,Js,"f").verbose("getCoverages complete"),i.hasError()&&qi(this,Js,"f").error("getCoverages errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.coverages,i.error)})}getCoverageSummary(e){return GS(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();qi(this,Js,"f").verbose("calling getCoverageSummary...");const s=yield this.handleQuery(qi(this,jd,"f").getCoverageSummary({request:(r=e?.data())!==null&&r!==void 0?r:null}));return qi(this,Js,"f").verbose("getCoverageSummary complete"),s.hasError()&&qi(this,Js,"f").error("getCoverageSummary errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getCoverageSummary,s.error)})}getEOBDocument(e){return GS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();qi(this,Js,"f").verbose("calling getEOBDocument...");const i=yield this.handleQuery(qi(this,jd,"f").getEOBDocument({claimId:e.data().claimId}));return qi(this,Js,"f").verbose("getEOBDocument complete"),i.hasError()&&qi(this,Js,"f").error("getEOBDocument errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getEOBDocument,i.error)})}getExplanationOfBenefits(e){return GS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();qi(this,Js,"f").verbose("calling getExplanationOfBenefits...");const i=yield this.handleQuery(qi(this,jd,"f").getExplanationOfBenefits(qi(this,yF,"f").create(e)));return qi(this,Js,"f").verbose("getExplanationOfBenefits complete"),i.hasError()&&qi(this,Js,"f").error("getExplanationOfBenefits errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.explanationOfBenefits,i.error)})}getClaimSummary(e){return GS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();qi(this,Js,"f").verbose("calling getClaimSummary...");const i=yield this.handleQuery(qi(this,jd,"f").getClaimSummary(qi(this,EF,"f").create(e)));return qi(this,Js,"f").verbose("getClaimSummary complete"),i.hasError()&&qi(this,Js,"f").error("getClaimSummary errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getClaimSummary,i.error)})}}Js=new WeakMap,jd=new WeakMap,SF=new WeakMap,yF=new WeakMap,EF=new WeakMap;function dO(t,e){const r=(t.role||[]).map(i=>({text:i})),n={id:t.id,member:{reference:`${t.type}/${t.id}`},role:r};return e!==void 0&&(n.period=e),n}class Urt{create(e){const r=e.data();return{participant:dO(r,{start:u1(),end:null})}}}class Frt{create(e){const r=e.data(),n=u1();return{participant:r.members.map(s=>dO(s,{start:n,end:null}))}}}class krt{create(e){var r,n,i,s,a,o,u,c,l;const d=e.data();return{source:(r=d._source)!==null&&r!==void 0?r:null,id:(n=d._id)!==null&&n!==void 0?n:null,count:(i=d._count)!==null&&i!==void 0?i:25,getPagesOffset:(s=d._getpagesoffset)!==null&&s!==void 0?s:0,total:(a=d._total)!==null&&a!==void 0?a:null,date:(o=d.date)!==null&&o!==void 0?o:null,sort:(u=d._sort)!==null&&u!==void 0?u:null,supportingInformation:(c=d.supporting_info)!==null&&c!==void 0?c:null,status:(l=d.status)!==null&&l!==void 0?l:null}}}class Grt{create(e){const r=e.data();return{appointment:{id:r.id,status:c1.Cancelled,cancelationReason:r.cancelationReason}}}}class Vrt{create(e){var r,n;const i=e.data();return{pageNumber:(r=i.page)!==null&&r!==void 0?r:0,pageSize:(n=i.pageSize)!==null&&n!==void 0?n:20}}}class Brt{create(e){const r=e.data();return{participant:dO(r,{end:u1()})}}}class jrt{create(e){const r=e.data();return{appointment:{id:r.id,notificationPreferences:r.notificationPreferences.map(n=>({method:n.method,enabled:n.enabled,data:n.data}))}}}}class zrt{create(e){const r=e.data();return{participant:dO(r)}}}var Cc=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},jae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Xr,Co,AF,TF,bF,CF,RF,OF,PF,IF;class Hrt extends bo{constructor(e,r=new ws){super(),Xr.set(this,void 0),Co.set(this,void 0),AF.set(this,new krt),TF.set(this,new Grt),bF.set(this,new jrt),CF.set(this,new Brt),RF.set(this,new Urt),OF.set(this,new Frt),PF.set(this,new zrt),IF.set(this,new Vrt),jae(this,Co,e,"f"),jae(this,Xr,r.getLogger("GraphQLHealthSpaceManager"),"f")}getAppointments(e){return Cc(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();pr(this,Xr,"f").verbose("calling appointments query...");const i=yield this.handleQuery(pr(this,Co,"f").appointments(pr(this,AF,"f").create(e)));return pr(this,Xr,"f").verbose("appointments query complete"),i.hasError()?pr(this,Xr,"f").error("appointments query error",i.error):pr(this,Xr,"f").info("successfully called appointments query"),new Yt((r=i.data)===null||r===void 0?void 0:r.appointments,i.error)})}cancelAppointment(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling cancel appointment mutation...");const n=yield this.handleTransaction(pr(this,Co,"f").cancelAppointment(pr(this,TF,"f").create(e)));return pr(this,Xr,"f").verbose("cancel appointment mutation complete"),n.failure()?(pr(this,Xr,"f").error("cancel appointment mutation error",n),n.intoFailure()):(pr(this,Xr,"f").info("successfully called cancel appointment mutation"),tr.success(n.data().updateAppointment))})}updateAppointmentNotificationPreferences(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling update appointment notification preference mutation...");const n=yield this.handleTransaction(pr(this,Co,"f").updateAppointmentNotificationPreferences(pr(this,bF,"f").create(e)));return pr(this,Xr,"f").verbose("update appointment notification preference mutation complete"),n.failure()?(pr(this,Xr,"f").error("update appointment notification preference mutation error",n),n.intoFailure()):(pr(this,Xr,"f").info("successfully called update appointment notification preference mutation"),tr.success(n.data().updateAppointment))})}getCancelationReasons(e){return Cc(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();pr(this,Xr,"f").verbose("calling cancelationReasons query...");const i=yield this.handleQuery(pr(this,Co,"f").cancelationReasons(e.data()));return pr(this,Xr,"f").verbose("cancelationReasons query complete"),i.hasError()?pr(this,Xr,"f").error("cancelationReasons query error",i.error):pr(this,Xr,"f").info("successfully called cancelationReasons query"),new Yt((r=i.data)===null||r===void 0?void 0:r.cancelationReasons,i.error)})}removeCareTeamMember(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling removeCareTeamMember mutation...");const n=yield this.handleTransaction(pr(this,Co,"f").removeCareTeamMember(pr(this,CF,"f").create(e)));return pr(this,Xr,"f").verbose("removeCareTeamMember mutation completed"),n.failure()?(pr(this,Xr,"f").error("removeCareTeamMember mutation error",n),n.intoFailure()):(pr(this,Xr,"f").info("successfully called removeCareTeamMember mutation"),tr.success(n.data()))})}addCareTeamMember(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling addCareTeamMember mutation...");const n=yield this.handleTransaction(pr(this,Co,"f").addCareTeamMember(pr(this,RF,"f").create(e)));return pr(this,Xr,"f").verbose("addCareTeamMember mutation completed"),n.failure()?(pr(this,Xr,"f").error("addCareTeamMember mutation error",n),n.intoFailure()):(pr(this,Xr,"f").info("successfully called addCareTeamMember mutation"),tr.success(n.data()))})}addCareTeamMembers(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling addCareTeamMembers mutation...");const n=pr(this,OF,"f").create(e),i=yield this.handleTransaction(pr(this,Co,"f").addCareTeamMembers(n));return pr(this,Xr,"f").verbose("addCareTeamMembers mutation completed"),i.failure()?(pr(this,Xr,"f").error("addCareTeamMembers mutation error",i),i.intoFailure()):(pr(this,Xr,"f").info("successfully called addCareTeamMembers mutation"),tr.success(i.data()))})}updateCareTeamMember(e){return Cc(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();pr(this,Xr,"f").verbose("calling updateCareTeamMember mutation...");const n=pr(this,PF,"f").create(e),i=yield this.handleTransaction(pr(this,Co,"f").updateCareTeamMember(n));return pr(this,Xr,"f").verbose("updateCareTeamMember mutation completed"),i.failure()?i.intoFailure():tr.success(i.data())})}getCareTeamMembers(e){return Cc(this,void 0,void 0,function*(){var r;const n=e??new PXe({page:0}),i=this.validateRequest(n);if(i.failure())return i.toQueryResult();pr(this,Xr,"f").verbose("calling getCareTeamMembers query...");const s=pr(this,IF,"f").create(n),a=yield this.handleQuery(pr(this,Co,"f").CareTeamMembers(s));return pr(this,Xr,"f").verbose("getCareTeamMembers query complete"),a.hasError()?pr(this,Xr,"f").error("getCareTeamMembers query error",a.error):pr(this,Xr,"f").info("successfully called getCareTeamMembers query"),new Yt((r=a.data)===null||r===void 0?void 0:r.careTeamMembers,a.error)})}getMemberPlanIdentifiers(){return Cc(this,void 0,void 0,function*(){var e;pr(this,Xr,"f").verbose("calling getMemberPlanIdentifiers query...");const r=yield this.handleQuery(pr(this,Co,"f").getMemberPlanIdentifiers());return pr(this,Xr,"f").verbose("getMemberPlanIdentifiers query complete"),r.hasError()?pr(this,Xr,"f").error("getMemberPlanIdentifiers query error",r.error):pr(this,Xr,"f").info("successfully called getMemberPlanIdentifiers query"),new Yt((e=r.data)===null||e===void 0?void 0:e.memberPlanIdentifiers,r.error)})}}Xr=new WeakMap,Co=new WeakMap,AF=new WeakMap,TF=new WeakMap,bF=new WeakMap,CF=new WeakMap,RF=new WeakMap,OF=new WeakMap,PF=new WeakMap,IF=new WeakMap;class qrt{create(e){var r;const{id:n,page:i,pageSize:s,sort:a}=(r=e?.data())!==null&&r!==void 0?r:{};return{id:n?{values:n}:null,pageSize:s??null,page:i??null,sort:a??null}}}class Yrt{create(e){var r;const n=(r=e.data)===null||r===void 0?void 0:r.getMedicationDispense;if(!n)return new Yt(void 0,e.error);const i=Object.assign(Object.assign({},n),n?.resources&&{resources:n?.resources.map(s=>{var a,o,u,c,l,d,f;return Object.assign(Object.assign({},s),s.medication&&{medication:Object.assign(Object.assign({},s.medication),((a=s.medication)===null||a===void 0?void 0:a.resource)&&{resource:Object.assign(Object.assign({},(o=s.medication)===null||o===void 0?void 0:o.resource),((c=(u=s.medication)===null||u===void 0?void 0:u.resource)===null||c===void 0?void 0:c.ingredient)&&{ingredient:(f=(d=(l=s.medication)===null||l===void 0?void 0:l.resource)===null||d===void 0?void 0:d.ingredient)===null||f===void 0?void 0:f.map(_=>{var m,E;return Object.assign(Object.assign({},_),((m=_?.itemReference)===null||m===void 0?void 0:m.itemReferenceResource)&&{itemReference:{resource:(E=_?.itemReference)===null||E===void 0?void 0:E.itemReferenceResource}})})})})})})});return new Yt(i,e.error)}}class Qrt{create(e){var r;const n=(r=e.data)===null||r===void 0?void 0:r.getMedicationRequest;if(!n)return new Yt(void 0,e.error);const i=Object.assign(Object.assign({},n),n?.resources&&{resources:n?.resources.map(s=>{var a,o,u,c,l,d,f;return Object.assign(Object.assign({},s),s.medication&&{medication:Object.assign(Object.assign({},s.medication),((a=s.medication)===null||a===void 0?void 0:a.resource)&&{resource:Object.assign(Object.assign({},(o=s.medication)===null||o===void 0?void 0:o.resource),((c=(u=s.medication)===null||u===void 0?void 0:u.resource)===null||c===void 0?void 0:c.ingredient)&&{ingredient:(f=(d=(l=s.medication)===null||l===void 0?void 0:l.resource)===null||d===void 0?void 0:d.ingredient)===null||f===void 0?void 0:f.map(_=>{var m,E;return Object.assign(Object.assign({},_),((m=_?.itemReference)===null||m===void 0?void 0:m.itemReferenceResource)&&{itemReference:{resource:(E=_?.itemReference)===null||E===void 0?void 0:E.itemReferenceResource}})})})})})})});return new Yt(i,e.error)}}class Wrt{create(e){const r=e.data();return{input:{id:r.id,status:r.status}}}}class Krt{create(e){const r=e.data(),n=bie(r.file);if(n===null)throw new IR(["File must be a valid data URI with base64 encoding (e.g., data:image/png;base64,...)"]);const i=n.contentType;return{input:{data:n.data,contentType:i,title:r.title,typeCoding:r.typeCoding!==void 0?{system:r.typeCoding.system,code:r.typeCoding.code,display:r.typeCoding.display}:void 0}}}}class Zrt{create(e){var r,n,i,s,a;if(e.id===null||e.id===void 0)throw new IR(["uploadDocument response is missing required field: id"]);if(e.resourceType===null||e.resourceType===void 0)throw new IR(["uploadDocument response is missing required field: resourceType"]);return{id:e.id,resourceType:e.resourceType,status:(r=e.status)!==null&&r!==void 0?r:void 0,category:(n=e.category)===null||n===void 0?void 0:n.map(o=>{var u,c;return{coding:(u=o?.coding)===null||u===void 0?void 0:u.map(l=>{var d;return{system:l?.system,code:l?.code,display:(d=l?.display)!==null&&d!==void 0?d:void 0}}),text:(c=o?.text)!==null&&c!==void 0?c:void 0}}),subject:e.subject?{reference:(i=e.subject.reference)!==null&&i!==void 0?i:void 0,display:(s=e.subject.display)!==null&&s!==void 0?s:void 0}:void 0,content:(a=e.content)===null||a===void 0?void 0:a.map(o=>{var u,c;return{attachment:o?.attachment?{contentType:(u=o.attachment.contentType)!==null&&u!==void 0?u:void 0,title:(c=o.attachment.title)!==null&&c!==void 0?c:void 0}:void 0}})}}}var Sn=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},zd=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},st=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},on,Tt,fO,hO,pO,_O,mO,gO;class Xrt extends bo{constructor(e,r=new ws,n=new Qrt,i=new Yrt,s=new qrt,a=new Wrt,o=new Krt,u=new Zrt){super(),on.set(this,void 0),Tt.set(this,void 0),fO.set(this,void 0),hO.set(this,void 0),pO.set(this,void 0),_O.set(this,void 0),mO.set(this,void 0),gO.set(this,void 0),zd(this,on,e,"f"),zd(this,Tt,r.getLogger("GraphQLHealthManager"),"f"),zd(this,fO,n,"f"),zd(this,hO,i,"f"),zd(this,pO,s,"f"),zd(this,_O,a,"f"),zd(this,mO,o,"f"),zd(this,gO,u,"f")}getHealthSummary(){return Sn(this,void 0,void 0,function*(){var e;st(this,Tt,"f").verbose("calling getHealthSummary...");const r=yield this.handleQuery(st(this,on,"f").GetHealthSummary());return st(this,Tt,"f").verbose("getHealthSummary complete"),r.hasError()?st(this,Tt,"f").error("getHealthSummary failed",r.error):st(this,Tt,"f").info("successfully called getHealthSummary"),new Yt((e=r.data)===null||e===void 0?void 0:e.getHealthSummary,r.error)})}getAllergyIntolerances(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getAllergyIntolerances...");const s=yield this.handleQuery(st(this,on,"f").getAllergyIntolerances({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getAllergyIntolerances complete"),s.hasError()&&st(this,Tt,"f").error("getAllergyIntolerances errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getAllergyIntolerances,s.error)})}getAllergyIntoleranceGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getAllergyIntoleranceGroups...");const s=yield this.handleQuery(st(this,on,"f").getAllergyIntoleranceGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getAllergyIntoleranceGroups complete"),s.hasError()&&st(this,Tt,"f").error("getAllergyIntoleranceGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getAllergyIntoleranceGroups,s.error)})}getConditions(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getConditions...");const s=yield this.handleQuery(st(this,on,"f").getConditions({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getConditions complete"),s.hasError()&&st(this,Tt,"f").error("getConditions errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getConditions,s.error)})}getConditionGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getConditionGroups...");const s=yield this.handleQuery(st(this,on,"f").getConditionGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getConditionGroups complete"),s.hasError()&&st(this,Tt,"f").error("getConditionGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getConditionGroups,s.error)})}getDiagnosticReports(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getDiagnosticReports...");const i=yield this.handleQuery(st(this,on,"f").getDiagnosticReports(st(this,pO,"f").create(e)));return st(this,Tt,"f").verbose("getDiagnosticReports complete"),i.hasError()&&st(this,Tt,"f").error("getDiagnosticReports errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.diagnosticReports,i.error)})}getDocumentReferences(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getDocumentReferences...");const s=yield this.handleQuery(st(this,on,"f").getDocumentReferences({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getDocumentReferences complete"),s.hasError()&&st(this,Tt,"f").error("getDocumentReferences errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getDocumentReferences,s.error)})}getDocumentReferencesList(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getDocumentReferencesList...");const s=yield this.handleQuery(st(this,on,"f").getDocumentReferencesList({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getDocumentReferencesList complete"),s.hasError()&&st(this,Tt,"f").error("getDocumentReferencesList errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getDocumentReferences,s.error)})}getBinary(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getBinary...");const i=yield this.handleQuery(st(this,on,"f").getBinary({request:e.data()}));return st(this,Tt,"f").verbose("getBinary complete"),i.hasError()&&st(this,Tt,"f").error("getBinary errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getBinary,i.error)})}getLabs(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getLabs...");const s=yield this.handleQuery(st(this,on,"f").getLabs({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getLabs complete"),s.hasError()&&st(this,Tt,"f").error("getLabs errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getLabs,s.error)})}getLabGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getLabGroups...");const s=yield this.handleQuery(st(this,on,"f").getLabGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getLabGroups complete"),s.hasError()&&st(this,Tt,"f").error("getLabGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getLabGroups,s.error)})}getCarePlans(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getCarePlans...");const s=yield this.handleQuery(st(this,on,"f").getCarePlans({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getCarePlans complete"),s.hasError()&&st(this,Tt,"f").error("getCarePlans errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getCarePlans,s.error)})}getCarePlanGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getCarePlanGroups...");const s=yield this.handleQuery(st(this,on,"f").getCarePlanGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getCarePlanGroups complete"),s.hasError()&&st(this,Tt,"f").error("getCarePlanGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getCarePlanGroups,s.error)})}getCareTeams(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getCareTeams");const s=yield this.handleQuery(st(this,on,"f").getCareTeams({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getCareTeams complete"),s.hasError()&&st(this,Tt,"f").error("getCareTeams errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getCareTeams,s.error)})}getEncounters(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getEncounters...");const s=yield this.handleQuery(st(this,on,"f").getEncounterQuery({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getEncounters complete"),s.hasError()&&st(this,Tt,"f").error("getEncounters errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getEncounters,s.error)})}getEncounterGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getEncounterGroups...");const s=yield this.handleQuery(st(this,on,"f").getEncountersGroup({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getEncounterGroups complete"),s.hasError()&&st(this,Tt,"f").error("getEncounterGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getEncounterGroups,s.error)})}getImmunizations(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getImmunizations...");const s=yield this.handleQuery(st(this,on,"f").getImmunizations({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getImmunizations complete"),s.hasError()&&st(this,Tt,"f").error("getImmunizations errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getImmunizations,s.error)})}getImmunizationGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getImmunizationGroups...");const s=yield this.handleQuery(st(this,on,"f").getImmunizationGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getImmunizationGroups complete"),s.hasError()&&st(this,Tt,"f").error("getImmunizationGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getImmunizationGroups,s.error)})}getProcedures(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getProcedures...");const s=yield this.handleQuery(st(this,on,"f").GetProcedures({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getProcedures complete"),s.hasError()&&st(this,Tt,"f").error("getProcedures errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getProcedures,s.error)})}getProcedureGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getProcedureGroups...");const s=yield this.handleQuery(st(this,on,"f").getProcedureGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getProcedureGroups complete"),s.hasError()&&st(this,Tt,"f").error("getProcedureGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getProcedureGroups,s.error)})}getVitalSigns(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getVitalSigns...");const i=e?.data(),s=yield this.handleQuery(st(this,on,"f").getObservations({request:Object.assign(Object.assign({},i),{category:g1.VitalSigns})}));return st(this,Tt,"f").verbose("getVitalSigns complete"),s.hasError()&&st(this,Tt,"f").error("getVitalSigns errors",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getObservations,s.error)})}getVitalSignGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getVitalSignGroups...");const s=yield this.handleQuery(st(this,on,"f").getVitalSignGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getVitalSignGroups complete"),s.hasError()&&st(this,Tt,"f").error("getVitalSignGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getVitalSignGroups,s.error)})}getDeviceMetrics(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getDeviceMetrics...");const i=e?.data(),s=yield this.handleQuery(st(this,on,"f").getDeviceMetrics({request:Object.assign({},i)}));return st(this,Tt,"f").verbose("getDeviceMetrics complete"),s.hasError()&&st(this,Tt,"f").error("getDeviceMetrics errors",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getDeviceMetrics,s.error)})}getDeviceMetricsGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getDeviceMetricsGroups...");const s=yield this.handleQuery(st(this,on,"f").getDeviceMetricsGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getDeviceMetricsGroups complete"),s.hasError()&&st(this,Tt,"f").error("getDeviceMetricsGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getDeviceMetricsGroups,s.error)})}getMedicationDispense(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationDispense...");const i=yield this.handleQuery(st(this,on,"f").getMedicationDispense({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getMedicationDispense complete"),i.hasError()&&st(this,Tt,"f").error("getMedicationDispense errors",i.error),st(this,hO,"f").create(i)})}getMedicationRequest(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationRequest...");const i=yield this.handleQuery(st(this,on,"f").getMedicationRequest({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getMedicationRequest complete"),i.hasError()&&st(this,Tt,"f").error("getMedicationRequest errors",i.error),st(this,fO,"f").create(i)})}getMedicationStatements(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationStatements...");const s=yield this.handleQuery(st(this,on,"f").getMedicationStatements({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getMedicationStatements complete"),s.hasError()&&st(this,Tt,"f").error("getMedicationStatements errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getMedicationStatements,s.error)})}updateMedicationStatement(e){return Sn(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();st(this,Tt,"f").verbose("calling updateMedicationStatement...");const n=yield this.handleTransaction(st(this,on,"f").updateMedicationStatement(st(this,_O,"f").create(e)));return st(this,Tt,"f").verbose("updateMedicationStatement complete"),n.failure()?(st(this,Tt,"f").error("updateMedicationStatement failed",n.error()),n.intoFailure()):tr.success(n.data().updateMedicationStatement)})}uploadDocument(e){return Sn(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();st(this,Tt,"f").verbose("calling uploadDocument mutation...");const n=yield this.handleTransaction(st(this,on,"f").UploadDocument(st(this,mO,"f").create(e)));return st(this,Tt,"f").verbose("uploadDocument mutation complete"),n.failure()?(st(this,Tt,"f").error("uploadDocument mutation failed",n.error()),n.intoFailure()):tr.success(st(this,gO,"f").create(n.data().uploadDocument))})}getMedicationGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationGroups...");const s=yield this.handleQuery(st(this,on,"f").getMedicationGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getMedicationGroups complete"),s.hasError()&&st(this,Tt,"f").error("getMedicationGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getMedicationGroups,s.error)})}getMedicationKnowledge(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationKnowledge...");const i=yield this.handleQuery(st(this,on,"f").getMedicationKnowledge({request:e.data()}));return st(this,Tt,"f").verbose("getMedicationKnowledge complete"),i.hasError()&&st(this,Tt,"f").error("getMedicationKnowledge errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getMedicationKnowledge,i.error)})}getLabKnowledge(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getLabKnowledge...");const i=yield this.handleQuery(st(this,on,"f").getLabKnowledge({request:e.data()}));return st(this,Tt,"f").verbose("getLabKnowledge complete"),i.hasError()&&st(this,Tt,"f").error("getLabKnowledge errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getLabKnowledge,i.error)})}getMedicationPricing(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getMedicationPricing...");const i=yield this.handleQuery(st(this,on,"f").getMedicationPricing({request:e.data()}));return st(this,Tt,"f").verbose("getMedicationPricing complete"),i.hasError()&&st(this,Tt,"f").error("getMedicationPricing errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getMedicationPricing,i.error)})}getDiagnosticReportLabGroups(e){return Sn(this,void 0,void 0,function*(){var r,n;const i=this.validateRequest(e);if(i.failure())return i.toQueryResult();st(this,Tt,"f").verbose("calling getDiagnosticReportLabGroups...");const s=yield this.handleQuery(st(this,on,"f").getDiagnosticReportLabGroups({request:(r=e?.data())!==null&&r!==void 0?r:null}));return st(this,Tt,"f").verbose("getDiagnosticReportLabGroups complete"),s.hasError()&&st(this,Tt,"f").error("getDiagnosticReportLabGroups errors",s.error),new Yt((n=s.data)===null||n===void 0?void 0:n.getDiagnosticReportLabGroups,s.error)})}getHealthScore(){return Sn(this,void 0,void 0,function*(){var e;st(this,Tt,"f").verbose("calling getHealthScore...");const r=yield this.handleQuery(st(this,on,"f").getHealthScore());return st(this,Tt,"f").verbose("getHealthScore complete"),r.hasError()&&st(this,Tt,"f").error("getHealthScore errors",r.error),new Yt((e=r.data)===null||e===void 0?void 0:e.getHealthScore.resource,r.error)})}getBodySystemScore(e){return Sn(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();st(this,Tt,"f").verbose("calling getBodySystemScore...");const i=yield this.handleQuery(st(this,on,"f").getBodySystemScore({request:e.data()}));return st(this,Tt,"f").verbose("getBodySystemScore complete"),i.hasError()&&st(this,Tt,"f").error("getBodySystemScore errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.getBodySystemScore.resource,i.error)})}}on=new WeakMap,Tt=new WeakMap,fO=new WeakMap,hO=new WeakMap,pO=new WeakMap,_O=new WeakMap,mO=new WeakMap,gO=new WeakMap;class zae{create(e){var r,n,i,s,a,o,u,c,l;const d=e.data();return{id:(r=d.id)!==null&&r!==void 0?r:null,lastUpdated:(n=d.lastUpdated)!==null&&n!==void 0?n:null,sort:(i=d.sort)!==null&&i!==void 0?i:null,pageSize:(s=d.pageSize)!==null&&s!==void 0?s:20,page:d.page,questionnaire:(a=d.questionnaire)!==null&&a!==void 0?a:null,status:(o=d.status)!==null&&o!==void 0?o:null,patient:(u=d.patient)!==null&&u!==void 0?u:null,tag:(c=d.tag)!==null&&c!==void 0?c:null,total:(l=d.total)!==null&&l!==void 0?l:null}}}class Jrt{create(e){var r,n,i,s,a,o,u;const c=e.data();return{page:c.page,pageSize:c.pageSize,id:(r=c.id)!==null&&r!==void 0?r:null,name:(n=c.name)!==null&&n!==void 0?n:null,sort:(i=c.sort)!==null&&i!==void 0?i:null,context:(s=c.context)!==null&&s!==void 0?s:null,identifier:(a=c.identifier)!==null&&a!==void 0?a:null,security:(o=c.security)!==null&&o!==void 0?o:null,tag:(u=c.tag)!==null&&u!==void 0?u:null}}}var VS=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Hae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},bi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ns,Hd,MF,wF,NF;class ent extends bo{constructor(e,r=new ws){super(),Ns.set(this,void 0),Hd.set(this,void 0),MF.set(this,new zae),wF.set(this,new zae),NF.set(this,new Jrt),Hae(this,Hd,e,"f"),Hae(this,Ns,r.getLogger("GraphQLQuestionnaireManager"),"f")}nextQuestion(e){return VS(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r.intoFailure();bi(this,Ns,"f").verbose("calling nextQuestion mutation...");const n=yield this.handleTransaction(bi(this,Hd,"f").nextQuestion(e.data()));return bi(this,Ns,"f").verbose("nextQuestion mutation complete"),n.failure()?(bi(this,Ns,"f").error("nextQuestion mutation failed",n.error()),n.intoFailure()):(bi(this,Ns,"f").info("successfully called nextQuestion mutation"),tr.success(n.data().nextQuestion))})}saveQuestionnaireResponse(e){return VS(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r.intoFailure();bi(this,Ns,"f").verbose("calling saveQuestionnaireResponse mutation...");const n=yield this.handleTransaction(bi(this,Hd,"f").saveQuestionnaireResponse(e.data()));return bi(this,Ns,"f").verbose("saveQuestionnaireResponse mutation complete"),n.failure()?(bi(this,Ns,"f").error("saveQuestionnaireResponse mutation failed",n.error()),n.intoFailure()):(bi(this,Ns,"f").info("successfully called saveQuestionnaireResponse mutation"),tr.success(n.data().saveQuestionnaireResponse))})}getQuestionnaireResponses(e){return VS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();bi(this,Ns,"f").verbose("calling getQuestionnaireResponses...");const i=yield this.handleQuery(bi(this,Hd,"f").getQuestionnaireResponses(bi(this,MF,"f").create(e)));return bi(this,Ns,"f").verbose("getQuestionnaireResponses complete"),i.hasError()&&bi(this,Ns,"f").error("getQuestionnaireResponses errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.questionnaireResponses,i.error)})}getQuestionnaireResponseList(e){return VS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();bi(this,Ns,"f").verbose("calling getQuestionnaireResponseList...");const i=yield this.handleQuery(bi(this,Hd,"f").getQuestionnaireResponseList(bi(this,wF,"f").create(e)));return bi(this,Ns,"f").verbose("getQuestionnaireResponseList complete"),i.hasError()&&bi(this,Ns,"f").error("getQuestionnaireResponseList errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.questionnaireResponses,i.error)})}getQuestionnaires(e){return VS(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();bi(this,Ns,"f").verbose("calling getQuestionnaires...");const i=yield this.handleQuery(bi(this,Hd,"f").getQuestionnaires(bi(this,NF,"f").create(e)));return bi(this,Ns,"f").verbose("getQuestionnaires complete"),i.hasError()&&bi(this,Ns,"f").error("getQuestionnaires errors",i.error),new Yt((r=i.data)===null||r===void 0?void 0:r.questionnaires,i.error)})}}Ns=new WeakMap,Hd=new WeakMap,MF=new WeakMap,wF=new WeakMap,NF=new WeakMap;class DF{create(e){var r,n,i,s,a,o,u,c,l;const d=e.data(),f=null,_=(r=d.searchTerm)!==null&&r!==void 0?r:null,m=(n=d.specialtyFilters)!==null&&n!==void 0?n:null,E=(i=d.includePopulatedPROAonly)!==null&&i!==void 0?i:!1,S=(s=d.organizationTypeFilters)!==null&&s!==void 0?s:null,C=(a=d.gender)!==null&&a!==void 0?a:null,w=(o=d.location)!==null&&o!==void 0?o:null;let x=null;On(d.sortBy)&&(x={field:(u=d.sortBy.field)!==null&&u!==void 0?u:null,order:(c=d.sortBy.order)!==null&&c!==void 0?c:null});const V=(l=d.filterFields)!==null&&l!==void 0?l:null,H=d.page,W=d.pageSize;return{client:f,searchTerm:_,specialtyFilters:m,includePopulatedPROAonly:E,organizationTypeFilters:S,gender:C,location:w,sortBy:x,filterFields:V,page:H,pageSize:W}}}var tnt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},LF;class rnt{constructor(){LF.set(this,new DF)}create(e){const r=tnt(this,LF,"f").create(e);return r.client={data_sets:[$R.Connecthub]},r}}LF=new WeakMap;var nnt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},$F;class int{constructor(){$F.set(this,new DF)}create(e){const r=nnt(this,$F,"f").create(e);return r.client={data_sets:[$R.Nppes]},r}}$F=new WeakMap;class snt{create(e){var r,n,i,s;const a=e.data();return{institution:(r=a.institution)!==null&&r!==void 0?r:null,provider:(n=a.provider)!==null&&n!==void 0?n:null,city:(i=a.city)!==null&&i!==void 0?i:null,state:(s=a.state)!==null&&s!==void 0?s:null}}}class ant{create(e){var r,n,i,s,a,o,u,c;const l=e.data();return{searchInput:{client:l.client,searchContext:l.searchContext,filters:(r=l.filters)!==null&&r!==void 0?r:null,orderBy:(n=l.orderBy)!==null&&n!==void 0?n:null,paging:{pageNumber:(i=l.page)!==null&&i!==void 0?i:null,pageSize:(s=l.pageSize)!==null&&s!==void 0?s:null},search:(a=l.search)!==null&&a!==void 0?a:null,searchLocation:(o=l.searchLocation)!==null&&o!==void 0?o:null,user:(u=l.user)!==null&&u!==void 0?u:null,filterValues:(c=l.filterValues)!==null&&c!==void 0?c:null}}}}var BS=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},qae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Vn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},qd,Yi,xF,UF,FF,kF,GF;class ont extends bo{constructor(e,r=new ws){super(),qd.set(this,void 0),Yi.set(this,void 0),xF.set(this,new DF),UF.set(this,new int),FF.set(this,new rnt),kF.set(this,new snt),GF.set(this,new ant),qae(this,qd,e,"f"),qae(this,Yi,r.getLogger("GraphQLSearchManager"),"f")}searchHealthResources(e){return BS(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Vn(this,Yi,"f").verbose("calling searchHealthResources query");const i=yield this.handleQuery(Vn(this,qd,"f").SearchHealthResources(Vn(this,GF,"f").create(e)));return Vn(this,Yi,"f").verbose("searchHealthResources query complete"),i.hasError()?Vn(this,Yi,"f").error("searchHealthResources query failed",i.error):Vn(this,Yi,"f").info("successfully called searchHealthResources query"),new Yt((r=i.data)===null||r===void 0?void 0:r.searchHealthResources,i.error)})}search(e){return BS(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Vn(this,Yi,"f").verbose("calling providerSearch search query");const i=yield this.handleQuery(Vn(this,qd,"f").providerSearch(Vn(this,xF,"f").create(e)));return Vn(this,Yi,"f").verbose("providerSearch search query complete"),i.hasError()?Vn(this,Yi,"f").error("providerSearch search query failed",i.error):Vn(this,Yi,"f").info("successfully called providerSearch search query"),new Yt((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}searchProviders(e){return BS(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Vn(this,Yi,"f").verbose("calling providerSearch searchProviders query");const i=yield this.handleQuery(Vn(this,qd,"f").providerSearch(Vn(this,UF,"f").create(e)));return Vn(this,Yi,"f").verbose("providerSearch searchProviders query complete"),i.hasError()?Vn(this,Yi,"f").error("providerSearch searchProviders query failed",i.error):Vn(this,Yi,"f").info("successfully called providerSearch searchProviders query"),new Yt((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}searchConnections(e){return BS(this,void 0,void 0,function*(){var r;const n=e.validate();if(n.failure())return n.toQueryResult();Vn(this,Yi,"f").verbose("calling providerSearch searchConnections query");const i=yield this.handleQuery(Vn(this,qd,"f").providerSearch(Vn(this,FF,"f").create(e)));return Vn(this,Yi,"f").verbose("providerSearch searchConnections query complete"),i.hasError()?Vn(this,Yi,"f").error("providerSearch searchConnections query failed",i.error):Vn(this,Yi,"f").info("successfully called providerSearch searchConnections query"),new Yt((r=i.data)===null||r===void 0?void 0:r.providers,i.error)})}requestConnection(e){return BS(this,void 0,void 0,function*(){Vn(this,Yi,"f").verbose("calling requestConnection mutation");const r=yield this.handleTransaction(Vn(this,qd,"f").requestConnection(Vn(this,kF,"f").create(e)));return Vn(this,Yi,"f").verbose("requestConnection mutation complete"),r.failure()?(Vn(this,Yi,"f").error("requestConnection mutation failed",r),r.intoFailure()):(Vn(this,Yi,"f").info("requestConnection request success"),tr.success(r.data().requestConnection))})}}qd=new WeakMap,Yi=new WeakMap,xF=new WeakMap,UF=new WeakMap,FF=new WeakMap,kF=new WeakMap,GF=new WeakMap;class unt{create(e){const r=e.data();return{input:{requestId:r.requestId,body:r.body,uploads:r.uploads}}}}class cnt{create(e){var r;const n=e.data();return{input:{subject:n.subject,comment:{body:n.comment.body,uploads:n.comment.uploads},fields:{category:n.fields.category},email:n.email,emailCcs:(r=n.emailCcs)===null||r===void 0?void 0:r.map(({email:i,name:s})=>({email:i,name:s})),name:n.name,metadata:n.metadata}}}}class lnt{create(e){return{input:{attachmentId:e.data().attachmentId}}}}class dnt{create(e){var r,n,i,s,a;const o=e.data();return{input:{page:(r=o?.page)!==null&&r!==void 0?r:null,pageSize:(n=o?.pageSize)!==null&&n!==void 0?n:null,search:(i=o?.search)!==null&&i!==void 0?i:null,labelNames:(s=o?.labelNames)!==null&&s!==void 0?s:null,locale:(a=o?.locale)!==null&&a!==void 0?a:null}}}}class fnt{create(e){const r=e.data();return{input:{requestId:r.requestId,attachmentId:r.attachmentId}}}}class hnt{create(e){var r,n,i;const s=e.data();return{input:{requestId:s.requestId,page:(r=s.page)!==null&&r!==void 0?r:null,pageSize:(n=s.pageSize)!==null&&n!==void 0?n:null,sortOrder:(i=s.sortOrder)!==null&&i!==void 0?i:null}}}}class pnt{create(e){var r,n,i,s,a,o;const u=e?.data();return{input:{page:(r=u?.page)!==null&&r!==void 0?r:null,pageSize:(n=u?.pageSize)!==null&&n!==void 0?n:null,search:(i=u?.search)!==null&&i!==void 0?i:null,sortBy:(s=u?.sortBy)!==null&&s!==void 0?s:null,sortOrder:(a=u?.sortOrder)!==null&&a!==void 0?a:null,status:(o=u?.status)!==null&&o!==void 0?o:[],ids:u?.ids}}}}class _nt{create(e){const r=e.data();return{input:{file:r.file,fileName:r.fileName}}}}var yl=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Rc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},wr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Wo,Pn,vO,SO,yO,EO,AO,TO,bO,CO;class mnt extends bo{constructor(e,r=new ws,n=new pnt,i=new _nt,s=new lnt,a=new cnt,o=new dnt,u=new hnt,c=new unt,l=new fnt){super(),Wo.set(this,void 0),Pn.set(this,void 0),vO.set(this,void 0),SO.set(this,void 0),yO.set(this,void 0),EO.set(this,void 0),AO.set(this,void 0),TO.set(this,void 0),bO.set(this,void 0),CO.set(this,void 0),Rc(this,Wo,e,"f"),Rc(this,Pn,r.getLogger("GraphQLSupportManager"),"f"),Rc(this,vO,n,"f"),Rc(this,SO,i,"f"),Rc(this,yO,s,"f"),Rc(this,EO,a,"f"),Rc(this,AO,o,"f"),Rc(this,TO,u,"f"),Rc(this,bO,c,"f"),Rc(this,CO,l,"f")}getSupportRequests(e){return yl(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();const i=wr(this,vO,"f").create(e);wr(this,Pn,"f").verbose("calling getSupportRequests query...");const s=yield this.handleQuery(wr(this,Wo,"f").getSupportRequests(i));return wr(this,Pn,"f").verbose("getSupportRequests query complete."),s.hasError()&&wr(this,Pn,"f").error("getSupportRequests query error",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getSupportRequests,s.error)})}uploadSupportAttachment(e){return yl(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=wr(this,SO,"f").create(e);wr(this,Pn,"f").verbose("calling uploadSupportAttachment mutation...");const i=yield this.handleTransaction(wr(this,Wo,"f").UploadSupportAttachment(n));return wr(this,Pn,"f").verbose("uploadSupportAttachment mutation complete."),i.failure()?(wr(this,Pn,"f").error("uploadSupportAttachment mutation error",i),i.intoFailure()):(wr(this,Pn,"f").info("uploadSupportAttachment mutation success"),tr.success(i.data().uploadSupportAttachment))})}deleteSupportAttachment(e){return yl(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=wr(this,yO,"f").create(e);wr(this,Pn,"f").verbose("calling deleteSupportAttachment mutation...");const i=yield this.handleTransaction(wr(this,Wo,"f").DeleteSupportAttachment(n));return wr(this,Pn,"f").verbose("deleteSupportAttachment mutation complete."),i.failure()?(wr(this,Pn,"f").error("deleteSupportAttachment mutation error",i),i.intoFailure()):(wr(this,Pn,"f").info("deleteSupportAttachment mutation success"),tr.success(i.data().deleteSupportAttachment))})}createSupportRequest(e){return yl(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=wr(this,EO,"f").create(e);wr(this,Pn,"f").verbose("calling createSupportRequest mutation...");const i=yield this.handleTransaction(wr(this,Wo,"f").CreateSupportRequest(n));return wr(this,Pn,"f").verbose("createSupportRequest mutation complete."),i.failure()?(wr(this,Pn,"f").error("createSupportRequest mutation error",i),i.intoFailure()):(wr(this,Pn,"f").info("createSupportRequest mutation success"),tr.success(i.data().createSupportRequest))})}getSupportCategories(){return yl(this,void 0,void 0,function*(){var e;wr(this,Pn,"f").verbose("calling getSupportCategories query...");const r=yield this.handleQuery(wr(this,Wo,"f").GetSupportCategories());return wr(this,Pn,"f").verbose("getSupportCategories query complete."),r.hasError()&&wr(this,Pn,"f").error("getSupportCategories query error",r.error),new Yt((e=r.data)===null||e===void 0?void 0:e.getSupportCategories,r.error)})}getSupportArticles(e){return yl(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();const i=wr(this,AO,"f").create(e);wr(this,Pn,"f").verbose("calling getSupportArticles query...");const s=yield this.handleQuery(wr(this,Wo,"f").getSupportArticles(i));return wr(this,Pn,"f").verbose("getSupportArticles query complete."),s.hasError()&&wr(this,Pn,"f").error("getSupportArticles query error",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getSupportArticles,s.error)})}getSupportComments(e){return yl(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();const i=wr(this,TO,"f").create(e);wr(this,Pn,"f").verbose("calling getSupportComments query...");const s=yield this.handleQuery(wr(this,Wo,"f").getSupportComments(i));return wr(this,Pn,"f").verbose("getSupportComments query complete."),s.hasError()&&wr(this,Pn,"f").error("getSupportComments query error",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getSupportComments,s.error)})}createSupportComment(e){return yl(this,void 0,void 0,function*(){const r=this.validateRequest(e);if(r.failure())return r.intoFailure();const n=wr(this,bO,"f").create(e);wr(this,Pn,"f").verbose("calling createSupportComment mutation...");const i=yield this.handleTransaction(wr(this,Wo,"f").CreateSupportComment(n));return wr(this,Pn,"f").verbose("createSupportComment mutation complete."),i.failure()?(wr(this,Pn,"f").error("createSupportComment mutation error",i),i.intoFailure()):(wr(this,Pn,"f").info("createSupportComment mutation success"),tr.success(i.data().createSupportComment))})}getSupportAttachment(e){return yl(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();const i=wr(this,CO,"f").create(e);wr(this,Pn,"f").verbose("calling getSupportAttachment query...");const s=yield this.handleQuery(wr(this,Wo,"f").GetSupportAttachment(i));return wr(this,Pn,"f").verbose("getSupportAttachment query complete."),s.hasError()&&wr(this,Pn,"f").error("getSupportAttachment query error",s.error),new Yt((r=s.data)===null||r===void 0?void 0:r.getSupportAttachment,s.error)})}}Wo=new WeakMap,Pn=new WeakMap,vO=new WeakMap,SO=new WeakMap,yO=new WeakMap,EO=new WeakMap,AO=new WeakMap,TO=new WeakMap,bO=new WeakMap,CO=new WeakMap;const gnt="http://www.icanbwell.com/consent-category";class vnt{create(e){const r=e.data(),n={status:r.status,provision:{type:r.provision}};return On(r.organizationId)&&(n.organization=[{type:"Organization",reference:`Organization/${r.organizationId}`}]),On(r.category)&&(n.category=[{coding:[{system:gnt,code:r.category}]}]),{consentInput:n}}}class Snt{create(e){const r=e.data();return{exportId:r.exportId,password:r.password}}}class ynt{create(e){var r,n;const i=e.data();return{callbackURL:(r=i.callbackUrl)!==null&&r!==void 0?r:null,includeAttributeMatchingCheck:(n=i.includeAttributeMatchingCheck)!==null&&n!==void 0?n:null}}}class Ent{create(e){var r;const n=e.data();return{categoryCode:n.category,organizationId:(r=n.organizationId)!==null&&r!==void 0?r:null}}}var H_=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Yd,VF,Yae,Qae,Wae,Kae;class Ant{constructor(){Yd.add(this)}create(e){const r=e.data(),n={resourceType:p1.Person};return H_(this,Yd,"m",VF).call(this,"id",r.id,n),H_(this,Yd,"m",VF).call(this,"birthDate",r.birthDate,n),H_(this,Yd,"m",Yae).call(this,r,n),H_(this,Yd,"m",Wae).call(this,r,n),H_(this,Yd,"m",Qae).call(this,r,n),H_(this,Yd,"m",Kae).call(this,r,n),{person:n}}}Yd=new WeakSet,VF=function(e,r,n){Zs(r)||(n[e]=r)},Yae=function(e,r){let n=!1;const{firstName:i,middleNames:s,lastName:a}=e,o={};Wr(i)&&(n=!0,o.given=Wr(s)&&s.length>0?[i,...s]:[i]),Wr(a)&&(n=!0,o.family=a),n&&(r.name=[o])},Qae=function(e,r){let n=!1;const{addressUnit:i,addressStreet:s,city:a,stateOrProvidence:o,postageOrZipCode:u}=e,c={};if(Wr(i)||Wr(s)){n=!0;const l=[];Wr(s)&&l.push(s),Wr(i)&&l.push(i),c.line=l}Wr(a)&&(n=!0,c.city=a),Wr(o)&&(n=!0,c.state=o),Wr(u)&&(n=!0,c.postalCode=u),n&&(r.address=[c])},Wae=function(e,r){const n=e.gender;Zs(n)||(r.gender=n)},Kae=function(e,r){const n=[],{homePhone:i,mobilePhone:s,workPhone:a,email:o}=e;Wr(i)&&n.push({system:"phone",use:"home",value:i}),Wr(s)&&n.push({system:"phone",use:"mobile",value:s}),Wr(a)&&n.push({system:"phone",use:"work",value:a}),Wr(o)&&n.push({system:"email",value:o}),n.length!==0&&(r.telecom=n)};var El=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Zae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Cr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ko,un,BF,jF,zF,HF,qF;class Tnt extends bo{constructor(e,r=new ws){super(),Ko.set(this,void 0),un.set(this,void 0),BF.set(this,new vnt),jF.set(this,new Ant),zF.set(this,new Ent),HF.set(this,new Snt),qF.set(this,new ynt),Zae(this,Ko,e,"f"),Zae(this,un,r.getLogger("GraphQLUserManager"),"f")}getProfile(){return El(this,void 0,void 0,function*(){var e;Cr(this,un,"f").verbose("calling getProfile...");const r=yield this.handleQuery(Cr(this,Ko,"f").getProfile());return Cr(this,un,"f").verbose("getProfile complete"),r.hasError()?Cr(this,un,"f").error("getProfile failed",r.error):Cr(this,un,"f").info("successfully called getProfile"),new Yt((e=r.data)===null||e===void 0?void 0:e.userProfile,r.error)})}getAccessHistory(){return El(this,void 0,void 0,function*(){var e;Cr(this,un,"f").verbose("calling getAccessHistory...");const r=yield this.handleQuery(Cr(this,Ko,"f").GetAccessHistory());return Cr(this,un,"f").verbose("getAccessHistory complete"),r.hasError()?Cr(this,un,"f").error("getAccessHistory failed",r.error):Cr(this,un,"f").info("successfully called getAccessHistory"),new Yt((e=r.data)===null||e===void 0?void 0:e.getAccessHistory,r.error)})}delete(){return El(this,void 0,void 0,function*(){Cr(this,un,"f").verbose("calling delete...");const e=yield this.handleTransaction(Cr(this,Ko,"f").delete());return Cr(this,un,"f").verbose("delete complete"),e.failure()?(Cr(this,un,"f").error("delete failed",e.error()),e.intoFailure()):(Cr(this,un,"f").info("successfully called delete"),tr.success(null))})}updateProfile(e){return El(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Cr(this,un,"f").verbose("calling updateUserProfile");const n=yield this.handleTransaction(Cr(this,Ko,"f").updateUserProfile(Cr(this,jF,"f").create(e)));return Cr(this,un,"f").verbose("updateUserProfile complete"),n.failure()?(Cr(this,un,"f").error("updateUserProfile error",n),n.intoFailure()):(Cr(this,un,"f").info("updateUserProfile success"),tr.success(n.data().updateUserProfile))})}getConsents(e){return El(this,void 0,void 0,function*(){var r;const n=this.validateRequest(e);if(n.failure())return n.toQueryResult();Cr(this,un,"f").verbose("calling consent search query...");let i;e!==void 0&&(i=Cr(this,zF,"f").create(e));const s=yield this.handleQuery(Cr(this,Ko,"f").searchConsent(i));return Cr(this,un,"f").verbose("consent search query complete"),s.hasError()?Cr(this,un,"f").error("consent search failed",s.error):Cr(this,un,"f").info("successfully called consent search query"),new Yt((r=s.data)===null||r===void 0?void 0:r.search,s.error)})}createConsent(e){return El(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Cr(this,un,"f").verbose("calling createConsent mutation...");const n=yield this.handleTransaction(Cr(this,Ko,"f").createConsent(Cr(this,BF,"f").create(e)));return Cr(this,un,"f").verbose("createConsent mutation complete"),n.failure()?(Cr(this,un,"f").error("createConsent mutation error",n),n.intoFailure()):(Cr(this,un,"f").info("createConsent mutation success"),tr.success(n.data().createConsent))})}createDataExportDirectDownloadUrl(e){return El(this,void 0,void 0,function*(){const r=e.validate();if(r.failure())return r;Cr(this,un,"f").verbose("calling createDataExportDirectDownloadUrl mutation...");const n=yield this.handleTransaction(Cr(this,Ko,"f").CreateDataExportDirectDownloadUrl(Cr(this,HF,"f").create(e)));return Cr(this,un,"f").verbose("createDataExportDirectDownloadUrl mutation complete"),n.failure()?(Cr(this,un,"f").error("createDataExportDirectDownloadUrl mutation error",n),n.intoFailure()):(Cr(this,un,"f").info("createDataExportDirectDownloadUrl mutation success"),tr.success(n.data().createDataExportDirectDownloadUrl))})}createVerificationUrl(e){return El(this,void 0,void 0,function*(){Cr(this,un,"f").verbose("calling createVerificationUrl mutation...");const r=yield this.handleTransaction(Cr(this,Ko,"f").CreateVerificationUrl(Cr(this,qF,"f").create(e)));return Cr(this,un,"f").verbose("createVerificationUrl complete"),r.failure()?(Cr(this,un,"f").error("createVerificationUrl error",r),r.intoFailure()):(Cr(this,un,"f").info("createVerificationUrl success"),tr.success(r.data().createVerificationUrl))})}getVerificationStatus(){return El(this,void 0,void 0,function*(){Cr(this,un,"f").verbose("calling getVerificationStatus query...");const e=yield this.handleTransaction(Cr(this,Ko,"f").VerificationStatus());return Cr(this,un,"f").verbose("getVerificationStatus complete"),e.failure()?(Cr(this,un,"f").error("getVerificationStatus error",e),e.intoFailure()):(Cr(this,un,"f").info("getVerificationStatus success"),tr.success(e.data().verificationStatus))})}}Ko=new WeakMap,un=new WeakMap,BF=new WeakMap,jF=new WeakMap,zF=new WeakMap,HF=new WeakMap,qF=new WeakMap;var Xae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Ro=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},RO,qa;class bnt{constructor(e,r,n){RO.set(this,void 0),qa.set(this,void 0),Xae(this,RO,r.getLogger("GraphQLAPIProvider"),"f"),Xae(this,qa,e,"f"),Ro(this,RO,"f").verbose("initializing GraphQLClient"),this.activity=new Trt(Ro(this,qa,"f"),r),this.connection=new brt(Ro(this,qa,"f"),r),this.device=new Irt(Ro(this,qa,"f"),r),this.event=new Nrt(Ro(this,qa,"f"),r),this.health=new Xrt(Ro(this,qa,"f"),r),this.financial=new xrt(Ro(this,qa,"f"),r),this.healthSpace=new Hrt(Ro(this,qa,"f"),r),this.user=new Tnt(Ro(this,qa,"f"),r),this.search=new ont(Ro(this,qa,"f"),r),this.questionnaire=new ent(Ro(this,qa,"f"),r),this.support=new mnt(Ro(this,qa,"f"),r),this.dataSharing=new Rrt(Ro(this,qa,"f"),r),this.language=new grt(n)}}RO=new WeakMap,qa=new WeakMap;class Cnt{createApiProvider(e,r,n){const{sdk:i,client:s}=Dae(e.graphQL.apiUrl,r,e.bwellConfig.language);return new bnt(i,n,s)}}var q_=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Jae=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Bn=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Rnt=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},Al,ai;class Ont extends bo{constructor(e,r=new ws){super(),Al.set(this,void 0),ai.set(this,void 0),Jae(this,Al,e,"f"),Jae(this,ai,r.getLogger("GraphQLIdentityManager"),"f")}initialize(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("executing initialize query...",{clientKey:e});const r=yield this.handleTransaction(Bn(this,Al,"f").initialize({clientKey:e}));return Bn(this,ai,"f").verbose("initialize query complete",r),r.failure()?(Bn(this,ai,"f").error("initialize failed.",r),r.intoFailure()):(Bn(this,ai,"f").info("successfully called initialize"),tr.success(r.data().initSdk))})}authenticateWithOauth(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("exectuting oauth authenticate query...");const r=yield this.handleTransaction(Bn(this,Al,"f").authenticate({},{Authorization:e.jweToken,ClientKey:e.clientKey}));if(Bn(this,ai,"f").verbose("oauth authenticate query complete",r),r.failure())return Bn(this,ai,"f").error("oauth authenticate failed",r),r.intoFailure();Bn(this,ai,"f").info("oauth authenticate success");const n=r.data(),i={accessToken:n.getToken.accessToken.jwtToken,idToken:n.getToken.idToken.jwtToken,refreshToken:n.getToken.refreshToken.token};return tr.success(i)})}authenticateWithUsernamePassword(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("exectuting username/password authenticate query...");const r=yield this.handleTransaction(Bn(this,Al,"f").login({email:e.email,password:e.password},{ClientKey:e.clientKey}));if(Bn(this,ai,"f").verbose("username/password authenticate query complete",r),r.failure())return Bn(this,ai,"f").error("username/password authenticate failed",r),r.intoFailure();Bn(this,ai,"f").info("username/password authenticate success");const n=r.data(),i={accessToken:n.login.accessToken.jwtToken,idToken:n.login.idToken.jwtToken,refreshToken:n.login.refreshToken.token};return tr.success(i)})}authenticateWithAuthCode(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("executing authenticateWithAuthCode query...");const r=yield this.handleTransaction(Bn(this,Al,"f").ExchangeAuthCode({authCode:e.authCode}));if(Bn(this,ai,"f").verbose("authenticateWithAuthCode query complete",r),r.failure())return Bn(this,ai,"f").error("authenticateWithAuthCode failed",r),r.intoFailure();Bn(this,ai,"f").info("authenticateWithAuthCode successful");const n=r.data(),i={accessToken:n.exchangeAuthCode.accessToken.jwtToken,idToken:n.exchangeAuthCode.idToken.jwtToken,refreshToken:n.exchangeAuthCode.refreshToken.token};return tr.success(i)})}refreshAccessToken(e){return q_(this,void 0,void 0,function*(){Bn(this,ai,"f").verbose("executing refreshAccessToken query...");const r=yield this.handleTransaction(Bn(this,Al,"f").refreshTokens({},{refresh_token:e.refreshToken,clientkey:e.clientKey}));return Bn(this,ai,"f").verbose("refreshAccessToken query complete",r),r.failure()?(Bn(this,ai,"f").error("refreshAccessToken failed",r),r.intoFailure()):(Bn(this,ai,"f").info("refreshAccessToken successful"),tr.success(r.data().refresh))})}createGuestAccessToken(e){return q_(this,void 0,void 0,function*(){const{jweToken:r}=e,n=Rnt(e,["jweToken"]),i=r?{Authorization:`Bearer ${r}`}:void 0;Bn(this,ai,"f").verbose("executing createGuestAccessToken mutation...",n);const s=yield this.handleTransaction(Bn(this,Al,"f").createGuestAccessToken(n,i));if(Bn(this,ai,"f").verbose("createGuestAccessToken mutation complete",s),s.failure())return Bn(this,ai,"f").error("createGuestAccessToken failed",s),s.intoFailure();Bn(this,ai,"f").info("createGuestAccessToken successful");const a=s.data();return tr.success(a.createGuestAccessToken)})}}Al=new WeakMap,ai=new WeakMap;class Pnt{createIdentityManager(e,r){const{sdk:n}=Dae(e.graphQL.unauthApiUrl);return new Ont(n,r)}}function YF(t,e){const r=Object.keys(t);return r.length===e.length&&r.every(n=>e.includes(n))}function eoe(t){return"token"in t&&YF(t,["token"])}function toe(t){return"email"in t&&"password"in t&&YF(t,["email","password"])}function roe(t){return"authCode"in t&&YF(t,["authCode"])}var Int=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},QF=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},jS=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},OO,Y_,PO;class Mnt{constructor(e,r,n=new ws){OO.set(this,void 0),Y_.set(this,void 0),PO.set(this,void 0),QF(this,OO,r,"f"),QF(this,PO,e,"f"),QF(this,Y_,n.getLogger("OAuthStrategy"),"f")}authenticate(e){return Int(this,void 0,void 0,function*(){if(!eoe(e))return jS(this,Y_,"f").error("Incorrect credentials type provided to OAuthStrategy"),tr.failure(new i1("Expected OAuthCredentials",e));jS(this,Y_,"f").verbose("authenticating via OAuth strategy...");const r=yield jS(this,OO,"f").authenticateWithOauth({jweToken:e.token,clientKey:jS(this,PO,"f").context.clientKey});return jS(this,Y_,"f").verbose("finished OAuth authentication"),r})}}OO=new WeakMap,Y_=new WeakMap,PO=new WeakMap;var wnt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},WF=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},zS=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},IO,Q_,MO;class Nnt{constructor(e,r,n=new ws){IO.set(this,void 0),Q_.set(this,void 0),MO.set(this,void 0),WF(this,IO,r,"f"),WF(this,MO,e,"f"),WF(this,Q_,n.getLogger("AuthCodeStrategy"),"f")}authenticate(e){return wnt(this,void 0,void 0,function*(){if(!roe(e))return zS(this,Q_,"f").error("Incorrect credentials type provided to AuthCodeStrategy"),tr.failure(new i1("Expected AuthCodeCredentials",e));zS(this,Q_,"f").verbose("authenticating via AuthCode strategy...");const r=yield zS(this,IO,"f").authenticateWithAuthCode({authCode:e.authCode,clientKey:zS(this,MO,"f").context.clientKey});return zS(this,Q_,"f").verbose("finished AuthCode authentication"),r})}}IO=new WeakMap,Q_=new WeakMap,MO=new WeakMap;var Dnt=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},KF=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},HS=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},wO,W_,NO;class Lnt{constructor(e,r,n=new ws){wO.set(this,void 0),W_.set(this,void 0),NO.set(this,void 0),KF(this,wO,r,"f"),KF(this,NO,e,"f"),KF(this,W_,n.getLogger("UsernamePasswordStrategy"),"f")}authenticate(e){return Dnt(this,void 0,void 0,function*(){if(!toe(e))return HS(this,W_,"f").error("Invalid credentials type provided to UsernamePasswordStrategy. Please provide username and password."),tr.failure(new i1("Expected UserPassCredentials",e));HS(this,W_,"f").verbose("authenticating via UsernamePassword strategy...");const r=yield HS(this,wO,"f").authenticateWithUsernamePassword({clientKey:HS(this,NO,"f").context.clientKey,email:e.email,password:e.password});return HS(this,W_,"f").verbose("finished OAuth authentication"),r})}}wO=new WeakMap,W_=new WeakMap,NO=new WeakMap;class $nt{createAuthStrategy(e,r,n,i=new ws){if(toe(n))return new Lnt(e,r,i);if(eoe(n))return new Mnt(e,r,i);if(roe(n))return new Nnt(e,r,i);throw new Error("Invalid credentials type provided; expected UserPassCredentials, OauthCredentials or AuthCodeCredentials.")}}const noe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function xnt(t){const e=new Set([t]),r=new Set,n=t.match(noe);if(!n)return()=>!1;const i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(u){return u===t};function s(o){return r.add(o),!1}function a(o){return e.add(o),!0}return function(u){if(e.has(u))return!0;if(r.has(u))return!1;const c=u.match(noe);if(!c)return s(u);const l={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return l.prerelease!=null||i.major!==l.major?s(u):i.major===0?i.minor===l.minor&&i.patch<=l.patch?a(u):s(u):i.minor<=l.minor?a(u):s(u)}}const Unt=xnt("1.9.1"),Fnt="1.9.1".split(".")[0],qS=Symbol.for(`opentelemetry.js.api.${Fnt}`),YS=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof globalThis=="object"?globalThis:{};function QS(t,e,r,n=!1){var i;const s=YS[qS]=(i=YS[qS])!==null&&i!==void 0?i:{version:"1.9.1"};if(!n&&s[t]){const a=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${t}`);return r.error(a.stack||a.message),!1}if(s.version!=="1.9.1"){const a=new Error(`@opentelemetry/api: Registration of version v${s.version} for ${t} does not match previously registered API v1.9.1`);return r.error(a.stack||a.message),!1}return s[t]=e,r.debug(`@opentelemetry/api: Registered a global for ${t} v1.9.1.`),!0}function Lh(t){var e,r;const n=(e=YS[qS])===null||e===void 0?void 0:e.version;if(!(!n||!Unt(n)))return(r=YS[qS])===null||r===void 0?void 0:r[t]}function WS(t,e){e.debug(`@opentelemetry/api: Unregistering a global for ${t} v1.9.1.`);const r=YS[qS];r&&delete r[t]}function ZF(t){return Symbol.for(t)}class DO{constructor(e){const r=this;r._currentContext=e?new Map(e):new Map,r.getValue=n=>r._currentContext.get(n),r.setValue=(n,i)=>{const s=new DO(r._currentContext);return s._currentContext.set(n,i),s},r.deleteValue=n=>{const i=new DO(r._currentContext);return i._currentContext.delete(n),i}}}const K_=new DO;class knt{active(){return K_}with(e,r,n,...i){return r.call(n,...i)}bind(e,r){return r}enable(){return this}disable(){return this}}class Gnt{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return KS("debug",this._namespace,e)}error(...e){return KS("error",this._namespace,e)}info(...e){return KS("info",this._namespace,e)}warn(...e){return KS("warn",this._namespace,e)}verbose(...e){return KS("verbose",this._namespace,e)}}function KS(t,e,r){const n=Lh("diag");if(n)return n[t](e,...r)}var ds;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(ds||(ds={}));function Vnt(t,e){t<ds.NONE?t=ds.NONE:t>ds.ALL&&(t=ds.ALL),e=e||{};function r(n,i){const s=e[n];return typeof s=="function"&&t>=i?s.bind(e):function(){}}return{error:r("error",ds.ERROR),warn:r("warn",ds.WARN),info:r("info",ds.INFO),debug:r("debug",ds.DEBUG),verbose:r("verbose",ds.VERBOSE)}}const Bnt="diag";class Zo{static instance(){return this._instance||(this._instance=new Zo),this._instance}constructor(){function e(i){return function(...s){const a=Lh("diag");if(a)return a[i](...s)}}const r=this,n=(i,s={logLevel:ds.INFO})=>{var a,o,u;if(i===r){const d=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((a=d.stack)!==null&&a!==void 0?a:d.message),!1}typeof s=="number"&&(s={logLevel:s});const c=Lh("diag"),l=Vnt((o=s.logLevel)!==null&&o!==void 0?o:ds.INFO,i);if(c&&!s.suppressOverrideMessage){const d=(u=new Error().stack)!==null&&u!==void 0?u:"<failed to generate stacktrace>";c.warn(`Current logger will be overwritten from ${d}`),l.warn(`Current logger will overwrite one already registered from ${d}`)}return QS("diag",l,r,!0)};r.setLogger=n,r.disable=()=>{WS(Bnt,r)},r.createComponentLogger=i=>new Gnt(i),r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}}const XF="context",jnt=new knt;class Z_{constructor(){}static getInstance(){return this._instance||(this._instance=new Z_),this._instance}setGlobalContextManager(e){return QS(XF,e,Zo.instance())}active(){return this._getContextManager().active()}with(e,r,n,...i){return this._getContextManager().with(e,r,n,...i)}bind(e,r){return this._getContextManager().bind(e,r)}_getContextManager(){return Lh(XF)||jnt}disable(){this._getContextManager().disable(),WS(XF,Zo.instance())}}var Tl;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(Tl||(Tl={}));const ioe="0000000000000000",soe="00000000000000000000000000000000",aoe={traceId:soe,spanId:ioe,traceFlags:Tl.NONE};class ZS{constructor(e=aoe){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,r){return this}setAttributes(e){return this}addEvent(e,r){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,r){}}const JF=ZF("OpenTelemetry Context Key SPAN");function ek(t){return t.getValue(JF)||void 0}function znt(){return ek(Z_.getInstance().active())}function tk(t,e){return t.setValue(JF,e)}function Hnt(t){return t.deleteValue(JF)}function qnt(t,e){return tk(t,new ZS(e))}function ooe(t){var e;return(e=ek(t))===null||e===void 0?void 0:e.spanContext()}const LO=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]);function uoe(t,e){if(typeof t!="string"||t.length!==e)return!1;let r=0;for(let n=0;n<t.length;n+=4)r+=(LO[t.charCodeAt(n)]|0)+(LO[t.charCodeAt(n+1)]|0)+(LO[t.charCodeAt(n+2)]|0)+(LO[t.charCodeAt(n+3)]|0);return r===e}function coe(t){return uoe(t,32)&&t!==soe}function Ynt(t){return uoe(t,16)&&t!==ioe}function XS(t){return coe(t.traceId)&&Ynt(t.spanId)}function Qnt(t){return new ZS(t)}const rk=Z_.getInstance();class loe{startSpan(e,r,n=rk.active()){if(!!r?.root)return new ZS;const s=n&&ooe(n);return Wnt(s)&&XS(s)?new ZS(s):new ZS}startActiveSpan(e,r,n,i){let s,a,o;if(arguments.length<2)return;arguments.length===2?o=r:arguments.length===3?(s=r,o=n):(s=r,a=n,o=i);const u=a??rk.active(),c=this.startSpan(e,s,u),l=tk(u,c);return rk.with(l,o,void 0,c)}}function Wnt(t){return t!==null&&typeof t=="object"&&"spanId"in t&&typeof t.spanId=="string"&&"traceId"in t&&typeof t.traceId=="string"&&"traceFlags"in t&&typeof t.traceFlags=="number"}const Knt=new loe;class Znt{constructor(e,r,n,i){this._provider=e,this.name=r,this.version=n,this.options=i}startSpan(e,r,n){return this._getTracer().startSpan(e,r,n)}startActiveSpan(e,r,n,i){const s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)}_getTracer(){if(this._delegate)return this._delegate;const e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Knt}}class Xnt{getTracer(e,r,n){return new loe}}const Jnt=new Xnt;class doe{getTracer(e,r,n){var i;return(i=this.getDelegateTracer(e,r,n))!==null&&i!==void 0?i:new Znt(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Jnt}setDelegate(e){this._delegate=e}getDelegateTracer(e,r,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,r,n)}}const nk="trace";class ik{constructor(){this._proxyTracerProvider=new doe,this.wrapSpanContext=Qnt,this.isSpanContextValid=XS,this.deleteSpan=Hnt,this.getSpan=ek,this.getActiveSpan=znt,this.getSpanContext=ooe,this.setSpan=tk,this.setSpanContext=qnt}static getInstance(){return this._instance||(this._instance=new ik),this._instance}setGlobalTracerProvider(e){const r=QS(nk,this._proxyTracerProvider,Zo.instance());return r&&this._proxyTracerProvider.setDelegate(e),r}getTracerProvider(){return Lh(nk)||this._proxyTracerProvider}getTracer(e,r){return this.getTracerProvider().getTracer(e,r)}disable(){WS(nk,Zo.instance()),this._proxyTracerProvider=new doe}}const ao=ik.getInstance();var sk=ZF("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function foe(t){return t.setValue(sk,!0)}function dwt(t){return t.deleteValue(sk)}function ak(t){return t.getValue(sk)===!0}var ok="[_0-9a-z-*/]",eit="[a-z]"+ok+"{0,255}",tit="[a-z0-9]"+ok+"{0,240}@[a-z]"+ok+"{0,13}",rit=new RegExp("^(?:"+eit+"|"+tit+")$"),nit=/^[ -~]{0,255}[!-~]$/,iit=/,|=/;function sit(t){return rit.test(t)}function ait(t){return nit.test(t)&&!iit.test(t)}var hoe=32,oit=512,poe=",",_oe="=",uit=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,r){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n},t.prototype.unset=function(e){var r=this._clone();return r._internalState.delete(e),r},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(r,n){return r.push(n+_oe+e.get(n)),r},[]).join(poe)},t.prototype._parse=function(e){e.length>oit||(this._internalState=e.split(poe).reverse().reduce(function(r,n){var i=n.trim(),s=i.indexOf(_oe);if(s!==-1){var a=i.slice(0,s),o=i.slice(s+1,n.length);sit(a)&&ait(o)&&r.set(a,o)}return r},new Map),this._internalState.size>hoe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,hoe))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),uk="traceparent",ck="tracestate",cit="00",lit="(?!ff)[\\da-f]{2}",dit="(?![0]{32})[\\da-f]{32}",fit="(?![0]{16})[\\da-f]{16}",hit="[\\da-f]{2}",pit=new RegExp("^\\s?("+lit+")-("+dit+")-("+fit+")-("+hit+")(-.*)?\\s?$");function _it(t){var e=pit.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var moe=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=ao.getSpanContext(e);if(!(!i||ak(e)||!XS(i))){var s=cit+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||Tl.NONE).toString(16);n.set(r,uk,s),i.traceState&&n.set(r,ck,i.traceState.serialize())}},t.prototype.extract=function(e,r,n){var i=n.get(r,uk);if(!i)return e;var s=Array.isArray(i)?i[0]:i;if(typeof s!="string")return e;var a=_it(s);if(!a)return e;a.isRemote=!0;var o=n.get(r,ck);if(o){var u=Array.isArray(o)?o.join(","):o;a.traceState=new uit(typeof u=="string"?u:void 0)}return ao.setSpanContext(e,a)},t.prototype.fields=function(){return[uk,ck]},t}();const yr=Zo.instance();var mit=function(){function t(){var e=this;this._promise=new Promise(function(r,n){e._resolve=r,e._reject=n})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}(),git=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},vit=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},$O=function(){function t(e,r){this._callback=e,this._that=r,this._isCalled=!1,this._deferred=new mit}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,vit([this._that],git(n),!1))).then(function(s){return r._deferred.resolve(s)},function(s){return r._deferred.reject(s)})}catch(s){this._deferred.reject(s)}}return this._deferred.promise},t}(),Qd;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Qd||(Qd={}));var Oc;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(Oc||(Oc={}));var Sit=",",yit=["OTEL_SDK_DISABLED"];function Eit(t){return yit.indexOf(t)>-1}var Ait=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function Tit(t){return Ait.indexOf(t)>-1}var bit=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function Cit(t){return bit.indexOf(t)>-1}var JS=1/0,ey=128,Rit=128,Oit=128,goe={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:ds.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:JS,OTEL_ATTRIBUTE_COUNT_LIMIT:ey,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:JS,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ey,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:JS,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ey,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Rit,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Oit,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Oc.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function Pit(t,e,r){if(!(typeof r[t]>"u")){var n=String(r[t]);e[t]=n.toLowerCase()==="true"}}function Iit(t,e,r,n,i){if(n===void 0&&(n=-1/0),i===void 0&&(i=1/0),typeof r[t]<"u"){var s=Number(r[t]);isNaN(s)||(s<n?e[t]=n:s>i?e[t]=i:e[t]=s)}}function Mit(t,e,r,n){n===void 0&&(n=Sit);var i=r[t];typeof i=="string"&&(e[t]=i.split(n).map(function(s){return s.trim()}))}var wit={ALL:ds.ALL,VERBOSE:ds.VERBOSE,DEBUG:ds.DEBUG,INFO:ds.INFO,WARN:ds.WARN,ERROR:ds.ERROR,NONE:ds.NONE};function Nit(t,e,r){var n=r[t];if(typeof n=="string"){var i=wit[n.toUpperCase()];i!=null&&(e[t]=i)}}function voe(t){var e={};for(var r in goe){var n=r;switch(n){case"OTEL_LOG_LEVEL":Nit(n,e,t);break;default:if(Eit(n))Pit(n,e,t);else if(Tit(n))Iit(n,e,t);else if(Cit(n))Mit(n,e,t);else{var i=t[n];typeof i<"u"&&i!==null&&(e[n]=String(i))}}}return e}var Soe=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof globalThis=="object"?globalThis:{};function la(){var t=voe(Soe);return Object.assign({},goe,t)}function yoe(){return voe(Soe)}var Dit=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},Eoe=1e4,Lit=5,$it=1e3,xit=5e3,Uit=1.5;function Fit(t){t===void 0&&(t={});var e={};return Object.entries(t).forEach(function(r){var n=Dit(r,2),i=n[0],s=n[1];typeof s<"u"?e[i]=String(s):yr.warn('Header "'+i+'" has invalid value ('+s+") and will be ignored")}),e}function kit(t,e){return t.endsWith("/")||(t=t+"/"),t+e}function Git(t){try{var e=new URL(t);return e.pathname===""&&(e.pathname=e.pathname+"/"),e.toString()}catch{return yr.warn("Could not parse export URL: '"+t+"'"),t}}function Vit(t){return typeof t=="number"?t<=0?Aoe(t,Eoe):t:Bit()}function Bit(){var t,e=Number((t=la().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&t!==void 0?t:la().OTEL_EXPORTER_OTLP_TIMEOUT);return e<=0?Aoe(e,Eoe):e}function Aoe(t,e){return yr.warn("Timeout must be greater than 0",t),e}function jit(t){var e=[429,502,503,504];return e.includes(t)}function zit(t){if(t==null)return-1;var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var r=new Date(t).getTime()-Date.now();return r>=0?r:0}var Hit=function(){function t(e){e===void 0&&(e={}),this._sendingPromises=[],this.url=this.getDefaultUrl(e),typeof e.hostname=="string"&&(this.hostname=e.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new $O(this._shutdown,this),this._concurrencyLimit=typeof e.concurrencyLimit=="number"?e.concurrencyLimit:30,this.timeoutMillis=Vit(e.timeoutMillis),this.onInit(e)}return t.prototype.export=function(e,r){if(this._shutdownOnce.isCalled){r({code:Qd.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){r({code:Qd.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(e).then(function(){r({code:Qd.SUCCESS})}).catch(function(n){r({code:Qd.FAILED,error:n})})},t.prototype._export=function(e){var r=this;return new Promise(function(n,i){try{yr.debug("items to be sent",e),r.send(e,n,i)}catch(s){i(s)}})},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then(function(){})},t.prototype._shutdown=function(){return yr.debug("shutdown started"),this.onShutdown(),this.forceFlush()},t}(),qit=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ty=function(t){qit(e,t);function e(r,n,i){var s=t.call(this,r)||this;return s.name="OTLPExporterError",s.data=i,s.code=n,s}return e}(Error),xO=function(){return xO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},xO.apply(this,arguments)},Yit=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function Qit(t,e,r,n,i){if(navigator.sendBeacon(e,new Blob([t],r)))yr.debug("sendBeacon - can send",t),n();else{var s=new ty("sendBeacon - cannot send "+t);i(s)}}function Wit(t,e,r,n,i,s){var a,o,u=!1,c=setTimeout(function(){if(clearTimeout(a),u=!0,o.readyState===XMLHttpRequest.DONE){var d=new ty("Request Timeout");s(d)}else o.abort()},n),l=function(d,f){d===void 0&&(d=Lit),f===void 0&&(f=$it),o=new XMLHttpRequest,o.open("POST",e);var _={Accept:"application/json","Content-Type":"application/json"};Object.entries(xO(xO({},_),r)).forEach(function(m){var E=Yit(m,2),S=E[0],C=E[1];o.setRequestHeader(S,C)}),o.send(t),o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE&&u===!1)if(o.status>=200&&o.status<=299)yr.debug("xhr success",t),i(),clearTimeout(c),clearTimeout(a);else if(o.status&&jit(o.status)&&d>0){var m=void 0;f=Uit*f,o.getResponseHeader("Retry-After")?m=zit(o.getResponseHeader("Retry-After")):m=Math.round(Math.random()*(xit-f)+f),a=setTimeout(function(){l(d-1,f)},m)}else{var E=new ty("Failed to export with XHR (status: "+o.status+")",o.status);s(E),clearTimeout(c),clearTimeout(a)}},o.onabort=function(){if(u){var m=new ty("Request Timeout");s(m)}clearTimeout(c),clearTimeout(a)},o.onerror=function(){if(u){var m=new ty("Request Timeout");s(m)}clearTimeout(c),clearTimeout(a)}};l()}class X_{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const r=this._entries.get(e);if(r)return Object.assign({},r)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(e,r){const n=new X_(this._entries);return n._entries.set(e,r),n}removeEntry(e){const r=new X_(this._entries);return r._entries.delete(e),r}removeEntries(...e){const r=new X_(this._entries);for(const n of e)r._entries.delete(n);return r}clear(){return new X_}}const Kit=Symbol("BaggageEntryMetadata"),Zit=Zo.instance();function Xit(t={}){return new X_(new Map(Object.entries(t)))}function Jit(t){return typeof t!="string"&&(Zit.error(`Cannot create baggage metadata from unknown type: ${typeof t}`),t=""),{__TYPE__:Kit,toString(){return t}}}var est="=",lk=";",dk=",",fk="baggage",Toe=180,boe=4096,Coe=8192,tst=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function rst(t){return t.reduce(function(e,r){var n=""+e+(e!==""?dk:"")+r;return n.length>Coe?e:n},"")}function nst(t){return t.getAllEntries().map(function(e){var r=tst(e,2),n=r[0],i=r[1],s=encodeURIComponent(n)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(s+=lk+i.metadata.toString()),s})}function Roe(t){var e=t.split(lk);if(!(e.length<=0)){var r=e.shift();if(r){var n=r.indexOf(est);if(!(n<=0)){var i=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),a;return e.length>0&&(a=Jit(e.join(lk))),{key:i,value:s,metadata:a}}}}}function Ooe(t,e,r,n){for(var i=0;i<t.length&&r<Toe;){var s=t.indexOf(dk,i),a=s===-1?t.length:s,o=a-i;if(o<=boe){var u=Roe(t.substring(i,a));if(u){var c=(r===0?0:1)+o;if(n+c>Coe)break;e[u.key]=u.metadata?{value:u.value,metadata:u.metadata}:{value:u.value},r++,n+=c}}if(s===-1)break;i=s+1}return[r,n]}function Poe(t){return typeof t!="string"||t.length===0?{}:t.split(dk).map(function(e){return Roe(e)}).filter(function(e){return e!==void 0&&e.value.length>0}).reduce(function(e,r){return e[r.key]=r.value,e},{})}var ist=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),UO=function(){return UO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},UO.apply(this,arguments)},sst=function(t){ist(e,t);function e(r,n,i){r===void 0&&(r={});var s=t.call(this,r)||this;return s._useXHR=!1,s._serializer=n,s._contentType=i,s._useXHR=!!r.headers||typeof navigator.sendBeacon!="function",s._useXHR?s._headers=Object.assign({},Fit(r.headers),Poe(la().OTEL_EXPORTER_OTLP_HEADERS)):s._headers={},s}return e.prototype.onInit=function(){},e.prototype.onShutdown=function(){},e.prototype.send=function(r,n,i){var s=this,a;if(this._shutdownOnce.isCalled){yr.debug("Shutdown already started. Cannot send objects");return}var o=(a=this._serializer.serializeRequest(r))!==null&&a!==void 0?a:new Uint8Array,u=new Promise(function(l,d){s._useXHR?Wit(o,s.url,UO(UO({},s._headers),{"Content-Type":s._contentType}),s.timeoutMillis,l,d):Qit(o,s.url,{type:s._contentType},l,d)}).then(n,i);this._sendingPromises.push(u);var c=function(){var l=s._sendingPromises.indexOf(u);s._sendingPromises.splice(l,1)};u.then(c,c)},e}(Hit),Wd=performance,Ioe=9,ast=6,ost=Math.pow(10,ast),FO=Math.pow(10,Ioe);function Kd(t){var e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*ost);return[r,n]}function hk(){var t=Wd.timeOrigin;if(typeof t!="number"){var e=Wd;t=e.timing&&e.timing.fetchStart}return t}function kO(t){var e=Kd(hk()),r=Kd(typeof t=="number"?t:Wd.now());return woe(e,r)}function $h(t){if(pk(t))return t;if(typeof t=="number")return t<hk()?kO(t):Kd(t);if(t instanceof Date)return Kd(t.getTime());throw TypeError("Invalid input type")}function ust(t,e){var r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=FO),[r,n]}function fwt(t){var e=Ioe,r=""+"0".repeat(e)+t[1]+"Z",n=r.substr(r.length-e-1),i=new Date(t[0]*1e3).toISOString();return i.replace("000Z",n)}function bl(t){return t[0]*FO+t[1]}function hwt(t){return t[0]*1e3+t[1]/1e6}function pwt(t){return t[0]*1e6+t[1]/1e3}function pk(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function Moe(t){return pk(t)||typeof t=="number"||t instanceof Date}function woe(t,e){var r=[t[0]+e[0],t[1]+e[1]];return r[1]>=FO&&(r[1]-=FO,r[0]+=1),r}function Noe(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function _k(t){for(var e=new Uint8Array(t.length/2),r=0,n=0;n<t.length;n+=2){var i=Noe(t.charCodeAt(n)),s=Noe(t.charCodeAt(n+1));e[r++]=i<<4|s}return e}function Doe(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function cst(t){var e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}function Loe(t){var e=Doe(t);return cst(e)}function lst(t){var e=Doe(t);return e.toString()}var dst=typeof BigInt<"u"?lst:bl;function $oe(t){return t}function xoe(t){if(t!==void 0)return _k(t)}var fst={encodeHrTime:Loe,encodeSpanContext:_k,encodeOptionalSpanContext:xoe};function hst(t){var e,r;if(t===void 0)return fst;var n=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(r=t.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Loe:dst,encodeSpanContext:i?$oe:_k,encodeOptionalSpanContext:i?$oe:xoe}}var pst=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function _st(t){return{name:t.name,version:t.version}}function mst(t){return Object.keys(t).map(function(e){return mk(e,t[e])})}function mk(t,e){return{key:t,value:gk(e)}}function gk(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(gk)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(r){var n=pst(r,2),i=n[0],s=n[1];return mk(i,s)})}}:{}}function gst(t){return{attributes:mst(t.attributes),droppedAttributesCount:0}}var vst=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Uoe=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function Sst(t,e){var r=hst(e);return{resourceLogs:Est(t,r)}}function yst(t){var e,r,n=new Map;try{for(var i=vst(t),s=i.next();!s.done;s=i.next()){var a=s.value,o=a.resource,u=a.instrumentationScope,c=u.name,l=u.version,d=l===void 0?"":l,f=u.schemaUrl,_=f===void 0?"":f,m=n.get(o);m||(m=new Map,n.set(o,m));var E=c+"@"+d+":"+_,S=m.get(E);S||(S=[],m.set(E,S)),S.push(a)}}catch(C){e={error:C}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function Est(t,e){var r=yst(t);return Array.from(r,function(n){var i=Uoe(n,2),s=i[0],a=i[1];return{resource:gst(s),scopeLogs:Array.from(a,function(o){var u=Uoe(o,2),c=u[1];return{scope:_st(c[0].instrumentationScope),logRecords:c.map(function(l){return Ast(l,e)}),schemaUrl:c[0].instrumentationScope.schemaUrl}}),schemaUrl:void 0}})}function Ast(t,e){var r,n,i;return{timeUnixNano:e.encodeHrTime(t.hrTime),observedTimeUnixNano:e.encodeHrTime(t.hrTimeObserved),severityNumber:t.severityNumber,severityText:t.severityText,body:gk(t.body),attributes:Tst(t.attributes),droppedAttributesCount:t.droppedAttributesCount,flags:(r=t.spanContext)===null||r===void 0?void 0:r.traceFlags,traceId:e.encodeOptionalSpanContext((n=t.spanContext)===null||n===void 0?void 0:n.traceId),spanId:e.encodeOptionalSpanContext((i=t.spanContext)===null||i===void 0?void 0:i.spanId)}}function _wt(t){return t}function Tst(t){return Object.keys(t).map(function(e){return mk(e,t[e])})}var mwt,gwt,vwt=null,Swt=null,bst={serializeRequest:function(t){var e=Sst(t,{useHex:!0,useLongBits:!1}),r=new TextEncoder;return r.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},Foe="v1/logs",Cst="http://localhost:4318/"+Foe;function Rst(t){return typeof t.url=="string"?t.url:la().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT.length>0?Git(la().OTEL_EXPORTER_OTLP_LOGS_ENDPOINT):la().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?kit(la().OTEL_EXPORTER_OTLP_ENDPOINT,Foe):Cst}var Ost=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ry=function(){return ry=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},ry.apply(this,arguments)},Pst=function(t){Ost(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,ry({timeoutMillis:la().OTEL_EXPORTER_OTLP_LOGS_TIMEOUT},r),bst,"application/json")||this;return n._headers=ry(ry({},n._headers),Poe(la().OTEL_EXPORTER_OTLP_LOGS_HEADERS)),n}return e.prototype.getDefaultUrl=function(r){return Rst(r)},e}(sst),ywt,Ewt="cloud.provider",Awt="cloud.account.id",Twt="cloud.region",bwt="cloud.availability_zone",Cwt="cloud.platform",Rwt="aws.ecs.container.arn",Owt="aws.ecs.cluster.arn",Pwt="aws.ecs.launchtype",Iwt="aws.ecs.task.arn",Mwt="aws.ecs.task.family",wwt="aws.ecs.task.revision",Nwt="aws.eks.cluster.arn",Dwt="aws.log.group.names",Lwt="aws.log.group.arns",$wt="aws.log.stream.names",xwt="aws.log.stream.arns",Uwt="container.name",Fwt="container.id",kwt="container.runtime",Gwt="container.image.name",Vwt="container.image.tag",Bwt="deployment.environment",jwt="device.id",zwt="device.model.identifier",Hwt="device.model.name",qwt="faas.name",Ywt="faas.id",Qwt="faas.version",Wwt="faas.instance",Kwt="faas.max_memory",Zwt="host.id",Xwt="host.name",Jwt="host.type",e0t="host.arch",t0t="host.image.name",r0t="host.image.id",n0t="host.image.version",i0t="k8s.cluster.name",s0t="k8s.node.name",a0t="k8s.node.uid",o0t="k8s.namespace.name",u0t="k8s.pod.uid",c0t="k8s.pod.name",l0t="k8s.container.name",d0t="k8s.replicaset.uid",f0t="k8s.replicaset.name",h0t="k8s.deployment.uid",p0t="k8s.deployment.name",_0t="k8s.statefulset.uid",m0t="k8s.statefulset.name",g0t="k8s.daemonset.uid",v0t="k8s.daemonset.name",S0t="k8s.job.uid",y0t="k8s.job.name",E0t="k8s.cronjob.uid",A0t="k8s.cronjob.name",T0t="os.type",b0t="os.description",C0t="os.name",R0t="os.version",O0t="process.pid",P0t="process.executable.name",I0t="process.executable.path",M0t="process.command",w0t="process.command_line",N0t="process.command_args",D0t="process.owner",L0t="process.runtime.name",$0t="process.runtime.version",x0t="process.runtime.description",Ist="service.name",U0t="service.namespace",F0t="service.instance.id",k0t="service.version",Mst="telemetry.sdk.name",wst="telemetry.sdk.language",Nst="telemetry.sdk.version",G0t="telemetry.auto.version",V0t="webengine.name",B0t="webengine.version",j0t="webengine.description",z0t=null,H0t=null,q0t=null,Y0t=null,Q0t=null,W0t=null,K0t=null,Z0t=null,X0t=null,J0t=null,eNt=null,tNt=null,rNt=null,nNt=null,iNt=null,sNt=null,aNt=null,oNt=null,uNt=null,cNt=null,lNt=null,dNt=null,fNt=null,hNt=null,pNt=null,_Nt=null,mNt=null,gNt=null,vNt=null,SNt=null,yNt=null,ENt=null,ANt=null,TNt=null,bNt=null,CNt=null,RNt=null,ONt=null,PNt=null,INt=null,MNt=null,wNt=null,NNt=null,DNt=null,LNt=null,$Nt=null,xNt=null,UNt=null,FNt=null,kNt=null,GNt=null,VNt=null,BNt=null,jNt=null,zNt=null,HNt=null,qNt=null,YNt=null,QNt=null,WNt=null,KNt=null,ZNt=null,XNt=null,JNt=null,eDt=null,tDt=null,rDt=null,nDt=null,iDt=null,sDt=null,Dst=Ist,aDt=null,oDt=null,uDt=null,koe=Mst,Goe=wst,Voe=Nst,cDt=null,lDt=null,dDt=null,fDt=null,hDt=null,pDt="alibaba_cloud",_Dt="aws",mDt="azure",gDt="gcp",vDt=null,SDt=null,yDt=null,EDt=null,ADt=null,TDt="alibaba_cloud_ecs",bDt="alibaba_cloud_fc",CDt="aws_ec2",RDt="aws_ecs",ODt="aws_eks",PDt="aws_lambda",IDt="aws_elastic_beanstalk",MDt="azure_vm",wDt="azure_container_instances",NDt="azure_aks",DDt="azure_functions",LDt="azure_app_service",$Dt="gcp_compute_engine",xDt="gcp_cloud_run",UDt="gcp_kubernetes_engine",FDt="gcp_cloud_functions",kDt="gcp_app_engine",GDt=null,VDt=null,BDt=null,jDt=null,zDt=null,HDt=null,qDt=null,YDt=null,QDt=null,WDt=null,KDt=null,ZDt=null,XDt=null,JDt=null,eLt=null,tLt=null,rLt=null,nLt=null,iLt="ec2",sLt="fargate",aLt=null,oLt=null,uLt=null,cLt="amd64",lLt="arm32",dLt="arm64",fLt="ia64",hLt="ppc32",pLt="ppc64",_Lt="x86",mLt=null,gLt=null,vLt=null,SLt=null,yLt=null,ELt=null,ALt=null,TLt=null,bLt="windows",CLt="linux",RLt="darwin",OLt="freebsd",PLt="netbsd",ILt="openbsd",MLt="dragonflybsd",wLt="hpux",NLt="aix",DLt="solaris",LLt="z_os",$Lt=null,xLt=null,ULt=null,FLt=null,kLt=null,GLt=null,VLt=null,BLt=null,jLt=null,zLt=null,HLt=null,qLt=null,YLt="cpp",QLt="dotnet",WLt="erlang",KLt="go",ZLt="java",XLt="nodejs",JLt="php",e$t="python",t$t="ruby",r$t="webjs",n$t=null,i$t=null,s$t=null,a$t=null,o$t=null,u$t=null,c$t=null,l$t=null,d$t=null,f$t=null,h$t=null,Lst="1.25.1",p$t,_$t="cloud.provider",m$t="cloud.account.id",g$t="cloud.region",v$t="cloud.availability_zone",S$t="cloud.platform",y$t="aws.ecs.container.arn",E$t="aws.ecs.cluster.arn",A$t="aws.ecs.launchtype",T$t="aws.ecs.task.arn",b$t="aws.ecs.task.family",C$t="aws.ecs.task.revision",R$t="aws.eks.cluster.arn",O$t="aws.log.group.names",P$t="aws.log.group.arns",I$t="aws.log.stream.names",M$t="aws.log.stream.arns",w$t="container.name",N$t="container.id",D$t="container.runtime",L$t="container.image.name",$$t="container.image.tag",x$t="deployment.environment",U$t="device.id",F$t="device.model.identifier",k$t="device.model.name",G$t="faas.name",V$t="faas.id",B$t="faas.version",j$t="faas.instance",z$t="faas.max_memory",H$t="host.id",q$t="host.name",Y$t="host.type",Q$t="host.arch",W$t="host.image.name",K$t="host.image.id",Z$t="host.image.version",X$t="k8s.cluster.name",J$t="k8s.node.name",ext="k8s.node.uid",txt="k8s.namespace.name",rxt="k8s.pod.uid",nxt="k8s.pod.name",ixt="k8s.container.name",sxt="k8s.replicaset.uid",axt="k8s.replicaset.name",oxt="k8s.deployment.uid",uxt="k8s.deployment.name",cxt="k8s.statefulset.uid",lxt="k8s.statefulset.name",dxt="k8s.daemonset.uid",fxt="k8s.daemonset.name",hxt="k8s.job.uid",pxt="k8s.job.name",_xt="k8s.cronjob.uid",mxt="k8s.cronjob.name",gxt="os.type",vxt="os.description",Sxt="os.name",yxt="os.version",Ext="process.pid",Axt="process.executable.name",Txt="process.executable.path",bxt="process.command",Cxt="process.command_line",Rxt="process.command_args",Oxt="process.owner",$st="process.runtime.name",Pxt="process.runtime.version",Ixt="process.runtime.description",Mxt="service.name",wxt="service.namespace",Nxt="service.instance.id",Dxt="service.version",xst="telemetry.sdk.name",Ust="telemetry.sdk.language",Fst="telemetry.sdk.version",Lxt="telemetry.auto.version",$xt="webengine.name",xxt="webengine.version",Uxt="webengine.description",Fxt=null,kxt=null,Gxt=null,Vxt=null,Bxt=null,jxt=null,zxt=null,Hxt=null,qxt=null,Yxt=null,Qxt=null,Wxt=null,Kxt=null,Zxt=null,Xxt=null,Jxt=null,eUt=null,tUt=null,rUt=null,nUt=null,iUt=null,sUt=null,aUt=null,oUt=null,uUt=null,cUt=null,lUt=null,dUt=null,fUt=null,hUt=null,pUt=null,_Ut=null,mUt=null,gUt=null,vUt=null,SUt=null,yUt=null,EUt=null,AUt=null,TUt=null,bUt=null,CUt=null,RUt=null,OUt=null,PUt=null,IUt=null,MUt=null,wUt=null,NUt=null,DUt=null,LUt=null,$Ut=null,xUt=null,UUt=null,FUt=null,kUt=null,GUt=null,VUt=null,BUt=null,jUt=null,zUt=null,HUt=null,qUt=null,YUt=null,QUt=null,WUt=null,KUt=null,kst=$st,ZUt=null,XUt=null,JUt=null,e1t=null,t1t=null,r1t=null,Gst=xst,Vst=Ust,Bst=Fst,n1t=null,i1t=null,s1t=null,a1t=null,o1t=null,u1t="alibaba_cloud",c1t="aws",l1t="azure",d1t="gcp",f1t=null,h1t=null,p1t=null,_1t=null,m1t=null,g1t="alibaba_cloud_ecs",v1t="alibaba_cloud_fc",S1t="aws_ec2",y1t="aws_ecs",E1t="aws_eks",A1t="aws_lambda",T1t="aws_elastic_beanstalk",b1t="azure_vm",C1t="azure_container_instances",R1t="azure_aks",O1t="azure_functions",P1t="azure_app_service",I1t="gcp_compute_engine",M1t="gcp_cloud_run",w1t="gcp_kubernetes_engine",N1t="gcp_cloud_functions",D1t="gcp_app_engine",L1t=null,$1t=null,x1t=null,U1t=null,F1t=null,k1t=null,G1t=null,V1t=null,B1t=null,j1t=null,z1t=null,H1t=null,q1t=null,Y1t=null,Q1t=null,W1t=null,K1t=null,Z1t=null,X1t="ec2",J1t="fargate",eFt=null,tFt=null,rFt=null,nFt="amd64",iFt="arm32",sFt="arm64",aFt="ia64",oFt="ppc32",uFt="ppc64",cFt="x86",lFt=null,dFt=null,fFt=null,hFt=null,pFt=null,_Ft=null,mFt=null,gFt=null,vFt="windows",SFt="linux",yFt="darwin",EFt="freebsd",AFt="netbsd",TFt="openbsd",bFt="dragonflybsd",CFt="hpux",RFt="aix",OFt="solaris",PFt="z_os",IFt=null,MFt=null,wFt=null,NFt=null,DFt=null,LFt=null,$Ft=null,xFt=null,UFt=null,FFt=null,kFt=null,GFt=null,VFt="cpp",BFt="dotnet",jFt="erlang",zFt="go",HFt="java",qFt="nodejs",YFt="php",QFt="python",WFt="ruby",jst="webjs",KFt=null,ZFt=null,XFt=null,JFt=null,ekt=null,tkt=null,rkt=null,nkt=null,ikt=null,zst=jst,skt=null,J_,em=(J_={},J_[Gst]="opentelemetry",J_[kst]="browser",J_[Vst]=zst,J_[Bst]=Lst,J_);function Hst(){return"unknown_service"}var Zd=function(){return Zd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Zd.apply(this,arguments)},qst=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Yst=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Qst=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},GO=function(){function t(e,r){var n=this,i;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return yr.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[Dst]=Hst(),e[Goe]=em[Goe],e[koe]=em[koe],e[Voe]=em[Voe],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&yr.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return qst(this,void 0,void 0,function(){return Yst(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var r=this,n;if(!e)return this;var i=Zd(Zd({},this._syncAttributes),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(i);var s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(a){var o,u=Qst(a,2),c=u[0],l=u[1];return Zd(Zd(Zd(Zd({},r._syncAttributes),c),(o=e._syncAttributes)!==null&&o!==void 0?o:e.attributes),l)});return new t(i,s)},t.EMPTY=new t({}),t}(),Boe=function(){function t(){}return t.prototype.emit=function(e){},t}(),Wst=new Boe,akt,okt="cloud.provider",ukt="cloud.account.id",ckt="cloud.region",lkt="cloud.availability_zone",dkt="cloud.platform",fkt="aws.ecs.container.arn",hkt="aws.ecs.cluster.arn",pkt="aws.ecs.launchtype",_kt="aws.ecs.task.arn",mkt="aws.ecs.task.family",gkt="aws.ecs.task.revision",vkt="aws.eks.cluster.arn",Skt="aws.log.group.names",ykt="aws.log.group.arns",Ekt="aws.log.stream.names",Akt="aws.log.stream.arns",Tkt="container.name",bkt="container.id",Ckt="container.runtime",Rkt="container.image.name",Okt="container.image.tag",Pkt="deployment.environment",Ikt="device.id",Mkt="device.model.identifier",wkt="device.model.name",Nkt="faas.name",Dkt="faas.id",Lkt="faas.version",$kt="faas.instance",xkt="faas.max_memory",Ukt="host.id",Fkt="host.name",kkt="host.type",Gkt="host.arch",Vkt="host.image.name",Bkt="host.image.id",jkt="host.image.version",zkt="k8s.cluster.name",Hkt="k8s.node.name",qkt="k8s.node.uid",Ykt="k8s.namespace.name",Qkt="k8s.pod.uid",Wkt="k8s.pod.name",Kkt="k8s.container.name",Zkt="k8s.replicaset.uid",Xkt="k8s.replicaset.name",Jkt="k8s.deployment.uid",eGt="k8s.deployment.name",tGt="k8s.statefulset.uid",rGt="k8s.statefulset.name",nGt="k8s.daemonset.uid",iGt="k8s.daemonset.name",sGt="k8s.job.uid",aGt="k8s.job.name",oGt="k8s.cronjob.uid",uGt="k8s.cronjob.name",cGt="os.type",lGt="os.description",dGt="os.name",fGt="os.version",hGt="process.pid",pGt="process.executable.name",_Gt="process.executable.path",mGt="process.command",gGt="process.command_line",vGt="process.command_args",SGt="process.owner",yGt="process.runtime.name",EGt="process.runtime.version",AGt="process.runtime.description",Kst="service.name",TGt="service.namespace",bGt="service.instance.id",CGt="service.version",Zst="telemetry.sdk.name",Xst="telemetry.sdk.language",Jst="telemetry.sdk.version",RGt="telemetry.auto.version",OGt="webengine.name",PGt="webengine.version",IGt="webengine.description",MGt=null,wGt=null,NGt=null,DGt=null,LGt=null,$Gt=null,xGt=null,UGt=null,FGt=null,kGt=null,GGt=null,VGt=null,BGt=null,jGt=null,zGt=null,HGt=null,qGt=null,YGt=null,QGt=null,WGt=null,KGt=null,ZGt=null,XGt=null,JGt=null,eVt=null,tVt=null,rVt=null,nVt=null,iVt=null,sVt=null,aVt=null,oVt=null,uVt=null,cVt=null,lVt=null,dVt=null,fVt=null,hVt=null,pVt=null,_Vt=null,mVt=null,gVt=null,vVt=null,SVt=null,yVt=null,EVt=null,AVt=null,TVt=null,bVt=null,CVt=null,RVt=null,OVt=null,PVt=null,IVt=null,MVt=null,wVt=null,NVt=null,DVt=null,LVt=null,$Vt=null,xVt=null,UVt=null,FVt=null,kVt=null,GVt=null,VVt=null,BVt=null,jVt=null,zVt=null,HVt=null,eat=Kst,qVt=null,YVt=null,QVt=null,joe=Zst,zoe=Xst,Hoe=Jst,WVt=null,KVt=null,ZVt=null,XVt=null,JVt=null,eBt="alibaba_cloud",tBt="aws",rBt="azure",nBt="gcp",iBt=null,sBt=null,aBt=null,oBt=null,uBt=null,cBt="alibaba_cloud_ecs",lBt="alibaba_cloud_fc",dBt="aws_ec2",fBt="aws_ecs",hBt="aws_eks",pBt="aws_lambda",_Bt="aws_elastic_beanstalk",mBt="azure_vm",gBt="azure_container_instances",vBt="azure_aks",SBt="azure_functions",yBt="azure_app_service",EBt="gcp_compute_engine",ABt="gcp_cloud_run",TBt="gcp_kubernetes_engine",bBt="gcp_cloud_functions",CBt="gcp_app_engine",RBt=null,OBt=null,PBt=null,IBt=null,MBt=null,wBt=null,NBt=null,DBt=null,LBt=null,$Bt=null,xBt=null,UBt=null,FBt=null,kBt=null,GBt=null,VBt=null,BBt=null,jBt=null,zBt="ec2",HBt="fargate",qBt=null,YBt=null,QBt=null,WBt="amd64",KBt="arm32",ZBt="arm64",XBt="ia64",JBt="ppc32",ejt="ppc64",tjt="x86",rjt=null,njt=null,ijt=null,sjt=null,ajt=null,ojt=null,ujt=null,cjt=null,ljt="windows",djt="linux",fjt="darwin",hjt="freebsd",pjt="netbsd",_jt="openbsd",mjt="dragonflybsd",gjt="hpux",vjt="aix",Sjt="solaris",yjt="z_os",Ejt=null,Ajt=null,Tjt=null,bjt=null,Cjt=null,Rjt=null,Ojt=null,Pjt=null,Ijt=null,Mjt=null,wjt=null,Njt=null,Djt="cpp",Ljt="dotnet",$jt="erlang",xjt="go",Ujt="java",Fjt="nodejs",kjt="php",Gjt="python",Vjt="ruby",Bjt="webjs",jjt=null,zjt=null,Hjt=null,qjt=null,Yjt=null,Qjt=null,Wjt=null,Kjt=null,Zjt=null,Xjt=null,Jjt=null;function tat(){return"unknown_service"}var Xd=function(){return Xd=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Xd.apply(this,arguments)},rat=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},nat=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},iat=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},qoe=function(){function t(e,r){var n=this,i;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=r?.then(function(s){return n._attributes=Object.assign({},n._attributes,s),n.asyncAttributesPending=!1,s},function(s){return yr.debug("a resource's async attributes promise rejected: %s",s),n.asyncAttributesPending=!1,{}})}return t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[eat]=tat(),e[zoe]=em[zoe],e[joe]=em[joe],e[Hoe]=em[Hoe],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&yr.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return rat(this,void 0,void 0,function(){return nat(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var r=this,n;if(!e)return this;var i=Xd(Xd({},this._syncAttributes),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(i);var s=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(a){var o,u=iat(a,2),c=u[0],l=u[1];return Xd(Xd(Xd(Xd({},r._syncAttributes),c),(o=e._syncAttributes)!==null&&o!==void 0?o:e.attributes),l)});return new t(i,s)},t.EMPTY=new t({}),t}(),sat="[object Object]",aat="[object Null]",oat="[object Undefined]",uat=Function.prototype,Yoe=uat.toString,cat=Yoe.call(Object),lat=dat(Object.getPrototypeOf,Object),Qoe=Object.prototype,Woe=Qoe.hasOwnProperty,xh=Symbol?Symbol.toStringTag:void 0,Koe=Qoe.toString;function dat(t,e){return function(r){return t(e(r))}}function Zoe(t){if(!fat(t)||hat(t)!==sat)return!1;var e=lat(t);if(e===null)return!0;var r=Woe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Yoe.call(r)===cat}function fat(t){return t!=null&&typeof t=="object"}function hat(t){return t==null?t===void 0?oat:aat:xh&&xh in Object(t)?pat(t):_at(t)}function pat(t){var e=Woe.call(t,xh),r=t[xh],n=!1;try{t[xh]=void 0,n=!0}catch{}var i=Koe.call(t);return n&&(e?t[xh]=r:delete t[xh]),i}function _at(t){return Koe.call(t)}var mat=20;function Xoe(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=t.shift(),n=new WeakMap;t.length>0;)r=Joe(r,t.shift(),0,n);return r}function vk(t){return VO(t)?t.slice():t}function Joe(t,e,r,n){r===void 0&&(r=0);var i;if(!(r>mat)){if(r++,BO(t)||BO(e)||tue(e))i=vk(e);else if(VO(t)){if(i=t.slice(),VO(e))for(var s=0,a=e.length;s<a;s++)i.push(vk(e[s]));else if(ny(e))for(var o=Object.keys(e),s=0,a=o.length;s<a;s++){var u=o[s];i[u]=vk(e[u])}}else if(ny(t))if(ny(e)){if(!gat(t,e))return e;i=Object.assign({},t);for(var o=Object.keys(e),s=0,a=o.length;s<a;s++){var u=o[s],c=e[u];if(BO(c))typeof c>"u"?delete i[u]:i[u]=c;else{var l=i[u],d=c;if(eue(t,u,n)||eue(e,u,n))delete i[u];else{if(ny(l)&&ny(d)){var f=n.get(l)||[],_=n.get(d)||[];f.push({obj:t,key:u}),_.push({obj:e,key:u}),n.set(l,f),n.set(d,_)}i[u]=Joe(i[u],c,r,n)}}}}else i=e;return i}}function eue(t,e,r){for(var n=r.get(t[e])||[],i=0,s=n.length;i<s;i++){var a=n[i];if(a.key===e&&a.obj===t)return!0}return!1}function VO(t){return Array.isArray(t)}function tue(t){return typeof t=="function"}function ny(t){return!BO(t)&&!VO(t)&&!tue(t)&&typeof t=="object"}function BO(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function gat(t,e){return!(!Zoe(t)||!Zoe(e))}const Ya=Z_.getInstance();var rue=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vat=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s};function jO(t){var e,r,n={};if(typeof t!="object"||t==null)return n;try{for(var i=rue(Object.entries(t)),s=i.next();!s.done;s=i.next()){var a=vat(s.value,2),o=a[0],u=a[1];if(!Sat(o)){yr.warn("Invalid attribute key: "+o);continue}if(!zO(u)){yr.warn("Invalid attribute value set for key: "+o);continue}Array.isArray(u)?n[o]=u.slice():n[o]=u}}catch(c){e={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function Sat(t){return typeof t=="string"&&t.length>0}function zO(t){return t==null?!0:Array.isArray(t)?yat(t):nue(t)}function yat(t){var e,r,n;try{for(var i=rue(t),s=i.next();!s.done;s=i.next()){var a=s.value;if(a!=null){if(!n){if(nue(a)){n=typeof a;continue}return!1}if(typeof a!==n)return!1}}}catch(o){e={error:o}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return!0}function nue(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}var Eat=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Aat=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},Tat=function(){function t(e,r,n){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var i=n.timestamp,s=n.observedTimestamp,a=n.severityNumber,o=n.severityText,u=n.body,c=n.attributes,l=c===void 0?{}:c,d=n.context,f=Date.now();if(this.hrTime=$h(i??f),this.hrTimeObserved=$h(s??f),d){var _=ao.getSpanContext(d);_&&XS(_)&&(this.spanContext=_)}this.severityNumber=a,this.severityText=o,this.body=u,this.resource=e.resource,this.instrumentationScope=r,this._logRecordLimits=e.logRecordLimits,this.setAttributes(l)}return Object.defineProperty(t.prototype,"severityText",{get:function(){return this._severityText},set:function(e){this._isLogRecordReadonly()||(this._severityText=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(e){this._isLogRecordReadonly()||(this._severityNumber=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"body",{get:function(){return this._body},set:function(e){this._isLogRecordReadonly()||(this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),t.prototype.setAttribute=function(e,r){return this._isLogRecordReadonly()?this:r===null?this:e.length===0?(yr.warn("Invalid attribute key: "+e),this):!zO(r)&&!(typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length>0)?(yr.warn("Invalid attribute value set for key: "+e),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this.droppedAttributesCount===1&&yr.warn("Dropping extra attributes."),this):(zO(r)?this.attributes[e]=this._truncateToSize(r):this.attributes[e]=r,this))},t.prototype.setAttributes=function(e){var r,n;try{for(var i=Eat(Object.entries(e)),s=i.next();!s.done;s=i.next()){var a=Aat(s.value,2),o=a[0],u=a[1];this.setAttribute(o,u)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},t.prototype.setBody=function(e){return this.body=e,this},t.prototype.setSeverityNumber=function(e){return this.severityNumber=e,this},t.prototype.setSeverityText=function(e){return this.severityText=e,this},t.prototype._makeReadonly=function(){this._isReadonly=!0},t.prototype._truncateToSize=function(e){var r=this,n=this._logRecordLimits.attributeValueLengthLimit;return n<=0?(yr.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):e},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substring(0,r)},t.prototype._isLogRecordReadonly=function(){return this._isReadonly&&yr.warn("Can not execute the operation on emitted log record"),this._isReadonly},t}(),Sk=function(){return Sk=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Sk.apply(this,arguments)},bat=function(){function t(e,r){this.instrumentationScope=e,this._sharedState=r}return t.prototype.emit=function(e){var r=e.context||Ya.active(),n=new Tat(this._sharedState,this.instrumentationScope,Sk({context:r},e));this._sharedState.activeProcessor.onEmit(n,r),n._makeReadonly()},t}();function Cat(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:la().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:la().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function Rat(t){var e,r,n,i,s,a,o=yoe();return{attributeCountLimit:(n=(r=(e=t.attributeCountLimit)!==null&&e!==void 0?e:o.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&r!==void 0?r:o.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:ey,attributeValueLengthLimit:(a=(s=(i=t.attributeValueLengthLimit)!==null&&i!==void 0?i:o.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&s!==void 0?s:o.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:JS}}var Oat=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pat=function(t){Oat(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return e}(Error);function iue(t,e){var r,n=new Promise(function(s,a){r=setTimeout(function(){a(new Pat("Operation timed out."))},e)});return Promise.race([t,n]).then(function(i){return clearTimeout(r),i},function(i){throw clearTimeout(r),i})}var sue=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},aue=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Iat=function(){function t(e,r){this.processors=e,this.forceFlushTimeoutMillis=r}return t.prototype.forceFlush=function(){return sue(this,void 0,void 0,function(){var e;return aue(this,function(r){switch(r.label){case 0:return e=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(n){return iue(n.forceFlush(),e)}))];case 1:return r.sent(),[2]}})})},t.prototype.onEmit=function(e,r){this.processors.forEach(function(n){return n.onEmit(e,r)})},t.prototype.shutdown=function(){return sue(this,void 0,void 0,function(){return aue(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.processors.map(function(r){return r.shutdown()}))];case 1:return e.sent(),[2]}})})},t}(),Mat=function(){function t(){}return t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.onEmit=function(e,r){},t.prototype.shutdown=function(){return Promise.resolve()},t}(),wat=function(){function t(e,r,n){this.resource=e,this.forceFlushTimeoutMillis=r,this.logRecordLimits=n,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Mat}return t}(),Nat="unknown",Dat=function(){function t(e){e===void 0&&(e={});var r,n=Xoe({},Cat(),e),i=qoe.default().merge((r=n.resource)!==null&&r!==void 0?r:qoe.empty());this._sharedState=new wat(i,n.forceFlushTimeoutMillis,Rat(n.logRecordLimits)),this._shutdownOnce=new $O(this._shutdown,this)}return t.prototype.getLogger=function(e,r,n){if(this._shutdownOnce.isCalled)return yr.warn("A shutdown LoggerProvider cannot provide a Logger"),Wst;e||yr.warn("Logger requested without instrumentation scope name.");var i=e||Nat,s=i+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._sharedState.loggers.has(s)||this._sharedState.loggers.set(s,new bat({name:i,version:r,schemaUrl:n?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(s)},t.prototype.addLogRecordProcessor=function(e){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(r){return yr.error("Error while trying to shutdown current log record processor",r)}),this._sharedState.registeredLogRecordProcessors.push(e),this._sharedState.activeProcessor=new Iat(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(yr.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},t.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(yr.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},t}();function Lat(){return function(t){yr.error($at(t))}}function $at(t){return typeof t=="string"?t:JSON.stringify(xat(t))}function xat(t){for(var e={},r=t;r!==null;)Object.getOwnPropertyNames(r).forEach(function(n){if(!e[n]){var i=r[n];i&&(e[n]=String(i))}}),r=Object.getPrototypeOf(r);return e}var oue=Lat();function ezt(t){oue=t}function Pc(t){try{oue(t)}catch{}}function tzt(t){}function Uat(t,e){return new Promise(function(r){Ya.with(foe(Ya.active()),function(){t.export(e,function(n){r(n)})})})}var Fat={_export:Uat},kat=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Gat=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Vat=function(){function t(e,r){var n,i,s,a;this._exporter=e,this._finishedLogRecords=[];var o=la();this._maxExportBatchSize=(n=r?.maxExportBatchSize)!==null&&n!==void 0?n:o.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=(i=r?.maxQueueSize)!==null&&i!==void 0?i:o.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=(s=r?.scheduledDelayMillis)!==null&&s!==void 0?s:o.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=(a=r?.exportTimeoutMillis)!==null&&a!==void 0?a:o.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new $O(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(yr.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.onEmit=function(e){this._shutdownOnce.isCalled||this._addToBuffer(e)},t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return kat(this,void 0,void 0,function(){return Gat(this,function(e){switch(e.label){case 0:return this.onShutdown(),[4,this._flushAll()];case 1:return e.sent(),[4,this._exporter.shutdown()];case 2:return e.sent(),[2]}})})},t.prototype._addToBuffer=function(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())},t.prototype._flushAll=function(){var e=this;return new Promise(function(r,n){for(var i=[],s=Math.ceil(e._finishedLogRecords.length/e._maxExportBatchSize),a=0;a<s;a++)i.push(e._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedLogRecords.length===0?Promise.resolve():new Promise(function(r,n){iue(e._export(e._finishedLogRecords.splice(0,e._maxExportBatchSize)),e._exportTimeoutMillis).then(function(){return r()}).catch(n)})},t.prototype._maybeStartTimer=function(){var e=this;this._timer===void 0&&(this._timer=setTimeout(function(){e._flushOneBatch().then(function(){e._finishedLogRecords.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(r){Pc(r)})},this._scheduledDelayMillis),this._timer,void 0)},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t.prototype._export=function(e){var r=this,n=function(){return Fat._export(r._exporter,e).then(function(s){var a;s.code!==Qd.SUCCESS&&Pc((a=s.error)!==null&&a!==void 0?a:new Error("BatchLogRecordProcessor: log record export failed (status "+s+")"))}).catch(Pc)},i=e.map(function(s){return s.resource}).filter(function(s){return s.asyncAttributesPending});return i.length===0?n():Promise.all(i.map(function(s){var a;return(a=s.waitForAsyncAttributes)===null||a===void 0?void 0:a.call(s)})).then(n,Pc)},t}(),Bat=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),jat=function(t){Bat(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i._onInit(n),i}return e.prototype.onShutdown=function(){typeof document>"u"||(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e.prototype._onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide===!0||typeof document>"u"||(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush()},this._pageHideListener=function(){n.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e}(Vat);class zat{inject(e,r){}extract(e,r){return e}fields(){return[]}}const Hat={get(t,e){if(t!=null)return t[e]},keys(t){return t==null?[]:Object.keys(t)}},qat={set(t,e,r){t!=null&&(t[e]=r)}},yk=ZF("OpenTelemetry Baggage Key");function uue(t){return t.getValue(yk)||void 0}function Yat(){return uue(Z_.getInstance().active())}function Qat(t,e){return t.setValue(yk,e)}function Wat(t){return t.deleteValue(yk)}const Ek="propagation",Kat=new zat;class Ak{constructor(){this.createBaggage=Xit,this.getBaggage=uue,this.getActiveBaggage=Yat,this.setBaggage=Qat,this.deleteBaggage=Wat}static getInstance(){return this._instance||(this._instance=new Ak),this._instance}setGlobalPropagator(e){return QS(Ek,e,Zo.instance())}inject(e,r,n=qat){return this._getGlobalPropagator().inject(e,r,n)}extract(e,r,n=Hat){return this._getGlobalPropagator().extract(e,r,n)}fields(){return this._getGlobalPropagator().fields()}disable(){WS(Ek,Zo.instance())}_getGlobalPropagator(){return Lh(Ek)||Kat}}const tm=Ak.getInstance();var Zat=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xat=function(){function t(e){e===void 0&&(e={});var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(function(n){return typeof n.fields=="function"?n.fields():[]}).reduce(function(n,i){return n.concat(i)},[])))}return t.prototype.inject=function(e,r,n){var i,s;try{for(var a=Zat(this._propagators),o=a.next();!o.done;o=a.next()){var u=o.value;try{u.inject(e,r,n)}catch(c){yr.warn("Failed to inject with "+u.constructor.name+". Err: "+c.message)}}}catch(c){i={error:c}}finally{try{o&&!o.done&&(s=a.return)&&s.call(a)}finally{if(i)throw i.error}}},t.prototype.extract=function(e,r,n){return this._propagators.reduce(function(i,s){try{return s.extract(i,r,n)}catch(a){yr.warn("Failed to inject with "+s.constructor.name+". Err: "+a.message)}return i},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),cue=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},Jat=function(){function t(){}return t.prototype.inject=function(e,r,n){var i=tm.getBaggage(e);if(!(!i||ak(e))){var s=nst(i).filter(function(o){return o.length<=boe}).slice(0,Toe),a=rst(s);a.length>0&&n.set(r,fk,a)}},t.prototype.extract=function(e,r,n){var i,s,a=n.get(r,fk);if(!a)return e;var o={},u=0,c=0;if(Array.isArray(a))for(var l=0;l<a.length;l++)i=cue(Ooe(a[l],o,u,c),2),u=i[0],c=i[1];else s=cue(Ooe(a,o,u,c),1),u=s[0];return u===0?e:tm.setBaggage(e,tm.createBaggage(o))},t.prototype.fields=function(){return[fk]},t}(),HO;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(HO||(HO={}));var qO;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(qO||(qO={}));var Tk;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(Tk||(Tk={}));var rzt,nzt="aws.lambda.invoked_arn",izt="db.system",szt="db.connection_string",azt="db.user",ozt="db.jdbc.driver_classname",uzt="db.name",czt="db.statement",lzt="db.operation",dzt="db.mssql.instance_name",fzt="db.cassandra.keyspace",hzt="db.cassandra.page_size",pzt="db.cassandra.consistency_level",_zt="db.cassandra.table",mzt="db.cassandra.idempotence",gzt="db.cassandra.speculative_execution_count",vzt="db.cassandra.coordinator.id",Szt="db.cassandra.coordinator.dc",yzt="db.hbase.namespace",Ezt="db.redis.database_index",Azt="db.mongodb.collection",Tzt="db.sql.table",eot="exception.type",tot="exception.message",rot="exception.stacktrace",bzt="exception.escaped",Czt="faas.trigger",Rzt="faas.execution",Ozt="faas.document.collection",Pzt="faas.document.operation",Izt="faas.document.time",Mzt="faas.document.name",wzt="faas.time",Nzt="faas.cron",Dzt="faas.coldstart",Lzt="faas.invoked_name",$zt="faas.invoked_provider",xzt="faas.invoked_region",Uzt="net.transport",Fzt="net.peer.ip",kzt="net.peer.port",Gzt="net.peer.name",Vzt="net.host.ip",Bzt="net.host.port",jzt="net.host.name",zzt="net.host.connection.type",Hzt="net.host.connection.subtype",qzt="net.host.carrier.name",Yzt="net.host.carrier.mcc",Qzt="net.host.carrier.mnc",Wzt="net.host.carrier.icc",Kzt="peer.service",Zzt="enduser.id",Xzt="enduser.role",Jzt="enduser.scope",eHt="thread.id",tHt="thread.name",rHt="code.function",nHt="code.namespace",iHt="code.filepath",sHt="code.lineno",aHt="http.method",oHt="http.url",uHt="http.target",cHt="http.host",lHt="http.scheme",dHt="http.status_code",fHt="http.flavor",hHt="http.user_agent",pHt="http.request_content_length",_Ht="http.request_content_length_uncompressed",mHt="http.response_content_length",gHt="http.response_content_length_uncompressed",vHt="http.server_name",SHt="http.route",yHt="http.client_ip",EHt="aws.dynamodb.table_names",AHt="aws.dynamodb.consumed_capacity",THt="aws.dynamodb.item_collection_metrics",bHt="aws.dynamodb.provisioned_read_capacity",CHt="aws.dynamodb.provisioned_write_capacity",RHt="aws.dynamodb.consistent_read",OHt="aws.dynamodb.projection",PHt="aws.dynamodb.limit",IHt="aws.dynamodb.attributes_to_get",MHt="aws.dynamodb.index_name",wHt="aws.dynamodb.select",NHt="aws.dynamodb.global_secondary_indexes",DHt="aws.dynamodb.local_secondary_indexes",LHt="aws.dynamodb.exclusive_start_table",$Ht="aws.dynamodb.table_count",xHt="aws.dynamodb.scan_forward",UHt="aws.dynamodb.segment",FHt="aws.dynamodb.total_segments",kHt="aws.dynamodb.count",GHt="aws.dynamodb.scanned_count",VHt="aws.dynamodb.attribute_definitions",BHt="aws.dynamodb.global_secondary_index_updates",jHt="messaging.system",zHt="messaging.destination",HHt="messaging.destination_kind",qHt="messaging.temp_destination",YHt="messaging.protocol",QHt="messaging.protocol_version",WHt="messaging.url",KHt="messaging.message_id",ZHt="messaging.conversation_id",XHt="messaging.message_payload_size_bytes",JHt="messaging.message_payload_compressed_size_bytes",e8t="messaging.operation",t8t="messaging.consumer_id",r8t="messaging.rabbitmq.routing_key",n8t="messaging.kafka.message_key",i8t="messaging.kafka.consumer_group",s8t="messaging.kafka.client_id",a8t="messaging.kafka.partition",o8t="messaging.kafka.tombstone",u8t="rpc.system",c8t="rpc.service",l8t="rpc.method",d8t="rpc.grpc.status_code",f8t="rpc.jsonrpc.version",h8t="rpc.jsonrpc.request_id",p8t="rpc.jsonrpc.error_code",_8t="rpc.jsonrpc.error_message",m8t="message.type",g8t="message.id",v8t="message.compressed_size",S8t="message.uncompressed_size",y8t=null,E8t=null,A8t=null,T8t=null,b8t=null,C8t=null,R8t=null,O8t=null,P8t=null,I8t=null,M8t=null,w8t=null,N8t=null,D8t=null,L8t=null,$8t=null,x8t=null,U8t=null,F8t=null,k8t=null,G8t=null,bk=eot,Ck=tot,not=rot,V8t=null,B8t=null,j8t=null,z8t=null,H8t=null,q8t=null,Y8t=null,Q8t=null,W8t=null,K8t=null,Z8t=null,X8t=null,J8t=null,eqt=null,tqt=null,rqt=null,nqt=null,iqt=null,sqt=null,aqt=null,oqt=null,uqt=null,cqt=null,lqt=null,dqt=null,fqt=null,hqt=null,pqt=null,_qt=null,mqt=null,gqt=null,vqt=null,Sqt=null,yqt=null,Eqt=null,Aqt=null,Tqt=null,bqt=null,Cqt=null,Rqt=null,Oqt=null,Pqt=null,Iqt=null,Mqt=null,wqt=null,Nqt=null,Dqt=null,Lqt=null,$qt=null,xqt=null,Uqt=null,Fqt=null,kqt=null,Gqt=null,Vqt=null,Bqt=null,jqt=null,zqt=null,Hqt=null,qqt=null,Yqt=null,Qqt=null,Wqt=null,Kqt=null,Zqt=null,Xqt=null,Jqt=null,eYt=null,tYt=null,rYt=null,nYt=null,iYt=null,sYt=null,aYt=null,oYt=null,uYt=null,cYt=null,lYt=null,dYt=null,fYt=null,hYt=null,pYt=null,_Yt=null,mYt=null,gYt=null,vYt=null,SYt=null,yYt=null,EYt=null,AYt=null,TYt=null,bYt=null,CYt=null,RYt=null,OYt=null,PYt=null,IYt=null,MYt=null,wYt=null,NYt=null,DYt=null,LYt=null,$Yt=null,xYt=null,UYt=null,FYt="other_sql",kYt="mssql",GYt="mysql",VYt="oracle",BYt="db2",jYt="postgresql",zYt="redshift",HYt="hive",qYt="cloudscape",YYt="hsqldb",QYt="progress",WYt="maxdb",KYt="hanadb",ZYt="ingres",XYt="firstsql",JYt="edb",eQt="cache",tQt="adabas",rQt="firebird",nQt="derby",iQt="filemaker",sQt="informix",aQt="instantdb",oQt="interbase",uQt="mariadb",cQt="netezza",lQt="pervasive",dQt="pointbase",fQt="sqlite",hQt="sybase",pQt="teradata",_Qt="vertica",mQt="h2",gQt="coldfusion",vQt="cassandra",SQt="hbase",yQt="mongodb",EQt="redis",AQt="couchbase",TQt="couchdb",bQt="cosmosdb",CQt="dynamodb",RQt="neo4j",OQt="geode",PQt="elasticsearch",IQt="memcached",MQt="cockroachdb",wQt=null,NQt=null,DQt=null,LQt=null,$Qt=null,xQt=null,UQt=null,FQt=null,kQt=null,GQt=null,VQt=null,BQt=null,jQt=null,zQt=null,HQt=null,qQt=null,YQt=null,QQt=null,WQt=null,KQt=null,ZQt=null,XQt=null,JQt=null,eWt=null,tWt=null,rWt=null,nWt=null,iWt=null,sWt=null,aWt=null,oWt=null,uWt=null,cWt=null,lWt=null,dWt=null,fWt=null,hWt=null,pWt=null,_Wt=null,mWt=null,gWt=null,vWt=null,SWt=null,yWt=null,EWt=null,AWt=null,TWt=null,bWt=null,CWt="all",RWt="each_quorum",OWt="quorum",PWt="local_quorum",IWt="one",MWt="two",wWt="three",NWt="local_one",DWt="any",LWt="serial",$Wt="local_serial",xWt=null,UWt=null,FWt=null,kWt=null,GWt=null,VWt=null,BWt=null,jWt=null,zWt=null,HWt=null,qWt=null,YWt=null,QWt="datasource",WWt="http",KWt="pubsub",ZWt="timer",XWt="other",JWt=null,e3t=null,t3t=null,r3t=null,n3t=null,i3t=null,s3t="insert",a3t="edit",o3t="delete",u3t=null,c3t=null,l3t=null,d3t=null,f3t="alibaba_cloud",h3t="aws",p3t="azure",_3t="gcp",m3t=null,g3t=null,v3t=null,S3t=null,y3t=null,E3t="ip_tcp",A3t="ip_udp",T3t="ip",b3t="unix",C3t="pipe",R3t="inproc",O3t="other",P3t=null,I3t=null,M3t=null,w3t=null,N3t=null,D3t=null,L3t=null,$3t=null,x3t="wifi",U3t="wired",F3t="cell",k3t="unavailable",G3t="unknown",V3t=null,B3t=null,j3t=null,z3t=null,H3t=null,q3t=null,Y3t="gprs",Q3t="edge",W3t="umts",K3t="cdma",Z3t="evdo_0",X3t="evdo_a",J3t="cdma2000_1xrtt",eKt="hsdpa",tKt="hsupa",rKt="hspa",nKt="iden",iKt="evdo_b",sKt="lte",aKt="ehrpd",oKt="hspap",uKt="gsm",cKt="td_scdma",lKt="iwlan",dKt="nr",fKt="nrnsa",hKt="lte_ca",pKt=null,_Kt=null,mKt=null,gKt=null,vKt=null,SKt=null,yKt=null,EKt=null,AKt=null,TKt=null,bKt=null,CKt=null,RKt=null,OKt=null,PKt=null,IKt=null,MKt=null,wKt=null,NKt=null,DKt=null,LKt=null,$Kt=null,xKt="1.0",UKt="1.1",FKt="2.0",kKt="SPDY",GKt="QUIC",VKt=null,BKt=null,jKt=null,zKt=null,HKt=null,qKt=null,YKt="queue",QKt="topic",WKt=null,KKt=null,ZKt=null,XKt="receive",JKt="process",e2t=null,t2t=null,r2t=null,n2t=0,i2t=1,s2t=2,a2t=3,o2t=4,u2t=5,c2t=6,l2t=7,d2t=8,f2t=9,h2t=10,p2t=11,_2t=12,m2t=13,g2t=14,v2t=15,S2t=16,y2t=null,E2t=null,A2t=null,T2t=null,b2t=null,C2t=null,R2t=null,O2t=null,P2t=null,I2t=null,M2t=null,w2t=null,N2t=null,D2t=null,L2t=null,$2t=null,x2t=null,U2t=null,F2t="SENT",k2t="RECEIVED",G2t=null,V2t=null,B2t=null,iot="exception",Rk=function(){return Rk=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Rk.apply(this,arguments)},sot=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},lue=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},aot=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},oot=function(){function t(e,r,n,i,s,a,o,u,c,l){o===void 0&&(o=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Tk.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=i,this.parentSpanId=a,this.kind=s,this.links=o;var d=Date.now();this._performanceStartTime=Wd.now(),this._performanceOffset=d-(this._performanceStartTime+hk()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??d),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return r==null||this._isSpanEnded()?this:e.length===0?(yr.warn("Invalid attribute key: "+e),this):zO(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this):(yr.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var r,n;try{for(var i=sot(Object.entries(e)),s=i.next();!s.done;s=i.next()){var a=lue(s.value,2),o=a[0],u=a[1];this.setAttribute(o,u)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},t.prototype.addEvent=function(e,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return yr.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&yr.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),Moe(r)&&(Moe(n)||(n=r),r=void 0);var i=jO(r);return this.events.push({name:e,attributes:i,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var r;return(r=this.links).push.apply(r,aot([],lue(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Rk({},e),this.status.message!=null&&typeof e.message!="string"&&(yr.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){yr.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(e),this._duration=ust(this.startTime,this.endTime),this._duration[0]<0&&(yr.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&yr.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=Wd.now())return kO(e+this._performanceOffset);if(typeof e=="number")return Kd(e);if(e instanceof Date)return Kd(e.getTime());if(pk(e))return e;if(this._startTimeProvided)return Kd(Date.now());var r=Wd.now()-this._performanceStartTime;return woe(this.startTime,Kd(r))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,r){var n={};typeof e=="string"?n[Ck]=e:e&&(e.code?n[bk]=e.code.toString():e.name&&(n[bk]=e.name),e.message&&(n[Ck]=e.message),e.stack&&(n[not]=e.stack)),n[bk]||n[Ck]?this.addEvent(iot,n,r):yr.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&yr.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substring(0,r)},t.prototype._truncateToSize=function(e){var r=this,n=this._attributeValueLengthLimit;return n<=0?(yr.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(i){return typeof i=="string"?r._truncateToLimitUtil(i,n):i}):e},t}(),rm;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(rm||(rm={}));var YO=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:rm.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),nm=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:rm.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),Ok=function(){function t(e){var r,n,i,s;this._root=e.root,this._root||(Pc(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new nm),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new nm,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new YO,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new nm,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new YO}return t.prototype.shouldSample=function(e,r,n,i,s,a){var o=ao.getSpanContext(e);return!o||!XS(o)?this._root.shouldSample(e,r,n,i,s,a):o.isRemote?o.traceFlags&Tl.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,i,s,a):this._remoteParentNotSampled.shouldSample(e,r,n,i,s,a):o.traceFlags&Tl.SAMPLED?this._localParentSampled.shouldSample(e,r,n,i,s,a):this._localParentNotSampled.shouldSample(e,r,n,i,s,a)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}(),due=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,r){return{decision:coe(r)&&this._accumulate(r)<this._upperBound?rm.RECORD_AND_SAMPLED:rm.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var r=0,n=0;n<e.length/8;n++){var i=n*8,s=parseInt(e.slice(i,i+8),16);r=(r^s)>>>0}return r},t}(),uot=Oc.AlwaysOn,im=1;function fue(){var t=la();return{sampler:hue(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function hue(t){switch(t===void 0&&(t=la()),t.OTEL_TRACES_SAMPLER){case Oc.AlwaysOn:return new nm;case Oc.AlwaysOff:return new YO;case Oc.ParentBasedAlwaysOn:return new Ok({root:new nm});case Oc.ParentBasedAlwaysOff:return new Ok({root:new YO});case Oc.TraceIdRatio:return new due(pue(t));case Oc.ParentBasedTraceIdRatio:return new Ok({root:new due(pue(t))});default:return yr.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+uot+'".'),new nm}}function pue(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return yr.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+im+"."),im;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(yr.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+im+"."),im):e<0||e>1?(yr.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+im+"."),im):e}function cot(t){var e={sampler:hue()},r=fue(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function lot(t){var e,r,n,i,s,a,o,u,c,l,d,f,_=Object.assign({},t.spanLimits),m=yoe();return _.attributeCountLimit=(a=(s=(i=(r=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&r!==void 0?r:(n=t.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&i!==void 0?i:m.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:m.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:ey,_.attributeValueLengthLimit=(f=(d=(l=(u=(o=t.spanLimits)===null||o===void 0?void 0:o.attributeValueLengthLimit)!==null&&u!==void 0?u:(c=t.generalLimits)===null||c===void 0?void 0:c.attributeValueLengthLimit)!==null&&l!==void 0?l:m.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:m.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:JS,Object.assign({},t,{spanLimits:_})}var dot=8,fot=16,hot=function(){function t(){this.generateTraceId=_ue(fot),this.generateSpanId=_ue(dot)}return t}(),QO=Array(32);function _ue(t){return function(){for(var r=0;r<t*2;r++)QO[r]=Math.floor(Math.random()*16)+48,QO[r]>=58&&(QO[r]+=39);return String.fromCharCode.apply(null,QO.slice(0,t*2))}}var pot=function(){function t(e,r,n){this._tracerProvider=n;var i=cot(r);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=r.idGenerator||new hot,this.resource=n.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,r,n){var i,s,a;r===void 0&&(r={}),n===void 0&&(n=Ya.active()),r.root&&(n=ao.deleteSpan(n));var o=ao.getSpan(n);if(ak(n)){yr.debug("Instrumentation suppressed, returning Noop Span");var u=ao.wrapSpanContext(aoe);return u}var c=o?.spanContext(),l=this._idGenerator.generateSpanId(),d,f,_;!c||!ao.isSpanContextValid(c)?d=this._idGenerator.generateTraceId():(d=c.traceId,f=c.traceState,_=c.spanId);var m=(i=r.kind)!==null&&i!==void 0?i:HO.INTERNAL,E=((s=r.links)!==null&&s!==void 0?s:[]).map(function(W){return{context:W.context,attributes:jO(W.attributes)}}),S=jO(r.attributes),C=this._sampler.shouldSample(n,d,e,m,S,E);f=(a=C.traceState)!==null&&a!==void 0?a:f;var w=C.decision===qO.RECORD_AND_SAMPLED?Tl.SAMPLED:Tl.NONE,x={traceId:d,spanId:l,traceFlags:w,traceState:f};if(C.decision===qO.NOT_RECORD){yr.debug("Recording is off, propagating context in a non-recording span");var u=ao.wrapSpanContext(x);return u}var V=jO(Object.assign(S,C.attributes)),H=new oot(this,n,e,x,m,_,E,r.startTime,void 0,V);return H},t.prototype.startActiveSpan=function(e,r,n,i){var s,a,o;if(!(arguments.length<2)){arguments.length===2?o=r:arguments.length===3?(s=r,o=n):(s=r,a=n,o=i);var u=a??Ya.active(),c=this.startSpan(e,s,u),l=ao.setSpan(u,c);return Ya.with(l,o,void 0,c)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),WO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mue=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,r,n=[];try{for(var i=WO(this._spanProcessors),s=i.next();!s.done;s=i.next()){var a=s.value;n.push(a.forceFlush())}}catch(o){e={error:o}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return new Promise(function(o){Promise.all(n).then(function(){o()}).catch(function(u){Pc(u||new Error("MultiSpanProcessor: forceFlush failed")),o()})})},t.prototype.onStart=function(e,r){var n,i;try{for(var s=WO(this._spanProcessors),a=s.next();!a.done;a=s.next()){var o=a.value;o.onStart(e,r)}}catch(u){n={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(e){var r,n;try{for(var i=WO(this._spanProcessors),s=i.next();!s.done;s=i.next()){var a=s.value;a.onEnd(e)}}catch(o){r={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.shutdown=function(){var e,r,n=[];try{for(var i=WO(this._spanProcessors),s=i.next();!s.done;s=i.next()){var a=s.value;n.push(a.shutdown())}}catch(o){e={error:o}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return new Promise(function(o,u){Promise.all(n).then(function(){o()},u)})},t}(),_ot=function(){function t(){}return t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}(),mot=function(){function t(e,r){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=la();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new $O(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(yr.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Tl.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&yr.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(yr.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(r,n){for(var i=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),a=0,o=s;a<o;a++)i.push(e._flushOneBatch());Promise.all(i).then(function(){r()}).catch(n)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var i=setTimeout(function(){n(new Error("Timeout"))},e._exportTimeoutMillis);Ya.with(foe(Ya.active()),function(){var s;e._finishedSpans.length<=e._maxExportBatchSize?(s=e._finishedSpans,e._finishedSpans=[]):s=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var a=function(){return e._exporter.export(s,function(d){var f;clearTimeout(i),d.code===Qd.SUCCESS?r():n((f=d.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},o=null,u=0,c=s.length;u<c;u++){var l=s[u];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(o??(o=[]),o.push(l.resource.waitForAsyncAttributes()))}o===null?a():Promise.all(o).then(a,function(d){Pc(d),n(d)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var r=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(n){e._isExporting=!1,Pc(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis),this._timer,void 0)}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}(),got=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vot=function(t){got(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.onInit(n),i}return e.prototype.onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush().catch(function(i){Pc(i)})},this._pageHideListener=function(){n.forceFlush().catch(function(i){Pc(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},e.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(mot),Sot=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},yot=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},Uh;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Uh||(Uh={}));var Eot=function(){function t(e){e===void 0&&(e={});var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Xoe({},fue(),lot(e));if(this.resource=(r=i.resource)!==null&&r!==void 0?r:GO.empty(),i.mergeResourceWithDefaults&&(this.resource=GO.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((n=e.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=yot([],Sot(e.spanProcessors),!1),this.activeSpanProcessor=new mue(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var a=new vot(s);this.activeSpanProcessor=a}else this.activeSpanProcessor=new _ot}}return t.prototype.getTracer=function(e,r,n){var i=e+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new pot({name:e,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(i)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return yr.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new mue(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),ao.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&Ya.setGlobalContextManager(e.contextManager),e.propagator&&tm.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(i){var s,a=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+e+" ms")),s=Uh.timeout},e);n.forceFlush().then(function(){clearTimeout(a),s!==Uh.timeout&&(s=Uh.resolved,i(s))}).catch(function(o){clearTimeout(a),s=Uh.error,i(o)})})});return new Promise(function(n,i){Promise.all(r).then(function(s){var a=s.filter(function(o){return o!==Uh.resolved});a.length>0?i(a):n()}).catch(function(s){return i([s])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var r;return(r=this.constructor._registeredPropagators.get(e))===null||r===void 0?void 0:r()},t.prototype._getSpanExporter=function(e){var r;return(r=this.constructor._registeredExporters.get(e))===null||r===void 0?void 0:r()},t.prototype._buildPropagatorFromEnv=function(){var e=this,r=Array.from(new Set(la().OTEL_PROPAGATORS)),n=r.map(function(s){var a=e._getPropagator(s);return a||yr.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),a}),i=n.reduce(function(s,a){return a&&s.push(a),s},[]);if(i.length!==0)return r.length===1?i[0]:new Xat({propagators:i})},t.prototype._buildExporterFromEnv=function(){var e=la().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var r=this._getSpanExporter(e);return r||yr.error('Exporter "'+e+'" requested through environment variable is unavailable.'),r}},t._registeredPropagators=new Map([["tracecontext",function(){return new moe}],["baggage",function(){return new Jat}]]),t._registeredExporters=new Map,t}(),Aot=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return s},Tot=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},bot=function(){function t(){this._enabled=!1,this._currentContext=K_}return t.prototype._bindFunction=function(e,r){e===void 0&&(e=K_);var n=this,i=function(){for(var s=this,a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];return n.with(e,function(){return r.apply(s,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),i},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(e,r){return e===void 0&&(e=this.active()),typeof r=="function"?this._bindFunction(e,r):r},t.prototype.disable=function(){return this._currentContext=K_,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=K_,this)},t.prototype.with=function(e,r,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];var a=this._currentContext;this._currentContext=e||K_;try{return r.call.apply(r,Tot([n],Aot(i),!1))}finally{this._currentContext=a}},t}(),Cot=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rot=function(t){Cot(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,r)||this;if(r.contextManager)throw"contextManager should be defined in register method not in constructor";if(r.propagator)throw"propagator should be defined in register method not in constructor";return n}return e.prototype.register=function(r){r===void 0&&(r={}),r.contextManager===void 0&&(r.contextManager=new bot),r.contextManager&&r.contextManager.enable(),t.prototype.register.call(this,r)},e}(Eot),j2t;const z2t="cloud.provider",H2t="cloud.account.id",q2t="cloud.region",Y2t="cloud.availability_zone",Q2t="cloud.platform",W2t="aws.ecs.container.arn",K2t="aws.ecs.cluster.arn",Z2t="aws.ecs.launchtype",X2t="aws.ecs.task.arn",J2t="aws.ecs.task.family",e4t="aws.ecs.task.revision",t4t="aws.eks.cluster.arn",r4t="aws.log.group.names",n4t="aws.log.group.arns",i4t="aws.log.stream.names",s4t="aws.log.stream.arns",a4t="container.name",o4t="container.id",u4t="container.runtime",c4t="container.image.name",l4t="container.image.tag",Oot="deployment.environment",d4t="device.id",f4t="device.model.identifier",h4t="device.model.name",p4t="faas.name",_4t="faas.id",m4t="faas.version",g4t="faas.instance",v4t="faas.max_memory",S4t="host.id",y4t="host.name",E4t="host.type",A4t="host.arch",T4t="host.image.name",b4t="host.image.id",C4t="host.image.version",R4t="k8s.cluster.name",O4t="k8s.node.name",P4t="k8s.node.uid",I4t="k8s.namespace.name",M4t="k8s.pod.uid",w4t="k8s.pod.name",N4t="k8s.container.name",D4t="k8s.replicaset.uid",L4t="k8s.replicaset.name",$4t="k8s.deployment.uid",x4t="k8s.deployment.name",U4t="k8s.statefulset.uid",F4t="k8s.statefulset.name",k4t="k8s.daemonset.uid",G4t="k8s.daemonset.name",V4t="k8s.job.uid",B4t="k8s.job.name",j4t="k8s.cronjob.uid",z4t="k8s.cronjob.name",H4t="os.type",q4t="os.description",Y4t="os.name",Q4t="os.version",W4t="process.pid",K4t="process.executable.name",Z4t="process.executable.path",X4t="process.command",J4t="process.command_line",e6t="process.command_args",t6t="process.owner",r6t="process.runtime.name",n6t="process.runtime.version",i6t="process.runtime.description",Pot="service.name",Iot="service.namespace",s6t="service.instance.id",Mot="service.version",a6t="telemetry.sdk.name",wot="telemetry.sdk.language",o6t="telemetry.sdk.version",u6t="telemetry.auto.version",c6t="webengine.name",l6t="webengine.version",d6t="webengine.description",f6t=null,h6t=null,p6t=null,_6t=null,m6t=null,g6t=null,v6t=null,S6t=null,y6t=null,E6t=null,A6t=null,T6t=null,b6t=null,C6t=null,R6t=null,O6t=null,P6t=null,I6t=null,M6t=null,w6t=null,N6t=null,Not=Oot,D6t=null,L6t=null,$6t=null,x6t=null,U6t=null,F6t=null,k6t=null,G6t=null,V6t=null,B6t=null,j6t=null,z6t=null,H6t=null,q6t=null,Y6t=null,Q6t=null,W6t=null,K6t=null,Z6t=null,X6t=null,J6t=null,e5t=null,t5t=null,r5t=null,n5t=null,i5t=null,s5t=null,a5t=null,o5t=null,u5t=null,c5t=null,l5t=null,d5t=null,f5t=null,h5t=null,p5t=null,_5t=null,m5t=null,g5t=null,v5t=null,S5t=null,y5t=null,E5t=null,A5t=null,T5t=null,b5t=null,C5t=null,R5t=null,Dot=Pot,Lot=Iot,O5t=null,$ot=Mot,P5t=null,xot=wot,I5t=null,M5t=null,w5t=null,N5t=null,D5t=null,L5t=null,$5t="alibaba_cloud",x5t="aws",U5t="azure",F5t="gcp",k5t=null,G5t=null,V5t=null,B5t=null,j5t=null,z5t="alibaba_cloud_ecs",H5t="alibaba_cloud_fc",q5t="aws_ec2",Y5t="aws_ecs",Q5t="aws_eks",W5t="aws_lambda",K5t="aws_elastic_beanstalk",Z5t="azure_vm",X5t="azure_container_instances",J5t="azure_aks",e9t="azure_functions",t9t="azure_app_service",r9t="gcp_compute_engine",n9t="gcp_cloud_run",i9t="gcp_kubernetes_engine",s9t="gcp_cloud_functions",a9t="gcp_app_engine",o9t=null,u9t=null,c9t=null,l9t=null,d9t=null,f9t=null,h9t=null,p9t=null,_9t=null,m9t=null,g9t=null,v9t=null,S9t=null,y9t=null,E9t=null,A9t=null,T9t=null,b9t=null,C9t="ec2",R9t="fargate",O9t=null,P9t=null,I9t=null,M9t="amd64",w9t="arm32",N9t="arm64",D9t="ia64",L9t="ppc32",$9t="ppc64",x9t="x86",U9t=null,F9t=null,k9t=null,G9t=null,V9t=null,B9t=null,j9t=null,z9t=null,H9t="windows",q9t="linux",Y9t="darwin",Q9t="freebsd",W9t="netbsd",K9t="openbsd",Z9t="dragonflybsd",X9t="hpux",J9t="aix",e7t="solaris",t7t="z_os",r7t=null,n7t=null,i7t=null,s7t=null,a7t=null,o7t=null,u7t=null,c7t=null,l7t=null,d7t=null,f7t=null,h7t=null,p7t="cpp",_7t="dotnet",m7t="erlang",g7t="go",v7t="java",S7t="nodejs",y7t="php",E7t="python",A7t="ruby",T7t="webjs",b7t=null,C7t=null,R7t=null,O7t=null,P7t=null,I7t=null,M7t=null,w7t=null,N7t=null,D7t=null,L7t=null;var Uot=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Fot=function(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};function kot(t,e,r){var n,i;try{i=t()}catch(s){n=s}finally{if(e(n,i),n&&!r)throw n;return i}}function $7t(t,e,r){return Uot(this,void 0,void 0,function(){var n,i,s;return Fot(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,t()];case 1:return i=a.sent(),[3,4];case 2:return s=a.sent(),n=s,[3,4];case 3:if(e(n,i),n&&!r)throw n;return[2,i];case 4:return[2]}})})}function gue(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}class Got{constructor(){}createGauge(e,r){return Wot}createHistogram(e,r){return Kot}createCounter(e,r){return Qot}createUpDownCounter(e,r){return Zot}createObservableGauge(e,r){return Jot}createObservableCounter(e,r){return Xot}createObservableUpDownCounter(e,r){return eut}addBatchObservableCallback(e,r){}removeBatchObservableCallback(e){}}class KO{}class Vot extends KO{add(e,r){}}class Bot extends KO{add(e,r){}}class jot extends KO{record(e,r){}}class zot extends KO{record(e,r){}}class Pk{addCallback(e){}removeCallback(e){}}class Hot extends Pk{}class qot extends Pk{}class Yot extends Pk{}const vue=new Got,Qot=new Vot,Wot=new jot,Kot=new zot,Zot=new Bot,Xot=new Hot,Jot=new qot,eut=new Yot;function x7t(){return vue}class tut{getMeter(e,r,n){return vue}}const rut=new tut,Ik="metrics";class Mk{constructor(){}static getInstance(){return this._instance||(this._instance=new Mk),this._instance}setGlobalMeterProvider(e){return QS(Ik,e,Zo.instance())}getMeterProvider(){return Lh(Ik)||rut}getMeter(e,r,n){return this.getMeterProvider().getMeter(e,r,n)}disable(){WS(Ik,Zo.instance())}}const nut=Mk.getInstance();var iut=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof globalThis=="object"?globalThis:{},ZO=Symbol.for("io.opentelemetry.js.api.logs"),iy=iut;function sut(t,e,r){return function(n){return n===t?e:r}}var Sue=1,aut=function(){function t(){}return t.prototype.getLogger=function(e,r,n){return new Boe},t}(),yue=new aut,out=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return iy[ZO]?this.getLoggerProvider():(iy[ZO]=sut(Sue,e,yue),e)},t.prototype.getLoggerProvider=function(){var e,r;return(r=(e=iy[ZO])===null||e===void 0?void 0:e.call(iy,Sue))!==null&&r!==void 0?r:yue},t.prototype.getLogger=function(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)},t.prototype.disable=function(){delete iy[ZO]},t}(),uut=out.getInstance();Hr();var XO=function(){return XO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},XO.apply(this,arguments)},cut=function(){function t(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._wrap=Hr().wrap,this._unwrap=Hr().unwrap,this._massWrap=Hr().massWrap,this._massUnwrap=Hr().massUnwrap,this._config=XO({enabled:!0},n),this._diag=yr.createComponentLogger({namespace:e}),this._tracer=ao.getTracer(e,r),this._meter=nut.getMeter(e,r),this._logger=uut.getLogger(e,r),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=XO({},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,r,n,i){if(e)try{e(n,i)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}},t}(),lut=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),dut=function(t){lut(e,t);function e(r,n,i){var s=t.call(this,r,n,i)||this;return s._config.enabled&&s.enable(),s}return e}(cut),fut=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Eue(t,e){return typeof e=="string"?t===e:!!t.match(e)}function hut(t,e){var r,n;if(!e)return!1;try{for(var i=fut(e),s=i.next();!s.done;s=i.next()){var a=s.value;if(Eue(t,a))return!0}}catch(o){r={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1}var U7t,F7t="aws.lambda.invoked_arn",k7t="db.system",G7t="db.connection_string",V7t="db.user",B7t="db.jdbc.driver_classname",j7t="db.name",z7t="db.statement",H7t="db.operation",q7t="db.mssql.instance_name",Y7t="db.cassandra.keyspace",Q7t="db.cassandra.page_size",W7t="db.cassandra.consistency_level",K7t="db.cassandra.table",Z7t="db.cassandra.idempotence",X7t="db.cassandra.speculative_execution_count",J7t="db.cassandra.coordinator.id",eZt="db.cassandra.coordinator.dc",tZt="db.hbase.namespace",rZt="db.redis.database_index",nZt="db.mongodb.collection",iZt="db.sql.table",sZt="exception.type",aZt="exception.message",oZt="exception.stacktrace",uZt="exception.escaped",cZt="faas.trigger",lZt="faas.execution",dZt="faas.document.collection",fZt="faas.document.operation",hZt="faas.document.time",pZt="faas.document.name",_Zt="faas.time",mZt="faas.cron",gZt="faas.coldstart",vZt="faas.invoked_name",SZt="faas.invoked_provider",yZt="faas.invoked_region",EZt="net.transport",AZt="net.peer.ip",TZt="net.peer.port",bZt="net.peer.name",CZt="net.host.ip",RZt="net.host.port",OZt="net.host.name",PZt="net.host.connection.type",IZt="net.host.connection.subtype",MZt="net.host.carrier.name",wZt="net.host.carrier.mcc",NZt="net.host.carrier.mnc",DZt="net.host.carrier.icc",LZt="peer.service",$Zt="enduser.id",xZt="enduser.role",UZt="enduser.scope",FZt="thread.id",kZt="thread.name",GZt="code.function",VZt="code.namespace",BZt="code.filepath",jZt="code.lineno",put="http.method",_ut="http.url",zZt="http.target",mut="http.host",gut="http.scheme",vut="http.status_code",HZt="http.flavor",Sut="http.user_agent",qZt="http.request_content_length",YZt="http.request_content_length_uncompressed",yut="http.response_content_length",Eut="http.response_content_length_uncompressed",QZt="http.server_name",WZt="http.route",KZt="http.client_ip",ZZt="aws.dynamodb.table_names",XZt="aws.dynamodb.consumed_capacity",JZt="aws.dynamodb.item_collection_metrics",eXt="aws.dynamodb.provisioned_read_capacity",tXt="aws.dynamodb.provisioned_write_capacity",rXt="aws.dynamodb.consistent_read",nXt="aws.dynamodb.projection",iXt="aws.dynamodb.limit",sXt="aws.dynamodb.attributes_to_get",aXt="aws.dynamodb.index_name",oXt="aws.dynamodb.select",uXt="aws.dynamodb.global_secondary_indexes",cXt="aws.dynamodb.local_secondary_indexes",lXt="aws.dynamodb.exclusive_start_table",dXt="aws.dynamodb.table_count",fXt="aws.dynamodb.scan_forward",hXt="aws.dynamodb.segment",pXt="aws.dynamodb.total_segments",_Xt="aws.dynamodb.count",mXt="aws.dynamodb.scanned_count",gXt="aws.dynamodb.attribute_definitions",vXt="aws.dynamodb.global_secondary_index_updates",SXt="messaging.system",yXt="messaging.destination",EXt="messaging.destination_kind",AXt="messaging.temp_destination",TXt="messaging.protocol",bXt="messaging.protocol_version",CXt="messaging.url",RXt="messaging.message_id",OXt="messaging.conversation_id",PXt="messaging.message_payload_size_bytes",IXt="messaging.message_payload_compressed_size_bytes",MXt="messaging.operation",wXt="messaging.consumer_id",NXt="messaging.rabbitmq.routing_key",DXt="messaging.kafka.message_key",LXt="messaging.kafka.consumer_group",$Xt="messaging.kafka.client_id",xXt="messaging.kafka.partition",UXt="messaging.kafka.tombstone",FXt="rpc.system",kXt="rpc.service",GXt="rpc.method",VXt="rpc.grpc.status_code",BXt="rpc.jsonrpc.version",jXt="rpc.jsonrpc.request_id",zXt="rpc.jsonrpc.error_code",HXt="rpc.jsonrpc.error_message",qXt="message.type",YXt="message.id",QXt="message.compressed_size",WXt="message.uncompressed_size",KXt=null,ZXt=null,XXt=null,JXt=null,eJt=null,tJt=null,rJt=null,nJt=null,iJt=null,sJt=null,aJt=null,oJt=null,uJt=null,cJt=null,lJt=null,dJt=null,fJt=null,hJt=null,pJt=null,_Jt=null,mJt=null,gJt=null,vJt=null,SJt=null,yJt=null,EJt=null,AJt=null,TJt=null,bJt=null,CJt=null,RJt=null,OJt=null,PJt=null,IJt=null,MJt=null,wJt=null,NJt=null,DJt=null,LJt=null,$Jt=null,xJt=null,UJt=null,FJt=null,kJt=null,GJt=null,VJt=null,BJt=null,jJt=null,zJt=null,HJt=null,qJt=null,YJt=null,QJt=null,WJt=null,KJt=null,ZJt=null,XJt=null,JJt=null,eer=null,ter=null,Aut=put,Tut=_ut,rer=null,but=mut,Cut=gut,Rut=vut,ner=null,Out=Sut,ier=null,ser=null,Put=yut,Iut=Eut,aer=null,oer=null,uer=null,cer=null,ler=null,der=null,fer=null,her=null,per=null,_er=null,mer=null,ger=null,ver=null,Ser=null,yer=null,Eer=null,Aer=null,Ter=null,ber=null,Cer=null,Rer=null,Oer=null,Per=null,Ier=null,Mer=null,wer=null,Ner=null,Der=null,Ler=null,$er=null,xer=null,Uer=null,Fer=null,ker=null,Ger=null,Ver=null,Ber=null,jer=null,zer=null,Her=null,qer=null,Yer=null,Qer=null,Wer=null,Ker=null,Zer=null,Xer=null,Jer=null,etr=null,ttr=null,rtr=null,ntr=null,itr=null,str=null,atr=null,otr=null,utr=null,ctr="other_sql",ltr="mssql",dtr="mysql",ftr="oracle",htr="db2",ptr="postgresql",_tr="redshift",mtr="hive",gtr="cloudscape",vtr="hsqldb",Str="progress",ytr="maxdb",Etr="hanadb",Atr="ingres",Ttr="firstsql",btr="edb",Ctr="cache",Rtr="adabas",Otr="firebird",Ptr="derby",Itr="filemaker",Mtr="informix",wtr="instantdb",Ntr="interbase",Dtr="mariadb",Ltr="netezza",$tr="pervasive",xtr="pointbase",Utr="sqlite",Ftr="sybase",ktr="teradata",Gtr="vertica",Vtr="h2",Btr="coldfusion",jtr="cassandra",ztr="hbase",Htr="mongodb",qtr="redis",Ytr="couchbase",Qtr="couchdb",Wtr="cosmosdb",Ktr="dynamodb",Ztr="neo4j",Xtr="geode",Jtr="elasticsearch",err="memcached",trr="cockroachdb",rrr=null,nrr=null,irr=null,srr=null,arr=null,orr=null,urr=null,crr=null,lrr=null,drr=null,frr=null,hrr=null,prr=null,_rr=null,mrr=null,grr=null,vrr=null,Srr=null,yrr=null,Err=null,Arr=null,Trr=null,brr=null,Crr=null,Rrr=null,Orr=null,Prr=null,Irr=null,Mrr=null,wrr=null,Nrr=null,Drr=null,Lrr=null,$rr=null,xrr=null,Urr=null,Frr=null,krr=null,Grr=null,Vrr=null,Brr=null,jrr=null,zrr=null,Hrr=null,qrr=null,Yrr=null,Qrr=null,Wrr=null,Krr="all",Zrr="each_quorum",Xrr="quorum",Jrr="local_quorum",enr="one",tnr="two",rnr="three",nnr="local_one",inr="any",snr="serial",anr="local_serial",onr=null,unr=null,cnr=null,lnr=null,dnr=null,fnr=null,hnr=null,pnr=null,_nr=null,mnr=null,gnr=null,vnr=null,Snr="datasource",ynr="http",Enr="pubsub",Anr="timer",Tnr="other",bnr=null,Cnr=null,Rnr=null,Onr=null,Pnr=null,Inr=null,Mnr="insert",wnr="edit",Nnr="delete",Dnr=null,Lnr=null,$nr=null,xnr=null,Unr="alibaba_cloud",Fnr="aws",knr="azure",Gnr="gcp",Vnr=null,Bnr=null,jnr=null,znr=null,Hnr=null,qnr="ip_tcp",Ynr="ip_udp",Qnr="ip",Wnr="unix",Knr="pipe",Znr="inproc",Xnr="other",Jnr=null,eir=null,tir=null,rir=null,nir=null,iir=null,sir=null,air=null,oir="wifi",uir="wired",cir="cell",lir="unavailable",dir="unknown",fir=null,hir=null,pir=null,_ir=null,mir=null,gir=null,vir="gprs",Sir="edge",yir="umts",Eir="cdma",Air="evdo_0",Tir="evdo_a",bir="cdma2000_1xrtt",Cir="hsdpa",Rir="hsupa",Oir="hspa",Pir="iden",Iir="evdo_b",Mir="lte",wir="ehrpd",Nir="hspap",Dir="gsm",Lir="td_scdma",$ir="iwlan",xir="nr",Uir="nrnsa",Fir="lte_ca",kir=null,Gir=null,Vir=null,Bir=null,jir=null,zir=null,Hir=null,qir=null,Yir=null,Qir=null,Wir=null,Kir=null,Zir=null,Xir=null,Jir=null,esr=null,tsr=null,rsr=null,nsr=null,isr=null,ssr=null,asr=null,osr="1.0",usr="1.1",csr="2.0",lsr="SPDY",dsr="QUIC",fsr=null,hsr=null,psr=null,_sr=null,msr=null,gsr=null,vsr="queue",Ssr="topic",ysr=null,Esr=null,Asr=null,Tsr="receive",bsr="process",Csr=null,Rsr=null,Osr=null,Psr=0,Isr=1,Msr=2,wsr=3,Nsr=4,Dsr=5,Lsr=6,$sr=7,xsr=8,Usr=9,Fsr=10,ksr=11,Gsr=12,Vsr=13,Bsr=14,jsr=15,zsr=16,Hsr=null,qsr=null,Ysr=null,Qsr=null,Wsr=null,Ksr=null,Zsr=null,Xsr=null,Jsr=null,ear=null,tar=null,rar=null,nar=null,iar=null,sar=null,aar=null,oar=null,uar=null,car="SENT",lar="RECEIVED",dar=null,far=null,har=null,Ci;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(Ci||(Ci={}));var wk;function Mut(){return wk||(wk=document.createElement("a")),wk}function Nk(t,e){return e in t}function Cl(t,e,r,n){var i=void 0,s=void 0;Nk(r,e)&&typeof r[e]=="number"&&(i=r[e]);var a=n||Ci.FETCH_START;if(Nk(r,a)&&typeof r[a]=="number"&&(s=r[a]),i!==void 0&&s!==void 0&&i>=s)return t.addEvent(e,i),t}function Aue(t,e){Cl(t,Ci.FETCH_START,e),Cl(t,Ci.DOMAIN_LOOKUP_START,e),Cl(t,Ci.DOMAIN_LOOKUP_END,e),Cl(t,Ci.CONNECT_START,e),Nk(e,"name")&&e.name.startsWith("https:")&&Cl(t,Ci.SECURE_CONNECTION_START,e),Cl(t,Ci.CONNECT_END,e),Cl(t,Ci.REQUEST_START,e),Cl(t,Ci.RESPONSE_START,e),Cl(t,Ci.RESPONSE_END,e);var r=e[Ci.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute(Put,r);var n=e[Ci.DECODED_BODY_SIZE];n!==void 0&&r!==n&&t.setAttribute(Iut,n)}function wut(t){return t.slice().sort(function(e,r){var n=e[Ci.FETCH_START],i=r[Ci.FETCH_START];return n>i?1:n<i?-1:0})}function Tue(){return typeof location<"u"?location.origin:void 0}function Nut(t,e,r,n,i,s){i===void 0&&(i=new WeakSet);var a=Jd(t);t=a.toString();var o=Lut(t,e,r,n,i,s);if(o.length===0)return{mainRequest:void 0};if(o.length===1)return{mainRequest:o[0]};var u=wut(o);if(a.origin!==Tue()&&u.length>1){var c=u[0],l=Dut(u,c[Ci.RESPONSE_END],r),d=c[Ci.RESPONSE_END],f=l[Ci.FETCH_START];return f<d&&(l=c,c=void 0),{corsPreFlightRequest:c,mainRequest:l}}else return{mainRequest:o[0]}}function Dut(t,e,r){for(var n=bl(r),i=bl($h(e)),s=t[1],a,o=t.length,u=1;u<o;u++){var c=t[u],l=bl($h(c[Ci.FETCH_START])),d=bl($h(c[Ci.RESPONSE_END])),f=n-d;l>=i&&(!a||f<a)&&(a=f,s=c)}return s}function Lut(t,e,r,n,i,s){var a=bl(e),o=bl(r),u=n.filter(function(c){var l=bl($h(c[Ci.FETCH_START])),d=bl($h(c[Ci.RESPONSE_END]));return c.initiatorType.toLowerCase()===(s||"xmlhttprequest")&&c.name===t&&l>=a&&d<=o});return u.length>0&&(u=u.filter(function(c){return!i.has(c)})),u}function Jd(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=Mut();return e.href=t,e}function par(t){var e=Jd(t);return e.href}function $ut(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var r=Uut(t,e);if(e&&r.indexOf("@id")>0)return r;var n="";return t.parentNode&&(n+=$ut(t.parentNode,!1)),n+=r,n}function xut(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var r=Array.from(t.parentNode.childNodes);return r=r.filter(function(n){var i=n.localName;return e.indexOf(n.nodeType)>=0&&i===t.localName}),r.length>=1?r.indexOf(t)+1:0}function Uut(t,e){var r=t.nodeType,n=xut(t),i="";if(r===Node.ELEMENT_NODE){var s=t.getAttribute("id");if(e&&s)return'//*[@id="'+s+'"]';i=t.localName}else if(r===Node.TEXT_NODE||r===Node.CDATA_SECTION_NODE)i="text()";else if(r===Node.COMMENT_NODE)i="comment()";else return"";return i&&n>1?"/"+i+"["+n+"]":"/"+i}function Fut(t,e){var r=e||[];(typeof r=="string"||r instanceof RegExp)&&(r=[r]);var n=Jd(t);return n.origin===Tue()?!0:r.some(function(i){return Eue(t,i)})}var Rl;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(Rl||(Rl={}));var bue="0.52.1",Dk;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Dk||(Dk={}));var kut=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gut=300,Vut=function(t){kut(e,t);function e(r){r===void 0&&(r={});var n=t.call(this,"@opentelemetry/instrumentation-xml-http-request",bue,r)||this;return n.component="xml-http-request",n.version=bue,n.moduleName=n.component,n._tasksCount=0,n._xhrMem=new WeakMap,n._usedResources=new WeakSet,n}return e.prototype.init=function(){},e.prototype._addHeaders=function(r,n){var i=Jd(n).href;if(!Fut(i,this.getConfig().propagateTraceHeaderCorsUrls)){var s={};tm.inject(Ya.active(),s),Object.keys(s).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};tm.inject(Ya.active(),a),Object.keys(a).forEach(function(o){r.setRequestHeader(o,String(a[o]))})},e.prototype._addChildSpan=function(r,n){var i=this;Ya.with(ao.setSpan(Ya.active(),r),function(){var s=i.tracer.startSpan("CORS Preflight",{startTime:n[Ci.FETCH_START]});i.getConfig().ignoreNetworkEvents||Aue(s,n),s.end(n[Ci.RESPONSE_END])})},e.prototype._addFinalSpanAttributes=function(r,n,i){if(typeof i=="string"){var s=Jd(i);n.status!==void 0&&r.setAttribute(Rut,n.status),n.statusText!==void 0&&r.setAttribute(Dk.HTTP_STATUS_TEXT,n.statusText),r.setAttribute(but,s.host),r.setAttribute(Cut,s.protocol.replace(":","")),r.setAttribute(Out,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(r,n){var i=this,s=this.getConfig().applyCustomAttributesOnSpan;typeof s=="function"&&kot(function(){return s(r,n)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)},!0)},e.prototype._addResourceObserver=function(r,n){var i=this._xhrMem.get(r);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(s){var a=s.getEntries(),o=Jd(n);a.forEach(function(u){u.initiatorType==="xmlhttprequest"&&u.name===o.href&&i.createdResources&&i.createdResources.entries.push(u)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(Wd.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.prototype._findResourceAndAddNetworkEvents=function(r,n,i,s,a){if(!(!i||!s||!a||!r.createdResources)){var o=r.createdResources.entries;(!o||!o.length)&&(o=Wd.getEntriesByType("resource"));var u=Nut(Jd(i).href,s,a,o,this._usedResources);if(u.mainRequest){var c=u.mainRequest;this._markResourceAsUsed(c);var l=u.corsPreFlightRequest;l&&(this._addChildSpan(n,l),this._markResourceAsUsed(l)),this.getConfig().ignoreNetworkEvents||Aue(n,c)}}},e.prototype._cleanPreviousSpanInformation=function(r){var n=this._xhrMem.get(r);if(n){var i=n.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(r)}},e.prototype._createSpan=function(r,n,i){var s;if(hut(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var a=i.toUpperCase(),o=this.tracer.startSpan(a,{kind:HO.CLIENT,attributes:(s={},s[Aut]=i,s[Tut]=Jd(n).toString(),s)});return o.addEvent(Rl.METHOD_OPEN),this._cleanPreviousSpanInformation(r),this._xhrMem.set(r,{span:o,spanUrl:n}),o},e.prototype._markResourceAsUsed=function(r){this._usedResources.add(r)},e.prototype._patchOpen=function(){var r=this;return function(n){var i=r;return function(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];var u=a[0],c=a[1];return i._createSpan(this,c,u),n.apply(this,a)}}},e.prototype._patchSend=function(){var r=this;function n(l,d,f,_){var m=d.callbackToRemoveEvents;typeof m=="function"&&m();var E=d.span,S=d.spanUrl,C=d.sendStartTime;E&&(r._findResourceAndAddNetworkEvents(d,E,S,C,f),E.addEvent(l,_),r._addFinalSpanAttributes(E,d,S),E.end(_),r._tasksCount--),r._clearResources()}function i(l,d){var f=r._xhrMem.get(d);if(f){f.status=d.status,f.statusText=d.statusText,r._xhrMem.delete(d),f.span&&r._applyAttributesAfterXHR(f.span,d);var _=kO(),m=Date.now();setTimeout(function(){n(l,f,_,m)},Gut)}}function s(){i(Rl.EVENT_ERROR,this)}function a(){i(Rl.EVENT_ABORT,this)}function o(){i(Rl.EVENT_TIMEOUT,this)}function u(){this.status<299?i(Rl.EVENT_LOAD,this):i(Rl.EVENT_ERROR,this)}function c(l){l.removeEventListener("abort",a),l.removeEventListener("error",s),l.removeEventListener("load",u),l.removeEventListener("timeout",o);var d=r._xhrMem.get(l);d&&(d.callbackToRemoveEvents=void 0)}return function(l){return function(){for(var f=this,_=[],m=0;m<arguments.length;m++)_[m]=arguments[m];var E=r._xhrMem.get(this);if(!E)return l.apply(this,_);var S=E.span,C=E.spanUrl;return S&&C&&Ya.with(ao.setSpan(Ya.active(),S),function(){r._tasksCount++,E.sendStartTime=kO(),S.addEvent(Rl.METHOD_SEND),f.addEventListener("abort",a),f.addEventListener("error",s),f.addEventListener("load",u),f.addEventListener("timeout",o),E.callbackToRemoveEvents=function(){c(f),E.createdResources&&E.createdResources.observer.disconnect()},r._addHeaders(f,C),r._addResourceObserver(f,C)}),l.apply(this,_)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),gue(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),gue(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},e.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},e}(dut);const But="https?://api-gateway.[a-zA-Z]+.icanbwell.com",Cue=new RegExp(`^(?!${But})`);function _ar(t){return Cue.test(t)}function jut(t){return Oie({node:()=>null,browser:()=>new Vut({ignoreUrls:[Cue],propagateTraceHeaderCorsUrls:[t.graphQL.apiUrl,t.graphQL.unauthApiUrl]})})}var Ic=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Lk=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},sm,am,sy,JO,Rue,Oue,Pue,Iue;class zut{constructor(e){sm.add(this),am.set(this,void 0),sy.set(this,void 0),JO.set(this,void 0),Lk(this,am,Ic(this,sm,"m",Rue).call(this,e),"f"),Lk(this,sy,Ic(this,sm,"m",Oue).call(this),"f"),Lk(this,JO,Ic(this,sm,"m",Pue).call(this,e),"f"),this.fetchInstrumentation=Ic(this,sm,"m",Iue).call(this,e)}loggerProvider(){return Ic(this,JO,"f")}resource(){return Ic(this,am,"f")}tracerProvider(){return Ic(this,sy,"f")}}am=new WeakMap,sy=new WeakMap,JO=new WeakMap,sm=new WeakSet,Rue=function(e){var r,n,i,s;return GO.default().merge(new GO({[Dot]:"bwell-sdk-typescript",[$ot]:iZe(),[xot]:"typescript",[Lot]:"com.bwell",[Not]:e.context.env,"client.key":e.context.clientKey,"user.id":(n=(r=e.context.user)===null||r===void 0?void 0:r.clientFhirPersonId)!==null&&n!==void 0?n:"","user.bwell-person-id":(s=(i=e.context.user)===null||i===void 0?void 0:i.bwellFhirPersonId)!==null&&s!==void 0?s:""}))},Oue=function(){const e=new Rot({resource:Ic(this,am,"f")});return e.register({propagator:new moe}),e},Pue=function(e){const r=new Dat({resource:Ic(this,am,"f")}),n=new Pst({url:`${e.telemetry.collectorUrl}/otlp-http/v1/logs`}),i=new jat(n);return r.addLogRecordProcessor(i),r},Iue=function(e){const r=jut(e);return r===null?null:(r.setTracerProvider(Ic(this,sy,"f")),r)};var ef=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},ay=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},fs=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Fh,tf,eP,oy,Xo,om,$k,Mue,wue,xk,Nue;class Due{constructor(e,r,n,i){Fh.add(this),eP.set(this,void 0),oy.set(this,void 0),Xo.set(this,void 0),om.set(this,void 0),ay(this,eP,r,"f"),ay(this,oy,n.getLogger("TokenManager"),"f"),ay(this,Xo,i,"f")}static initialize(e,r){return ef(this,arguments,void 0,function*(n,i,s=new ws,a=new Y1){const o=fs(tf,tf,"m",$k).call(tf,n.accessToken);if(o.failure())return o.intoFailure();const u=new tf(Object.assign(Object.assign({},n),{expiration:o.data()}),i,s,a);try{yield Promise.all([a.set("idToken",n.idToken),a.set("clientKey",n.clientKey),a.set("accessToken",n.accessToken),a.set("refreshToken",n.refreshToken),a.set("expiration",o.data().toISOString())])}catch{return tr.failure(new w_("Failed to set tokens in token storage"))}return tr.success(u)})}getAccessToken(){return ef(this,void 0,void 0,function*(){if(yield fs(this,Fh,"m",wue).call(this)){const n=yield fs(this,Fh,"m",xk).call(this);if(n.failure())return n.intoFailure()}const r=yield fs(this,Xo,"f").get("accessToken");return Zs(r)?tr.failure(new w_("accessToken not found in token storage")):tr.success(r)})}getIdToken(){return ef(this,void 0,void 0,function*(){return yield fs(this,Xo,"f").get("idToken")})}refreshAccessToken(){return ef(this,void 0,void 0,function*(){return fs(this,Fh,"m",xk).call(this)})}}tf=Due,eP=new WeakMap,oy=new WeakMap,Xo=new WeakMap,om=new WeakMap,Fh=new WeakSet,$k=function(e){try{const r=Mie(e);return tr.success(new Date(r))}catch(r){if(!ua.isBwellError(r))throw r;return tr.failure(r)}},Mue=function(){return ef(this,void 0,void 0,function*(){const e=yield fs(this,Xo,"f").get("expiration");if(Zs(e))throw new Error("expiration not found in token storage");return new Date(e)})},wue=function(){return ef(this,void 0,void 0,function*(){const r=(yield fs(this,Fh,"m",Mue).call(this)).getTime(),n=Date.now();return r<n})},xk=function(){return ef(this,void 0,void 0,function*(){if(fs(this,om,"f")!==void 0)return fs(this,om,"f");const e=fs(this,Fh,"m",Nue).call(this);ay(this,om,e,"f");try{return yield e}finally{ay(this,om,void 0,"f")}})},Nue=function(){return ef(this,void 0,void 0,function*(){fs(this,oy,"f").verbose("refreshing access token...");const[e,r]=yield Promise.all([fs(this,Xo,"f").get("refreshToken"),fs(this,Xo,"f").get("clientKey")]);if(Zs(e)||Zs(r))return tr.failure(new w_("refreshToken or clientKey not found in token storage"));const n=yield fs(this,eP,"f").refreshAccessToken({refreshToken:e,clientKey:r});if(fs(this,oy,"f").verbose("refreshing access token complete"),n.failure())return n.intoFailure();const i=n.data();yield fs(this,Xo,"f").set("accessToken",i.accessToken),yield fs(this,Xo,"f").set("idToken",i.idToken);const s=i.refreshToken;typeof s=="string"&&s.trim().length>0&&(yield fs(this,Xo,"f").set("refreshToken",s.trim()));const a=fs(tf,tf,"m",$k).call(tf,i.accessToken);return a.failure()?a.intoFailure():(yield fs(this,Xo,"f").set("expiration",a.data().toISOString()),tr.success(null))})};var uy=function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{c(n.next(l))}catch(d){a(d)}}function u(l){try{c(n.throw(l))}catch(d){a(d)}}function c(l){l.done?s(l.value):i(l.value).then(o,u)}c((n=n.apply(t,e||[])).next())})},Oo=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},dr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Gi,um,Po,cy,Uk,Fk,kk,Gk,Mc,ly,kh,Gh,tP,cm,Vk,oo,Bk,jk,zk,Lue;class Hut{constructor(e){Gi.add(this),um.set(this,void 0),Po.set(this,void 0),cy.set(this,void 0),Uk.set(this,new tJe),Fk.set(this,new Cnt),kk.set(this,new Pnt),Gk.set(this,new $nt),Mc.set(this,void 0),ly.set(this,void 0),kh.set(this,void 0),Gh.set(this,void 0),tP.set(this,void 0),cm.set(this,void 0),Oo(this,um,e,"f"),Oo(this,Po,ZR.initialize(dr(this,um,"f")).data(),"f"),Oo(this,cy,dr(this,Gi,"m",zk).call(this),"f"),Oo(this,Mc,dr(this,Gi,"m",jk).call(this),"f"),Oo(this,kh,dr(this,Mc,"f").getLogger("BWellSDK"),"f"),Oo(this,Gh,dr(this,kk,"f").createIdentityManager(dr(this,Po,"f"),dr(this,Mc,"f")),"f"),Oo(this,tP,new nJe(dr(this,Gh,"f")),"f")}initialize(){return uy(this,void 0,void 0,function*(){dr(this,kh,"f").verbose("initializing SDKConfig...");const e=yield dr(this,tP,"f").initialize(dr(this,um,"f"));return e.failure()?e.intoFailure():(dr(this,kh,"f").verbose("SDK Config initialized successfully"),Oo(this,Po,e.data(),"f"),dr(this,Gi,"m",Bk).call(this),tr.success(null))})}authenticate(e){return uy(this,void 0,void 0,function*(){const n=yield dr(this,Gk,"f").createAuthStrategy(dr(this,Po,"f"),dr(this,Gh,"f"),e,dr(this,Mc,"f")).authenticate(e);if(n.failure())return n.intoFailure();const i=n.data();return dr(this,Gi,"m",Vk).call(this,i)})}setAuthTokens(e){return uy(this,void 0,void 0,function*(){const r=yield dr(this,Gi,"m",Vk).call(this,e);if(r.failure())return r.intoFailure();if(dr(this,cm,"f")===void 0)throw new Error("TokenManager not set");const n=e.refreshToken;if(!(typeof n=="string"&&n.trim().length>0))return tr.success(null);const s=Mie(e.accessToken);if(Date.now()<s)return tr.success(null);const a=yield dr(this,cm,"f").refreshAccessToken();return a.failure()?a.intoFailure():tr.success(null)})}createGuestAccessToken(e){return uy(this,void 0,void 0,function*(){return dr(this,Gh,"f").createGuestAccessToken(Object.assign({clientKey:dr(this,Po,"f").context.clientKey},e&&{jweToken:e}))})}get health(){return dr(this,Gi,"m",oo).call(this).health}get healthSpace(){return dr(this,Gi,"m",oo).call(this).healthSpace}get user(){return dr(this,Gi,"m",oo).call(this).user}get connection(){return dr(this,Gi,"m",oo).call(this).connection}get activity(){return dr(this,Gi,"m",oo).call(this).activity}get device(){return dr(this,Gi,"m",oo).call(this).device}get event(){return dr(this,Gi,"m",oo).call(this).event}get search(){return dr(this,Gi,"m",oo).call(this).search}get financial(){return dr(this,Gi,"m",oo).call(this).financial}get language(){return dr(this,Gi,"m",oo).call(this).language}get questionnaire(){return dr(this,Gi,"m",oo).call(this).questionnaire}get support(){return dr(this,Gi,"m",oo).call(this).support}get dataSharing(){return dr(this,Gi,"m",oo).call(this).dataSharing}}um=new WeakMap,Po=new WeakMap,cy=new WeakMap,Uk=new WeakMap,Fk=new WeakMap,kk=new WeakMap,Gk=new WeakMap,Mc=new WeakMap,ly=new WeakMap,kh=new WeakMap,Gh=new WeakMap,tP=new WeakMap,cm=new WeakMap,Gi=new WeakSet,Vk=function(e){return uy(this,void 0,void 0,function*(){try{const i=nZe(e.idToken);Wr(i)&&dr(this,Po,"f").setContextUser(i)}catch(i){if(ua.isBwellError(i))return tr.failure(i);throw i}const r=Object.assign(Object.assign({},e),{clientKey:dr(this,Po,"f").context.clientKey}),n=yield Due.initialize(r,dr(this,Gh,"f"),dr(this,Mc,"f"),dr(this,um,"f").tokenStorage);return n.failure()?n.intoFailure():(Oo(this,cm,n.data(),"f"),dr(this,Gi,"m",Bk).call(this),Oo(this,ly,dr(this,Gi,"m",Lue).call(this,dr(this,cm,"f")),"f"),tr.success(null))})},oo=function(){if(dr(this,ly,"f")===void 0)throw new Error("Unintialized");return dr(this,ly,"f")},Bk=function(){dr(this,kh,"f").verbose("reinitializing SDK dependencies"),Oo(this,cy,dr(this,Gi,"m",zk).call(this),"f"),Oo(this,Mc,dr(this,Gi,"m",jk).call(this),"f"),Oo(this,kh,dr(this,Mc,"f").getLogger("BwellSDK"),"f")},jk=function(){return dr(this,Uk,"f").createLogProvider(dr(this,Po,"f"),dr(this,cy,"f"))},zk=function(){if(dr(this,Po,"f").telemetry.enabled)return new zut(dr(this,Po,"f"))},Lue=function(e){return dr(this,Fk,"f").createApiProvider(dr(this,Po,"f"),e,dr(this,Mc,"f"))};function qut(t){try{return JSON.parse(atob(t))}catch{}}function $ue(t){var e,r,n;const i=qut(t);if(!i?.env)return id.C;const s={rest:{endpoints:{}}};for(const a in(e=id.C===null||id.C===void 0?void 0:id.C.rest)===null||e===void 0?void 0:e.endpoints){const o=(r=id.C===null||id.C===void 0?void 0:id.C.rest)===null||r===void 0?void 0:r.endpoints[a];typeof o=="string"&&(!((n=s?.rest)===null||n===void 0)&&n.endpoints)&&(s.rest.endpoints[a]=o.replace(".prod.",`.${i.env}.`))}return s}const Yut=6e4;function rP(t,e=Date.now()){try{const{exp:r}=(0,je().decodeJwt)(t);return typeof r!="number"?!1:r*1e3<e+Yut}catch{return!1}}var Jo,eu,lm,dy,Qa,wc,fy,rf,hy,Ol,dm,Hk,xue,qk,Uue,Fue,kue,Yk;const Gue="dataSharing";class Qut{constructor({stateService:e,apiClient:r,bwellSdk:n,sdkTokenStorage:i,identityUtils:s,navigationService:a}){Jo.add(this),eu.set(this,void 0),lm.set(this,void 0),dy.set(this,void 0),Qa.set(this,void 0),wc.set(this,void 0),fy.set(this,void 0),rf.set(this,!1),hy.set(this,null),Ol.set(this,void 0),dm.set(this,0),(0,ee().__classPrivateFieldSet)(this,eu,e,"f"),(0,ee().__classPrivateFieldSet)(this,lm,r,"f"),(0,ee().__classPrivateFieldSet)(this,dy,n,"f"),(0,ee().__classPrivateFieldSet)(this,Qa,i,"f"),(0,ee().__classPrivateFieldSet)(this,wc,s,"f"),(0,ee().__classPrivateFieldSet)(this,fy,a,"f"),(0,ee().__classPrivateFieldGet)(this,Qa,"f").setRefreshHandler(()=>this.refreshDelegatedToken()),(0,ee().__classPrivateFieldGet)(this,wc,"f").registerPreLogoutHandler(()=>{(0,ee().__classPrivateFieldGet)(this,Qa,"f").clearDelegatedTokens()})}startImpersonation(e,r){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var n,i,s;if(!e?.trim())throw new Error("consentId is required for startImpersonation.");if((0,ee().__classPrivateFieldGet)(this,rf,"f"))throw new Error("Impersonation transition already in progress.");(0,ee().__classPrivateFieldSet)(this,rf,!0,"f"),(0,ee().__classPrivateFieldGet)(this,Qa,"f").cancelHostSessionWaits(),(0,ee().__classPrivateFieldGet)(this,Jo,"m",Hk).call(this);try{(0,ee().__classPrivateFieldGet)(this,hy,"f")||(0,ee().__classPrivateFieldSet)(this,hy,(0,ee().__classPrivateFieldGet)(this,Jo,"m",kue).call(this),"f");const a=yield(0,ee().__classPrivateFieldGet)(this,hy,"f"),{accessToken:o,delegateTokens:u}=yield(0,ee().__classPrivateFieldGet)(this,Jo,"m",qk).call(this,e),{key:c}=(0,ee().__classPrivateFieldGet)(this,eu,"f").getClientContext();(0,ee().__classPrivateFieldGet)(this,lm,"f").enableAuth({tokens:{accessToken:o,idToken:o},onRefresh:(0,ee().__classPrivateFieldGet)(this,Jo,"m",Yk).call(this,c)});const l=(0,ee().__classPrivateFieldGet)(this,Jo,"m",Fue).call(this,o);r&&(yield r());const d=(0,ee().__classPrivateFieldGet)(this,eu,"f").getStore();if(a&&d.dispatch(ZE.setAccessControlConfig(a)),d.dispatch(ZE.startImpersonation({consentId:e,accessLevel:l})),d.dispatch(Og.replace({tokenData:u})),a){const f=l??cw.VIEW,_=(s=(i=(n=a.roles)===null||n===void 0?void 0:n[f])===null||i===void 0?void 0:i.block)!==null&&s!==void 0?s:[];(0,ee().__classPrivateFieldGet)(this,fy,"f").setBlockedRoutes(Gue,_)}}finally{(0,ee().__classPrivateFieldSet)(this,rf,!1,"f")}})}endImpersonation(e){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var r,n;if(this.isImpersonating()){if((0,ee().__classPrivateFieldGet)(this,rf,"f"))throw new Error("Impersonation transition already in progress.");(0,ee().__classPrivateFieldSet)(this,rf,!0,"f"),(0,ee().__classPrivateFieldGet)(this,Jo,"m",Hk).call(this);try{const i=(0,ee().__classPrivateFieldGet)(this,wc,"f").getStoredTokens();if(!i)throw new Error("Cannot end impersonation: no root user tokens found.");(0,ee().__classPrivateFieldGet)(this,Qa,"f").clearDelegatedTokens(),(0,ee().__classPrivateFieldGet)(this,wc,"f").clearDelegationContext();const{key:s}=(0,ee().__classPrivateFieldGet)(this,eu,"f").getClientContext();(0,ee().__classPrivateFieldGet)(this,lm,"f").enableAuth({tokens:{accessToken:i.accessToken.jwtToken,idToken:i.idToken.jwtToken},onRefresh:(0,ee().__classPrivateFieldGet)(this,Jo,"m",Yk).call(this,s),proactiveRefresh:!!(!((n=(r=i.refreshToken)===null||r===void 0?void 0:r.token)===null||n===void 0)&&n.trim())}),e&&(yield e());const a=(0,ee().__classPrivateFieldGet)(this,eu,"f").getStore();a.dispatch(ZE.endImpersonation()),a.dispatch(Og.replace({tokenData:i})),(0,ee().__classPrivateFieldGet)(this,fy,"f").clearBlockedRoutes(Gue)}finally{(0,ee().__classPrivateFieldSet)(this,rf,!1,"f")}}})}isImpersonating(){return dw((0,ee().__classPrivateFieldGet)(this,eu,"f").getState())}getDataSharingConsentId(){return oge((0,ee().__classPrivateFieldGet)(this,eu,"f").getState())}refreshDelegatedToken(){if(!(0,ee().__classPrivateFieldGet)(this,Ol,"f")){const e=(0,ee().__classPrivateFieldGet)(this,Jo,"m",xue).call(this,(0,ee().__classPrivateFieldGet)(this,dm,"f")).finally(()=>{(0,ee().__classPrivateFieldGet)(this,Ol,"f")===e&&(0,ee().__classPrivateFieldSet)(this,Ol,void 0,"f")});(0,ee().__classPrivateFieldSet)(this,Ol,e,"f")}return(0,ee().__classPrivateFieldGet)(this,Ol,"f")}}eu=new WeakMap,lm=new WeakMap,dy=new WeakMap,Qa=new WeakMap,wc=new WeakMap,fy=new WeakMap,rf=new WeakMap,hy=new WeakMap,Ol=new WeakMap,dm=new WeakMap,Jo=new WeakSet,Hk=function(){var e;(0,ee().__classPrivateFieldSet)(this,dm,(e=(0,ee().__classPrivateFieldGet)(this,dm,"f"),e++,e),"f"),(0,ee().__classPrivateFieldSet)(this,Ol,void 0,"f")},xue=function(e){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var r,n,i;const s=()=>e!==(0,ee().__classPrivateFieldGet)(this,dm,"f"),a=()=>{if(s())throw new Error("Impersonation changed during the delegated token re-mint.")},o=(0,ee().__classPrivateFieldGet)(this,wc,"f").getDelegationContext(),u=(r=this.getDataSharingConsentId())!==null&&r!==void 0?r:o?.consentId;if(!u)throw new Error("Cannot refresh delegated token: no consent ID found.");const c=(i=(n=(0,ee().__classPrivateFieldGet)(this,wc,"f").getStoredTokens())===null||n===void 0?void 0:n.accessToken)===null||i===void 0?void 0:i.jwtToken;c&&rP(c)&&(yield(0,ee().__classPrivateFieldGet)(this,Qa,"f").waitForRootRenewal(),a());const l=(0,ee().__classPrivateFieldGet)(this,Qa,"f").getDelegatedAccessToken();(0,ee().__classPrivateFieldGet)(this,Qa,"f").clearDelegatedTokens();try{const{accessToken:d}=yield(0,ee().__classPrivateFieldGet)(this,Jo,"m",qk).call(this,u,a);return(0,ee().__classPrivateFieldGet)(this,eu,"f").updateTokens({accessToken:d,idToken:d}),{accessToken:d,idToken:d}}catch(d){throw l&&!s()&&(0,ee().__classPrivateFieldGet)(this,Qa,"f").setDelegatedTokens({accessToken:l,idToken:l}),d}})},qk=function(e,r){return(0,ee().__awaiter)(this,void 0,void 0,function*(){const n=yield(0,ee().__classPrivateFieldGet)(this,dy,"f").dataSharing.requestDataSharingToken(new HXe({consentId:e}));if(r?.(),n.failure())throw new Error(n.error().message);const i=n.data().access_token;(0,ee().__classPrivateFieldGet)(this,Qa,"f").setDelegatedTokens({accessToken:i,idToken:i});const s=(0,ee().__classPrivateFieldGet)(this,Jo,"m",Uue).call(this,i);return(0,ee().__classPrivateFieldGet)(this,wc,"f").storeDelegationContext({consentId:e,delegateTokens:s}),{accessToken:i,delegateTokens:s}})},Uue=function(e){const r=(0,je().decodeJwt)(e),n=(0,je().normalizeTokenPayload)((0,je().decodeJwt)(e));return{accessToken:{jwtToken:e,payload:r},idToken:{jwtToken:e,payload:n},refreshToken:{}}},Fue=function(e){var r;try{const i=(0,je().decodeJwt)(e).act,s=(r=i?.role)===null||r===void 0?void 0:r.toLowerCase();return s===cw.ADMIN||s===cw.VIEW?s:null}catch{return null}},kue=function(){return(0,ee().__awaiter)(this,void 0,void 0,function*(){var e,r,n,i,s;try{const{slug:a}=(0,ee().__classPrivateFieldGet)(this,eu,"f").getClientContext(),u=yield CU((0,ee().__classPrivateFieldGet)(this,lm,"f")).getHealthCircleConfig({clientSlug:a}),c=(n=(r=(e=u?.clientConfiguration)===null||e===void 0?void 0:e.healthCircle)===null||r===void 0?void 0:r.accessControl)===null||n===void 0?void 0:n.roles;return c?{roles:Object.assign(Object.assign({},((i=c.view)===null||i===void 0?void 0:i.block)&&{view:{block:c.view.block}}),((s=c.admin)===null||s===void 0?void 0:s.block)&&{admin:{block:c.admin.block}})}:null}catch{return null}})},Yk=function(e){return()=>(0,ee().__awaiter)(this,void 0,void 0,function*(){var r,n;if((0,ee().__classPrivateFieldGet)(this,Ol,"f")||(0,ee().__classPrivateFieldGet)(this,Qa,"f").isImpersonating)return this.refreshDelegatedToken();const i=(n=(r=(0,ee().__classPrivateFieldGet)(this,wc,"f").getStoredTokens())===null||r===void 0?void 0:r.refreshToken)===null||n===void 0?void 0:n.token;if(!i)return(0,ee().__classPrivateFieldGet)(this,Qa,"f").waitForHostSession();const s=$ue(e),o=yield new(je()).Auth(new(kn()).ApiClient(s),(0,ee().__classPrivateFieldGet)(this,dy,"f"),(0,ee().__classPrivateFieldGet)(this,Qa,"f")).refreshTokens(i,e);return(0,ee().__classPrivateFieldGet)(this,eu,"f").updateTokens(o),o})};var nP;(function(t){t.one="1.0.0"})(nP||(nP={}));const Vue="orchestrator:data-sharing",Wut=t=>({id:Vue,dependencies:{featureServices:{[Ss]:mo.one,[Uo]:tl.one,[PR]:bS.one,[CR]:TS.one,[gC]:Zv.one}},create:({featureServices:e})=>{const r=e[Ss],n=e[Uo],i=e[PR],s=e[CR],a=e[gC],o=new Qut({stateService:r,apiClient:n,bwellSdk:i,sdkTokenStorage:t,identityUtils:s,navigationService:a});return{[nP.one]:()=>({featureService:o})}}});var iP,Nc,fm,hm,Vh,Pl,Bh,Bue,jue;const zue=15e3;class Hue extends Y1{constructor(){super(...arguments),iP.add(this),Nc.set(this,new Map),fm.set(this,!1),hm.set(this,void 0),Vh.set(this,void 0),Pl.set(this,[]),Bh.set(this,[])}get(e){const r=Object.create(null,{get:{get:()=>super.get}});return(0,ee().__awaiter)(this,void 0,void 0,function*(){return(0,ee().__classPrivateFieldGet)(this,fm,"f")?(e==="expiration"&&(0,ee().__classPrivateFieldGet)(this,hm,"f")&&(0,ee().__classPrivateFieldGet)(this,iP,"m",Bue).call(this)&&(yield(0,ee().__classPrivateFieldGet)(this,iP,"m",jue).call(this)),(0,ee().__classPrivateFieldGet)(this,Nc,"f").get(e)):r.get.call(this,e)})}setRefreshHandler(e){(0,ee().__classPrivateFieldSet)(this,hm,e,"f")}waitForHostSession(e=zue){return new Promise((r,n)=>{const i={resolve:a=>{clearTimeout(s),r(a)},reject:a=>{clearTimeout(s),n(a)}},s=setTimeout(()=>{(0,ee().__classPrivateFieldSet)(this,Pl,(0,ee().__classPrivateFieldGet)(this,Pl,"f").filter(a=>a!==i),"f"),n(new Error(`No host session received within ${e}ms.`))},e);(0,ee().__classPrivateFieldGet)(this,Pl,"f").push(i)})}notifyHostSession(e){const r=(0,ee().__classPrivateFieldGet)(this,Pl,"f");(0,ee().__classPrivateFieldSet)(this,Pl,[],"f"),r.forEach(n=>n.resolve(e))}cancelHostSessionWaits(){const e=(0,ee().__classPrivateFieldGet)(this,Pl,"f");(0,ee().__classPrivateFieldSet)(this,Pl,[],"f"),e.forEach(r=>r.reject(new Error("Host session wait cancelled.")))}waitForRootRenewal(e=zue){return new Promise(r=>{const n=()=>{clearTimeout(i),r()},i=setTimeout(()=>{(0,ee().__classPrivateFieldSet)(this,Bh,(0,ee().__classPrivateFieldGet)(this,Bh,"f").filter(s=>s!==n),"f"),r()},e);(0,ee().__classPrivateFieldGet)(this,Bh,"f").push(n)})}notifyRootRenewal(){const e=(0,ee().__classPrivateFieldGet)(this,Bh,"f");(0,ee().__classPrivateFieldSet)(this,Bh,[],"f"),e.forEach(r=>r())}setDelegatedTokens(e){(0,ee().__classPrivateFieldGet)(this,Nc,"f").set("accessToken",e.accessToken),(0,ee().__classPrivateFieldGet)(this,Nc,"f").set("idToken",e.idToken);const r=(0,je().decodeJwt)(e.accessToken);r.exp&&(0,ee().__classPrivateFieldGet)(this,Nc,"f").set("expiration",new Date(r.exp*1e3).toISOString()),r.clientKey&&(0,ee().__classPrivateFieldGet)(this,Nc,"f").set("clientKey",r.clientKey),(0,ee().__classPrivateFieldSet)(this,fm,!0,"f")}clearDelegatedTokens(){(0,ee().__classPrivateFieldGet)(this,Nc,"f").clear(),(0,ee().__classPrivateFieldSet)(this,fm,!1,"f")}getDelegatedAccessToken(){return(0,ee().__classPrivateFieldGet)(this,Nc,"f").get("accessToken")}get isImpersonating(){return(0,ee().__classPrivateFieldGet)(this,fm,"f")}}Nc=new WeakMap,fm=new WeakMap,hm=new WeakMap,Vh=new WeakMap,Pl=new WeakMap,Bh=new WeakMap,iP=new WeakSet,Bue=function(){const e=(0,ee().__classPrivateFieldGet)(this,Nc,"f").get("accessToken");return e?rP(e):!1},jue=function(){return(0,ee().__awaiter)(this,void 0,void 0,function*(){if((0,ee().__classPrivateFieldGet)(this,Vh,"f")){yield(0,ee().__classPrivateFieldGet)(this,Vh,"f");return}(0,ee().__classPrivateFieldSet)(this,Vh,(0,ee().__awaiter)(this,void 0,void 0,function*(){try{(0,ee().__classPrivateFieldGet)(this,hm,"f")&&(yield(0,ee().__classPrivateFieldGet)(this,hm,"f").call(this))}catch{}}),"f"),yield(0,ee().__classPrivateFieldGet)(this,Vh,"f"),(0,ee().__classPrivateFieldSet)(this,Vh,void 0,"f")})};const Xt={apiClient:CM,theme:OM,analytics:PM,auth:IM,logging:MM,state:$s,navigation:wM,featureFlags:RM,translation:NM,identityUtils:DM,nativeBridge:LM,globalEventEmitter:$M,rebootController:xM,bwellSdk:UM,dataSharing:FM},mar=Object.keys(Xt).reduce((t,e)=>{const{id:r,version:n}=Xt[e];return Object.assign(Object.assign({},t),{[e]:{id:r,version:n}})},{});var Kut=p(78561),gar=p(97107),que;const Sar=null;function Ct(t,e,r){function n(o,u){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),o._zod.traits.has(t))return;o._zod.traits.add(t),e(o,u);const c=a.prototype,l=Object.keys(c);for(let d=0;d<l.length;d++){const f=l[d];f in o||(o[f]=c[f].bind(o))}}const i=r?.Parent??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function a(o){var u;const c=r?.Parent?new s:this;n(c,o),(u=c._zod).deferred??(u.deferred=[]);for(const l of c._zod.deferred)l();return c}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}const yar=Symbol("zod_brand");class pm extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Yue extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(que=globalThis).__zod_globalConfig??(que.__zod_globalConfig={});const sP=globalThis.__zod_globalConfig;function Il(t){return t&&Object.assign(sP,t),sP}var Zut;const Xut=/^[cC][0-9a-z]{6,}$/,Jut=/^[0-9a-z]+$/,ect=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,tct=/^[0-9a-vA-V]{20}$/,rct=/^[A-Za-z0-9]{27}$/,nct=/^[a-zA-Z0-9_-]{21}$/,ict=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ear=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,sct=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Que=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Aar=null,Tar=null,bar=null,act=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Car=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Rar=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Oar=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Par=null,Iar=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,oct="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function uct(){return new RegExp(oct,"u")}const cct=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,lct=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Mar=t=>{const e=Zut.escapeRegex(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},dct=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,fct=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,hct=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Wue=/^[A-Za-z0-9_-]*$/,war=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Nar=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,pct=/^https?$/,_ct=/^\+[1-9]\d{6,14}$/,Kue="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",mct=new RegExp(`^${Kue}$`);function Zue(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function gct(t){return new RegExp(`^${Zue(t)}$`)}function vct(t){const e=Zue({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${e}(?:${r.join("|")})`;return new RegExp(`^${Kue}T(?:${n})$`)}const Sct=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Dar=/^-?\d+n?$/,Lar=/^-?\d+$/,yct=/^-?\d+(?:\.\d+)?$/,Ect=/^(?:true|false)$/i,$ar=/^null$/i,xar=/^undefined$/i,Act=/^[^A-Z]*$/,Tct=/^[^a-z]*$/,Uar=/^[0-9a-fA-F]*$/;function Far(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function kar(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}const Gar=/^[0-9a-fA-F]{32}$/,Var=null,Bar=null,jar=/^[0-9a-fA-F]{40}$/,zar=null,Har=null,qar=/^[0-9a-fA-F]{64}$/,Yar=null,Qar=null,War=/^[0-9a-fA-F]{96}$/,Kar=null,Zar=null,Xar=/^[0-9a-fA-F]{128}$/,Jar=null,eor=null;function tor(t){return t}function ror(t){return t}function nor(t){}function ior(t){throw new Error("Unexpected value in exhaustive check")}function sor(t){}function Xue(t){const e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function aor(t,e="|"){return t.map(r=>Oct(r)).join(e)}function Qk(t,e){return typeof e=="bigint"?e.toString():e}function Wk(t){return{get value(){{const r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Kk(t){return t==null}function Zk(t){const e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function oor(t,e){const r=t/e,n=Math.round(r),i=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<i?0:r-n}const Jue=Symbol("evaluating");function Wn(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==Jue)return n===void 0&&(n=Jue,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function uor(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function jh(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ml(...t){const e={};for(const r of t){const n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function cor(t){return Ml(t._zod.def)}function lor(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function dor(t){const e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{const i={};for(let s=0;s<e.length;s++)i[e[s]]=n[s];return i})}function hor(t=10){const e="abcdefghijklmnopqrstuvwxyz";let r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function ece(t){return JSON.stringify(t)}function bct(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const tce="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function aP(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Cct=Wk(()=>{if(sP.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function _m(t){if(aP(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const r=e.prototype;return!(aP(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function rce(t){return _m(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function por(t){let e=0;for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}const _or=t=>{const e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Rct=new Set(["string","number","symbol"]),mor=null;function oP(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nf(t,e,r){const n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function Or(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function gor(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,s){return e??(e=t()),Reflect.set(e,n,i,s)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function Oct(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Pct(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const vor={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Sor=null;function Ict(t,e){const r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Ml(t._zod.def,{get shape(){const a={};for(const o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(a[o]=r.shape[o])}return jh(this,"shape",a),a},checks:[]});return nf(t,s)}function Mct(t,e){const r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Ml(t._zod.def,{get shape(){const a={...t._zod.def.shape};for(const o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete a[o]}return jh(this,"shape",a),a},checks:[]});return nf(t,s)}function wct(t,e){if(!_m(e))throw new Error("Invalid input to extend: expected a plain object");const r=t._zod.def.checks;if(r&&r.length>0){const s=t._zod.def.shape;for(const a in e)if(Object.getOwnPropertyDescriptor(s,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Ml(t._zod.def,{get shape(){const s={...t._zod.def.shape,...e};return jh(this,"shape",s),s}});return nf(t,i)}function Nct(t,e){if(!_m(e))throw new Error("Invalid input to safeExtend: expected a plain object");const r=Ml(t._zod.def,{get shape(){const n={...t._zod.def.shape,...e};return jh(this,"shape",n),n}});return nf(t,r)}function Dct(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=Ml(t._zod.def,{get shape(){const n={...t._zod.def.shape,...e._zod.def.shape};return jh(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return nf(t,r)}function Lct(t,e,r){const i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=Ml(e._zod.def,{get shape(){const o=e._zod.def.shape,u={...o};if(r)for(const c in r){if(!(c in o))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(u[c]=t?new t({type:"optional",innerType:o[c]}):o[c])}else for(const c in o)u[c]=t?new t({type:"optional",innerType:o[c]}):o[c];return jh(this,"shape",u),u},checks:[]});return nf(e,a)}function $ct(t,e,r){const n=Ml(e._zod.def,{get shape(){const i=e._zod.def.shape,s={...i};if(r)for(const a in r){if(!(a in s))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(s[a]=new t({type:"nonoptional",innerType:i[a]}))}else for(const a in i)s[a]=new t({type:"nonoptional",innerType:i[a]});return jh(this,"shape",s),s}});return nf(e,n)}function mm(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function xct(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue===!1)return!0;return!1}function gm(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function uP(t){return typeof t=="string"?t:t?.message}function wl(t,e,r){const n=t.message?t.message:uP(t.inst?._zod.def?.error?.(t))??uP(e?.error?.(t))??uP(r.customError?.(t))??uP(r.localeError?.(t))??"Invalid input",{inst:i,continue:s,input:a,...o}=t;return o.path??(o.path=[]),o.message=n,e?.reportInput&&(o.input=a),o}function yor(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Xk(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Eor(t){const e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";const r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function py(...t){const[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function Aor(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Uct(t){const e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Fct(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function Tor(t){const e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return Uct(e+r)}function bor(t){return Fct(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Cor(t){const e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function Ror(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}class Oor{constructor(...e){}}var Por,Ior,kct;const tu=Ct("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Mor=null,wor=null,Nor=null,Dor=null,Lor=null,$or=null,xor=null,Uor=null,For=null,Gct=Ct("$ZodCheckMaxLength",(t,e)=>{var r;tu.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!Kk(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{const i=n.value;if(i.length<=e.maximum)return;const a=Xk(i);n.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Vct=Ct("$ZodCheckMinLength",(t,e)=>{var r;tu.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!Kk(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{const i=n.value;if(i.length>=e.minimum)return;const a=Xk(i);n.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Bct=Ct("$ZodCheckLengthEquals",(t,e)=>{var r;tu.init(t,e),(r=t._zod.def).when??(r.when=n=>{const i=n.value;return!Kk(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{const i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{const i=n.value,s=i.length;if(s===e.length)return;const a=Xk(i),o=s>e.length;n.issues.push({origin:a,...o?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),cP=Ct("$ZodCheckStringFormat",(t,e)=>{var r,n;tu.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),jct=Ct("$ZodCheckRegex",(t,e)=>{cP.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),zct=Ct("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Act),cP.init(t,e)}),Hct=Ct("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Tct),cP.init(t,e)}),qct=Ct("$ZodCheckIncludes",(t,e)=>{tu.init(t,e);const r=oP(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Yct=Ct("$ZodCheckStartsWith",(t,e)=>{tu.init(t,e);const r=new RegExp(`^${oP(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),Qct=Ct("$ZodCheckEndsWith",(t,e)=>{tu.init(t,e);const r=new RegExp(`.*${oP(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function kor(t,e,r){t.issues.length&&e.issues.push(...kct.prefixIssues(r,t.issues))}const Gor=null,Vor=null,Wct=Ct("$ZodCheckOverwrite",(t,e)=>{tu.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});class Kct{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const n=e.split(`
|
|
18904
18904
|
`).filter(a=>a),i=Math.min(...n.map(a=>a.length-a.trimStart().length)),s=n.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const e=Function,r=this?.args,i=[...(this?.content??[""]).map(s=>` ${s}`)];return new e(...r,i.join(`
|
|
18905
18905
|
`))}}const nce=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Qk,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ice=Ct("$ZodError",nce),ru=Ct("$ZodError",nce,{Parent:Error});function Zct(t,e=r=>r.message){const r={},n=[];for(const i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function Xct(t,e=r=>r.message){const r={_errors:[]},n=(i,s=[])=>{for(const a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>n({issues:o},[...s,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...s,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...s,...a.path]);else{const o=[...s,...a.path];if(o.length===0)r._errors.push(e(a));else{let u=r,c=0;for(;c<o.length;){const l=o[c];c===o.length-1?(u[l]=u[l]||{_errors:[]},u[l]._errors.push(e(a))):u[l]=u[l]||{_errors:[]},u=u[l],c++}}}};return n(t),r}function Bor(t,e=r=>r.message){const r={errors:[]},n=(i,s=[])=>{var a,o;for(const u of i.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>n({issues:c},[...s,...u.path]));else if(u.code==="invalid_key")n({issues:u.issues},[...s,...u.path]);else if(u.code==="invalid_element")n({issues:u.issues},[...s,...u.path]);else{const c=[...s,...u.path];if(c.length===0){r.errors.push(e(u));continue}let l=r,d=0;for(;d<c.length;){const f=c[d],_=d===c.length-1;typeof f=="string"?(l.properties??(l.properties={}),(a=l.properties)[f]??(a[f]={errors:[]}),l=l.properties[f]):(l.items??(l.items=[]),(o=l.items)[f]??(o[f]={errors:[]}),l=l.items[f]),_&&l.errors.push(e(u)),d++}}};return n(t),r}function Jct(t){const e=[],r=t.map(n=>typeof n=="object"?n.key:n);for(const n of r)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function jor(t){const e=[],r=[...t.issues].sort((n,i)=>(n.path??[]).length-(i.path??[]).length);for(const n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${Jct(n.path)}`);return e.join(`
|
|
18906
18906
|
`)}const lP=t=>(e,r,n,i)=>{const s=n?{...n,async:!1}:{async:!1},a=e._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new pm;if(a.issues.length){const o=new(i?.Err??t)(a.issues.map(u=>wl(u,s,Il())));throw tce(o,i?.callee),o}return a.value},zor=lP(ru),dP=t=>async(e,r,n,i)=>{const s=n?{...n,async:!0}:{async:!0};let a=e._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const o=new(i?.Err??t)(a.issues.map(u=>wl(u,s,Il())));throw tce(o,i?.callee),o}return a.value},Hor=dP(ru),fP=t=>(e,r,n)=>{const i=n?{...n,async:!1}:{async:!1},s=e._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new pm;return s.issues.length?{success:!1,error:new(t??ice)(s.issues.map(a=>wl(a,i,Il())))}:{success:!0,data:s.value}},elt=fP(ru),hP=t=>async(e,r,n)=>{const i=n?{...n,async:!0}:{async:!0};let s=e._zod.run({value:r,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(a=>wl(a,i,Il())))}:{success:!0,data:s.value}},tlt=hP(ru),sce=t=>(e,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return lP(t)(e,r,i)},qor=sce(ru),ace=t=>(e,r,n)=>lP(t)(e,r,n),Yor=ace(ru),oce=t=>async(e,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return dP(t)(e,r,i)},Qor=oce(ru),uce=t=>async(e,r,n)=>dP(t)(e,r,n),Wor=uce(ru),cce=t=>(e,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return fP(t)(e,r,i)},Kor=cce(ru),lce=t=>(e,r,n)=>fP(t)(e,r,n),Zor=lce(ru),dce=t=>async(e,r,n)=>{const i=n?{...n,direction:"backward"}:{direction:"backward"};return hP(t)(e,r,i)},Xor=dce(ru),fce=t=>async(e,r,n)=>hP(t)(e,r,n),Jor=fce(ru),rlt={major:4,minor:4,patch:0};var eur,Jk,tur,rur,nur,Nl;const hs=Ct("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=rlt;const n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(const i of n)for(const s of i._zod.onattach)s(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(a,o,u)=>{let c=mm(a),l;for(const d of o){if(d._zod.def.when){if(xct(a)||!d._zod.def.when(a))continue}else if(c)continue;const f=a.issues.length,_=d._zod.check(a);if(_ instanceof Promise&&u?.async===!1)throw new pm;if(l||_ instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await _,a.issues.length!==f&&(c||(c=mm(a,f)))});else{if(a.issues.length===f)continue;c||(c=mm(a,f))}}return l?l.then(()=>a):a},s=(a,o,u)=>{if(mm(a))return a.aborted=!0,a;const c=i(o,n,u);if(c instanceof Promise){if(u.async===!1)throw new pm;return c.then(l=>t._zod.parse(l,u))}return t._zod.parse(c,u)};t._zod.run=(a,o)=>{if(o.skipChecks)return t._zod.parse(a,o);if(o.direction==="backward"){const c=t._zod.parse({value:a.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(l=>s(l,a,o)):s(c,a,o)}const u=t._zod.parse(a,o);if(u instanceof Promise){if(o.async===!1)throw new pm;return u.then(c=>i(c,n,o))}return i(u,n,o)}}Wn(t,"~standard",()=>({validate:i=>{try{const s=elt(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return tlt(t,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),eG=Ct("$ZodString",(t,e)=>{hs.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Sct(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),Vi=Ct("$ZodStringFormat",(t,e)=>{cP.init(t,e),eG.init(t,e)}),nlt=Ct("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=sct),Vi.init(t,e)}),ilt=Ct("$ZodUUID",(t,e)=>{if(e.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Que(n))}else e.pattern??(e.pattern=Que());Vi.init(t,e)}),slt=Ct("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=act),Vi.init(t,e)}),alt=Ct("$ZodURL",(t,e)=>{Vi.init(t,e),t._zod.check=r=>{try{const n=r.value.trim();if(!e.normalize&&e.protocol?.source===pct.source&&!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:t,continue:!e.abort});return}const i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),olt=Ct("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=uct()),Vi.init(t,e)}),ult=Ct("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=nct),Vi.init(t,e)}),clt=Ct("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Xut),Vi.init(t,e)}),llt=Ct("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Jut),Vi.init(t,e)}),dlt=Ct("$ZodULID",(t,e)=>{e.pattern??(e.pattern=ect),Vi.init(t,e)}),flt=Ct("$ZodXID",(t,e)=>{e.pattern??(e.pattern=tct),Vi.init(t,e)}),hlt=Ct("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=rct),Vi.init(t,e)}),plt=Ct("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=vct(e)),Vi.init(t,e)}),_lt=Ct("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=mct),Vi.init(t,e)}),mlt=Ct("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=gct(e)),Vi.init(t,e)}),glt=Ct("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=ict),Vi.init(t,e)}),vlt=Ct("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=cct),Vi.init(t,e),t._zod.bag.format="ipv4"}),Slt=Ct("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=lct),Vi.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),iur=null,ylt=Ct("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=dct),Vi.init(t,e)}),Elt=Ct("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=fct),Vi.init(t,e),t._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[i,s]=n;if(!s)throw new Error;const a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function hce(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const Alt=Ct("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=hct),Vi.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{hce(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function Tlt(t){if(!Wue.test(t))return!1;const e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return hce(r)}const blt=Ct("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Wue),Vi.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{Tlt(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Clt=Ct("$ZodE164",(t,e)=>{e.pattern??(e.pattern=_ct),Vi.init(t,e)});function Rlt(t,e=null){try{const r=t.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const Olt=Ct("$ZodJWT",(t,e)=>{Vi.init(t,e),t._zod.check=r=>{Rlt(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),sur=null,aur=null,our=null,Plt=Ct("$ZodBoolean",(t,e)=>{hs.init(t,e),t._zod.pattern=Ect,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}const i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),uur=null,cur=null,lur=null,dur=null,fur=null,hur=null,Ilt=Ct("$ZodUnknown",(t,e)=>{hs.init(t,e),t._zod.parse=r=>r}),Mlt=Ct("$ZodNever",(t,e)=>{hs.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),pur=null,_ur=null;function pce(t,e,r){t.issues.length&&e.issues.push(...gm(r,t.issues)),e.value[r]=t.value}const wlt=Ct("$ZodArray",(t,e)=>{hs.init(t,e),t._zod.parse=(r,n)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);const s=[];for(let a=0;a<i.length;a++){const o=i[a],u=e.element._zod.run({value:o,issues:[]},n);u instanceof Promise?s.push(u.then(c=>pce(c,r,a))):pce(u,r,a)}return s.length?Promise.all(s).then(()=>r):r}});function pP(t,e,r,n,i,s){const a=r in n;if(t.issues.length){if(i&&s&&!a)return;e.issues.push(...gm(r,t.issues))}if(!a&&!i){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}t.value===void 0?a&&(e.value[r]=void 0):e.value[r]=t.value}function _ce(t){const e=Object.keys(t.shape);for(const n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=Pct(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function mce(t,e,r,n,i,s){const a=[],o=i.keySet,u=i.catchall._zod,c=u.def.type,l=u.optin==="optional",d=u.optout==="optional";for(const f in e){if(f==="__proto__"||o.has(f))continue;if(c==="never"){a.push(f);continue}const _=u.run({value:e[f],issues:[]},n);_ instanceof Promise?t.push(_.then(m=>pP(m,r,f,e,l,d))):pP(_,r,f,e,l,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:s}),t.length?Promise.all(t).then(()=>r):r}const Nlt=Ct("$ZodObject",(t,e)=>{if(hs.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){const o=e.shape;Object.defineProperty(e,"shape",{get:()=>{const u={...o};return Object.defineProperty(e,"shape",{value:u}),u}})}const n=Wk(()=>_ce(e));Wn(t._zod,"propValues",()=>{const o=e.shape,u={};for(const c in o){const l=o[c]._zod;if(l.values){u[c]??(u[c]=new Set);for(const d of l.values)u[c].add(d)}}return u});const i=aP,s=e.catchall;let a;t._zod.parse=(o,u)=>{a??(a=n.value);const c=o.value;if(!i(c))return o.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),o;o.value={};const l=[],d=a.shape;for(const f of a.keys){const _=d[f],m=_._zod.optin==="optional",E=_._zod.optout==="optional",S=_._zod.run({value:c[f],issues:[]},u);S instanceof Promise?l.push(S.then(C=>pP(C,o,f,c,m,E))):pP(S,o,f,c,m,E)}return s?mce(l,c,o,u,n.value,t):l.length?Promise.all(l).then(()=>o):o}}),Dlt=Ct("$ZodObjectJIT",(t,e)=>{Nlt.init(t,e);const r=t._zod.parse,n=Wk(()=>_ce(e)),i=f=>{const _=new Kct(["shape","payload","ctx"]),m=n.value,E=x=>{const V=ece(x);return`shape[${V}]._zod.run({ value: input[${V}], issues: [] }, ctx)`};_.write("const input = payload.value;");const S=Object.create(null);let C=0;for(const x of m.keys)S[x]=`key_${C++}`;_.write("const newResult = {};");for(const x of m.keys){const V=S[x],H=ece(x),W=f[x],re=W?._zod?.optin==="optional",K=W?._zod?.optout==="optional";_.write(`const ${V} = ${E(x)};`),re&&K?_.write(`
|