@streamlayer/react 1.23.0 → 1.23.2
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.
- package/lib/app/pause-ad.d.ts +2 -4
- package/lib/app/polymarket.d.ts +7 -0
- package/lib/cjs/Question.js +1 -1
- package/lib/cjs/advertisement.js +28 -223
- package/lib/cjs/analytics.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/feature.js +1 -0
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/hooks-WfHlJH12.js +1 -0
- package/lib/cjs/index-eShKGO10.js +1 -5
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -4
- package/lib/cjs/index11.js +3 -1
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +3 -1
- package/lib/cjs/index14.js +1 -1
- package/lib/cjs/index15.js +1 -5
- package/lib/cjs/index16.js +3 -0
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index3.js +1 -1
- package/lib/cjs/index4.js +3 -5
- package/lib/cjs/index5.js +1 -1
- package/lib/cjs/index6.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +1 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +1 -13
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/polymarket.js +9 -0
- package/lib/cjs/sl-types.js +1 -15
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/style.css +1 -0
- package/lib/cjs/theme.js +1 -17
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +3 -17
- package/lib/cjs/utils.js +1 -47
- package/lib/classic/app/pause-ad.d.ts +2 -4
- package/lib/classic/app/polymarket.d.ts +7 -0
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +28 -223
- package/lib/classic/cjs/analytics.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +3 -5
- package/lib/classic/cjs/feature.js +1 -0
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
- package/lib/classic/cjs/index-eShKGO10.js +1 -5
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -1
- package/lib/classic/cjs/index11.js +1 -1
- package/lib/classic/cjs/index12.js +1 -4
- package/lib/classic/cjs/index13.js +3 -0
- package/lib/classic/cjs/index2.js +3 -5
- package/lib/classic/cjs/index3.js +1 -1
- package/lib/classic/cjs/index4.js +1 -1
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index6.js +1 -1
- package/lib/classic/cjs/index7.js +1 -1
- package/lib/classic/cjs/index8.js +1 -1
- package/lib/classic/cjs/index9.js +3 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/polymarket.js +9 -0
- package/lib/classic/cjs/sl-types.js +1 -15
- package/lib/classic/cjs/style.css +1 -0
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
- package/lib/classic/cjs/utils.js +1 -47
- package/lib/classic/es/Question.js +277 -264
- package/lib/classic/es/advertisement.js +34990 -18881
- package/lib/classic/es/analytics.js +58 -56
- package/lib/classic/es/auth.js +14 -8
- package/lib/classic/es/bet-pack.js +2448 -2418
- package/lib/classic/es/feature.js +108 -0
- package/lib/classic/es/gamification-feature.js +2 -2
- package/lib/classic/es/hooks-WfHlJH12.js +98 -0
- package/lib/classic/es/index-eShKGO10.js +948 -948
- package/lib/classic/es/index.js +13 -13
- package/lib/classic/es/index10.js +83 -2295
- package/lib/classic/es/index11.js +3095 -179
- package/lib/classic/es/index12.js +174 -821
- package/lib/classic/es/index13.js +850 -0
- package/lib/classic/es/index2.js +2099 -1763
- package/lib/classic/es/index3.js +11 -11
- package/lib/classic/es/index4.js +127 -127
- package/lib/classic/es/index5.js +3 -5
- package/lib/classic/es/index6.js +10 -11
- package/lib/classic/es/index7.js +6 -62
- package/lib/classic/es/index8.js +9 -316
- package/lib/classic/es/index9.js +316 -82
- package/lib/classic/es/insight.js +58 -53
- package/lib/classic/es/notification.js +5 -5
- package/lib/classic/es/notification2.js +765 -722
- package/lib/classic/es/pause-ad.js +190 -167
- package/lib/classic/es/points.js +55 -47
- package/lib/classic/es/polymarket.js +6848 -0
- package/lib/classic/es/sl-types.js +193 -125
- package/lib/classic/es/useStreamLayerApp.js +2 -2
- package/lib/classic/es/useStreamLayerApp2.js +9727 -7592
- package/lib/classic/es/utils.js +28 -28
- package/lib/classic/index.d.ts +1 -0
- package/lib/classic/style.css +1 -0
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/index-eShKGO10.js +1 -5
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +3 -77
- package/lib/dist/es/gamification-feature.js +2 -2
- package/lib/dist/es/index-eShKGO10.js +948 -948
- package/lib/dist/es/index.js +7 -8
- package/lib/dist/es/masters.js +18212 -14741
- package/lib/dist/index.d.ts +29 -8
- package/lib/dist/style.css +1 -1
- package/lib/es/Question.js +108 -106
- package/lib/es/advertisement.js +34990 -18881
- package/lib/es/analytics.js +58 -56
- package/lib/es/auth.js +14 -8
- package/lib/es/bet-pack.js +29 -17
- package/lib/es/feature.js +108 -0
- package/lib/es/gamification-feature.js +2 -2
- package/lib/es/gamification-feature2.js +2 -2
- package/lib/es/hooks-WfHlJH12.js +98 -0
- package/lib/es/index-eShKGO10.js +948 -948
- package/lib/es/index.js +14 -13
- package/lib/es/index10.js +258 -816
- package/lib/es/index11.js +837 -170
- package/lib/es/index12.js +181 -312
- package/lib/es/index13.js +316 -82
- package/lib/es/index14.js +83 -2350
- package/lib/es/index15.js +3069 -1224
- package/lib/es/index16.js +1453 -0
- package/lib/es/index2.js +1118 -984
- package/lib/es/index3.js +3 -62
- package/lib/es/index4.js +2424 -2407
- package/lib/es/index5.js +11 -11
- package/lib/es/index6.js +127 -127
- package/lib/es/index7.js +10 -7
- package/lib/es/index8.js +5 -9
- package/lib/es/index9.js +10 -265
- package/lib/es/insight.js +58 -53
- package/lib/es/masters.js +6 -5
- package/lib/es/masters2.js +696 -558
- package/lib/es/notification.js +697 -655
- package/lib/es/pause-ad.js +190 -167
- package/lib/es/points.js +56 -48
- package/lib/es/polymarket.js +6848 -0
- package/lib/es/sl-types.js +200 -132
- package/lib/es/storage.js +75 -74
- package/lib/es/theme.js +177 -31
- package/lib/es/useStreamLayerApp.js +2 -2
- package/lib/es/useStreamLayerApp2.js +9727 -7592
- package/lib/es/utils.js +28 -28
- package/lib/index.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +33 -20
- package/lib/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/es/hooks-B0Qttldg.js +0 -98
- package/lib/es/hooks-B0Qttldg.js +0 -98
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const ns=require("react");var pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function as(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function is(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var t=function n(){return this instanceof n?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}var Ki={exports:{}},He,bn;function he(){if(bn)return He;bn=1;function e(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}return He=e,He}var Ge,_n;function Pi(){if(_n)return Ge;_n=1;var e=typeof pe=="object"&&pe&&pe.Object===Object&&pe;return Ge=e,Ge}var Ue,mn;function se(){if(mn)return Ue;mn=1;var e=Pi(),r=typeof self=="object"&&self&&self.Object===Object&&self,t=e||r||Function("return this")();return Ue=t,Ue}var ke,Cn;function ss(){if(Cn)return ke;Cn=1;var e=se(),r=function(){return e.Date.now()};return ke=r,ke}var ze,Fn;function os(){if(Fn)return ze;Fn=1;var e=/\s/;function r(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}return ze=r,ze}var We,qn;function us(){if(qn)return We;qn=1;var e=os(),r=/^\s+/;function t(n){return n&&n.slice(0,e(n)+1).replace(r,"")}return We=t,We}var Ye,Rn;function Ae(){if(Rn)return Ye;Rn=1;var e=se(),r=e.Symbol;return Ye=r,Ye}var Xe,wn;function cs(){if(wn)return Xe;wn=1;var e=Ae(),r=Object.prototype,t=r.hasOwnProperty,n=r.toString,a=e?e.toStringTag:void 0;function i(o){var u=t.call(o,a),v=o[a];try{o[a]=void 0;var h=!0}catch{}var b=n.call(o);return h&&(u?o[a]=v:delete o[a]),b}return Xe=i,Xe}var Je,An;function fs(){if(An)return Je;An=1;var e=Object.prototype,r=e.toString;function t(n){return r.call(n)}return Je=t,Je}var Ze,Tn;function Te(){if(Tn)return Ze;Tn=1;var e=Ae(),r=cs(),t=fs(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(u){return u==null?u===void 0?a:n:i&&i in Object(u)?r(u):t(u)}return Ze=o,Ze}var Qe,xn;function ye(){if(xn)return Qe;xn=1;function e(r){return r!=null&&typeof r=="object"}return Qe=e,Qe}var Ve,On;function xe(){if(On)return Ve;On=1;var e=Te(),r=ye(),t="[object Symbol]";function n(a){return typeof a=="symbol"||r(a)&&e(a)==t}return Ve=n,Ve}var er,Sn;function ls(){if(Sn)return er;Sn=1;var e=us(),r=he(),t=xe(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,u=parseInt;function v(h){if(typeof h=="number")return h;if(t(h))return n;if(r(h)){var b=typeof h.valueOf=="function"?h.valueOf():h;h=r(b)?b+"":b}if(typeof h!="string")return h===0?h:+h;h=e(h);var _=i.test(h);return _||o.test(h)?u(h.slice(2),_?2:8):a.test(h)?n:+h}return er=v,er}var rr,En;function Mi(){if(En)return rr;En=1;var e=he(),r=ss(),t=ls(),n="Expected a function",a=Math.max,i=Math.min;function o(u,v,h){var b,_,I,M,B,S,g=0,d=!1,m=!1,C=!0;if(typeof u!="function")throw new TypeError(n);v=t(v)||0,e(h)&&(d=!!h.leading,m="maxWait"in h,I=m?a(t(h.maxWait)||0,v):I,C="trailing"in h?!!h.trailing:C);function y(T){var G=b,J=_;return b=_=void 0,g=T,M=u.apply(J,G),M}function K(T){return g=T,B=setTimeout(D,v),d?y(T):M}function x(T){var G=T-S,J=T-g,ne=v-G;return m?i(ne,I-J):ne}function q(T){var G=T-S,J=T-g;return S===void 0||G>=v||G<0||m&&J>=I}function D(){var T=r();if(q(T))return w(T);B=setTimeout(D,x(T))}function w(T){return B=void 0,C&&b?y(T):(b=_=void 0,M)}function O(){B!==void 0&&clearTimeout(B),g=0,b=S=_=B=void 0}function z(){return B===void 0?M:w(r())}function H(){var T=r(),G=q(T);if(b=arguments,_=this,S=T,G){if(B===void 0)return K(S);if(m)return clearTimeout(B),B=setTimeout(D,v),y(S)}return B===void 0&&(B=setTimeout(D,v)),M}return H.cancel=O,H.flush=z,H}return rr=o,rr}var tr,Kn;function Ii(){if(Kn)return tr;Kn=1;var e=Te(),r=he(),t="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(u){if(!r(u))return!1;var v=e(u);return v==n||v==a||v==t||v==i}return tr=o,tr}var ds=se(),hs=ds["__core-js_shared__"],vs=hs,nr=vs,Pn=function(){var e=/[^.]+$/.exec(nr&&nr.keys&&nr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ps(e){return!!Pn&&Pn in e}var ys=ps,gs=Function.prototype,bs=gs.toString;function _s(e){if(e!=null){try{return bs.call(e)}catch{}try{return e+""}catch{}}return""}var Di=_s,ms=Ii(),Cs=ys,Fs=he(),qs=Di,Rs=/[\\^$.*+?()[\]{}|]/g,ws=/^\[object .+?Constructor\]$/,As=Function.prototype,Ts=Object.prototype,xs=As.toString,Os=Ts.hasOwnProperty,Ss=RegExp("^"+xs.call(Os).replace(Rs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Es(e){if(!Fs(e)||Cs(e))return!1;var r=ms(e)?Ss:ws;return r.test(qs(e))}var Ks=Es;function Ps(e,r){return e==null?void 0:e[r]}var Ms=Ps,Is=Ks,Ds=Ms;function Ls(e,r){var t=Ds(e,r);return Is(t)?t:void 0}var ve=Ls,ar,Mn;function De(){if(Mn)return ar;Mn=1;var e=ve,r=e(Object,"create");return ar=r,ar}var ir,In;function Ns(){if(In)return ir;In=1;var e=De();function r(){this.__data__=e?e(null):{},this.size=0}return ir=r,ir}var sr,Dn;function Bs(){if(Dn)return sr;Dn=1;function e(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}return sr=e,sr}var or,Ln;function js(){if(Ln)return or;Ln=1;var e=De(),r="__lodash_hash_undefined__",t=Object.prototype,n=t.hasOwnProperty;function a(i){var o=this.__data__;if(e){var u=o[i];return u===r?void 0:u}return n.call(o,i)?o[i]:void 0}return or=a,or}var ur,Nn;function $s(){if(Nn)return ur;Nn=1;var e=De(),r=Object.prototype,t=r.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:t.call(i,a)}return ur=n,ur}var cr,Bn;function Hs(){if(Bn)return cr;Bn=1;var e=De(),r="__lodash_hash_undefined__";function t(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=e&&a===void 0?r:a,this}return cr=t,cr}var fr,jn;function Gs(){if(jn)return fr;jn=1;var e=Ns(),r=Bs(),t=js(),n=$s(),a=Hs();function i(o){var u=-1,v=o==null?0:o.length;for(this.clear();++u<v;){var h=o[u];this.set(h[0],h[1])}}return i.prototype.clear=e,i.prototype.delete=r,i.prototype.get=t,i.prototype.has=n,i.prototype.set=a,fr=i,fr}function Us(){this.__data__=[],this.size=0}var ks=Us,lr,$n;function Vt(){if($n)return lr;$n=1;function e(r,t){return r===t||r!==r&&t!==t}return lr=e,lr}var zs=Vt();function Ws(e,r){for(var t=e.length;t--;)if(zs(e[t][0],r))return t;return-1}var Le=Ws,Ys=Le,Xs=Array.prototype,Js=Xs.splice;function Zs(e){var r=this.__data__,t=Ys(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():Js.call(r,t,1),--this.size,!0}var Qs=Zs,Vs=Le;function eo(e){var r=this.__data__,t=Vs(r,e);return t<0?void 0:r[t][1]}var ro=eo,to=Le;function no(e){return to(this.__data__,e)>-1}var ao=no,io=Le;function so(e,r){var t=this.__data__,n=io(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var oo=so,uo=ks,co=Qs,fo=ro,lo=ao,ho=oo;function ge(e){var r=-1,t=e==null?0:e.length;for(this.clear();++r<t;){var n=e[r];this.set(n[0],n[1])}}ge.prototype.clear=uo;ge.prototype.delete=co;ge.prototype.get=fo;ge.prototype.has=lo;ge.prototype.set=ho;var Ne=ge,vo=ve,po=se(),yo=vo(po,"Map"),en=yo,dr,Hn;function go(){if(Hn)return dr;Hn=1;var e=Gs(),r=Ne,t=en;function n(){this.size=0,this.__data__={hash:new e,map:new(t||r),string:new e}}return dr=n,dr}var hr,Gn;function bo(){if(Gn)return hr;Gn=1;function e(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}return hr=e,hr}var vr,Un;function Be(){if(Un)return vr;Un=1;var e=bo();function r(t,n){var a=t.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return vr=r,vr}var pr,kn;function _o(){if(kn)return pr;kn=1;var e=Be();function r(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}return pr=r,pr}var yr,zn;function mo(){if(zn)return yr;zn=1;var e=Be();function r(t){return e(this,t).get(t)}return yr=r,yr}var gr,Wn;function Co(){if(Wn)return gr;Wn=1;var e=Be();function r(t){return e(this,t).has(t)}return gr=r,gr}var br,Yn;function Fo(){if(Yn)return br;Yn=1;var e=Be();function r(t,n){var a=e(this,t),i=a.size;return a.set(t,n),this.size+=a.size==i?0:1,this}return br=r,br}var _r,Xn;function rn(){if(Xn)return _r;Xn=1;var e=go(),r=_o(),t=mo(),n=Co(),a=Fo();function i(o){var u=-1,v=o==null?0:o.length;for(this.clear();++u<v;){var h=o[u];this.set(h[0],h[1])}}return i.prototype.clear=e,i.prototype.delete=r,i.prototype.get=t,i.prototype.has=n,i.prototype.set=a,_r=i,_r}var mr,Jn;function qo(){if(Jn)return mr;Jn=1;var e="__lodash_hash_undefined__";function r(t){return this.__data__.set(t,e),this}return mr=r,mr}var Cr,Zn;function Ro(){if(Zn)return Cr;Zn=1;function e(r){return this.__data__.has(r)}return Cr=e,Cr}var Fr,Qn;function Li(){if(Qn)return Fr;Qn=1;var e=rn(),r=qo(),t=Ro();function n(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return n.prototype.add=n.prototype.push=r,n.prototype.has=t,Fr=n,Fr}var qr,Vn;function wo(){if(Vn)return qr;Vn=1;function e(r,t,n,a){for(var i=r.length,o=n+(a?1:-1);a?o--:++o<i;)if(t(r[o],o,r))return o;return-1}return qr=e,qr}var Rr,ea;function Ao(){if(ea)return Rr;ea=1;function e(r){return r!==r}return Rr=e,Rr}var wr,ra;function To(){if(ra)return wr;ra=1;function e(r,t,n){for(var a=n-1,i=r.length;++a<i;)if(r[a]===t)return a;return-1}return wr=e,wr}var Ar,ta;function xo(){if(ta)return Ar;ta=1;var e=wo(),r=Ao(),t=To();function n(a,i,o){return i===i?t(a,i,o):e(a,r,o)}return Ar=n,Ar}var Tr,na;function Oo(){if(na)return Tr;na=1;var e=xo();function r(t,n){var a=t==null?0:t.length;return!!a&&e(t,n,0)>-1}return Tr=r,Tr}var xr,aa;function So(){if(aa)return xr;aa=1;function e(r,t,n){for(var a=-1,i=r==null?0:r.length;++a<i;)if(n(t,r[a]))return!0;return!1}return xr=e,xr}function Eo(e,r){for(var t=-1,n=e==null?0:e.length,a=Array(n);++t<n;)a[t]=r(e[t],t,e);return a}var tn=Eo,Or,ia;function nn(){if(ia)return Or;ia=1;function e(r){return function(t){return r(t)}}return Or=e,Or}var Sr,sa;function Ni(){if(sa)return Sr;sa=1;function e(r,t){return r.has(t)}return Sr=e,Sr}var Er,oa;function Ko(){if(oa)return Er;oa=1;var e=Li(),r=Oo(),t=So(),n=tn,a=nn(),i=Ni(),o=200;function u(v,h,b,_){var I=-1,M=r,B=!0,S=v.length,g=[],d=h.length;if(!S)return g;b&&(h=n(h,a(b))),_?(M=t,B=!1):h.length>=o&&(M=i,B=!1,h=new e(h));e:for(;++I<S;){var m=v[I],C=b==null?m:b(m);if(m=_||m!==0?m:0,B&&C===C){for(var y=d;y--;)if(h[y]===C)continue e;g.push(m)}else M(h,C,_)||g.push(m)}return g}return Er=u,Er}var Kr,ua;function Bi(){if(ua)return Kr;ua=1;function e(r,t){for(var n=-1,a=t.length,i=r.length;++n<a;)r[i+n]=t[n];return r}return Kr=e,Kr}var Pr,ca;function Po(){if(ca)return Pr;ca=1;var e=Te(),r=ye(),t="[object Arguments]";function n(a){return r(a)&&e(a)==t}return Pr=n,Pr}var Mr,fa;function an(){if(fa)return Mr;fa=1;var e=Po(),r=ye(),t=Object.prototype,n=t.hasOwnProperty,a=t.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(o){return r(o)&&n.call(o,"callee")&&!a.call(o,"callee")};return Mr=i,Mr}var Ir,la;function te(){if(la)return Ir;la=1;var e=Array.isArray;return Ir=e,Ir}var Dr,da;function Mo(){if(da)return Dr;da=1;var e=Ae(),r=an(),t=te(),n=e?e.isConcatSpreadable:void 0;function a(i){return t(i)||r(i)||!!(n&&i&&i[n])}return Dr=a,Dr}var Lr,ha;function ji(){if(ha)return Lr;ha=1;var e=Bi(),r=Mo();function t(n,a,i,o,u){var v=-1,h=n.length;for(i||(i=r),u||(u=[]);++v<h;){var b=n[v];a>0&&i(b)?a>1?t(b,a-1,i,o,u):e(u,b):o||(u[u.length]=b)}return u}return Lr=t,Lr}var Nr,va;function Oe(){if(va)return Nr;va=1;function e(r){return r}return Nr=e,Nr}var Br,pa;function Io(){if(pa)return Br;pa=1;function e(r,t,n){switch(n.length){case 0:return r.call(t);case 1:return r.call(t,n[0]);case 2:return r.call(t,n[0],n[1]);case 3:return r.call(t,n[0],n[1],n[2])}return r.apply(t,n)}return Br=e,Br}var jr,ya;function Do(){if(ya)return jr;ya=1;var e=Io(),r=Math.max;function t(n,a,i){return a=r(a===void 0?n.length-1:a,0),function(){for(var o=arguments,u=-1,v=r(o.length-a,0),h=Array(v);++u<v;)h[u]=o[a+u];u=-1;for(var b=Array(a+1);++u<a;)b[u]=o[u];return b[a]=i(h),e(n,this,b)}}return jr=t,jr}var $r,ga;function Lo(){if(ga)return $r;ga=1;function e(r){return function(){return r}}return $r=e,$r}var Hr,ba;function No(){if(ba)return Hr;ba=1;var e=ve,r=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Hr=r,Hr}var Gr,_a;function Bo(){if(_a)return Gr;_a=1;var e=Lo(),r=No(),t=Oe(),n=r?function(a,i){return r(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:t;return Gr=n,Gr}var Ur,ma;function jo(){if(ma)return Ur;ma=1;var e=800,r=16,t=Date.now;function n(a){var i=0,o=0;return function(){var u=t(),v=r-(u-o);if(o=u,v>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return Ur=n,Ur}var kr,Ca;function $o(){if(Ca)return kr;Ca=1;var e=Bo(),r=jo(),t=r(e);return kr=t,kr}var zr,Fa;function $i(){if(Fa)return zr;Fa=1;var e=Oe(),r=Do(),t=$o();function n(a,i){return t(r(a,i,e),a+"")}return zr=n,zr}var Wr,qa;function sn(){if(qa)return Wr;qa=1;var e=9007199254740991;function r(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=e}return Wr=r,Wr}var Yr,Ra;function Se(){if(Ra)return Yr;Ra=1;var e=Ii(),r=sn();function t(n){return n!=null&&r(n.length)&&!e(n)}return Yr=t,Yr}var Xr,wa;function Ho(){if(wa)return Xr;wa=1;var e=Se(),r=ye();function t(n){return r(n)&&e(n)}return Xr=t,Xr}var Jr,Aa;function Go(){if(Aa)return Jr;Aa=1;var e=Ko(),r=ji(),t=$i(),n=Ho(),a=t(function(i,o){return n(i)?e(i,r(o,1,n,!0)):[]});return Jr=a,Jr}var Zr,Ta;function Hi(){if(Ta)return Zr;Ta=1;function e(r,t){for(var n=-1,a=r==null?0:r.length,i=0,o=[];++n<a;){var u=r[n];t(u,n,r)&&(o[i++]=u)}return o}return Zr=e,Zr}var Qr,xa;function Uo(){if(xa)return Qr;xa=1;function e(r){return function(t,n,a){for(var i=-1,o=Object(t),u=a(t),v=u.length;v--;){var h=u[r?v:++i];if(n(o[h],h,o)===!1)break}return t}}return Qr=e,Qr}var Vr,Oa;function ko(){if(Oa)return Vr;Oa=1;var e=Uo(),r=e();return Vr=r,Vr}function zo(e,r){for(var t=-1,n=Array(e);++t<e;)n[t]=r(t);return n}var Wo=zo,Me={exports:{}};function Yo(){return!1}var Xo=Yo;Me.exports;(function(e,r){var t=se(),n=Xo,a=r&&!r.nodeType&&r,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,u=o?t.Buffer:void 0,v=u?u.isBuffer:void 0,h=v||n;e.exports=h})(Me,Me.exports);var Gi=Me.exports,et,Sa;function on(){if(Sa)return et;Sa=1;var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function t(n,a){var i=typeof n;return a=a??e,!!a&&(i=="number"||i!="symbol"&&r.test(n))&&n>-1&&n%1==0&&n<a}return et=t,et}var Jo=Te(),Zo=sn(),Qo=ye(),Vo="[object Arguments]",eu="[object Array]",ru="[object Boolean]",tu="[object Date]",nu="[object Error]",au="[object Function]",iu="[object Map]",su="[object Number]",ou="[object Object]",uu="[object RegExp]",cu="[object Set]",fu="[object String]",lu="[object WeakMap]",du="[object ArrayBuffer]",hu="[object DataView]",vu="[object Float32Array]",pu="[object Float64Array]",yu="[object Int8Array]",gu="[object Int16Array]",bu="[object Int32Array]",_u="[object Uint8Array]",mu="[object Uint8ClampedArray]",Cu="[object Uint16Array]",Fu="[object Uint32Array]",U={};U[vu]=U[pu]=U[yu]=U[gu]=U[bu]=U[_u]=U[mu]=U[Cu]=U[Fu]=!0;U[Vo]=U[eu]=U[du]=U[ru]=U[hu]=U[tu]=U[nu]=U[au]=U[iu]=U[su]=U[ou]=U[uu]=U[cu]=U[fu]=U[lu]=!1;function qu(e){return Qo(e)&&Zo(e.length)&&!!U[Jo(e)]}var Ru=qu,Ie={exports:{}};Ie.exports;(function(e,r){var t=Pi(),n=r&&!r.nodeType&&r,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&t.process,u=function(){try{var v=a&&a.require&&a.require("util").types;return v||o&&o.binding&&o.binding("util")}catch{}}();e.exports=u})(Ie,Ie.exports);var wu=Ie.exports,Au=Ru,Tu=nn(),Ea=wu,Ka=Ea&&Ea.isTypedArray,xu=Ka?Tu(Ka):Au,Ui=xu,Ou=Wo,Su=an(),Eu=te(),Ku=Gi,Pu=on(),Mu=Ui,Iu=Object.prototype,Du=Iu.hasOwnProperty;function Lu(e,r){var t=Eu(e),n=!t&&Su(e),a=!t&&!n&&Ku(e),i=!t&&!n&&!a&&Mu(e),o=t||n||a||i,u=o?Ou(e.length,String):[],v=u.length;for(var h in e)(r||Du.call(e,h))&&!(o&&(h=="length"||a&&(h=="offset"||h=="parent")||i&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Pu(h,v)))&&u.push(h);return u}var Nu=Lu,Bu=Object.prototype;function ju(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||Bu;return e===t}var $u=ju;function Hu(e,r){return function(t){return e(r(t))}}var Gu=Hu,Uu=Gu,ku=Uu(Object.keys,Object),zu=ku,Wu=$u,Yu=zu,Xu=Object.prototype,Ju=Xu.hasOwnProperty;function Zu(e){if(!Wu(e))return Yu(e);var r=[];for(var t in Object(e))Ju.call(e,t)&&t!="constructor"&&r.push(t);return r}var Qu=Zu,Vu=Nu,ec=Qu,rc=Se();function tc(e){return rc(e)?Vu(e):ec(e)}var un=tc,rt,Pa;function cn(){if(Pa)return rt;Pa=1;var e=ko(),r=un;function t(n,a){return n&&e(n,a,r)}return rt=t,rt}var tt,Ma;function nc(){if(Ma)return tt;Ma=1;var e=Se();function r(t,n){return function(a,i){if(a==null)return a;if(!e(a))return t(a,i);for(var o=a.length,u=n?o:-1,v=Object(a);(n?u--:++u<o)&&i(v[u],u,v)!==!1;);return a}}return tt=r,tt}var nt,Ia;function fn(){if(Ia)return nt;Ia=1;var e=cn(),r=nc(),t=r(e);return nt=t,nt}var at,Da;function ac(){if(Da)return at;Da=1;var e=fn();function r(t,n){var a=[];return e(t,function(i,o,u){n(i,o,u)&&a.push(i)}),a}return at=r,at}var ic=Ne;function sc(){this.__data__=new ic,this.size=0}var oc=sc;function uc(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var cc=uc;function fc(e){return this.__data__.get(e)}var lc=fc;function dc(e){return this.__data__.has(e)}var hc=dc,vc=Ne,pc=en,yc=rn(),gc=200;function bc(e,r){var t=this.__data__;if(t instanceof vc){var n=t.__data__;if(!pc||n.length<gc-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new yc(n)}return t.set(e,r),this.size=t.size,this}var _c=bc,mc=Ne,Cc=oc,Fc=cc,qc=lc,Rc=hc,wc=_c;function be(e){var r=this.__data__=new mc(e);this.size=r.size}be.prototype.clear=Cc;be.prototype.delete=Fc;be.prototype.get=qc;be.prototype.has=Rc;be.prototype.set=wc;var ki=be,it,La;function Ac(){if(La)return it;La=1;function e(r,t){for(var n=-1,a=r==null?0:r.length;++n<a;)if(t(r[n],n,r))return!0;return!1}return it=e,it}var st,Na;function zi(){if(Na)return st;Na=1;var e=Li(),r=Ac(),t=Ni(),n=1,a=2;function i(o,u,v,h,b,_){var I=v&n,M=o.length,B=u.length;if(M!=B&&!(I&&B>M))return!1;var S=_.get(o),g=_.get(u);if(S&&g)return S==u&&g==o;var d=-1,m=!0,C=v&a?new e:void 0;for(_.set(o,u),_.set(u,o);++d<M;){var y=o[d],K=u[d];if(h)var x=I?h(K,y,d,u,o,_):h(y,K,d,o,u,_);if(x!==void 0){if(x)continue;m=!1;break}if(C){if(!r(u,function(q,D){if(!t(C,D)&&(y===q||b(y,q,v,h,_)))return C.push(D)})){m=!1;break}}else if(!(y===K||b(y,K,v,h,_))){m=!1;break}}return _.delete(o),_.delete(u),m}return st=i,st}var Tc=se(),xc=Tc.Uint8Array,Oc=xc,ot,Ba;function Sc(){if(Ba)return ot;Ba=1;function e(r){var t=-1,n=Array(r.size);return r.forEach(function(a,i){n[++t]=[i,a]}),n}return ot=e,ot}function Ec(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var Kc=Ec,ut,ja;function Pc(){if(ja)return ut;ja=1;var e=Ae(),r=Oc,t=Vt(),n=zi(),a=Sc(),i=Kc,o=1,u=2,v="[object Boolean]",h="[object Date]",b="[object Error]",_="[object Map]",I="[object Number]",M="[object RegExp]",B="[object Set]",S="[object String]",g="[object Symbol]",d="[object ArrayBuffer]",m="[object DataView]",C=e?e.prototype:void 0,y=C?C.valueOf:void 0;function K(x,q,D,w,O,z,H){switch(D){case m:if(x.byteLength!=q.byteLength||x.byteOffset!=q.byteOffset)return!1;x=x.buffer,q=q.buffer;case d:return!(x.byteLength!=q.byteLength||!z(new r(x),new r(q)));case v:case h:case I:return t(+x,+q);case b:return x.name==q.name&&x.message==q.message;case M:case S:return x==q+"";case _:var T=a;case B:var G=w&o;if(T||(T=i),x.size!=q.size&&!G)return!1;var J=H.get(x);if(J)return J==q;w|=u,H.set(x,q);var ne=n(T(x),T(q),w,O,z,H);return H.delete(x),ne;case g:if(y)return y.call(x)==y.call(q)}return!1}return ut=K,ut}var Mc=Bi(),Ic=te();function Dc(e,r,t){var n=r(e);return Ic(e)?n:Mc(n,t(e))}var Lc=Dc;function Nc(){return[]}var Bc=Nc,jc=Hi(),$c=Bc,Hc=Object.prototype,Gc=Hc.propertyIsEnumerable,$a=Object.getOwnPropertySymbols,Uc=$a?function(e){return e==null?[]:(e=Object(e),jc($a(e),function(r){return Gc.call(e,r)}))}:$c,kc=Uc,zc=Lc,Wc=kc,Yc=un;function Xc(e){return zc(e,Yc,Wc)}var Jc=Xc,ct,Ha;function Zc(){if(Ha)return ct;Ha=1;var e=Jc,r=1,t=Object.prototype,n=t.hasOwnProperty;function a(i,o,u,v,h,b){var _=u&r,I=e(i),M=I.length,B=e(o),S=B.length;if(M!=S&&!_)return!1;for(var g=M;g--;){var d=I[g];if(!(_?d in o:n.call(o,d)))return!1}var m=b.get(i),C=b.get(o);if(m&&C)return m==o&&C==i;var y=!0;b.set(i,o),b.set(o,i);for(var K=_;++g<M;){d=I[g];var x=i[d],q=o[d];if(v)var D=_?v(q,x,d,o,i,b):v(x,q,d,i,o,b);if(!(D===void 0?x===q||h(x,q,u,v,b):D)){y=!1;break}K||(K=d=="constructor")}if(y&&!K){var w=i.constructor,O=o.constructor;w!=O&&"constructor"in i&&"constructor"in o&&!(typeof w=="function"&&w instanceof w&&typeof O=="function"&&O instanceof O)&&(y=!1)}return b.delete(i),b.delete(o),y}return ct=a,ct}var Qc=ve,Vc=se(),ef=Qc(Vc,"DataView"),rf=ef,tf=ve,nf=se(),af=tf(nf,"Promise"),sf=af,of=ve,uf=se(),cf=of(uf,"Set"),ff=cf,lf=ve,df=se(),hf=lf(df,"WeakMap"),vf=hf,Yt=rf,Xt=en,Jt=sf,Zt=ff,Qt=vf,Wi=Te(),_e=Di,Ga="[object Map]",pf="[object Object]",Ua="[object Promise]",ka="[object Set]",za="[object WeakMap]",Wa="[object DataView]",yf=_e(Yt),gf=_e(Xt),bf=_e(Jt),_f=_e(Zt),mf=_e(Qt),de=Wi;(Yt&&de(new Yt(new ArrayBuffer(1)))!=Wa||Xt&&de(new Xt)!=Ga||Jt&&de(Jt.resolve())!=Ua||Zt&&de(new Zt)!=ka||Qt&&de(new Qt)!=za)&&(de=function(e){var r=Wi(e),t=r==pf?e.constructor:void 0,n=t?_e(t):"";if(n)switch(n){case yf:return Wa;case gf:return Ga;case bf:return Ua;case _f:return ka;case mf:return za}return r});var Cf=de,ft,Ya;function Ff(){if(Ya)return ft;Ya=1;var e=ki,r=zi(),t=Pc(),n=Zc(),a=Cf,i=te(),o=Gi,u=Ui,v=1,h="[object Arguments]",b="[object Array]",_="[object Object]",I=Object.prototype,M=I.hasOwnProperty;function B(S,g,d,m,C,y){var K=i(S),x=i(g),q=K?b:a(S),D=x?b:a(g);q=q==h?_:q,D=D==h?_:D;var w=q==_,O=D==_,z=q==D;if(z&&o(S)){if(!o(g))return!1;K=!0,w=!1}if(z&&!w)return y||(y=new e),K||u(S)?r(S,g,d,m,C,y):t(S,g,q,d,m,C,y);if(!(d&v)){var H=w&&M.call(S,"__wrapped__"),T=O&&M.call(g,"__wrapped__");if(H||T){var G=H?S.value():S,J=T?g.value():g;return y||(y=new e),C(G,J,d,m,y)}}return z?(y||(y=new e),n(S,g,d,m,C,y)):!1}return ft=B,ft}var lt,Xa;function Yi(){if(Xa)return lt;Xa=1;var e=Ff(),r=ye();function t(n,a,i,o,u){return n===a?!0:n==null||a==null||!r(n)&&!r(a)?n!==n&&a!==a:e(n,a,i,o,t,u)}return lt=t,lt}var dt,Ja;function qf(){if(Ja)return dt;Ja=1;var e=ki,r=Yi(),t=1,n=2;function a(i,o,u,v){var h=u.length,b=h,_=!v;if(i==null)return!b;for(i=Object(i);h--;){var I=u[h];if(_&&I[2]?I[1]!==i[I[0]]:!(I[0]in i))return!1}for(;++h<b;){I=u[h];var M=I[0],B=i[M],S=I[1];if(_&&I[2]){if(B===void 0&&!(M in i))return!1}else{var g=new e;if(v)var d=v(B,S,M,i,o,g);if(!(d===void 0?r(S,B,t|n,v,g):d))return!1}}return!0}return dt=a,dt}var ht,Za;function Xi(){if(Za)return ht;Za=1;var e=he();function r(t){return t===t&&!e(t)}return ht=r,ht}var vt,Qa;function Rf(){if(Qa)return vt;Qa=1;var e=Xi(),r=un;function t(n){for(var a=r(n),i=a.length;i--;){var o=a[i],u=n[o];a[i]=[o,u,e(u)]}return a}return vt=t,vt}var pt,Va;function Ji(){if(Va)return pt;Va=1;function e(r,t){return function(n){return n==null?!1:n[r]===t&&(t!==void 0||r in Object(n))}}return pt=e,pt}var yt,ei;function wf(){if(ei)return yt;ei=1;var e=qf(),r=Rf(),t=Ji();function n(a){var i=r(a);return i.length==1&&i[0][2]?t(i[0][0],i[0][1]):function(o){return o===a||e(o,a,i)}}return yt=n,yt}var gt,ri;function ln(){if(ri)return gt;ri=1;var e=te(),r=xe(),t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,o){if(e(i))return!1;var u=typeof i;return u=="number"||u=="symbol"||u=="boolean"||i==null||r(i)?!0:n.test(i)||!t.test(i)||o!=null&&i in Object(o)}return gt=a,gt}var Zi=rn(),Af="Expected a function";function dn(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Af);var t=function(){var n=arguments,a=r?r.apply(this,n):n[0],i=t.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return t.cache=i.set(a,o)||i,o};return t.cache=new(dn.Cache||Zi),t}dn.Cache=Zi;var Tf=dn,xf=Tf,Of=500;function Sf(e){var r=xf(e,function(n){return t.size===Of&&t.clear(),n}),t=r.cache;return r}var Ef=Sf,Kf=Ef,Pf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mf=/\\(\\)?/g,If=Kf(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Pf,function(t,n,a,i){r.push(a?i.replace(Mf,"$1"):n||t)}),r}),Df=If,bt,ti;function Lf(){if(ti)return bt;ti=1;var e=Ae(),r=tn,t=te(),n=xe(),a=1/0,i=e?e.prototype:void 0,o=i?i.toString:void 0;function u(v){if(typeof v=="string")return v;if(t(v))return r(v,u)+"";if(n(v))return o?o.call(v):"";var h=v+"";return h=="0"&&1/v==-a?"-0":h}return bt=u,bt}var _t,ni;function Qi(){if(ni)return _t;ni=1;var e=Lf();function r(t){return t==null?"":e(t)}return _t=r,_t}var Nf=te(),Bf=ln(),jf=Df,$f=Qi();function Hf(e,r){return Nf(e)?e:Bf(e,r)?[e]:jf($f(e))}var Vi=Hf,Gf=xe(),Uf=1/0;function kf(e){if(typeof e=="string"||Gf(e))return e;var r=e+"";return r=="0"&&1/e==-Uf?"-0":r}var je=kf,zf=Vi,Wf=je;function Yf(e,r){r=zf(r,e);for(var t=0,n=r.length;e!=null&&t<n;)e=e[Wf(r[t++])];return t&&t==n?e:void 0}var hn=Yf,mt,ai;function Xf(){if(ai)return mt;ai=1;var e=hn;function r(t,n,a){var i=t==null?void 0:e(t,n);return i===void 0?a:i}return mt=r,mt}var Ct,ii;function Jf(){if(ii)return Ct;ii=1;function e(r,t){return r!=null&&t in Object(r)}return Ct=e,Ct}var Ft,si;function Zf(){if(si)return Ft;si=1;var e=Vi,r=an(),t=te(),n=on(),a=sn(),i=je;function o(u,v,h){v=e(v,u);for(var b=-1,_=v.length,I=!1;++b<_;){var M=i(v[b]);if(!(I=u!=null&&h(u,M)))break;u=u[M]}return I||++b!=_?I:(_=u==null?0:u.length,!!_&&a(_)&&n(M,_)&&(t(u)||r(u)))}return Ft=o,Ft}var qt,oi;function Qf(){if(oi)return qt;oi=1;var e=Jf(),r=Zf();function t(n,a){return n!=null&&r(n,a,e)}return qt=t,qt}var Rt,ui;function Vf(){if(ui)return Rt;ui=1;var e=Yi(),r=Xf(),t=Qf(),n=ln(),a=Xi(),i=Ji(),o=je,u=1,v=2;function h(b,_){return n(b)&&a(_)?i(o(b),_):function(I){var M=r(I,b);return M===void 0&&M===_?t(I,b):e(_,M,u|v)}}return Rt=h,Rt}var wt,ci;function el(){if(ci)return wt;ci=1;function e(r){return function(t){return t==null?void 0:t[r]}}return wt=e,wt}var At,fi;function rl(){if(fi)return At;fi=1;var e=hn;function r(t){return function(n){return e(n,t)}}return At=r,At}var Tt,li;function tl(){if(li)return Tt;li=1;var e=el(),r=rl(),t=ln(),n=je;function a(i){return t(i)?e(n(i)):r(i)}return Tt=a,Tt}var xt,di;function vn(){if(di)return xt;di=1;var e=wf(),r=Vf(),t=Oe(),n=te(),a=tl();function i(o){return typeof o=="function"?o:o==null?t:typeof o=="object"?n(o)?r(o[0],o[1]):e(o):a(o)}return xt=i,xt}var Ot,hi;function nl(){if(hi)return Ot;hi=1;var e=Hi(),r=ac(),t=vn(),n=te();function a(i,o){var u=n(i)?e:r;return u(i,t(o,3))}return Ot=a,Ot}var St,vi;function al(){if(vi)return St;vi=1;function e(r,t,n){var a;return n(r,function(i,o,u){if(t(i,o,u))return a=o,!1}),a}return St=e,St}var Et,pi;function il(){if(pi)return Et;pi=1;var e=al(),r=cn(),t=vn();function n(a,i){return e(a,t(i,3),r)}return Et=n,Et}var Kt,yi;function sl(){if(yi)return Kt;yi=1;function e(r){return r&&r.length?r[0]:void 0}return Kt=e,Kt}var Pt,gi;function ol(){return gi||(gi=1,Pt=sl()),Pt}var Mt,bi;function ul(){if(bi)return Mt;bi=1;function e(r,t){for(var n=-1,a=r==null?0:r.length;++n<a&&t(r[n],n,r)!==!1;);return r}return Mt=e,Mt}var It,_i;function es(){if(_i)return It;_i=1;var e=Oe();function r(t){return typeof t=="function"?t:e}return It=r,It}var Dt,mi;function cl(){if(mi)return Dt;mi=1;var e=ul(),r=fn(),t=es(),n=te();function a(i,o){var u=n(i)?e:r;return u(i,t(o))}return Dt=a,Dt}var Lt,Ci;function fl(){if(Ci)return Lt;Ci=1;var e=cn(),r=es();function t(n,a){return n&&e(n,r(a))}return Lt=t,Lt}var Nt,Fi;function ll(){if(Fi)return Nt;Fi=1;function e(){}return Nt=e,Nt}var Bt,qi;function dl(){if(qi)return Bt;qi=1;var e=fn(),r=Se();function t(n,a){var i=-1,o=r(n)?Array(n.length):[];return e(n,function(u,v,h){o[++i]=a(u,v,h)}),o}return Bt=t,Bt}var jt,Ri;function hl(){if(Ri)return jt;Ri=1;function e(r,t){var n=r.length;for(r.sort(t);n--;)r[n]=r[n].value;return r}return jt=e,jt}var $t,wi;function vl(){if(wi)return $t;wi=1;var e=xe();function r(t,n){if(t!==n){var a=t!==void 0,i=t===null,o=t===t,u=e(t),v=n!==void 0,h=n===null,b=n===n,_=e(n);if(!h&&!_&&!u&&t>n||u&&v&&b&&!h&&!_||i&&v&&b||!a&&b||!o)return 1;if(!i&&!u&&!_&&t<n||_&&a&&o&&!i&&!u||h&&a&&o||!v&&o||!b)return-1}return 0}return $t=r,$t}var Ht,Ai;function pl(){if(Ai)return Ht;Ai=1;var e=vl();function r(t,n,a){for(var i=-1,o=t.criteria,u=n.criteria,v=o.length,h=a.length;++i<v;){var b=e(o[i],u[i]);if(b){if(i>=h)return b;var _=a[i];return b*(_=="desc"?-1:1)}}return t.index-n.index}return Ht=r,Ht}var Gt,Ti;function yl(){if(Ti)return Gt;Ti=1;var e=tn,r=hn,t=vn(),n=dl(),a=hl(),i=nn(),o=pl(),u=Oe(),v=te();function h(b,_,I){_.length?_=e(_,function(S){return v(S)?function(g){return r(g,S.length===1?S[0]:S)}:S}):_=[u];var M=-1;_=e(_,i(t));var B=n(b,function(S,g,d){var m=e(_,function(C){return C(S)});return{criteria:m,index:++M,value:S}});return a(B,function(S,g){return o(S,g,I)})}return Gt=h,Gt}var Ut,xi;function gl(){if(xi)return Ut;xi=1;var e=Vt(),r=Se(),t=on(),n=he();function a(i,o,u){if(!n(u))return!1;var v=typeof o;return(v=="number"?r(u)&&t(o,u.length):v=="string"&&o in u)?e(u[o],i):!1}return Ut=a,Ut}var kt,Oi;function bl(){if(Oi)return kt;Oi=1;var e=ji(),r=yl(),t=$i(),n=gl(),a=t(function(i,o){if(i==null)return[];var u=o.length;return u>1&&n(i,o[0],o[1])?o=[]:u>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),r(i,e(o,1),[])});return kt=a,kt}var zt,Si;function _l(){if(Si)return zt;Si=1;var e=Mi(),r=he(),t="Expected a function";function n(a,i,o){var u=!0,v=!0;if(typeof a!="function")throw new TypeError(t);return r(o)&&(u="leading"in o?!!o.leading:u,v="trailing"in o?!!o.trailing:v),e(a,i,{leading:u,maxWait:i,trailing:v})}return zt=n,zt}var Wt,Ei;function ml(){if(Ei)return Wt;Ei=1;var e=Qi(),r=0;function t(n){var a=++r;return e(n)+a}return Wt=t,Wt}(function(e,r){(function(t,n){e.exports=n(Mi(),Go(),nl(),il(),ol(),cl(),fl(),ll(),bl(),_l(),ml(),ns)})(pe,function(t,n,a,i,o,u,v,h,b,_,I,M){return function(){var B={654:function(g,d,m){var C,y=this&&this.__assign||function(){return y=Object.assign||function(p){for(var s,c=1,f=arguments.length;c<f;c++)for(var l in s=arguments[c])Object.prototype.hasOwnProperty.call(s,l)&&(p[l]=s[l]);return p},y.apply(this,arguments)},K=this&&this.__createBinding||(Object.create?function(p,s,c,f){f===void 0&&(f=c);var l=Object.getOwnPropertyDescriptor(s,c);l&&!("get"in l?!s.__esModule:l.writable||l.configurable)||(l={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(p,f,l)}:function(p,s,c,f){f===void 0&&(f=c),p[f]=s[c]}),x=this&&this.__setModuleDefault||(Object.create?function(p,s){Object.defineProperty(p,"default",{enumerable:!0,value:s})}:function(p,s){p.default=s}),q=this&&this.__importStar||function(p){if(p&&p.__esModule)return p;var s={};if(p!=null)for(var c in p)c!=="default"&&Object.prototype.hasOwnProperty.call(p,c)&&K(s,p,c);return x(s,p),s},D=this&&this.__spreadArray||function(p,s,c){if(c||arguments.length===2)for(var f,l=0,F=s.length;l<F;l++)!f&&l in s||(f||(f=Array.prototype.slice.call(s,0,l)),f[l]=s[l]);return p.concat(f||Array.prototype.slice.call(s))},w=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(d,"__esModule",{value:!0}),d.updateRtl=d.doesFocusableExist=d.getCurrentFocusKey=d.updateAllLayouts=d.resume=d.pause=d.navigateByDirection=d.setFocus=d.setKeyMap=d.destroy=d.setThrottle=d.init=d.SpatialNavigation=d.ROOT_FOCUS_KEY=void 0;var O=w(m(150)),z=w(m(117)),H=w(m(747)),T=w(m(23)),G=w(m(842)),J=w(m(682)),ne=w(m(784)),me=w(m(432)),$e=w(m(67)),Ee=w(m(35)),V=w(m(119)),Ce=q(m(964)),ue="left",ce="right",fe="up",ae="down",Fe="enter",qe=((C={}).left=[37,"ArrowLeft"],C.up=[38,"ArrowUp"],C.right=[39,"ArrowRight"],C.down=[40,"ArrowDown"],C.enter=[13,"Enter"],C);d.ROOT_FOCUS_KEY="SN:ROOT";var Re=["#0FF","#FF0","#F0F"],Ke={leading:!0,trailing:!1},Pe=function(){function p(){this.focusableComponents={},this.focusKey=null,this.parentsHavingFocusedChild=[],this.domNodeFocusOptions={},this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.useGetBoundingClientRect=!1,this.shouldFocusDOMNode=!1,this.shouldUseNativeEvents=!1,this.writingDirection=V.default.LTR,this.pressedKeys={},this.paused=!1,this.keyDownEventListener=null,this.keyUpEventListener=null,this.keyMap=qe,this.pause=this.pause.bind(this),this.resume=this.resume.bind(this),this.setFocus=this.setFocus.bind(this),this.updateAllLayouts=this.updateAllLayouts.bind(this),this.navigateByDirection=this.navigateByDirection.bind(this),this.init=this.init.bind(this),this.setThrottle=this.setThrottle.bind(this),this.destroy=this.destroy.bind(this),this.setKeyMap=this.setKeyMap.bind(this),this.getCurrentFocusKey=this.getCurrentFocusKey.bind(this),this.doesFocusableExist=this.doesFocusableExist.bind(this),this.updateRtl=this.updateRtl.bind(this),this.setFocusDebounced=(0,O.default)(this.setFocus,300,{leading:!1,trailing:!0}),this.debug=!1,this.visualDebugger=null,this.logIndex=0,this.distanceCalculationMethod="corners"}return p.getCutoffCoordinate=function(s,c,f,l,F){var R=s?l.top:F===V.default.LTR?l.left:l.right,A=s?l.bottom:F===V.default.LTR?l.right:l.left;return c?f?R:A:f?A:R},p.getRefCorners=function(s,c,f){var l={a:{x:0,y:0},b:{x:0,y:0}};switch(s){case fe:var F=c?f.bottom:f.top;l.a={x:f.left,y:F},l.b={x:f.right,y:F};break;case ae:F=c?f.top:f.bottom,l.a={x:f.left,y:F},l.b={x:f.right,y:F};break;case ue:var R=c?f.right:f.left;l.a={x:R,y:f.top},l.b={x:R,y:f.bottom};break;case ce:R=c?f.left:f.right,l.a={x:R,y:f.top},l.b={x:R,y:f.bottom}}return l},p.isAdjacentSlice=function(s,c,f){var l=s.a,F=s.b,R=c.a,A=c.b,E=f?"x":"y",$=l[E],j=F[E],N=R[E],L=A[E],P=.2*(j-$);return Math.max(0,Math.min(j,L)-Math.max($,N))>=P},p.getPrimaryAxisDistance=function(s,c,f){var l=s.a,F=c.a,R=f?"y":"x";return Math.abs(F[R]-l[R])},p.getSecondaryAxisDistance=function(s,c,f,l,F){if(F)return F(s,c,f,l);var R=s.a,A=s.b,E=c.a,$=c.b,j=f?"x":"y",N=R[j],L=A[j],P=E[j],X=$[j];if(l==="center"){var W=(N+L)/2,Z=(P+X)/2;return Math.abs(W-Z)}if(l==="edges"){var oe=Math.min(N,L),k=Math.min(P,X),ee=Math.max(N,L),le=Math.max(P,X),ie=Math.abs(oe-k),re=Math.abs(ee-le);return Math.min(ie,re)}var we=[Math.abs(P-N),Math.abs(P-L),Math.abs(X-N),Math.abs(X-L)];return Math.min.apply(Math,we)},p.prototype.sortSiblingsByPriority=function(s,c,f,l){var F=this,R=f===ae||f===fe,A=p.getRefCorners(f,!1,c);return(0,me.default)(s,function(E){var $=p.getRefCorners(f,!0,E.layout),j=p.isAdjacentSlice(A,$,R),N=j?p.getPrimaryAxisDistance:p.getSecondaryAxisDistance,L=j?p.getSecondaryAxisDistance:p.getPrimaryAxisDistance,P=N(A,$,R,F.distanceCalculationMethod,F.customDistanceCalculationFunction),X=L(A,$,R,F.distanceCalculationMethod,F.customDistanceCalculationFunction),W=5*P+X,Z=(W+1)/(j?5:1);return F.log("smartNavigate","distance (primary, secondary, total weighted) for ".concat(E.focusKey," relative to ").concat(l," is"),P,X,W),F.log("smartNavigate","priority for ".concat(E.focusKey," relative to ").concat(l," is"),Z),F.visualDebugger&&(F.visualDebugger.drawPoint($.a.x,$.a.y,"yellow",6),F.visualDebugger.drawPoint($.b.x,$.b.y,"yellow",6)),Z})},p.prototype.init=function(s){var c=this,f=s===void 0?{}:s,l=f.debug,F=l!==void 0&&l,R=f.visualDebug,A=R!==void 0&&R,E=f.nativeMode,$=E!==void 0&&E,j=f.throttle,N=j===void 0?0:j,L=f.throttleKeypresses,P=L!==void 0&&L,X=f.useGetBoundingClientRect,W=X!==void 0&&X,Z=f.shouldFocusDOMNode,oe=Z!==void 0&&Z,k=f.domNodeFocusOptions,ee=k===void 0?{}:k,le=f.shouldUseNativeEvents,ie=le!==void 0&&le,re=f.rtl,we=re!==void 0&&re,Y=f.distanceCalculationMethod,Q=Y===void 0?"corners":Y,pn=f.customDistanceCalculationFunction,rs=pn===void 0?void 0:pn;if(!this.enabled&&(this.domNodeFocusOptions=ee,this.enabled=!0,this.nativeMode=$,this.throttleKeypresses=P,this.useGetBoundingClientRect=W,this.shouldFocusDOMNode=oe&&!$,this.shouldUseNativeEvents=ie,this.writingDirection=we?V.default.RTL:V.default.LTR,this.distanceCalculationMethod=Q,this.customDistanceCalculationFunction=rs,this.debug=F,!this.nativeMode&&(Number.isInteger(N)&&N>0&&(this.throttle=N),this.bindEventHandlers(),A))){this.visualDebugger=new Ee.default(this.writingDirection);var yn=function(){requestAnimationFrame(function(){c.visualDebugger.clearLayouts(),(0,ne.default)(c.focusableComponents,function(gn,ts){c.visualDebugger.drawLayout(gn.layout,ts,gn.parentFocusKey)}),yn()})};yn()}},p.prototype.setThrottle=function(s){var c=s===void 0?{}:s,f=c.throttle,l=f===void 0?0:f,F=c.throttleKeypresses,R=F!==void 0&&F;this.throttleKeypresses=R,this.nativeMode||(this.unbindEventHandlers(),Number.isInteger(l)&&(this.throttle=l),this.bindEventHandlers())},p.prototype.destroy=function(){this.enabled&&(this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.focusKey=null,this.parentsHavingFocusedChild=[],this.focusableComponents={},this.paused=!1,this.keyMap=qe,this.unbindEventHandlers())},p.prototype.getEventType=function(s){return(0,T.default)(this.getKeyMap(),function(c){return c.includes(s)})},p.getKeyCode=function(s){return s.keyCode||s.code||s.key},p.prototype.bindEventHandlers=function(){var s=this;typeof window<"u"&&window.addEventListener&&(this.keyDownEventListener=function(c){if(s.paused!==!0){s.debug&&(s.logIndex+=1);var f=p.getKeyCode(c),l=s.getEventType(f);if(l){s.pressedKeys[l]=s.pressedKeys[l]?s.pressedKeys[l]+1:1,s.shouldUseNativeEvents||(c.preventDefault(),c.stopPropagation());var F={pressedKeys:s.pressedKeys};if(l===Fe&&s.focusKey)s.onEnterPress(F);else{var R=s.onArrowPress(l,F)===!1;if(s.visualDebugger&&s.visualDebugger.clear(),R)s.log("keyDownEventListener","default navigation prevented");else{var A=(0,T.default)(s.getKeyMap(),function(E){return E.includes(f)});s.smartNavigate(A,null,{event:c})}}}}},this.throttle&&(this.keyDownEventListenerThrottled=(0,$e.default)(this.keyDownEventListener.bind(this),this.throttle,Ke)),this.keyUpEventListener=function(c){var f=p.getKeyCode(c),l=s.getEventType(f);delete s.pressedKeys[l],s.throttle&&!s.throttleKeypresses&&s.keyDownEventListenerThrottled.cancel(),l===Fe&&s.focusKey&&s.onEnterRelease(),!s.focusKey||l!==ue&&l!==ce&&l!==fe&&l!==ae||s.onArrowRelease(l)},window.addEventListener("keyup",this.keyUpEventListener),window.addEventListener("keydown",this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener))},p.prototype.unbindEventHandlers=function(){if(typeof window<"u"&&window.removeEventListener){window.removeEventListener("keyup",this.keyUpEventListener),this.keyUpEventListener=null;var s=this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener;window.removeEventListener("keydown",s),this.keyDownEventListener=null}},p.prototype.onEnterPress=function(s){var c=this.focusableComponents[this.focusKey];c?c.focusable?c.onEnterPress&&c.onEnterPress(s):this.log("onEnterPress","componentNotFocusable"):this.log("onEnterPress","noComponent")},p.prototype.onEnterRelease=function(){var s=this.focusableComponents[this.focusKey];s?s.focusable?s.onEnterRelease&&s.onEnterRelease():this.log("onEnterRelease","componentNotFocusable"):this.log("onEnterRelease","noComponent")},p.prototype.onArrowPress=function(s,c){var f=this.focusableComponents[this.focusKey];if(f)return f&&f.onArrowPress&&f.onArrowPress(s,c);this.log("onArrowPress","noComponent")},p.prototype.onArrowRelease=function(s){var c=this.focusableComponents[this.focusKey];c?c.focusable?c.onArrowRelease&&c.onArrowRelease(s):this.log("onArrowRelease","componentNotFocusable"):this.log("onArrowRelease","noComponent")},p.prototype.navigateByDirection=function(s,c){if(this.paused!==!0&&this.enabled&&!this.nativeMode){var f=[ae,fe,ue,ce];f.includes(s)?(this.log("navigateByDirection","direction",s),this.smartNavigate(s,null,c)):this.log("navigateByDirection","Invalid direction. You passed: `".concat(s,"`, but you can use only these: "),f)}},p.prototype.smartNavigate=function(s,c,f){var l=this;if(!this.nativeMode){var F=s===ae||s===fe,R=s===ae||(this.writingDirection===V.default.LTR?s===ce:s===ue);this.log("smartNavigate","direction",s),this.log("smartNavigate","fromParentFocusKey",c),this.log("smartNavigate","this.focusKey",this.focusKey),c||(0,ne.default)(this.focusableComponents,function(k){k.layoutUpdated=!1});var A=this.focusableComponents[c||this.focusKey];if(c||A){if(this.log("smartNavigate","currentComponent",A?A.focusKey:void 0,A?A.node:void 0,A),A){this.updateLayout(A.focusKey);var E=A.parentFocusKey,$=A.focusKey,j=A.layout,N=p.getCutoffCoordinate(F,R,!1,j,this.writingDirection),L=(0,H.default)(this.focusableComponents,function(k){if(k.parentFocusKey===E&&k.focusable){l.updateLayout(k.focusKey);var ee=p.getCutoffCoordinate(F,R,!0,k.layout,l.writingDirection);return F||l.writingDirection===V.default.LTR?R?ee>=N:ee<=N:R?ee<=N:ee>=N}return!1});if(this.debug&&(this.log("smartNavigate","currentCutoffCoordinate",N),this.log("smartNavigate","siblings","".concat(L.length," elements:"),L.map(function(k){return k.focusKey}).join(", "),L.map(function(k){return k.node}),L.map(function(k){return k}))),this.visualDebugger){var P=p.getRefCorners(s,!1,j);this.visualDebugger.drawPoint(P.a.x,P.a.y),this.visualDebugger.drawPoint(P.b.x,P.b.y)}var X=this.sortSiblingsByPriority(L,j,s,$),W=(0,G.default)(X);if(this.log("smartNavigate","nextComponent",W?W.focusKey:void 0,W?W.node:void 0,W),W)this.setFocus(W.focusKey,f);else{var Z=this.focusableComponents[E],oe=Z!=null&&Z.isFocusBoundary?Z.focusBoundaryDirections||[s]:[];Z&&oe.includes(s)||this.smartNavigate(s,E,f)}}}else this.setFocus(this.getForcedFocusKey())}},p.prototype.saveLastFocusedChildKey=function(s,c){s&&(this.log("saveLastFocusedChildKey","".concat(s.focusKey," lastFocusedChildKey set"),c),s.lastFocusedChildKey=c)},p.prototype.log=function(s,c){for(var f=[],l=2;l<arguments.length;l++)f[l-2]=arguments[l];this.debug&&console.log.apply(console,D(["%c".concat(s,"%c").concat(c),"background: ".concat(Re[this.logIndex%Re.length],"; color: black; padding: 1px 5px;"),"background: #333; color: #BADA55; padding: 1px 5px;"],f,!1))},p.prototype.getCurrentFocusKey=function(){return this.focusKey},p.prototype.getForcedFocusKey=function(){var s,c=(0,H.default)(this.focusableComponents,function(l){return l.focusable&&l.forceFocus}),f=this.sortSiblingsByPriority(c,{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:null},"down",d.ROOT_FOCUS_KEY);return(s=(0,G.default)(f))===null||s===void 0?void 0:s.focusKey},p.prototype.getNextFocusKey=function(s){var c=this,f=this.focusableComponents[s];if(!f||this.nativeMode)return s;var l=(0,H.default)(this.focusableComponents,function(E){return E.parentFocusKey===s&&E.focusable});if(l.length>0){var F=f.lastFocusedChildKey,R=f.preferredChildFocusKey;if(this.log("getNextFocusKey","lastFocusedChildKey is",F),this.log("getNextFocusKey","preferredChildFocusKey is",R),F&&f.saveLastFocusedChild&&this.isParticipatingFocusableComponent(F))return this.log("getNextFocusKey","lastFocusedChildKey will be focused",F),this.getNextFocusKey(F);if(R&&this.isParticipatingFocusableComponent(R))return this.log("getNextFocusKey","preferredChildFocusKey will be focused",R),this.getNextFocusKey(R);l.forEach(function(E){return c.updateLayout(E.focusKey)});var A=function(E,$){var j=$===V.default.LTR?function(L){var P=L.layout;return Math.abs(P.left)+Math.abs(P.top)}:function(L){var P=L.layout;return Math.abs(window.innerWidth-P.right)+Math.abs(P.top)},N=(0,me.default)(E,j);return(0,G.default)(N)}(l,this.writingDirection).focusKey;return this.log("getNextFocusKey","childKey will be focused",A),this.getNextFocusKey(A)}return this.log("getNextFocusKey","targetFocusKey",s),s},p.prototype.addFocusable=function(s){var c=s.focusKey,f=s.node,l=s.parentFocusKey,F=s.onEnterPress,R=s.onEnterRelease,A=s.onArrowPress,E=s.onArrowRelease,$=s.onFocus,j=s.onBlur,N=s.saveLastFocusedChild,L=s.trackChildren,P=s.onUpdateFocus,X=s.onUpdateHasFocusedChild,W=s.preferredChildFocusKey,Z=s.autoRestoreFocus,oe=s.forceFocus,k=s.focusable,ee=s.isFocusBoundary,le=s.focusBoundaryDirections;if(this.focusableComponents[c]={focusKey:c,node:f,parentFocusKey:l,onEnterPress:F,onEnterRelease:R,onArrowPress:A,onArrowRelease:E,onFocus:$,onBlur:j,onUpdateFocus:P,onUpdateHasFocusedChild:X,saveLastFocusedChild:N,trackChildren:L,preferredChildFocusKey:W,focusable:k,isFocusBoundary:ee,focusBoundaryDirections:le,autoRestoreFocus:Z,forceFocus:oe,lastFocusedChildKey:null,layout:{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:f},layoutUpdated:!1},f||console.warn('Component added without a node reference. This will result in its coordinates being empty and may cause lost focus. Check the "ref" passed to "useFocusable": ',this.focusableComponents[c]),!this.nativeMode){this.updateLayout(c),this.log("addFocusable","Component added: ",this.focusableComponents[c]),c===this.focusKey&&this.setFocus(W||c);for(var ie=this.focusableComponents[this.focusKey];ie;){if(ie.parentFocusKey===c){this.updateParentsHasFocusedChild(this.focusKey,{}),this.updateParentsLastFocusedChild(this.focusKey);break}ie=this.focusableComponents[ie.parentFocusKey]}}},p.prototype.removeFocusable=function(s){var c=s.focusKey,f=this.focusableComponents[c];if(f){var l=f.parentFocusKey;(0,f.onUpdateFocus)(!1),this.log("removeFocusable","Component removed: ",f),delete this.focusableComponents[c];var F=this.parentsHavingFocusedChild.includes(c);this.parentsHavingFocusedChild=this.parentsHavingFocusedChild.filter(function(E){return E!==c});var R=this.focusableComponents[l],A=c===this.focusKey;if(R&&R.lastFocusedChildKey===c&&(R.lastFocusedChildKey=null),this.nativeMode)return;(A||F)&&R&&R.autoRestoreFocus&&(this.log("removeFocusable","Component removed: ",A?"Leaf component":"Container component","Auto restoring focus to: ",l),this.setFocusDebounced(l))}},p.prototype.getNodeLayoutByFocusKey=function(s){var c=this.focusableComponents[s];return c?(this.updateLayout(c.focusKey),c.layout):null},p.prototype.setCurrentFocusedKey=function(s,c){var f,l,F,R;if(this.isFocusableComponent(this.focusKey)&&s!==this.focusKey){var A=this.focusableComponents[this.focusKey];A.onUpdateFocus(!1),A.onBlur(this.getNodeLayoutByFocusKey(this.focusKey),c),(l=(f=A.node)===null||f===void 0?void 0:f.removeAttribute)===null||l===void 0||l.call(f,"data-focused"),this.log("setCurrentFocusedKey","onBlur",A)}if(this.focusKey=s,this.isFocusableComponent(this.focusKey)){var E=this.focusableComponents[this.focusKey];this.shouldFocusDOMNode&&E.node&&E.node.focus(this.domNodeFocusOptions),(R=(F=E.node)===null||F===void 0?void 0:F.setAttribute)===null||R===void 0||R.call(F,"data-focused","true"),E.onUpdateFocus(!0),E.onFocus(this.getNodeLayoutByFocusKey(this.focusKey),c),this.log("setCurrentFocusedKey","onFocus",E)}},p.prototype.updateParentsHasFocusedChild=function(s,c){for(var f=this,l=[],F=this.focusableComponents[s];F;){var R=F.parentFocusKey,A=this.focusableComponents[R];if(A){var E=A.focusKey;l.push(E)}F=A}var $=(0,z.default)(this.parentsHavingFocusedChild,l),j=(0,z.default)(l,this.parentsHavingFocusedChild);(0,J.default)($,function(N){var L=f.focusableComponents[N];L&&L.trackChildren&&L.onUpdateHasFocusedChild(!1),f.onIntermediateNodeBecameBlurred(N,c)}),(0,J.default)(j,function(N){var L=f.focusableComponents[N];L&&L.trackChildren&&L.onUpdateHasFocusedChild(!0),f.onIntermediateNodeBecameFocused(N,c)}),this.parentsHavingFocusedChild=l},p.prototype.updateParentsLastFocusedChild=function(s){for(var c=this.focusableComponents[s];c;){var f=c.parentFocusKey,l=this.focusableComponents[f];l&&this.saveLastFocusedChildKey(l,c.focusKey),c=l}},p.prototype.getKeyMap=function(){return this.keyMap},p.prototype.setKeyMap=function(s){this.keyMap=y(y({},this.getKeyMap()),function(c){var f={};return Object.entries(c).forEach(function(l){var F=l[0],R=l[1];f[F]=Array.isArray(R)?R:[R]}),f}(s))},p.prototype.isFocusableComponent=function(s){return!!this.focusableComponents[s]},p.prototype.isParticipatingFocusableComponent=function(s){return this.isFocusableComponent(s)&&this.focusableComponents[s].focusable},p.prototype.onIntermediateNodeBecameFocused=function(s,c){this.isParticipatingFocusableComponent(s)&&this.focusableComponents[s].onFocus(this.getNodeLayoutByFocusKey(s),c)},p.prototype.onIntermediateNodeBecameBlurred=function(s,c){this.isParticipatingFocusableComponent(s)&&this.focusableComponents[s].onBlur(this.getNodeLayoutByFocusKey(s),c)},p.prototype.pause=function(){this.paused=!0},p.prototype.resume=function(){this.paused=!1},p.prototype.setFocus=function(s,c){if(c===void 0&&(c={}),this.setFocusDebounced.cancel(),this.enabled){this.log("setFocus","focusKey",s),s&&s!==d.ROOT_FOCUS_KEY||(s=this.getForcedFocusKey());var f=this.getNextFocusKey(s);this.log("setFocus","newFocusKey",f),this.setCurrentFocusedKey(f,c),this.updateParentsHasFocusedChild(f,c),this.updateParentsLastFocusedChild(f)}},p.prototype.updateAllLayouts=function(){var s=this;this.enabled&&!this.nativeMode&&(0,ne.default)(this.focusableComponents,function(c,f){s.updateLayout(f)})},p.prototype.updateLayout=function(s){var c=this.focusableComponents[s];if(c&&!this.nativeMode&&!c.layoutUpdated){var f=c.node,l=this.useGetBoundingClientRect?(0,Ce.getBoundingClientRect)(f):(0,Ce.default)(f);c.layout=y(y({},l),{node:f})}},p.prototype.updateFocusable=function(s,c){var f=c.node,l=c.preferredChildFocusKey,F=c.focusable,R=c.isFocusBoundary,A=c.focusBoundaryDirections,E=c.onEnterPress,$=c.onEnterRelease,j=c.onArrowPress,N=c.onFocus,L=c.onBlur;if(!this.nativeMode){var P=this.focusableComponents[s];P&&(P.preferredChildFocusKey=l,P.focusable=F,P.isFocusBoundary=R,P.focusBoundaryDirections=A,P.onEnterPress=E,P.onEnterRelease=$,P.onArrowPress=j,P.onFocus=N,P.onBlur=L,f&&(P.node=f))}},p.prototype.isNativeMode=function(){return this.nativeMode},p.prototype.doesFocusableExist=function(s){return!!this.focusableComponents[s]},p.prototype.updateRtl=function(s){this.writingDirection=s?V.default.RTL:V.default.LTR},p}();d.SpatialNavigation=new Pe,d.init=d.SpatialNavigation.init,d.setThrottle=d.SpatialNavigation.setThrottle,d.destroy=d.SpatialNavigation.destroy,d.setKeyMap=d.SpatialNavigation.setKeyMap,d.setFocus=d.SpatialNavigation.setFocus,d.navigateByDirection=d.SpatialNavigation.navigateByDirection,d.pause=d.SpatialNavigation.pause,d.resume=d.SpatialNavigation.resume,d.updateAllLayouts=d.SpatialNavigation.updateAllLayouts,d.getCurrentFocusKey=d.SpatialNavigation.getCurrentFocusKey,d.doesFocusableExist=d.SpatialNavigation.doesFocusableExist,d.updateRtl=d.SpatialNavigation.updateRtl},35:function(g,d,m){var C=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(d,"__esModule",{value:!0});var y=C(m(119)),K=typeof window<"u"&&window.document,x=K?window.innerWidth:0,q=K?window.innerHeight:0,D=function(){function w(O){K&&(this.debugCtx=w.createCanvas("sn-debug","1010",O),this.layoutsCtx=w.createCanvas("sn-layouts","1000",O),this.writingDirection=O)}return w.createCanvas=function(O,z,H){var T=document.querySelector("#".concat(O))||document.createElement("canvas");T.setAttribute("id",O),T.setAttribute("dir",H===y.default.LTR?"ltr":"rtl");var G=T.getContext("2d");return T.style.zIndex=z,T.style.position="fixed",T.style.top="0",T.style.left="0",document.body.appendChild(T),T.width=x,T.height=q,G},w.prototype.clear=function(){K&&this.debugCtx.clearRect(0,0,x,q)},w.prototype.clearLayouts=function(){K&&this.layoutsCtx.clearRect(0,0,x,q)},w.prototype.drawLayout=function(O,z,H){if(K){this.layoutsCtx.strokeStyle="green",this.layoutsCtx.strokeRect(O.left,O.top,O.width,O.height),this.layoutsCtx.font="8px monospace",this.layoutsCtx.fillStyle="red";var T=this.writingDirection===y.default.LTR?"left":"right",G=O[T];this.layoutsCtx.fillText(z,G,O.top+10),this.layoutsCtx.fillText(H,G,O.top+25),this.layoutsCtx.fillText("".concat(T,": ").concat(G),G,O.top+40),this.layoutsCtx.fillText("top: ".concat(O.top),G,O.top+55)}},w.prototype.drawPoint=function(O,z,H,T){H===void 0&&(H="blue"),T===void 0&&(T=10),K&&(this.debugCtx.strokeStyle=H,this.debugCtx.lineWidth=3,this.debugCtx.strokeRect(O-T/2,z-T/2,T,T))},w}();d.default=D},119:function(g,d){var m;Object.defineProperty(d,"__esModule",{value:!0}),function(C){C[C.LTR=0]="LTR",C[C.RTL=1]="RTL"}(m||(m={})),d.default=m},607:function(g,d,m){var C=this&&this.__createBinding||(Object.create?function(K,x,q,D){D===void 0&&(D=q);var w=Object.getOwnPropertyDescriptor(x,q);w&&!("get"in w?!x.__esModule:w.writable||w.configurable)||(w={enumerable:!0,get:function(){return x[q]}}),Object.defineProperty(K,D,w)}:function(K,x,q,D){D===void 0&&(D=q),K[D]=x[q]}),y=this&&this.__exportStar||function(K,x){for(var q in K)q==="default"||Object.prototype.hasOwnProperty.call(x,q)||C(x,K,q)};Object.defineProperty(d,"__esModule",{value:!0}),y(m(79),d),y(m(445),d),y(m(654),d)},964:function(g,d){Object.defineProperty(d,"__esModule",{value:!0}),d.getBoundingClientRect=void 0;var m=function(C){for(var y=C.offsetParent,K=C.offsetHeight,x=C.offsetWidth,q=C.offsetLeft,D=C.offsetTop;y&&y.nodeType===1;)q+=y.offsetLeft-y.scrollLeft,D+=y.offsetTop-y.scrollTop,y=y.offsetParent;return{height:K,left:q,top:D,width:x}};d.default=function(C){var y=C&&C.parentElement;if(C&&y){var K=m(y),x=m(C),q=x.height,D=x.left,w=x.top,O=x.width;return{x:D-K.left,y:w-K.top,width:O,height:q,left:D,top:w,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}},d.getBoundingClientRect=function(C){if(C&&C.getBoundingClientRect){var y=C.getBoundingClientRect();return{x:y.x,y:y.y,width:y.width,height:y.height,left:y.left,top:y.top,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}}},445:function(g,d,m){Object.defineProperty(d,"__esModule",{value:!0}),d.useFocusContext=d.FocusContext=void 0;var C=m(156),y=m(654);d.FocusContext=(0,C.createContext)(y.ROOT_FOCUS_KEY),d.FocusContext.displayName="FocusContext",d.useFocusContext=function(){return(0,C.useContext)(d.FocusContext)}},79:function(g,d,m){var C=this&&this.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(d,"__esModule",{value:!0}),d.useFocusable=void 0;var y=m(156),K=C(m(604)),x=C(m(461)),q=m(654),D=m(445);d.useFocusable=function(w){var O=w===void 0?{}:w,z=O.focusable,H=z===void 0||z,T=O.saveLastFocusedChild,G=T===void 0||T,J=O.trackChildren,ne=J!==void 0&&J,me=O.autoRestoreFocus,$e=me===void 0||me,Ee=O.forceFocus,V=Ee!==void 0&&Ee,Ce=O.isFocusBoundary,ue=Ce!==void 0&&Ce,ce=O.focusBoundaryDirections,fe=O.focusKey,ae=O.preferredChildFocusKey,Fe=O.onEnterPress,qe=Fe===void 0?K.default:Fe,Re=O.onEnterRelease,Ke=Re===void 0?K.default:Re,Pe=O.onArrowPress,p=Pe===void 0?function(){return!0}:Pe,s=O.onArrowRelease,c=s===void 0?K.default:s,f=O.onFocus,l=f===void 0?K.default:f,F=O.onBlur,R=F===void 0?K.default:F,A=O.extraProps,E=(0,y.useCallback)(function(Y){qe(A,Y)},[qe,A]),$=(0,y.useCallback)(function(){Ke(A)},[Ke,A]),j=(0,y.useCallback)(function(Y,Q){return p(Y,A,Q)},[A,p]),N=(0,y.useCallback)(function(Y){c(Y,A)},[c,A]),L=(0,y.useCallback)(function(Y,Q){l(Y,A,Q)},[A,l]),P=(0,y.useCallback)(function(Y,Q){R(Y,A,Q)},[A,R]),X=(0,y.useRef)(null),W=(0,y.useState)(!1),Z=W[0],oe=W[1],k=(0,y.useState)(!1),ee=k[0],le=k[1],ie=(0,D.useFocusContext)(),re=(0,y.useMemo)(function(){return fe||(0,x.default)("sn:focusable-item-")},[fe]),we=(0,y.useCallback)(function(Y){Y===void 0&&(Y={}),q.SpatialNavigation.setFocus(re,Y)},[re]);return(0,y.useEffect)(function(){var Y=X.current;return q.SpatialNavigation.addFocusable({focusKey:re,node:Y,parentFocusKey:ie,preferredChildFocusKey:ae,onEnterPress:E,onEnterRelease:$,onArrowPress:j,onArrowRelease:N,onFocus:L,onBlur:P,onUpdateFocus:function(Q){return Q===void 0&&(Q=!1),oe(Q)},onUpdateHasFocusedChild:function(Q){return Q===void 0&&(Q=!1),le(Q)},saveLastFocusedChild:G,trackChildren:ne,isFocusBoundary:ue,focusBoundaryDirections:ce,autoRestoreFocus:$e,forceFocus:V,focusable:H}),function(){q.SpatialNavigation.removeFocusable({focusKey:re})}},[]),(0,y.useEffect)(function(){var Y=X.current;q.SpatialNavigation.updateFocusable(re,{node:Y,preferredChildFocusKey:ae,focusable:H,isFocusBoundary:ue,focusBoundaryDirections:ce,onEnterPress:E,onEnterRelease:$,onArrowPress:j,onArrowRelease:N,onFocus:L,onBlur:P})},[re,ae,H,ue,ce,E,$,j,N,L,P]),{ref:X,focusSelf:we,focused:Z,hasFocusedChild:ee,focusKey:re}}},150:function(g){g.exports=t},117:function(g){g.exports=n},747:function(g){g.exports=a},23:function(g){g.exports=i},842:function(g){g.exports=o},682:function(g){g.exports=u},784:function(g){g.exports=v},604:function(g){g.exports=h},432:function(g){g.exports=b},67:function(g){g.exports=_},461:function(g){g.exports=I},156:function(g){g.exports=M}},S={};return function g(d){var m=S[d];if(m!==void 0)return m.exports;var C=S[d]={exports:{}};return B[d].call(C.exports,C,C.exports,g),C.exports}(607)}()})})(Ki);var Cl=Ki.exports;exports.commonjsGlobal=pe;exports.distExports=Cl;exports.getAugmentedNamespace=is;exports.getDefaultExportFromCjs=as;
|
|
1
|
+
"use strict";require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.symbol.to-primitive.js"),require("core-js/modules/es.array.filter.js"),require("core-js/modules/es.array.from.js"),require("core-js/modules/es.array.index-of.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.date.to-primitive.js"),require("core-js/modules/es.number.constructor.js"),require("core-js/modules/es.object.define-properties.js"),require("core-js/modules/es.object.define-property.js"),require("core-js/modules/es.object.get-own-property-descriptor.js"),require("core-js/modules/es.object.get-own-property-descriptors.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/web.dom-collections.iterator.js");function e(r){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(r)}var r=["Component","options","customOptions","autoFocus"],t=["webos","options"];function o(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,i,s,u=[],c=!0,l=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(o=i.call(t)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(a){l=!0,n=a}finally{try{if(!c&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(l)throw n}}return u}}(e,r)||function(e,r){if(e){if("string"==typeof e)return n(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,r):void 0}}(e,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 n(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=Array(r);t<r;t++)o[t]=e[t];return o}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach(function(r){u(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function u(r,t,o){return(t=function(r){var t=function(r,t){if("object"!=e(r)||!r)return r;var o=r[Symbol.toPrimitive];if(void 0!==o){var n=o.call(r,t||"default");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(r)}(r,"string");return"symbol"==e(t)?t:t+""}(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}function c(e,r){if(null==e)return{};var t,o,n=function(e,r){if(null==e)return{};var t={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==r.indexOf(o))continue;t[o]=e[o]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],-1===r.indexOf(t)&&{}.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var l=require("react/jsx-runtime"),a=require("./index11.js"),f=require("react"),m=require("./sl-types.js"),d=require("react-countdown-circle-timer"),j=require("./index4.js"),p=function(e){var t=e.Component,o=e.options,n=e.customOptions,i=e.autoFocus,u=c(e,r),m=a.distExports.useFocusable(s(s(s({},o),n),{},{onEnterPress:function(){var r;return null==(r=e.onClick)?void 0:r.call(e,{currentTarget:m.ref.current,stopPropagation:function(){}})}}));return f.useEffect(function(){i&&m.focusSelf()},[]),l.jsx(t,s(s(s({},u),m),{},{"data-is-with-focus":"true"}))};var y=[10,10,1,0],b=m.styled_default("div")({name:"RemainingTimeCircle",class:"r165427",propsAsIs:!1}),v=m.styled_default("div")({name:"RemainingTime",class:"r17garf3",propsAsIs:!1}),g=m.O,O=m.N,h=m.S;exports.G=function(e){var r=e.className,t=e.duration,o=void 0===t?30:t,n=e.onTimerExpired,i=e.isPlaying,s=void 0===i||i;return l.jsx(d.CountdownCircleTimer,{isPlaying:s,strokeWidth:0,duration:o,colors:O,size:24,onComplete:n,children:function(e){var t=e.remainingTime;return l.jsx(v,{className:r,children:0===o?0:t})}})},exports.L=function(e){var r=e.isPlaying,t=void 0===r||r,n=e.duration,i=void 0===n?30:n,s=e.onTimerExpired,u=o(f.useState(i>10?g:O),2),c=u[0],a=u[1],j=o(f.useState(2),2),p=j[0],v=j[1];f.useEffect(function(){0===i&&(v(0),a(h))},[i]);var q=f.useCallback(function(){null==s||s(),a(h)},[s,a]),x=f.useCallback(function(e){10===e&&a(O)},[a]);return l.jsx(d.CountdownCircleTimer,{isPlaying:t,duration:i,colors:m.I,colorsTime:y,size:32,strokeWidth:p,trailStrokeWidth:2,trailColor:c,onComplete:q,onUpdate:x,children:function(e){var r=e.remainingTime;return l.jsx(b,{children:0===i?0:r})}})},exports.O=function(e,r){return function(o){var n=o.webos,i=o.options,u=c(o,t);return n?l.jsx(p,s({Component:e,options:r,customOptions:i},u)):l.jsx(e,s({},u))}},exports.d=function(e){var r=e.height,t=void 0===r?"37px":r,o=e.width,n=void 0===o?"37px":o;return l.jsx("div",{style:{height:t,width:n},children:l.jsx(j.B1,{name:"loader"})})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./sl-types.js"),l=require("./useStreamLayerApp2.js"),e=require("react/jsx-runtime"),U=require("react"),S=require("./index8.js"),_=require("./index4.js"),O={[l.QuestionType.TWEET]:{label:"Insight",iconName:"icon-insight"},[l.QuestionType.PROMOTION]:{label:"Insight",iconName:"icon-insight"},[l.QuestionType.UNSET]:void 0,[l.QuestionType.FACTOID]:{label:"Insight",iconName:"icon-insight"},[l.QuestionType.POLL]:{label:"Poll",iconName:"icon-poll"},[l.QuestionType.TRIVIA]:{label:"Trivia",iconName:"icon-trivia"},[l.QuestionType.PREDICTION]:{label:"Prediction",iconName:"icon-prediction"}},b={[l.QuestionType.TWEET]:"Learn more",[l.QuestionType.FACTOID]:"Learn more",[l.QuestionType.POLL]:"Answer",[l.QuestionType.TRIVIA]:"Answer",[l.QuestionType.PREDICTION]:"Answer",[l.QuestionType.PROMOTION]:"",[l.QuestionType.UNSET]:""},E=i=>i.split(/\s+/).map(n=>n[0]).join("").toUpperCase(),q=i=>i?i.toLocaleString("en-US"):"0",C=i=>{const n=new Date(i);if(!n)return"";const d=new Date,a=Math.floor(d.getTime()-n.getTime());return a<6e4?`${Math.floor(a/1e3)}s`:a<36e5?`${Math.floor(a/6e4)}m`:a<864e5?`${Math.floor(a/36e5)}h`:n.getFullYear()===d.getFullYear()?`${n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}`:`${n.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"2-digit"})}`},R=t.styled_default("div")({name:"Container",class:"cjq447q",propsAsIs:!1}),P=t.styled_default("div")({name:"ImageContainer",class:"i14egogb",propsAsIs:!1}),M=t.styled_default("img")({name:"Image",class:"i2g9g4l",propsAsIs:!1}),F=()=>_.B1,V=t.styled_default(F())({name:"TwitterIcon",class:"t1c454nm",propsAsIs:!0}),z=t.styled_default("div")({name:"Details",class:"d11nigc3",propsAsIs:!1}),B=t.styled_default("div")({name:"Name",class:"nrxa4k8",propsAsIs:!1}),k=t.styled_default("div")({name:"UserNameAndDate",class:"u1p051g3",propsAsIs:!1}),w=({image:i,name:n,userName:d,verified:a,createdTweet:m})=>{const o=m&&C(m);return e.jsxs(R,{children:[i&&e.jsxs(P,{children:[e.jsx(M,{className:"SL_AccountImage",src:i}),e.jsx(V,{name:"twitter"})]}),e.jsxs(z,{children:[n&&e.jsxs(B,{className:"SL_TweetAccountName",children:[n," ",a&&e.jsx(_.B1,{name:"icon-twitter-verified"})]}),d&&e.jsxs(k,{className:"SL_TweetAccountUserName",children:["@",d," ",o&&`・ ${o}`]})]})]})},W=t.styled_default("div")({name:"Container",class:"c1kzqw87",propsAsIs:!1}),Y=t.styled_default("div")({name:"Details",class:"d9r1hf9",propsAsIs:!1}),G=t.styled_default("div")({name:"Body",class:"bezygt5",propsAsIs:!1}),c=t.styled_default("div")({name:"ImagesContainer",class:"i1y8f7ym",propsAsIs:!1}),g=t.styled_default("div")({name:"ImagesBlock",class:"i18gwonx",propsAsIs:!1}),D=t.styled_default("img")({name:"Image",class:"i3g0xjd",propsAsIs:!1}),J=()=>D,r=t.styled_default(J())({name:"ImageFullSize",class:"io8rt7p",propsAsIs:!0}),K=()=>D,v=t.styled_default(K())({name:"ImageHalfSize",class:"i4hn3ox",propsAsIs:!0}),X=new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"),L=i=>i==null?void 0:i.replace(X,""),Z=U.memo(({image:i,body:n,muted:d,account:a,accountVerified:m,tweet:o,isDetail:y,controlVideo:H})=>{var I,x,h,T,j;const s=(x=(I=o==null?void 0:o.meta)==null?void 0:I.extendedEntities)==null?void 0:x.media,p=s==null?void 0:s.find(({type:u})=>u==="photo"),f=U.useMemo(()=>{var u,A,$,N;return(N=($=(A=(u=s==null?void 0:s[0])==null?void 0:u.videoInfo)==null?void 0:A.variants)==null?void 0:$.findLast(({contentType:Q})=>Q==="video/mp4"))==null?void 0:N.url},[s]);return e.jsxs(W,{children:[e.jsxs(Y,{children:[e.jsx(w,{image:i,name:(h=o==null?void 0:o.meta)==null?void 0:h.accountName,userName:a,verified:m,createdTweet:o==null?void 0:o.date}),e.jsx(G,{children:L(n)}),!y&&p&&e.jsx(c,{children:e.jsx(r,{src:s==null?void 0:s[0].mediaUrlHttps})}),y&&p&&e.jsxs(e.Fragment,{children:[(s==null?void 0:s.length)===1&&e.jsx(c,{children:e.jsx(r,{src:s[0].mediaUrlHttps})}),(s==null?void 0:s.length)===2&&e.jsxs(c,{children:[e.jsx(v,{src:s[0].mediaUrlHttps}),e.jsx(v,{src:s[1].mediaUrlHttps})]}),(s==null?void 0:s.length)===3&&e.jsxs(c,{children:[e.jsx(v,{src:s[0].mediaUrlHttps}),e.jsxs(g,{children:[e.jsx(r,{src:s[1].mediaUrlHttps}),e.jsx(r,{src:s[2].mediaUrlHttps})]})]}),(s==null?void 0:s.length)===4&&e.jsxs(c,{children:[e.jsxs(g,{children:[e.jsx(r,{src:s[0].mediaUrlHttps}),e.jsx(r,{src:s[1].mediaUrlHttps})]}),e.jsxs(g,{children:[e.jsx(r,{src:s[2].mediaUrlHttps}),e.jsx(r,{src:s[3].mediaUrlHttps})]})]})]})]}),!p&&(((T=s==null?void 0:s[0])==null?void 0:T.type)==="video"||((j=s==null?void 0:s[0])==null?void 0:j.type)==="animated_gif")&&f&&e.jsx(S.Et,{muted:d,source:f,poster:s[0].mediaUrlHttps,controlVideo:H})]})});exports.D=w;exports.D$1=L;exports.I=E;exports.b=Z;exports.e=O;exports.o=b;exports.s=q;
|
|
1
|
+
"use strict";require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.array.filter.js"),require("core-js/modules/es.array.includes.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.array.map.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.array.sort.js"),require("core-js/modules/es.array.splice.js"),require("core-js/modules/es.number.is-integer.js"),require("core-js/modules/es.object.assign.js"),require("core-js/modules/es.object.define-property.js"),require("core-js/modules/es.object.entries.js"),require("core-js/modules/es.object.get-own-property-descriptor.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.parse-int.js"),require("core-js/modules/es.reflect.construct.js"),require("core-js/modules/es.regexp.constructor.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.string.includes.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/es.string.replace.js"),require("core-js/modules/esnext.global-this.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/web.dom-collections.iterator.js");function t(e){return(t="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})(e)}var e=require("react"),r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n,o,i,u,s,a,c,f,l,d,h,p,v,y,g,b,m,F,C,_,j,w,x,K,O,E,M,A,D,P,L={exports:{}};function R(){if(o)return n;return o=1,n=function(e){var r=t(e);return null!=e&&("object"==r||"function"==r)}}function N(){if(u)return i;u=1;var e="object"==t(r)&&r&&r.Object===Object&&r;return i=e}function B(){if(a)return s;a=1;var e=N(),r="object"==("undefined"==typeof self?"undefined":t(self))&&self&&self.Object===Object&&self,n=e||r||Function("return this")();return s=n}function S(){if(p)return h;p=1;var t=function(){if(d)return l;d=1;var t=/\s/;return l=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}}(),e=/^\s+/;return h=function(r){return r?r.slice(0,t(r)+1).replace(e,""):r}}function k(){if(y)return v;y=1;var t=B().Symbol;return v=t}function T(){if(_)return C;_=1;var t=k(),e=function(){if(b)return g;b=1;var t=k(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,o=t?t.toStringTag:void 0;return g=function(t){var e=r.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(Su){}var s=n.call(t);return u&&(e?t[o]=i:delete t[o]),s}}(),r=function(){if(F)return m;F=1;var t=Object.prototype.toString;return m=function(e){return t.call(e)}}(),n=t?t.toStringTag:void 0;return C=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":n&&n in Object(t)?e(t):r(t)}}function U(){if(w)return j;return w=1,j=function(e){return null!=e&&"object"==t(e)}}function q(){if(K)return x;K=1;var e=T(),r=U();return x=function(n){return"symbol"==t(n)||r(n)&&"[object Symbol]"==e(n)}}function z(){if(A)return M;A=1;var t=R(),e=function(){if(f)return c;f=1;var t=B();return c=function(){return t.Date.now()}}(),r=function(){if(E)return O;E=1;var t=S(),e=R(),r=q(),n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,u=parseInt;return O=function(s){if("number"==typeof s)return s;if(r(s))return NaN;if(e(s)){var a="function"==typeof s.valueOf?s.valueOf():s;s=e(a)?a+"":a}if("string"!=typeof s)return 0===s?s:+s;s=t(s);var c=o.test(s);return c||i.test(s)?u(s.slice(2),c?2:8):n.test(s)?NaN:+s}}(),n=Math.max,o=Math.min;return M=function(i,u,s){var a,c,f,l,d,h,p=0,v=!1,y=!1,g=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function b(t){var e=a,r=c;return a=c=void 0,p=t,l=i.apply(r,e)}function m(t){var e=t-h;return void 0===h||e>=u||e<0||y&&t-p>=f}function F(){var t=e();if(m(t))return C(t);d=setTimeout(F,function(t){var e=u-(t-h);return y?o(e,f-(t-p)):e}(t))}function C(t){return d=void 0,g&&a?b(t):(a=c=void 0,l)}function _(){var t=e(),r=m(t);if(a=arguments,c=this,h=t,r){if(void 0===d)return function(t){return p=t,d=setTimeout(F,u),v?b(t):l}(h);if(y)return clearTimeout(d),d=setTimeout(F,u),b(h)}return void 0===d&&(d=setTimeout(F,u)),l}return u=r(u)||0,t(s)&&(v=!!s.leading,f=(y="maxWait"in s)?n(r(s.maxWait)||0,u):f,g="trailing"in s?!!s.trailing:g),_.cancel=function(){void 0!==d&&clearTimeout(d),p=0,a=h=c=d=void 0},_.flush=function(){return void 0===d?l:C(e())},_},M}function H(){if(P)return D;P=1;var t=T(),e=R();return D=function(r){if(!e(r))return!1;var n=t(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}var I,$=B()["__core-js_shared__"],W=(I=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var G=function(t){return!!W&&W in t},Y=Function.prototype.toString;var V=function(t){if(null!=t){try{return Y.call(t)}catch(Su){}try{return t+""}catch(Su){}}return""},J=H(),Q=G,X=R(),Z=V,tt=/^\[object .+?Constructor\]$/,et=Function.prototype,rt=Object.prototype,nt=et.toString,ot=rt.hasOwnProperty,it=RegExp("^"+nt.call(ot).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ut=function(t){return!(!X(t)||Q(t))&&(J(t)?it:tt).test(Z(t))},st=function(t,e){return null==t?void 0:t[e]};var at,ct,ft,lt,dt,ht,pt,vt,yt,gt,bt,mt,Ft,Ct,_t=function(t,e){var r=st(t,e);return ut(r)?r:void 0};function jt(){if(ct)return at;ct=1;var t=_t(Object,"create");return at=t}function wt(){if(Ct)return Ft;Ct=1;var t=function(){if(lt)return ft;lt=1;var t=jt();return ft=function(){this.__data__=t?t(null):{},this.size=0}}(),e=ht?dt:(ht=1,dt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}),r=function(){if(vt)return pt;vt=1;var t=jt(),e=Object.prototype.hasOwnProperty;return pt=function(r){var n=this.__data__;if(t){var o=n[r];return"__lodash_hash_undefined__"===o?void 0:o}return e.call(n,r)?n[r]:void 0}}(),n=function(){if(gt)return yt;gt=1;var t=jt(),e=Object.prototype.hasOwnProperty;return yt=function(r){var n=this.__data__;return t?void 0!==n[r]:e.call(n,r)}}(),o=function(){if(mt)return bt;mt=1;var t=jt();return bt=function(e,r){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=t&&void 0===r?"__lodash_hash_undefined__":r,this}}();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Ft=i}var xt,Kt,Ot=function(){this.__data__=[],this.size=0};function Et(){if(Kt)return xt;return Kt=1,xt=function(t,e){return t===e||t!=t&&e!=e}}var Mt=Et();var At=function(t,e){for(var r=t.length;r--;)if(Mt(t[r][0],e))return r;return-1},Dt=At,Pt=Array.prototype.splice;var Lt=At;var Rt=At;var Nt=At;var Bt=Ot,St=function(t){var e=this.__data__,r=Dt(e,t);return!(r<0)&&(r==e.length-1?e.pop():Pt.call(e,r,1),--this.size,!0)},kt=function(t){var e=this.__data__,r=Lt(e,t);return r<0?void 0:e[r][1]},Tt=function(t){return Rt(this.__data__,t)>-1},Ut=function(t,e){var r=this.__data__,n=Nt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function qt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}qt.prototype.clear=Bt,qt.prototype.delete=St,qt.prototype.get=kt,qt.prototype.has=Tt,qt.prototype.set=Ut;var zt,Ht,It,$t,Wt,Gt,Yt,Vt,Jt,Qt,Xt,Zt,te,ee,re,ne,oe,ie,ue,se,ae,ce,fe,le,de,he,pe,ve,ye,ge,be,me,Fe,Ce,_e=qt,je=_t(B(),"Map");function we(){if(Gt)return Wt;Gt=1;var e=$t?It:($t=1,It=function(e){var r=t(e);return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e});return Wt=function(t,r){var n=t.__data__;return e(r)?n["string"==typeof r?"string":"hash"]:n.map}}function xe(){if(ne)return re;ne=1;var t=function(){if(Ht)return zt;Ht=1;var t=wt(),e=_e,r=je;return zt=function(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}}(),e=function(){if(Vt)return Yt;Vt=1;var t=we();return Yt=function(e){var r=t(this,e).delete(e);return this.size-=r?1:0,r}}(),r=function(){if(Qt)return Jt;Qt=1;var t=we();return Jt=function(e){return t(this,e).get(e)}}(),n=function(){if(Zt)return Xt;Zt=1;var t=we();return Xt=function(e){return t(this,e).has(e)}}(),o=function(){if(ee)return te;ee=1;var t=we();return te=function(e,r){var n=t(this,e),o=n.size;return n.set(e,r),this.size+=n.size==o?0:1,this}}();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,re=i}function Ke(){if(ce)return ae;ce=1;var t=xe(),e=ie?oe:(ie=1,oe=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),r=se?ue:(se=1,ue=function(t){return this.__data__.has(t)});function n(e){var r=-1,n=null==e?0:e.length;for(this.__data__=new t;++r<n;)this.add(e[r])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,ae=n}function Oe(){if(ge)return ye;ge=1;var t=le?fe:(le=1,fe=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}),e=he?de:(he=1,de=function(t){return t!=t}),r=ve?pe:(ve=1,pe=function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1});return ye=function(n,o,i){return o==o?r(n,o,i):t(n,e,i)}}var Ee,Me,Ae,De,Pe,Le,Re,Ne,Be,Se,ke,Te,Ue,qe,ze,He,Ie,$e,We,Ge,Ye,Ve,Je,Qe,Xe,Ze,tr,er,rr,nr,or,ir,ur,sr,ar,cr,fr,lr,dr,hr,pr,vr,yr,gr,br,mr,Fr,Cr,_r,jr,wr,xr,Kr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o};function Or(){if(Me)return Ee;return Me=1,Ee=function(t){return function(e){return t(e)}}}function Er(){if(De)return Ae;return De=1,Ae=function(t,e){return t.has(e)}}function Mr(){if(Le)return Pe;Le=1;var t=Ke(),e=function(){if(me)return be;me=1;var t=Oe();return be=function(e,r){return!(null==e||!e.length)&&t(e,r,0)>-1}}(),r=Ce?Fe:(Ce=1,Fe=function(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}),n=Kr,o=Or(),i=Er();return Pe=function(u,s,a,c){var f=-1,l=e,d=!0,h=u.length,p=[],v=s.length;if(!h)return p;a&&(s=n(s,o(a))),c?(l=r,d=!1):s.length>=200&&(l=i,d=!1,s=new t(s));t:for(;++f<h;){var y=u[f],g=null==a?y:a(y);if(y=c||0!==y?y:0,d&&g==g){for(var b=v;b--;)if(s[b]===g)continue t;p.push(y)}else l(s,g,c)||p.push(y)}return p}}function Ar(){if(Ne)return Re;return Ne=1,Re=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}}function Dr(){if(Te)return ke;Te=1;var t=function(){if(Se)return Be;Se=1;var t=T(),e=U();return Be=function(r){return e(r)&&"[object Arguments]"==t(r)}}(),e=U(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return e(t)&&n.call(t,"callee")&&!o.call(t,"callee")};return ke=i}function Pr(){if(qe)return Ue;qe=1;var t=Array.isArray;return Ue=t}function Lr(){if($e)return Ie;$e=1;var t=Ar(),e=function(){if(He)return ze;He=1;var t=k(),e=Dr(),r=Pr(),n=t?t.isConcatSpreadable:void 0;return ze=function(t){return r(t)||e(t)||!!(n&&t&&t[n])}}();return Ie=function r(n,o,i,u,s){var a=-1,c=n.length;for(i||(i=e),s||(s=[]);++a<c;){var f=n[a];o>0&&i(f)?o>1?r(f,o-1,i,u,s):t(s,f):u||(s[s.length]=f)}return s},Ie}function Rr(){if(Ge)return We;return Ge=1,We=function(t){return t}}function Nr(){if(Qe)return Je;Qe=1;var t=Ve?Ye:(Ve=1,Ye=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}),e=Math.max;return Je=function(r,n,o){return n=e(void 0===n?r.length-1:n,0),function(){for(var i=arguments,u=-1,s=e(i.length-n,0),a=Array(s);++u<s;)a[u]=i[n+u];u=-1;for(var c=Array(n+1);++u<n;)c[u]=i[u];return c[n]=o(a),t(r,this,c)}},Je}function Br(){if(nr)return rr;nr=1;var t=Ze?Xe:(Ze=1,Xe=function(t){return function(){return t}}),e=function(){if(er)return tr;er=1;var t=_t,e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(Su){}}();return tr=e}(),r=Rr();return rr=e?function(r,n){return e(r,"toString",{configurable:!0,enumerable:!1,value:t(n),writable:!0})}:r}function Sr(){if(sr)return ur;sr=1;var t=Br(),e=function(){if(ir)return or;ir=1;var t=Date.now;return or=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}},or}(),r=e(t);return ur=r}function kr(){if(cr)return ar;cr=1;var t=Rr(),e=Nr(),r=Sr();return ar=function(n,o){return r(e(n,o,t),n+"")}}function Tr(){if(lr)return fr;lr=1;return fr=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function Ur(){if(hr)return dr;hr=1;var t=H(),e=Tr();return dr=function(r){return null!=r&&e(r.length)&&!t(r)}}function qr(){if(gr)return yr;gr=1;var t=Mr(),e=Lr(),r=kr(),n=function(){if(vr)return pr;vr=1;var t=Ur(),e=U();return pr=function(r){return e(r)&&t(r)}}(),o=r(function(r,o){return n(r)?t(r,e(o,1,n,!0)):[]});return yr=o}function zr(){if(mr)return br;return mr=1,br=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i}}function Hr(){if(jr)return _r;jr=1;var t=(Cr?Fr:(Cr=1,Fr=function(t){return function(e,r,n){for(var o=-1,i=Object(e),u=n(e),s=u.length;s--;){var a=u[t?s:++o];if(!1===r(i[a],a,i))break}return e}}))();return _r=t}var Ir={exports:{}};var $r,Wr,Gr,Yr,Vr,Jr,Qr,Xr,Zr=function(){return!1};$r=Ir,Wr=Ir.exports,Gr=B(),Yr=Zr,Vr=Wr&&!Wr.nodeType&&Wr,Jr=Vr&&$r&&!$r.nodeType&&$r,Qr=Jr&&Jr.exports===Vr?Gr.Buffer:void 0,Xr=(Qr?Qr.isBuffer:void 0)||Yr,$r.exports=Xr;var tn,en,rn,nn,on=Ir.exports;function un(){if(en)return tn;en=1;var e=/^(?:0|[1-9]\d*)$/;return tn=function(r,n){var o=t(r);return!!(n=null==n?9007199254740991:n)&&("number"==o||"symbol"!=o&&e.test(r))&&r>-1&&r%1==0&&r<n}}var sn={exports:{}};!function(t,e){var r=N(),n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,i=o&&o.exports===n&&r.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(Su){}}();t.exports=u}(sn,sn.exports);var an,cn,fn,ln,dn=sn.exports;function hn(){if(cn)return an;cn=1;var t=function(){if(nn)return rn;nn=1;var t=T(),e=Tr(),r=U(),n={};return n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,rn=function(o){return r(o)&&e(o.length)&&!!n[t(o)]}}(),e=Or(),r=dn&&dn.isTypedArray,n=r?e(r):t;return an=n}function pn(){if(ln)return fn;ln=1;var t=xr?wr:(xr=1,wr=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}),e=Dr(),r=Pr(),n=on,o=un(),i=hn(),u=Object.prototype.hasOwnProperty;return fn=function(s,a){var c=r(s),f=!c&&e(s),l=!c&&!f&&n(s),d=!c&&!f&&!l&&i(s),h=c||f||l||d,p=h?t(s.length,String):[],v=p.length;for(var y in s)!a&&!u.call(s,y)||h&&("length"==y||l&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||o(y,v))||p.push(y);return p}}var vn=Object.prototype;var yn=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||vn)};var gn,bn,mn,Fn,Cn,_n,jn,wn,xn,Kn,On,En,Mn,An,Dn=function(t,e){return function(r){return t(e(r))}};function Pn(){if(Fn)return mn;Fn=1;var t=yn,e=function(){if(bn)return gn;bn=1;var t=Dn(Object.keys,Object);return gn=t}(),r=Object.prototype.hasOwnProperty;return mn=function(n){if(!t(n))return e(n);var o=[];for(var i in Object(n))r.call(n,i)&&"constructor"!=i&&o.push(i);return o}}function Ln(){if(_n)return Cn;_n=1;var t=pn(),e=Pn(),r=Ur();return Cn=function(n){return r(n)?t(n):e(n)}}function Rn(){if(wn)return jn;wn=1;var t=Hr(),e=Ln();return jn=function(r,n){return r&&t(r,n,e)}}function Nn(){if(En)return On;En=1;var t=Rn(),e=function(){if(Kn)return xn;Kn=1;var t=Ur();return xn=function(e,r){return function(n,o){if(null==n)return n;if(!t(n))return e(n,o);for(var i=n.length,u=r?i:-1,s=Object(n);(r?u--:++u<i)&&!1!==o(s[u],u,s););return n}}}()(t);return On=e}var Bn=_e;var Sn=function(){this.__data__=new Bn,this.size=0};var kn=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var Tn=function(t){return this.__data__.get(t)};var Un=function(t){return this.__data__.has(t)},qn=_e,zn=je,Hn=xe();var In=_e,$n=Sn,Wn=kn,Gn=Tn,Yn=Un,Vn=function(t,e){var r=this.__data__;if(r instanceof qn){var n=r.__data__;if(!zn||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Hn(n)}return r.set(t,e),this.size=r.size,this};function Jn(t){var e=this.__data__=new In(t);this.size=e.size}Jn.prototype.clear=$n,Jn.prototype.delete=Wn,Jn.prototype.get=Gn,Jn.prototype.has=Yn,Jn.prototype.set=Vn;var Qn,Xn,Zn,to,eo=Jn;function ro(){if(to)return Zn;to=1;var t=Ke(),e=Xn?Qn:(Xn=1,Qn=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}),r=Er();return Zn=function(n,o,i,u,s,a){var c=1&i,f=n.length,l=o.length;if(f!=l&&!(c&&l>f))return!1;var d=a.get(n),h=a.get(o);if(d&&h)return d==o&&h==n;var p=-1,v=!0,y=2&i?new t:void 0;for(a.set(n,o),a.set(o,n);++p<f;){var g=n[p],b=o[p];if(u)var m=c?u(b,g,p,o,n,a):u(g,b,p,n,o,a);if(void 0!==m){if(m)continue;v=!1;break}if(y){if(!e(o,function(t,e){if(!r(y,e)&&(g===t||s(g,t,i,u,a)))return y.push(e)})){v=!1;break}}else if(g!==b&&!s(g,b,i,u,a)){v=!1;break}}return a.delete(n),a.delete(o),v}}var no,oo,io=B().Uint8Array;var uo,so,ao=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r};function co(){if(so)return uo;so=1;var t=k(),e=io,r=Et(),n=ro(),o=oo?no:(oo=1,no=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}),i=ao,u=t?t.prototype:void 0,s=u?u.valueOf:void 0;return uo=function(t,u,a,c,f,l,d){switch(a){case"[object DataView]":if(t.byteLength!=u.byteLength||t.byteOffset!=u.byteOffset)return!1;t=t.buffer,u=u.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=u.byteLength||!l(new e(t),new e(u)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+t,+u);case"[object Error]":return t.name==u.name&&t.message==u.message;case"[object RegExp]":case"[object String]":return t==u+"";case"[object Map]":var h=o;case"[object Set]":var p=1&c;if(h||(h=i),t.size!=u.size&&!p)return!1;var v=d.get(t);if(v)return v==u;c|=2,d.set(t,u);var y=n(h(t),h(u),c,f,l,d);return d.delete(t),y;case"[object Symbol]":if(s)return s.call(t)==s.call(u)}return!1}}var fo=Ar(),lo=Pr();var ho=function(t,e,r){var n=e(t);return lo(t)?n:fo(n,r(t))};var po=function(){return[]},vo=zr(),yo=po,go=Object.prototype.propertyIsEnumerable,bo=Object.getOwnPropertySymbols,mo=ho,Fo=bo?function(t){return null==t?[]:(t=Object(t),vo(bo(t),function(e){return go.call(t,e)}))}:yo,Co=Ln();var _o,jo,wo=function(t){return mo(t,Co,Fo)};var xo=_t(B(),"DataView"),Ko=_t(B(),"Promise"),Oo=_t(B(),"Set"),Eo=_t(B(),"WeakMap"),Mo=xo,Ao=je,Do=Ko,Po=Oo,Lo=Eo,Ro=T(),No=V,Bo="[object Map]",So="[object Promise]",ko="[object Set]",To="[object WeakMap]",Uo="[object DataView]",qo=No(Mo),zo=No(Ao),Ho=No(Do),Io=No(Po),$o=No(Lo),Wo=Ro;(Mo&&Wo(new Mo(new ArrayBuffer(1)))!=Uo||Ao&&Wo(new Ao)!=Bo||Do&&Wo(Do.resolve())!=So||Po&&Wo(new Po)!=ko||Lo&&Wo(new Lo)!=To)&&(Wo=function(t){var e=Ro(t),r="[object Object]"==e?t.constructor:void 0,n=r?No(r):"";if(n)switch(n){case qo:return Uo;case zo:return Bo;case Ho:return So;case Io:return ko;case $o:return To}return e});var Go,Yo,Vo,Jo,Qo,Xo,Zo,ti,ei,ri,ni,oi,ii,ui,si,ai,ci=Wo;function fi(){if(Yo)return Go;Yo=1;var t=eo,e=ro(),r=co(),n=function(){if(jo)return _o;jo=1;var t=wo,e=Object.prototype.hasOwnProperty;return _o=function(r,n,o,i,u,s){var a=1&o,c=t(r),f=c.length;if(f!=t(n).length&&!a)return!1;for(var l=f;l--;){var d=c[l];if(!(a?d in n:e.call(n,d)))return!1}var h=s.get(r),p=s.get(n);if(h&&p)return h==n&&p==r;var v=!0;s.set(r,n),s.set(n,r);for(var y=a;++l<f;){var g=r[d=c[l]],b=n[d];if(i)var m=a?i(b,g,d,n,r,s):i(g,b,d,r,n,s);if(!(void 0===m?g===b||u(g,b,o,i,s):m)){v=!1;break}y||(y="constructor"==d)}if(v&&!y){var F=r.constructor,C=n.constructor;F==C||!("constructor"in r)||!("constructor"in n)||"function"==typeof F&&F instanceof F&&"function"==typeof C&&C instanceof C||(v=!1)}return s.delete(r),s.delete(n),v}}(),o=ci,i=Pr(),u=on,s=hn(),a="[object Arguments]",c="[object Array]",f="[object Object]",l=Object.prototype.hasOwnProperty;return Go=function(d,h,p,v,y,g){var b=i(d),m=i(h),F=b?c:o(d),C=m?c:o(h),_=(F=F==a?f:F)==f,j=(C=C==a?f:C)==f,w=F==C;if(w&&u(d)){if(!u(h))return!1;b=!0,_=!1}if(w&&!_)return g||(g=new t),b||s(d)?e(d,h,p,v,y,g):r(d,h,F,p,v,y,g);if(!(1&p)){var x=_&&l.call(d,"__wrapped__"),K=j&&l.call(h,"__wrapped__");if(x||K){var O=x?d.value():d,E=K?h.value():h;return g||(g=new t),y(O,E,p,v,g)}}return!!w&&(g||(g=new t),n(d,h,p,v,y,g))}}function li(){if(Jo)return Vo;Jo=1;var t=fi(),e=U();return Vo=function r(n,o,i,u,s){return n===o||(null==n||null==o||!e(n)&&!e(o)?n!=n&&o!=o:t(n,o,i,u,r,s))},Vo}function di(){if(ti)return Zo;ti=1;var t=R();return Zo=function(e){return e==e&&!t(e)}}function hi(){if(oi)return ni;return oi=1,ni=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}}function pi(){if(ui)return ii;ui=1;var t=function(){if(Xo)return Qo;Xo=1;var t=eo,e=li();return Qo=function(r,n,o,i){var u=o.length,s=u,a=!i;if(null==r)return!s;for(r=Object(r);u--;){var c=o[u];if(a&&c[2]?c[1]!==r[c[0]]:!(c[0]in r))return!1}for(;++u<s;){var f=(c=o[u])[0],l=r[f],d=c[1];if(a&&c[2]){if(void 0===l&&!(f in r))return!1}else{var h=new t;if(i)var p=i(l,d,f,r,n,h);if(!(void 0===p?e(d,l,3,i,h):p))return!1}}return!0}}(),e=function(){if(ri)return ei;ri=1;var t=di(),e=Ln();return ei=function(r){for(var n=e(r),o=n.length;o--;){var i=n[o],u=r[i];n[o]=[i,u,t(u)]}return n}}(),r=hi();return ii=function(n){var o=e(n);return 1==o.length&&o[0][2]?r(o[0][0],o[0][1]):function(e){return e===n||t(e,n,o)}}}function vi(){if(ai)return si;ai=1;var e=Pr(),r=q(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;return si=function(i,u){if(e(i))return!1;var s=t(i);return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=i&&!r(i))||(o.test(i)||!n.test(i)||null!=u&&i in Object(u))}}var yi=xe();function gi(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(gi.Cache||yi),r}gi.Cache=yi;var bi=gi;var mi,Fi,Ci,_i,ji=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wi=/\\(\\)?/g,xi=function(t){var e=bi(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ji,function(t,r,n,o){e.push(n?o.replace(wi,"$1"):r||t)}),e});function Ki(){if(_i)return Ci;_i=1;var t=function(){if(Fi)return mi;Fi=1;var t=k(),e=Kr,r=Pr(),n=q(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return mi=function t(o){if("string"==typeof o)return o;if(r(o))return e(o,t)+"";if(n(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},mi}();return Ci=function(e){return null==e?"":t(e)}}var Oi=Pr(),Ei=vi(),Mi=xi,Ai=Ki();var Di,Pi,Li,Ri,Ni,Bi,Si,ki,Ti,Ui,qi,zi,Hi,Ii,$i,Wi,Gi,Yi,Vi,Ji,Qi,Xi,Zi,tu,eu,ru,nu,ou,iu,uu,su,au,cu,fu,lu,du,hu,pu,vu,yu,gu,bu,mu,Fu,Cu,_u,ju,wu,xu,Ku,Ou,Eu,Mu,Au,Du,Pu,Lu,Ru,Nu,Bu,Su,ku,Tu,Uu,qu,zu,Hu,Iu,$u,Wu,Gu,Yu,Vu,Ju,Qu=function(t,e){return Oi(t)?t:Ei(t,e)?[t]:Mi(Ai(t))};function Xu(){if(Pi)return Di;Pi=1;var t=q();return Di=function(e){if("string"==typeof e||t(e))return e;var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}}function Zu(){if(Ri)return Li;Ri=1;var t=Qu,e=Xu();return Li=function(r,n){for(var o=0,i=(n=t(n,r)).length;null!=r&&o<i;)r=r[e(n[o++])];return o&&o==i?r:void 0}}function ts(){if(zi)return qi;zi=1;var t=ki?Si:(ki=1,Si=function(t,e){return null!=t&&e in Object(t)}),e=function(){if(Ui)return Ti;Ui=1;var t=Qu,e=Dr(),r=Pr(),n=un(),o=Tr(),i=Xu();return Ti=function(u,s,a){for(var c=-1,f=(s=t(s,u)).length,l=!1;++c<f;){var d=i(s[c]);if(!(l=null!=u&&a(u,d)))break;u=u[d]}return l||++c!=f?l:!!(f=null==u?0:u.length)&&o(f)&&n(d,f)&&(r(u)||e(u))}}();return qi=function(r,n){return null!=r&&e(r,n,t)}}function es(){if(Ii)return Hi;Ii=1;var t=li(),e=function(){if(Bi)return Ni;Bi=1;var t=Zu();return Ni=function(e,r,n){var o=null==e?void 0:t(e,r);return void 0===o?n:o}}(),r=ts(),n=vi(),o=di(),i=hi(),u=Xu();return Hi=function(s,a){return n(s)&&o(a)?i(u(s),a):function(n){var o=e(n,s);return void 0===o&&o===a?r(n,s):t(a,o,3)}}}function rs(){if(Ji)return Vi;Ji=1;var t=Wi?$i:(Wi=1,$i=function(t){return function(e){return null==e?void 0:e[t]}}),e=function(){if(Yi)return Gi;Yi=1;var t=Zu();return Gi=function(e){return function(r){return t(r,e)}}}(),r=vi(),n=Xu();return Vi=function(o){return r(o)?t(n(o)):e(o)}}function ns(){if(Xi)return Qi;Xi=1;var e=pi(),r=es(),n=Rr(),o=Pr(),i=rs();return Qi=function(u){return"function"==typeof u?u:null==u?n:"object"==t(u)?o(u)?r(u[0],u[1]):e(u):i(u)}}function os(){if(tu)return Zi;tu=1;var t=zr(),e=function(){if(An)return Mn;An=1;var t=Nn();return Mn=function(e,r){var n=[];return t(e,function(t,e,o){r(t,e,o)&&n.push(t)}),n}}(),r=ns(),n=Pr();return Zi=function(o,i){return(n(o)?t:e)(o,r(i,3))}}function is(){if(ou)return nu;ou=1;var t=ru?eu:(ru=1,eu=function(t,e,r){var n;return r(t,function(t,r,o){if(e(t,r,o))return n=r,!1}),n}),e=Rn(),r=ns();return nu=function(n,o){return t(n,r(o,3),e)}}function us(){return au?su:(au=1,su=uu?iu:(uu=1,iu=function(t){return t&&t.length?t[0]:void 0}))}function ss(){if(du)return lu;du=1;var t=Rr();return lu=function(e){return"function"==typeof e?e:t}}function as(){if(pu)return hu;pu=1;var t=fu?cu:(fu=1,cu=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}),e=Nn(),r=ss(),n=Pr();return hu=function(o,i){return(n(o)?t:e)(o,r(i))}}function cs(){if(Ku)return xu;Ku=1;var t=function(){if(wu)return ju;wu=1;var t=q();return ju=function(e,r){if(e!==r){var n=void 0!==e,o=null===e,i=e==e,u=t(e),s=void 0!==r,a=null===r,c=r==r,f=t(r);if(!a&&!f&&!u&&e>r||u&&s&&c&&!a&&!f||o&&s&&c||!n&&c||!i)return 1;if(!o&&!u&&!f&&e<r||f&&n&&i&&!o&&!u||a&&n&&i||!s&&i||!c)return-1}return 0}}();return xu=function(e,r,n){for(var o=-1,i=e.criteria,u=r.criteria,s=i.length,a=n.length;++o<s;){var c=t(i[o],u[o]);if(c)return o>=a?c:c*("desc"==n[o]?-1:1)}return e.index-r.index}}function fs(){if(Eu)return Ou;Eu=1;var t=Kr,e=Zu(),r=ns(),n=function(){if(Fu)return mu;Fu=1;var t=Nn(),e=Ur();return mu=function(r,n){var o=-1,i=e(r)?Array(r.length):[];return t(r,function(t,e,r){i[++o]=n(t,e,r)}),i}}(),o=_u?Cu:(_u=1,Cu=function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}),i=Or(),u=cs(),s=Rr(),a=Pr();return Ou=function(c,f,l){f=f.length?t(f,function(t){return a(t)?function(r){return e(r,1===t.length?t[0]:t)}:t}):[s];var d=-1;f=t(f,i(r));var h=n(c,function(e,r,n){return{criteria:t(f,function(t){return t(e)}),index:++d,value:e}});return o(h,function(t,e){return u(t,e,l)})}}function ls(){if(Pu)return Du;Pu=1;var e=Lr(),r=fs(),n=kr(),o=function(){if(Au)return Mu;Au=1;var e=Et(),r=Ur(),n=un(),o=R();return Mu=function(i,u,s){if(!o(s))return!1;var a=t(u);return!!("number"==a?r(s)&&n(u,s.length):"string"==a&&u in s)&&e(s[u],i)}}(),i=n(function(t,n){if(null==t)return[];var i=n.length;return i>1&&o(t,n[0],n[1])?n=[]:i>2&&o(n[0],n[1],n[2])&&(n=[n[0]]),r(t,e(n,1),[])});return Du=i}var ds=L.exports=(Su=z(),ku=qr(),Tu=os(),Uu=is(),qu=us(),zu=as(),Hu=function(){if(yu)return vu;yu=1;var t=Rn(),e=ss();return vu=function(r,n){return r&&t(r,e(n))}}(),Iu=bu?gu:(bu=1,gu=function(){}),$u=ls(),Wu=function(){if(Ru)return Lu;Ru=1;var t=z(),e=R();return Lu=function(r,n,o){var i=!0,u=!0;if("function"!=typeof r)throw new TypeError("Expected a function");return e(o)&&(i="leading"in o?!!o.leading:i,u="trailing"in o?!!o.trailing:u),t(r,n,{leading:i,maxWait:n,trailing:u})}}(),Gu=function(){if(Bu)return Nu;Bu=1;var t=Ki(),e=0;return Nu=function(r){var n=++e;return t(r)+n}}(),Yu=e,Vu={654:function(t,e,r){var n,o=this&&this.__assign||function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},o.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),u=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return u(e,t),e},a=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.updateRtl=e.doesFocusableExist=e.getCurrentFocusKey=e.updateAllLayouts=e.resume=e.pause=e.navigateByDirection=e.setFocus=e.setKeyMap=e.destroy=e.setThrottle=e.init=e.SpatialNavigation=e.ROOT_FOCUS_KEY=void 0;var f=c(r(150)),l=c(r(117)),d=c(r(747)),h=c(r(23)),p=c(r(842)),v=c(r(682)),y=c(r(784)),g=c(r(432)),b=c(r(67)),m=c(r(35)),F=c(r(119)),C=s(r(964)),_="left",j="right",w="up",x="down",K="enter",O=((n={}).left=[37,"ArrowLeft"],n.up=[38,"ArrowUp"],n.right=[39,"ArrowRight"],n.down=[40,"ArrowDown"],n.enter=[13,"Enter"],n);e.ROOT_FOCUS_KEY="SN:ROOT";var E=["#0FF","#FF0","#F0F"],M={leading:!0,trailing:!1},A=function(){function t(){this.focusableComponents={},this.focusKey=null,this.parentsHavingFocusedChild=[],this.domNodeFocusOptions={},this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.useGetBoundingClientRect=!1,this.shouldFocusDOMNode=!1,this.shouldUseNativeEvents=!1,this.writingDirection=F.default.LTR,this.pressedKeys={},this.paused=!1,this.keyDownEventListener=null,this.keyUpEventListener=null,this.keyMap=O,this.pause=this.pause.bind(this),this.resume=this.resume.bind(this),this.setFocus=this.setFocus.bind(this),this.updateAllLayouts=this.updateAllLayouts.bind(this),this.navigateByDirection=this.navigateByDirection.bind(this),this.init=this.init.bind(this),this.setThrottle=this.setThrottle.bind(this),this.destroy=this.destroy.bind(this),this.setKeyMap=this.setKeyMap.bind(this),this.getCurrentFocusKey=this.getCurrentFocusKey.bind(this),this.doesFocusableExist=this.doesFocusableExist.bind(this),this.updateRtl=this.updateRtl.bind(this),this.setFocusDebounced=(0,f.default)(this.setFocus,300,{leading:!1,trailing:!0}),this.debug=!1,this.visualDebugger=null,this.logIndex=0,this.distanceCalculationMethod="corners"}return t.getCutoffCoordinate=function(t,e,r,n,o){var i=t?n.top:o===F.default.LTR?n.left:n.right,u=t?n.bottom:o===F.default.LTR?n.right:n.left;return e?r?i:u:r?u:i},t.getRefCorners=function(t,e,r){var n={a:{x:0,y:0},b:{x:0,y:0}};switch(t){case w:var o=e?r.bottom:r.top;n.a={x:r.left,y:o},n.b={x:r.right,y:o};break;case x:o=e?r.top:r.bottom,n.a={x:r.left,y:o},n.b={x:r.right,y:o};break;case _:var i=e?r.right:r.left;n.a={x:i,y:r.top},n.b={x:i,y:r.bottom};break;case j:i=e?r.left:r.right,n.a={x:i,y:r.top},n.b={x:i,y:r.bottom}}return n},t.isAdjacentSlice=function(t,e,r){var n=t.a,o=t.b,i=e.a,u=e.b,s=r?"x":"y",a=n[s],c=o[s],f=i[s],l=u[s],d=.2*(c-a);return Math.max(0,Math.min(c,l)-Math.max(a,f))>=d},t.getPrimaryAxisDistance=function(t,e,r){var n=t.a,o=e.a,i=r?"y":"x";return Math.abs(o[i]-n[i])},t.getSecondaryAxisDistance=function(t,e,r,n,o){if(o)return o(t,e,r,n);var i=t.a,u=t.b,s=e.a,a=e.b,c=r?"x":"y",f=i[c],l=u[c],d=s[c],h=a[c];if("center"===n){var p=(f+l)/2,v=(d+h)/2;return Math.abs(p-v)}if("edges"===n){var y=Math.min(f,l),g=Math.min(d,h),b=Math.max(f,l),m=Math.max(d,h),F=Math.abs(y-g),C=Math.abs(b-m);return Math.min(F,C)}var _=[Math.abs(d-f),Math.abs(d-l),Math.abs(h-f),Math.abs(h-l)];return Math.min.apply(Math,_)},t.prototype.sortSiblingsByPriority=function(e,r,n,o){var i=this,u=n===x||n===w,s=t.getRefCorners(n,!1,r);return(0,g.default)(e,function(e){var r=t.getRefCorners(n,!0,e.layout),a=t.isAdjacentSlice(s,r,u),c=a?t.getPrimaryAxisDistance:t.getSecondaryAxisDistance,f=a?t.getSecondaryAxisDistance:t.getPrimaryAxisDistance,l=c(s,r,u,i.distanceCalculationMethod,i.customDistanceCalculationFunction),d=f(s,r,u,i.distanceCalculationMethod,i.customDistanceCalculationFunction),h=5*l+d,p=(h+1)/(a?5:1);return i.log("smartNavigate","distance (primary, secondary, total weighted) for ".concat(e.focusKey," relative to ").concat(o," is"),l,d,h),i.log("smartNavigate","priority for ".concat(e.focusKey," relative to ").concat(o," is"),p),i.visualDebugger&&(i.visualDebugger.drawPoint(r.a.x,r.a.y,"yellow",6),i.visualDebugger.drawPoint(r.b.x,r.b.y,"yellow",6)),p})},t.prototype.init=function(t){var e=this,r=void 0===t?{}:t,n=r.debug,o=void 0!==n&&n,i=r.visualDebug,u=void 0!==i&&i,s=r.nativeMode,a=void 0!==s&&s,c=r.throttle,f=void 0===c?0:c,l=r.throttleKeypresses,d=void 0!==l&&l,h=r.useGetBoundingClientRect,p=void 0!==h&&h,v=r.shouldFocusDOMNode,g=void 0!==v&&v,b=r.domNodeFocusOptions,C=void 0===b?{}:b,_=r.shouldUseNativeEvents,j=void 0!==_&&_,w=r.rtl,x=void 0!==w&&w,K=r.distanceCalculationMethod,O=void 0===K?"corners":K,E=r.customDistanceCalculationFunction,M=void 0===E?void 0:E;if(!this.enabled&&(this.domNodeFocusOptions=C,this.enabled=!0,this.nativeMode=a,this.throttleKeypresses=d,this.useGetBoundingClientRect=p,this.shouldFocusDOMNode=g&&!a,this.shouldUseNativeEvents=j,this.writingDirection=x?F.default.RTL:F.default.LTR,this.distanceCalculationMethod=O,this.customDistanceCalculationFunction=M,this.debug=o,!this.nativeMode&&(Number.isInteger(f)&&f>0&&(this.throttle=f),this.bindEventHandlers(),u))){this.visualDebugger=new m.default(this.writingDirection);var A=function(){requestAnimationFrame(function(){e.visualDebugger.clearLayouts(),(0,y.default)(e.focusableComponents,function(t,r){e.visualDebugger.drawLayout(t.layout,r,t.parentFocusKey)}),A()})};A()}},t.prototype.setThrottle=function(t){var e=void 0===t?{}:t,r=e.throttle,n=void 0===r?0:r,o=e.throttleKeypresses,i=void 0!==o&&o;this.throttleKeypresses=i,this.nativeMode||(this.unbindEventHandlers(),Number.isInteger(n)&&(this.throttle=n),this.bindEventHandlers())},t.prototype.destroy=function(){this.enabled&&(this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.focusKey=null,this.parentsHavingFocusedChild=[],this.focusableComponents={},this.paused=!1,this.keyMap=O,this.unbindEventHandlers())},t.prototype.getEventType=function(t){return(0,h.default)(this.getKeyMap(),function(e){return e.includes(t)})},t.getKeyCode=function(t){return t.keyCode||t.code||t.key},t.prototype.bindEventHandlers=function(){var e=this;"undefined"!=typeof window&&window.addEventListener&&(this.keyDownEventListener=function(r){if(!0!==e.paused){e.debug&&(e.logIndex+=1);var n=t.getKeyCode(r),o=e.getEventType(n);if(o){e.pressedKeys[o]=e.pressedKeys[o]?e.pressedKeys[o]+1:1,e.shouldUseNativeEvents||(r.preventDefault(),r.stopPropagation());var i={pressedKeys:e.pressedKeys};if(o===K&&e.focusKey)e.onEnterPress(i);else{var u=!1===e.onArrowPress(o,i);if(e.visualDebugger&&e.visualDebugger.clear(),u)e.log("keyDownEventListener","default navigation prevented");else{var s=(0,h.default)(e.getKeyMap(),function(t){return t.includes(n)});e.smartNavigate(s,null,{event:r})}}}}},this.throttle&&(this.keyDownEventListenerThrottled=(0,b.default)(this.keyDownEventListener.bind(this),this.throttle,M)),this.keyUpEventListener=function(r){var n=t.getKeyCode(r),o=e.getEventType(n);delete e.pressedKeys[o],e.throttle&&!e.throttleKeypresses&&e.keyDownEventListenerThrottled.cancel(),o===K&&e.focusKey&&e.onEnterRelease(),!e.focusKey||o!==_&&o!==j&&o!==w&&o!==x||e.onArrowRelease(o)},window.addEventListener("keyup",this.keyUpEventListener),window.addEventListener("keydown",this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener))},t.prototype.unbindEventHandlers=function(){if("undefined"!=typeof window&&window.removeEventListener){window.removeEventListener("keyup",this.keyUpEventListener),this.keyUpEventListener=null;var t=this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener;window.removeEventListener("keydown",t),this.keyDownEventListener=null}},t.prototype.onEnterPress=function(t){var e=this.focusableComponents[this.focusKey];e?e.focusable?e.onEnterPress&&e.onEnterPress(t):this.log("onEnterPress","componentNotFocusable"):this.log("onEnterPress","noComponent")},t.prototype.onEnterRelease=function(){var t=this.focusableComponents[this.focusKey];t?t.focusable?t.onEnterRelease&&t.onEnterRelease():this.log("onEnterRelease","componentNotFocusable"):this.log("onEnterRelease","noComponent")},t.prototype.onArrowPress=function(t,e){var r=this.focusableComponents[this.focusKey];if(r)return r&&r.onArrowPress&&r.onArrowPress(t,e);this.log("onArrowPress","noComponent")},t.prototype.onArrowRelease=function(t){var e=this.focusableComponents[this.focusKey];e?e.focusable?e.onArrowRelease&&e.onArrowRelease(t):this.log("onArrowRelease","componentNotFocusable"):this.log("onArrowRelease","noComponent")},t.prototype.navigateByDirection=function(t,e){if(!0!==this.paused&&this.enabled&&!this.nativeMode){var r=[x,w,_,j];r.includes(t)?(this.log("navigateByDirection","direction",t),this.smartNavigate(t,null,e)):this.log("navigateByDirection","Invalid direction. You passed: `".concat(t,"`, but you can use only these: "),r)}},t.prototype.smartNavigate=function(e,r,n){var o=this;if(!this.nativeMode){var i=e===x||e===w,u=e===x||(this.writingDirection===F.default.LTR?e===j:e===_);this.log("smartNavigate","direction",e),this.log("smartNavigate","fromParentFocusKey",r),this.log("smartNavigate","this.focusKey",this.focusKey),r||(0,y.default)(this.focusableComponents,function(t){t.layoutUpdated=!1});var s=this.focusableComponents[r||this.focusKey];if(r||s){if(this.log("smartNavigate","currentComponent",s?s.focusKey:void 0,s?s.node:void 0,s),s){this.updateLayout(s.focusKey);var a=s.parentFocusKey,c=s.focusKey,f=s.layout,l=t.getCutoffCoordinate(i,u,!1,f,this.writingDirection),h=(0,d.default)(this.focusableComponents,function(e){if(e.parentFocusKey===a&&e.focusable){o.updateLayout(e.focusKey);var r=t.getCutoffCoordinate(i,u,!0,e.layout,o.writingDirection);return i||o.writingDirection===F.default.LTR?u?r>=l:r<=l:u?r<=l:r>=l}return!1});if(this.debug&&(this.log("smartNavigate","currentCutoffCoordinate",l),this.log("smartNavigate","siblings","".concat(h.length," elements:"),h.map(function(t){return t.focusKey}).join(", "),h.map(function(t){return t.node}),h.map(function(t){return t}))),this.visualDebugger){var v=t.getRefCorners(e,!1,f);this.visualDebugger.drawPoint(v.a.x,v.a.y),this.visualDebugger.drawPoint(v.b.x,v.b.y)}var g=this.sortSiblingsByPriority(h,f,e,c),b=(0,p.default)(g);if(this.log("smartNavigate","nextComponent",b?b.focusKey:void 0,b?b.node:void 0,b),b)this.setFocus(b.focusKey,n);else{var m=this.focusableComponents[a],C=(null==m?void 0:m.isFocusBoundary)?m.focusBoundaryDirections||[e]:[];m&&C.includes(e)||this.smartNavigate(e,a,n)}}}else this.setFocus(this.getForcedFocusKey())}},t.prototype.saveLastFocusedChildKey=function(t,e){t&&(this.log("saveLastFocusedChildKey","".concat(t.focusKey," lastFocusedChildKey set"),e),t.lastFocusedChildKey=e)},t.prototype.log=function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];this.debug&&console.log.apply(console,a(["%c".concat(t,"%c").concat(e),"background: ".concat(E[this.logIndex%E.length],"; color: black; padding: 1px 5px;"),"background: #333; color: #BADA55; padding: 1px 5px;"],r,!1))},t.prototype.getCurrentFocusKey=function(){return this.focusKey},t.prototype.getForcedFocusKey=function(){var t,r=(0,d.default)(this.focusableComponents,function(t){return t.focusable&&t.forceFocus}),n=this.sortSiblingsByPriority(r,{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:null},"down",e.ROOT_FOCUS_KEY);return null===(t=(0,p.default)(n))||void 0===t?void 0:t.focusKey},t.prototype.getNextFocusKey=function(t){var e=this,r=this.focusableComponents[t];if(!r||this.nativeMode)return t;var n,o,i,u,s=(0,d.default)(this.focusableComponents,function(e){return e.parentFocusKey===t&&e.focusable});if(s.length>0){var a=r.lastFocusedChildKey,c=r.preferredChildFocusKey;if(this.log("getNextFocusKey","lastFocusedChildKey is",a),this.log("getNextFocusKey","preferredChildFocusKey is",c),a&&r.saveLastFocusedChild&&this.isParticipatingFocusableComponent(a))return this.log("getNextFocusKey","lastFocusedChildKey will be focused",a),this.getNextFocusKey(a);if(c&&this.isParticipatingFocusableComponent(c))return this.log("getNextFocusKey","preferredChildFocusKey will be focused",c),this.getNextFocusKey(c);s.forEach(function(t){return e.updateLayout(t.focusKey)});var f=(n=s,o=this.writingDirection,i=o===F.default.LTR?function(t){var e=t.layout;return Math.abs(e.left)+Math.abs(e.top)}:function(t){var e=t.layout;return Math.abs(window.innerWidth-e.right)+Math.abs(e.top)},u=(0,g.default)(n,i),(0,p.default)(u)).focusKey;return this.log("getNextFocusKey","childKey will be focused",f),this.getNextFocusKey(f)}return this.log("getNextFocusKey","targetFocusKey",t),t},t.prototype.addFocusable=function(t){var e=t.focusKey,r=t.node,n=t.parentFocusKey,o=t.onEnterPress,i=t.onEnterRelease,u=t.onArrowPress,s=t.onArrowRelease,a=t.onFocus,c=t.onBlur,f=t.saveLastFocusedChild,l=t.trackChildren,d=t.onUpdateFocus,h=t.onUpdateHasFocusedChild,p=t.preferredChildFocusKey,v=t.autoRestoreFocus,y=t.forceFocus,g=t.focusable,b=t.isFocusBoundary,m=t.focusBoundaryDirections;if(this.focusableComponents[e]={focusKey:e,node:r,parentFocusKey:n,onEnterPress:o,onEnterRelease:i,onArrowPress:u,onArrowRelease:s,onFocus:a,onBlur:c,onUpdateFocus:d,onUpdateHasFocusedChild:h,saveLastFocusedChild:f,trackChildren:l,preferredChildFocusKey:p,focusable:g,isFocusBoundary:b,focusBoundaryDirections:m,autoRestoreFocus:v,forceFocus:y,lastFocusedChildKey:null,layout:{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:r},layoutUpdated:!1},r||console.warn('Component added without a node reference. This will result in its coordinates being empty and may cause lost focus. Check the "ref" passed to "useFocusable": ',this.focusableComponents[e]),!this.nativeMode){this.updateLayout(e),this.log("addFocusable","Component added: ",this.focusableComponents[e]),e===this.focusKey&&this.setFocus(p||e);for(var F=this.focusableComponents[this.focusKey];F;){if(F.parentFocusKey===e){this.updateParentsHasFocusedChild(this.focusKey,{}),this.updateParentsLastFocusedChild(this.focusKey);break}F=this.focusableComponents[F.parentFocusKey]}}},t.prototype.removeFocusable=function(t){var e=t.focusKey,r=this.focusableComponents[e];if(r){var n=r.parentFocusKey;(0,r.onUpdateFocus)(!1),this.log("removeFocusable","Component removed: ",r),delete this.focusableComponents[e];var o=this.parentsHavingFocusedChild.includes(e);this.parentsHavingFocusedChild=this.parentsHavingFocusedChild.filter(function(t){return t!==e});var i=this.focusableComponents[n],u=e===this.focusKey;if(i&&i.lastFocusedChildKey===e&&(i.lastFocusedChildKey=null),this.nativeMode)return;(u||o)&&i&&i.autoRestoreFocus&&(this.log("removeFocusable","Component removed: ",u?"Leaf component":"Container component","Auto restoring focus to: ",n),this.setFocusDebounced(n))}},t.prototype.getNodeLayoutByFocusKey=function(t){var e=this.focusableComponents[t];return e?(this.updateLayout(e.focusKey),e.layout):null},t.prototype.setCurrentFocusedKey=function(t,e){var r,n,o,i;if(this.isFocusableComponent(this.focusKey)&&t!==this.focusKey){var u=this.focusableComponents[this.focusKey];u.onUpdateFocus(!1),u.onBlur(this.getNodeLayoutByFocusKey(this.focusKey),e),null===(n=null===(r=u.node)||void 0===r?void 0:r.removeAttribute)||void 0===n||n.call(r,"data-focused"),this.log("setCurrentFocusedKey","onBlur",u)}if(this.focusKey=t,this.isFocusableComponent(this.focusKey)){var s=this.focusableComponents[this.focusKey];this.shouldFocusDOMNode&&s.node&&s.node.focus(this.domNodeFocusOptions),null===(i=null===(o=s.node)||void 0===o?void 0:o.setAttribute)||void 0===i||i.call(o,"data-focused","true"),s.onUpdateFocus(!0),s.onFocus(this.getNodeLayoutByFocusKey(this.focusKey),e),this.log("setCurrentFocusedKey","onFocus",s)}},t.prototype.updateParentsHasFocusedChild=function(t,e){for(var r=this,n=[],o=this.focusableComponents[t];o;){var i=o.parentFocusKey,u=this.focusableComponents[i];if(u){var s=u.focusKey;n.push(s)}o=u}var a=(0,l.default)(this.parentsHavingFocusedChild,n),c=(0,l.default)(n,this.parentsHavingFocusedChild);(0,v.default)(a,function(t){var n=r.focusableComponents[t];n&&n.trackChildren&&n.onUpdateHasFocusedChild(!1),r.onIntermediateNodeBecameBlurred(t,e)}),(0,v.default)(c,function(t){var n=r.focusableComponents[t];n&&n.trackChildren&&n.onUpdateHasFocusedChild(!0),r.onIntermediateNodeBecameFocused(t,e)}),this.parentsHavingFocusedChild=n},t.prototype.updateParentsLastFocusedChild=function(t){for(var e=this.focusableComponents[t];e;){var r=e.parentFocusKey,n=this.focusableComponents[r];n&&this.saveLastFocusedChildKey(n,e.focusKey),e=n}},t.prototype.getKeyMap=function(){return this.keyMap},t.prototype.setKeyMap=function(t){var e,r;this.keyMap=o(o({},this.getKeyMap()),(e=t,r={},Object.entries(e).forEach(function(t){var e=t[0],n=t[1];r[e]=Array.isArray(n)?n:[n]}),r))},t.prototype.isFocusableComponent=function(t){return!!this.focusableComponents[t]},t.prototype.isParticipatingFocusableComponent=function(t){return this.isFocusableComponent(t)&&this.focusableComponents[t].focusable},t.prototype.onIntermediateNodeBecameFocused=function(t,e){this.isParticipatingFocusableComponent(t)&&this.focusableComponents[t].onFocus(this.getNodeLayoutByFocusKey(t),e)},t.prototype.onIntermediateNodeBecameBlurred=function(t,e){this.isParticipatingFocusableComponent(t)&&this.focusableComponents[t].onBlur(this.getNodeLayoutByFocusKey(t),e)},t.prototype.pause=function(){this.paused=!0},t.prototype.resume=function(){this.paused=!1},t.prototype.setFocus=function(t,r){if(void 0===r&&(r={}),this.setFocusDebounced.cancel(),this.enabled){this.log("setFocus","focusKey",t),t&&t!==e.ROOT_FOCUS_KEY||(t=this.getForcedFocusKey());var n=this.getNextFocusKey(t);this.log("setFocus","newFocusKey",n),this.setCurrentFocusedKey(n,r),this.updateParentsHasFocusedChild(n,r),this.updateParentsLastFocusedChild(n)}},t.prototype.updateAllLayouts=function(){var t=this;this.enabled&&!this.nativeMode&&(0,y.default)(this.focusableComponents,function(e,r){t.updateLayout(r)})},t.prototype.updateLayout=function(t){var e=this.focusableComponents[t];if(e&&!this.nativeMode&&!e.layoutUpdated){var r=e.node,n=this.useGetBoundingClientRect?(0,C.getBoundingClientRect)(r):(0,C.default)(r);e.layout=o(o({},n),{node:r})}},t.prototype.updateFocusable=function(t,e){var r=e.node,n=e.preferredChildFocusKey,o=e.focusable,i=e.isFocusBoundary,u=e.focusBoundaryDirections,s=e.onEnterPress,a=e.onEnterRelease,c=e.onArrowPress,f=e.onFocus,l=e.onBlur;if(!this.nativeMode){var d=this.focusableComponents[t];d&&(d.preferredChildFocusKey=n,d.focusable=o,d.isFocusBoundary=i,d.focusBoundaryDirections=u,d.onEnterPress=s,d.onEnterRelease=a,d.onArrowPress=c,d.onFocus=f,d.onBlur=l,r&&(d.node=r))}},t.prototype.isNativeMode=function(){return this.nativeMode},t.prototype.doesFocusableExist=function(t){return!!this.focusableComponents[t]},t.prototype.updateRtl=function(t){this.writingDirection=t?F.default.RTL:F.default.LTR},t}();e.SpatialNavigation=new A,e.init=e.SpatialNavigation.init,e.setThrottle=e.SpatialNavigation.setThrottle,e.destroy=e.SpatialNavigation.destroy,e.setKeyMap=e.SpatialNavigation.setKeyMap,e.setFocus=e.SpatialNavigation.setFocus,e.navigateByDirection=e.SpatialNavigation.navigateByDirection,e.pause=e.SpatialNavigation.pause,e.resume=e.SpatialNavigation.resume,e.updateAllLayouts=e.SpatialNavigation.updateAllLayouts,e.getCurrentFocusKey=e.SpatialNavigation.getCurrentFocusKey,e.doesFocusableExist=e.SpatialNavigation.doesFocusableExist,e.updateRtl=e.SpatialNavigation.updateRtl},35:function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(r(119)),i="undefined"!=typeof window&&window.document,u=i?window.innerWidth:0,s=i?window.innerHeight:0,a=function(){function t(e){i&&(this.debugCtx=t.createCanvas("sn-debug","1010",e),this.layoutsCtx=t.createCanvas("sn-layouts","1000",e),this.writingDirection=e)}return t.createCanvas=function(t,e,r){var n=document.querySelector("#".concat(t))||document.createElement("canvas");n.setAttribute("id",t),n.setAttribute("dir",r===o.default.LTR?"ltr":"rtl");var i=n.getContext("2d");return n.style.zIndex=e,n.style.position="fixed",n.style.top="0",n.style.left="0",document.body.appendChild(n),n.width=u,n.height=s,i},t.prototype.clear=function(){i&&this.debugCtx.clearRect(0,0,u,s)},t.prototype.clearLayouts=function(){i&&this.layoutsCtx.clearRect(0,0,u,s)},t.prototype.drawLayout=function(t,e,r){if(i){this.layoutsCtx.strokeStyle="green",this.layoutsCtx.strokeRect(t.left,t.top,t.width,t.height),this.layoutsCtx.font="8px monospace",this.layoutsCtx.fillStyle="red";var n=this.writingDirection===o.default.LTR?"left":"right",u=t[n];this.layoutsCtx.fillText(e,u,t.top+10),this.layoutsCtx.fillText(r,u,t.top+25),this.layoutsCtx.fillText("".concat(n,": ").concat(u),u,t.top+40),this.layoutsCtx.fillText("top: ".concat(t.top),u,t.top+55)}},t.prototype.drawPoint=function(t,e,r,n){void 0===r&&(r="blue"),void 0===n&&(n=10),i&&(this.debugCtx.strokeStyle=r,this.debugCtx.lineWidth=3,this.debugCtx.strokeRect(t-n/2,e-n/2,n,n))},t}();e.default=a},119:function(t,e){var r,n;Object.defineProperty(e,"__esModule",{value:!0}),(n=r||(r={}))[n.LTR=0]="LTR",n[n.RTL=1]="RTL",e.default=r},607:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),o(r(79),e),o(r(445),e),o(r(654),e)},964:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.getBoundingClientRect=void 0;var r=function(t){for(var e=t.offsetParent,r=t.offsetHeight,n=t.offsetWidth,o=t.offsetLeft,i=t.offsetTop;e&&1===e.nodeType;)o+=e.offsetLeft-e.scrollLeft,i+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{height:r,left:o,top:i,width:n}};e.default=function(t){var e=t&&t.parentElement;if(t&&e){var n=r(e),o=r(t),i=o.height,u=o.left,s=o.top,a=o.width;return{x:u-n.left,y:s-n.top,width:a,height:i,left:u,top:s,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}},e.getBoundingClientRect=function(t){if(t&&t.getBoundingClientRect){var e=t.getBoundingClientRect();return{x:e.x,y:e.y,width:e.width,height:e.height,left:e.left,top:e.top,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}}},445:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.useFocusContext=e.FocusContext=void 0;var n=r(156),o=r(654);e.FocusContext=(0,n.createContext)(o.ROOT_FOCUS_KEY),e.FocusContext.displayName="FocusContext",e.useFocusContext=function(){return(0,n.useContext)(e.FocusContext)}},79:function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.useFocusable=void 0;var o=r(156),i=n(r(604)),u=n(r(461)),s=r(654),a=r(445);e.useFocusable=function(t){var e=void 0===t?{}:t,r=e.focusable,n=void 0===r||r,c=e.saveLastFocusedChild,f=void 0===c||c,l=e.trackChildren,d=void 0!==l&&l,h=e.autoRestoreFocus,p=void 0===h||h,v=e.forceFocus,y=void 0!==v&&v,g=e.isFocusBoundary,b=void 0!==g&&g,m=e.focusBoundaryDirections,F=e.focusKey,C=e.preferredChildFocusKey,_=e.onEnterPress,j=void 0===_?i.default:_,w=e.onEnterRelease,x=void 0===w?i.default:w,K=e.onArrowPress,O=void 0===K?function(){return!0}:K,E=e.onArrowRelease,M=void 0===E?i.default:E,A=e.onFocus,D=void 0===A?i.default:A,P=e.onBlur,L=void 0===P?i.default:P,R=e.extraProps,N=(0,o.useCallback)(function(t){j(R,t)},[j,R]),B=(0,o.useCallback)(function(){x(R)},[x,R]),S=(0,o.useCallback)(function(t,e){return O(t,R,e)},[R,O]),k=(0,o.useCallback)(function(t){M(t,R)},[M,R]),T=(0,o.useCallback)(function(t,e){D(t,R,e)},[R,D]),U=(0,o.useCallback)(function(t,e){L(t,R,e)},[R,L]),q=(0,o.useRef)(null),z=(0,o.useState)(!1),H=z[0],I=z[1],$=(0,o.useState)(!1),W=$[0],G=$[1],Y=(0,a.useFocusContext)(),V=(0,o.useMemo)(function(){return F||(0,u.default)("sn:focusable-item-")},[F]),J=(0,o.useCallback)(function(t){void 0===t&&(t={}),s.SpatialNavigation.setFocus(V,t)},[V]);return(0,o.useEffect)(function(){var t=q.current;return s.SpatialNavigation.addFocusable({focusKey:V,node:t,parentFocusKey:Y,preferredChildFocusKey:C,onEnterPress:N,onEnterRelease:B,onArrowPress:S,onArrowRelease:k,onFocus:T,onBlur:U,onUpdateFocus:function(t){return void 0===t&&(t=!1),I(t)},onUpdateHasFocusedChild:function(t){return void 0===t&&(t=!1),G(t)},saveLastFocusedChild:f,trackChildren:d,isFocusBoundary:b,focusBoundaryDirections:m,autoRestoreFocus:p,forceFocus:y,focusable:n}),function(){s.SpatialNavigation.removeFocusable({focusKey:V})}},[]),(0,o.useEffect)(function(){var t=q.current;s.SpatialNavigation.updateFocusable(V,{node:t,preferredChildFocusKey:C,focusable:n,isFocusBoundary:b,focusBoundaryDirections:m,onEnterPress:N,onEnterRelease:B,onArrowPress:S,onArrowRelease:k,onFocus:T,onBlur:U})},[V,C,n,b,m,N,B,S,k,T,U]),{ref:q,focusSelf:J,focused:H,hasFocusedChild:W,focusKey:V}}},150:function(t){t.exports=Su},117:function(t){t.exports=ku},747:function(t){t.exports=Tu},23:function(t){t.exports=Uu},842:function(t){t.exports=qu},682:function(t){t.exports=zu},784:function(t){t.exports=Hu},604:function(t){t.exports=Iu},432:function(t){t.exports=$u},67:function(t){t.exports=Wu},461:function(t){t.exports=Gu},156:function(t){t.exports=Yu}},Ju={},function t(e){var r=Ju[e];if(void 0!==r)return r.exports;var n=Ju[e]={exports:{}};return Vu[e].call(n.exports,n,n.exports,t),n.exports}(607));exports.commonjsGlobal=r,exports.distExports=ds,exports.getAugmentedNamespace=function(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})}),r},exports.getDefaultExportFromCjs=function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t};
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("react"),s=require("./sl-types.js"),te=require("./index6.js"),$=require("./index4.js"),n=require("./useStreamLayerApp2.js"),xe=require("./index9.js"),Ie=require("./index3.js"),Le=s.styled_default("div")({name:"SDKContainer",class:"sopqfe6",propsAsIs:!1}),je=s.styled_default("div")({name:"SDKScrollContainer",class:"s102vcph",propsAsIs:!1}),ie=s.styled_default("div")({name:"SDKContentContainer",class:"s1meqjjv",propsAsIs:!1}),Be=()=>ie,oe=s.styled_default(Be())({name:"SDKWhiteContainer",class:"s1burm22",propsAsIs:!0}),Fe=()=>oe,We=s.styled_default(Fe())({name:"SDKSummaryContainer",class:"sm5r3j5",propsAsIs:!0}),Me=s.styled_default("div")({name:"TabsContainer",class:"tysxwr6",propsAsIs:!1}),Ye=()=>ie,ze=s.styled_default(Ye())({name:"LeaderboardContainer",class:"l9er3b1",propsAsIs:!0}),Ue=()=>oe,Ke=s.styled_default(Ue())({name:"TabsNavContainer",class:"t19dtrb3",propsAsIs:!0}),He=s.styled_default("div")({name:"UserSummaryContainer",class:"u1552n3j",propsAsIs:!1});var Ge=Object.defineProperty,Je=(t,i,o)=>i in t?Ge(t,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[i]=o,Xe=(t,i,o)=>Je(t,i+"",o);let Ze=class{constructor(){Xe(this,"observers",new Set)}subscribe(i){this.observers.add(i)}unsubscribe(i){this.observers.delete(i)}notify(i){this.observers.forEach(o=>o(i))}};const z=new Ze,es={hiding:!1,finished:!1},ve=()=>{const[t,i]=a.useState(es),o=a.useRef(null);a.useEffect(()=>{const u=m=>{i(m)};return z.subscribe(u),()=>{z.unsubscribe(u)}},[]);const c=a.useCallback(u=>{const m={hiding:!0,finished:!1};o.current&&clearTimeout(o.current),u!=null&&u.delay?o.current=setTimeout(()=>{z.notify(m)},u==null?void 0:u.delay):z.notify(m)},[]),r=a.useCallback(()=>{t.hiding&&(o.current=null,z.notify({hiding:!1,finished:!0}))},[t.hiding]);return{...t,runAnimation:c,onAnimationEnd:r}},ss=s.styled_default("div")({name:"Container",class:"c1pgyo67",propsAsIs:!1}),ts="sx17qu6",ns="h1692c5m",re=({children:t,style:i,className:o,enabled:c=!0,hiding:r,onAnimationEnd:u})=>e.jsx(ss,{style:i,className:s.cx_default(o,c&&ts,c&&r&&ns),onAnimationEnd:u,children:t}),is=()=>re,os=s.styled_default(is())({name:"GrowingContainer",class:"gck55ev",propsAsIs:!0}),Te=({children:t,style:i,enabled:o,animate:c,...r})=>{const u=a.useRef(null);return e.jsx(os,{...r,enabled:o&&c,style:{...i,...(()=>{const m=u==null?void 0:u.current,j=m&&window.getComputedStyle(m),b=j==null?void 0:j.getPropertyValue("height");return o?{height:c?b:0}:{}})()},children:e.jsx("div",{ref:u,children:t})})},rs=s.styled_default("div")({name:"Container",class:"c1gcvmcj",propsAsIs:!1}),as=s.styled_default("div")({name:"Title",class:"tnr592a",propsAsIs:!1}),ds=s.styled_default("div")({name:"Description",class:"d1e8jqpv",propsAsIs:!1}),ls=()=>$.B1,cs=s.styled_default(ls())({name:"Icon",class:"i1vs651k",propsAsIs:!0}),us=({icon:t,title:i,description:o})=>e.jsxs(rs,{children:[e.jsx(cs,{name:t}),e.jsx(as,{children:i}),e.jsx(ds,{children:o})]}),ps=()=>Te,ys=s.styled_default(ps())({name:"ShowInContainer",class:"s16sbdnm",propsAsIs:!0}),L=s.styled_default("div")({name:"FeedbackContainer",class:"fbhorgl",propsAsIs:!1}),pe="s1g20ja7",ms=s.styled_default("div")({name:"Container",class:"c455ozj",propsAsIs:!1}),hs=()=>$.B1,ye=s.styled_default(hs())({name:"IconPrediction",class:"i1913njx",propsAsIs:!0}),U=s.styled_default("div")({name:"FeedbackIconWrap",class:"fzfk69z",propsAsIs:!1}),G=s.styled_default("div")({name:"FeedbackHeader",class:"fx87qaj",propsAsIs:!1}),fs=s.styled_default("span")({name:"FeedbackTitle",class:"fvek9ew",propsAsIs:!1}),B=s.styled_default("span")({name:"FeedbackDescription",class:"f1kbtp09",propsAsIs:!1}),xs=s.styled_default("div")({name:"FeedbackTitleWrap",class:"f4i8rro",propsAsIs:!1}),Is=s.styled_default("div")({name:"FeedbackResultDescriptionWrap",class:"fqyssr",propsAsIs:!1}),js=()=>B,vs=s.styled_default(js())({name:"FeedbackDynamicDescription",class:"fyv794i",propsAsIs:!0}),Ts=()=>B,As=s.styled_default(Ts())({name:"FeedbackResultDescription",class:"f1jkj9vx",propsAsIs:!0}),ne=s.styled_default("div")({name:"FeedbackText",class:"f1pxh3a6",propsAsIs:!1}),Cs=s.styled_default("span")({name:"DynamicWrap",class:"d1afvufn",propsAsIs:!1}),$s=s.styled_default("div")({name:"EarlyFeedbackDescription",class:"eq8u24d",propsAsIs:!1}),me=({feedbackMessages:t,questionVotedCorrectly:i,questionVoted:o,questionType:c,hasCorrectAnswer:r,showExpiredNotification:u,showClosedNotificationTrivia:m,votedInCurrentRender:j,votedAfterQuestionClosed:b,voteErrorMessage:h,enteredAnActiveQuestion:d,marketClosed:g,percentsAnimated:C,votedAnswer:I,isEarlyPrediction:y,correctAnswer:_,onAnimationEnd:P})=>{const E=o&&(c===n.QuestionType.TRIVIA||c===n.QuestionType.PREDICTION),T=c===n.QuestionType.PREDICTION&&!r,q=g&&c===n.QuestionType.PREDICTION&&!o||c===n.QuestionType.PREDICTION&&b&&j&&d,Q=E&&T,S=E&&r,w=c===n.QuestionType.PREDICTION&&o&&j&&r,R=o&&c===n.QuestionType.POLL&&j,f=i?"correct":"incorrect",k=i?t==null?void 0:t.correctFeedback:t==null?void 0:t.incorrectFeedback;return u||m||Q||S||q||R||w||h?e.jsx(ys,{enabled:j,animate:!h&&u?!0:C,onAnimationEnd:P,children:e.jsxs(ms,{"data-prediction":T,children:[h&&!q&&e.jsxs(L,{children:[!y&&e.jsx(ye,{name:"questionExpired"}),e.jsx(B,{children:h})]}),!h&&u&&e.jsxs(L,{children:[!y&&e.jsx(U,{children:e.jsx($.B1,{name:"questionExpired"})}),e.jsxs("div",{children:[e.jsx(G,{children:e.jsx(B,{children:"Question Expired"})}),e.jsx(ne,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),!h&&m&&e.jsxs(L,{className:s.cx_default(pe),children:[e.jsx(U,{children:e.jsx($.B1,{name:"questionExpired"})}),e.jsxs("div",{children:[e.jsx(G,{children:e.jsx(B,{children:"Question Closed"})}),e.jsx(ne,{children:"This question was answered after the moderator closed the question. So the points for this answer won’t tally."})]})]}),q&&e.jsxs(L,{children:[!y&&e.jsx(U,{children:e.jsx($.B1,{name:"questionExpired"})}),e.jsxs("div",{children:[e.jsx(G,{children:e.jsx(B,{children:y?r?"The results are already in!":"Question is Closed":"Question Closed"})}),e.jsx(ne,{children:y?e.jsx($s,{children:r?`Correct: ${_==null?void 0:_.text}`:"Event affecting the outcome has occurred."}):"This event has already taken place, so the ability to make a prediction on its outcome is no longer available."})]})]}),!h&&Q&&e.jsxs(L,{children:[!y&&e.jsx(ye,{name:"icon-prediction"}),e.jsxs(vs,{children:["Your pick has been recorded. ",e.jsx(Cs,{children:"We’ll notify you of the result."})]})]}),!h&&R&&e.jsxs(L,{children:[!y&&e.jsx(U,{"data-feedback-type":"correct",children:e.jsx($.B1,{name:"correct"})}),e.jsx(B,{children:"Thanks for answering. Please stay tuned for the next question."})]}),!h&&(S||w)&&e.jsxs(L,{className:s.cx_default(m&&pe),children:[!y&&e.jsx(U,{"data-feedback-type":f,children:e.jsx($.B1,{name:f})}),e.jsx("div",{children:e.jsxs(G,{children:[y?e.jsx(xs,{children:f==="incorrect"?e.jsxs(e.Fragment,{children:[e.jsx("div",{children:"So close!"}),e.jsx("div",{children:"Better luck next time"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{children:"That’s correct!"}),e.jsx("div",{children:"You chose wisely."})]})}):e.jsx(fs,{"data-feedback-type":f,children:k==null?void 0:k.title}),y?e.jsxs(Is,{children:[e.jsxs("div",{children:["Your pick: ",I==null?void 0:I.text]}),e.jsx("div",{children:f==="incorrect"?`Correct: ${_==null?void 0:_.text}`:""})]}):e.jsx(As,{children:k==null?void 0:k.description})]})})]})]})}):null},Es=s.styled_default("div")({name:"Container",class:"c1hygj0s",propsAsIs:!1}),bs=s.styled_default("div")({name:"Title",class:"t1r84tez",propsAsIs:!1}),gs=s.styled_default("div")({name:"Description",class:"d1aj1a7k",propsAsIs:!1}),ws=s.styled_default("div")({name:"AdditionalDescription",class:"ax09ezs",propsAsIs:!1}),_s=()=>$.B1,Ps=s.styled_default(_s())({name:"Icon",class:"inkrac",propsAsIs:!0}),Qs=({icon:t,title:i,description:o,additionalDescription:c})=>e.jsxs(Es,{children:[t&&e.jsx(Ps,{name:t}),e.jsx(bs,{children:i}),e.jsx(gs,{children:o}),c&&e.jsx(ws,{children:c})]}),Ae=s.styled_default("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),Rs=()=>je,qs=s.styled_default(Rs())({name:"QuestionScrollContainer",class:"q1tlqx57",propsAsIs:!0}),Ss=s.styled_default("div")({name:"TopShadow",class:"t1hq58md",propsAsIs:!1}),ks=s.styled_default("div")({name:"BottomShadow",class:"b1c8nxcx",propsAsIs:!1}),Ds=s.styled_default("div")({name:"SponsorLogo",class:"siozuc3",propsAsIs:!1}),Ce=s.styled_default("div")({name:"Content",class:"cpnc44r",propsAsIs:!1}),Os=s.styled_default("div")({name:"Title",class:"tq7p3w0",propsAsIs:!1}),Ns=s.styled_default("div")({name:"OptionsWrap",class:"o1jlfj9g",propsAsIs:!1}),$e=s.styled_default("div")({name:"Options",class:"o84pmnd",propsAsIs:!1}),Vs=()=>re,he=s.styled_default(Vs())({name:"AlertContainer",class:"a1dybjw9",propsAsIs:!0}),Ls=s.styled_default("div")({name:"EarlyPrediction",class:"e1l05ict",propsAsIs:!1}),Bs=()=>$.B1,Fs=s.styled_default(Bs())({name:"EarlyPredictionIcon",class:"ez9juex",propsAsIs:!0}),Ws=()=>$.B1,Ms=s.styled_default(Ws())({name:"SponsorIcon",class:"s8p4aob",propsAsIs:!0}),Ys=s.styled_default("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),zs=s.styled_default("div")({name:"ButtonPctWrap",class:"b4iik8i",propsAsIs:!1}),Us=s.styled_default("div")({name:"ButtonPct",class:"b1gq1lnf",propsAsIs:!1}),Ks=s.styled_default("span")({name:"ButtonBody",class:"b1j65z51",propsAsIs:!1}),Hs=s.styled_default("div")({name:"IconContainer",class:"i19tpfua",propsAsIs:!1}),Gs=s.styled_default("div")({name:"IconWrap",class:"i1tubmma",propsAsIs:!1}),Ee=s.styled_default("img")({name:"Icon",class:"i1grrgwj",propsAsIs:!1}),Js=()=>Ee,Xs=s.styled_default(Js())({name:"IconDefault",class:"ibemyq8",propsAsIs:!0}),Zs=()=>Ee,et=s.styled_default(Zs())({name:"IconCircle",class:"i1dceht",propsAsIs:!0}),st=s.styled_default("span")({name:"Title",class:"t116q4vq",propsAsIs:!1}),tt=s.styled_default("span")({name:"Indicators",class:"i17ajcu2",propsAsIs:!1}),nt=s.styled_default("div")({name:"PtsWrap",class:"pu9kmlb",propsAsIs:!1}),it=s.styled_default("span")({name:"Pts",class:"p1j2j0s0",propsAsIs:!1}),ot=s.styled_default("span")({name:"Percentage",class:"p1mzj1sj",propsAsIs:!1}),rt=()=>$.B1,at=s.styled_default(rt())({name:"CheckIcon",class:"cichgz8",propsAsIs:!0}),fe={[n.QuestionImages.CENTERED]:t=>e.jsx(Xs,{"data-testid":"vote-icon",alt:"option-icon",src:t}),[n.QuestionImages.TRANSPARENT]:t=>e.jsx(Hs,{"data-testid":"vote-icon",children:e.jsx(Gs,{style:{backgroundImage:`url(${t})`}})}),[n.QuestionImages.ROUNDED]:t=>e.jsx(et,{"data-testid":"vote-icon",alt:"option-icon",src:t}),[n.QuestionImages.NONE]:()=>null,[n.QuestionImages.UNSET]:()=>null},dt=({questionType:t,hasCorrectAnswer:i,correct:o,youVoted:c,questionVoted:r})=>{if(t===n.QuestionType.POLL&&c)return"voted";if(t===n.QuestionType.PREDICTION){if(!i&&r)return c?"voted":"unset";if(i&&r)return c?o?"correct":"incorrect":"unset";if(c)return"correct"}return t===n.QuestionType.TRIVIA&&r&&c?o?"correct":"incorrect":"unset"},lt=({questionType:t,questionVoted:i,correct:o,hasCorrectAnswer:c,questionStatus:r})=>t===n.QuestionType.TRIVIA?i&&o:t===n.QuestionType.PREDICTION?i&&o&&c||r===n.QuestionStatus.RESOLVED&&o:!1,ct=xe.O(Ys),ut=t=>{var i;const{id:o,icon:c,text:r,percentageDecimal:u,points:m,onVote:j,markThatVoted:b,firstOption:h,onPercentsAnimated:d,youSelected:g,youVoted:C,questionVoted:I,imageMode:y,answerTimeExpired:_,questionStatus:P,isLoading:E,questionType:T,correct:q,hasCorrectAnswer:Q,marketClosed:S,isEarlyPrediction:w,isAd:R,webos:f}=t,[k,F]=a.useState(0),Y=dt(t),K=lt({questionType:T,questionVoted:I,correct:q,hasCorrectAnswer:Q,questionStatus:P}),D=S&&T===n.QuestionType.PREDICTION,O=I||D,J=T===n.QuestionType.PREDICTION&&!I&&!S&&!R,N=I&&!g&&Y!=="incorrect"&&!C;return a.useLayoutEffect(()=>{F(0),requestAnimationFrame(()=>{F(u)})},[u]),e.jsxs(ct,{value:o,webos:f,autoFocus:h,"data-selected":g,"data-answer-state":Y,disabled:I||E||_||D,"data-is-not-checked":N,"data-a":"intr",onClick:H=>{b(T===n.QuestionType.PREDICTION?S:P===n.QuestionStatus.RESOLVED),j(H)},"data-is-ad":R,children:[e.jsx(zs,{children:e.jsx(Us,{"data-answer-state":Y,"data-is-not-checked":N,style:{width:`${O?k:0}%`},onTransitionEnd:()=>{D||d==null||d()},"data-is-ad":R})}),e.jsxs(Ks,{"data-a":"intr",children:[c&&y&&((i=fe[y])==null?void 0:i.call(fe,c)),e.jsx(st,{"data-a":"intr",children:r}),J&&e.jsxs(nt,{children:[m,e.jsx(it,{children:"pts"})]}),O&&e.jsxs(tt,{children:[K&&e.jsx(at,{name:w?"selectedBetPack":"selected"}),e.jsx(ot,{children:e.jsx(Ie.d,{value:u,suffix:"%"})})]})]})]})},pt=()=>Te,yt=s.styled_default(pt())({name:"ShowInContainer",class:"sie6cqo",propsAsIs:!0}),mt=s.styled_default("div")({name:"WinBarContainer",class:"wgizw4u",propsAsIs:!1}),ht=s.styled_default("div")({name:"Content",class:"c1l3ucjp",propsAsIs:!1}),ft=s.styled_default("div")({name:"Title",class:"tx7j799",propsAsIs:!1}),xt=()=>$.B1,It=s.styled_default(xt())({name:"WinIcon",class:"w4lwuj0",propsAsIs:!0}),jt=s.styled_default("div")({name:"Points",class:"po9i64o",propsAsIs:!1}),vt=s.styled_default("span")({name:"PointsCount",class:"pe5g05h",propsAsIs:!1}),Tt=s.styled_default("span")({name:"PointsUnits",class:"p1hdtpmb",propsAsIs:!1}),At=({title:t,points:i,isPlayingTimer:o,isTimer:c,animatePoints:r,questionType:u,timerDuration:m,votedInCurrentRender:j,percentsAnimated:b,onTimerExpired:h})=>e.jsx(yt,{enabled:u===n.QuestionType.PREDICTION&&j,animate:b,children:e.jsxs(mt,{style:{justifyContent:u===n.QuestionType.PREDICTION?"center":"space-between"},children:[e.jsxs(ht,{children:[t&&e.jsx(ft,{children:t}),i!==void 0&&u!==n.QuestionType.POLL&&e.jsxs(e.Fragment,{children:[e.jsx(It,{name:"icon-trophy"}),e.jsxs(jt,{children:[e.jsx(vt,{children:r?e.jsx(Ie.d,{value:i,delay:.3}):i}),e.jsx(Tt,{children:"PTS"})]})]})]}),c&&u!==n.QuestionType.PREDICTION&&e.jsx(xe.L,{isPlaying:o,onTimerExpired:h,duration:m})]})}),Ct=(t,i)=>{switch(t){case"already_voted":return i===n.QuestionType.POLL?"You’ve already answered this question on another device.":"You’ve already answered this question on another device. So the points for this answer won't tally.";default:return"Something went wrong, please try again"}},$t=()=>e.jsx(Ae,{children:e.jsxs(Ce,{children:[e.jsx(te.i,{loading:!0,style:{height:"40px",borderRadius:"100px"}}),e.jsx(te.i,{loading:!0,style:{height:"24px",margin:"16px 0"}}),e.jsx($e,{children:Array.from({length:5}).map((t,i)=>e.jsx(te.i,{loading:!0,style:{height:"44px"}},i))})]})}),Et=({openedQuestion:t,isLoading:i,vote:o,close:c,isEarlyPrediction:r,mastersApp:u,webos:m})=>{var j,b;const h=t.subject,d=t.type,g=t.status,C=(j=t.options)==null?void 0:j.options,I=t.marketClosed,y=t.id,_=a.useRef(),P=a.useRef(),E=u?!1:(t==null?void 0:t.adUnit)===n.AdUnit.STANDART,[T,q]=a.useState(!1),[Q,S]=a.useState(!1),[w,R]=a.useState(!0),[f,k]=a.useState(!1),[F,Y]=a.useState(!1),[K,D]=a.useState(""),[O,J]=a.useState(""),[N,H]=a.useState(!1),[be,ge]=a.useState(!1),[ae,we]=a.useState(!1),{runAnimation:W,finished:de}=ve();a.useEffect(()=>{de&&c(y)},[c,de]),a.useEffect(()=>{d===n.QuestionType.PREDICTION?I&&R(!1):g===n.QuestionStatus.RESOLVED&&R(!1)},[]);const _e=a.useCallback(p=>{S(p),q(!0)},[]),Pe=a.useCallback(()=>{r&&q(!1)},[r]),X=a.useRef(!1),le=a.useCallback(()=>{P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{we(!0),W({delay:5500})},4e3)},[W]),ce=a.useCallback(async p=>{if(!X.current&&(X.current=!0,y)){const A=p.currentTarget.value;D(A);try{await o(y,A),E&&le()}catch(M){J(Ct(M.message,d)),D(""),console.error("Error while voting",M),X.current=!1}}},[d,y,D,o,E,le]),Qe=a.useCallback(()=>{k(!0),W({delay:3500})},[W]),Re=a.useCallback(()=>{Y(!0),W({delay:3500})},[W]),l=t==null?void 0:t.answers.find(p=>p.youVoted===!0),v=a.useMemo(()=>!!(t!=null&&t.answers.find(p=>p.correct===!0)),[t]),x=a.useMemo(()=>t==null?void 0:t.answers.find(p=>p.correct===!0),[t]);a.useEffect(()=>{l&&T&&!be&&(_.current=setTimeout(Re,1e4),ge(!0))},[l]),a.useEffect(()=>()=>{clearTimeout(_.current),clearTimeout(P.current)},[]);const Z=a.useMemo(()=>t?t.answers.map(p=>{var A;return{...p,questionVoted:!!l,youSelected:K===p.id,isLoading:i,hasCorrectAnswer:v,questionType:t.type,answerTimeExpired:f,questionStatus:g,imageMode:(A=t.appearance)==null?void 0:A.images,onVote:ce}}):[],[v,f,i,t,l,g,ce,K]);a.useEffect(()=>{const p=Z.some(({percentageDecimal:M})=>M!==0),A=l&&d===n.QuestionType.PREDICTION;O&&(r||!p||I&&A)&&H(!0)},[Z,O,r,I,d,l]);const ue=C&&(C.case==="trivia"||C.case==="prediction")?C.value:void 0,V=g===n.QuestionStatus.RESOLVED&&d===n.QuestionType.TRIVIA&&!l&&!w,ee=d===n.QuestionType.TRIVIA&&Q,se=a.useMemo(()=>E?!1:d===n.QuestionType.PREDICTION?r?!1:!!(l&&!v||l&&v&&x!=null&&x.youVoted):!0,[d,l,v,x,r,E]),qe=a.useMemo(()=>{if(d===n.QuestionType.PREDICTION&&l&&(!v||v&&x!=null&&x.youVoted))return l.points;if(!(V||f))return l?l.correct?l.pointsEarned:0:x==null?void 0:x.points},[f,l,x,V,d,v]),Se=a.useMemo(()=>d===n.QuestionType.PREDICTION&&l?v?v&&x!=null&&x.youVoted?"You won":"":"To win":V||f?"Time expired":d===n.QuestionType.POLL?"Time remaining":l?"You won":"To win",[f,d,l,V,v,x]),ke=!se||se&&d===n.QuestionType.PREDICTION&&T&&!N,De=(d===n.QuestionType.TRIVIA||d===n.QuestionType.PREDICTION)&&l&&v&&(x==null?void 0:x.youVoted),Oe=l||V||ee||d===n.QuestionType.TRIVIA&&g===n.QuestionStatus.RESOLVED&&w,Ne=!r&&(f||F)||ae,Ve=()=>{const p=()=>d===n.QuestionType.TRIVIA?l!=null&&l.correct?`That's correct!
|
|
2
|
-
You chose wisely.`:`So close!
|
|
3
|
-
Better luck next time.`:d===n.QuestionType.POLL?`Thanks for answering.
|
|
4
|
-
Please stay tuned for the next question.`:d===n.QuestionType.PREDICTION?"Stay tuned to see if your prediction was correct.":"",A=()=>d===n.QuestionType.TRIVIA?`Your Pick: ${x==null?void 0:x.text}`:d===n.QuestionType.POLL||d===n.QuestionType.PREDICTION?`Your Pick: ${l==null?void 0:l.text}`:"",M=()=>d===n.QuestionType.TRIVIA&&(C==null?void 0:C.case)==="trivia"?C==null?void 0:C.value.explanation:d===n.QuestionType.PREDICTION?h:"";return ae?e.jsx(he,{children:e.jsx(Qs,{title:p(),description:A(),...l!=null&&l.correct||d===n.QuestionType.POLL||d===n.QuestionType.PREDICTION?{icon:"icon-correct"}:{},...d===n.QuestionType.TRIVIA||d===n.QuestionType.PREDICTION?{additionalDescription:M()}:{}})}):!r&&(f||F)?e.jsx(he,{children:e.jsx(us,{icon:"icon-check-circle",title:"More to come...",description:F?e.jsxs(e.Fragment,{children:["Stay tuned for more questions ",e.jsx("br",{})," and insights."]}):e.jsxs(e.Fragment,{children:["Watch for additional enhanced stream ",e.jsx("br",{})," interactive experience."]})})}):null};return e.jsxs(qs,{children:[r&&e.jsx(Ss,{}),e.jsx(Ae,{style:r?{marginTop:"-40px"}:{},children:e.jsxs(Ce,{children:[!r&&!E&&e.jsx(me,{feedbackMessages:ue,questionVoted:!!l,questionVotedCorrectly:l==null?void 0:l.correct,questionType:d,hasCorrectAnswer:v,showExpiredNotification:V,showClosedNotificationTrivia:ee,votedInCurrentRender:T,votedAfterQuestionClosed:Q,enteredAnActiveQuestion:w,marketClosed:I,percentsAnimated:N,voteErrorMessage:O,votedAnswer:l}),se&&e.jsx(At,{title:Se,points:qe,onTimerExpired:Qe,questionType:t.type,isTimer:!i,isPlayingTimer:!l,animatePoints:De,timerDuration:Oe?0:Number(((b=t==null?void 0:t.appearance)==null?void 0:b.autoHideInterval)||"30"),votedInCurrentRender:T,percentsAnimated:N}),Ne?Ve():e.jsxs(e.Fragment,{children:[r&&e.jsxs(Ls,{children:[e.jsx(Fs,{name:"iconEarlyPrediction"}),"EARLY PREDICTION"]}),e.jsx(Os,{style:ke?{marginTop:0}:{},children:h}),r&&e.jsx(me,{feedbackMessages:ue,questionVoted:!!l,questionVotedCorrectly:l==null?void 0:l.correct,questionType:d,hasCorrectAnswer:v,showExpiredNotification:V,showClosedNotificationTrivia:ee,votedInCurrentRender:T,votedAfterQuestionClosed:Q,enteredAnActiveQuestion:w,marketClosed:I,percentsAnimated:N,voteErrorMessage:O,isEarlyPrediction:r,correctAnswer:x,votedAnswer:l,onAnimationEnd:Pe}),e.jsxs(Ns,{children:[e.jsx($e,{children:Z.sort((p,A)=>p.id>A.id?1:-1).map((p,A)=>e.jsx(ut,{...p,firstOption:A===0,markThatVoted:_e,onPercentsAnimated:()=>H(!0),votedAfterQuestionClosed:Q,enteredAnActiveQuestion:w,marketClosed:I,isEarlyPrediction:r,isAd:E,webos:m},p.id))}),r&&e.jsxs(e.Fragment,{children:[e.jsx(ks,{}),e.jsx(Ds,{children:e.jsx(Ms,{name:"mastersLogoWhite"})})]})]})]})]})})]})};exports.C=ze;exports.S=Ke;exports.S$1=ve;exports.a=oe;exports.c=je;exports.d=He;exports.ee=Et;exports.f=re;exports.l=Me;exports.m=We;exports.n=ie;exports.p=Le;exports.te=$t;
|
|
1
|
+
"use strict";require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.symbol.to-primitive.js"),require("core-js/modules/es.array.find.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.array.map.js"),require("core-js/modules/es.date.to-primitive.js"),require("core-js/modules/es.number.constructor.js"),require("core-js/modules/es.object.define-property.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.regexp.constructor.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/es.string.replace.js"),require("core-js/modules/es.string.split.js"),require("core-js/modules/web.dom-collections.iterator.js");function e(s){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(s)}function s(s,r,t){return(r=function(s){var r=function(s,r){if("object"!=e(s)||!s)return s;var t=s[Symbol.toPrimitive];if(void 0!==t){var i=t.call(s,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(s)}(s,"string");return"symbol"==e(r)?r:r+""}(r))in s?Object.defineProperty(s,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[r]=t,s}var r=require("./sl-types.js"),t=require("./useStreamLayerApp2.js"),i=require("react/jsx-runtime"),o=require("react"),n=require("./index9.js"),l=require("./index4.js"),a=s(s(s(s(s(s(s({},t.QuestionType.TWEET,{label:"Insight",iconName:"icon-insight"}),t.QuestionType.PROMOTION,{label:"Insight",iconName:"icon-insight"}),t.QuestionType.UNSET,void 0),t.QuestionType.FACTOID,{label:"Insight",iconName:"icon-insight"}),t.QuestionType.POLL,{label:"Poll",iconName:"icon-poll"}),t.QuestionType.TRIVIA,{label:"Trivia",iconName:"icon-trivia"}),t.QuestionType.PREDICTION,{label:"Prediction",iconName:"icon-prediction"}),u=s(s(s(s(s(s(s({},t.QuestionType.TWEET,"Learn more"),t.QuestionType.FACTOID,"Learn more"),t.QuestionType.POLL,"Answer"),t.QuestionType.TRIVIA,"Answer"),t.QuestionType.PREDICTION,"Answer"),t.QuestionType.PROMOTION,""),t.QuestionType.UNSET,""),c=r.styled_default("div")({name:"Container",class:"cjq447q",propsAsIs:!1}),d=r.styled_default("div")({name:"ImageContainer",class:"i14egogb",propsAsIs:!1}),m=r.styled_default("img")({name:"Image",class:"i2g9g4l",propsAsIs:!1}),p=r.styled_default(l.B1)({name:"TwitterIcon",class:"t1c454nm",propsAsIs:!0}),j=r.styled_default("div")({name:"Details",class:"d11nigc3",propsAsIs:!1}),y=r.styled_default("div")({name:"Name",class:"nrxa4k8",propsAsIs:!1}),f=r.styled_default("div")({name:"UserNameAndDate",class:"u1p051g3",propsAsIs:!1}),v=function(e){var s=e.image,r=e.name,t=e.userName,o=e.verified,n=e.createdTweet,a=n&&function(e){var s=new Date(e);if(!s)return"";var r=new Date,t=Math.floor(r.getTime()-s.getTime());return t<6e4?"".concat(Math.floor(t/1e3),"s"):t<36e5?"".concat(Math.floor(t/6e4),"m"):t<864e5?"".concat(Math.floor(t/36e5),"h"):s.getFullYear()===r.getFullYear()?"".concat(s.toLocaleDateString("en-US",{month:"short",day:"numeric"})):"".concat(s.toLocaleDateString("en-US",{month:"2-digit",day:"2-digit",year:"2-digit"}))}(n);return i.jsxs(c,{children:[s&&i.jsxs(d,{children:[i.jsx(m,{className:"SL_AccountImage",src:s}),i.jsx(p,{name:"twitter"})]}),i.jsxs(j,{children:[r&&i.jsxs(y,{className:"SL_TweetAccountName",children:[r," ",o&&i.jsx(l.B1,{name:"icon-twitter-verified"})]}),t&&i.jsxs(f,{className:"SL_TweetAccountUserName",children:["@",t," ",a&&"・ ".concat(a)]})]})]})},g=r.styled_default("div")({name:"Container",class:"c1kzqw87",propsAsIs:!1}),x=r.styled_default("div")({name:"Details",class:"d9r1hf9",propsAsIs:!1}),I=r.styled_default("div")({name:"Body",class:"bezygt5",propsAsIs:!1}),h=r.styled_default("div")({name:"ImagesContainer",class:"i1y8f7ym",propsAsIs:!1}),T=r.styled_default("div")({name:"ImagesBlock",class:"i18gwonx",propsAsIs:!1}),b=r.styled_default("img")({name:"Image",class:"i3g0xjd",propsAsIs:!1}),q=r.styled_default(b)({name:"ImageFullSize",class:"io8rt7p",propsAsIs:!0}),A=r.styled_default(b)({name:"ImageHalfSize",class:"i4hn3ox",propsAsIs:!0}),N=new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"),S=function(e){return null==e?void 0:e.replace(N,"")},w=o.memo(function(e){var s,r,t,l,a,u=e.image,c=e.body,d=e.muted,m=e.account,p=e.accountVerified,j=e.tweet,y=e.isDetail,f=e.controlVideo,b=null==(r=null==(s=null==j?void 0:j.meta)?void 0:s.extendedEntities)?void 0:r.media,N=null==b?void 0:b.find(function(e){return"photo"===e.type}),w=o.useMemo(function(){var e,s,r,t;return null==(t=null==(r=null==(s=null==(e=null==b?void 0:b[0])?void 0:e.videoInfo)?void 0:s.variants)?void 0:r.findLast(function(e){return"video/mp4"===e.contentType}))?void 0:t.url},[b]);return i.jsxs(g,{children:[i.jsxs(x,{children:[i.jsx(v,{image:u,name:null==(t=null==j?void 0:j.meta)?void 0:t.accountName,userName:m,verified:p,createdTweet:null==j?void 0:j.date}),i.jsx(I,{children:S(c)}),!y&&N&&i.jsx(h,{children:i.jsx(q,{src:null==b?void 0:b[0].mediaUrlHttps})}),y&&N&&i.jsxs(i.Fragment,{children:[1===(null==b?void 0:b.length)&&i.jsx(h,{children:i.jsx(q,{src:b[0].mediaUrlHttps})}),2===(null==b?void 0:b.length)&&i.jsxs(h,{children:[i.jsx(A,{src:b[0].mediaUrlHttps}),i.jsx(A,{src:b[1].mediaUrlHttps})]}),3===(null==b?void 0:b.length)&&i.jsxs(h,{children:[i.jsx(A,{src:b[0].mediaUrlHttps}),i.jsxs(T,{children:[i.jsx(q,{src:b[1].mediaUrlHttps}),i.jsx(q,{src:b[2].mediaUrlHttps})]})]}),4===(null==b?void 0:b.length)&&i.jsxs(h,{children:[i.jsxs(T,{children:[i.jsx(q,{src:b[0].mediaUrlHttps}),i.jsx(q,{src:b[1].mediaUrlHttps})]}),i.jsxs(T,{children:[i.jsx(q,{src:b[2].mediaUrlHttps}),i.jsx(q,{src:b[3].mediaUrlHttps})]})]})]})]}),!N&&("video"===(null==(l=null==b?void 0:b[0])?void 0:l.type)||"animated_gif"===(null==(a=null==b?void 0:b[0])?void 0:a.type))&&w&&i.jsx(n.Et,{muted:d,source:w,poster:b[0].mediaUrlHttps,controlVideo:f})]})});exports.D=v,exports.D$1=S,exports.I=function(e){return e.split(/\s+/).map(function(e){return e[0]}).join("").toUpperCase()},exports.b=w,exports.e=a,exports.o=u,exports.s=function(e){return e?e.toLocaleString("en-US"):"0"};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.symbol.to-primitive.js"),require("core-js/modules/es.array.filter.js"),require("core-js/modules/es.array.index-of.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.date.to-primitive.js"),require("core-js/modules/es.object.define-properties.js"),require("core-js/modules/es.object.get-own-property-descriptor.js"),require("core-js/modules/es.object.get-own-property-descriptors.js"),require("core-js/modules/es.object.get-prototype-of.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.object.set-prototype-of.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.array.find.js"),require("core-js/modules/es.array.from.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.array.map.js"),require("core-js/modules/es.array.sort.js"),require("core-js/modules/es.number.constructor.js"),require("core-js/modules/es.object.define-property.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.set.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/web.dom-collections.iterator.js");function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=["children","style","enabled","animate"];function s(){
|
|
2
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
3
|
+
var e,t,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function a(s,r,o,i){var a=r&&r.prototype instanceof l?r:l,u=Object.create(a.prototype);return n(u,"_invoke",function(s,n,r){var o,i,a,l=0,u=r||[],d=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,s){return o=t,i=0,a=e,p.n=s,c}};function f(s,n){for(i=s,a=n,t=0;!d&&l&&!r&&t<u.length;t++){var r,o=u[t],f=p.p,y=o[2];s>3?(r=y===n)&&(a=o[(i=o[4])?5:(i=3,3)],o[4]=o[5]=e):o[0]<=f&&((r=s<2&&f<o[1])?(i=0,p.v=n,p.n=o[1]):f<y&&(r=s<3||o[0]>n||n>y)&&(o[4]=s,o[5]=n,p.n=y,i=0))}if(r||s>1)return c;throw d=!0,n}return function(r,u,y){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,y),i=u,a=y;(t=i<2?e:a)||!d;){o||(i?i<3?(i>1&&(p.n=-1),f(i,a)):p.n=a:p.v=a);try{if(l=2,o){if(i||(r="next"),t=o[r]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,i<2&&(i=0)}else 1===i&&(t=o.return)&&t.call(o),i<2&&(a=TypeError("The iterator does not provide a '"+r+"' method"),i=1);o=e}else if((t=(d=p.n<0)?a:s.call(n,p))!==c)break}catch(m){o=e,i=1,a=m}finally{l=1}}return{value:t,done:d}}}(s,o,i),!0),u}var c={};function l(){}function u(){}function d(){}t=Object.getPrototypeOf;var p=[][o]?t(t([][o]())):(n(t={},o,function(){return this}),t),f=d.prototype=l.prototype=Object.create(p);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,n(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=d,n(f,"constructor",d),n(d,"constructor",u),u.displayName="GeneratorFunction",n(d,i,"GeneratorFunction"),n(f),n(f,i,"Generator"),n(f,o,function(){return this}),n(f,"toString",function(){return"[object Generator]"}),(s=function(){return{w:a,m:y}})()}function n(e,t,s,r){var o=Object.defineProperty;try{o({},"",{})}catch(i){o=0}(n=function(e,t,s,r){function i(t,s){n(e,t,function(e){return this._invoke(t,s,e)})}t?o?o(e,t,{value:s,enumerable:!r,configurable:!r,writable:!r}):e[t]=s:(i("next",0),i("throw",1),i("return",2))})(e,t,s,r)}function r(e,t,s,n,r,o,i){try{var a=e[o](i),c=a.value}catch(l){return void s(l)}a.done?t(c):Promise.resolve(c).then(n,r)}function o(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,n)}return s}function i(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?o(Object(s),!0).forEach(function(t){a(e,t,s[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):o(Object(s)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))})}return e}function a(e,t,s){return(t=d(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var s=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=s){var n,r,o,i,a=[],c=!0,l=!1;try{if(o=(s=s.call(e)).next,0===t){if(Object(s)!==s)return;c=!1}else for(;!(c=(n=o.call(s)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(u){l=!0,r=u}finally{try{if(!c&&null!=s.return&&(i=s.return(),Object(i)!==i))return}finally{if(l)throw r}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?l(e,t):void 0}}(e,t)||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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,n=Array(t);s<t;s++)n[s]=e[s];return n}function u(e,t){for(var s=0;s<t.length;s++){var n=t[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(t){var s=function(t,s){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,s||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===s?String:Number)(t)}(t,"string");return"symbol"==e(s)?s:s+""}var p=require("react/jsx-runtime"),f=require("react"),y=require("./sl-types.js"),m=require("./index8.js"),j=require("./index4.js"),h=require("./useStreamLayerApp2.js"),v=require("./index10.js"),x=require("./index3.js"),I=y.styled_default("div")({name:"SDKContainer",class:"sopqfe6",propsAsIs:!1}),b=y.styled_default("div")({name:"SDKScrollContainer",class:"s102vcph",propsAsIs:!1}),T=y.styled_default("div")({name:"SDKContentContainer",class:"s1meqjjv",propsAsIs:!1}),A=y.styled_default(T)({name:"SDKWhiteContainer",class:"s1burm22",propsAsIs:!0}),g=y.styled_default(A)({name:"SDKSummaryContainer",class:"sm5r3j5",propsAsIs:!0}),w=y.styled_default("div")({name:"TabsContainer",class:"tysxwr6",propsAsIs:!1}),C=y.styled_default(T)({name:"LeaderboardContainer",class:"l9er3b1",propsAsIs:!0}),E=y.styled_default(A)({name:"TabsNavContainer",class:"t19dtrb3",propsAsIs:!0}),q=y.styled_default("div")({name:"UserSummaryContainer",class:"u1552n3j",propsAsIs:!1}),P=Object.defineProperty,O=function(e,t,s){return function(e,t,s){return t in e?P(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s}(e,t+"",s)},_=new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),O(this,"observers",new Set)},t=[{key:"subscribe",value:function(e){this.observers.add(e)}},{key:"unsubscribe",value:function(e){this.observers.delete(e)}},{key:"notify",value:function(e){this.observers.forEach(function(t){return t(e)})}}],t&&u(e.prototype,t),s&&u(e,s),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,s}()),S={hiding:!1,finished:!1},k=function(){var e=c(f.useState(S),2),t=e[0],s=e[1],n=f.useRef(null);f.useEffect(function(){var e=function(e){s(e)};return _.subscribe(e),function(){_.unsubscribe(e)}},[]);var r=f.useCallback(function(e){var t={hiding:!0,finished:!1};n.current&&clearTimeout(n.current),null!=e&&e.delay?n.current=setTimeout(function(){_.notify(t)},null==e?void 0:e.delay):_.notify(t)},[]),o=f.useCallback(function(){t.hiding&&(n.current=null,_.notify({hiding:!1,finished:!0}))},[t.hiding]);return i(i({},t),{},{runAnimation:r,onAnimationEnd:o})},Q=y.styled_default("div")({name:"Container",class:"c1pgyo67",propsAsIs:!1}),D=function(e){var t=e.children,s=e.style,n=e.className,r=e.enabled,o=void 0===r||r,i=e.hiding,a=e.onAnimationEnd;return p.jsx(Q,{style:s,className:y.cx_default(n,o&&"sx17qu6",o&&i&&"h1692c5m"),onAnimationEnd:a,children:t})},R=y.styled_default(D)({name:"GrowingContainer",class:"gck55ev",propsAsIs:!0}),N=function(e){var s,n,r,o=e.children,a=e.style,c=e.enabled,l=e.animate,u=function(e,t){if(null==e)return{};var s,n,r=function(e,t){if(null==e)return{};var s={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;s[n]=e[n]}return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)s=o[n],-1===t.indexOf(s)&&{}.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}(e,t),d=f.useRef(null);return p.jsx(R,i(i({},u),{},{enabled:c&&l,style:i(i({},a),(s=null==d?void 0:d.current,n=s&&window.getComputedStyle(s),r=null==n?void 0:n.getPropertyValue("height"),c?{height:l?r:0}:{})),children:p.jsx("div",{ref:d,children:o})}))},V=y.styled_default("div")({name:"Container",class:"c1gcvmcj",propsAsIs:!1}),L=y.styled_default("div")({name:"Title",class:"tnr592a",propsAsIs:!1}),F=y.styled_default("div")({name:"Description",class:"d1e8jqpv",propsAsIs:!1}),B=y.styled_default(j.B1)({name:"Icon",class:"i1vs651k",propsAsIs:!0}),M=function(e){var t=e.icon,s=e.title,n=e.description;return p.jsxs(V,{children:[p.jsx(B,{name:t}),p.jsx(L,{children:s}),p.jsx(F,{children:n})]})},W=y.styled_default(N)({name:"ShowInContainer",class:"s16sbdnm",propsAsIs:!0}),Y=y.styled_default("div")({name:"FeedbackContainer",class:"fbhorgl",propsAsIs:!1}),z="s1g20ja7",G=y.styled_default("div")({name:"Container",class:"c455ozj",propsAsIs:!1}),U=y.styled_default(j.B1)({name:"IconPrediction",class:"i1913njx",propsAsIs:!0}),K=y.styled_default("div")({name:"FeedbackIconWrap",class:"fzfk69z",propsAsIs:!1}),H=y.styled_default("div")({name:"FeedbackHeader",class:"fx87qaj",propsAsIs:!1}),$=y.styled_default("span")({name:"FeedbackTitle",class:"fvek9ew",propsAsIs:!1}),J=y.styled_default("span")({name:"FeedbackDescription",class:"f1kbtp09",propsAsIs:!1}),X=y.styled_default("div")({name:"FeedbackTitleWrap",class:"f4i8rro",propsAsIs:!1}),Z=y.styled_default("div")({name:"FeedbackResultDescriptionWrap",class:"fqyssr",propsAsIs:!1}),ee=y.styled_default(J)({name:"FeedbackDynamicDescription",class:"fyv794i",propsAsIs:!0}),te=y.styled_default(J)({name:"FeedbackResultDescription",class:"f1jkj9vx",propsAsIs:!0}),se=y.styled_default("div")({name:"FeedbackText",class:"f1pxh3a6",propsAsIs:!1}),ne=y.styled_default("span")({name:"DynamicWrap",class:"d1afvufn",propsAsIs:!1}),re=y.styled_default("div")({name:"EarlyFeedbackDescription",class:"eq8u24d",propsAsIs:!1}),oe=function(e){var t=e.feedbackMessages,s=e.questionVotedCorrectly,n=e.questionVoted,r=e.questionType,o=e.hasCorrectAnswer,i=e.showExpiredNotification,a=e.showClosedNotificationTrivia,c=e.votedInCurrentRender,l=e.votedAfterQuestionClosed,u=e.voteErrorMessage,d=e.enteredAnActiveQuestion,f=e.marketClosed,m=e.percentsAnimated,v=e.votedAnswer,x=e.isEarlyPrediction,I=e.correctAnswer,b=e.onAnimationEnd,T=n&&(r===h.QuestionType.TRIVIA||r===h.QuestionType.PREDICTION),A=r===h.QuestionType.PREDICTION&&!o,g=f&&r===h.QuestionType.PREDICTION&&!n||r===h.QuestionType.PREDICTION&&l&&c&&d,w=T&&A,C=T&&o,E=r===h.QuestionType.PREDICTION&&n&&c&&o,q=n&&r===h.QuestionType.POLL&&c,P=s?"correct":"incorrect",O=s?null==t?void 0:t.correctFeedback:null==t?void 0:t.incorrectFeedback;return i||a||w||C||g||q||E||u?p.jsx(W,{enabled:c,animate:!(u||!i)||m,onAnimationEnd:b,children:p.jsxs(G,{"data-prediction":A,children:[u&&!g&&p.jsxs(Y,{children:[!x&&p.jsx(U,{name:"questionExpired"}),p.jsx(J,{children:u})]}),!u&&i&&p.jsxs(Y,{children:[!x&&p.jsx(K,{children:p.jsx(j.B1,{name:"questionExpired"})}),p.jsxs("div",{children:[p.jsx(H,{children:p.jsx(J,{children:"Question Expired"})}),p.jsx(se,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),!u&&a&&p.jsxs(Y,{className:y.cx_default(z),children:[p.jsx(K,{children:p.jsx(j.B1,{name:"questionExpired"})}),p.jsxs("div",{children:[p.jsx(H,{children:p.jsx(J,{children:"Question Closed"})}),p.jsx(se,{children:"This question was answered after the moderator closed the question. So the points for this answer won’t tally."})]})]}),g&&p.jsxs(Y,{children:[!x&&p.jsx(K,{children:p.jsx(j.B1,{name:"questionExpired"})}),p.jsxs("div",{children:[p.jsx(H,{children:p.jsx(J,{children:x?o?"The results are already in!":"Question is Closed":"Question Closed"})}),p.jsx(se,{children:x?p.jsx(re,{children:o?"Correct: ".concat(null==I?void 0:I.text):"Event affecting the outcome has occurred."}):"This event has already taken place, so the ability to make a prediction on its outcome is no longer available."})]})]}),!u&&w&&p.jsxs(Y,{children:[!x&&p.jsx(U,{name:"icon-prediction"}),p.jsxs(ee,{children:["Your pick has been recorded. ",p.jsx(ne,{children:"We’ll notify you of the result."})]})]}),!u&&q&&p.jsxs(Y,{children:[!x&&p.jsx(K,{"data-feedback-type":"correct",children:p.jsx(j.B1,{name:"correct"})}),p.jsx(J,{children:"Thanks for answering. Please stay tuned for the next question."})]}),!u&&(C||E)&&p.jsxs(Y,{className:y.cx_default(a&&z),children:[!x&&p.jsx(K,{"data-feedback-type":P,children:p.jsx(j.B1,{name:P})}),p.jsx("div",{children:p.jsxs(H,{children:[x?p.jsx(X,{children:"incorrect"===P?p.jsxs(p.Fragment,{children:[p.jsx("div",{children:"So close!"}),p.jsx("div",{children:"Better luck next time"})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{children:"That’s correct!"}),p.jsx("div",{children:"You chose wisely."})]})}):p.jsx($,{"data-feedback-type":P,children:null==O?void 0:O.title}),x?p.jsxs(Z,{children:[p.jsxs("div",{children:["Your pick: ",null==v?void 0:v.text]}),p.jsx("div",{children:"incorrect"===P?"Correct: ".concat(null==I?void 0:I.text):""})]}):p.jsx(te,{children:null==O?void 0:O.description})]})})]})]})}):null},ie=y.styled_default("div")({name:"Container",class:"c1hygj0s",propsAsIs:!1}),ae=y.styled_default("div")({name:"Title",class:"t1r84tez",propsAsIs:!1}),ce=y.styled_default("div")({name:"Description",class:"d1aj1a7k",propsAsIs:!1}),le=y.styled_default("div")({name:"AdditionalDescription",class:"ax09ezs",propsAsIs:!1}),ue=y.styled_default(j.B1)({name:"Icon",class:"inkrac",propsAsIs:!0}),de=function(e){var t=e.icon,s=e.title,n=e.description,r=e.additionalDescription;return p.jsxs(ie,{children:[t&&p.jsx(ue,{name:t}),p.jsx(ae,{children:s}),p.jsx(ce,{children:n}),r&&p.jsx(le,{children:r})]})},pe=y.styled_default("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),fe=y.styled_default(b)({name:"QuestionScrollContainer",class:"q1tlqx57",propsAsIs:!0}),ye=y.styled_default("div")({name:"TopShadow",class:"t1hq58md",propsAsIs:!1}),me=y.styled_default("div")({name:"BottomShadow",class:"b1c8nxcx",propsAsIs:!1}),je=y.styled_default("div")({name:"SponsorLogo",class:"siozuc3",propsAsIs:!1}),he=y.styled_default("div")({name:"Content",class:"cpnc44r",propsAsIs:!1}),ve=y.styled_default("div")({name:"Title",class:"tq7p3w0",propsAsIs:!1}),xe=y.styled_default("div")({name:"OptionsWrap",class:"o1jlfj9g",propsAsIs:!1}),Ie=y.styled_default("div")({name:"Options",class:"o84pmnd",propsAsIs:!1}),be=y.styled_default(D)({name:"AlertContainer",class:"a1dybjw9",propsAsIs:!0}),Te=y.styled_default("div")({name:"EarlyPrediction",class:"e1l05ict",propsAsIs:!1}),Ae=y.styled_default(j.B1)({name:"EarlyPredictionIcon",class:"ez9juex",propsAsIs:!0}),ge=y.styled_default(j.B1)({name:"SponsorIcon",class:"s8p4aob",propsAsIs:!0}),we=y.styled_default("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),Ce=y.styled_default("div")({name:"ButtonPctWrap",class:"b4iik8i",propsAsIs:!1}),Ee=y.styled_default("div")({name:"ButtonPct",class:"b1gq1lnf",propsAsIs:!1}),qe=y.styled_default("span")({name:"ButtonBody",class:"b1j65z51",propsAsIs:!1}),Pe=y.styled_default("div")({name:"IconContainer",class:"i19tpfua",propsAsIs:!1}),Oe=y.styled_default("div")({name:"IconWrap",class:"i1tubmma",propsAsIs:!1}),_e=y.styled_default("img")({name:"Icon",class:"i1grrgwj",propsAsIs:!1}),Se=y.styled_default(_e)({name:"IconDefault",class:"ibemyq8",propsAsIs:!0}),ke=y.styled_default(_e)({name:"IconCircle",class:"i1dceht",propsAsIs:!0}),Qe=y.styled_default("span")({name:"Title",class:"t116q4vq",propsAsIs:!1}),De=y.styled_default("span")({name:"Indicators",class:"i17ajcu2",propsAsIs:!1}),Re=y.styled_default("div")({name:"PtsWrap",class:"pu9kmlb",propsAsIs:!1}),Ne=y.styled_default("span")({name:"Pts",class:"p1j2j0s0",propsAsIs:!1}),Ve=y.styled_default("span")({name:"Percentage",class:"p1mzj1sj",propsAsIs:!1}),Le=y.styled_default(j.B1)({name:"CheckIcon",class:"cichgz8",propsAsIs:!0}),Fe=a(a(a(a(a({},h.QuestionImages.CENTERED,function(e){return p.jsx(Se,{"data-testid":"vote-icon",alt:"option-icon",src:e})}),h.QuestionImages.TRANSPARENT,function(e){return p.jsx(Pe,{"data-testid":"vote-icon",children:p.jsx(Oe,{style:{backgroundImage:"url(".concat(e,")")}})})}),h.QuestionImages.ROUNDED,function(e){return p.jsx(ke,{"data-testid":"vote-icon",alt:"option-icon",src:e})}),h.QuestionImages.NONE,function(){return null}),h.QuestionImages.UNSET,function(){return null}),Be=v.O(we),Me=function(e){var t,s=e.id,n=e.icon,r=e.text,o=e.percentageDecimal,i=e.points,a=e.onVote,l=e.markThatVoted,u=e.firstOption,d=e.onPercentsAnimated,y=e.youSelected,m=e.youVoted,j=e.questionVoted,v=e.imageMode,I=e.answerTimeExpired,b=e.questionStatus,T=e.isLoading,A=e.questionType,g=e.correct,w=e.hasCorrectAnswer,C=e.marketClosed,E=e.isEarlyPrediction,q=e.isAd,P=e.webos,O=c(f.useState(0),2),_=O[0],S=O[1],k=function(e){var t=e.questionType,s=e.hasCorrectAnswer,n=e.correct,r=e.youVoted,o=e.questionVoted;if(t===h.QuestionType.POLL&&r)return"voted";if(t===h.QuestionType.PREDICTION){if(!s&&o)return r?"voted":"unset";if(s&&o)return r?n?"correct":"incorrect":"unset";if(r)return"correct"}return t===h.QuestionType.TRIVIA&&o&&r?n?"correct":"incorrect":"unset"}(e),Q=function(e){var t=e.questionType,s=e.questionVoted,n=e.correct,r=e.hasCorrectAnswer,o=e.questionStatus;return t===h.QuestionType.TRIVIA?s&&n:t===h.QuestionType.PREDICTION&&(s&&n&&r||o===h.QuestionStatus.RESOLVED&&n)}({questionType:A,questionVoted:j,correct:g,hasCorrectAnswer:w,questionStatus:b}),D=C&&A===h.QuestionType.PREDICTION,R=j||D,N=A===h.QuestionType.PREDICTION&&!j&&!C&&!q,V=j&&!y&&"incorrect"!==k&&!m;return f.useLayoutEffect(function(){S(0),requestAnimationFrame(function(){S(o)})},[o]),p.jsxs(Be,{value:s,webos:P,autoFocus:u,"data-selected":y,"data-answer-state":k,disabled:j||T||I||D,"data-is-not-checked":V,"data-a":"intr",onClick:function(e){l(A===h.QuestionType.PREDICTION?C:b===h.QuestionStatus.RESOLVED),a(e)},"data-is-ad":q,children:[p.jsx(Ce,{children:p.jsx(Ee,{"data-answer-state":k,"data-is-not-checked":V,style:{width:"".concat(R?_:0,"%")},onTransitionEnd:function(){D||null==d||d()},"data-is-ad":q})}),p.jsxs(qe,{"data-a":"intr",children:[n&&v&&(null==(t=Fe[v])?void 0:t.call(Fe,n)),p.jsx(Qe,{"data-a":"intr",children:r}),N&&p.jsxs(Re,{children:[i,p.jsx(Ne,{children:"pts"})]}),R&&p.jsxs(De,{children:[Q&&p.jsx(Le,{name:E?"selectedBetPack":"selected"}),p.jsx(Ve,{children:p.jsx(x.d,{value:o,suffix:"%"})})]})]})]})},We=y.styled_default(N)({name:"ShowInContainer",class:"sie6cqo",propsAsIs:!0}),Ye=y.styled_default("div")({name:"WinBarContainer",class:"wgizw4u",propsAsIs:!1}),ze=y.styled_default("div")({name:"Content",class:"c1l3ucjp",propsAsIs:!1}),Ge=y.styled_default("div")({name:"Title",class:"tx7j799",propsAsIs:!1}),Ue=y.styled_default(j.B1)({name:"WinIcon",class:"w4lwuj0",propsAsIs:!0}),Ke=y.styled_default("div")({name:"Points",class:"po9i64o",propsAsIs:!1}),He=y.styled_default("span")({name:"PointsCount",class:"pe5g05h",propsAsIs:!1}),$e=y.styled_default("span")({name:"PointsUnits",class:"p1hdtpmb",propsAsIs:!1}),Je=function(e){var t=e.title,s=e.points,n=e.isPlayingTimer,r=e.isTimer,o=e.animatePoints,i=e.questionType,a=e.timerDuration,c=e.votedInCurrentRender,l=e.percentsAnimated,u=e.onTimerExpired;return p.jsx(We,{enabled:i===h.QuestionType.PREDICTION&&c,animate:l,children:p.jsxs(Ye,{style:{justifyContent:i===h.QuestionType.PREDICTION?"center":"space-between"},children:[p.jsxs(ze,{children:[t&&p.jsx(Ge,{children:t}),void 0!==s&&i!==h.QuestionType.POLL&&p.jsxs(p.Fragment,{children:[p.jsx(Ue,{name:"icon-trophy"}),p.jsxs(Ke,{children:[p.jsx(He,{children:o?p.jsx(x.d,{value:s,delay:.3}):s}),p.jsx($e,{children:"PTS"})]})]})]}),r&&i!==h.QuestionType.PREDICTION&&p.jsx(v.L,{isPlaying:n,onTimerExpired:u,duration:a})]})})},Xe=function(e,t){return"already_voted"===e?t===h.QuestionType.POLL?"You’ve already answered this question on another device.":"You’ve already answered this question on another device. So the points for this answer won't tally.":"Something went wrong, please try again"};exports.C=C,exports.S=E,exports.S$1=k,exports.a=A,exports.c=b,exports.d=q,exports.ee=function(e){var t,n,o=e.openedQuestion,a=e.isLoading,l=e.vote,u=e.close,d=e.isEarlyPrediction,y=e.mastersApp,m=e.webos,j=o.subject,v=o.type,x=o.status,I=null==(t=o.options)?void 0:t.options,b=o.marketClosed,T=o.id,A=f.useRef(),g=f.useRef(),w=!y&&(null==o?void 0:o.adUnit)===h.AdUnit.STANDART,C=c(f.useState(!1),2),E=C[0],q=C[1],P=c(f.useState(!1),2),O=P[0],_=P[1],S=c(f.useState(!0),2),Q=S[0],D=S[1],R=c(f.useState(!1),2),N=R[0],V=R[1],L=c(f.useState(!1),2),F=L[0],B=L[1],W=c(f.useState(""),2),Y=W[0],z=W[1],G=c(f.useState(""),2),U=G[0],K=G[1],H=c(f.useState(!1),2),$=H[0],J=H[1],X=c(f.useState(!1),2),Z=X[0],ee=X[1],te=c(f.useState(!1),2),se=te[0],ne=te[1],re=k(),ie=re.runAnimation,ae=re.finished;f.useEffect(function(){ae&&u(T)},[u,ae]),f.useEffect(function(){v===h.QuestionType.PREDICTION?b&&D(!1):x===h.QuestionStatus.RESOLVED&&D(!1)},[]);var ce=f.useCallback(function(e){_(e),q(!0)},[]),le=f.useCallback(function(){d&&q(!1)},[d]),ue=f.useRef(!1),we=f.useCallback(function(){g.current&&clearTimeout(g.current),g.current=setTimeout(function(){ne(!0),ie({delay:5500})},4e3)},[ie]),Ce=f.useCallback(function(){var e,t=(e=s().m(function e(t){var n,r;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:if(ue.current||(ue.current=!0,!T)){e.n=4;break}return n=t.currentTarget.value,z(n),e.p=1,e.n=2,l(T,n);case 2:w&&we(),e.n=4;break;case 3:e.p=3,r=e.v,K(Xe(r.message,v)),z(""),console.error("Error while voting",r),ue.current=!1;case 4:return e.a(2)}},e,null,[[1,3]])}),function(){var t=this,s=arguments;return new Promise(function(n,o){var i=e.apply(t,s);function a(e){r(i,n,o,a,c,"next",e)}function c(e){r(i,n,o,a,c,"throw",e)}a(void 0)})});return function(e){return t.apply(this,arguments)}}(),[v,T,z,l,w,we]),Ee=f.useCallback(function(){V(!0),ie({delay:3500})},[ie]),qe=f.useCallback(function(){B(!0),ie({delay:3500})},[ie]),Pe=null==o?void 0:o.answers.find(function(e){return!0===e.youVoted}),Oe=f.useMemo(function(){return!(null==o||!o.answers.find(function(e){return!0===e.correct}))},[o]),_e=f.useMemo(function(){return null==o?void 0:o.answers.find(function(e){return!0===e.correct})},[o]);f.useEffect(function(){Pe&&E&&!Z&&(A.current=setTimeout(qe,1e4),ee(!0))},[Pe]),f.useEffect(function(){return function(){clearTimeout(A.current),clearTimeout(g.current)}},[]);var Se=f.useMemo(function(){return o?o.answers.map(function(e){var t;return i(i({},e),{},{questionVoted:!!Pe,youSelected:Y===e.id,isLoading:a,hasCorrectAnswer:Oe,questionType:o.type,answerTimeExpired:N,questionStatus:x,imageMode:null==(t=o.appearance)?void 0:t.images,onVote:Ce})}):[]},[Oe,N,a,o,Pe,x,Ce,Y]);f.useEffect(function(){var e=Se.some(function(e){return 0!==e.percentageDecimal}),t=Pe&&v===h.QuestionType.PREDICTION;U&&(d||!e||b&&t)&&J(!0)},[Se,U,d,b,v,Pe]);var ke=!I||"trivia"!==I.case&&"prediction"!==I.case?void 0:I.value,Qe=x===h.QuestionStatus.RESOLVED&&v===h.QuestionType.TRIVIA&&!Pe&&!Q,De=v===h.QuestionType.TRIVIA&&O,Re=f.useMemo(function(){return!w&&(v!==h.QuestionType.PREDICTION||!d&&!!(Pe&&!Oe||Pe&&Oe&&null!=_e&&_e.youVoted))},[v,Pe,Oe,_e,d,w]),Ne=f.useMemo(function(){return v===h.QuestionType.PREDICTION&&Pe&&(!Oe||Oe&&null!=_e&&_e.youVoted)?Pe.points:Qe||N?void 0:Pe?Pe.correct?Pe.pointsEarned:0:null==_e?void 0:_e.points},[N,Pe,_e,Qe,v,Oe]),Ve=f.useMemo(function(){return v===h.QuestionType.PREDICTION&&Pe?Oe?Oe&&null!=_e&&_e.youVoted?"You won":"":"To win":Qe||N?"Time expired":v===h.QuestionType.POLL?"Time remaining":Pe?"You won":"To win"},[N,v,Pe,Qe,Oe,_e]),Le=!Re||Re&&v===h.QuestionType.PREDICTION&&E&&!$,Fe=(v===h.QuestionType.TRIVIA||v===h.QuestionType.PREDICTION)&&Pe&&Oe&&(null==_e?void 0:_e.youVoted),Be=Pe||Qe||De||v===h.QuestionType.TRIVIA&&x===h.QuestionStatus.RESOLVED&&Q,We=!d&&(N||F)||se;return p.jsxs(fe,{children:[d&&p.jsx(ye,{}),p.jsx(pe,{style:d?{marginTop:"-40px"}:{},children:p.jsxs(he,{children:[!d&&!w&&p.jsx(oe,{feedbackMessages:ke,questionVoted:!!Pe,questionVotedCorrectly:null==Pe?void 0:Pe.correct,questionType:v,hasCorrectAnswer:Oe,showExpiredNotification:Qe,showClosedNotificationTrivia:De,votedInCurrentRender:E,votedAfterQuestionClosed:O,enteredAnActiveQuestion:Q,marketClosed:b,percentsAnimated:$,voteErrorMessage:U,votedAnswer:Pe}),Re&&p.jsx(Je,{title:Ve,points:Ne,onTimerExpired:Ee,questionType:o.type,isTimer:!a,isPlayingTimer:!Pe,animatePoints:Fe,timerDuration:Be?0:Number((null==(n=null==o?void 0:o.appearance)?void 0:n.autoHideInterval)||"30"),votedInCurrentRender:E,percentsAnimated:$}),We?se?p.jsx(be,{children:p.jsx(de,i(i({title:v===h.QuestionType.TRIVIA?null!=Pe&&Pe.correct?"That's correct!\nYou chose wisely.":"So close!\nBetter luck next time.":v===h.QuestionType.POLL?"Thanks for answering.\nPlease stay tuned for the next question.":v===h.QuestionType.PREDICTION?"Stay tuned to see if your prediction was correct.":"",description:v===h.QuestionType.TRIVIA?"Your Pick: ".concat(null==_e?void 0:_e.text):v===h.QuestionType.POLL||v===h.QuestionType.PREDICTION?"Your Pick: ".concat(null==Pe?void 0:Pe.text):""},null!=Pe&&Pe.correct||v===h.QuestionType.POLL||v===h.QuestionType.PREDICTION?{icon:"icon-correct"}:{}),v===h.QuestionType.TRIVIA||v===h.QuestionType.PREDICTION?{additionalDescription:v===h.QuestionType.TRIVIA&&"trivia"===(null==I?void 0:I.case)?null==I?void 0:I.value.explanation:v===h.QuestionType.PREDICTION?j:""}:{}))}):d||!N&&!F?null:p.jsx(be,{children:p.jsx(M,{icon:"icon-check-circle",title:"More to come...",description:F?p.jsxs(p.Fragment,{children:["Stay tuned for more questions ",p.jsx("br",{})," and insights."]}):p.jsxs(p.Fragment,{children:["Watch for additional enhanced stream ",p.jsx("br",{})," interactive experience."]})})}):p.jsxs(p.Fragment,{children:[d&&p.jsxs(Te,{children:[p.jsx(Ae,{name:"iconEarlyPrediction"}),"EARLY PREDICTION"]}),p.jsx(ve,{style:Le?{marginTop:0}:{},children:j}),d&&p.jsx(oe,{feedbackMessages:ke,questionVoted:!!Pe,questionVotedCorrectly:null==Pe?void 0:Pe.correct,questionType:v,hasCorrectAnswer:Oe,showExpiredNotification:Qe,showClosedNotificationTrivia:De,votedInCurrentRender:E,votedAfterQuestionClosed:O,enteredAnActiveQuestion:Q,marketClosed:b,percentsAnimated:$,voteErrorMessage:U,isEarlyPrediction:d,correctAnswer:_e,votedAnswer:Pe,onAnimationEnd:le}),p.jsxs(xe,{children:[p.jsx(Ie,{children:Se.sort(function(e,t){return e.id>t.id?1:-1}).map(function(e,t){return p.jsx(Me,i(i({},e),{},{firstOption:0===t,markThatVoted:ce,onPercentsAnimated:function(){return J(!0)},votedAfterQuestionClosed:O,enteredAnActiveQuestion:Q,marketClosed:b,isEarlyPrediction:d,isAd:w,webos:m}),e.id)})}),d&&p.jsxs(p.Fragment,{children:[p.jsx(me,{}),p.jsx(je,{children:p.jsx(ge,{name:"mastersLogoWhite"})})]})]})]})]})})]})},exports.f=D,exports.l=w,exports.m=g,exports.n=T,exports.p=I,exports.te=function(){return p.jsx(pe,{children:p.jsxs(he,{children:[p.jsx(m.i,{loading:!0,style:{height:"40px",borderRadius:"100px"}}),p.jsx(m.i,{loading:!0,style:{height:"24px",margin:"16px 0"}}),p.jsx(Ie,{children:Array.from({length:5}).map(function(e,t){return p.jsx(m.i,{loading:!0,style:{height:"44px"}},t)})})]})})};
|