@streamlayer/react 1.18.4 → 1.18.5

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.
@@ -10860,7 +10860,7 @@ const sg = ({
10860
10860
  y = !0;
10861
10861
  };
10862
10862
  const m = DR(e, n, l, {
10863
- version: "1.18.4",
10863
+ version: "1.18.5",
10864
10864
  onDeepLinkHandled: o,
10865
10865
  videoPlayerController: i,
10866
10866
  onContentActivate: a,
@@ -98,4 +98,4 @@ Error generating stack: `+a.message+`
98
98
  `),l=`
99
99
  `+n+(a.length?i("│"):" ")+" ";return n+s.join(l)+`
100
100
  `+a.map(function(o,c){var u=c===a.length-1,d=o.nodes&&o.nodes.length,m=n+(u?" ":i("│"))+" ";return n+i(u?"└":"├")+i("─")+i(d?"┬":"─")+" "+e(o,m,r).slice(n.length+2)}).join("")};const qD=$D,Fm=Symbol("avvio.TimeTree.untrackNode"),a2=Symbol("avvio.TimeTree.trackNode"),Nm=Symbol("avvio.TimeTree.getParent"),Gm=Symbol("avvio.TimeTree.getNode"),Xm=Symbol("avvio.TimeTree.addNode");let eP=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[a2](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[Fm](e){this.tableId.delete(e.id);const t=this.tableLabel.get(e.label);if(t.id){this.tableLabel.delete(e.label);return}t.pop(),t.length===0&&this.tableLabel.delete(e.label)}[Nm](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[Gm](e){return this.tableId.get(e)}[Xm](e,t,n){if(e===null)return this.root={id:"root",label:t,start:n,nodes:[]},this[a2](this.root),this.root.id;const r=this[Nm](e),i=`${t}-${Math.random()}`,a={id:i,parent:e,start:n,label:t,nodes:[]};return r.nodes.push(a),this[a2](a),i}start(e,t,n=Date.now()){return this[Xm](e,t,n)}stop(e,t=Date.now()){const n=this[Gm](e);n&&(n.stop=t,n.diff=n.stop-n.start||0,this[Fm](n))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const e=n=>(n.label=`${n.label} ${n.diff} ms`,n.nodes.length>0&&(n.nodes=n.nodes.map(r=>e(r))),n),t=e(this.toJSON());return qD(t)}};var tP=eP,q3={exports:{}},Ku={exports:{}},s2,wm;function nP(){if(wm)return s2;wm=1;var e=1e3,t=e*60,n=t*60,r=n*24,i=r*7,a=r*365.25;s2=function(u,d){d=d||{};var m=typeof u;if(m==="string"&&u.length>0)return s(u);if(m==="number"&&isFinite(u))return d.long?o(u):l(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function s(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var m=parseFloat(d[1]),g=(d[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return m*a;case"weeks":case"week":case"w":return m*i;case"days":case"day":case"d":return m*r;case"hours":case"hour":case"hrs":case"hr":case"h":return m*n;case"minutes":case"minute":case"mins":case"min":case"m":return m*t;case"seconds":case"second":case"secs":case"sec":case"s":return m*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}}}function l(u){var d=Math.abs(u);return d>=r?Math.round(u/r)+"d":d>=n?Math.round(u/n)+"h":d>=t?Math.round(u/t)+"m":d>=e?Math.round(u/e)+"s":u+"ms"}function o(u){var d=Math.abs(u);return d>=r?c(u,d,r,"day"):d>=n?c(u,d,n,"hour"):d>=t?c(u,d,t,"minute"):d>=e?c(u,d,e,"second"):u+" ms"}function c(u,d,m,g){var y=d>=m*1.5;return Math.round(u/m)+" "+g+(y?"s":"")}return s2}function rP(e){n.debug=n,n.default=n,n.coerce=o,n.disable=a,n.enable=i,n.enabled=s,n.humanize=nP(),n.destroy=c,Object.keys(e).forEach(u=>{n[u]=e[u]}),n.names=[],n.skips=[],n.formatters={};function t(u){let d=0;for(let m=0;m<u.length;m++)d=(d<<5)-d+u.charCodeAt(m),d|=0;return n.colors[Math.abs(d)%n.colors.length]}n.selectColor=t;function n(u){let d,m=null,g,y;function A(...E){if(!A.enabled)return;const f=A,h=Number(new Date),b=h-(d||h);f.diff=b,f.prev=d,f.curr=h,d=h,E[0]=n.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let V=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(C,S)=>{if(C==="%%")return"%";V++;const I=n.formatters[S];if(typeof I=="function"){const X=E[V];C=I.call(f,X),E.splice(V,1),V--}return C}),n.formatArgs.call(f,E),(f.log||n.log).apply(f,E)}return A.namespace=u,A.useColors=n.useColors(),A.color=n.selectColor(u),A.extend=r,A.destroy=n.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(g!==n.namespaces&&(g=n.namespaces,y=n.enabled(u)),y),set:E=>{m=E}}),typeof n.init=="function"&&n.init(A),A}function r(u,d){const m=n(this.namespace+(typeof d>"u"?":":d)+u);return m.log=this.log,m}function i(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let d;const m=(typeof u=="string"?u:"").split(/[\s,]+/),g=m.length;for(d=0;d<g;d++)m[d]&&(u=m[d].replace(/\*/g,".*?"),u[0]==="-"?n.skips.push(new RegExp("^"+u.slice(1)+"$")):n.names.push(new RegExp("^"+u+"$")))}function a(){const u=[...n.names.map(l),...n.skips.map(l).map(d=>"-"+d)].join(",");return n.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let d,m;for(d=0,m=n.skips.length;d<m;d++)if(n.skips[d].test(u))return!1;for(d=0,m=n.names.length;d<m;d++)if(n.names[d].test(u))return!0;return!1}function l(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function o(u){return u instanceof Error?u.stack||u.message:u}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var iP=rP;(function(e,t){t.formatArgs=r,t.save=i,t.load=a,t.useColors=n,t.storage=s(),t.destroy=(()=>{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;o.splice(1,0,c,"color: inherit");let u=0,d=0;o[0].replace(/%[a-zA-Z%]/g,m=>{m!=="%%"&&(u++,m==="%c"&&(d=u))}),o.splice(d,0,c)}t.log=console.debug||console.log||(()=>{});function i(o){try{o?t.storage.setItem("debug",o):t.storage.removeItem("debug")}catch{}}function a(){let o;try{o=t.storage.getItem("debug")}catch{}return!o&&typeof me<"u"&&"env"in me&&(o=me.env.DEBUG),o}function s(){try{return localStorage}catch{}}e.exports=iP(t);const{formatters:l}=e.exports;l.j=function(o){try{return JSON.stringify(o)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(Ku,Ku.exports);var S7=Ku.exports;const aP=$b,sP=l7.EventEmitter,lP=q1.inherits,gt=S7("avvio"),{AVV_ERR_READY_TIMEOUT:oP}=v7,l2=Symbol.for("plugin-meta");function cP(e,t){return e[l2]&&e[l2].name?e[l2].name:typeof t<"u"&&typeof t!="function"&&t.name?t.name:e.name?e.name:e.toString().split(`
101
- `).slice(0,2).map(n=>n.trim()).join(" -- ")}function uP(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function La(e,t,n,r,i){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=i===void 0?e._timeout:i,this.name=cP(t,n),this.isAfter=r,this.q=aP(e,dP,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}lP(La,sP);La.prototype.exec=function(e,t){const n=this.func;let r=!1;const i=this.name;if(this.parent._error&&!this.isAfter){gt("skipping loading of plugin as parent errored and it is not an after",i),me.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(o){return gt("override errored",i),t(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,gt("exec",i);let a;const s=o=>{if(r){gt("loading complete",i);return}this._error=o,gt(o?"exec errored":"exec completed",i),r=!0,a&&clearTimeout(a),t(o)};this.timeout>0&&(gt("setting up timeout",i,this.timeout),a=setTimeout(function(){gt("timed out",i),a=null;const o=new oP(i);o.fn=n,s(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const l=n(this.server,this.opts,s);l&&typeof l.then=="function"&&(gt("exec: resolving promise",i),l.then(()=>me.nextTick(s),o=>me.nextTick(s,o)))};La.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(gt("rejecting promise",this.name,n),this._promise.reject(n)):(gt("resolving promise",this.name),this._promise.resolve()),this._promise=null,me.nextTick(r,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=uP(),t=this._promise.promise,this.server?e():this.on("start",e)),t};La.prototype.enqueue=function(e,t){gt("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};La.prototype.finish=function(e,t){gt("finish",this.name,e);const n=()=>{this.loaded||(gt("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),n();return}const r=()=>{if(gt("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const i=()=>{gt("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else n();else gt("delayed",this.name),this.q.drain=()=>{gt("drain",this.name),this.q.drain=pP,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function dP(e,t){const n=this;me.nextTick(e5.bind(n),e,t)}function e5(e,t){if(typeof e.func.then=="function"){e.func.then(r=>{typeof r.default=="function"&&(r=r.default),e.func=r,e5.call(this,e,t)},t);return}const n=this._current[0];this._current.unshift(e),e.exec(n&&n.server||this._server,r=>{e.finish(r,i=>{this._current.shift(),t(i)})})}function pP(){}q3.exports=La;q3.exports.loadPlugin=e5;var hP=q3.exports;const Um=$b,fP=l7.EventEmitter,mP=q1.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:o2,AVV_ERR_CALLBACK_NOT_FN:Rs,AVV_ERR_PLUGIN_NOT_VALID:gP,AVV_ERR_ROOT_PLG_BOOTED:bP,AVV_ERR_READY_TIMEOUT:yP}=v7,VP=tP,Ou=hP,Ia=S7("avvio"),y1=Symbol("kAvvio"),c2=Symbol("kThenifyDoNotWrap");function AP(e,t,n){const r=t.expose||{},i=r.use||"use",a=r.after||"after",s=r.ready||"ready",l=r.onClose||"onClose",o=r.close||"close";if(e[i])throw new o2(i);if(e[a])throw new o2(a);if(e[s])throw new o2(s);e[i]=function(c,u){return n.use(c,u),this},Object.defineProperty(e,"then",{get:W7.bind(n)}),e[y1]=!0,e[a]=function(c){return typeof c!="function"?n._loadRegistered():(n.after(u2(c,this)),this)},e[s]=function(c){if(c&&typeof c!="function")throw new Rs(s,typeof c);return n.ready(c?u2(c,this):void 0)},e[l]=function(c){if(typeof c!="function")throw new Rs(l,typeof c);return n.onClose(SP(c,this)),this},e[o]=function(c){if(c&&typeof c!="function")throw new Rs(o,typeof c);return c?(n.close(u2(c,this)),this):n.close()}}function ht(e,t,n){if(typeof e=="function"&&arguments.length===1&&(n=e,t={},e=null),typeof t=="function"&&(n=t,t={}),t=t||{},!(this instanceof ht)){const r=new ht(e,t,n);return e&&AP(e,t,r),r}t.autostart!==!1&&(t.autostart=!0),e=e||this,this._timeout=Number(t.timeout)||0,this._server=e,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new VP,this._readyQ=Um(this,Z7,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=Bm},this._closeQ=Um(this,vP,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=Bm},this._doStart=null,this._root=new Ou(this,RP.bind(this),t,!1,0),this._root.once("start",(r,i,a)=>{const s=this.pluginTree.start(null,i,a);this._root.once("loaded",(l,o,c)=>{this.pluginTree.stop(s,c)})}),Ou.loadPlugin.call(this,this._root,r=>{Ia("root plugin ready");try{this.emit("preReady"),this._root=null}catch(i){r=r||this._error||i}if(r){if(this._error=r,this._readyQ.length()===0)throw r}else this.booted=!0;this._readyQ.resume()})}function RP(e,t,n){this._doStart=n,t.autostart&&this.start()}mP(ht,fP);ht.prototype.start=function(){return this.started=!0,me.nextTick(this._doStart),this};ht.prototype.override=function(e,t,n){return e};function EP(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new gP(typeof e);return e}ht.prototype[y1]=!0;ht.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};ht.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&me.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(ht.prototype,"then",{get:W7});ht.prototype._addPlugin=function(e,t,n){if(e=EP(e),t=t||{},this.booted)throw new bP;const r=this._current[0],i=new Ou(this,e,t,n);if(i.once("start",(a,s,l)=>{const o=this.pluginTree.start(r.name,s,l);i.once("loaded",(c,u,d)=>{this.pluginTree.stop(o,d)})}),r.loaded)throw new Error(i.name,r.name);return r.enqueue(i,a=>{a&&(this._error=a)}),i};ht.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,r,i){Z7.call(this,e,i)}return this};ht.prototype.onClose=function(e){if(typeof e!="function")throw new Error("not a function");e[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(e,t.bind(this));function t(n){n&&(this._error=n)}return this};ht.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new Rs("close",typeof e)}else t=new Promise(function(n,r){e=function(i){if(i)return r(i);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),me.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};ht.prototype.ready=function(e){if(e){if(typeof e!="function")throw new Rs("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(i),this.start();const r=this._current[0].server;function i(a,s,l){a?n(a):t(r),me.nextTick(l)}})};ht.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};ht.prototype.toJSON=function(){return this.pluginTree.toJSON()};function Bm(){}function W7(){if(this.booted){Ia("thenify returning null because we are already booted");return}if(this[c2]){this[c2]=!1;return}return Ia("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[c2]=!0,e(this._server)),t)}function Z7(e,t){const n=this._server,r=this._error;let i;if(this._error=null,e.length===0)this._error=r,i=e(),i&&!i[y1]&&typeof i.then=="function"?i.then(()=>me.nextTick(t),a=>me.nextTick(t,a)):me.nextTick(t);else if(e.length===1)i=e(r),i&&!i[y1]&&typeof i.then=="function"?i.then(()=>me.nextTick(t),a=>me.nextTick(t,a)):me.nextTick(t);else if(this._timeout===0){const a=s=>{this._error=s,t(this._error)};e.length===2?e(r,a):e(r,n,a)}else CP.call(this,e,r,n,t)}function CP(e,t,n,r){const i=e.name;Ia("setting up ready timeout",i,this._timeout);let a=setTimeout(()=>{Ia("timed out",i),a=null;const l=new yP(i);l.fn=e,this._error=l,r(l)},this._timeout);e.length===2?e(t,s.bind(this)):e(t,n,s.bind(this));function s(l){a&&(clearTimeout(a),this._error=l,r(this._error))}}function vP(e,t){const n=this._server,r=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let i;r?i=e(n):i=e(this._error),i&&typeof i.then=="function"?(Ia("resolving close/onClose promise"),i.then(()=>me.nextTick(t),a=>me.nextTick(t,a))):me.nextTick(t)}else e.length===2?e(r?n:this._error,t):r?e(n,t):e(this._error,n,t)}function SP(e,t){return n.bind(t);function n(r,i){let a;e.length===0?(a=e(),a&&a.then?a.then(function(){me.nextTick(i)},i):me.nextTick(i)):e.length===1?(a=e(this),a&&a.then?a.then(function(){me.nextTick(i)},i):me.nextTick(i)):e(this,i)}}function u2(e,t){return n.bind(t);function n(r,i){let a;e?e.length===0?(a=e(),a&&a.then?a.then(function(){me.nextTick(i,r)},i):me.nextTick(i,r)):e.length===1?(a=e(r),a&&a.then?a.then(function(){me.nextTick(i)},i):me.nextTick(i)):e.length===2?e(r,i):e(r,this,i):me.nextTick(i)}}z3.exports=ht;z3.exports.express=function(e){return ht(e,{expose:{use:"load"}})};var WP=z3.exports;const ZP=tj(WP);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const e=["webkit","moz","ms","o"];for(const t of e)window.requestAnimationFrame=window.requestAnimationFrame||window[`${t}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${t}CancelAnimationFrame`]||window[`${t}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let t=0;const n=!!(window.performance&&window.performance.now);window.requestAnimationFrame=function(r){const i=n?window.performance.now():new Date().getTime(),a=Math.max(0,16-(i-t)),s=window.setTimeout(function(){r(i+a)},a);return t=i+a,s},window.cancelAnimationFrame=clearTimeout}})();function IP(e,t=!0,n=!0,r={friendsTab:"enabled"}){const i=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",a=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",s=ZP(Object.create({}),{autostart:!1});return s.use(X_,{hideFriends:r.hideFriends,skipOnboarding:r.skipOnboarding,betPack:r.betPack,friendsTab:r.friendsTab,theme:r.theme,themeMode:r.themeMode}),s.use(S_,{onDeepLinkHandled:r==null?void 0:r.onDeepLinkHandled}),s.use(F_,{videoPlayerController:r==null?void 0:r.videoPlayerController}),s.use(G_,{onContentActivate:r==null?void 0:r.onContentActivate,withAd:r==null?void 0:r.withAd,withAdNotification:r==null?void 0:r.withAdNotification}),s.use(KH,{sdkKey:e,host:i,analyticsHost:a,version:r==null?void 0:r.version,webOS:r==null?void 0:r.webOS}),s.use(DH),s.use(I_),s.use(M_),s.use(y_),s.use(ej),s.after((l,o,c)=>{if(l)throw l;o.ready(),c()}),n&&s.after(async(l,o,c)=>{if(l)throw l;await o.sdk.initializeApp(),c()}),s.onClose(()=>{console.log("close")}),s}const FP=({sdkKey:e,plugins:t,production:n,autoEnable:r,onDeepLinkHandled:i,videoPlayerController:a,onContentActivate:s,hideFriends:l,skipOnboarding:o,withAdNotification:c,withAd:u,friendsTab:d,betPack:m,webOS:g})=>{const[y,A]=Z.useState(null);return Z.useEffect(()=>{let E=!1;if(!e)return console.error("streamlayer sdk key should be provided"),A(h=>(h!==null&&typeof h.disableApp=="function"&&h.disableApp(),null)),()=>{E=!0};const f=IP(e,n,r,{version:"1.18.4",onDeepLinkHandled:i,videoPlayerController:a,onContentActivate:s,skipOnboarding:o,withAdNotification:c,withAd:u,hideFriends:l,friendsTab:d,betPack:m,webOS:g});if(t)for(const h of t)f.use(h);return f.ready().then(h=>{E||(A(h.sdk),typeof window<"u")}).catch(h=>console.log(h)),()=>{E=!0,f.close(function(h){if(h)throw h})}},[e,n]),y},t5=({event:e,internal:t})=>{const n=sl(),r=GP();return Z.useEffect(()=>(n&&(e&&(n.createEventSession(e,t),r&&(r.current=e)),!e&&(r!=null&&r.current)&&(n.createEventSession("",t),r.current="")),()=>{n&&n.disableApp()}),[e,t,r,n]),null};var I7=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(I7||{});const NP={status:0,sdk:null},ic=Z.createContext(NP),F7=({sdkKey:e,theme:t,themeMode:n,plugins:r,children:i,event:a,production:s=!0,autoEnable:l=!0,withAdNotification:o,withAd:c=!0,betPack:u=!1,hideFriends:d,skipOnboarding:m,friendsTab:g="enabled",onDeepLinkHandled:y,videoPlayerController:A,onContentActivate:E,containerId:f,webOS:h})=>{const b=FP({sdkKey:e,plugins:r,production:s,autoEnable:l,onDeepLinkHandled:y,videoPlayerController:A,onContentActivate:E,hideFriends:d,skipOnboarding:m,withAdNotification:o,withAd:c,friendsTab:g,betPack:u,webOS:h}),V=Z.useRef(""),C=Z.useMemo(()=>b?{sdk:b,status:2,event:V}:{status:1,sdk:null,event:V},[b]);return Z.useEffect(()=>{b&&(b.options.setKey("friendsTab",g),b.options.setKey("theme",t),b.options.setKey("themeMode",n),b.options.setKey("skipOnboarding",m),b.options.setKey("betPack",u),b.options.setKey("containerId",f))},[b,g,t,n,m,u,f]),Z.useEffect(()=>()=>{y&&(b==null||b.removeDeepLinkHandler(y)),A&&(b==null||b.removeVideoPlayerController(A))},[b]),Z.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!e,onDeepLinkHandled:!!y,videoPlayerController:!!A})},[e,y,A]),p.jsxs(ic.Provider,{value:C,children:[a!==void 0&&p.jsx(t5,{event:a}),i]})},sl=()=>{const{sdk:e}=Z.useContext(ic);return e},GP=()=>{const{event:e}=Z.useContext(ic);return e},Ym=e=>{const t=e.target;t instanceof Element&&t.getAttribute("data-a")==="intr"&&ma.emit("interactions",{action:"tap",payload:{}})},XP=()=>{const e=sl();return Z.useEffect(()=>(document==null||document.addEventListener("click",Ym),()=>{document==null||document.removeEventListener("click",Ym)}),[]),e?p.jsx(d6,{sdk:e}):null},wP=({sdkKey:e,plugins:t,children:n,event:r,onDeepLinkHandled:i,videoPlayerController:a,production:s=!0})=>p.jsxs(F7,{sdkKey:e,plugins:t,production:s,autoEnable:!0,onDeepLinkHandled:i,videoPlayerController:a,friendsTab:"disabled",skipOnboarding:!0,hideFriends:!0,children:[p.jsx(t5,{event:r}),n]}),UP=({betPack:e,useContainer:t})=>{const{sdk:n,status:r}=Z.useContext(ic);return r===I7.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),null):n?p.jsx("div",{className:"StreamLayerSDK",children:p.jsx(x3,{style:{height:"100%"},children:p.jsx(tO,{sdk:n,betPack:e,useContainer:t})})}):null};class BP extends Z.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){console.error(t,n.componentStack)}render(){return this.state.hasError?null:p.jsx(UP,{...this.props})}}const YP=({token:e,schema:t})=>{const n=sl();return Z.useEffect(()=>{e&&t&&n&&n.authorizationBypass(t,e),n&&(n.withAuth=!0)},[e,t,n]),null},TP=({event:e,sdkKey:t,token:n,deviceId:r,production:i=!1,theme:a,themeMode:s="light",children:l})=>{const[o,c]=Z.useState(!1);return Z.useEffect(()=>{n&&(new Fb().setToken(n),c(!0))},[n]),Z.useEffect(()=>{r&&localStorage.setItem("sl-device-id",r)},[r]),o?p.jsxs(F7,{sdkKey:t,production:i,theme:a,themeMode:s,betPack:!0,friendsTab:"disabled",hideFriends:!0,skipOnboarding:!0,autoEnable:!0,children:[p.jsx(t5,{event:e,internal:!1}),p.jsx("div",{className:"StreamLayerSDK",children:p.jsx(x3,{children:l})})]}):null},xP=({production:e})=>{const[t,n]=Z.useState();return Z.useEffect(()=>{const{hostname:r,search:i}=window.location,a=new URLSearchParams(i);n({sdkKey:a.get("_slrk")||"",event:a.get("_slre")||"",token:a.get("_slrt")||"",deviceId:a.get("_slrd")||"",theme:a.get("theme")||"",themeMode:a.get("themeMode")==="dark"?"dark":"light",production:e??!(r.includes("next.")||r==="localhost")})},[e]),t?p.jsx(TP,{...t,children:p.jsx(XP,{})}):null},kP=()=>{const e=sl();return e?p.jsx("div",{className:"StreamLayerSDK",children:p.jsx(x3,{children:p.jsx(dO,{sdk:e})})}):null};exports.A=vt;exports.B1=se;exports.BetPackStandalone=xP;exports.C=Lz;exports.C$1=QU;exports.I=B3;exports.InfiniteScroll=Xu;exports.InvitationFrom=Co;exports.M=Zb;exports.MastersStreamLayerProvider=wP;exports.MastersStreamLayerSDKReact=BP;exports.S=OU;exports.StreamLayerLogin=YP;exports.StreamLayerSDKPoints=kP;exports.T=Wb;exports.cx_default=pt;exports.d=HU;exports.f=z4;exports.k=Cb;exports.l=zU;exports.m=JU;exports.n=Yd;exports.p=hO;exports.s=Ab;exports.styled_default=R;exports.useStore=Ne;exports.useStreamLayer=sl;exports.useTransition=Uy;exports.z=vb;
101
+ `).slice(0,2).map(n=>n.trim()).join(" -- ")}function uP(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function La(e,t,n,r,i){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=i===void 0?e._timeout:i,this.name=cP(t,n),this.isAfter=r,this.q=aP(e,dP,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}lP(La,sP);La.prototype.exec=function(e,t){const n=this.func;let r=!1;const i=this.name;if(this.parent._error&&!this.isAfter){gt("skipping loading of plugin as parent errored and it is not an after",i),me.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(o){return gt("override errored",i),t(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,gt("exec",i);let a;const s=o=>{if(r){gt("loading complete",i);return}this._error=o,gt(o?"exec errored":"exec completed",i),r=!0,a&&clearTimeout(a),t(o)};this.timeout>0&&(gt("setting up timeout",i,this.timeout),a=setTimeout(function(){gt("timed out",i),a=null;const o=new oP(i);o.fn=n,s(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const l=n(this.server,this.opts,s);l&&typeof l.then=="function"&&(gt("exec: resolving promise",i),l.then(()=>me.nextTick(s),o=>me.nextTick(s,o)))};La.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(gt("rejecting promise",this.name,n),this._promise.reject(n)):(gt("resolving promise",this.name),this._promise.resolve()),this._promise=null,me.nextTick(r,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=uP(),t=this._promise.promise,this.server?e():this.on("start",e)),t};La.prototype.enqueue=function(e,t){gt("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};La.prototype.finish=function(e,t){gt("finish",this.name,e);const n=()=>{this.loaded||(gt("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),n();return}const r=()=>{if(gt("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const i=()=>{gt("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else n();else gt("delayed",this.name),this.q.drain=()=>{gt("drain",this.name),this.q.drain=pP,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function dP(e,t){const n=this;me.nextTick(e5.bind(n),e,t)}function e5(e,t){if(typeof e.func.then=="function"){e.func.then(r=>{typeof r.default=="function"&&(r=r.default),e.func=r,e5.call(this,e,t)},t);return}const n=this._current[0];this._current.unshift(e),e.exec(n&&n.server||this._server,r=>{e.finish(r,i=>{this._current.shift(),t(i)})})}function pP(){}q3.exports=La;q3.exports.loadPlugin=e5;var hP=q3.exports;const Um=$b,fP=l7.EventEmitter,mP=q1.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:o2,AVV_ERR_CALLBACK_NOT_FN:Rs,AVV_ERR_PLUGIN_NOT_VALID:gP,AVV_ERR_ROOT_PLG_BOOTED:bP,AVV_ERR_READY_TIMEOUT:yP}=v7,VP=tP,Ou=hP,Ia=S7("avvio"),y1=Symbol("kAvvio"),c2=Symbol("kThenifyDoNotWrap");function AP(e,t,n){const r=t.expose||{},i=r.use||"use",a=r.after||"after",s=r.ready||"ready",l=r.onClose||"onClose",o=r.close||"close";if(e[i])throw new o2(i);if(e[a])throw new o2(a);if(e[s])throw new o2(s);e[i]=function(c,u){return n.use(c,u),this},Object.defineProperty(e,"then",{get:W7.bind(n)}),e[y1]=!0,e[a]=function(c){return typeof c!="function"?n._loadRegistered():(n.after(u2(c,this)),this)},e[s]=function(c){if(c&&typeof c!="function")throw new Rs(s,typeof c);return n.ready(c?u2(c,this):void 0)},e[l]=function(c){if(typeof c!="function")throw new Rs(l,typeof c);return n.onClose(SP(c,this)),this},e[o]=function(c){if(c&&typeof c!="function")throw new Rs(o,typeof c);return c?(n.close(u2(c,this)),this):n.close()}}function ht(e,t,n){if(typeof e=="function"&&arguments.length===1&&(n=e,t={},e=null),typeof t=="function"&&(n=t,t={}),t=t||{},!(this instanceof ht)){const r=new ht(e,t,n);return e&&AP(e,t,r),r}t.autostart!==!1&&(t.autostart=!0),e=e||this,this._timeout=Number(t.timeout)||0,this._server=e,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new VP,this._readyQ=Um(this,Z7,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=Bm},this._closeQ=Um(this,vP,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=Bm},this._doStart=null,this._root=new Ou(this,RP.bind(this),t,!1,0),this._root.once("start",(r,i,a)=>{const s=this.pluginTree.start(null,i,a);this._root.once("loaded",(l,o,c)=>{this.pluginTree.stop(s,c)})}),Ou.loadPlugin.call(this,this._root,r=>{Ia("root plugin ready");try{this.emit("preReady"),this._root=null}catch(i){r=r||this._error||i}if(r){if(this._error=r,this._readyQ.length()===0)throw r}else this.booted=!0;this._readyQ.resume()})}function RP(e,t,n){this._doStart=n,t.autostart&&this.start()}mP(ht,fP);ht.prototype.start=function(){return this.started=!0,me.nextTick(this._doStart),this};ht.prototype.override=function(e,t,n){return e};function EP(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new gP(typeof e);return e}ht.prototype[y1]=!0;ht.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};ht.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&me.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(ht.prototype,"then",{get:W7});ht.prototype._addPlugin=function(e,t,n){if(e=EP(e),t=t||{},this.booted)throw new bP;const r=this._current[0],i=new Ou(this,e,t,n);if(i.once("start",(a,s,l)=>{const o=this.pluginTree.start(r.name,s,l);i.once("loaded",(c,u,d)=>{this.pluginTree.stop(o,d)})}),r.loaded)throw new Error(i.name,r.name);return r.enqueue(i,a=>{a&&(this._error=a)}),i};ht.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,r,i){Z7.call(this,e,i)}return this};ht.prototype.onClose=function(e){if(typeof e!="function")throw new Error("not a function");e[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(e,t.bind(this));function t(n){n&&(this._error=n)}return this};ht.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new Rs("close",typeof e)}else t=new Promise(function(n,r){e=function(i){if(i)return r(i);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),me.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};ht.prototype.ready=function(e){if(e){if(typeof e!="function")throw new Rs("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(i),this.start();const r=this._current[0].server;function i(a,s,l){a?n(a):t(r),me.nextTick(l)}})};ht.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};ht.prototype.toJSON=function(){return this.pluginTree.toJSON()};function Bm(){}function W7(){if(this.booted){Ia("thenify returning null because we are already booted");return}if(this[c2]){this[c2]=!1;return}return Ia("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[c2]=!0,e(this._server)),t)}function Z7(e,t){const n=this._server,r=this._error;let i;if(this._error=null,e.length===0)this._error=r,i=e(),i&&!i[y1]&&typeof i.then=="function"?i.then(()=>me.nextTick(t),a=>me.nextTick(t,a)):me.nextTick(t);else if(e.length===1)i=e(r),i&&!i[y1]&&typeof i.then=="function"?i.then(()=>me.nextTick(t),a=>me.nextTick(t,a)):me.nextTick(t);else if(this._timeout===0){const a=s=>{this._error=s,t(this._error)};e.length===2?e(r,a):e(r,n,a)}else CP.call(this,e,r,n,t)}function CP(e,t,n,r){const i=e.name;Ia("setting up ready timeout",i,this._timeout);let a=setTimeout(()=>{Ia("timed out",i),a=null;const l=new yP(i);l.fn=e,this._error=l,r(l)},this._timeout);e.length===2?e(t,s.bind(this)):e(t,n,s.bind(this));function s(l){a&&(clearTimeout(a),this._error=l,r(this._error))}}function vP(e,t){const n=this._server,r=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let i;r?i=e(n):i=e(this._error),i&&typeof i.then=="function"?(Ia("resolving close/onClose promise"),i.then(()=>me.nextTick(t),a=>me.nextTick(t,a))):me.nextTick(t)}else e.length===2?e(r?n:this._error,t):r?e(n,t):e(this._error,n,t)}function SP(e,t){return n.bind(t);function n(r,i){let a;e.length===0?(a=e(),a&&a.then?a.then(function(){me.nextTick(i)},i):me.nextTick(i)):e.length===1?(a=e(this),a&&a.then?a.then(function(){me.nextTick(i)},i):me.nextTick(i)):e(this,i)}}function u2(e,t){return n.bind(t);function n(r,i){let a;e?e.length===0?(a=e(),a&&a.then?a.then(function(){me.nextTick(i,r)},i):me.nextTick(i,r)):e.length===1?(a=e(r),a&&a.then?a.then(function(){me.nextTick(i)},i):me.nextTick(i)):e.length===2?e(r,i):e(r,this,i):me.nextTick(i)}}z3.exports=ht;z3.exports.express=function(e){return ht(e,{expose:{use:"load"}})};var WP=z3.exports;const ZP=tj(WP);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const e=["webkit","moz","ms","o"];for(const t of e)window.requestAnimationFrame=window.requestAnimationFrame||window[`${t}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${t}CancelAnimationFrame`]||window[`${t}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let t=0;const n=!!(window.performance&&window.performance.now);window.requestAnimationFrame=function(r){const i=n?window.performance.now():new Date().getTime(),a=Math.max(0,16-(i-t)),s=window.setTimeout(function(){r(i+a)},a);return t=i+a,s},window.cancelAnimationFrame=clearTimeout}})();function IP(e,t=!0,n=!0,r={friendsTab:"enabled"}){const i=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",a=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",s=ZP(Object.create({}),{autostart:!1});return s.use(X_,{hideFriends:r.hideFriends,skipOnboarding:r.skipOnboarding,betPack:r.betPack,friendsTab:r.friendsTab,theme:r.theme,themeMode:r.themeMode}),s.use(S_,{onDeepLinkHandled:r==null?void 0:r.onDeepLinkHandled}),s.use(F_,{videoPlayerController:r==null?void 0:r.videoPlayerController}),s.use(G_,{onContentActivate:r==null?void 0:r.onContentActivate,withAd:r==null?void 0:r.withAd,withAdNotification:r==null?void 0:r.withAdNotification}),s.use(KH,{sdkKey:e,host:i,analyticsHost:a,version:r==null?void 0:r.version,webOS:r==null?void 0:r.webOS}),s.use(DH),s.use(I_),s.use(M_),s.use(y_),s.use(ej),s.after((l,o,c)=>{if(l)throw l;o.ready(),c()}),n&&s.after(async(l,o,c)=>{if(l)throw l;await o.sdk.initializeApp(),c()}),s.onClose(()=>{console.log("close")}),s}const FP=({sdkKey:e,plugins:t,production:n,autoEnable:r,onDeepLinkHandled:i,videoPlayerController:a,onContentActivate:s,hideFriends:l,skipOnboarding:o,withAdNotification:c,withAd:u,friendsTab:d,betPack:m,webOS:g})=>{const[y,A]=Z.useState(null);return Z.useEffect(()=>{let E=!1;if(!e)return console.error("streamlayer sdk key should be provided"),A(h=>(h!==null&&typeof h.disableApp=="function"&&h.disableApp(),null)),()=>{E=!0};const f=IP(e,n,r,{version:"1.18.5",onDeepLinkHandled:i,videoPlayerController:a,onContentActivate:s,skipOnboarding:o,withAdNotification:c,withAd:u,hideFriends:l,friendsTab:d,betPack:m,webOS:g});if(t)for(const h of t)f.use(h);return f.ready().then(h=>{E||(A(h.sdk),typeof window<"u")}).catch(h=>console.log(h)),()=>{E=!0,f.close(function(h){if(h)throw h})}},[e,n]),y},t5=({event:e,internal:t})=>{const n=sl(),r=GP();return Z.useEffect(()=>(n&&(e&&(n.createEventSession(e,t),r&&(r.current=e)),!e&&(r!=null&&r.current)&&(n.createEventSession("",t),r.current="")),()=>{n&&n.disableApp()}),[e,t,r,n]),null};var I7=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(I7||{});const NP={status:0,sdk:null},ic=Z.createContext(NP),F7=({sdkKey:e,theme:t,themeMode:n,plugins:r,children:i,event:a,production:s=!0,autoEnable:l=!0,withAdNotification:o,withAd:c=!0,betPack:u=!1,hideFriends:d,skipOnboarding:m,friendsTab:g="enabled",onDeepLinkHandled:y,videoPlayerController:A,onContentActivate:E,containerId:f,webOS:h})=>{const b=FP({sdkKey:e,plugins:r,production:s,autoEnable:l,onDeepLinkHandled:y,videoPlayerController:A,onContentActivate:E,hideFriends:d,skipOnboarding:m,withAdNotification:o,withAd:c,friendsTab:g,betPack:u,webOS:h}),V=Z.useRef(""),C=Z.useMemo(()=>b?{sdk:b,status:2,event:V}:{status:1,sdk:null,event:V},[b]);return Z.useEffect(()=>{b&&(b.options.setKey("friendsTab",g),b.options.setKey("theme",t),b.options.setKey("themeMode",n),b.options.setKey("skipOnboarding",m),b.options.setKey("betPack",u),b.options.setKey("containerId",f))},[b,g,t,n,m,u,f]),Z.useEffect(()=>()=>{y&&(b==null||b.removeDeepLinkHandler(y)),A&&(b==null||b.removeVideoPlayerController(A))},[b]),Z.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!e,onDeepLinkHandled:!!y,videoPlayerController:!!A})},[e,y,A]),p.jsxs(ic.Provider,{value:C,children:[a!==void 0&&p.jsx(t5,{event:a}),i]})},sl=()=>{const{sdk:e}=Z.useContext(ic);return e},GP=()=>{const{event:e}=Z.useContext(ic);return e},Ym=e=>{const t=e.target;t instanceof Element&&t.getAttribute("data-a")==="intr"&&ma.emit("interactions",{action:"tap",payload:{}})},XP=()=>{const e=sl();return Z.useEffect(()=>(document==null||document.addEventListener("click",Ym),()=>{document==null||document.removeEventListener("click",Ym)}),[]),e?p.jsx(d6,{sdk:e}):null},wP=({sdkKey:e,plugins:t,children:n,event:r,onDeepLinkHandled:i,videoPlayerController:a,production:s=!0})=>p.jsxs(F7,{sdkKey:e,plugins:t,production:s,autoEnable:!0,onDeepLinkHandled:i,videoPlayerController:a,friendsTab:"disabled",skipOnboarding:!0,hideFriends:!0,children:[p.jsx(t5,{event:r}),n]}),UP=({betPack:e,useContainer:t})=>{const{sdk:n,status:r}=Z.useContext(ic);return r===I7.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),null):n?p.jsx("div",{className:"StreamLayerSDK",children:p.jsx(x3,{style:{height:"100%"},children:p.jsx(tO,{sdk:n,betPack:e,useContainer:t})})}):null};class BP extends Z.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){console.error(t,n.componentStack)}render(){return this.state.hasError?null:p.jsx(UP,{...this.props})}}const YP=({token:e,schema:t})=>{const n=sl();return Z.useEffect(()=>{e&&t&&n&&n.authorizationBypass(t,e),n&&(n.withAuth=!0)},[e,t,n]),null},TP=({event:e,sdkKey:t,token:n,deviceId:r,production:i=!1,theme:a,themeMode:s="light",children:l})=>{const[o,c]=Z.useState(!1);return Z.useEffect(()=>{n&&(new Fb().setToken(n),c(!0))},[n]),Z.useEffect(()=>{r&&localStorage.setItem("sl-device-id",r)},[r]),o?p.jsxs(F7,{sdkKey:t,production:i,theme:a,themeMode:s,betPack:!0,friendsTab:"disabled",hideFriends:!0,skipOnboarding:!0,autoEnable:!0,children:[p.jsx(t5,{event:e,internal:!1}),p.jsx("div",{className:"StreamLayerSDK",children:p.jsx(x3,{children:l})})]}):null},xP=({production:e})=>{const[t,n]=Z.useState();return Z.useEffect(()=>{const{hostname:r,search:i}=window.location,a=new URLSearchParams(i);n({sdkKey:a.get("_slrk")||"",event:a.get("_slre")||"",token:a.get("_slrt")||"",deviceId:a.get("_slrd")||"",theme:a.get("theme")||"",themeMode:a.get("themeMode")==="dark"?"dark":"light",production:e??!(r.includes("next.")||r==="localhost")})},[e]),t?p.jsx(TP,{...t,children:p.jsx(XP,{})}):null},kP=()=>{const e=sl();return e?p.jsx("div",{className:"StreamLayerSDK",children:p.jsx(x3,{children:p.jsx(dO,{sdk:e})})}):null};exports.A=vt;exports.B1=se;exports.BetPackStandalone=xP;exports.C=Lz;exports.C$1=QU;exports.I=B3;exports.InfiniteScroll=Xu;exports.InvitationFrom=Co;exports.M=Zb;exports.MastersStreamLayerProvider=wP;exports.MastersStreamLayerSDKReact=BP;exports.S=OU;exports.StreamLayerLogin=YP;exports.StreamLayerSDKPoints=kP;exports.T=Wb;exports.cx_default=pt;exports.d=HU;exports.f=z4;exports.k=Cb;exports.l=zU;exports.m=JU;exports.n=Yd;exports.p=hO;exports.s=Ab;exports.styled_default=R;exports.useStore=Ne;exports.useStreamLayer=sl;exports.useTransition=Uy;exports.z=vb;
@@ -27273,7 +27273,7 @@ const L$ = ({
27273
27273
  E = !0;
27274
27274
  };
27275
27275
  const h = T$(e, n, r, {
27276
- version: "1.18.4",
27276
+ version: "1.18.5",
27277
27277
  onDeepLinkHandled: i,
27278
27278
  videoPlayerController: a,
27279
27279
  onContentActivate: l,