@streamlayer/react 1.23.1 → 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.
Files changed (159) hide show
  1. package/lib/cjs/Question.js +1 -1
  2. package/lib/cjs/advertisement.js +28 -223
  3. package/lib/cjs/analytics.js +1 -1
  4. package/lib/cjs/auth.js +1 -1
  5. package/lib/cjs/bet-pack.js +1 -1
  6. package/lib/cjs/feature.js +1 -1
  7. package/lib/cjs/gamification-feature.js +1 -1
  8. package/lib/cjs/gamification-feature2.js +1 -1
  9. package/lib/cjs/hooks-WfHlJH12.js +1 -1
  10. package/lib/cjs/index-eShKGO10.js +1 -5
  11. package/lib/cjs/index.js +1 -1
  12. package/lib/cjs/index10.js +1 -1
  13. package/lib/cjs/index11.js +3 -4
  14. package/lib/cjs/index12.js +1 -1
  15. package/lib/cjs/index13.js +3 -1
  16. package/lib/cjs/index14.js +1 -1
  17. package/lib/cjs/index15.js +1 -1
  18. package/lib/cjs/index16.js +3 -5
  19. package/lib/cjs/index2.js +1 -1
  20. package/lib/cjs/index3.js +1 -1
  21. package/lib/cjs/index4.js +3 -5
  22. package/lib/cjs/index5.js +1 -1
  23. package/lib/cjs/index6.js +1 -1
  24. package/lib/cjs/index7.js +1 -1
  25. package/lib/cjs/index8.js +1 -1
  26. package/lib/cjs/index9.js +1 -1
  27. package/lib/cjs/insight.js +1 -1
  28. package/lib/cjs/masters.js +1 -1
  29. package/lib/cjs/masters2.js +1 -13
  30. package/lib/cjs/notification.js +1 -1
  31. package/lib/cjs/pause-ad.js +1 -1
  32. package/lib/cjs/points.js +1 -1
  33. package/lib/cjs/polymarket.js +5 -15
  34. package/lib/cjs/sl-types.js +1 -15
  35. package/lib/cjs/storage.js +1 -1
  36. package/lib/cjs/style.css +1 -0
  37. package/lib/cjs/theme.js +1 -17
  38. package/lib/cjs/useStreamLayerApp.js +1 -1
  39. package/lib/cjs/useStreamLayerApp2.js +3 -17
  40. package/lib/cjs/utils.js +1 -47
  41. package/lib/classic/cjs/Question.js +1 -1
  42. package/lib/classic/cjs/advertisement.js +28 -223
  43. package/lib/classic/cjs/analytics.js +1 -1
  44. package/lib/classic/cjs/auth.js +1 -1
  45. package/lib/classic/cjs/bet-pack.js +3 -5
  46. package/lib/classic/cjs/feature.js +1 -1
  47. package/lib/classic/cjs/gamification-feature.js +1 -1
  48. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -1
  49. package/lib/classic/cjs/index-eShKGO10.js +1 -5
  50. package/lib/classic/cjs/index.js +1 -1
  51. package/lib/classic/cjs/index10.js +1 -1
  52. package/lib/classic/cjs/index11.js +1 -1
  53. package/lib/classic/cjs/index12.js +1 -1
  54. package/lib/classic/cjs/index13.js +3 -4
  55. package/lib/classic/cjs/index2.js +3 -5
  56. package/lib/classic/cjs/index3.js +1 -1
  57. package/lib/classic/cjs/index4.js +1 -1
  58. package/lib/classic/cjs/index5.js +1 -1
  59. package/lib/classic/cjs/index6.js +1 -1
  60. package/lib/classic/cjs/index7.js +1 -1
  61. package/lib/classic/cjs/index8.js +1 -1
  62. package/lib/classic/cjs/index9.js +3 -1
  63. package/lib/classic/cjs/insight.js +1 -1
  64. package/lib/classic/cjs/notification.js +1 -1
  65. package/lib/classic/cjs/notification2.js +1 -1
  66. package/lib/classic/cjs/pause-ad.js +1 -1
  67. package/lib/classic/cjs/points.js +1 -1
  68. package/lib/classic/cjs/polymarket.js +5 -15
  69. package/lib/classic/cjs/sl-types.js +1 -15
  70. package/lib/classic/cjs/style.css +1 -0
  71. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  72. package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
  73. package/lib/classic/cjs/utils.js +1 -47
  74. package/lib/classic/es/Question.js +277 -264
  75. package/lib/classic/es/advertisement.js +34990 -18881
  76. package/lib/classic/es/analytics.js +58 -56
  77. package/lib/classic/es/auth.js +14 -8
  78. package/lib/classic/es/bet-pack.js +2448 -2419
  79. package/lib/classic/es/feature.js +93 -48
  80. package/lib/classic/es/gamification-feature.js +2 -2
  81. package/lib/classic/es/hooks-WfHlJH12.js +78 -78
  82. package/lib/classic/es/index-eShKGO10.js +948 -948
  83. package/lib/classic/es/index.js +13 -13
  84. package/lib/classic/es/index10.js +68 -67
  85. package/lib/classic/es/index11.js +2903 -2159
  86. package/lib/classic/es/index12.js +124 -119
  87. package/lib/classic/es/index13.js +581 -566
  88. package/lib/classic/es/index2.js +2098 -1763
  89. package/lib/classic/es/index3.js +11 -11
  90. package/lib/classic/es/index4.js +127 -127
  91. package/lib/classic/es/index5.js +3 -4
  92. package/lib/classic/es/index6.js +8 -3
  93. package/lib/classic/es/index7.js +6 -5
  94. package/lib/classic/es/index8.js +8 -7
  95. package/lib/classic/es/index9.js +225 -223
  96. package/lib/classic/es/insight.js +58 -53
  97. package/lib/classic/es/notification.js +3 -3
  98. package/lib/classic/es/notification2.js +764 -722
  99. package/lib/classic/es/pause-ad.js +190 -167
  100. package/lib/classic/es/points.js +55 -48
  101. package/lib/classic/es/polymarket.js +4209 -4031
  102. package/lib/classic/es/sl-types.js +193 -125
  103. package/lib/classic/es/useStreamLayerApp.js +2 -2
  104. package/lib/classic/es/useStreamLayerApp2.js +9714 -7603
  105. package/lib/classic/es/utils.js +28 -28
  106. package/lib/classic/index.d.ts +1 -0
  107. package/lib/classic/style.css +1 -0
  108. package/lib/dist/cjs/gamification-feature.js +1 -1
  109. package/lib/dist/cjs/index-eShKGO10.js +1 -5
  110. package/lib/dist/cjs/index.js +1 -1
  111. package/lib/dist/cjs/masters.js +3 -77
  112. package/lib/dist/es/gamification-feature.js +2 -2
  113. package/lib/dist/es/index-eShKGO10.js +948 -948
  114. package/lib/dist/es/index.js +7 -8
  115. package/lib/dist/es/masters.js +18197 -14750
  116. package/lib/dist/index.d.ts +12 -2
  117. package/lib/dist/style.css +1 -1
  118. package/lib/es/Question.js +108 -106
  119. package/lib/es/advertisement.js +34990 -18881
  120. package/lib/es/analytics.js +58 -56
  121. package/lib/es/auth.js +14 -8
  122. package/lib/es/bet-pack.js +29 -17
  123. package/lib/es/feature.js +93 -48
  124. package/lib/es/gamification-feature.js +2 -2
  125. package/lib/es/gamification-feature2.js +2 -2
  126. package/lib/es/hooks-WfHlJH12.js +78 -78
  127. package/lib/es/index-eShKGO10.js +948 -948
  128. package/lib/es/index.js +14 -13
  129. package/lib/es/index10.js +176 -166
  130. package/lib/es/index11.js +581 -566
  131. package/lib/es/index12.js +124 -119
  132. package/lib/es/index13.js +225 -223
  133. package/lib/es/index14.js +68 -67
  134. package/lib/es/index15.js +2903 -2159
  135. package/lib/es/index16.js +1005 -806
  136. package/lib/es/index2.js +1117 -984
  137. package/lib/es/index3.js +3 -4
  138. package/lib/es/index4.js +2424 -2407
  139. package/lib/es/index5.js +11 -11
  140. package/lib/es/index6.js +127 -127
  141. package/lib/es/index7.js +8 -3
  142. package/lib/es/index8.js +5 -5
  143. package/lib/es/index9.js +8 -7
  144. package/lib/es/insight.js +58 -53
  145. package/lib/es/masters.js +6 -5
  146. package/lib/es/masters2.js +696 -559
  147. package/lib/es/notification.js +696 -655
  148. package/lib/es/pause-ad.js +190 -167
  149. package/lib/es/points.js +56 -49
  150. package/lib/es/polymarket.js +4209 -4031
  151. package/lib/es/sl-types.js +200 -132
  152. package/lib/es/storage.js +75 -74
  153. package/lib/es/theme.js +177 -31
  154. package/lib/es/useStreamLayerApp.js +2 -2
  155. package/lib/es/useStreamLayerApp2.js +9714 -7603
  156. package/lib/es/utils.js +28 -28
  157. package/lib/index.d.ts +1 -0
  158. package/lib/style.css +1 -1
  159. package/package.json +23 -20
@@ -1 +1 @@
1
- "use strict";const bs=require("react");var ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ms(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 Wi={exports:{}},He,An;function de(){if(An)return He;An=1;function e(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}return He=e,He}var Ge,Tn;function Yi(){if(Tn)return Ge;Tn=1;var e=typeof ve=="object"&&ve&&ve.Object===Object&&ve;return Ge=e,Ge}var $e,xn;function ie(){if(xn)return $e;xn=1;var e=Yi(),r=typeof self=="object"&&self&&self.Object===Object&&self,t=e||r||Function("return this")();return $e=t,$e}var ke,On;function Cs(){if(On)return ke;On=1;var e=ie(),r=function(){return e.Date.now()};return ke=r,ke}var Ue,Kn;function Fs(){if(Kn)return Ue;Kn=1;var e=/\s/;function r(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}return Ue=r,Ue}var ze,Sn;function qs(){if(Sn)return ze;Sn=1;var e=Fs(),r=/^\s+/;function t(n){return n&&n.slice(0,e(n)+1).replace(r,"")}return ze=t,ze}var We,En;function we(){if(En)return We;En=1;var e=ie(),r=e.Symbol;return We=r,We}var Ye,Pn;function Rs(){if(Pn)return Ye;Pn=1;var e=we(),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 m=n.call(o);return h&&(u?o[a]=v:delete o[a]),m}return Ye=i,Ye}var Xe,Mn;function ws(){if(Mn)return Xe;Mn=1;var e=Object.prototype,r=e.toString;function t(n){return r.call(n)}return Xe=t,Xe}var Je,In;function Ae(){if(In)return Je;In=1;var e=we(),r=Rs(),t=ws(),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 Je=o,Je}var Ze,Dn;function pe(){if(Dn)return Ze;Dn=1;function e(r){return r!=null&&typeof r=="object"}return Ze=e,Ze}var Qe,Ln;function Te(){if(Ln)return Qe;Ln=1;var e=Ae(),r=pe(),t="[object Symbol]";function n(a){return typeof a=="symbol"||r(a)&&e(a)==t}return Qe=n,Qe}var Ve,Nn;function As(){if(Nn)return Ve;Nn=1;var e=qs(),r=de(),t=Te(),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 m=typeof h.valueOf=="function"?h.valueOf():h;h=r(m)?m+"":m}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 Ve=v,Ve}var er,Bn;function Xi(){if(Bn)return er;Bn=1;var e=de(),r=Cs(),t=As(),n="Expected a function",a=Math.max,i=Math.min;function o(u,v,h){var m,_,I,P,N,K,b=0,l=!1,g=!1,C=!0;if(typeof u!="function")throw new TypeError(n);v=t(v)||0,e(h)&&(l=!!h.leading,g="maxWait"in h,I=g?a(t(h.maxWait)||0,v):I,C="trailing"in h?!!h.trailing:C);function y(A){var k=m,X=_;return m=_=void 0,b=A,P=u.apply(X,k),P}function S(A){return b=A,N=setTimeout(L,v),l?y(A):P}function x(A){var k=A-K,X=A-b,te=v-k;return g?i(te,I-X):te}function q(A){var k=A-K,X=A-b;return K===void 0||k>=v||k<0||g&&X>=I}function L(){var A=r();if(q(A))return R(A);N=setTimeout(L,x(A))}function R(A){return N=void 0,C&&m?y(A):(m=_=void 0,P)}function O(){N!==void 0&&clearTimeout(N),b=0,m=K=_=N=void 0}function E(){return N===void 0?P:R(r())}function G(){var A=r(),k=q(A);if(m=arguments,_=this,K=A,k){if(N===void 0)return S(K);if(g)return clearTimeout(N),N=setTimeout(L,v),y(K)}return N===void 0&&(N=setTimeout(L,v)),P}return G.cancel=O,G.flush=E,G}return er=o,er}var rr,jn;function Ji(){if(jn)return rr;jn=1;var e=Ae(),r=de(),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 rr=o,rr}var Ts=ie(),xs=Ts["__core-js_shared__"],Os=xs,tr=Os,Hn=function(){var e=/[^.]+$/.exec(tr&&tr.keys&&tr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ks(e){return!!Hn&&Hn in e}var Ss=Ks,Es=Function.prototype,Ps=Es.toString;function Ms(e){if(e!=null){try{return Ps.call(e)}catch{}try{return e+""}catch{}}return""}var Zi=Ms,Is=Ji(),Ds=Ss,Ls=de(),Ns=Zi,Bs=/[\\^$.*+?()[\]{}|]/g,js=/^\[object .+?Constructor\]$/,Hs=Function.prototype,Gs=Object.prototype,$s=Hs.toString,ks=Gs.hasOwnProperty,Us=RegExp("^"+$s.call(ks).replace(Bs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zs(e){if(!Ls(e)||Ds(e))return!1;var r=Is(e)?Us:js;return r.test(Ns(e))}var Ws=zs;function Ys(e,r){return e==null?void 0:e[r]}var Xs=Ys,Js=Ws,Zs=Xs;function Qs(e,r){var t=Zs(e,r);return Js(t)?t:void 0}var he=Qs,nr,Gn;function Ie(){if(Gn)return nr;Gn=1;var e=he,r=e(Object,"create");return nr=r,nr}var ar,$n;function Vs(){if($n)return ar;$n=1;var e=Ie();function r(){this.__data__=e?e(null):{},this.size=0}return ar=r,ar}var ir,kn;function eo(){if(kn)return ir;kn=1;function e(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}return ir=e,ir}var sr,Un;function ro(){if(Un)return sr;Un=1;var e=Ie(),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 sr=a,sr}var or,zn;function to(){if(zn)return or;zn=1;var e=Ie(),r=Object.prototype,t=r.hasOwnProperty;function n(a){var i=this.__data__;return e?i[a]!==void 0:t.call(i,a)}return or=n,or}var ur,Wn;function no(){if(Wn)return ur;Wn=1;var e=Ie(),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 ur=t,ur}var cr,Yn;function ao(){if(Yn)return cr;Yn=1;var e=Vs(),r=eo(),t=ro(),n=to(),a=no();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,cr=i,cr}function io(){this.__data__=[],this.size=0}var so=io,fr,Xn;function un(){if(Xn)return fr;Xn=1;function e(r,t){return r===t||r!==r&&t!==t}return fr=e,fr}var oo=un();function uo(e,r){for(var t=e.length;t--;)if(oo(e[t][0],r))return t;return-1}var De=uo,co=De,fo=Array.prototype,lo=fo.splice;function ho(e){var r=this.__data__,t=co(r,e);if(t<0)return!1;var n=r.length-1;return t==n?r.pop():lo.call(r,t,1),--this.size,!0}var vo=ho,po=De;function yo(e){var r=this.__data__,t=po(r,e);return t<0?void 0:r[t][1]}var go=yo,bo=De;function _o(e){return bo(this.__data__,e)>-1}var mo=_o,Co=De;function Fo(e,r){var t=this.__data__,n=Co(t,e);return n<0?(++this.size,t.push([e,r])):t[n][1]=r,this}var qo=Fo,Ro=so,wo=vo,Ao=go,To=mo,xo=qo;function ye(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])}}ye.prototype.clear=Ro;ye.prototype.delete=wo;ye.prototype.get=Ao;ye.prototype.has=To;ye.prototype.set=xo;var Le=ye,Oo=he,Ko=ie(),So=Oo(Ko,"Map"),cn=So,lr,Jn;function Eo(){if(Jn)return lr;Jn=1;var e=ao(),r=Le,t=cn;function n(){this.size=0,this.__data__={hash:new e,map:new(t||r),string:new e}}return lr=n,lr}var dr,Zn;function Po(){if(Zn)return dr;Zn=1;function e(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}return dr=e,dr}var hr,Qn;function Ne(){if(Qn)return hr;Qn=1;var e=Po();function r(t,n){var a=t.__data__;return e(n)?a[typeof n=="string"?"string":"hash"]:a.map}return hr=r,hr}var vr,Vn;function Mo(){if(Vn)return vr;Vn=1;var e=Ne();function r(t){var n=e(this,t).delete(t);return this.size-=n?1:0,n}return vr=r,vr}var pr,ea;function Io(){if(ea)return pr;ea=1;var e=Ne();function r(t){return e(this,t).get(t)}return pr=r,pr}var yr,ra;function Do(){if(ra)return yr;ra=1;var e=Ne();function r(t){return e(this,t).has(t)}return yr=r,yr}var gr,ta;function Lo(){if(ta)return gr;ta=1;var e=Ne();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 gr=r,gr}var br,na;function fn(){if(na)return br;na=1;var e=Eo(),r=Mo(),t=Io(),n=Do(),a=Lo();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,br=i,br}var _r,aa;function No(){if(aa)return _r;aa=1;var e="__lodash_hash_undefined__";function r(t){return this.__data__.set(t,e),this}return _r=r,_r}var mr,ia;function Bo(){if(ia)return mr;ia=1;function e(r){return this.__data__.has(r)}return mr=e,mr}var Cr,sa;function Qi(){if(sa)return Cr;sa=1;var e=fn(),r=No(),t=Bo();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,Cr=n,Cr}var Fr,oa;function jo(){if(oa)return Fr;oa=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 Fr=e,Fr}var qr,ua;function Ho(){if(ua)return qr;ua=1;function e(r){return r!==r}return qr=e,qr}var Rr,ca;function Go(){if(ca)return Rr;ca=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 Rr=e,Rr}var wr,fa;function $o(){if(fa)return wr;fa=1;var e=jo(),r=Ho(),t=Go();function n(a,i,o){return i===i?t(a,i,o):e(a,r,o)}return wr=n,wr}var Ar,la;function ko(){if(la)return Ar;la=1;var e=$o();function r(t,n){var a=t==null?0:t.length;return!!a&&e(t,n,0)>-1}return Ar=r,Ar}var Tr,da;function Uo(){if(da)return Tr;da=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 Tr=e,Tr}function zo(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 ln=zo,xr,ha;function dn(){if(ha)return xr;ha=1;function e(r){return function(t){return r(t)}}return xr=e,xr}var Or,va;function Vi(){if(va)return Or;va=1;function e(r,t){return r.has(t)}return Or=e,Or}var Kr,pa;function Wo(){if(pa)return Kr;pa=1;var e=Qi(),r=ko(),t=Uo(),n=ln,a=dn(),i=Vi(),o=200;function u(v,h,m,_){var I=-1,P=r,N=!0,K=v.length,b=[],l=h.length;if(!K)return b;m&&(h=n(h,a(m))),_?(P=t,N=!1):h.length>=o&&(P=i,N=!1,h=new e(h));e:for(;++I<K;){var g=v[I],C=m==null?g:m(g);if(g=_||g!==0?g:0,N&&C===C){for(var y=l;y--;)if(h[y]===C)continue e;b.push(g)}else P(h,C,_)||b.push(g)}return b}return Kr=u,Kr}var Sr,ya;function es(){if(ya)return Sr;ya=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 Sr=e,Sr}var Er,ga;function Yo(){if(ga)return Er;ga=1;var e=Ae(),r=pe(),t="[object Arguments]";function n(a){return r(a)&&e(a)==t}return Er=n,Er}var Pr,ba;function hn(){if(ba)return Pr;ba=1;var e=Yo(),r=pe(),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 Pr=i,Pr}var Mr,_a;function re(){if(_a)return Mr;_a=1;var e=Array.isArray;return Mr=e,Mr}var Ir,ma;function Xo(){if(ma)return Ir;ma=1;var e=we(),r=hn(),t=re(),n=e?e.isConcatSpreadable:void 0;function a(i){return t(i)||r(i)||!!(n&&i&&i[n])}return Ir=a,Ir}var Dr,Ca;function rs(){if(Ca)return Dr;Ca=1;var e=es(),r=Xo();function t(n,a,i,o,u){var v=-1,h=n.length;for(i||(i=r),u||(u=[]);++v<h;){var m=n[v];a>0&&i(m)?a>1?t(m,a-1,i,o,u):e(u,m):o||(u[u.length]=m)}return u}return Dr=t,Dr}var Lr,Fa;function xe(){if(Fa)return Lr;Fa=1;function e(r){return r}return Lr=e,Lr}var Nr,qa;function Jo(){if(qa)return Nr;qa=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 Nr=e,Nr}var Br,Ra;function Zo(){if(Ra)return Br;Ra=1;var e=Jo(),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 m=Array(a+1);++u<a;)m[u]=o[u];return m[a]=i(h),e(n,this,m)}}return Br=t,Br}var jr,wa;function Qo(){if(wa)return jr;wa=1;function e(r){return function(){return r}}return jr=e,jr}var Hr,Aa;function Vo(){if(Aa)return Hr;Aa=1;var e=he,r=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Hr=r,Hr}var Gr,Ta;function eu(){if(Ta)return Gr;Ta=1;var e=Qo(),r=Vo(),t=xe(),n=r?function(a,i){return r(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:t;return Gr=n,Gr}var $r,xa;function ru(){if(xa)return $r;xa=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 $r=n,$r}var kr,Oa;function tu(){if(Oa)return kr;Oa=1;var e=eu(),r=ru(),t=r(e);return kr=t,kr}var Ur,Ka;function ts(){if(Ka)return Ur;Ka=1;var e=xe(),r=Zo(),t=tu();function n(a,i){return t(r(a,i,e),a+"")}return Ur=n,Ur}var zr,Sa;function vn(){if(Sa)return zr;Sa=1;var e=9007199254740991;function r(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=e}return zr=r,zr}var Wr,Ea;function Oe(){if(Ea)return Wr;Ea=1;var e=Ji(),r=vn();function t(n){return n!=null&&r(n.length)&&!e(n)}return Wr=t,Wr}var Yr,Pa;function nu(){if(Pa)return Yr;Pa=1;var e=Oe(),r=pe();function t(n){return r(n)&&e(n)}return Yr=t,Yr}var Xr,Ma;function au(){if(Ma)return Xr;Ma=1;var e=Wo(),r=rs(),t=ts(),n=nu(),a=t(function(i,o){return n(i)?e(i,r(o,1,n,!0)):[]});return Xr=a,Xr}var Jr,Ia;function ns(){if(Ia)return Jr;Ia=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 Jr=e,Jr}var Zr,Da;function iu(){if(Da)return Zr;Da=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 Zr=e,Zr}var Qr,La;function su(){if(La)return Qr;La=1;var e=iu(),r=e();return Qr=r,Qr}var Vr,Na;function ou(){if(Na)return Vr;Na=1;function e(r,t){for(var n=-1,a=Array(r);++n<r;)a[n]=t(n);return a}return Vr=e,Vr}var Pe={exports:{}};function uu(){return!1}var cu=uu;Pe.exports;(function(e,r){var t=ie(),n=cu,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})(Pe,Pe.exports);var as=Pe.exports,et,Ba;function pn(){if(Ba)return et;Ba=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 rt,ja;function fu(){if(ja)return rt;ja=1;var e=Ae(),r=vn(),t=pe(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",u="[object Error]",v="[object Function]",h="[object Map]",m="[object Number]",_="[object Object]",I="[object RegExp]",P="[object Set]",N="[object String]",K="[object WeakMap]",b="[object ArrayBuffer]",l="[object DataView]",g="[object Float32Array]",C="[object Float64Array]",y="[object Int8Array]",S="[object Int16Array]",x="[object Int32Array]",q="[object Uint8Array]",L="[object Uint8ClampedArray]",R="[object Uint16Array]",O="[object Uint32Array]",E={};E[g]=E[C]=E[y]=E[S]=E[x]=E[q]=E[L]=E[R]=E[O]=!0,E[n]=E[a]=E[b]=E[i]=E[l]=E[o]=E[u]=E[v]=E[h]=E[m]=E[_]=E[I]=E[P]=E[N]=E[K]=!1;function G(A){return t(A)&&r(A.length)&&!!E[e(A)]}return rt=G,rt}var Me={exports:{}};Me.exports;(function(e,r){var t=Yi(),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})(Me,Me.exports);var lu=Me.exports,tt,Ha;function is(){if(Ha)return tt;Ha=1;var e=fu(),r=dn(),t=lu,n=t&&t.isTypedArray,a=n?r(n):e;return tt=a,tt}var nt,Ga;function du(){if(Ga)return nt;Ga=1;var e=ou(),r=hn(),t=re(),n=as,a=pn(),i=is(),o=Object.prototype,u=o.hasOwnProperty;function v(h,m){var _=t(h),I=!_&&r(h),P=!_&&!I&&n(h),N=!_&&!I&&!P&&i(h),K=_||I||P||N,b=K?e(h.length,String):[],l=b.length;for(var g in h)(m||u.call(h,g))&&!(K&&(g=="length"||P&&(g=="offset"||g=="parent")||N&&(g=="buffer"||g=="byteLength"||g=="byteOffset")||a(g,l)))&&b.push(g);return b}return nt=v,nt}var hu=Object.prototype;function vu(e){var r=e&&e.constructor,t=typeof r=="function"&&r.prototype||hu;return e===t}var pu=vu;function yu(e,r){return function(t){return e(r(t))}}var gu=yu,at,$a;function bu(){if($a)return at;$a=1;var e=gu,r=e(Object.keys,Object);return at=r,at}var it,ka;function _u(){if(ka)return it;ka=1;var e=pu,r=bu(),t=Object.prototype,n=t.hasOwnProperty;function a(i){if(!e(i))return r(i);var o=[];for(var u in Object(i))n.call(i,u)&&u!="constructor"&&o.push(u);return o}return it=a,it}var st,Ua;function yn(){if(Ua)return st;Ua=1;var e=du(),r=_u(),t=Oe();function n(a){return t(a)?e(a):r(a)}return st=n,st}var ot,za;function gn(){if(za)return ot;za=1;var e=su(),r=yn();function t(n,a){return n&&e(n,a,r)}return ot=t,ot}var ut,Wa;function mu(){if(Wa)return ut;Wa=1;var e=Oe();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 ut=r,ut}var ct,Ya;function bn(){if(Ya)return ct;Ya=1;var e=gn(),r=mu(),t=r(e);return ct=t,ct}var ft,Xa;function Cu(){if(Xa)return ft;Xa=1;var e=bn();function r(t,n){var a=[];return e(t,function(i,o,u){n(i,o,u)&&a.push(i)}),a}return ft=r,ft}var Fu=Le;function qu(){this.__data__=new Fu,this.size=0}var Ru=qu;function wu(e){var r=this.__data__,t=r.delete(e);return this.size=r.size,t}var Au=wu;function Tu(e){return this.__data__.get(e)}var xu=Tu;function Ou(e){return this.__data__.has(e)}var Ku=Ou,Su=Le,Eu=cn,Pu=fn(),Mu=200;function Iu(e,r){var t=this.__data__;if(t instanceof Su){var n=t.__data__;if(!Eu||n.length<Mu-1)return n.push([e,r]),this.size=++t.size,this;t=this.__data__=new Pu(n)}return t.set(e,r),this.size=t.size,this}var Du=Iu,Lu=Le,Nu=Ru,Bu=Au,ju=xu,Hu=Ku,Gu=Du;function ge(e){var r=this.__data__=new Lu(e);this.size=r.size}ge.prototype.clear=Nu;ge.prototype.delete=Bu;ge.prototype.get=ju;ge.prototype.has=Hu;ge.prototype.set=Gu;var ss=ge,lt,Ja;function $u(){if(Ja)return lt;Ja=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 lt=e,lt}var dt,Za;function os(){if(Za)return dt;Za=1;var e=Qi(),r=$u(),t=Vi(),n=1,a=2;function i(o,u,v,h,m,_){var I=v&n,P=o.length,N=u.length;if(P!=N&&!(I&&N>P))return!1;var K=_.get(o),b=_.get(u);if(K&&b)return K==u&&b==o;var l=-1,g=!0,C=v&a?new e:void 0;for(_.set(o,u),_.set(u,o);++l<P;){var y=o[l],S=u[l];if(h)var x=I?h(S,y,l,u,o,_):h(y,S,l,o,u,_);if(x!==void 0){if(x)continue;g=!1;break}if(C){if(!r(u,function(q,L){if(!t(C,L)&&(y===q||m(y,q,v,h,_)))return C.push(L)})){g=!1;break}}else if(!(y===S||m(y,S,v,h,_))){g=!1;break}}return _.delete(o),_.delete(u),g}return dt=i,dt}var ku=ie(),Uu=ku.Uint8Array,zu=Uu,ht,Qa;function Wu(){if(Qa)return ht;Qa=1;function e(r){var t=-1,n=Array(r.size);return r.forEach(function(a,i){n[++t]=[i,a]}),n}return ht=e,ht}function Yu(e){var r=-1,t=Array(e.size);return e.forEach(function(n){t[++r]=n}),t}var Xu=Yu,vt,Va;function Ju(){if(Va)return vt;Va=1;var e=we(),r=zu,t=un(),n=os(),a=Wu(),i=Xu,o=1,u=2,v="[object Boolean]",h="[object Date]",m="[object Error]",_="[object Map]",I="[object Number]",P="[object RegExp]",N="[object Set]",K="[object String]",b="[object Symbol]",l="[object ArrayBuffer]",g="[object DataView]",C=e?e.prototype:void 0,y=C?C.valueOf:void 0;function S(x,q,L,R,O,E,G){switch(L){case g:if(x.byteLength!=q.byteLength||x.byteOffset!=q.byteOffset)return!1;x=x.buffer,q=q.buffer;case l:return!(x.byteLength!=q.byteLength||!E(new r(x),new r(q)));case v:case h:case I:return t(+x,+q);case m:return x.name==q.name&&x.message==q.message;case P:case K:return x==q+"";case _:var A=a;case N:var k=R&o;if(A||(A=i),x.size!=q.size&&!k)return!1;var X=G.get(x);if(X)return X==q;R|=u,G.set(x,q);var te=n(A(x),A(q),R,O,E,G);return G.delete(x),te;case b:if(y)return y.call(x)==y.call(q)}return!1}return vt=S,vt}var Zu=es(),Qu=re();function Vu(e,r,t){var n=r(e);return Qu(e)?n:Zu(n,t(e))}var ec=Vu;function rc(){return[]}var tc=rc,nc=ns(),ac=tc,ic=Object.prototype,sc=ic.propertyIsEnumerable,ei=Object.getOwnPropertySymbols,oc=ei?function(e){return e==null?[]:(e=Object(e),nc(ei(e),function(r){return sc.call(e,r)}))}:ac,uc=oc,cc=ec,fc=uc,lc=yn();function dc(e){return cc(e,lc,fc)}var hc=dc,pt,ri;function vc(){if(ri)return pt;ri=1;var e=hc,r=1,t=Object.prototype,n=t.hasOwnProperty;function a(i,o,u,v,h,m){var _=u&r,I=e(i),P=I.length,N=e(o),K=N.length;if(P!=K&&!_)return!1;for(var b=P;b--;){var l=I[b];if(!(_?l in o:n.call(o,l)))return!1}var g=m.get(i),C=m.get(o);if(g&&C)return g==o&&C==i;var y=!0;m.set(i,o),m.set(o,i);for(var S=_;++b<P;){l=I[b];var x=i[l],q=o[l];if(v)var L=_?v(q,x,l,o,i,m):v(x,q,l,i,o,m);if(!(L===void 0?x===q||h(x,q,u,v,m):L)){y=!1;break}S||(S=l=="constructor")}if(y&&!S){var R=i.constructor,O=o.constructor;R!=O&&"constructor"in i&&"constructor"in o&&!(typeof R=="function"&&R instanceof R&&typeof O=="function"&&O instanceof O)&&(y=!1)}return m.delete(i),m.delete(o),y}return pt=a,pt}var pc=he,yc=ie(),gc=pc(yc,"DataView"),bc=gc,_c=he,mc=ie(),Cc=_c(mc,"Promise"),Fc=Cc,qc=he,Rc=ie(),wc=qc(Rc,"Set"),Ac=wc,Tc=he,xc=ie(),Oc=Tc(xc,"WeakMap"),Kc=Oc,tn=bc,nn=cn,an=Fc,sn=Ac,on=Kc,us=Ae(),be=Zi,ti="[object Map]",Sc="[object Object]",ni="[object Promise]",ai="[object Set]",ii="[object WeakMap]",si="[object DataView]",Ec=be(tn),Pc=be(nn),Mc=be(an),Ic=be(sn),Dc=be(on),le=us;(tn&&le(new tn(new ArrayBuffer(1)))!=si||nn&&le(new nn)!=ti||an&&le(an.resolve())!=ni||sn&&le(new sn)!=ai||on&&le(new on)!=ii)&&(le=function(e){var r=us(e),t=r==Sc?e.constructor:void 0,n=t?be(t):"";if(n)switch(n){case Ec:return si;case Pc:return ti;case Mc:return ni;case Ic:return ai;case Dc:return ii}return r});var Lc=le,yt,oi;function Nc(){if(oi)return yt;oi=1;var e=ss,r=os(),t=Ju(),n=vc(),a=Lc,i=re(),o=as,u=is(),v=1,h="[object Arguments]",m="[object Array]",_="[object Object]",I=Object.prototype,P=I.hasOwnProperty;function N(K,b,l,g,C,y){var S=i(K),x=i(b),q=S?m:a(K),L=x?m:a(b);q=q==h?_:q,L=L==h?_:L;var R=q==_,O=L==_,E=q==L;if(E&&o(K)){if(!o(b))return!1;S=!0,R=!1}if(E&&!R)return y||(y=new e),S||u(K)?r(K,b,l,g,C,y):t(K,b,q,l,g,C,y);if(!(l&v)){var G=R&&P.call(K,"__wrapped__"),A=O&&P.call(b,"__wrapped__");if(G||A){var k=G?K.value():K,X=A?b.value():b;return y||(y=new e),C(k,X,l,g,y)}}return E?(y||(y=new e),n(K,b,l,g,C,y)):!1}return yt=N,yt}var gt,ui;function cs(){if(ui)return gt;ui=1;var e=Nc(),r=pe();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 gt=t,gt}var bt,ci;function Bc(){if(ci)return bt;ci=1;var e=ss,r=cs(),t=1,n=2;function a(i,o,u,v){var h=u.length,m=h,_=!v;if(i==null)return!m;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<m;){I=u[h];var P=I[0],N=i[P],K=I[1];if(_&&I[2]){if(N===void 0&&!(P in i))return!1}else{var b=new e;if(v)var l=v(N,K,P,i,o,b);if(!(l===void 0?r(K,N,t|n,v,b):l))return!1}}return!0}return bt=a,bt}var _t,fi;function fs(){if(fi)return _t;fi=1;var e=de();function r(t){return t===t&&!e(t)}return _t=r,_t}var mt,li;function jc(){if(li)return mt;li=1;var e=fs(),r=yn();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 mt=t,mt}var Ct,di;function ls(){if(di)return Ct;di=1;function e(r,t){return function(n){return n==null?!1:n[r]===t&&(t!==void 0||r in Object(n))}}return Ct=e,Ct}var Ft,hi;function Hc(){if(hi)return Ft;hi=1;var e=Bc(),r=jc(),t=ls();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 Ft=n,Ft}var qt,vi;function _n(){if(vi)return qt;vi=1;var e=re(),r=Te(),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 qt=a,qt}var ds=fn(),Gc="Expected a function";function mn(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Gc);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(mn.Cache||ds),t}mn.Cache=ds;var $c=mn,kc=$c,Uc=500;function zc(e){var r=kc(e,function(n){return t.size===Uc&&t.clear(),n}),t=r.cache;return r}var Wc=zc,Yc=Wc,Xc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jc=/\\(\\)?/g,Zc=Yc(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Xc,function(t,n,a,i){r.push(a?i.replace(Jc,"$1"):n||t)}),r}),Qc=Zc,Rt,pi;function Vc(){if(pi)return Rt;pi=1;var e=we(),r=ln,t=re(),n=Te(),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 Rt=u,Rt}var wt,yi;function hs(){if(yi)return wt;yi=1;var e=Vc();function r(t){return t==null?"":e(t)}return wt=r,wt}var ef=re(),rf=_n(),tf=Qc,nf=hs();function af(e,r){return ef(e)?e:rf(e,r)?[e]:tf(nf(e))}var vs=af,At,gi;function Be(){if(gi)return At;gi=1;var e=Te(),r=1/0;function t(n){if(typeof n=="string"||e(n))return n;var a=n+"";return a=="0"&&1/n==-r?"-0":a}return At=t,At}var Tt,bi;function Cn(){if(bi)return Tt;bi=1;var e=vs,r=Be();function t(n,a){a=e(a,n);for(var i=0,o=a.length;n!=null&&i<o;)n=n[r(a[i++])];return i&&i==o?n:void 0}return Tt=t,Tt}var xt,_i;function sf(){if(_i)return xt;_i=1;var e=Cn();function r(t,n,a){var i=t==null?void 0:e(t,n);return i===void 0?a:i}return xt=r,xt}var Ot,mi;function of(){if(mi)return Ot;mi=1;function e(r,t){return r!=null&&t in Object(r)}return Ot=e,Ot}var Kt,Ci;function uf(){if(Ci)return Kt;Ci=1;var e=vs,r=hn(),t=re(),n=pn(),a=vn(),i=Be();function o(u,v,h){v=e(v,u);for(var m=-1,_=v.length,I=!1;++m<_;){var P=i(v[m]);if(!(I=u!=null&&h(u,P)))break;u=u[P]}return I||++m!=_?I:(_=u==null?0:u.length,!!_&&a(_)&&n(P,_)&&(t(u)||r(u)))}return Kt=o,Kt}var St,Fi;function cf(){if(Fi)return St;Fi=1;var e=of(),r=uf();function t(n,a){return n!=null&&r(n,a,e)}return St=t,St}var Et,qi;function ff(){if(qi)return Et;qi=1;var e=cs(),r=sf(),t=cf(),n=_n(),a=fs(),i=ls(),o=Be(),u=1,v=2;function h(m,_){return n(m)&&a(_)?i(o(m),_):function(I){var P=r(I,m);return P===void 0&&P===_?t(I,m):e(_,P,u|v)}}return Et=h,Et}var Pt,Ri;function lf(){if(Ri)return Pt;Ri=1;function e(r){return function(t){return t==null?void 0:t[r]}}return Pt=e,Pt}var Mt,wi;function df(){if(wi)return Mt;wi=1;var e=Cn();function r(t){return function(n){return e(n,t)}}return Mt=r,Mt}var It,Ai;function hf(){if(Ai)return It;Ai=1;var e=lf(),r=df(),t=_n(),n=Be();function a(i){return t(i)?e(n(i)):r(i)}return It=a,It}var Dt,Ti;function Fn(){if(Ti)return Dt;Ti=1;var e=Hc(),r=ff(),t=xe(),n=re(),a=hf();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 Dt=i,Dt}var Lt,xi;function vf(){if(xi)return Lt;xi=1;var e=ns(),r=Cu(),t=Fn(),n=re();function a(i,o){var u=n(i)?e:r;return u(i,t(o,3))}return Lt=a,Lt}var Nt,Oi;function pf(){if(Oi)return Nt;Oi=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 Nt=e,Nt}var Bt,Ki;function yf(){if(Ki)return Bt;Ki=1;var e=pf(),r=gn(),t=Fn();function n(a,i){return e(a,t(i,3),r)}return Bt=n,Bt}var jt,Si;function gf(){if(Si)return jt;Si=1;function e(r){return r&&r.length?r[0]:void 0}return jt=e,jt}var Ht,Ei;function bf(){return Ei||(Ei=1,Ht=gf()),Ht}var Gt,Pi;function _f(){if(Pi)return Gt;Pi=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 Gt=e,Gt}var $t,Mi;function ps(){if(Mi)return $t;Mi=1;var e=xe();function r(t){return typeof t=="function"?t:e}return $t=r,$t}var kt,Ii;function mf(){if(Ii)return kt;Ii=1;var e=_f(),r=bn(),t=ps(),n=re();function a(i,o){var u=n(i)?e:r;return u(i,t(o))}return kt=a,kt}var Ut,Di;function Cf(){if(Di)return Ut;Di=1;var e=gn(),r=ps();function t(n,a){return n&&e(n,r(a))}return Ut=t,Ut}var zt,Li;function Ff(){if(Li)return zt;Li=1;function e(){}return zt=e,zt}var Wt,Ni;function qf(){if(Ni)return Wt;Ni=1;var e=bn(),r=Oe();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 Wt=t,Wt}var Yt,Bi;function Rf(){if(Bi)return Yt;Bi=1;function e(r,t){var n=r.length;for(r.sort(t);n--;)r[n]=r[n].value;return r}return Yt=e,Yt}var Xt,ji;function wf(){if(ji)return Xt;ji=1;var e=Te();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,m=n===n,_=e(n);if(!h&&!_&&!u&&t>n||u&&v&&m&&!h&&!_||i&&v&&m||!a&&m||!o)return 1;if(!i&&!u&&!_&&t<n||_&&a&&o&&!i&&!u||h&&a&&o||!v&&o||!m)return-1}return 0}return Xt=r,Xt}var Jt,Hi;function Af(){if(Hi)return Jt;Hi=1;var e=wf();function r(t,n,a){for(var i=-1,o=t.criteria,u=n.criteria,v=o.length,h=a.length;++i<v;){var m=e(o[i],u[i]);if(m){if(i>=h)return m;var _=a[i];return m*(_=="desc"?-1:1)}}return t.index-n.index}return Jt=r,Jt}var Zt,Gi;function Tf(){if(Gi)return Zt;Gi=1;var e=ln,r=Cn(),t=Fn(),n=qf(),a=Rf(),i=dn(),o=Af(),u=xe(),v=re();function h(m,_,I){_.length?_=e(_,function(K){return v(K)?function(b){return r(b,K.length===1?K[0]:K)}:K}):_=[u];var P=-1;_=e(_,i(t));var N=n(m,function(K,b,l){var g=e(_,function(C){return C(K)});return{criteria:g,index:++P,value:K}});return a(N,function(K,b){return o(K,b,I)})}return Zt=h,Zt}var Qt,$i;function xf(){if($i)return Qt;$i=1;var e=un(),r=Oe(),t=pn(),n=de();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 Qt=a,Qt}var Vt,ki;function Of(){if(ki)return Vt;ki=1;var e=rs(),r=Tf(),t=ts(),n=xf(),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 Vt=a,Vt}var en,Ui;function Kf(){if(Ui)return en;Ui=1;var e=Xi(),r=de(),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 en=n,en}var rn,zi;function Sf(){if(zi)return rn;zi=1;var e=hs(),r=0;function t(n){var a=++r;return e(n)+a}return rn=t,rn}(function(e,r){(function(t,n){e.exports=n(Xi(),au(),vf(),yf(),bf(),mf(),Cf(),Ff(),Of(),Kf(),Sf(),bs)})(ve,function(t,n,a,i,o,u,v,h,m,_,I,P){return function(){var N={654:function(b,l,g){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 d in s=arguments[c])Object.prototype.hasOwnProperty.call(s,d)&&(p[d]=s[d]);return p},y.apply(this,arguments)},S=this&&this.__createBinding||(Object.create?function(p,s,c,f){f===void 0&&(f=c);var d=Object.getOwnPropertyDescriptor(s,c);d&&!("get"in d?!s.__esModule:d.writable||d.configurable)||(d={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(p,f,d)}: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)&&S(s,p,c);return x(s,p),s},L=this&&this.__spreadArray||function(p,s,c){if(c||arguments.length===2)for(var f,d=0,F=s.length;d<F;d++)!f&&d in s||(f||(f=Array.prototype.slice.call(s,0,d)),f[d]=s[d]);return p.concat(f||Array.prototype.slice.call(s))},R=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(l,"__esModule",{value:!0}),l.updateRtl=l.doesFocusableExist=l.getCurrentFocusKey=l.updateAllLayouts=l.resume=l.pause=l.navigateByDirection=l.setFocus=l.setKeyMap=l.destroy=l.setThrottle=l.init=l.SpatialNavigation=l.ROOT_FOCUS_KEY=void 0;var O=R(g(150)),E=R(g(117)),G=R(g(747)),A=R(g(23)),k=R(g(842)),X=R(g(682)),te=R(g(784)),_e=R(g(432)),je=R(g(67)),Ke=R(g(35)),Q=R(g(119)),me=q(g(964)),oe="left",ue="right",ce="up",ne="down",Ce="enter",Fe=((C={}).left=[37,"ArrowLeft"],C.up=[38,"ArrowUp"],C.right=[39,"ArrowRight"],C.down=[40,"ArrowDown"],C.enter=[13,"Enter"],C);l.ROOT_FOCUS_KEY="SN:ROOT";var qe=["#0FF","#FF0","#F0F"],Se={leading:!0,trailing:!1},Ee=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=Q.default.LTR,this.pressedKeys={},this.paused=!1,this.keyDownEventListener=null,this.keyUpEventListener=null,this.keyMap=Fe,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,d,F){var w=s?d.top:F===Q.default.LTR?d.left:d.right,T=s?d.bottom:F===Q.default.LTR?d.right:d.left;return c?f?w:T:f?T:w},p.getRefCorners=function(s,c,f){var d={a:{x:0,y:0},b:{x:0,y:0}};switch(s){case ce:var F=c?f.bottom:f.top;d.a={x:f.left,y:F},d.b={x:f.right,y:F};break;case ne:F=c?f.top:f.bottom,d.a={x:f.left,y:F},d.b={x:f.right,y:F};break;case oe:var w=c?f.right:f.left;d.a={x:w,y:f.top},d.b={x:w,y:f.bottom};break;case ue:w=c?f.left:f.right,d.a={x:w,y:f.top},d.b={x:w,y:f.bottom}}return d},p.isAdjacentSlice=function(s,c,f){var d=s.a,F=s.b,w=c.a,T=c.b,M=f?"x":"y",$=d[M],H=F[M],j=w[M],B=T[M],D=.2*(H-$);return Math.max(0,Math.min(H,B)-Math.max($,j))>=D},p.getPrimaryAxisDistance=function(s,c,f){var d=s.a,F=c.a,w=f?"y":"x";return Math.abs(F[w]-d[w])},p.getSecondaryAxisDistance=function(s,c,f,d,F){if(F)return F(s,c,f,d);var w=s.a,T=s.b,M=c.a,$=c.b,H=f?"x":"y",j=w[H],B=T[H],D=M[H],Y=$[H];if(d==="center"){var z=(j+B)/2,J=(D+Y)/2;return Math.abs(z-J)}if(d==="edges"){var se=Math.min(j,B),U=Math.min(D,Y),V=Math.max(j,B),fe=Math.max(D,Y),ae=Math.abs(se-U),ee=Math.abs(V-fe);return Math.min(ae,ee)}var Re=[Math.abs(D-j),Math.abs(D-B),Math.abs(Y-j),Math.abs(Y-B)];return Math.min.apply(Math,Re)},p.prototype.sortSiblingsByPriority=function(s,c,f,d){var F=this,w=f===ne||f===ce,T=p.getRefCorners(f,!1,c);return(0,_e.default)(s,function(M){var $=p.getRefCorners(f,!0,M.layout),H=p.isAdjacentSlice(T,$,w),j=H?p.getPrimaryAxisDistance:p.getSecondaryAxisDistance,B=H?p.getSecondaryAxisDistance:p.getPrimaryAxisDistance,D=j(T,$,w,F.distanceCalculationMethod,F.customDistanceCalculationFunction),Y=B(T,$,w,F.distanceCalculationMethod,F.customDistanceCalculationFunction),z=5*D+Y,J=(z+1)/(H?5:1);return F.log("smartNavigate","distance (primary, secondary, total weighted) for ".concat(M.focusKey," relative to ").concat(d," is"),D,Y,z),F.log("smartNavigate","priority for ".concat(M.focusKey," relative to ").concat(d," is"),J),F.visualDebugger&&(F.visualDebugger.drawPoint($.a.x,$.a.y,"yellow",6),F.visualDebugger.drawPoint($.b.x,$.b.y,"yellow",6)),J})},p.prototype.init=function(s){var c=this,f=s===void 0?{}:s,d=f.debug,F=d!==void 0&&d,w=f.visualDebug,T=w!==void 0&&w,M=f.nativeMode,$=M!==void 0&&M,H=f.throttle,j=H===void 0?0:H,B=f.throttleKeypresses,D=B!==void 0&&B,Y=f.useGetBoundingClientRect,z=Y!==void 0&&Y,J=f.shouldFocusDOMNode,se=J!==void 0&&J,U=f.domNodeFocusOptions,V=U===void 0?{}:U,fe=f.shouldUseNativeEvents,ae=fe!==void 0&&fe,ee=f.rtl,Re=ee!==void 0&&ee,W=f.distanceCalculationMethod,Z=W===void 0?"corners":W,qn=f.customDistanceCalculationFunction,ys=qn===void 0?void 0:qn;if(!this.enabled&&(this.domNodeFocusOptions=V,this.enabled=!0,this.nativeMode=$,this.throttleKeypresses=D,this.useGetBoundingClientRect=z,this.shouldFocusDOMNode=se&&!$,this.shouldUseNativeEvents=ae,this.writingDirection=Re?Q.default.RTL:Q.default.LTR,this.distanceCalculationMethod=Z,this.customDistanceCalculationFunction=ys,this.debug=F,!this.nativeMode&&(Number.isInteger(j)&&j>0&&(this.throttle=j),this.bindEventHandlers(),T))){this.visualDebugger=new Ke.default(this.writingDirection);var Rn=function(){requestAnimationFrame(function(){c.visualDebugger.clearLayouts(),(0,te.default)(c.focusableComponents,function(wn,gs){c.visualDebugger.drawLayout(wn.layout,gs,wn.parentFocusKey)}),Rn()})};Rn()}},p.prototype.setThrottle=function(s){var c=s===void 0?{}:s,f=c.throttle,d=f===void 0?0:f,F=c.throttleKeypresses,w=F!==void 0&&F;this.throttleKeypresses=w,this.nativeMode||(this.unbindEventHandlers(),Number.isInteger(d)&&(this.throttle=d),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=Fe,this.unbindEventHandlers())},p.prototype.getEventType=function(s){return(0,A.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),d=s.getEventType(f);if(d){s.pressedKeys[d]=s.pressedKeys[d]?s.pressedKeys[d]+1:1,s.shouldUseNativeEvents||(c.preventDefault(),c.stopPropagation());var F={pressedKeys:s.pressedKeys};if(d===Ce&&s.focusKey)s.onEnterPress(F);else{var w=s.onArrowPress(d,F)===!1;if(s.visualDebugger&&s.visualDebugger.clear(),w)s.log("keyDownEventListener","default navigation prevented");else{var T=(0,A.default)(s.getKeyMap(),function(M){return M.includes(f)});s.smartNavigate(T,null,{event:c})}}}}},this.throttle&&(this.keyDownEventListenerThrottled=(0,je.default)(this.keyDownEventListener.bind(this),this.throttle,Se)),this.keyUpEventListener=function(c){var f=p.getKeyCode(c),d=s.getEventType(f);delete s.pressedKeys[d],s.throttle&&!s.throttleKeypresses&&s.keyDownEventListenerThrottled.cancel(),d===Ce&&s.focusKey&&s.onEnterRelease(),!s.focusKey||d!==oe&&d!==ue&&d!==ce&&d!==ne||s.onArrowRelease(d)},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=[ne,ce,oe,ue];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 d=this;if(!this.nativeMode){var F=s===ne||s===ce,w=s===ne||(this.writingDirection===Q.default.LTR?s===ue:s===oe);this.log("smartNavigate","direction",s),this.log("smartNavigate","fromParentFocusKey",c),this.log("smartNavigate","this.focusKey",this.focusKey),c||(0,te.default)(this.focusableComponents,function(U){U.layoutUpdated=!1});var T=this.focusableComponents[c||this.focusKey];if(c||T){if(this.log("smartNavigate","currentComponent",T?T.focusKey:void 0,T?T.node:void 0,T),T){this.updateLayout(T.focusKey);var M=T.parentFocusKey,$=T.focusKey,H=T.layout,j=p.getCutoffCoordinate(F,w,!1,H,this.writingDirection),B=(0,G.default)(this.focusableComponents,function(U){if(U.parentFocusKey===M&&U.focusable){d.updateLayout(U.focusKey);var V=p.getCutoffCoordinate(F,w,!0,U.layout,d.writingDirection);return F||d.writingDirection===Q.default.LTR?w?V>=j:V<=j:w?V<=j:V>=j}return!1});if(this.debug&&(this.log("smartNavigate","currentCutoffCoordinate",j),this.log("smartNavigate","siblings","".concat(B.length," elements:"),B.map(function(U){return U.focusKey}).join(", "),B.map(function(U){return U.node}),B.map(function(U){return U}))),this.visualDebugger){var D=p.getRefCorners(s,!1,H);this.visualDebugger.drawPoint(D.a.x,D.a.y),this.visualDebugger.drawPoint(D.b.x,D.b.y)}var Y=this.sortSiblingsByPriority(B,H,s,$),z=(0,k.default)(Y);if(this.log("smartNavigate","nextComponent",z?z.focusKey:void 0,z?z.node:void 0,z),z)this.setFocus(z.focusKey,f);else{var J=this.focusableComponents[M],se=J!=null&&J.isFocusBoundary?J.focusBoundaryDirections||[s]:[];J&&se.includes(s)||this.smartNavigate(s,M,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=[],d=2;d<arguments.length;d++)f[d-2]=arguments[d];this.debug&&console.log.apply(console,L(["%c".concat(s,"%c").concat(c),"background: ".concat(qe[this.logIndex%qe.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,G.default)(this.focusableComponents,function(d){return d.focusable&&d.forceFocus}),f=this.sortSiblingsByPriority(c,{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:null},"down",l.ROOT_FOCUS_KEY);return(s=(0,k.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 d=(0,G.default)(this.focusableComponents,function(M){return M.parentFocusKey===s&&M.focusable});if(d.length>0){var F=f.lastFocusedChildKey,w=f.preferredChildFocusKey;if(this.log("getNextFocusKey","lastFocusedChildKey is",F),this.log("getNextFocusKey","preferredChildFocusKey is",w),F&&f.saveLastFocusedChild&&this.isParticipatingFocusableComponent(F))return this.log("getNextFocusKey","lastFocusedChildKey will be focused",F),this.getNextFocusKey(F);if(w&&this.isParticipatingFocusableComponent(w))return this.log("getNextFocusKey","preferredChildFocusKey will be focused",w),this.getNextFocusKey(w);d.forEach(function(M){return c.updateLayout(M.focusKey)});var T=function(M,$){var H=$===Q.default.LTR?function(B){var D=B.layout;return Math.abs(D.left)+Math.abs(D.top)}:function(B){var D=B.layout;return Math.abs(window.innerWidth-D.right)+Math.abs(D.top)},j=(0,_e.default)(M,H);return(0,k.default)(j)}(d,this.writingDirection).focusKey;return this.log("getNextFocusKey","childKey will be focused",T),this.getNextFocusKey(T)}return this.log("getNextFocusKey","targetFocusKey",s),s},p.prototype.addFocusable=function(s){var c=s.focusKey,f=s.node,d=s.parentFocusKey,F=s.onEnterPress,w=s.onEnterRelease,T=s.onArrowPress,M=s.onArrowRelease,$=s.onFocus,H=s.onBlur,j=s.saveLastFocusedChild,B=s.trackChildren,D=s.onUpdateFocus,Y=s.onUpdateHasFocusedChild,z=s.preferredChildFocusKey,J=s.autoRestoreFocus,se=s.forceFocus,U=s.focusable,V=s.isFocusBoundary,fe=s.focusBoundaryDirections;if(this.focusableComponents[c]={focusKey:c,node:f,parentFocusKey:d,onEnterPress:F,onEnterRelease:w,onArrowPress:T,onArrowRelease:M,onFocus:$,onBlur:H,onUpdateFocus:D,onUpdateHasFocusedChild:Y,saveLastFocusedChild:j,trackChildren:B,preferredChildFocusKey:z,focusable:U,isFocusBoundary:V,focusBoundaryDirections:fe,autoRestoreFocus:J,forceFocus:se,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(z||c);for(var ae=this.focusableComponents[this.focusKey];ae;){if(ae.parentFocusKey===c){this.updateParentsHasFocusedChild(this.focusKey,{}),this.updateParentsLastFocusedChild(this.focusKey);break}ae=this.focusableComponents[ae.parentFocusKey]}}},p.prototype.removeFocusable=function(s){var c=s.focusKey,f=this.focusableComponents[c];if(f){var d=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(M){return M!==c});var w=this.focusableComponents[d],T=c===this.focusKey;if(w&&w.lastFocusedChildKey===c&&(w.lastFocusedChildKey=null),this.nativeMode)return;(T||F)&&w&&w.autoRestoreFocus&&(this.log("removeFocusable","Component removed: ",T?"Leaf component":"Container component","Auto restoring focus to: ",d),this.setFocusDebounced(d))}},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,d,F,w;if(this.isFocusableComponent(this.focusKey)&&s!==this.focusKey){var T=this.focusableComponents[this.focusKey];T.onUpdateFocus(!1),T.onBlur(this.getNodeLayoutByFocusKey(this.focusKey),c),(d=(f=T.node)===null||f===void 0?void 0:f.removeAttribute)===null||d===void 0||d.call(f,"data-focused"),this.log("setCurrentFocusedKey","onBlur",T)}if(this.focusKey=s,this.isFocusableComponent(this.focusKey)){var M=this.focusableComponents[this.focusKey];this.shouldFocusDOMNode&&M.node&&M.node.focus(this.domNodeFocusOptions),(w=(F=M.node)===null||F===void 0?void 0:F.setAttribute)===null||w===void 0||w.call(F,"data-focused","true"),M.onUpdateFocus(!0),M.onFocus(this.getNodeLayoutByFocusKey(this.focusKey),c),this.log("setCurrentFocusedKey","onFocus",M)}},p.prototype.updateParentsHasFocusedChild=function(s,c){for(var f=this,d=[],F=this.focusableComponents[s];F;){var w=F.parentFocusKey,T=this.focusableComponents[w];if(T){var M=T.focusKey;d.push(M)}F=T}var $=(0,E.default)(this.parentsHavingFocusedChild,d),H=(0,E.default)(d,this.parentsHavingFocusedChild);(0,X.default)($,function(j){var B=f.focusableComponents[j];B&&B.trackChildren&&B.onUpdateHasFocusedChild(!1),f.onIntermediateNodeBecameBlurred(j,c)}),(0,X.default)(H,function(j){var B=f.focusableComponents[j];B&&B.trackChildren&&B.onUpdateHasFocusedChild(!0),f.onIntermediateNodeBecameFocused(j,c)}),this.parentsHavingFocusedChild=d},p.prototype.updateParentsLastFocusedChild=function(s){for(var c=this.focusableComponents[s];c;){var f=c.parentFocusKey,d=this.focusableComponents[f];d&&this.saveLastFocusedChildKey(d,c.focusKey),c=d}},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(d){var F=d[0],w=d[1];f[F]=Array.isArray(w)?w:[w]}),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!==l.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,te.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,d=this.useGetBoundingClientRect?(0,me.getBoundingClientRect)(f):(0,me.default)(f);c.layout=y(y({},d),{node:f})}},p.prototype.updateFocusable=function(s,c){var f=c.node,d=c.preferredChildFocusKey,F=c.focusable,w=c.isFocusBoundary,T=c.focusBoundaryDirections,M=c.onEnterPress,$=c.onEnterRelease,H=c.onArrowPress,j=c.onFocus,B=c.onBlur;if(!this.nativeMode){var D=this.focusableComponents[s];D&&(D.preferredChildFocusKey=d,D.focusable=F,D.isFocusBoundary=w,D.focusBoundaryDirections=T,D.onEnterPress=M,D.onEnterRelease=$,D.onArrowPress=H,D.onFocus=j,D.onBlur=B,f&&(D.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?Q.default.RTL:Q.default.LTR},p}();l.SpatialNavigation=new Ee,l.init=l.SpatialNavigation.init,l.setThrottle=l.SpatialNavigation.setThrottle,l.destroy=l.SpatialNavigation.destroy,l.setKeyMap=l.SpatialNavigation.setKeyMap,l.setFocus=l.SpatialNavigation.setFocus,l.navigateByDirection=l.SpatialNavigation.navigateByDirection,l.pause=l.SpatialNavigation.pause,l.resume=l.SpatialNavigation.resume,l.updateAllLayouts=l.SpatialNavigation.updateAllLayouts,l.getCurrentFocusKey=l.SpatialNavigation.getCurrentFocusKey,l.doesFocusableExist=l.SpatialNavigation.doesFocusableExist,l.updateRtl=l.SpatialNavigation.updateRtl},35:function(b,l,g){var C=this&&this.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(l,"__esModule",{value:!0});var y=C(g(119)),S=typeof window<"u"&&window.document,x=S?window.innerWidth:0,q=S?window.innerHeight:0,L=function(){function R(O){S&&(this.debugCtx=R.createCanvas("sn-debug","1010",O),this.layoutsCtx=R.createCanvas("sn-layouts","1000",O),this.writingDirection=O)}return R.createCanvas=function(O,E,G){var A=document.querySelector("#".concat(O))||document.createElement("canvas");A.setAttribute("id",O),A.setAttribute("dir",G===y.default.LTR?"ltr":"rtl");var k=A.getContext("2d");return A.style.zIndex=E,A.style.position="fixed",A.style.top="0",A.style.left="0",document.body.appendChild(A),A.width=x,A.height=q,k},R.prototype.clear=function(){S&&this.debugCtx.clearRect(0,0,x,q)},R.prototype.clearLayouts=function(){S&&this.layoutsCtx.clearRect(0,0,x,q)},R.prototype.drawLayout=function(O,E,G){if(S){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 A=this.writingDirection===y.default.LTR?"left":"right",k=O[A];this.layoutsCtx.fillText(E,k,O.top+10),this.layoutsCtx.fillText(G,k,O.top+25),this.layoutsCtx.fillText("".concat(A,": ").concat(k),k,O.top+40),this.layoutsCtx.fillText("top: ".concat(O.top),k,O.top+55)}},R.prototype.drawPoint=function(O,E,G,A){G===void 0&&(G="blue"),A===void 0&&(A=10),S&&(this.debugCtx.strokeStyle=G,this.debugCtx.lineWidth=3,this.debugCtx.strokeRect(O-A/2,E-A/2,A,A))},R}();l.default=L},119:function(b,l){var g;Object.defineProperty(l,"__esModule",{value:!0}),function(C){C[C.LTR=0]="LTR",C[C.RTL=1]="RTL"}(g||(g={})),l.default=g},607:function(b,l,g){var C=this&&this.__createBinding||(Object.create?function(S,x,q,L){L===void 0&&(L=q);var R=Object.getOwnPropertyDescriptor(x,q);R&&!("get"in R?!x.__esModule:R.writable||R.configurable)||(R={enumerable:!0,get:function(){return x[q]}}),Object.defineProperty(S,L,R)}:function(S,x,q,L){L===void 0&&(L=q),S[L]=x[q]}),y=this&&this.__exportStar||function(S,x){for(var q in S)q==="default"||Object.prototype.hasOwnProperty.call(x,q)||C(x,S,q)};Object.defineProperty(l,"__esModule",{value:!0}),y(g(79),l),y(g(445),l),y(g(654),l)},964:function(b,l){Object.defineProperty(l,"__esModule",{value:!0}),l.getBoundingClientRect=void 0;var g=function(C){for(var y=C.offsetParent,S=C.offsetHeight,x=C.offsetWidth,q=C.offsetLeft,L=C.offsetTop;y&&y.nodeType===1;)q+=y.offsetLeft-y.scrollLeft,L+=y.offsetTop-y.scrollTop,y=y.offsetParent;return{height:S,left:q,top:L,width:x}};l.default=function(C){var y=C&&C.parentElement;if(C&&y){var S=g(y),x=g(C),q=x.height,L=x.left,R=x.top,O=x.width;return{x:L-S.left,y:R-S.top,width:O,height:q,left:L,top:R,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}},l.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(b,l,g){Object.defineProperty(l,"__esModule",{value:!0}),l.useFocusContext=l.FocusContext=void 0;var C=g(156),y=g(654);l.FocusContext=(0,C.createContext)(y.ROOT_FOCUS_KEY),l.FocusContext.displayName="FocusContext",l.useFocusContext=function(){return(0,C.useContext)(l.FocusContext)}},79:function(b,l,g){var C=this&&this.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(l,"__esModule",{value:!0}),l.useFocusable=void 0;var y=g(156),S=C(g(604)),x=C(g(461)),q=g(654),L=g(445);l.useFocusable=function(R){var O=R===void 0?{}:R,E=O.focusable,G=E===void 0||E,A=O.saveLastFocusedChild,k=A===void 0||A,X=O.trackChildren,te=X!==void 0&&X,_e=O.autoRestoreFocus,je=_e===void 0||_e,Ke=O.forceFocus,Q=Ke!==void 0&&Ke,me=O.isFocusBoundary,oe=me!==void 0&&me,ue=O.focusBoundaryDirections,ce=O.focusKey,ne=O.preferredChildFocusKey,Ce=O.onEnterPress,Fe=Ce===void 0?S.default:Ce,qe=O.onEnterRelease,Se=qe===void 0?S.default:qe,Ee=O.onArrowPress,p=Ee===void 0?function(){return!0}:Ee,s=O.onArrowRelease,c=s===void 0?S.default:s,f=O.onFocus,d=f===void 0?S.default:f,F=O.onBlur,w=F===void 0?S.default:F,T=O.extraProps,M=(0,y.useCallback)(function(W){Fe(T,W)},[Fe,T]),$=(0,y.useCallback)(function(){Se(T)},[Se,T]),H=(0,y.useCallback)(function(W,Z){return p(W,T,Z)},[T,p]),j=(0,y.useCallback)(function(W){c(W,T)},[c,T]),B=(0,y.useCallback)(function(W,Z){d(W,T,Z)},[T,d]),D=(0,y.useCallback)(function(W,Z){w(W,T,Z)},[T,w]),Y=(0,y.useRef)(null),z=(0,y.useState)(!1),J=z[0],se=z[1],U=(0,y.useState)(!1),V=U[0],fe=U[1],ae=(0,L.useFocusContext)(),ee=(0,y.useMemo)(function(){return ce||(0,x.default)("sn:focusable-item-")},[ce]),Re=(0,y.useCallback)(function(W){W===void 0&&(W={}),q.SpatialNavigation.setFocus(ee,W)},[ee]);return(0,y.useEffect)(function(){var W=Y.current;return q.SpatialNavigation.addFocusable({focusKey:ee,node:W,parentFocusKey:ae,preferredChildFocusKey:ne,onEnterPress:M,onEnterRelease:$,onArrowPress:H,onArrowRelease:j,onFocus:B,onBlur:D,onUpdateFocus:function(Z){return Z===void 0&&(Z=!1),se(Z)},onUpdateHasFocusedChild:function(Z){return Z===void 0&&(Z=!1),fe(Z)},saveLastFocusedChild:k,trackChildren:te,isFocusBoundary:oe,focusBoundaryDirections:ue,autoRestoreFocus:je,forceFocus:Q,focusable:G}),function(){q.SpatialNavigation.removeFocusable({focusKey:ee})}},[]),(0,y.useEffect)(function(){var W=Y.current;q.SpatialNavigation.updateFocusable(ee,{node:W,preferredChildFocusKey:ne,focusable:G,isFocusBoundary:oe,focusBoundaryDirections:ue,onEnterPress:M,onEnterRelease:$,onArrowPress:H,onArrowRelease:j,onFocus:B,onBlur:D})},[ee,ne,G,oe,ue,M,$,H,j,B,D]),{ref:Y,focusSelf:Re,focused:J,hasFocusedChild:V,focusKey:ee}}},150:function(b){b.exports=t},117:function(b){b.exports=n},747:function(b){b.exports=a},23:function(b){b.exports=i},842:function(b){b.exports=o},682:function(b){b.exports=u},784:function(b){b.exports=v},604:function(b){b.exports=h},432:function(b){b.exports=m},67:function(b){b.exports=_},461:function(b){b.exports=I},156:function(b){b.exports=P}},K={};return function b(l){var g=K[l];if(g!==void 0)return g.exports;var C=K[l]={exports:{}};return N[l].call(C.exports,C,C.exports,b),C.exports}(607)}()})})(Wi);var Ef=Wi.exports;exports.commonjsGlobal=ve;exports.distExports=Ef;exports.getAugmentedNamespace=ms;exports.getDefaultExportFromCjs=_s;
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};