@salutejs/jazz-sdk-electron
Version:
Jazz SDK Electron
2 lines (1 loc) • 21.8 kB
JavaScript
import{token as t,bindModules as r,createContainer as e,isToken as n,declareModule as o,resolveValue as i}from"ditox";import{ipcRenderer as u,contextBridge as a}from"electron";import{createScope as c,createAction as f}from"rx-effects";import{Subject as s,filter as l,take as p}from"rxjs";import{declareController as h}from"nrgy/mvc";import{observe as y}from"nrgy/rxjs";import{createScope as v}from"nrgy";function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function g(t){var r=function(t,r){if("object"!=d(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==d(r)?r:r+""}function m(t,r,e){return(r=g(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var b,_,w,O,j,E,L,P,S,x,A,T,k,D,N,I,R,C,z,F,Z,$,G,K,M,J,V,B,U,W,Y,H,X,q,Q,tt,rt,et,nt,ot,it,ut,at,ct,ft,st,lt,pt,ht,yt,vt,dt,gt,mt,bt,_t,wt,Ot,jt,Et,Lt,Pt,St,xt,At,Tt,kt,Dt,Nt,It,Rt,Ct,zt,Ft,Zt,$t,Gt,Kt,Mt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Jt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Vt(){if(_)return b;_=1;var t="object"==d(Mt)&&Mt&&Mt.Object===Object&&Mt;return b=t}function Bt(){if(O)return w;O=1;var t=Vt(),r="object"==("undefined"==typeof self?"undefined":d(self))&&self&&self.Object===Object&&self,e=t||r||Function("return this")();return w=e}function Ut(){if(E)return j;E=1;var t=Bt().Symbol;return j=t}function Wt(){if(P)return L;P=1;var t=Ut(),r=Object.prototype,e=r.hasOwnProperty,n=r.toString,o=t?t.toStringTag:void 0;return L=function(t){var r=e.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(t){}var a=n.call(t);return u&&(r?t[o]=i:delete t[o]),a}}function Yt(){if(x)return S;x=1;var t=Object.prototype.toString;return S=function(r){return t.call(r)}}function Ht(){if(T)return A;T=1;var t=Ut(),r=Wt(),e=Yt(),n=t?t.toStringTag:void 0;return A=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":n&&n in Object(t)?r(t):e(t)}}function Xt(){if(D)return k;return D=1,k=function(t){var r=d(t);return null!=t&&("object"==r||"function"==r)}}function qt(){if(I)return N;I=1;var t=Ht(),r=Xt();return N=function(e){if(!r(e))return!1;var n=t(e);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function Qt(){if(C)return R;C=1;var t=Bt()["__core-js_shared__"];return R=t}function tr(){if(F)return z;F=1;var t,r=Qt(),e=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return z=function(t){return!!e&&e in t}}function rr(){if($)return Z;$=1;var t=Function.prototype.toString;return Z=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}function er(){if(K)return G;K=1;var t=qt(),r=tr(),e=Xt(),n=rr(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,f=RegExp("^"+a.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return G=function(i){return!(!e(i)||r(i))&&(t(i)?f:o).test(n(i))}}function nr(){if(J)return M;return J=1,M=function(t,r){return null==t?void 0:t[r]}}function or(){if(B)return V;B=1;var t=er(),r=nr();return V=function(e,n){var o=r(e,n);return t(o)?o:void 0}}function ir(){if(W)return U;W=1;var t=or()(Object,"create");return U=t}function ur(){if(H)return Y;H=1;var t=ir();return Y=function(){this.__data__=t?t(null):{},this.size=0}}function ar(){if(q)return X;return q=1,X=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}}function cr(){if(tt)return Q;tt=1;var t=ir(),r=Object.prototype.hasOwnProperty;return Q=function(e){var n=this.__data__;if(t){var o=n[e];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(n,e)?n[e]:void 0}}function fr(){if(et)return rt;et=1;var t=ir(),r=Object.prototype.hasOwnProperty;return rt=function(e){var n=this.__data__;return t?void 0!==n[e]:r.call(n,e)}}function sr(){if(ot)return nt;ot=1;var t=ir();return nt=function(r,e){var n=this.__data__;return this.size+=this.has(r)?0:1,n[r]=t&&void 0===e?"__lodash_hash_undefined__":e,this}}function lr(){if(ut)return it;ut=1;var t=ur(),r=ar(),e=cr(),n=fr(),o=sr();function i(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=e,i.prototype.has=n,i.prototype.set=o,it=i}function pr(){if(ct)return at;return ct=1,at=function(){this.__data__=[],this.size=0}}function hr(){if(st)return ft;return st=1,ft=function(t,r){return t===r||t!=t&&r!=r}}function yr(){if(pt)return lt;pt=1;var t=hr();return lt=function(r,e){for(var n=r.length;n--;)if(t(r[n][0],e))return n;return-1}}function vr(){if(yt)return ht;yt=1;var t=yr(),r=Array.prototype.splice;return ht=function(e){var n=this.__data__,o=t(n,e);return!(o<0)&&(o==n.length-1?n.pop():r.call(n,o,1),--this.size,!0)}}function dr(){if(dt)return vt;dt=1;var t=yr();return vt=function(r){var e=this.__data__,n=t(e,r);return n<0?void 0:e[n][1]}}function gr(){if(mt)return gt;mt=1;var t=yr();return gt=function(r){return t(this.__data__,r)>-1}}function mr(){if(_t)return bt;_t=1;var t=yr();return bt=function(r,e){var n=this.__data__,o=t(n,r);return o<0?(++this.size,n.push([r,e])):n[o][1]=e,this}}function br(){if(Ot)return wt;Ot=1;var t=pr(),r=vr(),e=dr(),n=gr(),o=mr();function i(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=e,i.prototype.has=n,i.prototype.set=o,wt=i}function _r(){if(Et)return jt;Et=1;var t=or()(Bt(),"Map");return jt=t}function wr(){if(Pt)return Lt;Pt=1;var t=lr(),r=br(),e=_r();return Lt=function(){this.size=0,this.__data__={hash:new t,map:new(e||r),string:new t}}}function Or(){if(xt)return St;return xt=1,St=function(t){var r=d(t);return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}}function jr(){if(Tt)return At;Tt=1;var t=Or();return At=function(r,e){var n=r.__data__;return t(e)?n["string"==typeof e?"string":"hash"]:n.map}}function Er(){if(Dt)return kt;Dt=1;var t=jr();return kt=function(r){var e=t(this,r).delete(r);return this.size-=e?1:0,e}}function Lr(){if(It)return Nt;It=1;var t=jr();return Nt=function(r){return t(this,r).get(r)}}function Pr(){if(Ct)return Rt;Ct=1;var t=jr();return Rt=function(r){return t(this,r).has(r)}}function Sr(){if(Ft)return zt;Ft=1;var t=jr();return zt=function(r,e){var n=t(this,r),o=n.size;return n.set(r,e),this.size+=n.size==o?0:1,this}}function xr(){if($t)return Zt;$t=1;var t=wr(),r=Er(),e=Lr(),n=Pr(),o=Sr();function i(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=e,i.prototype.has=n,i.prototype.set=o,Zt=i}function Ar(){if(Kt)return Gt;Kt=1;var t=xr();function r(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var o=function(){var t=arguments,r=n?n.apply(this,t):t[0],i=o.cache;if(i.has(r))return i.get(r);var u=e.apply(this,t);return o.cache=i.set(r,u)||i,u};return o.cache=new(r.Cache||t),o}return r.Cache=t,Gt=r}var Tr=Jt(Ar());function kr(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function Dr(t,r){if(t){if("string"==typeof t)return kr(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?kr(t,r):void 0}}function Nr(t){return function(t){if(Array.isArray(t))return kr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Dr(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ir(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,u,a=[],c=!0,f=!1;try{if(i=(e=e.call(t)).next,0===r);else for(;!(c=(n=i.call(e)).done)&&(a.push(n.value),a.length!==r);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,r)||Dr(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rr(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function Cr(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?Rr(Object(e),!0).forEach((function(r){m(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Rr(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var zr=["debug","info","warn","error"];function Fr(t){return zr.find((function(r){return r===t}))}var Zr,$r,Gr,Kr,Mr={debug:0,info:1,warn:2,error:3},Jr=Object.create(null),Vr=(Zr=1e3,Gr=-1,Kr=!1,{append:function(t){$r||($r=new Array(Zr)),Kr=Kr||Gr+1===Zr,$r[Gr=(Gr+1)%Zr]=t},clear:function(){$r=void 0,Gr=-1,Kr=!1},getItems:function(){if(!$r||Gr<0)return[];var t=Kr?$r.slice(Gr+2):[],r=$r.slice(0,Gr+1);return[].concat(Nr(t),Nr(r))}});function Br(){return Vr.getItems()}var Ur,Wr,Yr=(Ur=new s,(Wr=function(t){var r=Cr(Cr({},t),{},{meta:Cr(Cr({},Jr),t.meta)});Vr.append(r),Ur.next(r)}).event$=Ur.asObservable(),Wr);function Hr(t,r){return{getLogger:function(e,n){return Hr("".concat(t,".").concat(e),Cr(Cr({},r),n))},withMeta:function(e){return Hr(t,Cr(Cr({},r),e))},debug:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Yr({level:"debug",timestamp:Date.now(),tag:t,messages:n,meta:r})},log:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Yr({level:"info",timestamp:Date.now(),tag:t,messages:n,meta:r})},info:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Yr({level:"info",timestamp:Date.now(),tag:t,messages:n,meta:r})},warn:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Yr({level:"warn",timestamp:Date.now(),tag:t,messages:n,meta:r})},error:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Yr({level:"error",timestamp:Date.now(),tag:t,messages:n,meta:r})}}}function Xr(t,r){return Tr((function(){return Hr(t,r)}))}function qr(t,r,e,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void e(t)}a.done?r(c):Promise.resolve(c).then(n,o)}var Qr,te=Object.prototype,re=te.hasOwnProperty,ee="function"==typeof Symbol?Symbol:{},ne=ee.iterator||"@@iterator",oe=ee.asyncIterator||"@@asyncIterator",ie=ee.toStringTag||"@@toStringTag";function ue(t,r,e,n){var o=r&&r.prototype instanceof he?r:he,i=Object.create(o.prototype),u=new Pe(n||[]);return i._invoke=function(t,r,e){var n=ce;return function(o,i){if(n===se)throw new Error("Generator is already running");if(n===le){if("throw"===o)throw i;return xe()}for(e.method=o,e.arg=i;;){var u=e.delegate;if(u){var a=je(u,e);if(a){if(a===pe)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===ce)throw n=le,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=se;var c=ae(t,r,e);if("normal"===c.type){if(n=e.done?le:fe,c.arg===pe)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n=le,e.method="throw",e.arg=c.arg)}}}(t,e,u),i}function ae(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}var ce="suspendedStart",fe="suspendedYield",se="executing",le="completed",pe={};function he(){}function ye(){}function ve(){}var de={};de[ne]=function(){return this};var ge=Object.getPrototypeOf,me=ge&&ge(ge(Se([])));me&&me!==te&&re.call(me,ne)&&(de=me);var be=ve.prototype=he.prototype=Object.create(de);function _e(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function we(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===ye||"GeneratorFunction"===(r.displayName||r.name))}function Oe(t,r){function e(n,o,i,u){var a=ae(t[n],t,o);if("throw"!==a.type){var c=a.arg,f=c.value;return f&&"object"===d(f)&&re.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,i,u)}),(function(t){e("throw",t,i,u)})):r.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return e("throw",t,i,u)}))}u(a.arg)}var n;this._invoke=function(t,o){function i(){return new r((function(r,n){e(t,o,r,n)}))}return n=n?n.then(i,i):i()}}function je(t,r){var e=t.iterator[r.method];if(e===Qr){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=Qr,je(t,r),"throw"===r.method))return pe;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return pe}var n=ae(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,pe;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=Qr),r.delegate=null,pe):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,pe)}function Ee(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function Le(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Pe(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Ee,this),this.reset(!0)}function Se(t){if(t){var r=t[ne];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(re.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=Qr,r.done=!0,r};return n.next=n}}return{next:xe}}function xe(){return{value:Qr,done:!0}}ye.prototype=be.constructor=ve,ve.constructor=ye,ve[ie]=ye.displayName="GeneratorFunction",_e(Oe.prototype),Oe.prototype[oe]=function(){return this},_e(be),be[ie]="Generator",be[ne]=function(){return this},be.toString=function(){return"[object Generator]"},Pe.prototype={constructor:Pe,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=Qr,this.done=!1,this.delegate=null,this.method="next",this.arg=Qr,this.tryEntries.forEach(Le),!t)for(var r in this)"t"===r.charAt(0)&&re.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=Qr)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return i.type="throw",i.arg=t,r.next=e,n&&(r.method="next",r.arg=Qr),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var u=re.call(o,"catchLoc"),a=re.call(o,"finallyLoc");if(u&&a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&re.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,pe):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),pe},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),Le(e),pe}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;Le(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:Se(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=Qr),pe}};var Ae={wrap:ue,isGeneratorFunction:we,AsyncIterator:Oe,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,ve):(t.__proto__=ve,ie in t||(t[ie]="GeneratorFunction")),t.prototype=Object.create(be),t},awrap:function(t){return{__await:t}},async:function(t,r,e,n,o){void 0===o&&(o=Promise);var i=new Oe(ue(t,r,e,n),o);return we(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},keys:function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},values:Se},Te="JAZZ_SDK_ELECTRON_IPC_CHANNEL",ke=h().params().apply((function(t){var r=t.scope,e=t.params.ipcRenderer,n=r.signal(),o=function(t,r){n(r)};e.on(Te,o),r.onDestroy((function(){e.off(Te,o)}));var i=new Map,u=function(t,r){var e=i.get(t);if(e){var n=e.get(r);n&&(n.unsubscribe(),e.delete(r),0===e.size&&i.delete(t))}},a=function(t,r,e){var n,o=i.get(t);return o?(o.get(r)||null===(n=i.get(t))||void 0===n||n.set(r,e),function(){return u(t,r)}):(i.set(t,new Map([[r,e]])),function(){return u(t,r)})};r.onDestroy((function(){i.forEach((function(t){t.forEach((function(t){t.unsubscribe()})),t.clear()})),i.clear()}));var c,f,s=function(t,r){var e=y(n).pipe(l((function(r){return r.type===t}))).subscribe((function(t){"payload"in t?r(t.payload):r()}));return a(t,r,e)},h={send:function(t){e.send(Te,t)},once:function(t,r){var e=y(n).pipe(l((function(r){return r.type===t})),p(1)).subscribe((function(e){u(t,r),"payload"in e?r(e.payload):r()}));return a(t,r,e)},on:s,subscribe:s,addListener:function(){s.apply(void 0,arguments)},off:u,removeListener:u,__invoke:(c=Ae.mark((function t(r){return Ae.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.invoke(Te,r).then((function(t){return t.payload})));case 1:case"end":return t.stop()}}),t)})),f=function(){var t=this,r=arguments;return new Promise((function(e,n){var o=c.apply(t,r);function i(t){qr(o,e,n,i,u,"next",t)}function u(t){qr(o,e,n,i,u,"throw",t)}i(void 0)}))},function(t){return f.apply(this,arguments)}),withType:function(){return h}};return h})),De=t({key:"JAZZ_SDK_ELECTRON_PRELOAD_CONTEXT_TOKEN"}),Ne={Transport:t({key:"JAZZ_SDK_ELECTRON_PRELOAD_TOKENS_TRANSPORT_TOKEN"})};var Ie=function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=c(),i={logEvent$:Yr.event$,logLevelWeight:Mr,createLoggerFactory:Xr,getLogBuffer:Br,getLogger:Hr,logLevelValues:zr,logMessage:Yr,parseLogLevel:Fr}.getLogger("JAZZ_SDK_PRELOAD"),f=null!==(t=n.container)&&void 0!==t?t:e(),s=o.createController((function(){return new ke({ipcRenderer:u})})),l={transport:s},p={logger:i,transport:s};return f.bindValue(De,p),f.bindValue(Ne.Transport,s),o.createController((function(){return function(t){var e=t.container,n=t.plugins,o=t.defaultPlugins,i=c(),u=[].concat(Nr(o),Nr(n)),a=[],f=new Set;return Nr(u).reverse().forEach((function(t){var r=t(),e=r.key,n=r.module;e?f.has(e)||(f.add(e),a.push({module:n,options:{scope:"scoped"}})):a.push({module:n,options:{scope:"scoped"}})})),f.clear(),r(e,a),a.forEach((function(t){var r=t.module;e.resolve(r.token)})),{destroy:function(){i.destroy()}}}({logger:i,container:f,plugins:n.plugins||[],defaultPlugins:[]})})),a.exposeInMainWorld("JAZZ_SDK_ELECTRON_BRIDGE",l),{destroy:o.destroy,container:f}};function Re(){return f()}var Ce=["destroy"];function ze(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function Fe(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?ze(Object(e),!0).forEach((function(r){m(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ze(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function Ze(t){var r=t.factory,e=t.exports,u=t.imports,a=void 0===u?{}:u,c=t.token,f=t.name,s=Object.entries(a).reduce((function(t,r){var e=Ir(r,2),o=e[0],i=e[1];return n(i)?t.deps[o]=i:(t.imports.push(i),t.deps[o]=i.token),t}),{deps:{},imports:[]});return function(){return{module:o({token:c,factory:function(t){var e=v(),n=r({scope:e,container:t,deps:$e(s.deps)?void 0:i(t,s.deps),name:f}),o=n.destroy;return Fe(Fe({},function(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(r.includes(n))continue;e[n]=t[n]}return e}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],r.includes(e)||{}.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}(n,Ce)),{},{destroy:function(){null==o||o(),e.destroy()}})},exports:e,imports:s.imports}),key:f}}}function $e(t){return!t||0===Object.keys(t).length}export{Re as createEventBus,Ie as createJazzSdkElectronPreload,Ze as createModule};