D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
share
/
grafana
/
public
/
build
/
Filename :
1537.caf8c5d1430033307ef5.js
back
Copy
"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[1537],{72927:(w,p,i)=>{i.d(p,{Mo:()=>e});var a=i(89949),t=i.n(a),n=i(99633),s=i(29241);const e=(h,m=!1)=>{const E=h.values;switch(h.type){case s.fS.number:return N(E,m);case s.fS.string:return T(E,m);case s.fS.boolean:return L(E,m);case s.fS.time:return typeof h.values[0]=="number"?S(E,m):P(E,m);default:return A(m)}},c=(h,m)=>{if(!h||!m)return y(h,m);if((0,a.isNumber)(h)&&(0,a.isNumber)(m))return l(h,m);if((0,n.D2)(h)&&(0,n.D2)(m)){if((0,n.CQ)(h).isBefore(m))return-1;if((0,n.CQ)(m).isBefore(h))return 1}return 0},l=(h,m)=>h-m,u=(h,m)=>!h||!m?y(h,m):h.localeCompare(m),g=(h,m)=>y(h,m),y=(h,m)=>!h&&m?1:h&&!m?-1:0,S=(h,m)=>{let E=m?-1:1;return(F,_)=>E*(h[F]-h[_])},P=(h,m)=>(E,F)=>{const _=h[E],M=h[F];return m?c(M,_):c(_,M)},L=(h,m)=>(E,F)=>{const _=h[E],M=h[F];return m?g(M,_):g(_,M)},N=(h,m)=>(E,F)=>{const _=h[E],M=h[F];return m?l(M,_):l(_,M)},T=(h,m)=>(E,F)=>{const _=h[E],M=h[F];return m?u(M,_):u(_,M)},A=h=>(m,E)=>h?l(E,m):l(m,E)},35918:(w,p,i)=>{i.d(p,{f:()=>t});var a=i(64167);function t(n,s,e){switch((n==null||e==null)&&(n==null&&(n="null"),e==null&&(e="null"),(s===a.Bd.GTE||s===a.Bd.LTE)&&(s=a.Bd.EQ)),s){case a.Bd.EQ:return`${n}`==`${e}`;case a.Bd.NEQ:return`${n}`!=`${e}`;case a.Bd.GT:return n>e;case a.Bd.GTE:return n>=e;case a.Bd.LT:return n<e;case a.Bd.LTE:return n<=e;default:return!1}}},7303:(w,p,i)=>{i.d(p,{N:()=>l});var a=i(29241),t=i(19221);const n={id:t.mi.byType,name:"Field Type",description:"match based on the field type",defaultOptions:a.fS.number,get:u=>(g,y,S)=>u===g.type,getOptionsDisplayText:u=>`Field type: ${u}`},s={id:t.mi.byTypes,name:"Field Type",description:"match based on the field types",defaultOptions:new Set,get:u=>(g,y,S)=>u.has(g.type),getOptionsDisplayText:u=>`Field types: ${[...u].join(" | ")}`},e={id:t.mi.numeric,name:"Numeric Fields",description:"Fields with type number",get:()=>n.get(a.fS.number),getOptionsDisplayText:()=>"Numeric Fields"},c={id:t.mi.time,name:"Time Fields",description:"Fields with type time",get:()=>n.get(a.fS.time),getOptionsDisplayText:()=>"Time Fields"};function l(){return[n,s,e,c]}},84297:(w,p,i)=>{i.d(p,{b:()=>c});var a=i(64167),t=i(66656),n=i(35918),s=i(19221);function e(l){return l===t.gz.allIsNull||l===t.gz.allIsZero}const c={id:s.mi.byValue,name:"By value (reducer)",description:"Reduce a field to a single value and test for inclusion",defaultOptions:{reducer:t.gz.allIsZero,op:a.Bd.GTE,value:0},get:l=>{if(!l||!l.reducer)return()=>!1;let{reducer:u,op:g,value:y}=l;const S=e(u);return g||(g=a.Bd.EQ),(P,L,N)=>{const T=(0,t.Kx)({field:P,reducers:[u]})[u];return S?!!T:(0,n.f)(T,g,y)}},getOptionsDisplayText:l=>`By value (${l.reducer})`}},19221:(w,p,i)=>{i.d(p,{E4:()=>n,Ff:()=>a,mE:()=>s,mi:()=>t});var a=(e=>(e.anyMatch="anyMatch",e.allMatch="allMatch",e.invertMatch="invertMatch",e.alwaysMatch="alwaysMatch",e.neverMatch="neverMatch",e))(a||{}),t=(e=>(e.numeric="numeric",e.time="time",e.first="first",e.firstTimeField="firstTimeField",e.byType="byType",e.byTypes="byTypes",e.byName="byName",e.byNames="byNames",e.byRegexp="byRegexp",e.byRegexpOrNames="byRegexpOrNames",e.byFrameRefID="byFrameRefID",e.byValue="byValue",e))(t||{}),n=(e=>(e.byName="byName",e.byRefId="byRefId",e.byIndex="byIndex",e))(n||{}),s=(e=>(e.regex="regex",e.isNull="isNull",e.isNotNull="isNotNull",e.greater="greater",e.greaterOrEqual="greaterOrEqual",e.lower="lower",e.lowerOrEqual="lowerOrEqual",e.equal="equal",e.notEqual="notEqual",e.between="between",e))(s||{})},53557:(w,p,i)=>{i.d(p,{n:()=>s});var a=i(95676),t=i(19221);const n={id:t.E4.byRefId,name:"Query refId",description:"match the refId",defaultOptions:"A",get:e=>{const c=(0,a.jO)(e);return l=>c.test(l.refId||"")},getOptionsDisplayText:e=>`RefID: ${e}`};function s(){return[n]}},46079:(w,p,i)=>{i.d(p,{z:()=>e});var a=i(29241),t=i(19221);const n={id:t.mi.first,name:"First Field",description:"The first field in the frame",get:c=>(l,u,g)=>l===u.fields[0],getOptionsDisplayText:()=>"First field"},s={id:t.mi.firstTimeField,name:"First time field",description:"The first field of type time in a frame",get:c=>(l,u,g)=>l.type===a.fS.time&&l===u.fields.find(y=>y.type===a.fS.time),getOptionsDisplayText:()=>"First time field"};function e(){return[n,s]}},18257:(w,p,i)=>{i.d(p,{T:()=>s});var a=i(19221);const t={id:a.mE.equal,name:"Is equal",description:"Match where value for given field is equal to options value.",get:e=>(c,l)=>l.values[c]==e.value,getOptionsDisplayText:()=>"Matches all rows where field is null.",isApplicable:()=>!0,getDefaultOptions:()=>({value:""})},n={id:a.mE.notEqual,name:"Is not equal",description:"Match where value for given field is not equal to options value.",get:e=>(c,l)=>l.values[c]!=e.value,getOptionsDisplayText:()=>"Matches all rows where field is not null.",isApplicable:()=>!0,getDefaultOptions:()=>({value:""})},s=()=>[t,n]},16909:(w,p,i)=>{i.d(p,{a:()=>s});var a=i(19221);const t={id:a.mE.isNull,name:"Is null",description:"Match where value for given field is null.",get:()=>(e,c)=>c.values[e]==null,getOptionsDisplayText:()=>"Matches all rows where field is null.",isApplicable:()=>!0,getDefaultOptions:()=>({})},n={id:a.mE.isNotNull,name:"Is not null",description:"Match where value for given field is not null.",get:()=>(e,c)=>c.values[e]!=null,getOptionsDisplayText:()=>"Matches all rows where field is not null.",isApplicable:()=>!0,getDefaultOptions:()=>({})},s=()=>[t,n]},38975:(w,p,i)=>{i.d(p,{H:()=>l});var a=i(29241),t=i(19221);const n={id:t.mE.greater,name:"Is greater",description:"Match when field value is greater than option.",get:u=>(g,y)=>{const S=y.values[g];return isNaN(S)?!1:S>u.value},getOptionsDisplayText:u=>`Matches all rows where field value is greater than: ${u.value}.`,isApplicable:u=>u.type===a.fS.number,getDefaultOptions:()=>({value:0})},s={id:t.mE.greaterOrEqual,name:"Is greater or equal",description:"Match when field value is greater than or equal to option.",get:u=>(g,y)=>{const S=y.values[g];return isNaN(S)?!1:S>=u.value},getOptionsDisplayText:u=>`Matches all rows where field value is greater than or equal to: ${u.value}.`,isApplicable:u=>u.type===a.fS.number,getDefaultOptions:()=>({value:0})},e={id:t.mE.lower,name:"Is lower",description:"Match when field value is lower than option.",get:u=>(g,y)=>{const S=y.values[g];return isNaN(S)?!1:S<u.value},getOptionsDisplayText:u=>`Matches all rows where field value is lower than: ${u.value}.`,isApplicable:u=>u.type===a.fS.number,getDefaultOptions:()=>({value:0})},c={id:t.mE.lowerOrEqual,name:"Is lower or equal",description:"Match when field value is lower or equal than option.",get:u=>(g,y)=>{const S=y.values[g];return isNaN(S)?!1:S<=u.value},getOptionsDisplayText:u=>`Matches all rows where field value is lower or equal than: ${u.value}.`,isApplicable:u=>u.type===a.fS.number,getDefaultOptions:()=>({value:0})},l=()=>[n,s,e,c]},25922:(w,p,i)=>{i.d(p,{G:()=>s});var a=i(29241),t=i(19221);const n={id:t.mE.between,name:"Is between",description:"Match when field value is between given option values.",get:e=>(c,l)=>{const u=l.values[c];return isNaN(u)?!1:u>e.from&&u<e.to},getOptionsDisplayText:e=>`Matches all rows where field value is between ${e.from} and ${e.to}.`,isApplicable:e=>e.type===a.fS.number,getDefaultOptions:()=>({from:0,to:100})},s=()=>[n]},64397:(w,p,i)=>{i.d(p,{G:()=>n});var a=i(19221);const t={id:a.mE.regex,name:"Regex",description:"Match when field value is matching regex.",get:s=>{const e=new RegExp(s.value);return(c,l)=>{const u=l.values[c];return e.test(u)}},getOptionsDisplayText:s=>`Matches all rows where field value is matching regex: ${s.value}`,isApplicable:()=>!0,getDefaultOptions:()=>({value:".*"})},n=()=>[t]},14544:(w,p,i)=>{i.d(p,{W:()=>a});var a=(t=>(t.append="append",t.reduce="reduce",t.order="order",t.organize="organize",t.rename="rename",t.calculateField="calculateField",t.seriesToColumns="seriesToColumns",t.seriesToRows="seriesToRows",t.merge="merge",t.concatenate="concatenate",t.labelsToFields="labelsToFields",t.filterFields="filterFields",t.filterFieldsByName="filterFieldsByName",t.filterFrames="filterFrames",t.filterByRefId="filterByRefId",t.renameByRegex="renameByRegex",t.filterByValue="filterByValue",t.noop="noop",t.ensureColumns="ensureColumns",t.groupBy="groupBy",t.sortBy="sortBy",t.histogram="histogram",t.configFromData="configFromData",t.rowsToFields="rowsToFields",t.prepareTimeSeries="prepareTimeSeries",t.convertFieldType="convertFieldType",t.fieldLookup="fieldLookup",t.heatmap="heatmap",t.spatial="spatial",t.joinByField="joinByField",t.joinByLabels="joinByLabels",t.extractFields="extractFields",t.groupingToMatrix="groupingToMatrix",t.limit="limit",t.partitionByValues="partitionByValues",t.timeSeriesTable="timeSeriesTable",t.formatTime="formatTime",t))(a||{})},25359:(w,p,i)=>{i.d(p,{B:()=>t});var a=i(9232);class t{constructor(s){this.init=s,this.ordered=[],this.byId=new Map,this.initialized=!1,this.setInit=e=>{if(this.initialized)throw new Error("Registry already initialized");this.init=e},this.init=s}getIfExists(s){if(this.initialized||this.initialize(),s)return this.byId.get(s)}initialize(){if(this.init)for(const s of this.init())this.register(s);this.sort(),this.initialized=!0}get(s){const e=this.getIfExists(s);if(!e)throw new Error(`"${s}" not found in: ${this.list().map(c=>c.id)}`);return e}selectOptions(s,e){this.initialized||this.initialize();const c={options:[],current:[]},l={};if(s)for(const u of s)l[u]={};for(const u of this.ordered){if(u.excludeFromPicker||e&&!e(u))continue;const g={value:u.id,label:u.name,description:u.description};u.state===a.BV.alpha&&(g.label+=" (alpha)"),c.options.push(g),l[u.id]&&(l[u.id]=g)}return s&&(c.current=Object.values(l)),c}list(s){if(this.initialized||this.initialize(),s){const e=[];for(const c of s){const l=this.getIfExists(c);l&&e.push(l)}return e}return this.ordered}isEmpty(){return this.initialized||this.initialize(),this.ordered.length===0}register(s){if(this.byId.has(s.id))throw new Error("Duplicate Key:"+s.id);if(this.byId.set(s.id,s),this.ordered.push(s),s.aliasIds)for(const e of s.aliasIds)this.byId.has(e)||this.byId.set(e,s);this.initialized&&this.sort()}sort(){}}},76772:(w,p,i)=>{i.d(p,{W:()=>a});function a(t,n){const s=/\{\{\s*(.+?)\s*\}\}/g;return t.replace(s,(e,c)=>n[c]?n[c]:c)}},40545:(w,p,i)=>{i.d(p,{P:()=>a});function a(t){const n=t||{};if(!n.message){if(typeof t=="string")return{message:t};let s="Query error";n.message?s=n.message:n.data&&n.data.message&&n.data?.message!=="Query data error"?s=n.data.message:n?.data?.message==="Query data error"&&n?.data?.error||n.data&&n.data.error?s=n.data.error:n.status&&(s=`Query error: ${n.status} ${n.statusText}`),n.message=s}return n}},22575:(w,p,i)=>{i.d(p,{R:()=>D});var a=i(12544),t=i(32900),n=i(64811),s=i(88646),e=i(81087),c=i(47838),l=i(48592),u=i(37497),g=i(39343),y=i(53933),S=i(40545),P=i(87755);const L=b=>o=>new l.y(r=>{let d=[],f=!0;const O=()=>{r.next(d),d=[]},R=b.subscribe({next:B=>{f=B,f&&d.length&&O()}}),I=o.subscribe({next(B){f?d.length?O():r.next([B]):d.push(B)},error(B){r.error(B)},complete(){r.complete()}});return()=>{I.unsubscribe(),R.unsubscribe()}});var N=(b=>(b[b.Error=0]="Error",b[b.NewValuesSameSchema=1]="NewValuesSameSchema",b[b.ChangedSchema=2]="ChangedSchema",b))(N||{});const T=b=>({values:b.reduce((o,{values:r})=>{for(let d=0;d<r.length;d++){o[d]||(o[d]=[]);for(let f=0;f<r[d].length;f++)o[d].push(r[d][f])}return o},[]),type:1}),A=(b,o)=>b.filter(r=>r.type===o);class h{constructor(o){this.deps=o,this.stream=new u.t(1),this.shutdown=()=>{this.stream.complete(),this.liveEventsSubscription.unsubscribe(),this.deps.onShutdown()},this.shutdownIfNoSubscribers=()=>{this.stream.observed||this.shutdown()},this.onError=r=>{console.log("LiveQuery [error]",{err:r},this.deps.channelId),this.stream.next({type:0,error:(0,S.P)(r)}),this.shutdown()},this.onComplete=()=>{console.log("LiveQuery [complete]",this.deps.channelId),this.shutdown()},this.onNext=r=>{if((0,e.RL)(r)){this.process(r.message);return}const d=(0,e.se)(r);if(d&&r.error){this.stream.next({type:0,error:{...(0,S.P)(r.error),message:`Streaming channel error: ${r.error.message}`}});return}d&&(r.state===e.yS.Connected||r.state===e.yS.Pending)&&r.message&&this.process(r.message)},this.process=r=>{this.frameBuffer.push(r).schemaChanged?this.stream.next({type:2}):this.stream.next({type:1,values:this.frameBuffer.getValuesFromLastPacket()})},this.resizeBuffer=r=>{r&&this.frameBuffer.needsResizing(r)&&this.frameBuffer.resize(r)},this.prepareInternalStreamForNewSubscription=r=>{!this.frameBuffer.hasAtLeastOnePacket()&&r.frame&&this.process(r.frame)},this.clearShutdownTimeout=()=>{this.shutdownTimeoutId&&(clearTimeout(this.shutdownTimeoutId),this.shutdownTimeoutId=void 0)},this.get=(r,d)=>{this.clearShutdownTimeout();const f=(0,c._A)(r.buffer);this.resizeBuffer(f),this.prepareInternalStreamForNewSubscription(r);const O=r?.buffer?.action===c.T0.Replace,R=r.filter?.fields,B=R?.length?({name:v})=>R.includes(v):void 0;let U;const $=(v,x)=>(U=B?this.frameBuffer.getMatchingFieldIndexes(B):void 0,O?x?{key:d,state:y.Gu.Error,data:[{type:P.g0.FullFrame,frame:this.frameBuffer.serialize(B,f,{maxLength:0})}],error:x}:v.length?{key:d,state:y.Gu.Streaming,data:[{type:P.g0.FullFrame,frame:this.frameBuffer.serialize(B,f,{maxLength:this.frameBuffer.packetInfo.length})}],error:x}:(console.warn(`expected to find at least one non error message ${v.map(({type:C})=>C)}`),{key:d,state:y.Gu.Streaming,data:[{type:P.g0.FullFrame,frame:this.frameBuffer.serialize(B,f,{maxLength:0})}],error:x}):{key:d,state:x?y.Gu.Error:y.Gu.Streaming,data:[{type:P.g0.FullFrame,frame:this.frameBuffer.serialize(B,f)}],error:x}),Q=v=>{const x=v.length?v[v.length-1]:void 0,C=O&&x?x.values:T(v).values,z=U?C.filter((k,W)=>U.includes(W)):C;return{key:d,state:y.Gu.Streaming,data:[{type:P.g0.NewValuesSameSchema,values:z}]}};let V=!0;const G=this.stream.pipe(L(this.deps.subscriberReadiness),(0,g.U)((v,x)=>{const C=A(v,0),z=C.length?C[C.length-1].error:void 0;if(V)return V=!1,$(v,z);if(C.length)return $(v,z);if(v.some(K=>K.type===2))return $(v,void 0);const W=A(v,1);return W.length!==v.length&&console.warn(`unsupported message type ${v.map(({type:K})=>K)}`),Q(W)}));return new l.y(v=>{const x=G.subscribe({next:C=>{v.next(C)},error:C=>{v.error(C)},complete:()=>{v.complete()}});return()=>{x.unsubscribe(),this.stream.observed||(this.clearShutdownTimeout(),this.shutdownTimeoutId=setTimeout(this.shutdownIfNoSubscribers,this.deps.shutdownDelayInMs))}})},this.frameBuffer=c.Av.empty(o.defaultStreamingFrameOptions),this.liveEventsSubscription=o.liveEventsObservable.subscribe({error:this.onError,complete:this.onComplete,next:this.onNext})}}var m=i(69966);class E{constructor(o,r){this.opened=Date.now(),this.stream=new m.x,this.disconnectIfNoListeners=()=>{this.stream.observers.length===0&&this.disconnect()},this.id=o,this.addr=r,this.currentStatus={type:e.FU.Status,id:o,timestamp:this.opened,state:e.yS.Pending},(0,e.nU)(r)||(this.currentStatus.state=e.yS.Invalid,this.currentStatus.error="invalid channel address")}initalize(){if(this.initalized)throw new Error("Channel already initalized: "+this.id);this.initalized=!0,this.subscription.on("publication",o=>{try{o.data&&(o.data.schema&&(this.lastMessageWithSchema=o.data),this.stream.next({type:e.FU.Message,message:o.data})),this.currentStatus.error&&(this.currentStatus.timestamp=Date.now(),delete this.currentStatus.error,this.sendStatus())}catch(r){console.log("publish error",this.addr,r),this.currentStatus.error=r,this.currentStatus.timestamp=Date.now(),this.sendStatus()}}).on("error",o=>{this.currentStatus.timestamp=Date.now(),this.currentStatus.error=o.error.message,this.sendStatus()}).on("subscribed",o=>{this.currentStatus.timestamp=Date.now(),this.currentStatus.state=e.yS.Connected,delete this.currentStatus.error,o.data?.schema&&(this.lastMessageWithSchema=o.data),this.sendStatus(o.data)}).on("unsubscribed",()=>{this.currentStatus.timestamp=Date.now(),this.currentStatus.state=e.yS.Disconnected,this.sendStatus()}).on("subscribing",()=>{this.currentStatus.timestamp=Date.now(),this.currentStatus.state=e.yS.Connecting,this.sendStatus()}).on("join",o=>{this.stream.next({type:e.FU.Join,user:o.info.user})}).on("leave",o=>{this.stream.next({type:e.FU.Leave,user:o.info.user})})}sendStatus(o){const r={...this.currentStatus};o&&(r.message=o),this.stream.next(r)}getStream(){return new l.y(o=>{const r={...this.currentStatus};this.lastMessageWithSchema?.schema&&(r.message={schema:this.lastMessageWithSchema?.schema}),o.next({...this.currentStatus,message:this.lastMessageWithSchema});const d=this.stream.subscribe(o);return()=>{d.unsubscribe(),this.stream.observers.length===0&&setTimeout(this.disconnectIfNoListeners,250)}})}async getPresence(){return this.subscription?this.subscription.presence().then(o=>({users:Object.keys(o.clients)})):Promise.reject("not subscribed")}disconnect(){this.currentStatus.state=e.yS.Shutdown,this.currentStatus.timestamp=Date.now(),this.subscription&&(this.subscription.unsubscribe(),this.subscription.removeAllListeners(),this.subscription=void 0),this.stream.complete(),this.stream.next({...this.currentStatus}),this.stream.complete(),this.shutdownCallback&&this.shutdownCallback()}shutdownWithError(o){this.currentStatus.error=o,this.sendStatus(),this.disconnect()}}function F(b,o,r){return{id:o,opened:Date.now(),addr:r,getStream:()=>of({type:LiveChannelEventType.Status,id:o,timestamp:Date.now(),state:LiveChannelConnectionState.Invalid,error:b}),disconnect:()=>{}}}const _={maxLength:100,maxDelta:1/0,action:c.T0.Append},M=5e3;class D{constructor(o){this.deps=o,this.open=new Map,this.liveDataStreamByChannelId={},this.onConnect=f=>{this.connectionState.next(!0)},this.onDisconnect=f=>{this.connectionState.next(!1)},this.onServerSideMessage=f=>{console.log("Publication from server-side channel",f)},this.getConnectionState=()=>this.connectionState.asObservable(),this.getStream=f=>this.getChannel(f).getStream(),this.createSubscriptionKey=f=>f.key??`xstr/${j++}`,this.getLiveDataStream=f=>{const O=(0,e.Aj)(f.addr),R=this.liveDataStreamByChannelId[O];if(R)return R;const I=this.getChannel(f.addr);return this.liveDataStreamByChannelId[O]=new h({channelId:O,onShutdown:()=>{delete this.liveDataStreamByChannelId[O]},liveEventsObservable:I.getStream(),subscriberReadiness:this.dataStreamSubscriberReadiness,defaultStreamingFrameOptions:_,shutdownDelayInMs:M}),this.liveDataStreamByChannelId[O]},this.getDataStream=f=>{const O=this.createSubscriptionKey(f);return this.getLiveDataStream(f).get(f,O)},this.getQueryData=async f=>(this.centrifuge.state!==a.State.Connected&&await this.connectionBlocker,this.centrifuge.rpc("grafana.query",f.body)),this.getPresence=f=>this.getChannel(f).getPresence(),this.dataStreamSubscriberReadiness=o.dataStreamSubscriberReadiness.pipe((0,t.B)(),(0,n.O)(!0));let r=`${o.appUrl.replace(/^http/,"ws")}/api/live/ws`;const d=o.grafanaAuthToken;d!==null&&d!==""&&(r+="?auth_token="+d),this.centrifuge=new a.Centrifuge(r,{timeout:3e4}),o.liveEnabled&&o.orgRole!==""&&this.centrifuge.connect(),this.connectionState=new s.X(this.centrifuge.state===a.State.Connected),this.connectionBlocker=new Promise(f=>{if(this.centrifuge.state===a.State.Connected)return f();const O=()=>{f(),this.centrifuge.removeListener("connected",O)};this.centrifuge.addListener("connected",O)}),this.centrifuge.on("connected",this.onConnect),this.centrifuge.on("connecting",this.onDisconnect),this.centrifuge.on("disconnected",this.onDisconnect),this.centrifuge.on("publication",this.onServerSideMessage)}getChannel(o){const r=`${this.deps.orgId}/${o.scope}/${o.namespace}/${o.path}`;let d=this.open.get(r);return d!=null||(d=new E(r,o),d.currentStatus.state===e.yS.Invalid)||(d.shutdownCallback=()=>{this.open.delete(r),this.centrifuge.removeSubscription(this.centrifuge.getSubscription(r))},this.open.set(r,d),this.initChannel(d).catch(f=>{d&&(d.currentStatus.state=e.yS.Invalid,d.shutdownWithError(f)),this.open.delete(r)})),d}async initChannel(o){this.centrifuge.state!==a.State.Connected&&await this.connectionBlocker;const r=this.centrifuge.newSubscription(o.id,{data:o.addr.data});o.subscription=r,o.initalize(),r.subscribe()}}let j=0},29364:(w,p,i)=>{var a=i(85907),t=i(16993);const n={canHandle(s){return s&&s instanceof t.Lv},serialize(s){const e=a.sj(s),{port1:c,port2:l}=new MessageChannel;return a.Jj(e,c),[l,[l]]},deserialize(s){return s.start(),a.Ud(s)}};a.Y6.set("SubscriberHandler",n)}}]); //# sourceMappingURL=1537.caf8c5d1430033307ef5.js.map