@streamlayer/react 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -29
- package/lib/es/index.js +1392 -18407
- package/lib/index.d.ts +3 -1895
- package/lib/style.css +1 -1
- package/package.json +14 -13
package/lib/cjs/index.js
CHANGED
|
@@ -1,29 +1 @@
|
|
|
1
|
-
"use strict";var Xo=Object.defineProperty;var ec=(n,e,t)=>e in n?Xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var N=(n,e,t)=>(ec(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("react"),Gt=require("react-phone-number-input"),nc=require("react-auth-code-input"),De=require("nanostores"),Ne=require("@nanostores/react");var ri=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ii={exports:{}},At={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ac=Q,sc=Symbol.for("react.element"),rc=Symbol.for("react.fragment"),ic=Object.prototype.hasOwnProperty,oc=ac.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cc={key:!0,ref:!0,__self:!0,__source:!0};function oi(n,e,t){var a,s={},r=null,i=null;t!==void 0&&(r=""+t),e.key!==void 0&&(r=""+e.key),e.ref!==void 0&&(i=e.ref);for(a in e)ic.call(e,a)&&!cc.hasOwnProperty(a)&&(s[a]=e[a]);if(n&&n.defaultProps)for(a in e=n.defaultProps,e)s[a]===void 0&&(s[a]=e[a]);return{$$typeof:sc,type:n,key:r,ref:i,props:s,_owner:oc.current}}At.Fragment=rc;At.jsx=oi;At.jsxs=oi;ii.exports=At;var f=ii.exports;const Et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSIxMiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CiAgPHJlY3QgeD0iOC4yNSIgeT0iNyIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcpIiBmaWxsPSJ3aGl0ZSIvPgogIDxyZWN0IHg9IjciIHk9IjE1Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSA3IDE1Ljc1KSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==";function lc(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var uc=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Yt=lc(function(n){return uc.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),mc=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},a=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,m]=l.split("_");t[m]=l}else a.push(l)})});const s=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&s.push(t[r]);return s.push(...a),s.join(" ")},Ns=mc,dc=n=>n.toUpperCase()===n,pc=n=>e=>n.indexOf(e)===-1,ci=(n,e)=>{const t={};return Object.keys(n).filter(pc(e)).forEach(a=>{t[a]=n[a]}),t};function gc(n,e,t){const a=ci(e,t);if(!n){const s=typeof Yt=="function"?{default:Yt}:Yt;Object.keys(a).forEach(r=>{s.default(r)||delete a[r]})}return a}var yc=(n,e)=>{};function fc(n){let e="";return t=>{const a=(r,i)=>{const{as:l=n,class:m=e}=r,d=t.propsAsIs===void 0?!(typeof l=="string"&&l.indexOf("-")===-1&&!dc(l[0])):t.propsAsIs,g=gc(d,r,["as","class"]);g.ref=i,g.className=t.atomic?Ns(t.class,g.className||m):Ns(g.className||m,t.class);const{vars:T}=t;if(T){const h={};for(const D in T){const L=T[D],O=L[0],R=L[1]||"",x=typeof O=="function"?O(r):O;yc(x,t.name),h[`--${D}`]=`${x}${R}`}const M=g.style||{},E=Object.keys(M);E.length>0&&E.forEach(D=>{h[D]=M[D]}),g.style=h}return n.__linaria&&n!==l?(g.as=l,Q.createElement(n,g)):Q.createElement(l,g)},s=Q.forwardRef?Q.forwardRef(a):r=>{const i=ci(r,["innerRef"]);return a(i,r.innerRef)};return s.displayName=t.name,s.__linaria={className:t.class||e,extends:n},s}}var S=fc;const Tc=S("div")({name:"Container",class:"c13cgims",propsAsIs:!1}),hc=S("div")({name:"IconWrap",class:"irnp5ce",propsAsIs:!1}),kc=S("img")({name:"Icon",class:"i19tgr4e",propsAsIs:!1}),Mc=S("div")({name:"Content",class:"cczx66p",propsAsIs:!1}),Nc=S("div")({name:"TitleWrap",class:"t9bb349",propsAsIs:!1}),Ic=S("div")({name:"Title",class:"t1hgdyin",propsAsIs:!1}),Sc=S("div")({name:"CloseBtnWrap",class:"cdhbq9i",propsAsIs:!1}),Ac=S("button")({name:"CloseBtn",class:"c1dwe42p",propsAsIs:!1}),Ec=S("img")({name:"CloseIcon",class:"covang7",propsAsIs:!1}),li=({close:n,action:e,data:{color:t,icon:a,title:s}})=>{const r=Q.useCallback(i=>{i.stopPropagation(),n==null||n()},[n]);return f.jsxs(Tc,{onClick:e,children:[f.jsx(hc,{style:t?{backgroundColor:t}:{},children:a&&f.jsx(kc,{alt:"in-app-icon",src:a})}),f.jsxs(Mc,{children:[f.jsx(Nc,{children:f.jsx(Ic,{id:"in-app-title",children:s||""})}),f.jsx(Sc,{children:f.jsx(Ac,{onClick:r,children:f.jsx(Ec,{alt:"close-in-app-icon",src:Et})})})]})]})};var Is=typeof window>"u"?Q.useEffect:Q.useLayoutEffect,bc=({isPlaying:n,duration:e,startAt:t=0,updateInterval:a=0,onComplete:s,onUpdate:r})=>{let[i,l]=Q.useState(t),m=Q.useRef(0),d=Q.useRef(t),g=Q.useRef(t*-1e3),T=Q.useRef(null),h=Q.useRef(null),M=Q.useRef(null),E=O=>{let R=O/1e3;if(h.current===null){h.current=R,T.current=requestAnimationFrame(E);return}let x=R-h.current,z=m.current+x;h.current=R,m.current=z;let U=d.current+(a===0?z:(z/a|0)*a),B=d.current+z,C=typeof e=="number"&&B>=e;l(C?e:U),C||(T.current=requestAnimationFrame(E))},D=()=>{T.current&&cancelAnimationFrame(T.current),M.current&&clearTimeout(M.current),h.current=null},L=Q.useCallback(O=>{D(),m.current=0;let R=typeof O=="number"?O:t;d.current=R,l(R),n&&(T.current=requestAnimationFrame(E))},[n,t]);return Is(()=>{if(r==null||r(i),e&&i>=e){g.current+=e*1e3;let{shouldRepeat:O=!1,delay:R=0,newStartAt:x}=(s==null?void 0:s(g.current/1e3))||{};O&&(M.current=setTimeout(()=>L(x),R*1e3))}},[i,e]),Is(()=>(n&&(T.current=requestAnimationFrame(E)),D),[n,e,a]),{elapsedTime:i,reset:L}},Dc=(n,e,t)=>{let a=n/2,s=e/2,r=a-s,i=2*r,l=t==="clockwise"?"1,0":"0,1",m=2*Math.PI*r;return{path:`m ${a},${s} a ${r},${r} 0 ${l} 0,${i} a ${r},${r} 0 ${l} 0,-${i}`,pathLength:m}},Ss=(n,e)=>n===0||n===e?0:typeof e=="number"?n-e:0,_c=n=>({position:"relative",width:n,height:n}),wc={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},ui=(n,e,t,a,s)=>{if(a===0)return e;let r=(s?a-n:n)/a;return e+t*r},As=n=>{var e,t;return(t=(e=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(a,s,r,i)=>`#${s}${s}${r}${r}${i}${i}`).substring(1).match(/.{2}/g))==null?void 0:e.map(a=>parseInt(a,16)))!=null?t:[]},vc=(n,e)=>{var t;let{colors:a,colorsTime:s,isSmoothColorTransition:r=!0}=n;if(typeof a=="string")return a;let i=(t=s==null?void 0:s.findIndex((h,M)=>h>=e&&e>=s[M+1]))!=null?t:-1;if(!s||i===-1)return a[0];if(!r)return a[i];let l=s[i]-e,m=s[i]-s[i+1],d=As(a[i]),g=As(a[i+1]),T=!!n.isGrowing;return`rgb(${d.map((h,M)=>ui(l,h,g[M]-h,m,T)|0).join(",")})`},Oc=n=>{let{duration:e,initialRemainingTime:t,updateInterval:a,size:s=180,strokeWidth:r=12,trailStrokeWidth:i,isPlaying:l=!1,isGrowing:m=!1,rotation:d="clockwise",onComplete:g,onUpdate:T}=n,h=Q.useRef(),M=Math.max(r,i??0),{path:E,pathLength:D}=Dc(s,M,d),{elapsedTime:L}=bc({isPlaying:l,duration:e,startAt:Ss(e,t),updateInterval:a,onUpdate:typeof T=="function"?R=>{let x=Math.ceil(e-R);x!==h.current&&(h.current=x,T(x))}:void 0,onComplete:typeof g=="function"?R=>{var x;let{shouldRepeat:z,delay:U,newInitialRemainingTime:B}=(x=g(R))!=null?x:{};if(z)return{shouldRepeat:z,delay:U,newStartAt:Ss(e,B)}}:void 0}),O=e-L;return{elapsedTime:L,path:E,pathLength:D,remainingTime:Math.ceil(O),rotation:d,size:s,stroke:vc(n,O),strokeDashoffset:ui(L,0,D,e,m),strokeWidth:r}},mi=n=>{let{children:e,strokeLinecap:t,trailColor:a,trailStrokeWidth:s}=n,{path:r,pathLength:i,stroke:l,strokeDashoffset:m,remainingTime:d,elapsedTime:g,size:T,strokeWidth:h}=Oc(n);return Q.createElement("div",{style:_c(T)},Q.createElement("svg",{viewBox:`0 0 ${T} ${T}`,width:T,height:T,xmlns:"http://www.w3.org/2000/svg"},Q.createElement("path",{d:r,fill:"none",stroke:a??"#d9d9d9",strokeWidth:s??h}),Q.createElement("path",{d:r,fill:"none",stroke:l,strokeLinecap:t??"round",strokeWidth:h,strokeDasharray:i,strokeDashoffset:m})),typeof e=="function"&&Q.createElement("div",{style:wc},e({remainingTime:d,elapsedTime:g,color:l})))};mi.displayName="CountdownCircleTimer";const Vt={BG_TRANSPARENT:"rgba(0,0,0, .8)",BG_TRANSPARENT_VOTE_CONTAINER:"rgba(10, 14, 19, 0.8)",BG_TRANSPARENT_ITEM:"rgba(0, 0, 0, 0.7)",BG_TRANSPARENT_ITEM_VOTE:"rgba(255, 255, 255, 0.1)",BG_TRANSPARENT_ITEM_SUCCESS:"rgba(0, 139, 251, 0.2)",BG_TRANSPARENT_ITEM_ERROR:"rgba(205, 37, 37, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS:"rgba(255, 255, 255, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS:"rgba(60, 139, 251, 0.5)",BG_TRANSPARENT_VOTE_PROGRESS_ERROR:"rgba(205, 37, 37, 0.5)",BG_TRANSPARENT_USER_CONTAINER:"rgba(255, 255, 255, 0.05)",BG_TRANSPARENT_ONBOARDING_INAPP:"rgba(138, 159, 182, 0.2)",BLUE_PRIMARY:"#1589EE",RED_PRIMARY:"#CD2525",RED_SECONDARY:"#EB5757",BLUE_QUESTION_ACTION_BTN:"#1589ee",WHITE:"#FFFFFF",GREY_1:"#909395",GREY_2:"#22262b",GREY_3:"#2d3135",GREY_4:"#53565a",GREY_PRIMARY_ONBOARDING_INAPP:"#B5B7B8",BLACK_1:"#161a1f",GREEN_1:"#F7B801",RED_1:"#A30000",RED_2:"#FF4170",GREY_PRIMARY:"#909395",DIVIDER_COLOR_PRIMARY:"#2d3135",DIVIDER_COLOR_SECONDARY:"#53565a",GREEN_PRIMARY_BTN:"#009B77"};const jc=S("div")({name:"RemainingTime",class:"r1l1rnv7",propsAsIs:!1}),Lc=[Vt.BLUE_PRIMARY,Vt.GREEN_1,Vt.RED_1],Rc=[10,6,0],xc=30,Cc=32,zc=4,Uc=0,di=({isPlaying:n=!0,duration:e=xc,setTimeToExpire:t})=>{const a=({remainingTime:s})=>f.jsx(jc,{style:{color:s?"inherit":void 0},children:s});return Q.useEffect(()=>{t(!1)},[t]),f.jsx(mi,{isPlaying:n,duration:e,colors:Lc,colorsTime:Rc,size:Cc,strokeWidth:zc,trailStrokeWidth:Uc,onComplete:()=>t(!0),children:a})};function be(n,e){if(!n)throw new Error(e)}const Pc=34028234663852886e22,Bc=-34028234663852886e22,Qc=4294967295,Fc=2147483647,Gc=-2147483648;function ot(n){if(typeof n!="number")throw new Error("invalid int 32: "+typeof n);if(!Number.isInteger(n)||n>Fc||n<Gc)throw new Error("invalid int 32: "+n)}function Ia(n){if(typeof n!="number")throw new Error("invalid uint 32: "+typeof n);if(!Number.isInteger(n)||n>Qc||n<0)throw new Error("invalid uint 32: "+n)}function pi(n){if(typeof n!="number")throw new Error("invalid float 32: "+typeof n);if(Number.isFinite(n)&&(n>Pc||n<Bc))throw new Error("invalid float 32: "+n)}const gi=Symbol("@bufbuild/protobuf/enum-type");function Yc(n){const e=n[gi];return be(e,"missing enum type on enum object"),e}function yi(n,e,t,a){n[gi]=fi(e,t.map(s=>({no:s.no,name:s.name,localName:n[s.no]})))}function fi(n,e,t){const a=Object.create(null),s=Object.create(null),r=[];for(const i of e){const l=Ti(i);r.push(l),a[i.name]=l,s[i.no]=l}return{typeName:n,values:r,findName(i){return a[i]},findNumber(i){return s[i]}}}function Vc(n,e,t){const a={};for(const s of e){const r=Ti(s);a[r.localName]=r.no,a[r.no]=r.localName}return yi(a,n,e),a}function Ti(n){return"localName"in n?n:Object.assign(Object.assign({},n),{localName:n.name})}class Ve{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){const a=this.getType(),s=a.runtime.bin,r=s.makeReadOptions(t);return s.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){const a=this.getType(),s=a.runtime.json,r=s.makeReadOptions(t);return s.readMessage(a,e,r,this),this}fromJsonString(e,t){let a;try{a=JSON.parse(e)}catch(s){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${s instanceof Error?s.message:String(s)}`)}return this.fromJson(a,t)}toBinary(e){const t=this.getType(),a=t.runtime.bin,s=a.makeWriteOptions(e),r=s.writerFactory();return a.writeMessage(this,r,s),r.finish()}toJson(e){const t=this.getType(),a=t.runtime.json,s=a.makeWriteOptions(e);return a.writeMessage(this,s)}toJsonString(e){var t;const a=this.toJson(e);return JSON.stringify(a,null,(t=e==null?void 0:e.prettySpaces)!==null&&t!==void 0?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function $c(n,e,t,a){var s;const r=(s=a==null?void 0:a.localName)!==null&&s!==void 0?s:e.substring(e.lastIndexOf(".")+1),i={[r]:function(l){n.util.initFields(this),n.util.initPartial(l,this)}}[r];return Object.setPrototypeOf(i.prototype,new Ve),Object.assign(i,{runtime:n,typeName:e,fields:n.util.newFieldList(t),fromBinary(l,m){return new i().fromBinary(l,m)},fromJson(l,m){return new i().fromJson(l,m)},fromJsonString(l,m){return new i().fromJsonString(l,m)},equals(l,m){return n.util.equals(i,l,m)}}),i}function qc(n,e,t,a){return{syntax:n,json:e,bin:t,util:a,makeMessageType(s,r,i){return $c(this,s,r,i)},makeEnum:Vc,makeEnumType:fi,getEnumType:Yc}}var w;(function(n){n[n.DOUBLE=1]="DOUBLE",n[n.FLOAT=2]="FLOAT",n[n.INT64=3]="INT64",n[n.UINT64=4]="UINT64",n[n.INT32=5]="INT32",n[n.FIXED64=6]="FIXED64",n[n.FIXED32=7]="FIXED32",n[n.BOOL=8]="BOOL",n[n.STRING=9]="STRING",n[n.BYTES=12]="BYTES",n[n.UINT32=13]="UINT32",n[n.SFIXED32=15]="SFIXED32",n[n.SFIXED64=16]="SFIXED64",n[n.SINT32=17]="SINT32",n[n.SINT64=18]="SINT64"})(w||(w={}));var yn;(function(n){n[n.BIGINT=0]="BIGINT",n[n.STRING=1]="STRING"})(yn||(yn={}));function Wc(){let n=0,e=0;for(let a=0;a<28;a+=7){let s=this.buf[this.pos++];if(n|=(s&127)<<a,!(s&128))return this.assertBounds(),[n,e]}let t=this.buf[this.pos++];if(n|=(t&15)<<28,e=(t&112)>>4,!(t&128))return this.assertBounds(),[n,e];for(let a=3;a<=31;a+=7){let s=this.buf[this.pos++];if(e|=(s&127)<<a,!(s&128))return this.assertBounds(),[n,e]}throw new Error("invalid varint")}function $t(n,e,t){for(let r=0;r<28;r=r+7){const i=n>>>r,l=!(!(i>>>7)&&e==0),m=(l?i|128:i)&255;if(t.push(m),!l)return}const a=n>>>28&15|(e&7)<<4,s=!!(e>>3);if(t.push((s?a|128:a)&255),!!s){for(let r=3;r<31;r=r+7){const i=e>>>r,l=!!(i>>>7),m=(l?i|128:i)&255;if(t.push(m),!l)return}t.push(e>>>31&1)}}const ct=4294967296;function Es(n){const e=n[0]==="-";e&&(n=n.slice(1));const t=1e6;let a=0,s=0;function r(i,l){const m=Number(n.slice(i,l));s*=t,a=a*t+m,a>=ct&&(s=s+(a/ct|0),a=a%ct)}return r(-24,-18),r(-18,-12),r(-12,-6),r(-6),e?ki(a,s):Ga(a,s)}function Hc(n,e){let t=Ga(n,e);const a=t.hi&2147483648;a&&(t=ki(t.lo,t.hi));const s=hi(t.lo,t.hi);return a?"-"+s:s}function hi(n,e){if({lo:n,hi:e}=Zc(n,e),e<=2097151)return String(ct*e+n);const t=n&16777215,a=(n>>>24|e<<8)&16777215,s=e>>16&65535;let r=t+a*6777216+s*6710656,i=a+s*8147497,l=s*2;const m=1e7;return r>=m&&(i+=Math.floor(r/m),r%=m),i>=m&&(l+=Math.floor(i/m),i%=m),l.toString()+bs(i)+bs(r)}function Zc(n,e){return{lo:n>>>0,hi:e>>>0}}function Ga(n,e){return{lo:n|0,hi:e|0}}function ki(n,e){return e=~e,n?n=~n+1:e+=1,Ga(n,e)}const bs=n=>{const e=String(n);return"0000000".slice(e.length)+e};function Ds(n,e){if(n>=0){for(;n>127;)e.push(n&127|128),n=n>>>7;e.push(n)}else{for(let t=0;t<9;t++)e.push(n&127|128),n=n>>7;e.push(1)}}function Kc(){let n=this.buf[this.pos++],e=n&127;if(!(n&128))return this.assertBounds(),e;if(n=this.buf[this.pos++],e|=(n&127)<<7,!(n&128))return this.assertBounds(),e;if(n=this.buf[this.pos++],e|=(n&127)<<14,!(n&128))return this.assertBounds(),e;if(n=this.buf[this.pos++],e|=(n&127)<<21,!(n&128))return this.assertBounds(),e;n=this.buf[this.pos++],e|=(n&15)<<28;for(let t=5;n&128&&t<10;t++)n=this.buf[this.pos++];if(n&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}var G={},Mi={},bt={};bt.byteLength=el;bt.toByteArray=tl;bt.fromByteArray=rl;var Ge=[],Oe=[],Jc=typeof Uint8Array<"u"?Uint8Array:Array,qt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var kn=0,Xc=qt.length;kn<Xc;++kn)Ge[kn]=qt[kn],Oe[qt.charCodeAt(kn)]=kn;Oe["-".charCodeAt(0)]=62;Oe["_".charCodeAt(0)]=63;function Ni(n){var e=n.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=n.indexOf("=");t===-1&&(t=e);var a=t===e?0:4-t%4;return[t,a]}function el(n){var e=Ni(n),t=e[0],a=e[1];return(t+a)*3/4-a}function nl(n,e,t){return(e+t)*3/4-t}function tl(n){var e,t=Ni(n),a=t[0],s=t[1],r=new Jc(nl(n,a,s)),i=0,l=s>0?a-4:a,m;for(m=0;m<l;m+=4)e=Oe[n.charCodeAt(m)]<<18|Oe[n.charCodeAt(m+1)]<<12|Oe[n.charCodeAt(m+2)]<<6|Oe[n.charCodeAt(m+3)],r[i++]=e>>16&255,r[i++]=e>>8&255,r[i++]=e&255;return s===2&&(e=Oe[n.charCodeAt(m)]<<2|Oe[n.charCodeAt(m+1)]>>4,r[i++]=e&255),s===1&&(e=Oe[n.charCodeAt(m)]<<10|Oe[n.charCodeAt(m+1)]<<4|Oe[n.charCodeAt(m+2)]>>2,r[i++]=e>>8&255,r[i++]=e&255),r}function al(n){return Ge[n>>18&63]+Ge[n>>12&63]+Ge[n>>6&63]+Ge[n&63]}function sl(n,e,t){for(var a,s=[],r=e;r<t;r+=3)a=(n[r]<<16&16711680)+(n[r+1]<<8&65280)+(n[r+2]&255),s.push(al(a));return s.join("")}function rl(n){for(var e,t=n.length,a=t%3,s=[],r=16383,i=0,l=t-a;i<l;i+=r)s.push(sl(n,i,i+r>l?l:i+r));return a===1?(e=n[t-1],s.push(Ge[e>>2]+Ge[e<<4&63]+"==")):a===2&&(e=(n[t-2]<<8)+n[t-1],s.push(Ge[e>>10]+Ge[e>>4&63]+Ge[e<<2&63]+"=")),s.join("")}var Ya={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ya.read=function(n,e,t,a,s){var r,i,l=s*8-a-1,m=(1<<l)-1,d=m>>1,g=-7,T=t?s-1:0,h=t?-1:1,M=n[e+T];for(T+=h,r=M&(1<<-g)-1,M>>=-g,g+=l;g>0;r=r*256+n[e+T],T+=h,g-=8);for(i=r&(1<<-g)-1,r>>=-g,g+=a;g>0;i=i*256+n[e+T],T+=h,g-=8);if(r===0)r=1-d;else{if(r===m)return i?NaN:(M?-1:1)*(1/0);i=i+Math.pow(2,a),r=r-d}return(M?-1:1)*i*Math.pow(2,r-a)};Ya.write=function(n,e,t,a,s,r){var i,l,m,d=r*8-s-1,g=(1<<d)-1,T=g>>1,h=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=a?0:r-1,E=a?1:-1,D=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,i=g):(i=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-i))<1&&(i--,m*=2),i+T>=1?e+=h/m:e+=h*Math.pow(2,1-T),e*m>=2&&(i++,m/=2),i+T>=g?(l=0,i=g):i+T>=1?(l=(e*m-1)*Math.pow(2,s),i=i+T):(l=e*Math.pow(2,T-1)*Math.pow(2,s),i=0));s>=8;n[t+M]=l&255,M+=E,l/=256,s-=8);for(i=i<<s|l,d+=s;d>0;n[t+M]=i&255,M+=E,i/=256,d-=8);n[t+M-E]|=D*128};/*!
|
|
10
|
-
* The buffer module from node.js, for the browser.
|
|
11
|
-
*
|
|
12
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
13
|
-
* @license MIT
|
|
14
|
-
*/(function(n){const e=bt,t=Ya,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=l,n.SlowBuffer=R,n.INSPECT_MAX_BYTES=50;const s=2147483647;n.kMaxLength=s,l.TYPED_ARRAY_SUPPORT=r(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function r(){try{const p=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(p,o),p.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function i(p){if(p>s)throw new RangeError('The value "'+p+'" is invalid for option "size"');const o=new Uint8Array(p);return Object.setPrototypeOf(o,l.prototype),o}function l(p,o,u){if(typeof p=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return T(p)}return m(p,o,u)}l.poolSize=8192;function m(p,o,u){if(typeof p=="string")return h(p,o);if(ArrayBuffer.isView(p))return E(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(Be(p,ArrayBuffer)||p&&Be(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Be(p,SharedArrayBuffer)||p&&Be(p.buffer,SharedArrayBuffer)))return D(p,o,u);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const y=p.valueOf&&p.valueOf();if(y!=null&&y!==p)return l.from(y,o,u);const k=L(p);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return l.from(p[Symbol.toPrimitive]("string"),o,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}l.from=function(p,o,u){return m(p,o,u)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function g(p,o,u){return d(p),p<=0?i(p):o!==void 0?typeof u=="string"?i(p).fill(o,u):i(p).fill(o):i(p)}l.alloc=function(p,o,u){return g(p,o,u)};function T(p){return d(p),i(p<0?0:O(p)|0)}l.allocUnsafe=function(p){return T(p)},l.allocUnsafeSlow=function(p){return T(p)};function h(p,o){if((typeof o!="string"||o==="")&&(o="utf8"),!l.isEncoding(o))throw new TypeError("Unknown encoding: "+o);const u=x(p,o)|0;let y=i(u);const k=y.write(p,o);return k!==u&&(y=y.slice(0,k)),y}function M(p){const o=p.length<0?0:O(p.length)|0,u=i(o);for(let y=0;y<o;y+=1)u[y]=p[y]&255;return u}function E(p){if(Be(p,Uint8Array)){const o=new Uint8Array(p);return D(o.buffer,o.byteOffset,o.byteLength)}return M(p)}function D(p,o,u){if(o<0||p.byteLength<o)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<o+(u||0))throw new RangeError('"length" is outside of buffer bounds');let y;return o===void 0&&u===void 0?y=new Uint8Array(p):u===void 0?y=new Uint8Array(p,o):y=new Uint8Array(p,o,u),Object.setPrototypeOf(y,l.prototype),y}function L(p){if(l.isBuffer(p)){const o=O(p.length)|0,u=i(o);return u.length===0||p.copy(u,0,0,o),u}if(p.length!==void 0)return typeof p.length!="number"||Ft(p.length)?i(0):M(p);if(p.type==="Buffer"&&Array.isArray(p.data))return M(p.data)}function O(p){if(p>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return p|0}function R(p){return+p!=p&&(p=0),l.alloc(+p)}l.isBuffer=function(o){return o!=null&&o._isBuffer===!0&&o!==l.prototype},l.compare=function(o,u){if(Be(o,Uint8Array)&&(o=l.from(o,o.offset,o.byteLength)),Be(u,Uint8Array)&&(u=l.from(u,u.offset,u.byteLength)),!l.isBuffer(o)||!l.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(o===u)return 0;let y=o.length,k=u.length;for(let A=0,b=Math.min(y,k);A<b;++A)if(o[A]!==u[A]){y=o[A],k=u[A];break}return y<k?-1:k<y?1:0},l.isEncoding=function(o){switch(String(o).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(o,u){if(!Array.isArray(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return l.alloc(0);let y;if(u===void 0)for(u=0,y=0;y<o.length;++y)u+=o[y].length;const k=l.allocUnsafe(u);let A=0;for(y=0;y<o.length;++y){let b=o[y];if(Be(b,Uint8Array))A+b.length>k.length?(l.isBuffer(b)||(b=l.from(b)),b.copy(k,A)):Uint8Array.prototype.set.call(k,b,A);else if(l.isBuffer(b))b.copy(k,A);else throw new TypeError('"list" argument must be an Array of Buffers');A+=b.length}return k};function x(p,o){if(l.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Be(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const u=p.length,y=arguments.length>2&&arguments[2]===!0;if(!y&&u===0)return 0;let k=!1;for(;;)switch(o){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return Un(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return tt(p).length;default:if(k)return y?-1:Un(p).length;o=(""+o).toLowerCase(),k=!0}}l.byteLength=x;function z(p,o,u){let y=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,o>>>=0,u<=o))return"";for(p||(p="utf8");;)switch(p){case"hex":return Ie(this,o,u);case"utf8":case"utf-8":return Z(this,o,u);case"ascii":return Ce(this,o,u);case"latin1":case"binary":return we(this,o,u);case"base64":return oe(this,o,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,o,u);default:if(y)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),y=!0}}l.prototype._isBuffer=!0;function U(p,o,u){const y=p[o];p[o]=p[u],p[u]=y}l.prototype.swap16=function(){const o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let u=0;u<o;u+=2)U(this,u,u+1);return this},l.prototype.swap32=function(){const o=this.length;if(o%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let u=0;u<o;u+=4)U(this,u,u+3),U(this,u+1,u+2);return this},l.prototype.swap64=function(){const o=this.length;if(o%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let u=0;u<o;u+=8)U(this,u,u+7),U(this,u+1,u+6),U(this,u+2,u+5),U(this,u+3,u+4);return this},l.prototype.toString=function(){const o=this.length;return o===0?"":arguments.length===0?Z(this,0,o):z.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(o){if(!l.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o?!0:l.compare(this,o)===0},l.prototype.inspect=function(){let o="";const u=n.INSPECT_MAX_BYTES;return o=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(o+=" ... "),"<Buffer "+o+">"},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(o,u,y,k,A){if(Be(o,Uint8Array)&&(o=l.from(o,o.offset,o.byteLength)),!l.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(u===void 0&&(u=0),y===void 0&&(y=o?o.length:0),k===void 0&&(k=0),A===void 0&&(A=this.length),u<0||y>o.length||k<0||A>this.length)throw new RangeError("out of range index");if(k>=A&&u>=y)return 0;if(k>=A)return-1;if(u>=y)return 1;if(u>>>=0,y>>>=0,k>>>=0,A>>>=0,this===o)return 0;let b=A-k,V=y-u;const ce=Math.min(b,V),re=this.slice(k,A),le=o.slice(u,y);for(let ae=0;ae<ce;++ae)if(re[ae]!==le[ae]){b=re[ae],V=le[ae];break}return b<V?-1:V<b?1:0};function B(p,o,u,y,k){if(p.length===0)return-1;if(typeof u=="string"?(y=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Ft(u)&&(u=k?0:p.length-1),u<0&&(u=p.length+u),u>=p.length){if(k)return-1;u=p.length-1}else if(u<0)if(k)u=0;else return-1;if(typeof o=="string"&&(o=l.from(o,y)),l.isBuffer(o))return o.length===0?-1:C(p,o,u,y,k);if(typeof o=="number")return o=o&255,typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(p,o,u):Uint8Array.prototype.lastIndexOf.call(p,o,u):C(p,[o],u,y,k);throw new TypeError("val must be string, number or Buffer")}function C(p,o,u,y,k){let A=1,b=p.length,V=o.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(p.length<2||o.length<2)return-1;A=2,b/=2,V/=2,u/=2}function ce(le,ae){return A===1?le[ae]:le.readUInt16BE(ae*A)}let re;if(k){let le=-1;for(re=u;re<b;re++)if(ce(p,re)===ce(o,le===-1?0:re-le)){if(le===-1&&(le=re),re-le+1===V)return le*A}else le!==-1&&(re-=re-le),le=-1}else for(u+V>b&&(u=b-V),re=u;re>=0;re--){let le=!0;for(let ae=0;ae<V;ae++)if(ce(p,re+ae)!==ce(o,ae)){le=!1;break}if(le)return re}return-1}l.prototype.includes=function(o,u,y){return this.indexOf(o,u,y)!==-1},l.prototype.indexOf=function(o,u,y){return B(this,o,u,y,!0)},l.prototype.lastIndexOf=function(o,u,y){return B(this,o,u,y,!1)};function H(p,o,u,y){u=Number(u)||0;const k=p.length-u;y?(y=Number(y),y>k&&(y=k)):y=k;const A=o.length;y>A/2&&(y=A/2);let b;for(b=0;b<y;++b){const V=parseInt(o.substr(b*2,2),16);if(Ft(V))return b;p[u+b]=V}return b}function ne(p,o,u,y){return Pn(Un(o,p.length-u),p,u,y)}function se(p,o,u,y){return Pn(Qt(o),p,u,y)}function ie(p,o,u,y){return Pn(tt(o),p,u,y)}function ue(p,o,u,y){return Pn(v(o,p.length-u),p,u,y)}l.prototype.write=function(o,u,y,k){if(u===void 0)k="utf8",y=this.length,u=0;else if(y===void 0&&typeof u=="string")k=u,y=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(y)?(y=y>>>0,k===void 0&&(k="utf8")):(k=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const A=this.length-u;if((y===void 0||y>A)&&(y=A),o.length>0&&(y<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");let b=!1;for(;;)switch(k){case"hex":return H(this,o,u,y);case"utf8":case"utf-8":return ne(this,o,u,y);case"ascii":case"latin1":case"binary":return se(this,o,u,y);case"base64":return ie(this,o,u,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,o,u,y);default:if(b)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),b=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(p,o,u){return o===0&&u===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(o,u))}function Z(p,o,u){u=Math.min(p.length,u);const y=[];let k=o;for(;k<u;){const A=p[k];let b=null,V=A>239?4:A>223?3:A>191?2:1;if(k+V<=u){let ce,re,le,ae;switch(V){case 1:A<128&&(b=A);break;case 2:ce=p[k+1],(ce&192)===128&&(ae=(A&31)<<6|ce&63,ae>127&&(b=ae));break;case 3:ce=p[k+1],re=p[k+2],(ce&192)===128&&(re&192)===128&&(ae=(A&15)<<12|(ce&63)<<6|re&63,ae>2047&&(ae<55296||ae>57343)&&(b=ae));break;case 4:ce=p[k+1],re=p[k+2],le=p[k+3],(ce&192)===128&&(re&192)===128&&(le&192)===128&&(ae=(A&15)<<18|(ce&63)<<12|(re&63)<<6|le&63,ae>65535&&ae<1114112&&(b=ae))}}b===null?(b=65533,V=1):b>65535&&(b-=65536,y.push(b>>>10&1023|55296),b=56320|b&1023),y.push(b),k+=V}return Ee(y)}const me=4096;function Ee(p){const o=p.length;if(o<=me)return String.fromCharCode.apply(String,p);let u="",y=0;for(;y<o;)u+=String.fromCharCode.apply(String,p.slice(y,y+=me));return u}function Ce(p,o,u){let y="";u=Math.min(p.length,u);for(let k=o;k<u;++k)y+=String.fromCharCode(p[k]&127);return y}function we(p,o,u){let y="";u=Math.min(p.length,u);for(let k=o;k<u;++k)y+=String.fromCharCode(p[k]);return y}function Ie(p,o,u){const y=p.length;(!o||o<0)&&(o=0),(!u||u<0||u>y)&&(u=y);let k="";for(let A=o;A<u;++A)k+=Ko[p[A]];return k}function Se(p,o,u){const y=p.slice(o,u);let k="";for(let A=0;A<y.length-1;A+=2)k+=String.fromCharCode(y[A]+y[A+1]*256);return k}l.prototype.slice=function(o,u){const y=this.length;o=~~o,u=u===void 0?y:~~u,o<0?(o+=y,o<0&&(o=0)):o>y&&(o=y),u<0?(u+=y,u<0&&(u=0)):u>y&&(u=y),u<o&&(u=o);const k=this.subarray(o,u);return Object.setPrototypeOf(k,l.prototype),k};function K(p,o,u){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+o>u)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(o,u,y){o=o>>>0,u=u>>>0,y||K(o,u,this.length);let k=this[o],A=1,b=0;for(;++b<u&&(A*=256);)k+=this[o+b]*A;return k},l.prototype.readUintBE=l.prototype.readUIntBE=function(o,u,y){o=o>>>0,u=u>>>0,y||K(o,u,this.length);let k=this[o+--u],A=1;for(;u>0&&(A*=256);)k+=this[o+--u]*A;return k},l.prototype.readUint8=l.prototype.readUInt8=function(o,u){return o=o>>>0,u||K(o,1,this.length),this[o]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(o,u){return o=o>>>0,u||K(o,2,this.length),this[o]|this[o+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(o,u){return o=o>>>0,u||K(o,2,this.length),this[o]<<8|this[o+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(o,u){return o=o>>>0,u||K(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])},l.prototype.readBigUInt64LE=Xe(function(o){o=o>>>0,ze(o,"offset");const u=this[o],y=this[o+7];(u===void 0||y===void 0)&&ve(o,this.length-8);const k=u+this[++o]*2**8+this[++o]*2**16+this[++o]*2**24,A=this[++o]+this[++o]*2**8+this[++o]*2**16+y*2**24;return BigInt(k)+(BigInt(A)<<BigInt(32))}),l.prototype.readBigUInt64BE=Xe(function(o){o=o>>>0,ze(o,"offset");const u=this[o],y=this[o+7];(u===void 0||y===void 0)&&ve(o,this.length-8);const k=u*2**24+this[++o]*2**16+this[++o]*2**8+this[++o],A=this[++o]*2**24+this[++o]*2**16+this[++o]*2**8+y;return(BigInt(k)<<BigInt(32))+BigInt(A)}),l.prototype.readIntLE=function(o,u,y){o=o>>>0,u=u>>>0,y||K(o,u,this.length);let k=this[o],A=1,b=0;for(;++b<u&&(A*=256);)k+=this[o+b]*A;return A*=128,k>=A&&(k-=Math.pow(2,8*u)),k},l.prototype.readIntBE=function(o,u,y){o=o>>>0,u=u>>>0,y||K(o,u,this.length);let k=u,A=1,b=this[o+--k];for(;k>0&&(A*=256);)b+=this[o+--k]*A;return A*=128,b>=A&&(b-=Math.pow(2,8*u)),b},l.prototype.readInt8=function(o,u){return o=o>>>0,u||K(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]},l.prototype.readInt16LE=function(o,u){o=o>>>0,u||K(o,2,this.length);const y=this[o]|this[o+1]<<8;return y&32768?y|4294901760:y},l.prototype.readInt16BE=function(o,u){o=o>>>0,u||K(o,2,this.length);const y=this[o+1]|this[o]<<8;return y&32768?y|4294901760:y},l.prototype.readInt32LE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},l.prototype.readInt32BE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},l.prototype.readBigInt64LE=Xe(function(o){o=o>>>0,ze(o,"offset");const u=this[o],y=this[o+7];(u===void 0||y===void 0)&&ve(o,this.length-8);const k=this[o+4]+this[o+5]*2**8+this[o+6]*2**16+(y<<24);return(BigInt(k)<<BigInt(32))+BigInt(u+this[++o]*2**8+this[++o]*2**16+this[++o]*2**24)}),l.prototype.readBigInt64BE=Xe(function(o){o=o>>>0,ze(o,"offset");const u=this[o],y=this[o+7];(u===void 0||y===void 0)&&ve(o,this.length-8);const k=(u<<24)+this[++o]*2**16+this[++o]*2**8+this[++o];return(BigInt(k)<<BigInt(32))+BigInt(this[++o]*2**24+this[++o]*2**16+this[++o]*2**8+y)}),l.prototype.readFloatLE=function(o,u){return o=o>>>0,u||K(o,4,this.length),t.read(this,o,!0,23,4)},l.prototype.readFloatBE=function(o,u){return o=o>>>0,u||K(o,4,this.length),t.read(this,o,!1,23,4)},l.prototype.readDoubleLE=function(o,u){return o=o>>>0,u||K(o,8,this.length),t.read(this,o,!0,52,8)},l.prototype.readDoubleBE=function(o,u){return o=o>>>0,u||K(o,8,this.length),t.read(this,o,!1,52,8)};function I(p,o,u,y,k,A){if(!l.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>k||o<A)throw new RangeError('"value" argument is out of bounds');if(u+y>p.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(o,u,y,k){if(o=+o,u=u>>>0,y=y>>>0,!k){const V=Math.pow(2,8*y)-1;I(this,o,u,y,V,0)}let A=1,b=0;for(this[u]=o&255;++b<y&&(A*=256);)this[u+b]=o/A&255;return u+y},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(o,u,y,k){if(o=+o,u=u>>>0,y=y>>>0,!k){const V=Math.pow(2,8*y)-1;I(this,o,u,y,V,0)}let A=y-1,b=1;for(this[u+A]=o&255;--A>=0&&(b*=256);)this[u+A]=o/b&255;return u+y},l.prototype.writeUint8=l.prototype.writeUInt8=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,1,255,0),this[u]=o&255,u+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,2,65535,0),this[u]=o&255,this[u+1]=o>>>8,u+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,2,65535,0),this[u]=o>>>8,this[u+1]=o&255,u+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,4,4294967295,0),this[u+3]=o>>>24,this[u+2]=o>>>16,this[u+1]=o>>>8,this[u]=o&255,u+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,4,4294967295,0),this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255,u+4};function _(p,o,u,y,k){Pe(o,y,k,p,u,7);let A=Number(o&BigInt(4294967295));p[u++]=A,A=A>>8,p[u++]=A,A=A>>8,p[u++]=A,A=A>>8,p[u++]=A;let b=Number(o>>BigInt(32)&BigInt(4294967295));return p[u++]=b,b=b>>8,p[u++]=b,b=b>>8,p[u++]=b,b=b>>8,p[u++]=b,u}function j(p,o,u,y,k){Pe(o,y,k,p,u,7);let A=Number(o&BigInt(4294967295));p[u+7]=A,A=A>>8,p[u+6]=A,A=A>>8,p[u+5]=A,A=A>>8,p[u+4]=A;let b=Number(o>>BigInt(32)&BigInt(4294967295));return p[u+3]=b,b=b>>8,p[u+2]=b,b=b>>8,p[u+1]=b,b=b>>8,p[u]=b,u+8}l.prototype.writeBigUInt64LE=Xe(function(o,u=0){return _(this,o,u,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Xe(function(o,u=0){return j(this,o,u,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(o,u,y,k){if(o=+o,u=u>>>0,!k){const ce=Math.pow(2,8*y-1);I(this,o,u,y,ce-1,-ce)}let A=0,b=1,V=0;for(this[u]=o&255;++A<y&&(b*=256);)o<0&&V===0&&this[u+A-1]!==0&&(V=1),this[u+A]=(o/b>>0)-V&255;return u+y},l.prototype.writeIntBE=function(o,u,y,k){if(o=+o,u=u>>>0,!k){const ce=Math.pow(2,8*y-1);I(this,o,u,y,ce-1,-ce)}let A=y-1,b=1,V=0;for(this[u+A]=o&255;--A>=0&&(b*=256);)o<0&&V===0&&this[u+A+1]!==0&&(V=1),this[u+A]=(o/b>>0)-V&255;return u+y},l.prototype.writeInt8=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,1,127,-128),o<0&&(o=255+o+1),this[u]=o&255,u+1},l.prototype.writeInt16LE=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,2,32767,-32768),this[u]=o&255,this[u+1]=o>>>8,u+2},l.prototype.writeInt16BE=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,2,32767,-32768),this[u]=o>>>8,this[u+1]=o&255,u+2},l.prototype.writeInt32LE=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,4,2147483647,-2147483648),this[u]=o&255,this[u+1]=o>>>8,this[u+2]=o>>>16,this[u+3]=o>>>24,u+4},l.prototype.writeInt32BE=function(o,u,y){return o=+o,u=u>>>0,y||I(this,o,u,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255,u+4},l.prototype.writeBigInt64LE=Xe(function(o,u=0){return _(this,o,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Xe(function(o,u=0){return j(this,o,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function F(p,o,u,y,k,A){if(u+y>p.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function W(p,o,u,y,k){return o=+o,u=u>>>0,k||F(p,o,u,4),t.write(p,o,u,y,23,4),u+4}l.prototype.writeFloatLE=function(o,u,y){return W(this,o,u,!0,y)},l.prototype.writeFloatBE=function(o,u,y){return W(this,o,u,!1,y)};function J(p,o,u,y,k){return o=+o,u=u>>>0,k||F(p,o,u,8),t.write(p,o,u,y,52,8),u+8}l.prototype.writeDoubleLE=function(o,u,y){return J(this,o,u,!0,y)},l.prototype.writeDoubleBE=function(o,u,y){return J(this,o,u,!1,y)},l.prototype.copy=function(o,u,y,k){if(!l.isBuffer(o))throw new TypeError("argument should be a Buffer");if(y||(y=0),!k&&k!==0&&(k=this.length),u>=o.length&&(u=o.length),u||(u=0),k>0&&k<y&&(k=y),k===y||o.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("sourceEnd out of bounds");k>this.length&&(k=this.length),o.length-u<k-y&&(k=o.length-u+y);const A=k-y;return this===o&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,y,k):Uint8Array.prototype.set.call(o,this.subarray(y,k),u),A},l.prototype.fill=function(o,u,y,k){if(typeof o=="string"){if(typeof u=="string"?(k=u,u=0,y=this.length):typeof y=="string"&&(k=y,y=this.length),k!==void 0&&typeof k!="string")throw new TypeError("encoding must be a string");if(typeof k=="string"&&!l.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(o.length===1){const b=o.charCodeAt(0);(k==="utf8"&&b<128||k==="latin1")&&(o=b)}}else typeof o=="number"?o=o&255:typeof o=="boolean"&&(o=Number(o));if(u<0||this.length<u||this.length<y)throw new RangeError("Out of range index");if(y<=u)return this;u=u>>>0,y=y===void 0?this.length:y>>>0,o||(o=0);let A;if(typeof o=="number")for(A=u;A<y;++A)this[A]=o;else{const b=l.isBuffer(o)?o:l.from(o,k),V=b.length;if(V===0)throw new TypeError('The value "'+o+'" is invalid for argument "value"');for(A=0;A<y-u;++A)this[A+u]=b[A%V]}return this};const Y={};function $(p,o,u){Y[p]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:o.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(k){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:k,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}$("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(p,o){return`The "${p}" argument must be of type number. Received type ${typeof o}`},TypeError),$("ERR_OUT_OF_RANGE",function(p,o,u){let y=`The value of "${p}" is out of range.`,k=u;return Number.isInteger(u)&&Math.abs(u)>2**32?k=X(String(u)):typeof u=="bigint"&&(k=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(k=X(k)),k+="n"),y+=` It must be ${o}. Received ${k}`,y},RangeError);function X(p){let o="",u=p.length;const y=p[0]==="-"?1:0;for(;u>=y+4;u-=3)o=`_${p.slice(u-3,u)}${o}`;return`${p.slice(0,u)}${o}`}function Me(p,o,u){ze(o,"offset"),(p[o]===void 0||p[o+u]===void 0)&&ve(o,p.length-(u+1))}function Pe(p,o,u,y,k,A){if(p>u||p<o){const b=typeof o=="bigint"?"n":"";let V;throw A>3?o===0||o===BigInt(0)?V=`>= 0${b} and < 2${b} ** ${(A+1)*8}${b}`:V=`>= -(2${b} ** ${(A+1)*8-1}${b}) and < 2 ** ${(A+1)*8-1}${b}`:V=`>= ${o}${b} and <= ${u}${b}`,new Y.ERR_OUT_OF_RANGE("value",V,p)}Me(y,k,A)}function ze(p,o){if(typeof p!="number")throw new Y.ERR_INVALID_ARG_TYPE(o,"number",p)}function ve(p,o,u){throw Math.floor(p)!==p?(ze(p,u),new Y.ERR_OUT_OF_RANGE(u||"offset","an integer",p)):o<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(u||"offset",`>= ${u?1:0} and <= ${o}`,p)}const hn=/[^+/0-9A-Za-z-_]/g;function nt(p){if(p=p.split("=")[0],p=p.trim().replace(hn,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function Un(p,o){o=o||1/0;let u;const y=p.length;let k=null;const A=[];for(let b=0;b<y;++b){if(u=p.charCodeAt(b),u>55295&&u<57344){if(!k){if(u>56319){(o-=3)>-1&&A.push(239,191,189);continue}else if(b+1===y){(o-=3)>-1&&A.push(239,191,189);continue}k=u;continue}if(u<56320){(o-=3)>-1&&A.push(239,191,189),k=u;continue}u=(k-55296<<10|u-56320)+65536}else k&&(o-=3)>-1&&A.push(239,191,189);if(k=null,u<128){if((o-=1)<0)break;A.push(u)}else if(u<2048){if((o-=2)<0)break;A.push(u>>6|192,u&63|128)}else if(u<65536){if((o-=3)<0)break;A.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((o-=4)<0)break;A.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return A}function Qt(p){const o=[];for(let u=0;u<p.length;++u)o.push(p.charCodeAt(u)&255);return o}function v(p,o){let u,y,k;const A=[];for(let b=0;b<p.length&&!((o-=2)<0);++b)u=p.charCodeAt(b),y=u>>8,k=u%256,A.push(k),A.push(y);return A}function tt(p){return e.toByteArray(nt(p))}function Pn(p,o,u,y){let k;for(k=0;k<y&&!(k+u>=o.length||k>=p.length);++k)o[k+u]=p[k];return k}function Be(p,o){return p instanceof o||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===o.name}function Ft(p){return p!==p}const Ko=function(){const p="0123456789abcdef",o=new Array(256);for(let u=0;u<16;++u){const y=u*16;for(let k=0;k<16;++k)o[y+k]=p[u]+p[k]}return o}();function Xe(p){return typeof BigInt>"u"?Jo:p}function Jo(){throw new Error("BigInt not supported")}})(Mi);var Ii={exports:{}},pe=Ii.exports={},Qe,Fe;function Sa(){throw new Error("setTimeout has not been defined")}function Aa(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Qe=setTimeout:Qe=Sa}catch{Qe=Sa}try{typeof clearTimeout=="function"?Fe=clearTimeout:Fe=Aa}catch{Fe=Aa}})();function Si(n){if(Qe===setTimeout)return setTimeout(n,0);if((Qe===Sa||!Qe)&&setTimeout)return Qe=setTimeout,setTimeout(n,0);try{return Qe(n,0)}catch{try{return Qe.call(null,n,0)}catch{return Qe.call(this,n,0)}}}function il(n){if(Fe===clearTimeout)return clearTimeout(n);if((Fe===Aa||!Fe)&&clearTimeout)return Fe=clearTimeout,clearTimeout(n);try{return Fe(n)}catch{try{return Fe.call(null,n)}catch{return Fe.call(this,n)}}}var qe=[],wn=!1,ln,lt=-1;function ol(){!wn||!ln||(wn=!1,ln.length?qe=ln.concat(qe):lt=-1,qe.length&&Ai())}function Ai(){if(!wn){var n=Si(ol);wn=!0;for(var e=qe.length;e;){for(ln=qe,qe=[];++lt<e;)ln&&ln[lt].run();lt=-1,e=qe.length}ln=null,wn=!1,il(n)}}pe.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];qe.push(new Ei(n,e)),qe.length===1&&!wn&&Si(Ai)};function Ei(n,e){this.fun=n,this.array=e}Ei.prototype.run=function(){this.fun.apply(null,this.array)};pe.title="browser";pe.browser=!0;pe.env={};pe.argv=[];pe.version="";pe.versions={};function Je(){}pe.on=Je;pe.addListener=Je;pe.once=Je;pe.off=Je;pe.removeListener=Je;pe.removeAllListeners=Je;pe.emit=Je;pe.prependListener=Je;pe.prependOnceListener=Je;pe.listeners=function(n){return[]};pe.binding=function(n){throw new Error("process.binding is not supported")};pe.cwd=function(){return"/"};pe.chdir=function(n){throw new Error("process.chdir is not supported")};pe.umask=function(){return 0};var cl=Ii.exports;(function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const e=Mi,t=cl,a=i=>i&&i.__esModule?i:{default:i},s=a(t),r=globalThis||void 0||self;Object.defineProperty(n,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(n,"process",{enumerable:!0,get:()=>s.default}),n.global=r})(G);function ll(){const n=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof n.getBigInt64=="function"&&typeof n.getBigUint64=="function"&&typeof n.setBigInt64=="function"&&typeof n.setBigUint64=="function"&&(typeof G.process!="object"||typeof G.process.env!="object"||!1)){const s=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),i=BigInt("0"),l=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(m){const d=typeof m=="bigint"?m:BigInt(m);if(d>r||d<s)throw new Error(`int64 invalid: ${m}`);return d},uParse(m){const d=typeof m=="bigint"?m:BigInt(m);if(d>l||d<i)throw new Error(`uint64 invalid: ${m}`);return d},enc(m){return n.setBigInt64(0,this.parse(m),!0),{lo:n.getInt32(0,!0),hi:n.getInt32(4,!0)}},uEnc(m){return n.setBigInt64(0,this.uParse(m),!0),{lo:n.getInt32(0,!0),hi:n.getInt32(4,!0)}},dec(m,d){return n.setInt32(0,m,!0),n.setInt32(4,d,!0),n.getBigInt64(0,!0)},uDec(m,d){return n.setInt32(0,m,!0),n.setInt32(4,d,!0),n.getBigUint64(0,!0)}}}const t=s=>be(/^-?[0-9]+$/.test(s),`int64 invalid: ${s}`),a=s=>be(/^[0-9]+$/.test(s),`uint64 invalid: ${s}`);return{zero:"0",supported:!1,parse(s){return typeof s!="string"&&(s=s.toString()),t(s),s},uParse(s){return typeof s!="string"&&(s=s.toString()),a(s),s},enc(s){return typeof s!="string"&&(s=s.toString()),t(s),Es(s)},uEnc(s){return typeof s!="string"&&(s=s.toString()),a(s),Es(s)},dec(s,r){return Hc(s,r)},uDec(s,r){return hi(s,r)}}}const he=ll();var de;(function(n){n[n.Varint=0]="Varint",n[n.Bit64=1]="Bit64",n[n.LengthDelimited=2]="LengthDelimited",n[n.StartGroup=3]="StartGroup",n[n.EndGroup=4]="EndGroup",n[n.Bit32=5]="Bit32"})(de||(de={}));class ul{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let s=0;s<this.chunks.length;s++)e+=this.chunks[s].length;let t=new Uint8Array(e),a=0;for(let s=0;s<this.chunks.length;s++)t.set(this.chunks[s],a),a+=this.chunks[s].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(Ia(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return ot(e),Ds(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){pi(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){Ia(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){ot(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return ot(e),e=(e<<1^e>>31)>>>0,Ds(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),a=new DataView(t.buffer),s=he.enc(e);return a.setInt32(0,s.lo,!0),a.setInt32(4,s.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),a=new DataView(t.buffer),s=he.uEnc(e);return a.setInt32(0,s.lo,!0),a.setInt32(4,s.hi,!0),this.raw(t)}int64(e){let t=he.enc(e);return $t(t.lo,t.hi,this.buf),this}sint64(e){let t=he.enc(e),a=t.hi>>31,s=t.lo<<1^a,r=(t.hi<<1|t.lo>>>31)^a;return $t(s,r,this.buf),this}uint64(e){let t=he.uEnc(e);return $t(t.lo,t.hi,this.buf),this}}class ml{constructor(e,t){this.varint64=Wc,this.uint32=Kc,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=t??new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,a=e&7;if(t<=0||a<0||a>5)throw new Error("illegal tag: field no "+t+" wire type "+a);return[t,a]}skip(e){let t=this.pos;switch(e){case de.Varint:for(;this.buf[this.pos++]&128;);break;case de.Bit64:this.pos+=4;case de.Bit32:this.pos+=4;break;case de.LengthDelimited:let a=this.uint32();this.pos+=a;break;case de.StartGroup:let s;for(;(s=this.tag()[1])!==de.EndGroup;)this.skip(s);break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return he.dec(...this.varint64())}uint64(){return he.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),a=-(e&1);return e=(e>>>1|(t&1)<<31)^a,t=t>>>1^a,he.dec(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return he.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return he.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}function Ea(n,e){return e instanceof Ve||!n.fieldWrapper?e:n.fieldWrapper.wrapField(e)}w.DOUBLE,w.FLOAT,w.INT64,w.UINT64,w.INT32,w.UINT32,w.BOOL,w.STRING,w.BYTES;function en(n,e,t){if(e===t)return!0;if(n==w.BYTES){if(!(e instanceof Uint8Array)||!(t instanceof Uint8Array)||e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}switch(n){case w.UINT64:case w.FIXED64:case w.INT64:case w.SFIXED64:case w.SINT64:return e==t}return!1}function ba(n,e){switch(n){case w.BOOL:return!1;case w.UINT64:case w.FIXED64:case w.INT64:case w.SFIXED64:case w.SINT64:return e==0?he.zero:"0";case w.DOUBLE:case w.FLOAT:return 0;case w.BYTES:return new Uint8Array(0);case w.STRING:return"";default:return 0}}function bi(n,e){const t=e===void 0;let a=de.Varint,s=e===0;switch(n){case w.STRING:s=t||!e.length,a=de.LengthDelimited;break;case w.BOOL:s=e===!1;break;case w.DOUBLE:a=de.Bit64;break;case w.FLOAT:a=de.Bit32;break;case w.INT64:s=t||e==0;break;case w.UINT64:s=t||e==0;break;case w.FIXED64:s=t||e==0,a=de.Bit64;break;case w.BYTES:s=t||!e.byteLength,a=de.LengthDelimited;break;case w.FIXED32:a=de.Bit32;break;case w.SFIXED32:a=de.Bit32;break;case w.SFIXED64:s=t||e==0,a=de.Bit64;break;case w.SINT64:s=t||e==0;break}const r=w[n].toLowerCase();return[a,r,t||s]}const Mn=Symbol("@bufbuild/protobuf/unknown-fields"),_s={readUnknownFields:!0,readerFactory:n=>new ml(n)},ws={writeUnknownFields:!0,writerFactory:()=>new ul};function dl(n){return n?Object.assign(Object.assign({},_s),n):_s}function pl(n){return n?Object.assign(Object.assign({},ws),n):ws}function gl(){return{makeReadOptions:dl,makeWriteOptions:pl,listUnknownFields(n){var e;return(e=n[Mn])!==null&&e!==void 0?e:[]},discardUnknownFields(n){delete n[Mn]},writeUnknownFields(n,e){const a=n[Mn];if(a)for(const s of a)e.tag(s.no,s.wireType).raw(s.data)},onUnknownField(n,e,t,a){const s=n;Array.isArray(s[Mn])||(s[Mn]=[]),s[Mn].push({no:e,wireType:t,data:a})},readMessage(n,e,t,a){const s=n.getType(),r=t===void 0?e.len:e.pos+t;for(;e.pos<r;){const[i,l]=e.tag(),m=s.fields.find(i);if(!m){const h=e.skip(l);a.readUnknownFields&&this.onUnknownField(n,i,l,h);continue}let d=n,g=m.repeated,T=m.localName;switch(m.oneof&&(d=d[m.oneof.localName],d.case!=T&&delete d.value,d.case=T,T="value"),m.kind){case"scalar":case"enum":const h=m.kind=="enum"?w.INT32:m.T;let M=ft;if(m.kind=="scalar"&&m.L>0&&(M=fl),g){let O=d[T];if(l==de.LengthDelimited&&h!=w.STRING&&h!=w.BYTES){let R=e.uint32()+e.pos;for(;e.pos<R;)O.push(M(e,h))}else O.push(M(e,h))}else d[T]=M(e,h);break;case"message":const E=m.T;g?d[T].push(ut(e,new E,a)):d[T]instanceof Ve?ut(e,d[T],a):(d[T]=ut(e,new E,a),E.fieldWrapper&&!m.oneof&&!m.repeated&&(d[T]=E.fieldWrapper.unwrapField(d[T])));break;case"map":let[D,L]=yl(m,e,a);d[T][D]=L;break}}}}}function ut(n,e,t){return e.getType().runtime.bin.readMessage(e,n,n.uint32(),t),e}function yl(n,e,t){const a=e.uint32(),s=e.pos+a;let r,i;for(;e.pos<s;){let[l]=e.tag();switch(l){case 1:r=ft(e,n.K);break;case 2:switch(n.V.kind){case"scalar":i=ft(e,n.V.T);break;case"enum":i=e.int32();break;case"message":i=ut(e,new n.V.T,t);break}break}}if(r===void 0){let l=ba(n.K,yn.BIGINT);r=n.K==w.BOOL?l.toString():l}if(typeof r!="string"&&typeof r!="number"&&(r=r.toString()),i===void 0)switch(n.V.kind){case"scalar":i=ba(n.V.T,yn.BIGINT);break;case"enum":i=0;break;case"message":i=new n.V.T;break}return[r,i]}function fl(n,e){const t=ft(n,e);return typeof t=="bigint"?t.toString():t}function ft(n,e){switch(e){case w.STRING:return n.string();case w.BOOL:return n.bool();case w.DOUBLE:return n.double();case w.FLOAT:return n.float();case w.INT32:return n.int32();case w.INT64:return n.int64();case w.UINT64:return n.uint64();case w.FIXED64:return n.fixed64();case w.BYTES:return n.bytes();case w.FIXED32:return n.fixed32();case w.SFIXED32:return n.sfixed32();case w.SFIXED64:return n.sfixed64();case w.SINT64:return n.sint64();case w.UINT32:return n.uint32();case w.SINT32:return n.sint32()}}function Tl(n,e,t,a,s){n.tag(t.no,de.LengthDelimited),n.fork();let r=a;switch(t.K){case w.INT32:case w.FIXED32:case w.UINT32:case w.SFIXED32:case w.SINT32:r=Number.parseInt(a);break;case w.BOOL:be(a=="true"||a=="false"),r=a=="true";break}switch(Yn(n,t.K,1,r,!0),t.V.kind){case"scalar":Yn(n,t.V.T,2,s,!0);break;case"enum":Yn(n,w.INT32,2,s,!0);break;case"message":Da(n,e,t.V.T,2,s);break}n.join()}function Da(n,e,t,a,s){if(s!==void 0){const r=Ea(t,s);n.tag(a,de.LengthDelimited).bytes(r.toBinary(e))}}function Yn(n,e,t,a,s){let[r,i,l]=bi(e,a);(!l||s)&&n.tag(t,r)[i](a)}function hl(n,e,t,a){if(!a.length)return;n.tag(t,de.LengthDelimited).fork();let[,s]=bi(e);for(let r=0;r<a.length;r++)n[s](a[r]);n.join()}function kl(){return Object.assign(Object.assign({},gl()),{writeMessage(n,e,t){const a=n.getType();for(const s of a.fields.byNumber()){let r,i=s.repeated,l=s.localName;if(s.oneof){const m=n[s.oneof.localName];if(m.case!==l)continue;r=m.value}else r=n[l];switch(s.kind){case"scalar":case"enum":let m=s.kind=="enum"?w.INT32:s.T;if(i)if(s.packed)hl(e,m,s.no,r);else for(const d of r)Yn(e,m,s.no,d,!0);else r!==void 0&&Yn(e,m,s.no,r,!!s.oneof||s.opt);break;case"message":if(i)for(const d of r)Da(e,t,s.T,s.no,d);else Da(e,t,s.T,s.no,r);break;case"map":for(const[d,g]of Object.entries(r))Tl(e,t,s,d,g);break}}return t.writeUnknownFields&&this.writeUnknownFields(n,e),e}})}let $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Dt=[];for(let n=0;n<$e.length;n++)Dt[$e[n].charCodeAt(0)]=n;Dt["-".charCodeAt(0)]=$e.indexOf("+");Dt["_".charCodeAt(0)]=$e.indexOf("/");const Va={dec(n){let e=n.length*3/4;n[n.length-2]=="="?e-=2:n[n.length-1]=="="&&(e-=1);let t=new Uint8Array(e),a=0,s=0,r,i=0;for(let l=0;l<n.length;l++){if(r=Dt[n.charCodeAt(l)],r===void 0)switch(n[l]){case"=":s=0;case`
|
|
15
|
-
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:i=r,s=1;break;case 1:t[a++]=i<<2|(r&48)>>4,i=r,s=2;break;case 2:t[a++]=(i&15)<<4|(r&60)>>2,i=r,s=3;break;case 3:t[a++]=(i&3)<<6|r,s=0;break}}if(s==1)throw Error("invalid base64 string.");return t.subarray(0,a)},enc(n){let e="",t=0,a,s=0;for(let r=0;r<n.length;r++)switch(a=n[r],t){case 0:e+=$e[a>>2],s=(a&3)<<4,t=1;break;case 1:e+=$e[s|a>>4],s=(a&15)<<2,t=2;break;case 2:e+=$e[s|a>>6],e+=$e[a&63],t=0;break}return t&&(e+=$e[s],e+="=",t==1&&(e+="=")),e}},vs={ignoreUnknownFields:!1},Os={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function Ml(n){return n?Object.assign(Object.assign({},vs),n):vs}function Nl(n){return n?Object.assign(Object.assign({},Os),n):Os}function Il(n){const e=n(Sl,js);return{makeReadOptions:Ml,makeWriteOptions:Nl,readMessage(t,a,s,r){if(a==null||Array.isArray(a)||typeof a!="object")throw new Error(`cannot decode message ${t.typeName} from JSON: ${this.debug(a)}`);r=r??new t;const i={};for(const[l,m]of Object.entries(a)){const d=t.fields.findJsonName(l);if(!d){if(!s.ignoreUnknownFields)throw new Error(`cannot decode message ${t.typeName} from JSON: key "${l}" is unknown`);continue}let g=d.localName,T=r;if(d.oneof){if(m===null&&d.kind=="scalar")continue;const h=i[d.oneof.localName];if(h)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${d.oneof.name}" present: "${h}", "${l}"`);i[d.oneof.localName]=l,T=T[d.oneof.localName]={case:g},g="value"}if(d.repeated){if(m===null)continue;if(!Array.isArray(m))throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`);const h=T[g];for(const M of m){if(M===null)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(M)}`);let E;switch(d.kind){case"message":E=d.T.fromJson(M,s);break;case"enum":if(E=Wt(d.T,M,s.ignoreUnknownFields),E===void 0)continue;break;case"scalar":try{E=Bn(d.T,M,d.L)}catch(D){let L=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(M)}`;throw D instanceof Error&&D.message.length>0&&(L+=`: ${D.message}`),new Error(L)}break}h.push(E)}}else if(d.kind=="map"){if(m===null)continue;if(Array.isArray(m)||typeof m!="object")throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`);const h=T[g];for(const[M,E]of Object.entries(m)){if(E===null)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: map value null`);let D;switch(d.V.kind){case"message":D=d.V.T.fromJson(E,s);break;case"enum":if(D=Wt(d.V.T,E,s.ignoreUnknownFields),D===void 0)continue;break;case"scalar":try{D=Bn(d.V.T,E,yn.BIGINT)}catch(L){let O=`cannot decode map value for field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw L instanceof Error&&L.message.length>0&&(O+=`: ${L.message}`),new Error(O)}break}try{h[Bn(d.K,d.K==w.BOOL?M=="true"?!0:M=="false"?!1:M:M,yn.BIGINT).toString()]=D}catch(L){let O=`cannot decode map key for field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw L instanceof Error&&L.message.length>0&&(O+=`: ${L.message}`),new Error(O)}}}else switch(d.kind){case"message":const h=d.T;if(m===null&&h.typeName!="google.protobuf.Value"){if(d.oneof)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: null is invalid for oneof field "${l}"`);continue}T[g]instanceof Ve?T[g].fromJson(m,s):(T[g]=h.fromJson(m,s),h.fieldWrapper&&!d.oneof&&(T[g]=h.fieldWrapper.unwrapField(T[g])));break;case"enum":const M=Wt(d.T,m,s.ignoreUnknownFields);M!==void 0&&(T[g]=M);break;case"scalar":try{T[g]=Bn(d.T,m,d.L)}catch(E){let D=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw E instanceof Error&&E.message.length>0&&(D+=`: ${E.message}`),new Error(D)}break}}return r},writeMessage(t,a){const s=t.getType(),r={};let i;try{for(const l of s.fields.byMember()){let m;if(l.kind=="oneof"){const d=t[l.localName];if(d.value===void 0)continue;if(i=l.findField(d.case),!i)throw"oneof case not found: "+d.case;m=e(i,d.value,a)}else i=l,m=e(i,t[i.localName],a);m!==void 0&&(r[a.useProtoFieldName?i.name:i.jsonName]=m)}}catch(l){const m=i?`cannot encode field ${s.typeName}.${i.name} to JSON`:`cannot encode message ${s.typeName} to JSON`,d=l instanceof Error?l.message:String(l);throw new Error(m+(d.length>0?`: ${d}`:""))}return r},readScalar:Bn,writeScalar:js,debug:Di}}function Di(n){if(n===null)return"null";switch(typeof n){case"object":return Array.isArray(n)?"array":"object";case"string":return n.length>100?"string":`"${n.split('"').join('\\"')}"`;default:return String(n)}}function Bn(n,e,t){switch(n){case w.DOUBLE:case w.FLOAT:if(e===null)return 0;if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""||typeof e=="string"&&e.trim().length!==e.length||typeof e!="string"&&typeof e!="number")break;const a=Number(e);if(Number.isNaN(a)||!Number.isFinite(a))break;return n==w.FLOAT&&pi(a),a;case w.INT32:case w.FIXED32:case w.SFIXED32:case w.SINT32:case w.UINT32:if(e===null)return 0;let s;if(typeof e=="number"?s=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(s=Number(e)),s===void 0)break;return n==w.UINT32?Ia(s):ot(s),s;case w.INT64:case w.SFIXED64:case w.SINT64:if(e===null)return he.zero;if(typeof e!="number"&&typeof e!="string")break;const r=he.parse(e);return t?r.toString():r;case w.FIXED64:case w.UINT64:if(e===null)return he.zero;if(typeof e!="number"&&typeof e!="string")break;const i=he.uParse(e);return t?i.toString():i;case w.BOOL:if(e===null)return!1;if(typeof e!="boolean")break;return e;case w.STRING:if(e===null)return"";if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case w.BYTES:if(e===null||e==="")return new Uint8Array(0);if(typeof e!="string")break;return Va.dec(e)}throw new Error}function Wt(n,e,t){if(e===null)return 0;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":const a=n.findName(e);if(a||t)return a==null?void 0:a.no;break}throw new Error(`cannot decode enum ${n.typeName} from JSON: ${Di(e)}`)}function Sl(n,e,t,a){var s;if(e===void 0)return e;if(e===0&&!t)return;if(a)return e;if(n.typeName=="google.protobuf.NullValue")return null;const r=n.findNumber(e);return(s=r==null?void 0:r.name)!==null&&s!==void 0?s:e}function js(n,e,t){if(e!==void 0)switch(n){case w.INT32:case w.SFIXED32:case w.SINT32:case w.FIXED32:case w.UINT32:return be(typeof e=="number"),e!=0||t?e:void 0;case w.FLOAT:case w.DOUBLE:return be(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e!==0||t?e:void 0;case w.STRING:return be(typeof e=="string"),e.length>0||t?e:void 0;case w.BOOL:return be(typeof e=="boolean"),e||t?e:void 0;case w.UINT64:case w.FIXED64:case w.INT64:case w.SFIXED64:case w.SINT64:return be(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),t||e!=0?e.toString(10):void 0;case w.BYTES:return be(e instanceof Uint8Array),t||e.byteLength>0?Va.enc(e):void 0}}function Al(){return Il((n,e)=>function(a,s,r){if(a.kind=="map"){const i={};switch(a.V.kind){case"scalar":for(const[m,d]of Object.entries(s)){const g=e(a.V.T,d,!0);be(g!==void 0),i[m.toString()]=g}break;case"message":for(const[m,d]of Object.entries(s))i[m.toString()]=d.toJson(r);break;case"enum":const l=a.V.T;for(const[m,d]of Object.entries(s)){be(d===void 0||typeof d=="number");const g=n(l,d,!0,r.enumAsInteger);be(g!==void 0),i[m.toString()]=g}break}return r.emitDefaultValues||Object.keys(i).length>0?i:void 0}else if(a.repeated){const i=[];switch(a.kind){case"scalar":for(let l=0;l<s.length;l++)i.push(e(a.T,s[l],!0));break;case"enum":for(let l=0;l<s.length;l++)i.push(n(a.T,s[l],!0,r.enumAsInteger));break;case"message":for(let l=0;l<s.length;l++)i.push(Ea(a.T,s[l]).toJson(r));break}return r.emitDefaultValues||i.length>0?i:void 0}else switch(a.kind){case"scalar":return e(a.T,s,!!a.oneof||a.opt||r.emitDefaultValues);case"enum":return n(a.T,s,!!a.oneof||a.opt||r.emitDefaultValues,r.enumAsInteger);case"message":return s!==void 0?Ea(a.T,s).toJson(r):void 0}})}function El(){return{setEnumType:yi,initPartial(n,e){if(n===void 0)return;const t=e.getType();for(const a of t.fields.byMember()){const s=a.localName,r=e,i=n;if(i[s]!==void 0)switch(a.kind){case"oneof":const l=i[s].case;if(l===void 0)continue;const m=a.findField(l);let d=i[s].value;m&&m.kind=="message"&&!(d instanceof m.T)?d=new m.T(d):m&&m.kind==="scalar"&&m.T===w.BYTES&&(d=Qn(d)),r[s]={case:l,value:d};break;case"scalar":case"enum":let g=i[s];a.T===w.BYTES&&(g=a.repeated?g.map(Qn):Qn(g)),r[s]=g;break;case"map":switch(a.V.kind){case"scalar":case"enum":if(a.V.T===w.BYTES)for(const[M,E]of Object.entries(i[s]))r[s][M]=Qn(E);else Object.assign(r[s],i[s]);break;case"message":const h=a.V.T;for(const M of Object.keys(i[s])){let E=i[s][M];h.fieldWrapper||(E=new h(E)),r[s][M]=E}break}break;case"message":const T=a.T;if(a.repeated)r[s]=i[s].map(h=>h instanceof T?h:new T(h));else if(i[s]!==void 0){const h=i[s];T.fieldWrapper?T.typeName==="google.protobuf.BytesValue"?r[s]=Qn(h):r[s]=h:r[s]=h instanceof T?h:new T(h)}break}}},equals(n,e,t){return e===t?!0:!e||!t?!1:n.fields.byMember().every(a=>{const s=e[a.localName],r=t[a.localName];if(a.repeated){if(s.length!==r.length)return!1;switch(a.kind){case"message":return s.every((i,l)=>a.T.equals(i,r[l]));case"scalar":return s.every((i,l)=>en(a.T,i,r[l]));case"enum":return s.every((i,l)=>en(w.INT32,i,r[l]))}throw new Error(`repeated cannot contain ${a.kind}`)}switch(a.kind){case"message":return a.T.equals(s,r);case"enum":return en(w.INT32,s,r);case"scalar":return en(a.T,s,r);case"oneof":if(s.case!==r.case)return!1;const i=a.findField(s.case);if(i===void 0)return!0;switch(i.kind){case"message":return i.T.equals(s.value,r.value);case"enum":return en(w.INT32,s.value,r.value);case"scalar":return en(i.T,s.value,r.value)}throw new Error(`oneof cannot contain ${i.kind}`);case"map":const l=Object.keys(s).concat(Object.keys(r));switch(a.V.kind){case"message":const m=a.V.T;return l.every(g=>m.equals(s[g],r[g]));case"enum":return l.every(g=>en(w.INT32,s[g],r[g]));case"scalar":const d=a.V.T;return l.every(g=>en(d,s[g],r[g]))}break}})},clone(n){const e=n.getType(),t=new e,a=t;for(const s of e.fields.byMember()){const r=n[s.localName];let i;if(s.repeated)i=r.map(at);else if(s.kind=="map"){i=a[s.localName];for(const[l,m]of Object.entries(r))i[l]=at(m)}else s.kind=="oneof"?i=s.findField(r.case)?{case:r.case,value:at(r.value)}:{case:void 0}:i=at(r);a[s.localName]=i}return t}}}function at(n){if(n===void 0)return n;if(n instanceof Ve)return n.clone();if(n instanceof Uint8Array){const e=new Uint8Array(n.byteLength);return e.set(n),e}return n}function Qn(n){return n instanceof Uint8Array?n:new Uint8Array(n)}class bl{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){const t={};for(const a of this.list())t[a.jsonName]=t[a.name]=a;this.jsonNames=t}return this.jsonNames[e]}find(e){if(!this.numbers){const t={};for(const a of this.list())t[a.no]=a;this.numbers=t}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,t)=>e.no-t.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let t;for(const a of this.list())a.oneof?a.oneof!==t&&(t=a.oneof,e.push(t)):e.push(a)}return this.members}}function _i(n,e){const t=wi(n);return e?t:jl(Ol(t))}function Dl(n){return _i(n,!1)}const _l=wi;function wi(n){let e=!1;const t=[];for(let a=0;a<n.length;a++){let s=n.charAt(a);switch(s){case"_":e=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":t.push(s),e=!1;break;default:e&&(e=!1,s=s.toUpperCase()),t.push(s);break}}return t.join("")}const wl=new Set(["constructor","toString","toJSON","valueOf"]),vl=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),vi=n=>`${n}$`,Ol=n=>vl.has(n)?vi(n):n,jl=n=>wl.has(n)?vi(n):n;class Ll{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=Dl(e)}addField(e){be(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let t=0;t<this.fields.length;t++)this._lookup[this.fields[t].localName]=this.fields[t]}return this._lookup[e]}}const c=qc("proto3",Al(),kl(),Object.assign(Object.assign({},El()),{newFieldList(n){return new bl(n,Rl)},initFields(n){for(const e of n.getType().fields.byMember()){if(e.opt)continue;const t=e.localName,a=n;if(e.repeated){a[t]=[];continue}switch(e.kind){case"oneof":a[t]={case:void 0};break;case"enum":a[t]=0;break;case"map":a[t]={};break;case"scalar":a[t]=ba(e.T,e.L);break}}}}));function Rl(n){var e,t,a,s;const r=[];let i;for(const l of typeof n=="function"?n():n){const m=l;if(m.localName=_i(l.name,l.oneof!==void 0),m.jsonName=(e=l.jsonName)!==null&&e!==void 0?e:_l(l.name),m.repeated=(t=l.repeated)!==null&&t!==void 0?t:!1,l.kind=="scalar"&&(m.L=(a=l.L)!==null&&a!==void 0?a:yn.BIGINT),m.packed=(s=l.packed)!==null&&s!==void 0?s:l.kind=="enum"||l.kind=="scalar"&&l.T!=w.BYTES&&l.T!=w.STRING,l.oneof!==void 0){const d=typeof l.oneof=="string"?l.oneof:l.oneof.name;(!i||i.name!=d)&&(i=new Ll(d)),m.oneof=i,i.addField(m)}r.push(m)}return r}var P;(function(n){n[n.Unary=0]="Unary",n[n.ServerStreaming=1]="ServerStreaming",n[n.ClientStreaming=2]="ClientStreaming",n[n.BiDiStreaming=3]="BiDiStreaming"})(P||(P={}));var Ls;(function(n){n[n.NoSideEffects=1]="NoSideEffects",n[n.Idempotent=2]="Idempotent"})(Ls||(Ls={}));class Ae extends Ve{constructor(e){super(),this.seconds=he.zero,this.nanos=0,c.util.initPartial(e,this)}fromJson(e,t){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${c.json.debug(e)}`);const a=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!a)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const s=Date.parse(a[1]+"-"+a[2]+"-"+a[3]+"T"+a[4]+":"+a[5]+":"+a[6]+(a[8]?a[8]:"Z"));if(Number.isNaN(s))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=he.parse(s/1e3),this.nanos=0,a[7]&&(this.nanos=parseInt("1"+a[7]+"0".repeat(9-a[7].length))-1e9),this}toJson(e){const t=Number(this.seconds)*1e3;if(t<Date.parse("0001-01-01T00:00:00Z")||t>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let a="Z";if(this.nanos>0){const s=(this.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?a="."+s.substring(0,3)+"Z":s.substring(6)==="000"?a="."+s.substring(0,6)+"Z":a="."+s+"Z"}return new Date(t).toISOString().replace(".000Z",a)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return Ae.fromDate(new Date)}static fromDate(e){const t=e.getTime();return new Ae({seconds:he.parse(Math.floor(t/1e3)),nanos:t%1e3*1e6})}static fromBinary(e,t){return new Ae().fromBinary(e,t)}static fromJson(e,t){return new Ae().fromJson(e,t)}static fromJsonString(e,t){return new Ae().fromJsonString(e,t)}static equals(e,t){return c.util.equals(Ae,e,t)}}Ae.runtime=c;Ae.typeName="google.protobuf.Timestamp";Ae.fields=c.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class Ye extends Ve{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),c.util.initPartial(e,this)}toJson(e){var t;if(this.typeUrl==="")return{};const a=this.typeUrlToName(this.typeUrl),s=(t=e==null?void 0:e.typeRegistry)===null||t===void 0?void 0:t.findMessage(a);if(!s)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let i=s.fromBinary(this.value).toJson(e);return(a.startsWith("google.protobuf.")||i===null||Array.isArray(i)||typeof i!="object")&&(i={value:i}),i["@type"]=this.typeUrl,i}fromJson(e,t){var a;if(e===null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e===null?"null":Array.isArray(e)?"array":typeof e}`);if(Object.keys(e).length==0)return this;const s=e["@type"];if(typeof s!="string"||s=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const r=this.typeUrlToName(s),i=(a=t==null?void 0:t.typeRegistry)===null||a===void 0?void 0:a.findMessage(r);if(!i)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${s} is not in the type registry`);let l;if(r.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))l=i.fromJson(e.value,t);else{const m=Object.assign({},e);delete m["@type"],l=i.fromJson(m,t)}return this.packFrom(l),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return this.is(e.getType())?(e.fromBinary(this.value),!0):!1}unpack(e){if(this.typeUrl==="")return;const t=e.findMessage(this.typeUrlToName(this.typeUrl));if(t)return t.fromBinary(this.value)}is(e){if(this.typeUrl==="")return!1;const t=this.typeUrlToName(this.typeUrl);let a="";return typeof e=="string"?a=e:a=e.typeName,t===a}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw new Error(`invalid type url: ${e}`);const t=e.lastIndexOf("/"),a=t>0?e.substring(t+1):e;if(!a.length)throw new Error(`invalid type url: ${e}`);return a}static pack(e){const t=new Ye;return t.packFrom(e),t}static fromBinary(e,t){return new Ye().fromBinary(e,t)}static fromJson(e,t){return new Ye().fromJson(e,t)}static fromJsonString(e,t){return new Ye().fromJsonString(e,t)}static equals(e,t){return c.util.equals(Ye,e,t)}}Ye.runtime=c;Ye.typeName="google.protobuf.Any";Ye.fields=c.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);var ee;(function(n){n[n.Canceled=1]="Canceled",n[n.Unknown=2]="Unknown",n[n.InvalidArgument=3]="InvalidArgument",n[n.DeadlineExceeded=4]="DeadlineExceeded",n[n.NotFound=5]="NotFound",n[n.AlreadyExists=6]="AlreadyExists",n[n.PermissionDenied=7]="PermissionDenied",n[n.ResourceExhausted=8]="ResourceExhausted",n[n.FailedPrecondition=9]="FailedPrecondition",n[n.Aborted=10]="Aborted",n[n.OutOfRange=11]="OutOfRange",n[n.Unimplemented=12]="Unimplemented",n[n.Internal=13]="Internal",n[n.Unavailable=14]="Unavailable",n[n.DataLoss=15]="DataLoss",n[n.Unauthenticated=16]="Unauthenticated"})(ee||(ee={}));function Rs(n){const e=ee[n];return typeof e!="string"?n.toString():e[0].toLowerCase()+e.substring(1).replace(/[A-Z]/g,t=>"_"+t.toLowerCase())}class ge extends Error{constructor(e,t=ee.Unknown,a,s,r){super(xl(e,t)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=t,this.metadata=new Headers(a??{}),this.details=s??[],this.cause=r}static from(e,t=ee.Unknown){return e instanceof ge?e:e instanceof Error?e.name=="AbortError"?new ge(e.message,ee.Canceled):new ge(e.message,t,void 0,void 0,e):new ge(String(e),t,void 0,void 0,e)}findDetails(e){const t="typeName"in e?{findMessage:s=>s===e.typeName?e:void 0}:e,a=[];for(const s of this.details){if(s instanceof Ve){t.findMessage(s.getType().typeName)&&a.push(s);continue}const r=t.findMessage(s.type);if(r)try{a.push(r.fromBinary(s.value))}catch{}}return a}}function xl(n,e){return n.length?`[${Rs(e)}] ${n}`:`[${Rs(e)}]`}function Cl(n,e,t){try{const a=Va.dec(n);return e?e.fromBinary(a,t):a}catch(a){throw ge.from(a,ee.DataLoss)}}function Oi(n,e){const t={};for(const[a,s]of Object.entries(n.methods)){const r=e(Object.assign(Object.assign({},s),{localName:a,service:n}));r!=null&&(t[a]=r)}return t}function xs(n){let e,t=new Uint8Array(0);function a(s){const r=new Uint8Array(t.length+s.length);r.set(t),r.set(s,t.length),t=r}return new ReadableStream({start(){e=n.getReader()},async pull(s){let r;for(;;){if(r===void 0&&t.byteLength>=5){let m=0;for(let d=1;d<5;d++)m=(m<<8)+t[d];r={flags:t[0],length:m}}if(r!==void 0&&t.byteLength>=r.length+5)break;const l=await e.read();if(l.done)break;a(l.value)}if(r===void 0){if(t.byteLength==0){s.close();return}s.error(new ge("premature end of stream",ee.DataLoss));return}const i=t.subarray(5,5+r.length);t=t.subarray(5+r.length),s.enqueue({flags:r.flags,data:i})}})}function Cs(n,e){const t=new Uint8Array(e.length+5);t.set(e,5);const a=new DataView(t.buffer,t.byteOffset,t.byteLength);return a.setUint8(0,n),a.setUint32(1,e.length),t}var zl=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},a("next"),a("throw"),a("return"),t[Symbol.asyncIterator]=function(){return this},t);function a(r){t[r]=n[r]&&function(i){return new Promise(function(l,m){i=n[r](i),s(l,m,i.done,i.value)})}}function s(r,i,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},i)}},Hn=globalThis&&globalThis.__await||function(n){return this instanceof Hn?(this.v=n,this):new Hn(n)},Ul=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=t.apply(n,e||[]),s,r=[];return s={},i("next"),i("throw"),i("return"),s[Symbol.asyncIterator]=function(){return this},s;function i(h){a[h]&&(s[h]=function(M){return new Promise(function(E,D){r.push([h,M,E,D])>1||l(h,M)})})}function l(h,M){try{m(a[h](M))}catch(E){T(r[0][3],E)}}function m(h){h.value instanceof Hn?Promise.resolve(h.value.v).then(d,g):T(r[0][2],h)}function d(h){l("next",h)}function g(h){l("throw",h)}function T(h,M){h(M),r.shift(),r.length&&l(r[0][0],r[0][1])}},Pl=globalThis&&globalThis.__asyncDelegator||function(n){var e,t;return e={},a("next"),a("throw",function(s){throw s}),a("return"),e[Symbol.iterator]=function(){return this},e;function a(s,r){e[s]=n[s]?function(i){return(t=!t)?{value:Hn(n[s](i)),done:!1}:r?r(i):i}:r}};function ji(n){return Ul(this,arguments,function*(){yield Hn(yield*Pl(zl(n)))})}var Bl=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},a("next"),a("throw"),a("return"),t[Symbol.asyncIterator]=function(){return this},t);function a(r){t[r]=n[r]&&function(i){return new Promise(function(l,m){i=n[r](i),s(l,m,i.done,i.value)})}}function s(r,i,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},i)}};function Ql(n,e){return Oi(n,t=>{switch(t.kind){case P.Unary:return Fl(e,n,t);case P.ServerStreaming:return Gl(e,n,t);default:return null}})}function Fl(n,e,t){return function(a,s,r){const i=new AbortController;return r=Li(i,r),n.unary(e,t,i.signal,r.timeoutMs,r.headers,a,r.contextValues).then(l=>{var m,d;(m=r==null?void 0:r.onHeader)===null||m===void 0||m.call(r,l.header),(d=r==null?void 0:r.onTrailer)===null||d===void 0||d.call(r,l.trailer),s(void 0,l.message)},l=>{const m=ge.from(l,ee.Internal);m.code===ee.Canceled&&i.signal.aborted||s(m,new t.O)}),()=>i.abort()}}function Gl(n,e,t){return function(a,s,r,i){const l=new AbortController;async function m(){var d,g,T,h,M,E;i=Li(l,i);const D=await n.stream(e,t,i.signal,i.timeoutMs,i.headers,ji([a]),i.contextValues);(M=i.onHeader)===null||M===void 0||M.call(i,D.header);try{for(var L=!0,O=Bl(D.message),R;R=await O.next(),d=R.done,!d;L=!0)h=R.value,L=!1,s(h)}catch(x){g={error:x}}finally{try{!L&&!d&&(T=O.return)&&await T.call(O)}finally{if(g)throw g.error}}(E=i.onTrailer)===null||E===void 0||E.call(i,D.trailer),r(void 0)}return m().catch(d=>{const g=ge.from(d,ee.Internal);g.code===ee.Canceled&&l.signal.aborted?r(void 0):r(g)}),()=>l.abort()}}function Li(n,e){return e!=null&&e.signal&&(e.signal.addEventListener("abort",()=>n.abort()),e.signal.aborted&&n.abort()),Object.assign(Object.assign({},e),{signal:n.signal})}var Ri=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},a("next"),a("throw"),a("return"),t[Symbol.asyncIterator]=function(){return this},t);function a(r){t[r]=n[r]&&function(i){return new Promise(function(l,m){i=n[r](i),s(l,m,i.done,i.value)})}}function s(r,i,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},i)}},jn=globalThis&&globalThis.__await||function(n){return this instanceof jn?(this.v=n,this):new jn(n)},Yl=globalThis&&globalThis.__asyncDelegator||function(n){var e,t;return e={},a("next"),a("throw",function(s){throw s}),a("return"),e[Symbol.iterator]=function(){return this},e;function a(s,r){e[s]=n[s]?function(i){return(t=!t)?{value:jn(n[s](i)),done:!1}:r?r(i):i}:r}},Vl=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=t.apply(n,e||[]),s,r=[];return s={},i("next"),i("throw"),i("return"),s[Symbol.asyncIterator]=function(){return this},s;function i(h){a[h]&&(s[h]=function(M){return new Promise(function(E,D){r.push([h,M,E,D])>1||l(h,M)})})}function l(h,M){try{m(a[h](M))}catch(E){T(r[0][3],E)}}function m(h){h.value instanceof jn?Promise.resolve(h.value.v).then(d,g):T(r[0][2],h)}function d(h){l("next",h)}function g(h){l("throw",h)}function T(h,M){h(M),r.shift(),r.length&&l(r[0][0],r[0][1])}};function _t(n,e){return Oi(n,t=>{switch(t.kind){case P.Unary:return $l(e,n,t);case P.ServerStreaming:return ql(e,n,t);case P.ClientStreaming:return Wl(e,n,t);case P.BiDiStreaming:return Hl(e,n,t);default:return null}})}function $l(n,e,t){return async function(a,s){var r,i;const l=await n.unary(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,a,s==null?void 0:s.contextValues);return(r=s==null?void 0:s.onHeader)===null||r===void 0||r.call(s,l.header),(i=s==null?void 0:s.onTrailer)===null||i===void 0||i.call(s,l.trailer),l.message}}function ql(n,e,t){return function(a,s){return xi(n.stream(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,ji([a]),s==null?void 0:s.contextValues),s)}}function Wl(n,e,t){return async function(a,s){var r,i,l,m,d,g;const T=await n.stream(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,a,s==null?void 0:s.contextValues);(d=s==null?void 0:s.onHeader)===null||d===void 0||d.call(s,T.header);let h;try{for(var M=!0,E=Ri(T.message),D;D=await E.next(),r=D.done,!r;M=!0)m=D.value,M=!1,h=m}catch(L){i={error:L}}finally{try{!M&&!r&&(l=E.return)&&await l.call(E)}finally{if(i)throw i.error}}if(!h)throw new ge("protocol error: missing response message",ee.Internal);return(g=s==null?void 0:s.onTrailer)===null||g===void 0||g.call(s,T.trailer),h}}function Hl(n,e,t){return function(a,s){return xi(n.stream(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,a,s==null?void 0:s.contextValues),s)}}function xi(n,e){const t=function(){var a,s;return Vl(this,arguments,function*(){const r=yield jn(n);(a=e==null?void 0:e.onHeader)===null||a===void 0||a.call(e,r.header),yield jn(yield*Yl(Ri(r.message))),(s=e==null?void 0:e.onTrailer)===null||s===void 0||s.call(e,r.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>t.next()})}}function Zl(...n){const e=new AbortController,t=n.filter(s=>s!==void 0).concat(e.signal);for(const s of t){if(s.aborted){a.apply(s);break}s.addEventListener("abort",a)}function a(){e.signal.aborted||e.abort(Ci(this));for(const s of t)s.removeEventListener("abort",a)}return e}function Kl(n){const e=new AbortController,t=()=>{e.abort(new ge("the operation timed out",ee.DeadlineExceeded))};let a;return n!==void 0&&(n<=0?t():a=setTimeout(t,n)),{signal:e.signal,cleanup:()=>clearTimeout(a)}}function Ci(n){if(!n.aborted)return;if(n.reason!==void 0)return n.reason;const e=new Error("This operation was aborted");return e.name="AbortError",e}function zs(){return{get(n){return n.id in this?this[n.id]:n.defaultValue},set(n,e){return this[n.id]=e,this},delete(n){return delete this[n.id],this}}}const Ht=128;function Us(n){const e=new Headers,t=new TextDecoder().decode(n).split(`\r
|
|
16
|
-
`);for(const a of t){if(a==="")continue;const s=a.indexOf(":");if(s>0){const r=a.substring(0,s).trim(),i=a.substring(s+1).trim();e.append(r,i)}}return e}const Jl="Content-Type",Xl="Grpc-Timeout",zi="Grpc-Status",Ui="Grpc-Message",eu="Grpc-Status-Details-Bin",nu="User-Agent",tu="X-User-Agent",au="X-Grpc-Web",su="application/grpc-web+proto",ru="application/grpc-web+json";class We extends Ve{constructor(e){super(),this.code=0,this.message="",this.details=[],c.util.initPartial(e,this)}static fromBinary(e,t){return new We().fromBinary(e,t)}static fromJson(e,t){return new We().fromJson(e,t)}static fromJsonString(e,t){return new We().fromJsonString(e,t)}static equals(e,t){return c.util.equals(We,e,t)}}We.runtime=c;We.typeName="google.rpc.Status";We.fields=c.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Ye,repeated:!0}]);const iu="0";function Pi(n){var e;const t=n.get(eu);if(t!=null){const s=Cl(t,We);if(s.code==0)return;const r=new ge(s.message,s.code,n);return r.details=s.details.map(i=>({type:i.typeUrl.substring(i.typeUrl.lastIndexOf("/")+1),value:i.value})),r}const a=n.get(zi);if(a!=null){if(a===iu)return;const s=parseInt(a,10);return s in ee?new ge(decodeURIComponent((e=n.get(Ui))!==null&&e!==void 0?e:""),s,n):new ge(`invalid grpc-status: ${a}`,ee.Internal,n)}}function Ps(n,e,t){const a=typeof e=="string"?e:e.typeName,s=typeof t=="string"?t:t.name;return n.toString().replace(/\/?$/,`/${a}/${s}`)}function Bi(n,e){return e instanceof Ve?e:new n(e)}function ou(n,e){function t(a){return a.done===!0?a:{done:a.done,value:Bi(n,a.value)}}return{[Symbol.asyncIterator](){const a=e[Symbol.asyncIterator](),s={next:()=>a.next().then(t)};return a.throw!==void 0&&(s.throw=r=>a.throw(r).then(t)),a.return!==void 0&&(s.return=r=>a.return(r).then(t)),s}}}function cu(n){var e;const t=Object.assign({},n);return(e=t.ignoreUnknownFields)!==null&&e!==void 0||(t.ignoreUnknownFields=!0),t}function Bs(n,e,t,a){const s=e?Qs(n.I,a):Fs(n.I,t);return{parse:(e?Qs(n.O,a):Fs(n.O,t)).parse,serialize:s.serialize}}function Qs(n,e){return{parse(t){try{return n.fromBinary(t,e)}catch(a){const s=a instanceof Error?a.message:String(a);throw new ge(`parse binary: ${s}`,ee.InvalidArgument)}},serialize(t){try{return t.toBinary(e)}catch(a){const s=a instanceof Error?a.message:String(a);throw new ge(`serialize binary: ${s}`,ee.Internal)}}}}function Fs(n,e){var t,a;const s=(t=e==null?void 0:e.textEncoder)!==null&&t!==void 0?t:new TextEncoder,r=(a=e==null?void 0:e.textDecoder)!==null&&a!==void 0?a:new TextDecoder,i=cu(e);return{parse(l){try{const m=r.decode(l);return n.fromJsonString(m,i)}catch(m){throw ge.from(m,ee.InvalidArgument)}},serialize(l){try{const m=l.toJsonString(i);return s.encode(m)}catch(m){throw ge.from(m,ee.Internal)}}}}function lu(n){const e=Fi(n.next,n.interceptors),[t,a,s]=Qi(n),r=Object.assign(Object.assign({},n.req),{message:Bi(n.req.method.I,n.req.message),signal:t});return e(r).then(i=>(s(),i),a)}function uu(n){const e=Fi(n.next,n.interceptors),[t,a,s]=Qi(n),r=Object.assign(Object.assign({},n.req),{message:ou(n.req.method.I,n.req.message),signal:t});let i=!1;return t.addEventListener("abort",function(){var l,m;const d=n.req.message[Symbol.asyncIterator]();i||(l=d.throw)===null||l===void 0||l.call(d,this.reason).catch(()=>{}),(m=d.return)===null||m===void 0||m.call(d).catch(()=>{})}),e(r).then(l=>Object.assign(Object.assign({},l),{message:{[Symbol.asyncIterator](){const m=l.message[Symbol.asyncIterator]();return{next(){return m.next().then(d=>(d.done==!0&&(i=!0,s()),d),a)}}}}}),a)}function Qi(n){const{signal:e,cleanup:t}=Kl(n.timeoutMs),a=Zl(n.signal,e);return[a.signal,function(r){const i=ge.from(e.aborted?Ci(e):r);return a.abort(i),t(),Promise.reject(i)},function(){t(),a.abort()}]}function Fi(n,e){var t;return(t=e==null?void 0:e.concat().reverse().reduce((a,s)=>s(a),n))!==null&&t!==void 0?t:n}function mu(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function Gs(n){const e=Pi(n);if(e)throw e}function Ys(n,e,t){const a=new Headers(t??{});return a.set(Jl,n?su:ru),a.set(au,"1"),a.set(tu,"connect-es/1.1.2"),a.set(nu,"connect-es/1.1.2"),e!==void 0&&a.set(Xl,`${e}m`),a}function du(n){switch(n){case 400:return ee.Internal;case 401:return ee.Unauthenticated;case 403:return ee.PermissionDenied;case 404:return ee.Unimplemented;case 429:return ee.Unavailable;case 502:return ee.Unavailable;case 503:return ee.Unavailable;case 504:return ee.Unavailable;default:return ee.Unknown}}function Vs(n,e){var t;if(n>=200&&n<300){const a=Pi(e);if(a)throw a;return{foundStatus:e.has(zi)}}throw new ge(decodeURIComponent((t=e.get(Ui))!==null&&t!==void 0?t:`HTTP ${n}`),du(n),e)}var un=globalThis&&globalThis.__await||function(n){return this instanceof un?(this.v=n,this):new un(n)},pu=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=t.apply(n,e||[]),s,r=[];return s={},i("next"),i("throw"),i("return"),s[Symbol.asyncIterator]=function(){return this},s;function i(h){a[h]&&(s[h]=function(M){return new Promise(function(E,D){r.push([h,M,E,D])>1||l(h,M)})})}function l(h,M){try{m(a[h](M))}catch(E){T(r[0][3],E)}}function m(h){h.value instanceof un?Promise.resolve(h.value.v).then(d,g):T(r[0][2],h)}function d(h){l("next",h)}function g(h){l("throw",h)}function T(h,M){h(M),r.shift(),r.length&&l(r[0][0],r[0][1])}};function wt(n){var e;mu();const t=(e=n.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(a,s,r,i,l,m,d){var g;const{serialize:T,parse:h}=Bs(s,t,n.jsonOptions,n.binaryOptions);return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,await lu({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!1,service:a,method:s,url:Ps(n.baseUrl,a,s),init:{method:"POST",credentials:(g=n.credentials)!==null&&g!==void 0?g:"same-origin",redirect:"error",mode:"cors"},header:Ys(t,i,l),contextValues:d??zs(),message:m},next:async M=>{var E;const L=await((E=n.fetch)!==null&&E!==void 0?E:globalThis.fetch)(M.url,Object.assign(Object.assign({},M.init),{headers:M.header,signal:M.signal,body:Cs(0,T(M.message))}));if(Vs(L.status,L.headers),!L.body)throw"missing response body";const O=xs(L.body).getReader();let R,x;for(;;){const z=await O.read();if(z.done)break;const{flags:U,data:B}=z.value;if(U===Ht){if(R!==void 0)throw"extra trailer";R=Us(B);continue}if(x!==void 0)throw"extra message";x=h(B)}if(R===void 0)throw"missing trailer";if(Gs(R),x===void 0)throw"missing message";return{stream:!1,header:L.headers,message:x,trailer:R}}})},async stream(a,s,r,i,l,m,d){var g;const{serialize:T,parse:h}=Bs(s,t,n.jsonOptions,n.binaryOptions);function M(D,L,O){return pu(this,arguments,function*(){const x=xs(D).getReader();if(L){if(!(yield un(x.read())).done)throw"extra data for trailers-only";return yield un(void 0)}let z=!1;for(;;){const U=yield un(x.read());if(U.done)break;const{flags:B,data:C}=U.value;if((B&Ht)===Ht){if(z)throw"extra trailer";z=!0;const H=Us(C);Gs(H),H.forEach((ne,se)=>O.set(se,ne));continue}if(z)throw"extra message";yield yield un(h(C))}if(!z)throw"missing trailer"})}async function E(D){if(s.kind!=P.ServerStreaming)throw"The fetch API does not support streaming request bodies";const L=await D[Symbol.asyncIterator]().next();if(L.done==!0)throw"missing request message";return Cs(0,T(L.value))}return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,uu({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!0,service:a,method:s,url:Ps(n.baseUrl,a,s),init:{method:"POST",credentials:(g=n.credentials)!==null&&g!==void 0?g:"same-origin",redirect:"error",mode:"cors"},header:Ys(t,i,l),contextValues:d??zs(),message:m},next:async D=>{var L;const R=await((L=n.fetch)!==null&&L!==void 0?L:globalThis.fetch)(D.url,Object.assign(Object.assign({},D.init),{headers:D.header,signal:D.signal,body:await E(D.message)})),{foundStatus:x}=Vs(R.status,R.headers);if(!R.body)throw"missing response body";const z=new Headers;return Object.assign(Object.assign({},D),{header:R.headers,trailer:z,message:M(R.body,x,z)})}})}}}const gu=c.makeEnum("streamlayer.users.UserNotificationPreference",[{no:0,name:"USER_NOTIFICATION_PREFERENCE_UNSET",localName:"UNSET"},{no:1,name:"USER_NOTIFICATION_PREFERENCE_ALL_EVENTS",localName:"ALL_EVENTS"},{no:2,name:"USER_NOTIFICATION_PREFERENCE_IMPORTANT_EVENTS_ONLY",localName:"IMPORTANT_EVENTS_ONLY"},{no:3,name:"USER_NOTIFICATION_PREFERENCE_DAILY_SUMMARY_AND_MENTIONS",localName:"DAILY_SUMMARY_AND_MENTIONS"}]),yu=c.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),fu=c.makeMessageType("streamlayer.users.UserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:5,name:"avatar",kind:"scalar",T:9},{no:6,name:"public_chat",kind:"message",T:yu},{no:7,name:"public_name",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const Tu=c.makeMessageType("streamlayer.users.UserMetadata",()=>[{no:2,name:"avatar",kind:"scalar",T:9},{no:3,name:"avatar_background_colour",kind:"scalar",T:9},{no:4,name:"timezone",kind:"scalar",T:9},{no:5,name:"notification_preference",kind:"enum",T:c.getEnumType(gu)},{no:6,name:"active",kind:"scalar",T:8},{no:7,name:"first_name",kind:"scalar",T:9},{no:8,name:"last_name",kind:"scalar",T:9},{no:9,name:"roles",kind:"scalar",T:9,repeated:!0}]),hu=c.makeMessageType("streamlayer.users.ExtendedUserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"metadata",kind:"message",T:Tu}]),$a=c.makeMessageType("streamlayer.users.User",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:fu}]);c.makeMessageType("streamlayer.users.ExtendedUser",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:hu}]);const ku=c.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),Mu=c.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:Nu},{no:2,name:"data",kind:"message",T:$a}]),Nu=c.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),Iu=c.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Su=c.makeMessageType("streamlayer.users.Referral",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"watching_game",kind:"scalar",T:9}]),Au=c.makeMessageType("streamlayer.users.RegisterResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"requires_activation",kind:"scalar",T:8},{no:3,name:"referral",kind:"message",T:Su}]),Eu=c.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),bu=c.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),Du=c.makeMessageType("streamlayer.users.MeRequest",[]),_u=c.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:$a}]),wu=c.makeMessageType("streamlayer.users.UpdateMetadataRequest",()=>[{no:1,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:2,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),vu=c.makeMessageType("streamlayer.users.UpdateAvatarRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_avatar",kind:"scalar",T:9,oneof:"avatar"},{no:3,name:"del_avatar",kind:"scalar",T:9,oneof:"avatar"}]),Ou=c.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),ju=c.makeMessageType("streamlayer.users.UpdatePublicChatNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),Lu=c.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),Ru=c.makeMessageType("streamlayer.users.UpdatePublicNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),xu=c.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),Cu=c.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),zu=c.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:Uu}]),Uu=c.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),Pu=c.makeMessageType("streamlayer.users.InviteResponse",[]),Bu=c.makeMessageType("streamlayer.users.BypassAuthRequest",()=>[{no:1,name:"user_key",kind:"scalar",T:9},{no:2,name:"schema",kind:"scalar",T:9},{no:3,name:"init",kind:"scalar",T:8}]),Qu=c.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:Fu},{no:2,name:"data",kind:"message",T:$a,opt:!0}]),Fu=c.makeMessageType("streamlayer.users.BypassAuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9,opt:!0},{no:3,name:"token",kind:"scalar",T:9,opt:!0},{no:4,name:"getstream",kind:"scalar",T:9}],{localName:"BypassAuthResponse_AuthResponseMetadata"}),Jn={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:ku,O:Mu,kind:P.Unary},register:{name:"Register",I:Iu,O:Au,kind:P.Unary},requestPassword:{name:"RequestPassword",I:Eu,O:bu,kind:P.Unary},me:{name:"Me",I:Du,O:_u,kind:P.Unary},invite:{name:"Invite",I:zu,O:Pu,kind:P.Unary},bypassAuth:{name:"BypassAuth",I:Bu,O:Qu,kind:P.Unary},updateMetadata:{name:"UpdateMetadata",I:wu,O:Cu,kind:P.Unary},updateAvatar:{name:"UpdateAvatar",I:vu,O:Ou,kind:P.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:ju,O:Lu,kind:P.Unary},updatePublicName:{name:"UpdatePublicName",I:Ru,O:xu,kind:P.Unary}}},Gu=async(n,e)=>{const t=wt({baseUrl:n});return await _t(Jn,t).requestPassword({id:e}),!0},Yu=async(n,e)=>{const t=wt({baseUrl:n});return await _t(Jn,t).register({id:e}),!0},Vu=async(n,e,t)=>{var i;const a=wt({baseUrl:n}),r=await _t(Jn,a).login({id:e,password:t});return(i=r==null?void 0:r.meta)==null?void 0:i.jwt};const $u=S("div")({name:"Panel",class:"pkueuwk",propsAsIs:!1}),$s=S("form")({name:"Form",class:"fp66u19",propsAsIs:!1}),qs=S("div")({name:"FormTitle",class:"fwojs5e",propsAsIs:!1}),Zt=S("div")({name:"FormDescription",class:"fwvt1dc",propsAsIs:!1}),Kt=S("button")({name:"FormSubmit",class:"f16e2wbc",propsAsIs:!1}),qu=S("div")({name:"FormInputContainer",class:"f1xkchzs",propsAsIs:!1}),Wu=S("div")({name:"Digits",class:"d132q1j",propsAsIs:!1}),Hu=({login:n,anonymousLogin:e,host:t})=>{const[a,s]=Q.useState(""),[r,i]=Q.useState(""),[l,m]=Q.useState(""),d=async T=>{T.preventDefault();try{const h=a.replaceAll("+","");try{await Gu(t,h)}catch{await Yu(t,h)}i(h)}catch(h){window.alert(h)}},g=async T=>{if(T.preventDefault(),r&&l)try{const h=await Vu(t,r,l);h&&n?await n(h):console.log("token",h)}catch(h){window.alert(h)}};return f.jsxs($u,{children:[!r&&f.jsxs("div",{children:[f.jsxs($s,{onSubmit:d,children:[f.jsx(qs,{children:"Enter your phone number"}),f.jsx(Zt,{children:"Enter your phone up for number to log in or sign an account."}),f.jsx(qu,{children:f.jsx(Gt,{value:a,onChange:T=>s(`${T}`)})}),f.jsx(Kt,{disabled:!Gt.isValidPhoneNumber(a),type:"submit",children:"request code"})]}),e&&f.jsx(Kt,{style:{display:"block",margin:"auto"},onClick:e,children:"anonymous login"})]}),r&&f.jsxs($s,{onSubmit:g,children:[f.jsx(qs,{children:"Enter Verification Code"}),f.jsxs(Zt,{children:["Please enter the verification code ",f.jsx("br",{}),"sent to ",f.jsx("b",{children:Gt.formatPhoneNumberIntl(a)})]}),f.jsx(Wu,{children:f.jsx(nc,{autoFocus:!0,allowedCharacters:"numeric",length:4,onChange:m})}),f.jsx(Kt,{disabled:l.length!==4,type:"submit",children:"login"}),f.jsxs(Zt,{children:["Didn't get 59 the code? ",f.jsx("br",{}),"Resend Code in",f.jsx(di,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const Zu=S("div")({name:"Container",class:"c18fa2p6",propsAsIs:!1}),Ku=S("div")({name:"Content",class:"cthywkn",propsAsIs:!1}),Ju=S("div")({name:"OnboardingHeader",class:"obeaxxh",propsAsIs:!1}),Xu=S("div")({name:"LeftBlock",class:"l1jam9nb",propsAsIs:!1}),em=S("div")({name:"RightBlock",class:"r17ziiq1",propsAsIs:!1}),nm=S("img")({name:"GameIcon",class:"gxb34q2",propsAsIs:!1}),tm=S("img")({name:"SponsorLogo",class:"s10k8h8y",propsAsIs:!1}),am=S("button")({name:"CloseBtn",class:"ca5j1zk",propsAsIs:!1}),sm=S("img")({name:"IconClose",class:"i6wd7es",propsAsIs:!1}),rm=S("button")({name:"OnboardingActionBtn",class:"onaxor0",propsAsIs:!1});const im=S("div")({name:"Container",class:"c1tc3ie1",propsAsIs:!1}),om=S("div")({name:"Content",class:"cenyr9j",propsAsIs:!1}),cm=S("img")({name:"Graphic",class:"g17082th",propsAsIs:!1}),lm=S("div")({name:"Headline",class:"hr58r57",propsAsIs:!1}),um=({graphic:n,headline:e})=>f.jsx(im,{children:f.jsxs(om,{children:[f.jsx(cm,{alt:"graphic-img-instructions",src:n}),f.jsx(lm,{children:e})]})});const mm=S("div")({name:"Container",class:"c1k109z3",propsAsIs:!1}),dm=S("div")({name:"Title",class:"tl3o9j9",propsAsIs:!1}),pm=S("div")({name:"RulesList",class:"rp7yn67",propsAsIs:!1}),gm=S("div")({name:"RulesItem",class:"r18km3gu",propsAsIs:!1}),ym=S("div")({name:"RuleNumber",class:"rtu7hsj",propsAsIs:!1}),fm=S("div")({name:"RuleText",class:"rfkkuag",propsAsIs:!1}),Tm=({rules:n,rulesTitle:e,primaryColor:t})=>f.jsxs(mm,{children:[f.jsx(dm,{children:e}),f.jsx(pm,{children:n==null?void 0:n.map((a,s)=>f.jsxs(gm,{children:[f.jsx(ym,{style:{backgroundColor:t},children:s+1}),f.jsx(fm,{children:a})]},s))})]}),hm="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyaWVuZHMiPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNNC4xOTIzMSA3LjAzMTI1QzIuNjYzNDYgNy4wMzEyNSAxLjQyMzA4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DguNDkyOTggMTAuNTI0MiA4LjQ5Mjk4IDEwLjg5MTVDOS4yNzY2MyA5Ljc4NjAxIDEwLjU0MTkgOS4wNTg1OSAxMi4wMDk4IDguODc0OTRDMTEuMzI1NiA3Ljc2OTQyIDEwLjA1MjYgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFaTTE2LjQxMzUgMS41QzE0Ljc5MjcgMS41IDEzLjQ3NzcgMi43Mzg3NiAxMy40Nzc3IDQuMjY1NkMxMy40Nzc3IDUuNzkyNDUgMTQuNzkyNyA3LjAzMTIxIDE2LjQxMzUgNy4wMzEyMUMxOC4wMzQzIDcuMDMxMjEgMTkuMzQ5MyA1Ljc5MjQ1IDE5LjM0OTMgNC4yNjU2QzE5LjM0OTMgMi43Mzg3NiAxOC4wMzQzIDEuNSAxNi40MTM1IDEuNVpNMTYuNDEzNSA3LjAzMTIxQzE0Ljk0NTYgNy4wMzEyMSAxMy42NzI3IDcuNzY5NDIgMTIuOTg4NCA4Ljg3NDk0QzE0LjQ1NjMgOS4wNTg1OSAxNS43MjE2IDkuNzg2MDEgMTYuNTA1MyAxMC44OTE1QzE2LjUwNTMgMTAuNTI0MiAxNi40MTM1IDEwLjE2NDEgMTYuNDEzNSA5Ljc5NjgxQzE2LjQxMzUgOC43ODEzMSAxNi43MTE3IDcuODU1ODQgMTcuMzAwNCA3LjExNzYzQzE3LjAwNiA3LjAyNCAxNi43MDc5IDcuMDMxMjEgMTYuNDEzNSA3LjAzMTIxWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC40Ii8+CjwvZz4KPC9zdmc+Cg==";const km=S("div")({name:"Container",class:"ckff0a9",propsAsIs:!1}),Mm=S("div")({name:"Content",class:"czw1kx1",propsAsIs:!1}),Nm=S("div")({name:"InviteGameIconWrap",class:"i2e7ir3",propsAsIs:!1}),Im=S("img")({name:"InviteGameIcon",class:"i2tfvcu",propsAsIs:!1}),Sm=S("div")({name:"Heading",class:"hnq23ee",propsAsIs:!1}),Am=S("div")({name:"Subtext",class:"s2drh5v",propsAsIs:!1}),Em=S("button")({name:"InviteBtn",class:"iiwwayv",propsAsIs:!1}),bm=({inviteCardTitle:n,inviteCardSubtext:e,primaryColor:t})=>f.jsx(km,{children:f.jsxs(Mm,{children:[f.jsx(Nm,{style:{backgroundColor:t},children:f.jsx(Im,{alt:"invite-game-icon",src:hm})}),f.jsx(Sm,{children:n||""}),f.jsx(Am,{children:e||""}),f.jsx(Em,{onClick:()=>{},style:{backgroundColor:t},children:"Invite friends!"})]})}),Nn={steps:!1,rules:!1,inviteCard:!1},Dm=({gamification:n,closeFeature:e,steps:t,gameIcon:a,sponsorLogo:s,rules:r,rulesBtnLabel:i,rulesTitle:l,primaryColor:m,inviteCardTitle:d,inviteCardSubtext:g,inviteCardBtnLabel:T})=>{const h=async()=>{await n.submitInplay()},M=()=>{e()},[E,D]=Q.useState(0),[L,O]=Q.useState(Nn);Q.useEffect(()=>{t!=null&&t.length?O({...Nn,steps:!0}):r!=null&&r.length?O({...Nn,rules:!0}):O({...Nn,inviteCard:!0})},[]);const R=Q.useCallback(()=>{t!=null&&t.length&&E<t.length-1?D(x=>++x):r!=null&&r.length&&L.steps?O({...Nn,rules:!0}):L.rules&&O({...Nn,inviteCard:!0})},[E,t==null?void 0:t.length,r==null?void 0:r.length,L,D,O]);return f.jsxs(Zu,{children:[f.jsxs(Ju,{children:[f.jsx(Xu,{children:a&&f.jsx(nm,{alt:"sponsor-one-onboarding-icon",src:a})}),f.jsxs(em,{children:[s&&f.jsx(tm,{alt:"sponsor-two-onboarding-icon",src:s}),f.jsx(am,{onClick:M,children:f.jsx(sm,{alt:"icon-close-onboarding",src:Et})})]})]}),f.jsxs(Ku,{children:[L.steps&&(t==null?void 0:t.length)&&f.jsx(um,{graphic:t[E].graphic,headline:t[E].headline}),L.rules&&f.jsx(Tm,{rules:r,rulesTitle:l,primaryColor:m}),L.inviteCard&&f.jsx(bm,{inviteCardTitle:d,inviteCardSubtext:g,primaryColor:m})]}),f.jsx(rm,{onClick:L.inviteCard?h:R,children:L.rules?i||"Got it!":L.inviteCard?T||"Play now!":"Next"})]})},ye=c.makeEnum("streamlayer.interactive.QuestionType",[{no:0,name:"QUESTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_TYPE_POLL",localName:"POLL"},{no:2,name:"QUESTION_TYPE_TRIVIA",localName:"TRIVIA"},{no:3,name:"QUESTION_TYPE_PREDICTION",localName:"PREDICTION"},{no:4,name:"QUESTION_TYPE_FACTOID",localName:"FACTOID"},{no:5,name:"QUESTION_TYPE_TWEET",localName:"TWEET"},{no:6,name:"QUESTION_TYPE_PROMOTION",localName:"PROMOTION"}]),_m=c.makeEnum("streamlayer.interactive.QuestionSource",[{no:0,name:"QUESTION_SOURCE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SOURCE_AI",localName:"AI"},{no:2,name:"QUESTION_SOURCE_CSV_IMPORT",localName:"CSV_IMPORT"}]),Ze=c.makeEnum("streamlayer.interactive.QuestionStatus",[{no:0,name:"QUESTION_STATUS_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_STATUS_NOT_SCHEDULED",localName:"NOT_SCHEDULED"},{no:2,name:"QUESTION_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:3,name:"QUESTION_STATUS_ACTIVE",localName:"ACTIVE"},{no:4,name:"QUESTION_STATUS_RESOLVED",localName:"RESOLVED"}]),wm=c.makeEnum("streamlayer.interactive.QuestionPosition",[{no:0,name:"QUESTION_POSITION_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_POSITION_DEFAULT",localName:"DEFAULT"},{no:2,name:"QUESTION_POSITION_FIXED_BOTTOM",localName:"FIXED_BOTTOM"}]),vm=c.makeEnum("streamlayer.interactive.QuestionLayout",[{no:0,name:"QUESTION_LAYOUT_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_LAYOUT_LIST_VIEW",localName:"LIST_VIEW"},{no:2,name:"QUESTION_LAYOUT_GRID_VIEW",localName:"GRID_VIEW"}]),nn=c.makeEnum("streamlayer.interactive.QuestionImages",[{no:0,name:"QUESTION_IMAGES_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_IMAGES_NONE",localName:"NONE"},{no:2,name:"QUESTION_IMAGES_ROUNDED",localName:"ROUNDED"},{no:3,name:"QUESTION_IMAGES_TRANSPARENT",localName:"TRANSPARENT"},{no:4,name:"QUESTION_IMAGES_CENTERED",localName:"CENTERED"}]),Gi=c.makeEnum("streamlayer.interactive.ImagePosition",[{no:0,name:"IMAGE_POSITION_UNSET",localName:"UNSET"},{no:1,name:"IMAGE_POSITION_LEFT",localName:"LEFT"},{no:2,name:"IMAGE_POSITION_RIGHT",localName:"RIGHT"}]),Om=c.makeEnum("streamlayer.interactive.PromotionType",[{no:0,name:"PROMOTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_TYPE_INGAME_IAB21",localName:"INGAME_IAB21"},{no:2,name:"PROMOTION_TYPE_INGAME_IAB11",localName:"INGAME_IAB11"},{no:3,name:"PROMOTION_TYPE_INGAME_IAB61",localName:"INGAME_IAB61"}]),jm=c.makeEnum("streamlayer.interactive.PromotionWallet",[{no:0,name:"PROMOTION_WALLET_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_WALLET_ENABLED",localName:"ENABLED"},{no:2,name:"PROMOTION_WALLET_DISABLED",localName:"DISABLED"}]),Lm=c.makeEnum("streamlayer.interactive.QuestionAutoPostState",[{no:0,name:"QUESTION_AUTO_POST_STATE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_AUTO_POST_STATE_ON",localName:"ON"},{no:2,name:"QUESTION_AUTO_POST_STATE_OFF",localName:"OFF"},{no:3,name:"QUESTION_AUTO_POST_STATE_PAUSED",localName:"PAUSED"},{no:4,name:"QUESTION_AUTO_POST_STATE_IDLE",localName:"IDLE"}]),Rm=c.makeEnum("streamlayer.interactive.QuestionAutoPostStart",[{no:0,name:"QUESTION_AUTO_POST_START_NONE",localName:"NONE"},{no:1,name:"QUESTION_AUTO_POST_START_TIME",localName:"TIME"}]),xm=c.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),Cm=c.makeEnum("streamlayer.interactive.SilenceSetting",[{no:0,name:"SILENCE_SETTING_UNSET",localName:"UNSET"},{no:1,name:"SILENCE_SETTING_ON",localName:"ON"},{no:2,name:"SILENCE_SETTING_OFF",localName:"OFF"}]),zm=c.makeEnum("streamlayer.interactive.ImportStatus",[{no:0,name:"IMPORT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"IMPORT_STATUS_PLANNED",localName:"PLANNED"},{no:2,name:"IMPORT_STATUS_RUNNING",localName:"RUNNING"},{no:3,name:"IMPORT_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"IMPORT_STATUS_FAILED",localName:"FAILED"}]),qa=c.makeMessageType("streamlayer.interactive.QuestionAppearance",()=>[{no:1,name:"layout",kind:"enum",T:c.getEnumType(vm)},{no:2,name:"images",kind:"enum",T:c.getEnumType(nn)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:c.getEnumType(wm)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),xn=c.makeMessageType("streamlayer.interactive.Sponsorship",()=>[{no:1,name:"logo",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),vt=c.makeMessageType("streamlayer.interactive.QuestionNotification",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9},{no:3,name:"indicator_color",kind:"scalar",T:9},{no:4,name:"image_position",kind:"enum",T:c.getEnumType(Gi)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}]),Um=c.makeMessageType("streamlayer.interactive.QuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13}]),Pm=c.makeMessageType("streamlayer.interactive.ExtendedQuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13},{no:6,name:"percentage",kind:"scalar",T:13},{no:7,name:"you_voted",kind:"scalar",T:8},{no:8,name:"percentage_decimal",kind:"scalar",T:1}]),tn=c.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),Bm=c.makeMessageType("streamlayer.interactive.FileLink",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"thumbnail_url",kind:"scalar",T:9}]),Qm=c.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),Fm=c.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),Gm=c.makeMessageType("streamlayer.interactive.Banner",()=>[{no:1,name:"image_url",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"cta_button",kind:"message",T:Fm}]),Wa=c.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:Ym,oneof:"options"},{no:2,name:"trivia",kind:"message",T:Vm,oneof:"options"},{no:3,name:"prediction",kind:"message",T:$m,oneof:"options"},{no:4,name:"factoid",kind:"message",T:qm,oneof:"options"},{no:5,name:"tweet",kind:"message",T:Wm,oneof:"options"},{no:6,name:"promotion",kind:"message",T:Zm,oneof:"options"}]),Ym=c.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),Vm=c.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:tn},{no:2,name:"incorrect_feedback",kind:"message",T:tn},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),$m=c.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:tn},{no:2,name:"incorrect_feedback",kind:"message",T:tn}],{localName:"QuestionOptions_PredictionOptions"}),qm=c.makeMessageType("streamlayer.interactive.QuestionOptions.FactoidOptions",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"video",kind:"message",T:Bm},{no:4,name:"web_link",kind:"message",T:Qm}],{localName:"QuestionOptions_FactoidOptions"}),Wm=c.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions",()=>[{no:1,name:"tweet_url",kind:"scalar",T:9},{no:2,name:"tweet_id",kind:"scalar",T:9},{no:3,name:"tweet_meta",kind:"message",T:Hm}],{localName:"QuestionOptions_TweetOptions"}),Hm=c.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions.TweetMetadata",()=>[{no:1,name:"account",kind:"scalar",T:9},{no:2,name:"account_verified",kind:"scalar",T:8},{no:3,name:"has_media",kind:"scalar",T:8}],{localName:"QuestionOptions_TweetOptions_TweetMetadata"}),Zm=c.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(Om)},{no:2,name:"sponsor",kind:"message",T:xn},{no:3,name:"banner",kind:"message",T:Gm},{no:4,name:"enable_wallet",kind:"enum",T:c.getEnumType(jm)}],{localName:"QuestionOptions_PromotionOptions"}),Km=c.makeMessageType("streamlayer.interactive.Tag",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"last_used_time",kind:"scalar",T:4}]),Jm=c.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),Yi=c.makeMessageType("streamlayer.interactive.Question",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ye)},{no:3,name:"subject",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:Wa},{no:5,name:"appearance",kind:"message",T:qa},{no:6,name:"sponsorship",kind:"message",T:xn},{no:7,name:"notification",kind:"message",T:vt},{no:8,name:"answers",kind:"message",T:Um,repeated:!0},{no:9,name:"status",kind:"enum",T:c.getEnumType(Ze)},{no:10,name:"position",kind:"scalar",T:13,opt:!0},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"overrides",kind:"map",K:9,V:{kind:"scalar",T:8}},{no:15,name:"event_id",kind:"scalar",T:9},{no:16,name:"stream_timestamp",kind:"message",T:Ae},{no:17,name:"tags",kind:"message",T:Km,repeated:!0},{no:18,name:"bypass_notifications",kind:"message",T:Ka},{no:19,name:"import_id",kind:"scalar",T:9},{no:20,name:"activation_trigger_count",kind:"scalar",T:13,opt:!0},{no:21,name:"source",kind:"enum",T:c.getEnumType(_m)},{no:22,name:"ai",kind:"message",T:Jm}]),Ha=c.makeMessageType("streamlayer.interactive.ExtendedQuestion",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ye)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"options",kind:"message",T:Wa},{no:5,name:"appearance",kind:"message",T:qa},{no:6,name:"sponsorship",kind:"message",T:xn},{no:7,name:"notification",kind:"message",T:vt},{no:8,name:"answers",kind:"message",T:Pm,repeated:!0},{no:9,name:"status",kind:"enum",T:c.getEnumType(Ze)},{no:10,name:"position",kind:"scalar",T:13},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"event_id",kind:"scalar",T:9},{no:15,name:"bypass_notifications",kind:"message",T:Ka}]);c.makeMessageType("streamlayer.interactive.QuestionTimeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ye)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"activated_at",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:c.getEnumType(Ze)},{no:6,name:"options",kind:"message",T:Wa},{no:7,name:"notification",kind:"message",T:vt}]);const Vi=c.makeMessageType("streamlayer.interactive.EventModeration",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"sponsorship",kind:"message",T:xn},{no:4,name:"onboarding_enabled",kind:"scalar",T:8},{no:5,name:"question",kind:"message",T:Xm},{no:6,name:"sponsors",kind:"message",T:td},{no:7,name:"notification",kind:"message",T:ad},{no:8,name:"activated_at",kind:"message",T:Ae},{no:9,name:"deactivated_at",kind:"message",T:Ae},{no:10,name:"question_auto_post",kind:"message",T:sd},{no:11,name:"bypass_notifications",kind:"message",T:Ka},{no:12,name:"importer_collaboration",kind:"message",T:pd}]),Xm=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:qa},{no:2,name:"trivia",kind:"message",T:ed},{no:3,name:"prediction",kind:"message",T:nd},{no:4,name:"correct_feedbacks",kind:"message",T:tn,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:tn,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),ed=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),nd=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),td=c.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:xn,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),ad=c.makeMessageType("streamlayer.interactive.EventModeration.NotificationSettings",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"indicator_color",kind:"scalar",T:9},{no:3,name:"image_position",kind:"enum",T:c.getEnumType(Gi)},{no:4,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}],{localName:"EventModeration_NotificationSettings"}),sd=c.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:c.getEnumType(Lm)},{no:2,name:"interval",kind:"scalar",T:13},{no:3,name:"next_post_time",kind:"message",T:Ae},{no:4,name:"start_mode",kind:"enum",T:c.getEnumType(Rm)},{no:5,name:"start_options",kind:"message",T:rd}]),rd=c.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:id,oneof:"options"}]),id=c.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions.TimeOptions",()=>[{no:1,name:"timestamp",kind:"scalar",T:4}],{localName:"QuestionAutoPostStartOptions_TimeOptions"});c.makeMessageType("streamlayer.interactive.AnswerData",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13}]);const Za=c.makeMessageType("streamlayer.interactive.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5},{no:3,name:"cursor",kind:"scalar",T:9}]),od=c.makeMessageType("streamlayer.interactive.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.interactive.QuestionStats",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"question",kind:"message",T:cd},{no:3,name:"statistics",kind:"message",T:ld,repeated:!0}]);const cd=c.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:c.getEnumType(Ze)}],{localName:"QuestionStats_QuestionData"}),ld=c.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:ud}]),ud=c.makeMessageType("streamlayer.interactive.AnswerVotesStats.AnswerVotesData",()=>[{no:1,name:"count",kind:"scalar",T:13},{no:2,name:"percentage",kind:"scalar",T:13}],{localName:"AnswerVotesStats_AnswerVotesData"});c.makeMessageType("streamlayer.interactive.ServerNotificationOptions",()=>[{no:1,name:"silence",kind:"scalar",T:8},{no:2,name:"skip_update",kind:"scalar",T:8}]);const Ka=c.makeMessageType("streamlayer.interactive.BypassNotifications",()=>[{no:1,name:"in_app_silence",kind:"enum",T:c.getEnumType(Cm)}]),md=c.makeMessageType("streamlayer.interactive.ImportError",()=>[{no:1,name:"row_id",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}]),dd=c.makeMessageType("streamlayer.interactive.ImportProgress",()=>[{no:1,name:"import_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:c.getEnumType(zm)},{no:3,name:"errors",kind:"message",T:md,repeated:!0},{no:4,name:"last_updated",kind:"message",T:Ae}]),pd=c.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:dd}}]),Gn=c.makeEnum("streamlayer.interactive.feed.PickHistoryStatus",[{no:0,name:"PICK_HISTORY_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PICK_HISTORY_STATUS_WON",localName:"WON"},{no:2,name:"PICK_HISTORY_STATUS_LOST",localName:"LOST"},{no:3,name:"PICK_HISTORY_STATUS_DNP",localName:"DNP"}]),$i=c.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:Yi},{no:2,name:"notification",kind:"message",T:vt},{no:3,name:"moderation",kind:"message",T:Vi}]),gd=c.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]),yd=c.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:fd}]),fd=c.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse.SubscriptionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:$i}],{localName:"SubscriptionResponse_SubscriptionResponseData"}),Td=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]),hd=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:kd}]),kd=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse.VotingSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ja,repeated:!0}],{localName:"VotingSubscriptionResponse_VotingSubscriptionResponseData"}),Md=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:Ha}]),Nd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),Id=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Sd}]),Sd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse.QuestionSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Md}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),Ad=c.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:Ha}]),Ed=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),bd=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:Dd}]),Dd=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse.QuestionByUserResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ad}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"}),_d=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:wd}]),wd=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"}),vd=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Od}]),Od=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse.SyncQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:$i}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"}),jd=c.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ld=c.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Rd}]),Rd=c.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse.GetQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Yi}],{localName:"GetQuestionResponse_GetQuestionResponseData"}),xd=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Cd=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:zd}]),zd=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse.QuestionDetailResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ha}],{localName:"QuestionDetailResponse_QuestionDetailResponseData"}),Ja=c.makeMessageType("streamlayer.interactive.feed.AnswerVoteResult",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13},{no:3,name:"voted",kind:"scalar",T:8},{no:4,name:"correct",kind:"scalar",T:8}]),Ud=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:Pd}]),Pd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest.SubmitRequestData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9}],{localName:"SubmitAnswerRequest_SubmitRequestData"}),Bd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:Qd}]),Qd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse.SubmitAnswerResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ja,repeated:!0}],{localName:"SubmitAnswerResponse_SubmitAnswerResponseData"}),Fd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:Gd}]),Gd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"}),Yd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]),Vd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:$d}]),$d=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:c.getEnumType(xm)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"}),qd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Wd}]),Wd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse.SkipQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ja,repeated:!0}],{localName:"SkipQuestionResponse_SkipQuestionResponseData"}),Hd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryRequest",()=>[{no:1,name:"question_type",kind:"enum",T:c.getEnumType(ye),repeated:!0},{no:3,name:"event_id",kind:"scalar",T:9},{no:2,name:"pagination",kind:"message",T:Za}]),Zd=c.makeMessageType("streamlayer.interactive.feed.PickHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9},{no:3,name:"status",kind:"enum",T:c.getEnumType(Gn)},{no:4,name:"question_type",kind:"enum",T:c.getEnumType(ye)},{no:5,name:"subject",kind:"scalar",T:9},{no:6,name:"text",kind:"scalar",T:9},{no:7,name:"open_for_voting",kind:"scalar",T:8},{no:8,name:"question_status",kind:"enum",T:c.getEnumType(Ze)}]),Kd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Jd,repeated:!0},{no:2,name:"meta",kind:"message",T:Xd}]),Jd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Zd}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),Xd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseMetadata",()=>[{no:1,name:"total",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"PickHistoryResponse_PickHistoryResponseMetadata"}),ep=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),np=c.makeMessageType("streamlayer.interactive.feed.InsightHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}]),tp=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:ap,repeated:!0}]),ap=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse.InsightHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:np}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"}),sp=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),rp=c.makeMessageType("streamlayer.interactive.feed.TweetHistory",()=>[{no:1,name:"tweet_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"body",kind:"scalar",T:9},{no:5,name:"account",kind:"scalar",T:9},{no:6,name:"account_verified",kind:"scalar",T:8}]),ip=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:op,repeated:!0}]),op=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse.TweetHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:rp}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),cp=c.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:lp},{no:3,name:"moderation",kind:"message",T:Vi}]),lp=c.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]),up=c.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),mp=c.makeMessageType("streamlayer.interactive.feed.GetResponse",()=>[{no:1,name:"data",kind:"message",T:dp}]),dp=c.makeMessageType("streamlayer.interactive.feed.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cp}],{localName:"GetResponse_GetResponseData"}),pp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),gp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistory",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9}]),yp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:fp,repeated:!0}]),fp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse.PromotionHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:gp}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),Tp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameAppearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}]),hp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameMedia",()=>[{no:1,name:"game_icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),kp=c.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),Mp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameOverview",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"auto_activate",kind:"scalar",T:8},{no:4,name:"scoring",kind:"scalar",T:8},{no:5,name:"media",kind:"message",T:hp},{no:6,name:"appearance",kind:"message",T:Tp},{no:7,name:"prizes",kind:"message",T:kp,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),Np=c.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),Ip=c.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),Sp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameTitleCard",()=>[{no:1,name:"visible",kind:"scalar",T:8},{no:2,name:"opt_in",kind:"scalar",T:8},{no:3,name:"title",kind:"scalar",T:9},{no:4,name:"subtitle",kind:"scalar",T:9},{no:5,name:"header",kind:"scalar",T:9},{no:6,name:"media",kind:"message",T:Np},{no:7,name:"appearance",kind:"message",T:Ip},{no:8,name:"completed",kind:"scalar",T:8}]),Ap=c.makeMessageType("streamlayer.sdkSettings.game.common.OnboardingStep",()=>[{no:1,name:"headline",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"graphic",kind:"scalar",T:9}]),Ep=c.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:Ap,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),bp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameRules",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"button_label",kind:"scalar",T:9},{no:4,name:"numbers_color",kind:"scalar",T:9},{no:5,name:"rules",kind:"scalar",T:9,repeated:!0},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"terms",kind:"scalar",T:9},{no:8,name:"terms_url",kind:"scalar",T:9}]),Dp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameInviteCard",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"subtext",kind:"scalar",T:9},{no:4,name:"button_label",kind:"scalar",T:9},{no:5,name:"icon_color",kind:"scalar",T:9},{no:6,name:"terms",kind:"scalar",T:9},{no:7,name:"completed",kind:"scalar",T:8}]),_p=c.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:Mp},{no:2,name:"title_card",kind:"message",T:Sp},{no:3,name:"onboarding",kind:"message",T:Ep},{no:4,name:"rules",kind:"message",T:bp},{no:5,name:"invite_card",kind:"message",T:Dp},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),wp=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationGeneral",()=>[{no:1,name:"default_color",kind:"scalar",T:9},{no:2,name:"points",kind:"scalar",T:13},{no:3,name:"auto_hide_interval",kind:"scalar",T:4},{no:4,name:"insights_history_enabled",kind:"scalar",T:8},{no:5,name:"pick_history_enabled",kind:"scalar",T:8},{no:6,name:"correct_feedbacks",kind:"message",T:tn,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:tn,repeated:!0}]),vp=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationNotifications",()=>[{no:1,name:"default_image",kind:"scalar",T:9},{no:2,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}]),Op=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSponsorships",()=>[{no:1,name:"rotate",kind:"scalar",T:8},{no:2,name:"no_sponsor",kind:"scalar",T:8},{no:3,name:"sponsors",kind:"message",T:xn,repeated:!0}]),jp=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:wp},{no:2,name:"notifications",kind:"message",T:vp},{no:3,name:"sponsorships",kind:"message",T:Op}]),_e=c.makeEnum("streamlayer.sdkSettings.SdkOverlayType",[{no:0,name:"SDK_OVERLAY_TYPE_UNSET",localName:"UNSET"},{no:1,name:"SDK_OVERLAY_TYPE_INPLAY",localName:"INPLAY"},{no:2,name:"SDK_OVERLAY_TYPE_MESSAGING",localName:"MESSAGING"},{no:3,name:"SDK_OVERLAY_TYPE_STATISTICS",localName:"STATISTICS"},{no:4,name:"SDK_OVERLAY_TYPE_BETTING",localName:"BETTING"},{no:5,name:"SDK_OVERLAY_TYPE_TWITTER",localName:"TWITTER"},{no:6,name:"SDK_OVERLAY_TYPE_MERCHANDISE",localName:"MERCHANDISE"},{no:7,name:"SDK_OVERLAY_TYPE_CONTESTS",localName:"CONTESTS"},{no:8,name:"SDK_OVERLAY_TYPE_VOICE_CHAT",localName:"VOICE_CHAT"},{no:9,name:"SDK_OVERLAY_TYPE_TICKETS",localName:"TICKETS"},{no:10,name:"SDK_OVERLAY_TYPE_WHOIS_WATCHING",localName:"WHOIS_WATCHING"},{no:11,name:"SDK_OVERLAY_TYPE_PROFILE",localName:"PROFILE"},{no:12,name:"SDK_OVERLAY_TYPE_GAMES",localName:"GAMES"},{no:13,name:"SDK_OVERLAY_TYPE_GOLF_STATISTICS",localName:"GOLF_STATISTICS"},{no:14,name:"SDK_OVERLAY_TYPE_HIGHLIGHTS",localName:"HIGHLIGHTS"},{no:15,name:"SDK_OVERLAY_TYPE_PUBLIC_CHAT",localName:"PUBLIC_CHAT"}]),Lp=c.makeEnum("streamlayer.sdkSettings.BettingFavoriteType",[{no:0,name:"BETTING_FAVORITE_TYPE_UNSET",localName:"UNSET"},{no:1,name:"BETTING_FAVORITE_TYPE_LEAGUE",localName:"LEAGUE"},{no:2,name:"BETTING_FAVORITE_TYPE_TEAM",localName:"TEAM"}]),Rp=c.makeEnum("streamlayer.sdkSettings.BettingSettingsTextColor",[{no:0,name:"BETTING_SETTINGS_TEXT_COLOR_UNSET",localName:"UNSET"},{no:1,name:"BETTING_SETTINGS_TEXT_COLOR_PRIMARY",localName:"PRIMARY"},{no:2,name:"BETTING_SETTINGS_TEXT_COLOR_GREY",localName:"GREY"},{no:3,name:"BETTING_SETTINGS_TEXT_COLOR_CUSTOM",localName:"CUSTOM"}]),Xa=c.makeEnum("streamlayer.sdkSettings.GetStreamChannelType",[{no:0,name:"GETSTREAM_CHANNEL_TYPE_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_TYPE_LIVESTREAM"},{no:2,name:"GETSTREAM_CHANNEL_TYPE_MESSAGING"},{no:3,name:"GETSTREAM_CHANNEL_TYPE_TEAM"},{no:4,name:"GETSTREAM_CHANNEL_TYPE_COMMERCE"},{no:5,name:"GETSTREAM_CHANNEL_TYPE_GAMING"},{no:6,name:"GETSTREAM_CHANNEL_TYPE_CUSTOM"}]),xp=c.makeEnum("streamlayer.sdkSettings.GetStreamChannelDefault",[{no:0,name:"GETSTREAM_CHANNEL_DEFAULT_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_DEFAULT_TRUE"},{no:2,name:"GETSTREAM_CHANNEL_DEFAULT_FALSE"}]),qi=c.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),Cp=c.makeEnum("streamlayer.sdkSettings.LeaderboardKind",[{no:0,name:"LEADERBOARD_KIND_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_KIND_GLOBAL",localName:"GLOBAL"},{no:2,name:"LEADERBOARD_KIND_FRIENDS",localName:"FRIENDS"}]),zp=c.makeEnum("streamlayer.sdkSettings.PresetRuleKey",[{no:0,name:"PRESET_RULE_KEY_UNSET",localName:"UNSET"},{no:1,name:"PRESET_RULE_KEY_SPORT",localName:"SPORT"},{no:2,name:"PRESET_RULE_KEY_LEAGUE",localName:"LEAGUE"},{no:3,name:"PRESET_RULE_KEY_TEAMS",localName:"TEAMS"}]),Up=c.makeEnum("streamlayer.sdkSettings.AdvertisingPlacement",[{no:0,name:"ADVERTISING_PLACEMENT_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_PLACEMENT_DEFAULT",localName:"DEFAULT"},{no:2,name:"ADVERTISING_PLACEMENT_WATCHPARTY_FULLSIZE",localName:"WATCHPARTY_FULLSIZE"},{no:3,name:"ADVERTISING_PLACEMENT_WATCHPARTY_VIDEOPANEL",localName:"WATCHPARTY_VIDEOPANEL"},{no:4,name:"ADVERTISING_PLACEMENT_OVERLAY_NAVBAR",localName:"OVERLAY_NAVBAR"}]);c.makeEnum("streamlayer.sdkSettings.AdvertisingType",[{no:0,name:"ADVERTISING_TYPE_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_TYPE_SPONSORS",localName:"SPONSORS"},{no:2,name:"ADVERTISING_TYPE_INTERSTITIALS",localName:"INTERSTITIALS"},{no:3,name:"ADVERTISING_TYPE_BANNERS",localName:"BANNERS"}]);const Pp=c.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),Bp=c.makeMessageType("streamlayer.sdkSettings.BettingFavorite",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"icon",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"type",kind:"enum",T:c.getEnumType(Lp)}]),Qp=c.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Wi=c.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:Fp}]),Fp=c.makeMessageType("streamlayer.sdkSettings.BrandDefaults.Appearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}],{localName:"BrandDefaults_Appearance"}),Ws=c.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:Bp,repeated:!0},{no:2,name:"primary_color",kind:"scalar",T:9},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"text_color",kind:"enum",T:c.getEnumType(Rp)},{no:5,name:"app_installed_text",kind:"scalar",T:9},{no:6,name:"app_not_installed_text",kind:"scalar",T:9},{no:7,name:"text_color_custom",kind:"scalar",T:9},{no:8,name:"cta_image",kind:"message",T:Qp}]),Gp=c.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:c.getEnumType(qi)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:5,name:"default_channel_type",kind:"enum",T:c.getEnumType(Xa)}]),Tt=c.makeMessageType("streamlayer.sdkSettings.GetStreamChannel",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"channel_id",kind:"scalar",T:9},{no:4,name:"channel_type",kind:"enum",T:c.getEnumType(Xa)},{no:5,name:"is_default",kind:"enum",T:c.getEnumType(xp)}]),Yp=c.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:c.getEnumType(qi)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:4,name:"default_channel_type",kind:"enum",T:c.getEnumType(Xa)},{no:5,name:"default_channel",kind:"message",T:Tt},{no:6,name:"channels",kind:"message",T:Tt,repeated:!0}]),Hi=c.makeMessageType("streamlayer.sdkSettings.StreamSettings",()=>[{no:1,name:"overlays",kind:"message",T:Ot,repeated:!0},{no:2,name:"custom",kind:"scalar",T:8},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"primary_color",kind:"scalar",T:9},{no:5,name:"secondary_color",kind:"scalar",T:9},{no:6,name:"moderation_primary_color",kind:"scalar",T:9},{no:7,name:"link_share_icon",kind:"scalar",T:9},{no:8,name:"link_share_text",kind:"scalar",T:9},{no:9,name:"brand_defaults",kind:"message",T:Wi},{no:10,name:"getstream",kind:"message",T:Yp}]),Vp=c.makeMessageType("streamlayer.sdkSettings.JWK",()=>[{no:1,name:"alg",kind:"scalar",T:9,opt:!0},{no:2,name:"crv",kind:"scalar",T:9,opt:!0},{no:3,name:"d",kind:"scalar",T:9,opt:!0},{no:4,name:"dp",kind:"scalar",T:9,opt:!0},{no:5,name:"dq",kind:"scalar",T:9,opt:!0},{no:6,name:"e",kind:"scalar",T:9,opt:!0},{no:7,name:"ext",kind:"scalar",T:8,opt:!0},{no:8,name:"k",kind:"scalar",T:9,opt:!0},{no:9,name:"key_ops",kind:"scalar",T:9,repeated:!0},{no:10,name:"kid",kind:"scalar",T:9,opt:!0},{no:11,name:"kty",kind:"scalar",T:9,opt:!0},{no:12,name:"n",kind:"scalar",T:9,opt:!0},{no:13,name:"oth",kind:"message",T:$p,repeated:!0},{no:14,name:"p",kind:"scalar",T:9,opt:!0},{no:15,name:"q",kind:"scalar",T:9,opt:!0},{no:16,name:"qi",kind:"scalar",T:9,opt:!0},{no:17,name:"use",kind:"scalar",T:9,opt:!0},{no:18,name:"x",kind:"scalar",T:9,opt:!0},{no:19,name:"y",kind:"scalar",T:9,opt:!0},{no:20,name:"x5c",kind:"scalar",T:9,repeated:!0},{no:21,name:"x5t",kind:"scalar",T:9,opt:!0},{no:22,name:"x5u",kind:"scalar",T:9,opt:!0}]),$p=c.makeMessageType("streamlayer.sdkSettings.JWK.OTH",()=>[{no:1,name:"d",kind:"scalar",T:9,opt:!0},{no:2,name:"r",kind:"scalar",T:9,opt:!0},{no:3,name:"t",kind:"scalar",T:9,opt:!0}],{localName:"JWK_OTH"}),Zi=c.makeMessageType("streamlayer.sdkSettings.OrganizationSettings",()=>[{no:1,name:"overlays",kind:"message",T:Ot,repeated:!0},{no:2,name:"button_icon",kind:"scalar",T:9},{no:3,name:"tinode_host",kind:"scalar",T:9},{no:4,name:"audience",kind:"scalar",T:9},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"provider",kind:"scalar",T:9},{no:7,name:"primary_color",kind:"scalar",T:9},{no:8,name:"secondary_color",kind:"scalar",T:9},{no:9,name:"moderation_primary_color",kind:"scalar",T:9},{no:10,name:"link_share_icon",kind:"scalar",T:9},{no:11,name:"link_share_text",kind:"scalar",T:9},{no:12,name:"brand_defaults",kind:"message",T:Wi},{no:13,name:"pub",kind:"message",T:Vp},{no:14,name:"getstream",kind:"message",T:Gp}]),qp=c.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:_p},{no:2,name:"moderation",kind:"message",T:jp},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:c.getEnumType(Cp)}]),Hs=c.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:Tt},{no:2,name:"channels",kind:"message",T:Tt,repeated:!0}]),Dn=c.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:Pp,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:Ws,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:Ws,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:qp,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:Hs,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:Hs,oneof:"overlay_settings"}]),Wp=c.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:Dn},{no:2,name:"global_preset",kind:"message",T:Dn},{no:3,name:"preset",kind:"message",T:Dn},{no:4,name:"stream",kind:"message",T:Dn}]),Ot=c.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(_e)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:Dn},{no:6,name:"meta",kind:"message",T:Wp},{no:7,name:"enable",kind:"scalar",T:8},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:14,name:"enable_sdk_button",kind:"scalar",T:8}]);c.makeMessageType("streamlayer.sdkSettings.SdkOverlayUpdateData",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(_e)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:Dn},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"}]);c.makeMessageType("streamlayer.sdkSettings.OverlaysListRequest",[]);c.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse",()=>[{no:1,name:"data",kind:"message",T:Hp}]);const Hp=c.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse.OverlaysListResponseData",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:Ot,repeated:!0}],{localName:"OverlaysListResponse_OverlaysListResponseData"});c.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Zp}]);const Zp=c.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse.GenerateSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateSdkKeyResponse_GenerateSdkKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Kp}]);const Kp=c.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse.RemoveSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveSdkKeyResponse_RemoveSdkKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.ListSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Jp}]);const Jp=c.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse.ListSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"ListSdkKeyResponse_ListSdkKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.RegisterTwitterRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"stream_id",kind:"scalar",T:9},{no:3,name:"account",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.RegisterTwitterResponse",[]);c.makeMessageType("streamlayer.sdkSettings.Preset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:eg},{no:3,name:"settings",kind:"message",T:Xp}]);const Xp=c.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:Ot,repeated:!0},{no:2,name:"advertising",kind:"message",T:Ki}]),eg=c.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:c.getEnumType(zp)},{no:2,name:"value",kind:"scalar",T:9}]),ng=c.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:Zs},{no:2,name:"videos",kind:"message",T:Zs}]),Zs=c.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraint",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5},{no:3,name:"max_file_size",kind:"scalar",T:1},{no:4,name:"mime",kind:"scalar",T:9}]),tg=c.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplate",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"constraints",kind:"map",K:9,V:{kind:"message",T:ng}}]);c.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:tg,repeated:!0}]);const ag=c.makeMessageType("streamlayer.sdkSettings.AdvertisingImage",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"placement",kind:"enum",T:c.getEnumType(Up)}]),sg=c.makeMessageType("streamlayer.sdkSettings.AdvertisingVideo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"background_color",kind:"scalar",T:9}]),rg=c.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:ag,repeated:!0},{no:3,name:"videos",kind:"message",T:sg,repeated:!0}]),ig=c.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:c.getEnumType(_e)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:rg}},{no:3,name:"enabled",kind:"scalar",T:8},{no:4,name:"overlay_name",kind:"scalar",T:9},{no:5,name:"use_custom",kind:"scalar",T:8,opt:!0}]),Ki=c.makeMessageType("streamlayer.sdkSettings.Advertising",()=>[{no:1,name:"template_id",kind:"scalar",T:9},{no:2,name:"overlay_settings",kind:"map",K:9,V:{kind:"message",T:ig}}]);c.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:og}]);const og=c.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse.GenerateApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateApiKeyResponse_GenerateApiKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"token",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:cg}]);const cg=c.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse.RemoveApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveApiKeyResponse_RemoveApiKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.GetApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:lg}]);const lg=c.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse.GetApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyResponse_GetApiKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse",()=>[{no:1,name:"data",kind:"message",T:ug}]);const ug=c.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse.GetApiKeyStudioResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyStudioResponse_GetApiKeyStudioResponseData"}),mg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMT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DE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const fg=S("div")({name:"Panel",class:"p1fl4kim",propsAsIs:!1}),Tg=S("div")({name:"QuestionTypeIconWrap",class:"qqhwgfn",propsAsIs:!1}),hg=S("img")({name:"QuestionTypeIcon",class:"q1lyf5nv",propsAsIs:!1}),kg=S("div")({name:"QuestionContent",class:"qlmoky7",propsAsIs:!1}),Mg=S("div")({name:"QuestionTypeLabel",class:"qp1y7hu",propsAsIs:!1}),Ng=S("div")({name:"QuestionSubject",class:"q1de583k",propsAsIs:!1}),Ig=S("button")({name:"QuestionActionTitle",class:"ql7tvph",propsAsIs:!1}),Sg=S("button")({name:"QuestionActionIcon",class:"qh0ibjl",propsAsIs:!1}),Ag=S("img")({name:"QuestionStatusIcon",class:"q1bdpn1b",propsAsIs:!1}),Eg=S("span")({name:"QuestionTypeTitle",class:"q6tdooc",propsAsIs:!1}),bg=S("span")({name:"ExpiredQuestion",class:"e1f2al71",propsAsIs:!1}),Dg={[ye.POLL]:{label:"Poll",icon:mg},[ye.TRIVIA]:{label:"Trivia",icon:pg},[ye.PREDICTION]:{label:"Prediction",icon:dg}},_g={[Gn.LOST]:yg,[Gn.WON]:gg,[Gn.UNSET]:_a,[Gn.DNP]:_a},wg=({questionId:n,questionType:e,questionStatus:t,subject:a,openForVoting:s,openQuestion:r,status:i})=>{const l=Dg[e];return l===void 0?null:f.jsxs(fg,{onClick:()=>r==null?void 0:r(n),children:[f.jsx(Tg,{children:f.jsx(hg,{alt:"question-type-icon",src:l.icon})}),f.jsxs(kg,{children:[f.jsxs(Mg,{children:[f.jsx(Eg,{children:l.label}),e===ye.TRIVIA&&t===Ze.RESOLVED&&f.jsx(bg,{children:"Expired"})]}),f.jsx(Ng,{children:a||""})]}),s?f.jsx(Ig,{children:"play"}):f.jsx(Sg,{children:f.jsx(Ag,{alt:"question-status-icon",src:_g[i]})})]})};const vg=S("div")({name:"Container",class:"c4iwna9",propsAsIs:!1}),Og=S("div")({name:"Title",class:"th1ieuk",propsAsIs:!1}),jg=S("div")({name:"ItemsContainer",class:"iiqbvdu",propsAsIs:!1}),Lg=({questions:n,openQuestion:e})=>f.jsxs(vg,{children:[f.jsx(Og,{children:"PICK HISTORY"}),f.jsx(jg,{children:n==null?void 0:n.map(t=>f.jsx(wg,{openQuestion:e,...t},t.questionId))})]}),Rg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0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iA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",xg=n=>n.split(/\s+/).map(e=>e[0]).join("").toUpperCase();const Cg=S("div")({name:"Container",class:"c13i6lze",propsAsIs:!1}),zg=S("div")({name:"Indicator",class:"ix2bv9",propsAsIs:!1}),st=({indicator:n,title:e})=>f.jsxs(Cg,{children:[f.jsx(zg,{children:n}),f.jsx("p",{children:e})]});const Ug=S("div")({name:"Container",class:"c5ghaaw",propsAsIs:!1}),Pg=S("div")({name:"Title",class:"txfzjhj",propsAsIs:!1}),Bg=S("div")({name:"Indicator",class:"i1v0wmto",propsAsIs:!1}),Ks=({indicator:n,title:e})=>f.jsxs(Ug,{children:[f.jsx(Pg,{children:e}),f.jsx(Bg,{children:n})]});const Qg=S("div")({name:"Container",class:"canai20",propsAsIs:!1}),Fg=S("div")({name:"TopInfo",class:"tda0d57",propsAsIs:!1}),Gg=S("div")({name:"BottomInfo",class:"boqy4xv",propsAsIs:!1}),Yg=S("div")({name:"User",class:"u1dtpq3t",propsAsIs:!1}),Vg=S("img")({name:"Avatar",class:"ar4jfc",propsAsIs:!1}),$g=S("div")({name:"UserInfo",class:"u1trcvj0",propsAsIs:!1}),qg=S("div")({name:"UserName",class:"u1pie8mc",propsAsIs:!1}),Wg=S("div")({name:"UserRating",class:"ucsljfb",propsAsIs:!1}),Hg=S("img")({name:"TrophyIcon",class:"tyemu1i",propsAsIs:!1}),Zg=S("div")({name:"Rts",class:"rggn4k7",propsAsIs:!1}),Kg=S("div")({name:"RtsIndicator",class:"rnmjsbm",propsAsIs:!1}),Jg=S("div")({name:"Top",class:"t1i7e651",propsAsIs:!1}),Xg=S("div")({name:"Ranks",class:"r1mt107z",propsAsIs:!1}),ey=S("div")({name:"AvatarPlaceholder",class:"apag0gc",propsAsIs:!1}),ny=S("button")({name:"UserAccountBtn",class:"uroanb5",propsAsIs:!1}),ty=({avatar:n,name:e,points:t,grade:a,friendsRank:s,globalRank:r,winStreak:i,correct:l,incorrect:m,successRate:d})=>f.jsxs(Qg,{children:[f.jsxs(Fg,{children:[f.jsxs(Yg,{children:[f.jsxs(ny,{children:[n&&f.jsx(Vg,{alt:"avatar",src:n}),!n&&f.jsx(ey,{children:xg(e)})]}),f.jsxs($g,{children:[f.jsx(qg,{children:e}),f.jsxs(Wg,{children:[f.jsx(Hg,{alt:"rank-icon",src:Rg}),f.jsxs(Zg,{children:[f.jsx(Kg,{children:t||"-"}),"RTS"]}),f.jsxs(Jg,{children:["TOP ",a,"%"]})]})]})]}),f.jsxs(Xg,{children:[f.jsx(Ks,{title:"Friends rank",indicator:s||"-"}),f.jsx(Ks,{title:"Global rank",indicator:r||"-"})]})]}),f.jsxs(Gg,{children:[f.jsx(st,{indicator:i||"-",title:"Win streak"}),f.jsx(st,{indicator:l||"-",title:"Correct"}),f.jsx(st,{indicator:m||"-",title:"Incorrect"}),f.jsx(st,{indicator:`${d||"-"}%`,title:"Success rate"})]})]}),wa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdod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A3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const Ji=S("div")({name:"Container",class:"c4emhbe",propsAsIs:!1}),sy=()=>Ji,ry=S(sy())({name:"AnsweredContainer",class:"a1a18ay2",propsAsIs:!0}),Xs=S("div")({name:"ButtonPct",class:"bvdmnzn",propsAsIs:!1}),er=S("button")({name:"Button",class:"bz55cek",propsAsIs:!1}),nr=S("img")({name:"Icon",class:"i1u5zlvm",propsAsIs:!1}),tr=S("span")({name:"Title",class:"tfilm7j",propsAsIs:!1}),ar=S("span")({name:"Indicators",class:"iqdzfbw",propsAsIs:!1}),sr=S("div")({name:"CheckIconWrap",class:"ciu4mnt",propsAsIs:!1}),Jt=S("div")({name:"Percentage",class:"pl06bzo",propsAsIs:!1}),rr=S("img")({name:"CheckIcon",class:"c5bwq34",propsAsIs:!1}),iy=({icon:n,id:e,title:t,questionId:a,disabled:s,percentage:r,onVote:i,toggleIsLoadingSubmitAnswer:l,correct:m,questionAnswered:d,hasCorrectAnswer:g,answered:T,points:h,questionType:M})=>{var E;return d&&T?f.jsxs(ry,{"data-answeredCorrect":(E=!g||m)==null?void 0:E.toString(),"data-questionAnswered":"false",children:[f.jsx(Xs,{style:{width:`${r}%`}}),f.jsxs(er,{disabled:s,onClick:()=>i(a,e),children:[n&&f.jsx(nr,{alt:"option-icon",src:n}),f.jsx(tr,{children:t}),f.jsxs(ar,{children:[g&&m&&f.jsx(sr,{children:f.jsx(rr,{alt:"icon-correct",src:T?Js:wa})}),f.jsxs(Jt,{children:[r,"%"]})]})]})]}):f.jsxs(Ji,{"data-questionAnswered":d==null?void 0:d.toString(),children:[d&&f.jsx(Xs,{style:{width:`${r}%`}}),f.jsxs(er,{disabled:s,onClick:()=>{l(!0),i(a,e)},children:[n&&f.jsx(nr,{alt:"option-icon",src:n}),f.jsx(tr,{children:t}),d?f.jsxs(ar,{children:[g&&m&&f.jsx(sr,{children:f.jsx(rr,{alt:"icon-correct",src:T?Js:wa})}),f.jsxs(Jt,{children:[r,"%"]})]}):M===ye.PREDICTION?f.jsxs(Jt,{children:[h," pts"]}):null]})]})};const oy=S("div")({name:"Container",class:"cgz6mxc",propsAsIs:!1}),cy=S("div")({name:"Title",class:"ta6van7",propsAsIs:!1}),ly=S("div")({name:"Options",class:"o1msgqq4",propsAsIs:!1}),uy=S("div")({name:"Loader",class:"lq1mbhd",propsAsIs:!1}),my=S("div")({name:"Feedback",class:"f9kw2xt",propsAsIs:!1}),dy=S("img")({name:"FeedbackIcon",class:"fn7neu6",propsAsIs:!1}),py=S("div")({name:"FeedbackTitle",class:"fpdq7m5",propsAsIs:!1}),gy=S("div")({name:"FeedbackDescription",class:"f1ljy63t",propsAsIs:!1}),yy=({title:n,questionId:e,options:t,questionAnswered:a,feedbackMessages:s,questionAnsweredCorrectly:r,questionType:i})=>{const[l,m]=Q.useState(!1),d=Q.useCallback(g=>{m(g)},[m]);return Q.useEffect(()=>{d(!1)},[t,d]),f.jsxs(oy,{children:[f.jsx(cy,{children:n}),f.jsxs(ly,{children:[l&&f.jsx(uy,{children:"Loading..."}),t.map(g=>f.jsx(iy,{toggleIsLoadingSubmitAnswer:d,questionId:e,questionType:i,...g},g.id))]}),a&&i===ye.TRIVIA&&f.jsxs(my,{children:[f.jsx(dy,{alt:"reaction-to-answer",src:r?wa:ay}),f.jsxs("div",{children:[f.jsx(py,{children:r?s.correctFeedback.title:s.incorrectFeedback.title}),f.jsx(gy,{children:r?s.correctFeedback.description:s.incorrectFeedback.description})]})]})]})};class fy{}window.slStore=Object.create(null);class jt{constructor(e,t){N(this,"store");N(this,"name");this.store=e,this.name=t}getStore(){return this.store}}const Ty=n=>{const e=Object.keys(n);return De.computed(e.map(t=>n[t].getStore()),(...t)=>Object.fromEntries(e.map((a,s)=>[a,t[s]])))};class Vn extends jt{constructor(){super(...arguments);N(this,"getValues",()=>this.getStore().get());N(this,"getValue",t=>this.getStore().get()[t]);N(this,"setValue",(t,a)=>this.getStore().setKey(t,a));N(this,"subscribe",(...t)=>this.getStore().subscribe(...t));N(this,"unsubscribe",()=>this.getStore().off())}}const $n=n=>De.map(n);var An=(n=>(n.ORGANIZATION="ORGANIZATION",n.STREAM="STREAM",n))(An||{});const hy={[_e.BETTING]:"betting",[_e.GAMES]:"games",[_e.PUBLIC_CHAT]:"publicChat",[_e.TWITTER]:"twitter"};var He=(n=>(n.Ready="ready",n.Suspended="suspended",n))(He||{});class es{constructor({settings:e,...t},a){N(this,"status");N(this,"source");N(this,"config");N(this,"settings");N(this,"listeners",new Set);N(this,"settingsKey");N(this,"enable",()=>{this.status.set("ready")});N(this,"disable",()=>{this.status.set("suspended")});N(this,"setFeatureConfig",({settings:e,...t})=>{let a;for(a in t)this.config.setValue(a,t[a]);if((e==null?void 0:e.overlaySettings.case)===this.settingsKey){const s=e.overlaySettings.value;if(s!==void 0){let r;for(r in s)console.log(r,s[r]),s[r]!==0&&s[r]!==""&&this.settings.setValue(r,s[r])}}});N(this,"update",(e,t)=>{this.source==="STREAM"&&t==="ORGANIZATION"||(this.setFeatureConfig(e),this.source=t)});this.settingsKey=hy[t.type],this.status=De.atom("suspended"),this.config=new Vn($n(t),`feature:config:${this.settingsKey}`),this.settingsKey!==void 0&&(e==null?void 0:e.overlaySettings.case)===this.settingsKey?this.settings=new Vn($n(e.overlaySettings.value),`feature:settings:${this.settingsKey}`):this.settings=new Vn($n({}),`feature:settings:${this.settingsKey}`),this.source=a}get featureConfig(){return this.config.getStore()}get featureSettings(){return this.settings.getStore()}registerEventListener(e){this.listeners.add(e)}fireEvent(e){for(const t of this.listeners.values())try{t.onEvent(e)}catch(a){console.error(a)}}}class Re extends jt{constructor(){super(...arguments);N(this,"getValue",()=>this.getStore().get());N(this,"setValue",t=>this.getStore().set(t));N(this,"subscribe",t=>this.getStore().subscribe(t));N(this,"unsubscribe",()=>this.getStore().off())}getValues(){throw new Error("not implemented")}listen(t){return this.getStore().listen(t)}get(){return this.getStore().get()}}const xe=n=>De.atom(n),ns=(n,e)=>De.computed(n,e);class Le extends jt{constructor(t,a,s){super(t,`api:${a}`);N(this,"atomStore");N(this,"getAtomStore",()=>this.atomStore);N(this,"getValue",async()=>{const t=this.getStore();if(t.value===void 0)throw new Error("no store");return await t.value.promise,t.get().data});N(this,"getValues",()=>{throw new Error("not implemented")});N(this,"setValue",t=>this.getStore().set({loading:!1,data:t==null?void 0:t.data}));N(this,"subscribe",t=>this.getStore().subscribe(t));N(this,"unsubscribe",()=>{throw new Error("not implemented")});N(this,"invalidate",()=>{this.store.invalidate()});N(this,"listen",t=>this.getStore().listen(t));N(this,"key",()=>this.getStore().key);N(this,"off",()=>this.getStore().off());this.atomStore=De.atom(),s&&t.subscribe(r=>{this.atomStore.set(s(r))})}get(){throw new Error("not implemented")}}var ts={exports:{}};function ky(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}var My=Ny;function Ny(n,e,t){var a=t&&t.stringify||ky,s=1;if(typeof n=="object"&&n!==null){var r=e.length+s;if(r===1)return n;var i=new Array(r);i[0]=a(n);for(var l=1;l<r;l++)i[l]=a(e[l]);return i.join(" ")}if(typeof n!="string")return n;var m=e.length;if(m===0)return n;for(var d="",g=1-s,T=-1,h=n&&n.length||0,M=0;M<h;){if(n.charCodeAt(M)===37&&M+1<h){switch(T=T>-1?T:0,n.charCodeAt(M+1)){case 100:case 102:if(g>=m||e[g]==null)break;T<M&&(d+=n.slice(T,M)),d+=Number(e[g]),T=M+2,M++;break;case 105:if(g>=m||e[g]==null)break;T<M&&(d+=n.slice(T,M)),d+=Math.floor(Number(e[g])),T=M+2,M++;break;case 79:case 111:case 106:if(g>=m||e[g]===void 0)break;T<M&&(d+=n.slice(T,M));var E=typeof e[g];if(E==="string"){d+="'"+e[g]+"'",T=M+2,M++;break}if(E==="function"){d+=e[g].name||"<anonymous>",T=M+2,M++;break}d+=a(e[g]),T=M+2,M++;break;case 115:if(g>=m)break;T<M&&(d+=n.slice(T,M)),d+=String(e[g]),T=M+2,M++;break;case 37:T<M&&(d+=n.slice(T,M)),d+="%",T=M+2,M++,g--;break}++g}++M}return T===-1?n:(T<h&&(d+=n.slice(T)),d)}const ir=My;ts.exports=Ke;const Zn=Cy().console||{},Iy={mapHttpRequest:rt,mapHttpResponse:rt,wrapRequestSerializer:Xt,wrapResponseSerializer:Xt,wrapErrorSerializer:Xt,req:rt,res:rt,err:cr,errWithCause:cr};function ht(n,e){return n==="silent"?1/0:e.levels.values[n]}const as=Symbol("pino.logFuncs"),va=Symbol("pino.hierarchy"),Sy={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function or(n,e){const t={logger:e,parent:n[va]};e[va]=t}function Ay(n,e,t){const a={};e.forEach(s=>{a[s]=t[s]?t[s]:Zn[s]||Zn[Sy[s]||"log"]||Kn}),n[as]=a}function Ey(n,e){return Array.isArray(n)?n.filter(function(a){return a!=="!stdSerializers.err"}):n===!0?Object.keys(e):!1}function Ke(n){n=n||{},n.browser=n.browser||{};const e=n.browser.transmit;if(e&&typeof e.send!="function")throw Error("pino: transmit option must have a send function");const t=n.browser.write||Zn;n.browser.write&&(n.browser.asObject=!0);const a=n.serializers||{},s=Ey(n.browser.serialize,a);let r=n.browser.serialize;Array.isArray(n.browser.serialize)&&n.browser.serialize.indexOf("!stdSerializers.err")>-1&&(r=!1);const i=Object.keys(n.customLevels||{}),l=["error","fatal","warn","info","debug","trace"].concat(i);typeof t=="function"&&l.forEach(function(D){t[D]=t}),(n.enabled===!1||n.browser.disabled)&&(n.level="silent");const m=n.level||"info",d=Object.create(t);d.log||(d.log=Kn),Ay(d,l,t),or({},d),Object.defineProperty(d,"levelVal",{get:T}),Object.defineProperty(d,"level",{get:h,set:M});const g={transmit:e,serialize:s,asObject:n.browser.asObject,levels:l,timestamp:Ly(n)};d.levels=by(n),d.level=m,d.setMaxListeners=d.getMaxListeners=d.emit=d.addListener=d.on=d.prependListener=d.once=d.prependOnceListener=d.removeListener=d.removeAllListeners=d.listeners=d.listenerCount=d.eventNames=d.write=d.flush=Kn,d.serializers=a,d._serialize=s,d._stdErrSerialize=r,d.child=E,e&&(d._logEvent=Oa());function T(){return ht(this.level,this)}function h(){return this._level}function M(D){if(D!=="silent"&&!this.levels.values[D])throw Error("unknown level "+D);this._level=D,rn(this,g,d,"error"),rn(this,g,d,"fatal"),rn(this,g,d,"warn"),rn(this,g,d,"info"),rn(this,g,d,"debug"),rn(this,g,d,"trace"),i.forEach(L=>{rn(this,g,d,L)})}function E(D,L){if(!D)throw new Error("missing bindings for child Pino");L=L||{},s&&D.serializers&&(L.serializers=D.serializers);const O=L.serializers;if(s&&O){var R=Object.assign({},a,O),x=n.browser.serialize===!0?Object.keys(R):s;delete D.serializers,Lt([D],x,R,this._stdErrSerialize)}function z(B){this._childLevel=(B._childLevel|0)+1,this.bindings=D,R&&(this.serializers=R,this._serialize=x),e&&(this._logEvent=Oa([].concat(B._logEvent.bindings,D)))}z.prototype=this;const U=new z(this);return or(this,U),U.level=this.level,U}return d}function by(n){const e=n.customLevels||{},t=Object.assign({},Ke.levels.values,e),a=Object.assign({},Ke.levels.labels,Dy(e));return{values:t,labels:a}}function Dy(n){const e={};return Object.keys(n).forEach(function(t){e[n[t]]=t}),e}Ke.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Ke.stdSerializers=Iy;Ke.stdTimeFunctions=Object.assign({},{nullTime:Xi,epochTime:eo,unixTime:Ry,isoTime:xy});function _y(n){const e=[];n.bindings&&e.push(n.bindings);let t=n[va];for(;t.parent;)t=t.parent,t.logger.bindings&&e.push(t.logger.bindings);return e.reverse()}function rn(n,e,t,a){if(n[a]=ht(n.level,t)>ht(a,t)?Kn:t[as][a],!e.transmit&&n[a]===Kn)return;n[a]=vy(n,e,t,a);const s=_y(n);s.length!==0&&(n[a]=wy(s,n[a]))}function wy(n,e){return function(){return e.apply(this,[...n,...arguments])}}function vy(n,e,t,a){return function(s){return function(){const i=e.timestamp(),l=new Array(arguments.length),m=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Zn?Zn:this;for(var d=0;d<l.length;d++)l[d]=arguments[d];if(e.serialize&&!e.asObject&&Lt(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?s.call(m,Oy(this,a,l,i)):s.apply(m,l),e.transmit){const g=e.transmit.level||n._level,T=t.levels.values[g],h=t.levels.values[a];if(h<T)return;jy(this,{ts:i,methodLevel:a,methodValue:h,transmitLevel:g,transmitValue:t.levels.values[e.transmit.level||n._level],send:e.transmit.send,val:ht(n._level,t)},l)}}}(n[as][a])}function Oy(n,e,t,a){n._serialize&&Lt(t,n._serialize,n.serializers,n._stdErrSerialize);const s=t.slice();let r=s[0];const i={};a&&(i.time=a),i.level=n.levels.values[e];let l=(n._childLevel|0)+1;if(l<1&&(l=1),r!==null&&typeof r=="object"){for(;l--&&typeof s[0]=="object";)Object.assign(i,s.shift());r=s.length?ir(s.shift(),s):void 0}else typeof r=="string"&&(r=ir(s.shift(),s));return r!==void 0&&(i.msg=r),i}function Lt(n,e,t,a){for(const s in n)if(a&&n[s]instanceof Error)n[s]=Ke.stdSerializers.err(n[s]);else if(typeof n[s]=="object"&&!Array.isArray(n[s]))for(const r in n[s])e&&e.indexOf(r)>-1&&r in t&&(n[s][r]=t[r](n[s][r]))}function jy(n,e,t){const a=e.send,s=e.ts,r=e.methodLevel,i=e.methodValue,l=e.val,m=n._logEvent.bindings;Lt(t,n._serialize||Object.keys(n.serializers),n.serializers,n._stdErrSerialize===void 0?!0:n._stdErrSerialize),n._logEvent.ts=s,n._logEvent.messages=t.filter(function(d){return m.indexOf(d)===-1}),n._logEvent.level.label=r,n._logEvent.level.value=i,a(r,n._logEvent,l),n._logEvent=Oa(m)}function Oa(n){return{ts:0,messages:[],bindings:n||[],level:{label:"",value:0}}}function cr(n){const e={type:n.constructor.name,msg:n.message,stack:n.stack};for(const t in n)e[t]===void 0&&(e[t]=n[t]);return e}function Ly(n){return typeof n.timestamp=="function"?n.timestamp:n.timestamp===!1?Xi:eo}function rt(){return{}}function Xt(n){return n}function Kn(){}function Xi(){return!1}function eo(){return Date.now()}function Ry(){return Math.round(Date.now()/1e3)}function xy(){return new Date(Date.now()).toISOString()}function Cy(){function n(e){return typeof e<"u"&&e}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return n(self)||n(window)||n(this)||{}}}ts.exports.default=Ke;var zy=ts.exports.pino=Ke;const Uy=zy({level:"trace"}),no=(n,e)=>Uy.child({name:n},e);let Py=()=>({events:{},emit(n,...e){let t=this.events[n]||[];for(let a=0,s=t.length;a<s;a++)t[a](...e)},on(n,e){var t;return(t=this.events[n])!=null&&t.push(e)||(this.events[n]=[e]),()=>{var a;this.events[n]=(a=this.events[n])==null?void 0:a.filter(s=>e!==s)}}});const By=({cache:n=new Map,fetcher:e,...t}={})=>{const a=Py();let s=!0;pr("visibilitychange",()=>{s=!document.hidden,s&&a.emit(ur)}),pr("online",()=>a.emit(mr));const r=new Map,i=new Map,l=new Map;let m={};const d=async([O,R],x,z,U)=>{var B;if(!s)return;const C=oe=>{x.key===O&&(x.set(oe),a.emit(ea,O,oe,!0))},H=()=>{C({...x.value,...yr,promise:l.get(O)})},{dedupeTime:ne=4e3,fetcher:se}={...z,...m},ie=gr();if(l.has(O)){x.value.loading||H();return}if(!U){const oe=n.get(O);oe&&x.value.data!==oe&&C({data:oe,...on});const Z=i.get(O);if(Z&&Z+ne>ie)return}const ue=De.startTask();try{const oe=se(...R);i.set(O,ie),l.set(O,oe),H();const Z=await oe;n.set(O,Z),C({data:Z,...on}),i.set(O,gr())}catch(oe){(B=z.onError)==null||B.call(z,oe),C({data:x.value.data,error:oe,...on})}finally{ue(),l.delete(O)}},g=(O,{fetcher:R=e,...x}={})=>{const z=De.map({...on}),U={...t,...x,fetcher:R};z.invalidate=()=>{const{key:Z}=z;Z&&M(Z)},z.mutate=Z=>{const{key:me}=z;me&&E(me,Z)};let B,C,H,ne,se,ie=[];De.onStart(z,()=>{const Z=!B;[se,B]=Qy(O),ne=se.subscribe(Se=>{if(Se){const[K,I]=Se;z.key=K,d([K,I],z,U),C=K,H=I}else z.key=C=H=void 0});const me=se.get();me&&([C,H]=me,Z&&ue());const{refetchInterval:Ee=0,refetchOnFocus:Ce,refetchOnReconnect:we}=U,Ie=()=>{C&&d([C,H],z,U)};Ee>0&&r.set(O,setInterval(Ie,Ee)),Ce&&ie.push(a.on(ur,Ie)),we&&ie.push(a.on(mr,Ie)),ie.push(a.on(dr,Se=>{C&&na(C,Se)&&d([C,H],z,U,!0)}),a.on(ea,(Se,K,I)=>{C&&na(C,Se)&&z.value!==K&&z.value.data!==K&&z.set(I?K:{data:K,...on})}))});const ue=()=>{C&&H&&d([C,H],z,U)},oe=z.listen;return z.listen=Z=>{const me=oe(Z);return Z(z.value),ue(),me},De.onStop(z,()=>{z.value={...on},B==null||B(),ie.forEach(me=>me()),ie=[],ne==null||ne();const Z=r.get(O);Z&&clearInterval(Z)}),z},T=O=>{n.delete(O),i.delete(O)},h=(O,R)=>{for(const x of n.keys())na(x,O)&&R(x)},M=O=>{h(O,T),a.emit(dr,O)},E=(O,R)=>{h(O,x=>{R===void 0?T(x):n.set(x,R)}),a.emit(ea,O,R)};function D(O){const R=async z=>{var U,B;const C=(U=m.fetcher)!=null?U:O,H=[];try{x.set({error:void 0,data:void 0,mutate:R,...yr});const ne=await C({data:z,invalidate:se=>{H.push(se)},getCacheUpdater:(se,ie=!0)=>[ue=>{E(se,ue),ie&&H.push(se)},n.get(se)]});return x.setKey("data",ne),ne}catch(ne){(B=t==null?void 0:t.onError)==null||B.call(t,ne),x.setKey("error",ne)}finally{x.setKey("loading",!1),H.forEach(M)}},x=De.map({mutate:R,...on});return x.mutate=R,x}return[g,D,{__unsafeOverruleSettings:O=>{console.warn("You should only use __unsafeOverruleSettings in test environment"),m=O},invalidateKeys:M,mutateCache:E}]};function lr(n){return typeof n=="string"||typeof n=="number"}const Qy=n=>{if(lr(n))return[De.atom([""+n,[n]]),()=>{}];let e=De.atom(null),t=[];const a=()=>{t.some(r=>r==null)?e.set(null):e.set([t.join(""),t])},s=[];for(let r=0;r<n.length;r++){const i=n[r];if(lr(i)){t.push(i);continue}s.push(i.subscribe(l=>{t[r]=l,a()}))}return a(),[e,()=>s.forEach(r=>r())]},ur=1,mr=2,dr=3,ea=4,pr=(n,e)=>{typeof window>"u"||addEventListener(n,e)},na=(n,e)=>Array.isArray(e)?e.includes(n):typeof e=="function"?e(n):n===e,gr=()=>new Date().getTime(),yr={loading:!0},on={loading:!1};async function*Fy(n,e){for await(const t of e){n.response.message=t,n.received_at=Date.now();const a={type:"__GRPC_DEVTOOLS_EXTENSION__",data:n};window.postMessage(a),yield t}}const Gy=()=>n=>async e=>{const t={name:e.url,request:{},response:{}};t.request.header=Object.fromEntries(e.header.entries()),t.sent_at=Date.now();try{const a=await n(e);if(t.received_at=Date.now(),t.stream=a.stream,t.response.header=Object.fromEntries(a.header.entries()),t.response.trailer=Object.fromEntries(a.trailer.entries()),a.stream)return{...a,message:Fy(t,a.message)};{t.request.message=e.message,t.response.message=a.message,t.latency=t.received_at-t.sent_at;const s={type:"__GRPC_DEVTOOLS_EXTENSION__",data:t};window.postMessage(s)}return a}catch(a){t.received_at=Date.now(),t.request.message=e.message,t.response.trailer={"grpc-status":a.code,"grpc-message":a.rawMessage},t.response.message=a.rawMessage,t.latency=t.received_at-t.sent_at;const s={type:"__GRPC_DEVTOOLS_EXTENSION__",data:t};throw window.postMessage(s),a}};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));class Yy{constructor(e,t,a,s){N(this,"params");N(this,"stream");N(this,"method");N(this,"name");N(this,"headers");N(this,"listeners");N(this,"state");N(this,"store");N(this,"updateState",e=>{this.state.setValue("status",e),this.state.setValue("ts",new Date),this.addStateLog(`status => ${e}`)});N(this,"addStateLog",e=>{const t=this.state.getStore().get().log;this.state.setValue("log",[...t,`${new Date().toLocaleString()}: ${e}`])});N(this,"addListener",(e,t)=>this.listeners.has(e)?(this.addStateLog(`listener '${e}' not added`),!1):(this.listeners.set(e,t),this.addStateLog(`listener '${e}' added`),!0));N(this,"removeListener",e=>{this.listeners.delete(e),this.addStateLog(`listener '${e}' removed`)});N(this,"connect",()=>{this.updateState("connecting"),this.stream&&(this.addStateLog("disconnect prev connection"),this.stream());const e="get"in this.params&&typeof this.params.get=="function"?this.params.get():this.params;this.stream=this.method(e,this.onData,this.onStreamError,{headers:this.headers.getValues()}),this.updateState("connected")});N(this,"disconnect",()=>{this.stream&&this.stream(),this.listeners.clear(),this.updateState("disconnected")});N(this,"reconnect",()=>{this.updateState("reconnecting"),this.connect()});N(this,"getStore",()=>{var e;return(e=this.store)==null?void 0:e.getStore()});N(this,"onData",e=>{this.addStateLog(`received data => ${JSON.stringify(e)}`),this.store&&this.store.setValue(e);for(const[,t]of this.listeners)t(e);this.addStateLog(`data routed to ${this.listeners.size} listeners`)});N(this,"onStreamError",e=>{e!==void 0&&(e.code!==ee.Canceled&&e.rawMessage!=="[canceled] BodyStreamBuffer was aborted"?(this.updateState("failed"),this.state.setValue("error",e)):this.disconnect())});const r={status:"init",ts:new Date,log:[]};this.state=new Vn($n(r),`subscription:${s.name}:state`),this.name=s.name,this.headers=e,this.listeners=new Map,this.params=a,this.method=t,s.withStore&&(this.store=new Re(xe(null),`subscription:${s.name}:store`)),"subscribe"in a&&typeof a.subscribe=="function"&&a.subscribe(()=>{this.reconnect()}),this.updateState("ready")}}class Vy{constructor(e){N(this,"toJsonOptions",{emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1});N(this,"transport");N(this,"nanoquery");N(this,"host");N(this,"interceptors",[]);N(this,"$headers");N(this,"clients");N(this,"callbackClients");N(this,"subscriptions");N(this,"addSubscription",(e,t,a)=>{const s=this.subscriptions.get(t);if(s)return s;const r=new Yy(this.$headers,e,t,a);return this.subscriptions.set(t,r),r});N(this,"removeSubscription",e=>{e.disconnect(),this.subscriptions.delete(e.params)});N(this,"disconnect",()=>{for(const[e,t]of this.subscriptions)t.disconnect(),this.subscriptions.delete(e)});N(this,"registerInterceptor",e=>{this.interceptors.push(e)});N(this,"removeInterceptor",e=>{this.interceptors=this.interceptors.filter(t=>t!==e)});N(this,"getClient",e=>{const t=e.typeName;if(this.clients.has(t))return this.clients.get(t);const a=_t(e,this.transport);return this.clients.set(t,a),a});N(this,"getCallbackClient",e=>{const t=e.typeName;if(this.callbackClients.has(t))return this.callbackClients.get(t);const a=Ql(e,this.transport);return this.callbackClients.set(t,a),a});N(this,"createPromiseClient",(e,{params:t=[],method:a})=>{const s=this.getClient(e),r=e.methods[a].name,i=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1),...Array.isArray(t)?t:[t]],l=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1)];return{client:s,queryKey:i,queryKeyStr:l.join("")}});N(this,"createCallbackClient",e=>({client:this.getCallbackClient(e)}));N(this,"setSdkKey",e=>{this.$headers.setValue("sdk",e)});N(this,"setAuth",e=>{this.$headers.setValue("authorization",e)});N(this,"setHeader",(e,t)=>this.$headers.setValue(e,t));N(this,"getHeader",e=>this.$headers.getValue(e));N(this,"getHeaders",()=>this.$headers.getValues());N(this,"initInterceptors",()=>{if(this.interceptors.length!==0)return;const e=t=>a=>{const s=this.$headers.getValues();for(const r in s)a.header.set(r,s[r]);return t(a)};this.interceptors.push(e),this.interceptors.push(Gy())});var r,i;this.host=e,this.$headers=new Vn($n({"sl-device-id":((i=(r=G.process)==null?void 0:r.env)==null?void 0:i.NX_DEVICE_ID)||"sdk-web-dev"}),"transport:headers"),this.initInterceptors(),this.clients=new Map,this.callbackClients=new Map,this.subscriptions=new Map;const[t,a,s]=By();this.nanoquery={createFetcherStore:t,createMutatorStore:a,utils:s},this.transport=wt({baseUrl:e,interceptors:this.interceptors,useBinaryFormat:!0})}}const $y=c.makeEnum("streamlayer.sports.LeagueSyncStatus",[{no:0,name:"LEAGUE_SYNC_STATUS_UNSET",localName:"UNSET"},{no:1,name:"LEAGUE_SYNC_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"LEAGUE_SYNC_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"LEAGUE_SYNC_STATUS_SYNCED",localName:"SYNCED"},{no:4,name:"LEAGUE_SYNC_STATUS_ERROR",localName:"ERROR"}]),ss=c.makeEnum("streamlayer.sports.EventStatus",[{no:0,name:"EVENT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_STATUS_PREGAME",localName:"PREGAME"},{no:2,name:"EVENT_STATUS_ACTIVE",localName:"ACTIVE"},{no:3,name:"EVENT_STATUS_BREAK",localName:"BREAK"},{no:4,name:"EVENT_STATUS_OVERTIME",localName:"OVERTIME"},{no:5,name:"EVENT_STATUS_SHOOTOUTS",localName:"SHOOTOUTS"},{no:6,name:"EVENT_STATUS_POSTGAME",localName:"POSTGAME"},{no:7,name:"EVENT_STATUS_CANCELLED",localName:"CANCELLED"}]),rs=c.makeEnum("streamlayer.sports.EventEndless",[{no:0,name:"EVENT_ENDLESS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_ENDLESS_ENABLED",localName:"ENABLED"},{no:2,name:"EVENT_ENDLESS_DISABLED",localName:"DISABLED"}]),Rt=c.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),to=c.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),xt=c.makeMessageType("streamlayer.sports.Meta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}]),Ct=c.makeMessageType("streamlayer.sports.Venue",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"scalar",T:9},{no:3,name:"stadium",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sports.Team",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"alias",kind:"scalar",T:9},{no:5,name:"venue",kind:"message",T:Ct}]);const Xn=c.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),ao=c.makeMessageType("streamlayer.sports.EventPeriod",()=>[{no:1,name:"number",kind:"scalar",T:5},{no:2,name:"score_home",kind:"scalar",T:5},{no:3,name:"score_away",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.Event",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"league_id",kind:"scalar",T:4},{no:4,name:"season_id",kind:"scalar",T:4},{no:5,name:"home_team_id",kind:"scalar",T:4},{no:6,name:"away_team_id",kind:"scalar",T:4},{no:7,name:"winner_team_id",kind:"scalar",T:4},{no:8,name:"scheduled",kind:"scalar",T:9},{no:9,name:"score_home",kind:"scalar",T:5},{no:10,name:"score_away",kind:"scalar",T:5},{no:11,name:"venue",kind:"message",T:Ct},{no:12,name:"event_time",kind:"message",T:Xn},{no:13,name:"status",kind:"enum",T:c.getEnumType(ss)},{no:14,name:"periods",kind:"message",T:ao,repeated:!0},{no:15,name:"start_time",kind:"scalar",T:9},{no:16,name:"end_time",kind:"scalar",T:9},{no:17,name:"endless",kind:"enum",T:c.getEnumType(rs)}]);const so=c.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),qy=c.makeMessageType("streamlayer.sports.PlayerAttributes",()=>[{no:1,name:"display_id",kind:"scalar",T:5},{no:3,name:"full_first",kind:"scalar",T:9},{no:4,name:"full_last",kind:"scalar",T:9},{no:5,name:"uniform",kind:"scalar",T:9},{no:6,name:"height",kind:"message",T:Wy},{no:7,name:"weight",kind:"message",T:Hy},{no:8,name:"birth",kind:"message",T:Zy}]),Wy=c.makeMessageType("streamlayer.sports.PlayerAttributes.Height",()=>[{no:1,name:"centimeters",kind:"scalar",T:5},{no:2,name:"inches",kind:"scalar",T:5}],{localName:"PlayerAttributes_Height"}),Hy=c.makeMessageType("streamlayer.sports.PlayerAttributes.Weight",()=>[{no:1,name:"kilograms",kind:"scalar",T:5},{no:2,name:"pounds",kind:"scalar",T:5}],{localName:"PlayerAttributes_Weight"}),Zy=c.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:so}],{localName:"PlayerAttributes_Birth"});c.makeMessageType("streamlayer.sports.PlayerAttributes.Birth.BirthDate",()=>[{no:1,name:"year",kind:"scalar",T:5},{no:2,name:"month",kind:"scalar",T:5},{no:3,name:"date",kind:"scalar",T:5},{no:4,name:"full",kind:"scalar",T:9}],{localName:"PlayerAttributes_Birth_BirthDate"});const Ky=c.makeMessageType("streamlayer.sports.PlayerTeam",()=>[{no:1,name:"team_id",kind:"scalar",T:4},{no:2,name:"position",kind:"scalar",T:9},{no:3,name:"jersey_number",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.Player",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"first_name",kind:"scalar",T:9},{no:10,name:"last_name",kind:"scalar",T:9},{no:14,name:"display_name",kind:"scalar",T:9},{no:11,name:"birth_date",kind:"scalar",T:9},{no:12,name:"nationality",kind:"message",T:so},{no:13,name:"attributes",kind:"message",T:qy},{no:15,name:"teams",kind:"message",T:Ky,repeated:!0}]);const an=c.makeMessageType("streamlayer.sports.TeamRecord",()=>[{no:1,name:"wins",kind:"scalar",T:5},{no:2,name:"losses",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.Season",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"scalar",T:9},{no:6,name:"year",kind:"scalar",T:5},{no:7,name:"league_id",kind:"scalar",T:4}]);const Fn=c.makeMessageType("streamlayer.sports.SyncStatusStage",()=>[{no:1,name:"stage",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:4},{no:3,name:"datetime",kind:"scalar",T:9},{no:4,name:"error",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:c.getEnumType($y)}]),Jy=c.makeMessageType("streamlayer.sports.SyncStatus",()=>[{no:1,name:"teams",kind:"message",T:Fn},{no:2,name:"event",kind:"message",T:Fn},{no:3,name:"events",kind:"message",T:Fn},{no:4,name:"players",kind:"message",T:Fn},{no:5,name:"leagues",kind:"message",T:Fn}]),Xy=c.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:Jy}]);c.makeMessageType("streamlayer.sports.League",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"country",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9},{no:13,name:"sync",kind:"scalar",T:8},{no:14,name:"sport_id",kind:"scalar",T:4},{no:12,name:"sync_status",kind:"message",T:Xy,repeated:!0}]);c.makeMessageType("streamlayer.sports.Sport",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"created",kind:"scalar",T:9},{no:3,name:"updated",kind:"scalar",T:9},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9}]);const ef=c.makeMessageType("streamlayer.sports.NflEventStatistics",()=>[{no:1,name:"passes",kind:"scalar",T:5},{no:2,name:"rushes",kind:"scalar",T:5},{no:3,name:"penalties",kind:"scalar",T:5},{no:4,name:"turnovers",kind:"scalar",T:5}]),nf=c.makeMessageType("streamlayer.sports.SoccerEventStatistics",()=>[{no:1,name:"ball_possession",kind:"scalar",T:5},{no:2,name:"throw_ins",kind:"scalar",T:5},{no:3,name:"fouls",kind:"scalar",T:5},{no:4,name:"goal_kicks",kind:"scalar",T:5},{no:5,name:"free_kicks",kind:"scalar",T:5},{no:6,name:"shots_on_target",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"shots_off_target",kind:"scalar",T:5},{no:9,name:"shots_saved",kind:"scalar",T:5},{no:10,name:"offsides",kind:"scalar",T:5},{no:11,name:"shots_blocked",kind:"scalar",T:5},{no:12,name:"yellow_cards",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.EventTeamStatistics",()=>[{no:1,name:"football",kind:"message",T:ef,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:nf,oneof:"statistics"}]);const sn=c.makeMessageType("streamlayer.sports.EventTeam",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"is_winner",kind:"scalar",T:8}]),tf=c.makeMessageType("streamlayer.sports.EventCustomFields",()=>[{no:1,name:"preview",kind:"scalar",T:9},{no:2,name:"stream",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"event_ids",kind:"scalar",T:9,repeated:!0},{no:6,name:"subtitle",kind:"scalar",T:9},{no:7,name:"promotitle",kind:"scalar",T:9},{no:8,name:"slate",kind:"scalar",T:9},{no:9,name:"horizontal_preview",kind:"scalar",T:9},{no:10,name:"small_logo",kind:"scalar",T:9},{no:11,name:"description",kind:"scalar",T:9}]),af=c.makeMessageType("streamlayer.sports.EventProgram",()=>[{no:1,name:"id",kind:"scalar",T:9,opt:!0},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:9},{no:4,name:"end_time",kind:"scalar",T:9},{no:5,name:"thumbnail_url",kind:"scalar",T:9},{no:6,name:"square_thumbnail_url",kind:"scalar",T:9}]),sf=c.makeMessageType("streamlayer.sports.EventData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"sport",kind:"scalar",T:9},{no:3,name:"league",kind:"scalar",T:9},{no:4,name:"scheduled",kind:"scalar",T:9},{no:5,name:"home",kind:"message",T:sn},{no:6,name:"away",kind:"message",T:sn},{no:7,name:"status",kind:"enum",T:c.getEnumType(ss)},{no:8,name:"custom_fields",kind:"message",T:tf},{no:9,name:"start_time",kind:"scalar",T:9},{no:10,name:"end_time",kind:"scalar",T:9},{no:11,name:"venue",kind:"message",T:Ct},{no:12,name:"schedule",kind:"message",T:af,repeated:!0},{no:13,name:"endless",kind:"enum",T:c.getEnumType(rs)}]),fn=c.makeMessageType("streamlayer.sports.EventSummary",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"scheduled",kind:"scalar",T:9},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"venue",kind:"message",T:Ct},{no:6,name:"event_time",kind:"message",T:Xn},{no:7,name:"home_team",kind:"message",T:sn},{no:8,name:"away_team",kind:"message",T:sn},{no:9,name:"status",kind:"enum",T:c.getEnumType(ss)},{no:10,name:"periods",kind:"message",T:ao,repeated:!0},{no:11,name:"league",kind:"scalar",T:9},{no:12,name:"start_time",kind:"scalar",T:9},{no:13,name:"end_time",kind:"scalar",T:9},{no:14,name:"name",kind:"scalar",T:9},{no:15,name:"logo",kind:"scalar",T:9},{no:16,name:"stream_url",kind:"scalar",T:9}]),it=c.makeMessageType("streamlayer.sports.QueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]),fr=c.makeMessageType("streamlayer.sports.ArrayQueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9,repeated:!0}]);c.makeMessageType("streamlayer.sports.Query",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"match",kind:"message",T:it,repeated:!0},{no:3,name:"ne",kind:"message",T:it,repeated:!0},{no:4,name:"eq",kind:"message",T:it,repeated:!0},{no:5,name:"between",kind:"message",T:fr,repeated:!0},{no:6,name:"includes",kind:"message",T:fr,repeated:!0},{no:7,name:"is",kind:"message",T:it,repeated:!0}]);const rf=c.makeEnum("streamlayer.sports.baseball.PitcherStatus",[{no:0,name:"PITCHER_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PITCHER_STATUS_WIN",localName:"WIN"},{no:2,name:"PITCHER_STATUS_LOSS",localName:"LOSS"}]),of=c.makeEnum("streamlayer.sports.baseball.BaseballBase",[{no:0,name:"BASEBALL_BASE_UNSET",localName:"UNSET"},{no:1,name:"BASEBALL_BASE_FIRST",localName:"FIRST"},{no:2,name:"BASEBALL_BASE_SECOND",localName:"SECOND"},{no:3,name:"BASEBALL_BASE_THIRD",localName:"THIRD"}]),Tr=c.makeMessageType("streamlayer.sports.baseball.PitcherSummary",()=>[{no:1,name:"statistics",kind:"message",T:ro},{no:2,name:"status",kind:"enum",T:c.getEnumType(rf)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),cf=c.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),lf=c.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:c.getEnumType(of)},{no:2,name:"player",kind:"message",T:cf}]),uf=c.makeMessageType("streamlayer.sports.baseball.Hitting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"hits_per_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"run_batted_in",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"batting_average",kind:"scalar",T:9}]),mf=c.makeMessageType("streamlayer.sports.baseball.Batting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"at_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"hits",kind:"scalar",T:9},{no:5,name:"batting_average",kind:"scalar",T:9}]),ro=c.makeMessageType("streamlayer.sports.baseball.Pitching",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"innings_pitched",kind:"scalar",T:9},{no:3,name:"hits_by_pitch",kind:"scalar",T:9},{no:4,name:"earned_runs",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"strikeouts",kind:"scalar",T:9}]),hr=c.makeMessageType("streamlayer.sports.baseball.BaseballTeamSummary",()=>[{no:1,name:"hitting",kind:"message",T:uf,repeated:!0},{no:2,name:"batting",kind:"message",T:mf,repeated:!0},{no:3,name:"pitching",kind:"message",T:ro,repeated:!0}]),df=c.makeMessageType("streamlayer.sports.baseball.BaseballSummary",()=>[{no:1,name:"home_pitcher",kind:"message",T:Tr},{no:2,name:"away_pitcher",kind:"message",T:Tr},{no:3,name:"home_statistics",kind:"message",T:hr},{no:4,name:"away_statistics",kind:"message",T:hr}]),pf=c.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:gf,repeated:!0},{no:5,name:"runs",kind:"scalar",T:5},{no:6,name:"hits",kind:"scalar",T:5},{no:7,name:"errors",kind:"scalar",T:5}]),gf=c.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics.BaseballPlayByPlayDetailStatistics",()=>[{no:1,name:"score_home",kind:"scalar",T:5},{no:2,name:"score_away",kind:"scalar",T:5},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}],{localName:"BaseballPlayByPlayStatistics_BaseballPlayByPlayDetailStatistics"}),yf=c.makeMessageType("streamlayer.sports.baseball.EventScore",()=>[{no:1,name:"outs",kind:"scalar",T:5},{no:2,name:"inning",kind:"scalar",T:5},{no:3,name:"inning_division",kind:"scalar",T:9},{no:4,name:"is_delayed",kind:"scalar",T:8},{no:5,name:"reason_for_delay",kind:"scalar",T:9},{no:6,name:"runners_on_base",kind:"message",T:lf,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),ff=c.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:pf,repeated:!0}]),Tf=c.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:df}]),hf=c.makeMessageType("streamlayer.sports.baseball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:kf},{no:11,name:"rank",kind:"message",T:Mf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),kf=c.makeMessageType("streamlayer.sports.baseball.TeamStanding.Streak",()=>[{no:1,name:"losses",kind:"scalar",T:5},{no:2,name:"wins",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),Mf=c.makeMessageType("streamlayer.sports.baseball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),Nf=c.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:hf,repeated:!0}]),If=c.makeEnum("streamlayer.sports.basketball.BasketballPerformerCategory",[{no:0,name:"BASKETBALL_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"BASKETBALL_PERFORMER_CATEGORY_POINTS",localName:"POINTS"},{no:2,name:"BASKETBALL_PERFORMER_CATEGORY_REBOUNDS",localName:"REBOUNDS"},{no:3,name:"BASKETBALL_PERFORMER_CATEGORY_ASSISTS",localName:"ASSISTS"}]),Sf=c.makeMessageType("streamlayer.sports.basketball.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),kr=c.makeMessageType("streamlayer.sports.basketball.BasketballTeamSummary",()=>[{no:1,name:"field_goal_percentage",kind:"scalar",T:1},{no:2,name:"three_pts_percentage",kind:"scalar",T:1},{no:3,name:"free_throw_percentage",kind:"scalar",T:1},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5}]),Mr=c.makeMessageType("streamlayer.sports.basketball.BasketballPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:9}]),Af=c.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(If)},{no:2,name:"home_player",kind:"message",T:Mr},{no:3,name:"away_player",kind:"message",T:Mr}]),Ef=c.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:kr},{no:2,name:"away_statistics",kind:"message",T:kr}]),bf=c.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Ef},{no:2,name:"top_performers",kind:"message",T:Af,repeated:!0},{no:3,name:"last_games",kind:"message",T:io}]),Df=c.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:Xn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),_f=c.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Df,repeated:!0}]),Nr=c.makeMessageType("streamlayer.sports.basketball.PlayerScores",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"points",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5},{no:6,name:"minutes",kind:"scalar",T:1},{no:7,name:"starter",kind:"scalar",T:8}]),wf=c.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Nr,repeated:!0},{no:2,name:"away_players",kind:"message",T:Nr,repeated:!0}]),vf=c.makeMessageType("streamlayer.sports.basketball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:Of},{no:11,name:"rank",kind:"message",T:jf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Of=c.makeMessageType("streamlayer.sports.basketball.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),jf=c.makeMessageType("streamlayer.sports.basketball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),Lf=c.makeMessageType("streamlayer.sports.basketball.Standings",()=>[{no:1,name:"standings",kind:"message",T:vf,repeated:!0}]),Ir=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),Sr=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineup",()=>[{no:3,name:"start_players",kind:"message",T:Ir,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Ir,repeated:!0}]),Rf=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Sr},{no:2,name:"away_team",kind:"message",T:Sr}]),ta=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:xf}]),xf=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGame.BasketballLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"BasketballLastGame_BasketballLastGameAttributes"}),io=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGames",()=>[{no:1,name:"home",kind:"message",T:ta,repeated:!0},{no:2,name:"away",kind:"message",T:ta,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:ta,repeated:!0}]),Cf=c.makeEnum("streamlayer.sports.hockey.HockeyPerformerCategory",[{no:0,name:"HOCKEY_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PERFORMER_CATEGORY_GOALS",localName:"GOALS"},{no:2,name:"HOCKEY_PERFORMER_CATEGORY_SHOTS",localName:"SHOTS"},{no:3,name:"HOCKEY_PERFORMER_CATEGORY_HITS",localName:"HITS"},{no:4,name:"HOCKEY_PERFORMER_CATEGORY_SAVES",localName:"SAVES"}]),oo=c.makeEnum("streamlayer.sports.hockey.HockeyPlayerPosition",[{no:0,name:"HOCKEY_PLAYER_POSITION_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PLAYER_POSITION_CENTER",localName:"CENTER"},{no:2,name:"HOCKEY_PLAYER_POSITION_LEFT_WIND",localName:"LEFT_WIND"},{no:3,name:"HOCKEY_PLAYER_POSITION_RIGHT_WING",localName:"RIGHT_WING"},{no:4,name:"HOCKEY_PLAYER_POSITION_DEFENSE",localName:"DEFENSE"},{no:5,name:"HOCKEY_PLAYER_POSITION_GOALTENDER",localName:"GOALTENDER"}]),zf=c.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),Ar=c.makeMessageType("streamlayer.sports.hockey.HockeyPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),Uf=c.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(Cf)},{no:2,name:"home_player",kind:"message",T:Ar,repeated:!0},{no:3,name:"away_player",kind:"message",T:Ar,repeated:!0}]),Er=c.makeMessageType("streamlayer.sports.hockey.HockeyTeamSummary",()=>[{no:1,name:"shots_on_goal",kind:"scalar",T:5},{no:2,name:"faceoff",kind:"scalar",T:1},{no:3,name:"powerplay",kind:"scalar",T:5},{no:4,name:"penalty_minutes",kind:"scalar",T:5},{no:5,name:"hits",kind:"scalar",T:5},{no:6,name:"blocks",kind:"scalar",T:5},{no:7,name:"giveaways",kind:"scalar",T:5},{no:8,name:"takeaways",kind:"scalar",T:5}]),Pf=c.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Er},{no:2,name:"away_statistics",kind:"message",T:Er}]),Bf=c.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Pf},{no:2,name:"top_performers",kind:"message",T:Uf,repeated:!0}]),Qf=c.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:Xn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),Ff=c.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Qf,repeated:!0}]),aa=c.makeMessageType("streamlayer.sports.hockey.PlayerScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"goals",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"shots",kind:"scalar",T:5},{no:6,name:"penalty_minutes",kind:"scalar",T:1},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:c.getEnumType(oo)}]),br=c.makeMessageType("streamlayer.sports.hockey.GoaltenderScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"shots_againts",kind:"scalar",T:5},{no:4,name:"goals_againts",kind:"scalar",T:5},{no:5,name:"saves",kind:"scalar",T:5},{no:6,name:"saves_pct",kind:"scalar",T:5},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:c.getEnumType(oo)}]),Dr=c.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:aa,repeated:!0},{no:2,name:"goaltender",kind:"message",T:br},{no:3,name:"forwards",kind:"message",T:aa,repeated:!0},{no:4,name:"defensemen",kind:"message",T:aa,repeated:!0},{no:5,name:"goaltenders",kind:"message",T:br,repeated:!0}]),Gf=c.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Dr},{no:2,name:"away_players",kind:"message",T:Dr}]),Yf=c.makeMessageType("streamlayer.sports.hockey.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:Vf},{no:11,name:"rank",kind:"message",T:$f},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Vf=c.makeMessageType("streamlayer.sports.hockey.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),$f=c.makeMessageType("streamlayer.sports.hockey.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),qf=c.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:Yf,repeated:!0}]),Wf=c.makeEnum("streamlayer.sports.soccer.SoccerPerformerCategory",[{no:0,name:"SOCCER_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"SOCCER_PERFORMER_CATEGORY_ATTACK",localName:"ATTACK"},{no:2,name:"SOCCER_PERFORMER_CATEGORY_MIDFIELD",localName:"MIDFIELD"},{no:3,name:"SOCCER_PERFORMER_CATEGORY_DEFENSE",localName:"DEFENSE"}]),Hf=c.makeEnum("streamlayer.sports.soccer.SoccerMatchActivityType",[{no:0,name:"SOCCER_MATCH_ACTIVITY_UNSET"},{no:1,name:"SOCCER_MATCH_ACTIVITY_GOAL"},{no:2,name:"SOCCER_MATCH_ACTIVITY_YELLOW_CARD"},{no:3,name:"SOCCER_MATCH_ACTIVITY_RED_CARD"},{no:4,name:"SOCCER_MATCH_ACTIVITY_SUBSTITUTION"},{no:5,name:"SOCCER_MATCH_ACTIVITY_HALF_TIME"},{no:6,name:"SOCCER_MATCH_ACTIVITY_FULL_TIME"}]),Zf=c.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),is=c.makeMessageType("streamlayer.sports.soccer.SoccerPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),Kf=c.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:is},{no:2,name:"attack_stats",kind:"message",T:iT}]),Jf=c.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:is},{no:2,name:"midfield_stats",kind:"message",T:oT}]),Xf=c.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:is},{no:2,name:"defense_stats",kind:"message",T:cT}]),eT=c.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(Wf)},{no:2,name:"attack_performer",kind:"message",T:Kf},{no:3,name:"midfield_performer",kind:"message",T:Jf},{no:4,name:"defense_performer",kind:"message",T:Xf}]),nT=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamTopMatchStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"shots",kind:"scalar",T:5},{no:3,name:"shots_on_target",kind:"scalar",T:5},{no:4,name:"passes",kind:"scalar",T:5},{no:5,name:"offsides",kind:"scalar",T:5},{no:6,name:"yellow_cards",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"free_kicks",kind:"scalar",T:5},{no:9,name:"red_cards",kind:"scalar",T:5}]),tT=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamAttackingStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"passing_accuracy",kind:"scalar",T:1},{no:3,name:"chances_created",kind:"scalar",T:5},{no:4,name:"successful_crosses",kind:"scalar",T:1}]),aT=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamDefenseStats",()=>[{no:1,name:"tackles_made",kind:"scalar",T:5},{no:2,name:"interceptions",kind:"scalar",T:5},{no:3,name:"blocked_shots",kind:"scalar",T:5},{no:4,name:"clearances",kind:"scalar",T:5},{no:5,name:"duels_won",kind:"scalar",T:5}]),_r=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:nT},{no:2,name:"attacking_stats",kind:"message",T:tT},{no:3,name:"defense_stats",kind:"message",T:aT}]),sT=c.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:_r},{no:2,name:"away_statistics",kind:"message",T:_r},{no:3,name:"perfomers",kind:"message",T:eT}]),rT=c.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:sT},{no:2,name:"last_games",kind:"message",T:co}]),iT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayerAttackingStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"shots",kind:"scalar",T:5},{no:4,name:"shots_on_goal",kind:"scalar",T:5},{no:5,name:"penalty_kick_goals",kind:"scalar",T:5}]),oT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayerMidfieldStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"key_passes",kind:"scalar",T:5},{no:4,name:"crosses",kind:"scalar",T:5},{no:5,name:"corners",kind:"scalar",T:5}]),cT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayerDefenseStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"tackles_made",kind:"scalar",T:5},{no:4,name:"interceptions",kind:"scalar",T:5},{no:5,name:"blocked_shots",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.soccer.SoccerMatchOdds",()=>[{no:1,name:"home_team_win",kind:"scalar",T:1},{no:2,name:"draw",kind:"scalar",T:1},{no:3,name:"away_team_win",kind:"scalar",T:1}]);const lT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrixPlayer",()=>[{no:1,name:"jersey_number",kind:"scalar",T:5},{no:2,name:"player_name",kind:"scalar",T:9},{no:3,name:"photo",kind:"scalar",T:9}]),uT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:lT,repeated:!0}]),wr=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),vr=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineup",()=>[{no:1,name:"formation_string",kind:"scalar",T:9},{no:2,name:"formation_matrix",kind:"message",T:uT,repeated:!0},{no:3,name:"start_players",kind:"message",T:wr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:wr,repeated:!0}]),mT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:vr},{no:2,name:"away_team",kind:"message",T:vr}]);c.makeMessageType("streamlayer.sports.soccer.SoccerMatchScore",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"mil",kind:"scalar",T:1},{no:3,name:"round",kind:"scalar",T:9},{no:4,name:"live_url",kind:"scalar",T:9}]);const dT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:Xn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5},{no:8,name:"type",kind:"enum",T:c.getEnumType(Hf)}]),pT=c.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:dT,repeated:!0}]),gT=c.makeMessageType("streamlayer.sports.soccer.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"draws",kind:"scalar",T:5},{no:9,name:"games_behind",kind:"scalar",T:5},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"points",kind:"scalar",T:5},{no:14,name:"position",kind:"scalar",T:5},{no:15,name:"total_goals",kind:"scalar",T:5},{no:16,name:"total_goals_received",kind:"scalar",T:5}]),yT=c.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:gT,repeated:!0}]),sa=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:fT}]),fT=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGame.SoccerLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"SoccerLastGame_SoccerLastGameAttributes"}),co=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGames",()=>[{no:1,name:"home",kind:"message",T:sa,repeated:!0},{no:2,name:"away",kind:"message",T:sa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:sa,repeated:!0}]),Tn=c.makeEnum("streamlayer.sports.events.EventType",[{no:0,name:"EVENT_TYPE_UNSET",localName:"UNSET"},{no:1,name:"EVENT_TYPE_BASEBALL",localName:"BASEBALL"},{no:2,name:"EVENT_TYPE_BASKETBALL",localName:"BASKETBALL"},{no:3,name:"EVENT_TYPE_HOCKEY",localName:"HOCKEY"},{no:4,name:"EVENT_TYPE_SOCCER",localName:"SOCCER"},{no:5,name:"EVENT_TYPE_GOLF",localName:"GOLF"}]),TT=c.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:yf,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:Sf,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:zf,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:Zf,oneof:"sport"}]),hT=c.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:TT}]),kT=c.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:sf}]),lo=c.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:kT}]),MT=c.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:NT},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"sort",kind:"message",T:to},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),NT=c.makeMessageType("streamlayer.sports.events.ListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9},{no:3,name:"start_date_time",kind:"scalar",T:9},{no:4,name:"end_date_time",kind:"scalar",T:9},{no:5,name:"sport",kind:"scalar",T:9},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"endless",kind:"enum",T:c.getEnumType(rs)}],{localName:"ListRequest_Filter"}),IT=c.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:ST},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"sort",kind:"message",T:to}]),ST=c.makeMessageType("streamlayer.sports.events.DemoListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"DemoListRequest_Filter"}),AT=c.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:xt},{no:2,name:"data",kind:"message",T:lo,repeated:!0}]),ET=c.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:xt},{no:2,name:"data",kind:"message",T:lo,repeated:!0}]),Or=c.makeMessageType("streamlayer.sports.events.SummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),jr=c.makeMessageType("streamlayer.sports.events.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:bT}]),bT=c.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:DT}],{localName:"SummaryResponse_ResponseData"}),DT=c.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:Tf,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:bf,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Bf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:rT,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),_T=c.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),wT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:vT}]),vT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:OT}],{localName:"AdminSummaryResponse_ResponseData"}),OT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),jT=c.makeMessageType("streamlayer.sports.events.PlayByPlayRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"order",kind:"scalar",T:9}]),LT=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse",()=>[{no:1,name:"data",kind:"message",T:RT},{no:2,name:"meta",kind:"message",T:xt}]),RT=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:xT}],{localName:"PlayByPlayResponse_ResponseData"}),xT=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:ff,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:_f,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Ff,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:pT,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),CT=c.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:zT},{no:2,name:"pagination",kind:"message",T:Rt}]),zT=c.makeMessageType("streamlayer.sports.events.ScheduleRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleRequest_Filter"}),UT=c.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:hT,repeated:!0},{no:2,name:"meta",kind:"message",T:xt}]),PT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:BT}]),BT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),QT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),FT=c.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),GT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:YT}]),YT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:VT}],{localName:"BoxscoreResponse_ResponseData"}),VT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"basketball",kind:"message",T:wf,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Gf,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),$T=c.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),qT=c.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:WT}]),WT=c.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:2,name:"attributes",kind:"message",T:HT}],{localName:"StandingsResponse_ResponseData"}),HT=c.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData.StandingsResponseAttributes",()=>[{no:2,name:"basketball",kind:"message",T:Lf,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:qf,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:Nf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:yT,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),ZT=c.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),KT=c.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:JT}]),JT=c.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:XT}],{localName:"LineupResponse_ResponseData"}),XT=c.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"soccer",kind:"message",T:mT,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Rf,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),eh=c.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),nh=c.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:th}]),th=c.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:ah}],{localName:"LastGamesResponse_ResponseData"}),ah=c.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"soccer",kind:"message",T:co,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:io,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),sh=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),rh=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:ih}]),ih=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"}),oh={typeName:"streamlayer.sports.events.Events",methods:{list:{name:"List",I:MT,O:ET,kind:P.Unary},demoList:{name:"DemoList",I:IT,O:AT,kind:P.Unary},summary:{name:"Summary",I:Or,O:jr,kind:P.Unary},adminSummary:{name:"AdminSummary",I:_T,O:wT,kind:P.Unary},boxscore:{name:"Boxscore",I:FT,O:GT,kind:P.Unary},standings:{name:"Standings",I:$T,O:qT,kind:P.Unary},playByPlay:{name:"PlayByPlay",I:jT,O:LT,kind:P.Unary},schedule:{name:"Schedule",I:CT,O:UT,kind:P.Unary},scheduleDates:{name:"ScheduleDates",I:PT,O:QT,kind:P.Unary},lineup:{name:"Lineup",I:ZT,O:KT,kind:P.Unary},retrieveEventId:{name:"RetrieveEventId",I:sh,O:rh,kind:P.Unary},lastGames:{name:"LastGames",I:eh,O:nh,kind:P.Unary},summarySubscription:{name:"SummarySubscription",I:Or,O:jr,kind:P.ServerStreaming}}},ch=c.makeEnum("streamlayer.sdkSettings.client.VisibleStatus",[{no:0,name:"VISIBLE_STATUS_UNSET",localName:"UNSET"},{no:1,name:"VISIBLE_STATUS_INCOGNITO",localName:"INCOGNITO"},{no:2,name:"VISIBLE_STATUS_VISIBLE",localName:"VISIBLE"}]),lh=c.makeEnum("streamlayer.sdkSettings.client.MessagesNotify",[{no:0,name:"MESSAGES_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_NOTIFY_ALLOW",localName:"ALLOW"}]),uh=c.makeEnum("streamlayer.sdkSettings.client.FriendsNotify",[{no:0,name:"FRIENDS_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_NOTIFY_ALLOW",localName:"ALLOW"}]),mh=c.makeEnum("streamlayer.sdkSettings.client.TwitterNotify",[{no:0,name:"TWITTER_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_NOTIFY_ALLOW",localName:"ALLOW"}]),dh=c.makeEnum("streamlayer.sdkSettings.client.CallsSound",[{no:0,name:"CALLS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"CALLS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"CALLS_SOUND_ALLOW",localName:"ALLOW"}]),ph=c.makeEnum("streamlayer.sdkSettings.client.MessagesSound",[{no:0,name:"MESSAGES_SOUND_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_SOUND_ALLOW",localName:"ALLOW"}]),gh=c.makeEnum("streamlayer.sdkSettings.client.FriendsSound",[{no:0,name:"FRIENDS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_SOUND_ALLOW",localName:"ALLOW"}]),yh=c.makeEnum("streamlayer.sdkSettings.client.TwitterSound",[{no:0,name:"TWITTER_SOUND_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_SOUND_ALLOW",localName:"ALLOW"}]),uo=c.makeEnum("streamlayer.sdkSettings.client.SettingsAllow",[{no:0,name:"SETTINGS_ALLOW_UNSET",localName:"UNSET"},{no:1,name:"SETTINGS_ALLOW_DISALLOW",localName:"DISALLOW"},{no:2,name:"SETTINGS_ALLOW_ALLOW",localName:"ALLOW"}]),fh=c.makeEnum("streamlayer.sdkSettings.client.ManagedGroupType",[{no:0,name:"MANAGED_GROUP_TYPE_UNSET",localName:"UNSET"},{no:1,name:"MANAGED_GROUP_TYPE_CHAT",localName:"CHAT"},{no:2,name:"MANAGED_GROUP_TYPE_WP",localName:"WP"}]),Th=c.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:c.getEnumType(uo)}]),hh=c.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:c.getEnumType(uo)}]),ra=c.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:Th},{no:2,name:"sound",kind:"message",T:hh}]),os=c.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:c.getEnumType(ch)},{no:2,name:"messages_notify",kind:"enum",T:c.getEnumType(lh)},{no:3,name:"friends_notify",kind:"enum",T:c.getEnumType(uh)},{no:4,name:"calls_sound",kind:"enum",T:c.getEnumType(dh)},{no:5,name:"messages_sound",kind:"enum",T:c.getEnumType(ph)},{no:6,name:"friends_sound",kind:"enum",T:c.getEnumType(gh)},{no:7,name:"twitter_notify",kind:"enum",T:c.getEnumType(mh)},{no:8,name:"twitter_sound",kind:"enum",T:c.getEnumType(yh)},{no:9,name:"gamification",kind:"message",T:ra},{no:10,name:"watch_party_invitation",kind:"message",T:ra},{no:11,name:"twitter_question",kind:"message",T:ra}]),kh=c.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),Mh=c.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:Nh}]),Nh=c.makeMessageType("streamlayer.sdkSettings.client.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:os}],{localName:"GetResponse_GetResponseData"}),Ih=c.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:os}]),Sh=c.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:Ah}]),Ah=c.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse.UpdateResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:os}],{localName:"UpdateResponse_UpdateResponseData"}),Eh=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),bh=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:Dh}]),Dh=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Hi}],{localName:"GetStreamResponse_GetResponseData"}),_h=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),wh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:vh}]),vh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Zi}],{localName:"GetOrganizationResponse_GetResponseData"}),Oh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),jh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:Lh}]),Lh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse.GetOrganizationAdvertisingResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ki}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),Rh=c.makeMessageType("streamlayer.sdkSettings.client.ManagedGroup",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"fantasy_group_id",kind:"scalar",T:9},{no:3,name:"group_type",kind:"enum",T:c.getEnumType(fh)}]),mo=c.makeMessageType("streamlayer.sdkSettings.client.DeepLinkData",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"gamification",kind:"scalar",T:8},{no:4,name:"managed_group",kind:"message",T:Rh},{no:5,name:"external_event_id",kind:"scalar",T:9}]),xh=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:mo}]),Ch=c.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),zh=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:Uh}]),Uh=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Ch}],{localName:"GenerateDeepLinkResponse_GenerateDeepLinkResponseData"});c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkRequest",()=>[{no:1,name:"url",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:Ph}]);const Ph=c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:mo}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),Bh=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Qh=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),Fh=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Gh}]),Gh=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Hi}],{localName:"StreamSubscriptionResponse_ResponseData"}),Yh=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Vh}]),Vh=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Zi}],{localName:"OrganizationSubscriptionResponse_ResponseData"}),zt={typeName:"streamlayer.sdkSettings.client.Client",methods:{get:{name:"Get",I:kh,O:Mh,kind:P.Unary},update:{name:"Update",I:Ih,O:Sh,kind:P.Unary},getStream:{name:"GetStream",I:Eh,O:bh,kind:P.Unary},getOrganization:{name:"GetOrganization",I:_h,O:wh,kind:P.Unary},getOrganizationAdvertising:{name:"GetOrganizationAdvertising",I:Oh,O:jh,kind:P.Unary},generateDeepLink:{name:"GenerateDeepLink",I:xh,O:zh,kind:P.Unary},streamSubscription:{name:"StreamSubscription",I:Bh,O:Fh,kind:P.ServerStreaming},organizationSubscription:{name:"OrganizationSubscription",I:Qh,O:Yh,kind:P.ServerStreaming}}},$h=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(oh,{method:"retrieveEventId",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var l;if(!i||typeof i!="string")return"";try{return((l=(await t.retrieveEventId({id:i})).data)==null?void 0:l.id)||""}catch{return""}}})},qh=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(zt,{method:"getStream",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var m;return i?(m=(await t.getStream({id:i})).data)==null?void 0:m.attributes:void 0}})},Wh=(n,e)=>{const{queryKey:t,client:a}=e.createPromiseClient(Jn,{method:"me",params:[n]});return e.nanoquery.createFetcherStore(t,{fetcher:()=>a.me({})})},Hh=n=>{const{client:e,queryKeyStr:t}=n.createPromiseClient(Jn,{method:"bypassAuth"});return n.nanoquery.createMutatorStore(async({data:{userKey:a,schema:s,init:r},getCacheUpdater:i})=>{const[l]=i(t),m=await e.bypassAuth({userKey:a,schema:s,init:r});return l(m),m})},Zh=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(zt,{method:"get",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{var r;return(r=(await t.get({})).data)==null?void 0:r.attributes}})},Kh=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(zt,{method:"getOrganization",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{const s=await t.getOrganization({});return s.data?{...s.data.attributes,id:s.data.id}:void 0}})},Jh=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(zt,{method:"getOrganizationAdvertising",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{var r;return(r=(await t.getOrganizationAdvertising({})).data)==null?void 0:r.attributes}})},Xh=(n,e,t)=>{n.transport=new Vy(e.host),n.sdk.host=n.transport.host,n.transport.setSdkKey(e.sdkKey),t()};class cs{constructor(e="main"){N(this,"delimiter",":");N(this,"prefix");N(this,"clear",()=>{for(const e in window.localStorage)e.startsWith(this.prefix)&&window.localStorage.removeItem(e)});N(this,"generateKey",e=>`${this.prefix}${this.delimiter}${e.join(this.delimiter)}`);N(this,"write",(...e)=>{const t=e.pop()||"";window.localStorage.setItem(this.generateKey(e),t)});N(this,"read",(...e)=>{const t=window.localStorage.getItem(this.generateKey(e));return t===null?void 0:t});N(this,"remove",(...e)=>{window.localStorage.removeItem(this.generateKey(e))});this.prefix=`sl-sdk${this.delimiter}${e}`}}class po extends cs{constructor(){super("user");N(this,"setSchema",t=>{this.write("schema",t)});N(this,"getSchema",()=>this.read("schema"));N(this,"setToken",t=>{this.write("token",t)});N(this,"getToken",()=>this.read("token"));N(this,"removeToken",()=>{this.remove("token")});N(this,"clearNotification",()=>{this.clear()})}}var En=(n=>(n.DISABLED="disabled",n.INITIALIZATION="initialization",n.READY="ready",n.FAILED="failed",n.SUSPENDED="suspended",n))(En||{});const ek=n=>{const e=new Re(xe(),"enabled"),t=new Re(xe("disabled"),"status"),a=new Re(xe(),"userKey"),s=new Re(xe(),"userToken"),r=new po;s.listen(M=>{M?r.setToken(M):r.removeToken()});const i=new Re(xe(),"providerStreamId"),l=new Le($h(i.getStore(),n),"slStreamId",M=>M==null?void 0:M.data),m=new Le(Wh(s.getStore(),n),"user",M=>{var E,D;return(D=(E=M==null?void 0:M.data)==null?void 0:E.data)==null?void 0:D.id}),d=new Le(Zh(s.getStore(),n),"userSettings"),g=new Le(qh(l.getAtomStore(),n),"streamSettings");l.getAtomStore().listen(M=>{(M===""||M===void 0)&&g.getStore().mutate(void 0)});const T=new Le(Kh(e.getStore(),n),"organizationSettings",M=>{var E;return(E=M==null?void 0:M.data)==null?void 0:E.id}),h=new Le(Jh(T.getAtomStore(),n),"organizationAdvertising");return{enabled:e,status:t,providerStreamId:i,slStreamId:l,streamSettings:g,user:m,userKey:a,userToken:s,userSettings:d,organizationSettings:T,organizationAdvertising:h}};class nk extends jt{constructor(t){const a=ek(t),s=Ty(a);super(s,"core");N(this,"stores");N(this,"subscribe",t=>{let a;for(a in this.stores){const s=t[a];a in t&&s!==void 0&&this.stores[a].subscribe(t[a])}});N(this,"unsubscribe",()=>this.getStore().off());this.stores=a}getValue(){throw new Error("Not implemented")}getValues(){return this.stores}setValue(){throw new Error("Not implemented")}}const tk=(n,e,t)=>{n.store=new nk(n.transport),n.stores=n.store.getValues(),n.sdk.sdkStore=n.store.getStore(),n.sdk.organizationStore=()=>n.stores.organizationSettings.getStore(),n.storeUnsubscribe=()=>{n.store.unsubscribe()},t()},Ue={typeName:"streamlayer.interactive.feed.Feed",methods:{get:{name:"Get",I:up,O:mp,kind:P.Unary},subscription:{name:"Subscription",I:gd,O:yd,kind:P.ServerStreaming},votingSubscription:{name:"VotingSubscription",I:Td,O:hd,kind:P.ServerStreaming},questionSubscription:{name:"QuestionSubscription",I:Nd,O:Id,kind:P.ServerStreaming},questionByUser:{name:"QuestionByUser",I:Ed,O:bd,kind:P.Unary},syncQuestion:{name:"SyncQuestion",I:_d,O:vd,kind:P.Unary},getQuestion:{name:"GetQuestion",I:jd,O:Ld,kind:P.Unary},questionDetail:{name:"QuestionDetail",I:xd,O:Cd,kind:P.Unary},submitAnswer:{name:"SubmitAnswer",I:Ud,O:Bd,kind:P.Unary},submitInplay:{name:"SubmitInplay",I:Fd,O:Yd,kind:P.Unary},skipQuestion:{name:"SkipQuestion",I:Vd,O:qd,kind:P.Unary},pickHistory:{name:"PickHistory",I:Hd,O:Kd,kind:P.Unary},insightHistory:{name:"InsightHistory",I:ep,O:tp,kind:P.Unary},tweetHistory:{name:"TweetHistory",I:sp,O:ip,kind:P.Unary},promotionHistory:{name:"PromotionHistory",I:pp,O:yp,kind:P.Unary}}},ak=c.makeEnum("streamlayer.interactive.leaderboard.LeaderboardType",[{no:0,name:"LEADERBOARD_TYPE_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_TYPE_TOURNAMENT",localName:"TOURNAMENT"},{no:2,name:"LEADERBOARD_TYPE_EVENT",localName:"EVENT"}]),go=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ak)},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"event_ids",kind:"scalar",T:3,repeated:!0},{no:5,name:"leaderboards",kind:"message",T:go,repeated:!0},{no:6,name:"created_at",kind:"scalar",T:3}]),ls=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardItem",()=>[{no:1,name:"streak",kind:"scalar",T:5},{no:2,name:"correct",kind:"scalar",T:5},{no:3,name:"incorrect",kind:"scalar",T:5},{no:4,name:"points",kind:"scalar",T:5},{no:5,name:"rank",kind:"scalar",T:5},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"avatar",kind:"scalar",T:9},{no:8,name:"user_id",kind:"scalar",T:9},{no:9,name:"recent_correct",kind:"scalar",T:5},{no:10,name:"streak_loss",kind:"scalar",T:5},{no:11,name:"friends_rank",kind:"scalar",T:5},{no:12,name:"in_top",kind:"scalar",T:5}]),sk=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem",()=>[{no:1,name:"summary",kind:"message",T:ls},{no:2,name:"percentage",kind:"message",T:rk}]),rk=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem.SummaryPercentage",()=>[{no:1,name:"correct",kind:"scalar",T:5},{no:2,name:"average",kind:"scalar",T:5}],{localName:"LeaderboardSummaryItem_SummaryPercentage"}),ik=c.makeMessageType("streamlayer.interactive.leaderboard.ListRequest",()=>[{no:1,name:"pagination",kind:"message",T:Za},{no:2,name:"users_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"event_id",kind:"scalar",T:4},{no:4,name:"leaderboard_id",kind:"scalar",T:9}]),ok=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse",()=>[{no:1,name:"data",kind:"message",T:ck,repeated:!0},{no:2,name:"meta",kind:"message",T:lk}]),ck=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ls}],{localName:"ListResponse_ListResponseData"}),lk=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"ListResponse_ListResponseMeta"}),uk=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"leaderboard_id",kind:"scalar",T:9},{no:4,name:"users_ids",kind:"scalar",T:9,repeated:!0}]),mk=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:dk}]),dk=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse.SummaryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:sk}],{localName:"SummaryResponse_SummaryResponseData"}),pk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9}]),gk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse",()=>[{no:2,name:"data",kind:"message",T:yk}]),yk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse.EventLeaderboardsResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:go}],{localName:"EventLeaderboardsResponse_EventLeaderboardsResponseData"}),fk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"pagination",kind:"message",T:Za},{no:4,name:"sort",kind:"message",T:od}]),Tk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse",()=>[{no:1,name:"data",kind:"message",T:hk,repeated:!0},{no:2,name:"meta",kind:"message",T:kk}]),hk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ls}],{localName:"EventLeaderboardResponse_ListResponseData"}),kk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"EventLeaderboardResponse_ListResponseMeta"}),Mk={typeName:"streamlayer.interactive.leaderboard.Leaderboard",methods:{list:{name:"List",I:ik,O:ok,kind:P.Unary},summary:{name:"Summary",I:uk,O:mk,kind:P.Unary},eventLeaderboards:{name:"EventLeaderboards",I:pk,O:gk,kind:P.Unary},eventLeaderboard:{name:"EventLeaderboard",I:fk,O:Tk,kind:P.Unary}}},Nk=(n,e,t)=>{const{client:a,queryKey:s}=t.createPromiseClient(Mk,{method:"summary",params:[n,e]});return t.nanoquery.createFetcherStore(s,{fetcher:async(r,i,l,m)=>{var g;return(g=(await a.summary({eventId:l,userId:m})).data)==null?void 0:g.attributes}})},Ik=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ue,{method:"get",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var m;return(m=(await t.get({eventId:i})).data)==null?void 0:m.attributes}})},Sk=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ue,{method:"syncQuestion",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var m;return i?(m=(await t.syncQuestion({filter:{eventId:i}})).data)==null?void 0:m.attributes:void 0}})},Ak=(n,e)=>{const{client:t}=e.createCallbackClient(Ue),a=De.atom({eventId:n.get()||"",feedId:""});return n.subscribe((r="")=>{a.set({eventId:r,feedId:""})}),e.addSubscription(t.subscription,a,{name:"feedSubscription"})},Ek=(n,e)=>{const{client:t}=e.createCallbackClient(Ue);return e.addSubscription(t.questionSubscription,{questionId:n},{name:"questionSubscription"})},bk=async(n,e)=>{var s,r;const{client:t}=e.createPromiseClient(Ue,{method:"questionByUser",params:[n]});return(r=(s=(await t.questionByUser({questionId:n})).data)==null?void 0:s.attributes)==null?void 0:r.question},Dk=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ue,{method:"questionByUser",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var m,d;return(d=(m=(await t.questionByUser({questionId:i})).data)==null?void 0:m.attributes)==null?void 0:d.question}})},_k=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ue,{method:"pickHistory",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var m;return i?(m=(await t.pickHistory({eventId:i})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},wk=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ue,{method:"insightHistory",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var m;return i?(m=(await t.insightHistory({eventId:i})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},yo=n=>(n.gamification||(n.gamification=new vk(n)),n.gamification);class vk{constructor(e){N(this,"slStreamId");N(this,"organizationId");N(this,"userId");N(this,"openedQuestionId");N(this,"openedQuestion");N(this,"activeQuestionId");N(this,"moderationId");N(this,"moderation");N(this,"feedSubscription");N(this,"questionSubscription");N(this,"notifications");N(this,"log");N(this,"getCurrentSessionId",e=>{const t=e.eventId||this.slStreamId.get()||"",a=e.userId||this.userId.get()||"",s=e.organizationId||this.organizationId.get()||"",r=e.entity||"",i=e.prefix||"";return[s,t,a,i,r].join(":")});N(this,"disconnect",()=>{var e;(e=this.feedSubscription)==null||e.disconnect()});N(this,"openQuestion",e=>{this.openedQuestionId.set(e),this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:e}))});N(this,"closeQuestion",e=>{this.openedQuestionId.set(void 0),e&&this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:e}))});if(e.gamification)throw new Error("GamificationBackground Singleton error");this.log=no("gamification-background"),this.slStreamId=e.stores.slStreamId.getAtomStore(),this.organizationId=e.stores.organizationSettings.getAtomStore(),this.userId=e.stores.user.getAtomStore(),this.moderationId=new Re(xe(),"moderationId").getStore(),this.openedQuestionId=new Re(xe(),"openedQuestionId").getStore(),this.notifications=e.notifications,this.moderation=new Le(Ik(this.slStreamId,e.transport),"gamification:moderation"),this.activeQuestionId=new Le(Sk(this.slStreamId,e.transport),"gamification:activeQuestionId"),this.openedQuestion=new Le(Dk(this.openedQuestionId,e.transport),"gamification:openedQuestion"),this.openedQuestionId.listen(t=>{var a;this.log.debug({questionId:t},"received question"),t?(this.questionSubscription=Ek(t,e.transport),this.questionSubscription.addListener("feed-subscription-opened-question",s=>{window.requestAnimationFrame(()=>{var r,i,l,m;(l=this.openedQuestion)==null||l.getStore().mutate((i=(r=s.data)==null?void 0:r.attributes)==null?void 0:i.question),(m=this.openedQuestion)==null||m.getStore().invalidate()})}),this.questionSubscription.connect()):(this.log.info("cleanup on close question"),(a=this.openedQuestion)==null||a.getStore().mutate(void 0),this.questionSubscription!==void 0&&(e.transport.removeSubscription(this.questionSubscription),this.questionSubscription=void 0))}),this.feedSubscription=Ak(this.slStreamId,e.transport),this.feedSubscription.addListener("feed-subscription-active-question",t=>{window.requestAnimationFrame(()=>{var s;const a=this.activeQuestionId.getStore();a&&a.mutate((s=t.data)==null?void 0:s.attributes)})})}}class Ok{constructor(e){N(this,"notificationsList");N(this,"notifications");N(this,"store");N(this,"timeouts");N(this,"waitingQueue");N(this,"activeQueue");N(this,"options");N(this,"logger");N(this,"addToQueue",e=>{if(this.store.has(e.id)){this.logger.debug({notification:e},"skip existed notification: %o");return}const t=e.close,a=e.action;this.store.set(e.id,{...e,close:(...s)=>{t&&t(...s),this.closeNotification(e.id)},action:(...s)=>{a&&a(...s),this.closeNotification(e.id)}}),this.waitingQueue.add(e.id),this.logger.debug({notification:e},"notification added to waiting queue"),this.tickWaitingQueue()});N(this,"tickWaitingQueue",()=>{if(this.activeQueue.size<this.options.concurrency){const[e]=this.waitingQueue;if(!e)return;this.activeQueue.add(e),this.waitingQueue.delete(e),this.logger.debug({job:e},"waiting queue tick"),this.tickActiveQueue(e)}else this.logger.debug({queueSize:this.activeQueue.size,concurrency:this.options.concurrency},"waiting queue tick skipped")});N(this,"tickActiveQueue",e=>{if(!e)return;const t=this.store.get(e);if(!t){this.logger.debug({notificationId:e},"active queue tick skipped, notification not exist");return}const a=setTimeout(()=>{const s=e,r=new Map(this.notifications.getValue());r.set(t.id,t),this.notifications.setValue(r);const i=setTimeout(()=>{this.logger.debug({notificationId:s},"notification hiding by autoHideDuration"),this.closeNotification(s)},t.autoHideDuration||5e3);this.timeouts.set(s,i),this.logger.debug({notificationId:s,queue:[...r.values()]},"notification displayed")},t.delay||0);this.timeouts.set(e,a),this.logger.debug({notificationId:e},"active queue tick completed"),this.tickWaitingQueue()});N(this,"closeNotification",e=>{const t=new Map(this.notifications.getValue()),a=t.get(e);if(a){a.hiding=!0,this.notifications.setValue(t);const s=setTimeout(()=>{const r=new Map(this.notifications.getValue());r.delete(e),this.notifications.setValue(r);const i=this.timeouts.get(e);i!==void 0&&(clearTimeout(i),this.timeouts.delete(e)),this.logger.debug({notificationId:e},"notification hidden")},this.options.animationDelay||0);this.timeouts.set(e,s)}this.store.delete(e),this.activeQueue.delete(e),this.waitingQueue.delete(e),this.tickWaitingQueue(),this.logger.debug({notificationId:e},"notification hiding")});this.options=e,this.logger=no("notifications"),this.store=new Map,this.timeouts=new Map,this.waitingQueue=new Set,this.activeQueue=new Set,this.notifications=new Re(xe(new Map),"notifications-queue"),this.notificationsList=ns(this.notifications.getStore(),t=>t?[...t.values()]:[])}}class jk extends cs{constructor(){super("notification");N(this,"setOpened",t=>{this.write("opened",t,"true")});N(this,"isOpened",t=>this.read("opened",t));N(this,"clearNotification",()=>{this.clear()})}}var dn=(n=>(n[n.ONBOARDING=1]="ONBOARDING",n[n.QUESTION=2]="QUESTION",n))(dn||{});let Lk=class{constructor(e={}){N(this,"queue");N(this,"storage");N(this,"add",e=>{this.storage.isOpened(e.id)||this.queue.addToQueue(e)});N(this,"close",e=>{this.queue.closeNotification(e),this.markAsViewed(e)});N(this,"getQueueStore",()=>this.queue.notificationsList);N(this,"markAsViewed",e=>{this.storage.setOpened(e)});this.storage=new jk,this.queue=new Ok({concurrency:1,animationDelay:300,...e})}};const Rk=(n,e,t)=>{n.notifications=new Lk,n.addNotification=n.notifications.add,n.sdk.getNotificationsStore=()=>n.notifications.getQueueStore(),t()},xk=(n,e)=>{const{client:t}=n.createPromiseClient(Ue,{method:"submitAnswer"});return t.submitAnswer({data:e})},Ck=(n,e)=>{const{client:t}=n.createPromiseClient(Ue,{method:"submitInplay"});return t.submitInplay({data:{eventId:+e}})},zk=(n,e)=>{const{client:t}=n.createPromiseClient(Ue,{method:"skipQuestion"});return t.skipQuestion({data:{id:e}})};class Uk extends cs{constructor(){super("gamification");N(this,"saveOnboardingStatus",({userId:t,eventId:a,organizationId:s},r)=>{this.write("onboarding",s,t,a,r)});N(this,"getOnboardingStatus",({userId:t,eventId:a,organizationId:s})=>this.read("onboarding",s,t,a))}}const Lr=new Set([ye.POLL,ye.PREDICTION,ye.TRIVIA]);class fo extends es{constructor(t,a,s){super(t,a);N(this,"userSummary");N(this,"questions");N(this,"leaderboardId");N(this,"onboardingStatus");N(this,"openedQuestion");N(this,"notifications");N(this,"transport");N(this,"closeFeature");N(this,"openFeature");N(this,"background");N(this,"storage");N(this,"onboardingProcess",async()=>{var l,m,d,g,T;const t=this.background.userId.get();if(!t)return;this.storage.getOnboardingStatus({userId:t,organizationId:this.background.organizationId.get()||"",eventId:this.background.slStreamId.get()||""})==="completed"&&this.onboardingStatus.set("completed");const s=await this.background.moderation.getValue();if(this.onboardingStatus.get()==="completed")return;const r=!!((l=s==null?void 0:s.options)!=null&&l.onboardingEnabled&&((d=(m=this.featureSettings.get().inplayGame)==null?void 0:m.onboarding)!=null&&d.completed)),i=!!((T=(g=this.featureSettings.get().inplayGame)==null?void 0:g.titleCard)!=null&&T.optIn);r?i?this.onboardingStatus.set("required"):this.onboardingStatus.set("optional"):i?this.onboardingStatus.set("unavailable"):this.onboardingStatus.set("disabled")});N(this,"showOnboardingInApp",()=>{var r,i,l,m;const{inplayGame:t}=this.featureSettings.get();if(!t)return;const{titleCard:a,overview:s}=t;this.notifications.add({type:dn.ONBOARDING,id:this.background.getCurrentSessionId({prefix:"onboarding"}),action:this.openFeature,close:this.closeFeature,autoHideDuration:1e5,data:{header:a==null?void 0:a.header,title:a==null?void 0:a.title,subtitle:a==null?void 0:a.subtitle,graphicBg:(r=a==null?void 0:a.appearance)==null?void 0:r.graphic,icon:(i=a==null?void 0:a.media)==null?void 0:i.icon,sponsorLogo:(l=a==null?void 0:a.media)==null?void 0:l.sponsorLogo,primaryColor:(m=s==null?void 0:s.appearance)==null?void 0:m.primaryColor}})});N(this,"connect",t=>{this.userSummary?this.userSummary.invalidate():this.userSummary=new Le(Nk(this.background.slStreamId,this.background.userId,t),"gamification:userSummary"),this.questions?this.questions.invalidate():this.questions=new Le(_k(this.background.slStreamId,t),"gamification:questions"),this.background.feedSubscription.addListener("feed-subscription-prediction-close",a=>{window.requestAnimationFrame(async()=>{var m,d;const s=(d=(m=a.data)==null?void 0:m.attributes)==null?void 0:d.question;if(!s)return;const{status:r,type:i,id:l}=s;if(r===Ze.RESOLVED&&i===ye.PREDICTION){const g=this.background.getCurrentSessionId({prefix:`notification-id:${l}`}),T=await bk(l,t),h=T==null?void 0:T.answers.find(({correct:M})=>M);this.notifications.add({type:dn.ONBOARDING,action:()=>this.openQuestion(l),close:()=>this.closeQuestion(l),autoHideDuration:5e3,id:g,data:{title:h!=null&&h.youVoted?`Congratulations! You answered correctly! You won ${h.points} pts!`:`Better luck next time! Correct: ${h==null?void 0:h.text}!`}})}})}),this.background.feedSubscription.addListener("feed-subscription-questions-list",()=>{window.requestAnimationFrame(()=>{var a;(a=this.questions)==null||a.invalidate()})})});N(this,"disconnect",()=>{this.background.feedSubscription.removeListener("feed-subscription-questions-list")});N(this,"submitInplay",async()=>{const t=this.background.slStreamId.get();t&&(await Ck(this.transport,t),this.onboardingStatus.set("completed"),this.storage.saveOnboardingStatus({organizationId:this.background.organizationId.get()||"",userId:this.background.userId.get()||"",eventId:t},"completed"))});N(this,"submitAnswer",async(t,a)=>{var s;await xk(this.transport,{questionId:t,answerId:a}),(s=this.questions)==null||s.invalidate()});N(this,"skipQuestion",async t=>{var a;await zk(this.transport,t),(a=this.questions)==null||a.invalidate()});N(this,"openQuestion",t=>(this.openFeature(),this.background.openQuestion(t)));N(this,"closeQuestion",t=>this.background.closeQuestion(t));this.background=yo(s),this.storage=new Uk,this.leaderboardId=new Re(xe(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.onboardingStatus=new Re(xe("unset"),"onboardingStatus").getStore(),this.notifications=s.notifications,this.transport=s.transport,this.closeFeature=s.sdk.closeFeature,this.openFeature=()=>s.sdk.openFeature(_e.GAMES),this.openedQuestion=ns(this.background.openedQuestion.getStore(),r=>{var i;if((i=r.data)!=null&&i.type&&Lr.has(r.data.type))return r.data}),this.onboardingStatus.subscribe(r=>{this.showOnboardingInApp()}),this.status.subscribe(r=>{r===He.Ready?(this.notifications.close(this.background.getCurrentSessionId({prefix:"onboarding"})),this.connect(s.transport)):this.disconnect()}),this.onboardingStatus.subscribe(r=>{r&&this.background.activeQuestionId.invalidate()}),this.background.activeQuestionId.listen(r=>{r&&r.data&&this.onboardingStatus.get()&&Lr.has(r.data.question.type)&&r.data.question.status===Ze.ACTIVE&&this.notifications.add({type:dn.QUESTION,action:()=>this.openQuestion(r.data.question.id),close:()=>this.closeQuestion(r.data.question.id),autoHideDuration:5e3,id:this.background.getCurrentSessionId({prefix:"notification",entity:r.data.question.id}),data:{title:r.data.notification.title,color:r.data.notification.indicatorColor,icon:r.data.notification.image,imageMode:r.data.notification.imageMode,imagePosition:r.data.notification.imagePosition}})}),this.onboardingProcess(),this.background.userId.subscribe(r=>{r&&this.onboardingProcess()}),this.background.moderation.subscribe(r=>{r.data&&this.onboardingProcess()})}}class To extends es{constructor(t,a,s){super(t,a);N(this,"insights");N(this,"closeFeature");N(this,"openFeature");N(this,"openedInsight");N(this,"notifications");N(this,"transport");N(this,"background");N(this,"connect",()=>{this.insights?this.insights.invalidate():this.insights=new Le(wk(this.background.slStreamId,this.transport),"gamification:insights"),this.background.feedSubscription.addListener("feed-subscription-insights-list",()=>{window.requestAnimationFrame(()=>{var t;(t=this.insights)==null||t.invalidate()})})});N(this,"disconnect",()=>{this.background.feedSubscription.removeListener("feed-subscription-insights-list")});N(this,"openHighlight",t=>(this.openFeature(),this.background.openQuestion(t)));N(this,"closeHighlight",t=>this.background.closeQuestion(t));this.background=yo(s),this.notifications=s.notifications,this.transport=s.transport,this.closeFeature=s.sdk.closeFeature,this.openFeature=()=>s.sdk.openFeature(_e.HIGHLIGHTS),this.status.subscribe(r=>{r===He.Ready?this.connect():this.disconnect()}),this.background.activeQuestionId.listen(r=>{r&&r.data&&r.data.question.type===ye.FACTOID&&r.data.question.status===Ze.ACTIVE&&this.notifications.add({type:dn.QUESTION,action:()=>this.openHighlight(r.data.question.id),close:()=>this.closeHighlight(r.data.question.id),autoHideDuration:5e3,id:this.background.getCurrentSessionId({prefix:"notification",entity:r.data.question.id}),data:{title:r.data.notification.title,color:r.data.notification.indicatorColor,icon:r.data.notification.image,imageMode:r.data.notification.imageMode,imagePosition:r.data.notification.imagePosition}})}),this.openedInsight=ns(this.background.openedQuestion.getStore(),r=>{var i;if(((i=r.data)==null?void 0:i.type)===ye.FACTOID)return r.data})}}const Pk={[_e.GAMES]:!0,[_e.HIGHLIGHTS]:!0};class Bk extends es{constructor(e,t){super(e,t)}}const Qk=(n,e,t)=>n.type===_e.GAMES?new fo(n,e,t):n.type===_e.HIGHLIGHTS?new To(n,e,t):new Bk(n,e),Fk=(n,e,t)=>{n.features=new Map,n.activeFeature=new Re(xe(),"activeFeature"),n.sdk.getFeatures=()=>n.features,n.sdk.getFeature=a=>n.features.get(a),n.sdk.getActiveFeature=()=>n.activeFeature.getStore(),n.sdk.openFeature=a=>{n.activeFeature.setValue(a)},n.sdk.closeFeature=()=>{n.activeFeature.setValue(void 0)},n.initFeature=(a,s=An.ORGANIZATION)=>{const r=Qk(a,s,n);n.features.set(a.type,r)},n.updateFeature=(a,s)=>{var r;(r=n.features.get(a.type))==null||r.update(a,s)},n.destroyFeature=a=>{n.features.delete(a.type)},n.reinitializeFeatures=async()=>{const a=await n.stores.organizationSettings.getValue();n.features.clear();for(const s of(a==null?void 0:a.overlays)||[])n.initFeature(s,An.ORGANIZATION)},n.stores.providerStreamId.listen(a=>{a||n.reinitializeFeatures()}),n.storeSubscribe=()=>{const a=(r,i)=>{if(i!=null&&i.overlays){r===An.STREAM&&n.features.clear();for(const l of i.overlays)l.sdkEnable===!0&&(n.features.has(l.type)?n.updateFeature(l,r):n.initFeature(l,r))}},s={organizationSettings:r=>{if(r.data)try{a(An.ORGANIZATION,r.data)}catch(i){console.log(i)}},streamSettings:r=>{if(r.data)try{a(An.STREAM,r.data)}catch(i){console.log(i)}}};n.store.subscribe(s)},t()},Gk="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=";const Yk=S("div")({name:"Container",class:"c1nck5pb",propsAsIs:!1}),Vk=S("div")({name:"BackgroundBlock",class:"b1kix5tm",propsAsIs:!1}),$k=S("img")({name:"Icon",class:"i1ey0b10",propsAsIs:!1}),qk=S("div")({name:"ContentWrap",class:"cizx07o",propsAsIs:!1}),Wk=S("img")({name:"SponsorLogo",class:"s1pv3lf6",propsAsIs:!1}),Hk=S("span")({name:"SponsorText",class:"s18vymlp",propsAsIs:!1}),Zk=S("div")({name:"ContentTitle",class:"c17v2g7n",propsAsIs:!1}),Kk=S("div")({name:"ContentSubtitle",class:"c146qhfh",propsAsIs:!1}),Jk=S("button")({name:"ActionBtn",class:"aeuxca5",propsAsIs:!1}),Xk=S("button")({name:"CloseBtn",class:"c10v7vcj",propsAsIs:!1}),eM=S("img")({name:"IconClose",class:"i2g9z26",propsAsIs:!1}),nM=({close:n,action:e,data:{icon:t,header:a,title:s,subtitle:r,graphicBg:i,sponsorLogo:l}})=>f.jsxs(Yk,{children:[f.jsx(Xk,{onClick:n,children:f.jsx(eM,{alt:"icon-close-onboarding-inapp",src:Gk})}),f.jsx(Vk,{style:{backgroundImage:`url(${i||""})`},children:t&&f.jsx($k,{alt:"onboarding-inapp-icon",src:t})}),f.jsxs(qk,{children:[f.jsxs("div",{children:[f.jsx("div",{children:l?f.jsxs(f.Fragment,{children:[f.jsx(Wk,{alt:"sponsor-logo",src:l}),f.jsx(Hk,{children:"Presents"})]}):a||""}),f.jsx(Zk,{children:s||""}),f.jsx(Kk,{children:r||""})]}),f.jsx(Jk,{onClick:e,children:"Play"})]})]});const tM=S("div")({name:"NotificationContainer",class:"n1bhrb8h",propsAsIs:!1}),aM={[dn.ONBOARDING]:nM,[dn.QUESTION]:li},sM=({index:n,total:e,...t})=>{const a=Q.useRef(null),s=aM[t.type]||li;return Q.useEffect(()=>{a.current!==null&&t.hiding&&a.current.animate([{right:"0"},{right:"-100%"}],{duration:300,fill:"forwards"})},[t.hiding]),f.jsx(tM,{ref:a,style:{zIndex:n+1,transform:`translateY(${100*(e-n-1)}%)`},children:f.jsx(s,{...t})})};const rM=S("div")({name:"NotificationsContainer",class:"ntlmi04",propsAsIs:!1}),iM=({notificationsStore:n})=>{const e=Ne.useStore(n);return f.jsx(rM,{children:e==null?void 0:e.map((t,a)=>f.jsx(sM,{index:a,total:e.length,...t},t.id))})},oM=({store:n})=>{var t;const{data:e}=Ne.useStore(n);return e!=null&&e.summary?f.jsx(ty,{avatar:e.summary.avatar,name:e.summary.name,points:e.summary.points,grade:"0",friendsRank:e.summary.friendsRank,globalRank:e.summary.rank,winStreak:e.summary.streak,correct:e.summary.correct,incorrect:e.summary.incorrect,successRate:(t=e.percentage)==null?void 0:t.average}):f.jsx("div",{children:"wait user..."})},cM=({store:n,openQuestion:e})=>{const t=Ne.useStore(n);return t!=null&&t.data?f.jsx(Lg,{openQuestion:e,questions:t.data}):f.jsx("div",{children:"wait questions..."})},lM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDUuMzgzNDggMy4zMDI4MiA2LjE1NjkyQzIuNjI0OTMgNi4wMTg0NyAyLjA1ODgzIDUuNzQ4NzIgMS42MDQ1IDUuMzQ3NjhDMS4xNTAxNyA0Ljk0NjYzIDAuOTIzMDA4IDQuNTU5OTIgMC45MjMwMDggNC4xODc1MlYzLjUwMDAySDIuNzY5MTZaTTExLjA3NjggMy41MDAwMlY0LjE4NzUyQzExLjA3NjggNC41NTk5MiAxMC44NDk3IDQuOTQ2NjMgMTAuMzk1MyA1LjM0NzY4QzkuOTQxIDUuNzQ4NzIgOS4zNzQ5IDYuMDE4NDcgOC42OTcwMSA2LjE1NjkyQzkuMDUyNzggNS4zODM0OCA5LjIzMDY2IDQuNDk3ODYgOS4yMzA2NiAzLjUwMDAySDExLjA3NjhaTTEyIDQuMTg3NVYzLjI3MDgzQzEyIDMuMDc5ODYgMTEuOTMyNyAyLjkxNzU0IDExLjc5ODEgMi43ODM4NUMxMS42NjM1IDIuNjUwMTcgMTEuNSAyLjU4MzMzIDExLjMwNzcgMi41ODMzM0g5LjIzMDc3VjEuODk1ODNDOS4yMzA3NyAxLjU4MDcz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44NTExNyA3LjE4MDY0IDQuMjM5NzMgNy43IDMuODUwNDNMOS4xNjY5NSAyLjc1MDg2QzEwLjM1NTUgMS44NTYyNSAxMS44MDM1IDEuMzc1IDEzLjI5MDIgMS4zNzVIMTUuODEyNUMxNi45NTIgMS4zNzUgMTcuODc1IDIuMjk3NTQgMTcuODc1IDMuNDM2NjRDMTcuODc1IDMuNTkyODMgMTcuODU0NCAzLjc0MzU3IDE3LjgyMTUgMy44ODk5NkMxOC42NDg0IDQuMTU5MzcgMTkuMjUgNC45MjQyMiAxOS4yNSA1Ljg0Mzc1QzE5LjI1IDYuMjM2ODMgMTkuMTM0MSA2LjYwMDQzIDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=";const mM=S("div")({name:"Container",class:"c1ibttgl",propsAsIs:!1}),dM=S("img")({name:"Logo",class:"l16el447",propsAsIs:!1}),pM=S("div")({name:"RightBlock",class:"rb3jndy",propsAsIs:!1}),gM=S("button")({name:"ExitBtn",class:"e162i9w9",propsAsIs:!1}),yM=S("img")({name:"ExitIcon",class:"e1uh0tpp",propsAsIs:!1}),fM=S("div")({name:"Interactive",class:"i13726cq",propsAsIs:!1}),TM=()=>n=>n.isSuccess?"#f1be1c":"#da3732",Rr=S("div")({name:"ReactionIconWrap",class:"r1weckaj",propsAsIs:!1,vars:{"r1weckaj-0":[TM()]}}),xr=S("img")({name:"ReactionIcon",class:"r1u8ekkw",propsAsIs:!1});const hM=S("div")({name:"Container",class:"c1kt0nvm",propsAsIs:!1}),kM=S("div")({name:"Title",class:"tavk3hk",propsAsIs:!1}),MM=S("div")({name:"PointContainer",class:"p1vdx5su",propsAsIs:!1}),NM=S("span")({name:"Point",class:"p68apx3",propsAsIs:!1}),IM=S("span")({name:"PointLabel",class:"p157xd4a",propsAsIs:!1}),ia=({points:n})=>f.jsxs(hM,{children:[f.jsx(kM,{children:"YOU WON"}),f.jsxs(MM,{children:[f.jsx(NM,{children:n}),f.jsx(IM,{children:"PTS"})]})]}),SM=({logo:n,points:e,questionAnswered:t,questionAnsweredCorrectly:a,questionType:s,closeQuestion:r,setTimeToExpire:i})=>{const l=!t&&s!==ye.PREDICTION,m=t&&s===ye.TRIVIA,d=m&&a,g=m&&!a,T=t&&s===ye.PREDICTION;return f.jsxs(mM,{children:[f.jsxs(pM,{children:[f.jsxs(fM,{children:[l&&f.jsx(di,{setTimeToExpire:i}),d&&f.jsxs(f.Fragment,{children:[f.jsx(ia,{points:e}),f.jsx(Rr,{isSuccess:!0,children:f.jsx(xr,{alt:"reaction-icon",src:lM})})]}),g&&f.jsxs(f.Fragment,{children:[f.jsx(ia,{points:0}),f.jsx(Rr,{isSuccess:!1,children:f.jsx(xr,{alt:"reaction-icon",src:uM})})]}),T&&f.jsx(ia,{points:e})]}),f.jsx(gM,{onClick:r,children:f.jsx(yM,{alt:"exit-icon",src:Et})})]}),n&&f.jsx(dM,{src:n})]})},AM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAx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NCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const EM=S("div")({name:"QuestionContainer",class:"q15yq4tu",propsAsIs:!1}),bM=({openedQuestion:n,closeQuestion:e,vote:t})=>{var m;const[a,s]=Q.useState(!1),r=Q.useCallback(d=>{s(d)},[s]),i=Q.useMemo(()=>n==null?void 0:n.answers.find(d=>d.youVoted===!0),[n]),l=Q.useMemo(()=>!!(n!=null&&n.answers.find(d=>d.correct===!0)),[n]);return n?f.jsx(EM,{children:f.jsxs("div",{children:[f.jsx(SM,{points:(i==null?void 0:i.points)||0,questionAnswered:!!i,questionAnsweredCorrectly:i==null?void 0:i.correct,logo:AM,closeQuestion:e,setTimeToExpire:r,questionType:n.type}),f.jsx("div",{children:f.jsx(yy,{title:n.subject,feedbackMessages:(m=n.options)==null?void 0:m.options.value,questionType:n.type,questionId:n.id,questionAnswered:!!i,questionAnsweredCorrectly:i==null?void 0:i.correct,options:n.answers.map(d=>({id:d.id,title:d.text,icon:d.icon,type:n.type,correct:d.correct,percentage:d.percentage,answered:d.youVoted,disabled:!!i||n.marketClosed||a,questionAnswered:!!i,hasCorrectAnswer:l,points:d.points,onVote:t}))})})]})}):null};const DM=S("div")({name:"Container",class:"cqrci8d",propsAsIs:!1}),_M=S("div")({name:"Content",class:"c1hep1a5",propsAsIs:!1}),wM=S("div")({name:"Graphic",class:"g1s87azu",propsAsIs:!1}),vM=S("img")({name:"InsightIconDefault",class:"i19cupvp",propsAsIs:!1}),OM=S("img")({name:"InsightIconCircle",class:"i7kr6s3",propsAsIs:!1}),jM=S("img")({name:"InsightIconAbsolute",class:"ikea8mb",propsAsIs:!1}),LM=S("div")({name:"Title",class:"tn29zk0",propsAsIs:!1}),RM=S("img")({name:"NextIcon",class:"ni1hvml",propsAsIs:!1}),xM=(n,e)=>{switch(n){case nn.ROUNDED:return f.jsx(OM,{alt:"insight-icon",src:e});case nn.TRANSPARENT:return f.jsx(jM,{alt:"insight-icon",src:e});case nn.CENTERED:return f.jsx(vM,{alt:"insight-icon",src:e});default:return null}},CM=({title:n,image:e,questionId:t,imageMode:a,openInsight:s})=>f.jsxs(DM,{onClick:()=>s(t),children:[f.jsx(wM,{children:e&&xM(a,e)}),f.jsxs(_M,{children:[f.jsx(LM,{children:n||""}),f.jsx(RM,{alt:"next-icon",src:_a})]})]});const zM=S("div")({name:"Container",class:"c1ii4cav",propsAsIs:!1}),UM=S("div")({name:"ItemsContainer",class:"irn7lif",propsAsIs:!1}),PM=({insights:n,openInsight:e})=>f.jsx(zM,{children:f.jsx(UM,{children:n==null?void 0:n.map(t=>f.jsx(CM,{openInsight:e,...t},t.questionId))})}),BM=({highlights:n,store:e})=>{const{data:t}=Ne.useStore(e);return t?f.jsx(PM,{insights:t,openInsight:n.openHighlight}):f.jsx("div",{children:"wait insights..."})},QM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzU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ODcwOSAxNiA0LjUwMjMgMTYgNC4xNzgzNEMxNiAzLjk1NzQ5IDE1Ljk0NzcgMy43NTgzNSAxNS44NDMxIDMuNTgwOTFDMTUuNzM4NCAzLjQwMzQ3IDE1LjU5OTggMy4yNjIyOSAxNS40MjcxIDMuMTU3MzhDMTUuMjU0NCAzLjA1MjQ2IDE1LjA2MDcgMyAxNC44NDU5IDNDMTQuNTMyMyAzIDE0LjI2NDggMy4xMTE2OSAxNC4wNDM2IDMuMzM1MDhMNi4zODY4IDExLjA4NzhDNi4yNTU1MSAxMS4yMjI1IDYuMTU4NTMgMTEuMzY0NCA2LjA5NTg2IDExLjUxMzRDNi4wMzMxOCAxMS42NjI1IDYuMDAxMjMgMTEuODI0NCA2IDExLjk5OVoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const GM=S("div")({name:"Container",class:"c1n31p0r",propsAsIs:!1}),Cr=S("button")({name:"Button",class:"bh1dfyy",propsAsIs:!1}),YM=S("img")({name:"HeaderIcon",class:"h1gjjnyi",propsAsIs:!1}),VM=({icon:n,comeBack:e,close:t})=>f.jsxs(GM,{children:[f.jsxs("div",{children:[e&&f.jsx(Cr,{onClick:e,children:f.jsx("img",{alt:"header-back-icon",src:FM})}),n&&f.jsx(YM,{alt:"header-icon",src:n})]}),f.jsx("div",{children:t&&f.jsx(Cr,{onClick:t,children:f.jsx("img",{alt:"header-close-icon",src:Et})})})]});const $M=S("div")({name:"Container",class:"c2g1lnc",propsAsIs:!1}),qM=S("img")({name:"Image",class:"i1czhbqi",propsAsIs:!1}),WM=S("div")({name:"AdditionalContent",class:"axpm0mb",propsAsIs:!1}),HM=S("div")({name:"Title",class:"t1kppby5",propsAsIs:!1}),ZM=S("div")({name:"Description",class:"d18tbzq5",propsAsIs:!1}),KM=S("a")({name:"AdditionalBtn",class:"a6y6po9",propsAsIs:!1}),JM=S("img")({name:"LinkIcon",class:"lii8ybz",propsAsIs:!1}),XM=({image:n,title:e,description:t,webLinkLabel:a,webLink:s,closeHighlights:r,closeInsight:i})=>f.jsxs($M,{children:[f.jsx(VM,{close:r,comeBack:i}),n&&f.jsx(qM,{alt:"detail-insight-image",src:n}),f.jsxs(WM,{children:[e&&f.jsx(HM,{children:e}),t&&f.jsx(ZM,{children:t})]}),s&&a&&f.jsxs(KM,{href:s,target:"_blank",children:[a,f.jsx(JM,{alt:"link-icon",src:QM})]})]}),eN=({openedInsight:n,closeHighlights:e,closeInsight:t})=>{var i,l,m,d,g;const a=((i=n.options)==null?void 0:i.options.case)==="factoid"?{image:n.options.options.value.image,body:n.options.options.value.body,webLink:(l=n.options.options.value.webLink)==null?void 0:l.url,webLinkLabel:(m=n.options.options.value.webLink)==null?void 0:m.label}:{},s=n.subject||((d=n.notification)==null?void 0:d.title),r=a.body||((g=n.notification)==null?void 0:g.body);return f.jsx(XM,{image:a.image,title:s,description:r,webLink:a.webLink,webLinkLabel:a.webLinkLabel,closeInsight:t,closeHighlights:e})};const mn=S("div")({name:"DemoContainer",class:"dp9wag8",propsAsIs:!1}),nN=S("div")({name:"UserStatisticsContainer",class:"u15x0q1l",propsAsIs:!1}),tN=S("div")({name:"QuestionsContainer",class:"q13pbrok",propsAsIs:!1}),aN=S("div")({name:"Buttons",class:"baw537u",propsAsIs:!1}),zr=S("button")({name:"Button",class:"bwry012",propsAsIs:!1}),sN=({gamification:n,sdk:e})=>{var g,T,h,M,E,D,L,O,R,x,z,U,B,C,H,ne,se,ie,ue,oe,Z,me,Ee;const t=Ne.useStore(n.status),a=Ne.useStore(n.onboardingStatus),s=Ne.useStore(n.openedQuestion),{slStreamId:r}=Ne.useStore(e.sdkStore),i=Ne.useStore(n.featureSettings);if(t!==He.Ready)return f.jsx("div",{children:"wait..."});if(r!=null&&r.loading)return f.jsx(mn,{children:f.jsx("div",{children:"Event is loading"})});if(!(r!=null&&r.data))return f.jsx(mn,{children:f.jsx("div",{children:"Event is forbidden"})});if(!a)return f.jsx(mn,{children:f.jsx(Dm,{closeFeature:e.closeFeature,gamification:n,steps:(T=(g=i.inplayGame)==null?void 0:g.onboarding)==null?void 0:T.steps,gameIcon:(E=(M=(h=i.inplayGame)==null?void 0:h.overview)==null?void 0:M.media)==null?void 0:E.gameIcon,sponsorLogo:(O=(L=(D=i.inplayGame)==null?void 0:D.overview)==null?void 0:L.media)==null?void 0:O.sponsorLogo,rules:(x=(R=i.inplayGame)==null?void 0:R.rules)==null?void 0:x.rules,rulesBtnLabel:(U=(z=i.inplayGame)==null?void 0:z.rules)==null?void 0:U.buttonLabel,rulesTitle:(C=(B=i.inplayGame)==null?void 0:B.rules)==null?void 0:C.heading,primaryColor:(se=(ne=(H=i.inplayGame)==null?void 0:H.overview)==null?void 0:ne.appearance)==null?void 0:se.primaryColor,inviteCardTitle:(ue=(ie=i.inplayGame)==null?void 0:ie.inviteCard)==null?void 0:ue.heading,inviteCardSubtext:(Z=(oe=i.inplayGame)==null?void 0:oe.inviteCard)==null?void 0:Z.subtext,inviteCardBtnLabel:(Ee=(me=i.inplayGame)==null?void 0:me.inviteCard)==null?void 0:Ee.buttonLabel})});const l=Ce=>{n.openQuestion(Ce)},m=()=>{n.closeQuestion()},d=(Ce,we)=>{n.submitAnswer(Ce,we)};return f.jsxs(mn,{children:[f.jsx(nN,{children:n.userSummary&&f.jsx(oM,{store:n.userSummary.getStore()})}),f.jsxs(tN,{children:[n.questions&&f.jsx(cM,{openQuestion:l,store:n.questions.getStore()}),s&&f.jsx(bM,{closeQuestion:m,vote:d,openedQuestion:s})]})]})},rN=({highlights:n,sdk:e})=>{const t=Ne.useStore(n.status),a=Ne.useStore(n.openedInsight),{slStreamId:s}=Ne.useStore(e.sdkStore);return t!==He.Ready?f.jsx("div",{children:"wait..."}):s!=null&&s.loading?f.jsx(mn,{children:f.jsx("div",{children:"Event is loading"})}):s!=null&&s.data?n.insights===void 0?f.jsx("div",{children:"wait insights..."}):f.jsxs(mn,{children:[!a&&f.jsx(BM,{highlights:n,store:n.insights.getStore()}),a&&f.jsx(eN,{openedInsight:a,closeHighlights:n.closeFeature,closeInsight:n.closeHighlight})]}):f.jsx(mn,{children:f.jsx("div",{children:"Event is forbidden"})})},iN=({sdk:n})=>{const e=async t=>{try{await n.authorizationBypass("streamlayer:streamlayer",t)}catch(a){throw console.log("login err",a),a}};return f.jsx(Hu,{login:e,anonymousLogin:n.anonymousAuthorization,host:n.host})},oN=({activeFeature:n,sdk:e})=>{const[t,a]=Q.useState(null),{organizationSettings:s,streamSettings:r}=Ne.useStore(e.sdkStore),i=Q.useMemo(()=>{const m=(r==null?void 0:r.data)||(s==null?void 0:s.data);return m!=null&&m.overlays?m.overlays:[]},[s,r]);Q.useEffect(()=>{const m=e.getFeatures();if(n)for(const[d,g]of m)d===n?g.status.get()===He.Suspended&&(g.enable(),a(g)):g.status.get()===He.Ready&&g.disable();else{for(const[,d]of m)d.status.get()===He.Ready&&d.disable();a(null)}return()=>{for(const[,d]of m)d.status.get()===He.Ready&&d.disable()}},[n,e]);const l=Q.useMemo(()=>t instanceof fo?t?f.jsx("div",{children:f.jsx(sN,{gamification:t,sdk:e})}):f.jsx("div",{children:"wait gamification..."}):t instanceof To?t?f.jsx("div",{children:f.jsx(rN,{highlights:t,sdk:e})}):f.jsx("div",{children:"wait highlights..."}):null,[e,t]);return f.jsxs("div",{children:[f.jsxs(aN,{children:[f.jsx(zr,{onClick:()=>e.logout(),children:"logout"}),i.map(m=>f.jsxs(zr,{onClick:()=>e.openFeature(m.type),disabled:!(m.type in Pk),"data-enableSdkButton":m.enableSdkButton.toString(),"data-selected":m.type===n,children:[f.jsx("img",{src:m.icon,alt:""}),m.name]},m.name))]}),l]})},cN=({sdk:n})=>{const e=Ne.useStore(n.organizationStore()),t=Ne.useStore(n.getUserStore()),a=Ne.useStore(n.getActiveFeature());return e.loading?f.jsx("div",{children:"authentication..."}):e.data?t.loading?f.jsx("div",{children:"authentication..."}):t.data?f.jsxs(f.Fragment,{children:[f.jsx(iM,{notificationsStore:n.getNotificationsStore()}),f.jsx(oN,{sdk:n,activeFeature:a})]}):f.jsx(iN,{sdk:n}):f.jsx("div",{children:"wrong sdk key..."})};const lN="t12mji3x",uN=({children:n})=>f.jsx("div",{className:lN,children:n});class mN extends fy{constructor(t,a){super();N(this,"$coreStore");N(this,"transport");N(this,"$bypassLogin");N(this,"me",async()=>{const t=await this.$coreStore.getValues().user.getValue();return t==null?void 0:t.data});N(this,"login",async(t,a)=>(this.$coreStore.getValues().userKey.setValue(a),await this.$bypassLogin.mutate({schema:t,userKey:a,init:!1}),this.me()));N(this,"isAuthenticated",()=>this.me());N(this,"logout",()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("")});N(this,"subscribe",()=>{this.$bypassLogin.subscribe((t,a)=>{var s,r,i,l;a==="data"&&(this.transport.setAuth((r=(s=t==null?void 0:t.data)==null?void 0:s.meta)==null?void 0:r.jwt),this.$coreStore.getValues().userToken.setValue((l=(i=t==null?void 0:t.data)==null?void 0:i.meta)==null?void 0:l.jwt))})});this.$coreStore=t,this.transport=a,this.$bypassLogin=Hh(this.transport),this.subscribe()}}const dN=async(n,e,t)=>{n.auth=new mN(n.store,n.transport);const a=new po,s=a.getSchema(),r=a.getToken();s&&r&&(console.log("try to login prev user"),await n.auth.login(s,r)),n.sdk.authorizationBypass=async(i,l)=>{await n.auth.login(i,l),a.setSchema("streamlayer:streamlayer")},n.sdk.logout=()=>{n.auth.logout()},n.sdk.getUserStore=()=>n.stores.user.getStore(),n.sdk.isUserAuthorized=()=>n.auth.isAuthenticated(),t()},pN=(n,e,t)=>{n.sdk=Object.create(null),n.sdk.initializeApp=async()=>{n.storeSubscribe(),n.stores.enabled.setValue("on"),n.stores.status.setValue(En.INITIALIZATION);try{const a=await n.stores.organizationSettings.getValue();return a?(n.stores.status.setValue(En.READY),{enabled:!!a}):(n.stores.status.setValue(En.FAILED),{err:"failed"})}catch(a){return n.stores.enabled.setValue(),n.stores.status.setValue(En.FAILED),{err:`${a}`}}},n.sdk.disableApp=()=>{n.stores.enabled.setValue(),n.stores.status.setValue(En.DISABLED),n.storeUnsubscribe()},n.sdk.createEventSession=a=>{n.stores.providerStreamId.setValue(""),n.stores.providerStreamId.setValue(a)},t()};var us={exports:{}},ms={exports:{}};function gN(n){var e=new n,t=e;function a(){var r=e;return r.next?e=r.next:(e=new n,t=e),r.next=null,r}function s(r){t.next=r,t=r}return{get:a,release:s}}var yN=gN,fN=yN;function ho(n,e,t){if(typeof n=="function"&&(t=e,e=n,n=null),t<1)throw new Error("fastqueue concurrency must be greater than 1");var a=fN(TN),s=null,r=null,i=0,l=null,m={push:D,drain:je,saturated:je,pause:g,paused:!1,concurrency:t,running:d,resume:M,idle:E,length:T,getQueue:h,unshift:L,empty:je,kill:R,killAndDrain:x,error:z};return m;function d(){return i}function g(){m.paused=!0}function T(){for(var U=s,B=0;U;)U=U.next,B++;return B}function h(){for(var U=s,B=[];U;)B.push(U.value),U=U.next;return B}function M(){if(m.paused){m.paused=!1;for(var U=0;U<m.concurrency;U++)i++,O()}}function E(){return i===0&&m.length()===0}function D(U,B){var C=a.get();C.context=n,C.release=O,C.value=U,C.callback=B||je,C.errorHandler=l,i===m.concurrency||m.paused?r?(r.next=C,r=C):(s=C,r=C,m.saturated()):(i++,e.call(n,C.value,C.worked))}function L(U,B){var C=a.get();C.context=n,C.release=O,C.value=U,C.callback=B||je,i===m.concurrency||m.paused?s?(C.next=s,s=C):(s=C,r=C,m.saturated()):(i++,e.call(n,C.value,C.worked))}function O(U){U&&a.release(U);var B=s;B?m.paused?i--:(r===s&&(r=null),s=B.next,B.next=null,e.call(n,B.value,B.worked),r===null&&m.empty()):--i===0&&m.drain()}function R(){s=null,r=null,m.drain=je}function x(){s=null,r=null,m.drain(),m.drain=je}function z(U){l=U}}function je(){}function TN(){this.value=null,this.callback=je,this.next=null,this.release=je,this.context=null,this.errorHandler=null;var n=this;this.worked=function(t,a){var s=n.callback,r=n.errorHandler,i=n.value;n.value=null,n.callback=je,n.errorHandler&&r(t,i),s.call(n.context,t,a),n.release(n)}}function hN(n,e,t){typeof n=="function"&&(t=e,e=n,n=null);function a(g,T){e.call(this,g).then(function(h){T(null,h)},T)}var s=ho(n,a,t),r=s.push,i=s.unshift;return s.push=l,s.unshift=m,s.drained=d,s;function l(g){var T=new Promise(function(h,M){r(g,function(E,D){if(E){M(E);return}h(D)})});return T.catch(je),T}function m(g){var T=new Promise(function(h,M){i(g,function(E,D){if(E){M(E);return}h(D)})});return T.catch(je),T}function d(){if(s.idle())return new Promise(function(h){h()});var g=s.drain,T=new Promise(function(h){s.drain=function(){g(),h()}});return T}}ms.exports=ho;ms.exports.promise=hN;var ko=ms.exports,ds={exports:{}},vn=typeof Reflect=="object"?Reflect:null,Ur=vn&&typeof vn.apply=="function"?vn.apply:function(e,t,a){return Function.prototype.apply.call(e,t,a)},mt;vn&&typeof vn.ownKeys=="function"?mt=vn.ownKeys:Object.getOwnPropertySymbols?mt=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:mt=function(e){return Object.getOwnPropertyNames(e)};function kN(n){console&&console.warn&&console.warn(n)}var Mo=Number.isNaN||function(e){return e!==e};function te(){te.init.call(this)}ds.exports=te;ds.exports.once=SN;te.EventEmitter=te;te.prototype._events=void 0;te.prototype._eventsCount=0;te.prototype._maxListeners=void 0;var Pr=10;function Ut(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(te,"defaultMaxListeners",{enumerable:!0,get:function(){return Pr},set:function(n){if(typeof n!="number"||n<0||Mo(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");Pr=n}});te.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};te.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Mo(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function No(n){return n._maxListeners===void 0?te.defaultMaxListeners:n._maxListeners}te.prototype.getMaxListeners=function(){return No(this)};te.prototype.emit=function(e){for(var t=[],a=1;a<arguments.length;a++)t.push(arguments[a]);var s=e==="error",r=this._events;if(r!==void 0)s=s&&r.error===void 0;else if(!s)return!1;if(s){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var m=r[e];if(m===void 0)return!1;if(typeof m=="function")Ur(m,this,t);else for(var d=m.length,g=bo(m,d),a=0;a<d;++a)Ur(g[a],this,t);return!0};function Io(n,e,t,a){var s,r,i;if(Ut(t),r=n._events,r===void 0?(r=n._events=Object.create(null),n._eventsCount=0):(r.newListener!==void 0&&(n.emit("newListener",e,t.listener?t.listener:t),r=n._events),i=r[e]),i===void 0)i=r[e]=t,++n._eventsCount;else if(typeof i=="function"?i=r[e]=a?[t,i]:[i,t]:a?i.unshift(t):i.push(t),s=No(n),s>0&&i.length>s&&!i.warned){i.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=n,l.type=e,l.count=i.length,kN(l)}return n}te.prototype.addListener=function(e,t){return Io(this,e,t,!1)};te.prototype.on=te.prototype.addListener;te.prototype.prependListener=function(e,t){return Io(this,e,t,!0)};function MN(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function So(n,e,t){var a={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},s=MN.bind(a);return s.listener=t,a.wrapFn=s,s}te.prototype.once=function(e,t){return Ut(t),this.on(e,So(this,e,t)),this};te.prototype.prependOnceListener=function(e,t){return Ut(t),this.prependListener(e,So(this,e,t)),this};te.prototype.removeListener=function(e,t){var a,s,r,i,l;if(Ut(t),s=this._events,s===void 0)return this;if(a=s[e],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,a.listener||t));else if(typeof a!="function"){for(r=-1,i=a.length-1;i>=0;i--)if(a[i]===t||a[i].listener===t){l=a[i].listener,r=i;break}if(r<0)return this;r===0?a.shift():NN(a,r),a.length===1&&(s[e]=a[0]),s.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this};te.prototype.off=te.prototype.removeListener;te.prototype.removeAllListeners=function(e){var t,a,s;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[e]),this;if(arguments.length===0){var r=Object.keys(a),i;for(s=0;s<r.length;++s)i=r[s],i!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=a[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this};function Ao(n,e,t){var a=n._events;if(a===void 0)return[];var s=a[e];return s===void 0?[]:typeof s=="function"?t?[s.listener||s]:[s]:t?IN(s):bo(s,s.length)}te.prototype.listeners=function(e){return Ao(this,e,!0)};te.prototype.rawListeners=function(e){return Ao(this,e,!1)};te.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):Eo.call(n,e)};te.prototype.listenerCount=Eo;function Eo(n){var e=this._events;if(e!==void 0){var t=e[n];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}te.prototype.eventNames=function(){return this._eventsCount>0?mt(this._events):[]};function bo(n,e){for(var t=new Array(e),a=0;a<e;++a)t[a]=n[a];return t}function NN(n,e){for(;e+1<n.length;e++)n[e]=n[e+1];n.pop()}function IN(n){for(var e=new Array(n.length),t=0;t<e.length;++t)e[t]=n[t].listener||n[t];return e}function SN(n,e){return new Promise(function(t,a){function s(i){n.removeListener(e,r),a(i)}function r(){typeof n.removeListener=="function"&&n.removeListener("error",s),t([].slice.call(arguments))}Do(n,e,r,{once:!0}),e!=="error"&&AN(n,s,{once:!0})})}function AN(n,e,t){typeof n.on=="function"&&Do(n,"error",e,t)}function Do(n,e,t,a){if(typeof n.on=="function")a.once?n.once(e,t):n.on(e,t);else if(typeof n.addEventListener=="function")n.addEventListener(e,function s(r){a.once&&n.removeEventListener(e,s),t(r)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var _o=ds.exports,Pt={},wo={},vo=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),a=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var s=42;e[t]=s;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==s||i.enumerable!==!0)return!1}return!0},EN=vo,ps=function(){return EN()&&!!Symbol.toStringTag},Br=typeof Symbol<"u"&&Symbol,bN=vo,DN=function(){return typeof Br!="function"||typeof Symbol!="function"||typeof Br("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:bN()},Qr={foo:{}},_N=Object,wN=function(){return{__proto__:Qr}.foo===Qr.foo&&!({__proto__:null}instanceof _N)},vN="Function.prototype.bind called on incompatible ",ON=Object.prototype.toString,jN=Math.max,LN="[object Function]",Fr=function(e,t){for(var a=[],s=0;s<e.length;s+=1)a[s]=e[s];for(var r=0;r<t.length;r+=1)a[r+e.length]=t[r];return a},RN=function(e,t){for(var a=[],s=t||0,r=0;s<e.length;s+=1,r+=1)a[r]=e[s];return a},xN=function(n,e){for(var t="",a=0;a<n.length;a+=1)t+=n[a],a+1<n.length&&(t+=e);return t},CN=function(e){var t=this;if(typeof t!="function"||ON.apply(t)!==LN)throw new TypeError(vN+t);for(var a=RN(arguments,1),s,r=function(){if(this instanceof s){var g=t.apply(this,Fr(a,arguments));return Object(g)===g?g:this}return t.apply(e,Fr(a,arguments))},i=jN(0,t.length-a.length),l=[],m=0;m<i;m++)l[m]="$"+m;if(s=Function("binder","return function ("+xN(l,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var d=function(){};d.prototype=t.prototype,s.prototype=new d,d.prototype=null}return s},zN=CN,Oo=Function.prototype.bind||zN,Gr={}.hasOwnProperty,oa=Function.prototype.call,UN=oa.bind?oa.bind(Gr):function(n,e){return oa.call(Gr,n,e)},q,Ln=SyntaxError,jo=Function,On=TypeError,ca=function(n){try{return jo('"use strict"; return ('+n+").constructor;")()}catch{}},pn=Object.getOwnPropertyDescriptor;if(pn)try{pn({},"")}catch{pn=null}var la=function(){throw new On},PN=pn?function(){try{return arguments.callee,la}catch{try{return pn(arguments,"callee").get}catch{return la}}}():la,In=DN(),BN=wN(),fe=Object.getPrototypeOf||(BN?function(n){return n.__proto__}:null),bn={},QN=typeof Uint8Array>"u"||!fe?q:fe(Uint8Array),gn={"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":In&&fe?fe([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":bn,"%AsyncGenerator%":bn,"%AsyncGeneratorFunction%":bn,"%AsyncIteratorPrototype%":bn,"%Atomics%":typeof Atomics>"u"?q:Atomics,"%BigInt%":typeof BigInt>"u"?q:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?q:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?q:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?q:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?q:Float32Array,"%Float64Array%":typeof Float64Array>"u"?q:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?q:FinalizationRegistry,"%Function%":jo,"%GeneratorFunction%":bn,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":In&&fe?fe(fe([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!In||!fe?q:fe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?q:Promise,"%Proxy%":typeof Proxy>"u"?q:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?q:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?q:Set,"%SetIteratorPrototype%":typeof Set>"u"||!In||!fe?q:fe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":In&&fe?fe(""[Symbol.iterator]()):q,"%Symbol%":In?Symbol:q,"%SyntaxError%":Ln,"%ThrowTypeError%":PN,"%TypedArray%":QN,"%TypeError%":On,"%Uint8Array%":typeof Uint8Array>"u"?q:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?q:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?q:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?q:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?q:WeakMap,"%WeakRef%":typeof WeakRef>"u"?q:WeakRef,"%WeakSet%":typeof WeakSet>"u"?q:WeakSet};if(fe)try{null.error}catch(n){var FN=fe(fe(n));gn["%Error.prototype%"]=FN}var GN=function n(e){var t;if(e==="%AsyncFunction%")t=ca("async function () {}");else if(e==="%GeneratorFunction%")t=ca("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=ca("async function* () {}");else if(e==="%AsyncGenerator%"){var a=n("%AsyncGeneratorFunction%");a&&(t=a.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&fe&&(t=fe(s.prototype))}return gn[e]=t,t},Yr={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},et=Oo,kt=UN,YN=et.call(Function.call,Array.prototype.concat),VN=et.call(Function.apply,Array.prototype.splice),Vr=et.call(Function.call,String.prototype.replace),Mt=et.call(Function.call,String.prototype.slice),$N=et.call(Function.call,RegExp.prototype.exec),qN=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,WN=/\\(\\)?/g,HN=function(e){var t=Mt(e,0,1),a=Mt(e,-1);if(t==="%"&&a!=="%")throw new Ln("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&t!=="%")throw new Ln("invalid intrinsic syntax, expected opening `%`");var s=[];return Vr(e,qN,function(r,i,l,m){s[s.length]=l?Vr(m,WN,"$1"):i||r}),s},ZN=function(e,t){var a=e,s;if(kt(Yr,a)&&(s=Yr[a],a="%"+s[0]+"%"),kt(gn,a)){var r=gn[a];if(r===bn&&(r=GN(a)),typeof r>"u"&&!t)throw new On("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:a,value:r}}throw new Ln("intrinsic "+e+" does not exist!")},Cn=function(e,t){if(typeof e!="string"||e.length===0)throw new On("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new On('"allowMissing" argument must be a boolean');if($N(/^%?[^%]*%?$/,e)===null)throw new Ln("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=HN(e),s=a.length>0?a[0]:"",r=ZN("%"+s+"%",t),i=r.name,l=r.value,m=!1,d=r.alias;d&&(s=d[0],VN(a,YN([0,1],d)));for(var g=1,T=!0;g<a.length;g+=1){var h=a[g],M=Mt(h,0,1),E=Mt(h,-1);if((M==='"'||M==="'"||M==="`"||E==='"'||E==="'"||E==="`")&&M!==E)throw new Ln("property names with quotes must have matching quotes");if((h==="constructor"||!T)&&(m=!0),s+="."+h,i="%"+s+"%",kt(gn,i))l=gn[i];else if(l!=null){if(!(h in l)){if(!t)throw new On("base intrinsic for "+e+" exists, but the property is not available.");return}if(pn&&g+1>=a.length){var D=pn(l,h);T=!!D,T&&"get"in D&&!("originalValue"in D.get)?l=D.get:l=l[h]}else T=kt(l,h),l=l[h];T&&!m&&(gn[i]=l)}}return l},Lo={exports:{}},KN=Cn,ja=KN("%Object.defineProperty%",!0),La=function(){if(ja)try{return ja({},"a",{value:1}),!0}catch{return!1}return!1};La.hasArrayLengthDefineBug=function(){if(!La())return null;try{return ja([],"length",{value:1}).length!==1}catch{return!0}};var Ro=La,JN=Cn,dt=JN("%Object.getOwnPropertyDescriptor%",!0);if(dt)try{dt([],"length")}catch{dt=null}var gs=dt,XN=Ro(),ys=Cn,qn=XN&&ys("%Object.defineProperty%",!0);if(qn)try{qn({},"a",{value:1})}catch{qn=!1}var eI=ys("%SyntaxError%"),Sn=ys("%TypeError%"),$r=gs,nI=function(e,t,a){if(!e||typeof e!="object"&&typeof e!="function")throw new Sn("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Sn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Sn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Sn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Sn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Sn("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,m=!!$r&&$r(e,t);if(qn)qn(e,t,{configurable:i===null&&m?m.configurable:!i,enumerable:s===null&&m?m.enumerable:!s,value:a,writable:r===null&&m?m.writable:!r});else if(l||!s&&!r&&!i)e[t]=a;else throw new eI("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},xo=Cn,qr=nI,tI=Ro(),Wr=gs,Hr=xo("%TypeError%"),aI=xo("%Math.floor%"),sI=function(e,t){if(typeof e!="function")throw new Hr("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||aI(t)!==t)throw new Hr("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],s=!0,r=!0;if("length"in e&&Wr){var i=Wr(e,"length");i&&!i.configurable&&(s=!1),i&&!i.writable&&(r=!1)}return(s||r||!a)&&(tI?qr(e,"length",t,!0,!0):qr(e,"length",t)),e};(function(n){var e=Oo,t=Cn,a=sI,s=t("%TypeError%"),r=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(i,r),m=t("%Object.defineProperty%",!0),d=t("%Math.max%");if(m)try{m({},"a",{value:1})}catch{m=null}n.exports=function(h){if(typeof h!="function")throw new s("a function is required");var M=l(e,i,arguments);return a(M,1+d(0,h.length-(arguments.length-1)),!0)};var g=function(){return l(e,r,arguments)};m?m(n.exports,"apply",{value:g}):n.exports.apply=g})(Lo);var Co=Lo.exports,zo=Cn,Uo=Co,rI=Uo(zo("String.prototype.indexOf")),Po=function(e,t){var a=zo(e,!!t);return typeof a=="function"&&rI(e,".prototype.")>-1?Uo(a):a},iI=ps(),oI=Po,Ra=oI("Object.prototype.toString"),Bt=function(e){return iI&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Ra(e)==="[object Arguments]"},Bo=function(e){return Bt(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ra(e)!=="[object Array]"&&Ra(e.callee)==="[object Function]"},cI=function(){return Bt(arguments)}();Bt.isLegacyArguments=Bo;var lI=cI?Bt:Bo,uI=Object.prototype.toString,mI=Function.prototype.toString,dI=/^\s*(?:function)?\*/,Qo=ps(),ua=Object.getPrototypeOf,pI=function(){if(!Qo)return!1;try{return Function("return function*() {}")()}catch{}},ma,gI=function(e){if(typeof e!="function")return!1;if(dI.test(mI.call(e)))return!0;if(!Qo){var t=uI.call(e);return t==="[object GeneratorFunction]"}if(!ua)return!1;if(typeof ma>"u"){var a=pI();ma=a?ua(a):!1}return ua(e)===ma},Fo=Function.prototype.toString,_n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,xa,pt;if(typeof _n=="function"&&typeof Object.defineProperty=="function")try{xa=Object.defineProperty({},"length",{get:function(){throw pt}}),pt={},_n(function(){throw 42},null,xa)}catch(n){n!==pt&&(_n=null)}else _n=null;var yI=/^\s*class\b/,Ca=function(e){try{var t=Fo.call(e);return yI.test(t)}catch{return!1}},da=function(e){try{return Ca(e)?!1:(Fo.call(e),!0)}catch{return!1}},gt=Object.prototype.toString,fI="[object Object]",TI="[object Function]",hI="[object GeneratorFunction]",kI="[object HTMLAllCollection]",MI="[object HTML document.all class]",NI="[object HTMLCollection]",II=typeof Symbol=="function"&&!!Symbol.toStringTag,SI=!(0 in[,]),za=function(){return!1};if(typeof document=="object"){var AI=document.all;gt.call(AI)===gt.call(document.all)&&(za=function(e){if((SI||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=gt.call(e);return(t===kI||t===MI||t===NI||t===fI)&&e("")==null}catch{}return!1})}var EI=_n?function(e){if(za(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{_n(e,null,xa)}catch(t){if(t!==pt)return!1}return!Ca(e)&&da(e)}:function(e){if(za(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(II)return da(e);if(Ca(e))return!1;var t=gt.call(e);return t!==TI&&t!==hI&&!/^\[object HTML/.test(t)?!1:da(e)},bI=EI,DI=Object.prototype.toString,Go=Object.prototype.hasOwnProperty,_I=function(e,t,a){for(var s=0,r=e.length;s<r;s++)Go.call(e,s)&&(a==null?t(e[s],s,e):t.call(a,e[s],s,e))},wI=function(e,t,a){for(var s=0,r=e.length;s<r;s++)a==null?t(e.charAt(s),s,e):t.call(a,e.charAt(s),s,e)},vI=function(e,t,a){for(var s in e)Go.call(e,s)&&(a==null?t(e[s],s,e):t.call(a,e[s],s,e))},OI=function(e,t,a){if(!bI(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=a),DI.call(e)==="[object Array]"?_I(e,t,s):typeof e=="string"?wI(e,t,s):vI(e,t,s)},jI=OI,pa=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],LI=typeof globalThis>"u"?ri:globalThis,RI=function(){for(var e=[],t=0;t<pa.length;t++)typeof LI[pa[t]]=="function"&&(e[e.length]=pa[t]);return e},Nt=jI,xI=RI,Zr=Co,fs=Po,yt=gs,CI=fs("Object.prototype.toString"),Yo=ps(),Kr=typeof globalThis>"u"?ri:globalThis,Ua=xI(),Ts=fs("String.prototype.slice"),ga=Object.getPrototypeOf,zI=fs("Array.prototype.indexOf",!0)||function(e,t){for(var a=0;a<e.length;a+=1)if(e[a]===t)return a;return-1},It={__proto__:null};Yo&&yt&&ga?Nt(Ua,function(n){var e=new Kr[n];if(Symbol.toStringTag in e){var t=ga(e),a=yt(t,Symbol.toStringTag);if(!a){var s=ga(t);a=yt(s,Symbol.toStringTag)}It["$"+n]=Zr(a.get)}}):Nt(Ua,function(n){var e=new Kr[n],t=e.slice||e.set;t&&(It["$"+n]=Zr(t))});var UI=function(e){var t=!1;return Nt(It,function(a,s){if(!t)try{"$"+a(e)===s&&(t=Ts(s,1))}catch{}}),t},PI=function(e){var t=!1;return Nt(It,function(a,s){if(!t)try{a(e),t=Ts(s,1)}catch{}}),t},Vo=function(e){if(!e||typeof e!="object")return!1;if(!Yo){var t=Ts(CI(e),8,-1);return zI(Ua,t)>-1?t:t!=="Object"?!1:PI(e)}return yt?UI(e):null},BI=Vo,QI=function(e){return!!BI(e)};(function(n){var e=lI,t=gI,a=Vo,s=QI;function r(v){return v.call.bind(v)}var i=typeof BigInt<"u",l=typeof Symbol<"u",m=r(Object.prototype.toString),d=r(Number.prototype.valueOf),g=r(String.prototype.valueOf),T=r(Boolean.prototype.valueOf);if(i)var h=r(BigInt.prototype.valueOf);if(l)var M=r(Symbol.prototype.valueOf);function E(v,tt){if(typeof v!="object")return!1;try{return tt(v),!0}catch{return!1}}n.isArgumentsObject=e,n.isGeneratorFunction=t,n.isTypedArray=s;function D(v){return typeof Promise<"u"&&v instanceof Promise||v!==null&&typeof v=="object"&&typeof v.then=="function"&&typeof v.catch=="function"}n.isPromise=D;function L(v){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(v):s(v)||_(v)}n.isArrayBufferView=L;function O(v){return a(v)==="Uint8Array"}n.isUint8Array=O;function R(v){return a(v)==="Uint8ClampedArray"}n.isUint8ClampedArray=R;function x(v){return a(v)==="Uint16Array"}n.isUint16Array=x;function z(v){return a(v)==="Uint32Array"}n.isUint32Array=z;function U(v){return a(v)==="Int8Array"}n.isInt8Array=U;function B(v){return a(v)==="Int16Array"}n.isInt16Array=B;function C(v){return a(v)==="Int32Array"}n.isInt32Array=C;function H(v){return a(v)==="Float32Array"}n.isFloat32Array=H;function ne(v){return a(v)==="Float64Array"}n.isFloat64Array=ne;function se(v){return a(v)==="BigInt64Array"}n.isBigInt64Array=se;function ie(v){return a(v)==="BigUint64Array"}n.isBigUint64Array=ie;function ue(v){return m(v)==="[object Map]"}ue.working=typeof Map<"u"&&ue(new Map);function oe(v){return typeof Map>"u"?!1:ue.working?ue(v):v instanceof Map}n.isMap=oe;function Z(v){return m(v)==="[object Set]"}Z.working=typeof Set<"u"&&Z(new Set);function me(v){return typeof Set>"u"?!1:Z.working?Z(v):v instanceof Set}n.isSet=me;function Ee(v){return m(v)==="[object WeakMap]"}Ee.working=typeof WeakMap<"u"&&Ee(new WeakMap);function Ce(v){return typeof WeakMap>"u"?!1:Ee.working?Ee(v):v instanceof WeakMap}n.isWeakMap=Ce;function we(v){return m(v)==="[object WeakSet]"}we.working=typeof WeakSet<"u"&&we(new WeakSet);function Ie(v){return we(v)}n.isWeakSet=Ie;function Se(v){return m(v)==="[object ArrayBuffer]"}Se.working=typeof ArrayBuffer<"u"&&Se(new ArrayBuffer);function K(v){return typeof ArrayBuffer>"u"?!1:Se.working?Se(v):v instanceof ArrayBuffer}n.isArrayBuffer=K;function I(v){return m(v)==="[object DataView]"}I.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&I(new DataView(new ArrayBuffer(1),0,1));function _(v){return typeof DataView>"u"?!1:I.working?I(v):v instanceof DataView}n.isDataView=_;var j=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function F(v){return m(v)==="[object SharedArrayBuffer]"}function W(v){return typeof j>"u"?!1:(typeof F.working>"u"&&(F.working=F(new j)),F.working?F(v):v instanceof j)}n.isSharedArrayBuffer=W;function J(v){return m(v)==="[object AsyncFunction]"}n.isAsyncFunction=J;function Y(v){return m(v)==="[object Map Iterator]"}n.isMapIterator=Y;function $(v){return m(v)==="[object Set Iterator]"}n.isSetIterator=$;function X(v){return m(v)==="[object Generator]"}n.isGeneratorObject=X;function Me(v){return m(v)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=Me;function Pe(v){return E(v,d)}n.isNumberObject=Pe;function ze(v){return E(v,g)}n.isStringObject=ze;function ve(v){return E(v,T)}n.isBooleanObject=ve;function hn(v){return i&&E(v,h)}n.isBigIntObject=hn;function nt(v){return l&&E(v,M)}n.isSymbolObject=nt;function Un(v){return Pe(v)||ze(v)||ve(v)||hn(v)||nt(v)}n.isBoxedPrimitive=Un;function Qt(v){return typeof Uint8Array<"u"&&(K(v)||W(v))}n.isAnyArrayBuffer=Qt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(v){Object.defineProperty(n,v,{enumerable:!1,value:function(){throw new Error(v+" is not supported in userland")}})})})(wo);var FI=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Pa={exports:{}};typeof Object.create=="function"?Pa.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Pa.exports=function(e,t){if(t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}};var GI=Pa.exports;(function(n){var e=Object.getOwnPropertyDescriptors||function(_){for(var j=Object.keys(_),F={},W=0;W<j.length;W++)F[j[W]]=Object.getOwnPropertyDescriptor(_,j[W]);return F},t=/%[sdj%]/g;n.format=function(I){if(!U(I)){for(var _=[],j=0;j<arguments.length;j++)_.push(i(arguments[j]));return _.join(" ")}for(var j=1,F=arguments,W=F.length,J=String(I).replace(t,function($){if($==="%%")return"%";if(j>=W)return $;switch($){case"%s":return String(F[j++]);case"%d":return Number(F[j++]);case"%j":try{return JSON.stringify(F[j++])}catch{return"[Circular]"}default:return $}}),Y=F[j];j<W;Y=F[++j])R(Y)||!ne(Y)?J+=" "+Y:J+=" "+i(Y);return J},n.deprecate=function(I,_){if(typeof G.process<"u"&&G.process.noDeprecation===!0)return I;if(typeof G.process>"u")return function(){return n.deprecate(I,_).apply(this,arguments)};var j=!1;function F(){if(!j){if(G.process.throwDeprecation)throw new Error(_);G.process.traceDeprecation?console.trace(_):console.error(_),j=!0}return I.apply(this,arguments)}return F};var a={},s=/^$/;if(G.process.env.NODE_DEBUG){var r=G.process.env.NODE_DEBUG;r=r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+r+"$","i")}n.debuglog=function(I){if(I=I.toUpperCase(),!a[I])if(s.test(I)){var _=G.process.pid;a[I]=function(){var j=n.format.apply(n,arguments);console.error("%s %d: %s",I,_,j)}}else a[I]=function(){};return a[I]};function i(I,_){var j={seen:[],stylize:m};return arguments.length>=3&&(j.depth=arguments[2]),arguments.length>=4&&(j.colors=arguments[3]),O(_)?j.showHidden=_:_&&n._extend(j,_),C(j.showHidden)&&(j.showHidden=!1),C(j.depth)&&(j.depth=2),C(j.colors)&&(j.colors=!1),C(j.customInspect)&&(j.customInspect=!0),j.colors&&(j.stylize=l),g(j,I,j.depth)}n.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(I,_){var j=i.styles[_];return j?"\x1B["+i.colors[j][0]+"m"+I+"\x1B["+i.colors[j][1]+"m":I}function m(I,_){return I}function d(I){var _={};return I.forEach(function(j,F){_[j]=!0}),_}function g(I,_,j){if(I.customInspect&&_&&ue(_.inspect)&&_.inspect!==n.inspect&&!(_.constructor&&_.constructor.prototype===_)){var F=_.inspect(j,I);return U(F)||(F=g(I,F,j)),F}var W=T(I,_);if(W)return W;var J=Object.keys(_),Y=d(J);if(I.showHidden&&(J=Object.getOwnPropertyNames(_)),ie(_)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return h(_);if(J.length===0){if(ue(_)){var $=_.name?": "+_.name:"";return I.stylize("[Function"+$+"]","special")}if(H(_))return I.stylize(RegExp.prototype.toString.call(_),"regexp");if(se(_))return I.stylize(Date.prototype.toString.call(_),"date");if(ie(_))return h(_)}var X="",Me=!1,Pe=["{","}"];if(L(_)&&(Me=!0,Pe=["[","]"]),ue(_)){var ze=_.name?": "+_.name:"";X=" [Function"+ze+"]"}if(H(_)&&(X=" "+RegExp.prototype.toString.call(_)),se(_)&&(X=" "+Date.prototype.toUTCString.call(_)),ie(_)&&(X=" "+h(_)),J.length===0&&(!Me||_.length==0))return Pe[0]+X+Pe[1];if(j<0)return H(_)?I.stylize(RegExp.prototype.toString.call(_),"regexp"):I.stylize("[Object]","special");I.seen.push(_);var ve;return Me?ve=M(I,_,j,Y,J):ve=J.map(function(hn){return E(I,_,j,Y,hn,Me)}),I.seen.pop(),D(ve,X,Pe)}function T(I,_){if(C(_))return I.stylize("undefined","undefined");if(U(_)){var j="'"+JSON.stringify(_).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return I.stylize(j,"string")}if(z(_))return I.stylize(""+_,"number");if(O(_))return I.stylize(""+_,"boolean");if(R(_))return I.stylize("null","null")}function h(I){return"["+Error.prototype.toString.call(I)+"]"}function M(I,_,j,F,W){for(var J=[],Y=0,$=_.length;Y<$;++Y)we(_,String(Y))?J.push(E(I,_,j,F,String(Y),!0)):J.push("");return W.forEach(function(X){X.match(/^\d+$/)||J.push(E(I,_,j,F,X,!0))}),J}function E(I,_,j,F,W,J){var Y,$,X;if(X=Object.getOwnPropertyDescriptor(_,W)||{value:_[W]},X.get?X.set?$=I.stylize("[Getter/Setter]","special"):$=I.stylize("[Getter]","special"):X.set&&($=I.stylize("[Setter]","special")),we(F,W)||(Y="["+W+"]"),$||(I.seen.indexOf(X.value)<0?(R(j)?$=g(I,X.value,null):$=g(I,X.value,j-1),$.indexOf(`
|
|
17
|
-
`)>-1&&(J?$=$.split(`
|
|
18
|
-
`).map(function(Me){return" "+Me}).join(`
|
|
19
|
-
`).slice(2):$=`
|
|
20
|
-
`+$.split(`
|
|
21
|
-
`).map(function(Me){return" "+Me}).join(`
|
|
22
|
-
`))):$=I.stylize("[Circular]","special")),C(Y)){if(J&&W.match(/^\d+$/))return $;Y=JSON.stringify(""+W),Y.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Y=Y.slice(1,-1),Y=I.stylize(Y,"name")):(Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=I.stylize(Y,"string"))}return Y+": "+$}function D(I,_,j){var F=I.reduce(function(W,J){return J.indexOf(`
|
|
23
|
-
`)>=0,W+J.replace(/\u001b\[\d\d?m/g,"").length+1},0);return F>60?j[0]+(_===""?"":_+`
|
|
24
|
-
`)+" "+I.join(`,
|
|
25
|
-
`)+" "+j[1]:j[0]+_+" "+I.join(", ")+" "+j[1]}n.types=wo;function L(I){return Array.isArray(I)}n.isArray=L;function O(I){return typeof I=="boolean"}n.isBoolean=O;function R(I){return I===null}n.isNull=R;function x(I){return I==null}n.isNullOrUndefined=x;function z(I){return typeof I=="number"}n.isNumber=z;function U(I){return typeof I=="string"}n.isString=U;function B(I){return typeof I=="symbol"}n.isSymbol=B;function C(I){return I===void 0}n.isUndefined=C;function H(I){return ne(I)&&Z(I)==="[object RegExp]"}n.isRegExp=H,n.types.isRegExp=H;function ne(I){return typeof I=="object"&&I!==null}n.isObject=ne;function se(I){return ne(I)&&Z(I)==="[object Date]"}n.isDate=se,n.types.isDate=se;function ie(I){return ne(I)&&(Z(I)==="[object Error]"||I instanceof Error)}n.isError=ie,n.types.isNativeError=ie;function ue(I){return typeof I=="function"}n.isFunction=ue;function oe(I){return I===null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||typeof I=="symbol"||typeof I>"u"}n.isPrimitive=oe,n.isBuffer=FI;function Z(I){return Object.prototype.toString.call(I)}function me(I){return I<10?"0"+I.toString(10):I.toString(10)}var Ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ce(){var I=new Date,_=[me(I.getHours()),me(I.getMinutes()),me(I.getSeconds())].join(":");return[I.getDate(),Ee[I.getMonth()],_].join(" ")}n.log=function(){console.log("%s - %s",Ce(),n.format.apply(n,arguments))},n.inherits=GI,n._extend=function(I,_){if(!_||!ne(_))return I;for(var j=Object.keys(_),F=j.length;F--;)I[j[F]]=_[j[F]];return I};function we(I,_){return Object.prototype.hasOwnProperty.call(I,_)}var Ie=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(_){if(typeof _!="function")throw new TypeError('The "original" argument must be of type Function');if(Ie&&_[Ie]){var j=_[Ie];if(typeof j!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(j,Ie,{value:j,enumerable:!1,writable:!1,configurable:!0}),j}function j(){for(var F,W,J=new Promise(function(X,Me){F=X,W=Me}),Y=[],$=0;$<arguments.length;$++)Y.push(arguments[$]);Y.push(function(X,Me){X?W(X):F(Me)});try{_.apply(this,Y)}catch(X){W(X)}return J}return Object.setPrototypeOf(j,Object.getPrototypeOf(_)),Ie&&Object.defineProperty(j,Ie,{value:j,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(j,e(_))},n.promisify.custom=Ie;function Se(I,_){if(!I){var j=new Error("Promise was rejected with a falsy value");j.reason=I,I=j}return _(I)}function K(I){if(typeof I!="function")throw new TypeError('The "original" argument must be of type Function');function _(){for(var j=[],F=0;F<arguments.length;F++)j.push(arguments[F]);var W=j.pop();if(typeof W!="function")throw new TypeError("The last argument must be of type Function");var J=this,Y=function(){return W.apply(J,arguments)};I.apply(this,j).then(function($){G.process.nextTick(Y.bind(null,null,$))},function($){G.process.nextTick(Se.bind(null,$,Y))})}return Object.setPrototypeOf(_,Object.getPrototypeOf(I)),Object.defineProperties(_,e(I)),_}n.callbackify=K})(Pt);const{inherits:YI,format:ya}=Pt;function cn(n,e,t=Error){if(!n)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function a(s,r,i){if(!new.target)return new a(s,r,i);Error.captureStackTrace(this,a),this.code=n,this.message=e,this.name="AvvioError",s&&r&&i?this.message=ya(e,s,r,i):s&&r?this.message=ya(e,s,r):s?this.message=ya(e,s):this.message=e}return a.prototype[Symbol.toStringTag]="Error",a.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},YI(a,t),a}var $o={createError:cn,AVV_ERR_EXPOSE_ALREADY_DEFINED:cn("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:cn("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:cn("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:cn("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:cn("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:cn("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},VI=function n(e,t,a){t===void 0&&(t=""),a||(a={});var s=function(m){var d={"│":"|","└":"`","├":"+","─":"-","┬":"-"};return a.unicode===!1?d[m]:m};typeof e=="string"&&(e={label:e});var r=e.nodes||[],i=(e.label||"").split(`
|
|
26
|
-
`),l=`
|
|
27
|
-
`+t+(r.length?s("│"):" ")+" ";return t+i.join(l)+`
|
|
28
|
-
`+r.map(function(m,d){var g=d===r.length-1,T=m.nodes&&m.nodes.length,h=t+(g?" ":s("│"))+" ";return t+s(g?"└":"├")+s("─")+s(T?"┬":"─")+" "+n(m,h,a).slice(t.length+2)}).join("")};const $I=VI,Jr=Symbol("avvio.TimeTree.untrackNode"),fa=Symbol("avvio.TimeTree.trackNode"),Xr=Symbol("avvio.TimeTree.getParent"),ei=Symbol("avvio.TimeTree.getNode"),ni=Symbol("avvio.TimeTree.addNode");let qI=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[fa](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[Jr](e){this.tableId.delete(e.id);const t=this.tableLabel.get(e.label);if(t.id){this.tableLabel.delete(e.label);return}t.pop(),t.length===0&&this.tableLabel.delete(e.label)}[Xr](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[ei](e){return this.tableId.get(e)}[ni](e,t,a){if(e===null)return this.root={id:"root",label:t,start:a,nodes:[]},this[fa](this.root),this.root.id;const r=this[Xr](e),i=`${t}-${Math.random()}`,l={id:i,parent:e,start:a,label:t,nodes:[]};return r.nodes.push(l),this[fa](l),i}start(e,t,a=Date.now()){return this[ni](e,t,a)}stop(e,t=Date.now()){const a=this[ei](e);a&&(a.stop=t,a.diff=a.stop-a.start||0,this[Jr](a))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const e=a=>(a.label=`${a.label} ${a.diff} ms`,a.nodes.length>0&&(a.nodes=a.nodes.map(s=>e(s))),a),t=e(this.toJSON());return $I(t)}};var WI=qI,hs={exports:{}},Ba={exports:{}},Ta,ti;function HI(){if(ti)return Ta;ti=1;var n=1e3,e=n*60,t=e*60,a=t*24,s=a*7,r=a*365.25;Ta=function(g,T){T=T||{};var h=typeof g;if(h==="string"&&g.length>0)return i(g);if(h==="number"&&isFinite(g))return T.long?m(g):l(g);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(g))};function i(g){if(g=String(g),!(g.length>100)){var T=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(g);if(T){var h=parseFloat(T[1]),M=(T[2]||"ms").toLowerCase();switch(M){case"years":case"year":case"yrs":case"yr":case"y":return h*r;case"weeks":case"week":case"w":return h*s;case"days":case"day":case"d":return h*a;case"hours":case"hour":case"hrs":case"hr":case"h":return h*t;case"minutes":case"minute":case"mins":case"min":case"m":return h*e;case"seconds":case"second":case"secs":case"sec":case"s":return h*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function l(g){var T=Math.abs(g);return T>=a?Math.round(g/a)+"d":T>=t?Math.round(g/t)+"h":T>=e?Math.round(g/e)+"m":T>=n?Math.round(g/n)+"s":g+"ms"}function m(g){var T=Math.abs(g);return T>=a?d(g,T,a,"day"):T>=t?d(g,T,t,"hour"):T>=e?d(g,T,e,"minute"):T>=n?d(g,T,n,"second"):g+" ms"}function d(g,T,h,M){var E=T>=h*1.5;return Math.round(g/h)+" "+M+(E?"s":"")}return Ta}function ZI(n){t.debug=t,t.default=t,t.coerce=m,t.disable=r,t.enable=s,t.enabled=i,t.humanize=HI(),t.destroy=d,Object.keys(n).forEach(g=>{t[g]=n[g]}),t.names=[],t.skips=[],t.formatters={};function e(g){let T=0;for(let h=0;h<g.length;h++)T=(T<<5)-T+g.charCodeAt(h),T|=0;return t.colors[Math.abs(T)%t.colors.length]}t.selectColor=e;function t(g){let T,h=null,M,E;function D(...L){if(!D.enabled)return;const O=D,R=Number(new Date),x=R-(T||R);O.diff=x,O.prev=T,O.curr=R,T=R,L[0]=t.coerce(L[0]),typeof L[0]!="string"&&L.unshift("%O");let z=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,(B,C)=>{if(B==="%%")return"%";z++;const H=t.formatters[C];if(typeof H=="function"){const ne=L[z];B=H.call(O,ne),L.splice(z,1),z--}return B}),t.formatArgs.call(O,L),(O.log||t.log).apply(O,L)}return D.namespace=g,D.useColors=t.useColors(),D.color=t.selectColor(g),D.extend=a,D.destroy=t.destroy,Object.defineProperty(D,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(M!==t.namespaces&&(M=t.namespaces,E=t.enabled(g)),E),set:L=>{h=L}}),typeof t.init=="function"&&t.init(D),D}function a(g,T){const h=t(this.namespace+(typeof T>"u"?":":T)+g);return h.log=this.log,h}function s(g){t.save(g),t.namespaces=g,t.names=[],t.skips=[];let T;const h=(typeof g=="string"?g:"").split(/[\s,]+/),M=h.length;for(T=0;T<M;T++)h[T]&&(g=h[T].replace(/\*/g,".*?"),g[0]==="-"?t.skips.push(new RegExp("^"+g.slice(1)+"$")):t.names.push(new RegExp("^"+g+"$")))}function r(){const g=[...t.names.map(l),...t.skips.map(l).map(T=>"-"+T)].join(",");return t.enable(""),g}function i(g){if(g[g.length-1]==="*")return!0;let T,h;for(T=0,h=t.skips.length;T<h;T++)if(t.skips[T].test(g))return!1;for(T=0,h=t.names.length;T<h;T++)if(t.names[T].test(g))return!0;return!1}function l(g){return g.toString().substring(2,g.toString().length-2).replace(/\.\*\?$/,"*")}function m(g){return g instanceof Error?g.stack||g.message:g}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}var KI=ZI;(function(n,e){e.formatArgs=a,e.save=s,e.load=r,e.useColors=t,e.storage=i(),e.destroy=(()=>{let m=!1;return()=>{m||(m=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(m){if(m[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+m[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;m.splice(1,0,d,"color: inherit");let g=0,T=0;m[0].replace(/%[a-zA-Z%]/g,h=>{h!=="%%"&&(g++,h==="%c"&&(T=g))}),m.splice(T,0,d)}e.log=console.debug||console.log||(()=>{});function s(m){try{m?e.storage.setItem("debug",m):e.storage.removeItem("debug")}catch{}}function r(){let m;try{m=e.storage.getItem("debug")}catch{}return!m&&typeof G.process<"u"&&"env"in G.process&&(m=G.process.env.DEBUG),m}function i(){try{return localStorage}catch{}}n.exports=KI(e);const{formatters:l}=n.exports;l.j=function(m){try{return JSON.stringify(m)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(Ba,Ba.exports);var qo=Ba.exports;const JI=ko,XI=_o.EventEmitter,eS=Pt.inherits,Te=qo("avvio"),{AVV_ERR_READY_TIMEOUT:nS}=$o,ha=Symbol.for("plugin-meta");function tS(n,e){return n[ha]&&n[ha].name?n[ha].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:n.name?n.name:n.toString().split(`
|
|
29
|
-
`).slice(0,2).map(t=>t.trim()).join(" -- ")}function aS(){const n={};return n.promise=new Promise((e,t)=>{n.resolve=e,n.reject=t}),n}function zn(n,e,t,a,s){this.started=!1,this.func=e,this.opts=t,this.onFinish=null,this.parent=n,this.timeout=s===void 0?n._timeout:s,this.name=tS(e,t),this.isAfter=a,this.q=JI(n,sS,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}eS(zn,XI);zn.prototype.exec=function(n,e){const t=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){Te("skipping loading of plugin as parent errored and it is not an after",s),G.process.nextTick(e);return}if(this.isAfter)this.server=n;else try{this.server=this.parent.override(n,t,this.opts)}catch(m){return Te("override errored",s),e(m)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Te("exec",s);let r;const i=m=>{if(a){Te("loading complete",s);return}this._error=m,Te(m?"exec errored":"exec completed",s),a=!0,r&&clearTimeout(r),e(m)};this.timeout>0&&(Te("setting up timeout",s,this.timeout),r=setTimeout(function(){Te("timed out",s),r=null;const m=new nS(s);m.fn=t,i(m)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const l=t(this.server,this.opts,i);l&&typeof l.then=="function"&&(Te("exec: resolving promise",s),l.then(()=>G.process.nextTick(i),m=>G.process.nextTick(i,m)))};zn.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const n=()=>{this.server.after((t,a)=>{this._error=t,this.q.pause(),t?(Te("rejecting promise",this.name,t),this._promise.reject(t)):(Te("resolving promise",this.name),this._promise.resolve()),this._promise=null,G.process.nextTick(a,t)}),this.q.resume()};let e;return this._promise?e=Promise.resolve():(this._promise=aS(),e=this._promise.promise,this.server?n():this.on("start",n)),e};zn.prototype.enqueue=function(n,e){Te("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,e)};zn.prototype.finish=function(n,e){Te("finish",this.name,n);const t=()=>{this.loaded||(Te("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(n))};if(n){this._promise&&(this._promise.reject(n),this._promise=null),t();return}const a=()=>{if(Te("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{Te("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else t();else Te("delayed",this.name),this.q.drain=()=>{Te("drain",this.name),this.q.drain=rS,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function sS(n,e){const t=this;G.process.nextTick(ks.bind(t),n,e)}function ks(n,e){if(typeof n.func.then=="function"){n.func.then(a=>{typeof a.default=="function"&&(a=a.default),n.func=a,ks.call(this,n,e)},e);return}const t=this._current[0];this._current.unshift(n),n.exec(t&&t.server||this._server,a=>{n.finish(a,s=>{this._current.shift(),e(s)})})}function rS(){}hs.exports=zn;hs.exports.loadPlugin=ks;var iS=hs.exports;const ai=ko,oS=_o.EventEmitter,cS=Pt.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:ka,AVV_ERR_CALLBACK_NOT_FN:Wn,AVV_ERR_PLUGIN_NOT_VALID:lS,AVV_ERR_ROOT_PLG_BOOTED:uS,AVV_ERR_READY_TIMEOUT:mS}=$o,dS=WI,Qa=iS,Rn=qo("avvio"),St=Symbol("kAvvio"),Ma=Symbol("kThenifyDoNotWrap");function pS(n,e,t){const a=e.expose||{},s=a.use||"use",r=a.after||"after",i=a.ready||"ready",l=a.onClose||"onClose",m=a.close||"close";if(n[s])throw new ka(s);if(n[r])throw new ka(r);if(n[i])throw new ka(i);n[s]=function(d,g){return t.use(d,g),this},Object.defineProperty(n,"then",{get:Wo.bind(t)}),n[St]=!0,n[r]=function(d){return typeof d!="function"?t._loadRegistered():(t.after(Na(d,this)),this)},n[i]=function(d){if(d&&typeof d!="function")throw new Wn(i,typeof d);return t.ready(d?Na(d,this):void 0)},n[l]=function(d){if(typeof d!="function")throw new Wn(l,typeof d);return t.onClose(hS(d,this)),this},n[m]=function(d){if(d&&typeof d!="function")throw new Wn(m,typeof d);return d?(t.close(Na(d,this)),this):t.close()}}function ke(n,e,t){if(typeof n=="function"&&arguments.length===1&&(t=n,e={},n=null),typeof e=="function"&&(t=e,e={}),e=e||{},!(this instanceof ke)){const a=new ke(n,e,t);return n&&pS(n,e,a),a}e.autostart!==!1&&(e.autostart=!0),n=n||this,this._timeout=Number(e.timeout)||0,this._server=n,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),t&&this.once("start",t),this.started=!1,this.booted=!1,this.pluginTree=new dS,this._readyQ=ai(this,Ho,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=si},this._closeQ=ai(this,TS,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=si},this._doStart=null,this._root=new Qa(this,gS.bind(this),e,!1,0),this._root.once("start",(a,s,r)=>{const i=this.pluginTree.start(null,s,r);this._root.once("loaded",(l,m,d)=>{this.pluginTree.stop(i,d)})}),Qa.loadPlugin.call(this,this._root,a=>{Rn("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){a=a||this._error||s}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function gS(n,e,t){this._doStart=t,e.autostart&&this.start()}cS(ke,oS);ke.prototype.start=function(){return this.started=!0,G.process.nextTick(this._doStart),this};ke.prototype.override=function(n,e,t){return n};function yS(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new lS(typeof n);return n}ke.prototype[St]=!0;ke.prototype.use=function(n,e){return this._lastUsed=this._addPlugin(n,e,!1),this};ke.prototype._loadRegistered=function(){const n=this._current[0];return!this.started&&!this.booted&&G.process.nextTick(()=>this._root.q.resume()),n?n.loadedSoFar():Promise.resolve()};Object.defineProperty(ke.prototype,"then",{get:Wo});ke.prototype._addPlugin=function(n,e,t){if(n=yS(n),e=e||{},this.booted)throw new uS;const a=this._current[0],s=new Qa(this,n,e,t);if(s.once("start",(r,i,l)=>{const m=this.pluginTree.start(a.name,i,l);s.once("loaded",(d,g,T)=>{this.pluginTree.stop(m,T)})}),a.loaded)throw new Error(s.name,a.name);return a.enqueue(s,r=>{r&&(this._error=r)}),s};ke.prototype.after=function(n){if(!n)return this._loadRegistered();this._addPlugin(e.bind(this),{},!0);function e(t,a,s){Ho.call(this,n,s)}return this};ke.prototype.onClose=function(n){if(typeof n!="function")throw new Error("not a function");n[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(n,e.bind(this));function e(t){t&&(this._error=t)}return this};ke.prototype.close=function(n){let e;if(n){if(typeof n!="function")throw new Wn("close",typeof n)}else e=new Promise(function(t,a){n=function(s){if(s)return a(s);t()}});return this.ready(()=>{this._error=null,this._closeQ.push(n),G.process.nextTick(this._closeQ.resume.bind(this._closeQ))}),e};ke.prototype.ready=function(n){if(n){if(typeof n!="function")throw new Wn("ready",typeof n);this._readyQ.push(n),queueMicrotask(this.start.bind(this));return}return new Promise((e,t)=>{this._readyQ.push(s),this.start();const a=this._current[0].server;function s(r,i,l){r?t(r):e(a),G.process.nextTick(l)}})};ke.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};ke.prototype.toJSON=function(){return this.pluginTree.toJSON()};function si(){}function Wo(){if(this.booted){Rn("thenify returning null because we are already booted");return}if(this[Ma]){this[Ma]=!1;return}return Rn("thenify"),(n,e)=>this._loadRegistered().then(()=>(this[Ma]=!0,n(this._server)),e)}function Ho(n,e){const t=this._server,a=this._error;let s;if(this._error=null,n.length===0)this._error=a,s=n(),s&&!s[St]&&typeof s.then=="function"?s.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r)):G.process.nextTick(e);else if(n.length===1)s=n(a),s&&!s[St]&&typeof s.then=="function"?s.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r)):G.process.nextTick(e);else if(this._timeout===0){const r=i=>{this._error=i,e(this._error)};n.length===2?n(a,r):n(a,t,r)}else fS.call(this,n,a,t,e)}function fS(n,e,t,a){const s=n.name;Rn("setting up ready timeout",s,this._timeout);let r=setTimeout(()=>{Rn("timed out",s),r=null;const l=new mS(s);l.fn=n,this._error=l,a(l)},this._timeout);n.length===2?n(e,i.bind(this)):n(e,t,i.bind(this));function i(l){r&&(clearTimeout(r),this._error=l,a(this._error))}}function TS(n,e){const t=this._server,a=n[this._isOnCloseHandlerKey];if(n.length===0||n.length===1){let s;a?s=n(t):s=n(this._error),s&&typeof s.then=="function"?(Rn("resolving close/onClose promise"),s.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r))):G.process.nextTick(e)}else n.length===2?n(a?t:this._error,e):a?n(t,e):n(this._error,t,e)}function hS(n,e){return t.bind(e);function t(a,s){let r;n.length===0?(r=n(),r&&r.then?r.then(function(){G.process.nextTick(s)},s):G.process.nextTick(s)):n.length===1?(r=n(this),r&&r.then?r.then(function(){G.process.nextTick(s)},s):G.process.nextTick(s)):n(this,s)}}function Na(n,e){return t.bind(e);function t(a,s){let r;n?n.length===0?(r=n(),r&&r.then?r.then(function(){G.process.nextTick(s,a)},s):G.process.nextTick(s,a)):n.length===1?(r=n(a),r&&r.then?r.then(function(){G.process.nextTick(s)},s):G.process.nextTick(s)):n.length===2?n(a,s):n(a,this,s):G.process.nextTick(s)}}us.exports=ke;us.exports.express=function(n){return ke(n,{expose:{use:"load"}})};var kS=us.exports;const MS=tc(kS);function NS(n,e=!0){const t=e?"https://grpc-web.streamlayer.io:443":"https://grpc-web.next.streamlayer.io:443",a=MS(Object.create(null),{autostart:!1});return a.use(pN),a.use(Xh,{sdkKey:n,host:t}),a.use(tk),a.use(dN),a.use(Fk),a.use(Rk),a.after(async(s,r,i)=>{if(s)throw s;await r.sdk.initializeApp(),i()}),a.onClose(()=>{console.log("close")}),a}const Zo=(n,e,t)=>{const[a,s]=Q.useState(null);return Q.useEffect(()=>{let r=!1;if(!n)return console.error("streamlayer sdk key should be provided"),s(l=>(l!==null&&typeof l.disableApp=="function"&&l.disableApp(),null)),()=>{r=!0};const i=NS(n,t);if(e)for(const l of e)i.use(l);return i.ready().then(l=>{r||s(l.sdk)}).catch(l=>console.log(l)),()=>{r=!0,i.close(function(l){if(l)throw l})}},[n]),a};var Fa=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(Fa||{});const Ms=Q.createContext({status:0,sdk:null}),IS=({sdkKey:n,plugins:e,children:t,production:a=!0})=>{const s=Zo(n,e,a),r=Q.useMemo(()=>s?{sdk:s,status:2}:{status:1,sdk:null},[s]);return f.jsx(uN,{children:f.jsx(Ms.Provider,{value:r,children:t})})},SS=()=>{const{sdk:n}=Q.useContext(Ms);return n},AS=()=>{const{sdk:n,status:e}=Q.useContext(Ms);if(e===Fa.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return e===Fa.CONNECTED?f.jsx("div",{className:"StreamLayerSDK",children:"wait"}):n===null?f.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):f.jsx("div",{className:"StreamLayerSDK",children:f.jsx(cN,{sdk:n})})};exports.StreamLayerProvider=IS;exports.StreamLayerSDKReact=AS;exports.useStreamLayer=SS;exports.useStreamLayerApp=Zo;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("react"),U=require("react-phone-number-input"),Cs=require("react-auth-code-input"),$=require("@connectrpc/connect-web"),V=require("@connectrpc/connect"),B=require("@streamlayer/sl-eslib/users/users_connect"),ws=require("react-countdown-circle-timer"),u=require("@streamlayer/sdk-web-types"),S=require("@streamlayer/sdk-web-interfaces"),ks=require("@streamlayer/sdk-web-features"),K=require("@streamlayer/feature-gamification"),A=require("@nanostores/react"),ss=require("@streamlayer/sdk-web-notifications"),hs=require("@streamlayer/sdk-web"),k="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSIxMiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CiAgPHJlY3QgeD0iOC4yNSIgeT0iNyIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcpIiBmaWxsPSJ3aGl0ZSIvPgogIDxyZWN0IHg9IjciIHk9IjE1Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSA3IDE1Ljc1KSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==";function Qs(M){var n=Object.create(null);return function(i){return n[i]===void 0&&(n[i]=M(i)),n[i]}}var Us=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Y=Qs(function(M){return Us.test(M)||M.charCodeAt(0)===111&&M.charCodeAt(1)===110&&M.charCodeAt(2)<91}),Ys=function(){const n=Array.prototype.slice.call(arguments).filter(Boolean),i={},a=[];n.forEach(t=>{(t?t.split(" "):[]).forEach(c=>{if(c.startsWith("atm_")){const[,j]=c.split("_");i[j]=c}else a.push(c)})});const N=[];for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&N.push(i[t]);return N.push(...a),N.join(" ")},Ms=Ys,bs=M=>M.toUpperCase()===M,vs=M=>n=>M.indexOf(n)===-1,ds=(M,n)=>{const i={};return Object.keys(M).filter(vs(n)).forEach(a=>{i[a]=M[a]}),i};function fs(M,n,i){const a=ds(n,i);if(!M){const N=typeof Y=="function"?{default:Y}:Y;Object.keys(a).forEach(t=>{N.default(t)||delete a[t]})}return a}var Zs=(M,n)=>{if(production!=="production"){if(typeof M=="string"||typeof M=="number"&&isFinite(M))return;const i=typeof M=="object"?JSON.stringify(M):String(M);console.warn(`An interpolation evaluated to '${i}' in the component '${n}', which is probably a mistake. You should explicitly cast or transform the value to a string.`)}},Rs=0;function es(M){let n="";return production==="test"&&(n+=`mocked-styled-${Rs++}`,M&&M.__linaria&&M.__linaria.className&&(n+=` ${M.__linaria.className}`)),i=>{if(production!=="production"&&production!=="test"&&Array.isArray(i))throw new Error('Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup');const a=(t,l)=>{const{as:c=M,class:j=n}=t,I=i.propsAsIs===void 0?!(typeof c=="string"&&c.indexOf("-")===-1&&!bs(c[0])):i.propsAsIs,D=fs(I,t,["as","class"]);D.ref=l,D.className=i.atomic?Ms(i.class,D.className||j):Ms(D.className||j,i.class);const{vars:g}=i;if(g){const o={};for(const x in g){const d=g[x],T=d[0],E=d[1]||"",L=typeof T=="function"?T(t):T;Zs(L,i.name),o[`--${x}`]=`${L}${E}`}const p=D.style||{},z=Object.keys(p);z.length>0&&z.forEach(x=>{o[x]=p[x]}),D.style=o}return M.__linaria&&M!==c?(D.as=c,r.createElement(M,D)):r.createElement(c,D)},N=r.forwardRef?r.forwardRef(a):t=>{const l=ds(t,["innerRef"]);return a(l,t.innerRef)};return N.displayName=i.name,N.__linaria={className:i.class||n,extends:M},N}}var e=production!=="production"?new Proxy(es,{get(M,n){return M(n)}}):es;const Gs=e("div")({name:"o",class:"o15tsbse",propsAsIs:!1}),Ps=e("div")({name:"n",class:"nt3f14",propsAsIs:!1}),Ws=e("img")({name:"i",class:"ipxm0fg",propsAsIs:!1}),$s=e("div")({name:"r",class:"r1av6wfc",propsAsIs:!1}),Vs=e("div")({name:"d",class:"diaesti",propsAsIs:!1}),Bs=e("div")({name:"l",class:"l1o5a9ur",propsAsIs:!1}),Hs=e("div")({name:"a",class:"amqlo79",propsAsIs:!1}),_s=e("button")({name:"c",class:"caw2hnf",propsAsIs:!1}),Js=e("img")({name:"s",class:"s1x5olm7",propsAsIs:!1}),zs=({close:M,action:n,data:{color:i,icon:a,title:N}})=>{const t=r.useCallback(l=>{l.stopPropagation(),M==null||M()},[M]);return s.jsxs(Gs,{onClick:n,children:[s.jsx(Ps,{style:i?{backgroundColor:i}:{},children:a&&s.jsx(Ws,{alt:"in-app-icon",src:a})}),s.jsxs($s,{children:[s.jsx(Vs,{children:s.jsx(Bs,{id:"in-app-title",children:N||""})}),s.jsx(Hs,{children:s.jsx(_s,{onClick:t,children:s.jsx(Js,{alt:"close-in-app-icon",src:k})})})]})]})},qs=async(M,n)=>{const i=$.createGrpcWebTransport({baseUrl:M});return await V.createPromiseClient(B.Users,i).requestPassword({id:n}),!0},Fs=async(M,n)=>{const i=$.createGrpcWebTransport({baseUrl:M});return await V.createPromiseClient(B.Users,i).register({id:n}),!0},Xs=async(M,n,i)=>{var a;const N=$.createGrpcWebTransport({baseUrl:M}),t=await V.createPromiseClient(B.Users,N).login({id:n,password:i});return(a=t==null?void 0:t.meta)==null?void 0:a.jwt},b={BG_TRANSPARENT:"rgba(0,0,0, .8)",BG_TRANSPARENT_VOTE_CONTAINER:"rgba(10, 14, 19, 0.8)",BG_TRANSPARENT_ITEM:"rgba(0, 0, 0, 0.7)",BG_TRANSPARENT_ITEM_VOTE:"rgba(255, 255, 255, 0.1)",BG_TRANSPARENT_ITEM_SUCCESS:"rgba(0, 139, 251, 0.2)",BG_TRANSPARENT_ITEM_ERROR:"rgba(205, 37, 37, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS:"rgba(255, 255, 255, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS:"rgba(60, 139, 251, 0.5)",BG_TRANSPARENT_VOTE_PROGRESS_ERROR:"rgba(205, 37, 37, 0.5)",BG_TRANSPARENT_USER_CONTAINER:"rgba(255, 255, 255, 0.05)",BG_TRANSPARENT_ONBOARDING_INAPP:"rgba(138, 159, 182, 0.2)",BLUE_PRIMARY:"#1589EE",RED_PRIMARY:"#CD2525",RED_SECONDARY:"#EB5757",BLUE_QUESTION_ACTION_BTN:"#1589ee",WHITE:"#FFFFFF",GREY_1:"#909395",GREY_2:"#22262b",GREY_3:"#2d3135",GREY_4:"#53565a",GREY_PRIMARY_ONBOARDING_INAPP:"#B5B7B8",BLACK_1:"#161a1f",GREEN_1:"#F7B801",RED_1:"#A30000",RED_2:"#FF4170",GREY_PRIMARY:"#909395",DIVIDER_COLOR_PRIMARY:"#2d3135",DIVIDER_COLOR_SECONDARY:"#53565a",GREEN_PRIMARY_BTN:"#009B77"};const Ks=e("div")({name:"e",class:"eu0o537",propsAsIs:!1}),sM=[b.BLUE_PRIMARY,b.GREEN_1,b.RED_1],MM=[10,6,0],eM=30,iM=32,nM=4,aM=0,Ts=({isPlaying:M=!0,duration:n=eM,setTimeToExpire:i})=>{const a=({remainingTime:N})=>s.jsx(Ks,{style:{color:N?"inherit":void 0},children:N});return r.useEffect(()=>{i(!1)},[i]),s.jsx(ws.CountdownCircleTimer,{isPlaying:M,duration:n,colors:sM,colorsTime:MM,size:iM,strokeWidth:nM,trailStrokeWidth:aM,onComplete:()=>i(!0),children:a})};const NM=e("div")({name:"n",class:"nolkjyx",propsAsIs:!1}),is=e("form")({name:"r",class:"rkbcbla",propsAsIs:!1}),ns=e("div")({name:"i",class:"i91q48f",propsAsIs:!1}),v=e("div")({name:"e",class:"e1avizlc",propsAsIs:!1}),f=e("button")({name:"a",class:"a1dd1srp",propsAsIs:!1}),tM=e("div")({name:"p",class:"p1cxu25d",propsAsIs:!1}),cM=e("div")({name:"d",class:"dcbw5eg",propsAsIs:!1}),jM=({login:M,anonymousLogin:n,host:i})=>{const[a,N]=r.useState(""),[t,l]=r.useState(""),[c,j]=r.useState(""),I=async g=>{g.preventDefault();try{const o=a.replaceAll("+","");try{await qs(i,o)}catch{await Fs(i,o)}l(o)}catch(o){window.alert(o)}},D=async g=>{if(g.preventDefault(),t&&c)try{const o=await Xs(i,t,c);o&&M?await M(o):console.log("token",o)}catch(o){window.alert(o)}};return s.jsxs(NM,{children:[!t&&s.jsxs("div",{children:[s.jsxs(is,{onSubmit:I,children:[s.jsx(ns,{children:"Enter your phone number"}),s.jsx(v,{children:"Enter your phone up for number to log in or sign an account."}),s.jsx(tM,{children:s.jsx(U,{value:a,onChange:g=>N(`${g}`)})}),s.jsx(f,{disabled:!U.isValidPhoneNumber(a),type:"submit",children:"request code"})]}),n&&s.jsx(f,{style:{display:"block",margin:"auto"},onClick:n,children:"anonymous login"})]}),t&&s.jsxs(is,{onSubmit:D,children:[s.jsx(ns,{children:"Enter Verification Code"}),s.jsxs(v,{children:["Please enter the verification code ",s.jsx("br",{}),"sent to ",s.jsx("b",{children:U.formatPhoneNumberIntl(a)})]}),s.jsx(cM,{children:s.jsx(Cs,{autoFocus:!0,allowedCharacters:"numeric",length:4,onChange:j})}),s.jsx(f,{disabled:c.length!==4,type:"submit",children:"login"}),s.jsxs(v,{children:["Didn't get 59 the code? ",s.jsx("br",{}),"Resend Code in",s.jsx(Ts,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const IM=e("div")({name:"n",class:"n1je4bb3",propsAsIs:!1}),lM=e("div")({name:"e",class:"e1ho1z33",propsAsIs:!1}),DM=e("div")({name:"i",class:"i1pqse9a",propsAsIs:!1}),rM=e("div")({name:"r",class:"r1jmi063",propsAsIs:!1}),oM=e("div")({name:"c",class:"cid7qaa",propsAsIs:!1}),gM=e("img")({name:"s",class:"sazlt2u",propsAsIs:!1}),uM=e("img")({name:"l",class:"lf9jsyg",propsAsIs:!1}),AM=e("button")({name:"d",class:"d1v56r0e",propsAsIs:!1}),dM=e("img")({name:"p",class:"p6u3piq",propsAsIs:!1}),zM=e("button")({name:"a",class:"atlrttm",propsAsIs:!1});const TM=e("div")({name:"i",class:"i1lwpjx9",propsAsIs:!1}),xM=e("div")({name:"n",class:"nbrbjcu",propsAsIs:!1}),yM=e("img")({name:"o",class:"o1qeiyar",propsAsIs:!1}),pM=e("div")({name:"d",class:"d1y0npbt",propsAsIs:!1}),LM=({graphic:M,headline:n})=>s.jsx(TM,{children:s.jsxs(xM,{children:[s.jsx(yM,{alt:"graphic-img-instructions",src:M}),s.jsx(pM,{children:n})]})});const OM=e("div")({name:"t",class:"tu393dl",propsAsIs:!1}),EM=e("div")({name:"o",class:"odp4fk9",propsAsIs:!1}),mM=e("div")({name:"r",class:"r1xmzn4o",propsAsIs:!1}),SM=e("div")({name:"n",class:"npkb5n",propsAsIs:!1}),CM=e("div")({name:"d",class:"dbaytgh",propsAsIs:!1}),wM=e("div")({name:"l",class:"lqfr6h0",propsAsIs:!1}),kM=({rules:M,rulesTitle:n,primaryColor:i})=>s.jsxs(OM,{children:[s.jsx(EM,{children:n}),s.jsx(mM,{children:M==null?void 0:M.map((a,N)=>s.jsxs(SM,{children:[s.jsx(CM,{style:{backgroundColor:i},children:N+1}),s.jsx(wM,{children:a})]},N))})]});const hM=e("div")({name:"e",class:"e1pvmnhl",propsAsIs:!1}),QM=e("div")({name:"o",class:"ohf3g1n",propsAsIs:!1}),UM=e("div")({name:"i",class:"i1u1cy17",propsAsIs:!1}),YM=e("img")({name:"r",class:"r7mtzbj",propsAsIs:!1}),bM=e("div")({name:"c",class:"ctlxnkz",propsAsIs:!1}),vM=e("div")({name:"a",class:"a2mti7z",propsAsIs:!1}),fM=e("button")({name:"p",class:"p1g6gnag",propsAsIs:!1}),ZM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD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=>s.jsx(hM,{children:s.jsxs(QM,{children:[s.jsx(UM,{style:{backgroundColor:i},children:s.jsx(YM,{alt:"invite-game-icon",src:ZM})}),s.jsx(bM,{children:M||""}),s.jsx(vM,{children:n||""}),s.jsx(fM,{onClick:()=>{},style:{backgroundColor:i},children:"Invite friends!"})]})}),m={steps:!1,rules:!1,inviteCard:!1},GM=({gamification:M,closeFeature:n,steps:i,gameIcon:a,sponsorLogo:N,rules:t,rulesBtnLabel:l,rulesTitle:c,primaryColor:j,inviteCardTitle:I,inviteCardSubtext:D,inviteCardBtnLabel:g})=>{const o=async()=>{await M.submitInplay()},p=()=>{n()},[z,x]=r.useState(0),[d,T]=r.useState(m);r.useEffect(()=>{i!=null&&i.length?T({...m,steps:!0}):t!=null&&t.length?T({...m,rules:!0}):T({...m,inviteCard:!0})},[]);const E=r.useCallback(()=>{i!=null&&i.length&&z<i.length-1?x(L=>++L):t!=null&&t.length&&d.steps?T({...m,rules:!0}):d.rules&&T({...m,inviteCard:!0})},[z,i==null?void 0:i.length,t==null?void 0:t.length,d,x,T]);return s.jsxs(IM,{children:[s.jsxs(DM,{children:[s.jsx(rM,{children:a&&s.jsx(gM,{alt:"sponsor-one-onboarding-icon",src:a})}),s.jsxs(oM,{children:[N&&s.jsx(uM,{alt:"sponsor-two-onboarding-icon",src:N}),s.jsx(AM,{onClick:p,children:s.jsx(dM,{alt:"icon-close-onboarding",src:k})})]})]}),s.jsxs(lM,{children:[d.steps&&(i==null?void 0:i.length)&&s.jsx(LM,{graphic:i[z].graphic,headline:i[z].headline}),d.rules&&s.jsx(kM,{rules:t,rulesTitle:c,primaryColor:j}),d.inviteCard&&s.jsx(RM,{inviteCardTitle:I,inviteCardSubtext:D,primaryColor:j})]}),s.jsx(zM,{onClick:d.inviteCard?o:E,children:d.rules?l||"Got it!":d.inviteCard?g||"Play now!":"Next"})]})},G="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgM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gOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const PM=e("div")({name:"t",class:"t17nz8ux",propsAsIs:!1}),WM=e("div")({name:"n",class:"n1u54wlf",propsAsIs:!1}),$M=e("img")({name:"r",class:"rojjpd",propsAsIs:!1}),VM=e("div")({name:"i",class:"ida2tpm",propsAsIs:!1}),BM=e("div")({name:"p",class:"pay8wzv",propsAsIs:!1}),HM=e("div")({name:"s",class:"s1xmex89",propsAsIs:!1}),_M=e("button")({name:"a",class:"a1ksbvx7",propsAsIs:!1}),JM=e("button")({name:"c",class:"c132s999",propsAsIs:!1}),qM=e("img")({name:"d",class:"dfhamq6",propsAsIs:!1}),FM=e("span")({name:"l",class:"l1o13i2d",propsAsIs:!1}),XM=e("span")({name:"x",class:"xtuia28",propsAsIs:!1}),KM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMTQuODA2MSA2LjczNj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SZWN0YW5nbGUgMzY5IiB4PSIwLjMzMzAwOCIgeT0iMTIuMTcyOSIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwLjMzMzAwOCAxMi4xNzI5KSIgZmlsbD0iIzllMGExZiIvPgo8L2c+Cjwvc3ZnPgo=",ne={[u.QuestionType.POLL]:{label:"Poll",icon:KM},[u.QuestionType.TRIVIA]:{label:"Trivia",icon:Me},[u.QuestionType.PREDICTION]:{label:"Prediction",icon:se}},ae={[u.PickHistoryStatus.LOST]:ie,[u.PickHistoryStatus.WON]:ee,[u.PickHistoryStatus.UNSET]:G,[u.PickHistoryStatus.DNP]:G},Ne=({questionId:M,questionType:n,questionStatus:i,subject:a,openForVoting:N,openQuestion:t,status:l})=>{const c=ne[n];return c===void 0?null:s.jsxs(PM,{onClick:()=>t==null?void 0:t(M),children:[s.jsx(WM,{children:s.jsx($M,{alt:"question-type-icon",src:c.icon})}),s.jsxs(VM,{children:[s.jsxs(BM,{children:[s.jsx(FM,{children:c.label}),n===u.QuestionType.TRIVIA&&i===u.QuestionStatus.RESOLVED&&s.jsx(XM,{children:"Expired"})]}),s.jsx(HM,{children:a||""})]}),N?s.jsx(_M,{children:"play"}):s.jsx(JM,{children:s.jsx(qM,{alt:"question-status-icon",src:ae[l]})})]})};const te=e("div")({name:"e",class:"e8ssf75",propsAsIs:!1}),ce=e("div")({name:"i",class:"ipfzbv9",propsAsIs:!1}),je=e("div")({name:"r",class:"r1wvrsap",propsAsIs:!1}),Ie=({questions:M,openQuestion:n})=>s.jsxs(te,{children:[s.jsx(ce,{children:"PICK HISTORY"}),s.jsx(je,{children:M==null?void 0:M.map(i=>s.jsx(Ne,{openQuestion:n,...i},i.questionId))})]}),le=M=>M.split(/\s+/).map(n=>n[0]).join("").toUpperCase();const De=e("div")({name:"o",class:"olehocs",propsAsIs:!1}),re=e("div")({name:"i",class:"i1ver9dm",propsAsIs:!1}),w=({indicator:M,title:n})=>s.jsxs(De,{children:[s.jsx(re,{children:M}),s.jsx("p",{children:n})]});const oe=e("div")({name:"t",class:"t1n0sowz",propsAsIs:!1}),ge=e("div")({name:"i",class:"i18zsacc",propsAsIs:!1}),ue=e("div")({name:"n",class:"n3vg8dl",propsAsIs:!1}),as=({indicator:M,title:n})=>s.jsxs(oe,{children:[s.jsx(ge,{children:n}),s.jsx(ue,{children:M})]});const Ae=e("div")({name:"t",class:"t1chikdb",propsAsIs:!1}),de=e("div")({name:"r",class:"r1t2n40g",propsAsIs:!1}),ze=e("div")({name:"i",class:"i13uvrfl",propsAsIs:!1}),Te=e("div")({name:"n",class:"nrgqxd7",propsAsIs:!1}),xe=e("img")({name:"a",class:"a15kmvxx",propsAsIs:!1}),ye=e("div")({name:"p",class:"p1djxvq6",propsAsIs:!1}),pe=e("div")({name:"s",class:"stqrriy",propsAsIs:!1}),Le=e("div")({name:"d",class:"drbrssi",propsAsIs:!1}),Oe=e("img")({name:"c",class:"c9zww1n",propsAsIs:!1}),Ee=e("div")({name:"l",class:"ld1dtas",propsAsIs:!1}),me=e("div")({name:"x",class:"x1lwz1r2",propsAsIs:!1}),Se=e("div")({name:"f",class:"f1oj6tf9",propsAsIs:!1}),Ce=e("div")({name:"g",class:"g2lq4wu",propsAsIs:!1}),we=e("div")({name:"h",class:"hszuw0i",propsAsIs:!1}),ke=e("button")({name:"m",class:"mk0d3zr",propsAsIs:!1}),he="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2I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Ny41MjQwNCA5LjkxNjY3IDcuMjg5NjYgOS44MjgzNCA3LjE0MzAzIDkuNjUxNjlDNi45OTYzOSA5LjQ3NTA0IDYuOTIzMDggOS4yNTc4MSA2LjkyMzA4IDlDNi45MjMwOCA4Ljc1NjUxIDYuOTU3OTMgOC41NDI4NiA3LjAyNzY0IDguMzU5MDVDNy4wOTczNiA4LjE3NTI0IDcuMjIzNTYgOC4wMDIxNyA3LjQwNjI1IDcuODM5ODRDNy42NjEwNiA3LjY0NDEgNy44ODk0MiA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",Qe=({avatar:M,name:n,points:i,grade:a,friendsRank:N,globalRank:t,winStreak:l,correct:c,incorrect:j,successRate:I})=>s.jsxs(Ae,{children:[s.jsxs(de,{children:[s.jsxs(Te,{children:[s.jsxs(ke,{children:[M&&s.jsx(xe,{alt:"avatar",src:M}),!M&&s.jsx(we,{children:le(n)})]}),s.jsxs(ye,{children:[s.jsx(pe,{children:n}),s.jsxs(Le,{children:[s.jsx(Oe,{alt:"rank-icon",src:he}),s.jsxs(Ee,{children:[s.jsx(me,{children:i||"-"}),"RTS"]}),s.jsxs(Se,{children:["TOP ",a,"%"]})]})]})]}),s.jsxs(Ce,{children:[s.jsx(as,{title:"Friends rank",indicator:N||"-"}),s.jsx(as,{title:"Global rank",indicator:t||"-"})]})]}),s.jsxs(ze,{children:[s.jsx(w,{indicator:l||"-",title:"Win streak"}),s.jsx(w,{indicator:c||"-",title:"Correct"}),s.jsx(w,{indicator:j||"-",title:"Incorrect"}),s.jsx(w,{indicator:`${I||"-"}%`,title:"Success rate"})]})]});const Ue=()=>xs,xs=e("div")({name:"o",class:"ot0wn45",propsAsIs:!1}),Ye=e(Ue())({name:"t",class:"t1n3ztor",propsAsIs:!0}),Ns=e("div")({name:"i",class:"iliq035",propsAsIs:!1}),ts=e("button")({name:"n",class:"nltylrn",propsAsIs:!1}),cs=e("img")({name:"a",class:"all3dh1",propsAsIs:!1}),js=e("span")({name:"d",class:"d34nlc9",propsAsIs:!1}),Is=e("span")({name:"s",class:"s1n6buvc",propsAsIs:!1}),ls=e("div")({name:"c",class:"cl0bp16",propsAsIs:!1}),Z=e("div")({name:"l",class:"luzmbpx",propsAsIs:!1}),Ds=e("img")({name:"p",class:"p93opx7",propsAsIs:!1}),P="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4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i4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K",be=({icon:M,id:n,title:i,questionId:a,disabled:N,percentage:t,onVote:l,toggleIsLoadingSubmitAnswer:c,correct:j,questionAnswered:I,hasCorrectAnswer:D,answered:g,points:o,questionType:p})=>{var z;return I&&g?s.jsxs(Ye,{"data-answeredCorrect":(z=!D||j)==null?void 0:z.toString(),"data-questionAnswered":"false",children:[s.jsx(Ns,{style:{width:`${t}%`}}),s.jsxs(ts,{disabled:N,onClick:()=>l(a,n),children:[M&&s.jsx(cs,{alt:"option-icon",src:M}),s.jsx(js,{children:i}),s.jsxs(Is,{children:[D&&j&&s.jsx(ls,{children:s.jsx(Ds,{alt:"icon-correct",src:g?rs:P})}),s.jsxs(Z,{children:[t,"%"]})]})]})]}):s.jsxs(xs,{"data-questionAnswered":I==null?void 0:I.toString(),children:[I&&s.jsx(Ns,{style:{width:`${t}%`}}),s.jsxs(ts,{disabled:N,onClick:()=>{c(!0),l(a,n)},children:[M&&s.jsx(cs,{alt:"option-icon",src:M}),s.jsx(js,{children:i}),I?s.jsxs(Is,{children:[D&&j&&s.jsx(ls,{children:s.jsx(Ds,{alt:"icon-correct",src:g?rs:P})}),s.jsxs(Z,{children:[t,"%"]})]}):p===u.QuestionType.PREDICTION?s.jsxs(Z,{children:[o," pts"]}):null]})]})};const ve=e("div")({name:"e",class:"eeu5got",propsAsIs:!1}),fe=e("div")({name:"o",class:"o1g94fci",propsAsIs:!1}),Ze=e("div")({name:"n",class:"nbe6jrz",propsAsIs:!1}),Re=e("div")({name:"a",class:"a2w5dgc",propsAsIs:!1}),Ge=e("div")({name:"l",class:"l66v9pt",propsAsIs:!1}),Pe=e("img")({name:"r",class:"rtvplqt",propsAsIs:!1}),We=e("div")({name:"d",class:"d1oe5bin",propsAsIs:!1}),$e=e("div")({name:"p",class:"p17r7g01",propsAsIs:!1}),Ve="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Be=({title:M,questionId:n,options:i,questionAnswered:a,feedbackMessages:N,questionAnsweredCorrectly:t,questionType:l})=>{const[c,j]=r.useState(!1),I=r.useCallback(D=>{j(D)},[j]);return r.useEffect(()=>{I(!1)},[i,I]),s.jsxs(ve,{children:[s.jsx(fe,{children:M}),s.jsxs(Ze,{children:[c&&s.jsx(Re,{children:"Loading..."}),i.map(D=>s.jsx(be,{toggleIsLoadingSubmitAnswer:I,questionId:n,questionType:l,...D},D.id))]}),a&&l===u.QuestionType.TRIVIA&&s.jsxs(Ge,{children:[s.jsx(Pe,{alt:"reaction-to-answer",src:t?P:Ve}),s.jsxs("div",{children:[s.jsx(We,{children:t?N.correctFeedback.title:N.incorrectFeedback.title}),s.jsx($e,{children:t?N.correctFeedback.description:N.incorrectFeedback.description})]})]})]})};const He=e("div")({name:"n",class:"n1j6bvz0",propsAsIs:!1}),_e=e("div")({name:"r",class:"r14txpvi",propsAsIs:!1}),Je=e("img")({name:"e",class:"e1hr8b9s",propsAsIs:!1}),qe=e("div")({name:"i",class:"i1c85wdw",propsAsIs:!1}),Fe=e("img")({name:"p",class:"ps7esga",propsAsIs:!1}),Xe=e("span")({name:"a",class:"au4baxs",propsAsIs:!1}),Ke=e("div")({name:"s",class:"sx3tnpk",propsAsIs:!1}),si=e("div")({name:"c",class:"c9c2rl4",propsAsIs:!1}),Mi=e("button")({name:"d",class:"dbqlu2a",propsAsIs:!1}),ei=e("button")({name:"x",class:"x1od79lg",propsAsIs:!1}),ii=e("img")({name:"g",class:"g26vzgn",propsAsIs:!1}),ni="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=",ai=({close:M,action:n,data:{icon:i,header:a,title:N,subtitle:t,graphicBg:l,sponsorLogo:c}})=>s.jsxs(He,{children:[s.jsx(ei,{onClick:M,children:s.jsx(ii,{alt:"icon-close-onboarding-inapp",src:ni})}),s.jsx(_e,{style:{backgroundImage:`url(${l||""})`},children:i&&s.jsx(Je,{alt:"onboarding-inapp-icon",src:i})}),s.jsxs(qe,{children:[s.jsxs("div",{children:[s.jsx("div",{children:c?s.jsxs(s.Fragment,{children:[s.jsx(Fe,{alt:"sponsor-logo",src:c}),s.jsx(Xe,{children:"Presents"})]}):a||""}),s.jsx(Ke,{children:N||""}),s.jsx(si,{children:t||""})]}),s.jsx(Mi,{onClick:n,children:"Play"})]})]});const Ni=e("div")({name:"r",class:"r1tdfv96",propsAsIs:!1}),ti={[ss.NotificationType.ONBOARDING]:ai,[ss.NotificationType.QUESTION]:zs},ci=({index:M,total:n,...i})=>{const a=r.useRef(null),N=ti[i.type]||zs;return r.useEffect(()=>{a.current!==null&&i.hiding&&a.current.animate([{right:"0"},{right:"-100%"}],{duration:300,fill:"forwards"})},[i.hiding]),s.jsx(Ni,{ref:a,style:{zIndex:M+1,transform:`translateY(${100*(n-M-1)}%)`},children:s.jsx(N,{...i})})};const ji=e("div")({name:"o",class:"o1idr02j",propsAsIs:!1}),Ii=({notificationsStore:M})=>{const n=A.useStore(M);return s.jsx(ji,{children:n==null?void 0:n.map((i,a)=>s.jsx(ci,{index:a,total:n.length,...i},i.id))})},li=({store:M})=>{var n;const{data:i}=A.useStore(M);return i!=null&&i.summary?s.jsx(Qe,{avatar:i.summary.avatar,name:i.summary.name,points:i.summary.points,grade:"0",friendsRank:i.summary.friendsRank,globalRank:i.summary.rank,winStreak:i.summary.streak,correct:i.summary.correct,incorrect:i.summary.incorrect,successRate:(n=i.percentage)==null?void 0:n.average}):s.jsx("div",{children:"wait user..."})},Di=({store:M,openQuestion:n})=>{const i=A.useStore(M);return i!=null&&i.data?s.jsx(Ie,{openQuestion:n,questions:i.data}):s.jsx("div",{children:"wait questions..."})};const ri=()=>M=>M.isSuccess?"#f1be1c":"#da3732",oi=e("div")({name:"n",class:"n1fxw72m",propsAsIs:!1}),gi=e("img")({name:"o",class:"on9bd3u",propsAsIs:!1}),ui=e("div")({name:"r",class:"re3sowz",propsAsIs:!1}),Ai=e("button")({name:"c",class:"cbcx8j1",propsAsIs:!1}),di=e("img")({name:"d",class:"ds0zw96",propsAsIs:!1}),zi=e("div")({name:"p",class:"peenmin",propsAsIs:!1}),os=e("div")({name:"a",class:"a146wqa9",propsAsIs:!1,vars:{"a146wqa9-0":[ri()]}}),gs=e("img")({name:"s",class:"syetqu",propsAsIs:!1});const Ti=e("div")({name:"n",class:"nt57dfc",propsAsIs:!1}),xi=e("div")({name:"e",class:"ey71yx3",propsAsIs:!1}),yi=e("div")({name:"o",class:"oglry7w",propsAsIs:!1}),pi=e("span")({name:"l",class:"l1ixs497",propsAsIs:!1}),Li=e("span")({name:"r",class:"ruurm0v",propsAsIs:!1}),R=({points:M})=>s.jsxs(Ti,{children:[s.jsx(xi,{children:"YOU WON"}),s.jsxs(yi,{children:[s.jsx(pi,{children:M}),s.jsx(Li,{children:"PTS"})]})]}),Oi="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGw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IDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=",mi=({logo:M,points:n,questionAnswered:i,questionAnsweredCorrectly:a,questionType:N,closeQuestion:t,setTimeToExpire:l})=>{const c=!i&&N!==u.QuestionType.PREDICTION,j=i&&N===u.QuestionType.TRIVIA,I=j&&a,D=j&&!a,g=i&&N===u.QuestionType.PREDICTION;return s.jsxs(oi,{children:[s.jsxs(ui,{children:[s.jsxs(zi,{children:[c&&s.jsx(Ts,{setTimeToExpire:l}),I&&s.jsxs(s.Fragment,{children:[s.jsx(R,{points:n}),s.jsx(os,{isSuccess:!0,children:s.jsx(gs,{alt:"reaction-icon",src:Oi})})]}),D&&s.jsxs(s.Fragment,{children:[s.jsx(R,{points:0}),s.jsx(os,{isSuccess:!1,children:s.jsx(gs,{alt:"reaction-icon",src:Ei})})]}),g&&s.jsx(R,{points:n})]}),s.jsx(Ai,{onClick:t,children:s.jsx(di,{alt:"exit-icon",src:k})})]}),M&&s.jsx(gi,{src:M})]})};const Si="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5Lj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TAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==",Ci=e("div")({name:"w",class:"w1rk8z17",propsAsIs:!1}),wi=({openedQuestion:M,closeQuestion:n,vote:i})=>{var a;const[N,t]=r.useState(!1),l=r.useCallback(I=>{t(I)},[t]),c=r.useMemo(()=>M==null?void 0:M.answers.find(I=>I.youVoted===!0),[M]),j=r.useMemo(()=>!!(M!=null&&M.answers.find(I=>I.correct===!0)),[M]);return M?s.jsx(Ci,{children:s.jsxs("div",{children:[s.jsx(mi,{points:(c==null?void 0:c.points)||0,questionAnswered:!!c,questionAnsweredCorrectly:c==null?void 0:c.correct,logo:Si,closeQuestion:n,setTimeToExpire:l,questionType:M.type}),s.jsx("div",{children:s.jsx(Be,{title:M.subject,feedbackMessages:(a=M.options)==null?void 0:a.options.value,questionType:M.type,questionId:M.id,questionAnswered:!!c,questionAnsweredCorrectly:c==null?void 0:c.correct,options:M.answers.map(I=>({id:I.id,title:I.text,icon:I.icon,type:M.type,correct:I.correct,percentage:I.percentage,answered:I.youVoted,disabled:!!c||M.marketClosed||N,questionAnswered:!!c,hasCorrectAnswer:j,points:I.points,onVote:i}))})})]})}):null};const ki=e("div")({name:"e",class:"eedzx0f",propsAsIs:!1}),hi=e("div")({name:"o",class:"o10jx8gg",propsAsIs:!1}),Qi=e("div")({name:"n",class:"n1fzu0h9",propsAsIs:!1}),Ui=e("img")({name:"r",class:"r1s6khgr",propsAsIs:!1}),Yi=e("img")({name:"l",class:"luvepij",propsAsIs:!1}),bi=e("img")({name:"s",class:"shqj61j",propsAsIs:!1}),vi=e("div")({name:"p",class:"pnpvkmh",propsAsIs:!1}),fi=e("img")({name:"a",class:"acyca7o",propsAsIs:!1});const Zi=e("div")({name:"e",class:"e84mc5e",propsAsIs:!1}),Ri=e("div")({name:"t",class:"t1thn6vl",propsAsIs:!1});const Gi=e("div")({name:"o",class:"o2stbtz",propsAsIs:!1}),us=e("button")({name:"n",class:"nzjdttj",propsAsIs:!1}),Pi=e("img")({name:"r",class:"r1182zem",propsAsIs:!1});const Wi=e("div")({name:"t",class:"tp9a9yw",propsAsIs:!1}),$i=e("img")({name:"e",class:"e6f0nxr",propsAsIs:!1}),Vi=e("div")({name:"n",class:"n3f26h",propsAsIs:!1}),Bi=e("div")({name:"r",class:"r9zbwh8",propsAsIs:!1}),Hi=e("div")({name:"d",class:"dvhlsdp",propsAsIs:!1}),_i=e("a")({name:"c",class:"c9m83to",propsAsIs:!1}),Ji=e("img")({name:"l",class:"l2itzu1",propsAsIs:!1});const O=e("div")({name:"e",class:"e1qdkuad",propsAsIs:!1}),qi=e("div")({name:"i",class:"i1xpziqe",propsAsIs:!1}),Fi=e("div")({name:"r",class:"r1yl384u",propsAsIs:!1}),Xi=e("div")({name:"n",class:"n1q9p5hx",propsAsIs:!1}),As=e("button")({name:"a",class:"ark1jkg",propsAsIs:!1}),Ki=({gamification:M,sdk:n})=>{var i,a,N,t,l,c,j,I,D,g,o,p,z,x,d,T,E,L,H,_,J,q,F;const ps=A.useStore(M.status),Ls=A.useStore(M.onboardingStatus),X=A.useStore(M.openedQuestion),{slStreamId:C}=A.useStore(n.sdkStore),y=A.useStore(M.featureSettings);if(ps!==S.FeatureStatus.Ready)return s.jsx("div",{children:"wait..."});if(C!=null&&C.loading)return s.jsx(O,{children:s.jsx("div",{children:"Event is loading"})});if(!(C!=null&&C.data))return s.jsx(O,{children:s.jsx("div",{children:"Event is forbidden"})});if(!Ls)return s.jsx(O,{children:s.jsx(GM,{closeFeature:n.closeFeature,gamification:M,steps:(a=(i=y.inplayGame)==null?void 0:i.onboarding)==null?void 0:a.steps,gameIcon:(l=(t=(N=y.inplayGame)==null?void 0:N.overview)==null?void 0:t.media)==null?void 0:l.gameIcon,sponsorLogo:(I=(j=(c=y.inplayGame)==null?void 0:c.overview)==null?void 0:j.media)==null?void 0:I.sponsorLogo,rules:(g=(D=y.inplayGame)==null?void 0:D.rules)==null?void 0:g.rules,rulesBtnLabel:(p=(o=y.inplayGame)==null?void 0:o.rules)==null?void 0:p.buttonLabel,rulesTitle:(x=(z=y.inplayGame)==null?void 0:z.rules)==null?void 0:x.heading,primaryColor:(E=(T=(d=y.inplayGame)==null?void 0:d.overview)==null?void 0:T.appearance)==null?void 0:E.primaryColor,inviteCardTitle:(H=(L=y.inplayGame)==null?void 0:L.inviteCard)==null?void 0:H.heading,inviteCardSubtext:(J=(_=y.inplayGame)==null?void 0:_.inviteCard)==null?void 0:J.subtext,inviteCardBtnLabel:(F=(q=y.inplayGame)==null?void 0:q.inviteCard)==null?void 0:F.buttonLabel})});const Os=Q=>{M.openQuestion(Q)},Es=()=>{M.closeQuestion()},ms=(Q,Ss)=>{M.submitAnswer(Q,Ss)};return s.jsxs(O,{children:[s.jsx(qi,{children:M.userSummary&&s.jsx(li,{store:M.userSummary.getStore()})}),s.jsxs(Fi,{children:[M.questions&&s.jsx(Di,{openQuestion:Os,store:M.questions.getStore()}),X&&s.jsx(wi,{closeQuestion:Es,vote:ms,openedQuestion:X})]})]})},sn=(M,n)=>{switch(M){case u.QuestionImages.ROUNDED:return s.jsx(Yi,{alt:"insight-icon",src:n});case u.QuestionImages.TRANSPARENT:return s.jsx(bi,{alt:"insight-icon",src:n});case u.QuestionImages.CENTERED:return s.jsx(Ui,{alt:"insight-icon",src:n});default:return null}},Mn=({title:M,image:n,questionId:i,imageMode:a,openInsight:N})=>s.jsxs(ki,{onClick:()=>N(i),children:[s.jsx(Qi,{children:n&&sn(a,n)}),s.jsxs(hi,{children:[s.jsx(vi,{children:M||""}),s.jsx(fi,{alt:"next-icon",src:G})]})]}),en=({insights:M,openInsight:n})=>s.jsx(Zi,{children:s.jsx(Ri,{children:M==null?void 0:M.map(i=>s.jsx(Mn,{openInsight:n,...i},i.questionId))})}),nn=({highlights:M,store:n})=>{const{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MSAxMS4yMjI1IDYuMTU4NTMgMTEuMzY0NCA2LjA5NTg2IDExLjUxMzRDNi4wMzMxOCAxMS42NjI1IDYuMDAxMjMgMTEuODI0NCA2IDExLjk5OVoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==",Nn=({icon:M,comeBack:n,close:i})=>s.jsxs(Gi,{children:[s.jsxs("div",{children:[n&&s.jsx(us,{onClick:n,children:s.jsx("img",{alt:"header-back-icon",src:an})}),M&&s.jsx(Pi,{alt:"header-icon",src:M})]}),s.jsx("div",{children:i&&s.jsx(us,{onClick:i,children:s.jsx("img",{alt:"header-close-icon",src:k})})})]}),tn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=",cn=({image:M,title:n,description:i,webLinkLabel:a,webLink:N,closeHighlights:t,closeInsight:l})=>s.jsxs(Wi,{children:[s.jsx(Nn,{close:t,comeBack:l}),M&&s.jsx($i,{alt:"detail-insight-image",src:M}),s.jsxs(Vi,{children:[n&&s.jsx(Bi,{children:n}),i&&s.jsx(Hi,{children:i})]}),N&&a&&s.jsxs(_i,{href:N,target:"_blank",children:[a,s.jsx(Ji,{alt:"link-icon",src:tn})]})]}),jn=({openedInsight:M,closeHighlights:n,closeInsight:i})=>{var a,N,t,l,c;const j=((a=M.options)==null?void 0:a.options.case)==="factoid"?{image:M.options.options.value.image,body:M.options.options.value.body,webLink:(N=M.options.options.value.webLink)==null?void 0:N.url,webLinkLabel:(t=M.options.options.value.webLink)==null?void 0:t.label}:{},I=M.subject||((l=M.notification)==null?void 0:l.title),D=j.body||((c=M.notification)==null?void 0:c.body);return s.jsx(cn,{image:j.image,title:I,description:D,webLink:j.webLink,webLinkLabel:j.webLinkLabel,closeInsight:i,closeHighlights:n})},In=({highlights:M,sdk:n})=>{const i=A.useStore(M.status),a=A.useStore(M.openedInsight),{slStreamId:N}=A.useStore(n.sdkStore);return i!==S.FeatureStatus.Ready?s.jsx("div",{children:"wait..."}):N!=null&&N.loading?s.jsx(O,{children:s.jsx("div",{children:"Event is loading"})}):N!=null&&N.data?M.insights===void 0?s.jsx("div",{children:"wait insights..."}):s.jsxs(O,{children:[!a&&s.jsx(nn,{highlights:M,store:M.insights.getStore()}),a&&s.jsx(jn,{openedInsight:a,closeHighlights:M.closeFeature,closeInsight:M.closeHighlight})]}):s.jsx(O,{children:s.jsx("div",{children:"Event is forbidden"})})},ln=({sdk:M})=>s.jsx(jM,{login:async n=>{try{await M.authorizationBypass("streamlayer:streamlayer",n)}catch(i){throw console.log("login err",i),i}},anonymousLogin:M.anonymousAuthorization,host:M.host}),Dn=({activeFeature:M,sdk:n})=>{const[i,a]=r.useState(null),{organizationSettings:N,streamSettings:t}=A.useStore(n.sdkStore),l=r.useMemo(()=>{const j=(t==null?void 0:t.data)||(N==null?void 0:N.data);return j!=null&&j.overlays?j.overlays:[]},[N,t]);r.useEffect(()=>{const j=n.getFeatures();if(M)for(const[I,D]of j)I===M?D.status.get()===S.FeatureStatus.Suspended&&(D.enable(),a(D)):D.status.get()===S.FeatureStatus.Ready&&D.disable();else{for(const[,I]of j)I.status.get()===S.FeatureStatus.Ready&&I.disable();a(null)}return()=>{for(const[,I]of j)I.status.get()===S.FeatureStatus.Ready&&I.disable()}},[M,n]);const c=r.useMemo(()=>i instanceof K.Gamification?i?s.jsx("div",{children:s.jsx(Ki,{gamification:i,sdk:n})}):s.jsx("div",{children:"wait gamification..."}):i instanceof K.Highlights?i?s.jsx("div",{children:s.jsx(In,{highlights:i,sdk:n})}):s.jsx("div",{children:"wait highlights..."}):null,[n,i]);return s.jsxs("div",{children:[s.jsxs(Xi,{children:[s.jsx(As,{onClick:()=>n.logout(),children:"logout"}),l.map(j=>s.jsxs(As,{onClick:()=>n.openFeature(j.type),disabled:!(j.type in ks.AvailableFeatures),"data-enableSdkButton":j.enableSdkButton.toString(),"data-selected":j.type===M,children:[s.jsx("img",{src:j.icon,alt:""}),j.name]},j.name))]}),c]})},rn=({sdk:M})=>{const n=A.useStore(M.organizationStore()),i=A.useStore(M.getUserStore()),a=A.useStore(M.getActiveFeature());return n.loading?s.jsx("div",{children:"authentication..."}):n.data?i.loading?s.jsx("div",{children:"authentication..."}):i.data?s.jsxs(s.Fragment,{children:[s.jsx(Ii,{notificationsStore:M.getNotificationsStore()}),s.jsx(Dn,{sdk:M,activeFeature:a})]}):s.jsx(ln,{sdk:M}):s.jsx("div",{children:"wrong sdk key..."})};const on="_1yeluar",gn=({children:M})=>s.jsx("div",{className:on,children:M}),ys=(M,n,i)=>{const[a,N]=r.useState(null);return r.useEffect(()=>{let t=!1;if(!M)return console.error("streamlayer sdk key should be provided"),N(c=>(c!==null&&typeof c.disableApp=="function"&&c.disableApp(),null)),()=>{t=!0};const l=hs.StreamLayer(M,i);if(n)for(const c of n)l.use(c);return l.ready().then(c=>{t||N(c.sdk)}).catch(c=>console.log(c)),()=>{t=!0,l.close(function(c){if(c)throw c})}},[M]),a};var W=(M=>(M[M.UNSET=0]="UNSET",M[M.CONNECTED=1]="CONNECTED",M[M.READY=2]="READY",M))(W||{});const h=r.createContext({status:0,sdk:null});production!=="production"&&(h.displayName="StreamLayerProvider");const un=({sdkKey:M,plugins:n,children:i,production:a=!0})=>{const N=ys(M,n,a),t=r.useMemo(()=>N?{sdk:N,status:2}:{status:1,sdk:null},[N]);return s.jsx(gn,{children:s.jsx(h.Provider,{value:t,children:i})})},An=()=>{const{sdk:M}=r.useContext(h);return M},dn=()=>{const{sdk:M,status:n}=r.useContext(h);if(n===W.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return n===W.CONNECTED?s.jsx("div",{className:"StreamLayerSDK",children:"wait"}):M===null?s.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(rn,{sdk:M})})};exports.StreamLayerProvider=un;exports.StreamLayerSDKReact=dn;exports.useStreamLayer=An;exports.useStreamLayerApp=ys;
|