@icanbwell/composite 1.1251.1 → 1.1252.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/909.index.js CHANGED
@@ -13372,7 +13372,7 @@ Take a look at the reducer(s) handling this action type: `+me.type+`.
13372
13372
  }
13373
13373
  }
13374
13374
  }
13375
- `));function MZe(t){const e=Object.assign(Object.assign({},hc),t);return Apollo.useMutation(Y_e,e)}const DW={value:{system:"http://hl7.org/fhir/uv/smart-health-cards-and-links/StructureDefinition/ShlPayload",code:"smart-health-link"}};function DZe(t={}){return useDocumentReferencesQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:DW})}))}function NZe(t={}){return useDocumentReferencesLazyQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:DW})}))}const NW={value:{system:"https://www.icanbwell.com/fhir/CodeSystem/shl-event-type",code:"access"}};function wZe(t={}){return useCommunicationRequestsQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:NW})}))}function LZe(t={}){return useCommunicationRequestsLazyQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:NW})}))}const wW={value:{system:"https://www.icanbwell.com/consent-category",code:"smartHealthLink"}};function UZe(t={}){return useConsentsForHealthLinksQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:wW})}))}function $Ze(t={}){return useConsentsForHealthLinksLazyQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:wW})}))}const xZe=t=>useMutation(SendChatCompletionMutation,t),FZe=t=>useMutation(UploadDocumentMutation,t);var LW=g(46),Bv,sb;class UW{constructor(){this.type="backend",Bv.set(this,void 0),sb.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".');od(this,Bv,r,"f"),od(this,sb,ww(n),"f")}read(e,r,n){return YA(this,void 0,void 0,function*(){try{const{translation:i}=yield ui(this,sb,"f").getClientTranslations({name:ui(this,Bv,"f"),key:r,lang:e});n(null,i?.json||{})}catch{const s=`Error fetching translation with key "${r}" and client "${ui(this,Bv,"f")||"N/A"}".`;n(s,null)}})}}Bv=new WeakMap,sb=new WeakMap,UW.type="backend";var o_;class $W{constructor(e){this.type="logger",o_.set(this,void 0),od(this,o_,e,"f")}log([e,r,...n]){ui(this,o_,"f").info({meta:r},e,...n)}warn([e,r,...n]){ui(this,o_,"f").error({meta:r},e,...n)}error([e,r,...n]){ui(this,o_,"f").error({meta:r},e,...n)}}o_=new WeakMap,$W.type="logger";var ab,ob,Xf,jv,fa,Zf;const xW="appLanguage";class vo{constructor({keys:e,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:s,parent:a,debug:o=!1,remoteConfig:c={}}){Xf.set(this,void 0),jv.set(this,void 0),fa.set(this,void 0),Zf.set(this,void 0),od(this,Xf,e,"f"),od(this,jv,n,"f"),od(this,Zf,r,"f");const l={lng:i,fallbackNS:ui(this,jv,"f"),debug:o,defaultNS:e,returnNull:!1};a?od(this,fa,a.cloneInstance(l),"f"):(od(this,fa,Ua.createInstance(),"f"),s&&ui(this,fa,"f").use(new $W(s.child({library:"@icanbwell/i18n"}))),c.apiClient&&ui(this,fa,"f").use(UW),ui(this,fa,"f").init(Object.assign(Object.assign({},l),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:c,saveMissing:!0,missingKeyHandler:(d,m,C)=>ui(this,fa,"f").services.logger.error(`missing key: ${C}; language: ${d}; key: ${m}`)}))),this.t=ui(this,fa,"f").t,vo.resolvedLanguage=ui(this,fa,"f").resolvedLanguage||i}load(){var e;return YA(this,void 0,void 0,function*(){const r=(yield(e=ui(this,Zf,"f"))===null||e===void 0?void 0:e.storage.getItem(xW))||vo.resolvedLanguage;r!==vo.resolvedLanguage&&(yield ui(this,fa,"f").changeLanguage(r),vo.resolvedLanguage=r),yield ui(this,fa,"f").loadNamespaces(ui(this,Xf,"f"));const n=ui(this,Xf,"f").filter(i=>!ui(this,fa,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return ui(vo,ab,"f",ob).emit("changeLanguage",r),this})}child(e){return new vo(Object.assign(Object.assign({},e),{nativeBridge:ui(this,Zf,"f"),fallbackKeys:[...ui(this,jv,"f"),...ui(this,Xf,"f")],parent:ui(this,fa,"f"),defaultLanguage:ui(this,fa,"f").language}))}get isLoaded(){return ui(this,Xf,"f").every(e=>ui(this,fa,"f").hasResourceBundle(ui(this,fa,"f").language,e))}changeLanguage(e){var r,n;return YA(this,void 0,void 0,function*(){vo.resolvedLanguage=e,yield ui(this,fa,"f").changeLanguage(e),ui(vo,ab,"f",ob).emit("changeLanguage",e),yield(r=ui(this,Zf,"f"))===null||r===void 0?void 0:r.storage.setItem(xW,e),(n=ui(this,Zf,"f"))===null||n===void 0||n.reloadView(!0)})}get resolvedLanguage(){return vo.resolvedLanguage}onChangeLanguage(e){ui(vo,ab,"f",ob).on("changeLanguage",e)}}ab=vo,Xf=new WeakMap,jv=new WeakMap,fa=new WeakMap,Zf=new WeakMap,ob={value:new LW},vo.resolvedLanguage="en";var Fw=g(331),qv;(function(t){t.one="1.0.0"})(qv||(qv={}));const ub="orchestrator:native-bridge",W_e={id:ub,dependencies:{featureServices:{}},create:()=>({[qv.one]:()=>({featureService:Fw.b})})};var Qv;(function(t){t.one="1.0.0"})(Qv||(Qv={}));const cb="orchestrator:translation-service",K_e={id:cb,dependencies:{featureServices:{[Wa]:lo.one,[oc]:td.one,[Ki]:Ya.one,[Cv]:Kp.one,[ub]:qv.one}},create:({featureServices:t})=>{const e=t[Wa],r=t[oc],n=t[Cv],{slug:i}=t[Ki].getClientContext(),s=t[ub],a=new vo({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})),{[Qv.one]:()=>({featureService:a})}}};var u_,c_,lb,$o,Hv,db;const fb="tokens",Gw="delegationContext",kw="userSessionId";class X_e{constructor({apiClient:e,stateService:r,identityGatewaySdk:n,storage:i,logger:s}){u_.set(this,void 0),c_.set(this,void 0),lb.set(this,void 0),$o.set(this,void 0),Hv.set(this,void 0),db.set(this,[]),(0,T.__classPrivateFieldSet)(this,u_,e,"f"),(0,T.__classPrivateFieldSet)(this,c_,r,"f"),(0,T.__classPrivateFieldSet)(this,lb,n,"f"),(0,T.__classPrivateFieldSet)(this,$o,i,"f"),(0,T.__classPrivateFieldSet)(this,Hv,s,"f")}registerPreLogoutHandler(e){(0,T.__classPrivateFieldGet)(this,db,"f").push(e)}getStoredTokens(){const e=(0,T.__classPrivateFieldGet)(this,$o,"f").getItem(fb);return e?JSON.parse(e):void 0}removeStoredTokens(){(0,T.__classPrivateFieldGet)(this,$o,"f").removeItem(fb),this.clearSessionId(),this.clearDelegationContext()}clearSessionId(){(0,T.__classPrivateFieldGet)(this,$o,"f").removeItem(kw)}ensureSessionId(){var e;try{if((0,T.__classPrivateFieldGet)(this,$o,"f").getItem(kw))return;(0,T.__classPrivateFieldGet)(this,$o,"f").setItem(kw,JSON.stringify({sessionId:crypto.randomUUID()}))}catch(r){(e=(0,T.__classPrivateFieldGet)(this,Hv,"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,es.normalizeTokenPayload)(e.idToken.payload)})});return(0,T.__classPrivateFieldGet)(this,$o,"f").setItem(fb,JSON.stringify(r)),r}storeDelegationContext(e){(0,T.__classPrivateFieldGet)(this,$o,"f").setItem(Gw,JSON.stringify(e))}getDelegationContext(){var e,r;const n=(0,T.__classPrivateFieldGet)(this,$o,"f").getItem(Gw);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,T.__classPrivateFieldGet)(this,$o,"f").removeItem(Gw)}logout(){var e;return(0,T.__awaiter)(this,void 0,void 0,function*(){for(const s of(0,T.__classPrivateFieldGet)(this,db,"f"))try{yield s()}catch(a){(e=(0,T.__classPrivateFieldGet)(this,Hv,"f"))===null||e===void 0||e.error(a instanceof Error?a:new Error(String(a)),"Pre-logout handler failed")}const r=(0,T.__classPrivateFieldGet)(this,c_,"f").getUserTokenData().accessToken.jwtToken,{key:n,variant:i}=(0,T.__classPrivateFieldGet)(this,c_,"f").getClientContext();i!==z.GUEST&&(yield(0,T.__classPrivateFieldGet)(this,lb,"f").logout({accessToken:r},{context:{headers:{clientKey:n}}})),(0,T.__classPrivateFieldGet)(this,u_,"f").stop(),(0,T.__classPrivateFieldGet)(this,u_,"f").clearAuth(),yield(0,T.__classPrivateFieldGet)(this,u_,"f").clearStore(),(0,T.__classPrivateFieldGet)(this,c_,"f").logoutUser(),(0,T.__classPrivateFieldGet)(this,$o,"f").removeItem(fb),this.clearSessionId(),this.clearDelegationContext()})}}u_=new WeakMap,c_=new WeakMap,lb=new WeakMap,$o=new WeakMap,Hv=new WeakMap,db=new WeakMap;var zv;(function(t){t.one="1.0.0"})(zv||(zv={}));const hb="orchestrator:identity-utils",Z_e={id:hb,dependencies:{featureServices:{[Wa]:lo.one,[oc]:td.one,[Ki]:Ya.one,[Cv]:Kp.one}},create:({featureServices:t})=>{const e=t[Wa];return{[zv.one]:()=>({featureService:new X_e({apiClient:e,stateService:t[Ki],identityGatewaySdk:nH(e),storage:window.sessionStorage,logger:t[oc]})})}}};var pb;(function(t){t.one="1.0.0"})(pb||(pb={}));const FW="orchestrator:globaleventemitter-service",J_e=t=>({id:FW,create:()=>({[pb.one]:()=>({featureService:t})})});var _b;(function(t){t.one="1.0.0"})(_b||(_b={}));const GW="orchestrator:reboot-controller",eme=t=>({id:GW,create:()=>({[_b.one]:()=>({featureService:t})})}),mb="orchestrator:bwell-sdk";var Yv;(function(t){t.one="1.0.0"})(Yv||(Yv={}));const tme=t=>({id:mb,dependencies:{featureServices:{[Ki]:Ya.one,[cb]:Qv.one,[oc]:td.one}},create:({featureServices:e})=>{const r=e[Ki],n=e[cb],i=e[oc],s=t;let a=!1,o=!1;const c=k=>{if(typeof k=="string")return k;if(k&&typeof k=="object"&&"message"in k){const V=k.message;return typeof V=="string"?V:String(V)}return String(k)},l=k=>/uninitialized|not been initialized/i.test(c(k)),d=k=>{try{s.language.setLanguage(k)}catch(V){if(l(V)){o||(o=!0,i.info({},"embeddable-core: Deferring language switch until SDK initialization completes"));return}i.info({error:c(V)},"embeddable-core: Non-fatal language switch issue in SDK")}},m=k=>{try{const V=s.language.getLanguage();k!==V&&d(k)}catch(V){if(l(V))return;i.info({error:c(V)},"embeddable-core: Non-fatal language read issue in SDK")}},C=()=>{var k;!(!((k=r.getUser().tokenData)===null||k===void 0)&&k.idToken)||(d(n.resolvedLanguage),a||(a=!0,n.onChangeLanguage(m)))};return r.getStore().subscribe(C),{[Yv.one]:()=>({featureService:s})}}});class Ca extends Error{constructor(e,r){super(e),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(e){return e instanceof Ca}}class GZe extends Ca{constructor(e="Authentication Error"){super(e),this.name="AuthenticationError"}}class kZe extends Ca{constructor(e="Illegal Argument Error"){super(e),this.name="IllegalArgumentError"}}class VZe extends Ca{constructor(e="Illegal State Error"){super(e),this.name="IllegalStateError"}}class rme extends Ca{constructor(e="Invalid Client Key Error"){super(e),this.name="InvalidClientKeyError"}}class Vw extends Ca{constructor(e,r){super(e),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class l_ extends Ca{constructor(e="Invalid Token Error"){super(e),this.name="InvalidTokenError"}}class nme extends Ca{constructor(e,r){super(e),this.status=r,this.name="NetworkError"}}class ime extends Ca{constructor(e){super(e.message()),this.operationOutcome=e,this.name="OperationOutcomeError"}}class Bw extends Ca{constructor(e,r){super(e),this.data=r,this.name="UnknownError"}}class sme extends Ca{constructor(e){super(e.join(". ")),this.errors=e,this.name="ValidationError"}}class ir{constructor(e,r){this.data=e,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(e){return new ir(void 0,e)}}var kW=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},gb=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)},Wv,Kv;class fr{static success(e){return new ame(e)}static failure(e){return new vb(e)}}class ame extends fr{constructor(e){super(),Wv.set(this,void 0),kW(this,Wv,e,"f")}data(){return gb(this,Wv,"f")}error(){throw gb(this,Wv,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new ir(this.data())}}Wv=new WeakMap;class vb extends fr{constructor(e){super(),Kv.set(this,void 0),kW(this,Kv,e,"f")}data(){throw gb(this,Kv,"f")}error(){return gb(this,Kv,"f")}success(){return!1}failure(){return!0}intoFailure(){return fr.failure(this.error())}toQueryResult(){return new ir(void 0,this.error())}}Kv=new WeakMap;var jw=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)},Xv;class VW{constructor(){Xv.set(this,[])}add(e){jw(this,Xv,"f").push(e)}errors(){return jw(this,Xv,"f")}hasErrors(){return jw(this,Xv,"f").length>0}}Xv=new WeakMap;var BW=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},qw=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)},Zv,Sb;class ome{constructor(e){Zv.set(this,void 0),Sb.set(this,void 0),BW(this,Sb,e,"f"),BW(this,Zv,this.transformInput(e),"f")}validate(){return fr.success(null)}data(){return qw(this,Zv,"f")}toJSON(){return qw(this,Zv,"f")}transformInput(e){return e}input(){return qw(this,Sb,"f")}}Zv=new WeakMap,Sb=new WeakMap;class Qn extends ome{validate(){const e=new VW;return this.validator.validate(this.input(),e),e.hasErrors()?fr.failure(new sme(e.errors())):fr.success(null)}}var jW=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)},yb,qW,QW;const HW=100,Qw=20;class na{constructor(){yb.add(this)}validate(e,r){jW(this,yb,"m",qW).call(this,e.page,r),jW(this,yb,"m",QW).call(this,e.pageSize,r)}}yb=new WeakSet,qW=function(e,r){e<0&&r.add("page must be a positive number")},QW=function(e,r){e!==void 0&&(e<=0&&r.add("Page size must be greater than 0"),e>HW&&r.add(`Page size must not exceed ${HW}`))};class ia extends Qn{constructor(){super(...arguments),this.validator=new na}transformInput(e){return Object.assign({pageSize:Qw},e)}}function Hw(){return new Date().toISOString()}function ume(){var t;return!(typeof process>"u"||((t=process.versions)===null||t===void 0?void 0:t.node)===void 0)}function cme(){return typeof window<"u"}function zW(){if(cme())return"browser";if(ume())return"node";throw new Error("Invalid runtime")}function YW(t){switch(zW()){case"browser":return t.browser();case"node":return t.node()}}function WW(t){switch(zW()){case"node":return Buffer.from(t,"base64").toString("utf-8");case"browser":return atob(t)}}function gn(t){return t!=null}function ha(t){return t==null}function BZe(t){return gn(t)&&t!==""}function sa(t){return t==null||t===""}function pa(t){return t===void 0}function Xn(t){return t!==void 0}function lme(t){return JSON.parse(WW(t)).env}const dme=3;function KW(t){const e=t.split("."),r=e[1];if(r===void 0||e.length!==dme)throw new l_("Token is missing data and may be corrupted");try{return JSON.parse(WW(r))}catch(n){const i=n;throw new l_(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function XW(t){const r=KW(t).exp;if(typeof r!="number")throw new l_("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const fme="custom:clientFhirPersonId",hme="custom:bwellFhirPatientId";function pme(t){const e=KW(t),r=e[hme],n=e[fme];return gn(r)&&gn(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}const _me=[{name:"Edge",tokens:["Edg"]},{name:"Chrome",tokens:["CriOS","Chrome"]},{name:"Firefox",tokens:["FxiOS","Firefox"]},{name:"Safari",tokens:["Safari"]}];function mme(t){for(const e of _me)if(e.tokens.some(r=>t.includes(r)))return e.name;return"Unknown"}function gme(){return YW({node:()=>`Node/${process.versions.node}`,browser:()=>`Browser/${mme(navigator.userAgent)}`})}function Bs(t){return t.trim()===""}const ZW="1.108.0";function vme(){return ZW}var zw;(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"})(zw||(zw={}));var JW;(function(t){t.Guest="GUEST",t.Other="OTHER",t.Self="SELF"})(JW||(JW={}));var e2;(function(t){t.Guest="GUEST"})(e2||(e2={}));var Eb;(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"})(Eb||(Eb={}));var t2;(function(t){t.Complete="COMPLETE",t.Error="ERROR",t.Partial="PARTIAL",t.Queued="QUEUED"})(t2||(t2={}));var r2;(function(t){t.Institutional="INSTITUTIONAL",t.Oral="ORAL",t.Pharmacy="PHARMACY",t.Professional="PROFESSIONAL",t.Vision="VISION"})(r2||(r2={}));var n2;(function(t){t.Bwell="bwell"})(n2||(n2={}));var i2;(function(t){t.Bwell="BWELL"})(i2||(i2={}));var s2;(function(t){t.Basic="BASIC",t.Identity="IDENTITY",t.Oauth="OAUTH"})(s2||(s2={}));var Yw;(function(t){t.Deny="DENY",t.Permit="PERMIT"})(Yw||(Yw={}));var Ww;(function(t){t.Active="ACTIVE",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Inactive="INACTIVE",t.Proposed="PROPOSED",t.Rejected="REJECTED"})(Ww||(Ww={}));var a2;(function(t){t.Medical="MEDICAL",t.Pharmacy="PHARMACY"})(a2||(a2={}));var o2;(function(t){t.Usd="USD"})(o2||(o2={}));var u2;(function(t){t.Accepted="ACCEPTED",t.Rejected="REJECTED"})(u2||(u2={}));var c2;(function(t){t.AccessEnded="ACCESS_ENDED",t.Connected="CONNECTED",t.Deleted="DELETED",t.Disconnected="DISCONNECTED",t.Error="ERROR",t.Expired="EXPIRED"})(c2||(c2={}));var l2;(function(t){t.Clinical="CLINICAL",t.Device="DEVICE",t.Insurance="INSURANCE",t.Lab="LAB",t.Pharmacy="PHARMACY",t.Practitioner="PRACTITIONER"})(l2||(l2={}));var Tb;(function(t){t.Connecthub="connecthub",t.Nppes="nppes"})(Tb||(Tb={}));var d2;(function(t){t.Connecthub="CONNECTHUB",t.Nppes="NPPES"})(d2||(d2={}));var f2;(function(t){t.Fri="FRI",t.Mon="MON",t.Sat="SAT",t.Sun="SUN",t.Thu="THU",t.Tue="TUE",t.Wed="WED"})(f2||(f2={}));var h2;(function(t){t.Deleted="DELETED"})(h2||(h2={}));var p2;(function(t){t.Kilometers="KILOMETERS",t.Meters="METERS",t.Miles="MILES"})(p2||(p2={}));var _2;(function(t){t.BwellPatient="BWELL_PATIENT",t.BwellPerson="BWELL_PERSON",t.ClientPatient="CLIENT_PATIENT",t.ClientPerson="CLIENT_PERSON"})(_2||(_2={}));var m2;(function(t){t.Active="active",t.EnteredInError="entered_in_error",t.Error="error",t.Off="off",t.Suspended="suspended",t.Test="test"})(m2||(m2={}));var g2;(function(t){t.Active="ACTIVE",t.EnteredInError="ENTERED_IN_ERROR",t.Error="ERROR",t.Off="OFF",t.Suspended="SUSPENDED",t.Test="TEST"})(g2||(g2={}));var Kw;(function(t){t.CustomEvent="CUSTOM_EVENT",t.MobilePushOpen="MOBILE_PUSH_OPEN"})(Kw||(Kw={}));var Xw;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(Xw||(Xw={}));var Zw;(function(t){t.Person="Person"})(Zw||(Zw={}));var Jw;(function(t){t.Characteristic="characteristic",t.Communication="communication",t.Gender="gender",t.Specialty="specialty"})(Jw||(Jw={}));var v2;(function(t){t.Characteristic="CHARACTERISTIC",t.Communication="COMMUNICATION",t.Gender="GENDER",t.InsurancePlan="INSURANCE_PLAN",t.Specialty="SPECIALTY"})(v2||(v2={}));var S2;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(S2||(S2={}));var y2;(function(t){t.Female="FEMALE",t.Male="MALE",t.Other="OTHER",t.Unknown="UNKNOWN"})(y2||(y2={}));var E2;(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"})(E2||(E2={}));var T2;(function(t){t.Official="_official",t.Old="_old",t.Secondary="_secondary",t.Temp="_temp",t.Usual="_usual"})(T2||(T2={}));var A2;(function(t){t.Cognito="COGNITO",t.Descope="DESCOPE"})(A2||(A2={}));var b2;(function(t){t.Direct="DIRECT",t.DirectIas="DIRECT_IAS",t.Ial2="IAL2",t.IndirectIas="INDIRECT_IAS",t.Proa="PROA"})(b2||(b2={}));var C2;(function(t){t.Clicked="clicked"})(C2||(C2={}));var R2;(function(t){t.Clicked="CLICKED"})(R2||(R2={}));var eL;(function(t){t.Debug="DEBUG",t.Error="ERROR",t.Info="INFO",t.Verbose="VERBOSE",t.Warn="WARN"})(eL||(eL={}));var O2;(function(t){t.Sms="SMS"})(O2||(O2={}));var tL;(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"})(tL||(tL={}));var P2;(function(t){t.CancelDelete="CANCEL_DELETE",t.ConfirmDelete="CONFIRM_DELETE",t.DeletionInProgress="DELETION_IN_PROGRESS",t.ImmediateExecution="IMMEDIATE_EXECUTION",t.RequestDelete="REQUEST_DELETE"})(P2||(P2={}));var rL;(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"})(rL||(rL={}));var I2;(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"})(I2||(I2={}));var M2;(function(t){t.Add="add",t.Copy="copy",t.Move="move",t.Remove="remove",t.Replace="replace",t.Test="test"})(M2||(M2={}));var D2;(function(t){t.ExistingPatients="EXISTING_PATIENTS",t.NewPatients="NEW_PATIENTS"})(D2||(D2={}));var N2;(function(t){t.Patient="Patient",t.Person="Person"})(N2||(N2={}));var w2;(function(t){t.Practice="practice",t.Practitioner="practitioner"})(w2||(w2={}));var L2;(function(t){t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(L2||(L2={}));var U2;(function(t){t.QuestionnaireResponse="QuestionnaireResponse"})(U2||(U2={}));var $2;(function(t){t.Closed="CLOSED",t.Hold="HOLD",t.New="NEW",t.Open="OPEN",t.Pending="PENDING",t.Solved="SOLVED"})($2||($2={}));var x2;(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"})(x2||(x2={}));var F2;(function(t){t.DataConnections="DATA_CONNECTIONS",t.FindCare="FIND_CARE"})(F2||(F2={}));var G2;(function(t){t.Device="DEVICE",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Pharmacy="PHARMACY",t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(G2||(G2={}));var k2;(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"})(k2||(k2={}));var V2;(function(t){t.UpdatedAt="UPDATED_AT"})(V2||(V2={}));var nL;(function(t){t.Content="content",t.Distance="distance",t.Relevance="relevance"})(nL||(nL={}));var B2;(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"})(B2||(B2={}));var Ab;(function(t){t.Asc="asc",t.Desc="desc"})(Ab||(Ab={}));var j2;(function(t){t.Asc="ASC",t.Desc="DESC"})(j2||(j2={}));var q2;(function(t){t.CareSearch="CARE_SEARCH",t.Proa="PROA",t.ProviderDetails="PROVIDER_DETAILS",t.Sayt="SAYT",t.Unspecified="UNSPECIFIED"})(q2||(q2={}));var Q2;(function(t){t.DataDeleted="DATA_DELETED",t.Deleting="DELETING",t.Error="ERROR",t.Pending="PENDING",t.Retrieved="RETRIEVED",t.Retrieving="RETRIEVING"})(Q2||(Q2={}));var iL;(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"})(iL||(iL={}));var bb;(function(t){t.Accurate="accurate",t.Estimate="estimate"})(bb||(bb={}));var H2;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(H2||(H2={}));var z2;(function(t){t.PersonMatchError="PERSON_MATCH_ERROR",t.ServerError="SERVER_ERROR"})(z2||(z2={}));const Sme=new Set(Object.values(Xw));function Y2(t){return Sme.has(t)}const yme=new Set(Object.values(Ww));function Eme(t){return yme.has(t)}const Tme=new Set(Object.values(Eb));function W2(t){return Tme.has(t)}const Ame=new Set(Object.values(Yw));function bme(t){return Ame.has(t)}class Cme{validate(e,r){!pa(e.gender)&&!Y2(e.gender)&&r.add(`Invalid gender value: "${e.gender}"`),!pa(e.middleNames)&&e.middleNames.length>0&&pa(e.firstName)&&r.add("middleNames requires firstName to be provided")}}class jZe extends Qn{constructor(){super(...arguments),this.validator=new Cme}}class Rme{validate(e,r){W2(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!pa(e.organizationId)&&Bs(e.organizationId)&&r.add("organizationId cannot be empty")}}class qZe extends Qn{constructor(){super(...arguments),this.validator=new Rme}}class Ome{validate(e,r){Eme(e.status)||r.add(`Invalid consent status: "${e.status}"`),bme(e.provision)||r.add(`Invalid consent provision type: "${e.provision}"`),W2(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!pa(e.organizationId)&&Bs(e.organizationId)&&r.add("organizationId cannot be empty"),e.category===Eb.ProaAttestation&&pa(e.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class QZe extends Qn{constructor(){super(...arguments),this.validator=new Ome}}class Pme{validate(e,r){sa(e.exportId)&&r.add("exportId is required"),sa(e.password)&&r.add("password is required")}}class HZe extends Qn{constructor(){super(...arguments),this.validator=new Pme}}class zZe extends null{}var xo=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)},to,cd,K2,X2,Z2,J2,e3,t3;class Jf{constructor(){to.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)xo(this,to,"m",K2).call(this,n,r)}}to=new WeakSet,cd=function(e,r){e&&e!==null&&isNaN(e.getTime())&&r.add("The date is not valid")},K2=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:c,approximately:l}=e,m=[n,i,s,a,o,c,l].filter(C=>C!=null).length;if(m===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}xo(this,to,"m",X2).call(this,e,m,r),xo(this,to,"m",e3).call(this,e,r),xo(this,to,"m",t3).call(this,e,r)},X2=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}xo(this,to,"m",Z2).call(this,e,n),xo(this,to,"m",J2).call(this,e,n)},Z2=function(e,r){e.greaterThan&&e.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},J2=function(e,r){e.lessThan&&e.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},e3=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:c,approximately:l}=e;n&&xo(this,to,"m",cd).call(this,n,r),i&&xo(this,to,"m",cd).call(this,i,r),s&&xo(this,to,"m",cd).call(this,s,r),a&&xo(this,to,"m",cd).call(this,a,r),o&&xo(this,to,"m",cd).call(this,o,r),c&&xo(this,to,"m",cd).call(this,c,r),l&&xo(this,to,"m",cd).call(this,l,r)},t3=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 sL=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)},Jv;class eh{constructor(){Jv.set(this,new Ime)}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&&sL(this,Jv,"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:[])sL(this,Jv,"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)sL(this,Jv,"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)")}}}Jv=new WeakMap;class Ime{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 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)},aL,oL,uL,cL,lL,dL;class r3 extends na{constructor(){super(...arguments),aL.set(this,new eh),oL.set(this,new Jf)}validate(e,r){super.validate(e,r),e.groupCode&&d_(this,aL,"f").validate(e.groupCode,r),e.lastUpdated&&d_(this,oL,"f").validate(e.lastUpdated,r)}}aL=new WeakMap,oL=new WeakMap;class Mme{validate(e,r){e.length===0&&r.add("Prescription array must not be empty.")}}class n3 extends na{constructor(){super(...arguments),uL.set(this,new Mme),cL.set(this,new Jf)}validate(e,r){super.validate(e,r),e.lastUpdated!==void 0&&d_(this,cL,"f").validate(e.lastUpdated,r),e.prescription!==void 0&&d_(this,uL,"f").validate(e.prescription,r)}}uL=new WeakMap,cL=new WeakMap;class Dme extends na{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 Nme extends ia{constructor(){super(...arguments),this.validator=new r3}}class YZe extends null{}class WZe extends null{}class KZe extends null{}class XZe extends null{}class ZZe extends null{}class JZe extends null{}class eJe extends null{}class tJe extends null{}class rJe extends null{}class nJe extends null{}class iJe extends null{}class sJe extends null{}class aJe extends null{}class oJe extends null{}class uJe extends null{}class cJe extends null{}class lJe extends null{}class dJe extends null{}class fJe extends null{}class hJe extends null{}class wme extends n3{constructor(){super(...arguments),lL.set(this,new eh)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&d_(this,lL,"f").validate(e.medicationCode,r)}}lL=new WeakMap;class pJe extends ia{constructor(){super(...arguments),this.validator=new n3}}class _Je extends ia{constructor(){super(...arguments),this.validator=new wme}}class Lme extends r3{constructor(){super(...arguments),dL.set(this,new eh)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&d_(this,dL,"f").validate(e.medicationCode,r)}}dL=new WeakMap;class mJe extends Nme{constructor(){super(...arguments),this.validator=new Lme}}class gJe extends null{}class vJe extends null{}class SJe extends ia{constructor(){super(...arguments),this.validator=new Dme}}class Ume{validate(e,r){Bs(e.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class yJe extends Qn{constructor(){super(...arguments),this.validator=new Ume}}class $me{validate(e,r){Bs(e.bodySystemId)&&r.add("The body system score request must contain a body system id.")}}class EJe extends Qn{constructor(){super(...arguments),this.validator=new $me}}class xme extends na{validate(e,r){Bs(e.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(e,r)}}class TJe extends ia{constructor(){super(...arguments),this.validator=new xme}}class Fme extends na{validate(e,r){Bs(e.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(e,r)}}class AJe extends ia{constructor(){super(...arguments),this.validator=new Fme}}var i3;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(i3||(i3={}));class Gme{validate(e,r){ha(e)&&r.add("input must be provided."),sa(e.id)&&r.add("id must be a non-empty string."),ha(e.status)&&r.add("status is required.")}}class bJe extends Qn{constructor(){super(...arguments),this.validator=new Gme}}const kme=new Set(Object.values(iL));function s3(t){return kme.has(t)}var Vme=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)},fL,a3;class Bme extends na{constructor(){super(...arguments),fL.add(this)}validate(e,r){if(super.validate(e,r),!pa(e.status)){const n=Array.isArray(e.status)?e.status:[e.status];for(const i of n)Vme(this,fL,"m",a3).call(this,i,r)}}}fL=new WeakSet,a3=function(e,r){s3(e)||r.add(`Invalid task status: "${e}"`)};class CJe extends ia{constructor(){super(...arguments),this.validator=new Bme}}class jme{validate(e,r){s3(e.newStatus)||r.add(`Invalid task status: "${e.newStatus}"`)}}class RJe extends Qn{constructor(){super(...arguments),this.validator=new jme}}var Cb=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_,o3,u3,c3,l3;class OJe extends ia{constructor(){super(...arguments),this.validator=new qme}}class qme extends na{constructor(){super(...arguments),f_.add(this)}validate(e,r){super.validate(e,r),Xn(e.organizationTypeFilters)&&Cb(this,f_,"m",o3).call(this,e.organizationTypeFilters,r),Xn(e.sortBy)&&Cb(this,f_,"m",u3).call(this,e.sortBy,r),Xn(e.filterFields)&&Cb(this,f_,"m",c3).call(this,e.filterFields,r),Xn(e.gender)&&Cb(this,f_,"m",l3).call(this,e.gender,r)}}f_=new WeakSet,o3=function(e,r){for(const n of e)Hme(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},u3=function(e,r){Xn(e.field)&&!Yme(e.field)&&r.add(`Invalid sortBy.field value: "${e.field}"`),Xn(e.order)&&!Kme(e.order)&&r.add(`Invalid sortBy.order value: "${e.order}"`)},c3=function(e,r){for(const n of e)Zme(n)||r.add(`Invalid filterField value: "${n}"`)},l3=function(e,r){Y2(e)||r.add(`Invalid gender value: "${e}"`)};const Qme=new Set(Object.values(rL));function Hme(t){return Qme.has(t)}const zme=new Set(Object.values(nL));function Yme(t){return zme.has(t)}const Wme=new Set(Object.values(Ab));function Kme(t){return Wme.has(t)}const Xme=new Set(Object.values(Jw));function Zme(t){return Xme.has(t)}class PJe extends null{}class IJe extends ia{constructor(){super(...arguments),this.validator=new Jme}}class Jme extends na{validate(e,r){super.validate(e,r)}}const ege="data-connection-status";var tge=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)},hL;const rge="connectionId cannot be null or empty",nge="username cannot be null or empty",ige="password cannot be null or empty",sge="integrationType array cannot be empty",age="integrationType array cannot contain blank or empty strings",oge="status array cannot be empty",uge="status array cannot contain blank or empty strings";class d3{validate(e,r){e.connectionId===""&&r.add(rge)}}class cge{constructor(){hL.set(this,new d3)}validate(e,r){tge(this,hL,"f").validate(e,r),e.integrationType!=="DIRECT"&&(sa(e.username)&&r.add(nge),sa(e.password)&&r.add(ige))}}hL=new WeakMap;class lge extends Qn{constructor(){super(...arguments),this.validator=new d3}}class MJe extends null{}class DJe extends null{}class NJe extends lge{constructor(){super(...arguments),this.validator=new cge}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 wJe extends Qn{constructor(){super(...arguments),this.validator={validate:(e,r)=>{e.integrationType!==void 0&&e.integrationType!==null&&(e.integrationType.length===0&&r.add(sge),e.integrationType.some(n=>n===""||n.trim()==="")&&r.add(age)),e.status!==void 0&&e.status!==null&&(e.status.length===0&&r.add(oge),e.status.some(n=>n===""||n.trim()==="")&&r.add(uge))}}}data(){return this.input()}}const dge="deviceToken is required",fge="platformName must be a valid DevicePlatform value",hge="applicationName is required",pge="connectionId is required";var pL;(function(t){t.IOS="IOS",t.ANDROID="ANDROID"})(pL||(pL={}));const _ge=new Set(Object.values(pL));function mge(t){return _ge.has(t)}function gge(t){return!mge(t)}class f3{validate(e,r){Bs(e.deviceToken)&&r.add(dge)}}class vge extends f3{validate(e,r){super.validate(e,r),gge(e.platformName.toUpperCase())&&r.add(fge),Bs(e.applicationName)&&r.add(hge)}}class LJe extends Qn{constructor(){super(...arguments),this.validator=new vge}}class UJe extends Qn{constructor(){super(...arguments),this.validator=new f3}}class _L{validate(e,r){Bs(e.connectionId)&&r.add(pge)}}class $Je extends Qn{constructor(){super(...arguments),this.validator=new _L}}class xJe extends Qn{constructor(){super(...arguments),this.validator=new _L}}class FJe extends Qn{constructor(){super(...arguments),this.validator=new _L}}const Sge="string parameter serializedNotification must be provided",yge="serialized notification must have a non-empty notification_id field of type string",h3="serialized notification must have an itbl object containing a non-empty messageId field of type string",Ege="parsed notification must be a non-null object.",Tge="serialized notification is not valid JSON.";class Age{validate(e,r){if(pa(e.serializedNotification)||typeof e.serializedNotification!="string"||Bs(e.serializedNotification)){r.add(Sge);return}let n=null;try{n=JSON.parse(e.serializedNotification)}catch{r.add(Tge);return}if(typeof n!="object"||n===null){r.add(Ege);return}const{itbl:i,notification_id:s}=n;if((pa(s)||typeof s!="string"||Bs(s))&&r.add(yge),typeof i!="object"||ha(i)){r.add(h3);return}(pa(i.messageId)||typeof i.messageId!="string"||Bs(i.messageId))&&r.add(h3)}}class GJe extends Qn{constructor(){super(...arguments),this.validator=new Age}}var mL=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)},eS;class bge extends na{constructor(){super(...arguments),eS.set(this,new Jf)}validate(e,r){(pa(e.coverage)||Bs(e.coverage))&&r.add("The claim summary request must contain a coverage ID."),Xn(e.dateReceived)&&mL(this,eS,"f").validate(e.dateReceived,r),Xn(e.servicePeriod)&&mL(this,eS,"f").validate(e.servicePeriod,r),Xn(e.dateProcessed)&&mL(this,eS,"f").validate(e.dateProcessed,r),super.validate(e,r)}}eS=new WeakMap;class kJe extends ia{constructor(){super(...arguments),this.validator=new bge}}const Cge="SearchReference value should be a non-empty string";class p3{validate(e,r){ha(e.value)||(typeof e.value!="string"||Bs(e.value))&&r.add(Cge)}}const Rge="SearchStringValue should be a non-empty string";class tS{validate(e,r){if(ha(e.values))return;let n=!1;for(const i of e.values)Bs(i)&&(n=!0);n&&r.add(Rge)}}var Rb=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)},gL,vL,Ob;class Oge extends na{constructor(){super(...arguments),gL.set(this,new tS),vL.set(this,new Jf),Ob.set(this,new p3)}validate(e,r){super.validate(e,r),Xn(e.id)&&Rb(this,gL,"f").validate(e.id,r),Xn(e.lastUpdated)&&Rb(this,vL,"f").validate(e.lastUpdated,r),Xn(e.beneficiary)&&Rb(this,Ob,"f").validate(e.beneficiary,r),Xn(e.patient)&&Rb(this,Ob,"f").validate(e.patient,r)}}gL=new WeakMap,vL=new WeakMap,Ob=new WeakMap;class VJe extends ia{constructor(){super(...arguments),this.validator=new Oge}}class Pge extends na{validate(e,r){super.validate(e,r)}}class BJe extends ia{constructor(){super(...arguments),this.validator=new Pge}}class Ige{validate(e,r){(pa(e.claimId)||Bs(e.claimId))&&r.add("The EOB document request must contain a claimId.")}}class jJe extends Qn{constructor(){super(...arguments),this.validator=new Ige}}var th=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,Pb,rS,yL;class Mge extends na{constructor(){super(...arguments),SL.set(this,new tS),Pb.set(this,new Jf),rS.set(this,new p3),yL.set(this,new eh)}validate(e,r){super.validate(e,r),Xn(e.id)&&th(this,SL,"f").validate(e.id,r),Xn(e.lastUpdated)&&th(this,Pb,"f").validate(e.lastUpdated,r),Xn(e.created)&&th(this,Pb,"f").validate(e.created,r),Xn(e.patient)&&th(this,rS,"f").validate(e.patient,r),Xn(e.provider)&&th(this,rS,"f").validate(e.provider,r),Xn(e.coverage)&&th(this,rS,"f").validate(e.coverage,r),Xn(e.status)&&th(this,yL,"f").validate(e.status,r)}}SL=new WeakMap,Pb=new WeakMap,rS=new WeakMap,yL=new WeakMap;class qJe extends ia{constructor(){super(...arguments),this.validator=new Mge}}var EL=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)},TL,AL,bL;class Dge{constructor(){TL.set(this,new Jf),AL.set(this,new tS),bL.set(this,new eh)}validate(e,r){var n;gn(e._source)&&EL(this,AL,"f").validate(e._source,r),gn(e.date)&&EL(this,TL,"f").validate(e.date,r),gn(e._count)&&e._count<0&&r.add("Value of count cannot be less than 0"),gn(e._getpagesoffset)&&e._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),gn((n=e.supporting_info)===null||n===void 0?void 0:n.value)&&Bs(e.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),gn(e.status)&&EL(this,bL,"f").validate(e.status,r)}}TL=new WeakMap,AL=new WeakMap,bL=new WeakMap;class QJe extends Qn{constructor(){super(...arguments),this.validator=new Dge}}class Nge{validate(e,r){if(!ha(e.cancelationReason)){if(ha(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)(ha(n?.code)||ha(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class HJe extends Qn{constructor(){super(...arguments),this.validator=new Nge}}class wge{validate(e,r){if(ha(e.notificationPreferences)||e.notificationPreferences.length===0){r.add("notificationPreferences is required and must not be empty");return}e.notificationPreferences.forEach((n,i)=>{ha(n.method)&&r.add(`notificationPreferences[${i}].method is required`),ha(n.enabled)&&r.add(`notificationPreferences[${i}].enabled is required`)})}}class zJe extends Qn{constructor(){super(...arguments),this.validator=new wge}}class Lge{validate(e,r){var n;sa((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 YJe extends Qn{constructor(){super(...arguments),this.validator=new Lge}}class Ib{validate(e,r,n={}){const{requireRole:i=!0}=n;gn(e.id)?Bs(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"),gn(e.type)?Bs(e.type)&&r.add("Member type cannot be empty"):r.add("Member type is required");const s=gn(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];gn(o)?Bs(o)&&r.add(`Role ${a}: Cannot be blank`):r.add(`Role ${a}: Cannot be null or undefined`)}}}class WJe extends Qn{constructor(){super(...arguments),this.validator=new Ib}}class Uge{constructor(){this.updateValidator=new Ib}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!1})}}class KJe extends Qn{constructor(){super(...arguments),this.validator=new Uge}}class $ge{constructor(){this.updateValidator=new Ib}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!0})}}class XJe extends Qn{constructor(){super(...arguments),this.validator=new $ge}}class xge{constructor(){this.updateValidator=new Ib}validate(e,r){if(!gn(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(!gn(i)){r.add(`Member ${n}: Cannot be null or undefined`);continue}const s=new VW;this.updateValidator.validate(i,s,{requireRole:!0});for(const a of s.errors())r.add(`Member ${n}: ${a}`)}}}class ZJe extends Qn{constructor(){super(...arguments),this.validator=new xge}}class Fge extends na{validate(e,r){super.validate(e,r)}}class Gge extends ia{constructor(){super(...arguments),this.validator=new Fge}}class kge{validate(e,r){const n=e.questionnaireResponse;if(ha(n)){r.add("questionnaireResponse is required");return}if((sa(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),sa(n.status)&&r.add("questionnaireResponse.status is required"),sa(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),ha(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(ha(s)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(s.resourceType==="Questionnaire"){i=s;break}}if(ha(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}sa(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class JJe extends Qn{constructor(){super(...arguments),this.validator=new kge}}class Vge{validate(e,r){const n=e.questionnaireResponse;if(ha(n)){r.add("questionnaireResponse is required");return}(sa(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),sa(n.status)&&r.add("questionnaireResponse.status is required"),sa(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required")}}class eet extends Qn{constructor(){super(...arguments),this.validator=new Vge}}var Mb=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)},CL,RL,Db;class Bge extends na{constructor(){super(...arguments),CL.set(this,new Jf),RL.set(this,new tS),Db.set(this,new eh)}validate(e,r){super.validate(e,r),gn(e.id)&&Mb(this,RL,"f").validate(e.id,r),gn(e.lastUpdated)&&Mb(this,CL,"f").validate(e.lastUpdated,r),gn(e.status)&&Mb(this,Db,"f").validate(e.status,r),gn(e.tag)&&Mb(this,Db,"f").validate(e.tag,r)}}CL=new WeakMap,RL=new WeakMap,Db=new WeakMap;class tet extends ia{constructor(){super(...arguments),this.validator=new Bge}}var nS=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)},OL,h_;class jge extends na{constructor(){super(...arguments),OL.set(this,new tS),h_.set(this,new eh)}validate(e,r){super.validate(e,r),gn(e.id)&&nS(this,OL,"f").validate(e.id,r),gn(e.tag)&&nS(this,h_,"f").validate(e.tag,r),gn(e.security)&&nS(this,h_,"f").validate(e.security,r),gn(e.context)&&nS(this,h_,"f").validate(e.context,r),gn(e.identifier)&&nS(this,h_,"f").validate(e.identifier,r)}}OL=new WeakMap,h_=new WeakMap;class ret extends ia{constructor(){super(...arguments),this.validator=new jge}}class qge extends na{validate(e,r){super.validate(e,r)}}class net extends ia{constructor(){super(...arguments),this.validator=new qge}}class Qge{constructor(){this.dataURIRegex=/^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/}validate(e,r){e.file.trim()||r.add("File content is required"),e.file.trim()&&!this.dataURIRegex.test(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 iet extends Qn{constructor(){super(...arguments),this.validator=new Qge}}class Hge{validate(e,r){e.attachmentId.trim()||r.add("Attachment ID is required")}}class set extends Qn{constructor(){super(...arguments),this.validator=new Hge}}class zge{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 aet extends Qn{constructor(){super(...arguments),this.validator=new zge}}class Yge extends na{validate(e,r){super.validate(e,r)}}class oet extends ia{constructor(){super(...arguments),this.validator=new Yge}}class Wge extends na{validate(e,r){e.requestId<0&&r.add("requestId must be a non-negative number"),super.validate(e,r)}}class uet extends ia{constructor(){super(...arguments),this.validator=new Wge}}class Kge{validate(e,r){e.requestId<0&&r.add("Request ID must be a non-negative integer"),sa(e.body.trim())&&r.add("Comment body is required")}}class cet extends Qn{constructor(){super(...arguments),this.validator=new Kge}}class Xge{validate(e,r){sa(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 det extends Qn{constructor(){super(...arguments),this.validator=new Xge}}const Zge="code cannot be null or empty";class Jge{validate(e,r){sa(e.code)&&r.add(Zge)}}class fet extends Qn{constructor(){super(...arguments),this.validator=new Jge}}const eve="consentId cannot be null or empty";class tve{validate(e,r){sa(e.consentId)&&r.add(eve)}}class rve extends Qn{constructor(){super(...arguments),this.validator=new tve}}var PL=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(d){try{l(n.next(d))}catch(m){a(m)}}function c(d){try{l(n.throw(d))}catch(m){a(m)}}function l(d){d.done?s(d.value):i(d.value).then(o,c)}l((n=n.apply(t,e||[])).next())})};class IL{constructor(e=new Map){this.storage=e}get(e){return PL(this,void 0,void 0,function*(){return this.storage.get(e)})}set(e,r){return PL(this,void 0,void 0,function*(){this.storage.set(e,r)})}delete(e){return PL(this,void 0,void 0,function*(){return this.storage.delete(e)})}}const nve={logLevel:eL.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new IL,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var rl;(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"})(rl||(rl={}));var ive=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},_3=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,Rn;(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"})(Rn||(Rn={}));const sve={[Rn.VERBOSE]:"VERBOSE",[Rn.DEBUG]:"DEBUG",[Rn.INFO]:"INFO",[Rn.WARN]:"WARN",[Rn.ERROR]:"ERROR",[Rn.FATAL]:"FATAL"};class p_{constructor(e){iS.set(this,void 0),ive(this,iS,e,"f")}get severity(){return _3(this,iS,"f")}shouldLog(e){return e>=_3(this,iS,"f")}static severityText(e){return sve[e]}static severityFromText(e){switch(e){case"VERBOSE":return Rn.VERBOSE;case"DEBUG":return Rn.DEBUG;case"INFO":return Rn.INFO;case"WARN":return Rn.WARN;case"ERROR":return Rn.ERROR;case"FATAL":return Rn.FATAL;default:throw new Error(`Invalid severity text: ${e}`)}}}iS=new WeakMap;var 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},pc=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)},ld,m3,Nb,sS,wb,rh;class g3{constructor(e,r,n){ld.add(this),Nb.set(this,void 0),sS.set(this,void 0),wb.set(this,void 0),ML(this,Nb,n,"f"),ML(this,sS,new p_(e),"f"),ML(this,wb,r,"f")}name(){return pc(this,Nb,"f")}severity(){return pc(this,sS,"f").severity}verbose(e,r){pc(this,ld,"m",rh).call(this,Rn.VERBOSE,e,r)}debug(e,r){pc(this,ld,"m",rh).call(this,Rn.DEBUG,e,r)}info(e,r){pc(this,ld,"m",rh).call(this,Rn.INFO,e,r)}warn(e,r){pc(this,ld,"m",rh).call(this,Rn.WARN,e,r)}error(e,r){let n;r instanceof fr&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),pc(this,ld,"m",rh).call(this,Rn.ERROR,e,n)}fatal(e,r){pc(this,ld,"m",rh).call(this,Rn.FATAL,e,r)}static otelSeverityNumber(e){switch(e){case Rn.VERBOSE:return rl.TRACE;case Rn.DEBUG:return rl.DEBUG;case Rn.INFO:return rl.INFO;case Rn.WARN:return rl.WARN;case Rn.ERROR:return rl.ERROR;case Rn.FATAL:return rl.FATAL;default:return rl.UNSPECIFIED}}}m3=g3,Nb=new WeakMap,sS=new WeakMap,wb=new WeakMap,ld=new WeakSet,rh=function(e,r,n){!pc(this,sS,"f").shouldLog(e)||pc(this,wb,"f").emit({timestamp:Date.now(),severityNumber:m3.otelSeverityNumber(e),severityText:p_.severityText(e),body:r,attributes:n??{}})};var v3=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},S3=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)},Lb,Ub;class ave{constructor(e,r){Lb.set(this,void 0),Ub.set(this,void 0),v3(this,Ub,e,"f"),v3(this,Lb,r.loggerProvider(),"f")}getLogger(e){const r=e??"default",n=S3(this,Lb,"f").getLogger(r);return new g3(S3(this,Ub,"f"),n,r)}}Lb=new WeakMap,Ub=new WeakMap;class ove{format(e,r,n,i){let a=`[${new Date().toISOString()}] ${p_.severityText(e)}`;return n!==void 0&&(a+=` (${n})`),a+=`: ${r}`,i===void 0?[a]:[a,i]}}var DL=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)},_c,mc,nl;class uve{constructor(e,r){_c.set(this,void 0),mc.set(this,void 0),nl.set(this,void 0),DL(this,mc,new p_(e),"f"),DL(this,_c,r,"f"),DL(this,nl,new ove,"f")}name(){return js(this,_c,"f")}severity(){return js(this,mc,"f").severity}verbose(e,r){js(this,mc,"f").shouldLog(Rn.VERBOSE)&&console.debug(...js(this,nl,"f").format(Rn.VERBOSE,e,js(this,_c,"f"),r))}debug(e,r){js(this,mc,"f").shouldLog(Rn.DEBUG)&&console.debug(...js(this,nl,"f").format(Rn.DEBUG,e,js(this,_c,"f"),r))}info(e,r){js(this,mc,"f").shouldLog(Rn.INFO)&&console.info(...js(this,nl,"f").format(Rn.INFO,e,js(this,_c,"f"),r))}warn(e,r){js(this,mc,"f").shouldLog(Rn.WARN)&&console.warn(...js(this,nl,"f").format(Rn.WARN,e,js(this,_c,"f"),r))}error(e,r){let n=r;r instanceof fr&&(n=r.failure()?r.error():r.data()),js(this,mc,"f").shouldLog(Rn.ERROR)&&console.error(...js(this,nl,"f").format(Rn.ERROR,e,js(this,_c,"f"),n))}fatal(e,r){js(this,mc,"f").shouldLog(Rn.FATAL)&&console.error(...js(this,nl,"f").format(Rn.FATAL,e,js(this,_c,"f"),r))}}_c=new WeakMap,mc=new WeakMap,nl=new WeakMap;var cve=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},lve=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)},$b;class qs{constructor(e=Rn.FATAL){$b.set(this,void 0),cve(this,$b,e,"f")}getLogger(e){return new uve(lve(this,$b,"f"),e)}}$b=new WeakMap;var dve=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)},NL,y3;class fve{constructor(){NL.add(this)}createLogProvider(e,r){switch(dve(this,NL,"m",y3).call(this,e)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new ave(e.logLevel,r);case"console":return new qs(e.logLevel)}}}NL=new WeakSet,y3=function(e){return e.telemetry.enabled?"otel":"console"};var zi=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)},il=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},cu,__,dd,m_,fd,nh,E3,T3,A3,b3,C3,R3,O3,P3,I3,M3;class xb{constructor(e){cu.add(this),__.set(this,void 0),dd.set(this,void 0),m_.set(this,void 0),fd.set(this,void 0),nh.set(this,void 0),this.bwellConfig=zi(this,cu,"m",C3).call(this,e),il(this,__,p_.severityFromText(this.bwellConfig.logLevel),"f"),il(this,nh,zi(this,cu,"m",M3).call(this),"f"),il(this,m_,zi(this,cu,"m",O3).call(this),"f"),il(this,dd,zi(this,cu,"m",P3).call(this),"f"),il(this,fd,zi(this,cu,"m",I3).call(this),"f")}static initialize(e){try{const r=new xb(e);return fr.success(r)}catch(r){if(Ca.isBwellError(r))return fr.failure(r);throw r}}get logLevel(){return zi(this,__,"f")}get graphQL(){return zi(this,m_,"f")}get telemetry(){return zi(this,dd,"f")}get http(){return zi(this,fd,"f")}get context(){return zi(this,nh,"f")}setContextUser(e){zi(this,nh,"f").user=e}mergeRemoteConfig(e){il(this,__,zi(this,cu,"m",E3).call(this,e),"f"),il(this,m_,zi(this,cu,"m",T3).call(this,e),"f"),il(this,dd,Object.freeze(zi(this,cu,"m",A3).call(this,e)),"f"),il(this,fd,Object.freeze(zi(this,cu,"m",b3).call(this,e)),"f")}}__=new WeakMap,dd=new WeakMap,m_=new WeakMap,fd=new WeakMap,nh=new WeakMap,cu=new WeakSet,E3=function(e){var r;const n=(r=e?.logLevel)!==null&&r!==void 0?r:null;return n===null?zi(this,__,"f"):p_.severityFromText(n)},T3=function(e){var r;const n=(r=e?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return zi(this,m_,"f");const{authedApiUrl:i,unauthedApiUrl:s}=this.bwellConfig.overrides;return{unauthApiUrl:s??n.url,apiUrl:i??n.authUrl}},A3=function(e){var r,n;const i=(r=e?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return zi(this,dd,"f");const s=(n=i.enabled)!==null&&n!==void 0?n:zi(this,dd,"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({},zi(this,dd,"f")),{enabled:s,collectorUrl:i.collectorUrl})},b3=function(e){var r,n,i;const s=(r=e?.httpClient)!==null&&r!==void 0?r:null;return s===null?zi(this,fd,"f"):{timeout:(n=s.requestTimeout)!==null&&n!==void 0?n:zi(this,fd,"f").timeout,retryPolicy:(i=s.retry)!==null&&i!==void 0?i:zi(this,fd,"f").retryPolicy}},C3=function(e){return Object.assign(Object.assign({},nve),e)},R3=function(){try{return lme(this.bwellConfig.clientKey)}catch{throw new rme("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},O3=function(){var e,r;return{apiUrl:(e=this.bwellConfig.overrides.authedApiUrl)!==null&&e!==void 0?e:`https://api-gateway.${zi(this,nh,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${zi(this,nh,"f").env}.icanbwell.com/federated-graph/graphql`}},P3=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},I3=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},M3=function(){return{clientKey:this.bwellConfig.clientKey,env:zi(this,cu,"m",R3).call(this),user:null}};var hve=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(d){try{l(n.next(d))}catch(m){a(m)}}function c(d){try{l(n.throw(d))}catch(m){a(m)}}function l(d){d.done?s(d.value):i(d.value).then(o,c)}l((n=n.apply(t,e||[])).next())})},D3=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},Fb=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)},g_,Gb;class pve{constructor(e,r=new qs){g_.set(this,void 0),Gb.set(this,void 0),D3(this,Gb,e,"f"),D3(this,g_,r.getLogger("ConfigManager"),"f")}initialize(e){return hve(this,void 0,void 0,function*(){const r=xb.initialize(e);if(r.failure())return r;const n=r.data();Fb(this,g_,"f").verbose("Initializing SDK Configuration");const i=yield Fb(this,Gb,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const s=i.data();try{n.mergeRemoteConfig(s)}catch(a){Fb(this,g_,"f").error("Error merging SDK config with remote config.",a)}return Fb(this,g_,"f").info("Remote SDK Configuration merged with user config"),fr.success(n)})}}g_=new WeakMap,Gb=new WeakMap;class hd extends Error{response;request;constructor(e,r){const n=`${hd.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,hd.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,hd)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${String(e.status)})`}}const N3=t=>t.toUpperCase(),wL=t=>typeof t=="function"?t():t,w3=(t,e)=>t.map((r,n)=>[r,e[n]]),v_=t=>{let e={};return t instanceof Headers?e=_ve(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):t&&(e=t),e},_ve=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},mve=t=>{try{const e=t();return gve(e)?e.catch(r=>L3(r)):e}catch(e){return L3(e)}},L3=t=>t instanceof Error?t:new Error(String(t)),gve=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",LL=t=>{throw new Error(`Unhandled case: ${String(t)}`)},kb=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),het=t=>Object.entries(t),pet=t=>Object.values(t),_et=(t,e)=>Object.fromEntries(Object.entries(t).map(([r,n])=>[r,e(n,r)])),met=t=>t.charAt(0).toLowerCase()+t.slice(1);function get(t){if(!Array.isArray(t))throw new Error(`Expected array. Got: ${String(t)}`)}function vet(t){if(t===null||typeof t!="object")throw new Error(`Expected object. Got: ${String(t)}`)}const yet=t=>t.charAt(0).toUpperCase()+t.slice(1),Eet=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)}},vve=(...t)=>{process.env.DEBUG&&console.log(...t)},Tet=(...t)=>(...e)=>{vve(...t,...e)},Aet=t=>{const e=[],r=[];for(const n of t)n instanceof Error?e.push(n):r.push(n);return[r,e]},bet=async(...t)=>{const e=Sve(t);return new GraphQLClient(e.url).batchRequests(e)},Sve=t=>t.length===1?t[0]:{url:t[0],documents:t[1],requestHeaders:t[2],signal:void 0},yve=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},Cet=async(...t)=>{const[e,r,...n]=t,i=Eve(e,r,...n);return new GraphQLClient(i.url).rawRequest({...i})},Eve=(t,e,...r)=>{const[n,i]=r;return typeof t=="string"?{url:t,query:e,variables:n,requestHeaders:i,signal:void 0}:t},Tve=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0};var Ave=g(2455);const U3="Accept",UL="Content-Type",$L="application/json",$3="application/graphql-response+json",Ret={success:200},x3=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),bve=t=>{const e=t.toLowerCase();return e.includes($3)||e.includes($L)},F3=t=>{try{if(Array.isArray(t))return{_tag:"Batch",executionResults:t.map(G3)};if(kb(t))return{_tag:"Single",executionResult:G3(t)};throw new Error(`Invalid execution result: result is not object or array.
13375
+ `));function MZe(t){const e=Object.assign(Object.assign({},hc),t);return Apollo.useMutation(Y_e,e)}const DW={value:{system:"http://hl7.org/fhir/uv/smart-health-cards-and-links/StructureDefinition/ShlPayload",code:"smart-health-link"}};function DZe(t={}){return useDocumentReferencesQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:DW})}))}function NZe(t={}){return useDocumentReferencesLazyQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:DW})}))}const NW={value:{system:"https://www.icanbwell.com/fhir/CodeSystem/shl-event-type",code:"access"}};function wZe(t={}){return useCommunicationRequestsQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:NW})}))}function LZe(t={}){return useCommunicationRequestsLazyQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:NW})}))}const wW={value:{system:"https://www.icanbwell.com/consent-category",code:"smartHealthLink"}};function UZe(t={}){return useConsentsForHealthLinksQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:wW})}))}function $Ze(t={}){return useConsentsForHealthLinksLazyQuery(Object.assign(Object.assign({},t),{variables:Object.assign(Object.assign({},t.variables),{category:wW})}))}const xZe=t=>useMutation(SendChatCompletionMutation,t),FZe=t=>useMutation(UploadDocumentMutation,t);var LW=g(46),Bv,sb;class UW{constructor(){this.type="backend",Bv.set(this,void 0),sb.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".');od(this,Bv,r,"f"),od(this,sb,ww(n),"f")}read(e,r,n){return YA(this,void 0,void 0,function*(){try{const{translation:i}=yield ui(this,sb,"f").getClientTranslations({name:ui(this,Bv,"f"),key:r,lang:e});n(null,i?.json||{})}catch{const s=`Error fetching translation with key "${r}" and client "${ui(this,Bv,"f")||"N/A"}".`;n(s,null)}})}}Bv=new WeakMap,sb=new WeakMap,UW.type="backend";var o_;class $W{constructor(e){this.type="logger",o_.set(this,void 0),od(this,o_,e,"f")}log([e,r,...n]){ui(this,o_,"f").info({meta:r},e,...n)}warn([e,r,...n]){ui(this,o_,"f").error({meta:r},e,...n)}error([e,r,...n]){ui(this,o_,"f").error({meta:r},e,...n)}}o_=new WeakMap,$W.type="logger";var ab,ob,Xf,jv,fa,Zf;const xW="appLanguage";class vo{constructor({keys:e,nativeBridge:r,fallbackKeys:n=[],defaultLanguage:i="en",logger:s,parent:a,debug:o=!1,remoteConfig:c={}}){Xf.set(this,void 0),jv.set(this,void 0),fa.set(this,void 0),Zf.set(this,void 0),od(this,Xf,e,"f"),od(this,jv,n,"f"),od(this,Zf,r,"f");const l={lng:i,fallbackNS:ui(this,jv,"f"),debug:o,defaultNS:e,returnNull:!1};a?od(this,fa,a.cloneInstance(l),"f"):(od(this,fa,Ua.createInstance(),"f"),s&&ui(this,fa,"f").use(new $W(s.child({library:"@icanbwell/i18n"}))),c.apiClient&&ui(this,fa,"f").use(UW),ui(this,fa,"f").init(Object.assign(Object.assign({},l),{fallbackLng:!1,partialBundledLanguages:!0,ns:[],resources:{},backend:c,saveMissing:!0,missingKeyHandler:(d,m,C)=>ui(this,fa,"f").services.logger.error(`missing key: ${C}; language: ${d}; key: ${m}`)}))),this.t=ui(this,fa,"f").t,vo.resolvedLanguage=ui(this,fa,"f").resolvedLanguage||i}load(){var e;return YA(this,void 0,void 0,function*(){const r=(yield(e=ui(this,Zf,"f"))===null||e===void 0?void 0:e.storage.getItem(xW))||vo.resolvedLanguage;r!==vo.resolvedLanguage&&(yield ui(this,fa,"f").changeLanguage(r),vo.resolvedLanguage=r),yield ui(this,fa,"f").loadNamespaces(ui(this,Xf,"f"));const n=ui(this,Xf,"f").filter(i=>!ui(this,fa,"f").hasResourceBundle(r,i));if(n.length)throw new Error(`Error loading translations for key(s): ${n.join(", ")}`);return ui(vo,ab,"f",ob).emit("changeLanguage",r),this})}child(e){return new vo(Object.assign(Object.assign({},e),{nativeBridge:ui(this,Zf,"f"),fallbackKeys:[...ui(this,jv,"f"),...ui(this,Xf,"f")],parent:ui(this,fa,"f"),defaultLanguage:ui(this,fa,"f").language}))}get isLoaded(){return ui(this,Xf,"f").every(e=>ui(this,fa,"f").hasResourceBundle(ui(this,fa,"f").language,e))}changeLanguage(e){var r,n;return YA(this,void 0,void 0,function*(){vo.resolvedLanguage=e,yield ui(this,fa,"f").changeLanguage(e),ui(vo,ab,"f",ob).emit("changeLanguage",e),yield(r=ui(this,Zf,"f"))===null||r===void 0?void 0:r.storage.setItem(xW,e),(n=ui(this,Zf,"f"))===null||n===void 0||n.reloadView(!0)})}get resolvedLanguage(){return vo.resolvedLanguage}onChangeLanguage(e){ui(vo,ab,"f",ob).on("changeLanguage",e)}}ab=vo,Xf=new WeakMap,jv=new WeakMap,fa=new WeakMap,Zf=new WeakMap,ob={value:new LW},vo.resolvedLanguage="en";var Fw=g(331),qv;(function(t){t.one="1.0.0"})(qv||(qv={}));const ub="orchestrator:native-bridge",W_e={id:ub,dependencies:{featureServices:{}},create:()=>({[qv.one]:()=>({featureService:Fw.b})})};var Qv;(function(t){t.one="1.0.0"})(Qv||(Qv={}));const cb="orchestrator:translation-service",K_e={id:cb,dependencies:{featureServices:{[Wa]:lo.one,[oc]:td.one,[Ki]:Ya.one,[Cv]:Kp.one,[ub]:qv.one}},create:({featureServices:t})=>{const e=t[Wa],r=t[oc],n=t[Cv],{slug:i}=t[Ki].getClientContext(),s=t[ub],a=new vo({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})),{[Qv.one]:()=>({featureService:a})}}};var u_,c_,lb,$o,Hv,db;const fb="tokens",Gw="delegationContext",kw="userSessionId";class X_e{constructor({apiClient:e,stateService:r,identityGatewaySdk:n,storage:i,logger:s}){u_.set(this,void 0),c_.set(this,void 0),lb.set(this,void 0),$o.set(this,void 0),Hv.set(this,void 0),db.set(this,[]),(0,T.__classPrivateFieldSet)(this,u_,e,"f"),(0,T.__classPrivateFieldSet)(this,c_,r,"f"),(0,T.__classPrivateFieldSet)(this,lb,n,"f"),(0,T.__classPrivateFieldSet)(this,$o,i,"f"),(0,T.__classPrivateFieldSet)(this,Hv,s,"f")}registerPreLogoutHandler(e){(0,T.__classPrivateFieldGet)(this,db,"f").push(e)}getStoredTokens(){const e=(0,T.__classPrivateFieldGet)(this,$o,"f").getItem(fb);return e?JSON.parse(e):void 0}removeStoredTokens(){(0,T.__classPrivateFieldGet)(this,$o,"f").removeItem(fb),this.clearSessionId(),this.clearDelegationContext()}clearSessionId(){(0,T.__classPrivateFieldGet)(this,$o,"f").removeItem(kw)}ensureSessionId(){var e;try{if((0,T.__classPrivateFieldGet)(this,$o,"f").getItem(kw))return;(0,T.__classPrivateFieldGet)(this,$o,"f").setItem(kw,JSON.stringify({sessionId:crypto.randomUUID()}))}catch(r){(e=(0,T.__classPrivateFieldGet)(this,Hv,"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,es.normalizeTokenPayload)(e.idToken.payload)})});return(0,T.__classPrivateFieldGet)(this,$o,"f").setItem(fb,JSON.stringify(r)),r}storeDelegationContext(e){(0,T.__classPrivateFieldGet)(this,$o,"f").setItem(Gw,JSON.stringify(e))}getDelegationContext(){var e,r;const n=(0,T.__classPrivateFieldGet)(this,$o,"f").getItem(Gw);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,T.__classPrivateFieldGet)(this,$o,"f").removeItem(Gw)}logout(){var e;return(0,T.__awaiter)(this,void 0,void 0,function*(){for(const s of(0,T.__classPrivateFieldGet)(this,db,"f"))try{yield s()}catch(a){(e=(0,T.__classPrivateFieldGet)(this,Hv,"f"))===null||e===void 0||e.error(a instanceof Error?a:new Error(String(a)),"Pre-logout handler failed")}const r=(0,T.__classPrivateFieldGet)(this,c_,"f").getUserTokenData().accessToken.jwtToken,{key:n,variant:i}=(0,T.__classPrivateFieldGet)(this,c_,"f").getClientContext();i!==z.GUEST&&(yield(0,T.__classPrivateFieldGet)(this,lb,"f").logout({accessToken:r},{context:{headers:{clientKey:n}}})),(0,T.__classPrivateFieldGet)(this,u_,"f").stop(),(0,T.__classPrivateFieldGet)(this,u_,"f").clearAuth(),yield(0,T.__classPrivateFieldGet)(this,u_,"f").clearStore(),(0,T.__classPrivateFieldGet)(this,c_,"f").logoutUser(),(0,T.__classPrivateFieldGet)(this,$o,"f").removeItem(fb),this.clearSessionId(),this.clearDelegationContext()})}}u_=new WeakMap,c_=new WeakMap,lb=new WeakMap,$o=new WeakMap,Hv=new WeakMap,db=new WeakMap;var zv;(function(t){t.one="1.0.0"})(zv||(zv={}));const hb="orchestrator:identity-utils",Z_e={id:hb,dependencies:{featureServices:{[Wa]:lo.one,[oc]:td.one,[Ki]:Ya.one,[Cv]:Kp.one}},create:({featureServices:t})=>{const e=t[Wa];return{[zv.one]:()=>({featureService:new X_e({apiClient:e,stateService:t[Ki],identityGatewaySdk:nH(e),storage:window.sessionStorage,logger:t[oc]})})}}};var pb;(function(t){t.one="1.0.0"})(pb||(pb={}));const FW="orchestrator:globaleventemitter-service",J_e=t=>({id:FW,create:()=>({[pb.one]:()=>({featureService:t})})});var _b;(function(t){t.one="1.0.0"})(_b||(_b={}));const GW="orchestrator:reboot-controller",eme=t=>({id:GW,create:()=>({[_b.one]:()=>({featureService:t})})}),mb="orchestrator:bwell-sdk";var Yv;(function(t){t.one="1.0.0"})(Yv||(Yv={}));const tme=t=>({id:mb,dependencies:{featureServices:{[Ki]:Ya.one,[cb]:Qv.one,[oc]:td.one}},create:({featureServices:e})=>{const r=e[Ki],n=e[cb],i=e[oc],s=t;let a=!1,o=!1;const c=k=>{if(typeof k=="string")return k;if(k&&typeof k=="object"&&"message"in k){const V=k.message;return typeof V=="string"?V:String(V)}return String(k)},l=k=>/uninitialized|not been initialized/i.test(c(k)),d=k=>{try{s.language.setLanguage(k)}catch(V){if(l(V)){o||(o=!0,i.info({},"embeddable-core: Deferring language switch until SDK initialization completes"));return}i.info({error:c(V)},"embeddable-core: Non-fatal language switch issue in SDK")}},m=k=>{try{const V=s.language.getLanguage();k!==V&&d(k)}catch(V){if(l(V))return;i.info({error:c(V)},"embeddable-core: Non-fatal language read issue in SDK")}},C=()=>{var k;!(!((k=r.getUser().tokenData)===null||k===void 0)&&k.idToken)||(d(n.resolvedLanguage),a||(a=!0,n.onChangeLanguage(m)))};return r.getStore().subscribe(C),{[Yv.one]:()=>({featureService:s})}}});class Ca extends Error{constructor(e,r){super(e),this.name="BWellError",r?.cause&&(this.cause=r.cause)}static isBwellError(e){return e instanceof Ca}}class GZe extends Ca{constructor(e="Authentication Error"){super(e),this.name="AuthenticationError"}}class kZe extends Ca{constructor(e="Illegal Argument Error"){super(e),this.name="IllegalArgumentError"}}class VZe extends Ca{constructor(e="Illegal State Error"){super(e),this.name="IllegalStateError"}}class rme extends Ca{constructor(e="Invalid Client Key Error"){super(e),this.name="InvalidClientKeyError"}}class Vw extends Ca{constructor(e,r){super(e),this.credentials=r,this.name="InvalidCredentialsTypeError"}}class l_ extends Ca{constructor(e="Invalid Token Error"){super(e),this.name="InvalidTokenError"}}class nme extends Ca{constructor(e,r){super(e),this.status=r,this.name="NetworkError"}}class ime extends Ca{constructor(e){super(e.message()),this.operationOutcome=e,this.name="OperationOutcomeError"}}class Bw extends Ca{constructor(e,r){super(e),this.data=r,this.name="UnknownError"}}class sme extends Ca{constructor(e){super(e.join(". ")),this.errors=e,this.name="ValidationError"}}class ir{constructor(e,r){this.data=e,r!==null&&(this.error=r)}hasError(){return this.error!==void 0}static error(e){return new ir(void 0,e)}}var kW=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},gb=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)},Wv,Kv;class fr{static success(e){return new ame(e)}static failure(e){return new vb(e)}}class ame extends fr{constructor(e){super(),Wv.set(this,void 0),kW(this,Wv,e,"f")}data(){return gb(this,Wv,"f")}error(){throw gb(this,Wv,"f")}success(){return!0}failure(){return!1}toQueryResult(){return new ir(this.data())}}Wv=new WeakMap;class vb extends fr{constructor(e){super(),Kv.set(this,void 0),kW(this,Kv,e,"f")}data(){throw gb(this,Kv,"f")}error(){return gb(this,Kv,"f")}success(){return!1}failure(){return!0}intoFailure(){return fr.failure(this.error())}toQueryResult(){return new ir(void 0,this.error())}}Kv=new WeakMap;var jw=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)},Xv;class VW{constructor(){Xv.set(this,[])}add(e){jw(this,Xv,"f").push(e)}errors(){return jw(this,Xv,"f")}hasErrors(){return jw(this,Xv,"f").length>0}}Xv=new WeakMap;var BW=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},qw=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)},Zv,Sb;class ome{constructor(e){Zv.set(this,void 0),Sb.set(this,void 0),BW(this,Sb,e,"f"),BW(this,Zv,this.transformInput(e),"f")}validate(){return fr.success(null)}data(){return qw(this,Zv,"f")}toJSON(){return qw(this,Zv,"f")}transformInput(e){return e}input(){return qw(this,Sb,"f")}}Zv=new WeakMap,Sb=new WeakMap;class Qn extends ome{validate(){const e=new VW;return this.validator.validate(this.input(),e),e.hasErrors()?fr.failure(new sme(e.errors())):fr.success(null)}}var jW=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)},yb,qW,QW;const HW=100,Qw=20;class na{constructor(){yb.add(this)}validate(e,r){jW(this,yb,"m",qW).call(this,e.page,r),jW(this,yb,"m",QW).call(this,e.pageSize,r)}}yb=new WeakSet,qW=function(e,r){e<0&&r.add("page must be a positive number")},QW=function(e,r){e!==void 0&&(e<=0&&r.add("Page size must be greater than 0"),e>HW&&r.add(`Page size must not exceed ${HW}`))};class ia extends Qn{constructor(){super(...arguments),this.validator=new na}transformInput(e){return Object.assign({pageSize:Qw},e)}}function Hw(){return new Date().toISOString()}function ume(){var t;return!(typeof process>"u"||((t=process.versions)===null||t===void 0?void 0:t.node)===void 0)}function cme(){return typeof window<"u"}function zW(){if(cme())return"browser";if(ume())return"node";throw new Error("Invalid runtime")}function YW(t){switch(zW()){case"browser":return t.browser();case"node":return t.node()}}function WW(t){switch(zW()){case"node":return Buffer.from(t,"base64").toString("utf-8");case"browser":return atob(t)}}function gn(t){return t!=null}function ha(t){return t==null}function BZe(t){return gn(t)&&t!==""}function sa(t){return t==null||t===""}function pa(t){return t===void 0}function Xn(t){return t!==void 0}function lme(t){return JSON.parse(WW(t)).env}const dme=3;function KW(t){const e=t.split("."),r=e[1];if(r===void 0||e.length!==dme)throw new l_("Token is missing data and may be corrupted");try{return JSON.parse(WW(r))}catch(n){const i=n;throw new l_(`Unable to parse token payload: ${i.name} - ${i.message}`)}}function XW(t){const r=KW(t).exp;if(typeof r!="number")throw new l_("The access token is missing an expiration date and is most likely corrupted.");return r*1e3}const fme="custom:clientFhirPersonId",hme="custom:bwellFhirPatientId";function pme(t){const e=KW(t),r=e[hme],n=e[fme];return gn(r)&&gn(n)?{bwellFhirPersonId:r,clientFhirPersonId:n}:null}const _me=[{name:"Edge",tokens:["Edg"]},{name:"Chrome",tokens:["CriOS","Chrome"]},{name:"Firefox",tokens:["FxiOS","Firefox"]},{name:"Safari",tokens:["Safari"]}];function mme(t){for(const e of _me)if(e.tokens.some(r=>t.includes(r)))return e.name;return"Unknown"}function gme(){return YW({node:()=>`Node/${process.versions.node}`,browser:()=>`Browser/${mme(navigator.userAgent)}`})}function Bs(t){return t.trim()===""}const ZW="1.109.0";function vme(){return ZW}var zw;(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"})(zw||(zw={}));var JW;(function(t){t.Guest="GUEST",t.Other="OTHER",t.Self="SELF"})(JW||(JW={}));var e2;(function(t){t.Guest="GUEST"})(e2||(e2={}));var Eb;(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"})(Eb||(Eb={}));var t2;(function(t){t.Complete="COMPLETE",t.Error="ERROR",t.Partial="PARTIAL",t.Queued="QUEUED"})(t2||(t2={}));var r2;(function(t){t.Institutional="INSTITUTIONAL",t.Oral="ORAL",t.Pharmacy="PHARMACY",t.Professional="PROFESSIONAL",t.Vision="VISION"})(r2||(r2={}));var n2;(function(t){t.Bwell="bwell"})(n2||(n2={}));var i2;(function(t){t.Bwell="BWELL"})(i2||(i2={}));var s2;(function(t){t.Basic="BASIC",t.Identity="IDENTITY",t.Oauth="OAUTH"})(s2||(s2={}));var Yw;(function(t){t.Deny="DENY",t.Permit="PERMIT"})(Yw||(Yw={}));var Ww;(function(t){t.Active="ACTIVE",t.Draft="DRAFT",t.EnteredInError="ENTERED_IN_ERROR",t.Inactive="INACTIVE",t.Proposed="PROPOSED",t.Rejected="REJECTED"})(Ww||(Ww={}));var a2;(function(t){t.Medical="MEDICAL",t.Pharmacy="PHARMACY"})(a2||(a2={}));var o2;(function(t){t.Usd="USD"})(o2||(o2={}));var u2;(function(t){t.Accepted="ACCEPTED",t.Rejected="REJECTED"})(u2||(u2={}));var c2;(function(t){t.AccessEnded="ACCESS_ENDED",t.Connected="CONNECTED",t.Deleted="DELETED",t.Disconnected="DISCONNECTED",t.Error="ERROR",t.Expired="EXPIRED"})(c2||(c2={}));var l2;(function(t){t.Clinical="CLINICAL",t.Device="DEVICE",t.Insurance="INSURANCE",t.Lab="LAB",t.Pharmacy="PHARMACY",t.Practitioner="PRACTITIONER"})(l2||(l2={}));var Tb;(function(t){t.Connecthub="connecthub",t.Nppes="nppes"})(Tb||(Tb={}));var d2;(function(t){t.Connecthub="CONNECTHUB",t.Nppes="NPPES"})(d2||(d2={}));var f2;(function(t){t.Fri="FRI",t.Mon="MON",t.Sat="SAT",t.Sun="SUN",t.Thu="THU",t.Tue="TUE",t.Wed="WED"})(f2||(f2={}));var h2;(function(t){t.Deleted="DELETED"})(h2||(h2={}));var p2;(function(t){t.Kilometers="KILOMETERS",t.Meters="METERS",t.Miles="MILES"})(p2||(p2={}));var _2;(function(t){t.BwellPatient="BWELL_PATIENT",t.BwellPerson="BWELL_PERSON",t.ClientPatient="CLIENT_PATIENT",t.ClientPerson="CLIENT_PERSON"})(_2||(_2={}));var m2;(function(t){t.Active="active",t.EnteredInError="entered_in_error",t.Error="error",t.Off="off",t.Suspended="suspended",t.Test="test"})(m2||(m2={}));var g2;(function(t){t.Active="ACTIVE",t.EnteredInError="ENTERED_IN_ERROR",t.Error="ERROR",t.Off="OFF",t.Suspended="SUSPENDED",t.Test="TEST"})(g2||(g2={}));var Kw;(function(t){t.CustomEvent="CUSTOM_EVENT",t.MobilePushOpen="MOBILE_PUSH_OPEN"})(Kw||(Kw={}));var Xw;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(Xw||(Xw={}));var Zw;(function(t){t.Person="Person"})(Zw||(Zw={}));var Jw;(function(t){t.Characteristic="characteristic",t.Communication="communication",t.Gender="gender",t.Specialty="specialty"})(Jw||(Jw={}));var v2;(function(t){t.Characteristic="CHARACTERISTIC",t.Communication="COMMUNICATION",t.Gender="GENDER",t.InsurancePlan="INSURANCE_PLAN",t.Specialty="SPECIALTY"})(v2||(v2={}));var S2;(function(t){t.Female="female",t.Male="male",t.Other="other",t.Unknown="unknown"})(S2||(S2={}));var y2;(function(t){t.Female="FEMALE",t.Male="MALE",t.Other="OTHER",t.Unknown="UNKNOWN"})(y2||(y2={}));var E2;(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"})(E2||(E2={}));var T2;(function(t){t.Official="_official",t.Old="_old",t.Secondary="_secondary",t.Temp="_temp",t.Usual="_usual"})(T2||(T2={}));var A2;(function(t){t.Cognito="COGNITO",t.Descope="DESCOPE"})(A2||(A2={}));var b2;(function(t){t.Direct="DIRECT",t.DirectIas="DIRECT_IAS",t.Ial2="IAL2",t.IndirectIas="INDIRECT_IAS",t.Proa="PROA"})(b2||(b2={}));var C2;(function(t){t.Clicked="clicked"})(C2||(C2={}));var R2;(function(t){t.Clicked="CLICKED"})(R2||(R2={}));var eL;(function(t){t.Debug="DEBUG",t.Error="ERROR",t.Info="INFO",t.Verbose="VERBOSE",t.Warn="WARN"})(eL||(eL={}));var O2;(function(t){t.Sms="SMS"})(O2||(O2={}));var tL;(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"})(tL||(tL={}));var P2;(function(t){t.CancelDelete="CANCEL_DELETE",t.ConfirmDelete="CONFIRM_DELETE",t.DeletionInProgress="DELETION_IN_PROGRESS",t.ImmediateExecution="IMMEDIATE_EXECUTION",t.RequestDelete="REQUEST_DELETE"})(P2||(P2={}));var rL;(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"})(rL||(rL={}));var I2;(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"})(I2||(I2={}));var M2;(function(t){t.Add="add",t.Copy="copy",t.Move="move",t.Remove="remove",t.Replace="replace",t.Test="test"})(M2||(M2={}));var D2;(function(t){t.ExistingPatients="EXISTING_PATIENTS",t.NewPatients="NEW_PATIENTS"})(D2||(D2={}));var N2;(function(t){t.Patient="Patient",t.Person="Person"})(N2||(N2={}));var w2;(function(t){t.Practice="practice",t.Practitioner="practitioner"})(w2||(w2={}));var L2;(function(t){t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(L2||(L2={}));var U2;(function(t){t.QuestionnaireResponse="QuestionnaireResponse"})(U2||(U2={}));var $2;(function(t){t.Closed="CLOSED",t.Hold="HOLD",t.New="NEW",t.Open="OPEN",t.Pending="PENDING",t.Solved="SOLVED"})($2||($2={}));var x2;(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"})(x2||(x2={}));var F2;(function(t){t.DataConnections="DATA_CONNECTIONS",t.FindCare="FIND_CARE"})(F2||(F2={}));var G2;(function(t){t.Device="DEVICE",t.Insurance="INSURANCE",t.Laboratory="LABORATORY",t.Pharmacy="PHARMACY",t.Practice="PRACTICE",t.Practitioner="PRACTITIONER"})(G2||(G2={}));var k2;(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"})(k2||(k2={}));var V2;(function(t){t.UpdatedAt="UPDATED_AT"})(V2||(V2={}));var nL;(function(t){t.Content="content",t.Distance="distance",t.Relevance="relevance"})(nL||(nL={}));var B2;(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"})(B2||(B2={}));var Ab;(function(t){t.Asc="asc",t.Desc="desc"})(Ab||(Ab={}));var j2;(function(t){t.Asc="ASC",t.Desc="DESC"})(j2||(j2={}));var q2;(function(t){t.CareSearch="CARE_SEARCH",t.Proa="PROA",t.ProviderDetails="PROVIDER_DETAILS",t.Sayt="SAYT",t.Unspecified="UNSPECIFIED"})(q2||(q2={}));var Q2;(function(t){t.DataDeleted="DATA_DELETED",t.Deleting="DELETING",t.Error="ERROR",t.Pending="PENDING",t.Retrieved="RETRIEVED",t.Retrieving="RETRIEVING"})(Q2||(Q2={}));var iL;(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"})(iL||(iL={}));var bb;(function(t){t.Accurate="accurate",t.Estimate="estimate"})(bb||(bb={}));var H2;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(H2||(H2={}));var z2;(function(t){t.PersonMatchError="PERSON_MATCH_ERROR",t.ServerError="SERVER_ERROR"})(z2||(z2={}));const Sme=new Set(Object.values(Xw));function Y2(t){return Sme.has(t)}const yme=new Set(Object.values(Ww));function Eme(t){return yme.has(t)}const Tme=new Set(Object.values(Eb));function W2(t){return Tme.has(t)}const Ame=new Set(Object.values(Yw));function bme(t){return Ame.has(t)}class Cme{validate(e,r){!pa(e.gender)&&!Y2(e.gender)&&r.add(`Invalid gender value: "${e.gender}"`),!pa(e.middleNames)&&e.middleNames.length>0&&pa(e.firstName)&&r.add("middleNames requires firstName to be provided")}}class jZe extends Qn{constructor(){super(...arguments),this.validator=new Cme}}class Rme{validate(e,r){W2(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!pa(e.organizationId)&&Bs(e.organizationId)&&r.add("organizationId cannot be empty")}}class qZe extends Qn{constructor(){super(...arguments),this.validator=new Rme}}class Ome{validate(e,r){Eme(e.status)||r.add(`Invalid consent status: "${e.status}"`),bme(e.provision)||r.add(`Invalid consent provision type: "${e.provision}"`),W2(e.category)||r.add(`Invalid consent category code: "${e.category}"`),!pa(e.organizationId)&&Bs(e.organizationId)&&r.add("organizationId cannot be empty"),e.category===Eb.ProaAttestation&&pa(e.organizationId)&&r.add("organizationId must be provided when category is PROA_ATTESTATION")}}class QZe extends Qn{constructor(){super(...arguments),this.validator=new Ome}}class Pme{validate(e,r){sa(e.exportId)&&r.add("exportId is required"),sa(e.password)&&r.add("password is required")}}class HZe extends Qn{constructor(){super(...arguments),this.validator=new Pme}}class zZe extends null{}var xo=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)},to,cd,K2,X2,Z2,J2,e3,t3;class Jf{constructor(){to.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)xo(this,to,"m",K2).call(this,n,r)}}to=new WeakSet,cd=function(e,r){e&&e!==null&&isNaN(e.getTime())&&r.add("The date is not valid")},K2=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:c,approximately:l}=e,m=[n,i,s,a,o,c,l].filter(C=>C!=null).length;if(m===0){r.add("At least one SearchDateValue must be set to instantiate a SearchDate");return}xo(this,to,"m",X2).call(this,e,m,r),xo(this,to,"m",e3).call(this,e,r),xo(this,to,"m",t3).call(this,e,r)},X2=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}xo(this,to,"m",Z2).call(this,e,n),xo(this,to,"m",J2).call(this,e,n)},Z2=function(e,r){e.greaterThan&&e.greaterThanOrEqualTo&&r.add("The greaterThan/greaterThanOrEqualTo value cannot be set with both values")},J2=function(e,r){e.lessThan&&e.lessThanOrEqualTo&&r.add("The lessThan/lessThanOrEqualTo value cannot be set with both values")},e3=function(e,r){const{equals:n,notEquals:i,greaterThan:s,greaterThanOrEqualTo:a,lessThan:o,lessThanOrEqualTo:c,approximately:l}=e;n&&xo(this,to,"m",cd).call(this,n,r),i&&xo(this,to,"m",cd).call(this,i,r),s&&xo(this,to,"m",cd).call(this,s,r),a&&xo(this,to,"m",cd).call(this,a,r),o&&xo(this,to,"m",cd).call(this,o,r),c&&xo(this,to,"m",cd).call(this,c,r),l&&xo(this,to,"m",cd).call(this,l,r)},t3=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 sL=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)},Jv;class eh{constructor(){Jv.set(this,new Ime)}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&&sL(this,Jv,"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:[])sL(this,Jv,"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)sL(this,Jv,"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)")}}}Jv=new WeakMap;class Ime{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 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)},aL,oL,uL,cL,lL,dL;class r3 extends na{constructor(){super(...arguments),aL.set(this,new eh),oL.set(this,new Jf)}validate(e,r){super.validate(e,r),e.groupCode&&d_(this,aL,"f").validate(e.groupCode,r),e.lastUpdated&&d_(this,oL,"f").validate(e.lastUpdated,r)}}aL=new WeakMap,oL=new WeakMap;class Mme{validate(e,r){e.length===0&&r.add("Prescription array must not be empty.")}}class n3 extends na{constructor(){super(...arguments),uL.set(this,new Mme),cL.set(this,new Jf)}validate(e,r){super.validate(e,r),e.lastUpdated!==void 0&&d_(this,cL,"f").validate(e.lastUpdated,r),e.prescription!==void 0&&d_(this,uL,"f").validate(e.prescription,r)}}uL=new WeakMap,cL=new WeakMap;class Dme extends na{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 Nme extends ia{constructor(){super(...arguments),this.validator=new r3}}class YZe extends null{}class WZe extends null{}class KZe extends null{}class XZe extends null{}class ZZe extends null{}class JZe extends null{}class eJe extends null{}class tJe extends null{}class rJe extends null{}class nJe extends null{}class iJe extends null{}class sJe extends null{}class aJe extends null{}class oJe extends null{}class uJe extends null{}class cJe extends null{}class lJe extends null{}class dJe extends null{}class fJe extends null{}class hJe extends null{}class wme extends n3{constructor(){super(...arguments),lL.set(this,new eh)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&d_(this,lL,"f").validate(e.medicationCode,r)}}lL=new WeakMap;class pJe extends ia{constructor(){super(...arguments),this.validator=new n3}}class _Je extends ia{constructor(){super(...arguments),this.validator=new wme}}class Lme extends r3{constructor(){super(...arguments),dL.set(this,new eh)}validate(e,r){super.validate(e,r),e.medicationCode!==void 0&&d_(this,dL,"f").validate(e.medicationCode,r)}}dL=new WeakMap;class mJe extends Nme{constructor(){super(...arguments),this.validator=new Lme}}class gJe extends null{}class vJe extends null{}class SJe extends ia{constructor(){super(...arguments),this.validator=new Dme}}class Ume{validate(e,r){Bs(e.medicationStatementId)&&r.add("The medication pricing request must possess a medication statement id.")}}class yJe extends Qn{constructor(){super(...arguments),this.validator=new Ume}}class $me{validate(e,r){Bs(e.bodySystemId)&&r.add("The body system score request must contain a body system id.")}}class EJe extends Qn{constructor(){super(...arguments),this.validator=new $me}}class xme extends na{validate(e,r){Bs(e.medicationStatementId)&&r.add("The medication knowledge request must possess a medication statement id."),super.validate(e,r)}}class TJe extends ia{constructor(){super(...arguments),this.validator=new xme}}class Fme extends na{validate(e,r){Bs(e.labId)&&r.add("The lab knowledge request must contain a lab id."),super.validate(e,r)}}class AJe extends ia{constructor(){super(...arguments),this.validator=new Fme}}var i3;(function(t){t.Active="ACTIVE",t.Completed="COMPLETED"})(i3||(i3={}));class Gme{validate(e,r){ha(e)&&r.add("input must be provided."),sa(e.id)&&r.add("id must be a non-empty string."),ha(e.status)&&r.add("status is required.")}}class bJe extends Qn{constructor(){super(...arguments),this.validator=new Gme}}const kme=new Set(Object.values(iL));function s3(t){return kme.has(t)}var Vme=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)},fL,a3;class Bme extends na{constructor(){super(...arguments),fL.add(this)}validate(e,r){if(super.validate(e,r),!pa(e.status)){const n=Array.isArray(e.status)?e.status:[e.status];for(const i of n)Vme(this,fL,"m",a3).call(this,i,r)}}}fL=new WeakSet,a3=function(e,r){s3(e)||r.add(`Invalid task status: "${e}"`)};class CJe extends ia{constructor(){super(...arguments),this.validator=new Bme}}class jme{validate(e,r){s3(e.newStatus)||r.add(`Invalid task status: "${e.newStatus}"`)}}class RJe extends Qn{constructor(){super(...arguments),this.validator=new jme}}var Cb=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_,o3,u3,c3,l3;class OJe extends ia{constructor(){super(...arguments),this.validator=new qme}}class qme extends na{constructor(){super(...arguments),f_.add(this)}validate(e,r){super.validate(e,r),Xn(e.organizationTypeFilters)&&Cb(this,f_,"m",o3).call(this,e.organizationTypeFilters,r),Xn(e.sortBy)&&Cb(this,f_,"m",u3).call(this,e.sortBy,r),Xn(e.filterFields)&&Cb(this,f_,"m",c3).call(this,e.filterFields,r),Xn(e.gender)&&Cb(this,f_,"m",l3).call(this,e.gender,r)}}f_=new WeakSet,o3=function(e,r){for(const n of e)Hme(n)||r.add(`Invalid organizationTypeFilters value: "${n}"`)},u3=function(e,r){Xn(e.field)&&!Yme(e.field)&&r.add(`Invalid sortBy.field value: "${e.field}"`),Xn(e.order)&&!Kme(e.order)&&r.add(`Invalid sortBy.order value: "${e.order}"`)},c3=function(e,r){for(const n of e)Zme(n)||r.add(`Invalid filterField value: "${n}"`)},l3=function(e,r){Y2(e)||r.add(`Invalid gender value: "${e}"`)};const Qme=new Set(Object.values(rL));function Hme(t){return Qme.has(t)}const zme=new Set(Object.values(nL));function Yme(t){return zme.has(t)}const Wme=new Set(Object.values(Ab));function Kme(t){return Wme.has(t)}const Xme=new Set(Object.values(Jw));function Zme(t){return Xme.has(t)}class PJe extends null{}class IJe extends ia{constructor(){super(...arguments),this.validator=new Jme}}class Jme extends na{validate(e,r){super.validate(e,r)}}const ege="data-connection-status";var tge=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)},hL;const rge="connectionId cannot be null or empty",nge="username cannot be null or empty",ige="password cannot be null or empty",sge="integrationType array cannot be empty",age="integrationType array cannot contain blank or empty strings",oge="status array cannot be empty",uge="status array cannot contain blank or empty strings";class d3{validate(e,r){e.connectionId===""&&r.add(rge)}}class cge{constructor(){hL.set(this,new d3)}validate(e,r){tge(this,hL,"f").validate(e,r),e.integrationType!=="DIRECT"&&(sa(e.username)&&r.add(nge),sa(e.password)&&r.add(ige))}}hL=new WeakMap;class lge extends Qn{constructor(){super(...arguments),this.validator=new d3}}class MJe extends null{}class DJe extends null{}class NJe extends lge{constructor(){super(...arguments),this.validator=new cge}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 wJe extends Qn{constructor(){super(...arguments),this.validator={validate:(e,r)=>{e.integrationType!==void 0&&e.integrationType!==null&&(e.integrationType.length===0&&r.add(sge),e.integrationType.some(n=>n===""||n.trim()==="")&&r.add(age)),e.status!==void 0&&e.status!==null&&(e.status.length===0&&r.add(oge),e.status.some(n=>n===""||n.trim()==="")&&r.add(uge))}}}data(){return this.input()}}const dge="deviceToken is required",fge="platformName must be a valid DevicePlatform value",hge="applicationName is required",pge="connectionId is required";var pL;(function(t){t.IOS="IOS",t.ANDROID="ANDROID"})(pL||(pL={}));const _ge=new Set(Object.values(pL));function mge(t){return _ge.has(t)}function gge(t){return!mge(t)}class f3{validate(e,r){Bs(e.deviceToken)&&r.add(dge)}}class vge extends f3{validate(e,r){super.validate(e,r),gge(e.platformName.toUpperCase())&&r.add(fge),Bs(e.applicationName)&&r.add(hge)}}class LJe extends Qn{constructor(){super(...arguments),this.validator=new vge}}class UJe extends Qn{constructor(){super(...arguments),this.validator=new f3}}class _L{validate(e,r){Bs(e.connectionId)&&r.add(pge)}}class $Je extends Qn{constructor(){super(...arguments),this.validator=new _L}}class xJe extends Qn{constructor(){super(...arguments),this.validator=new _L}}class FJe extends Qn{constructor(){super(...arguments),this.validator=new _L}}const Sge="string parameter serializedNotification must be provided",yge="serialized notification must have a non-empty notification_id field of type string",h3="serialized notification must have an itbl object containing a non-empty messageId field of type string",Ege="parsed notification must be a non-null object.",Tge="serialized notification is not valid JSON.";class Age{validate(e,r){if(pa(e.serializedNotification)||typeof e.serializedNotification!="string"||Bs(e.serializedNotification)){r.add(Sge);return}let n=null;try{n=JSON.parse(e.serializedNotification)}catch{r.add(Tge);return}if(typeof n!="object"||n===null){r.add(Ege);return}const{itbl:i,notification_id:s}=n;if((pa(s)||typeof s!="string"||Bs(s))&&r.add(yge),typeof i!="object"||ha(i)){r.add(h3);return}(pa(i.messageId)||typeof i.messageId!="string"||Bs(i.messageId))&&r.add(h3)}}class GJe extends Qn{constructor(){super(...arguments),this.validator=new Age}}var mL=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)},eS;class bge extends na{constructor(){super(...arguments),eS.set(this,new Jf)}validate(e,r){(pa(e.coverage)||Bs(e.coverage))&&r.add("The claim summary request must contain a coverage ID."),Xn(e.dateReceived)&&mL(this,eS,"f").validate(e.dateReceived,r),Xn(e.servicePeriod)&&mL(this,eS,"f").validate(e.servicePeriod,r),Xn(e.dateProcessed)&&mL(this,eS,"f").validate(e.dateProcessed,r),super.validate(e,r)}}eS=new WeakMap;class kJe extends ia{constructor(){super(...arguments),this.validator=new bge}}const Cge="SearchReference value should be a non-empty string";class p3{validate(e,r){ha(e.value)||(typeof e.value!="string"||Bs(e.value))&&r.add(Cge)}}const Rge="SearchStringValue should be a non-empty string";class tS{validate(e,r){if(ha(e.values))return;let n=!1;for(const i of e.values)Bs(i)&&(n=!0);n&&r.add(Rge)}}var Rb=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)},gL,vL,Ob;class Oge extends na{constructor(){super(...arguments),gL.set(this,new tS),vL.set(this,new Jf),Ob.set(this,new p3)}validate(e,r){super.validate(e,r),Xn(e.id)&&Rb(this,gL,"f").validate(e.id,r),Xn(e.lastUpdated)&&Rb(this,vL,"f").validate(e.lastUpdated,r),Xn(e.beneficiary)&&Rb(this,Ob,"f").validate(e.beneficiary,r),Xn(e.patient)&&Rb(this,Ob,"f").validate(e.patient,r)}}gL=new WeakMap,vL=new WeakMap,Ob=new WeakMap;class VJe extends ia{constructor(){super(...arguments),this.validator=new Oge}}class Pge extends na{validate(e,r){super.validate(e,r)}}class BJe extends ia{constructor(){super(...arguments),this.validator=new Pge}}class Ige{validate(e,r){(pa(e.claimId)||Bs(e.claimId))&&r.add("The EOB document request must contain a claimId.")}}class jJe extends Qn{constructor(){super(...arguments),this.validator=new Ige}}var th=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,Pb,rS,yL;class Mge extends na{constructor(){super(...arguments),SL.set(this,new tS),Pb.set(this,new Jf),rS.set(this,new p3),yL.set(this,new eh)}validate(e,r){super.validate(e,r),Xn(e.id)&&th(this,SL,"f").validate(e.id,r),Xn(e.lastUpdated)&&th(this,Pb,"f").validate(e.lastUpdated,r),Xn(e.created)&&th(this,Pb,"f").validate(e.created,r),Xn(e.patient)&&th(this,rS,"f").validate(e.patient,r),Xn(e.provider)&&th(this,rS,"f").validate(e.provider,r),Xn(e.coverage)&&th(this,rS,"f").validate(e.coverage,r),Xn(e.status)&&th(this,yL,"f").validate(e.status,r)}}SL=new WeakMap,Pb=new WeakMap,rS=new WeakMap,yL=new WeakMap;class qJe extends ia{constructor(){super(...arguments),this.validator=new Mge}}var EL=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)},TL,AL,bL;class Dge{constructor(){TL.set(this,new Jf),AL.set(this,new tS),bL.set(this,new eh)}validate(e,r){var n;gn(e._source)&&EL(this,AL,"f").validate(e._source,r),gn(e.date)&&EL(this,TL,"f").validate(e.date,r),gn(e._count)&&e._count<0&&r.add("Value of count cannot be less than 0"),gn(e._getpagesoffset)&&e._getpagesoffset<0&&r.add("Value of getpagesoffset cannot be less than 0"),gn((n=e.supporting_info)===null||n===void 0?void 0:n.value)&&Bs(e.supporting_info.value)&&r.add("Supporting Information must have a non-empty value."),gn(e.status)&&EL(this,bL,"f").validate(e.status,r)}}TL=new WeakMap,AL=new WeakMap,bL=new WeakMap;class QJe extends Qn{constructor(){super(...arguments),this.validator=new Dge}}class Nge{validate(e,r){if(!ha(e.cancelationReason)){if(ha(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)(ha(n?.code)||ha(n?.system))&&r.add("cancelationReason.coding must have a code and a system")}}}class HJe extends Qn{constructor(){super(...arguments),this.validator=new Nge}}class wge{validate(e,r){if(ha(e.notificationPreferences)||e.notificationPreferences.length===0){r.add("notificationPreferences is required and must not be empty");return}e.notificationPreferences.forEach((n,i)=>{ha(n.method)&&r.add(`notificationPreferences[${i}].method is required`),ha(n.enabled)&&r.add(`notificationPreferences[${i}].enabled is required`)})}}class zJe extends Qn{constructor(){super(...arguments),this.validator=new wge}}class Lge{validate(e,r){var n;sa((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 YJe extends Qn{constructor(){super(...arguments),this.validator=new Lge}}class Ib{validate(e,r,n={}){const{requireRole:i=!0}=n;gn(e.id)?Bs(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"),gn(e.type)?Bs(e.type)&&r.add("Member type cannot be empty"):r.add("Member type is required");const s=gn(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];gn(o)?Bs(o)&&r.add(`Role ${a}: Cannot be blank`):r.add(`Role ${a}: Cannot be null or undefined`)}}}class WJe extends Qn{constructor(){super(...arguments),this.validator=new Ib}}class Uge{constructor(){this.updateValidator=new Ib}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!1})}}class KJe extends Qn{constructor(){super(...arguments),this.validator=new Uge}}class $ge{constructor(){this.updateValidator=new Ib}validate(e,r){this.updateValidator.validate(e,r,{requireRole:!0})}}class XJe extends Qn{constructor(){super(...arguments),this.validator=new $ge}}class xge{constructor(){this.updateValidator=new Ib}validate(e,r){if(!gn(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(!gn(i)){r.add(`Member ${n}: Cannot be null or undefined`);continue}const s=new VW;this.updateValidator.validate(i,s,{requireRole:!0});for(const a of s.errors())r.add(`Member ${n}: ${a}`)}}}class ZJe extends Qn{constructor(){super(...arguments),this.validator=new xge}}class Fge extends na{validate(e,r){super.validate(e,r)}}class Gge extends ia{constructor(){super(...arguments),this.validator=new Fge}}class kge{validate(e,r){const n=e.questionnaireResponse;if(ha(n)){r.add("questionnaireResponse is required");return}if((sa(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),sa(n.status)&&r.add("questionnaireResponse.status is required"),sa(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required"),ha(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(ha(s)){r.add("questionnaireResponse.contained item cannot be null or undefined");break}if(s.resourceType==="Questionnaire"){i=s;break}}if(ha(i)){r.add("questionnaireResponse.contained must contain a Questionnaire resource");return}sa(i.id)&&r.add("questionnaireResponse.contained Questionnaire resource must have an id")}}}class JJe extends Qn{constructor(){super(...arguments),this.validator=new kge}}class Vge{validate(e,r){const n=e.questionnaireResponse;if(ha(n)){r.add("questionnaireResponse is required");return}(sa(n.resourceType)||n.resourceType!=="QuestionnaireResponse")&&r.add('questionnaireResponse.resourceType must be "QuestionnaireResponse"'),sa(n.status)&&r.add("questionnaireResponse.status is required"),sa(n.questionnaire)&&r.add("questionnaireResponse.questionnaire is required")}}class eet extends Qn{constructor(){super(...arguments),this.validator=new Vge}}var Mb=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)},CL,RL,Db;class Bge extends na{constructor(){super(...arguments),CL.set(this,new Jf),RL.set(this,new tS),Db.set(this,new eh)}validate(e,r){super.validate(e,r),gn(e.id)&&Mb(this,RL,"f").validate(e.id,r),gn(e.lastUpdated)&&Mb(this,CL,"f").validate(e.lastUpdated,r),gn(e.status)&&Mb(this,Db,"f").validate(e.status,r),gn(e.tag)&&Mb(this,Db,"f").validate(e.tag,r)}}CL=new WeakMap,RL=new WeakMap,Db=new WeakMap;class tet extends ia{constructor(){super(...arguments),this.validator=new Bge}}var nS=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)},OL,h_;class jge extends na{constructor(){super(...arguments),OL.set(this,new tS),h_.set(this,new eh)}validate(e,r){super.validate(e,r),gn(e.id)&&nS(this,OL,"f").validate(e.id,r),gn(e.tag)&&nS(this,h_,"f").validate(e.tag,r),gn(e.security)&&nS(this,h_,"f").validate(e.security,r),gn(e.context)&&nS(this,h_,"f").validate(e.context,r),gn(e.identifier)&&nS(this,h_,"f").validate(e.identifier,r)}}OL=new WeakMap,h_=new WeakMap;class ret extends ia{constructor(){super(...arguments),this.validator=new jge}}class qge extends na{validate(e,r){super.validate(e,r)}}class net extends ia{constructor(){super(...arguments),this.validator=new qge}}class Qge{constructor(){this.dataURIRegex=/^data:[a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+;base64,([A-Za-z0-9+/]*={0,2})$/}validate(e,r){e.file.trim()||r.add("File content is required"),e.file.trim()&&!this.dataURIRegex.test(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 iet extends Qn{constructor(){super(...arguments),this.validator=new Qge}}class Hge{validate(e,r){e.attachmentId.trim()||r.add("Attachment ID is required")}}class set extends Qn{constructor(){super(...arguments),this.validator=new Hge}}class zge{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 aet extends Qn{constructor(){super(...arguments),this.validator=new zge}}class Yge extends na{validate(e,r){super.validate(e,r)}}class oet extends ia{constructor(){super(...arguments),this.validator=new Yge}}class Wge extends na{validate(e,r){e.requestId<0&&r.add("requestId must be a non-negative number"),super.validate(e,r)}}class uet extends ia{constructor(){super(...arguments),this.validator=new Wge}}class Kge{validate(e,r){e.requestId<0&&r.add("Request ID must be a non-negative integer"),sa(e.body.trim())&&r.add("Comment body is required")}}class cet extends Qn{constructor(){super(...arguments),this.validator=new Kge}}class Xge{validate(e,r){sa(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 det extends Qn{constructor(){super(...arguments),this.validator=new Xge}}const Zge="code cannot be null or empty";class Jge{validate(e,r){sa(e.code)&&r.add(Zge)}}class fet extends Qn{constructor(){super(...arguments),this.validator=new Jge}}const eve="consentId cannot be null or empty";class tve{validate(e,r){sa(e.consentId)&&r.add(eve)}}class rve extends Qn{constructor(){super(...arguments),this.validator=new tve}}var PL=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(d){try{l(n.next(d))}catch(m){a(m)}}function c(d){try{l(n.throw(d))}catch(m){a(m)}}function l(d){d.done?s(d.value):i(d.value).then(o,c)}l((n=n.apply(t,e||[])).next())})};class IL{constructor(e=new Map){this.storage=e}get(e){return PL(this,void 0,void 0,function*(){return this.storage.get(e)})}set(e,r){return PL(this,void 0,void 0,function*(){this.storage.set(e,r)})}delete(e){return PL(this,void 0,void 0,function*(){return this.storage.delete(e)})}}const nve={logLevel:eL.Error,timeout:3e4,retryPolicy:{attempts:3,interval:1e3},telemetryEnabled:!1,tokenStorage:new IL,language:null,overrides:{unauthedApiUrl:null,authedApiUrl:null}};var rl;(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"})(rl||(rl={}));var ive=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},_3=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,Rn;(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"})(Rn||(Rn={}));const sve={[Rn.VERBOSE]:"VERBOSE",[Rn.DEBUG]:"DEBUG",[Rn.INFO]:"INFO",[Rn.WARN]:"WARN",[Rn.ERROR]:"ERROR",[Rn.FATAL]:"FATAL"};class p_{constructor(e){iS.set(this,void 0),ive(this,iS,e,"f")}get severity(){return _3(this,iS,"f")}shouldLog(e){return e>=_3(this,iS,"f")}static severityText(e){return sve[e]}static severityFromText(e){switch(e){case"VERBOSE":return Rn.VERBOSE;case"DEBUG":return Rn.DEBUG;case"INFO":return Rn.INFO;case"WARN":return Rn.WARN;case"ERROR":return Rn.ERROR;case"FATAL":return Rn.FATAL;default:throw new Error(`Invalid severity text: ${e}`)}}}iS=new WeakMap;var 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},pc=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)},ld,m3,Nb,sS,wb,rh;class g3{constructor(e,r,n){ld.add(this),Nb.set(this,void 0),sS.set(this,void 0),wb.set(this,void 0),ML(this,Nb,n,"f"),ML(this,sS,new p_(e),"f"),ML(this,wb,r,"f")}name(){return pc(this,Nb,"f")}severity(){return pc(this,sS,"f").severity}verbose(e,r){pc(this,ld,"m",rh).call(this,Rn.VERBOSE,e,r)}debug(e,r){pc(this,ld,"m",rh).call(this,Rn.DEBUG,e,r)}info(e,r){pc(this,ld,"m",rh).call(this,Rn.INFO,e,r)}warn(e,r){pc(this,ld,"m",rh).call(this,Rn.WARN,e,r)}error(e,r){let n;r instanceof fr&&(n={error:r.failure()?r.error().message:r.data()}),r instanceof Error&&(n={error:r.message}),n===void 0&&(n=r),pc(this,ld,"m",rh).call(this,Rn.ERROR,e,n)}fatal(e,r){pc(this,ld,"m",rh).call(this,Rn.FATAL,e,r)}static otelSeverityNumber(e){switch(e){case Rn.VERBOSE:return rl.TRACE;case Rn.DEBUG:return rl.DEBUG;case Rn.INFO:return rl.INFO;case Rn.WARN:return rl.WARN;case Rn.ERROR:return rl.ERROR;case Rn.FATAL:return rl.FATAL;default:return rl.UNSPECIFIED}}}m3=g3,Nb=new WeakMap,sS=new WeakMap,wb=new WeakMap,ld=new WeakSet,rh=function(e,r,n){!pc(this,sS,"f").shouldLog(e)||pc(this,wb,"f").emit({timestamp:Date.now(),severityNumber:m3.otelSeverityNumber(e),severityText:p_.severityText(e),body:r,attributes:n??{}})};var v3=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},S3=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)},Lb,Ub;class ave{constructor(e,r){Lb.set(this,void 0),Ub.set(this,void 0),v3(this,Ub,e,"f"),v3(this,Lb,r.loggerProvider(),"f")}getLogger(e){const r=e??"default",n=S3(this,Lb,"f").getLogger(r);return new g3(S3(this,Ub,"f"),n,r)}}Lb=new WeakMap,Ub=new WeakMap;class ove{format(e,r,n,i){let a=`[${new Date().toISOString()}] ${p_.severityText(e)}`;return n!==void 0&&(a+=` (${n})`),a+=`: ${r}`,i===void 0?[a]:[a,i]}}var DL=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)},_c,mc,nl;class uve{constructor(e,r){_c.set(this,void 0),mc.set(this,void 0),nl.set(this,void 0),DL(this,mc,new p_(e),"f"),DL(this,_c,r,"f"),DL(this,nl,new ove,"f")}name(){return js(this,_c,"f")}severity(){return js(this,mc,"f").severity}verbose(e,r){js(this,mc,"f").shouldLog(Rn.VERBOSE)&&console.debug(...js(this,nl,"f").format(Rn.VERBOSE,e,js(this,_c,"f"),r))}debug(e,r){js(this,mc,"f").shouldLog(Rn.DEBUG)&&console.debug(...js(this,nl,"f").format(Rn.DEBUG,e,js(this,_c,"f"),r))}info(e,r){js(this,mc,"f").shouldLog(Rn.INFO)&&console.info(...js(this,nl,"f").format(Rn.INFO,e,js(this,_c,"f"),r))}warn(e,r){js(this,mc,"f").shouldLog(Rn.WARN)&&console.warn(...js(this,nl,"f").format(Rn.WARN,e,js(this,_c,"f"),r))}error(e,r){let n=r;r instanceof fr&&(n=r.failure()?r.error():r.data()),js(this,mc,"f").shouldLog(Rn.ERROR)&&console.error(...js(this,nl,"f").format(Rn.ERROR,e,js(this,_c,"f"),n))}fatal(e,r){js(this,mc,"f").shouldLog(Rn.FATAL)&&console.error(...js(this,nl,"f").format(Rn.FATAL,e,js(this,_c,"f"),r))}}_c=new WeakMap,mc=new WeakMap,nl=new WeakMap;var cve=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},lve=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)},$b;class qs{constructor(e=Rn.FATAL){$b.set(this,void 0),cve(this,$b,e,"f")}getLogger(e){return new uve(lve(this,$b,"f"),e)}}$b=new WeakMap;var dve=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)},NL,y3;class fve{constructor(){NL.add(this)}createLogProvider(e,r){switch(dve(this,NL,"m",y3).call(this,e)){case"otel":if(r===void 0)throw new Error('telemetry is required for "otel" logging');return new ave(e.logLevel,r);case"console":return new qs(e.logLevel)}}}NL=new WeakSet,y3=function(e){return e.telemetry.enabled?"otel":"console"};var zi=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)},il=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},cu,__,dd,m_,fd,nh,E3,T3,A3,b3,C3,R3,O3,P3,I3,M3;class xb{constructor(e){cu.add(this),__.set(this,void 0),dd.set(this,void 0),m_.set(this,void 0),fd.set(this,void 0),nh.set(this,void 0),this.bwellConfig=zi(this,cu,"m",C3).call(this,e),il(this,__,p_.severityFromText(this.bwellConfig.logLevel),"f"),il(this,nh,zi(this,cu,"m",M3).call(this),"f"),il(this,m_,zi(this,cu,"m",O3).call(this),"f"),il(this,dd,zi(this,cu,"m",P3).call(this),"f"),il(this,fd,zi(this,cu,"m",I3).call(this),"f")}static initialize(e){try{const r=new xb(e);return fr.success(r)}catch(r){if(Ca.isBwellError(r))return fr.failure(r);throw r}}get logLevel(){return zi(this,__,"f")}get graphQL(){return zi(this,m_,"f")}get telemetry(){return zi(this,dd,"f")}get http(){return zi(this,fd,"f")}get context(){return zi(this,nh,"f")}setContextUser(e){zi(this,nh,"f").user=e}mergeRemoteConfig(e){il(this,__,zi(this,cu,"m",E3).call(this,e),"f"),il(this,m_,zi(this,cu,"m",T3).call(this,e),"f"),il(this,dd,Object.freeze(zi(this,cu,"m",A3).call(this,e)),"f"),il(this,fd,Object.freeze(zi(this,cu,"m",b3).call(this,e)),"f")}}__=new WeakMap,dd=new WeakMap,m_=new WeakMap,fd=new WeakMap,nh=new WeakMap,cu=new WeakSet,E3=function(e){var r;const n=(r=e?.logLevel)!==null&&r!==void 0?r:null;return n===null?zi(this,__,"f"):p_.severityFromText(n)},T3=function(e){var r;const n=(r=e?.graphQLClient)!==null&&r!==void 0?r:null;if(n===null)return zi(this,m_,"f");const{authedApiUrl:i,unauthedApiUrl:s}=this.bwellConfig.overrides;return{unauthApiUrl:s??n.url,apiUrl:i??n.authUrl}},A3=function(e){var r,n;const i=(r=e?.telemetry)!==null&&r!==void 0?r:null;if(i===null)return zi(this,dd,"f");const s=(n=i.enabled)!==null&&n!==void 0?n:zi(this,dd,"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({},zi(this,dd,"f")),{enabled:s,collectorUrl:i.collectorUrl})},b3=function(e){var r,n,i;const s=(r=e?.httpClient)!==null&&r!==void 0?r:null;return s===null?zi(this,fd,"f"):{timeout:(n=s.requestTimeout)!==null&&n!==void 0?n:zi(this,fd,"f").timeout,retryPolicy:(i=s.retry)!==null&&i!==void 0?i:zi(this,fd,"f").retryPolicy}},C3=function(e){return Object.assign(Object.assign({},nve),e)},R3=function(){try{return lme(this.bwellConfig.clientKey)}catch{throw new rme("It appears there is a problem with your Client Key. Contact b.well support for further assistance.")}},O3=function(){var e,r;return{apiUrl:(e=this.bwellConfig.overrides.authedApiUrl)!==null&&e!==void 0?e:`https://api-gateway.${zi(this,nh,"f").env}.icanbwell.com/federated-graph-authed/graphql`,unauthApiUrl:(r=this.bwellConfig.overrides.unauthedApiUrl)!==null&&r!==void 0?r:`https://api-gateway.${zi(this,nh,"f").env}.icanbwell.com/federated-graph/graphql`}},P3=function(){return{collectorUrl:"https://collector.services.icanbwell.com",enabled:this.bwellConfig.telemetryEnabled,timeout:this.bwellConfig.timeout}},I3=function(){return{timeout:this.bwellConfig.timeout,retryPolicy:{attempts:this.bwellConfig.retryPolicy.attempts,interval:this.bwellConfig.retryPolicy.interval}}},M3=function(){return{clientKey:this.bwellConfig.clientKey,env:zi(this,cu,"m",R3).call(this),user:null}};var hve=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(d){try{l(n.next(d))}catch(m){a(m)}}function c(d){try{l(n.throw(d))}catch(m){a(m)}}function l(d){d.done?s(d.value):i(d.value).then(o,c)}l((n=n.apply(t,e||[])).next())})},D3=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},Fb=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)},g_,Gb;class pve{constructor(e,r=new qs){g_.set(this,void 0),Gb.set(this,void 0),D3(this,Gb,e,"f"),D3(this,g_,r.getLogger("ConfigManager"),"f")}initialize(e){return hve(this,void 0,void 0,function*(){const r=xb.initialize(e);if(r.failure())return r;const n=r.data();Fb(this,g_,"f").verbose("Initializing SDK Configuration");const i=yield Fb(this,Gb,"f").initialize(n.context.clientKey);if(i.failure())return i.intoFailure();const s=i.data();try{n.mergeRemoteConfig(s)}catch(a){Fb(this,g_,"f").error("Error merging SDK config with remote config.",a)}return Fb(this,g_,"f").info("Remote SDK Configuration merged with user config"),fr.success(n)})}}g_=new WeakMap,Gb=new WeakMap;class hd extends Error{response;request;constructor(e,r){const n=`${hd.extractMessage(e)}: ${JSON.stringify({response:e,request:r})}`;super(n),Object.setPrototypeOf(this,hd.prototype),this.response=e,this.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,hd)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${String(e.status)})`}}const N3=t=>t.toUpperCase(),wL=t=>typeof t=="function"?t():t,w3=(t,e)=>t.map((r,n)=>[r,e[n]]),v_=t=>{let e={};return t instanceof Headers?e=_ve(t):Array.isArray(t)?t.forEach(([r,n])=>{r&&n!==void 0&&(e[r]=n)}):t&&(e=t),e},_ve=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},mve=t=>{try{const e=t();return gve(e)?e.catch(r=>L3(r)):e}catch(e){return L3(e)}},L3=t=>t instanceof Error?t:new Error(String(t)),gve=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",LL=t=>{throw new Error(`Unhandled case: ${String(t)}`)},kb=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),het=t=>Object.entries(t),pet=t=>Object.values(t),_et=(t,e)=>Object.fromEntries(Object.entries(t).map(([r,n])=>[r,e(n,r)])),met=t=>t.charAt(0).toLowerCase()+t.slice(1);function get(t){if(!Array.isArray(t))throw new Error(`Expected array. Got: ${String(t)}`)}function vet(t){if(t===null||typeof t!="object")throw new Error(`Expected object. Got: ${String(t)}`)}const yet=t=>t.charAt(0).toUpperCase()+t.slice(1),Eet=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)}},vve=(...t)=>{process.env.DEBUG&&console.log(...t)},Tet=(...t)=>(...e)=>{vve(...t,...e)},Aet=t=>{const e=[],r=[];for(const n of t)n instanceof Error?e.push(n):r.push(n);return[r,e]},bet=async(...t)=>{const e=Sve(t);return new GraphQLClient(e.url).batchRequests(e)},Sve=t=>t.length===1?t[0]:{url:t[0],documents:t[1],requestHeaders:t[2],signal:void 0},yve=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},Cet=async(...t)=>{const[e,r,...n]=t,i=Eve(e,r,...n);return new GraphQLClient(i.url).rawRequest({...i})},Eve=(t,e,...r)=>{const[n,i]=r;return typeof t=="string"?{url:t,query:e,variables:n,requestHeaders:i,signal:void 0}:t},Tve=(t,e,r)=>t.query?t:{query:t,variables:e,requestHeaders:r,signal:void 0};var Ave=g(2455);const U3="Accept",UL="Content-Type",$L="application/json",$3="application/graphql-response+json",Ret={success:200},x3=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),bve=t=>{const e=t.toLowerCase();return e.includes($3)||e.includes($L)},F3=t=>{try{if(Array.isArray(t))return{_tag:"Batch",executionResults:t.map(G3)};if(kb(t))return{_tag:"Single",executionResult:G3(t)};throw new Error(`Invalid execution result: result is not object or array.
13376
13376
  Got:
13377
13377
  ${String(t)}`)}catch(e){return e}},G3=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(!kb(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(!kb(t.data)&&t.data!==null)throw new Error("Invalid execution result: data is not plain object");r=t.data}if("extensions"in t){if(!kb(t.extensions))throw new Error("Invalid execution result: extensions is not plain object");n=t.extensions}return{data:r,errors:e,extensions:n}},Cve=t=>t._tag==="Batch"?t.executionResults.some(k3):k3(t.executionResult),k3=t=>Array.isArray(t.errors)?t.errors.length>0:Boolean(t.errors),V3=t=>typeof t=="object"&&t!==null&&"kind"in t&&t.kind===Ave.b.OPERATION_DEFINITION;var Rve=g(5157),Ove=g(2704);const Pve=t=>{let e;const r=t.definitions.filter(V3);return r.length===1&&(e=r[0].name?.value),e},Ive=t=>{let e=!1;const r=t.definitions.filter(V3);return r.length===1&&(e=r[0].operation==="mutation"),e},xL=(t,e)=>{const r=typeof t=="string"||"kind"in t?t:String(t),n=typeof r=="string"?r:(0,Ove.y)(r);let i=!1,s;if(e)return{expression:n,isMutation:i,operationName:s};const a=mve(()=>typeof r=="string"?(0,Rve.qg)(r):r);return a instanceof Error?{expression:n,isMutation:i,operationName:s}:(s=Pve(a),i=Ive(a),{expression:n,operationName:s,isMutation:i})},FL=JSON,GL=async t=>{const e={...t,method:t.request._tag==="Single"?t.request.document.isMutation?"POST":N3(t.method??"post"):t.request.hasMutations?"POST":N3(t.method??"post"),fetchOptions:{...t.fetchOptions,errorPolicy:t.fetchOptions.errorPolicy??"none"}},n=await Dve(e.method)(e),i=await n.text();let s;try{s=Mve(i,n.headers.get(UL),t.fetchOptions.jsonSerializer??FL)}catch(o){s=o}const a={status:n.status,headers:n.headers,body:i};if(!n.ok){if(s instanceof Error)return new hd({...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 hd(o,{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables})}if(s instanceof Error)throw s;if(Cve(s)&&e.fetchOptions.errorPolicy==="none"){const o=s._tag==="Batch"?{...s.executionResults,...a}:{...s.executionResult,...a};return new hd(o,{query:t.request._tag==="Single"?t.request.document.expression:t.request.query,variables:t.request.variables})}switch(s._tag){case"Single":return{...a,...B3(e)(s.executionResult)};case"Batch":return{...a,data:s.executionResults.map(B3(e))};default:LL(s)}},B3=t=>e=>({extensions:e.extensions,data:e.data,errors:t.fetchOptions.errorPolicy==="all"?e.errors:void 0}),Mve=(t,e,r)=>e&&bve(e)?F3(r.parse(t)):F3(t),Dve=t=>async e=>{const r=new Headers(e.headers);let n=null,i;r.has(U3)||r.set(U3,[$3,$L].join(", ")),t==="POST"?(i=(e.fetchOptions.jsonSerializer??FL).stringify(Nve(e)),typeof i=="string"&&!r.has(UL)&&r.set(UL,$L)):n=wve(e);const s={method:t,headers:r,body:i,...e.fetchOptions};let a=new URL(e.url),o=s;if(e.middleware){const l=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:d,...m}=l;a=new URL(d),o=m}return n&&n.forEach((l,d)=>{a.searchParams.append(d,l)}),await(e.fetch??fetch)(a,o)},Nve=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 w3(t.request.query,t.request.variables??[]).map(([e,r])=>({query:e,variables:r}));default:throw LL(t.request)}},wve=t=>{const e=t.fetchOptions.jsonSerializer??FL,r=new URLSearchParams;switch(t.request._tag){case"Single":return r.append("query",x3(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(x3),s=w3(i,n).map(([a,o])=>({query:a,variables:o}));return r.append("query",e.stringify(s)),r}default:throw LL(t.request)}};class Lve{url;requestConfig;constructor(e,r={}){this.url=e,this.requestConfig=r}rawRequest=async(...e)=>{const[r,n,i]=e,s=Tve(r,n,i),{headers:a,fetch:o=globalThis.fetch,method:c="POST",requestMiddleware:l,responseMiddleware:d,excludeOperationName:m,...C}=this.requestConfig,{url:k}=this;s.signal!==void 0&&(C.signal=s.signal);const V=xL(s.query,m),q=await GL({url:k,request:{_tag:"Single",document:V,variables:s.variables},headers:{...v_(wL(a)),...v_(s.requestHeaders)},fetch:o,method:c,fetchOptions:C,middleware:l});if(d&&await d(q,{operationName:V.operationName,variables:n,url:this.url}),q instanceof Error)throw q;return q};async request(e,...r){const[n,i]=r,s=Uve(e,n,i),{headers:a,fetch:o=globalThis.fetch,method:c="POST",requestMiddleware:l,responseMiddleware:d,excludeOperationName:m,...C}=this.requestConfig,{url:k}=this;s.signal!==void 0&&(C.signal=s.signal);const V=xL(s.document,m),q=await GL({url:k,request:{_tag:"Single",document:V,variables:s.variables},headers:{...v_(wL(a)),...v_(s.requestHeaders)},fetch:o,method:c,fetchOptions:C,middleware:l});if(d&&await d(q,{operationName:V.operationName,variables:s.variables,url:this.url}),q instanceof Error)throw q;return q.data}async batchRequests(e,r){const n=yve(e,r),{headers:i,excludeOperationName:s,...a}=this.requestConfig;n.signal!==void 0&&(a.signal=n.signal);const o=n.documents.map(({document:C})=>xL(C,s)),c=o.map(({expression:C})=>C),l=o.some(({isMutation:C})=>C),d=n.documents.map(({variables:C})=>C),m=await GL({url:this.url,request:{_tag:"Batch",operationName:void 0,query:c,hasMutations:l,variables:d},headers:{...v_(wL(i)),...v_(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(m,{operationName:void 0,variables:d,url:this.url}),m instanceof Error)throw m;return m.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}}async function Oet(t,e,...r){const n=$ve(t,e,...r);return new GraphQLClient(n.url).request({...n})}const Uve=(t,e,r)=>t.document?t:{document:t,variables:e,requestHeaders:r,signal:void 0},$ve=(t,e,...r)=>{const[n,i]=r;return typeof t=="string"?{url:t,document:e,variables:n,requestHeaders:i,signal:void 0}:t},Pet=null,Qs=`
13378
13378
  fragment CodingFields on Coding {
@@ -17281,6 +17281,9 @@ ${$a}`,Aye=`
17281
17281
  }
17282
17282
  managingOrganization {
17283
17283
  reference
17284
+ resource {
17285
+ name
17286
+ }
17284
17287
  }
17285
17288
  }
17286
17289
  ... on RelatedPerson {