@streamlayer/react 0.16.7 → 0.16.9

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.
@@ -0,0 +1,31 @@
1
+ "use strict";var Lc=Object.defineProperty;var xc=(n,e,t)=>e in n?Lc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var A=(n,e,t)=>(xc(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("react"),Xt=require("react-phone-number-input"),Rc=require("react-auth-code-input"),De=require("nanostores"),ve=require("@nanostores/react");var gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ti={exports:{}},xt={};/**
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 zc=Q,Uc=Symbol.for("react.element"),Pc=Symbol.for("react.fragment"),Bc=Object.prototype.hasOwnProperty,Qc=zc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Fc={key:!0,ref:!0,__self:!0,__source:!0};function hi(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)Bc.call(e,a)&&!Fc.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:Uc,type:n,key:r,ref:i,props:s,_owner:Qc.current}}xt.Fragment=Pc;xt.jsx=hi;xt.jsxs=hi;Ti.exports=xt;var T=Ti.exports;const Rt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSIxMiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CiAgPHJlY3QgeD0iOC4yNSIgeT0iNyIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcpIiBmaWxsPSJ3aGl0ZSIvPgogIDxyZWN0IHg9IjciIHk9IjE1Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSA3IDE1Ljc1KSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==";function Gc(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var Yc=/^((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)-.*))$/,ea=Gc(function(n){return Yc.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),Vc=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},a=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(o=>{if(o.startsWith("atm_")){const[,m]=o.split("_");t[m]=o}else a.push(o)})});const s=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&s.push(t[r]);return s.push(...a),s.join(" ")},js=Vc,$c=n=>n.toUpperCase()===n,qc=n=>e=>n.indexOf(e)===-1,ki=(n,e)=>{const t={};return Object.keys(n).filter(qc(e)).forEach(a=>{t[a]=n[a]}),t};function Wc(n,e,t){const a=ki(e,t);if(!n){const s=typeof ea=="function"?{default:ea}:ea;Object.keys(a).forEach(r=>{s.default(r)||delete a[r]})}return a}var Hc=(n,e)=>{};function Zc(n){let e="";return t=>{const a=(r,i)=>{const{as:o=n,class:m=e}=r,d=t.propsAsIs===void 0?!(typeof o=="string"&&o.indexOf("-")===-1&&!$c(o[0])):t.propsAsIs,y=Wc(d,r,["as","class"]);y.ref=i,y.className=t.atomic?js(t.class,y.className||m):js(y.className||m,t.class);const{vars:h}=t;if(h){const f={};for(const b in h){const L=h[b],O=L[0],x=L[1]||"",C=typeof O=="function"?O(r):O;Hc(C,t.name),f[`--${b}`]=`${C}${x}`}const I=y.style||{},E=Object.keys(I);E.length>0&&E.forEach(b=>{f[b]=I[b]}),y.style=f}return n.__linaria&&n!==o?(y.as=o,Q.createElement(n,y)):Q.createElement(o,y)},s=Q.forwardRef?Q.forwardRef(a):r=>{const i=ki(r,["innerRef"]);return a(i,r.innerRef)};return s.displayName=t.name,s.__linaria={className:t.class||e,extends:n},s}}var N=Zc;const Kc=N("div")({name:"Container",class:"c1sp8e8c",propsAsIs:!1}),Jc=N("div")({name:"IconWrap",class:"iqrotq1",propsAsIs:!1}),Xc=N("img")({name:"Icon",class:"i1nrhnc5",propsAsIs:!1}),el=N("div")({name:"Content",class:"c1e2rgo8",propsAsIs:!1}),nl=N("div")({name:"TitleWrap",class:"tut1xhg",propsAsIs:!1}),tl=N("div")({name:"Title",class:"tkk4hbf",propsAsIs:!1}),al=N("div")({name:"CloseBtnWrap",class:"c1q9ifsh",propsAsIs:!1}),sl=N("button")({name:"CloseBtn",class:"c8llnmb",propsAsIs:!1}),rl=N("img")({name:"CloseIcon",class:"chdt2dw",propsAsIs:!1}),il=({close:n,action:e,data:{color:t,icon:a,title:s}})=>{const r=Q.useCallback(i=>{i.stopPropagation(),n==null||n()},[n]);return T.jsxs(Kc,{onClick:e,children:[T.jsx(Jc,{style:t?{backgroundColor:t}:{},children:a&&T.jsx(Xc,{alt:"in-app-icon",src:a})}),T.jsxs(el,{children:[T.jsx(nl,{children:T.jsx(tl,{id:"in-app-title",children:s||""})}),T.jsx(al,{children:T.jsx(sl,{onClick:r,children:T.jsx(rl,{alt:"close-in-app-icon",src:Rt})})})]})]})};var Ls=typeof window>"u"?Q.useEffect:Q.useLayoutEffect,ol=({isPlaying:n,duration:e,startAt:t=0,updateInterval:a=0,onComplete:s,onUpdate:r})=>{let[i,o]=Q.useState(t),m=Q.useRef(0),d=Q.useRef(t),y=Q.useRef(t*-1e3),h=Q.useRef(null),f=Q.useRef(null),I=Q.useRef(null),E=O=>{let x=O/1e3;if(f.current===null){f.current=x,h.current=requestAnimationFrame(E);return}let C=x-f.current,z=m.current+C;f.current=x,m.current=z;let U=d.current+(a===0?z:(z/a|0)*a),B=d.current+z,R=typeof e=="number"&&B>=e;o(R?e:U),R||(h.current=requestAnimationFrame(E))},b=()=>{h.current&&cancelAnimationFrame(h.current),I.current&&clearTimeout(I.current),f.current=null},L=Q.useCallback(O=>{b(),m.current=0;let x=typeof O=="number"?O:t;d.current=x,o(x),n&&(h.current=requestAnimationFrame(E))},[n,t]);return Ls(()=>{if(r==null||r(i),e&&i>=e){y.current+=e*1e3;let{shouldRepeat:O=!1,delay:x=0,newStartAt:C}=(s==null?void 0:s(y.current/1e3))||{};O&&(I.current=setTimeout(()=>L(C),x*1e3))}},[i,e]),Ls(()=>(n&&(h.current=requestAnimationFrame(E)),b),[n,e,a]),{elapsedTime:i,reset:L}},cl=(n,e,t)=>{let a=n/2,s=e/2,r=a-s,i=2*r,o=t==="clockwise"?"1,0":"0,1",m=2*Math.PI*r;return{path:`m ${a},${s} a ${r},${r} 0 ${o} 0,${i} a ${r},${r} 0 ${o} 0,-${i}`,pathLength:m}},xs=(n,e)=>n===0||n===e?0:typeof e=="number"?n-e:0,ll=n=>({position:"relative",width:n,height:n}),ul={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},Mi=(n,e,t,a,s)=>{if(a===0)return e;let r=(s?a-n:n)/a;return e+t*r},Rs=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:[]},ml=(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((f,I)=>f>=e&&e>=s[I+1]))!=null?t:-1;if(!s||i===-1)return a[0];if(!r)return a[i];let o=s[i]-e,m=s[i]-s[i+1],d=Rs(a[i]),y=Rs(a[i+1]),h=!!n.isGrowing;return`rgb(${d.map((f,I)=>Mi(o,f,y[I]-f,m,h)|0).join(",")})`},dl=n=>{let{duration:e,initialRemainingTime:t,updateInterval:a,size:s=180,strokeWidth:r=12,trailStrokeWidth:i,isPlaying:o=!1,isGrowing:m=!1,rotation:d="clockwise",onComplete:y,onUpdate:h}=n,f=Q.useRef(),I=Math.max(r,i??0),{path:E,pathLength:b}=cl(s,I,d),{elapsedTime:L}=ol({isPlaying:o,duration:e,startAt:xs(e,t),updateInterval:a,onUpdate:typeof h=="function"?x=>{let C=Math.ceil(e-x);C!==f.current&&(f.current=C,h(C))}:void 0,onComplete:typeof y=="function"?x=>{var C;let{shouldRepeat:z,delay:U,newInitialRemainingTime:B}=(C=y(x))!=null?C:{};if(z)return{shouldRepeat:z,delay:U,newStartAt:xs(e,B)}}:void 0}),O=e-L;return{elapsedTime:L,path:E,pathLength:b,remainingTime:Math.ceil(O),rotation:d,size:s,stroke:ml(n,O),strokeDashoffset:Mi(L,0,b,e,m),strokeWidth:r}},Ii=n=>{let{children:e,strokeLinecap:t,trailColor:a,trailStrokeWidth:s}=n,{path:r,pathLength:i,stroke:o,strokeDashoffset:m,remainingTime:d,elapsedTime:y,size:h,strokeWidth:f}=dl(n);return Q.createElement("div",{style:ll(h)},Q.createElement("svg",{viewBox:`0 0 ${h} ${h}`,width:h,height:h,xmlns:"http://www.w3.org/2000/svg"},Q.createElement("path",{d:r,fill:"none",stroke:a??"#d9d9d9",strokeWidth:s??f}),Q.createElement("path",{d:r,fill:"none",stroke:o,strokeLinecap:t??"round",strokeWidth:f,strokeDasharray:i,strokeDashoffset:m})),typeof e=="function"&&Q.createElement("div",{style:ul},e({remainingTime:d,elapsedTime:y,color:o})))};Ii.displayName="CountdownCircleTimer";const na={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 pl=N("div")({name:"RemainingTime",class:"r1l1rnv7",propsAsIs:!1}),yl=[na.BLUE_PRIMARY,na.GREEN_1,na.RED_1],fl=[10,6,0],gl=30,Tl=32,hl=4,kl=0,Ni=({isPlaying:n=!0,duration:e=gl,setTimeToExpire:t})=>{const a=({remainingTime:s})=>T.jsx(pl,{style:{color:s?"inherit":void 0},children:s});return Q.useEffect(()=>{t(!1)},[t]),T.jsx(Ii,{isPlaying:n,duration:e,colors:yl,colorsTime:fl,size:Tl,strokeWidth:hl,trailStrokeWidth:kl,onComplete:()=>t(!0),children:a})};function be(n,e){if(!n)throw new Error(e)}const Ml=34028234663852886e22,Il=-34028234663852886e22,Nl=4294967295,Sl=2147483647,Al=-2147483648;function yt(n){if(typeof n!="number")throw new Error("invalid int 32: "+typeof n);if(!Number.isInteger(n)||n>Sl||n<Al)throw new Error("invalid int 32: "+n)}function xa(n){if(typeof n!="number")throw new Error("invalid uint 32: "+typeof n);if(!Number.isInteger(n)||n>Nl||n<0)throw new Error("invalid uint 32: "+n)}function Si(n){if(typeof n!="number")throw new Error("invalid float 32: "+typeof n);if(Number.isFinite(n)&&(n>Ml||n<Il))throw new Error("invalid float 32: "+n)}const Ai=Symbol("@bufbuild/protobuf/enum-type");function El(n){const e=n[Ai];return be(e,"missing enum type on enum object"),e}function Ei(n,e,t,a){n[Ai]=bi(e,t.map(s=>({no:s.no,name:s.name,localName:n[s.no]})))}function bi(n,e,t){const a=Object.create(null),s=Object.create(null),r=[];for(const i of e){const o=Di(i);r.push(o),a[i.name]=o,s[i.no]=o}return{typeName:n,values:r,findName(i){return a[i]},findNumber(i){return s[i]}}}function bl(n,e,t){const a={};for(const s of e){const r=Di(s);a[r.localName]=r.no,a[r.no]=r.localName}return Ei(a,n,e),a}function Di(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 Dl(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(o){n.util.initFields(this),n.util.initPartial(o,this)}}[r];return Object.setPrototypeOf(i.prototype,new Ve),Object.assign(i,{runtime:n,typeName:e,fields:n.util.newFieldList(t),fromBinary(o,m){return new i().fromBinary(o,m)},fromJson(o,m){return new i().fromJson(o,m)},fromJsonString(o,m){return new i().fromJsonString(o,m)},equals(o,m){return n.util.equals(i,o,m)}}),i}function vl(n,e,t,a){return{syntax:n,json:e,bin:t,util:a,makeMessageType(s,r,i){return Dl(this,s,r,i)},makeEnum:bl,makeEnumType:bi,getEnumType:El}}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 fn;(function(n){n[n.BIGINT=0]="BIGINT",n[n.STRING=1]="STRING"})(fn||(fn={}));function wl(){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 ta(n,e,t){for(let r=0;r<28;r=r+7){const i=n>>>r,o=!(!(i>>>7)&&e==0),m=(o?i|128:i)&255;if(t.push(m),!o)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,o=!!(i>>>7),m=(o?i|128:i)&255;if(t.push(m),!o)return}t.push(e>>>31&1)}}const ft=4294967296;function Cs(n){const e=n[0]==="-";e&&(n=n.slice(1));const t=1e6;let a=0,s=0;function r(i,o){const m=Number(n.slice(i,o));s*=t,a=a*t+m,a>=ft&&(s=s+(a/ft|0),a=a%ft)}return r(-24,-18),r(-18,-12),r(-12,-6),r(-6),e?wi(a,s):as(a,s)}function _l(n,e){let t=as(n,e);const a=t.hi&2147483648;a&&(t=wi(t.lo,t.hi));const s=vi(t.lo,t.hi);return a?"-"+s:s}function vi(n,e){if({lo:n,hi:e}=Ol(n,e),e<=2097151)return String(ft*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,o=s*2;const m=1e7;return r>=m&&(i+=Math.floor(r/m),r%=m),i>=m&&(o+=Math.floor(i/m),i%=m),o.toString()+zs(i)+zs(r)}function Ol(n,e){return{lo:n>>>0,hi:e>>>0}}function as(n,e){return{lo:n|0,hi:e|0}}function wi(n,e){return e=~e,n?n=~n+1:e+=1,as(n,e)}const zs=n=>{const e=String(n);return"0000000".slice(e.length)+e};function Us(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 jl(){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={},_i={},Ct={};Ct.byteLength=Rl;Ct.toByteArray=zl;Ct.fromByteArray=Bl;var Ge=[],xe=[],Ll=typeof Uint8Array<"u"?Uint8Array:Array,aa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var kn=0,xl=aa.length;kn<xl;++kn)Ge[kn]=aa[kn],xe[aa.charCodeAt(kn)]=kn;xe["-".charCodeAt(0)]=62;xe["_".charCodeAt(0)]=63;function Oi(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 Rl(n){var e=Oi(n),t=e[0],a=e[1];return(t+a)*3/4-a}function Cl(n,e,t){return(e+t)*3/4-t}function zl(n){var e,t=Oi(n),a=t[0],s=t[1],r=new Ll(Cl(n,a,s)),i=0,o=s>0?a-4:a,m;for(m=0;m<o;m+=4)e=xe[n.charCodeAt(m)]<<18|xe[n.charCodeAt(m+1)]<<12|xe[n.charCodeAt(m+2)]<<6|xe[n.charCodeAt(m+3)],r[i++]=e>>16&255,r[i++]=e>>8&255,r[i++]=e&255;return s===2&&(e=xe[n.charCodeAt(m)]<<2|xe[n.charCodeAt(m+1)]>>4,r[i++]=e&255),s===1&&(e=xe[n.charCodeAt(m)]<<10|xe[n.charCodeAt(m+1)]<<4|xe[n.charCodeAt(m+2)]>>2,r[i++]=e>>8&255,r[i++]=e&255),r}function Ul(n){return Ge[n>>18&63]+Ge[n>>12&63]+Ge[n>>6&63]+Ge[n&63]}function Pl(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(Ul(a));return s.join("")}function Bl(n){for(var e,t=n.length,a=t%3,s=[],r=16383,i=0,o=t-a;i<o;i+=r)s.push(Pl(n,i,i+r>o?o: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 ss={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ss.read=function(n,e,t,a,s){var r,i,o=s*8-a-1,m=(1<<o)-1,d=m>>1,y=-7,h=t?s-1:0,f=t?-1:1,I=n[e+h];for(h+=f,r=I&(1<<-y)-1,I>>=-y,y+=o;y>0;r=r*256+n[e+h],h+=f,y-=8);for(i=r&(1<<-y)-1,r>>=-y,y+=a;y>0;i=i*256+n[e+h],h+=f,y-=8);if(r===0)r=1-d;else{if(r===m)return i?NaN:(I?-1:1)*(1/0);i=i+Math.pow(2,a),r=r-d}return(I?-1:1)*i*Math.pow(2,r-a)};ss.write=function(n,e,t,a,s,r){var i,o,m,d=r*8-s-1,y=(1<<d)-1,h=y>>1,f=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=a?0:r-1,E=a?1:-1,b=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,i=y):(i=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-i))<1&&(i--,m*=2),i+h>=1?e+=f/m:e+=f*Math.pow(2,1-h),e*m>=2&&(i++,m/=2),i+h>=y?(o=0,i=y):i+h>=1?(o=(e*m-1)*Math.pow(2,s),i=i+h):(o=e*Math.pow(2,h-1)*Math.pow(2,s),i=0));s>=8;n[t+I]=o&255,I+=E,o/=256,s-=8);for(i=i<<s|o,d+=s;d>0;n[t+I]=i&255,I+=E,i/=256,d-=8);n[t+I-E]|=b*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=Ct,t=ss,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=o,n.SlowBuffer=x,n.INSPECT_MAX_BYTES=50;const s=2147483647;n.kMaxLength=s,o.TYPED_ARRAY_SUPPORT=r(),!o.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),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(p,c),p.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function i(p){if(p>s)throw new RangeError('The value "'+p+'" is invalid for option "size"');const c=new Uint8Array(p);return Object.setPrototypeOf(c,o.prototype),c}function o(p,c,u){if(typeof p=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(p)}return m(p,c,u)}o.poolSize=8192;function m(p,c,u){if(typeof p=="string")return f(p,c);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 b(p,c,u);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=p.valueOf&&p.valueOf();if(g!=null&&g!==p)return o.from(g,c,u);const k=L(p);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return o.from(p[Symbol.toPrimitive]("string"),c,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}o.from=function(p,c,u){return m(p,c,u)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,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 y(p,c,u){return d(p),p<=0?i(p):c!==void 0?typeof u=="string"?i(p).fill(c,u):i(p).fill(c):i(p)}o.alloc=function(p,c,u){return y(p,c,u)};function h(p){return d(p),i(p<0?0:O(p)|0)}o.allocUnsafe=function(p){return h(p)},o.allocUnsafeSlow=function(p){return h(p)};function f(p,c){if((typeof c!="string"||c==="")&&(c="utf8"),!o.isEncoding(c))throw new TypeError("Unknown encoding: "+c);const u=C(p,c)|0;let g=i(u);const k=g.write(p,c);return k!==u&&(g=g.slice(0,k)),g}function I(p){const c=p.length<0?0:O(p.length)|0,u=i(c);for(let g=0;g<c;g+=1)u[g]=p[g]&255;return u}function E(p){if(Be(p,Uint8Array)){const c=new Uint8Array(p);return b(c.buffer,c.byteOffset,c.byteLength)}return I(p)}function b(p,c,u){if(c<0||p.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<c+(u||0))throw new RangeError('"length" is outside of buffer bounds');let g;return c===void 0&&u===void 0?g=new Uint8Array(p):u===void 0?g=new Uint8Array(p,c):g=new Uint8Array(p,c,u),Object.setPrototypeOf(g,o.prototype),g}function L(p){if(o.isBuffer(p)){const c=O(p.length)|0,u=i(c);return u.length===0||p.copy(u,0,0,c),u}if(p.length!==void 0)return typeof p.length!="number"||Jt(p.length)?i(0):I(p);if(p.type==="Buffer"&&Array.isArray(p.data))return I(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 x(p){return+p!=p&&(p=0),o.alloc(+p)}o.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==o.prototype},o.compare=function(c,u){if(Be(c,Uint8Array)&&(c=o.from(c,c.offset,c.byteLength)),Be(u,Uint8Array)&&(u=o.from(u,u.offset,u.byteLength)),!o.isBuffer(c)||!o.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===u)return 0;let g=c.length,k=u.length;for(let S=0,D=Math.min(g,k);S<D;++S)if(c[S]!==u[S]){g=c[S],k=u[S];break}return g<k?-1:k<g?1:0},o.isEncoding=function(c){switch(String(c).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}},o.concat=function(c,u){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return o.alloc(0);let g;if(u===void 0)for(u=0,g=0;g<c.length;++g)u+=c[g].length;const k=o.allocUnsafe(u);let S=0;for(g=0;g<c.length;++g){let D=c[g];if(Be(D,Uint8Array))S+D.length>k.length?(o.isBuffer(D)||(D=o.from(D)),D.copy(k,S)):Uint8Array.prototype.set.call(k,D,S);else if(o.isBuffer(D))D.copy(k,S);else throw new TypeError('"list" argument must be an Array of Buffers');S+=D.length}return k};function C(p,c){if(o.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,g=arguments.length>2&&arguments[2]===!0;if(!g&&u===0)return 0;let k=!1;for(;;)switch(c){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return $n(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return lt(p).length;default:if(k)return g?-1:$n(p).length;c=(""+c).toLowerCase(),k=!0}}o.byteLength=C;function z(p,c,u){let g=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,c>>>=0,u<=c))return"";for(p||(p="utf8");;)switch(p){case"hex":return Ne(this,c,u);case"utf8":case"utf-8":return Z(this,c,u);case"ascii":return qe(this,c,u);case"latin1":case"binary":return Ue(this,c,u);case"base64":return oe(this,c,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,c,u);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}o.prototype._isBuffer=!0;function U(p,c,u){const g=p[c];p[c]=p[u],p[u]=g}o.prototype.swap16=function(){const c=this.length;if(c%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let u=0;u<c;u+=2)U(this,u,u+1);return this},o.prototype.swap32=function(){const c=this.length;if(c%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let u=0;u<c;u+=4)U(this,u,u+3),U(this,u+1,u+2);return this},o.prototype.swap64=function(){const c=this.length;if(c%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let u=0;u<c;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},o.prototype.toString=function(){const c=this.length;return c===0?"":arguments.length===0?Z(this,0,c):z.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(c){if(!o.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c?!0:o.compare(this,c)===0},o.prototype.inspect=function(){let c="";const u=n.INSPECT_MAX_BYTES;return c=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(c+=" ... "),"<Buffer "+c+">"},a&&(o.prototype[a]=o.prototype.inspect),o.prototype.compare=function(c,u,g,k,S){if(Be(c,Uint8Array)&&(c=o.from(c,c.offset,c.byteLength)),!o.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(u===void 0&&(u=0),g===void 0&&(g=c?c.length:0),k===void 0&&(k=0),S===void 0&&(S=this.length),u<0||g>c.length||k<0||S>this.length)throw new RangeError("out of range index");if(k>=S&&u>=g)return 0;if(k>=S)return-1;if(u>=g)return 1;if(u>>>=0,g>>>=0,k>>>=0,S>>>=0,this===c)return 0;let D=S-k,V=g-u;const ce=Math.min(D,V),re=this.slice(k,S),le=c.slice(u,g);for(let ae=0;ae<ce;++ae)if(re[ae]!==le[ae]){D=re[ae],V=le[ae];break}return D<V?-1:V<D?1:0};function B(p,c,u,g,k){if(p.length===0)return-1;if(typeof u=="string"?(g=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Jt(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 c=="string"&&(c=o.from(c,g)),o.isBuffer(c))return c.length===0?-1:R(p,c,u,g,k);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(p,c,u):Uint8Array.prototype.lastIndexOf.call(p,c,u):R(p,[c],u,g,k);throw new TypeError("val must be string, number or Buffer")}function R(p,c,u,g,k){let S=1,D=p.length,V=c.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||c.length<2)return-1;S=2,D/=2,V/=2,u/=2}function ce(le,ae){return S===1?le[ae]:le.readUInt16BE(ae*S)}let re;if(k){let le=-1;for(re=u;re<D;re++)if(ce(p,re)===ce(c,le===-1?0:re-le)){if(le===-1&&(le=re),re-le+1===V)return le*S}else le!==-1&&(re-=re-le),le=-1}else for(u+V>D&&(u=D-V),re=u;re>=0;re--){let le=!0;for(let ae=0;ae<V;ae++)if(ce(p,re+ae)!==ce(c,ae)){le=!1;break}if(le)return re}return-1}o.prototype.includes=function(c,u,g){return this.indexOf(c,u,g)!==-1},o.prototype.indexOf=function(c,u,g){return B(this,c,u,g,!0)},o.prototype.lastIndexOf=function(c,u,g){return B(this,c,u,g,!1)};function H(p,c,u,g){u=Number(u)||0;const k=p.length-u;g?(g=Number(g),g>k&&(g=k)):g=k;const S=c.length;g>S/2&&(g=S/2);let D;for(D=0;D<g;++D){const V=parseInt(c.substr(D*2,2),16);if(Jt(V))return D;p[u+D]=V}return D}function ne(p,c,u,g){return qn($n(c,p.length-u),p,u,g)}function se(p,c,u,g){return qn(Kt(c),p,u,g)}function ie(p,c,u,g){return qn(lt(c),p,u,g)}function ue(p,c,u,g){return qn(_(c,p.length-u),p,u,g)}o.prototype.write=function(c,u,g,k){if(u===void 0)k="utf8",g=this.length,u=0;else if(g===void 0&&typeof u=="string")k=u,g=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(g)?(g=g>>>0,k===void 0&&(k="utf8")):(k=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const S=this.length-u;if((g===void 0||g>S)&&(g=S),c.length>0&&(g<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");let D=!1;for(;;)switch(k){case"hex":return H(this,c,u,g);case"utf8":case"utf-8":return ne(this,c,u,g);case"ascii":case"latin1":case"binary":return se(this,c,u,g);case"base64":return ie(this,c,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,c,u,g);default:if(D)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),D=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(p,c,u){return c===0&&u===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(c,u))}function Z(p,c,u){u=Math.min(p.length,u);const g=[];let k=c;for(;k<u;){const S=p[k];let D=null,V=S>239?4:S>223?3:S>191?2:1;if(k+V<=u){let ce,re,le,ae;switch(V){case 1:S<128&&(D=S);break;case 2:ce=p[k+1],(ce&192)===128&&(ae=(S&31)<<6|ce&63,ae>127&&(D=ae));break;case 3:ce=p[k+1],re=p[k+2],(ce&192)===128&&(re&192)===128&&(ae=(S&15)<<12|(ce&63)<<6|re&63,ae>2047&&(ae<55296||ae>57343)&&(D=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=(S&15)<<18|(ce&63)<<12|(re&63)<<6|le&63,ae>65535&&ae<1114112&&(D=ae))}}D===null?(D=65533,V=1):D>65535&&(D-=65536,g.push(D>>>10&1023|55296),D=56320|D&1023),g.push(D),k+=V}return Ie(g)}const me=4096;function Ie(p){const c=p.length;if(c<=me)return String.fromCharCode.apply(String,p);let u="",g=0;for(;g<c;)u+=String.fromCharCode.apply(String,p.slice(g,g+=me));return u}function qe(p,c,u){let g="";u=Math.min(p.length,u);for(let k=c;k<u;++k)g+=String.fromCharCode(p[k]&127);return g}function Ue(p,c,u){let g="";u=Math.min(p.length,u);for(let k=c;k<u;++k)g+=String.fromCharCode(p[k]);return g}function Ne(p,c,u){const g=p.length;(!c||c<0)&&(c=0),(!u||u<0||u>g)&&(u=g);let k="";for(let S=c;S<u;++S)k+=Oc[p[S]];return k}function Se(p,c,u){const g=p.slice(c,u);let k="";for(let S=0;S<g.length-1;S+=2)k+=String.fromCharCode(g[S]+g[S+1]*256);return k}o.prototype.slice=function(c,u){const g=this.length;c=~~c,u=u===void 0?g:~~u,c<0?(c+=g,c<0&&(c=0)):c>g&&(c=g),u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),u<c&&(u=c);const k=this.subarray(c,u);return Object.setPrototypeOf(k,o.prototype),k};function K(p,c,u){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+c>u)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(c,u,g){c=c>>>0,u=u>>>0,g||K(c,u,this.length);let k=this[c],S=1,D=0;for(;++D<u&&(S*=256);)k+=this[c+D]*S;return k},o.prototype.readUintBE=o.prototype.readUIntBE=function(c,u,g){c=c>>>0,u=u>>>0,g||K(c,u,this.length);let k=this[c+--u],S=1;for(;u>0&&(S*=256);)k+=this[c+--u]*S;return k},o.prototype.readUint8=o.prototype.readUInt8=function(c,u){return c=c>>>0,u||K(c,1,this.length),this[c]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(c,u){return c=c>>>0,u||K(c,2,this.length),this[c]|this[c+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(c,u){return c=c>>>0,u||K(c,2,this.length),this[c]<<8|this[c+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(c,u){return c=c>>>0,u||K(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+this[c+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(c,u){return c=c>>>0,u||K(c,4,this.length),this[c]*16777216+(this[c+1]<<16|this[c+2]<<8|this[c+3])},o.prototype.readBigUInt64LE=Je(function(c){c=c>>>0,Ce(c,"offset");const u=this[c],g=this[c+7];(u===void 0||g===void 0)&&Le(c,this.length-8);const k=u+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24,S=this[++c]+this[++c]*2**8+this[++c]*2**16+g*2**24;return BigInt(k)+(BigInt(S)<<BigInt(32))}),o.prototype.readBigUInt64BE=Je(function(c){c=c>>>0,Ce(c,"offset");const u=this[c],g=this[c+7];(u===void 0||g===void 0)&&Le(c,this.length-8);const k=u*2**24+this[++c]*2**16+this[++c]*2**8+this[++c],S=this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+g;return(BigInt(k)<<BigInt(32))+BigInt(S)}),o.prototype.readIntLE=function(c,u,g){c=c>>>0,u=u>>>0,g||K(c,u,this.length);let k=this[c],S=1,D=0;for(;++D<u&&(S*=256);)k+=this[c+D]*S;return S*=128,k>=S&&(k-=Math.pow(2,8*u)),k},o.prototype.readIntBE=function(c,u,g){c=c>>>0,u=u>>>0,g||K(c,u,this.length);let k=u,S=1,D=this[c+--k];for(;k>0&&(S*=256);)D+=this[c+--k]*S;return S*=128,D>=S&&(D-=Math.pow(2,8*u)),D},o.prototype.readInt8=function(c,u){return c=c>>>0,u||K(c,1,this.length),this[c]&128?(255-this[c]+1)*-1:this[c]},o.prototype.readInt16LE=function(c,u){c=c>>>0,u||K(c,2,this.length);const g=this[c]|this[c+1]<<8;return g&32768?g|4294901760:g},o.prototype.readInt16BE=function(c,u){c=c>>>0,u||K(c,2,this.length);const g=this[c+1]|this[c]<<8;return g&32768?g|4294901760:g},o.prototype.readInt32LE=function(c,u){return c=c>>>0,u||K(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},o.prototype.readInt32BE=function(c,u){return c=c>>>0,u||K(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},o.prototype.readBigInt64LE=Je(function(c){c=c>>>0,Ce(c,"offset");const u=this[c],g=this[c+7];(u===void 0||g===void 0)&&Le(c,this.length-8);const k=this[c+4]+this[c+5]*2**8+this[c+6]*2**16+(g<<24);return(BigInt(k)<<BigInt(32))+BigInt(u+this[++c]*2**8+this[++c]*2**16+this[++c]*2**24)}),o.prototype.readBigInt64BE=Je(function(c){c=c>>>0,Ce(c,"offset");const u=this[c],g=this[c+7];(u===void 0||g===void 0)&&Le(c,this.length-8);const k=(u<<24)+this[++c]*2**16+this[++c]*2**8+this[++c];return(BigInt(k)<<BigInt(32))+BigInt(this[++c]*2**24+this[++c]*2**16+this[++c]*2**8+g)}),o.prototype.readFloatLE=function(c,u){return c=c>>>0,u||K(c,4,this.length),t.read(this,c,!0,23,4)},o.prototype.readFloatBE=function(c,u){return c=c>>>0,u||K(c,4,this.length),t.read(this,c,!1,23,4)},o.prototype.readDoubleLE=function(c,u){return c=c>>>0,u||K(c,8,this.length),t.read(this,c,!0,52,8)},o.prototype.readDoubleBE=function(c,u){return c=c>>>0,u||K(c,8,this.length),t.read(this,c,!1,52,8)};function M(p,c,u,g,k,S){if(!o.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>k||c<S)throw new RangeError('"value" argument is out of bounds');if(u+g>p.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(c,u,g,k){if(c=+c,u=u>>>0,g=g>>>0,!k){const V=Math.pow(2,8*g)-1;M(this,c,u,g,V,0)}let S=1,D=0;for(this[u]=c&255;++D<g&&(S*=256);)this[u+D]=c/S&255;return u+g},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(c,u,g,k){if(c=+c,u=u>>>0,g=g>>>0,!k){const V=Math.pow(2,8*g)-1;M(this,c,u,g,V,0)}let S=g-1,D=1;for(this[u+S]=c&255;--S>=0&&(D*=256);)this[u+S]=c/D&255;return u+g},o.prototype.writeUint8=o.prototype.writeUInt8=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,1,255,0),this[u]=c&255,u+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,2,65535,0),this[u]=c&255,this[u+1]=c>>>8,u+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,2,65535,0),this[u]=c>>>8,this[u+1]=c&255,u+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,4,4294967295,0),this[u+3]=c>>>24,this[u+2]=c>>>16,this[u+1]=c>>>8,this[u]=c&255,u+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,4,4294967295,0),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4};function v(p,c,u,g,k){Pe(c,g,k,p,u,7);let S=Number(c&BigInt(4294967295));p[u++]=S,S=S>>8,p[u++]=S,S=S>>8,p[u++]=S,S=S>>8,p[u++]=S;let D=Number(c>>BigInt(32)&BigInt(4294967295));return p[u++]=D,D=D>>8,p[u++]=D,D=D>>8,p[u++]=D,D=D>>8,p[u++]=D,u}function j(p,c,u,g,k){Pe(c,g,k,p,u,7);let S=Number(c&BigInt(4294967295));p[u+7]=S,S=S>>8,p[u+6]=S,S=S>>8,p[u+5]=S,S=S>>8,p[u+4]=S;let D=Number(c>>BigInt(32)&BigInt(4294967295));return p[u+3]=D,D=D>>8,p[u+2]=D,D=D>>8,p[u+1]=D,D=D>>8,p[u]=D,u+8}o.prototype.writeBigUInt64LE=Je(function(c,u=0){return v(this,c,u,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=Je(function(c,u=0){return j(this,c,u,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(c,u,g,k){if(c=+c,u=u>>>0,!k){const ce=Math.pow(2,8*g-1);M(this,c,u,g,ce-1,-ce)}let S=0,D=1,V=0;for(this[u]=c&255;++S<g&&(D*=256);)c<0&&V===0&&this[u+S-1]!==0&&(V=1),this[u+S]=(c/D>>0)-V&255;return u+g},o.prototype.writeIntBE=function(c,u,g,k){if(c=+c,u=u>>>0,!k){const ce=Math.pow(2,8*g-1);M(this,c,u,g,ce-1,-ce)}let S=g-1,D=1,V=0;for(this[u+S]=c&255;--S>=0&&(D*=256);)c<0&&V===0&&this[u+S+1]!==0&&(V=1),this[u+S]=(c/D>>0)-V&255;return u+g},o.prototype.writeInt8=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,1,127,-128),c<0&&(c=255+c+1),this[u]=c&255,u+1},o.prototype.writeInt16LE=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,2,32767,-32768),this[u]=c&255,this[u+1]=c>>>8,u+2},o.prototype.writeInt16BE=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,2,32767,-32768),this[u]=c>>>8,this[u+1]=c&255,u+2},o.prototype.writeInt32LE=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,4,2147483647,-2147483648),this[u]=c&255,this[u+1]=c>>>8,this[u+2]=c>>>16,this[u+3]=c>>>24,u+4},o.prototype.writeInt32BE=function(c,u,g){return c=+c,u=u>>>0,g||M(this,c,u,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[u]=c>>>24,this[u+1]=c>>>16,this[u+2]=c>>>8,this[u+3]=c&255,u+4},o.prototype.writeBigInt64LE=Je(function(c,u=0){return v(this,c,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=Je(function(c,u=0){return j(this,c,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function F(p,c,u,g,k,S){if(u+g>p.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function W(p,c,u,g,k){return c=+c,u=u>>>0,k||F(p,c,u,4),t.write(p,c,u,g,23,4),u+4}o.prototype.writeFloatLE=function(c,u,g){return W(this,c,u,!0,g)},o.prototype.writeFloatBE=function(c,u,g){return W(this,c,u,!1,g)};function J(p,c,u,g,k){return c=+c,u=u>>>0,k||F(p,c,u,8),t.write(p,c,u,g,52,8),u+8}o.prototype.writeDoubleLE=function(c,u,g){return J(this,c,u,!0,g)},o.prototype.writeDoubleBE=function(c,u,g){return J(this,c,u,!1,g)},o.prototype.copy=function(c,u,g,k){if(!o.isBuffer(c))throw new TypeError("argument should be a Buffer");if(g||(g=0),!k&&k!==0&&(k=this.length),u>=c.length&&(u=c.length),u||(u=0),k>0&&k<g&&(k=g),k===g||c.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=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),c.length-u<k-g&&(k=c.length-u+g);const S=k-g;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,g,k):Uint8Array.prototype.set.call(c,this.subarray(g,k),u),S},o.prototype.fill=function(c,u,g,k){if(typeof c=="string"){if(typeof u=="string"?(k=u,u=0,g=this.length):typeof g=="string"&&(k=g,g=this.length),k!==void 0&&typeof k!="string")throw new TypeError("encoding must be a string");if(typeof k=="string"&&!o.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(c.length===1){const D=c.charCodeAt(0);(k==="utf8"&&D<128||k==="latin1")&&(c=D)}}else typeof c=="number"?c=c&255:typeof c=="boolean"&&(c=Number(c));if(u<0||this.length<u||this.length<g)throw new RangeError("Out of range index");if(g<=u)return this;u=u>>>0,g=g===void 0?this.length:g>>>0,c||(c=0);let S;if(typeof c=="number")for(S=u;S<g;++S)this[S]=c;else{const D=o.isBuffer(c)?c:o.from(c,k),V=D.length;if(V===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(S=0;S<g-u;++S)this[S+u]=D[S%V]}return this};const Y={};function $(p,c,u){Y[p]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:c.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,c){return`The "${p}" argument must be of type number. Received type ${typeof c}`},TypeError),$("ERR_OUT_OF_RANGE",function(p,c,u){let g=`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"),g+=` It must be ${c}. Received ${k}`,g},RangeError);function X(p){let c="",u=p.length;const g=p[0]==="-"?1:0;for(;u>=g+4;u-=3)c=`_${p.slice(u-3,u)}${c}`;return`${p.slice(0,u)}${c}`}function Me(p,c,u){Ce(c,"offset"),(p[c]===void 0||p[c+u]===void 0)&&Le(c,p.length-(u+1))}function Pe(p,c,u,g,k,S){if(p>u||p<c){const D=typeof c=="bigint"?"n":"";let V;throw S>3?c===0||c===BigInt(0)?V=`>= 0${D} and < 2${D} ** ${(S+1)*8}${D}`:V=`>= -(2${D} ** ${(S+1)*8-1}${D}) and < 2 ** ${(S+1)*8-1}${D}`:V=`>= ${c}${D} and <= ${u}${D}`,new Y.ERR_OUT_OF_RANGE("value",V,p)}Me(g,k,S)}function Ce(p,c){if(typeof p!="number")throw new Y.ERR_INVALID_ARG_TYPE(c,"number",p)}function Le(p,c,u){throw Math.floor(p)!==p?(Ce(p,u),new Y.ERR_OUT_OF_RANGE(u||"offset","an integer",p)):c<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(u||"offset",`>= ${u?1:0} and <= ${c}`,p)}const hn=/[^+/0-9A-Za-z-_]/g;function ct(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 $n(p,c){c=c||1/0;let u;const g=p.length;let k=null;const S=[];for(let D=0;D<g;++D){if(u=p.charCodeAt(D),u>55295&&u<57344){if(!k){if(u>56319){(c-=3)>-1&&S.push(239,191,189);continue}else if(D+1===g){(c-=3)>-1&&S.push(239,191,189);continue}k=u;continue}if(u<56320){(c-=3)>-1&&S.push(239,191,189),k=u;continue}u=(k-55296<<10|u-56320)+65536}else k&&(c-=3)>-1&&S.push(239,191,189);if(k=null,u<128){if((c-=1)<0)break;S.push(u)}else if(u<2048){if((c-=2)<0)break;S.push(u>>6|192,u&63|128)}else if(u<65536){if((c-=3)<0)break;S.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((c-=4)<0)break;S.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return S}function Kt(p){const c=[];for(let u=0;u<p.length;++u)c.push(p.charCodeAt(u)&255);return c}function _(p,c){let u,g,k;const S=[];for(let D=0;D<p.length&&!((c-=2)<0);++D)u=p.charCodeAt(D),g=u>>8,k=u%256,S.push(k),S.push(g);return S}function lt(p){return e.toByteArray(ct(p))}function qn(p,c,u,g){let k;for(k=0;k<g&&!(k+u>=c.length||k>=p.length);++k)c[k+u]=p[k];return k}function Be(p,c){return p instanceof c||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===c.name}function Jt(p){return p!==p}const Oc=function(){const p="0123456789abcdef",c=new Array(256);for(let u=0;u<16;++u){const g=u*16;for(let k=0;k<16;++k)c[g+k]=p[u]+p[k]}return c}();function Je(p){return typeof BigInt>"u"?jc:p}function jc(){throw new Error("BigInt not supported")}})(_i);var ji={exports:{}},pe=ji.exports={},Qe,Fe;function Ra(){throw new Error("setTimeout has not been defined")}function Ca(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Qe=setTimeout:Qe=Ra}catch{Qe=Ra}try{typeof clearTimeout=="function"?Fe=clearTimeout:Fe=Ca}catch{Fe=Ca}})();function Li(n){if(Qe===setTimeout)return setTimeout(n,0);if((Qe===Ra||!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 Ql(n){if(Fe===clearTimeout)return clearTimeout(n);if((Fe===Ca||!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 He=[],_n=!1,un,gt=-1;function Fl(){!_n||!un||(_n=!1,un.length?He=un.concat(He):gt=-1,He.length&&xi())}function xi(){if(!_n){var n=Li(Fl);_n=!0;for(var e=He.length;e;){for(un=He,He=[];++gt<e;)un&&un[gt].run();gt=-1,e=He.length}un=null,_n=!1,Ql(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];He.push(new Ri(n,e)),He.length===1&&!_n&&Li(xi)};function Ri(n,e){this.fun=n,this.array=e}Ri.prototype.run=function(){this.fun.apply(null,this.array)};pe.title="browser";pe.browser=!0;pe.env={};pe.argv=[];pe.version="";pe.versions={};function Ke(){}pe.on=Ke;pe.addListener=Ke;pe.once=Ke;pe.off=Ke;pe.removeListener=Ke;pe.removeAllListeners=Ke;pe.emit=Ke;pe.prependListener=Ke;pe.prependOnceListener=Ke;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 Gl=ji.exports;(function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const e=_i,t=Gl,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 Yl(){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"),o=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>o||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),Cs(s)},uEnc(s){return typeof s!="string"&&(s=s.toString()),a(s),Cs(s)},dec(s,r){return _l(s,r)},uDec(s,r){return vi(s,r)}}}const he=Yl();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 Vl{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(xa(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return yt(e),Us(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){Si(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){xa(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){yt(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return yt(e),e=(e<<1^e>>31)>>>0,Us(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 ta(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 ta(s,r,this.buf),this}uint64(e){let t=he.uEnc(e);return ta(t.lo,t.hi,this.buf),this}}class $l{constructor(e,t){this.varint64=wl,this.uint32=jl,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 za(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 Xe(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 Ua(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 Ci(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"),Ps={readUnknownFields:!0,readerFactory:n=>new $l(n)},Bs={writeUnknownFields:!0,writerFactory:()=>new Vl};function ql(n){return n?Object.assign(Object.assign({},Ps),n):Ps}function Wl(n){return n?Object.assign(Object.assign({},Bs),n):Bs}function Hl(){return{makeReadOptions:ql,makeWriteOptions:Wl,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,o]=e.tag(),m=s.fields.find(i);if(!m){const f=e.skip(o);a.readUnknownFields&&this.onUnknownField(n,i,o,f);continue}let d=n,y=m.repeated,h=m.localName;switch(m.oneof&&(d=d[m.oneof.localName],d.case!=h&&delete d.value,d.case=h,h="value"),m.kind){case"scalar":case"enum":const f=m.kind=="enum"?w.INT32:m.T;let I=At;if(m.kind=="scalar"&&m.L>0&&(I=Kl),y){let O=d[h];if(o==de.LengthDelimited&&f!=w.STRING&&f!=w.BYTES){let x=e.uint32()+e.pos;for(;e.pos<x;)O.push(I(e,f))}else O.push(I(e,f))}else d[h]=I(e,f);break;case"message":const E=m.T;y?d[h].push(Tt(e,new E,a)):d[h]instanceof Ve?Tt(e,d[h],a):(d[h]=Tt(e,new E,a),E.fieldWrapper&&!m.oneof&&!m.repeated&&(d[h]=E.fieldWrapper.unwrapField(d[h])));break;case"map":let[b,L]=Zl(m,e,a);d[h][b]=L;break}}}}}function Tt(n,e,t){return e.getType().runtime.bin.readMessage(e,n,n.uint32(),t),e}function Zl(n,e,t){const a=e.uint32(),s=e.pos+a;let r,i;for(;e.pos<s;){let[o]=e.tag();switch(o){case 1:r=At(e,n.K);break;case 2:switch(n.V.kind){case"scalar":i=At(e,n.V.T);break;case"enum":i=e.int32();break;case"message":i=Tt(e,new n.V.T,t);break}break}}if(r===void 0){let o=Ua(n.K,fn.BIGINT);r=n.K==w.BOOL?o.toString():o}if(typeof r!="string"&&typeof r!="number"&&(r=r.toString()),i===void 0)switch(n.V.kind){case"scalar":i=Ua(n.V.T,fn.BIGINT);break;case"enum":i=0;break;case"message":i=new n.V.T;break}return[r,i]}function Kl(n,e){const t=At(n,e);return typeof t=="bigint"?t.toString():t}function At(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 Jl(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(Jn(n,t.K,1,r,!0),t.V.kind){case"scalar":Jn(n,t.V.T,2,s,!0);break;case"enum":Jn(n,w.INT32,2,s,!0);break;case"message":Pa(n,e,t.V.T,2,s);break}n.join()}function Pa(n,e,t,a,s){if(s!==void 0){const r=za(t,s);n.tag(a,de.LengthDelimited).bytes(r.toBinary(e))}}function Jn(n,e,t,a,s){let[r,i,o]=Ci(e,a);(!o||s)&&n.tag(t,r)[i](a)}function Xl(n,e,t,a){if(!a.length)return;n.tag(t,de.LengthDelimited).fork();let[,s]=Ci(e);for(let r=0;r<a.length;r++)n[s](a[r]);n.join()}function eu(){return Object.assign(Object.assign({},Hl()),{writeMessage(n,e,t){const a=n.getType();for(const s of a.fields.byNumber()){let r,i=s.repeated,o=s.localName;if(s.oneof){const m=n[s.oneof.localName];if(m.case!==o)continue;r=m.value}else r=n[o];switch(s.kind){case"scalar":case"enum":let m=s.kind=="enum"?w.INT32:s.T;if(i)if(s.packed)Xl(e,m,s.no,r);else for(const d of r)Jn(e,m,s.no,d,!0);else r!==void 0&&Jn(e,m,s.no,r,!!s.oneof||s.opt);break;case"message":if(i)for(const d of r)Pa(e,t,s.T,s.no,d);else Pa(e,t,s.T,s.no,r);break;case"map":for(const[d,y]of Object.entries(r))Jl(e,t,s,d,y);break}}return t.writeUnknownFields&&this.writeUnknownFields(n,e),e}})}let We="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),zt=[];for(let n=0;n<We.length;n++)zt[We[n].charCodeAt(0)]=n;zt["-".charCodeAt(0)]=We.indexOf("+");zt["_".charCodeAt(0)]=We.indexOf("/");const rs={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 o=0;o<n.length;o++){if(r=zt[n.charCodeAt(o)],r===void 0)switch(n[o]){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+=We[a>>2],s=(a&3)<<4,t=1;break;case 1:e+=We[s|a>>4],s=(a&15)<<2,t=2;break;case 2:e+=We[s|a>>6],e+=We[a&63],t=0;break}return t&&(e+=We[s],e+="=",t==1&&(e+="=")),e}},Qs={ignoreUnknownFields:!1},Fs={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function nu(n){return n?Object.assign(Object.assign({},Qs),n):Qs}function tu(n){return n?Object.assign(Object.assign({},Fs),n):Fs}function au(n){const e=n(su,Gs);return{makeReadOptions:nu,makeWriteOptions:tu,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[o,m]of Object.entries(a)){const d=t.fields.findJsonName(o);if(!d){if(!s.ignoreUnknownFields)throw new Error(`cannot decode message ${t.typeName} from JSON: key "${o}" is unknown`);continue}let y=d.localName,h=r;if(d.oneof){if(m===null&&d.kind=="scalar")continue;const f=i[d.oneof.localName];if(f)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${d.oneof.name}" present: "${f}", "${o}"`);i[d.oneof.localName]=o,h=h[d.oneof.localName]={case:y},y="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 f=h[y];for(const I of m){if(I===null)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(I)}`);let E;switch(d.kind){case"message":E=d.T.fromJson(I,s);break;case"enum":if(E=sa(d.T,I,s.ignoreUnknownFields),E===void 0)continue;break;case"scalar":try{E=Wn(d.T,I,d.L)}catch(b){let L=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(I)}`;throw b instanceof Error&&b.message.length>0&&(L+=`: ${b.message}`),new Error(L)}break}f.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 f=h[y];for(const[I,E]of Object.entries(m)){if(E===null)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: map value null`);let b;switch(d.V.kind){case"message":b=d.V.T.fromJson(E,s);break;case"enum":if(b=sa(d.V.T,E,s.ignoreUnknownFields),b===void 0)continue;break;case"scalar":try{b=Wn(d.V.T,E,fn.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{f[Wn(d.K,d.K==w.BOOL?I=="true"?!0:I=="false"?!1:I:I,fn.BIGINT).toString()]=b}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 f=d.T;if(m===null&&f.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 "${o}"`);continue}h[y]instanceof Ve?h[y].fromJson(m,s):(h[y]=f.fromJson(m,s),f.fieldWrapper&&!d.oneof&&(h[y]=f.fieldWrapper.unwrapField(h[y])));break;case"enum":const I=sa(d.T,m,s.ignoreUnknownFields);I!==void 0&&(h[y]=I);break;case"scalar":try{h[y]=Wn(d.T,m,d.L)}catch(E){let b=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw E instanceof Error&&E.message.length>0&&(b+=`: ${E.message}`),new Error(b)}break}}return r},writeMessage(t,a){const s=t.getType(),r={};let i;try{for(const o of s.fields.byMember()){let m;if(o.kind=="oneof"){const d=t[o.localName];if(d.value===void 0)continue;if(i=o.findField(d.case),!i)throw"oneof case not found: "+d.case;m=e(i,d.value,a)}else i=o,m=e(i,t[i.localName],a);m!==void 0&&(r[a.useProtoFieldName?i.name:i.jsonName]=m)}}catch(o){const m=i?`cannot encode field ${s.typeName}.${i.name} to JSON`:`cannot encode message ${s.typeName} to JSON`,d=o instanceof Error?o.message:String(o);throw new Error(m+(d.length>0?`: ${d}`:""))}return r},readScalar:Wn,writeScalar:Gs,debug:zi}}function zi(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 Wn(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&&Si(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?xa(s):yt(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 rs.dec(e)}throw new Error}function sa(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: ${zi(e)}`)}function su(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 Gs(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?rs.enc(e):void 0}}function ru(){return au((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 y=e(a.V.T,d,!0);be(y!==void 0),i[m.toString()]=y}break;case"message":for(const[m,d]of Object.entries(s))i[m.toString()]=d.toJson(r);break;case"enum":const o=a.V.T;for(const[m,d]of Object.entries(s)){be(d===void 0||typeof d=="number");const y=n(o,d,!0,r.enumAsInteger);be(y!==void 0),i[m.toString()]=y}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 o=0;o<s.length;o++)i.push(e(a.T,s[o],!0));break;case"enum":for(let o=0;o<s.length;o++)i.push(n(a.T,s[o],!0,r.enumAsInteger));break;case"message":for(let o=0;o<s.length;o++)i.push(za(a.T,s[o]).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?za(a.T,s).toJson(r):void 0}})}function iu(){return{setEnumType:Ei,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 o=i[s].case;if(o===void 0)continue;const m=a.findField(o);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=Hn(d)),r[s]={case:o,value:d};break;case"scalar":case"enum":let y=i[s];a.T===w.BYTES&&(y=a.repeated?y.map(Hn):Hn(y)),r[s]=y;break;case"map":switch(a.V.kind){case"scalar":case"enum":if(a.V.T===w.BYTES)for(const[I,E]of Object.entries(i[s]))r[s][I]=Hn(E);else Object.assign(r[s],i[s]);break;case"message":const f=a.V.T;for(const I of Object.keys(i[s])){let E=i[s][I];f.fieldWrapper||(E=new f(E)),r[s][I]=E}break}break;case"message":const h=a.T;if(a.repeated)r[s]=i[s].map(f=>f instanceof h?f:new h(f));else if(i[s]!==void 0){const f=i[s];h.fieldWrapper?h.typeName==="google.protobuf.BytesValue"?r[s]=Hn(f):r[s]=f:r[s]=f instanceof h?f:new h(f)}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,o)=>a.T.equals(i,r[o]));case"scalar":return s.every((i,o)=>Xe(a.T,i,r[o]));case"enum":return s.every((i,o)=>Xe(w.INT32,i,r[o]))}throw new Error(`repeated cannot contain ${a.kind}`)}switch(a.kind){case"message":return a.T.equals(s,r);case"enum":return Xe(w.INT32,s,r);case"scalar":return Xe(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 Xe(w.INT32,s.value,r.value);case"scalar":return Xe(i.T,s.value,r.value)}throw new Error(`oneof cannot contain ${i.kind}`);case"map":const o=Object.keys(s).concat(Object.keys(r));switch(a.V.kind){case"message":const m=a.V.T;return o.every(y=>m.equals(s[y],r[y]));case"enum":return o.every(y=>Xe(w.INT32,s[y],r[y]));case"scalar":const d=a.V.T;return o.every(y=>Xe(d,s[y],r[y]))}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(ut);else if(s.kind=="map"){i=a[s.localName];for(const[o,m]of Object.entries(r))i[o]=ut(m)}else s.kind=="oneof"?i=s.findField(r.case)?{case:r.case,value:ut(r.value)}:{case:void 0}:i=ut(r);a[s.localName]=i}return t}}}function ut(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 Hn(n){return n instanceof Uint8Array?n:new Uint8Array(n)}class ou{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 Ui(n,e){const t=Pi(n);return e?t:pu(du(t))}function cu(n){return Ui(n,!1)}const lu=Pi;function Pi(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 uu=new Set(["constructor","toString","toJSON","valueOf"]),mu=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),Bi=n=>`${n}$`,du=n=>mu.has(n)?Bi(n):n,pu=n=>uu.has(n)?Bi(n):n;class yu{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=cu(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 l=vl("proto3",ru(),eu(),Object.assign(Object.assign({},iu()),{newFieldList(n){return new ou(n,fu)},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]=Ua(e.T,e.L);break}}}}));function fu(n){var e,t,a,s;const r=[];let i;for(const o of typeof n=="function"?n():n){const m=o;if(m.localName=Ui(o.name,o.oneof!==void 0),m.jsonName=(e=o.jsonName)!==null&&e!==void 0?e:lu(o.name),m.repeated=(t=o.repeated)!==null&&t!==void 0?t:!1,o.kind=="scalar"&&(m.L=(a=o.L)!==null&&a!==void 0?a:fn.BIGINT),m.packed=(s=o.packed)!==null&&s!==void 0?s:o.kind=="enum"||o.kind=="scalar"&&o.T!=w.BYTES&&o.T!=w.STRING,o.oneof!==void 0){const d=typeof o.oneof=="string"?o.oneof:o.oneof.name;(!i||i.name!=d)&&(i=new yu(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 Ys;(function(n){n[n.NoSideEffects=1]="NoSideEffects",n[n.Idempotent=2]="Idempotent"})(Ys||(Ys={}));class Ae extends Ve{constructor(e){super(),this.seconds=he.zero,this.nanos=0,l.util.initPartial(e,this)}fromJson(e,t){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${l.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 l.util.equals(Ae,e,t)}}Ae.runtime=l;Ae.typeName="google.protobuf.Timestamp";Ae.fields=l.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),l.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 o;if(r.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))o=i.fromJson(e.value,t);else{const m=Object.assign({},e);delete m["@type"],o=i.fromJson(m,t)}return this.packFrom(o),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 l.util.equals(Ye,e,t)}}Ye.runtime=l;Ye.typeName="google.protobuf.Any";Ye.fields=l.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 Vs(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 ye extends Error{constructor(e,t=ee.Unknown,a,s,r){super(gu(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 ye?e:e instanceof Error?e.name=="AbortError"?new ye(e.message,ee.Canceled):new ye(e.message,t,void 0,void 0,e):new ye(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 gu(n,e){return n.length?`[${Vs(e)}] ${n}`:`[${Vs(e)}]`}function Tu(n,e,t){try{const a=rs.dec(n);return e?e.fromBinary(a,t):a}catch(a){throw ye.from(a,ee.DataLoss)}}function Qi(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 $s(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 o=await e.read();if(o.done)break;a(o.value)}if(r===void 0){if(t.byteLength==0){s.close();return}s.error(new ye("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 qs(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 hu=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(o,m){i=n[r](i),s(o,m,i.done,i.value)})}}function s(r,i,o,m){Promise.resolve(m).then(function(d){r({value:d,done:o})},i)}},at=globalThis&&globalThis.__await||function(n){return this instanceof at?(this.v=n,this):new at(n)},ku=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(f){a[f]&&(s[f]=function(I){return new Promise(function(E,b){r.push([f,I,E,b])>1||o(f,I)})})}function o(f,I){try{m(a[f](I))}catch(E){h(r[0][3],E)}}function m(f){f.value instanceof at?Promise.resolve(f.value.v).then(d,y):h(r[0][2],f)}function d(f){o("next",f)}function y(f){o("throw",f)}function h(f,I){f(I),r.shift(),r.length&&o(r[0][0],r[0][1])}},Mu=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:at(n[s](i)),done:!1}:r?r(i):i}:r}};function Fi(n){return ku(this,arguments,function*(){yield at(yield*Mu(hu(n)))})}var Iu=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(o,m){i=n[r](i),s(o,m,i.done,i.value)})}}function s(r,i,o,m){Promise.resolve(m).then(function(d){r({value:d,done:o})},i)}};function Nu(n,e){return Qi(n,t=>{switch(t.kind){case P.Unary:return Su(e,n,t);case P.ServerStreaming:return Au(e,n,t);default:return null}})}function Su(n,e,t){return function(a,s,r){const i=new AbortController;return r=Gi(i,r),n.unary(e,t,i.signal,r.timeoutMs,r.headers,a,r.contextValues).then(o=>{var m,d;(m=r==null?void 0:r.onHeader)===null||m===void 0||m.call(r,o.header),(d=r==null?void 0:r.onTrailer)===null||d===void 0||d.call(r,o.trailer),s(void 0,o.message)},o=>{const m=ye.from(o,ee.Internal);m.code===ee.Canceled&&i.signal.aborted||s(m,new t.O)}),()=>i.abort()}}function Au(n,e,t){return function(a,s,r,i){const o=new AbortController;async function m(){var d,y,h,f,I,E;i=Gi(o,i);const b=await n.stream(e,t,i.signal,i.timeoutMs,i.headers,Fi([a]),i.contextValues);(I=i.onHeader)===null||I===void 0||I.call(i,b.header);try{for(var L=!0,O=Iu(b.message),x;x=await O.next(),d=x.done,!d;L=!0)f=x.value,L=!1,s(f)}catch(C){y={error:C}}finally{try{!L&&!d&&(h=O.return)&&await h.call(O)}finally{if(y)throw y.error}}(E=i.onTrailer)===null||E===void 0||E.call(i,b.trailer),r(void 0)}return m().catch(d=>{const y=ye.from(d,ee.Internal);y.code===ee.Canceled&&o.signal.aborted?r(void 0):r(y)}),()=>o.abort()}}function Gi(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 Yi=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(o,m){i=n[r](i),s(o,m,i.done,i.value)})}}function s(r,i,o,m){Promise.resolve(m).then(function(d){r({value:d,done:o})},i)}},xn=globalThis&&globalThis.__await||function(n){return this instanceof xn?(this.v=n,this):new xn(n)},Eu=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:xn(n[s](i)),done:!1}:r?r(i):i}:r}},bu=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(f){a[f]&&(s[f]=function(I){return new Promise(function(E,b){r.push([f,I,E,b])>1||o(f,I)})})}function o(f,I){try{m(a[f](I))}catch(E){h(r[0][3],E)}}function m(f){f.value instanceof xn?Promise.resolve(f.value.v).then(d,y):h(r[0][2],f)}function d(f){o("next",f)}function y(f){o("throw",f)}function h(f,I){f(I),r.shift(),r.length&&o(r[0][0],r[0][1])}};function Ut(n,e){return Qi(n,t=>{switch(t.kind){case P.Unary:return Du(e,n,t);case P.ServerStreaming:return vu(e,n,t);case P.ClientStreaming:return wu(e,n,t);case P.BiDiStreaming:return _u(e,n,t);default:return null}})}function Du(n,e,t){return async function(a,s){var r,i;const o=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,o.header),(i=s==null?void 0:s.onTrailer)===null||i===void 0||i.call(s,o.trailer),o.message}}function vu(n,e,t){return function(a,s){return Vi(n.stream(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,Fi([a]),s==null?void 0:s.contextValues),s)}}function wu(n,e,t){return async function(a,s){var r,i,o,m,d,y;const h=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,h.header);let f;try{for(var I=!0,E=Yi(h.message),b;b=await E.next(),r=b.done,!r;I=!0)m=b.value,I=!1,f=m}catch(L){i={error:L}}finally{try{!I&&!r&&(o=E.return)&&await o.call(E)}finally{if(i)throw i.error}}if(!f)throw new ye("protocol error: missing response message",ee.Internal);return(y=s==null?void 0:s.onTrailer)===null||y===void 0||y.call(s,h.trailer),f}}function _u(n,e,t){return function(a,s){return Vi(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 Vi(n,e){const t=function(){var a,s;return bu(this,arguments,function*(){const r=yield xn(n);(a=e==null?void 0:e.onHeader)===null||a===void 0||a.call(e,r.header),yield xn(yield*Eu(Yi(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 Ou(...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($i(this));for(const s of t)s.removeEventListener("abort",a)}return e}function ju(n){const e=new AbortController,t=()=>{e.abort(new ye("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 $i(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 Ws(){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 ra=128;function Hs(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 Lu="Content-Type",xu="Grpc-Timeout",qi="Grpc-Status",Wi="Grpc-Message",Ru="Grpc-Status-Details-Bin",Cu="User-Agent",zu="X-User-Agent",Uu="X-Grpc-Web",Pu="application/grpc-web+proto",Bu="application/grpc-web+json";class Ze extends Ve{constructor(e){super(),this.code=0,this.message="",this.details=[],l.util.initPartial(e,this)}static fromBinary(e,t){return new Ze().fromBinary(e,t)}static fromJson(e,t){return new Ze().fromJson(e,t)}static fromJsonString(e,t){return new Ze().fromJsonString(e,t)}static equals(e,t){return l.util.equals(Ze,e,t)}}Ze.runtime=l;Ze.typeName="google.rpc.Status";Ze.fields=l.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 Qu="0";function Hi(n){var e;const t=n.get(Ru);if(t!=null){const s=Tu(t,Ze);if(s.code==0)return;const r=new ye(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(qi);if(a!=null){if(a===Qu)return;const s=parseInt(a,10);return s in ee?new ye(decodeURIComponent((e=n.get(Wi))!==null&&e!==void 0?e:""),s,n):new ye(`invalid grpc-status: ${a}`,ee.Internal,n)}}function Zs(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 Zi(n,e){return e instanceof Ve?e:new n(e)}function Fu(n,e){function t(a){return a.done===!0?a:{done:a.done,value:Zi(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 Gu(n){var e;const t=Object.assign({},n);return(e=t.ignoreUnknownFields)!==null&&e!==void 0||(t.ignoreUnknownFields=!0),t}function Ks(n,e,t,a){const s=e?Js(n.I,a):Xs(n.I,t);return{parse:(e?Js(n.O,a):Xs(n.O,t)).parse,serialize:s.serialize}}function Js(n,e){return{parse(t){try{return n.fromBinary(t,e)}catch(a){const s=a instanceof Error?a.message:String(a);throw new ye(`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 ye(`serialize binary: ${s}`,ee.Internal)}}}}function Xs(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=Gu(e);return{parse(o){try{const m=r.decode(o);return n.fromJsonString(m,i)}catch(m){throw ye.from(m,ee.InvalidArgument)}},serialize(o){try{const m=o.toJsonString(i);return s.encode(m)}catch(m){throw ye.from(m,ee.Internal)}}}}function Yu(n){const e=Ji(n.next,n.interceptors),[t,a,s]=Ki(n),r=Object.assign(Object.assign({},n.req),{message:Zi(n.req.method.I,n.req.message),signal:t});return e(r).then(i=>(s(),i),a)}function Vu(n){const e=Ji(n.next,n.interceptors),[t,a,s]=Ki(n),r=Object.assign(Object.assign({},n.req),{message:Fu(n.req.method.I,n.req.message),signal:t});let i=!1;return t.addEventListener("abort",function(){var o,m;const d=n.req.message[Symbol.asyncIterator]();i||(o=d.throw)===null||o===void 0||o.call(d,this.reason).catch(()=>{}),(m=d.return)===null||m===void 0||m.call(d).catch(()=>{})}),e(r).then(o=>Object.assign(Object.assign({},o),{message:{[Symbol.asyncIterator](){const m=o.message[Symbol.asyncIterator]();return{next(){return m.next().then(d=>(d.done==!0&&(i=!0,s()),d),a)}}}}}),a)}function Ki(n){const{signal:e,cleanup:t}=ju(n.timeoutMs),a=Ou(n.signal,e);return[a.signal,function(r){const i=ye.from(e.aborted?$i(e):r);return a.abort(i),t(),Promise.reject(i)},function(){t(),a.abort()}]}function Ji(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 $u(){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 er(n){const e=Hi(n);if(e)throw e}function nr(n,e,t){const a=new Headers(t??{});return a.set(Lu,n?Pu:Bu),a.set(Uu,"1"),a.set(zu,"connect-es/1.1.2"),a.set(Cu,"connect-es/1.1.2"),e!==void 0&&a.set(xu,`${e}m`),a}function qu(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 tr(n,e){var t;if(n>=200&&n<300){const a=Hi(e);if(a)throw a;return{foundStatus:e.has(qi)}}throw new ye(decodeURIComponent((t=e.get(Wi))!==null&&t!==void 0?t:`HTTP ${n}`),qu(n),e)}var mn=globalThis&&globalThis.__await||function(n){return this instanceof mn?(this.v=n,this):new mn(n)},Wu=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(f){a[f]&&(s[f]=function(I){return new Promise(function(E,b){r.push([f,I,E,b])>1||o(f,I)})})}function o(f,I){try{m(a[f](I))}catch(E){h(r[0][3],E)}}function m(f){f.value instanceof mn?Promise.resolve(f.value.v).then(d,y):h(r[0][2],f)}function d(f){o("next",f)}function y(f){o("throw",f)}function h(f,I){f(I),r.shift(),r.length&&o(r[0][0],r[0][1])}};function Pt(n){var e;$u();const t=(e=n.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(a,s,r,i,o,m,d){var y;const{serialize:h,parse:f}=Ks(s,t,n.jsonOptions,n.binaryOptions);return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,await Yu({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!1,service:a,method:s,url:Zs(n.baseUrl,a,s),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:nr(t,i,o),contextValues:d??Ws(),message:m},next:async I=>{var E;const L=await((E=n.fetch)!==null&&E!==void 0?E:globalThis.fetch)(I.url,Object.assign(Object.assign({},I.init),{headers:I.header,signal:I.signal,body:qs(0,h(I.message))}));if(tr(L.status,L.headers),!L.body)throw"missing response body";const O=$s(L.body).getReader();let x,C;for(;;){const z=await O.read();if(z.done)break;const{flags:U,data:B}=z.value;if(U===ra){if(x!==void 0)throw"extra trailer";x=Hs(B);continue}if(C!==void 0)throw"extra message";C=f(B)}if(x===void 0)throw"missing trailer";if(er(x),C===void 0)throw"missing message";return{stream:!1,header:L.headers,message:C,trailer:x}}})},async stream(a,s,r,i,o,m,d){var y;const{serialize:h,parse:f}=Ks(s,t,n.jsonOptions,n.binaryOptions);function I(b,L,O){return Wu(this,arguments,function*(){const C=$s(b).getReader();if(L){if(!(yield mn(C.read())).done)throw"extra data for trailers-only";return yield mn(void 0)}let z=!1;for(;;){const U=yield mn(C.read());if(U.done)break;const{flags:B,data:R}=U.value;if((B&ra)===ra){if(z)throw"extra trailer";z=!0;const H=Hs(R);er(H),H.forEach((ne,se)=>O.set(se,ne));continue}if(z)throw"extra message";yield yield mn(f(R))}if(!z)throw"missing trailer"})}async function E(b){if(s.kind!=P.ServerStreaming)throw"The fetch API does not support streaming request bodies";const L=await b[Symbol.asyncIterator]().next();if(L.done==!0)throw"missing request message";return qs(0,h(L.value))}return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,Vu({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!0,service:a,method:s,url:Zs(n.baseUrl,a,s),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:nr(t,i,o),contextValues:d??Ws(),message:m},next:async b=>{var L;const x=await((L=n.fetch)!==null&&L!==void 0?L:globalThis.fetch)(b.url,Object.assign(Object.assign({},b.init),{headers:b.header,signal:b.signal,body:await E(b.message)})),{foundStatus:C}=tr(x.status,x.headers);if(!x.body)throw"missing response body";const z=new Headers;return Object.assign(Object.assign({},b),{header:x.headers,trailer:z,message:I(x.body,C,z)})}})}}}const Hu=l.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"}]),Zu=l.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Ku=l.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:Zu},{no:7,name:"public_name",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const Ju=l.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:l.getEnumType(Hu)},{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}]),Xu=l.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:Ju}]),is=l.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:Ku}]);l.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:Xu}]);const em=l.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),nm=l.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:tm},{no:2,name:"data",kind:"message",T:is}]),tm=l.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),am=l.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),sm=l.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}]),rm=l.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:sm}]),im=l.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),om=l.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),cm=l.makeMessageType("streamlayer.users.MeRequest",[]),lm=l.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:is}]),um=l.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"}]),mm=l.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"}]),dm=l.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),pm=l.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"}]),ym=l.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),fm=l.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"}]),gm=l.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),Tm=l.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),hm=l.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:km}]),km=l.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),Mm=l.makeMessageType("streamlayer.users.InviteResponse",[]),Im=l.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}]),Nm=l.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:Sm},{no:2,name:"data",kind:"message",T:is,opt:!0}]),Sm=l.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"}),st={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:em,O:nm,kind:P.Unary},register:{name:"Register",I:am,O:rm,kind:P.Unary},requestPassword:{name:"RequestPassword",I:im,O:om,kind:P.Unary},me:{name:"Me",I:cm,O:lm,kind:P.Unary},invite:{name:"Invite",I:hm,O:Mm,kind:P.Unary},bypassAuth:{name:"BypassAuth",I:Im,O:Nm,kind:P.Unary},updateMetadata:{name:"UpdateMetadata",I:um,O:Tm,kind:P.Unary},updateAvatar:{name:"UpdateAvatar",I:mm,O:dm,kind:P.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:pm,O:ym,kind:P.Unary},updatePublicName:{name:"UpdatePublicName",I:fm,O:gm,kind:P.Unary}}},Am=async(n,e)=>{const t=Pt({baseUrl:n});return await Ut(st,t).requestPassword({id:e}),!0},Em=async(n,e)=>{const t=Pt({baseUrl:n});return await Ut(st,t).register({id:e}),!0},bm=async(n,e,t)=>{var i;const a=Pt({baseUrl:n}),r=await Ut(st,a).login({id:e,password:t});return(i=r==null?void 0:r.meta)==null?void 0:i.jwt};const Dm=N("div")({name:"Panel",class:"pkueuwk",propsAsIs:!1}),ar=N("form")({name:"Form",class:"fp66u19",propsAsIs:!1}),sr=N("div")({name:"FormTitle",class:"fwojs5e",propsAsIs:!1}),ia=N("div")({name:"FormDescription",class:"fwvt1dc",propsAsIs:!1}),oa=N("button")({name:"FormSubmit",class:"f16e2wbc",propsAsIs:!1}),vm=N("div")({name:"FormInputContainer",class:"f1xkchzs",propsAsIs:!1}),wm=N("div")({name:"Digits",class:"d132q1j",propsAsIs:!1}),_m=({login:n,anonymousLogin:e,host:t})=>{const[a,s]=Q.useState(""),[r,i]=Q.useState(""),[o,m]=Q.useState(""),d=async h=>{h.preventDefault();try{const f=a.replaceAll("+","");try{await Am(t,f)}catch{await Em(t,f)}i(f)}catch(f){window.alert(f)}},y=async h=>{if(h.preventDefault(),r&&o)try{const f=await bm(t,r,o);f&&n?await n(f):console.log("token",f)}catch(f){window.alert(f)}};return T.jsxs(Dm,{children:[!r&&T.jsxs("div",{children:[T.jsxs(ar,{onSubmit:d,children:[T.jsx(sr,{children:"Enter your phone number"}),T.jsx(ia,{children:"Enter your phone up for number to log in or sign an account."}),T.jsx(vm,{children:T.jsx(Xt,{value:a,onChange:h=>s(`${h}`)})}),T.jsx(oa,{disabled:!Xt.isValidPhoneNumber(a),type:"submit",children:"request code"})]}),e&&T.jsx(oa,{style:{display:"block",margin:"auto"},onClick:e,children:"anonymous login"})]}),r&&T.jsxs(ar,{onSubmit:y,children:[T.jsx(sr,{children:"Enter Verification Code"}),T.jsxs(ia,{children:["Please enter the verification code ",T.jsx("br",{}),"sent to ",T.jsx("b",{children:Xt.formatPhoneNumberIntl(a)})]}),T.jsx(wm,{children:T.jsx(Rc,{autoFocus:!0,allowedCharacters:"numeric",length:4,onChange:m})}),T.jsx(oa,{disabled:o.length!==4,type:"submit",children:"login"}),T.jsxs(ia,{children:["Didn't get 59 the code? ",T.jsx("br",{}),"Resend Code in",T.jsx(Ni,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const Om=N("div")({name:"Container",class:"c18fa2p6",propsAsIs:!1}),jm=N("div")({name:"Content",class:"cthywkn",propsAsIs:!1}),Lm=N("div")({name:"OnboardingHeader",class:"obeaxxh",propsAsIs:!1}),xm=N("div")({name:"LeftBlock",class:"l1jam9nb",propsAsIs:!1}),Rm=N("div")({name:"RightBlock",class:"r17ziiq1",propsAsIs:!1}),Cm=N("img")({name:"GameIcon",class:"gxb34q2",propsAsIs:!1}),zm=N("img")({name:"SponsorLogo",class:"s10k8h8y",propsAsIs:!1}),Um=N("button")({name:"CloseBtn",class:"ca5j1zk",propsAsIs:!1}),Pm=N("img")({name:"IconClose",class:"i6wd7es",propsAsIs:!1}),Bm=N("button")({name:"OnboardingActionBtn",class:"onaxor0",propsAsIs:!1});const Qm=N("div")({name:"Container",class:"c1tc3ie1",propsAsIs:!1}),Fm=N("div")({name:"Content",class:"cenyr9j",propsAsIs:!1}),Gm=N("img")({name:"Graphic",class:"g17082th",propsAsIs:!1}),Ym=N("div")({name:"Headline",class:"hr58r57",propsAsIs:!1}),Vm=({graphic:n,headline:e})=>T.jsx(Qm,{children:T.jsxs(Fm,{children:[T.jsx(Gm,{alt:"graphic-img-instrucrions",src:n}),T.jsx(Ym,{children:e})]})});const $m=N("div")({name:"Container",class:"c1k109z3",propsAsIs:!1}),qm=N("div")({name:"Title",class:"tl3o9j9",propsAsIs:!1}),Wm=N("div")({name:"RulesList",class:"rp7yn67",propsAsIs:!1}),Hm=N("div")({name:"RulesItem",class:"r18km3gu",propsAsIs:!1}),Zm=N("div")({name:"RuleNumber",class:"rtu7hsj",propsAsIs:!1}),Km=N("div")({name:"RuleText",class:"rfkkuag",propsAsIs:!1}),Jm=({rules:n,rulesTitle:e,primaryColor:t})=>T.jsxs($m,{children:[T.jsx(qm,{children:e}),T.jsx(Wm,{children:n==null?void 0:n.map((a,s)=>T.jsxs(Hm,{children:[T.jsx(Zm,{style:{backgroundColor:t},children:s+1}),T.jsx(Km,{children:a})]},s))})]}),Xm="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyaWVuZHMiPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNNC4xOTIzMSA3LjAzMTI1QzIuNjYzNDYgNy4wMzEyNSAxLjQyMzA4IDguMTk5NzMgMS40MjMwOCA5LjYzOTk0QzEuNDIzMDggMTEuMDgwMiAyLjY2MzQ2IDEyLjI0ODYgNC4xOTIzMSAxMi4yNDg2QzUuNzIxMTUgMTIuMjQ4NiA2Ljk2MTU0IDExLjA4MDIgNi45NjE1NCA5LjYzOTk0QzYuOTYxNTQgOC4xOTk3MyA1LjcyMTE1IDcuMDMxMjUgNC4xOTIzMSA3LjAzMTI1Wk00LjE5MjMxIDEyLjI0ODZDMi4xNjIyNiAxMi4yNDg2IDAuNSAxMy44MTQ1IDAuNSAxNS43MjY5VjE3LjYyOUMwLjUgMTcuNjI5IDEuNDIzMDggMTguMzM1NiA0LjE5MjMxIDE4LjMzNTZDNi45NjE1NCAxOC4zMzU2IDcuODg0NjEgMTcuNjI5IDcuODg0NjEgMTcuNjI5VjE1LjcyNjlDNy44ODQ2MSAxMy44MTQ1IDYuMjIyMzYgMTIuMjQ4NiA0LjE5MjMxIDEyLjI0ODZaTTIwLjgwNzcgNy4wMzEyNUMxOS4yNzg4IDcuMDMxMjUgMTguMDM4NSA4LjE5OTczIDE4LjAzODUgOS42Mzk5NEMxOC4wMzg1IDExLjA4MDIgMTkuMjc4OCAxMi4yNDg2IDIwLjgwNzcgMTIuMjQ4NkMyMi4zMzY1IDEyLjI0ODYgMjMuNTc2OSAxMS4wODAyIDIzLjU3NjkgOS42Mzk5NEMyMy41NzY5IDguMTk5NzMgMjIuMzM2NSA3LjAzMTI1IDIwLjgwNzcgNy4wMzEyNVpNMjAuODA3NyAxMi4yNDg2QzE4Ljc3NzYgMTIuMjQ4NiAxNy4xMTU0IDEzLjgxNDUgMTcuMTE1NCAxNS43MjY5VjE3LjYyOUMxNy4xMTU0IDE3LjYyOSAxOC4wMzg1IDE4LjMzNTYgMjAuODA3NyAxOC4zMzU2QzIzLjU3NjkgMTguMzM1NiAyNC41IDE3LjYyOSAyNC41IDE3LjYyOVYxNS43MjY5QzI0LjUgMTMuODE0NSAyMi44Mzc3IDEyLjI0ODYgMjAuODA3NyAxMi4yNDg2Wk0xMi41IDEwLjUwOTVDMTAuOTcxMiAxMC41MDk1IDkuNzMwNzcgMTEuNjc4IDkuNzMwNzcgMTMuMTE4MkM5LjczMDc3IDE0LjU1ODQgMTAuOTcxMiAxNS43MjY5IDEyLjUgMTUuNzI2OUMxNC4wMjg4IDE1LjcyNjkgMTUuMjY5MiAxNC41NTg0IDE1LjI2OTIgMTMuMTE4MkMxNS4yNjkyIDExLjY3OCAxNC4wMjg4IDEwLjUwOTUgMTIuNSAxMC41MDk1Wk0xMi41IDE1LjcyNjlDMTAuNDcgMTUuNzI2OSA4LjgwNzY5IDE3LjI5MjggOC44MDc2OSAxOS4yMDUxVjIxLjEwNzNDOC44MDc2OSAyMS4xMDczIDkuNzMwNzcgMjEuODEzOCAxMi41IDIxLjgxMzhDMTUuMjY5MiAyMS44MTM4IDE2LjE5MjMgMjEuMTA3MyAxNi4xOTIzIDIxLjEwNzNWMTkuMjA1MUMxNi4xOTIzIDE3LjI5MjggMTQuNTMgMTUuNzI2OSAxMi41IDE1LjcyNjlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik04LjU4NDczIDEuNUM2Ljk2MzkyIDEuNSA1LjY0ODkzIDIuNzM4NzYgNS42NDg5MyA0LjI2NTZDNS42NDg5MyA1Ljc5MjQ1IDYuOTYzOTIgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFDMTAuMjA1NSA3LjAzMTIxIDExLjUyMDUgNS43OTI0NSAxMS41MjA1IDQuMjY1NkMxMS41MjA1IDIuNzM4NzYgMTAuMjA1NSAxLjUgOC41ODQ3MyAxLjVaTTguNTg0NzMgNy4wMzEyMUM4LjI5MDM4IDcuMDMxMjEgNy45OTIyMSA3LjAyNCA3LjY5Nzg3IDcuMTE3NjNDOC4yODY1NiA3Ljg1NTg0IDguNTg0NzMgOC43ODEzMSA4LjU4NDczIDkuNzk2ODFDOC41ODQ3MyAxMC4xNjQxIDguNDkyOTggMTAuNTI0MiA4LjQ5Mjk4IDEwLjg5MTVDOS4yNzY2MyA5Ljc4NjAxIDEwLjU0MTkgOS4wNTg1OSAxMi4wMDk4IDguODc0OTRDMTEuMzI1NiA3Ljc2OTQyIDEwLjA1MjYgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFaTTE2LjQxMzUgMS41QzE0Ljc5MjcgMS41IDEzLjQ3NzcgMi43Mzg3NiAxMy40Nzc3IDQuMjY1NkMxMy40Nzc3IDUuNzkyNDUgMTQuNzkyNyA3LjAzMTIxIDE2LjQxMzUgNy4wMzEyMUMxOC4wMzQzIDcuMDMxMjEgMTkuMzQ5MyA1Ljc5MjQ1IDE5LjM0OTMgNC4yNjU2QzE5LjM0OTMgMi43Mzg3NiAxOC4wMzQzIDEuNSAxNi40MTM1IDEuNVpNMTYuNDEzNSA3LjAzMTIxQzE0Ljk0NTYgNy4wMzEyMSAxMy42NzI3IDcuNzY5NDIgMTIuOTg4NCA4Ljg3NDk0QzE0LjQ1NjMgOS4wNTg1OSAxNS43MjE2IDkuNzg2MDEgMTYuNTA1MyAxMC44OTE1QzE2LjUwNTMgMTAuNTI0MiAxNi40MTM1IDEwLjE2NDEgMTYuNDEzNSA5Ljc5NjgxQzE2LjQxMzUgOC43ODEzMSAxNi43MTE3IDcuODU1ODQgMTcuMzAwNCA3LjExNzYzQzE3LjAwNiA3LjAyNCAxNi43MDc5IDcuMDMxMjEgMTYuNDEzNSA3LjAzMTIxWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC40Ii8+CjwvZz4KPC9zdmc+Cg==";const ed=N("div")({name:"Container",class:"ckff0a9",propsAsIs:!1}),nd=N("div")({name:"Content",class:"czw1kx1",propsAsIs:!1}),td=N("div")({name:"InviteGameIconWrap",class:"i2e7ir3",propsAsIs:!1}),ad=N("img")({name:"InviteGameIcon",class:"i2tfvcu",propsAsIs:!1}),sd=N("div")({name:"Heading",class:"hnq23ee",propsAsIs:!1}),rd=N("div")({name:"Subtext",class:"s2drh5v",propsAsIs:!1}),id=N("button")({name:"InvateBtn",class:"iiwwayv",propsAsIs:!1}),od=({inviteCardTitle:n,inviteCardSubtext:e,primaryColor:t})=>T.jsx(ed,{children:T.jsxs(nd,{children:[T.jsx(td,{style:{backgroundColor:t},children:T.jsx(ad,{alt:"invite-game-icon",src:Xm})}),T.jsx(sd,{children:n||""}),T.jsx(rd,{children:e||""}),T.jsx(id,{onClick:()=>{},style:{backgroundColor:t},children:"Invite friends!"})]})}),In={steps:!1,rules:!1,inviteCard:!1},cd=({gamification:n,closeFeature:e,steps:t,gameIcon:a,sponsorLogo:s,rules:r,rulesBtnLabel:i,rulesTitle:o,primaryColor:m,inviteCardTitle:d,inviteCardSubtext:y,inviteCardBtnLabel:h})=>{const f=async()=>{await n.submitInplay()},I=()=>{e()},[E,b]=Q.useState(0),[L,O]=Q.useState(In);Q.useEffect(()=>{t!=null&&t.length?O({...In,steps:!0}):r!=null&&r.length?O({...In,rules:!0}):O({...In,inviteCard:!0})},[]);const x=Q.useCallback(()=>{t!=null&&t.length&&E<t.length-1?b(C=>++C):r!=null&&r.length&&L.steps?O({...In,rules:!0}):L.rules&&O({...In,inviteCard:!0})},[E,t==null?void 0:t.length,r==null?void 0:r.length,L,b,O]);return T.jsxs(Om,{children:[T.jsxs(Lm,{children:[T.jsx(xm,{children:a&&T.jsx(Cm,{alt:"sponsor-one-onboarding-icon",src:a})}),T.jsxs(Rm,{children:[s&&T.jsx(zm,{alt:"sponsor-two-onboarding-icon",src:s}),T.jsx(Um,{onClick:I,children:T.jsx(Pm,{alt:"icon-close-onboarding",src:Rt})})]})]}),T.jsxs(jm,{children:[L.steps&&(t==null?void 0:t.length)&&T.jsx(Vm,{graphic:t[E].graphic,headline:t[E].headline}),L.rules&&T.jsx(Jm,{rules:r,rulesTitle:o,primaryColor:m}),L.inviteCard&&T.jsx(od,{inviteCardTitle:d,inviteCardSubtext:y,primaryColor:m})]}),T.jsx(Bm,{onClick:L.inviteCard?f:x,children:L.rules?i||"Got it!":L.inviteCard?h||"Play now!":"Next"})]})},Ee=l.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"}]),ld=l.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"}]),tn=l.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"}]),ud=l.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"}]),md=l.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"}]),en=l.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"}]),Xi=l.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"}]),dd=l.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"}]),pd=l.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"}]),yd=l.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"}]),fd=l.makeEnum("streamlayer.interactive.QuestionAutoPostStart",[{no:0,name:"QUESTION_AUTO_POST_START_NONE",localName:"NONE"},{no:1,name:"QUESTION_AUTO_POST_START_TIME",localName:"TIME"}]),gd=l.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),Td=l.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"}]),hd=l.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"}]),os=l.makeMessageType("streamlayer.interactive.QuestionAppearance",()=>[{no:1,name:"layout",kind:"enum",T:l.getEnumType(md)},{no:2,name:"images",kind:"enum",T:l.getEnumType(en)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:l.getEnumType(ud)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),Qn=l.makeMessageType("streamlayer.interactive.Sponsorship",()=>[{no:1,name:"logo",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Bt=l.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:l.getEnumType(Xi)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:l.getEnumType(en)}]),kd=l.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}]),Md=l.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}]),an=l.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),Id=l.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}]),Nd=l.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),Sd=l.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),Ad=l.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:Sd}]),cs=l.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:Ed,oneof:"options"},{no:2,name:"trivia",kind:"message",T:bd,oneof:"options"},{no:3,name:"prediction",kind:"message",T:Dd,oneof:"options"},{no:4,name:"factoid",kind:"message",T:vd,oneof:"options"},{no:5,name:"tweet",kind:"message",T:wd,oneof:"options"},{no:6,name:"promotion",kind:"message",T:Od,oneof:"options"}]),Ed=l.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),bd=l.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:an},{no:2,name:"incorrect_feedback",kind:"message",T:an},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),Dd=l.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:an},{no:2,name:"incorrect_feedback",kind:"message",T:an}],{localName:"QuestionOptions_PredictionOptions"}),vd=l.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:Id},{no:4,name:"web_link",kind:"message",T:Nd}],{localName:"QuestionOptions_FactoidOptions"}),wd=l.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:_d}],{localName:"QuestionOptions_TweetOptions"}),_d=l.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"}),Od=l.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(dd)},{no:2,name:"sponsor",kind:"message",T:Qn},{no:3,name:"banner",kind:"message",T:Ad},{no:4,name:"enable_wallet",kind:"enum",T:l.getEnumType(pd)}],{localName:"QuestionOptions_PromotionOptions"}),jd=l.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}]),Ld=l.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),eo=l.makeMessageType("streamlayer.interactive.Question",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ee)},{no:3,name:"subject",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:cs},{no:5,name:"appearance",kind:"message",T:os},{no:6,name:"sponsorship",kind:"message",T:Qn},{no:7,name:"notification",kind:"message",T:Bt},{no:8,name:"answers",kind:"message",T:kd,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(tn)},{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:jd,repeated:!0},{no:18,name:"bypass_notifications",kind:"message",T:ms},{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:l.getEnumType(ld)},{no:22,name:"ai",kind:"message",T:Ld}]),ls=l.makeMessageType("streamlayer.interactive.ExtendedQuestion",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ee)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"options",kind:"message",T:cs},{no:5,name:"appearance",kind:"message",T:os},{no:6,name:"sponsorship",kind:"message",T:Qn},{no:7,name:"notification",kind:"message",T:Bt},{no:8,name:"answers",kind:"message",T:Md,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(tn)},{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:ms}]);l.makeMessageType("streamlayer.interactive.QuestionTimeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ee)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"activated_at",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:l.getEnumType(tn)},{no:6,name:"options",kind:"message",T:cs},{no:7,name:"notification",kind:"message",T:Bt}]);const no=l.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:Qn},{no:4,name:"onboarding_enabled",kind:"scalar",T:8},{no:5,name:"question",kind:"message",T:xd},{no:6,name:"sponsors",kind:"message",T:zd},{no:7,name:"notification",kind:"message",T:Ud},{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:Pd},{no:11,name:"bypass_notifications",kind:"message",T:ms},{no:12,name:"importer_collaboration",kind:"message",T:Wd}]),xd=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:os},{no:2,name:"trivia",kind:"message",T:Rd},{no:3,name:"prediction",kind:"message",T:Cd},{no:4,name:"correct_feedbacks",kind:"message",T:an,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:an,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),Rd=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),Cd=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),zd=l.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:Qn,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),Ud=l.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:l.getEnumType(Xi)},{no:4,name:"image_mode",kind:"enum",T:l.getEnumType(en)}],{localName:"EventModeration_NotificationSettings"}),Pd=l.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:l.getEnumType(yd)},{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:l.getEnumType(fd)},{no:5,name:"start_options",kind:"message",T:Bd}]),Bd=l.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:Qd,oneof:"options"}]),Qd=l.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions.TimeOptions",()=>[{no:1,name:"timestamp",kind:"scalar",T:4}],{localName:"QuestionAutoPostStartOptions_TimeOptions"});l.makeMessageType("streamlayer.interactive.AnswerData",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13}]);const us=l.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}]),Fd=l.makeMessageType("streamlayer.interactive.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.interactive.QuestionStats",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"question",kind:"message",T:Gd},{no:3,name:"statistics",kind:"message",T:Yd,repeated:!0}]);const Gd=l.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:l.getEnumType(tn)}],{localName:"QuestionStats_QuestionData"}),Yd=l.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:Vd}]),Vd=l.makeMessageType("streamlayer.interactive.AnswerVotesStats.AnswerVotesData",()=>[{no:1,name:"count",kind:"scalar",T:13},{no:2,name:"percentage",kind:"scalar",T:13}],{localName:"AnswerVotesStats_AnswerVotesData"});l.makeMessageType("streamlayer.interactive.ServerNotificationOptions",()=>[{no:1,name:"silence",kind:"scalar",T:8},{no:2,name:"skip_update",kind:"scalar",T:8}]);const ms=l.makeMessageType("streamlayer.interactive.BypassNotifications",()=>[{no:1,name:"in_app_silence",kind:"enum",T:l.getEnumType(Td)}]),$d=l.makeMessageType("streamlayer.interactive.ImportError",()=>[{no:1,name:"row_id",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}]),qd=l.makeMessageType("streamlayer.interactive.ImportProgress",()=>[{no:1,name:"import_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:l.getEnumType(hd)},{no:3,name:"errors",kind:"message",T:$d,repeated:!0},{no:4,name:"last_updated",kind:"message",T:Ae}]),Wd=l.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:qd}}]),Kn=l.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"}]),to=l.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:eo},{no:2,name:"notification",kind:"message",T:Bt},{no:3,name:"moderation",kind:"message",T:no}]),Hd=l.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]),Zd=l.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Kd}]),Kd=l.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:to}],{localName:"SubscriptionResponse_SubscriptionResponseData"}),Jd=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]),Xd=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:ep}]),ep=l.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:ds,repeated:!0}],{localName:"VotingSubscriptionResponse_VotingSubscriptionResponseData"}),np=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:ls}]),tp=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),ap=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:sp}]),sp=l.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:np}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),rp=l.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:ls}]),ip=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),op=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:cp}]),cp=l.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:rp}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"}),lp=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:up}]),up=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"}),mp=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:dp}]),dp=l.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:to}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"}),pp=l.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),yp=l.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:fp}]),fp=l.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:eo}],{localName:"GetQuestionResponse_GetQuestionResponseData"}),gp=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Tp=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:hp}]),hp=l.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:ls}],{localName:"QuestionDetailResponse_QuestionDetailResponseData"}),ds=l.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}]),kp=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:Mp}]),Mp=l.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"}),Ip=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:Np}]),Np=l.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:ds,repeated:!0}],{localName:"SubmitAnswerResponse_SubmitAnswerResponseData"}),Sp=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:Ap}]),Ap=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"}),Ep=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]),bp=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:Dp}]),Dp=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:l.getEnumType(gd)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"}),vp=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:wp}]),wp=l.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:ds,repeated:!0}],{localName:"SkipQuestionResponse_SkipQuestionResponseData"}),_p=l.makeMessageType("streamlayer.interactive.feed.PickHistoryRequest",()=>[{no:1,name:"question_type",kind:"enum",T:l.getEnumType(Ee),repeated:!0},{no:3,name:"event_id",kind:"scalar",T:9},{no:2,name:"pagination",kind:"message",T:us}]),Op=l.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:l.getEnumType(Kn)},{no:4,name:"question_type",kind:"enum",T:l.getEnumType(Ee)},{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:l.getEnumType(tn)}]),jp=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Lp,repeated:!0},{no:2,name:"meta",kind:"message",T:xp}]),Lp=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Op}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),xp=l.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"}),Rp=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Cp=l.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:l.getEnumType(en)}]),zp=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Up,repeated:!0}]),Up=l.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:Cp}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"}),Pp=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Bp=l.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}]),Qp=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Fp,repeated:!0}]),Fp=l.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:Bp}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),Gp=l.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:Yp},{no:3,name:"moderation",kind:"message",T:no}]),Yp=l.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]),Vp=l.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),$p=l.makeMessageType("streamlayer.interactive.feed.GetResponse",()=>[{no:1,name:"data",kind:"message",T:qp}]),qp=l.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:Gp}],{localName:"GetResponse_GetResponseData"}),Wp=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Hp=l.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}]),Zp=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Kp,repeated:!0}]),Kp=l.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:Hp}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),Jp=l.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}]),Xp=l.makeMessageType("streamlayer.sdkSettings.game.common.GameMedia",()=>[{no:1,name:"game_icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),ey=l.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),ny=l.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:Xp},{no:6,name:"appearance",kind:"message",T:Jp},{no:7,name:"prizes",kind:"message",T:ey,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),ty=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),ay=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),sy=l.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:ty},{no:7,name:"appearance",kind:"message",T:ay},{no:8,name:"completed",kind:"scalar",T:8}]),ry=l.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}]),iy=l.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:ry,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),oy=l.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}]),cy=l.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}]),ly=l.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:ny},{no:2,name:"title_card",kind:"message",T:sy},{no:3,name:"onboarding",kind:"message",T:iy},{no:4,name:"rules",kind:"message",T:oy},{no:5,name:"invite_card",kind:"message",T:cy},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),uy=l.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:an,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:an,repeated:!0}]),my=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationNotifications",()=>[{no:1,name:"default_image",kind:"scalar",T:9},{no:2,name:"image_mode",kind:"enum",T:l.getEnumType(en)}]),dy=l.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:Qn,repeated:!0}]),py=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:uy},{no:2,name:"notifications",kind:"message",T:my},{no:3,name:"sponsorships",kind:"message",T:dy}]),Oe=l.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"}]),yy=l.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"}]),fy=l.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"}]),ps=l.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"}]),gy=l.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"}]),ao=l.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),Ty=l.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"}]),hy=l.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"}]),ky=l.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"}]);l.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 My=l.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),Iy=l.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:l.getEnumType(yy)}]),Ny=l.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),so=l.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:Sy}]),Sy=l.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"}),rr=l.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:Iy,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:l.getEnumType(fy)},{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:Ny}]),Ay=l.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(ao)},{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:l.getEnumType(ps)}]),Et=l.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:l.getEnumType(ps)},{no:5,name:"is_default",kind:"enum",T:l.getEnumType(gy)}]),Ey=l.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(ao)},{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:l.getEnumType(ps)},{no:5,name:"default_channel",kind:"message",T:Et},{no:6,name:"channels",kind:"message",T:Et,repeated:!0}]),ro=l.makeMessageType("streamlayer.sdkSettings.StreamSettings",()=>[{no:1,name:"overlays",kind:"message",T:Qt,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:so},{no:10,name:"getstream",kind:"message",T:Ey}]),by=l.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:Dy,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}]),Dy=l.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"}),io=l.makeMessageType("streamlayer.sdkSettings.OrganizationSettings",()=>[{no:1,name:"overlays",kind:"message",T:Qt,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:so},{no:13,name:"pub",kind:"message",T:by},{no:14,name:"getstream",kind:"message",T:Ay}]),vy=l.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:ly},{no:2,name:"moderation",kind:"message",T:py},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:l.getEnumType(Ty)}]),ir=l.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:Et},{no:2,name:"channels",kind:"message",T:Et,repeated:!0}]),vn=l.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:My,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:rr,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:rr,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:vy,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:ir,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:ir,oneof:"overlay_settings"}]),wy=l.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:vn},{no:2,name:"global_preset",kind:"message",T:vn},{no:3,name:"preset",kind:"message",T:vn},{no:4,name:"stream",kind:"message",T:vn}]),Qt=l.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(Oe)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:vn},{no:6,name:"meta",kind:"message",T:wy},{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"}]);l.makeMessageType("streamlayer.sdkSettings.SdkOverlayUpdateData",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(Oe)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:vn},{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"}]);l.makeMessageType("streamlayer.sdkSettings.OverlaysListRequest",[]);l.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse",()=>[{no:1,name:"data",kind:"message",T:_y}]);const _y=l.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse.OverlaysListResponseData",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:Qt,repeated:!0}],{localName:"OverlaysListResponse_OverlaysListResponseData"});l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Oy}]);const Oy=l.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"});l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:jy}]);const jy=l.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"});l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Ly}]);const Ly=l.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"});l.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}]);l.makeMessageType("streamlayer.sdkSettings.RegisterTwitterResponse",[]);l.makeMessageType("streamlayer.sdkSettings.Preset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:Ry},{no:3,name:"settings",kind:"message",T:xy}]);const xy=l.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:Qt,repeated:!0},{no:2,name:"advertising",kind:"message",T:oo}]),Ry=l.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:l.getEnumType(hy)},{no:2,name:"value",kind:"scalar",T:9}]),Cy=l.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:or},{no:2,name:"videos",kind:"message",T:or}]),or=l.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}]),zy=l.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:Cy}}]);l.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:zy,repeated:!0}]);const Uy=l.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:l.getEnumType(ky)}]),Py=l.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}]),By=l.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:Uy,repeated:!0},{no:3,name:"videos",kind:"message",T:Py,repeated:!0}]),Qy=l.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:l.getEnumType(Oe)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:By}},{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}]),oo=l.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:Qy}}]);l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Fy}]);const Fy=l.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"});l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"token",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Gy}]);const Gy=l.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"});l.makeMessageType("streamlayer.sdkSettings.GetApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Yy}]);const Yy=l.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"});l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse",()=>[{no:1,name:"data",kind:"message",T:Vy}]);const Vy=l.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"}),$y="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMTQuODA2MSA2LjczNjg0IDE2IDUuNjA1NzcgMTYgNC4yMTA1M1YyLjUyNjMyQzE2IDEuMTMxMDcgMTQuODA2MSAwIDEzLjMzMzMgMEgyLjY2NjY3Wk00LjQ0NDQ2IDEwLjk0NzNIMTMuMzMzM0MxMy44MjQzIDEwLjk0NzMgMTQuMjIyMiAxMS4zMjQzIDE0LjIyMjIgMTEuNzg5NFYxMy40NzM2QzE0LjIyMjIgMTMuOTM4NyAxMy44MjQzIDE0LjMxNTcgMTMuMzMzMyAxNC4zMTU3SDQuNDQ0NDZWMTAuOTQ3M1pNMCAxMS43ODk0QzAgMTAuMzk0MiAxLjE5MzkxIDkuMjYzMSAyLjY2NjY3IDkuMjYzMUgxMy4zMzMzQzE0LjgwNjEgOS4yNjMxIDE2IDEwLjM5NDIgMTYgMTEuNzg5NFYxMy40NzM2QzE2IDE0Ljg2ODkgMTQuODA2MSAxNS45OTk5IDEzLjMzMzMgMTUuOTk5OUgyLjY2NjY3QzEuMTkzOTEgMTUuOTk5OSAwIDE0Ljg2ODkgMCAxMy40NzM2VjExLjc4OTRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KPC9nPgo8L3N2Zz4K",qy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1ByZWRpY2l0b24iPgo8cGF0aCBpZD0iSWNvbi9QcmVkaWN0aW9uIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE2IDcuMDA1MjJDMTYgNy4wMDUyMiA5LjIwMDQ4IDYuODE2MDcgOS4yMDA0OCAwQzkuMjAwNDggNi4zNjE2OCAzLjI3NzI5IDYuOTUwNTYgMi40ODc1NiA3LjAwMDc4TDIuNDAwOTQgNy4wMDUyMkMyLjQwMDk0IDcuMDA1MjIgOS4yMDA0OCA3LjE5NDM1IDkuMjAwNDggMTQuMDEwNEM5LjIwMDQ4IDcuNjQ4NzcgMTUuMTIzNCA3LjA1OTg5IDE1LjkxMzEgNy4wMDk2NEwxNiA3LjAwNTIyWk02Ljk3MzgyIDEyLjU2NTJDNi45NzM4MiAxMi41NjUyIDMuNDg2OTEgMTIuNDcyNCAzLjQ4NjkxIDkuMTMwMzNDMy40ODY5MSAxMi4yNDk2IDAuNDQ5NDAyIDEyLjUzODQgMC4wNDQ0MTg2IDEyLjU2M0wwIDEyLjU2NTJDMCAxMi41NjUyIDMuNDg2OTEgMTIuNjU3OSAzLjQ4NjkxIDE2QzMuNDg2OTEgMTIuODgwNyA2LjUyNDI5IDEyLjU5MiA2LjkyOTI3IDEyLjU2NzNMNi45NzM4MiAxMi41NjUyWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",Wy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1RyaXZpYSI+CjxwYXRoIGlkPSJOb3RpZmljYXRpb24vSWNvbi9Ucml2aWEiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi4wMTY2MyAxLjM4MDhDMC43Mzk5MTMgMS41NTU4NiAtMC4xNTMxNTMgMi43MzI3NiAwLjAyMTkxMiA0LjAwOTQ4TDEuMzgwOCAxMy45MTk2QzEuNTU1ODYgMTUuMTk2MyAyLjczMjc2IDE2LjA4OTQgNC4wMDk0OCAxNS45MTQzTDEzLjkxOTYgMTQuNTU1NEMxNS4xOTYzIDE0LjM4MDMgMTYuMDg5NCAxMy4yMDM0IDE1LjkxNDMgMTEuOTI2N0wxNC41NTU0IDIuMDE2NjNDMTQuMzgwMyAwLjczOTkxMyAxMy4yMDM0IC0wLjE1MzE1MyAxMS45MjY3IDAuMDIxOTEyTDIuMDE2NjMgMS4zODA4Wk05LjU5NjEzIDMuNzg4QzkuMTE0MzEgMy40Njk5MSA4LjQ3ODEzIDMuMzAxNTEgNy43NTY2IDMuMzAxNTFDNy41NDM3NyAzLjMwMTUxIDcuMzI2MjUgMy4zMTY3MSA3LjEwODcyIDMuMzQ0NzhDNi4zODgzNiAzLjQ0MDY3IDUuNjg5MDEgMy43OTAzNCA1LjE4OTY1IDQuMzAxMzhDNC42ODQ0NSA0LjgyMDYyIDQuNDM3NyA1LjQ1NTYzIDQuNTE3MjIgNi4wNDE1MUM0LjU3NDUyIDYuNDc0MiA0LjkwMDc4IDYuNzUzNyA1LjM0NjM1IDYuNzUzN0M1LjM5NDI5IDYuNzUzNyA1LjQ0MzQxIDYuNzUwMiA1LjQ5MTM2IDYuNzQ0MzVDNi4wODc3OCA2LjY2NDgzIDYuMjE2NDIgNi4yNTQzNiA2LjM0MDM2IDUuODU2NzVMNi4zNDA0NSA1Ljg1NjQ4QzYuNDgxOTIgNS40MDQwMSA2LjYxNTM0IDQuOTc3MzEgNy4zODU4NSA0Ljg3NDQ0QzcuNDY1MzcgNC44NjM5MSA3LjU0MTM4IDQuODU4MDYgNy42MTUwNiA0Ljg1ODA2QzguMTY5MzkgNC44NTgwNiA4LjUxNDM2IDUuMTUwNDIgOC41ODQ1NCA1LjY4MjUyQzguNjUzNTMgNi4yMDI5MyA4LjI0MzA3IDYuNjE4MDcgNy44MDY4NCA3LjA1NjZMNy44MDM5MyA3LjA1OTU0QzcuMzE1ODIgNy41NTIzMSA2Ljc2MzkgOC4xMDk1IDYuODY4OTUgOC45MDA4M0M2Ljg5NTg1IDkuMTA1NDggNi45ODU5IDkuMjk0OTMgNy4xMjI3MiA5LjQzNjQ0QzcuMjc4MjYgOS41OTkgNy40ODI5IDkuNjg0MzYgNy43MTMzMSA5LjY4NDM2QzcuNzU1NDEgOS42ODQzNiA3Ljc5ODY4IDkuNjgyMDMgNy44NDMxMSA5LjY3NjE4QzguNDY2OTEgOS41OTMyNCA4LjU1MTYyIDkuMjMxMzkgOC42MzMzOCA4Ljg4MjFMOC42MzM2NSA4Ljg4MDk3TDguNjM2NjEgOC44Njg1OUM4LjY2NzIzIDguNzQwMyA4LjY5ODc3IDguNjA4MTMgOC43NTk5NSA4LjQ4ODA0QzguODQ2NDkgOC4zMTYxMyA5LjA2MjgzIDguMTEyNjUgOS4zMTQyOCA3Ljg3ODc1QzkuOTE0MiA3LjMxODU4IDEwLjczNCA2LjU1MTQzIDEwLjU4MiA1LjQxNTg5QzEwLjQ4NzIgNC43MDYwMyAxMC4xNTUxIDQuMTU3NTcgOS41OTYxMSAzLjc4ODAyTDkuNTk2MTMgMy43ODhaTTguMTE2MDUgMTAuMjhDOC4wNjkyNyAxMC4yOCA4LjAyMTMyIDEwLjI4MzYgNy45NzQ1NCAxMC4yODk0QzcuMzgzOTYgMTAuMzY4OSA2Ljk2NzY1IDEwLjkxMjcgNy4wNDU5OSAxMS41MDMzQzcuMTE3MzMgMTIuMDM3NyA3LjU3ODA4IDEyLjQ0MTIgOC4xMTcyIDEyLjQ0MTJDOC4xNjM5NyAxMi40NDEyIDguMjExOTIgMTIuNDM3NyA4LjI1OTg3IDEyLjQzMThDOC44NTA0NSAxMi4zNTIzIDkuMjY1NiAxMS44MDg1IDkuMTg4NDIgMTEuMjE3OUM5LjExNTkxIDEwLjY4MjMgOC42NTUxNyAxMC4yOCA4LjExNjA1IDEwLjI4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",Hy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEzLjQzMTUgMy4xODI0Nkw1LjUzMzIxIDExLjA4MDhMMS45OTc3MSA3LjU0NTI3QzEuNTQwNTYgNy4wODgxMSAwLjc5OTkxMyA3LjA4ODExIDAuMzQyODY0IDcuNTQ1MjdDLTAuMTE0Mjg4IDguMDAyNDIgLTAuMTE0Mjg4IDguNzQzMDcgMC4zNDI4NjQgOS4yMDAxMUw0LjcwNTY3IDEzLjU2MjlDNC45MzMzMSAxMy43OTA2IDUuMjM0MTUgMTMuOTA2MyA1LjUzMzA3IDEzLjkwNjNDNS44MzIwMiAxMy45MDYzIDYuMTMwOTYgMTMuNzkyNCA2LjM2MDQ4IDEzLjU2MjlMMTUuMDg2MSA0LjgzNzMxQzE1LjU0MzIgNC4zODAxNiAxNS41NDMyIDMuNjM5NTEgMTUuMDg2MSAzLjE4MjQ2QzE0LjYyOSAyLjcyNTMxIDEzLjg4ODQgMi43MjUzMSAxMy40MzEyIDMuMTgyNDZIMTMuNDMxNVoiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",Zy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIyIiB5PSIwLjUwNjEwNCIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDIgMC41MDYxMDQpIiBmaWxsPSIjOWUwYTFmIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB4PSIwLjMzMzAwOCIgeT0iMTIuMTcyOSIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwLjMzMzAwOCAxMi4xNzI5KSIgZmlsbD0iIzllMGExZiIvPgo8L2c+Cjwvc3ZnPgo=",Ba="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const Ky=N("div")({name:"Panel",class:"p1fl4kim",propsAsIs:!1}),Jy=N("div")({name:"QuestionTypeIconWrap",class:"qqhwgfn",propsAsIs:!1}),Xy=N("img")({name:"QuestionTypeIcon",class:"q1lyf5nv",propsAsIs:!1}),ef=N("div")({name:"QuestionContent",class:"qlmoky7",propsAsIs:!1}),nf=N("div")({name:"QuestionTypeLabel",class:"qp1y7hu",propsAsIs:!1}),tf=N("div")({name:"QuestionSubject",class:"q1de583k",propsAsIs:!1}),af=N("button")({name:"QuestionActionTitle",class:"ql7tvph",propsAsIs:!1}),sf=N("button")({name:"QuestionActionIcon",class:"qh0ibjl",propsAsIs:!1}),rf=N("img")({name:"QuestionStatusIcon",class:"q1bdpn1b",propsAsIs:!1}),of=N("span")({name:"QuestionTypeTitle",class:"q6tdooc",propsAsIs:!1}),cf=N("span")({name:"ExpiredQuestion",class:"e1f2al71",propsAsIs:!1}),lf={[Ee.POLL]:{label:"Poll",icon:$y},[Ee.TRIVIA]:{label:"Trivia",icon:Wy},[Ee.PREDICTION]:{label:"Prediction",icon:qy}},uf={[Kn.LOST]:Zy,[Kn.WON]:Hy,[Kn.UNSET]:Ba,[Kn.DNP]:Ba},mf=({questionId:n,questionType:e,questionStatus:t,subject:a,openForVoting:s,openQuestion:r,status:i})=>{const o=lf[e];return o===void 0?null:T.jsxs(Ky,{onClick:()=>r==null?void 0:r(n),children:[T.jsx(Jy,{children:T.jsx(Xy,{alt:"question-type-icon",src:o.icon})}),T.jsxs(ef,{children:[T.jsxs(nf,{children:[T.jsx(of,{children:o.label}),e===Ee.TRIVIA&&t===tn.RESOLVED&&T.jsx(cf,{children:"Expired"})]}),T.jsx(tf,{children:a||""})]}),s?T.jsx(af,{children:"play"}):T.jsx(sf,{children:T.jsx(rf,{alt:"question-status-icon",src:uf[i]})})]})};const df=N("div")({name:"Container",class:"c4iwna9",propsAsIs:!1}),pf=N("div")({name:"Title",class:"th1ieuk",propsAsIs:!1}),yf=N("div")({name:"ItemsContainer",class:"iiqbvdu",propsAsIs:!1}),ff=({questions:n,openQuestion:e})=>T.jsxs(df,{children:[T.jsx(pf,{children:"PICK HISTORY"}),T.jsx(yf,{children:n==null?void 0:n.map(t=>T.jsx(mf,{openQuestion:e,...t},t.questionId))})]}),gf="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0LjU1OTkyIDEwLjg0OTcgNC45NDY2MyAxMC4zOTUzIDUuMzQ3NjhDOS45NDEgNS43NDg3MiA5LjM3NDkgNi4wMTg0NyA4LjY5NzAxIDYuMTU2OTJDOS4wNTI3OCA1LjM4MzQ4IDkuMjMwNjYgNC40OTc4NiA5LjIzMDY2IDMuNTAwMDJIMTEuMDc2OFpNMTIgNC4xODc1VjMuMjcwODNDMTIgMy4wNzk4NiAxMS45MzI3IDIuOTE3NTQgMTEuNzk4MSAyLjc4Mzg1QzExLjY2MzUgMi42NTAxNyAxMS41IDIuNTgzMzMgMTEuMzA3NyAyLjU4MzMzSDkuMjMwNzdWMS44OTU4M0M5LjIzMDc3IDEuNTgwNzMgOS4xMTc3OSAxLjMxMDk4IDguODkxODMgMS4wODY1OUM4LjY2NTg2IDAuODYyMTk1IDguMzk0MjMgMC43NSA4LjA3NjkyIDAuNzVIMy45MjMwOEMzLjYwNTc3IDAuNzUgMy4zMzQxNCAwLjg2MjE5NSAzLjEwODE3IDEuMDg2NTlDMi44ODIyMSAxLjMxMDk4IDIuNzY5MjMgMS41ODA3MyAyLjc2OTIzIDEuODk1ODNWMi41ODMzM0gwLjY5MjMwOEMwLjQ5OTk5OSAyLjU4MzMzIDAuMzM2NTM5IDIuNjUwMTcgMC4yMDE5MjMgMi43ODM4NUMwLjA2NzMwNyAyLjkxNzU0IDAgMy4wNzk4NiAwIDMuMjcwODNWNC4xODc1QzAgNC41MjY0OCAwLjA5OTc1ODYgNC44Njc4NCAwLjI5OTI3OSA1LjIxMTU5QzAuNDk4Nzk5IDUuNTU1MzQgMC43NjgwMjcgNS44NjU2NyAxLjEwNjk3IDYuMTQyNThDMS40NDU5MiA2LjQxOTQ5IDEuODYxNzggNi42NTIyMyAyLjM1NDU3IDYuODQwODJDMi44NDczNiA3LjAyOTQxIDMuMzY1MzggNy4xMzU2MyAzLjkwODY1IDcuMTU5NTFDNC4xMTA1OCA3LjQxNzMyIDQuMzM4OTQgNy42NDQxIDQuNTkzNzUgNy44Mzk4NEM0Ljc3NjQ0IDguMDAyMTcgNC45MDI2NCA4LjE3NTI0IDQuOTcyMzYgOC4zNTkwNUM1LjA0MjA3IDguNTQyODYgNS4wNzY5MiA4Ljc1NjUxIDUuMDc2OTIgOUM1LjA3NjkyIDkuMjU3ODEgNS4wMDM2MSA5LjQ3NTA0IDQuODU2OTcgOS42NTE2OUM0LjcxMDM0IDkuODI4MzQgNC40NzU5NiA5LjkxNjY3IDQuMTUzODUgOS45MTY2N0MzLjc5MzI3IDkuOTE2NjcgMy40NzIzNiAxMC4wMjUzIDMuMTkxMTEgMTAuMjQyNUMyLjkwOTg1IDEwLjQ1OTcgMi43NjkyMyAxMC43MzMxIDIuNzY5MjMgMTEuMDYyNVYxMS41MjA4QzIuNzY5MjMgMTEuNTg3NyAyLjc5MDg3IDExLjY0MjYgMi44MzQxMyAxMS42ODU1QzIuODc3NCAxMS43Mjg1IDIuOTMyNjkgMTEuNzUgMyAxMS43NUg5QzkuMDY3MzEgMTEuNzUgOS4xMjI2IDExLjcyODUgOS4xNjU4NiAxMS42ODU1QzkuMjA5MTMgMTEuNjQyNiA5LjIzMDc3IDExLjU4NzcgOS4yMzA3NyAxMS41MjA4VjExLjA2MjVDOS4yMzA3NyAxMC43MzMxIDkuMDkwMTUgMTAuNDU5NyA4LjgwODg5IDEwLjI0MjVDOC41Mjc2NCAxMC4wMjUzIDguMjA2NzMgOS45MTY2NyA3Ljg0NjE1IDkuOTE2NjdDNy41MjQwNCA5LjkxNjY3IDcuMjg5NjYgOS44MjgzNCA3LjE0MzAzIDkuNjUxNjlDNi45OTYzOSA5LjQ3NTA0IDYuOTIzMDggOS4yNTc4MSA2LjkyMzA4IDlDNi45MjMwOCA4Ljc1NjUxIDYuOTU3OTMgOC41NDI4NiA3LjAyNzY0IDguMzU5MDVDNy4wOTczNiA4LjE3NTI0IDcuMjIzNTYgOC4wMDIxNyA3LjQwNjI1IDcuODM5ODRDNy42NjEwNiA3LjY0NDEgNy44ODk0MiA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",Tf=n=>n.split(/\s+/).map(e=>e[0]).join("").toUpperCase();const hf=N("div")({name:"Container",class:"c13i6lze",propsAsIs:!1}),kf=N("div")({name:"Indicator",class:"ix2bv9",propsAsIs:!1}),mt=({indicator:n,title:e})=>T.jsxs(hf,{children:[T.jsx(kf,{children:n}),T.jsx("p",{children:e})]});const Mf=N("div")({name:"Container",class:"c5ghaaw",propsAsIs:!1}),If=N("div")({name:"Title",class:"txfzjhj",propsAsIs:!1}),Nf=N("div")({name:"Indicator",class:"i1v0wmto",propsAsIs:!1}),cr=({indicator:n,title:e})=>T.jsxs(Mf,{children:[T.jsx(If,{children:e}),T.jsx(Nf,{children:n})]});const Sf=N("div")({name:"Container",class:"canai20",propsAsIs:!1}),Af=N("div")({name:"TopInfo",class:"tda0d57",propsAsIs:!1}),Ef=N("div")({name:"BottomInfo",class:"boqy4xv",propsAsIs:!1}),bf=N("div")({name:"User",class:"u1dtpq3t",propsAsIs:!1}),Df=N("img")({name:"Avatar",class:"ar4jfc",propsAsIs:!1}),vf=N("div")({name:"UserInfo",class:"u1trcvj0",propsAsIs:!1}),wf=N("div")({name:"UserName",class:"u1pie8mc",propsAsIs:!1}),_f=N("div")({name:"UserRating",class:"ucsljfb",propsAsIs:!1}),Of=N("img")({name:"TrophyIcon",class:"tyemu1i",propsAsIs:!1}),jf=N("div")({name:"Rts",class:"rggn4k7",propsAsIs:!1}),Lf=N("div")({name:"RtsIndicator",class:"rnmjsbm",propsAsIs:!1}),xf=N("div")({name:"Top",class:"t1i7e651",propsAsIs:!1}),Rf=N("div")({name:"Ranks",class:"r1mt107z",propsAsIs:!1}),Cf=N("div")({name:"AvatarPlaceholder",class:"apag0gc",propsAsIs:!1}),zf=N("button")({name:"UserAccountBtn",class:"uroanb5",propsAsIs:!1}),Uf=({avatar:n,name:e,points:t,grade:a,friendsRank:s,globalRank:r,winStreak:i,correct:o,incorrect:m,successRate:d})=>T.jsxs(Sf,{children:[T.jsxs(Af,{children:[T.jsxs(bf,{children:[T.jsxs(zf,{children:[n&&T.jsx(Df,{alt:"avatar",src:n}),!n&&T.jsx(Cf,{children:Tf(e)})]}),T.jsxs(vf,{children:[T.jsx(wf,{children:e}),T.jsxs(_f,{children:[T.jsx(Of,{alt:"rank-icon",src:gf}),T.jsxs(jf,{children:[T.jsx(Lf,{children:t||"-"}),"RTS"]}),T.jsxs(xf,{children:["TOP ",a,"%"]})]})]})]}),T.jsxs(Rf,{children:[T.jsx(cr,{title:"Friens rank",indicator:s||"-"}),T.jsx(cr,{title:"Global rank",indicator:r||"-"})]})]}),T.jsxs(Ef,{children:[T.jsx(mt,{indicator:i||"-",title:"Win streak"}),T.jsx(mt,{indicator:o||"-",title:"Correct"}),T.jsx(mt,{indicator:m||"-",title:"Incorrect"}),T.jsx(mt,{indicator:`${d||"-"}%`,title:"Success rate"})]})]}),Qa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",Pf="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",lr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const co=N("div")({name:"Container",class:"c4emhbe",propsAsIs:!1}),Bf=()=>co,Qf=N(Bf())({name:"AnsweredContainer",class:"a1a18ay2",propsAsIs:!0}),ur=N("div")({name:"ButtonPct",class:"bvdmnzn",propsAsIs:!1}),mr=N("button")({name:"Button",class:"bz55cek",propsAsIs:!1}),dr=N("img")({name:"Icon",class:"i1u5zlvm",propsAsIs:!1}),pr=N("span")({name:"Title",class:"tfilm7j",propsAsIs:!1}),yr=N("span")({name:"Indicators",class:"iqdzfbw",propsAsIs:!1}),fr=N("div")({name:"CheckIconWrap",class:"ciu4mnt",propsAsIs:!1}),ca=N("div")({name:"Percentage",class:"pl06bzo",propsAsIs:!1}),gr=N("img")({name:"CheckIcon",class:"c5bwq34",propsAsIs:!1}),Ff=({icon:n,id:e,title:t,questionId:a,disabled:s,percentage:r,onVote:i,toggleIsLoadingSubmitAnswer:o,correct:m,questionAnswered:d,hasCorrectAnswer:y,answered:h,points:f,questionType:I})=>{var E;return d&&h?T.jsxs(Qf,{"data-answeredCorrect":(E=!y||m)==null?void 0:E.toString(),"data-questionAnswered":"false",children:[T.jsx(ur,{style:{width:`${r}%`}}),T.jsxs(mr,{disabled:s,onClick:()=>i(a,e),children:[n&&T.jsx(dr,{alt:"option-icon",src:n}),T.jsx(pr,{children:t}),T.jsxs(yr,{children:[y&&m&&T.jsx(fr,{children:T.jsx(gr,{alt:"icon-correct",src:h?lr:Qa})}),T.jsxs(ca,{children:[r,"%"]})]})]})]}):T.jsxs(co,{"data-questionAnswered":d==null?void 0:d.toString(),children:[d&&T.jsx(ur,{style:{width:`${r}%`}}),T.jsxs(mr,{disabled:s,onClick:()=>{o(!0),i(a,e)},children:[n&&T.jsx(dr,{alt:"option-icon",src:n}),T.jsx(pr,{children:t}),d?T.jsxs(yr,{children:[y&&m&&T.jsx(fr,{children:T.jsx(gr,{alt:"icon-correct",src:h?lr:Qa})}),T.jsxs(ca,{children:[r,"%"]})]}):I===Ee.PREDICTION?T.jsxs(ca,{children:[f," pts"]}):null]})]})};const Gf=N("div")({name:"Container",class:"cgz6mxc",propsAsIs:!1}),Yf=N("div")({name:"Title",class:"ta6van7",propsAsIs:!1}),Vf=N("div")({name:"Options",class:"o1msgqq4",propsAsIs:!1}),$f=N("div")({name:"Loader",class:"lq1mbhd",propsAsIs:!1}),qf=N("div")({name:"Feedback",class:"f9kw2xt",propsAsIs:!1}),Wf=N("img")({name:"FeedbackIcon",class:"fn7neu6",propsAsIs:!1}),Hf=N("div")({name:"FeedbackTitle",class:"fpdq7m5",propsAsIs:!1}),Zf=N("div")({name:"FeedbackDescription",class:"f1ljy63t",propsAsIs:!1}),Kf=({title:n,questionId:e,options:t,questionAnswered:a,feedbackMessages:s,questionAnsweredCorrectly:r,questionType:i})=>{const[o,m]=Q.useState(!1),d=Q.useCallback(y=>{m(y)},[m]);return Q.useEffect(()=>{d(!1)},[t,d]),T.jsxs(Gf,{children:[T.jsx(Yf,{children:n}),T.jsxs(Vf,{children:[o&&T.jsx($f,{children:"Loading..."}),t.map(y=>T.jsx(Ff,{toggleIsLoadingSubmitAnswer:d,questionId:e,questionType:i,...y},y.id))]}),a&&i===Ee.TRIVIA&&T.jsxs(qf,{children:[T.jsx(Wf,{alt:"reaction-to-answer",src:r?Qa:Pf}),T.jsxs("div",{children:[T.jsx(Hf,{children:r?s.correctFeedback.title:s.incorrectFeedback.title}),T.jsx(Zf,{children:r?s.correctFeedback.description:s.incorrectFeedback.description})]})]})]})};class Jf{}window.storeLogger=Object.create(null);class Ft{constructor(e,t){A(this,"store");A(this,"name");this.store=e,this.name=t}getStore(){return this.store}}const Xf=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 Xn extends Ft{constructor(){super(...arguments);A(this,"getValues",()=>this.getStore().get());A(this,"getValue",t=>this.getStore().get()[t]);A(this,"setValue",(t,a)=>this.getStore().setKey(t,a));A(this,"subscribe",(...t)=>this.getStore().subscribe(...t));A(this,"unsubscribe",()=>this.getStore().off())}}const et=n=>De.map(n);var En=(n=>(n.ORGANIZATION="ORGANIZATION",n.STREAM="STREAM",n))(En||{});const eg={[Oe.BETTING]:"betting",[Oe.GAMES]:"games",[Oe.PUBLIC_CHAT]:"publicChat",[Oe.TWITTER]:"twitter"};var dn=(n=>(n.Ready="ready",n.Suspended="suspended",n))(dn||{});class lo{constructor({settings:e,...t},a){A(this,"status");A(this,"source");A(this,"config");A(this,"settings");A(this,"listeners",new Set);A(this,"settingsKey");A(this,"enable",()=>{this.status.set("ready")});A(this,"disable",()=>{this.status.set("suspended")});A(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])}}});A(this,"update",(e,t)=>{this.source==="STREAM"&&t==="ORGANIZATION"||(this.setFeatureConfig(e),this.source=t)});this.settingsKey=eg[t.type],this.status=De.atom("suspended"),this.config=new Xn(et(t),`feature:config:${this.settingsKey}`),this.settingsKey!==void 0&&(e==null?void 0:e.overlaySettings.case)===this.settingsKey?this.settings=new Xn(et(e.overlaySettings.value),`feature:settings:${this.settingsKey}`):this.settings=new Xn(et({}),`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 we extends Ft{constructor(){super(...arguments);A(this,"getValue",()=>this.getStore().get());A(this,"setValue",t=>this.getStore().set(t));A(this,"subscribe",t=>this.getStore().subscribe(t));A(this,"unsubscribe",()=>this.getStore().off())}getValues(){throw new Error("not implemented")}listen(t){return this.getStore().listen(t)}get(){return this.getStore().get()}}const _e=n=>De.atom(n),ng=(n,e)=>De.computed(n,e);class ze extends Ft{constructor(t,a,s){super(t,`api:${a}`);A(this,"atomStore");A(this,"getAtomStore",()=>this.atomStore);A(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});A(this,"getValues",()=>{throw new Error("not implemented")});A(this,"setValue",t=>this.getStore().set({loading:!1,data:t==null?void 0:t.data}));A(this,"subscribe",t=>this.getStore().subscribe(t));A(this,"unsubscribe",()=>{throw new Error("not implemented")});A(this,"invalidate",()=>{this.store.invalidate()});A(this,"listen",t=>this.getStore().listen(t));A(this,"key",()=>this.getStore().key);A(this,"off",()=>this.getStore().off());this.atomStore=De.atom(),s&&t.subscribe(r=>{this.atomStore.set(s(r))})}get(){throw new Error("not implemented")}}function fe(n){return typeof n=="function"}function tg(n){return fe(n==null?void 0:n.lift)}function Fn(n){return function(e){if(tg(e))return e.lift(function(t){try{return n(t,this)}catch(a){this.error(a)}});throw new TypeError("Unable to lift unknown Observable type")}}var Fa=function(n,e){return Fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(t[s]=a[s])},Fa(n,e)};function on(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Fa(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function ag(n,e,t,a){function s(r){return r instanceof t?r:new t(function(i){i(r)})}return new(t||(t=Promise))(function(r,i){function o(y){try{d(a.next(y))}catch(h){i(h)}}function m(y){try{d(a.throw(y))}catch(h){i(h)}}function d(y){y.done?r(y.value):s(y.value).then(o,m)}d((a=a.apply(n,e||[])).next())})}function uo(n,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},a,s,r,i;return i={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function o(d){return function(y){return m([d,y])}}function m(d){if(a)throw new TypeError("Generator is already executing.");for(;i&&(i=0,d[0]&&(t=0)),t;)try{if(a=1,s&&(r=d[0]&2?s.return:d[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,d[1])).done)return r;switch(s=0,r&&(d=[d[0]&2,r.value]),d[0]){case 0:case 1:r=d;break;case 4:return t.label++,{value:d[1],done:!1};case 5:t.label++,s=d[1],d=[0];continue;case 7:d=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!r||d[1]>r[0]&&d[1]<r[3])){t.label=d[1];break}if(d[0]===6&&t.label<r[1]){t.label=r[1],r=d;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(d);break}r[2]&&t.ops.pop(),t.trys.pop();continue}d=e.call(n,t)}catch(y){d=[6,y],s=0}finally{a=r=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Rn(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],a=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Cn(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var a=t.call(n),s,r=[],i;try{for(;(e===void 0||e-- >0)&&!(s=a.next()).done;)r.push(s.value)}catch(o){i={error:o}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(i)throw i.error}}return r}function zn(n,e,t){if(t||arguments.length===2)for(var a=0,s=e.length,r;a<s;a++)(r||!(a in e))&&(r||(r=Array.prototype.slice.call(e,0,a)),r[a]=e[a]);return n.concat(r||Array.prototype.slice.call(e))}function On(n){return this instanceof On?(this.v=n,this):new On(n)}function sg(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(f){a[f]&&(s[f]=function(I){return new Promise(function(E,b){r.push([f,I,E,b])>1||o(f,I)})})}function o(f,I){try{m(a[f](I))}catch(E){h(r[0][3],E)}}function m(f){f.value instanceof On?Promise.resolve(f.value.v).then(d,y):h(r[0][2],f)}function d(f){o("next",f)}function y(f){o("throw",f)}function h(f,I){f(I),r.shift(),r.length&&o(r[0][0],r[0][1])}}function rg(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 Rn=="function"?Rn(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(o,m){i=n[r](i),s(o,m,i.done,i.value)})}}function s(r,i,o,m){Promise.resolve(m).then(function(d){r({value:d,done:o})},i)}}var mo=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function po(n){return fe(n==null?void 0:n.then)}function yo(n){var e=function(a){Error.call(a),a.stack=new Error().stack},t=n(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var la=yo(function(n){return function(t){n(this),this.message=t?t.length+` errors occurred during unsubscription:
17
+ `+t.map(function(a,s){return s+1+") "+a.toString()}).join(`
18
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function bt(n,e){if(n){var t=n.indexOf(e);0<=t&&n.splice(t,1)}}var rt=function(){function n(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var e,t,a,s,r;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var o=Rn(i),m=o.next();!m.done;m=o.next()){var d=m.value;d.remove(this)}}catch(b){e={error:b}}finally{try{m&&!m.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else i.remove(this);var y=this.initialTeardown;if(fe(y))try{y()}catch(b){r=b instanceof la?b.errors:[b]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var f=Rn(h),I=f.next();!I.done;I=f.next()){var E=I.value;try{Tr(E)}catch(b){r=r??[],b instanceof la?r=zn(zn([],Cn(r)),Cn(b.errors)):r.push(b)}}}catch(b){a={error:b}}finally{try{I&&!I.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}}if(r)throw new la(r)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Tr(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},n.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},n.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},n.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&bt(t,e)},n.prototype.remove=function(e){var t=this._finalizers;t&&bt(t,e),e instanceof n&&e._removeParent(this)},n.EMPTY=function(){var e=new n;return e.closed=!0,e}(),n}(),fo=rt.EMPTY;function go(n){return n instanceof rt||n&&"closed"in n&&fe(n.remove)&&fe(n.add)&&fe(n.unsubscribe)}function Tr(n){fe(n)?n():n.unsubscribe()}var To={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ga={setTimeout:function(n,e){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];var s=Ga.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,zn([n,e],Cn(t))):setTimeout.apply(void 0,zn([n,e],Cn(t)))},clearTimeout:function(n){var e=Ga.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(n)},delegate:void 0};function ho(n){Ga.setTimeout(function(){throw n})}function Ya(){}function ht(n){n()}var ys=function(n){on(e,n);function e(t){var a=n.call(this)||this;return a.isStopped=!1,t?(a.destination=t,go(t)&&t.add(a)):a.destination=lg,a}return e.create=function(t,a,s){return new Va(t,a,s)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(rt),ig=Function.prototype.bind;function ua(n,e){return ig.call(n,e)}var og=function(){function n(e){this.partialObserver=e}return n.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(a){dt(a)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(a){dt(a)}else dt(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){dt(t)}},n}(),Va=function(n){on(e,n);function e(t,a,s){var r=n.call(this)||this,i;if(fe(t)||!t)i={next:t??void 0,error:a??void 0,complete:s??void 0};else{var o;r&&To.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return r.unsubscribe()},i={next:t.next&&ua(t.next,o),error:t.error&&ua(t.error,o),complete:t.complete&&ua(t.complete,o)}):i=t}return r.destination=new og(i),r}return e}(ys);function dt(n){ho(n)}function cg(n){throw n}var lg={closed:!0,next:Ya,error:cg,complete:Ya},fs=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ko(n){return n}function ug(n){return n.length===0?ko:n.length===1?n[0]:function(t){return n.reduce(function(a,s){return s(a)},t)}}var je=function(){function n(e){e&&(this._subscribe=e)}return n.prototype.lift=function(e){var t=new n;return t.source=this,t.operator=e,t},n.prototype.subscribe=function(e,t,a){var s=this,r=dg(e)?e:new Va(e,t,a);return ht(function(){var i=s,o=i.operator,m=i.source;r.add(o?o.call(r,m):m?s._subscribe(r):s._trySubscribe(r))}),r},n.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},n.prototype.forEach=function(e,t){var a=this;return t=hr(t),new t(function(s,r){var i=new Va({next:function(o){try{e(o)}catch(m){r(m),i.unsubscribe()}},error:r,complete:s});a.subscribe(i)})},n.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},n.prototype[fs]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ug(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=hr(e),new e(function(a,s){var r;t.subscribe(function(i){return r=i},function(i){return s(i)},function(){return a(r)})})},n.create=function(e){return new n(e)},n}();function hr(n){var e;return(e=n??To.Promise)!==null&&e!==void 0?e:Promise}function mg(n){return n&&fe(n.next)&&fe(n.error)&&fe(n.complete)}function dg(n){return n&&n instanceof ys||mg(n)&&go(n)}function Mo(n){return fe(n[fs])}function Io(n){return Symbol.asyncIterator&&fe(n==null?void 0:n[Symbol.asyncIterator])}function No(n){return new TypeError("You provided "+(n!==null&&typeof n=="object"?"an invalid object":"'"+n+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function pg(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var So=pg();function Ao(n){return fe(n==null?void 0:n[So])}function Eo(n){return sg(this,arguments,function(){var t,a,s,r;return uo(this,function(i){switch(i.label){case 0:t=n.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,On(t.read())];case 3:return a=i.sent(),s=a.value,r=a.done,r?[4,On(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,On(s)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function bo(n){return fe(n==null?void 0:n.getReader)}function Gn(n){if(n instanceof je)return n;if(n!=null){if(Mo(n))return yg(n);if(mo(n))return fg(n);if(po(n))return gg(n);if(Io(n))return Do(n);if(Ao(n))return Tg(n);if(bo(n))return hg(n)}throw No(n)}function yg(n){return new je(function(e){var t=n[fs]();if(fe(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function fg(n){return new je(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function gg(n){return new je(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,ho)})}function Tg(n){return new je(function(e){var t,a;try{for(var s=Rn(n),r=s.next();!r.done;r=s.next()){var i=r.value;if(e.next(i),e.closed)return}}catch(o){t={error:o}}finally{try{r&&!r.done&&(a=s.return)&&a.call(s)}finally{if(t)throw t.error}}e.complete()})}function Do(n){return new je(function(e){kg(n,e).catch(function(t){return e.error(t)})})}function hg(n){return Do(Eo(n))}function kg(n,e){var t,a,s,r;return ag(this,void 0,void 0,function(){var i,o;return uo(this,function(m){switch(m.label){case 0:m.trys.push([0,5,6,11]),t=rg(n),m.label=1;case 1:return[4,t.next()];case 2:if(a=m.sent(),!!a.done)return[3,4];if(i=a.value,e.next(i),e.closed)return[2];m.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o=m.sent(),s={error:o},[3,11];case 6:return m.trys.push([6,,9,10]),a&&!a.done&&(r=t.return)?[4,r.call(t)]:[3,8];case 7:m.sent(),m.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Un(n,e,t,a,s){return new Mg(n,e,t,a,s)}var Mg=function(n){on(e,n);function e(t,a,s,r,i,o){var m=n.call(this,t)||this;return m.onFinalize=i,m.shouldUnsubscribe=o,m._next=a?function(d){try{a(d)}catch(y){t.error(y)}}:n.prototype._next,m._error=r?function(d){try{r(d)}catch(y){t.error(y)}finally{this.unsubscribe()}}:n.prototype._error,m._complete=s?function(){try{s()}catch(d){t.error(d)}finally{this.unsubscribe()}}:n.prototype._complete,m}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var a=this.closed;n.prototype.unsubscribe.call(this),!a&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(ys),Ig=function(n){on(e,n);function e(t,a){return n.call(this)||this}return e.prototype.schedule=function(t,a){return this},e}(rt),Dt={setInterval:function(n,e){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];var s=Dt.delegate;return s!=null&&s.setInterval?s.setInterval.apply(s,zn([n,e],Cn(t))):setInterval.apply(void 0,zn([n,e],Cn(t)))},clearInterval:function(n){var e=Dt.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(n)},delegate:void 0},Ng=function(n){on(e,n);function e(t,a){var s=n.call(this,t,a)||this;return s.scheduler=t,s.work=a,s.pending=!1,s}return e.prototype.schedule=function(t,a){var s;if(a===void 0&&(a=0),this.closed)return this;this.state=t;var r=this.id,i=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(i,r,a)),this.pending=!0,this.delay=a,this.id=(s=this.id)!==null&&s!==void 0?s:this.requestAsyncId(i,this.id,a),this},e.prototype.requestAsyncId=function(t,a,s){return s===void 0&&(s=0),Dt.setInterval(t.flush.bind(t,this),s)},e.prototype.recycleAsyncId=function(t,a,s){if(s===void 0&&(s=0),s!=null&&this.delay===s&&this.pending===!1)return a;a!=null&&Dt.clearInterval(a)},e.prototype.execute=function(t,a){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var s=this._execute(t,a);if(s)return s;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,a){var s=!1,r;try{this.work(t)}catch(i){s=!0,r=i||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,a=t.id,s=t.scheduler,r=s.actions;this.work=this.state=this.scheduler=null,this.pending=!1,bt(r,this),a!=null&&(this.id=this.recycleAsyncId(s,a,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},e}(Ig),vo={now:function(){return(vo.delegate||Date).now()},delegate:void 0},kr=function(){function n(e,t){t===void 0&&(t=n.now),this.schedulerActionCtor=e,this.now=t}return n.prototype.schedule=function(e,t,a){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(a,t)},n.now=vo.now,n}(),Sg=function(n){on(e,n);function e(t,a){a===void 0&&(a=kr.now);var s=n.call(this,t,a)||this;return s.actions=[],s._active=!1,s}return e.prototype.flush=function(t){var a=this.actions;if(this._active){a.push(t);return}var s;this._active=!0;do if(s=t.execute(t.state,t.delay))break;while(t=a.shift());if(this._active=!1,s){for(;t=a.shift();)t.unsubscribe();throw s}},e}(kr),wo=new Sg(Ng),Ag=wo;function _o(n){return n&&fe(n.schedule)}function Eg(n){return n instanceof Date&&!isNaN(n)}function bg(n,e,t){n===void 0&&(n=0),t===void 0&&(t=Ag);var a=-1;return e!=null&&(_o(e)?t=e:a=e),new je(function(s){var r=Eg(n)?+n-t.now():n;r<0&&(r=0);var i=0;return t.schedule(function(){s.closed||(s.next(i++),0<=a?this.schedule(void 0,a):s.complete())},r)})}function Dg(n){return n[n.length-1]}function Oo(n){return _o(Dg(n))?n.pop():void 0}function nn(n,e,t,a,s){a===void 0&&(a=0),s===void 0&&(s=!1);var r=e.schedule(function(){t(),s?n.add(this.schedule(null,a)):this.unsubscribe()},a);if(n.add(r),!s)return r}function jo(n,e){return e===void 0&&(e=0),Fn(function(t,a){t.subscribe(Un(a,function(s){return nn(a,n,function(){return a.next(s)},e)},function(){return nn(a,n,function(){return a.complete()},e)},function(s){return nn(a,n,function(){return a.error(s)},e)}))})}function Lo(n,e){return e===void 0&&(e=0),Fn(function(t,a){a.add(n.schedule(function(){return t.subscribe(a)},e))})}function vg(n,e){return Gn(n).pipe(Lo(e),jo(e))}function wg(n,e){return Gn(n).pipe(Lo(e),jo(e))}function _g(n,e){return new je(function(t){var a=0;return e.schedule(function(){a===n.length?t.complete():(t.next(n[a++]),t.closed||this.schedule())})})}function Og(n,e){return new je(function(t){var a;return nn(t,e,function(){a=n[So](),nn(t,e,function(){var s,r,i;try{s=a.next(),r=s.value,i=s.done}catch(o){t.error(o);return}i?t.complete():t.next(r)},0,!0)}),function(){return fe(a==null?void 0:a.return)&&a.return()}})}function xo(n,e){if(!n)throw new Error("Iterable cannot be null");return new je(function(t){nn(t,e,function(){var a=n[Symbol.asyncIterator]();nn(t,e,function(){a.next().then(function(s){s.done?t.complete():t.next(s.value)})},0,!0)})})}function jg(n,e){return xo(Eo(n),e)}function Lg(n,e){if(n!=null){if(Mo(n))return vg(n,e);if(mo(n))return _g(n,e);if(po(n))return wg(n,e);if(Io(n))return xo(n,e);if(Ao(n))return Og(n,e);if(bo(n))return jg(n,e)}throw No(n)}function Ro(n,e){return e?Lg(n,e):Gn(n)}function Co(n,e){return Fn(function(t,a){var s=0;t.subscribe(Un(a,function(r){a.next(n.call(e,r,s++))}))})}function xg(n,e,t,a,s,r,i,o){var m=[],d=0,y=0,h=!1,f=function(){h&&!m.length&&!d&&e.complete()},I=function(b){return d<a?E(b):m.push(b)},E=function(b){r&&e.next(b),d++;var L=!1;Gn(t(b,y++)).subscribe(Un(e,function(O){s==null||s(O),r?I(O):e.next(O)},function(){L=!0},void 0,function(){if(L)try{d--;for(var O=function(){var x=m.shift();i?nn(e,i,function(){return E(x)}):E(x)};m.length&&d<a;)O();f()}catch(x){e.error(x)}}))};return n.subscribe(Un(e,I,function(){h=!0,f()})),function(){o==null||o()}}function Gt(n,e,t){return t===void 0&&(t=1/0),fe(e)?Gt(function(a,s){return Co(function(r,i){return e(a,r,s,i)})(Gn(n(a,s)))},t):(typeof e=="number"&&(t=e),Fn(function(a,s){return xg(a,s,n,t)}))}function Rg(n){return n===void 0&&(n=1/0),Gt(ko,n)}function Cg(){return Rg(1)}var zg=yo(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),zo=function(n){on(e,n);function e(){var t=n.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var a=new Mr(this,this);return a.operator=t,a},e.prototype._throwIfClosed=function(){if(this.closed)throw new zg},e.prototype.next=function(t){var a=this;ht(function(){var s,r;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var i=Rn(a.currentObservers),o=i.next();!o.done;o=i.next()){var m=o.value;m.next(t)}}catch(d){s={error:d}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}}})},e.prototype.error=function(t){var a=this;ht(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=t;for(var s=a.observers;s.length;)s.shift().error(t)}})},e.prototype.complete=function(){var t=this;ht(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var a=t.observers;a.length;)a.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var a=this,s=this,r=s.hasError,i=s.isStopped,o=s.observers;return r||i?fo:(this.currentObservers=null,o.push(t),new rt(function(){a.currentObservers=null,bt(o,t)}))},e.prototype._checkFinalizedStatuses=function(t){var a=this,s=a.hasError,r=a.thrownError,i=a.isStopped;s?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new je;return t.source=this,t},e.create=function(t,a){return new Mr(t,a)},e}(je),Mr=function(n){on(e,n);function e(t,a){var s=n.call(this)||this;return s.destination=t,s.source=a,s}return e.prototype.next=function(t){var a,s;(s=(a=this.destination)===null||a===void 0?void 0:a.next)===null||s===void 0||s.call(a,t)},e.prototype.error=function(t){var a,s;(s=(a=this.destination)===null||a===void 0?void 0:a.error)===null||s===void 0||s.call(a,t)},e.prototype.complete=function(){var t,a;(a=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||a===void 0||a.call(t)},e.prototype._subscribe=function(t){var a,s;return(s=(a=this.source)===null||a===void 0?void 0:a.subscribe(t))!==null&&s!==void 0?s:fo},e}(zo);function Ug(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return Cg()(Ro(n,Oo(n)))}var Pg=new je(function(n){return n.complete()});function Ir(n){return n<=0?function(){return Pg}:Fn(function(e,t){var a=0;e.subscribe(Un(t,function(s){++a<=n&&(t.next(s),n<=a&&t.complete())}))})}function Bg(){return Fn(function(n,e){n.subscribe(Un(e,Ya))})}function Qg(n){return Co(function(){return n})}function Uo(n,e){return e?function(t){return Ug(e.pipe(Ir(1),Bg()),t.pipe(Uo(n)))}:Gt(function(t,a){return Gn(n(t,a)).pipe(Ir(1),Qg(t))})}function Fg(n,e){e===void 0&&(e=wo);var t=bg(n,e);return Uo(function(){return t})}function Gg(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=Oo(n);return Ro(n,t)}class Yg{constructor(e,t){A(this,"scheduler");A(this,"displayQueue");A(this,"handlers");A(this,"addToQueue",e=>{this.scheduler.next(e)});A(this,"tick",e=>(this.handlers.onAdd(e),Gg(e).pipe(Fg(e.delay||0))));A(this,"subscribe",()=>{this.displayQueue.subscribe(this.handlers.onOut)});this.handlers=t,this.scheduler=new zo,this.displayQueue=this.scheduler.pipe(Gt(this.tick,e.concurrency)),this.subscribe()}}var vt=(n=>(n[n.UNSET=0]="UNSET",n[n.ONBOARDING=1]="ONBOARDING",n[n.QUESTION=2]="QUESTION",n))(vt||{});let Vg=class{constructor(){A(this,"queue");A(this,"queueList");A(this,"displayQueue");A(this,"add",e=>{if(this.isNewNotify(e.id)){const t=e.close,a=e.action;e.close=(...s)=>{t&&t(s),console.log(e),this.hideNotification(e)},e.action=(...s)=>{a&&a(s),this.hideNotification(e)},this.displayQueue.addToQueue(e)}else console.log("skip notification:",e)});A(this,"showNotification",e=>{const t=new Map(this.queue.getValue());t.set(e.id,e),this.queue.setValue(t)});A(this,"hideNotification",e=>{const t=new Map(this.queue.getValue());t.delete(e.id),this.queue.setValue(t)});A(this,"getQueueStore",()=>this.queueList);A(this,"isNewNotify",e=>{const t=localStorage.getItem(`opened:${e}`);return t?!t:!(this.queue.getValue()||new Map).has(e)});A(this,"markAsViewed",e=>{localStorage.setItem(`opened:${e}`,e)});this.queue=new we(_e(new Map),"notifications-queue"),this.displayQueue=new Yg({concurrency:5},{onAdd:this.showNotification,onOut:this.hideNotification}),this.queueList=ng(this.queue.getStore(),e=>e?[...e.values()]:[])}};const $g=(n,e,t)=>{n.notifications=new Vg,n.addNotification=n.notifications.add,n.sdk.getNotificationsStore=()=>n.notifications.getQueueStore(),t()};let qg=()=>({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 Wg=({cache:n=new Map,fetcher:e,...t}={})=>{const a=qg();let s=!0;br("visibilitychange",()=>{s=!document.hidden,s&&a.emit(Sr)}),br("online",()=>a.emit(Ar));const r=new Map,i=new Map,o=new Map;let m={};const d=async([O,x],C,z,U)=>{var B;if(!s)return;const R=oe=>{C.key===O&&(C.set(oe),a.emit(ma,O,oe,!0))},H=()=>{R({...C.value,...vr,promise:o.get(O)})},{dedupeTime:ne=4e3,fetcher:se}={...z,...m},ie=Dr();if(o.has(O)){C.value.loading||H();return}if(!U){const oe=n.get(O);oe&&C.value.data!==oe&&R({data:oe,...cn});const Z=i.get(O);if(Z&&Z+ne>ie)return}const ue=De.startTask();try{const oe=se(...x);i.set(O,ie),o.set(O,oe),H();const Z=await oe;n.set(O,Z),R({data:Z,...cn}),i.set(O,Dr())}catch(oe){(B=z.onError)==null||B.call(z,oe),R({data:C.value.data,error:oe,...cn})}finally{ue(),o.delete(O)}},y=(O,{fetcher:x=e,...C}={})=>{const z=De.map({...cn}),U={...t,...C,fetcher:x};z.invalidate=()=>{const{key:Z}=z;Z&&I(Z)},z.mutate=Z=>{const{key:me}=z;me&&E(me,Z)};let B,R,H,ne,se,ie=[];De.onStart(z,()=>{const Z=!B;[se,B]=Hg(O),ne=se.subscribe(Se=>{if(Se){const[K,M]=Se;z.key=K,d([K,M],z,U),R=K,H=M}else z.key=R=H=void 0});const me=se.get();me&&([R,H]=me,Z&&ue());const{refetchInterval:Ie=0,refetchOnFocus:qe,refetchOnReconnect:Ue}=U,Ne=()=>{R&&d([R,H],z,U)};Ie>0&&r.set(O,setInterval(Ne,Ie)),qe&&ie.push(a.on(Sr,Ne)),Ue&&ie.push(a.on(Ar,Ne)),ie.push(a.on(Er,Se=>{R&&da(R,Se)&&d([R,H],z,U,!0)}),a.on(ma,(Se,K,M)=>{R&&da(R,Se)&&z.value!==K&&z.value.data!==K&&z.set(M?K:{data:K,...cn})}))});const ue=()=>{R&&H&&d([R,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={...cn},B==null||B(),ie.forEach(me=>me()),ie=[],ne==null||ne();const Z=r.get(O);Z&&clearInterval(Z)}),z},h=O=>{n.delete(O),i.delete(O)},f=(O,x)=>{for(const C of n.keys())da(C,O)&&x(C)},I=O=>{f(O,h),a.emit(Er,O)},E=(O,x)=>{f(O,C=>{x===void 0?h(C):n.set(C,x)}),a.emit(ma,O,x)};function b(O){const x=async z=>{var U,B;const R=(U=m.fetcher)!=null?U:O,H=[];try{C.set({error:void 0,data:void 0,mutate:x,...vr});const ne=await R({data:z,invalidate:se=>{H.push(se)},getCacheUpdater:(se,ie=!0)=>[ue=>{E(se,ue),ie&&H.push(se)},n.get(se)]});return C.setKey("data",ne),ne}catch(ne){(B=t==null?void 0:t.onError)==null||B.call(t,ne),C.setKey("error",ne)}finally{C.setKey("loading",!1),H.forEach(I)}},C=De.map({mutate:x,...cn});return C.mutate=x,C}return[y,b,{__unsafeOverruleSettings:O=>{console.warn("You should only use __unsafeOverruleSettings in test environment"),m=O},invalidateKeys:I,mutateCache:E}]};function Nr(n){return typeof n=="string"||typeof n=="number"}const Hg=n=>{if(Nr(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(Nr(i)){t.push(i);continue}s.push(i.subscribe(o=>{t[r]=o,a()}))}return a(),[e,()=>s.forEach(r=>r())]},Sr=1,Ar=2,Er=3,ma=4,br=(n,e)=>{typeof window>"u"||addEventListener(n,e)},da=(n,e)=>Array.isArray(e)?e.includes(n):typeof e=="function"?e(n):n===e,Dr=()=>new Date().getTime(),vr={loading:!0},cn={loading:!1};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));class Zg{constructor(e,t,a,s){A(this,"params");A(this,"stream");A(this,"method");A(this,"name");A(this,"headers");A(this,"listeners");A(this,"state");A(this,"store");A(this,"updateState",e=>{this.state.setValue("status",e),this.state.setValue("ts",new Date),this.addStateLog(`status => ${e}`)});A(this,"addStateLog",e=>{const t=this.state.getStore().get().log;this.state.setValue("log",[...t,`${new Date().toLocaleString()}: ${e}`])});A(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));A(this,"removeListener",e=>{this.listeners.delete(e),this.addStateLog(`listener '${e}' removed`)});A(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")});A(this,"disconnect",()=>{this.stream&&this.stream(),this.listeners.clear(),this.updateState("disconnected")});A(this,"reconnect",()=>{this.updateState("reconnecting"),this.connect()});A(this,"getStore",()=>{var e;return(e=this.store)==null?void 0:e.getStore()});A(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`)});A(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 Xn(et(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 we(_e(null),`subscription:${s.name}:store`)),"subscribe"in a&&typeof a.subscribe=="function"&&a.subscribe(()=>{this.reconnect()}),this.updateState("ready")}}class Kg{constructor(e){A(this,"toJsonOptions",{emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1});A(this,"transport");A(this,"nanoquery");A(this,"host");A(this,"interceptors",[]);A(this,"$headers");A(this,"clients");A(this,"callbackClients");A(this,"subscriptions");A(this,"addSubscription",(e,t,a)=>{const s=this.subscriptions.get(t);if(s)return s;const r=new Zg(this.$headers,e,t,a);return this.subscriptions.set(t,r),r});A(this,"removeSubscription",e=>{e.disconnect(),this.subscriptions.delete(e.params)});A(this,"disconnect",()=>{for(const[e,t]of this.subscriptions)t.disconnect(),this.subscriptions.delete(e)});A(this,"registerInterceptor",e=>{this.interceptors.push(e)});A(this,"removeInterceptor",e=>{this.interceptors=this.interceptors.filter(t=>t!==e)});A(this,"getClient",e=>{const t=e.typeName;if(this.clients.has(t))return this.clients.get(t);const a=Ut(e,this.transport);return this.clients.set(t,a),a});A(this,"getCallbackClient",e=>{const t=e.typeName;if(this.callbackClients.has(t))return this.callbackClients.get(t);const a=Nu(e,this.transport);return this.callbackClients.set(t,a),a});A(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]],o=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1)];return{client:s,queryKey:i,queryKeyStr:o.join("")}});A(this,"createCallbackClient",e=>({client:this.getCallbackClient(e)}));A(this,"setSdkKey",e=>{this.$headers.setValue("sdk",e)});A(this,"setAuth",e=>{this.$headers.setValue("authorization",e)});A(this,"setHeader",(e,t)=>this.$headers.setValue(e,t));A(this,"getHeader",e=>this.$headers.getValue(e));A(this,"getHeaders",()=>this.$headers.getValues());A(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)});var r,i;this.host=e,this.$headers=new Xn(et({"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]=Wg();this.nanoquery={createFetcherStore:t,createMutatorStore:a,utils:s},this.transport=Pt({baseUrl:e,interceptors:this.interceptors,useBinaryFormat:!0})}}const Jg=l.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"}]),gs=l.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"}]),Ts=l.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"}]),Yt=l.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),Po=l.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),Vt=l.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}]),$t=l.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}]);l.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:$t}]);const it=l.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),Bo=l.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}]);l.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:$t},{no:12,name:"event_time",kind:"message",T:it},{no:13,name:"status",kind:"enum",T:l.getEnumType(gs)},{no:14,name:"periods",kind:"message",T:Bo,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:l.getEnumType(Ts)}]);const Qo=l.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),Xg=l.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:eT},{no:7,name:"weight",kind:"message",T:nT},{no:8,name:"birth",kind:"message",T:tT}]),eT=l.makeMessageType("streamlayer.sports.PlayerAttributes.Height",()=>[{no:1,name:"centimeters",kind:"scalar",T:5},{no:2,name:"inches",kind:"scalar",T:5}],{localName:"PlayerAttributes_Height"}),nT=l.makeMessageType("streamlayer.sports.PlayerAttributes.Weight",()=>[{no:1,name:"kilograms",kind:"scalar",T:5},{no:2,name:"pounds",kind:"scalar",T:5}],{localName:"PlayerAttributes_Weight"}),tT=l.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:Qo}],{localName:"PlayerAttributes_Birth"});l.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 aT=l.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}]);l.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:Qo},{no:13,name:"attributes",kind:"message",T:Xg},{no:15,name:"teams",kind:"message",T:aT,repeated:!0}]);const sn=l.makeMessageType("streamlayer.sports.TeamRecord",()=>[{no:1,name:"wins",kind:"scalar",T:5},{no:2,name:"losses",kind:"scalar",T:5}]);l.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 Zn=l.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:l.getEnumType(Jg)}]),sT=l.makeMessageType("streamlayer.sports.SyncStatus",()=>[{no:1,name:"teams",kind:"message",T:Zn},{no:2,name:"event",kind:"message",T:Zn},{no:3,name:"events",kind:"message",T:Zn},{no:4,name:"players",kind:"message",T:Zn},{no:5,name:"leagues",kind:"message",T:Zn}]),rT=l.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:sT}]);l.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:rT,repeated:!0}]);l.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 iT=l.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}]),oT=l.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}]);l.makeMessageType("streamlayer.sports.EventTeamStatistics",()=>[{no:1,name:"football",kind:"message",T:iT,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:oT,oneof:"statistics"}]);const rn=l.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}]),cT=l.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}]),lT=l.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}]),uT=l.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:rn},{no:6,name:"away",kind:"message",T:rn},{no:7,name:"status",kind:"enum",T:l.getEnumType(gs)},{no:8,name:"custom_fields",kind:"message",T:cT},{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:$t},{no:12,name:"schedule",kind:"message",T:lT,repeated:!0},{no:13,name:"endless",kind:"enum",T:l.getEnumType(Ts)}]),gn=l.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:$t},{no:6,name:"event_time",kind:"message",T:it},{no:7,name:"home_team",kind:"message",T:rn},{no:8,name:"away_team",kind:"message",T:rn},{no:9,name:"status",kind:"enum",T:l.getEnumType(gs)},{no:10,name:"periods",kind:"message",T:Bo,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}]),pt=l.makeMessageType("streamlayer.sports.QueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]),wr=l.makeMessageType("streamlayer.sports.ArrayQueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9,repeated:!0}]);l.makeMessageType("streamlayer.sports.Query",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"match",kind:"message",T:pt,repeated:!0},{no:3,name:"ne",kind:"message",T:pt,repeated:!0},{no:4,name:"eq",kind:"message",T:pt,repeated:!0},{no:5,name:"between",kind:"message",T:wr,repeated:!0},{no:6,name:"includes",kind:"message",T:wr,repeated:!0},{no:7,name:"is",kind:"message",T:pt,repeated:!0}]);const mT=l.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"}]),dT=l.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"}]),_r=l.makeMessageType("streamlayer.sports.baseball.PitcherSummary",()=>[{no:1,name:"statistics",kind:"message",T:Fo},{no:2,name:"status",kind:"enum",T:l.getEnumType(mT)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),pT=l.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),yT=l.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:l.getEnumType(dT)},{no:2,name:"player",kind:"message",T:pT}]),fT=l.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}]),gT=l.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}]),Fo=l.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}]),Or=l.makeMessageType("streamlayer.sports.baseball.BaseballTeamSummary",()=>[{no:1,name:"hitting",kind:"message",T:fT,repeated:!0},{no:2,name:"batting",kind:"message",T:gT,repeated:!0},{no:3,name:"pitching",kind:"message",T:Fo,repeated:!0}]),TT=l.makeMessageType("streamlayer.sports.baseball.BaseballSummary",()=>[{no:1,name:"home_pitcher",kind:"message",T:_r},{no:2,name:"away_pitcher",kind:"message",T:_r},{no:3,name:"home_statistics",kind:"message",T:Or},{no:4,name:"away_statistics",kind:"message",T:Or}]),hT=l.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:rn},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:kT,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}]),kT=l.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"}),MT=l.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:yT,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:sn},{no:9,name:"away_team_record",kind:"message",T:sn}]),IT=l.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:hT,repeated:!0}]),NT=l.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:TT}]),ST=l.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:AT},{no:11,name:"rank",kind:"message",T:ET},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),AT=l.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"}),ET=l.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"}),bT=l.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:ST,repeated:!0}]),DT=l.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"}]),vT=l.makeMessageType("streamlayer.sports.basketball.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:sn},{no:9,name:"away_team_record",kind:"message",T:sn}]),jr=l.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}]),Lr=l.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}]),wT=l.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(DT)},{no:2,name:"home_player",kind:"message",T:Lr},{no:3,name:"away_player",kind:"message",T:Lr}]),_T=l.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:jr},{no:2,name:"away_statistics",kind:"message",T:jr}]),OT=l.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:_T},{no:2,name:"top_performers",kind:"message",T:wT,repeated:!0},{no:3,name:"last_games",kind:"message",T:Go}]),jT=l.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:rn},{no:2,name:"event_time",kind:"message",T:it},{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}]),LT=l.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:jT,repeated:!0}]),xr=l.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}]),xT=l.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:xr,repeated:!0},{no:2,name:"away_players",kind:"message",T:xr,repeated:!0}]),RT=l.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:CT},{no:11,name:"rank",kind:"message",T:zT},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),CT=l.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"}),zT=l.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"}),UT=l.makeMessageType("streamlayer.sports.basketball.Standings",()=>[{no:1,name:"standings",kind:"message",T:RT,repeated:!0}]),Rr=l.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}]),Cr=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineup",()=>[{no:3,name:"start_players",kind:"message",T:Rr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Rr,repeated:!0}]),PT=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Cr},{no:2,name:"away_team",kind:"message",T:Cr}]),pa=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:BT}]),BT=l.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"}),Go=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGames",()=>[{no:1,name:"home",kind:"message",T:pa,repeated:!0},{no:2,name:"away",kind:"message",T:pa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:pa,repeated:!0}]),QT=l.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"}]),Yo=l.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"}]),FT=l.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:sn},{no:9,name:"away_team_record",kind:"message",T:sn}]),zr=l.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}]),GT=l.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(QT)},{no:2,name:"home_player",kind:"message",T:zr,repeated:!0},{no:3,name:"away_player",kind:"message",T:zr,repeated:!0}]),Ur=l.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}]),YT=l.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Ur},{no:2,name:"away_statistics",kind:"message",T:Ur}]),VT=l.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:YT},{no:2,name:"top_performers",kind:"message",T:GT,repeated:!0}]),$T=l.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:rn},{no:2,name:"event_time",kind:"message",T:it},{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}]),qT=l.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:$T,repeated:!0}]),ya=l.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:l.getEnumType(Yo)}]),Pr=l.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:l.getEnumType(Yo)}]),Br=l.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:ya,repeated:!0},{no:2,name:"goaltender",kind:"message",T:Pr},{no:3,name:"forwards",kind:"message",T:ya,repeated:!0},{no:4,name:"defensemen",kind:"message",T:ya,repeated:!0},{no:5,name:"goaltenders",kind:"message",T:Pr,repeated:!0}]),WT=l.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Br},{no:2,name:"away_players",kind:"message",T:Br}]),HT=l.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:ZT},{no:11,name:"rank",kind:"message",T:KT},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),ZT=l.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"}),KT=l.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"}),JT=l.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:HT,repeated:!0}]),XT=l.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"}]),eh=l.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"}]),nh=l.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:sn},{no:9,name:"away_team_record",kind:"message",T:sn}]),hs=l.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}]),th=l.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:hs},{no:2,name:"attack_stats",kind:"message",T:mh}]),ah=l.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:hs},{no:2,name:"midfield_stats",kind:"message",T:dh}]),sh=l.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:hs},{no:2,name:"defense_stats",kind:"message",T:ph}]),rh=l.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(XT)},{no:2,name:"attack_performer",kind:"message",T:th},{no:3,name:"midfield_performer",kind:"message",T:ah},{no:4,name:"defense_performer",kind:"message",T:sh}]),ih=l.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}]),oh=l.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}]),ch=l.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}]),Qr=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:ih},{no:2,name:"attacking_stats",kind:"message",T:oh},{no:3,name:"defense_stats",kind:"message",T:ch}]),lh=l.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Qr},{no:2,name:"away_statistics",kind:"message",T:Qr},{no:3,name:"perfomers",kind:"message",T:rh}]),uh=l.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:lh},{no:2,name:"last_games",kind:"message",T:Vo}]),mh=l.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}]),dh=l.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}]),ph=l.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}]);l.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 yh=l.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}]),fh=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:yh,repeated:!0}]),Fr=l.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}]),Gr=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineup",()=>[{no:1,name:"formation_string",kind:"scalar",T:9},{no:2,name:"formation_matrix",kind:"message",T:fh,repeated:!0},{no:3,name:"start_players",kind:"message",T:Fr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Fr,repeated:!0}]),gh=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Gr},{no:2,name:"away_team",kind:"message",T:Gr}]);l.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 Th=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:rn},{no:2,name:"event_time",kind:"message",T:it},{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:l.getEnumType(eh)}]),hh=l.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Th,repeated:!0}]),kh=l.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}]),Mh=l.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:kh,repeated:!0}]),fa=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:Ih}]),Ih=l.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"}),Vo=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGames",()=>[{no:1,name:"home",kind:"message",T:fa,repeated:!0},{no:2,name:"away",kind:"message",T:fa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:fa,repeated:!0}]),Tn=l.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"}]),Nh=l.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:gn},{no:2,name:"baseball",kind:"message",T:MT,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:vT,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:FT,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:nh,oneof:"sport"}]),Sh=l.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:Nh}]),Ah=l.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:uT}]),$o=l.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:Ah}]),Eh=l.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:bh},{no:2,name:"pagination",kind:"message",T:Yt},{no:3,name:"sort",kind:"message",T:Po},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),bh=l.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:l.getEnumType(Ts)}],{localName:"ListRequest_Filter"}),Dh=l.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:vh},{no:2,name:"pagination",kind:"message",T:Yt},{no:3,name:"sort",kind:"message",T:Po}]),vh=l.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"}),wh=l.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:Vt},{no:2,name:"data",kind:"message",T:$o,repeated:!0}]),_h=l.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:Vt},{no:2,name:"data",kind:"message",T:$o,repeated:!0}]),Yr=l.makeMessageType("streamlayer.sports.events.SummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),Vr=l.makeMessageType("streamlayer.sports.events.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:Oh}]),Oh=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:jh}],{localName:"SummaryResponse_ResponseData"}),jh=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:gn},{no:2,name:"baseball",kind:"message",T:NT,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:OT,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:VT,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:uh,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),Lh=l.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),xh=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:Rh}]),Rh=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:Ch}],{localName:"AdminSummaryResponse_ResponseData"}),Ch=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:gn}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),zh=l.makeMessageType("streamlayer.sports.events.PlayByPlayRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"pagination",kind:"message",T:Yt},{no:3,name:"order",kind:"scalar",T:9}]),Uh=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse",()=>[{no:1,name:"data",kind:"message",T:Ph},{no:2,name:"meta",kind:"message",T:Vt}]),Ph=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:Bh}],{localName:"PlayByPlayResponse_ResponseData"}),Bh=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:gn},{no:2,name:"baseball",kind:"message",T:IT,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:LT,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:qT,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:hh,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),Qh=l.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:Fh},{no:2,name:"pagination",kind:"message",T:Yt}]),Fh=l.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"}),Gh=l.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:Sh,repeated:!0},{no:2,name:"meta",kind:"message",T:Vt}]),Yh=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:Vh}]),Vh=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),$h=l.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),qh=l.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),Wh=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:Hh}]),Hh=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:Zh}],{localName:"BoxscoreResponse_ResponseData"}),Zh=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:gn},{no:2,name:"basketball",kind:"message",T:xT,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:WT,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),Kh=l.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),Jh=l.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:Xh}]),Xh=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(Tn)},{no:2,name:"attributes",kind:"message",T:ek}],{localName:"StandingsResponse_ResponseData"}),ek=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData.StandingsResponseAttributes",()=>[{no:2,name:"basketball",kind:"message",T:UT,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:JT,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:bT,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:Mh,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),nk=l.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),tk=l.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:ak}]),ak=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:sk}],{localName:"LineupResponse_ResponseData"}),sk=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:gn},{no:2,name:"soccer",kind:"message",T:gh,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:PT,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),rk=l.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),ik=l.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:ok}]),ok=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:ck}],{localName:"LastGamesResponse_ResponseData"}),ck=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:gn},{no:2,name:"soccer",kind:"message",T:Vo,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Go,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),lk=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),uk=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:mk}]),mk=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"}),dk={typeName:"streamlayer.sports.events.Events",methods:{list:{name:"List",I:Eh,O:_h,kind:P.Unary},demoList:{name:"DemoList",I:Dh,O:wh,kind:P.Unary},summary:{name:"Summary",I:Yr,O:Vr,kind:P.Unary},adminSummary:{name:"AdminSummary",I:Lh,O:xh,kind:P.Unary},boxscore:{name:"Boxscore",I:qh,O:Wh,kind:P.Unary},standings:{name:"Standings",I:Kh,O:Jh,kind:P.Unary},playByPlay:{name:"PlayByPlay",I:zh,O:Uh,kind:P.Unary},schedule:{name:"Schedule",I:Qh,O:Gh,kind:P.Unary},scheduleDates:{name:"ScheduleDates",I:Yh,O:$h,kind:P.Unary},lineup:{name:"Lineup",I:nk,O:tk,kind:P.Unary},retrieveEventId:{name:"RetrieveEventId",I:lk,O:uk,kind:P.Unary},lastGames:{name:"LastGames",I:rk,O:ik,kind:P.Unary},summarySubscription:{name:"SummarySubscription",I:Yr,O:Vr,kind:P.ServerStreaming}}},pk=l.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"}]),yk=l.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"}]),fk=l.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"}]),gk=l.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"}]),Tk=l.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"}]),hk=l.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"}]),kk=l.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"}]),Mk=l.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"}]),qo=l.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"}]),Ik=l.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"}]),Nk=l.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(qo)}]),Sk=l.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(qo)}]),ga=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:Nk},{no:2,name:"sound",kind:"message",T:Sk}]),ks=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:l.getEnumType(pk)},{no:2,name:"messages_notify",kind:"enum",T:l.getEnumType(yk)},{no:3,name:"friends_notify",kind:"enum",T:l.getEnumType(fk)},{no:4,name:"calls_sound",kind:"enum",T:l.getEnumType(Tk)},{no:5,name:"messages_sound",kind:"enum",T:l.getEnumType(hk)},{no:6,name:"friends_sound",kind:"enum",T:l.getEnumType(kk)},{no:7,name:"twitter_notify",kind:"enum",T:l.getEnumType(gk)},{no:8,name:"twitter_sound",kind:"enum",T:l.getEnumType(Mk)},{no:9,name:"gamification",kind:"message",T:ga},{no:10,name:"watch_party_invitation",kind:"message",T:ga},{no:11,name:"twitter_question",kind:"message",T:ga}]),Ak=l.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),Ek=l.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:bk}]),bk=l.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:ks}],{localName:"GetResponse_GetResponseData"}),Dk=l.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:ks}]),vk=l.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:wk}]),wk=l.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:ks}],{localName:"UpdateResponse_UpdateResponseData"}),_k=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ok=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:jk}]),jk=l.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:ro}],{localName:"GetStreamResponse_GetResponseData"}),Lk=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),xk=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:Rk}]),Rk=l.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:io}],{localName:"GetOrganizationResponse_GetResponseData"}),Ck=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),zk=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:Uk}]),Uk=l.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:oo}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),Pk=l.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:l.getEnumType(Ik)}]),Wo=l.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:Pk},{no:5,name:"external_event_id",kind:"scalar",T:9}]),Bk=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:Wo}]),Qk=l.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),Fk=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:Gk}]),Gk=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Qk}],{localName:"GenerateDeepLinkResponse_GenerateDeepLinkResponseData"});l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkRequest",()=>[{no:1,name:"url",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:Yk}]);const Yk=l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Wo}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),Vk=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),$k=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),qk=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Wk}]),Wk=l.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:ro}],{localName:"StreamSubscriptionResponse_ResponseData"}),Hk=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Zk}]),Zk=l.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:io}],{localName:"OrganizationSubscriptionResponse_ResponseData"}),qt={typeName:"streamlayer.sdkSettings.client.Client",methods:{get:{name:"Get",I:Ak,O:Ek,kind:P.Unary},update:{name:"Update",I:Dk,O:vk,kind:P.Unary},getStream:{name:"GetStream",I:_k,O:Ok,kind:P.Unary},getOrganization:{name:"GetOrganization",I:Lk,O:xk,kind:P.Unary},getOrganizationAdvertising:{name:"GetOrganizationAdvertising",I:Ck,O:zk,kind:P.Unary},generateDeepLink:{name:"GenerateDeepLink",I:Bk,O:Fk,kind:P.Unary},streamSubscription:{name:"StreamSubscription",I:Vk,O:qk,kind:P.ServerStreaming},organizationSubscription:{name:"OrganizationSubscription",I:$k,O:Hk,kind:P.ServerStreaming}}},Kk=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(dk,{method:"retrieveEventId",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var o;if(!i||typeof i!="string")return"";try{return((o=(await t.retrieveEventId({id:i})).data)==null?void 0:o.id)||""}catch{return""}}})},Jk=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(qt,{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}})},Xk=(n,e)=>{const{queryKey:t,client:a}=e.createPromiseClient(st,{method:"me",params:[n]});return e.nanoquery.createFetcherStore(t,{fetcher:()=>a.me({})})},eM=n=>{const{client:e,queryKeyStr:t}=n.createPromiseClient(st,{method:"bypassAuth"});return n.nanoquery.createMutatorStore(async({data:{userKey:a,schema:s,init:r},getCacheUpdater:i})=>{const[o]=i(t),m=await e.bypassAuth({userKey:a,schema:s,init:r});return o(m),m})},nM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(qt,{method:"get",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{var r;return(r=(await t.get({})).data)==null?void 0:r.attributes}})},tM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(qt,{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}})},aM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(qt,{method:"getOrganizationAdvertising",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{var r;return(r=(await t.getOrganizationAdvertising({})).data)==null?void 0:r.attributes}})},sM=(n,e,t)=>{n.transport=new Kg(e.host),n.sdk.host=n.transport.host,n.transport.setSdkKey(e.sdkKey),t()};var bn=(n=>(n.DISABLED="disabled",n.INITIALIZATION="initialization",n.READY="ready",n.FAILED="failed",n.SUSPENDED="suspended",n))(bn||{});const rM=n=>{const e=new we(_e(),"enabled"),t=new we(_e("disabled"),"status"),a=new we(_e(),"userKey"),s=new we(_e(),"userToken");s.listen(f=>{f?localStorage.setItem("sl-user-token",f):localStorage.removeItem("sl-user-token")});const r=new we(_e(),"providerStreamId"),i=new ze(Kk(r.getStore(),n),"slStreamId",f=>f==null?void 0:f.data),o=new ze(Xk(s.getStore(),n),"user",f=>{var I,E;return(E=(I=f==null?void 0:f.data)==null?void 0:I.data)==null?void 0:E.id}),m=new ze(nM(s.getStore(),n),"userSettings"),d=new ze(Jk(i.getAtomStore(),n),"streamSettings");i.getAtomStore().listen(f=>{(f===""||f===void 0)&&d.getStore().mutate(void 0)});const y=new ze(tM(e.getStore(),n),"organizationSettings",f=>{var I;return(I=f==null?void 0:f.data)==null?void 0:I.id}),h=new ze(aM(y.getAtomStore(),n),"organizationAdvertising");return{enabled:e,status:t,providerStreamId:r,slStreamId:i,streamSettings:d,user:o,userKey:a,userToken:s,userSettings:m,organizationSettings:y,organizationAdvertising:h}};class iM extends Ft{constructor(t){const a=rM(t),s=Xf(a);super(s,"core");A(this,"stores");A(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])}});A(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 oM=(n,e,t)=>{n.store=new iM(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()},$e={typeName:"streamlayer.interactive.feed.Feed",methods:{get:{name:"Get",I:Vp,O:$p,kind:P.Unary},subscription:{name:"Subscription",I:Hd,O:Zd,kind:P.ServerStreaming},votingSubscription:{name:"VotingSubscription",I:Jd,O:Xd,kind:P.ServerStreaming},questionSubscription:{name:"QuestionSubscription",I:tp,O:ap,kind:P.ServerStreaming},questionByUser:{name:"QuestionByUser",I:ip,O:op,kind:P.Unary},syncQuestion:{name:"SyncQuestion",I:lp,O:mp,kind:P.Unary},getQuestion:{name:"GetQuestion",I:pp,O:yp,kind:P.Unary},questionDetail:{name:"QuestionDetail",I:gp,O:Tp,kind:P.Unary},submitAnswer:{name:"SubmitAnswer",I:kp,O:Ip,kind:P.Unary},submitInplay:{name:"SubmitInplay",I:Sp,O:Ep,kind:P.Unary},skipQuestion:{name:"SkipQuestion",I:bp,O:vp,kind:P.Unary},pickHistory:{name:"PickHistory",I:_p,O:jp,kind:P.Unary},insightHistory:{name:"InsightHistory",I:Rp,O:zp,kind:P.Unary},tweetHistory:{name:"TweetHistory",I:Pp,O:Qp,kind:P.Unary},promotionHistory:{name:"PromotionHistory",I:Wp,O:Zp,kind:P.Unary}}},cM=l.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"}]),Ho=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(cM)},{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:Ho,repeated:!0},{no:6,name:"created_at",kind:"scalar",T:3}]),Ms=l.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}]),lM=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem",()=>[{no:1,name:"summary",kind:"message",T:Ms},{no:2,name:"percentage",kind:"message",T:uM}]),uM=l.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"}),mM=l.makeMessageType("streamlayer.interactive.leaderboard.ListRequest",()=>[{no:1,name:"pagination",kind:"message",T:us},{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}]),dM=l.makeMessageType("streamlayer.interactive.leaderboard.ListResponse",()=>[{no:1,name:"data",kind:"message",T:pM,repeated:!0},{no:2,name:"meta",kind:"message",T:yM}]),pM=l.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:Ms}],{localName:"ListResponse_ListResponseData"}),yM=l.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"}),fM=l.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}]),gM=l.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:TM}]),TM=l.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:lM}],{localName:"SummaryResponse_SummaryResponseData"}),hM=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9}]),kM=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse",()=>[{no:2,name:"data",kind:"message",T:MM}]),MM=l.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:Ho}],{localName:"EventLeaderboardsResponse_EventLeaderboardsResponseData"}),IM=l.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:us},{no:4,name:"sort",kind:"message",T:Fd}]),NM=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse",()=>[{no:1,name:"data",kind:"message",T:SM,repeated:!0},{no:2,name:"meta",kind:"message",T:AM}]),SM=l.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:Ms}],{localName:"EventLeaderboardResponse_ListResponseData"}),AM=l.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"}),EM={typeName:"streamlayer.interactive.leaderboard.Leaderboard",methods:{list:{name:"List",I:mM,O:dM,kind:P.Unary},summary:{name:"Summary",I:fM,O:gM,kind:P.Unary},eventLeaderboards:{name:"EventLeaderboards",I:hM,O:kM,kind:P.Unary},eventLeaderboard:{name:"EventLeaderboard",I:IM,O:NM,kind:P.Unary}}},bM=(n,e,t)=>{const{client:a,queryKey:s}=t.createPromiseClient(EM,{method:"summary",params:[n,e]});return t.nanoquery.createFetcherStore(s,{fetcher:async(r,i,o,m)=>{var y;return(y=(await a.summary({eventId:o,userId:m})).data)==null?void 0:y.attributes}})},DM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient($e,{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}})},vM=(n,e)=>{const{client:t}=e.createCallbackClient($e),a=De.atom({eventId:n.get()||"",feedId:""});return n.subscribe((r="")=>{a.set({eventId:r,feedId:""})}),e.addSubscription(t.subscription,a,{name:"feedSubscription"})},wM=(n,e)=>{const{client:t}=e.createCallbackClient($e);return e.addSubscription(t.questionSubscription,{questionId:n},{name:"questionSubscription"})},_M=async(n,e)=>{var s,r;const{client:t}=e.createPromiseClient($e,{method:"questionByUser",params:[n]});return(r=(s=(await t.questionByUser({questionId:n})).data)==null?void 0:s.attributes)==null?void 0:r.question},OM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient($e,{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}})},jM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient($e,{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}})},LM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient($e,{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}})},xM=(n,e)=>{const{client:t}=n.createPromiseClient($e,{method:"submitAnswer"});return t.submitAnswer({data:e})},RM=(n,e)=>{const{client:t}=n.createPromiseClient($e,{method:"submitInplay"});return t.submitInplay({data:{eventId:+e}})},CM=(n,e)=>{const{client:t}=n.createPromiseClient($e,{method:"skipQuestion"});return t.skipQuestion({data:{id:e}})};class Zo extends lo{constructor(t,a,s){super(t,a);A(this,"userSummary");A(this,"questions");A(this,"insights");A(this,"leaderboardId");A(this,"slStreamId");A(this,"userId");A(this,"organizationId");A(this,"openedQuestionId");A(this,"openedQuestion");A(this,"activeQuestionId");A(this,"moderationId");A(this,"feedId");A(this,"onbordingComplete");A(this,"notifications");A(this,"transport");A(this,"questionSubscription");A(this,"feedSubscription");A(this,"closeFeature");A(this,"openFeature");A(this,"showOnbordingInApp",t=>{var i,o,m,d;if(t)return;const{inplayGame:a}=this.featureSettings.get();if(!a)return;const{titleCard:s,overview:r}=a;this.notifications.add({type:1,id:"_",action:this.openFeature,close:this.closeFeature,delay:1e5,data:{header:s==null?void 0:s.header,title:s==null?void 0:s.title,subtitle:s==null?void 0:s.subtitle,graphicBg:(i=s==null?void 0:s.appearance)==null?void 0:i.graphic,icon:(o=s==null?void 0:s.media)==null?void 0:o.icon,sponsorLogo:(m=s==null?void 0:s.media)==null?void 0:m.sponsorLogo,primaryColor:(d=r==null?void 0:r.appearance)==null?void 0:d.primaryColor}})});A(this,"getCurrentSessionIdPrefix",t=>{const a=t.eventId||this.slStreamId.get(),s=t.userId||this.userId.get();return`${t.organizationId||this.organizationId.get()}:${s}:${a}:${t.prefix||""}`});A(this,"connect",t=>{var a;this.userSummary=new ze(bM(this.slStreamId,this.userId,t),"gamification:userSummary"),this.questions=new ze(jM(this.slStreamId,t),"gamification:questions"),this.insights=new ze(LM(this.slStreamId,t),"gamification:insights"),this.activeQuestionId=new ze(DM(this.slStreamId,t),"gamification:activeQuestionId"),this.openedQuestion=new ze(OM(this.openedQuestionId,t),"gamification:activeQuestionId"),this.questionSubscription&&(this.questionSubscription.disconnect(),this.questionSubscription=void 0),this.openedQuestionId.listen(s=>{var r;s?(this.questionSubscription=wM(s,t),this.questionSubscription.addListener("feed-subscription-opened-question",i=>{window.requestAnimationFrame(()=>{var o,m,d,y,h;(d=this.openedQuestion)==null||d.getStore().mutate((m=(o=i.data)==null?void 0:o.attributes)==null?void 0:m.question),(y=this.openedQuestion)==null||y.getStore().invalidate(),(h=this.userSummary)==null||h.getStore().invalidate()})}),this.questionSubscription.connect()):(console.log("cleanup on close question"),(r=this.openedQuestion)==null||r.getStore().mutate(void 0),this.questionSubscription!==void 0&&t.removeSubscription(this.questionSubscription))}),(a=this.activeQuestionId)==null||a.listen(s=>{var r,i;this.onbordingComplete.get()&&(i=(r=s==null?void 0:s.data)==null?void 0:r.notification)!=null&&i.title&&s.data.question.status===tn.ACTIVE&&this.notifications.add({type:vt.QUESTION,action:()=>this.openQuestion(s.data.question.id),close:()=>this.closeQuestion(),delay:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${s.data.question.id}`}),data:{title:s.data.notification.title,color:s.data.notification.indicatorColor,icon:s.data.notification.image,imageMode:s.data.notification.imageMode,imagePosition:s.data.notification.imagePosition}})}),this.feedSubscription&&(this.feedSubscription.disconnect(),this.feedSubscription=void 0),this.feedSubscription=vM(this.slStreamId,t),this.feedSubscription.addListener("feed-subscription-active-question",s=>{window.requestAnimationFrame(()=>{var i,o;const r=(i=this.activeQuestionId)==null?void 0:i.getStore();r&&r.mutate((o=s.data)==null?void 0:o.attributes)})}),this.feedSubscription.addListener("feed-subscription-prediction-close",s=>{window.requestAnimationFrame(async()=>{var d,y;const r=(y=(d=s.data)==null?void 0:d.attributes)==null?void 0:y.question;if(!r)return;const{status:i,type:o,id:m}=r;if(i===tn.RESOLVED&&o===Ee.PREDICTION){const h=await _M(m,t),f=h==null?void 0:h.answers.find(({correct:I})=>I);this.notifications.add({type:vt.ONBOARDING,action:()=>this.openQuestion(m),close:()=>this.closeQuestion(),delay:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${m}-prediction-close`}),data:{title:f!=null&&f.youVoted?`Congratulations! You answered correctly! You won ${f.points} pts!`:`Better luck next time! Correct: ${f==null?void 0:f.text}!`}})}})}),this.feedSubscription.addListener("feed-subscription-questions-list",()=>{window.requestAnimationFrame(()=>{var s;(s=this.questions)==null||s.invalidate()})})});A(this,"disconnect",()=>{var t,a;(t=this.questionSubscription)==null||t.disconnect(),(a=this.feedSubscription)==null||a.disconnect()});A(this,"submitInplay",async()=>{const t=this.slStreamId.get();t&&(await RM(this.transport,t),this.onbordingComplete.set(!0),localStorage.setItem(`sl-onbording:${this.userId.get()}:${t}`,"true"))});A(this,"submitAnswer",async(t,a)=>{var s;await xM(this.transport,{questionId:t,answerId:a}),(s=this.questions)==null||s.invalidate()});A(this,"skipQuestion",async t=>{var a;await CM(this.transport,t),(a=this.questions)==null||a.invalidate()});A(this,"openQuestion",t=>{this.openedQuestionId.set(t),this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${t}`}))});A(this,"closeQuestion",()=>{this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${this.openedQuestionId.get()}`})),window.requestAnimationFrame(()=>{this.openedQuestionId.set(void 0)})});if(this.leaderboardId=new we(_e(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.slStreamId=s.stores.slStreamId.getAtomStore(),this.userId=s.stores.user.getAtomStore(),this.organizationId=s.stores.organizationSettings.getAtomStore(),this.moderationId=new we(_e(),"moderationId").getStore(),this.feedId=new we(_e(),"feedId").getStore(),this.onbordingComplete=new we(_e(!1),"onbordingComplete").getStore(),this.openedQuestionId=new we(_e(),"openedQuestionId").getStore(),this.notifications=s.notifications,this.transport=s.transport,this.closeFeature=s.sdk.closeFeature,this.openFeature=()=>s.sdk.openFeature(Oe.GAMES),!this.userId.get())this.userId.subscribe(r=>{r&&window.requestAnimationFrame(()=>{const o=!!localStorage.getItem(`sl-onbording:${r}:${this.slStreamId.get()}`);this.onbordingComplete.set(o),this.showOnbordingInApp(o)})});else{const r=this.userId.get(),o=!!localStorage.getItem(`sl-onbording:${r}:${this.slStreamId.get()}`);this.onbordingComplete.set(o),this.showOnbordingInApp(o)}this.status.subscribe(r=>{r===dn.Ready?this.connect(s.transport):this.disconnect()}),this.onbordingComplete.subscribe(r=>{var i;r&&((i=this.activeQuestionId)==null||i.invalidate())})}}const zM={[Oe.GAMES]:!0,[Oe.HIGHLIGHTS]:!0};class UM extends Zo{}class PM extends lo{}const BM=(n,e,t)=>n.type===Oe.GAMES?new Zo(n,e,t):n.type===Oe.HIGHLIGHTS?new UM(n,e,t):new PM(n,e),QM=(n,e,t)=>{n.features=new Map,n.activeFeature=new we(_e(),"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=En.ORGANIZATION)=>{const r=BM(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,En.ORGANIZATION)},n.stores.providerStreamId.listen(a=>{a||n.reinitializeFeatures()}),n.storeSubscribe=()=>{const a=(r,i)=>{if(i!=null&&i.overlays){r===En.STREAM&&n.features.clear();for(const o of i.overlays)n.features.has(o.type)?n.updateFeature(o,r):n.initFeature(o,r)}},s={organizationSettings:r=>{if(r.data)try{a(En.ORGANIZATION,r.data)}catch(i){console.log(i)}},streamSettings:r=>{if(r.data)try{a(En.STREAM,r.data)}catch(i){console.log(i)}}};n.store.subscribe(s)},t()},FM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=";const GM=N("div")({name:"Container",class:"c1ul2v99",propsAsIs:!1}),YM=N("div")({name:"BackgroundBlock",class:"bk6opdu",propsAsIs:!1}),VM=N("img")({name:"Icon",class:"i120vbip",propsAsIs:!1}),$M=N("div")({name:"ContentWrap",class:"c9vc70l",propsAsIs:!1}),qM=N("img")({name:"SponsorLogo",class:"s12vky1e",propsAsIs:!1}),WM=N("span")({name:"SponsorText",class:"s1uwi25b",propsAsIs:!1}),HM=N("div")({name:"ContentTitle",class:"c19y9gzk",propsAsIs:!1}),ZM=N("div")({name:"ContentSubtitle",class:"c1bzwyj2",propsAsIs:!1}),KM=N("button")({name:"ActionBtn",class:"au6cp8o",propsAsIs:!1}),JM=N("button")({name:"CloseBtn",class:"c8545uy",propsAsIs:!1}),XM=N("img")({name:"IconClose",class:"iqjineo",propsAsIs:!1}),eI=({close:n,action:e,data:{icon:t,header:a,title:s,subtitle:r,graphicBg:i,sponsorLogo:o}})=>T.jsxs(GM,{children:[T.jsx(JM,{onClick:n,children:T.jsx(XM,{alt:"icon-close-onboarding-inapp",src:FM})}),T.jsx(YM,{style:{backgroundImage:`url(${i||""})`},children:t&&T.jsx(VM,{alt:"onboarding-inapp-icon",src:t})}),T.jsxs($M,{children:[T.jsxs("div",{children:[T.jsx("div",{children:o?T.jsxs(T.Fragment,{children:[T.jsx(qM,{alt:"sponsor-logo",src:o}),T.jsx(WM,{children:"Presents"})]}):a||""}),T.jsx(HM,{children:s||""}),T.jsx(ZM,{children:r||""})]}),T.jsx(KM,{onClick:e,children:"Play"})]})]}),nI=({sdk:n})=>{const e=n.getNotificationsStore(),t=ve.useStore(e);return t==null?void 0:t.map(a=>(console.log("lastNotification",a),a&&a.type===vt.ONBOARDING?T.jsx(eI,{...a},a.id):a!=null&&a.data?T.jsx(il,{...a},a.id):null))},tI=({store:n})=>{var t;const{data:e}=ve.useStore(n);return e!=null&&e.summary?T.jsx(Uf,{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}):T.jsx("div",{children:"wait user..."})},aI=({store:n,openQuestion:e})=>{const{data:t}=ve.useStore(n);return t?T.jsx(ff,{openQuestion:e,questions:t}):T.jsx("div",{children:"wait questions..."})},sI="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDUuMzgzNDggMy4zMDI4MiA2LjE1NjkyQzIuNjI0OTMgNi4wMTg0NyAyLjA1ODgzIDUuNzQ4NzIgMS42MDQ1IDUuMzQ3NjhDMS4xNTAxNyA0Ljk0NjYzIDAuOTIzMDA4IDQuNTU5OTIgMC45MjMwMDggNC4xODc1MlYzLjUwMDAySDIuNzY5MTZaTTExLjA3NjggMy41MDAwMlY0LjE4NzUyQzExLjA3NjggNC41NTk5MiAxMC44NDk3IDQuOTQ2NjMgMTAuMzk1MyA1LjM0NzY4QzkuOTQxIDUuNzQ4NzIgOS4zNzQ5IDYuMDE4NDcgOC42OTcwMSA2LjE1NjkyQzkuMDUyNzggNS4zODM0OCA5LjIzMDY2IDQuNDk3ODYgOS4yMzA2NiAzLjUwMDAySDExLjA3NjhaTTEyIDQuMTg3NVYzLjI3MDgzQzEyIDMuMDc5ODYgMTEuOTMyNyAyLjkxNzU0IDExLjc5ODEgMi43ODM4NUMxMS42NjM1IDIuNjUwMTcgMTEuNSAyLjU4MzMzIDExLjMwNzcgMi41ODMzM0g5LjIzMDc3VjEuODk1ODNDOS4yMzA3NyAxLjU4MDczIDkuMTE3NzkgMS4zMTA5OCA4Ljg5MTgzIDEuMDg2NTlDOC42NjU4NiAwLjg2MjE5NSA4LjM5NDIzIDAuNzUgOC4wNzY5MiAwLjc1SDMuOTIzMDhDMy42MDU3NyAwLjc1IDMuMzM0MTQgMC44NjIxOTUgMy4xMDgxNyAxLjA4NjU5QzIuODgyMjEgMS4zMTA5OCAyLjc2OTIzIDEuNTgwNzMgMi43NjkyMyAxLjg5NTgzVjIuNTgzMzNIMC42OTIzMDhDMC40OTk5OTkgMi41ODMzMyAwLjMzNjUzOSAyLjY1MDE3IDAuMjAxOTIzIDIuNzgzODVDMC4wNjczMDcgMi45MTc1NCAwIDMuMDc5ODYgMCAzLjI3MDgzVjQuMTg3NUMwIDQuNTI2NDggMC4wOTk3NTg2IDQuODY3ODQgMC4yOTkyNzkgNS4yMTE1OUMwLjQ5ODc5OSA1LjU1NTM0IDAuNzY4MDI3IDUuODY1NjcgMS4xMDY5NyA2LjE0MjU4QzEuNDQ1OTIgNi40MTk0OSAxLjg2MTc4IDYuNjUyMjMgMi4zNTQ1NyA2Ljg0MDgyQzIuODQ3MzYgNy4wMjk0MSAzLjM2NTM4IDcuMTM1NjMgMy45MDg2NSA3LjE1OTUxQzQuMTEwNTggNy40MTczMiA0LjMzODk0IDcuNjQ0MSA0LjU5Mzc1IDcuODM5ODRDNC43NzY0NCA4LjAwMjE3IDQuOTAyNjQgOC4xNzUyNCA0Ljk3MjM2IDguMzU5MDVDNS4wNDIwNyA4LjU0Mjg2IDUuMDc2OTIgOC43NTY1MSA1LjA3NjkyIDlDNS4wNzY5MiA5LjI1NzgxIDUuMDAzNjEgOS40NzUwNCA0Ljg1Njk3IDkuNjUxNjlDNC43MTAzNCA5LjgyODM0IDQuNDc1OTYgOS45MTY2NyA0LjE1Mzg1IDkuOTE2NjdDMy43OTMyNyA5LjkxNjY3IDMuNDcyMzYgMTAuMDI1MyAzLjE5MTExIDEwLjI0MjVDMi45MDk4NSAxMC40NTk3IDIuNzY5MjMgMTAuNzMzMSAyLjc2OTIzIDExLjA2MjVWMTEuNTIwOEMyLjc2OTIzIDExLjU4NzcgMi43OTA4NyAxMS42NDI2IDIuODM0MTMgMTEuNjg1NUMyLjg3NzQgMTEuNzI4NSAyLjkzMjY5IDExLjc1IDMgMTEuNzVIOUM5LjA2NzMxIDExLjc1IDkuMTIyNiAxMS43Mjg1IDkuMTY1ODYgMTEuNjg1NUM5LjIwOTEzIDExLjY0MjYgOS4yMzA3NyAxMS41ODc3IDkuMjMwNzcgMTEuNTIwOFYxMS4wNjI1QzkuMjMwNzcgMTAuNzMzMSA5LjA5MDE1IDEwLjQ1OTcgOC44MDg4OSAxMC4yNDI1QzguNTI3NjQgMTAuMDI1MyA4LjIwNjczIDkuOTE2NjcgNy44NDYxNSA5LjkxNjY3QzcuNTI0MDQgOS45MTY2NyA3LjI4OTY2IDkuODI4MzQgNy4xNDMwMyA5LjY1MTY5QzYuOTk2MzkgOS40NzUwNCA2LjkyMzA4IDkuMjU3ODEgNi45MjMwOCA5QzYuOTIzMDggOC43NTY1MSA2Ljk1NzkzIDguNTQyODYgNy4wMjc2NCA4LjM1OTA1QzcuMDk3MzYgOC4xNzUyNCA3LjIyMzU2IDguMDAyMTcgNy40MDYyNSA3LjgzOTg0QzcuNjYxMDYgNy42NDQxIDcuODg5NDIgNy40MTczMiA4LjA5MTM1IDcuMTU5NTFDOC42MzQ2MiA3LjEzNTYzIDkuMTUyNjQgNy4wMjk0MSA5LjY0NTQzIDYuODQwODJDMTAuMTM4MiA2LjY1MjIzIDEwLjU1NDEgNi40MTk0OSAxMC44OTMgNi4xNDI1OEMxMS4yMzIgNS44NjU2NyAxMS41MDEyIDUuNTU1MzQgMTEuNzAwNyA1LjIxMTU5QzExLjkwMDIgNC44Njc4NCAxMiA0LjUyNjQ4IDEyIDQuMTg3NVpNNS4wNzAzMyA1LjM4NDkxTDYuMDM4MyA0Ljg3NTAzTDcuMDA2MjcgNS4zODQ5MUw2LjgyMTQgNC4zMDQ5N0w3LjYwNDUxIDMuNTQwMTZMNi41MjIyOCAzLjM4MjZMNi4wMzgzIDIuNDAwMDNMNS41NTQzMSAzLjM4MjZMNC40NzIwOSAzLjU0MDE2TDUuMjU1MTkgNC4zMDQ5N0w1LjA3MDMzIDUuMzg0OTFaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogIDwvc3ZnPgo=",rI="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDIyIDIyIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik01LjUgMi43ODg2N1YxMi40MTM3QzUuNSAxMy4xNzI5IDQuODg0MjYgMTMuNzUgNC4xMjUgMTMuNzVIMS4zNzVDMC42MTU3NDIgMTMuNzUgMCAxMy4xMzQzIDAgMTIuNDEzN1YyLjgyNzM0QzAgMi4wNjgwOCAwLjYxNTc0MiAxLjQ5MTAyIDEuMzc1IDEuNDkxMDJINC4xMjVDNC44ODU1NSAxLjQxMzY3IDUuNSAxLjk5Mzc1IDUuNSAyLjc4ODY3Wk0yMiAxMi4zNzA3QzIyIDEzLjUwOTQgMjEuMDc3IDE0LjQzMjMgMTkuOTM3NSAxNC40MzIzSDEzLjY0MjZDMTQuNjIxIDE2LjA2MTMgMTUuMTI1OSAxNy45MDc3IDE1LjEyNTkgMTguNTU4MkMxNS4xMjUgMTkuNTcxNCAxNC4zMzAxIDIwLjYyNSAxMi45OTggMjAuNjI1QzEwLjI4NTQgMjAuNjI1IDExLjg2NTQgMTcuMzUyOSA4LjM0ODgzIDE0LjU0MDZMNy42NDg0NCAxMy45ODJDNy4xNDE0MSAxMy41NzM4IDYuODgzNTkgMTIuOTc2NiA2Ljg3OTMgMTIuMzc1QzYuODc4MjkgMTIuMzc0IDYuODc5MyAxMi4zNzUgNi44NzkzIDEyLjM3NUw2Ljg3NSA1LjVDNi44NzUgNC44NTExNyA3LjE4MDY0IDQuMjM5NzMgNy43IDMuODUwNDNMOS4xNjY5NSAyLjc1MDg2QzEwLjM1NTUgMS44NTYyNSAxMS44MDM1IDEuMzc1IDEzLjI5MDIgMS4zNzVIMTUuODEyNUMxNi45NTIgMS4zNzUgMTcuODc1IDIuMjk3NTQgMTcuODc1IDMuNDM2NjRDMTcuODc1IDMuNTkyODMgMTcuODU0NCAzLjc0MzU3IDE3LjgyMTUgMy44ODk5NkMxOC42NDg0IDQuMTU5MzcgMTkuMjUgNC45MjQyMiAxOS4yNSA1Ljg0Mzc1QzE5LjI1IDYuMjM2ODMgMTkuMTM0MSA2LjYwMDQzIDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=";const iI=N("div")({name:"Container",class:"c1ibttgl",propsAsIs:!1}),oI=N("img")({name:"Logo",class:"l16el447",propsAsIs:!1}),cI=N("div")({name:"RightBlock",class:"rb3jndy",propsAsIs:!1}),lI=N("button")({name:"ExitBtn",class:"e162i9w9",propsAsIs:!1}),uI=N("img")({name:"ExitIcon",class:"e1uh0tpp",propsAsIs:!1}),mI=N("div")({name:"Interactive",class:"i13726cq",propsAsIs:!1}),dI=()=>n=>n.isSuccess?"#f1be1c":"#da3732",$r=N("div")({name:"ReactionIconWrap",class:"r1weckaj",propsAsIs:!1,vars:{"r1weckaj-0":[dI()]}}),qr=N("img")({name:"ReactionIcon",class:"r1u8ekkw",propsAsIs:!1});const pI=N("div")({name:"Container",class:"c1kt0nvm",propsAsIs:!1}),yI=N("div")({name:"Title",class:"tavk3hk",propsAsIs:!1}),fI=N("div")({name:"PointContainer",class:"p1vdx5su",propsAsIs:!1}),gI=N("span")({name:"Point",class:"p68apx3",propsAsIs:!1}),TI=N("span")({name:"PointLabel",class:"p157xd4a",propsAsIs:!1}),Ta=({points:n})=>T.jsxs(pI,{children:[T.jsx(yI,{children:"YOU WON"}),T.jsxs(fI,{children:[T.jsx(gI,{children:n}),T.jsx(TI,{children:"PTS"})]})]}),hI=({logo:n,points:e,questionAnswered:t,questionAnsweredCorrectly:a,questionType:s,closeQuestion:r,setTimeToExpire:i})=>{const o=!t&&s!==Ee.PREDICTION,m=t&&s===Ee.TRIVIA,d=m&&a,y=m&&!a,h=t&&s===Ee.PREDICTION;return T.jsxs(iI,{children:[T.jsxs(cI,{children:[T.jsxs(mI,{children:[o&&T.jsx(Ni,{setTimeToExpire:i}),d&&T.jsxs(T.Fragment,{children:[T.jsx(Ta,{points:e}),T.jsx($r,{isSuccess:!0,children:T.jsx(qr,{alt:"reaction-icon",src:sI})})]}),y&&T.jsxs(T.Fragment,{children:[T.jsx(Ta,{points:0}),T.jsx($r,{isSuccess:!1,children:T.jsx(qr,{alt:"reaction-icon",src:rI})})]}),h&&T.jsx(Ta,{points:e})]}),T.jsx(lI,{onClick:r,children:T.jsx(uI,{alt:"exit-icon",src:Rt})})]}),n&&T.jsx(oI,{src:n})]})},kI="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAxMy44MzQ4TDY3Ljc2MzYgNy40NDE0Nkg2Mi4wNjA2TDU5LjM4OTcgMTAuNTYwMkw1Ni42MTU1IDcuNDQxNDZaTTYyLjI3MjEgNy45MTY1OUw1OS4zOTY0IDExLjI3NDdMNTYuNDA5MiA3LjkxNjU5SDUxLjc0NDZMNTYuOTMwNyAxMy44NjE1TDUxLjc0NDcgMTkuODA1NEg1Ni4yMjU3TDU5LjE1NzEgMTYuNDIxM0w2Mi4xMTU2IDE5LjgwNTRINjYuNzk4N0w2MS41NjYgMTMuODM1N0w2Ni43MjYxIDcuOTE2NTlINjIuMjcyMVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDQuMzYzNSA3LjQ0MTQ2VjQuNTY0MDZINTAuNzA2NlYwLjA1NTk5OThIMzkuNzAyVjIwLjI4MDVINTAuNzA2NlYxNS43NjAxSDQ0LjM2MzVWMTEuNzc5NEg1MC43MDY2VjcuNDQxNDZINDQuMzYzNVpNNTAuMjQwOCA3LjkxNjU5SDQzLjg5NzhWNC4wODg5M0g1MC4yNDA4VjAuNTMxMTMySDQwLjE2NzhWMTkuODA1NEg1MC4yNDA4VjE2LjIzNTJINDMuODk3OFYxMS4zMDQzSDUwLjI0MDhWNy45MTY1OVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0zNS4wNiAwLjA1NTk5OThWOC4zMzI4MUgzNS4wMDg3QzMzLjk4MDMgNy4xMjc4NyAzMi42OTY2IDYuNzA4ODEgMzEuMjA3IDYuNzA4ODFDMjguMTU1MiA2LjcwODgxIDI1Ljg1NjEgOC44MjYgMjUuMDQ5MyAxMS42MjM2QzI0LjEyOCA4LjU0MDkyIDIxLjc1NDQgNi42NTA4NCAxOC4yMzQ5IDYuNjUwODRDMTUuMzc2OSA2LjY1MDg0IDEzLjExOTcgNy45NTkzNiAxMS45NDIyIDEwLjA5MThWNy40NDE0Nkg2LjAzNDE2VjQuNTY0MDZIMTIuNDgxNVYwLjA1NTk5OThIMC43NjgwMDVWMjAuMjgwNUg2LjAzNDE2VjExLjc3OTRIMTEuMjgzNkMxMS4xMjcgMTIuNDAzNyAxMS4wNDMyIDEzLjA3MjcgMTEuMDQzMiAxMy43Nzg4QzExLjA0MzIgMTcuOTk3IDE0LjIwMzEgMjAuOTU4IDE4LjIzNDkgMjAuOTU4QzIxLjYyNTggMjAuOTU4IDIzLjg2MDcgMTkuMzM0IDI1LjA0MTkgMTYuMzc0SDIwLjUyODRDMTkuOTE4MyAxNy4yNjQ0IDE5LjQ1NTMgMTcuNTI3NiAxOC4yMzQ5IDE3LjUyNzZDMTYuODE5OSAxNy41Mjc2IDE1LjU5OTUgMTYuMjY4NSAxNS41OTk1IDE0Ljc3NTZIMjQuNzg5NEMyNS4xODgxIDE4LjEyNjIgMjcuNzQ3MiAyMS4wMTYgMzEuMjU4MiAyMS4wMTZDMzIuNzczIDIxLjAxNiAzNC4xNjAxIDIwLjI1NTggMzUuMDA3OCAxOC45NzI5SDM1LjA1OVYyMC4yODI0SDM5LjcwMUwzOS43MDIgMC4wNTU5OTk4SDM1LjA2Wk0xNS43NDY3IDExLjgzOTNDMTYuMDM5MiAxMC41NTQ1IDE3LjAxNjQgOS43MTU0NSAxOC4yMzU4IDkuNzE1NDVDMTkuNTc4MiA5LjcxNTQ1IDIwLjUwNTEgMTAuNTI4OSAyMC43NDkyIDExLjgzOTNDMjAuODUxNyAxMS44MzkzIDE1Ljc0NjcgMTEuODM5MyAxNS43NDY3IDExLjgzOTNaTTMyLjI0MiAxNy4yMDE2QzMwLjUzMDcgMTcuMjAxNiAyOS40NjY4IDE1LjU3NDggMjkuNDY2OCAxMy44NzY3QzI5LjQ2NjggMTIuMDYxNyAzMC4zOTE5IDEwLjMxNiAzMi4yNDIgMTAuMzE2QzM0LjE2MDEgMTAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const MI=N("div")({name:"QuestionContainer",class:"q15yq4tu",propsAsIs:!1}),II=({store:n,closeQuestion:e,vote:t})=>{var d;const{data:a}=ve.useStore(n),[s,r]=Q.useState(!1),i=Q.useCallback(y=>{r(y)},[r]),o=Q.useMemo(()=>a==null?void 0:a.answers.find(y=>y.youVoted===!0),[a]),m=Q.useMemo(()=>!!(a!=null&&a.answers.find(y=>y.correct===!0)),[a]);return a?T.jsx(MI,{children:T.jsxs("div",{children:[T.jsx(hI,{points:(o==null?void 0:o.points)||0,questionAnswered:!!o,questionAnsweredCorrectly:o==null?void 0:o.correct,logo:kI,closeQuestion:e,setTimeToExpire:i,questionType:a.type}),T.jsx("div",{children:T.jsx(Kf,{title:a.subject,feedbackMessages:(d=a.options)==null?void 0:d.options.value,questionType:a.type,questionId:a.id,questionAnswered:!!o,questionAnsweredCorrectly:o==null?void 0:o.correct,options:a.answers.map(y=>({id:y.id,title:y.text,icon:y.icon,type:a.type,correct:y.correct,percentage:y.percentage,answered:y.youVoted,disabled:!!o||a.marketClosed||s,questionAnswered:!!o,hasCorrectAnswer:m,points:y.points,onVote:t}))})})]})}):null},NI="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNNiAxMS45OTlDNiAxMi4xNzI1IDYuMDMxMzQgMTIuMzM0IDYuMDk0MDEgMTIuNDgzN0M2LjE1NjY5IDEyLjYzMzQgNi4yNTQyOCAxMi43NzU2IDYuMzg2OCAxMi45MTAzTDE0LjA0MzYgMjAuNjU2NUMxNC4yNjQ4IDIwLjg4NTUgMTQuNTMyMyAyMSAxNC44NDU5IDIxQzE1LjA2MDcgMjEgMTUuMjU0NCAyMC45NDc1IDE1LjQyNzEgMjAuODQyNkMxNS41OTk4IDIwLjczNzcgMTUuNzM4NCAyMC41OTY1IDE1Ljg0MzEgMjAuNDE5MUMxNS45NDc3IDIwLjI0MTYgMTYgMjAuMDQyNSAxNiAxOS44MjE3QzE2IDE5LjQ5ODkgMTUuODgxNiAxOS4yMTM0IDE1LjY0NDggMTguOTY1NEw4Ljc0MTgzIDExLjk5NzFMMTUuNjQ0OCA1LjAzMjcxQzE1Ljg4MTYgNC43ODcwOSAxNiA0LjUwMjMgMTYgNC4xNzgzNEMxNiAzLjk1NzQ5IDE1Ljk0NzcgMy43NTgzNSAxNS44NDMxIDMuNTgwOTFDMTUuNzM4NCAzLjQwMzQ3IDE1LjU5OTggMy4yNjIyOSAxNS40MjcxIDMuMTU3MzhDMTUuMjU0NCAzLjA1MjQ2IDE1LjA2MDcgMyAxNC44NDU5IDNDMTQuNTMyMyAzIDE0LjI2NDggMy4xMTE2OSAxNC4wNDM2IDMuMzM1MDhMNi4zODY4IDExLjA4NzhDNi4yNTU1MSAxMS4yMjI1IDYuMTU4NTMgMTEuMzY0NCA2LjA5NTg2IDExLjUxMzRDNi4wMzMxOCAxMS42NjI1IDYuMDAxMjMgMTEuODI0NCA2IDExLjk5OVoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const SI=N("div")({name:"Container",class:"c1n31p0r",propsAsIs:!1}),Wr=N("button")({name:"Button",class:"bh1dfyy",propsAsIs:!1}),AI=N("img")({name:"HeaderIcon",class:"h1gjjnyi",propsAsIs:!1}),Ko=({icon:n,comeBack:e,close:t})=>T.jsxs(SI,{children:[T.jsxs("div",{children:[e&&T.jsx(Wr,{onClick:e,children:T.jsx("img",{alt:"header-back-icon",src:NI})}),n&&T.jsx(AI,{alt:"header-icon",src:n})]}),T.jsx("div",{children:t&&T.jsx(Wr,{onClick:t,children:T.jsx("img",{alt:"header-close-icon",src:Rt})})})]});const EI=N("div")({name:"Container",class:"cqrci8d",propsAsIs:!1}),bI=N("div")({name:"Content",class:"c1hep1a5",propsAsIs:!1}),DI=N("div")({name:"Graphic",class:"g1s87azu",propsAsIs:!1}),vI=N("img")({name:"InsightIconDefault",class:"i19cupvp",propsAsIs:!1}),wI=N("img")({name:"InsightIconCircle",class:"i7kr6s3",propsAsIs:!1}),_I=N("img")({name:"InsightIconAbsolute",class:"ikea8mb",propsAsIs:!1}),OI=N("div")({name:"Title",class:"tn29zk0",propsAsIs:!1}),jI=N("img")({name:"NextIcon",class:"ni1hvml",propsAsIs:!1}),LI=(n,e)=>{switch(n){case en.ROUNDED:return T.jsx(wI,{alt:"insight-icon",src:e});case en.TRANSPARENT:return T.jsx(_I,{alt:"insight-icon",src:e});case en.CENTERED:return T.jsx(vI,{alt:"insight-icon",src:e});default:return null}},xI=({title:n,image:e,questionId:t,imageMode:a,openQuestion:s})=>T.jsxs(EI,{onClick:()=>s==null?void 0:s(t),children:[T.jsx(DI,{children:e&&LI(a,e)}),T.jsxs(bI,{children:[T.jsx(OI,{children:n||""}),T.jsx(jI,{alt:"next-icon",src:Ba})]})]});const RI=N("div")({name:"Container",class:"c1ii4cav",propsAsIs:!1}),CI=N("div")({name:"ItemsContainer",class:"irn7lif",propsAsIs:!1}),zI=({insights:n,openQuestion:e,closeInsights:t})=>T.jsxs(RI,{children:[T.jsx(Ko,{close:t}),T.jsx(CI,{children:n==null?void 0:n.map(a=>T.jsx(xI,{openQuestion:e,...a},a.questionId))})]}),UI=({store:n,openQuestion:e,closeInsights:t})=>{const{data:a}=ve.useStore(n);return a?T.jsx(zI,{insights:a,openQuestion:e,closeInsights:t}):T.jsx("div",{children:"wait insights..."})},PI="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=";const BI=N("div")({name:"Container",class:"c2g1lnc",propsAsIs:!1}),QI=N("img")({name:"Image",class:"i1czhbqi",propsAsIs:!1}),FI=N("div")({name:"AdditionalContent",class:"axpm0mb",propsAsIs:!1}),GI=N("div")({name:"Title",class:"t1kppby5",propsAsIs:!1}),YI=N("div")({name:"Description",class:"d18tbzq5",propsAsIs:!1}),VI=N("a")({name:"AdditionalBtn",class:"a6y6po9",propsAsIs:!1}),$I=N("img")({name:"LinkIcon",class:"lii8ybz",propsAsIs:!1}),qI=({image:n,title:e,description:t,webLinkLabel:a,webLink:s,closeQuestion:r,closeInsights:i})=>T.jsxs(BI,{children:[T.jsx(Ko,{close:i,comeBack:r}),n&&T.jsx(QI,{alt:"detail-insight-image",src:n}),T.jsxs(FI,{children:[e&&T.jsx(GI,{children:e}),t&&T.jsx(YI,{children:t})]}),s&&a&&T.jsxs(VI,{href:s,target:"_blank",children:[a,T.jsx($I,{alt:"link-icon",src:PI})]})]}),WI=({store:n,closeQuestion:e,closeInsights:t})=>{var s,r,i,o,m,d,y,h,f,I,E,b;const{data:a}=ve.useStore(n);return!a||((r=(s=a.options)==null?void 0:s.options)==null?void 0:r.case)!=="factoid"?null:T.jsx(qI,{image:(o=(i=a.options)==null?void 0:i.options)==null?void 0:o.value.image,title:a.subject,description:(d=(m=a.options)==null?void 0:m.options)==null?void 0:d.value.body,webLink:(f=(h=(y=a.options)==null?void 0:y.options)==null?void 0:h.value.webLink)==null?void 0:f.url,webLinkLabel:(b=(E=(I=a.options)==null?void 0:I.options)==null?void 0:E.value.webLink)==null?void 0:b.label,closeQuestion:e,closeInsights:t})};const Nn=N("div")({name:"DemoContainer",class:"dp9wag8",propsAsIs:!1}),HI=N("div")({name:"DemoContainerNotifications",class:"d15x0q1l",propsAsIs:!1}),ZI=N("div")({name:"UserStatisticsContainer",class:"u13pbrok",propsAsIs:!1}),KI=N("div")({name:"QuestionsContainer",class:"qaw537u",propsAsIs:!1}),ha=N("button")({name:"Button",class:"bwry012",propsAsIs:!1}),JI=({gamification:n,sdk:e})=>{var d,y,h,f,I,E,b,L,O,x,C,z,U,B,R,H,ne,se,ie,ue,oe,Z,me;const t=ve.useStore(n.status),a=ve.useStore(n.onbordingComplete),{slStreamId:s}=ve.useStore(e.sdkStore),r=ve.useStore(n.featureSettings);if(t!==dn.Ready)return T.jsx("div",{children:"wait..."});if(s!=null&&s.loading)return T.jsx(Nn,{children:T.jsx("div",{children:"Event is loading"})});if(!(s!=null&&s.data))return T.jsx(Nn,{children:T.jsx("div",{children:"Event is forbidden"})});if(!a)return T.jsx(Nn,{children:T.jsx(cd,{closeFeature:e.closeFeature,gamification:n,steps:(y=(d=r.inplayGame)==null?void 0:d.onboarding)==null?void 0:y.steps,gameIcon:(I=(f=(h=r.inplayGame)==null?void 0:h.overview)==null?void 0:f.media)==null?void 0:I.gameIcon,sponsorLogo:(L=(b=(E=r.inplayGame)==null?void 0:E.overview)==null?void 0:b.media)==null?void 0:L.sponsorLogo,rules:(x=(O=r.inplayGame)==null?void 0:O.rules)==null?void 0:x.rules,rulesBtnLabel:(z=(C=r.inplayGame)==null?void 0:C.rules)==null?void 0:z.buttonLabel,rulesTitle:(B=(U=r.inplayGame)==null?void 0:U.rules)==null?void 0:B.heading,primaryColor:(ne=(H=(R=r.inplayGame)==null?void 0:R.overview)==null?void 0:H.appearance)==null?void 0:ne.primaryColor,inviteCardTitle:(ie=(se=r.inplayGame)==null?void 0:se.inviteCard)==null?void 0:ie.heading,inviteCardSubtext:(oe=(ue=r.inplayGame)==null?void 0:ue.inviteCard)==null?void 0:oe.subtext,inviteCardBtnLabel:(me=(Z=r.inplayGame)==null?void 0:Z.inviteCard)==null?void 0:me.buttonLabel})});const i=Ie=>{n.openQuestion(Ie)},o=()=>{n.closeQuestion()},m=(Ie,qe)=>{n.submitAnswer(Ie,qe)};return n.insights?n.openedQuestion?T.jsx(Nn,{children:T.jsx(WI,{store:n.openedQuestion.getStore(),closeQuestion:o,closeInsights:()=>{}})}):T.jsx(Nn,{children:T.jsx(UI,{store:n.insights.getStore(),openQuestion:i,closeInsights:()=>{}})}):T.jsxs(Nn,{children:[T.jsx(ZI,{children:n.userSummary&&T.jsx(tI,{store:n.userSummary.getStore()})}),T.jsxs(KI,{children:[n.questions&&T.jsx(aI,{openQuestion:i,store:n.questions.getStore()}),n.openedQuestion&&T.jsx(II,{closeQuestion:o,vote:m,store:n.openedQuestion.getStore()})]})]})},XI=({sdk:n})=>{const e=async t=>{try{await n.authorizationBypass("streamlayer:streamlayer",t)}catch(a){throw console.log("login err",a),a}};return T.jsx(_m,{login:e,anonymousLogin:n.anonymousAuthorization,host:n.host})},eN=({activeFeature:n,sdk:e})=>{const[t,a]=Q.useState(null),{organizationSettings:s,streamSettings:r}=ve.useStore(e.sdkStore),i=Q.useMemo(()=>{const o=(r==null?void 0:r.data)||(s==null?void 0:s.data);return o!=null&&o.overlays?o.overlays:[]},[s,r]);if(Q.useEffect(()=>{const o=e.getFeatures();if(n)for(const[m,d]of o)m===n?d.status.get()===dn.Suspended&&(d.enable(),a(d)):d.status.get()===dn.Ready&&d.disable();else{for(const[,m]of o)m.status.get()===dn.Ready&&m.disable();a(null)}return()=>{for(const[,m]of o)m.status.get()===dn.Ready&&m.disable()}},[n,e]),n===Oe.GAMES){const o=t;return o?T.jsxs("div",{children:[T.jsx(ha,{onClick:()=>e.closeFeature(),children:"close"}),T.jsx(JI,{gamification:o,sdk:e})]}):T.jsx("div",{children:"wait gamification..."})}return T.jsxs("div",{children:[T.jsx(ha,{onClick:()=>e.logout(),children:"logout"}),i.map(o=>T.jsxs(ha,{onClick:()=>e.openFeature(o.type),disabled:!(o.type in zM),children:[T.jsx("img",{src:o.icon,alt:""}),o.name]},o.name))]})},nN=({sdk:n})=>{const e=ve.useStore(n.organizationStore()),t=ve.useStore(n.getUserStore()),a=ve.useStore(n.getActiveFeature());return e.loading?T.jsx("div",{children:"authentificating..."}):e.data?t.loading?T.jsx("div",{children:"authentificating..."}):t.data?T.jsxs(T.Fragment,{children:[T.jsx(HI,{children:T.jsx(nI,{sdk:n})}),T.jsx(eN,{sdk:n,activeFeature:a})]}):T.jsx(XI,{sdk:n}):T.jsx("div",{children:"wrong sdk key..."})};const tN="t12mji3x",aN=({children:n})=>T.jsx("div",{className:tN,children:n});class sN extends Jf{constructor(t,a){super();A(this,"$coreStore");A(this,"transport");A(this,"$bypassLogin");A(this,"me",async()=>{const t=await this.$coreStore.getValues().user.getValue();return t==null?void 0:t.data});A(this,"login",async(t,a)=>(this.$coreStore.getValues().userKey.setValue(a),await this.$bypassLogin.mutate({schema:t,userKey:a,init:!1}),this.me()));A(this,"isAuthenticated",()=>this.me());A(this,"logout",()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("")});A(this,"subscribe",()=>{this.$bypassLogin.subscribe((t,a)=>{var s,r,i,o;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((o=(i=t==null?void 0:t.data)==null?void 0:i.meta)==null?void 0:o.jwt))})});this.$coreStore=t,this.transport=a,this.$bypassLogin=eM(this.transport),this.subscribe()}}const rN=async(n,e,t)=>{n.auth=new sN(n.store,n.transport);const a=localStorage.getItem("sl-user-schema"),s=localStorage.getItem("sl-user-token");a&&s&&(console.log("try to login prev user"),await n.auth.login(a,s)),n.sdk.authorizationBypass=async(r,i)=>{await n.auth.login(r,i),localStorage.setItem("sl-user-schema","streamlayer:streamlayer")},n.sdk.logout=()=>{n.auth.logout()},n.sdk.getUserStore=()=>n.stores.user.getStore(),n.sdk.isUserAuthorized=()=>n.auth.isAuthenticated(),t()},iN=(n,e,t)=>{n.sdk=Object.create(null),n.sdk.initializeApp=async()=>{n.storeSubscribe(),n.stores.enabled.setValue("on"),n.stores.status.setValue(bn.INITIALIZATION);try{const a=await n.stores.organizationSettings.getValue();return a?(n.stores.status.setValue(bn.READY),{enabled:!!a}):(n.stores.status.setValue(bn.FAILED),{err:"failed"})}catch(a){return n.stores.enabled.setValue(),n.stores.status.setValue(bn.FAILED),{err:`${a}`}}},n.sdk.disableApp=()=>{n.stores.enabled.setValue(),n.stores.status.setValue(bn.DISABLED),n.storeUnsubscribe()},n.sdk.createEventSession=a=>{n.stores.providerStreamId.setValue(""),n.stores.providerStreamId.setValue(a)},t()};var Is={exports:{}},Ns={exports:{}};function oN(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 cN=oN,lN=cN;function Jo(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=lN(uN),s=null,r=null,i=0,o=null,m={push:b,drain:Re,saturated:Re,pause:y,paused:!1,concurrency:t,running:d,resume:I,idle:E,length:h,getQueue:f,unshift:L,empty:Re,kill:x,killAndDrain:C,error:z};return m;function d(){return i}function y(){m.paused=!0}function h(){for(var U=s,B=0;U;)U=U.next,B++;return B}function f(){for(var U=s,B=[];U;)B.push(U.value),U=U.next;return B}function I(){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 b(U,B){var R=a.get();R.context=n,R.release=O,R.value=U,R.callback=B||Re,R.errorHandler=o,i===m.concurrency||m.paused?r?(r.next=R,r=R):(s=R,r=R,m.saturated()):(i++,e.call(n,R.value,R.worked))}function L(U,B){var R=a.get();R.context=n,R.release=O,R.value=U,R.callback=B||Re,i===m.concurrency||m.paused?s?(R.next=s,s=R):(s=R,r=R,m.saturated()):(i++,e.call(n,R.value,R.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 x(){s=null,r=null,m.drain=Re}function C(){s=null,r=null,m.drain(),m.drain=Re}function z(U){o=U}}function Re(){}function uN(){this.value=null,this.callback=Re,this.next=null,this.release=Re,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=Re,n.errorHandler&&r(t,i),s.call(n.context,t,a),n.release(n)}}function mN(n,e,t){typeof n=="function"&&(t=e,e=n,n=null);function a(y,h){e.call(this,y).then(function(f){h(null,f)},h)}var s=Jo(n,a,t),r=s.push,i=s.unshift;return s.push=o,s.unshift=m,s.drained=d,s;function o(y){var h=new Promise(function(f,I){r(y,function(E,b){if(E){I(E);return}f(b)})});return h.catch(Re),h}function m(y){var h=new Promise(function(f,I){i(y,function(E,b){if(E){I(E);return}f(b)})});return h.catch(Re),h}function d(){if(s.idle())return new Promise(function(f){f()});var y=s.drain,h=new Promise(function(f){s.drain=function(){y(),f()}});return h}}Ns.exports=Jo;Ns.exports.promise=mN;var Xo=Ns.exports,Ss={exports:{}},jn=typeof Reflect=="object"?Reflect:null,Hr=jn&&typeof jn.apply=="function"?jn.apply:function(e,t,a){return Function.prototype.apply.call(e,t,a)},kt;jn&&typeof jn.ownKeys=="function"?kt=jn.ownKeys:Object.getOwnPropertySymbols?kt=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:kt=function(e){return Object.getOwnPropertyNames(e)};function dN(n){console&&console.warn&&console.warn(n)}var ec=Number.isNaN||function(e){return e!==e};function te(){te.init.call(this)}Ss.exports=te;Ss.exports.once=gN;te.EventEmitter=te;te.prototype._events=void 0;te.prototype._eventsCount=0;te.prototype._maxListeners=void 0;var Zr=10;function Wt(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 Zr},set:function(n){if(typeof n!="number"||n<0||ec(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");Zr=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||ec(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 nc(n){return n._maxListeners===void 0?te.defaultMaxListeners:n._maxListeners}te.prototype.getMaxListeners=function(){return nc(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 o=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw o.context=i,o}var m=r[e];if(m===void 0)return!1;if(typeof m=="function")Hr(m,this,t);else for(var d=m.length,y=ic(m,d),a=0;a<d;++a)Hr(y[a],this,t);return!0};function tc(n,e,t,a){var s,r,i;if(Wt(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=nc(n),s>0&&i.length>s&&!i.warned){i.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=n,o.type=e,o.count=i.length,dN(o)}return n}te.prototype.addListener=function(e,t){return tc(this,e,t,!1)};te.prototype.on=te.prototype.addListener;te.prototype.prependListener=function(e,t){return tc(this,e,t,!0)};function pN(){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 ac(n,e,t){var a={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},s=pN.bind(a);return s.listener=t,a.wrapFn=s,s}te.prototype.once=function(e,t){return Wt(t),this.on(e,ac(this,e,t)),this};te.prototype.prependOnceListener=function(e,t){return Wt(t),this.prependListener(e,ac(this,e,t)),this};te.prototype.removeListener=function(e,t){var a,s,r,i,o;if(Wt(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){o=a[i].listener,r=i;break}if(r<0)return this;r===0?a.shift():yN(a,r),a.length===1&&(s[e]=a[0]),s.removeListener!==void 0&&this.emit("removeListener",e,o||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 sc(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?fN(s):ic(s,s.length)}te.prototype.listeners=function(e){return sc(this,e,!0)};te.prototype.rawListeners=function(e){return sc(this,e,!1)};te.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):rc.call(n,e)};te.prototype.listenerCount=rc;function rc(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?kt(this._events):[]};function ic(n,e){for(var t=new Array(e),a=0;a<e;++a)t[a]=n[a];return t}function yN(n,e){for(;e+1<n.length;e++)n[e]=n[e+1];n.pop()}function fN(n){for(var e=new Array(n.length),t=0;t<e.length;++t)e[t]=n[t].listener||n[t];return e}function gN(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))}oc(n,e,r,{once:!0}),e!=="error"&&TN(n,s,{once:!0})})}function TN(n,e,t){typeof n.on=="function"&&oc(n,"error",e,t)}function oc(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 cc=Ss.exports,Ht={},lc={},uc=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},hN=uc,As=function(){return hN()&&!!Symbol.toStringTag},Kr=typeof Symbol<"u"&&Symbol,kN=uc,MN=function(){return typeof Kr!="function"||typeof Symbol!="function"||typeof Kr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:kN()},Jr={foo:{}},IN=Object,NN=function(){return{__proto__:Jr}.foo===Jr.foo&&!({__proto__:null}instanceof IN)},SN="Function.prototype.bind called on incompatible ",AN=Object.prototype.toString,EN=Math.max,bN="[object Function]",Xr=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},DN=function(e,t){for(var a=[],s=t||0,r=0;s<e.length;s+=1,r+=1)a[r]=e[s];return a},vN=function(n,e){for(var t="",a=0;a<n.length;a+=1)t+=n[a],a+1<n.length&&(t+=e);return t},wN=function(e){var t=this;if(typeof t!="function"||AN.apply(t)!==bN)throw new TypeError(SN+t);for(var a=DN(arguments,1),s,r=function(){if(this instanceof s){var y=t.apply(this,Xr(a,arguments));return Object(y)===y?y:this}return t.apply(e,Xr(a,arguments))},i=EN(0,t.length-a.length),o=[],m=0;m<i;m++)o[m]="$"+m;if(s=Function("binder","return function ("+vN(o,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var d=function(){};d.prototype=t.prototype,s.prototype=new d,d.prototype=null}return s},_N=wN,mc=Function.prototype.bind||_N,ei={}.hasOwnProperty,ka=Function.prototype.call,ON=ka.bind?ka.bind(ei):function(n,e){return ka.call(ei,n,e)},q,Pn=SyntaxError,dc=Function,Ln=TypeError,Ma=function(n){try{return dc('"use strict"; return ('+n+").constructor;")()}catch{}},pn=Object.getOwnPropertyDescriptor;if(pn)try{pn({},"")}catch{pn=null}var Ia=function(){throw new Ln},jN=pn?function(){try{return arguments.callee,Ia}catch{try{return pn(arguments,"callee").get}catch{return Ia}}}():Ia,Sn=MN(),LN=NN(),ge=Object.getPrototypeOf||(LN?function(n){return n.__proto__}:null),Dn={},xN=typeof Uint8Array>"u"||!ge?q:ge(Uint8Array),yn={"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":Sn&&ge?ge([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":Dn,"%AsyncGenerator%":Dn,"%AsyncGeneratorFunction%":Dn,"%AsyncIteratorPrototype%":Dn,"%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%":dc,"%GeneratorFunction%":Dn,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Sn&&ge?ge(ge([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Sn||!ge?q:ge(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"||!Sn||!ge?q:ge(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Sn&&ge?ge(""[Symbol.iterator]()):q,"%Symbol%":Sn?Symbol:q,"%SyntaxError%":Pn,"%ThrowTypeError%":jN,"%TypedArray%":xN,"%TypeError%":Ln,"%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(ge)try{null.error}catch(n){var RN=ge(ge(n));yn["%Error.prototype%"]=RN}var CN=function n(e){var t;if(e==="%AsyncFunction%")t=Ma("async function () {}");else if(e==="%GeneratorFunction%")t=Ma("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Ma("async function* () {}");else if(e==="%AsyncGenerator%"){var a=n("%AsyncGeneratorFunction%");a&&(t=a.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&ge&&(t=ge(s.prototype))}return yn[e]=t,t},ni={"%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"]},ot=mc,wt=ON,zN=ot.call(Function.call,Array.prototype.concat),UN=ot.call(Function.apply,Array.prototype.splice),ti=ot.call(Function.call,String.prototype.replace),_t=ot.call(Function.call,String.prototype.slice),PN=ot.call(Function.call,RegExp.prototype.exec),BN=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,QN=/\\(\\)?/g,FN=function(e){var t=_t(e,0,1),a=_t(e,-1);if(t==="%"&&a!=="%")throw new Pn("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&t!=="%")throw new Pn("invalid intrinsic syntax, expected opening `%`");var s=[];return ti(e,BN,function(r,i,o,m){s[s.length]=o?ti(m,QN,"$1"):i||r}),s},GN=function(e,t){var a=e,s;if(wt(ni,a)&&(s=ni[a],a="%"+s[0]+"%"),wt(yn,a)){var r=yn[a];if(r===Dn&&(r=CN(a)),typeof r>"u"&&!t)throw new Ln("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:a,value:r}}throw new Pn("intrinsic "+e+" does not exist!")},Yn=function(e,t){if(typeof e!="string"||e.length===0)throw new Ln("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Ln('"allowMissing" argument must be a boolean');if(PN(/^%?[^%]*%?$/,e)===null)throw new Pn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=FN(e),s=a.length>0?a[0]:"",r=GN("%"+s+"%",t),i=r.name,o=r.value,m=!1,d=r.alias;d&&(s=d[0],UN(a,zN([0,1],d)));for(var y=1,h=!0;y<a.length;y+=1){var f=a[y],I=_t(f,0,1),E=_t(f,-1);if((I==='"'||I==="'"||I==="`"||E==='"'||E==="'"||E==="`")&&I!==E)throw new Pn("property names with quotes must have matching quotes");if((f==="constructor"||!h)&&(m=!0),s+="."+f,i="%"+s+"%",wt(yn,i))o=yn[i];else if(o!=null){if(!(f in o)){if(!t)throw new Ln("base intrinsic for "+e+" exists, but the property is not available.");return}if(pn&&y+1>=a.length){var b=pn(o,f);h=!!b,h&&"get"in b&&!("originalValue"in b.get)?o=b.get:o=o[f]}else h=wt(o,f),o=o[f];h&&!m&&(yn[i]=o)}}return o},pc={exports:{}},YN=Yn,$a=YN("%Object.defineProperty%",!0),qa=function(){if($a)try{return $a({},"a",{value:1}),!0}catch{return!1}return!1};qa.hasArrayLengthDefineBug=function(){if(!qa())return null;try{return $a([],"length",{value:1}).length!==1}catch{return!0}};var yc=qa,VN=Yn,Mt=VN("%Object.getOwnPropertyDescriptor%",!0);if(Mt)try{Mt([],"length")}catch{Mt=null}var Es=Mt,$N=yc(),bs=Yn,nt=$N&&bs("%Object.defineProperty%",!0);if(nt)try{nt({},"a",{value:1})}catch{nt=!1}var qN=bs("%SyntaxError%"),An=bs("%TypeError%"),ai=Es,WN=function(e,t,a){if(!e||typeof e!="object"&&typeof e!="function")throw new An("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new An("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new An("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new An("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new An("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new An("`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,o=arguments.length>6?arguments[6]:!1,m=!!ai&&ai(e,t);if(nt)nt(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(o||!s&&!r&&!i)e[t]=a;else throw new qN("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},fc=Yn,si=WN,HN=yc(),ri=Es,ii=fc("%TypeError%"),ZN=fc("%Math.floor%"),KN=function(e,t){if(typeof e!="function")throw new ii("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||ZN(t)!==t)throw new ii("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],s=!0,r=!0;if("length"in e&&ri){var i=ri(e,"length");i&&!i.configurable&&(s=!1),i&&!i.writable&&(r=!1)}return(s||r||!a)&&(HN?si(e,"length",t,!0,!0):si(e,"length",t)),e};(function(n){var e=mc,t=Yn,a=KN,s=t("%TypeError%"),r=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),o=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(f){if(typeof f!="function")throw new s("a function is required");var I=o(e,i,arguments);return a(I,1+d(0,f.length-(arguments.length-1)),!0)};var y=function(){return o(e,r,arguments)};m?m(n.exports,"apply",{value:y}):n.exports.apply=y})(pc);var gc=pc.exports,Tc=Yn,hc=gc,JN=hc(Tc("String.prototype.indexOf")),kc=function(e,t){var a=Tc(e,!!t);return typeof a=="function"&&JN(e,".prototype.")>-1?hc(a):a},XN=As(),eS=kc,Wa=eS("Object.prototype.toString"),Zt=function(e){return XN&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Wa(e)==="[object Arguments]"},Mc=function(e){return Zt(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Wa(e)!=="[object Array]"&&Wa(e.callee)==="[object Function]"},nS=function(){return Zt(arguments)}();Zt.isLegacyArguments=Mc;var tS=nS?Zt:Mc,aS=Object.prototype.toString,sS=Function.prototype.toString,rS=/^\s*(?:function)?\*/,Ic=As(),Na=Object.getPrototypeOf,iS=function(){if(!Ic)return!1;try{return Function("return function*() {}")()}catch{}},Sa,oS=function(e){if(typeof e!="function")return!1;if(rS.test(sS.call(e)))return!0;if(!Ic){var t=aS.call(e);return t==="[object GeneratorFunction]"}if(!Na)return!1;if(typeof Sa>"u"){var a=iS();Sa=a?Na(a):!1}return Na(e)===Sa},Nc=Function.prototype.toString,wn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ha,It;if(typeof wn=="function"&&typeof Object.defineProperty=="function")try{Ha=Object.defineProperty({},"length",{get:function(){throw It}}),It={},wn(function(){throw 42},null,Ha)}catch(n){n!==It&&(wn=null)}else wn=null;var cS=/^\s*class\b/,Za=function(e){try{var t=Nc.call(e);return cS.test(t)}catch{return!1}},Aa=function(e){try{return Za(e)?!1:(Nc.call(e),!0)}catch{return!1}},Nt=Object.prototype.toString,lS="[object Object]",uS="[object Function]",mS="[object GeneratorFunction]",dS="[object HTMLAllCollection]",pS="[object HTML document.all class]",yS="[object HTMLCollection]",fS=typeof Symbol=="function"&&!!Symbol.toStringTag,gS=!(0 in[,]),Ka=function(){return!1};if(typeof document=="object"){var TS=document.all;Nt.call(TS)===Nt.call(document.all)&&(Ka=function(e){if((gS||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=Nt.call(e);return(t===dS||t===pS||t===yS||t===lS)&&e("")==null}catch{}return!1})}var hS=wn?function(e){if(Ka(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{wn(e,null,Ha)}catch(t){if(t!==It)return!1}return!Za(e)&&Aa(e)}:function(e){if(Ka(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(fS)return Aa(e);if(Za(e))return!1;var t=Nt.call(e);return t!==uS&&t!==mS&&!/^\[object HTML/.test(t)?!1:Aa(e)},kS=hS,MS=Object.prototype.toString,Sc=Object.prototype.hasOwnProperty,IS=function(e,t,a){for(var s=0,r=e.length;s<r;s++)Sc.call(e,s)&&(a==null?t(e[s],s,e):t.call(a,e[s],s,e))},NS=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)},SS=function(e,t,a){for(var s in e)Sc.call(e,s)&&(a==null?t(e[s],s,e):t.call(a,e[s],s,e))},AS=function(e,t,a){if(!kS(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=a),MS.call(e)==="[object Array]"?IS(e,t,s):typeof e=="string"?NS(e,t,s):SS(e,t,s)},ES=AS,Ea=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],bS=typeof globalThis>"u"?gi:globalThis,DS=function(){for(var e=[],t=0;t<Ea.length;t++)typeof bS[Ea[t]]=="function"&&(e[e.length]=Ea[t]);return e},Ot=ES,vS=DS,oi=gc,Ds=kc,St=Es,wS=Ds("Object.prototype.toString"),Ac=As(),ci=typeof globalThis>"u"?gi:globalThis,Ja=vS(),vs=Ds("String.prototype.slice"),ba=Object.getPrototypeOf,_S=Ds("Array.prototype.indexOf",!0)||function(e,t){for(var a=0;a<e.length;a+=1)if(e[a]===t)return a;return-1},jt={__proto__:null};Ac&&St&&ba?Ot(Ja,function(n){var e=new ci[n];if(Symbol.toStringTag in e){var t=ba(e),a=St(t,Symbol.toStringTag);if(!a){var s=ba(t);a=St(s,Symbol.toStringTag)}jt["$"+n]=oi(a.get)}}):Ot(Ja,function(n){var e=new ci[n],t=e.slice||e.set;t&&(jt["$"+n]=oi(t))});var OS=function(e){var t=!1;return Ot(jt,function(a,s){if(!t)try{"$"+a(e)===s&&(t=vs(s,1))}catch{}}),t},jS=function(e){var t=!1;return Ot(jt,function(a,s){if(!t)try{a(e),t=vs(s,1)}catch{}}),t},Ec=function(e){if(!e||typeof e!="object")return!1;if(!Ac){var t=vs(wS(e),8,-1);return _S(Ja,t)>-1?t:t!=="Object"?!1:jS(e)}return St?OS(e):null},LS=Ec,xS=function(e){return!!LS(e)};(function(n){var e=tS,t=oS,a=Ec,s=xS;function r(_){return _.call.bind(_)}var i=typeof BigInt<"u",o=typeof Symbol<"u",m=r(Object.prototype.toString),d=r(Number.prototype.valueOf),y=r(String.prototype.valueOf),h=r(Boolean.prototype.valueOf);if(i)var f=r(BigInt.prototype.valueOf);if(o)var I=r(Symbol.prototype.valueOf);function E(_,lt){if(typeof _!="object")return!1;try{return lt(_),!0}catch{return!1}}n.isArgumentsObject=e,n.isGeneratorFunction=t,n.isTypedArray=s;function b(_){return typeof Promise<"u"&&_ instanceof Promise||_!==null&&typeof _=="object"&&typeof _.then=="function"&&typeof _.catch=="function"}n.isPromise=b;function L(_){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(_):s(_)||v(_)}n.isArrayBufferView=L;function O(_){return a(_)==="Uint8Array"}n.isUint8Array=O;function x(_){return a(_)==="Uint8ClampedArray"}n.isUint8ClampedArray=x;function C(_){return a(_)==="Uint16Array"}n.isUint16Array=C;function z(_){return a(_)==="Uint32Array"}n.isUint32Array=z;function U(_){return a(_)==="Int8Array"}n.isInt8Array=U;function B(_){return a(_)==="Int16Array"}n.isInt16Array=B;function R(_){return a(_)==="Int32Array"}n.isInt32Array=R;function H(_){return a(_)==="Float32Array"}n.isFloat32Array=H;function ne(_){return a(_)==="Float64Array"}n.isFloat64Array=ne;function se(_){return a(_)==="BigInt64Array"}n.isBigInt64Array=se;function ie(_){return a(_)==="BigUint64Array"}n.isBigUint64Array=ie;function ue(_){return m(_)==="[object Map]"}ue.working=typeof Map<"u"&&ue(new Map);function oe(_){return typeof Map>"u"?!1:ue.working?ue(_):_ instanceof Map}n.isMap=oe;function Z(_){return m(_)==="[object Set]"}Z.working=typeof Set<"u"&&Z(new Set);function me(_){return typeof Set>"u"?!1:Z.working?Z(_):_ instanceof Set}n.isSet=me;function Ie(_){return m(_)==="[object WeakMap]"}Ie.working=typeof WeakMap<"u"&&Ie(new WeakMap);function qe(_){return typeof WeakMap>"u"?!1:Ie.working?Ie(_):_ instanceof WeakMap}n.isWeakMap=qe;function Ue(_){return m(_)==="[object WeakSet]"}Ue.working=typeof WeakSet<"u"&&Ue(new WeakSet);function Ne(_){return Ue(_)}n.isWeakSet=Ne;function Se(_){return m(_)==="[object ArrayBuffer]"}Se.working=typeof ArrayBuffer<"u"&&Se(new ArrayBuffer);function K(_){return typeof ArrayBuffer>"u"?!1:Se.working?Se(_):_ instanceof ArrayBuffer}n.isArrayBuffer=K;function M(_){return m(_)==="[object DataView]"}M.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&M(new DataView(new ArrayBuffer(1),0,1));function v(_){return typeof DataView>"u"?!1:M.working?M(_):_ instanceof DataView}n.isDataView=v;var j=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function F(_){return m(_)==="[object SharedArrayBuffer]"}function W(_){return typeof j>"u"?!1:(typeof F.working>"u"&&(F.working=F(new j)),F.working?F(_):_ instanceof j)}n.isSharedArrayBuffer=W;function J(_){return m(_)==="[object AsyncFunction]"}n.isAsyncFunction=J;function Y(_){return m(_)==="[object Map Iterator]"}n.isMapIterator=Y;function $(_){return m(_)==="[object Set Iterator]"}n.isSetIterator=$;function X(_){return m(_)==="[object Generator]"}n.isGeneratorObject=X;function Me(_){return m(_)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=Me;function Pe(_){return E(_,d)}n.isNumberObject=Pe;function Ce(_){return E(_,y)}n.isStringObject=Ce;function Le(_){return E(_,h)}n.isBooleanObject=Le;function hn(_){return i&&E(_,f)}n.isBigIntObject=hn;function ct(_){return o&&E(_,I)}n.isSymbolObject=ct;function $n(_){return Pe(_)||Ce(_)||Le(_)||hn(_)||ct(_)}n.isBoxedPrimitive=$n;function Kt(_){return typeof Uint8Array<"u"&&(K(_)||W(_))}n.isAnyArrayBuffer=Kt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(_){Object.defineProperty(n,_,{enumerable:!1,value:function(){throw new Error(_+" is not supported in userland")}})})})(lc);var RS=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Xa={exports:{}};typeof Object.create=="function"?Xa.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Xa.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 CS=Xa.exports;(function(n){var e=Object.getOwnPropertyDescriptors||function(v){for(var j=Object.keys(v),F={},W=0;W<j.length;W++)F[j[W]]=Object.getOwnPropertyDescriptor(v,j[W]);return F},t=/%[sdj%]/g;n.format=function(M){if(!U(M)){for(var v=[],j=0;j<arguments.length;j++)v.push(i(arguments[j]));return v.join(" ")}for(var j=1,F=arguments,W=F.length,J=String(M).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])x(Y)||!ne(Y)?J+=" "+Y:J+=" "+i(Y);return J},n.deprecate=function(M,v){if(typeof G.process<"u"&&G.process.noDeprecation===!0)return M;if(typeof G.process>"u")return function(){return n.deprecate(M,v).apply(this,arguments)};var j=!1;function F(){if(!j){if(G.process.throwDeprecation)throw new Error(v);G.process.traceDeprecation?console.trace(v):console.error(v),j=!0}return M.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(M){if(M=M.toUpperCase(),!a[M])if(s.test(M)){var v=G.process.pid;a[M]=function(){var j=n.format.apply(n,arguments);console.error("%s %d: %s",M,v,j)}}else a[M]=function(){};return a[M]};function i(M,v){var j={seen:[],stylize:m};return arguments.length>=3&&(j.depth=arguments[2]),arguments.length>=4&&(j.colors=arguments[3]),O(v)?j.showHidden=v:v&&n._extend(j,v),R(j.showHidden)&&(j.showHidden=!1),R(j.depth)&&(j.depth=2),R(j.colors)&&(j.colors=!1),R(j.customInspect)&&(j.customInspect=!0),j.colors&&(j.stylize=o),y(j,M,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 o(M,v){var j=i.styles[v];return j?"\x1B["+i.colors[j][0]+"m"+M+"\x1B["+i.colors[j][1]+"m":M}function m(M,v){return M}function d(M){var v={};return M.forEach(function(j,F){v[j]=!0}),v}function y(M,v,j){if(M.customInspect&&v&&ue(v.inspect)&&v.inspect!==n.inspect&&!(v.constructor&&v.constructor.prototype===v)){var F=v.inspect(j,M);return U(F)||(F=y(M,F,j)),F}var W=h(M,v);if(W)return W;var J=Object.keys(v),Y=d(J);if(M.showHidden&&(J=Object.getOwnPropertyNames(v)),ie(v)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return f(v);if(J.length===0){if(ue(v)){var $=v.name?": "+v.name:"";return M.stylize("[Function"+$+"]","special")}if(H(v))return M.stylize(RegExp.prototype.toString.call(v),"regexp");if(se(v))return M.stylize(Date.prototype.toString.call(v),"date");if(ie(v))return f(v)}var X="",Me=!1,Pe=["{","}"];if(L(v)&&(Me=!0,Pe=["[","]"]),ue(v)){var Ce=v.name?": "+v.name:"";X=" [Function"+Ce+"]"}if(H(v)&&(X=" "+RegExp.prototype.toString.call(v)),se(v)&&(X=" "+Date.prototype.toUTCString.call(v)),ie(v)&&(X=" "+f(v)),J.length===0&&(!Me||v.length==0))return Pe[0]+X+Pe[1];if(j<0)return H(v)?M.stylize(RegExp.prototype.toString.call(v),"regexp"):M.stylize("[Object]","special");M.seen.push(v);var Le;return Me?Le=I(M,v,j,Y,J):Le=J.map(function(hn){return E(M,v,j,Y,hn,Me)}),M.seen.pop(),b(Le,X,Pe)}function h(M,v){if(R(v))return M.stylize("undefined","undefined");if(U(v)){var j="'"+JSON.stringify(v).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(j,"string")}if(z(v))return M.stylize(""+v,"number");if(O(v))return M.stylize(""+v,"boolean");if(x(v))return M.stylize("null","null")}function f(M){return"["+Error.prototype.toString.call(M)+"]"}function I(M,v,j,F,W){for(var J=[],Y=0,$=v.length;Y<$;++Y)Ue(v,String(Y))?J.push(E(M,v,j,F,String(Y),!0)):J.push("");return W.forEach(function(X){X.match(/^\d+$/)||J.push(E(M,v,j,F,X,!0))}),J}function E(M,v,j,F,W,J){var Y,$,X;if(X=Object.getOwnPropertyDescriptor(v,W)||{value:v[W]},X.get?X.set?$=M.stylize("[Getter/Setter]","special"):$=M.stylize("[Getter]","special"):X.set&&($=M.stylize("[Setter]","special")),Ue(F,W)||(Y="["+W+"]"),$||(M.seen.indexOf(X.value)<0?(x(j)?$=y(M,X.value,null):$=y(M,X.value,j-1),$.indexOf(`
19
+ `)>-1&&(J?$=$.split(`
20
+ `).map(function(Me){return" "+Me}).join(`
21
+ `).slice(2):$=`
22
+ `+$.split(`
23
+ `).map(function(Me){return" "+Me}).join(`
24
+ `))):$=M.stylize("[Circular]","special")),R(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=M.stylize(Y,"name")):(Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=M.stylize(Y,"string"))}return Y+": "+$}function b(M,v,j){var F=M.reduce(function(W,J){return J.indexOf(`
25
+ `)>=0,W+J.replace(/\u001b\[\d\d?m/g,"").length+1},0);return F>60?j[0]+(v===""?"":v+`
26
+ `)+" "+M.join(`,
27
+ `)+" "+j[1]:j[0]+v+" "+M.join(", ")+" "+j[1]}n.types=lc;function L(M){return Array.isArray(M)}n.isArray=L;function O(M){return typeof M=="boolean"}n.isBoolean=O;function x(M){return M===null}n.isNull=x;function C(M){return M==null}n.isNullOrUndefined=C;function z(M){return typeof M=="number"}n.isNumber=z;function U(M){return typeof M=="string"}n.isString=U;function B(M){return typeof M=="symbol"}n.isSymbol=B;function R(M){return M===void 0}n.isUndefined=R;function H(M){return ne(M)&&Z(M)==="[object RegExp]"}n.isRegExp=H,n.types.isRegExp=H;function ne(M){return typeof M=="object"&&M!==null}n.isObject=ne;function se(M){return ne(M)&&Z(M)==="[object Date]"}n.isDate=se,n.types.isDate=se;function ie(M){return ne(M)&&(Z(M)==="[object Error]"||M instanceof Error)}n.isError=ie,n.types.isNativeError=ie;function ue(M){return typeof M=="function"}n.isFunction=ue;function oe(M){return M===null||typeof M=="boolean"||typeof M=="number"||typeof M=="string"||typeof M=="symbol"||typeof M>"u"}n.isPrimitive=oe,n.isBuffer=RS;function Z(M){return Object.prototype.toString.call(M)}function me(M){return M<10?"0"+M.toString(10):M.toString(10)}var Ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function qe(){var M=new Date,v=[me(M.getHours()),me(M.getMinutes()),me(M.getSeconds())].join(":");return[M.getDate(),Ie[M.getMonth()],v].join(" ")}n.log=function(){console.log("%s - %s",qe(),n.format.apply(n,arguments))},n.inherits=CS,n._extend=function(M,v){if(!v||!ne(v))return M;for(var j=Object.keys(v),F=j.length;F--;)M[j[F]]=v[j[F]];return M};function Ue(M,v){return Object.prototype.hasOwnProperty.call(M,v)}var Ne=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(v){if(typeof v!="function")throw new TypeError('The "original" argument must be of type Function');if(Ne&&v[Ne]){var j=v[Ne];if(typeof j!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(j,Ne,{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{v.apply(this,Y)}catch(X){W(X)}return J}return Object.setPrototypeOf(j,Object.getPrototypeOf(v)),Ne&&Object.defineProperty(j,Ne,{value:j,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(j,e(v))},n.promisify.custom=Ne;function Se(M,v){if(!M){var j=new Error("Promise was rejected with a falsy value");j.reason=M,M=j}return v(M)}function K(M){if(typeof M!="function")throw new TypeError('The "original" argument must be of type Function');function v(){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)};M.apply(this,j).then(function($){G.process.nextTick(Y.bind(null,null,$))},function($){G.process.nextTick(Se.bind(null,$,Y))})}return Object.setPrototypeOf(v,Object.getPrototypeOf(M)),Object.defineProperties(v,e(M)),v}n.callbackify=K})(Ht);const{inherits:zS,format:Da}=Ht;function ln(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=Da(e,s,r,i):s&&r?this.message=Da(e,s,r):s?this.message=Da(e,s):this.message=e}return a.prototype[Symbol.toStringTag]="Error",a.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},zS(a,t),a}var bc={createError:ln,AVV_ERR_EXPOSE_ALREADY_DEFINED:ln("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:ln("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:ln("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:ln("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:ln("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:ln("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},US=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(`
28
+ `),o=`
29
+ `+t+(r.length?s("│"):" ")+" ";return t+i.join(o)+`
30
+ `+r.map(function(m,d){var y=d===r.length-1,h=m.nodes&&m.nodes.length,f=t+(y?" ":s("│"))+" ";return t+s(y?"└":"├")+s("─")+s(h?"┬":"─")+" "+n(m,f,a).slice(t.length+2)}).join("")};const PS=US,li=Symbol("avvio.TimeTree.untrackNode"),va=Symbol("avvio.TimeTree.trackNode"),ui=Symbol("avvio.TimeTree.getParent"),mi=Symbol("avvio.TimeTree.getNode"),di=Symbol("avvio.TimeTree.addNode");let BS=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[va](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])}[li](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)}[ui](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[mi](e){return this.tableId.get(e)}[di](e,t,a){if(e===null)return this.root={id:"root",label:t,start:a,nodes:[]},this[va](this.root),this.root.id;const r=this[ui](e),i=`${t}-${Math.random()}`,o={id:i,parent:e,start:a,label:t,nodes:[]};return r.nodes.push(o),this[va](o),i}start(e,t,a=Date.now()){return this[di](e,t,a)}stop(e,t=Date.now()){const a=this[mi](e);a&&(a.stop=t,a.diff=a.stop-a.start||0,this[li](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 PS(t)}};var QS=BS,ws={exports:{}},es={exports:{}},wa,pi;function FS(){if(pi)return wa;pi=1;var n=1e3,e=n*60,t=e*60,a=t*24,s=a*7,r=a*365.25;wa=function(y,h){h=h||{};var f=typeof y;if(f==="string"&&y.length>0)return i(y);if(f==="number"&&isFinite(y))return h.long?m(y):o(y);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(y))};function i(y){if(y=String(y),!(y.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(y);if(h){var f=parseFloat(h[1]),I=(h[2]||"ms").toLowerCase();switch(I){case"years":case"year":case"yrs":case"yr":case"y":return f*r;case"weeks":case"week":case"w":return f*s;case"days":case"day":case"d":return f*a;case"hours":case"hour":case"hrs":case"hr":case"h":return f*t;case"minutes":case"minute":case"mins":case"min":case"m":return f*e;case"seconds":case"second":case"secs":case"sec":case"s":return f*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function o(y){var h=Math.abs(y);return h>=a?Math.round(y/a)+"d":h>=t?Math.round(y/t)+"h":h>=e?Math.round(y/e)+"m":h>=n?Math.round(y/n)+"s":y+"ms"}function m(y){var h=Math.abs(y);return h>=a?d(y,h,a,"day"):h>=t?d(y,h,t,"hour"):h>=e?d(y,h,e,"minute"):h>=n?d(y,h,n,"second"):y+" ms"}function d(y,h,f,I){var E=h>=f*1.5;return Math.round(y/f)+" "+I+(E?"s":"")}return wa}function GS(n){t.debug=t,t.default=t,t.coerce=m,t.disable=r,t.enable=s,t.enabled=i,t.humanize=FS(),t.destroy=d,Object.keys(n).forEach(y=>{t[y]=n[y]}),t.names=[],t.skips=[],t.formatters={};function e(y){let h=0;for(let f=0;f<y.length;f++)h=(h<<5)-h+y.charCodeAt(f),h|=0;return t.colors[Math.abs(h)%t.colors.length]}t.selectColor=e;function t(y){let h,f=null,I,E;function b(...L){if(!b.enabled)return;const O=b,x=Number(new Date),C=x-(h||x);O.diff=C,O.prev=h,O.curr=x,h=x,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,R)=>{if(B==="%%")return"%";z++;const H=t.formatters[R];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 b.namespace=y,b.useColors=t.useColors(),b.color=t.selectColor(y),b.extend=a,b.destroy=t.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(I!==t.namespaces&&(I=t.namespaces,E=t.enabled(y)),E),set:L=>{f=L}}),typeof t.init=="function"&&t.init(b),b}function a(y,h){const f=t(this.namespace+(typeof h>"u"?":":h)+y);return f.log=this.log,f}function s(y){t.save(y),t.namespaces=y,t.names=[],t.skips=[];let h;const f=(typeof y=="string"?y:"").split(/[\s,]+/),I=f.length;for(h=0;h<I;h++)f[h]&&(y=f[h].replace(/\*/g,".*?"),y[0]==="-"?t.skips.push(new RegExp("^"+y.slice(1)+"$")):t.names.push(new RegExp("^"+y+"$")))}function r(){const y=[...t.names.map(o),...t.skips.map(o).map(h=>"-"+h)].join(",");return t.enable(""),y}function i(y){if(y[y.length-1]==="*")return!0;let h,f;for(h=0,f=t.skips.length;h<f;h++)if(t.skips[h].test(y))return!1;for(h=0,f=t.names.length;h<f;h++)if(t.names[h].test(y))return!0;return!1}function o(y){return y.toString().substring(2,y.toString().length-2).replace(/\.\*\?$/,"*")}function m(y){return y instanceof Error?y.stack||y.message:y}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 YS=GS;(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 y=0,h=0;m[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(y++,f==="%c"&&(h=y))}),m.splice(h,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=YS(e);const{formatters:o}=n.exports;o.j=function(m){try{return JSON.stringify(m)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(es,es.exports);var Dc=es.exports;const VS=Xo,$S=cc.EventEmitter,qS=Ht.inherits,Te=Dc("avvio"),{AVV_ERR_READY_TIMEOUT:WS}=bc,_a=Symbol.for("plugin-meta");function HS(n,e){return n[_a]&&n[_a].name?n[_a].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:n.name?n.name:n.toString().split(`
31
+ `).slice(0,2).map(t=>t.trim()).join(" -- ")}function ZS(){const n={};return n.promise=new Promise((e,t)=>{n.resolve=e,n.reject=t}),n}function Vn(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=HS(e,t),this.isAfter=a,this.q=VS(n,KS,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}qS(Vn,$S);Vn.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 WS(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 o=t(this.server,this.opts,i);o&&typeof o.then=="function"&&(Te("exec: resolving promise",s),o.then(()=>G.process.nextTick(i),m=>G.process.nextTick(i,m)))};Vn.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=ZS(),e=this._promise.promise,this.server?n():this.on("start",n)),e};Vn.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)};Vn.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=JS,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function KS(n,e){const t=this;G.process.nextTick(_s.bind(t),n,e)}function _s(n,e){if(typeof n.func.then=="function"){n.func.then(a=>{typeof a.default=="function"&&(a=a.default),n.func=a,_s.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 JS(){}ws.exports=Vn;ws.exports.loadPlugin=_s;var XS=ws.exports;const yi=Xo,eA=cc.EventEmitter,nA=Ht.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Oa,AVV_ERR_CALLBACK_NOT_FN:tt,AVV_ERR_PLUGIN_NOT_VALID:tA,AVV_ERR_ROOT_PLG_BOOTED:aA,AVV_ERR_READY_TIMEOUT:sA}=bc,rA=QS,ns=XS,Bn=Dc("avvio"),Lt=Symbol("kAvvio"),ja=Symbol("kThenifyDoNotWrap");function iA(n,e,t){const a=e.expose||{},s=a.use||"use",r=a.after||"after",i=a.ready||"ready",o=a.onClose||"onClose",m=a.close||"close";if(n[s])throw new Oa(s);if(n[r])throw new Oa(r);if(n[i])throw new Oa(i);n[s]=function(d,y){return t.use(d,y),this},Object.defineProperty(n,"then",{get:vc.bind(t)}),n[Lt]=!0,n[r]=function(d){return typeof d!="function"?t._loadRegistered():(t.after(La(d,this)),this)},n[i]=function(d){if(d&&typeof d!="function")throw new tt(i,typeof d);return t.ready(d?La(d,this):void 0)},n[o]=function(d){if(typeof d!="function")throw new tt(o,typeof d);return t.onClose(mA(d,this)),this},n[m]=function(d){if(d&&typeof d!="function")throw new tt(m,typeof d);return d?(t.close(La(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&&iA(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 rA,this._readyQ=yi(this,wc,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=fi},this._closeQ=yi(this,uA,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=fi},this._doStart=null,this._root=new ns(this,oA.bind(this),e,!1,0),this._root.once("start",(a,s,r)=>{const i=this.pluginTree.start(null,s,r);this._root.once("loaded",(o,m,d)=>{this.pluginTree.stop(i,d)})}),ns.loadPlugin.call(this,this._root,a=>{Bn("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 oA(n,e,t){this._doStart=t,e.autostart&&this.start()}nA(ke,eA);ke.prototype.start=function(){return this.started=!0,G.process.nextTick(this._doStart),this};ke.prototype.override=function(n,e,t){return n};function cA(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new tA(typeof n);return n}ke.prototype[Lt]=!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:vc});ke.prototype._addPlugin=function(n,e,t){if(n=cA(n),e=e||{},this.booted)throw new aA;const a=this._current[0],s=new ns(this,n,e,t);if(s.once("start",(r,i,o)=>{const m=this.pluginTree.start(a.name,i,o);s.once("loaded",(d,y,h)=>{this.pluginTree.stop(m,h)})}),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){wc.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 tt("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 tt("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,o){r?t(r):e(a),G.process.nextTick(o)}})};ke.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};ke.prototype.toJSON=function(){return this.pluginTree.toJSON()};function fi(){}function vc(){if(this.booted){Bn("thenify returning null because we are already booted");return}if(this[ja]){this[ja]=!1;return}return Bn("thenify"),(n,e)=>this._loadRegistered().then(()=>(this[ja]=!0,n(this._server)),e)}function wc(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[Lt]&&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[Lt]&&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 lA.call(this,n,a,t,e)}function lA(n,e,t,a){const s=n.name;Bn("setting up ready timeout",s,this._timeout);let r=setTimeout(()=>{Bn("timed out",s),r=null;const o=new sA(s);o.fn=n,this._error=o,a(o)},this._timeout);n.length===2?n(e,i.bind(this)):n(e,t,i.bind(this));function i(o){r&&(clearTimeout(r),this._error=o,a(this._error))}}function uA(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"?(Bn("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 mA(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 La(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)}}Is.exports=ke;Is.exports.express=function(n){return ke(n,{expose:{use:"load"}})};var dA=Is.exports;const pA=Cc(dA);function yA(n,e=!0){const t=e?"https://grpc-web.streamlayer.io:443":"https://grpc-web.next.streamlayer.io:443",a=pA(Object.create(null),{autostart:!1});return a.use(iN),a.use(sM,{sdkKey:n,host:t}),a.use(oM),a.use(rN),a.use(QM),a.use($g),a.after(async(s,r,i)=>{if(s)throw s;await r.sdk.initializeApp(),i()}),a.onClose(()=>{console.log("close")}),a}window.instance=null;const _c=(n,e,t)=>{const[a,s]=Q.useState(null);return Q.useEffect(()=>{let r=!1;if(!n)throw new Error("sdk key should be provided");const i=yA(n,t);if(e)for(const o of e)i.use(o);return i.ready().then(o=>{r||(window.instance=o,s(o.sdk))}).catch(o=>console.log(o)),()=>{r=!0,i.close(function(o){if(o)throw o})}},[n]),a};var ts=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(ts||{});const Os=Q.createContext({status:0}),fA=({sdkKey:n,plugins:e,children:t,production:a=!0})=>{const s=_c(n,e,a),r=Q.useMemo(()=>s?{sdk:s,status:2}:{status:1},[s]);return T.jsx(aN,{children:T.jsx(Os.Provider,{value:r,children:t})})},gA=()=>{const{sdk:n}=Q.useContext(Os);return n},TA=()=>{const{sdk:n,status:e}=Q.useContext(Os);if(e===ts.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return e===ts.CONNECTED?T.jsx("div",{children:"wait"}):n===void 0?T.jsx("div",{children:"sdk not initialized"}):T.jsx(nN,{sdk:n})};exports.StreamLayerProvider=fA;exports.StreamLayerSDKReact=TA;exports.useStreamLayer=gA;exports.useStreamLayerApp=_c;