@memberjunction/ng-realtime-widget 6.2.0-edge.8 → 6.2.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.
@@ -31600,7 +31600,7 @@ if this limit is exceeded.`),MinExecutionsPerRun:t.number().nullable().describe(
31600
31600
  }
31601
31601
  }
31602
31602
  }
31603
- `,a={entityName:e.EntityName,valuesJSON:JSON.stringify(e.Values)},n=await this._dataProvider.ExecuteGQL(i,a);return this.processDuplicateEntryCheckResult(n)}catch(i){return this.handleDuplicateEntryCheckError(i)}}processDuplicateEntryCheckResult(e){let i=e?.CheckDuplicateEntry;if(!i)throw new Error("Invalid response from server");let a=i.ElapsedMs??void 0;if(!this.isDuplicateEntryCheckStatus(i.Status))return{Status:"Failed",ErrorMessage:`The server returned an unknown status '${i.Status}'`,Candidates:[],ElapsedMs:a};let n={Status:i.Status,Candidates:(i.Candidates??[]).map(s=>({RecordID:s.RecordID,DisplayName:s.DisplayName,VectorScore:s.VectorScore,Probability:s.Probability??null})),ElapsedMs:a};return i.ErrorMessage&&(n.ErrorMessage=i.ErrorMessage),n}isDuplicateEntryCheckStatus(e){return e==="Checked"||e==="NotConfigured"||e==="NotAuthorized"||e==="Failed"}handleDuplicateEntryCheckError(e){let i=e instanceof Error?e.message:String(e);return T(`Error checking for a duplicate entry: ${i}`),{Status:"Failed",ErrorMessage:i||"Unknown error occurred",Candidates:[]}}},So="6.2.0-edge.8",et="default",Io=class{static{l(this,"_e")}static{v(this,"BrowserStorageProviderBase")}constructor(){this._storage=new Map}get SharesReferences(){return!0}get SupportsCrossProcessPersistence(){return!1}getCategoryMap(e){let i=e||et,a=this._storage.get(i);return a||(a=new Map,this._storage.set(i,a)),a}async GetItem(e,i){let a=this.getCategoryMap(i||et).get(e);return a===void 0?null:a}async GetItems(e,i){let a=new Map;if(e.length===0)return a;let n=this.getCategoryMap(i||et);for(let s of new Set(e)){let o=n.get(s);a.set(s,o===void 0?null:o)}return a}async SetItem(e,i,a){this.getCategoryMap(a||et).set(e,i)}async Remove(e,i){this.getCategoryMap(i||et).delete(e)}async ClearCategory(e){let i=e||et;this._storage.delete(i)}async GetCategoryKeys(e){let i=this._storage.get(e||et);return i?Array.from(i.keys()):[]}},eR="MJ_Metadata",tR=0;function BI(){try{let r=So.split("."),e=parseInt(r[0],10),i=parseInt(r[1],10);if(!Number.isFinite(e)||!Number.isFinite(i))throw new Error(`Could not parse major.minor from version "${So}"`);return e*1e3+i+tR}catch(r){return Me({error:r,message:"Failed to derive IDB version from PACKAGE_VERSION; using fallback 99999"}),99999}}l(BI,"Pt");v(BI,"computeIdbVersion");var iR=BI(),pI=["mj:default","mj:Metadata","mj:RunViewCache","mj:RunQueryCache","mj:DatasetCache"],bo=class extends Io{static{l(this,"Ge")}static{v(this,"BrowserIndexedDBStorageProvider")}constructor(){super(),this._dbReady=!1,this.dbPromise=Nf(eR,iR,{upgrade:v((e,i,a)=>{try{_e(`[IDBCache] Upgrading IndexedDB schema v${i} \u2192 v${a} (package ${So}). Dropping all stores; caches will repopulate on first use.`);for(let n of Array.from(e.objectStoreNames))e.deleteObjectStore(n);for(let n of pI)e.objectStoreNames.contains(n)||e.createObjectStore(n)}catch(n){Me({error:n,message:n?.message})}},"upgrade"),blocked:v((e,i)=>{_e(`[IDBCache] Upgrade from v${e} to v${i} blocked by another tab. Close other tabs to allow the upgrade to proceed.`)},"blocked")}),this.dbPromise.then(e=>{this._dbReady=!0,e.onversionchange=()=>{_e("[IDBCache] DB schema upgraded in another tab \u2014 closing local connection."),e.close(),this._dbReady=!1}}).catch(e=>{Me({error:e,message:"IndexedDB initialization failed: "+e?.message})})}get SharesReferences(){return!1}get SupportsCrossProcessPersistence(){return!0}get IsReady(){return this._dbReady}isKnownCategory(e){let i=`mj:${e}`;return pI.includes(i)}getStoreName(e){let i=e||et;return this.isKnownCategory(i)?`mj:${i}`:"mj:default"}getStoreKey(e,i){let a=i||et;return this.isKnownCategory(a)?e:`[${a}]:${e}`}async SetItem(e,i,a){try{let n=await this.dbPromise,s=this.getStoreName(a),o=this.getStoreKey(e,a),d=n.transaction(s,"readwrite");await d.objectStore(s).put(i,o),await d.done}catch(n){Me({error:n,message:n?.message})}}async GetItem(e,i){try{let a=await this.dbPromise,n=this.getStoreName(i),s=this.getStoreKey(e,i),o=await a.transaction(n).objectStore(n).get(s);return o===void 0?null:o}catch(a){return Me({error:a,message:a?.message}),null}}async GetItems(e,i){let a=new Map;if(e.length===0)return a;try{let n=await this.dbPromise,s=this.getStoreName(i),o=Array.from(new Set(e)),d=o.map(f=>this.getStoreKey(f,i)),u=n.transaction(s,"readonly"),p=u.objectStore(s),h=d.map(f=>p.get(f)),g=await Promise.all(h);await u.done;for(let f=0;f<o.length;f++){let N=g[f];a.set(o[f],N===void 0?null:N)}return a}catch(n){Me({error:n,message:n?.message});for(let s of new Set(e))a.set(s,null);return a}}async Remove(e,i){try{let a=await this.dbPromise,n=this.getStoreName(i),s=this.getStoreKey(e,i),o=a.transaction(n,"readwrite");await o.objectStore(n).delete(s),await o.done}catch(a){Me({error:a,message:a?.message})}}async ClearCategory(e){try{let i=await this.dbPromise,a=e||et,n=this.getStoreName(e);if(this.isKnownCategory(a)){let s=i.transaction(n,"readwrite");await s.objectStore(n).clear(),await s.done}else{let s=`[${a}]:`,o=i.transaction("mj:default","readwrite"),d=o.objectStore("mj:default"),u=await d.getAllKeys();for(let p of u)typeof p=="string"&&p.startsWith(s)&&await d.delete(p);await o.done}}catch(i){Me({error:i,message:i?.message})}}async GetCategoryKeys(e){try{let i=await this.dbPromise,a=e||et,n=this.getStoreName(e),s=await i.transaction(n,"readonly").objectStore(n).getAllKeys();if(this.isKnownCategory(a))return s.map(d=>String(d));let o=`[${a}]:`;return s.map(d=>String(d)).filter(d=>d.startsWith(o)).map(d=>d.slice(o.length))}catch(i){return Me({error:i,message:i?.message}),[]}}},pn=class extends Error{static{l(this,"ce")}static{v(this,"SafeGraphQLError")}constructor(e){super(e.message),this.name=e.name,this.response={status:e.status,errors:e.errors},this.request={query:e.query},this.Code=e.code,this.VariableShape=e.variableShape,this.IsTransportFailure=e.isTransport,this.stack=e.stackFrames?`${e.name}: ${e.message}
31603
+ `,a={entityName:e.EntityName,valuesJSON:JSON.stringify(e.Values)},n=await this._dataProvider.ExecuteGQL(i,a);return this.processDuplicateEntryCheckResult(n)}catch(i){return this.handleDuplicateEntryCheckError(i)}}processDuplicateEntryCheckResult(e){let i=e?.CheckDuplicateEntry;if(!i)throw new Error("Invalid response from server");let a=i.ElapsedMs??void 0;if(!this.isDuplicateEntryCheckStatus(i.Status))return{Status:"Failed",ErrorMessage:`The server returned an unknown status '${i.Status}'`,Candidates:[],ElapsedMs:a};let n={Status:i.Status,Candidates:(i.Candidates??[]).map(s=>({RecordID:s.RecordID,DisplayName:s.DisplayName,VectorScore:s.VectorScore,Probability:s.Probability??null})),ElapsedMs:a};return i.ErrorMessage&&(n.ErrorMessage=i.ErrorMessage),n}isDuplicateEntryCheckStatus(e){return e==="Checked"||e==="NotConfigured"||e==="NotAuthorized"||e==="Failed"}handleDuplicateEntryCheckError(e){let i=e instanceof Error?e.message:String(e);return T(`Error checking for a duplicate entry: ${i}`),{Status:"Failed",ErrorMessage:i||"Unknown error occurred",Candidates:[]}}},So="6.2.0",et="default",Io=class{static{l(this,"_e")}static{v(this,"BrowserStorageProviderBase")}constructor(){this._storage=new Map}get SharesReferences(){return!0}get SupportsCrossProcessPersistence(){return!1}getCategoryMap(e){let i=e||et,a=this._storage.get(i);return a||(a=new Map,this._storage.set(i,a)),a}async GetItem(e,i){let a=this.getCategoryMap(i||et).get(e);return a===void 0?null:a}async GetItems(e,i){let a=new Map;if(e.length===0)return a;let n=this.getCategoryMap(i||et);for(let s of new Set(e)){let o=n.get(s);a.set(s,o===void 0?null:o)}return a}async SetItem(e,i,a){this.getCategoryMap(a||et).set(e,i)}async Remove(e,i){this.getCategoryMap(i||et).delete(e)}async ClearCategory(e){let i=e||et;this._storage.delete(i)}async GetCategoryKeys(e){let i=this._storage.get(e||et);return i?Array.from(i.keys()):[]}},eR="MJ_Metadata",tR=0;function BI(){try{let r=So.split("."),e=parseInt(r[0],10),i=parseInt(r[1],10);if(!Number.isFinite(e)||!Number.isFinite(i))throw new Error(`Could not parse major.minor from version "${So}"`);return e*1e3+i+tR}catch(r){return Me({error:r,message:"Failed to derive IDB version from PACKAGE_VERSION; using fallback 99999"}),99999}}l(BI,"Pt");v(BI,"computeIdbVersion");var iR=BI(),pI=["mj:default","mj:Metadata","mj:RunViewCache","mj:RunQueryCache","mj:DatasetCache"],bo=class extends Io{static{l(this,"Ge")}static{v(this,"BrowserIndexedDBStorageProvider")}constructor(){super(),this._dbReady=!1,this.dbPromise=Nf(eR,iR,{upgrade:v((e,i,a)=>{try{_e(`[IDBCache] Upgrading IndexedDB schema v${i} \u2192 v${a} (package ${So}). Dropping all stores; caches will repopulate on first use.`);for(let n of Array.from(e.objectStoreNames))e.deleteObjectStore(n);for(let n of pI)e.objectStoreNames.contains(n)||e.createObjectStore(n)}catch(n){Me({error:n,message:n?.message})}},"upgrade"),blocked:v((e,i)=>{_e(`[IDBCache] Upgrade from v${e} to v${i} blocked by another tab. Close other tabs to allow the upgrade to proceed.`)},"blocked")}),this.dbPromise.then(e=>{this._dbReady=!0,e.onversionchange=()=>{_e("[IDBCache] DB schema upgraded in another tab \u2014 closing local connection."),e.close(),this._dbReady=!1}}).catch(e=>{Me({error:e,message:"IndexedDB initialization failed: "+e?.message})})}get SharesReferences(){return!1}get SupportsCrossProcessPersistence(){return!0}get IsReady(){return this._dbReady}isKnownCategory(e){let i=`mj:${e}`;return pI.includes(i)}getStoreName(e){let i=e||et;return this.isKnownCategory(i)?`mj:${i}`:"mj:default"}getStoreKey(e,i){let a=i||et;return this.isKnownCategory(a)?e:`[${a}]:${e}`}async SetItem(e,i,a){try{let n=await this.dbPromise,s=this.getStoreName(a),o=this.getStoreKey(e,a),d=n.transaction(s,"readwrite");await d.objectStore(s).put(i,o),await d.done}catch(n){Me({error:n,message:n?.message})}}async GetItem(e,i){try{let a=await this.dbPromise,n=this.getStoreName(i),s=this.getStoreKey(e,i),o=await a.transaction(n).objectStore(n).get(s);return o===void 0?null:o}catch(a){return Me({error:a,message:a?.message}),null}}async GetItems(e,i){let a=new Map;if(e.length===0)return a;try{let n=await this.dbPromise,s=this.getStoreName(i),o=Array.from(new Set(e)),d=o.map(f=>this.getStoreKey(f,i)),u=n.transaction(s,"readonly"),p=u.objectStore(s),h=d.map(f=>p.get(f)),g=await Promise.all(h);await u.done;for(let f=0;f<o.length;f++){let N=g[f];a.set(o[f],N===void 0?null:N)}return a}catch(n){Me({error:n,message:n?.message});for(let s of new Set(e))a.set(s,null);return a}}async Remove(e,i){try{let a=await this.dbPromise,n=this.getStoreName(i),s=this.getStoreKey(e,i),o=a.transaction(n,"readwrite");await o.objectStore(n).delete(s),await o.done}catch(a){Me({error:a,message:a?.message})}}async ClearCategory(e){try{let i=await this.dbPromise,a=e||et,n=this.getStoreName(e);if(this.isKnownCategory(a)){let s=i.transaction(n,"readwrite");await s.objectStore(n).clear(),await s.done}else{let s=`[${a}]:`,o=i.transaction("mj:default","readwrite"),d=o.objectStore("mj:default"),u=await d.getAllKeys();for(let p of u)typeof p=="string"&&p.startsWith(s)&&await d.delete(p);await o.done}}catch(i){Me({error:i,message:i?.message})}}async GetCategoryKeys(e){try{let i=await this.dbPromise,a=e||et,n=this.getStoreName(e),s=await i.transaction(n,"readonly").objectStore(n).getAllKeys();if(this.isKnownCategory(a))return s.map(d=>String(d));let o=`[${a}]:`;return s.map(d=>String(d)).filter(d=>d.startsWith(o)).map(d=>d.slice(o.length))}catch(i){return Me({error:i,message:i?.message}),[]}}},pn=class extends Error{static{l(this,"ce")}static{v(this,"SafeGraphQLError")}constructor(e){super(e.message),this.name=e.name,this.response={status:e.status,errors:e.errors},this.request={query:e.query},this.Code=e.code,this.VariableShape=e.variableShape,this.IsTransportFailure=e.isTransport,this.stack=e.stackFrames?`${e.name}: ${e.message}
31604
31604
  ${e.stackFrames}`:this.stack}};function KI(r){return r instanceof pn?r:new pn(Lo(r))}l(KI,"Qe");v(KI,"ToSafeGraphQLError");var aR=3,rR=25;function mn(r,e=0){if(r===null)return"null";if(r===void 0)return"undefined";if(Array.isArray(r))return r.length===0?"array(empty)":`array(${r.length} \xD7 ${$I(mn(r[0],e+1))})`;if(typeof r=="object"){if(e>=aR)return"object(\u2026)";let i=Object.keys(r);if(i.length>rR)return`object(${i.length} keys)`;let a={};for(let n of i)a[n]=mn(r[n],e+1);return a}return typeof r=="string"?r.length===0?"string(empty)":"string":typeof r}l(mn,"ue");v(mn,"describeShape");function $I(r){return typeof r=="string"?r:"object"}l($I,"bt");v($I,"typeOf");function WI(r){let e=r.indexOf(`
31605
31605
  at `);return e===-1?"":r.slice(e+1)}l(WI,"Tt");v(WI,"stripStackHeader");function HI(r,e){let i=r?.[0]?.message;return typeof i=="string"&&i.length>0?i:`GraphQL Error (Code: ${String(e??"unknown")})`}l(HI,"xt");v(HI,"deriveMessage");function zI(r){if(Array.isArray(r))return r.map(e=>{let i=e??{};return{message:typeof i.message=="string"?i.message:void 0,path:Array.isArray(i.path)?i.path:void 0,extensions:i.extensions&&typeof i.extensions=="object"?i.extensions:void 0}})}l(zI,"Lt");v(zI,"extractErrors");function Lo(r,e=!1){if(!r||typeof r!="object")return{name:typeof r,message:"Non-object value thrown; contents withheld",variables:"[REDACTED]"};let i=r,a=typeof i.response?.status=="number"?i.response.status:void 0,n=zI(i.response?.errors),s=n?.[0]?.extensions?.code,o=i.response===void 0?Ln(r):Ln({status:a});return{name:typeof i.name=="string"?i.name:"Error",message:HI(n,a),status:a,errors:n,code:typeof s=="string"?s:void 0,query:typeof i.request?.query=="string"?i.request.query:void 0,stackFrames:typeof i.stack=="string"?WI(i.stack):void 0,variables:e?i.request?.variables:"[REDACTED]",variableShape:i.request?.variables===void 0?void 0:mn(i.request.variables),isTransport:o}}l(Lo,"le");v(Lo,"SanitizeGraphQLError");function No(r){return hn(r)==="mutation"}l(No,"de");v(No,"IsGraphQLMutation");function hn(r){if(!r)return null;let e=0,i=!1,a=0,n=r.length;for(;a<n;){let s=r[a];if(s==="#"){for(;a<n&&r[a]!==`
31606
31606
  `&&r[a]!=="\r";)a++;continue}if(s==='"'){a=_o(r,a);continue}if(s==="{"||s==="("||s==="["){if(s==="{"&&e===0&&!i)return"query";e++,a++;continue}if(s==="}"||s===")"||s==="]"){e=Math.max(0,e-1),s==="}"&&e===0&&(i=!1),a++;continue}if(e===0&&Pa(s)){let o=a;for(;a<n&&Dn(r[a]);)a++;let d=r.slice(o,a);if(!i){if(d==="query"||d==="mutation"||d==="subscription")return d;d==="fragment"&&(i=!0)}continue}a++}return null}l(hn,"W");v(hn,"FirstGraphQLOperationKind");function Ao(r){if(!r)return"Anonymous";let e=0,i=!1,a=!1,n=0,s=r.length;for(;n<s;){let o=r[n];if(o==="#"){for(;n<s&&r[n]!==`
@@ -33647,4 +33647,4 @@ ${e.stackFrames}`:this.stack}};function KI(r){return r instanceof pn?r:new pn(Lo
33647
33647
  }
33648
33648
  }
33649
33649
  `;return(await this._dataProvider.ExecuteGQL(i,{input:e}))?.RSVPMeeting??{Success:!1,ErrorMessage:"No response"}}catch(i){let a=i instanceof Error?i.message:String(i);return T(`GraphQLMeetingClient.RSVPMeeting error: ${a}`),{Success:!1,ErrorMessage:a}}}};export{t as a,Gd as b,qd as c,eu as d,Ap as e,Py as f,wy as g,My as h,xy as i,Gy as j,Uy as k,Vy as l,re as m,la as n,Ce as o,da as p,ri as q,Ee as r,G2 as s,U2 as t,Jr as u,IT as v,vt as w,Vg as x,QH as y,jH as z,Ds as A,OH as B,kg as C,ma as D,Bg as E,Kg as F,$g as G,zg as H,Yg as I,Is as J,bs as K,w4 as L,J4 as M,q4 as N,$4 as O,Ns as P,mC as Q,z4 as R,hC as S,X4 as T,df as U,yC as V,cf as W,lf as X,e6 as Y,r6 as Z,n6 as _,o6 as $,T6 as aa,C6 as ba,E6 as ca,TC as da,P6 as ea,G6 as fa,U6 as ga,C as ha,oie as ia,lie as ja,die as ka,pie as la,fie as ma,Sie as na,Iie as oa,Aie as pa,Fie as qa,LS as ra,Uie as sa,_S as ta,RS as ua,Jie as va,qie as wa,Bie as xa,Kie as ya,$ie as za,Yie as Aa,Zie as Ba,eae as Ca,nae as Da,bL as Ea,uae as Fa,pae as Ga,MS as Ha,xS as Ia,Dae as Ja,Sae as Ka,Fre as La,kS as Ma,Vre as Na,Qre as Oa,c_ as Pa,Mt as Qa,u_ as Ra,m_ as Sa,kre as Ta,y_ as Ua,Jre as Va,qre as Wa,ui as Xa,Hre as Ya,N_ as Za,zre as _a,ine as $a,L_ as ab,gt as bb,pi as cb,Ade as db,yo as eb,go as fb,Bi as gb,fo as hb,So as ib,Io as jb,bo as kb,pn as lb,KI as mb,Lo as nb,No as ob,hn as pb,Ao as qb,nR as rb,sR as sb,hI as tb,wa as ub,ZI as vb,uR as wb,pR as xb,DI as yb,yI as zb,gI as Ab,fI as Bb,mR as Cb,SI as Db,II as Eb,bI as Fb,AI as Gb,TI as Hb,CI as Ib,vI as Jb,LI as Kb,_I as Lb,RI as Mb,EI as Nb,PI as Ob,wI as Pb,MI as Qb,xI as Rb,GI as Sb,UI as Tb,VI as Ub,QI as Vb,jI as Wb,OI as Xb,kI as Yb,yR as Zb,JI as _b,qI as $b};
33650
- //# sourceMappingURL=chunk-FDR3HREB.js.map
33650
+ //# sourceMappingURL=chunk-IYFE6AC7.js.map