All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.vendor.altair.10-es2018.js Maven / Gradle / Ivy

The newest version!
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{"1DrF":function(e,n,t){"use strict";t.r(n),t.d(n,"GraphQLWsSubscriptionProvider",function(){return s});var o=t("1CyG"),r=t("HDdC"),i=t("gw6v");class s extends o.a{createClient(){this.client=Object(i.createClient)({url:this.subscriptionUrl,connectionParams:this.connectionParams,on:{connected:()=>{var e,n;null===(n=null===(e=this.extraOptions)||void 0===e?void 0:e.onConnected)||void 0===n||n.call(e,void 0,void 0)},error:e=>{var n,t;null===(t=null===(n=this.extraOptions)||void 0===n?void 0:n.onConnected)||void 0===t||t.call(n,e,void 0)}}})}execute(e){if(this.createClient(),!this.client)throw new Error("Could not create subscription client!");return new r.a(n=>this.client.subscribe({query:e.query,variables:e.variables,operationName:e.operationName},{next:(...e)=>n.next(...e),error:(...e)=>n.error(...e),complete:()=>n.complete()}))}close(){var e;null===(e=this.client)||void 0===e||e.dispose(),this.client=void 0}}},gw6v:function(e,n,t){var o=t("yXPU");!function(e){"use strict";const n=Object.prototype.hasOwnProperty;function t(e){return"object"==typeof e&&null!==e}function r(e,t){return n.call(e,t)}function i(e,o){return n.call(e,o)&&t(e[o])}function s(e,t){return n.call(e,t)&&"string"==typeof e[t]}var a;function c(n){if(t(n)){if(!s(n,"type"))return!1;switch(n.type){case e.MessageType.ConnectionInit:case e.MessageType.ConnectionAck:return!r(n,"payload")||void 0===n.payload||t(n.payload);case e.MessageType.Subscribe:return s(n,"id")&&i(n,"payload")&&(!r(n.payload,"operationName")||null==n.payload.operationName||"string"==typeof n.payload.operationName)&&s(n.payload,"query")&&(!r(n.payload,"variables")||null==n.payload.variables||i(n.payload,"variables"));case e.MessageType.Next:return s(n,"id")&&i(n,"payload");case e.MessageType.Error:return s(n,"id")&&(o=n.payload,Array.isArray(o)&&o.length>0&&o.every(e=>"message"in e));case e.MessageType.Complete:return s(n,"id");default:return!1}}var o;return!1}function l(e){if(c(e))return e;if("string"!=typeof e)throw new Error("Message not parsable");const n=JSON.parse(e);if(!c(n))throw new Error("Invalid message");return n}function u(e){if(!c(e))throw new Error("Cannot stringify invalid message");return JSON.stringify(e)}function d(e){return t(e)&&"code"in e&&"reason"in e}e.MessageType=void 0,(a=e.MessageType||(e.MessageType={})).ConnectionInit="connection_init",a.ConnectionAck="connection_ack",a.Subscribe="subscribe",a.Next="next",a.Error="error",a.Complete="complete",e.GRAPHQL_TRANSPORT_WS_PROTOCOL="graphql-transport-ws",e.createClient=function(n){const{url:t,connectionParams:r,lazy:i=!0,onNonLazyError:s=console.error,keepAlive:a=0,retryAttempts:c=5,retryWait:p=function(){var e=o(function*(e){let n=1e3;for(let t=0;tsetTimeout(e,n+Math.floor(2700*Math.random()+300)))});return function(n){return e.apply(this,arguments)}}(),isFatalConnectionProblem:y=(e=>!d(e)),on:f,webSocketImpl:m,generateID:v=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=16*Math.random()|0;return("x"==e?n:3&n|8).toString(16)})}}=n;let g;if(m){if(!("function"==typeof(h=m)&&"constructor"in h&&"CLOSED"in h&&"CLOSING"in h&&"CONNECTING"in h&&"OPEN"in h))throw new Error("Invalid WebSocket implementation provided");g=m}else"undefined"!=typeof WebSocket?g=WebSocket:"undefined"!=typeof global?g=global.WebSocket||global.MozWebSocket:"undefined"!=typeof window&&(g=window.WebSocket||window.MozWebSocket);var h;if(!g)throw new Error("WebSocket implementation missing");const w=g,x=(()=>{const e=(()=>{const e={};return{on:(n,t)=>(e[n]=t,()=>{delete e[n]}),emit(n){var t;"id"in n&&(null===(t=e[n.id])||void 0===t||t.call(e,n))}}})(),n={connecting:(null==f?void 0:f.connecting)?[f.connecting]:[],connected:(null==f?void 0:f.connected)?[f.connected]:[],message:(null==f?void 0:f.message)?[e.emit,f.message]:[e.emit],closed:(null==f?void 0:f.closed)?[f.closed]:[],error:(null==f?void 0:f.error)?[f.error]:[]};return{onMessage:e.on,on(e,t){const o=n[e];return o.push(t),()=>{o.splice(o.indexOf(t),1)}},emit(e,...t){for(const o of n[e])o(...t)}}})();let b,C=0,M=!1,P=0,S=!1;function T(){return E.apply(this,arguments)}function E(){return(E=o(function*(){const[n,i]=yield null!=b?b:b=new Promise((n,i)=>o(function*(){M&&(yield p(P),P++),x.emit("connecting");const s=new w("function"==typeof t?yield t():t,"graphql-transport-ws");s.onerror=e=>{x.emit("error",e)},s.onclose=e=>{b=void 0,x.emit("closed",e),i(e)},s.onopen=o(function*(){try{s.send(u({type:e.MessageType.ConnectionInit,payload:"function"==typeof r?yield r():r}))}catch(n){s.close(4400,n instanceof Error?n.message:new Error(n).message)}});let a=!1;s.onmessage=({data:t})=>{try{const o=l(t);if(x.emit("message",o),a)return;if(o.type!==e.MessageType.ConnectionAck)throw new Error(`First message cannot be of type ${o.type}`);a=!0,x.emit("connected",s,o.payload),P=0,n([s,new Promise((e,n)=>s.addEventListener("close",n))])}catch(o){s.close(4400,o instanceof Error?o.message:new Error(o).message)}}})());let s=()=>{};const c=new Promise(e=>s=e);return[n,s,Promise.race([c.then(()=>{if(!--C){const e=()=>n.close(1e3,"Normal Closure");isFinite(a)&&a>0?setTimeout(()=>{C||n.readyState!==w.OPEN||e()},a):e()}}),i])]})).apply(this,arguments)}function N(e){if(d(e)&&[1002,1011,4400,4401,4409,4429].includes(e.code))throw e;if(S||d(e)&&1e3===e.code)return!1;if(!c||P>=c)throw e;if(y(e))throw e;return M=!0}return i||o(function*(){for(C++;;)try{const[,,e]=yield T();yield e}catch(e){try{if(!N(e))return}catch(e){return null==s?void 0:s(e)}}})(),{on:x.on,subscribe(n,t){const r=v();let i=!1,s=()=>{i=!0};return o(function*(){for(C++;;)try{const[o,a,c]=yield T();if(i)return a();const l=x.onMessage(r,n=>{switch(n.type){case e.MessageType.Next:return void t.next(n.payload);case e.MessageType.Error:return i=!0,t.error(n.payload),void s();case e.MessageType.Complete:return i=!0,void s()}});return o.send(u({id:r,type:e.MessageType.Subscribe,payload:n})),s=()=>{i||o.readyState!==w.OPEN||o.send(u({id:r,type:e.MessageType.Complete})),a()},void(yield c.finally(l))}catch(o){if(!N(o))return}})().catch(t.error).then(t.complete),()=>s()},dispose:()=>o(function*(){if(S=!0,b){const[e]=yield b;e.close(1e3,"Normal Closure")}})()}},e.isMessage=c,e.parseMessage=l,e.stringifyMessage=u,Object.defineProperty(e,"__esModule",{value:!0})}(n)},yXPU:function(e,n){function t(e,n,t,o,r,i,s){try{var a=e[i](s),c=a.value}catch(l){return void t(l)}a.done?n(c):Promise.resolve(c).then(o,r)}e.exports=function(e){return function(){var n=this,o=arguments;return new Promise(function(r,i){var s=e.apply(n,o);function a(e){t(s,r,i,a,c,"next",e)}function c(e){t(s,r,i,a,c,"throw",e)}a(void 0)})}}}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy