@streamlayer/react 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js DELETED
@@ -1,31 +0,0 @@
1
- "use strict";var vc=Object.defineProperty;var wc=(n,e,t)=>e in n?vc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var N=(n,e,t)=>(wc(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("react"),Kt=require("react-phone-number-input"),_c=require("react-auth-code-input"),De=require("nanostores"),Ce=require("@nanostores/react");var pi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var yi={exports:{}},Rt={};/**
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 jc=F,Rc=Symbol.for("react.element"),Lc=Symbol.for("react.fragment"),xc=Object.prototype.hasOwnProperty,Cc=jc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Uc={key:!0,ref:!0,__self:!0,__source:!0};function fi(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)xc.call(e,a)&&!Uc.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:Rc,type:n,key:r,ref:i,props:s,_owner:Cc.current}}Rt.Fragment=Lc;Rt.jsx=fi;Rt.jsxs=fi;yi.exports=Rt;var h=yi.exports;const Xa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSIxMiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CiAgPHJlY3QgeD0iOC4yNSIgeT0iNyIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcpIiBmaWxsPSJ3aGl0ZSIvPgogIDxyZWN0IHg9IjciIHk9IjE1Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSA3IDE1Ljc1KSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==";function zc(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var Pc=/^((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)-.*))$/,Jt=zc(function(n){return Pc.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),Bc=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},a=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(c=>{if(c.startsWith("atm_")){const[,m]=c.split("_");t[m]=c}else a.push(c)})});const s=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&s.push(t[r]);return s.push(...a),s.join(" ")},ws=Bc,Fc=n=>n.toUpperCase()===n,Qc=n=>e=>n.indexOf(e)===-1,gi=(n,e)=>{const t={};return Object.keys(n).filter(Qc(e)).forEach(a=>{t[a]=n[a]}),t};function Gc(n,e,t){const a=gi(e,t);if(!n){const s=typeof Jt=="function"?{default:Jt}:Jt;Object.keys(a).forEach(r=>{s.default(r)||delete a[r]})}return a}var Yc=(n,e)=>{};function Vc(n){let e="";return t=>{const a=(r,i)=>{const{as:c=n,class:m=e}=r,p=t.propsAsIs===void 0?!(typeof c=="string"&&c.indexOf("-")===-1&&!Fc(c[0])):t.propsAsIs,y=Gc(p,r,["as","class"]);y.ref=i,y.className=t.atomic?ws(t.class,y.className||m):ws(y.className||m,t.class);const{vars:T}=t;if(T){const g={};for(const D in T){const R=T[D],O=R[0],L=R[1]||"",C=typeof O=="function"?O(r):O;Yc(C,t.name),g[`--${D}`]=`${C}${L}`}const I=y.style||{},E=Object.keys(I);E.length>0&&E.forEach(D=>{g[D]=I[D]}),y.style=g}return n.__linaria&&n!==c?(y.as=c,F.createElement(n,y)):F.createElement(c,y)},s=F.forwardRef?F.forwardRef(a):r=>{const i=gi(r,["innerRef"]);return a(i,r.innerRef)};return s.displayName=t.name,s.__linaria={className:t.class||e,extends:n},s}}var A=Vc;const $c=A("div")({name:"Container",class:"ckoy5c4",propsAsIs:!1}),qc=A("div")({name:"IconWrap",class:"iw4llh0",propsAsIs:!1}),Wc=A("img")({name:"Icon",class:"iozvwfv",propsAsIs:!1}),Hc=A("div")({name:"Content",class:"c164tv0p",propsAsIs:!1}),Zc=A("div")({name:"TitleWrap",class:"ta68x03",propsAsIs:!1}),Kc=A("div")({name:"Title",class:"t12bcygg",propsAsIs:!1}),Jc=A("div")({name:"CloseBtnWrap",class:"c1k4u90",propsAsIs:!1}),Xc=A("button")({name:"CloseBtn",class:"cha9bhb",propsAsIs:!1}),el=A("img")({name:"CloseIcon",class:"c142dxkd",propsAsIs:!1}),nl=({title:n="",icon:e,color:t,openVoiting:a,closeInApp:s})=>{const r=F.useCallback(i=>{i.stopPropagation(),s()},[s]);return h.jsxs($c,{onClick:a,children:[h.jsx(qc,{style:t?{backgroundColor:t}:{},children:!!e&&h.jsx(Wc,{alt:"in-app-icon",src:e})}),h.jsxs(Hc,{children:[h.jsx(Zc,{children:h.jsx(Kc,{id:"in-app-title",children:n})}),h.jsx(Jc,{children:h.jsx(Xc,{onClick:r,children:h.jsx(el,{alt:"close-in-app-icon",src:Xa})})})]})]})};var _s=typeof window>"u"?F.useEffect:F.useLayoutEffect,tl=({isPlaying:n,duration:e,startAt:t=0,updateInterval:a=0,onComplete:s,onUpdate:r})=>{let[i,c]=F.useState(t),m=F.useRef(0),p=F.useRef(t),y=F.useRef(t*-1e3),T=F.useRef(null),g=F.useRef(null),I=F.useRef(null),E=O=>{let L=O/1e3;if(g.current===null){g.current=L,T.current=requestAnimationFrame(E);return}let C=L-g.current,U=m.current+C;g.current=L,m.current=U;let z=p.current+(a===0?U:(U/a|0)*a),B=p.current+U,x=typeof e=="number"&&B>=e;c(x?e:z),x||(T.current=requestAnimationFrame(E))},D=()=>{T.current&&cancelAnimationFrame(T.current),I.current&&clearTimeout(I.current),g.current=null},R=F.useCallback(O=>{D(),m.current=0;let L=typeof O=="number"?O:t;p.current=L,c(L),n&&(T.current=requestAnimationFrame(E))},[n,t]);return _s(()=>{if(r==null||r(i),e&&i>=e){y.current+=e*1e3;let{shouldRepeat:O=!1,delay:L=0,newStartAt:C}=(s==null?void 0:s(y.current/1e3))||{};O&&(I.current=setTimeout(()=>R(C),L*1e3))}},[i,e]),_s(()=>(n&&(T.current=requestAnimationFrame(E)),D),[n,e,a]),{elapsedTime:i,reset:R}},al=(n,e,t)=>{let a=n/2,s=e/2,r=a-s,i=2*r,c=t==="clockwise"?"1,0":"0,1",m=2*Math.PI*r;return{path:`m ${a},${s} a ${r},${r} 0 ${c} 0,${i} a ${r},${r} 0 ${c} 0,-${i}`,pathLength:m}},Os=(n,e)=>n===0||n===e?0:typeof e=="number"?n-e:0,sl=n=>({position:"relative",width:n,height:n}),rl={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},Ti=(n,e,t,a,s)=>{if(a===0)return e;let r=(s?a-n:n)/a;return e+t*r},js=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:[]},il=(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((g,I)=>g>=e&&e>=s[I+1]))!=null?t:-1;if(!s||i===-1)return a[0];if(!r)return a[i];let c=s[i]-e,m=s[i]-s[i+1],p=js(a[i]),y=js(a[i+1]),T=!!n.isGrowing;return`rgb(${p.map((g,I)=>Ti(c,g,y[I]-g,m,T)|0).join(",")})`},ol=n=>{let{duration:e,initialRemainingTime:t,updateInterval:a,size:s=180,strokeWidth:r=12,trailStrokeWidth:i,isPlaying:c=!1,isGrowing:m=!1,rotation:p="clockwise",onComplete:y,onUpdate:T}=n,g=F.useRef(),I=Math.max(r,i??0),{path:E,pathLength:D}=al(s,I,p),{elapsedTime:R}=tl({isPlaying:c,duration:e,startAt:Os(e,t),updateInterval:a,onUpdate:typeof T=="function"?L=>{let C=Math.ceil(e-L);C!==g.current&&(g.current=C,T(C))}:void 0,onComplete:typeof y=="function"?L=>{var C;let{shouldRepeat:U,delay:z,newInitialRemainingTime:B}=(C=y(L))!=null?C:{};if(U)return{shouldRepeat:U,delay:z,newStartAt:Os(e,B)}}:void 0}),O=e-R;return{elapsedTime:R,path:E,pathLength:D,remainingTime:Math.ceil(O),rotation:p,size:s,stroke:il(n,O),strokeDashoffset:Ti(R,0,D,e,m),strokeWidth:r}},hi=n=>{let{children:e,strokeLinecap:t,trailColor:a,trailStrokeWidth:s}=n,{path:r,pathLength:i,stroke:c,strokeDashoffset:m,remainingTime:p,elapsedTime:y,size:T,strokeWidth:g}=ol(n);return F.createElement("div",{style:sl(T)},F.createElement("svg",{viewBox:`0 0 ${T} ${T}`,width:T,height:T,xmlns:"http://www.w3.org/2000/svg"},F.createElement("path",{d:r,fill:"none",stroke:a??"#d9d9d9",strokeWidth:s??g}),F.createElement("path",{d:r,fill:"none",stroke:c,strokeLinecap:t??"round",strokeWidth:g,strokeDasharray:i,strokeDashoffset:m})),typeof e=="function"&&F.createElement("div",{style:rl},e({remainingTime:p,elapsedTime:y,color:c})))};hi.displayName="CountdownCircleTimer";const Xt={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 cl=A("div")({name:"RemainingTime",class:"r1l1rnv7",propsAsIs:!1}),ll=[Xt.BLUE_PRIMARY,Xt.GREEN_1,Xt.RED_1],ul=[10,6,0],ml=30,dl=32,pl=4,yl=0,ki=({isPlaying:n=!0,duration:e=ml,setTimeToExpire:t})=>{const a=({remainingTime:s})=>h.jsx(cl,{style:{color:s?"inherit":void 0},children:s});return F.useEffect(()=>{t(!1)},[t]),h.jsx(hi,{isPlaying:n,duration:e,colors:ll,colorsTime:ul,size:dl,strokeWidth:pl,trailStrokeWidth:yl,onComplete:()=>t(!0),children:a})};function be(n,e){if(!n)throw new Error(e)}const fl=34028234663852886e22,gl=-34028234663852886e22,Tl=4294967295,hl=2147483647,kl=-2147483648;function yt(n){if(typeof n!="number")throw new Error("invalid int 32: "+typeof n);if(!Number.isInteger(n)||n>hl||n<kl)throw new Error("invalid int 32: "+n)}function Oa(n){if(typeof n!="number")throw new Error("invalid uint 32: "+typeof n);if(!Number.isInteger(n)||n>Tl||n<0)throw new Error("invalid uint 32: "+n)}function Mi(n){if(typeof n!="number")throw new Error("invalid float 32: "+typeof n);if(Number.isFinite(n)&&(n>fl||n<gl))throw new Error("invalid float 32: "+n)}const Ii=Symbol("@bufbuild/protobuf/enum-type");function Ml(n){const e=n[Ii];return be(e,"missing enum type on enum object"),e}function Si(n,e,t,a){n[Ii]=Ni(e,t.map(s=>({no:s.no,name:s.name,localName:n[s.no]})))}function Ni(n,e,t){const a=Object.create(null),s=Object.create(null),r=[];for(const i of e){const c=Ai(i);r.push(c),a[i.name]=c,s[i.no]=c}return{typeName:n,values:r,findName(i){return a[i]},findNumber(i){return s[i]}}}function Il(n,e,t){const a={};for(const s of e){const r=Ai(s);a[r.localName]=r.no,a[r.no]=r.localName}return Si(a,n,e),a}function Ai(n){return"localName"in n?n:Object.assign(Object.assign({},n),{localName:n.name})}class Ye{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 Sl(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(c){n.util.initFields(this),n.util.initPartial(c,this)}}[r];return Object.setPrototypeOf(i.prototype,new Ye),Object.assign(i,{runtime:n,typeName:e,fields:n.util.newFieldList(t),fromBinary(c,m){return new i().fromBinary(c,m)},fromJson(c,m){return new i().fromJson(c,m)},fromJsonString(c,m){return new i().fromJsonString(c,m)},equals(c,m){return n.util.equals(i,c,m)}}),i}function Nl(n,e,t,a){return{syntax:n,json:e,bin:t,util:a,makeMessageType(s,r,i){return Sl(this,s,r,i)},makeEnum:Il,makeEnumType:Ni,getEnumType:Ml}}var w;(function(n){n[n.DOUBLE=1]="DOUBLE",n[n.FLOAT=2]="FLOAT",n[n.INT64=3]="INT64",n[n.UINT64=4]="UINT64",n[n.INT32=5]="INT32",n[n.FIXED64=6]="FIXED64",n[n.FIXED32=7]="FIXED32",n[n.BOOL=8]="BOOL",n[n.STRING=9]="STRING",n[n.BYTES=12]="BYTES",n[n.UINT32=13]="UINT32",n[n.SFIXED32=15]="SFIXED32",n[n.SFIXED64=16]="SFIXED64",n[n.SINT32=17]="SINT32",n[n.SINT64=18]="SINT64"})(w||(w={}));var yn;(function(n){n[n.BIGINT=0]="BIGINT",n[n.STRING=1]="STRING"})(yn||(yn={}));function Al(){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 ea(n,e,t){for(let r=0;r<28;r=r+7){const i=n>>>r,c=!(!(i>>>7)&&e==0),m=(c?i|128:i)&255;if(t.push(m),!c)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,c=!!(i>>>7),m=(c?i|128:i)&255;if(t.push(m),!c)return}t.push(e>>>31&1)}}const ft=4294967296;function Rs(n){const e=n[0]==="-";e&&(n=n.slice(1));const t=1e6;let a=0,s=0;function r(i,c){const m=Number(n.slice(i,c));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?bi(a,s):es(a,s)}function El(n,e){let t=es(n,e);const a=t.hi&2147483648;a&&(t=bi(t.lo,t.hi));const s=Ei(t.lo,t.hi);return a?"-"+s:s}function Ei(n,e){if({lo:n,hi:e}=bl(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,c=s*2;const m=1e7;return r>=m&&(i+=Math.floor(r/m),r%=m),i>=m&&(c+=Math.floor(i/m),i%=m),c.toString()+Ls(i)+Ls(r)}function bl(n,e){return{lo:n>>>0,hi:e>>>0}}function es(n,e){return{lo:n|0,hi:e|0}}function bi(n,e){return e=~e,n?n=~n+1:e+=1,es(n,e)}const Ls=n=>{const e=String(n);return"0000000".slice(e.length)+e};function xs(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 Dl(){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={},Di={},Lt={};Lt.byteLength=_l;Lt.toByteArray=jl;Lt.fromByteArray=xl;var Qe=[],je=[],vl=typeof Uint8Array<"u"?Uint8Array:Array,na="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var hn=0,wl=na.length;hn<wl;++hn)Qe[hn]=na[hn],je[na.charCodeAt(hn)]=hn;je["-".charCodeAt(0)]=62;je["_".charCodeAt(0)]=63;function vi(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 _l(n){var e=vi(n),t=e[0],a=e[1];return(t+a)*3/4-a}function Ol(n,e,t){return(e+t)*3/4-t}function jl(n){var e,t=vi(n),a=t[0],s=t[1],r=new vl(Ol(n,a,s)),i=0,c=s>0?a-4:a,m;for(m=0;m<c;m+=4)e=je[n.charCodeAt(m)]<<18|je[n.charCodeAt(m+1)]<<12|je[n.charCodeAt(m+2)]<<6|je[n.charCodeAt(m+3)],r[i++]=e>>16&255,r[i++]=e>>8&255,r[i++]=e&255;return s===2&&(e=je[n.charCodeAt(m)]<<2|je[n.charCodeAt(m+1)]>>4,r[i++]=e&255),s===1&&(e=je[n.charCodeAt(m)]<<10|je[n.charCodeAt(m+1)]<<4|je[n.charCodeAt(m+2)]>>2,r[i++]=e>>8&255,r[i++]=e&255),r}function Rl(n){return Qe[n>>18&63]+Qe[n>>12&63]+Qe[n>>6&63]+Qe[n&63]}function Ll(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(Rl(a));return s.join("")}function xl(n){for(var e,t=n.length,a=t%3,s=[],r=16383,i=0,c=t-a;i<c;i+=r)s.push(Ll(n,i,i+r>c?c:i+r));return a===1?(e=n[t-1],s.push(Qe[e>>2]+Qe[e<<4&63]+"==")):a===2&&(e=(n[t-2]<<8)+n[t-1],s.push(Qe[e>>10]+Qe[e>>4&63]+Qe[e<<2&63]+"=")),s.join("")}var ns={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ns.read=function(n,e,t,a,s){var r,i,c=s*8-a-1,m=(1<<c)-1,p=m>>1,y=-7,T=t?s-1:0,g=t?-1:1,I=n[e+T];for(T+=g,r=I&(1<<-y)-1,I>>=-y,y+=c;y>0;r=r*256+n[e+T],T+=g,y-=8);for(i=r&(1<<-y)-1,r>>=-y,y+=a;y>0;i=i*256+n[e+T],T+=g,y-=8);if(r===0)r=1-p;else{if(r===m)return i?NaN:(I?-1:1)*(1/0);i=i+Math.pow(2,a),r=r-p}return(I?-1:1)*i*Math.pow(2,r-a)};ns.write=function(n,e,t,a,s,r){var i,c,m,p=r*8-s-1,y=(1<<p)-1,T=y>>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,I=a?0:r-1,E=a?1:-1,D=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=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+T>=1?e+=g/m:e+=g*Math.pow(2,1-T),e*m>=2&&(i++,m/=2),i+T>=y?(c=0,i=y):i+T>=1?(c=(e*m-1)*Math.pow(2,s),i=i+T):(c=e*Math.pow(2,T-1)*Math.pow(2,s),i=0));s>=8;n[t+I]=c&255,I+=E,c/=256,s-=8);for(i=i<<s|c,p+=s;p>0;n[t+I]=i&255,I+=E,i/=256,p-=8);n[t+I-E]|=D*128};/*!
10
- * The buffer module from node.js, for the browser.
11
- *
12
- * @author Feross Aboukhadijeh <https://feross.org>
13
- * @license MIT
14
- */(function(n){const e=Lt,t=ns,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=c,n.SlowBuffer=L,n.INSPECT_MAX_BYTES=50;const s=2147483647;n.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=r(),!c.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 d=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(d,o),d.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function i(d){if(d>s)throw new RangeError('The value "'+d+'" is invalid for option "size"');const o=new Uint8Array(d);return Object.setPrototypeOf(o,c.prototype),o}function c(d,o,u){if(typeof d=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return T(d)}return m(d,o,u)}c.poolSize=8192;function m(d,o,u){if(typeof d=="string")return g(d,o);if(ArrayBuffer.isView(d))return E(d);if(d==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d);if(Pe(d,ArrayBuffer)||d&&Pe(d.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(d,SharedArrayBuffer)||d&&Pe(d.buffer,SharedArrayBuffer)))return D(d,o,u);if(typeof d=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const f=d.valueOf&&d.valueOf();if(f!=null&&f!==d)return c.from(f,o,u);const k=R(d);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof d[Symbol.toPrimitive]=="function")return c.from(d[Symbol.toPrimitive]("string"),o,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d)}c.from=function(d,o,u){return m(d,o,u)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function p(d){if(typeof d!="number")throw new TypeError('"size" argument must be of type number');if(d<0)throw new RangeError('The value "'+d+'" is invalid for option "size"')}function y(d,o,u){return p(d),d<=0?i(d):o!==void 0?typeof u=="string"?i(d).fill(o,u):i(d).fill(o):i(d)}c.alloc=function(d,o,u){return y(d,o,u)};function T(d){return p(d),i(d<0?0:O(d)|0)}c.allocUnsafe=function(d){return T(d)},c.allocUnsafeSlow=function(d){return T(d)};function g(d,o){if((typeof o!="string"||o==="")&&(o="utf8"),!c.isEncoding(o))throw new TypeError("Unknown encoding: "+o);const u=C(d,o)|0;let f=i(u);const k=f.write(d,o);return k!==u&&(f=f.slice(0,k)),f}function I(d){const o=d.length<0?0:O(d.length)|0,u=i(o);for(let f=0;f<o;f+=1)u[f]=d[f]&255;return u}function E(d){if(Pe(d,Uint8Array)){const o=new Uint8Array(d);return D(o.buffer,o.byteOffset,o.byteLength)}return I(d)}function D(d,o,u){if(o<0||d.byteLength<o)throw new RangeError('"offset" is outside of buffer bounds');if(d.byteLength<o+(u||0))throw new RangeError('"length" is outside of buffer bounds');let f;return o===void 0&&u===void 0?f=new Uint8Array(d):u===void 0?f=new Uint8Array(d,o):f=new Uint8Array(d,o,u),Object.setPrototypeOf(f,c.prototype),f}function R(d){if(c.isBuffer(d)){const o=O(d.length)|0,u=i(o);return u.length===0||d.copy(u,0,0,o),u}if(d.length!==void 0)return typeof d.length!="number"||Zt(d.length)?i(0):I(d);if(d.type==="Buffer"&&Array.isArray(d.data))return I(d.data)}function O(d){if(d>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return d|0}function L(d){return+d!=d&&(d=0),c.alloc(+d)}c.isBuffer=function(o){return o!=null&&o._isBuffer===!0&&o!==c.prototype},c.compare=function(o,u){if(Pe(o,Uint8Array)&&(o=c.from(o,o.offset,o.byteLength)),Pe(u,Uint8Array)&&(u=c.from(u,u.offset,u.byteLength)),!c.isBuffer(o)||!c.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(o===u)return 0;let f=o.length,k=u.length;for(let S=0,b=Math.min(f,k);S<b;++S)if(o[S]!==u[S]){f=o[S],k=u[S];break}return f<k?-1:k<f?1:0},c.isEncoding=function(o){switch(String(o).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(o,u){if(!Array.isArray(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return c.alloc(0);let f;if(u===void 0)for(u=0,f=0;f<o.length;++f)u+=o[f].length;const k=c.allocUnsafe(u);let S=0;for(f=0;f<o.length;++f){let b=o[f];if(Pe(b,Uint8Array))S+b.length>k.length?(c.isBuffer(b)||(b=c.from(b)),b.copy(k,S)):Uint8Array.prototype.set.call(k,b,S);else if(c.isBuffer(b))b.copy(k,S);else throw new TypeError('"list" argument must be an Array of Buffers');S+=b.length}return k};function C(d,o){if(c.isBuffer(d))return d.length;if(ArrayBuffer.isView(d)||Pe(d,ArrayBuffer))return d.byteLength;if(typeof d!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof d);const u=d.length,f=arguments.length>2&&arguments[2]===!0;if(!f&&u===0)return 0;let k=!1;for(;;)switch(o){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return Yn(d).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return ct(d).length;default:if(k)return f?-1:Yn(d).length;o=(""+o).toLowerCase(),k=!0}}c.byteLength=C;function U(d,o,u){let f=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,o>>>=0,u<=o))return"";for(d||(d="utf8");;)switch(d){case"hex":return Se(this,o,u);case"utf8":case"utf-8":return Z(this,o,u);case"ascii":return $e(this,o,u);case"latin1":case"binary":return Ue(this,o,u);case"base64":return oe(this,o,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ne(this,o,u);default:if(f)throw new TypeError("Unknown encoding: "+d);d=(d+"").toLowerCase(),f=!0}}c.prototype._isBuffer=!0;function z(d,o,u){const f=d[o];d[o]=d[u],d[u]=f}c.prototype.swap16=function(){const o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let u=0;u<o;u+=2)z(this,u,u+1);return this},c.prototype.swap32=function(){const o=this.length;if(o%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let u=0;u<o;u+=4)z(this,u,u+3),z(this,u+1,u+2);return this},c.prototype.swap64=function(){const o=this.length;if(o%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let u=0;u<o;u+=8)z(this,u,u+7),z(this,u+1,u+6),z(this,u+2,u+5),z(this,u+3,u+4);return this},c.prototype.toString=function(){const o=this.length;return o===0?"":arguments.length===0?Z(this,0,o):U.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(o){if(!c.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o?!0:c.compare(this,o)===0},c.prototype.inspect=function(){let o="";const u=n.INSPECT_MAX_BYTES;return o=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(o+=" ... "),"<Buffer "+o+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(o,u,f,k,S){if(Pe(o,Uint8Array)&&(o=c.from(o,o.offset,o.byteLength)),!c.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(u===void 0&&(u=0),f===void 0&&(f=o?o.length:0),k===void 0&&(k=0),S===void 0&&(S=this.length),u<0||f>o.length||k<0||S>this.length)throw new RangeError("out of range index");if(k>=S&&u>=f)return 0;if(k>=S)return-1;if(u>=f)return 1;if(u>>>=0,f>>>=0,k>>>=0,S>>>=0,this===o)return 0;let b=S-k,V=f-u;const ce=Math.min(b,V),re=this.slice(k,S),le=o.slice(u,f);for(let ae=0;ae<ce;++ae)if(re[ae]!==le[ae]){b=re[ae],V=le[ae];break}return b<V?-1:V<b?1:0};function B(d,o,u,f,k){if(d.length===0)return-1;if(typeof u=="string"?(f=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Zt(u)&&(u=k?0:d.length-1),u<0&&(u=d.length+u),u>=d.length){if(k)return-1;u=d.length-1}else if(u<0)if(k)u=0;else return-1;if(typeof o=="string"&&(o=c.from(o,f)),c.isBuffer(o))return o.length===0?-1:x(d,o,u,f,k);if(typeof o=="number")return o=o&255,typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(d,o,u):Uint8Array.prototype.lastIndexOf.call(d,o,u):x(d,[o],u,f,k);throw new TypeError("val must be string, number or Buffer")}function x(d,o,u,f,k){let S=1,b=d.length,V=o.length;if(f!==void 0&&(f=String(f).toLowerCase(),f==="ucs2"||f==="ucs-2"||f==="utf16le"||f==="utf-16le")){if(d.length<2||o.length<2)return-1;S=2,b/=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<b;re++)if(ce(d,re)===ce(o,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>b&&(u=b-V),re=u;re>=0;re--){let le=!0;for(let ae=0;ae<V;ae++)if(ce(d,re+ae)!==ce(o,ae)){le=!1;break}if(le)return re}return-1}c.prototype.includes=function(o,u,f){return this.indexOf(o,u,f)!==-1},c.prototype.indexOf=function(o,u,f){return B(this,o,u,f,!0)},c.prototype.lastIndexOf=function(o,u,f){return B(this,o,u,f,!1)};function H(d,o,u,f){u=Number(u)||0;const k=d.length-u;f?(f=Number(f),f>k&&(f=k)):f=k;const S=o.length;f>S/2&&(f=S/2);let b;for(b=0;b<f;++b){const V=parseInt(o.substr(b*2,2),16);if(Zt(V))return b;d[u+b]=V}return b}function ne(d,o,u,f){return Vn(Yn(o,d.length-u),d,u,f)}function se(d,o,u,f){return Vn(Ht(o),d,u,f)}function ie(d,o,u,f){return Vn(ct(o),d,u,f)}function ue(d,o,u,f){return Vn(_(o,d.length-u),d,u,f)}c.prototype.write=function(o,u,f,k){if(u===void 0)k="utf8",f=this.length,u=0;else if(f===void 0&&typeof u=="string")k=u,f=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(f)?(f=f>>>0,k===void 0&&(k="utf8")):(k=f,f=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const S=this.length-u;if((f===void 0||f>S)&&(f=S),o.length>0&&(f<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");let b=!1;for(;;)switch(k){case"hex":return H(this,o,u,f);case"utf8":case"utf-8":return ne(this,o,u,f);case"ascii":case"latin1":case"binary":return se(this,o,u,f);case"base64":return ie(this,o,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,o,u,f);default:if(b)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),b=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(d,o,u){return o===0&&u===d.length?e.fromByteArray(d):e.fromByteArray(d.slice(o,u))}function Z(d,o,u){u=Math.min(d.length,u);const f=[];let k=o;for(;k<u;){const S=d[k];let b=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&&(b=S);break;case 2:ce=d[k+1],(ce&192)===128&&(ae=(S&31)<<6|ce&63,ae>127&&(b=ae));break;case 3:ce=d[k+1],re=d[k+2],(ce&192)===128&&(re&192)===128&&(ae=(S&15)<<12|(ce&63)<<6|re&63,ae>2047&&(ae<55296||ae>57343)&&(b=ae));break;case 4:ce=d[k+1],re=d[k+2],le=d[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&&(b=ae))}}b===null?(b=65533,V=1):b>65535&&(b-=65536,f.push(b>>>10&1023|55296),b=56320|b&1023),f.push(b),k+=V}return Ie(f)}const me=4096;function Ie(d){const o=d.length;if(o<=me)return String.fromCharCode.apply(String,d);let u="",f=0;for(;f<o;)u+=String.fromCharCode.apply(String,d.slice(f,f+=me));return u}function $e(d,o,u){let f="";u=Math.min(d.length,u);for(let k=o;k<u;++k)f+=String.fromCharCode(d[k]&127);return f}function Ue(d,o,u){let f="";u=Math.min(d.length,u);for(let k=o;k<u;++k)f+=String.fromCharCode(d[k]);return f}function Se(d,o,u){const f=d.length;(!o||o<0)&&(o=0),(!u||u<0||u>f)&&(u=f);let k="";for(let S=o;S<u;++S)k+=bc[d[S]];return k}function Ne(d,o,u){const f=d.slice(o,u);let k="";for(let S=0;S<f.length-1;S+=2)k+=String.fromCharCode(f[S]+f[S+1]*256);return k}c.prototype.slice=function(o,u){const f=this.length;o=~~o,u=u===void 0?f:~~u,o<0?(o+=f,o<0&&(o=0)):o>f&&(o=f),u<0?(u+=f,u<0&&(u=0)):u>f&&(u=f),u<o&&(u=o);const k=this.subarray(o,u);return Object.setPrototypeOf(k,c.prototype),k};function K(d,o,u){if(d%1!==0||d<0)throw new RangeError("offset is not uint");if(d+o>u)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(o,u,f){o=o>>>0,u=u>>>0,f||K(o,u,this.length);let k=this[o],S=1,b=0;for(;++b<u&&(S*=256);)k+=this[o+b]*S;return k},c.prototype.readUintBE=c.prototype.readUIntBE=function(o,u,f){o=o>>>0,u=u>>>0,f||K(o,u,this.length);let k=this[o+--u],S=1;for(;u>0&&(S*=256);)k+=this[o+--u]*S;return k},c.prototype.readUint8=c.prototype.readUInt8=function(o,u){return o=o>>>0,u||K(o,1,this.length),this[o]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(o,u){return o=o>>>0,u||K(o,2,this.length),this[o]|this[o+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(o,u){return o=o>>>0,u||K(o,2,this.length),this[o]<<8|this[o+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(o,u){return o=o>>>0,u||K(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])},c.prototype.readBigUInt64LE=Ke(function(o){o=o>>>0,Le(o,"offset");const u=this[o],f=this[o+7];(u===void 0||f===void 0)&&Oe(o,this.length-8);const k=u+this[++o]*2**8+this[++o]*2**16+this[++o]*2**24,S=this[++o]+this[++o]*2**8+this[++o]*2**16+f*2**24;return BigInt(k)+(BigInt(S)<<BigInt(32))}),c.prototype.readBigUInt64BE=Ke(function(o){o=o>>>0,Le(o,"offset");const u=this[o],f=this[o+7];(u===void 0||f===void 0)&&Oe(o,this.length-8);const k=u*2**24+this[++o]*2**16+this[++o]*2**8+this[++o],S=this[++o]*2**24+this[++o]*2**16+this[++o]*2**8+f;return(BigInt(k)<<BigInt(32))+BigInt(S)}),c.prototype.readIntLE=function(o,u,f){o=o>>>0,u=u>>>0,f||K(o,u,this.length);let k=this[o],S=1,b=0;for(;++b<u&&(S*=256);)k+=this[o+b]*S;return S*=128,k>=S&&(k-=Math.pow(2,8*u)),k},c.prototype.readIntBE=function(o,u,f){o=o>>>0,u=u>>>0,f||K(o,u,this.length);let k=u,S=1,b=this[o+--k];for(;k>0&&(S*=256);)b+=this[o+--k]*S;return S*=128,b>=S&&(b-=Math.pow(2,8*u)),b},c.prototype.readInt8=function(o,u){return o=o>>>0,u||K(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]},c.prototype.readInt16LE=function(o,u){o=o>>>0,u||K(o,2,this.length);const f=this[o]|this[o+1]<<8;return f&32768?f|4294901760:f},c.prototype.readInt16BE=function(o,u){o=o>>>0,u||K(o,2,this.length);const f=this[o+1]|this[o]<<8;return f&32768?f|4294901760:f},c.prototype.readInt32LE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},c.prototype.readInt32BE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},c.prototype.readBigInt64LE=Ke(function(o){o=o>>>0,Le(o,"offset");const u=this[o],f=this[o+7];(u===void 0||f===void 0)&&Oe(o,this.length-8);const k=this[o+4]+this[o+5]*2**8+this[o+6]*2**16+(f<<24);return(BigInt(k)<<BigInt(32))+BigInt(u+this[++o]*2**8+this[++o]*2**16+this[++o]*2**24)}),c.prototype.readBigInt64BE=Ke(function(o){o=o>>>0,Le(o,"offset");const u=this[o],f=this[o+7];(u===void 0||f===void 0)&&Oe(o,this.length-8);const k=(u<<24)+this[++o]*2**16+this[++o]*2**8+this[++o];return(BigInt(k)<<BigInt(32))+BigInt(this[++o]*2**24+this[++o]*2**16+this[++o]*2**8+f)}),c.prototype.readFloatLE=function(o,u){return o=o>>>0,u||K(o,4,this.length),t.read(this,o,!0,23,4)},c.prototype.readFloatBE=function(o,u){return o=o>>>0,u||K(o,4,this.length),t.read(this,o,!1,23,4)},c.prototype.readDoubleLE=function(o,u){return o=o>>>0,u||K(o,8,this.length),t.read(this,o,!0,52,8)},c.prototype.readDoubleBE=function(o,u){return o=o>>>0,u||K(o,8,this.length),t.read(this,o,!1,52,8)};function M(d,o,u,f,k,S){if(!c.isBuffer(d))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>k||o<S)throw new RangeError('"value" argument is out of bounds');if(u+f>d.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(o,u,f,k){if(o=+o,u=u>>>0,f=f>>>0,!k){const V=Math.pow(2,8*f)-1;M(this,o,u,f,V,0)}let S=1,b=0;for(this[u]=o&255;++b<f&&(S*=256);)this[u+b]=o/S&255;return u+f},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(o,u,f,k){if(o=+o,u=u>>>0,f=f>>>0,!k){const V=Math.pow(2,8*f)-1;M(this,o,u,f,V,0)}let S=f-1,b=1;for(this[u+S]=o&255;--S>=0&&(b*=256);)this[u+S]=o/b&255;return u+f},c.prototype.writeUint8=c.prototype.writeUInt8=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,1,255,0),this[u]=o&255,u+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,2,65535,0),this[u]=o&255,this[u+1]=o>>>8,u+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,2,65535,0),this[u]=o>>>8,this[u+1]=o&255,u+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,4,4294967295,0),this[u+3]=o>>>24,this[u+2]=o>>>16,this[u+1]=o>>>8,this[u]=o&255,u+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,4,4294967295,0),this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255,u+4};function v(d,o,u,f,k){ze(o,f,k,d,u,7);let S=Number(o&BigInt(4294967295));d[u++]=S,S=S>>8,d[u++]=S,S=S>>8,d[u++]=S,S=S>>8,d[u++]=S;let b=Number(o>>BigInt(32)&BigInt(4294967295));return d[u++]=b,b=b>>8,d[u++]=b,b=b>>8,d[u++]=b,b=b>>8,d[u++]=b,u}function j(d,o,u,f,k){ze(o,f,k,d,u,7);let S=Number(o&BigInt(4294967295));d[u+7]=S,S=S>>8,d[u+6]=S,S=S>>8,d[u+5]=S,S=S>>8,d[u+4]=S;let b=Number(o>>BigInt(32)&BigInt(4294967295));return d[u+3]=b,b=b>>8,d[u+2]=b,b=b>>8,d[u+1]=b,b=b>>8,d[u]=b,u+8}c.prototype.writeBigUInt64LE=Ke(function(o,u=0){return v(this,o,u,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Ke(function(o,u=0){return j(this,o,u,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(o,u,f,k){if(o=+o,u=u>>>0,!k){const ce=Math.pow(2,8*f-1);M(this,o,u,f,ce-1,-ce)}let S=0,b=1,V=0;for(this[u]=o&255;++S<f&&(b*=256);)o<0&&V===0&&this[u+S-1]!==0&&(V=1),this[u+S]=(o/b>>0)-V&255;return u+f},c.prototype.writeIntBE=function(o,u,f,k){if(o=+o,u=u>>>0,!k){const ce=Math.pow(2,8*f-1);M(this,o,u,f,ce-1,-ce)}let S=f-1,b=1,V=0;for(this[u+S]=o&255;--S>=0&&(b*=256);)o<0&&V===0&&this[u+S+1]!==0&&(V=1),this[u+S]=(o/b>>0)-V&255;return u+f},c.prototype.writeInt8=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,1,127,-128),o<0&&(o=255+o+1),this[u]=o&255,u+1},c.prototype.writeInt16LE=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,2,32767,-32768),this[u]=o&255,this[u+1]=o>>>8,u+2},c.prototype.writeInt16BE=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,2,32767,-32768),this[u]=o>>>8,this[u+1]=o&255,u+2},c.prototype.writeInt32LE=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,4,2147483647,-2147483648),this[u]=o&255,this[u+1]=o>>>8,this[u+2]=o>>>16,this[u+3]=o>>>24,u+4},c.prototype.writeInt32BE=function(o,u,f){return o=+o,u=u>>>0,f||M(this,o,u,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255,u+4},c.prototype.writeBigInt64LE=Ke(function(o,u=0){return v(this,o,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Ke(function(o,u=0){return j(this,o,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q(d,o,u,f,k,S){if(u+f>d.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function W(d,o,u,f,k){return o=+o,u=u>>>0,k||Q(d,o,u,4),t.write(d,o,u,f,23,4),u+4}c.prototype.writeFloatLE=function(o,u,f){return W(this,o,u,!0,f)},c.prototype.writeFloatBE=function(o,u,f){return W(this,o,u,!1,f)};function J(d,o,u,f,k){return o=+o,u=u>>>0,k||Q(d,o,u,8),t.write(d,o,u,f,52,8),u+8}c.prototype.writeDoubleLE=function(o,u,f){return J(this,o,u,!0,f)},c.prototype.writeDoubleBE=function(o,u,f){return J(this,o,u,!1,f)},c.prototype.copy=function(o,u,f,k){if(!c.isBuffer(o))throw new TypeError("argument should be a Buffer");if(f||(f=0),!k&&k!==0&&(k=this.length),u>=o.length&&(u=o.length),u||(u=0),k>0&&k<f&&(k=f),k===f||o.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(f<0||f>=this.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("sourceEnd out of bounds");k>this.length&&(k=this.length),o.length-u<k-f&&(k=o.length-u+f);const S=k-f;return this===o&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,f,k):Uint8Array.prototype.set.call(o,this.subarray(f,k),u),S},c.prototype.fill=function(o,u,f,k){if(typeof o=="string"){if(typeof u=="string"?(k=u,u=0,f=this.length):typeof f=="string"&&(k=f,f=this.length),k!==void 0&&typeof k!="string")throw new TypeError("encoding must be a string");if(typeof k=="string"&&!c.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(o.length===1){const b=o.charCodeAt(0);(k==="utf8"&&b<128||k==="latin1")&&(o=b)}}else typeof o=="number"?o=o&255:typeof o=="boolean"&&(o=Number(o));if(u<0||this.length<u||this.length<f)throw new RangeError("Out of range index");if(f<=u)return this;u=u>>>0,f=f===void 0?this.length:f>>>0,o||(o=0);let S;if(typeof o=="number")for(S=u;S<f;++S)this[S]=o;else{const b=c.isBuffer(o)?o:c.from(o,k),V=b.length;if(V===0)throw new TypeError('The value "'+o+'" is invalid for argument "value"');for(S=0;S<f-u;++S)this[S+u]=b[S%V]}return this};const Y={};function $(d,o,u){Y[d]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:o.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${d}]`,this.stack,delete this.name}get code(){return d}set code(k){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:k,writable:!0})}toString(){return`${this.name} [${d}]: ${this.message}`}}}$("ERR_BUFFER_OUT_OF_BOUNDS",function(d){return d?`${d} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(d,o){return`The "${d}" argument must be of type number. Received type ${typeof o}`},TypeError),$("ERR_OUT_OF_RANGE",function(d,o,u){let f=`The value of "${d}" 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"),f+=` It must be ${o}. Received ${k}`,f},RangeError);function X(d){let o="",u=d.length;const f=d[0]==="-"?1:0;for(;u>=f+4;u-=3)o=`_${d.slice(u-3,u)}${o}`;return`${d.slice(0,u)}${o}`}function Me(d,o,u){Le(o,"offset"),(d[o]===void 0||d[o+u]===void 0)&&Oe(o,d.length-(u+1))}function ze(d,o,u,f,k,S){if(d>u||d<o){const b=typeof o=="bigint"?"n":"";let V;throw S>3?o===0||o===BigInt(0)?V=`>= 0${b} and < 2${b} ** ${(S+1)*8}${b}`:V=`>= -(2${b} ** ${(S+1)*8-1}${b}) and < 2 ** ${(S+1)*8-1}${b}`:V=`>= ${o}${b} and <= ${u}${b}`,new Y.ERR_OUT_OF_RANGE("value",V,d)}Me(f,k,S)}function Le(d,o){if(typeof d!="number")throw new Y.ERR_INVALID_ARG_TYPE(o,"number",d)}function Oe(d,o,u){throw Math.floor(d)!==d?(Le(d,u),new Y.ERR_OUT_OF_RANGE(u||"offset","an integer",d)):o<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(u||"offset",`>= ${u?1:0} and <= ${o}`,d)}const Tn=/[^+/0-9A-Za-z-_]/g;function ot(d){if(d=d.split("=")[0],d=d.trim().replace(Tn,""),d.length<2)return"";for(;d.length%4!==0;)d=d+"=";return d}function Yn(d,o){o=o||1/0;let u;const f=d.length;let k=null;const S=[];for(let b=0;b<f;++b){if(u=d.charCodeAt(b),u>55295&&u<57344){if(!k){if(u>56319){(o-=3)>-1&&S.push(239,191,189);continue}else if(b+1===f){(o-=3)>-1&&S.push(239,191,189);continue}k=u;continue}if(u<56320){(o-=3)>-1&&S.push(239,191,189),k=u;continue}u=(k-55296<<10|u-56320)+65536}else k&&(o-=3)>-1&&S.push(239,191,189);if(k=null,u<128){if((o-=1)<0)break;S.push(u)}else if(u<2048){if((o-=2)<0)break;S.push(u>>6|192,u&63|128)}else if(u<65536){if((o-=3)<0)break;S.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((o-=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 Ht(d){const o=[];for(let u=0;u<d.length;++u)o.push(d.charCodeAt(u)&255);return o}function _(d,o){let u,f,k;const S=[];for(let b=0;b<d.length&&!((o-=2)<0);++b)u=d.charCodeAt(b),f=u>>8,k=u%256,S.push(k),S.push(f);return S}function ct(d){return e.toByteArray(ot(d))}function Vn(d,o,u,f){let k;for(k=0;k<f&&!(k+u>=o.length||k>=d.length);++k)o[k+u]=d[k];return k}function Pe(d,o){return d instanceof o||d!=null&&d.constructor!=null&&d.constructor.name!=null&&d.constructor.name===o.name}function Zt(d){return d!==d}const bc=function(){const d="0123456789abcdef",o=new Array(256);for(let u=0;u<16;++u){const f=u*16;for(let k=0;k<16;++k)o[f+k]=d[u]+d[k]}return o}();function Ke(d){return typeof BigInt>"u"?Dc:d}function Dc(){throw new Error("BigInt not supported")}})(Di);var wi={exports:{}},pe=wi.exports={},Be,Fe;function ja(){throw new Error("setTimeout has not been defined")}function Ra(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Be=setTimeout:Be=ja}catch{Be=ja}try{typeof clearTimeout=="function"?Fe=clearTimeout:Fe=Ra}catch{Fe=Ra}})();function _i(n){if(Be===setTimeout)return setTimeout(n,0);if((Be===ja||!Be)&&setTimeout)return Be=setTimeout,setTimeout(n,0);try{return Be(n,0)}catch{try{return Be.call(null,n,0)}catch{return Be.call(this,n,0)}}}function Cl(n){if(Fe===clearTimeout)return clearTimeout(n);if((Fe===Ra||!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 We=[],vn=!1,ln,gt=-1;function Ul(){!vn||!ln||(vn=!1,ln.length?We=ln.concat(We):gt=-1,We.length&&Oi())}function Oi(){if(!vn){var n=_i(Ul);vn=!0;for(var e=We.length;e;){for(ln=We,We=[];++gt<e;)ln&&ln[gt].run();gt=-1,e=We.length}ln=null,vn=!1,Cl(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];We.push(new ji(n,e)),We.length===1&&!vn&&_i(Oi)};function ji(n,e){this.fun=n,this.array=e}ji.prototype.run=function(){this.fun.apply(null,this.array)};pe.title="browser";pe.browser=!0;pe.env={};pe.argv=[];pe.version="";pe.versions={};function Ze(){}pe.on=Ze;pe.addListener=Ze;pe.once=Ze;pe.off=Ze;pe.removeListener=Ze;pe.removeAllListeners=Ze;pe.emit=Ze;pe.prependListener=Ze;pe.prependOnceListener=Ze;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 zl=wi.exports;(function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const e=Di,t=zl,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 Pl(){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"),c=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(m){const p=typeof m=="bigint"?m:BigInt(m);if(p>r||p<s)throw new Error(`int64 invalid: ${m}`);return p},uParse(m){const p=typeof m=="bigint"?m:BigInt(m);if(p>c||p<i)throw new Error(`uint64 invalid: ${m}`);return p},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,p){return n.setInt32(0,m,!0),n.setInt32(4,p,!0),n.getBigInt64(0,!0)},uDec(m,p){return n.setInt32(0,m,!0),n.setInt32(4,p,!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),Rs(s)},uEnc(s){return typeof s!="string"&&(s=s.toString()),a(s),Rs(s)},dec(s,r){return El(s,r)},uDec(s,r){return Ei(s,r)}}}const he=Pl();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 Bl{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(Oa(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return yt(e),xs(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){Mi(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){Oa(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,xs(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 ea(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 ea(s,r,this.buf),this}uint64(e){let t=he.uEnc(e);return ea(t.lo,t.hi,this.buf),this}}class Fl{constructor(e,t){this.varint64=Al,this.uint32=Dl,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 La(n,e){return e instanceof Ye||!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 Je(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 xa(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 Ri(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 kn=Symbol("@bufbuild/protobuf/unknown-fields"),Cs={readUnknownFields:!0,readerFactory:n=>new Fl(n)},Us={writeUnknownFields:!0,writerFactory:()=>new Bl};function Ql(n){return n?Object.assign(Object.assign({},Cs),n):Cs}function Gl(n){return n?Object.assign(Object.assign({},Us),n):Us}function Yl(){return{makeReadOptions:Ql,makeWriteOptions:Gl,listUnknownFields(n){var e;return(e=n[kn])!==null&&e!==void 0?e:[]},discardUnknownFields(n){delete n[kn]},writeUnknownFields(n,e){const a=n[kn];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[kn])||(s[kn]=[]),s[kn].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,c]=e.tag(),m=s.fields.find(i);if(!m){const g=e.skip(c);a.readUnknownFields&&this.onUnknownField(n,i,c,g);continue}let p=n,y=m.repeated,T=m.localName;switch(m.oneof&&(p=p[m.oneof.localName],p.case!=T&&delete p.value,p.case=T,T="value"),m.kind){case"scalar":case"enum":const g=m.kind=="enum"?w.INT32:m.T;let I=At;if(m.kind=="scalar"&&m.L>0&&(I=$l),y){let O=p[T];if(c==de.LengthDelimited&&g!=w.STRING&&g!=w.BYTES){let L=e.uint32()+e.pos;for(;e.pos<L;)O.push(I(e,g))}else O.push(I(e,g))}else p[T]=I(e,g);break;case"message":const E=m.T;y?p[T].push(Tt(e,new E,a)):p[T]instanceof Ye?Tt(e,p[T],a):(p[T]=Tt(e,new E,a),E.fieldWrapper&&!m.oneof&&!m.repeated&&(p[T]=E.fieldWrapper.unwrapField(p[T])));break;case"map":let[D,R]=Vl(m,e,a);p[T][D]=R;break}}}}}function Tt(n,e,t){return e.getType().runtime.bin.readMessage(e,n,n.uint32(),t),e}function Vl(n,e,t){const a=e.uint32(),s=e.pos+a;let r,i;for(;e.pos<s;){let[c]=e.tag();switch(c){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 c=xa(n.K,yn.BIGINT);r=n.K==w.BOOL?c.toString():c}if(typeof r!="string"&&typeof r!="number"&&(r=r.toString()),i===void 0)switch(n.V.kind){case"scalar":i=xa(n.V.T,yn.BIGINT);break;case"enum":i=0;break;case"message":i=new n.V.T;break}return[r,i]}function $l(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 ql(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(Zn(n,t.K,1,r,!0),t.V.kind){case"scalar":Zn(n,t.V.T,2,s,!0);break;case"enum":Zn(n,w.INT32,2,s,!0);break;case"message":Ca(n,e,t.V.T,2,s);break}n.join()}function Ca(n,e,t,a,s){if(s!==void 0){const r=La(t,s);n.tag(a,de.LengthDelimited).bytes(r.toBinary(e))}}function Zn(n,e,t,a,s){let[r,i,c]=Ri(e,a);(!c||s)&&n.tag(t,r)[i](a)}function Wl(n,e,t,a){if(!a.length)return;n.tag(t,de.LengthDelimited).fork();let[,s]=Ri(e);for(let r=0;r<a.length;r++)n[s](a[r]);n.join()}function Hl(){return Object.assign(Object.assign({},Yl()),{writeMessage(n,e,t){const a=n.getType();for(const s of a.fields.byNumber()){let r,i=s.repeated,c=s.localName;if(s.oneof){const m=n[s.oneof.localName];if(m.case!==c)continue;r=m.value}else r=n[c];switch(s.kind){case"scalar":case"enum":let m=s.kind=="enum"?w.INT32:s.T;if(i)if(s.packed)Wl(e,m,s.no,r);else for(const p of r)Zn(e,m,s.no,p,!0);else r!==void 0&&Zn(e,m,s.no,r,!!s.oneof||s.opt);break;case"message":if(i)for(const p of r)Ca(e,t,s.T,s.no,p);else Ca(e,t,s.T,s.no,r);break;case"map":for(const[p,y]of Object.entries(r))ql(e,t,s,p,y);break}}return t.writeUnknownFields&&this.writeUnknownFields(n,e),e}})}let qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),xt=[];for(let n=0;n<qe.length;n++)xt[qe[n].charCodeAt(0)]=n;xt["-".charCodeAt(0)]=qe.indexOf("+");xt["_".charCodeAt(0)]=qe.indexOf("/");const ts={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 c=0;c<n.length;c++){if(r=xt[n.charCodeAt(c)],r===void 0)switch(n[c]){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+=qe[a>>2],s=(a&3)<<4,t=1;break;case 1:e+=qe[s|a>>4],s=(a&15)<<2,t=2;break;case 2:e+=qe[s|a>>6],e+=qe[a&63],t=0;break}return t&&(e+=qe[s],e+="=",t==1&&(e+="=")),e}},zs={ignoreUnknownFields:!1},Ps={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function Zl(n){return n?Object.assign(Object.assign({},zs),n):zs}function Kl(n){return n?Object.assign(Object.assign({},Ps),n):Ps}function Jl(n){const e=n(Xl,Bs);return{makeReadOptions:Zl,makeWriteOptions:Kl,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[c,m]of Object.entries(a)){const p=t.fields.findJsonName(c);if(!p){if(!s.ignoreUnknownFields)throw new Error(`cannot decode message ${t.typeName} from JSON: key "${c}" is unknown`);continue}let y=p.localName,T=r;if(p.oneof){if(m===null&&p.kind=="scalar")continue;const g=i[p.oneof.localName];if(g)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${p.oneof.name}" present: "${g}", "${c}"`);i[p.oneof.localName]=c,T=T[p.oneof.localName]={case:y},y="value"}if(p.repeated){if(m===null)continue;if(!Array.isArray(m))throw new Error(`cannot decode field ${t.typeName}.${p.name} from JSON: ${this.debug(m)}`);const g=T[y];for(const I of m){if(I===null)throw new Error(`cannot decode field ${t.typeName}.${p.name} from JSON: ${this.debug(I)}`);let E;switch(p.kind){case"message":E=p.T.fromJson(I,s);break;case"enum":if(E=ta(p.T,I,s.ignoreUnknownFields),E===void 0)continue;break;case"scalar":try{E=$n(p.T,I,p.L)}catch(D){let R=`cannot decode field ${t.typeName}.${p.name} from JSON: ${this.debug(I)}`;throw D instanceof Error&&D.message.length>0&&(R+=`: ${D.message}`),new Error(R)}break}g.push(E)}}else if(p.kind=="map"){if(m===null)continue;if(Array.isArray(m)||typeof m!="object")throw new Error(`cannot decode field ${t.typeName}.${p.name} from JSON: ${this.debug(m)}`);const g=T[y];for(const[I,E]of Object.entries(m)){if(E===null)throw new Error(`cannot decode field ${t.typeName}.${p.name} from JSON: map value null`);let D;switch(p.V.kind){case"message":D=p.V.T.fromJson(E,s);break;case"enum":if(D=ta(p.V.T,E,s.ignoreUnknownFields),D===void 0)continue;break;case"scalar":try{D=$n(p.V.T,E,yn.BIGINT)}catch(R){let O=`cannot decode map value for field ${t.typeName}.${p.name} from JSON: ${this.debug(m)}`;throw R instanceof Error&&R.message.length>0&&(O+=`: ${R.message}`),new Error(O)}break}try{g[$n(p.K,p.K==w.BOOL?I=="true"?!0:I=="false"?!1:I:I,yn.BIGINT).toString()]=D}catch(R){let O=`cannot decode map key for field ${t.typeName}.${p.name} from JSON: ${this.debug(m)}`;throw R instanceof Error&&R.message.length>0&&(O+=`: ${R.message}`),new Error(O)}}}else switch(p.kind){case"message":const g=p.T;if(m===null&&g.typeName!="google.protobuf.Value"){if(p.oneof)throw new Error(`cannot decode field ${t.typeName}.${p.name} from JSON: null is invalid for oneof field "${c}"`);continue}T[y]instanceof Ye?T[y].fromJson(m,s):(T[y]=g.fromJson(m,s),g.fieldWrapper&&!p.oneof&&(T[y]=g.fieldWrapper.unwrapField(T[y])));break;case"enum":const I=ta(p.T,m,s.ignoreUnknownFields);I!==void 0&&(T[y]=I);break;case"scalar":try{T[y]=$n(p.T,m,p.L)}catch(E){let D=`cannot decode field ${t.typeName}.${p.name} from JSON: ${this.debug(m)}`;throw E instanceof Error&&E.message.length>0&&(D+=`: ${E.message}`),new Error(D)}break}}return r},writeMessage(t,a){const s=t.getType(),r={};let i;try{for(const c of s.fields.byMember()){let m;if(c.kind=="oneof"){const p=t[c.localName];if(p.value===void 0)continue;if(i=c.findField(p.case),!i)throw"oneof case not found: "+p.case;m=e(i,p.value,a)}else i=c,m=e(i,t[i.localName],a);m!==void 0&&(r[a.useProtoFieldName?i.name:i.jsonName]=m)}}catch(c){const m=i?`cannot encode field ${s.typeName}.${i.name} to JSON`:`cannot encode message ${s.typeName} to JSON`,p=c instanceof Error?c.message:String(c);throw new Error(m+(p.length>0?`: ${p}`:""))}return r},readScalar:$n,writeScalar:Bs,debug:Li}}function Li(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 $n(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&&Mi(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?Oa(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 ts.dec(e)}throw new Error}function ta(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: ${Li(e)}`)}function Xl(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 Bs(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?ts.enc(e):void 0}}function eu(){return Jl((n,e)=>function(a,s,r){if(a.kind=="map"){const i={};switch(a.V.kind){case"scalar":for(const[m,p]of Object.entries(s)){const y=e(a.V.T,p,!0);be(y!==void 0),i[m.toString()]=y}break;case"message":for(const[m,p]of Object.entries(s))i[m.toString()]=p.toJson(r);break;case"enum":const c=a.V.T;for(const[m,p]of Object.entries(s)){be(p===void 0||typeof p=="number");const y=n(c,p,!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 c=0;c<s.length;c++)i.push(e(a.T,s[c],!0));break;case"enum":for(let c=0;c<s.length;c++)i.push(n(a.T,s[c],!0,r.enumAsInteger));break;case"message":for(let c=0;c<s.length;c++)i.push(La(a.T,s[c]).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?La(a.T,s).toJson(r):void 0}})}function nu(){return{setEnumType:Si,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 c=i[s].case;if(c===void 0)continue;const m=a.findField(c);let p=i[s].value;m&&m.kind=="message"&&!(p instanceof m.T)?p=new m.T(p):m&&m.kind==="scalar"&&m.T===w.BYTES&&(p=qn(p)),r[s]={case:c,value:p};break;case"scalar":case"enum":let y=i[s];a.T===w.BYTES&&(y=a.repeated?y.map(qn):qn(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]=qn(E);else Object.assign(r[s],i[s]);break;case"message":const g=a.V.T;for(const I of Object.keys(i[s])){let E=i[s][I];g.fieldWrapper||(E=new g(E)),r[s][I]=E}break}break;case"message":const T=a.T;if(a.repeated)r[s]=i[s].map(g=>g instanceof T?g:new T(g));else if(i[s]!==void 0){const g=i[s];T.fieldWrapper?T.typeName==="google.protobuf.BytesValue"?r[s]=qn(g):r[s]=g:r[s]=g instanceof T?g:new T(g)}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,c)=>a.T.equals(i,r[c]));case"scalar":return s.every((i,c)=>Je(a.T,i,r[c]));case"enum":return s.every((i,c)=>Je(w.INT32,i,r[c]))}throw new Error(`repeated cannot contain ${a.kind}`)}switch(a.kind){case"message":return a.T.equals(s,r);case"enum":return Je(w.INT32,s,r);case"scalar":return Je(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 Je(w.INT32,s.value,r.value);case"scalar":return Je(i.T,s.value,r.value)}throw new Error(`oneof cannot contain ${i.kind}`);case"map":const c=Object.keys(s).concat(Object.keys(r));switch(a.V.kind){case"message":const m=a.V.T;return c.every(y=>m.equals(s[y],r[y]));case"enum":return c.every(y=>Je(w.INT32,s[y],r[y]));case"scalar":const p=a.V.T;return c.every(y=>Je(p,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(lt);else if(s.kind=="map"){i=a[s.localName];for(const[c,m]of Object.entries(r))i[c]=lt(m)}else s.kind=="oneof"?i=s.findField(r.case)?{case:r.case,value:lt(r.value)}:{case:void 0}:i=lt(r);a[s.localName]=i}return t}}}function lt(n){if(n===void 0)return n;if(n instanceof Ye)return n.clone();if(n instanceof Uint8Array){const e=new Uint8Array(n.byteLength);return e.set(n),e}return n}function qn(n){return n instanceof Uint8Array?n:new Uint8Array(n)}class tu{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 xi(n,e){const t=Ci(n);return e?t:cu(ou(t))}function au(n){return xi(n,!1)}const su=Ci;function Ci(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 ru=new Set(["constructor","toString","toJSON","valueOf"]),iu=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),Ui=n=>`${n}$`,ou=n=>iu.has(n)?Ui(n):n,cu=n=>ru.has(n)?Ui(n):n;class lu{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=au(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=Nl("proto3",eu(),Hl(),Object.assign(Object.assign({},nu()),{newFieldList(n){return new tu(n,uu)},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]=xa(e.T,e.L);break}}}}));function uu(n){var e,t,a,s;const r=[];let i;for(const c of typeof n=="function"?n():n){const m=c;if(m.localName=xi(c.name,c.oneof!==void 0),m.jsonName=(e=c.jsonName)!==null&&e!==void 0?e:su(c.name),m.repeated=(t=c.repeated)!==null&&t!==void 0?t:!1,c.kind=="scalar"&&(m.L=(a=c.L)!==null&&a!==void 0?a:yn.BIGINT),m.packed=(s=c.packed)!==null&&s!==void 0?s:c.kind=="enum"||c.kind=="scalar"&&c.T!=w.BYTES&&c.T!=w.STRING,c.oneof!==void 0){const p=typeof c.oneof=="string"?c.oneof:c.oneof.name;(!i||i.name!=p)&&(i=new lu(p)),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 Fs;(function(n){n[n.NoSideEffects=1]="NoSideEffects",n[n.Idempotent=2]="Idempotent"})(Fs||(Fs={}));class Ae extends Ye{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 Ge extends Ye{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 c;if(r.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))c=i.fromJson(e.value,t);else{const m=Object.assign({},e);delete m["@type"],c=i.fromJson(m,t)}return this.packFrom(c),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 Ge;return t.packFrom(e),t}static fromBinary(e,t){return new Ge().fromBinary(e,t)}static fromJson(e,t){return new Ge().fromJson(e,t)}static fromJsonString(e,t){return new Ge().fromJsonString(e,t)}static equals(e,t){return l.util.equals(Ge,e,t)}}Ge.runtime=l;Ge.typeName="google.protobuf.Any";Ge.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 Qs(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(mu(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 Ye){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 mu(n,e){return n.length?`[${Qs(e)}] ${n}`:`[${Qs(e)}]`}function du(n,e,t){try{const a=ts.dec(n);return e?e.fromBinary(a,t):a}catch(a){throw ye.from(a,ee.DataLoss)}}function zi(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 Gs(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 p=1;p<5;p++)m=(m<<8)+t[p];r={flags:t[0],length:m}}if(r!==void 0&&t.byteLength>=r.length+5)break;const c=await e.read();if(c.done)break;a(c.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 Ys(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 pu=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(c,m){i=n[r](i),s(c,m,i.done,i.value)})}}function s(r,i,c,m){Promise.resolve(m).then(function(p){r({value:p,done:c})},i)}},nt=globalThis&&globalThis.__await||function(n){return this instanceof nt?(this.v=n,this):new nt(n)},yu=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(g){a[g]&&(s[g]=function(I){return new Promise(function(E,D){r.push([g,I,E,D])>1||c(g,I)})})}function c(g,I){try{m(a[g](I))}catch(E){T(r[0][3],E)}}function m(g){g.value instanceof nt?Promise.resolve(g.value.v).then(p,y):T(r[0][2],g)}function p(g){c("next",g)}function y(g){c("throw",g)}function T(g,I){g(I),r.shift(),r.length&&c(r[0][0],r[0][1])}},fu=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:nt(n[s](i)),done:!1}:r?r(i):i}:r}};function Pi(n){return yu(this,arguments,function*(){yield nt(yield*fu(pu(n)))})}var gu=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(c,m){i=n[r](i),s(c,m,i.done,i.value)})}}function s(r,i,c,m){Promise.resolve(m).then(function(p){r({value:p,done:c})},i)}};function Tu(n,e){return zi(n,t=>{switch(t.kind){case P.Unary:return hu(e,n,t);case P.ServerStreaming:return ku(e,n,t);default:return null}})}function hu(n,e,t){return function(a,s,r){const i=new AbortController;return r=Bi(i,r),n.unary(e,t,i.signal,r.timeoutMs,r.headers,a,r.contextValues).then(c=>{var m,p;(m=r==null?void 0:r.onHeader)===null||m===void 0||m.call(r,c.header),(p=r==null?void 0:r.onTrailer)===null||p===void 0||p.call(r,c.trailer),s(void 0,c.message)},c=>{const m=ye.from(c,ee.Internal);m.code===ee.Canceled&&i.signal.aborted||s(m,new t.O)}),()=>i.abort()}}function ku(n,e,t){return function(a,s,r,i){const c=new AbortController;async function m(){var p,y,T,g,I,E;i=Bi(c,i);const D=await n.stream(e,t,i.signal,i.timeoutMs,i.headers,Pi([a]),i.contextValues);(I=i.onHeader)===null||I===void 0||I.call(i,D.header);try{for(var R=!0,O=gu(D.message),L;L=await O.next(),p=L.done,!p;R=!0)g=L.value,R=!1,s(g)}catch(C){y={error:C}}finally{try{!R&&!p&&(T=O.return)&&await T.call(O)}finally{if(y)throw y.error}}(E=i.onTrailer)===null||E===void 0||E.call(i,D.trailer),r(void 0)}return m().catch(p=>{const y=ye.from(p,ee.Internal);y.code===ee.Canceled&&c.signal.aborted?r(void 0):r(y)}),()=>c.abort()}}function Bi(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 Fi=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(c,m){i=n[r](i),s(c,m,i.done,i.value)})}}function s(r,i,c,m){Promise.resolve(m).then(function(p){r({value:p,done:c})},i)}},jn=globalThis&&globalThis.__await||function(n){return this instanceof jn?(this.v=n,this):new jn(n)},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:jn(n[s](i)),done:!1}:r?r(i):i}:r}},Iu=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(g){a[g]&&(s[g]=function(I){return new Promise(function(E,D){r.push([g,I,E,D])>1||c(g,I)})})}function c(g,I){try{m(a[g](I))}catch(E){T(r[0][3],E)}}function m(g){g.value instanceof jn?Promise.resolve(g.value.v).then(p,y):T(r[0][2],g)}function p(g){c("next",g)}function y(g){c("throw",g)}function T(g,I){g(I),r.shift(),r.length&&c(r[0][0],r[0][1])}};function Ct(n,e){return zi(n,t=>{switch(t.kind){case P.Unary:return Su(e,n,t);case P.ServerStreaming:return Nu(e,n,t);case P.ClientStreaming:return Au(e,n,t);case P.BiDiStreaming:return Eu(e,n,t);default:return null}})}function Su(n,e,t){return async function(a,s){var r,i;const c=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,c.header),(i=s==null?void 0:s.onTrailer)===null||i===void 0||i.call(s,c.trailer),c.message}}function Nu(n,e,t){return function(a,s){return Qi(n.stream(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,Pi([a]),s==null?void 0:s.contextValues),s)}}function Au(n,e,t){return async function(a,s){var r,i,c,m,p,y;const T=await n.stream(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,a,s==null?void 0:s.contextValues);(p=s==null?void 0:s.onHeader)===null||p===void 0||p.call(s,T.header);let g;try{for(var I=!0,E=Fi(T.message),D;D=await E.next(),r=D.done,!r;I=!0)m=D.value,I=!1,g=m}catch(R){i={error:R}}finally{try{!I&&!r&&(c=E.return)&&await c.call(E)}finally{if(i)throw i.error}}if(!g)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,T.trailer),g}}function Eu(n,e,t){return function(a,s){return Qi(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 Qi(n,e){const t=function(){var a,s;return Iu(this,arguments,function*(){const r=yield jn(n);(a=e==null?void 0:e.onHeader)===null||a===void 0||a.call(e,r.header),yield jn(yield*Mu(Fi(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 bu(...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(Gi(this));for(const s of t)s.removeEventListener("abort",a)}return e}function Du(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 Gi(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 Vs(){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 aa=128;function $s(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 vu="Content-Type",wu="Grpc-Timeout",Yi="Grpc-Status",Vi="Grpc-Message",_u="Grpc-Status-Details-Bin",Ou="User-Agent",ju="X-User-Agent",Ru="X-Grpc-Web",Lu="application/grpc-web+proto",xu="application/grpc-web+json";class He extends Ye{constructor(e){super(),this.code=0,this.message="",this.details=[],l.util.initPartial(e,this)}static fromBinary(e,t){return new He().fromBinary(e,t)}static fromJson(e,t){return new He().fromJson(e,t)}static fromJsonString(e,t){return new He().fromJsonString(e,t)}static equals(e,t){return l.util.equals(He,e,t)}}He.runtime=l;He.typeName="google.rpc.Status";He.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:Ge,repeated:!0}]);const Cu="0";function $i(n){var e;const t=n.get(_u);if(t!=null){const s=du(t,He);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(Yi);if(a!=null){if(a===Cu)return;const s=parseInt(a,10);return s in ee?new ye(decodeURIComponent((e=n.get(Vi))!==null&&e!==void 0?e:""),s,n):new ye(`invalid grpc-status: ${a}`,ee.Internal,n)}}function qs(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 qi(n,e){return e instanceof Ye?e:new n(e)}function Uu(n,e){function t(a){return a.done===!0?a:{done:a.done,value:qi(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 zu(n){var e;const t=Object.assign({},n);return(e=t.ignoreUnknownFields)!==null&&e!==void 0||(t.ignoreUnknownFields=!0),t}function Ws(n,e,t,a){const s=e?Hs(n.I,a):Zs(n.I,t);return{parse:(e?Hs(n.O,a):Zs(n.O,t)).parse,serialize:s.serialize}}function Hs(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 Zs(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=zu(e);return{parse(c){try{const m=r.decode(c);return n.fromJsonString(m,i)}catch(m){throw ye.from(m,ee.InvalidArgument)}},serialize(c){try{const m=c.toJsonString(i);return s.encode(m)}catch(m){throw ye.from(m,ee.Internal)}}}}function Pu(n){const e=Hi(n.next,n.interceptors),[t,a,s]=Wi(n),r=Object.assign(Object.assign({},n.req),{message:qi(n.req.method.I,n.req.message),signal:t});return e(r).then(i=>(s(),i),a)}function Bu(n){const e=Hi(n.next,n.interceptors),[t,a,s]=Wi(n),r=Object.assign(Object.assign({},n.req),{message:Uu(n.req.method.I,n.req.message),signal:t});let i=!1;return t.addEventListener("abort",function(){var c,m;const p=n.req.message[Symbol.asyncIterator]();i||(c=p.throw)===null||c===void 0||c.call(p,this.reason).catch(()=>{}),(m=p.return)===null||m===void 0||m.call(p).catch(()=>{})}),e(r).then(c=>Object.assign(Object.assign({},c),{message:{[Symbol.asyncIterator](){const m=c.message[Symbol.asyncIterator]();return{next(){return m.next().then(p=>(p.done==!0&&(i=!0,s()),p),a)}}}}}),a)}function Wi(n){const{signal:e,cleanup:t}=Du(n.timeoutMs),a=bu(n.signal,e);return[a.signal,function(r){const i=ye.from(e.aborted?Gi(e):r);return a.abort(i),t(),Promise.reject(i)},function(){t(),a.abort()}]}function Hi(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 Fu(){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 Ks(n){const e=$i(n);if(e)throw e}function Js(n,e,t){const a=new Headers(t??{});return a.set(vu,n?Lu:xu),a.set(Ru,"1"),a.set(ju,"connect-es/1.1.2"),a.set(Ou,"connect-es/1.1.2"),e!==void 0&&a.set(wu,`${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 Xs(n,e){var t;if(n>=200&&n<300){const a=$i(e);if(a)throw a;return{foundStatus:e.has(Yi)}}throw new ye(decodeURIComponent((t=e.get(Vi))!==null&&t!==void 0?t:`HTTP ${n}`),Qu(n),e)}var un=globalThis&&globalThis.__await||function(n){return this instanceof un?(this.v=n,this):new un(n)},Gu=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(g){a[g]&&(s[g]=function(I){return new Promise(function(E,D){r.push([g,I,E,D])>1||c(g,I)})})}function c(g,I){try{m(a[g](I))}catch(E){T(r[0][3],E)}}function m(g){g.value instanceof un?Promise.resolve(g.value.v).then(p,y):T(r[0][2],g)}function p(g){c("next",g)}function y(g){c("throw",g)}function T(g,I){g(I),r.shift(),r.length&&c(r[0][0],r[0][1])}};function Ut(n){var e;Fu();const t=(e=n.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(a,s,r,i,c,m,p){var y;const{serialize:T,parse:g}=Ws(s,t,n.jsonOptions,n.binaryOptions);return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,await Pu({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!1,service:a,method:s,url:qs(n.baseUrl,a,s),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Js(t,i,c),contextValues:p??Vs(),message:m},next:async I=>{var E;const R=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:Ys(0,T(I.message))}));if(Xs(R.status,R.headers),!R.body)throw"missing response body";const O=Gs(R.body).getReader();let L,C;for(;;){const U=await O.read();if(U.done)break;const{flags:z,data:B}=U.value;if(z===aa){if(L!==void 0)throw"extra trailer";L=$s(B);continue}if(C!==void 0)throw"extra message";C=g(B)}if(L===void 0)throw"missing trailer";if(Ks(L),C===void 0)throw"missing message";return{stream:!1,header:R.headers,message:C,trailer:L}}})},async stream(a,s,r,i,c,m,p){var y;const{serialize:T,parse:g}=Ws(s,t,n.jsonOptions,n.binaryOptions);function I(D,R,O){return Gu(this,arguments,function*(){const C=Gs(D).getReader();if(R){if(!(yield un(C.read())).done)throw"extra data for trailers-only";return yield un(void 0)}let U=!1;for(;;){const z=yield un(C.read());if(z.done)break;const{flags:B,data:x}=z.value;if((B&aa)===aa){if(U)throw"extra trailer";U=!0;const H=$s(x);Ks(H),H.forEach((ne,se)=>O.set(se,ne));continue}if(U)throw"extra message";yield yield un(g(x))}if(!U)throw"missing trailer"})}async function E(D){if(s.kind!=P.ServerStreaming)throw"The fetch API does not support streaming request bodies";const R=await D[Symbol.asyncIterator]().next();if(R.done==!0)throw"missing request message";return Ys(0,T(R.value))}return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,Bu({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!0,service:a,method:s,url:qs(n.baseUrl,a,s),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Js(t,i,c),contextValues:p??Vs(),message:m},next:async D=>{var R;const L=await((R=n.fetch)!==null&&R!==void 0?R:globalThis.fetch)(D.url,Object.assign(Object.assign({},D.init),{headers:D.header,signal:D.signal,body:await E(D.message)})),{foundStatus:C}=Xs(L.status,L.headers);if(!L.body)throw"missing response body";const U=new Headers;return Object.assign(Object.assign({},D),{header:L.headers,trailer:U,message:I(L.body,C,U)})}})}}}const Yu=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"}]),Vu=l.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),$u=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:Vu},{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 qu=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(Yu)},{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}]),Wu=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:qu}]),as=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:$u}]);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:Wu}]);const Hu=l.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),Zu=l.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:Ku},{no:2,name:"data",kind:"message",T:as}]),Ku=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"}),Ju=l.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Xu=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}]),em=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:Xu}]),nm=l.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),tm=l.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),am=l.makeMessageType("streamlayer.users.MeRequest",[]),sm=l.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:as}]),rm=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"}]),im=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"}]),om=l.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),cm=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"}]),lm=l.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),um=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"}]),mm=l.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),dm=l.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),pm=l.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:ym}]),ym=l.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),fm=l.makeMessageType("streamlayer.users.InviteResponse",[]),gm=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}]),Tm=l.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:hm},{no:2,name:"data",kind:"message",T:as,opt:!0}]),hm=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"}),tt={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:Hu,O:Zu,kind:P.Unary},register:{name:"Register",I:Ju,O:em,kind:P.Unary},requestPassword:{name:"RequestPassword",I:nm,O:tm,kind:P.Unary},me:{name:"Me",I:am,O:sm,kind:P.Unary},invite:{name:"Invite",I:pm,O:fm,kind:P.Unary},bypassAuth:{name:"BypassAuth",I:gm,O:Tm,kind:P.Unary},updateMetadata:{name:"UpdateMetadata",I:rm,O:dm,kind:P.Unary},updateAvatar:{name:"UpdateAvatar",I:im,O:om,kind:P.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:cm,O:lm,kind:P.Unary},updatePublicName:{name:"UpdatePublicName",I:um,O:mm,kind:P.Unary}}},km=async(n,e)=>{const t=Ut({baseUrl:n});return await Ct(tt,t).requestPassword({id:e}),!0},Mm=async(n,e)=>{const t=Ut({baseUrl:n});return await Ct(tt,t).register({id:e}),!0},Im=async(n,e,t)=>{var i;const a=Ut({baseUrl:n}),r=await Ct(tt,a).login({id:e,password:t});return(i=r==null?void 0:r.meta)==null?void 0:i.jwt};const Sm=A("div")({name:"Panel",class:"pkueuwk",propsAsIs:!1}),er=A("form")({name:"Form",class:"fp66u19",propsAsIs:!1}),nr=A("div")({name:"FormTitle",class:"fwojs5e",propsAsIs:!1}),sa=A("div")({name:"FormDescription",class:"fwvt1dc",propsAsIs:!1}),ra=A("button")({name:"FormSubmit",class:"f16e2wbc",propsAsIs:!1}),Nm=A("div")({name:"FormInputContainer",class:"f1xkchzs",propsAsIs:!1}),Am=A("div")({name:"Digits",class:"d132q1j",propsAsIs:!1}),Em=({login:n,anonymousLogin:e,host:t})=>{const[a,s]=F.useState(""),[r,i]=F.useState(""),[c,m]=F.useState(""),p=async T=>{T.preventDefault();try{const g=a.replaceAll("+","");try{await km(t,g)}catch{await Mm(t,g)}i(g)}catch(g){window.alert(g)}},y=async T=>{if(T.preventDefault(),r&&c)try{const g=await Im(t,r,c);g&&n?await n(g):console.log("token",g)}catch(g){window.alert(g)}};return h.jsxs(Sm,{children:[!r&&h.jsxs("div",{children:[h.jsxs(er,{onSubmit:p,children:[h.jsx(nr,{children:"Enter your phone number"}),h.jsx(sa,{children:"Enter your phone up for number to log in or sign an account."}),h.jsx(Nm,{children:h.jsx(Kt,{value:a,onChange:T=>s(`${T}`)})}),h.jsx(ra,{disabled:!Kt.isValidPhoneNumber(a),type:"submit",children:"request code"})]}),e&&h.jsx(ra,{style:{display:"block",margin:"auto"},onClick:e,children:"anonymous login"})]}),r&&h.jsxs(er,{onSubmit:y,children:[h.jsx(nr,{children:"Enter Verification Code"}),h.jsxs(sa,{children:["Please enter the verification code ",h.jsx("br",{}),"sent to ",h.jsx("b",{children:Kt.formatPhoneNumberIntl(a)})]}),h.jsx(Am,{children:h.jsx(_c,{autoFocus:!0,allowedCharacters:"numeric",length:4,onChange:m})}),h.jsx(ra,{disabled:c.length!==4,type:"submit",children:"login"}),h.jsxs(sa,{children:["Didn't get 59 the code? ",h.jsx("br",{}),"Resend Code in",h.jsx(ki,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const bm=A("div")({name:"Container",class:"c18fa2p6",propsAsIs:!1}),Dm=A("div")({name:"Content",class:"cthywkn",propsAsIs:!1}),vm=A("div")({name:"OnboardingHeader",class:"obeaxxh",propsAsIs:!1}),wm=A("div")({name:"LeftBlock",class:"l1jam9nb",propsAsIs:!1}),_m=A("div")({name:"RightBlock",class:"r17ziiq1",propsAsIs:!1}),Om=A("img")({name:"GameIcon",class:"gxb34q2",propsAsIs:!1}),jm=A("img")({name:"SponsorLogo",class:"s10k8h8y",propsAsIs:!1}),Rm=A("button")({name:"CloseBtn",class:"ca5j1zk",propsAsIs:!1}),Lm=A("img")({name:"IconClose",class:"i6wd7es",propsAsIs:!1}),xm=A("button")({name:"OnboardingActionBtn",class:"onaxor0",propsAsIs:!1});const Cm=A("div")({name:"Container",class:"c1tc3ie1",propsAsIs:!1}),Um=A("div")({name:"Content",class:"cenyr9j",propsAsIs:!1}),zm=A("img")({name:"Graphic",class:"g17082th",propsAsIs:!1}),Pm=A("div")({name:"Headline",class:"hr58r57",propsAsIs:!1}),Bm=({graphic:n,headline:e})=>h.jsx(Cm,{children:h.jsxs(Um,{children:[h.jsx(zm,{alt:"graphic-img-instrucrions",src:n}),h.jsx(Pm,{children:e})]})});const Fm=A("div")({name:"Container",class:"c1k109z3",propsAsIs:!1}),Qm=A("div")({name:"Title",class:"tl3o9j9",propsAsIs:!1}),Gm=A("div")({name:"RulesList",class:"rp7yn67",propsAsIs:!1}),Ym=A("div")({name:"RulesItem",class:"r18km3gu",propsAsIs:!1}),Vm=A("div")({name:"RuleNumber",class:"rtu7hsj",propsAsIs:!1}),$m=A("div")({name:"RuleText",class:"rfkkuag",propsAsIs:!1}),qm=({rules:n,rulesTitle:e,primaryColor:t})=>h.jsxs(Fm,{children:[h.jsx(Qm,{children:e}),h.jsx(Gm,{children:n==null?void 0:n.map((a,s)=>h.jsxs(Ym,{children:[h.jsx(Vm,{style:{backgroundColor:t},children:s+1}),h.jsx($m,{children:a})]},s))})]}),Wm="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyaWVuZHMiPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNNC4xOTIzMSA3LjAzMTI1QzIuNjYzNDYgNy4wMzEyNSAxLjQyMzA4IDguMTk5NzMgMS40MjMwOCA5LjYzOTk0QzEuNDIzMDggMTEuMDgwMiAyLjY2MzQ2IDEyLjI0ODYgNC4xOTIzMSAxMi4yNDg2QzUuNzIxMTUgMTIuMjQ4NiA2Ljk2MTU0IDExLjA4MDIgNi45NjE1NCA5LjYzOTk0QzYuOTYxNTQgOC4xOTk3MyA1LjcyMTE1IDcuMDMxMjUgNC4xOTIzMSA3LjAzMTI1Wk00LjE5MjMxIDEyLjI0ODZDMi4xNjIyNiAxMi4yNDg2IDAuNSAxMy44MTQ1IDAuNSAxNS43MjY5VjE3LjYyOUMwLjUgMTcuNjI5IDEuNDIzMDggMTguMzM1NiA0LjE5MjMxIDE4LjMzNTZDNi45NjE1NCAxOC4zMzU2IDcuODg0NjEgMTcuNjI5IDcuODg0NjEgMTcuNjI5VjE1LjcyNjlDNy44ODQ2MSAxMy44MTQ1IDYuMjIyMzYgMTIuMjQ4NiA0LjE5MjMxIDEyLjI0ODZaTTIwLjgwNzcgNy4wMzEyNUMxOS4yNzg4IDcuMDMxMjUgMTguMDM4NSA4LjE5OTczIDE4LjAzODUgOS42Mzk5NEMxOC4wMzg1IDExLjA4MDIgMTkuMjc4OCAxMi4yNDg2IDIwLjgwNzcgMTIuMjQ4NkMyMi4zMzY1IDEyLjI0ODYgMjMuNTc2OSAxMS4wODAyIDIzLjU3NjkgOS42Mzk5NEMyMy41NzY5IDguMTk5NzMgMjIuMzM2NSA3LjAzMTI1IDIwLjgwNzcgNy4wMzEyNVpNMjAuODA3NyAxMi4yNDg2QzE4Ljc3NzYgMTIuMjQ4NiAxNy4xMTU0IDEzLjgxNDUgMTcuMTE1NCAxNS43MjY5VjE3LjYyOUMxNy4xMTU0IDE3LjYyOSAxOC4wMzg1IDE4LjMzNTYgMjAuODA3NyAxOC4zMzU2QzIzLjU3NjkgMTguMzM1NiAyNC41IDE3LjYyOSAyNC41IDE3LjYyOVYxNS43MjY5QzI0LjUgMTMuODE0NSAyMi44Mzc3IDEyLjI0ODYgMjAuODA3NyAxMi4yNDg2Wk0xMi41IDEwLjUwOTVDMTAuOTcxMiAxMC41MDk1IDkuNzMwNzcgMTEuNjc4IDkuNzMwNzcgMTMuMTE4MkM5LjczMDc3IDE0LjU1ODQgMTAuOTcxMiAxNS43MjY5IDEyLjUgMTUuNzI2OUMxNC4wMjg4IDE1LjcyNjkgMTUuMjY5MiAxNC41NTg0IDE1LjI2OTIgMTMuMTE4MkMxNS4yNjkyIDExLjY3OCAxNC4wMjg4IDEwLjUwOTUgMTIuNSAxMC41MDk1Wk0xMi41IDE1LjcyNjlDMTAuNDcgMTUuNzI2OSA4LjgwNzY5IDE3LjI5MjggOC44MDc2OSAxOS4yMDUxVjIxLjEwNzNDOC44MDc2OSAyMS4xMDczIDkuNzMwNzcgMjEuODEzOCAxMi41IDIxLjgxMzhDMTUuMjY5MiAyMS44MTM4IDE2LjE5MjMgMjEuMTA3MyAxNi4xOTIzIDIxLjEwNzNWMTkuMjA1MUMxNi4xOTIzIDE3LjI5MjggMTQuNTMgMTUuNzI2OSAxMi41IDE1LjcyNjlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik04LjU4NDczIDEuNUM2Ljk2MzkyIDEuNSA1LjY0ODkzIDIuNzM4NzYgNS42NDg5MyA0LjI2NTZDNS42NDg5MyA1Ljc5MjQ1IDYuOTYzOTIgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFDMTAuMjA1NSA3LjAzMTIxIDExLjUyMDUgNS43OTI0NSAxMS41MjA1IDQuMjY1NkMxMS41MjA1IDIuNzM4NzYgMTAuMjA1NSAxLjUgOC41ODQ3MyAxLjVaTTguNTg0NzMgNy4wMzEyMUM4LjI5MDM4IDcuMDMxMjEgNy45OTIyMSA3LjAyNCA3LjY5Nzg3IDcuMTE3NjNDOC4yODY1NiA3Ljg1NTg0IDguNTg0NzMgOC43ODEzMSA4LjU4NDczIDkuNzk2ODFDOC41ODQ3MyAxMC4xNjQxIDguNDkyOTggMTAuNTI0MiA4LjQ5Mjk4IDEwLjg5MTVDOS4yNzY2MyA5Ljc4NjAxIDEwLjU0MTkgOS4wNTg1OSAxMi4wMDk4IDguODc0OTRDMTEuMzI1NiA3Ljc2OTQyIDEwLjA1MjYgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFaTTE2LjQxMzUgMS41QzE0Ljc5MjcgMS41IDEzLjQ3NzcgMi43Mzg3NiAxMy40Nzc3IDQuMjY1NkMxMy40Nzc3IDUuNzkyNDUgMTQuNzkyNyA3LjAzMTIxIDE2LjQxMzUgNy4wMzEyMUMxOC4wMzQzIDcuMDMxMjEgMTkuMzQ5MyA1Ljc5MjQ1IDE5LjM0OTMgNC4yNjU2QzE5LjM0OTMgMi43Mzg3NiAxOC4wMzQzIDEuNSAxNi40MTM1IDEuNVpNMTYuNDEzNSA3LjAzMTIxQzE0Ljk0NTYgNy4wMzEyMSAxMy42NzI3IDcuNzY5NDIgMTIuOTg4NCA4Ljg3NDk0QzE0LjQ1NjMgOS4wNTg1OSAxNS43MjE2IDkuNzg2MDEgMTYuNTA1MyAxMC44OTE1QzE2LjUwNTMgMTAuNTI0MiAxNi40MTM1IDEwLjE2NDEgMTYuNDEzNSA5Ljc5NjgxQzE2LjQxMzUgOC43ODEzMSAxNi43MTE3IDcuODU1ODQgMTcuMzAwNCA3LjExNzYzQzE3LjAwNiA3LjAyNCAxNi43MDc5IDcuMDMxMjEgMTYuNDEzNSA3LjAzMTIxWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC40Ii8+CjwvZz4KPC9zdmc+Cg==";const Hm=A("div")({name:"Container",class:"ckff0a9",propsAsIs:!1}),Zm=A("div")({name:"Content",class:"czw1kx1",propsAsIs:!1}),Km=A("div")({name:"InviteGameIconWrap",class:"i2e7ir3",propsAsIs:!1}),Jm=A("img")({name:"InviteGameIcon",class:"i2tfvcu",propsAsIs:!1}),Xm=A("div")({name:"Heading",class:"hnq23ee",propsAsIs:!1}),ed=A("div")({name:"Subtext",class:"s2drh5v",propsAsIs:!1}),nd=A("button")({name:"InvateBtn",class:"iiwwayv",propsAsIs:!1}),td=({inviteCardTitle:n,inviteCardSubtext:e,primaryColor:t})=>h.jsx(Hm,{children:h.jsxs(Zm,{children:[h.jsx(Km,{style:{backgroundColor:t},children:h.jsx(Jm,{alt:"invite-game-icon",src:Wm})}),h.jsx(Xm,{children:n||""}),h.jsx(ed,{children:e||""}),h.jsx(nd,{onClick:()=>{},style:{backgroundColor:t},children:"Invite friends!"})]})}),Mn={steps:!1,rules:!1,inviteCard:!1},ad=({gamification:n,closeFeature:e,steps:t,gameIcon:a,sponsorLogo:s,rules:r,rulesBtnLabel:i,rulesTitle:c,primaryColor:m,inviteCardTitle:p,inviteCardSubtext:y,inviteCardBtnLabel:T})=>{const g=async()=>{await n.submitInplay()},I=()=>{e()},[E,D]=F.useState(0),[R,O]=F.useState(Mn);F.useEffect(()=>{t!=null&&t.length?O({...Mn,steps:!0}):r!=null&&r.length?O({...Mn,rules:!0}):O({...Mn,inviteCard:!0})},[]);const L=F.useCallback(()=>{t!=null&&t.length&&E<t.length-1?D(C=>++C):r!=null&&r.length&&R.steps?O({...Mn,rules:!0}):R.rules&&O({...Mn,inviteCard:!0})},[E,t==null?void 0:t.length,r==null?void 0:r.length,R,D,O]);return h.jsxs(bm,{children:[h.jsxs(vm,{children:[h.jsx(wm,{children:a&&h.jsx(Om,{alt:"sponsor-one-onboarding-icon",src:a})}),h.jsxs(_m,{children:[s&&h.jsx(jm,{alt:"sponsor-two-onboarding-icon",src:s}),h.jsx(Rm,{onClick:I,children:h.jsx(Lm,{alt:"icon-close-onboarding",src:Xa})})]})]}),h.jsxs(Dm,{children:[R.steps&&(t==null?void 0:t.length)&&h.jsx(Bm,{graphic:t[E].graphic,headline:t[E].headline}),R.rules&&h.jsx(qm,{rules:r,rulesTitle:c,primaryColor:m}),R.inviteCard&&h.jsx(td,{inviteCardTitle:p,inviteCardSubtext:y,primaryColor:m})]}),h.jsx(xm,{onClick:R.inviteCard?g:L,children:R.rules?i||"Got it!":R.inviteCard?T||"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"}]),sd=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"}]),nn=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"}]),rd=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"}]),id=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"}]),at=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"}]),Zi=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"}]),od=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"}]),cd=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"}]),ld=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"}]),ud=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"}]),md=l.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),dd=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"}]),pd=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"}]),ss=l.makeMessageType("streamlayer.interactive.QuestionAppearance",()=>[{no:1,name:"layout",kind:"enum",T:l.getEnumType(id)},{no:2,name:"images",kind:"enum",T:l.getEnumType(at)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:l.getEnumType(rd)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),Pn=l.makeMessageType("streamlayer.interactive.Sponsorship",()=>[{no:1,name:"logo",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),zt=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(Zi)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:l.getEnumType(at)}]),yd=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}]),fd=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}]),tn=l.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),gd=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}]),Td=l.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),hd=l.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),kd=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:hd}]),rs=l.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:Md,oneof:"options"},{no:2,name:"trivia",kind:"message",T:Id,oneof:"options"},{no:3,name:"prediction",kind:"message",T:Sd,oneof:"options"},{no:4,name:"factoid",kind:"message",T:Nd,oneof:"options"},{no:5,name:"tweet",kind:"message",T:Ad,oneof:"options"},{no:6,name:"promotion",kind:"message",T:bd,oneof:"options"}]),Md=l.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),Id=l.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:tn},{no:2,name:"incorrect_feedback",kind:"message",T:tn},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),Sd=l.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:tn},{no:2,name:"incorrect_feedback",kind:"message",T:tn}],{localName:"QuestionOptions_PredictionOptions"}),Nd=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:gd},{no:4,name:"web_link",kind:"message",T:Td}],{localName:"QuestionOptions_FactoidOptions"}),Ad=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:Ed}],{localName:"QuestionOptions_TweetOptions"}),Ed=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"}),bd=l.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(od)},{no:2,name:"sponsor",kind:"message",T:Pn},{no:3,name:"banner",kind:"message",T:kd},{no:4,name:"enable_wallet",kind:"enum",T:l.getEnumType(cd)}],{localName:"QuestionOptions_PromotionOptions"}),Dd=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}]),vd=l.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),Ki=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:rs},{no:5,name:"appearance",kind:"message",T:ss},{no:6,name:"sponsorship",kind:"message",T:Pn},{no:7,name:"notification",kind:"message",T:zt},{no:8,name:"answers",kind:"message",T:yd,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(nn)},{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:Dd,repeated:!0},{no:18,name:"bypass_notifications",kind:"message",T:cs},{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(sd)},{no:22,name:"ai",kind:"message",T:vd}]),is=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:rs},{no:5,name:"appearance",kind:"message",T:ss},{no:6,name:"sponsorship",kind:"message",T:Pn},{no:7,name:"notification",kind:"message",T:zt},{no:8,name:"answers",kind:"message",T:fd,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(nn)},{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:cs}]);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(nn)},{no:6,name:"options",kind:"message",T:rs},{no:7,name:"notification",kind:"message",T:zt}]);const Ji=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:Pn},{no:4,name:"onboarding_enabled",kind:"scalar",T:8},{no:5,name:"question",kind:"message",T:wd},{no:6,name:"sponsors",kind:"message",T:jd},{no:7,name:"notification",kind:"message",T:Rd},{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:Ld},{no:11,name:"bypass_notifications",kind:"message",T:cs},{no:12,name:"importer_collaboration",kind:"message",T:Gd}]),wd=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:ss},{no:2,name:"trivia",kind:"message",T:_d},{no:3,name:"prediction",kind:"message",T:Od},{no:4,name:"correct_feedbacks",kind:"message",T:tn,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:tn,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),_d=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),Od=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),jd=l.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:Pn,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),Rd=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(Zi)},{no:4,name:"image_mode",kind:"enum",T:l.getEnumType(at)}],{localName:"EventModeration_NotificationSettings"}),Ld=l.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:l.getEnumType(ld)},{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(ud)},{no:5,name:"start_options",kind:"message",T:xd}]),xd=l.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:Cd,oneof:"options"}]),Cd=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 os=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}]),Ud=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:zd},{no:3,name:"statistics",kind:"message",T:Pd,repeated:!0}]);const zd=l.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:l.getEnumType(nn)}],{localName:"QuestionStats_QuestionData"}),Pd=l.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:Bd}]),Bd=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 cs=l.makeMessageType("streamlayer.interactive.BypassNotifications",()=>[{no:1,name:"in_app_silence",kind:"enum",T:l.getEnumType(dd)}]),Fd=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(pd)},{no:3,name:"errors",kind:"message",T:Fd,repeated:!0},{no:4,name:"last_updated",kind:"message",T:Ae}]),Gd=l.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:Qd}}]),Hn=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"}]),Xi=l.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:Ki},{no:2,name:"notification",kind:"message",T:zt},{no:3,name:"moderation",kind:"message",T:Ji}]),Yd=l.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]),Vd=l.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:$d}]),$d=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:Xi}],{localName:"SubscriptionResponse_SubscriptionResponseData"}),qd=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]),Wd=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Hd}]),Hd=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:ls,repeated:!0}],{localName:"VotingSubscriptionResponse_VotingSubscriptionResponseData"}),Zd=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:is}]),Kd=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),Jd=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Xd}]),Xd=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:Zd}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),ep=l.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:is}]),np=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),tp=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:ap}]),ap=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:ep}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"}),sp=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:rp}]),rp=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"}),ip=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:op}]),op=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:Xi}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"}),cp=l.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),lp=l.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:up}]),up=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:Ki}],{localName:"GetQuestionResponse_GetQuestionResponseData"}),mp=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),dp=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:pp}]),pp=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:is}],{localName:"QuestionDetailResponse_QuestionDetailResponseData"}),ls=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}]),yp=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:fp}]),fp=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"}),gp=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:Tp}]),Tp=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:ls,repeated:!0}],{localName:"SubmitAnswerResponse_SubmitAnswerResponseData"}),hp=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:kp}]),kp=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"}),Mp=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]),Ip=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:Sp}]),Sp=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:l.getEnumType(md)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"}),Np=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Ap}]),Ap=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:ls,repeated:!0}],{localName:"SkipQuestionResponse_SkipQuestionResponseData"}),Ep=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:os}]),bp=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(Hn)},{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(nn)}]),Dp=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:vp,repeated:!0},{no:2,name:"meta",kind:"message",T:wp}]),vp=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:bp}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),wp=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"}),_p=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Op=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(at)}]),jp=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Rp,repeated:!0}]),Rp=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:Op}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"}),Lp=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),xp=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}]),Cp=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Up,repeated:!0}]),Up=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:xp}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),zp=l.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:Pp},{no:3,name:"moderation",kind:"message",T:Ji}]),Pp=l.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]),Bp=l.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Fp=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:zp}],{localName:"GetResponse_GetResponseData"}),Gp=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Yp=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}]),Vp=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:$p,repeated:!0}]),$p=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:Yp}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),qp=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}]),Wp=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}]),Hp=l.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),Zp=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:Wp},{no:6,name:"appearance",kind:"message",T:qp},{no:7,name:"prizes",kind:"message",T:Hp,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),Kp=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),Jp=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),Xp=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:Kp},{no:7,name:"appearance",kind:"message",T:Jp},{no:8,name:"completed",kind:"scalar",T:8}]),ey=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}]),ny=l.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:ey,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),ty=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}]),ay=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}]),sy=l.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:Zp},{no:2,name:"title_card",kind:"message",T:Xp},{no:3,name:"onboarding",kind:"message",T:ny},{no:4,name:"rules",kind:"message",T:ty},{no:5,name:"invite_card",kind:"message",T:ay},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),ry=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:tn,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:tn,repeated:!0}]),iy=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(at)}]),oy=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:Pn,repeated:!0}]),cy=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:ry},{no:2,name:"notifications",kind:"message",T:iy},{no:3,name:"sponsorships",kind:"message",T:oy}]),Xe=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"}]),ly=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"}]),uy=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"}]),us=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"}]),my=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"}]),eo=l.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),dy=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"}]),py=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"}]),yy=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 fy=l.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),gy=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(ly)}]),Ty=l.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),no=l.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:hy}]),hy=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"}),tr=l.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:gy,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(uy)},{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:Ty}]),ky=l.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(eo)},{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(us)}]),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(us)},{no:5,name:"is_default",kind:"enum",T:l.getEnumType(my)}]),My=l.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(eo)},{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(us)},{no:5,name:"default_channel",kind:"message",T:Et},{no:6,name:"channels",kind:"message",T:Et,repeated:!0}]),to=l.makeMessageType("streamlayer.sdkSettings.StreamSettings",()=>[{no:1,name:"overlays",kind:"message",T:Pt,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:no},{no:10,name:"getstream",kind:"message",T:My}]),Iy=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:Sy,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}]),Sy=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"}),ao=l.makeMessageType("streamlayer.sdkSettings.OrganizationSettings",()=>[{no:1,name:"overlays",kind:"message",T:Pt,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:no},{no:13,name:"pub",kind:"message",T:Iy},{no:14,name:"getstream",kind:"message",T:ky}]),Ny=l.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:sy},{no:2,name:"moderation",kind:"message",T:cy},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:l.getEnumType(dy)}]),ar=l.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:Et},{no:2,name:"channels",kind:"message",T:Et,repeated:!0}]),bn=l.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:fy,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:tr,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:tr,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:Ny,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:ar,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:ar,oneof:"overlay_settings"}]),Ay=l.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:bn},{no:2,name:"global_preset",kind:"message",T:bn},{no:3,name:"preset",kind:"message",T:bn},{no:4,name:"stream",kind:"message",T:bn}]),Pt=l.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(Xe)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:bn},{no:6,name:"meta",kind:"message",T:Ay},{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(Xe)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:bn},{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:Ey}]);const Ey=l.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse.OverlaysListResponseData",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:Pt,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:by}]);const by=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:Dy}]);const Dy=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:vy}]);const vy=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:_y},{no:3,name:"settings",kind:"message",T:wy}]);const wy=l.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:Pt,repeated:!0},{no:2,name:"advertising",kind:"message",T:so}]),_y=l.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:l.getEnumType(py)},{no:2,name:"value",kind:"scalar",T:9}]),Oy=l.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:sr},{no:2,name:"videos",kind:"message",T:sr}]),sr=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}]),jy=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:Oy}}]);l.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:jy,repeated:!0}]);const Ry=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(yy)}]),Ly=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}]),xy=l.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:Ry,repeated:!0},{no:3,name:"videos",kind:"message",T:Ly,repeated:!0}]),Cy=l.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:l.getEnumType(Xe)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:xy}},{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}]),so=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:Cy}}]);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:Uy}]);const Uy=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:zy}]);const zy=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:Py}]);const Py=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:By}]);const By=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"}),Fy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMTQuODA2MSA2LjczNjg0IDE2IDUuNjA1NzcgMTYgNC4yMTA1M1YyLjUyNjMyQzE2IDEuMTMxMDcgMTQuODA2MSAwIDEzLjMzMzMgMEgyLjY2NjY3Wk00LjQ0NDQ2IDEwLjk0NzNIMTMuMzMzM0MxMy44MjQzIDEwLjk0NzMgMTQuMjIyMiAxMS4zMjQzIDE0LjIyMjIgMTEuNzg5NFYxMy40NzM2QzE0LjIyMjIgMTMuOTM4NyAxMy44MjQzIDE0LjMxNTcgMTMuMzMzMyAxNC4zMTU3SDQuNDQ0NDZWMTAuOTQ3M1pNMCAxMS43ODk0QzAgMTAuMzk0MiAxLjE5MzkxIDkuMjYzMSAyLjY2NjY3IDkuMjYzMUgxMy4zMzMzQzE0LjgwNjEgOS4yNjMxIDE2IDEwLjM5NDIgMTYgMTEuNzg5NFYxMy40NzM2QzE2IDE0Ljg2ODkgMTQuODA2MSAxNS45OTk5IDEzLjMzMzMgMTUuOTk5OUgyLjY2NjY3QzEuMTkzOTEgMTUuOTk5OSAwIDE0Ljg2ODkgMCAxMy40NzM2VjExLjc4OTRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KPC9nPgo8L3N2Zz4K",Qy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1ByZWRpY2l0b24iPgo8cGF0aCBpZD0iSWNvbi9QcmVkaWN0aW9uIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE2IDcuMDA1MjJDMTYgNy4wMDUyMiA5LjIwMDQ4IDYuODE2MDcgOS4yMDA0OCAwQzkuMjAwNDggNi4zNjE2OCAzLjI3NzI5IDYuOTUwNTYgMi40ODc1NiA3LjAwMDc4TDIuNDAwOTQgNy4wMDUyMkMyLjQwMDk0IDcuMDA1MjIgOS4yMDA0OCA3LjE5NDM1IDkuMjAwNDggMTQuMDEwNEM5LjIwMDQ4IDcuNjQ4NzcgMTUuMTIzNCA3LjA1OTg5IDE1LjkxMzEgNy4wMDk2NEwxNiA3LjAwNTIyWk02Ljk3MzgyIDEyLjU2NTJDNi45NzM4MiAxMi41NjUyIDMuNDg2OTEgMTIuNDcyNCAzLjQ4NjkxIDkuMTMwMzNDMy40ODY5MSAxMi4yNDk2IDAuNDQ5NDAyIDEyLjUzODQgMC4wNDQ0MTg2IDEyLjU2M0wwIDEyLjU2NTJDMCAxMi41NjUyIDMuNDg2OTEgMTIuNjU3OSAzLjQ4NjkxIDE2QzMuNDg2OTEgMTIuODgwNyA2LjUyNDI5IDEyLjU5MiA2LjkyOTI3IDEyLjU2NzNMNi45NzM4MiAxMi41NjUyWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",Gy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1RyaXZpYSI+CjxwYXRoIGlkPSJOb3RpZmljYXRpb24vSWNvbi9Ucml2aWEiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi4wMTY2MyAxLjM4MDhDMC43Mzk5MTMgMS41NTU4NiAtMC4xNTMxNTMgMi43MzI3NiAwLjAyMTkxMiA0LjAwOTQ4TDEuMzgwOCAxMy45MTk2QzEuNTU1ODYgMTUuMTk2MyAyLjczMjc2IDE2LjA4OTQgNC4wMDk0OCAxNS45MTQzTDEzLjkxOTYgMTQuNTU1NEMxNS4xOTYzIDE0LjM4MDMgMTYuMDg5NCAxMy4yMDM0IDE1LjkxNDMgMTEuOTI2N0wxNC41NTU0IDIuMDE2NjNDMTQuMzgwMyAwLjczOTkxMyAxMy4yMDM0IC0wLjE1MzE1MyAxMS45MjY3IDAuMDIxOTEyTDIuMDE2NjMgMS4zODA4Wk05LjU5NjEzIDMuNzg4QzkuMTE0MzEgMy40Njk5MSA4LjQ3ODEzIDMuMzAxNTEgNy43NTY2IDMuMzAxNTFDNy41NDM3NyAzLjMwMTUxIDcuMzI2MjUgMy4zMTY3MSA3LjEwODcyIDMuMzQ0NzhDNi4zODgzNiAzLjQ0MDY3IDUuNjg5MDEgMy43OTAzNCA1LjE4OTY1IDQuMzAxMzhDNC42ODQ0NSA0LjgyMDYyIDQuNDM3NyA1LjQ1NTYzIDQuNTE3MjIgNi4wNDE1MUM0LjU3NDUyIDYuNDc0MiA0LjkwMDc4IDYuNzUzNyA1LjM0NjM1IDYuNzUzN0M1LjM5NDI5IDYuNzUzNyA1LjQ0MzQxIDYuNzUwMiA1LjQ5MTM2IDYuNzQ0MzVDNi4wODc3OCA2LjY2NDgzIDYuMjE2NDIgNi4yNTQzNiA2LjM0MDM2IDUuODU2NzVMNi4zNDA0NSA1Ljg1NjQ4QzYuNDgxOTIgNS40MDQwMSA2LjYxNTM0IDQuOTc3MzEgNy4zODU4NSA0Ljg3NDQ0QzcuNDY1MzcgNC44NjM5MSA3LjU0MTM4IDQuODU4MDYgNy42MTUwNiA0Ljg1ODA2QzguMTY5MzkgNC44NTgwNiA4LjUxNDM2IDUuMTUwNDIgOC41ODQ1NCA1LjY4MjUyQzguNjUzNTMgNi4yMDI5MyA4LjI0MzA3IDYuNjE4MDcgNy44MDY4NCA3LjA1NjZMNy44MDM5MyA3LjA1OTU0QzcuMzE1ODIgNy41NTIzMSA2Ljc2MzkgOC4xMDk1IDYuODY4OTUgOC45MDA4M0M2Ljg5NTg1IDkuMTA1NDggNi45ODU5IDkuMjk0OTMgNy4xMjI3MiA5LjQzNjQ0QzcuMjc4MjYgOS41OTkgNy40ODI5IDkuNjg0MzYgNy43MTMzMSA5LjY4NDM2QzcuNzU1NDEgOS42ODQzNiA3Ljc5ODY4IDkuNjgyMDMgNy44NDMxMSA5LjY3NjE4QzguNDY2OTEgOS41OTMyNCA4LjU1MTYyIDkuMjMxMzkgOC42MzMzOCA4Ljg4MjFMOC42MzM2NSA4Ljg4MDk3TDguNjM2NjEgOC44Njg1OUM4LjY2NzIzIDguNzQwMyA4LjY5ODc3IDguNjA4MTMgOC43NTk5NSA4LjQ4ODA0QzguODQ2NDkgOC4zMTYxMyA5LjA2MjgzIDguMTEyNjUgOS4zMTQyOCA3Ljg3ODc1QzkuOTE0MiA3LjMxODU4IDEwLjczNCA2LjU1MTQzIDEwLjU4MiA1LjQxNTg5QzEwLjQ4NzIgNC43MDYwMyAxMC4xNTUxIDQuMTU3NTcgOS41OTYxMSAzLjc4ODAyTDkuNTk2MTMgMy43ODhaTTguMTE2MDUgMTAuMjhDOC4wNjkyNyAxMC4yOCA4LjAyMTMyIDEwLjI4MzYgNy45NzQ1NCAxMC4yODk0QzcuMzgzOTYgMTAuMzY4OSA2Ljk2NzY1IDEwLjkxMjcgNy4wNDU5OSAxMS41MDMzQzcuMTE3MzMgMTIuMDM3NyA3LjU3ODA4IDEyLjQ0MTIgOC4xMTcyIDEyLjQ0MTJDOC4xNjM5NyAxMi40NDEyIDguMjExOTIgMTIuNDM3NyA4LjI1OTg3IDEyLjQzMThDOC44NTA0NSAxMi4zNTIzIDkuMjY1NiAxMS44MDg1IDkuMTg4NDIgMTEuMjE3OUM5LjExNTkxIDEwLjY4MjMgOC42NTUxNyAxMC4yOCA4LjExNjA1IDEwLjI4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",Yy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEzLjQzMTUgMy4xODI0Nkw1LjUzMzIxIDExLjA4MDhMMS45OTc3MSA3LjU0NTI3QzEuNTQwNTYgNy4wODgxMSAwLjc5OTkxMyA3LjA4ODExIDAuMzQyODY0IDcuNTQ1MjdDLTAuMTE0Mjg4IDguMDAyNDIgLTAuMTE0Mjg4IDguNzQzMDcgMC4zNDI4NjQgOS4yMDAxMUw0LjcwNTY3IDEzLjU2MjlDNC45MzMzMSAxMy43OTA2IDUuMjM0MTUgMTMuOTA2MyA1LjUzMzA3IDEzLjkwNjNDNS44MzIwMiAxMy45MDYzIDYuMTMwOTYgMTMuNzkyNCA2LjM2MDQ4IDEzLjU2MjlMMTUuMDg2MSA0LjgzNzMxQzE1LjU0MzIgNC4zODAxNiAxNS41NDMyIDMuNjM5NTEgMTUuMDg2MSAzLjE4MjQ2QzE0LjYyOSAyLjcyNTMxIDEzLjg4ODQgMi43MjUzMSAxMy40MzEyIDMuMTgyNDZIMTMuNDMxNVoiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",Vy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIyIiB5PSIwLjUwNjEwNCIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDIgMC41MDYxMDQpIiBmaWxsPSIjOWUwYTFmIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB4PSIwLjMzMzAwOCIgeT0iMTIuMTcyOSIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwLjMzMzAwOCAxMi4xNzI5KSIgZmlsbD0iIzllMGExZiIvPgo8L2c+Cjwvc3ZnPgo=",rr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const $y=A("div")({name:"Panel",class:"p1fl4kim",propsAsIs:!1}),qy=A("div")({name:"QuestionTypeIconWrap",class:"qqhwgfn",propsAsIs:!1}),Wy=A("img")({name:"QuestionTypeIcon",class:"q1lyf5nv",propsAsIs:!1}),Hy=A("div")({name:"QuestionContent",class:"qlmoky7",propsAsIs:!1}),Zy=A("div")({name:"QuestionTypeLabel",class:"qp1y7hu",propsAsIs:!1}),Ky=A("div")({name:"QuestionSubject",class:"q1de583k",propsAsIs:!1}),Jy=A("button")({name:"QuestionActionTitle",class:"ql7tvph",propsAsIs:!1}),Xy=A("button")({name:"QuestionActionIcon",class:"qh0ibjl",propsAsIs:!1}),ef=A("img")({name:"QuestionStatusIcon",class:"q1bdpn1b",propsAsIs:!1}),nf=A("span")({name:"QuestionTypeTitle",class:"q6tdooc",propsAsIs:!1}),tf=A("span")({name:"ExpiredQuestion",class:"e1f2al71",propsAsIs:!1}),af={[Ee.POLL]:{label:"Poll",icon:Fy},[Ee.TRIVIA]:{label:"Trivia",icon:Gy},[Ee.PREDICTION]:{label:"Prediction",icon:Qy}},sf={[Hn.LOST]:Vy,[Hn.WON]:Yy,[Hn.UNSET]:rr,[Hn.DNP]:rr},rf=({questionId:n,questionType:e,questionStatus:t,subject:a,openForVoting:s,openQuestion:r,status:i})=>{const c=af[e];return c===void 0?null:h.jsxs($y,{onClick:()=>r==null?void 0:r(n),children:[h.jsx(qy,{children:h.jsx(Wy,{alt:"question-type-icon",src:c.icon})}),h.jsxs(Hy,{children:[h.jsxs(Zy,{children:[h.jsx(nf,{children:c.label}),e===Ee.TRIVIA&&t===nn.RESOLVED&&h.jsx(tf,{children:"Expired"})]}),h.jsx(Ky,{children:a||""})]}),s?h.jsx(Jy,{children:"play"}):h.jsx(Xy,{children:h.jsx(ef,{alt:"question-status-icon",src:sf[i]})})]})};const of=A("div")({name:"Container",class:"c4iwna9",propsAsIs:!1}),cf=A("div")({name:"Title",class:"th1ieuk",propsAsIs:!1}),lf=A("div")({name:"ItemsContainer",class:"iiqbvdu",propsAsIs:!1}),uf=({questions:n,openQuestion:e})=>h.jsxs(of,{children:[h.jsx(cf,{children:"PICK HISTORY"}),h.jsx(lf,{children:n==null?void 0:n.map(t=>h.jsx(rf,{openQuestion:e,...t},t.questionId))})]}),mf="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0LjU1OTkyIDEwLjg0OTcgNC45NDY2MyAxMC4zOTUzIDUuMzQ3NjhDOS45NDEgNS43NDg3MiA5LjM3NDkgNi4wMTg0NyA4LjY5NzAxIDYuMTU2OTJDOS4wNTI3OCA1LjM4MzQ4IDkuMjMwNjYgNC40OTc4NiA5LjIzMDY2IDMuNTAwMDJIMTEuMDc2OFpNMTIgNC4xODc1VjMuMjcwODNDMTIgMy4wNzk4NiAxMS45MzI3IDIuOTE3NTQgMTEuNzk4MSAyLjc4Mzg1QzExLjY2MzUgMi42NTAxNyAxMS41IDIuNTgzMzMgMTEuMzA3NyAyLjU4MzMzSDkuMjMwNzdWMS44OTU4M0M5LjIzMDc3IDEuNTgwNzMgOS4xMTc3OSAxLjMxMDk4IDguODkxODMgMS4wODY1OUM4LjY2NTg2IDAuODYyMTk1IDguMzk0MjMgMC43NSA4LjA3NjkyIDAuNzVIMy45MjMwOEMzLjYwNTc3IDAuNzUgMy4zMzQxNCAwLjg2MjE5NSAzLjEwODE3IDEuMDg2NTlDMi44ODIyMSAxLjMxMDk4IDIuNzY5MjMgMS41ODA3MyAyLjc2OTIzIDEuODk1ODNWMi41ODMzM0gwLjY5MjMwOEMwLjQ5OTk5OSAyLjU4MzMzIDAuMzM2NTM5IDIuNjUwMTcgMC4yMDE5MjMgMi43ODM4NUMwLjA2NzMwNyAyLjkxNzU0IDAgMy4wNzk4NiAwIDMuMjcwODNWNC4xODc1QzAgNC41MjY0OCAwLjA5OTc1ODYgNC44Njc4NCAwLjI5OTI3OSA1LjIxMTU5QzAuNDk4Nzk5IDUuNTU1MzQgMC43NjgwMjcgNS44NjU2NyAxLjEwNjk3IDYuMTQyNThDMS40NDU5MiA2LjQxOTQ5IDEuODYxNzggNi42NTIyMyAyLjM1NDU3IDYuODQwODJDMi44NDczNiA3LjAyOTQxIDMuMzY1MzggNy4xMzU2MyAzLjkwODY1IDcuMTU5NTFDNC4xMTA1OCA3LjQxNzMyIDQuMzM4OTQgNy42NDQxIDQuNTkzNzUgNy44Mzk4NEM0Ljc3NjQ0IDguMDAyMTcgNC45MDI2NCA4LjE3NTI0IDQuOTcyMzYgOC4zNTkwNUM1LjA0MjA3IDguNTQyODYgNS4wNzY5MiA4Ljc1NjUxIDUuMDc2OTIgOUM1LjA3NjkyIDkuMjU3ODEgNS4wMDM2MSA5LjQ3NTA0IDQuODU2OTcgOS42NTE2OUM0LjcxMDM0IDkuODI4MzQgNC40NzU5NiA5LjkxNjY3IDQuMTUzODUgOS45MTY2N0MzLjc5MzI3IDkuOTE2NjcgMy40NzIzNiAxMC4wMjUzIDMuMTkxMTEgMTAuMjQyNUMyLjkwOTg1IDEwLjQ1OTcgMi43NjkyMyAxMC43MzMxIDIuNzY5MjMgMTEuMDYyNVYxMS41MjA4QzIuNzY5MjMgMTEuNTg3NyAyLjc5MDg3IDExLjY0MjYgMi44MzQxMyAxMS42ODU1QzIuODc3NCAxMS43Mjg1IDIuOTMyNjkgMTEuNzUgMyAxMS43NUg5QzkuMDY3MzEgMTEuNzUgOS4xMjI2IDExLjcyODUgOS4xNjU4NiAxMS42ODU1QzkuMjA5MTMgMTEuNjQyNiA5LjIzMDc3IDExLjU4NzcgOS4yMzA3NyAxMS41MjA4VjExLjA2MjVDOS4yMzA3NyAxMC43MzMxIDkuMDkwMTUgMTAuNDU5NyA4LjgwODg5IDEwLjI0MjVDOC41Mjc2NCAxMC4wMjUzIDguMjA2NzMgOS45MTY2NyA3Ljg0NjE1IDkuOTE2NjdDNy41MjQwNCA5LjkxNjY3IDcuMjg5NjYgOS44MjgzNCA3LjE0MzAzIDkuNjUxNjlDNi45OTYzOSA5LjQ3NTA0IDYuOTIzMDggOS4yNTc4MSA2LjkyMzA4IDlDNi45MjMwOCA4Ljc1NjUxIDYuOTU3OTMgOC41NDI4NiA3LjAyNzY0IDguMzU5MDVDNy4wOTczNiA4LjE3NTI0IDcuMjIzNTYgOC4wMDIxNyA3LjQwNjI1IDcuODM5ODRDNy42NjEwNiA3LjY0NDEgNy44ODk0MiA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",df=n=>n.split(/\s+/).map(e=>e[0]).join("").toUpperCase();const pf=A("div")({name:"Container",class:"c13i6lze",propsAsIs:!1}),yf=A("div")({name:"Indicator",class:"ix2bv9",propsAsIs:!1}),ut=({indicator:n,title:e})=>h.jsxs(pf,{children:[h.jsx(yf,{children:n}),h.jsx("p",{children:e})]});const ff=A("div")({name:"Container",class:"c5ghaaw",propsAsIs:!1}),gf=A("div")({name:"Title",class:"txfzjhj",propsAsIs:!1}),Tf=A("div")({name:"Indicator",class:"i1v0wmto",propsAsIs:!1}),ir=({indicator:n,title:e})=>h.jsxs(ff,{children:[h.jsx(gf,{children:e}),h.jsx(Tf,{children:n})]});const hf=A("div")({name:"Container",class:"canai20",propsAsIs:!1}),kf=A("div")({name:"TopInfo",class:"tda0d57",propsAsIs:!1}),Mf=A("div")({name:"BottomInfo",class:"boqy4xv",propsAsIs:!1}),If=A("div")({name:"User",class:"u1dtpq3t",propsAsIs:!1}),Sf=A("img")({name:"Avatar",class:"ar4jfc",propsAsIs:!1}),Nf=A("div")({name:"UserInfo",class:"u1trcvj0",propsAsIs:!1}),Af=A("div")({name:"UserName",class:"u1pie8mc",propsAsIs:!1}),Ef=A("div")({name:"UserRating",class:"ucsljfb",propsAsIs:!1}),bf=A("img")({name:"TrophyIcon",class:"tyemu1i",propsAsIs:!1}),Df=A("div")({name:"Rts",class:"rggn4k7",propsAsIs:!1}),vf=A("div")({name:"RtsIndicator",class:"rnmjsbm",propsAsIs:!1}),wf=A("div")({name:"Top",class:"t1i7e651",propsAsIs:!1}),_f=A("div")({name:"Ranks",class:"r1mt107z",propsAsIs:!1}),Of=A("div")({name:"AvatarPlaceholder",class:"apag0gc",propsAsIs:!1}),jf=A("button")({name:"UserAccountBtn",class:"uroanb5",propsAsIs:!1}),Rf=({avatar:n,name:e,points:t,grade:a,friendsRank:s,globalRank:r,winStreak:i,correct:c,incorrect:m,successRate:p})=>h.jsxs(hf,{children:[h.jsxs(kf,{children:[h.jsxs(If,{children:[h.jsxs(jf,{children:[n&&h.jsx(Sf,{alt:"avatar",src:n}),!n&&h.jsx(Of,{children:df(e)})]}),h.jsxs(Nf,{children:[h.jsx(Af,{children:e}),h.jsxs(Ef,{children:[h.jsx(bf,{alt:"rank-icon",src:mf}),h.jsxs(Df,{children:[h.jsx(vf,{children:t||"-"}),"RTS"]}),h.jsxs(wf,{children:["TOP ",a,"%"]})]})]})]}),h.jsxs(_f,{children:[h.jsx(ir,{title:"Friens rank",indicator:s||"-"}),h.jsx(ir,{title:"Global rank",indicator:r||"-"})]})]}),h.jsxs(Mf,{children:[h.jsx(ut,{indicator:i||"-",title:"Win streak"}),h.jsx(ut,{indicator:c||"-",title:"Correct"}),h.jsx(ut,{indicator:m||"-",title:"Incorrect"}),h.jsx(ut,{indicator:`${p||"-"}%`,title:"Success rate"})]})]}),Ua="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",Lf="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",or="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const ro=A("div")({name:"Container",class:"c4emhbe",propsAsIs:!1}),xf=()=>ro,Cf=A(xf())({name:"AnsweredContainer",class:"a1a18ay2",propsAsIs:!0}),cr=A("div")({name:"ButtonPct",class:"bvdmnzn",propsAsIs:!1}),lr=A("button")({name:"Button",class:"bz55cek",propsAsIs:!1}),ur=A("img")({name:"Icon",class:"i1u5zlvm",propsAsIs:!1}),mr=A("span")({name:"Title",class:"tfilm7j",propsAsIs:!1}),dr=A("span")({name:"Indicators",class:"iqdzfbw",propsAsIs:!1}),pr=A("div")({name:"CheckIconWrap",class:"ciu4mnt",propsAsIs:!1}),ia=A("div")({name:"Percentage",class:"pl06bzo",propsAsIs:!1}),yr=A("img")({name:"CheckIcon",class:"c5bwq34",propsAsIs:!1}),Uf=({icon:n,id:e,title:t,questionId:a,disabled:s,percentage:r,onVote:i,toggleIsLoadingSubmitAnswer:c,correct:m,questionAnswered:p,hasCorrectAnswer:y,answered:T,points:g,questionType:I})=>p&&T?h.jsxs(Cf,{"data-answeredCorrect":(!y||m).toString(),"data-questionAnswered":"false",children:[h.jsx(cr,{style:{width:`${r}%`}}),h.jsxs(lr,{disabled:s,onClick:()=>i(a,e),children:[n&&h.jsx(ur,{alt:"option-icon",src:n}),h.jsx(mr,{children:t}),h.jsxs(dr,{children:[y&&m&&h.jsx(pr,{children:h.jsx(yr,{alt:"icon-correct",src:T?or:Ua})}),h.jsxs(ia,{children:[r,"%"]})]})]})]}):h.jsxs(ro,{"data-questionAnswered":p.toString(),children:[p&&h.jsx(cr,{style:{width:`${r}%`}}),h.jsxs(lr,{disabled:s,onClick:()=>{c(!0),i(a,e)},children:[n&&h.jsx(ur,{alt:"option-icon",src:n}),h.jsx(mr,{children:t}),p?h.jsxs(dr,{children:[y&&m&&h.jsx(pr,{children:h.jsx(yr,{alt:"icon-correct",src:T?or:Ua})}),h.jsxs(ia,{children:[r,"%"]})]}):I===Ee.PREDICTION?h.jsxs(ia,{children:[g," pts"]}):null]})]});const zf=A("div")({name:"Container",class:"cgz6mxc",propsAsIs:!1}),Pf=A("div")({name:"Title",class:"ta6van7",propsAsIs:!1}),Bf=A("div")({name:"Options",class:"o1msgqq4",propsAsIs:!1}),Ff=A("div")({name:"Loader",class:"lq1mbhd",propsAsIs:!1}),Qf=A("div")({name:"Feedback",class:"f9kw2xt",propsAsIs:!1}),Gf=A("img")({name:"FeedbackIcon",class:"fn7neu6",propsAsIs:!1}),Yf=A("div")({name:"FeedbackTitle",class:"fpdq7m5",propsAsIs:!1}),Vf=A("div")({name:"FeedbackDescription",class:"f1ljy63t",propsAsIs:!1}),$f=({title:n,questionId:e,options:t,questionAnswered:a,feedbackMessages:s,questionAnsweredCorrectly:r,questionType:i})=>{const[c,m]=F.useState(!1),p=F.useCallback(y=>{m(y)},[m]);return F.useEffect(()=>{p(!1)},[t,p]),h.jsxs(zf,{children:[h.jsx(Pf,{children:n}),h.jsxs(Bf,{children:[c&&h.jsx(Ff,{children:"Loading..."}),t.map(y=>h.jsx(Uf,{toggleIsLoadingSubmitAnswer:p,questionId:e,questionType:i,...y},y.id))]}),a&&i===Ee.TRIVIA&&h.jsxs(Qf,{children:[h.jsx(Gf,{alt:"reaction-to-answer",src:r?Ua:Lf}),h.jsxs("div",{children:[h.jsx(Yf,{children:r?s.correctFeedback.title:s.incorrectFeedback.title}),h.jsx(Vf,{children:r?s.correctFeedback.description:s.incorrectFeedback.description})]})]})]})};class qf{}window.storeLogger=Object.create(null);class Bt{constructor(e,t){N(this,"store");N(this,"name");this.store=e,this.name=t}getStore(){return this.store}}const Wf=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 Kn extends Bt{constructor(){super(...arguments);N(this,"getValues",()=>this.getStore().get());N(this,"getValue",t=>this.getStore().get()[t]);N(this,"setValue",(t,a)=>this.getStore().setKey(t,a));N(this,"subscribe",(...t)=>this.getStore().subscribe(...t));N(this,"unsubscribe",()=>this.getStore().off())}}const Jn=n=>De.map(n);var Nn=(n=>(n.ORGANIZATION="ORGANIZATION",n.STREAM="STREAM",n))(Nn||{});const Hf={[Xe.BETTING]:"betting",[Xe.GAMES]:"games",[Xe.PUBLIC_CHAT]:"publicChat",[Xe.TWITTER]:"twitter"};var mn=(n=>(n.Ready="ready",n.Suspended="suspended",n))(mn||{});class io{constructor({settings:e,...t},a){N(this,"status");N(this,"source");N(this,"config");N(this,"settings");N(this,"listeners",new Set);N(this,"settingsKey");N(this,"enable",()=>{this.status.set("ready")});N(this,"disable",()=>{this.status.set("suspended")});N(this,"setFeatureConfig",({settings:e,...t})=>{let a;for(a in t)this.config.setValue(a,t[a]);if((e==null?void 0:e.overlaySettings.case)===this.settingsKey){const s=e.overlaySettings.value;if(s!==void 0){let r;for(r in s)console.log(r,s[r]),s[r]!==0&&s[r]!==""&&this.settings.setValue(r,s[r])}}});N(this,"update",(e,t)=>{this.source==="STREAM"&&t==="ORGANIZATION"||(this.setFeatureConfig(e),this.source=t)});this.settingsKey=Hf[t.type],this.status=De.atom("suspended"),this.config=new Kn(Jn(t),`feature:config:${this.settingsKey}`),this.settingsKey!==void 0&&(e==null?void 0:e.overlaySettings.case)===this.settingsKey?this.settings=new Kn(Jn(e.overlaySettings.value),`feature:settings:${this.settingsKey}`):this.settings=new Kn(Jn({}),`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 ve extends Bt{constructor(){super(...arguments);N(this,"getValue",()=>this.getStore().get());N(this,"setValue",t=>this.getStore().set(t));N(this,"subscribe",t=>this.getStore().subscribe(t));N(this,"unsubscribe",()=>this.getStore().off())}getValues(){throw new Error("not implemented")}listen(t){return this.getStore().listen(t)}get(){return this.getStore().get()}}const we=n=>De.atom(n),Zf=(n,e)=>De.computed(n,e);class xe extends Bt{constructor(t,a,s){super(t,`api:${a}`);N(this,"atomStore");N(this,"getAtomStore",()=>this.atomStore);N(this,"getValue",async()=>{const t=this.getStore();if(t.value===void 0)throw new Error("no store");return await t.value.promise,t.get().data});N(this,"getValues",()=>{throw new Error("not implemented")});N(this,"setValue",t=>this.getStore().set({loading:!1,data:t==null?void 0:t.data}));N(this,"subscribe",t=>this.getStore().subscribe(t));N(this,"unsubscribe",()=>{throw new Error("not implemented")});N(this,"invalidate",()=>{this.store.invalidate()});N(this,"listen",t=>this.getStore().listen(t));N(this,"key",()=>this.getStore().key);N(this,"off",()=>this.getStore().off());this.atomStore=De.atom(),s&&t.subscribe(r=>{this.atomStore.set(s(r))})}get(){throw new Error("not implemented")}}function fe(n){return typeof n=="function"}function Kf(n){return fe(n==null?void 0:n.lift)}function Bn(n){return function(e){if(Kf(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 za=function(n,e){return za=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])},za(n,e)};function rn(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");za(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Jf(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 c(y){try{p(a.next(y))}catch(T){i(T)}}function m(y){try{p(a.throw(y))}catch(T){i(T)}}function p(y){y.done?r(y.value):s(y.value).then(c,m)}p((a=a.apply(n,e||[])).next())})}function oo(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:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(p){return function(y){return m([p,y])}}function m(p){if(a)throw new TypeError("Generator is already executing.");for(;i&&(i=0,p[0]&&(t=0)),t;)try{if(a=1,s&&(r=p[0]&2?s.return:p[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,p[1])).done)return r;switch(s=0,r&&(p=[p[0]&2,r.value]),p[0]){case 0:case 1:r=p;break;case 4:return t.label++,{value:p[1],done:!1};case 5:t.label++,s=p[1],p=[0];continue;case 7:p=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(p[0]===6||p[0]===2)){t=0;continue}if(p[0]===3&&(!r||p[1]>r[0]&&p[1]<r[3])){t.label=p[1];break}if(p[0]===6&&t.label<r[1]){t.label=r[1],r=p;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(p);break}r[2]&&t.ops.pop(),t.trys.pop();continue}p=e.call(n,t)}catch(y){p=[6,y],s=0}finally{a=r=0}if(p[0]&5)throw p[1];return{value:p[0]?p[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 Ln(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(c){i={error:c}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(i)throw i.error}}return r}function xn(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 wn(n){return this instanceof wn?(this.v=n,this):new wn(n)}function Xf(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(g){a[g]&&(s[g]=function(I){return new Promise(function(E,D){r.push([g,I,E,D])>1||c(g,I)})})}function c(g,I){try{m(a[g](I))}catch(E){T(r[0][3],E)}}function m(g){g.value instanceof wn?Promise.resolve(g.value.v).then(p,y):T(r[0][2],g)}function p(g){c("next",g)}function y(g){c("throw",g)}function T(g,I){g(I),r.shift(),r.length&&c(r[0][0],r[0][1])}}function eg(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(c,m){i=n[r](i),s(c,m,i.done,i.value)})}}function s(r,i,c,m){Promise.resolve(m).then(function(p){r({value:p,done:c})},i)}}var co=function(n){return n&&typeof n.length=="number"&&typeof n!="function"};function lo(n){return fe(n==null?void 0:n.then)}function uo(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 oa=uo(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 st=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 c=Rn(i),m=c.next();!m.done;m=c.next()){var p=m.value;p.remove(this)}}catch(D){e={error:D}}finally{try{m&&!m.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}else i.remove(this);var y=this.initialTeardown;if(fe(y))try{y()}catch(D){r=D instanceof oa?D.errors:[D]}var T=this._finalizers;if(T){this._finalizers=null;try{for(var g=Rn(T),I=g.next();!I.done;I=g.next()){var E=I.value;try{fr(E)}catch(D){r=r??[],D instanceof oa?r=xn(xn([],Ln(r)),Ln(D.errors)):r.push(D)}}}catch(D){a={error:D}}finally{try{I&&!I.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}}if(r)throw new oa(r)}},n.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)fr(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}(),mo=st.EMPTY;function po(n){return n instanceof st||n&&"closed"in n&&fe(n.remove)&&fe(n.add)&&fe(n.unsubscribe)}function fr(n){fe(n)?n():n.unsubscribe()}var yo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Pa={setTimeout:function(n,e){for(var t=[],a=2;a<arguments.length;a++)t[a-2]=arguments[a];var s=Pa.delegate;return s!=null&&s.setTimeout?s.setTimeout.apply(s,xn([n,e],Ln(t))):setTimeout.apply(void 0,xn([n,e],Ln(t)))},clearTimeout:function(n){var e=Pa.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(n)},delegate:void 0};function fo(n){Pa.setTimeout(function(){throw n})}function Ba(){}function ht(n){n()}var ms=function(n){rn(e,n);function e(t){var a=n.call(this)||this;return a.isStopped=!1,t?(a.destination=t,po(t)&&t.add(a)):a.destination=sg,a}return e.create=function(t,a,s){return new Fa(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}(st),ng=Function.prototype.bind;function ca(n,e){return ng.call(n,e)}var tg=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){mt(a)}},n.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(a){mt(a)}else mt(e)},n.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){mt(t)}},n}(),Fa=function(n){rn(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 c;r&&yo.useDeprecatedNextContext?(c=Object.create(t),c.unsubscribe=function(){return r.unsubscribe()},i={next:t.next&&ca(t.next,c),error:t.error&&ca(t.error,c),complete:t.complete&&ca(t.complete,c)}):i=t}return r.destination=new tg(i),r}return e}(ms);function mt(n){fo(n)}function ag(n){throw n}var sg={closed:!0,next:Ba,error:ag,complete:Ba},ds=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function go(n){return n}function rg(n){return n.length===0?go:n.length===1?n[0]:function(t){return n.reduce(function(a,s){return s(a)},t)}}var _e=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=og(e)?e:new Fa(e,t,a);return ht(function(){var i=s,c=i.operator,m=i.source;r.add(c?c.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=gr(t),new t(function(s,r){var i=new Fa({next:function(c){try{e(c)}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[ds]=function(){return this},n.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return rg(e)(this)},n.prototype.toPromise=function(e){var t=this;return e=gr(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 gr(n){var e;return(e=n??yo.Promise)!==null&&e!==void 0?e:Promise}function ig(n){return n&&fe(n.next)&&fe(n.error)&&fe(n.complete)}function og(n){return n&&n instanceof ms||ig(n)&&po(n)}function To(n){return fe(n[ds])}function ho(n){return Symbol.asyncIterator&&fe(n==null?void 0:n[Symbol.asyncIterator])}function ko(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 cg(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Mo=cg();function Io(n){return fe(n==null?void 0:n[Mo])}function So(n){return Xf(this,arguments,function(){var t,a,s,r;return oo(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,wn(t.read())];case 3:return a=i.sent(),s=a.value,r=a.done,r?[4,wn(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,wn(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 No(n){return fe(n==null?void 0:n.getReader)}function Fn(n){if(n instanceof _e)return n;if(n!=null){if(To(n))return lg(n);if(co(n))return ug(n);if(lo(n))return mg(n);if(ho(n))return Ao(n);if(Io(n))return dg(n);if(No(n))return pg(n)}throw ko(n)}function lg(n){return new _e(function(e){var t=n[ds]();if(fe(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function ug(n){return new _e(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function mg(n){return new _e(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,fo)})}function dg(n){return new _e(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(c){t={error:c}}finally{try{r&&!r.done&&(a=s.return)&&a.call(s)}finally{if(t)throw t.error}}e.complete()})}function Ao(n){return new _e(function(e){yg(n,e).catch(function(t){return e.error(t)})})}function pg(n){return Ao(So(n))}function yg(n,e){var t,a,s,r;return Jf(this,void 0,void 0,function(){var i,c;return oo(this,function(m){switch(m.label){case 0:m.trys.push([0,5,6,11]),t=eg(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 c=m.sent(),s={error:c},[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 Cn(n,e,t,a,s){return new fg(n,e,t,a,s)}var fg=function(n){rn(e,n);function e(t,a,s,r,i,c){var m=n.call(this,t)||this;return m.onFinalize=i,m.shouldUnsubscribe=c,m._next=a?function(p){try{a(p)}catch(y){t.error(y)}}:n.prototype._next,m._error=r?function(p){try{r(p)}catch(y){t.error(y)}finally{this.unsubscribe()}}:n.prototype._error,m._complete=s?function(){try{s()}catch(p){t.error(p)}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}(ms),gg=function(n){rn(e,n);function e(t,a){return n.call(this)||this}return e.prototype.schedule=function(t,a){return this},e}(st),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,xn([n,e],Ln(t))):setInterval.apply(void 0,xn([n,e],Ln(t)))},clearInterval:function(n){var e=Dt.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(n)},delegate:void 0},Tg=function(n){rn(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}(gg),Eo={now:function(){return(Eo.delegate||Date).now()},delegate:void 0},Tr=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=Eo.now,n}(),hg=function(n){rn(e,n);function e(t,a){a===void 0&&(a=Tr.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}(Tr),bo=new hg(Tg),kg=bo;function Do(n){return n&&fe(n.schedule)}function Mg(n){return n instanceof Date&&!isNaN(n)}function Ig(n,e,t){n===void 0&&(n=0),t===void 0&&(t=kg);var a=-1;return e!=null&&(Do(e)?t=e:a=e),new _e(function(s){var r=Mg(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 Sg(n){return n[n.length-1]}function vo(n){return Do(Sg(n))?n.pop():void 0}function en(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 wo(n,e){return e===void 0&&(e=0),Bn(function(t,a){t.subscribe(Cn(a,function(s){return en(a,n,function(){return a.next(s)},e)},function(){return en(a,n,function(){return a.complete()},e)},function(s){return en(a,n,function(){return a.error(s)},e)}))})}function _o(n,e){return e===void 0&&(e=0),Bn(function(t,a){a.add(n.schedule(function(){return t.subscribe(a)},e))})}function Ng(n,e){return Fn(n).pipe(_o(e),wo(e))}function Ag(n,e){return Fn(n).pipe(_o(e),wo(e))}function Eg(n,e){return new _e(function(t){var a=0;return e.schedule(function(){a===n.length?t.complete():(t.next(n[a++]),t.closed||this.schedule())})})}function bg(n,e){return new _e(function(t){var a;return en(t,e,function(){a=n[Mo](),en(t,e,function(){var s,r,i;try{s=a.next(),r=s.value,i=s.done}catch(c){t.error(c);return}i?t.complete():t.next(r)},0,!0)}),function(){return fe(a==null?void 0:a.return)&&a.return()}})}function Oo(n,e){if(!n)throw new Error("Iterable cannot be null");return new _e(function(t){en(t,e,function(){var a=n[Symbol.asyncIterator]();en(t,e,function(){a.next().then(function(s){s.done?t.complete():t.next(s.value)})},0,!0)})})}function Dg(n,e){return Oo(So(n),e)}function vg(n,e){if(n!=null){if(To(n))return Ng(n,e);if(co(n))return Eg(n,e);if(lo(n))return Ag(n,e);if(ho(n))return Oo(n,e);if(Io(n))return bg(n,e);if(No(n))return Dg(n,e)}throw ko(n)}function jo(n,e){return e?vg(n,e):Fn(n)}function Ro(n,e){return Bn(function(t,a){var s=0;t.subscribe(Cn(a,function(r){a.next(n.call(e,r,s++))}))})}function wg(n,e,t,a,s,r,i,c){var m=[],p=0,y=0,T=!1,g=function(){T&&!m.length&&!p&&e.complete()},I=function(D){return p<a?E(D):m.push(D)},E=function(D){r&&e.next(D),p++;var R=!1;Fn(t(D,y++)).subscribe(Cn(e,function(O){s==null||s(O),r?I(O):e.next(O)},function(){R=!0},void 0,function(){if(R)try{p--;for(var O=function(){var L=m.shift();i?en(e,i,function(){return E(L)}):E(L)};m.length&&p<a;)O();g()}catch(L){e.error(L)}}))};return n.subscribe(Cn(e,I,function(){T=!0,g()})),function(){c==null||c()}}function Ft(n,e,t){return t===void 0&&(t=1/0),fe(e)?Ft(function(a,s){return Ro(function(r,i){return e(a,r,s,i)})(Fn(n(a,s)))},t):(typeof e=="number"&&(t=e),Bn(function(a,s){return wg(a,s,n,t)}))}function _g(n){return n===void 0&&(n=1/0),Ft(go,n)}function Og(){return _g(1)}var jg=uo(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Lo=function(n){rn(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 hr(this,this);return a.operator=t,a},e.prototype._throwIfClosed=function(){if(this.closed)throw new jg},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),c=i.next();!c.done;c=i.next()){var m=c.value;m.next(t)}}catch(p){s={error:p}}finally{try{c&&!c.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,c=s.observers;return r||i?mo:(this.currentObservers=null,c.push(t),new st(function(){a.currentObservers=null,bt(c,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 _e;return t.source=this,t},e.create=function(t,a){return new hr(t,a)},e}(_e),hr=function(n){rn(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:mo},e}(Lo);function Rg(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return Og()(jo(n,vo(n)))}var Lg=new _e(function(n){return n.complete()});function kr(n){return n<=0?function(){return Lg}:Bn(function(e,t){var a=0;e.subscribe(Cn(t,function(s){++a<=n&&(t.next(s),n<=a&&t.complete())}))})}function xg(){return Bn(function(n,e){n.subscribe(Cn(e,Ba))})}function Cg(n){return Ro(function(){return n})}function xo(n,e){return e?function(t){return Rg(e.pipe(kr(1),xg()),t.pipe(xo(n)))}:Ft(function(t,a){return Fn(n(t,a)).pipe(kr(1),Cg(t))})}function Ug(n,e){e===void 0&&(e=bo);var t=Ig(n,e);return xo(function(){return t})}function zg(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=vo(n);return jo(n,t)}class Pg{constructor(e,t){N(this,"scheduler");N(this,"displayQueue");N(this,"handlers");N(this,"addToQueue",e=>{this.scheduler.next(e)});N(this,"tick",e=>(this.handlers.onAdd(e),zg(e).pipe(Ug(e.delay||0))));N(this,"subscribe",()=>{this.displayQueue.subscribe(this.handlers.onOut)});this.handlers=t,this.scheduler=new Lo,this.displayQueue=this.scheduler.pipe(Ft(this.tick,e.concurrency)),this.subscribe()}}let Bg=class{constructor(){N(this,"queue");N(this,"queueList");N(this,"displayQueue");N(this,"add",e=>{if(this.isNewNotify(e.id)){const t=e.close,a=e.action;e.close=(...s)=>{t&&t(s),this.hideNotification(e)},e.action=(...s)=>{a&&a(s),this.hideNotification(e)},this.displayQueue.addToQueue(e)}else console.log("skip notification:",e)});N(this,"showNotification",e=>{const t=new Map(this.queue.getValue());t.set(e.id,e),this.queue.setValue(t)});N(this,"hideNotification",e=>{const t=new Map(this.queue.getValue());t.delete(e.id),this.queue.setValue(t)});N(this,"getQueueStore",()=>this.queueList);N(this,"isNewNotify",e=>{const t=localStorage.getItem(`opened:${e}`);return t?!t:!(this.queue.getValue()||new Map).has(e)});N(this,"markAsViewed",e=>{localStorage.setItem(`opened:${e}`,e)});this.queue=new ve(we(new Map),"notifications-queue"),this.displayQueue=new Pg({concurrency:1},{onAdd:this.showNotification,onOut:this.hideNotification}),this.queueList=Zf(this.queue.getStore(),e=>e?[...e.values()]:[])}};const Fg=(n,e,t)=>{n.notifications=new Bg,n.addNotification=n.notifications.add,n.sdk.getNotificationsStore=()=>n.notifications.getQueueStore(),t()},Qg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=";const Gg=A("div")({name:"Container",class:"c1ul2v99",propsAsIs:!1}),Yg=A("div")({name:"BackgroundBlock",class:"bk6opdu",propsAsIs:!1}),Vg=A("img")({name:"Icon",class:"i120vbip",propsAsIs:!1}),$g=A("div")({name:"ContentWrap",class:"c9vc70l",propsAsIs:!1}),qg=A("img")({name:"SponsorLogo",class:"s12vky1e",propsAsIs:!1}),Wg=A("span")({name:"SponsorText",class:"s1uwi25b",propsAsIs:!1}),Hg=A("div")({name:"ContentTitle",class:"c19y9gzk",propsAsIs:!1}),Zg=A("div")({name:"ContentSubtitle",class:"c1bzwyj2",propsAsIs:!1}),Kg=A("button")({name:"ActionBtn",class:"au6cp8o",propsAsIs:!1}),Jg=A("button")({name:"CloseBtn",class:"c8545uy",propsAsIs:!1}),Xg=A("img")({name:"IconClose",class:"iqjineo",propsAsIs:!1}),eT=({onClose:n,onPlay:e,header:t,title:a,subtitle:s,graphicBg:r,icon:i,sponsorLogo:c})=>h.jsxs(Gg,{children:[h.jsx(Jg,{onClick:n,children:h.jsx(Xg,{alt:"icon-close-onboarding-inapp",src:Qg})}),h.jsx(Yg,{style:{backgroundImage:`url(${r||""})`},children:i&&h.jsx(Vg,{alt:"onboarding-inapp-icon",src:i})}),h.jsxs($g,{children:[h.jsxs("div",{children:[h.jsx("div",{children:c?h.jsxs(h.Fragment,{children:[h.jsx(qg,{alt:"sponsor-logo",src:c}),h.jsx(Wg,{children:"Presents"})]}):t||""}),h.jsx(Hg,{children:a||""}),h.jsx(Zg,{children:s||""})]}),h.jsx(Kg,{onClick:e,children:"Play"})]})]}),nT=({sdk:n})=>{const e=n.getNotificationsStore(),t=Ce.useStore(e);return t==null?void 0:t.map(a=>{var s,r;return a&&a.type==="_onboarding"?h.jsx(eT,{onClose:()=>{var i;n.closeFeature(),(i=a==null?void 0:a.close)==null||i.call(a)},onPlay:()=>{var i;n.openFeature("games"),(i=a==null?void 0:a.action)==null||i.call(a)},...a.data},a.id):!((s=a==null?void 0:a.data)!=null&&s.question)||!((r=a==null?void 0:a.data)!=null&&r.notification)?null:h.jsx(nl,{openVoiting:()=>{var i;(i=a==null?void 0:a.action)==null||i.call(a)},closeInApp:()=>{var i;(i=a==null?void 0:a.close)==null||i.call(a)},title:a.data.notification.title,icon:a.data.notification.image,color:a.data.notification.indicatorColor},a.id)})},tT=({store:n})=>{var t;const{data:e}=Ce.useStore(n);return e!=null&&e.summary?h.jsx(Rf,{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}):h.jsx("div",{children:"wait user..."})},aT=({store:n,openQuestion:e})=>{const{data:t}=Ce.useStore(n);return t?h.jsx(uf,{openQuestion:e,questions:t}):h.jsx("div",{children:"wait questions..."})},sT="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDUuMzgzNDggMy4zMDI4MiA2LjE1NjkyQzIuNjI0OTMgNi4wMTg0NyAyLjA1ODgzIDUuNzQ4NzIgMS42MDQ1IDUuMzQ3NjhDMS4xNTAxNyA0Ljk0NjYzIDAuOTIzMDA4IDQuNTU5OTIgMC45MjMwMDggNC4xODc1MlYzLjUwMDAySDIuNzY5MTZaTTExLjA3NjggMy41MDAwMlY0LjE4NzUyQzExLjA3NjggNC41NTk5MiAxMC44NDk3IDQuOTQ2NjMgMTAuMzk1MyA1LjM0NzY4QzkuOTQxIDUuNzQ4NzIgOS4zNzQ5IDYuMDE4NDcgOC42OTcwMSA2LjE1NjkyQzkuMDUyNzggNS4zODM0OCA5LjIzMDY2IDQuNDk3ODYgOS4yMzA2NiAzLjUwMDAySDExLjA3NjhaTTEyIDQuMTg3NVYzLjI3MDgzQzEyIDMuMDc5ODYgMTEuOTMyNyAyLjkxNzU0IDExLjc5ODEgMi43ODM4NUMxMS42NjM1IDIuNjUwMTcgMTEuNSAyLjU4MzMzIDExLjMwNzcgMi41ODMzM0g5LjIzMDc3VjEuODk1ODNDOS4yMzA3NyAxLjU4MDczIDkuMTE3NzkgMS4zMTA5OCA4Ljg5MTgzIDEuMDg2NTlDOC42NjU4NiAwLjg2MjE5NSA4LjM5NDIzIDAuNzUgOC4wNzY5MiAwLjc1SDMuOTIzMDhDMy42MDU3NyAwLjc1IDMuMzM0MTQgMC44NjIxOTUgMy4xMDgxNyAxLjA4NjU5QzIuODgyMjEgMS4zMTA5OCAyLjc2OTIzIDEuNTgwNzMgMi43NjkyMyAxLjg5NTgzVjIuNTgzMzNIMC42OTIzMDhDMC40OTk5OTkgMi41ODMzMyAwLjMzNjUzOSAyLjY1MDE3IDAuMjAxOTIzIDIuNzgzODVDMC4wNjczMDcgMi45MTc1NCAwIDMuMDc5ODYgMCAzLjI3MDgzVjQuMTg3NUMwIDQuNTI2NDggMC4wOTk3NTg2IDQuODY3ODQgMC4yOTkyNzkgNS4yMTE1OUMwLjQ5ODc5OSA1LjU1NTM0IDAuNzY4MDI3IDUuODY1NjcgMS4xMDY5NyA2LjE0MjU4QzEuNDQ1OTIgNi40MTk0OSAxLjg2MTc4IDYuNjUyMjMgMi4zNTQ1NyA2Ljg0MDgyQzIuODQ3MzYgNy4wMjk0MSAzLjM2NTM4IDcuMTM1NjMgMy45MDg2NSA3LjE1OTUxQzQuMTEwNTggNy40MTczMiA0LjMzODk0IDcuNjQ0MSA0LjU5Mzc1IDcuODM5ODRDNC43NzY0NCA4LjAwMjE3IDQuOTAyNjQgOC4xNzUyNCA0Ljk3MjM2IDguMzU5MDVDNS4wNDIwNyA4LjU0Mjg2IDUuMDc2OTIgOC43NTY1MSA1LjA3NjkyIDlDNS4wNzY5MiA5LjI1NzgxIDUuMDAzNjEgOS40NzUwNCA0Ljg1Njk3IDkuNjUxNjlDNC43MTAzNCA5LjgyODM0IDQuNDc1OTYgOS45MTY2NyA0LjE1Mzg1IDkuOTE2NjdDMy43OTMyNyA5LjkxNjY3IDMuNDcyMzYgMTAuMDI1MyAzLjE5MTExIDEwLjI0MjVDMi45MDk4NSAxMC40NTk3IDIuNzY5MjMgMTAuNzMzMSAyLjc2OTIzIDExLjA2MjVWMTEuNTIwOEMyLjc2OTIzIDExLjU4NzcgMi43OTA4NyAxMS42NDI2IDIuODM0MTMgMTEuNjg1NUMyLjg3NzQgMTEuNzI4NSAyLjkzMjY5IDExLjc1IDMgMTEuNzVIOUM5LjA2NzMxIDExLjc1IDkuMTIyNiAxMS43Mjg1IDkuMTY1ODYgMTEuNjg1NUM5LjIwOTEzIDExLjY0MjYgOS4yMzA3NyAxMS41ODc3IDkuMjMwNzcgMTEuNTIwOFYxMS4wNjI1QzkuMjMwNzcgMTAuNzMzMSA5LjA5MDE1IDEwLjQ1OTcgOC44MDg4OSAxMC4yNDI1QzguNTI3NjQgMTAuMDI1MyA4LjIwNjczIDkuOTE2NjcgNy44NDYxNSA5LjkxNjY3QzcuNTI0MDQgOS45MTY2NyA3LjI4OTY2IDkuODI4MzQgNy4xNDMwMyA5LjY1MTY5QzYuOTk2MzkgOS40NzUwNCA2LjkyMzA4IDkuMjU3ODEgNi45MjMwOCA5QzYuOTIzMDggOC43NTY1MSA2Ljk1NzkzIDguNTQyODYgNy4wMjc2NCA4LjM1OTA1QzcuMDk3MzYgOC4xNzUyNCA3LjIyMzU2IDguMDAyMTcgNy40MDYyNSA3LjgzOTg0QzcuNjYxMDYgNy42NDQxIDcuODg5NDIgNy40MTczMiA4LjA5MTM1IDcuMTU5NTFDOC42MzQ2MiA3LjEzNTYzIDkuMTUyNjQgNy4wMjk0MSA5LjY0NTQzIDYuODQwODJDMTAuMTM4MiA2LjY1MjIzIDEwLjU1NDEgNi40MTk0OSAxMC44OTMgNi4xNDI1OEMxMS4yMzIgNS44NjU2NyAxMS41MDEyIDUuNTU1MzQgMTEuNzAwNyA1LjIxMTU5QzExLjkwMDIgNC44Njc4NCAxMiA0LjUyNjQ4IDEyIDQuMTg3NVpNNS4wNzAzMyA1LjM4NDkxTDYuMDM4MyA0Ljg3NTAzTDcuMDA2MjcgNS4zODQ5MUw2LjgyMTQgNC4zMDQ5N0w3LjYwNDUxIDMuNTQwMTZMNi41MjIyOCAzLjM4MjZMNi4wMzgzIDIuNDAwMDNMNS41NTQzMSAzLjM4MjZMNC40NzIwOSAzLjU0MDE2TDUuMjU1MTkgNC4zMDQ5N0w1LjA3MDMzIDUuMzg0OTFaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogIDwvc3ZnPgo=",rT="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDIyIDIyIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik01LjUgMi43ODg2N1YxMi40MTM3QzUuNSAxMy4xNzI5IDQuODg0MjYgMTMuNzUgNC4xMjUgMTMuNzVIMS4zNzVDMC42MTU3NDIgMTMuNzUgMCAxMy4xMzQzIDAgMTIuNDEzN1YyLjgyNzM0QzAgMi4wNjgwOCAwLjYxNTc0MiAxLjQ5MTAyIDEuMzc1IDEuNDkxMDJINC4xMjVDNC44ODU1NSAxLjQxMzY3IDUuNSAxLjk5Mzc1IDUuNSAyLjc4ODY3Wk0yMiAxMi4zNzA3QzIyIDEzLjUwOTQgMjEuMDc3IDE0LjQzMjMgMTkuOTM3NSAxNC40MzIzSDEzLjY0MjZDMTQuNjIxIDE2LjA2MTMgMTUuMTI1OSAxNy45MDc3IDE1LjEyNTkgMTguNTU4MkMxNS4xMjUgMTkuNTcxNCAxNC4zMzAxIDIwLjYyNSAxMi45OTggMjAuNjI1QzEwLjI4NTQgMjAuNjI1IDExLjg2NTQgMTcuMzUyOSA4LjM0ODgzIDE0LjU0MDZMNy42NDg0NCAxMy45ODJDNy4xNDE0MSAxMy41NzM4IDYuODgzNTkgMTIuOTc2NiA2Ljg3OTMgMTIuMzc1QzYuODc4MjkgMTIuMzc0IDYuODc5MyAxMi4zNzUgNi44NzkzIDEyLjM3NUw2Ljg3NSA1LjVDNi44NzUgNC44NTExNyA3LjE4MDY0IDQuMjM5NzMgNy43IDMuODUwNDNMOS4xNjY5NSAyLjc1MDg2QzEwLjM1NTUgMS44NTYyNSAxMS44MDM1IDEuMzc1IDEzLjI5MDIgMS4zNzVIMTUuODEyNUMxNi45NTIgMS4zNzUgMTcuODc1IDIuMjk3NTQgMTcuODc1IDMuNDM2NjRDMTcuODc1IDMuNTkyODMgMTcuODU0NCAzLjc0MzU3IDE3LjgyMTUgMy44ODk5NkMxOC42NDg0IDQuMTU5MzcgMTkuMjUgNC45MjQyMiAxOS4yNSA1Ljg0Mzc1QzE5LjI1IDYuMjM2ODMgMTkuMTM0MSA2LjYwMDQzIDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=";const iT=A("div")({name:"Container",class:"c1ibttgl",propsAsIs:!1}),oT=A("img")({name:"Logo",class:"l16el447",propsAsIs:!1}),cT=A("div")({name:"RightBlock",class:"rb3jndy",propsAsIs:!1}),lT=A("button")({name:"ExitBtn",class:"e162i9w9",propsAsIs:!1}),uT=A("img")({name:"ExitIcon",class:"e1uh0tpp",propsAsIs:!1}),mT=A("div")({name:"Interactive",class:"i13726cq",propsAsIs:!1}),dT=()=>n=>n.isSuccess?"#f1be1c":"#da3732",Mr=A("div")({name:"ReactionIconWrap",class:"r1weckaj",propsAsIs:!1,vars:{"r1weckaj-0":[dT()]}}),Ir=A("img")({name:"ReactionIcon",class:"r1u8ekkw",propsAsIs:!1});const pT=A("div")({name:"Container",class:"c1kt0nvm",propsAsIs:!1}),yT=A("div")({name:"Title",class:"tavk3hk",propsAsIs:!1}),fT=A("div")({name:"PointContainer",class:"p1vdx5su",propsAsIs:!1}),gT=A("span")({name:"Point",class:"p68apx3",propsAsIs:!1}),TT=A("span")({name:"PointLabel",class:"p157xd4a",propsAsIs:!1}),la=({points:n})=>h.jsxs(pT,{children:[h.jsx(yT,{children:"YOU WON"}),h.jsxs(fT,{children:[h.jsx(gT,{children:n}),h.jsx(TT,{children:"PTS"})]})]}),hT=({logo:n,points:e,questionAnswered:t,questionAnsweredCorrectly:a,questionType:s,closeQuestion:r,setTimeToExpire:i})=>{const c=!t&&s!==Ee.PREDICTION,m=t&&s===Ee.TRIVIA,p=m&&a,y=m&&!a,T=t&&s===Ee.PREDICTION;return h.jsxs(iT,{children:[h.jsxs(cT,{children:[h.jsxs(mT,{children:[c&&h.jsx(ki,{setTimeToExpire:i}),p&&h.jsxs(h.Fragment,{children:[h.jsx(la,{points:e}),h.jsx(Mr,{isSuccess:!0,children:h.jsx(Ir,{alt:"reaction-icon",src:sT})})]}),y&&h.jsxs(h.Fragment,{children:[h.jsx(la,{points:0}),h.jsx(Mr,{isSuccess:!1,children:h.jsx(Ir,{alt:"reaction-icon",src:rT})})]}),T&&h.jsx(la,{points:e})]}),h.jsx(lT,{onClick:r,children:h.jsx(uT,{alt:"exit-icon",src:Xa})})]}),n&&h.jsx(oT,{src:n})]})},kT="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAxMy44MzQ4TDY3Ljc2MzYgNy40NDE0Nkg2Mi4wNjA2TDU5LjM4OTcgMTAuNTYwMkw1Ni42MTU1IDcuNDQxNDZaTTYyLjI3MjEgNy45MTY1OUw1OS4zOTY0IDExLjI3NDdMNTYuNDA5MiA3LjkxNjU5SDUxLjc0NDZMNTYuOTMwNyAxMy44NjE1TDUxLjc0NDcgMTkuODA1NEg1Ni4yMjU3TDU5LjE1NzEgMTYuNDIxM0w2Mi4xMTU2IDE5LjgwNTRINjYuNzk4N0w2MS41NjYgMTMuODM1N0w2Ni43MjYxIDcuOTE2NTlINjIuMjcyMVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDQuMzYzNSA3LjQ0MTQ2VjQuNTY0MDZINTAuNzA2NlYwLjA1NTk5OThIMzkuNzAyVjIwLjI4MDVINTAuNzA2NlYxNS43NjAxSDQ0LjM2MzVWMTEuNzc5NEg1MC43MDY2VjcuNDQxNDZINDQuMzYzNVpNNTAuMjQwOCA3LjkxNjU5SDQzLjg5NzhWNC4wODg5M0g1MC4yNDA4VjAuNTMxMTMySDQwLjE2NzhWMTkuODA1NEg1MC4yNDA4VjE2LjIzNTJINDMuODk3OFYxMS4zMDQzSDUwLjI0MDhWNy45MTY1OVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0zNS4wNiAwLjA1NTk5OThWOC4zMzI4MUgzNS4wMDg3QzMzLjk4MDMgNy4xMjc4NyAzMi42OTY2IDYuNzA4ODEgMzEuMjA3IDYuNzA4ODFDMjguMTU1MiA2LjcwODgxIDI1Ljg1NjEgOC44MjYgMjUuMDQ5MyAxMS42MjM2QzI0LjEyOCA4LjU0MDkyIDIxLjc1NDQgNi42NTA4NCAxOC4yMzQ5IDYuNjUwODRDMTUuMzc2OSA2LjY1MDg0IDEzLjExOTcgNy45NTkzNiAxMS45NDIyIDEwLjA5MThWNy40NDE0Nkg2LjAzNDE2VjQuNTY0MDZIMTIuNDgxNVYwLjA1NTk5OThIMC43NjgwMDVWMjAuMjgwNUg2LjAzNDE2VjExLjc3OTRIMTEuMjgzNkMxMS4xMjcgMTIuNDAzNyAxMS4wNDMyIDEzLjA3MjcgMTEuMDQzMiAxMy43Nzg4QzExLjA0MzIgMTcuOTk3IDE0LjIwMzEgMjAuOTU4IDE4LjIzNDkgMjAuOTU4QzIxLjYyNTggMjAuOTU4IDIzLjg2MDcgMTkuMzM0IDI1LjA0MTkgMTYuMzc0SDIwLjUyODRDMTkuOTE4MyAxNy4yNjQ0IDE5LjQ1NTMgMTcuNTI3NiAxOC4yMzQ5IDE3LjUyNzZDMTYuODE5OSAxNy41Mjc2IDE1LjU5OTUgMTYuMjY4NSAxNS41OTk1IDE0Ljc3NTZIMjQuNzg5NEMyNS4xODgxIDE4LjEyNjIgMjcuNzQ3MiAyMS4wMTYgMzEuMjU4MiAyMS4wMTZDMzIuNzczIDIxLjAxNiAzNC4xNjAxIDIwLjI1NTggMzUuMDA3OCAxOC45NzI5SDM1LjA1OVYyMC4yODI0SDM5LjcwMUwzOS43MDIgMC4wNTU5OTk4SDM1LjA2Wk0xNS43NDY3IDExLjgzOTNDMTYuMDM5MiAxMC41NTQ1IDE3LjAxNjQgOS43MTU0NSAxOC4yMzU4IDkuNzE1NDVDMTkuNTc4MiA5LjcxNTQ1IDIwLjUwNTEgMTAuNTI4OSAyMC43NDkyIDExLjgzOTNDMjAuODUxNyAxMS44MzkzIDE1Ljc0NjcgMTEuODM5MyAxNS43NDY3IDExLjgzOTNaTTMyLjI0MiAxNy4yMDE2QzMwLjUzMDcgMTcuMjAxNiAyOS40NjY4IDE1LjU3NDggMjkuNDY2OCAxMy44NzY3QzI5LjQ2NjggMTIuMDYxNyAzMC4zOTE5IDEwLjMxNiAzMi4yNDIgMTAuMzE2QzM0LjE2MDEgMTAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const MT=A("div")({name:"QuestionContainer",class:"q15yq4tu",propsAsIs:!1}),IT=({store:n,closeQuestion:e,vote:t})=>{var p;const{data:a}=Ce.useStore(n),[s,r]=F.useState(!1),i=F.useCallback(y=>{r(y)},[r]),c=F.useMemo(()=>a==null?void 0:a.answers.find(y=>y.youVoted===!0),[a]),m=F.useMemo(()=>!!(a!=null&&a.answers.find(y=>y.correct===!0)),[a]);return a?h.jsx(MT,{children:h.jsxs("div",{children:[h.jsx(hT,{points:(c==null?void 0:c.points)||0,questionAnswered:!!c,questionAnsweredCorrectly:c==null?void 0:c.correct,logo:kT,closeQuestion:e,setTimeToExpire:i,questionType:a.type}),h.jsx("div",{children:h.jsx($f,{title:a.subject,feedbackMessages:(p=a.options)==null?void 0:p.options.value,questionType:a.type,questionId:a.id,questionAnswered:!!c,questionAnsweredCorrectly:c==null?void 0:c.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:!!c||a.marketClosed||s,questionAnswered:!!c,hasCorrectAnswer:m,points:y.points,onVote:t}))})})]})}):null};const dt=A("div")({name:"DemoContainer",class:"dp9wag8",propsAsIs:!1}),ST=A("div")({name:"DemoContainerNotifications",class:"d15x0q1l",propsAsIs:!1}),NT=A("div")({name:"UserStatisticsContainer",class:"u13pbrok",propsAsIs:!1}),AT=A("div")({name:"QuestionsContainer",class:"qaw537u",propsAsIs:!1}),ET=({gamification:n,sdk:e})=>{var p,y,T,g,I,E,D,R,O,L,C,U,z,B,x,H,ne,se,ie,ue,oe,Z,me;const t=Ce.useStore(n.status),a=Ce.useStore(n.onbordingComplete),{slStreamId:s}=Ce.useStore(e.sdkStore),r=Ce.useStore(n.featureSettings);if(t!==mn.Ready)return h.jsx("div",{children:"wait..."});if(s!=null&&s.loading)return h.jsx(dt,{children:h.jsx("div",{children:"Event is loading"})});if(!(s!=null&&s.data))return h.jsx(dt,{children:h.jsx("div",{children:"Event is forbidden"})});if(!a)return h.jsx(dt,{children:h.jsx(ad,{closeFeature:e.closeFeature,gamification:n,steps:(y=(p=r.inplayGame)==null?void 0:p.onboarding)==null?void 0:y.steps,gameIcon:(I=(g=(T=r.inplayGame)==null?void 0:T.overview)==null?void 0:g.media)==null?void 0:I.gameIcon,sponsorLogo:(R=(D=(E=r.inplayGame)==null?void 0:E.overview)==null?void 0:D.media)==null?void 0:R.sponsorLogo,rules:(L=(O=r.inplayGame)==null?void 0:O.rules)==null?void 0:L.rules,rulesBtnLabel:(U=(C=r.inplayGame)==null?void 0:C.rules)==null?void 0:U.buttonLabel,rulesTitle:(B=(z=r.inplayGame)==null?void 0:z.rules)==null?void 0:B.heading,primaryColor:(ne=(H=(x=r.inplayGame)==null?void 0:x.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)},c=()=>{n.closeQuestion()},m=(Ie,$e)=>{n.submitAnswer(Ie,$e)};return h.jsxs(dt,{children:[h.jsx(NT,{children:n.userSummary&&h.jsx(tT,{store:n.userSummary.getStore()})}),h.jsxs(AT,{children:[n.questions&&h.jsx(aT,{openQuestion:i,store:n.questions.getStore()}),n.openedQuestion&&h.jsx(IT,{closeQuestion:c,vote:m,store:n.openedQuestion.getStore()})]})]})},bT=({sdk:n})=>{const e=async t=>{try{await n.authorizationBypass("streamlayer:streamlayer",t)}catch(a){throw console.log("login err",a),a}};return h.jsx(Em,{login:e,anonymousLogin:n.anonymousAuthorization,host:n.host})},DT=({activeFeature:n,sdk:e})=>{const[t,a]=F.useState(null);if(F.useEffect(()=>{const s=e.getFeatures();if(n)for(const[r,i]of s)r.toLowerCase()===n.toLowerCase()?i.status.get()===mn.Suspended&&(i.enable(),a(i)):i.status.get()===mn.Ready&&i.disable();else{for(const[,r]of s)r.status.get()===mn.Ready&&r.disable();a(null)}return()=>{for(const[,r]of s)r.status.get()===mn.Ready&&r.disable()}},[n,e]),n==="games"){const s=t;return s?h.jsxs("div",{children:[h.jsx("button",{onClick:()=>e.closeFeature(),children:"close"}),h.jsx(ET,{gamification:s,sdk:e})]}):h.jsx("div",{children:"wait gamification..."})}return h.jsxs("div",{children:[h.jsx("button",{onClick:()=>e.logout(),children:"logout"}),h.jsx("button",{onClick:()=>e.openFeature("games"),children:"gamification"})]})},vT=({sdk:n})=>{const e=Ce.useStore(n.organizationStore()),t=Ce.useStore(n.getUserStore()),a=Ce.useStore(n.getActiveFeature());return e.loading?h.jsx("div",{children:"authentificating..."}):e.data?t.loading?h.jsx("div",{children:"authentificating..."}):t.data?h.jsxs(h.Fragment,{children:[h.jsx(ST,{children:h.jsx(nT,{sdk:n})}),h.jsx(DT,{sdk:n,activeFeature:a})]}):h.jsx(bT,{sdk:n}):h.jsx("div",{children:"wrong sdk key..."})};const wT="t12mji3x",_T=({children:n})=>h.jsx("div",{className:wT,children:n});let OT=()=>({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 jT=({cache:n=new Map,fetcher:e,...t}={})=>{const a=OT();let s=!0;br("visibilitychange",()=>{s=!document.hidden,s&&a.emit(Nr)}),br("online",()=>a.emit(Ar));const r=new Map,i=new Map,c=new Map;let m={};const p=async([O,L],C,U,z)=>{var B;if(!s)return;const x=oe=>{C.key===O&&(C.set(oe),a.emit(ua,O,oe,!0))},H=()=>{x({...C.value,...vr,promise:c.get(O)})},{dedupeTime:ne=4e3,fetcher:se}={...U,...m},ie=Dr();if(c.has(O)){C.value.loading||H();return}if(!z){const oe=n.get(O);oe&&C.value.data!==oe&&x({data:oe,...on});const Z=i.get(O);if(Z&&Z+ne>ie)return}const ue=De.startTask();try{const oe=se(...L);i.set(O,ie),c.set(O,oe),H();const Z=await oe;n.set(O,Z),x({data:Z,...on}),i.set(O,Dr())}catch(oe){(B=U.onError)==null||B.call(U,oe),x({data:C.value.data,error:oe,...on})}finally{ue(),c.delete(O)}},y=(O,{fetcher:L=e,...C}={})=>{const U=De.map({...on}),z={...t,...C,fetcher:L};U.invalidate=()=>{const{key:Z}=U;Z&&I(Z)},U.mutate=Z=>{const{key:me}=U;me&&E(me,Z)};let B,x,H,ne,se,ie=[];De.onStart(U,()=>{const Z=!B;[se,B]=RT(O),ne=se.subscribe(Ne=>{if(Ne){const[K,M]=Ne;U.key=K,p([K,M],U,z),x=K,H=M}else U.key=x=H=void 0});const me=se.get();me&&([x,H]=me,Z&&ue());const{refetchInterval:Ie=0,refetchOnFocus:$e,refetchOnReconnect:Ue}=z,Se=()=>{x&&p([x,H],U,z)};Ie>0&&r.set(O,setInterval(Se,Ie)),$e&&ie.push(a.on(Nr,Se)),Ue&&ie.push(a.on(Ar,Se)),ie.push(a.on(Er,Ne=>{x&&ma(x,Ne)&&p([x,H],U,z,!0)}),a.on(ua,(Ne,K,M)=>{x&&ma(x,Ne)&&U.value!==K&&U.value.data!==K&&U.set(M?K:{data:K,...on})}))});const ue=()=>{x&&H&&p([x,H],U,z)},oe=U.listen;return U.listen=Z=>{const me=oe(Z);return Z(U.value),ue(),me},De.onStop(U,()=>{U.value={...on},B==null||B(),ie.forEach(me=>me()),ie=[],ne==null||ne();const Z=r.get(O);Z&&clearInterval(Z)}),U},T=O=>{n.delete(O),i.delete(O)},g=(O,L)=>{for(const C of n.keys())ma(C,O)&&L(C)},I=O=>{g(O,T),a.emit(Er,O)},E=(O,L)=>{g(O,C=>{L===void 0?T(C):n.set(C,L)}),a.emit(ua,O,L)};function D(O){const L=async U=>{var z,B;const x=(z=m.fetcher)!=null?z:O,H=[];try{C.set({error:void 0,data:void 0,mutate:L,...vr});const ne=await x({data:U,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:L,...on});return C.mutate=L,C}return[y,D,{__unsafeOverruleSettings:O=>{console.warn("You should only use __unsafeOverruleSettings in test environment"),m=O},invalidateKeys:I,mutateCache:E}]};function Sr(n){return typeof n=="string"||typeof n=="number"}const RT=n=>{if(Sr(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(Sr(i)){t.push(i);continue}s.push(i.subscribe(c=>{t[r]=c,a()}))}return a(),[e,()=>s.forEach(r=>r())]},Nr=1,Ar=2,Er=3,ua=4,br=(n,e)=>{typeof window>"u"||addEventListener(n,e)},ma=(n,e)=>Array.isArray(e)?e.includes(n):typeof e=="function"?e(n):n===e,Dr=()=>new Date().getTime(),vr={loading:!0},on={loading:!1};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));class LT{constructor(e,t,a,s){N(this,"params");N(this,"stream");N(this,"method");N(this,"name");N(this,"headers");N(this,"listeners");N(this,"state");N(this,"store");N(this,"updateState",e=>{this.state.setValue("status",e),this.state.setValue("ts",new Date),this.addStateLog(`status => ${e}`)});N(this,"addStateLog",e=>{const t=this.state.getStore().get().log;this.state.setValue("log",[...t,`${new Date().toLocaleString()}: ${e}`])});N(this,"addListener",(e,t)=>this.listeners.has(e)?(this.addStateLog(`listener '${e}' not added`),!1):(this.listeners.set(e,t),this.addStateLog(`listener '${e}' added`),!0));N(this,"removeListener",e=>{this.listeners.delete(e),this.addStateLog(`listener '${e}' removed`)});N(this,"connect",()=>{this.updateState("connecting"),this.stream&&(this.addStateLog("disconnect prev connection"),this.stream());const e="get"in this.params&&typeof this.params.get=="function"?this.params.get():this.params;this.stream=this.method(e,this.onData,this.onStreamError,{headers:this.headers.getValues()}),this.updateState("connected")});N(this,"disconnect",()=>{this.stream&&this.stream(),this.listeners.clear(),this.updateState("disconnected")});N(this,"reconnect",()=>{this.updateState("reconnecting"),this.connect()});N(this,"getStore",()=>{var e;return(e=this.store)==null?void 0:e.getStore()});N(this,"onData",e=>{this.addStateLog(`received data => ${JSON.stringify(e)}`),this.store&&this.store.setValue(e);for(const[,t]of this.listeners)t(e);this.addStateLog(`data routed to ${this.listeners.size} listeners`)});N(this,"onStreamError",e=>{e!==void 0&&(e.code!==ee.Canceled&&e.rawMessage!=="[canceled] BodyStreamBuffer was aborted"?(this.updateState("failed"),this.state.setValue("error",e)):this.disconnect())});const r={status:"init",ts:new Date,log:[]};this.state=new Kn(Jn(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 ve(we(null),`subscription:${s.name}:store`)),"subscribe"in a&&typeof a.subscribe=="function"&&a.subscribe(()=>{this.reconnect()}),this.updateState("ready")}}class xT{constructor(e){N(this,"toJsonOptions",{emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1});N(this,"transport");N(this,"nanoquery");N(this,"host");N(this,"interceptors",[]);N(this,"$headers");N(this,"clients");N(this,"callbackClients");N(this,"subscriptions");N(this,"addSubscription",(e,t,a)=>{const s=this.subscriptions.get(t);if(s)return s;const r=new LT(this.$headers,e,t,a);return this.subscriptions.set(t,r),r});N(this,"removeSubscription",e=>{e.disconnect(),this.subscriptions.delete(e.params)});N(this,"disconnect",()=>{for(const[e,t]of this.subscriptions)t.disconnect(),this.subscriptions.delete(e)});N(this,"registerInterceptor",e=>{this.interceptors.push(e)});N(this,"removeInterceptor",e=>{this.interceptors=this.interceptors.filter(t=>t!==e)});N(this,"getClient",e=>{const t=e.typeName;if(this.clients.has(t))return this.clients.get(t);const a=Ct(e,this.transport);return this.clients.set(t,a),a});N(this,"getCallbackClient",e=>{const t=e.typeName;if(this.callbackClients.has(t))return this.callbackClients.get(t);const a=Tu(e,this.transport);return this.callbackClients.set(t,a),a});N(this,"createPromiseClient",(e,{params:t=[],method:a})=>{const s=this.getClient(e),r=e.methods[a].name,i=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1),...Array.isArray(t)?t:[t]],c=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1)];return{client:s,queryKey:i,queryKeyStr:c.join("")}});N(this,"createCallbackClient",e=>({client:this.getCallbackClient(e)}));N(this,"setSdkKey",e=>{this.$headers.setValue("sdk",e)});N(this,"setAuth",e=>{this.$headers.setValue("authorization",e)});N(this,"setHeader",(e,t)=>this.$headers.setValue(e,t));N(this,"getHeader",e=>this.$headers.getValue(e));N(this,"getHeaders",()=>this.$headers.getValues());N(this,"initInterceptors",()=>{if(this.interceptors.length!==0)return;const e=t=>a=>{const s=this.$headers.getValues();for(const r in s)a.header.set(r,s[r]);return t(a)};this.interceptors.push(e)});var r,i;this.host=e,this.$headers=new Kn(Jn({"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]=jT();this.nanoquery={createFetcherStore:t,createMutatorStore:a,utils:s},this.transport=Ut({baseUrl:e,interceptors:this.interceptors,useBinaryFormat:!0})}}const CT=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"}]),ps=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"}]),ys=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"}]),Qt=l.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),Co=l.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),Gt=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}]),Yt=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:Yt}]);const rt=l.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),Uo=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:Yt},{no:12,name:"event_time",kind:"message",T:rt},{no:13,name:"status",kind:"enum",T:l.getEnumType(ps)},{no:14,name:"periods",kind:"message",T:Uo,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(ys)}]);const zo=l.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),UT=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:zT},{no:7,name:"weight",kind:"message",T:PT},{no:8,name:"birth",kind:"message",T:BT}]),zT=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"}),PT=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"}),BT=l.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:zo}],{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 FT=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:zo},{no:13,name:"attributes",kind:"message",T:UT},{no:15,name:"teams",kind:"message",T:FT,repeated:!0}]);const an=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 Wn=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(CT)}]),QT=l.makeMessageType("streamlayer.sports.SyncStatus",()=>[{no:1,name:"teams",kind:"message",T:Wn},{no:2,name:"event",kind:"message",T:Wn},{no:3,name:"events",kind:"message",T:Wn},{no:4,name:"players",kind:"message",T:Wn},{no:5,name:"leagues",kind:"message",T:Wn}]),GT=l.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:QT}]);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:GT,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 YT=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}]),VT=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:YT,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:VT,oneof:"statistics"}]);const sn=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}]),$T=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}]),qT=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}]),WT=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:sn},{no:6,name:"away",kind:"message",T:sn},{no:7,name:"status",kind:"enum",T:l.getEnumType(ps)},{no:8,name:"custom_fields",kind:"message",T:$T},{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:Yt},{no:12,name:"schedule",kind:"message",T:qT,repeated:!0},{no:13,name:"endless",kind:"enum",T:l.getEnumType(ys)}]),fn=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:Yt},{no:6,name:"event_time",kind:"message",T:rt},{no:7,name:"home_team",kind:"message",T:sn},{no:8,name:"away_team",kind:"message",T:sn},{no:9,name:"status",kind:"enum",T:l.getEnumType(ps)},{no:10,name:"periods",kind:"message",T:Uo,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 HT=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"}]),ZT=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:Po},{no:2,name:"status",kind:"enum",T:l.getEnumType(HT)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),KT=l.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),JT=l.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:l.getEnumType(ZT)},{no:2,name:"player",kind:"message",T:KT}]),XT=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}]),eh=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}]),Po=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:XT,repeated:!0},{no:2,name:"batting",kind:"message",T:eh,repeated:!0},{no:3,name:"pitching",kind:"message",T:Po,repeated:!0}]),nh=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}]),th=l.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:ah,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}]),ah=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"}),sh=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:JT,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),rh=l.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:th,repeated:!0}]),ih=l.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:nh}]),oh=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:ch},{no:11,name:"rank",kind:"message",T:lh},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),ch=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"}),lh=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"}),uh=l.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:oh,repeated:!0}]),mh=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"}]),dh=l.makeMessageType("streamlayer.sports.basketball.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),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}]),Rr=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}]),ph=l.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(mh)},{no:2,name:"home_player",kind:"message",T:Rr},{no:3,name:"away_player",kind:"message",T:Rr}]),yh=l.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:jr},{no:2,name:"away_statistics",kind:"message",T:jr}]),fh=l.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:yh},{no:2,name:"top_performers",kind:"message",T:ph,repeated:!0},{no:3,name:"last_games",kind:"message",T:Bo}]),gh=l.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:rt},{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}]),Th=l.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:gh,repeated:!0}]),Lr=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}]),hh=l.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Lr,repeated:!0},{no:2,name:"away_players",kind:"message",T:Lr,repeated:!0}]),kh=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:Mh},{no:11,name:"rank",kind:"message",T:Ih},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Mh=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"}),Ih=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"}),Sh=l.makeMessageType("streamlayer.sports.basketball.Standings",()=>[{no:1,name:"standings",kind:"message",T:kh,repeated:!0}]),xr=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:xr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:xr,repeated:!0}]),Nh=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Cr},{no:2,name:"away_team",kind:"message",T:Cr}]),da=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:Ah}]),Ah=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"}),Bo=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGames",()=>[{no:1,name:"home",kind:"message",T:da,repeated:!0},{no:2,name:"away",kind:"message",T:da,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:da,repeated:!0}]),Eh=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"}]),Fo=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"}]),bh=l.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),Ur=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}]),Dh=l.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(Eh)},{no:2,name:"home_player",kind:"message",T:Ur,repeated:!0},{no:3,name:"away_player",kind:"message",T:Ur,repeated:!0}]),zr=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}]),vh=l.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:zr},{no:2,name:"away_statistics",kind:"message",T:zr}]),wh=l.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:vh},{no:2,name:"top_performers",kind:"message",T:Dh,repeated:!0}]),_h=l.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:rt},{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}]),Oh=l.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:_h,repeated:!0}]),pa=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(Fo)}]),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(Fo)}]),Br=l.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:pa,repeated:!0},{no:2,name:"goaltender",kind:"message",T:Pr},{no:3,name:"forwards",kind:"message",T:pa,repeated:!0},{no:4,name:"defensemen",kind:"message",T:pa,repeated:!0},{no:5,name:"goaltenders",kind:"message",T:Pr,repeated:!0}]),jh=l.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Br},{no:2,name:"away_players",kind:"message",T:Br}]),Rh=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:Lh},{no:11,name:"rank",kind:"message",T:xh},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Lh=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"}),xh=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"}),Ch=l.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:Rh,repeated:!0}]),Uh=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"}]),zh=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"}]),Ph=l.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),fs=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}]),Bh=l.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:fs},{no:2,name:"attack_stats",kind:"message",T:Hh}]),Fh=l.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:fs},{no:2,name:"midfield_stats",kind:"message",T:Zh}]),Qh=l.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:fs},{no:2,name:"defense_stats",kind:"message",T:Kh}]),Gh=l.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(Uh)},{no:2,name:"attack_performer",kind:"message",T:Bh},{no:3,name:"midfield_performer",kind:"message",T:Fh},{no:4,name:"defense_performer",kind:"message",T:Qh}]),Yh=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}]),Vh=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}]),$h=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}]),Fr=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:Yh},{no:2,name:"attacking_stats",kind:"message",T:Vh},{no:3,name:"defense_stats",kind:"message",T:$h}]),qh=l.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Fr},{no:2,name:"away_statistics",kind:"message",T:Fr},{no:3,name:"perfomers",kind:"message",T:Gh}]),Wh=l.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:qh},{no:2,name:"last_games",kind:"message",T:Qo}]),Hh=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}]),Zh=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}]),Kh=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 Jh=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}]),Xh=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:Jh,repeated:!0}]),Qr=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:Xh,repeated:!0},{no:3,name:"start_players",kind:"message",T:Qr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Qr,repeated:!0}]),ek=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 nk=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:rt},{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(zh)}]),tk=l.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:nk,repeated:!0}]),ak=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}]),sk=l.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:ak,repeated:!0}]),ya=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:rk}]),rk=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"}),Qo=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGames",()=>[{no:1,name:"home",kind:"message",T:ya,repeated:!0},{no:2,name:"away",kind:"message",T:ya,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:ya,repeated:!0}]),gn=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"}]),ik=l.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:sh,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:dh,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:bh,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:Ph,oneof:"sport"}]),ok=l.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:ik}]),ck=l.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:WT}]),Go=l.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:ck}]),lk=l.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:uk},{no:2,name:"pagination",kind:"message",T:Qt},{no:3,name:"sort",kind:"message",T:Co},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),uk=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(ys)}],{localName:"ListRequest_Filter"}),mk=l.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:dk},{no:2,name:"pagination",kind:"message",T:Qt},{no:3,name:"sort",kind:"message",T:Co}]),dk=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"}),pk=l.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:Gt},{no:2,name:"data",kind:"message",T:Go,repeated:!0}]),yk=l.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:Gt},{no:2,name:"data",kind:"message",T:Go,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:fk}]),fk=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:gk}],{localName:"SummaryResponse_ResponseData"}),gk=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:ih,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:fh,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:wh,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:Wh,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),Tk=l.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),hk=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:kk}]),kk=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:Mk}],{localName:"AdminSummaryResponse_ResponseData"}),Mk=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),Ik=l.makeMessageType("streamlayer.sports.events.PlayByPlayRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"pagination",kind:"message",T:Qt},{no:3,name:"order",kind:"scalar",T:9}]),Sk=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse",()=>[{no:1,name:"data",kind:"message",T:Nk},{no:2,name:"meta",kind:"message",T:Gt}]),Nk=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:Ak}],{localName:"PlayByPlayResponse_ResponseData"}),Ak=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:rh,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Th,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Oh,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:tk,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),Ek=l.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:bk},{no:2,name:"pagination",kind:"message",T:Qt}]),bk=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"}),Dk=l.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:ok,repeated:!0},{no:2,name:"meta",kind:"message",T:Gt}]),vk=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:wk}]),wk=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),_k=l.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),Ok=l.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),jk=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:Rk}]),Rk=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:Lk}],{localName:"BoxscoreResponse_ResponseData"}),Lk=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"basketball",kind:"message",T:hh,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:jh,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),xk=l.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),Ck=l.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:Uk}]),Uk=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:2,name:"attributes",kind:"message",T:zk}],{localName:"StandingsResponse_ResponseData"}),zk=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData.StandingsResponseAttributes",()=>[{no:2,name:"basketball",kind:"message",T:Sh,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Ch,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:uh,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:sk,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),Pk=l.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),Bk=l.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:Fk}]),Fk=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:Qk}],{localName:"LineupResponse_ResponseData"}),Qk=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"soccer",kind:"message",T:ek,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Nh,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),Gk=l.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),Yk=l.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:Vk}]),Vk=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:$k}],{localName:"LastGamesResponse_ResponseData"}),$k=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"soccer",kind:"message",T:Qo,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Bo,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),qk=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Wk=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:Hk}]),Hk=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"}),Zk={typeName:"streamlayer.sports.events.Events",methods:{list:{name:"List",I:lk,O:yk,kind:P.Unary},demoList:{name:"DemoList",I:mk,O:pk,kind:P.Unary},summary:{name:"Summary",I:Yr,O:Vr,kind:P.Unary},adminSummary:{name:"AdminSummary",I:Tk,O:hk,kind:P.Unary},boxscore:{name:"Boxscore",I:Ok,O:jk,kind:P.Unary},standings:{name:"Standings",I:xk,O:Ck,kind:P.Unary},playByPlay:{name:"PlayByPlay",I:Ik,O:Sk,kind:P.Unary},schedule:{name:"Schedule",I:Ek,O:Dk,kind:P.Unary},scheduleDates:{name:"ScheduleDates",I:vk,O:_k,kind:P.Unary},lineup:{name:"Lineup",I:Pk,O:Bk,kind:P.Unary},retrieveEventId:{name:"RetrieveEventId",I:qk,O:Wk,kind:P.Unary},lastGames:{name:"LastGames",I:Gk,O:Yk,kind:P.Unary},summarySubscription:{name:"SummarySubscription",I:Yr,O:Vr,kind:P.ServerStreaming}}},Kk=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"}]),Jk=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"}]),Xk=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"}]),eM=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"}]),nM=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"}]),tM=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"}]),aM=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"}]),sM=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"}]),Yo=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"}]),rM=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"}]),iM=l.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(Yo)}]),oM=l.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(Yo)}]),fa=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:iM},{no:2,name:"sound",kind:"message",T:oM}]),gs=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:l.getEnumType(Kk)},{no:2,name:"messages_notify",kind:"enum",T:l.getEnumType(Jk)},{no:3,name:"friends_notify",kind:"enum",T:l.getEnumType(Xk)},{no:4,name:"calls_sound",kind:"enum",T:l.getEnumType(nM)},{no:5,name:"messages_sound",kind:"enum",T:l.getEnumType(tM)},{no:6,name:"friends_sound",kind:"enum",T:l.getEnumType(aM)},{no:7,name:"twitter_notify",kind:"enum",T:l.getEnumType(eM)},{no:8,name:"twitter_sound",kind:"enum",T:l.getEnumType(sM)},{no:9,name:"gamification",kind:"message",T:fa},{no:10,name:"watch_party_invitation",kind:"message",T:fa},{no:11,name:"twitter_question",kind:"message",T:fa}]),cM=l.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),lM=l.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:uM}]),uM=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:gs}],{localName:"GetResponse_GetResponseData"}),mM=l.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:gs}]),dM=l.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:pM}]),pM=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:gs}],{localName:"UpdateResponse_UpdateResponseData"}),yM=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),fM=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:gM}]),gM=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:to}],{localName:"GetStreamResponse_GetResponseData"}),TM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),hM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:kM}]),kM=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:ao}],{localName:"GetOrganizationResponse_GetResponseData"}),MM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),IM=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:SM}]),SM=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:so}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),NM=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(rM)}]),Vo=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:NM},{no:5,name:"external_event_id",kind:"scalar",T:9}]),AM=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:Vo}]),EM=l.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),bM=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:DM}]),DM=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:EM}],{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:vM}]);const vM=l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Vo}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),wM=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),_M=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),OM=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:jM}]),jM=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:to}],{localName:"StreamSubscriptionResponse_ResponseData"}),RM=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:LM}]),LM=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:ao}],{localName:"OrganizationSubscriptionResponse_ResponseData"}),Vt={typeName:"streamlayer.sdkSettings.client.Client",methods:{get:{name:"Get",I:cM,O:lM,kind:P.Unary},update:{name:"Update",I:mM,O:dM,kind:P.Unary},getStream:{name:"GetStream",I:yM,O:fM,kind:P.Unary},getOrganization:{name:"GetOrganization",I:TM,O:hM,kind:P.Unary},getOrganizationAdvertising:{name:"GetOrganizationAdvertising",I:MM,O:IM,kind:P.Unary},generateDeepLink:{name:"GenerateDeepLink",I:AM,O:bM,kind:P.Unary},streamSubscription:{name:"StreamSubscription",I:wM,O:OM,kind:P.ServerStreaming},organizationSubscription:{name:"OrganizationSubscription",I:_M,O:RM,kind:P.ServerStreaming}}},xM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Zk,{method:"retrieveEventId",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var c;if(!i||typeof i!="string")return"";try{return((c=(await t.retrieveEventId({id:i})).data)==null?void 0:c.id)||""}catch{return""}}})},CM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Vt,{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}})},UM=(n,e)=>{const{queryKey:t,client:a}=e.createPromiseClient(tt,{method:"me",params:[n]});return e.nanoquery.createFetcherStore(t,{fetcher:()=>a.me({})})},zM=n=>{const{client:e,queryKeyStr:t}=n.createPromiseClient(tt,{method:"bypassAuth"});return n.nanoquery.createMutatorStore(async({data:{userKey:a,schema:s,init:r},getCacheUpdater:i})=>{const[c]=i(t),m=await e.bypassAuth({userKey:a,schema:s,init:r});return c(m),m})},PM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Vt,{method:"get",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{var r;return(r=(await t.get({})).data)==null?void 0:r.attributes}})},BM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Vt,{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}})},FM=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Vt,{method:"getOrganizationAdvertising",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{var r;return(r=(await t.getOrganizationAdvertising({})).data)==null?void 0:r.attributes}})},QM=(n,e,t)=>{n.transport=new xT(e.host),n.sdk.host=n.transport.host,n.transport.setSdkKey(e.sdkKey),t()};var An=(n=>(n.DISABLED="disabled",n.INITIALIZATION="initialization",n.READY="ready",n.FAILED="failed",n.SUSPENDED="suspended",n))(An||{});const GM=n=>{const e=new ve(we(),"enabled"),t=new ve(we("disabled"),"status"),a=new ve(we(),"userKey"),s=new ve(we(),"userToken");s.listen(g=>{g?localStorage.setItem("sl-user-token",g):localStorage.removeItem("sl-user-token")});const r=new ve(we(),"providerStreamId"),i=new xe(xM(r.getStore(),n),"slStreamId",g=>g==null?void 0:g.data),c=new xe(UM(s.getStore(),n),"user",g=>{var I,E;return(E=(I=g==null?void 0:g.data)==null?void 0:I.data)==null?void 0:E.id}),m=new xe(PM(s.getStore(),n),"userSettings"),p=new xe(CM(i.getAtomStore(),n),"streamSettings");i.getAtomStore().listen(g=>{(g===""||g===void 0)&&p.getStore().mutate(void 0)});const y=new xe(BM(e.getStore(),n),"organizationSettings",g=>{var I;return(I=g==null?void 0:g.data)==null?void 0:I.id}),T=new xe(FM(y.getAtomStore(),n),"organizationAdvertising");return{enabled:e,status:t,providerStreamId:r,slStreamId:i,streamSettings:p,user:c,userKey:a,userToken:s,userSettings:m,organizationSettings:y,organizationAdvertising:T}};class YM extends Bt{constructor(t){const a=GM(t),s=Wf(a);super(s,"core");N(this,"stores");N(this,"subscribe",t=>{let a;for(a in this.stores){const s=t[a];a in t&&s!==void 0&&this.stores[a].subscribe(t[a])}});N(this,"unsubscribe",()=>this.getStore().off());this.stores=a}getValue(){throw new Error("Not implemented")}getValues(){return this.stores}setValue(){throw new Error("Not implemented")}}const VM=(n,e,t)=>{n.store=new YM(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()};class $M extends qf{constructor(t,a){super();N(this,"$coreStore");N(this,"transport");N(this,"$bypassLogin");N(this,"me",async()=>{const t=await this.$coreStore.getValues().user.getValue();return t==null?void 0:t.data});N(this,"login",async(t,a)=>(this.$coreStore.getValues().userKey.setValue(a),await this.$bypassLogin.mutate({schema:t,userKey:a,init:!1}),this.me()));N(this,"isAuthenticated",()=>this.me());N(this,"logout",()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("")});N(this,"subscribe",()=>{this.$bypassLogin.subscribe((t,a)=>{var s,r,i,c;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((c=(i=t==null?void 0:t.data)==null?void 0:i.meta)==null?void 0:c.jwt))})});this.$coreStore=t,this.transport=a,this.$bypassLogin=zM(this.transport),this.subscribe()}}const qM=async(n,e,t)=>{n.auth=new $M(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()},WM=(n,e,t)=>{n.sdk=Object.create(null),n.sdk.initializeApp=async()=>{n.storeSubscribe(),n.stores.enabled.setValue("on"),n.stores.status.setValue(An.INITIALIZATION);try{const a=await n.stores.organizationSettings.getValue();return a?(n.stores.status.setValue(An.READY),{enabled:!!a}):(n.stores.status.setValue(An.FAILED),{err:"failed"})}catch(a){return n.stores.enabled.setValue(),n.stores.status.setValue(An.FAILED),{err:`${a}`}}},n.sdk.disableApp=()=>{n.stores.enabled.setValue(),n.stores.status.setValue(An.DISABLED),n.storeUnsubscribe()},n.sdk.createEventSession=a=>{n.stores.providerStreamId.setValue(""),n.stores.providerStreamId.setValue(a)},t()},Ve={typeName:"streamlayer.interactive.feed.Feed",methods:{get:{name:"Get",I:Bp,O:Fp,kind:P.Unary},subscription:{name:"Subscription",I:Yd,O:Vd,kind:P.ServerStreaming},votingSubscription:{name:"VotingSubscription",I:qd,O:Wd,kind:P.ServerStreaming},questionSubscription:{name:"QuestionSubscription",I:Kd,O:Jd,kind:P.ServerStreaming},questionByUser:{name:"QuestionByUser",I:np,O:tp,kind:P.Unary},syncQuestion:{name:"SyncQuestion",I:sp,O:ip,kind:P.Unary},getQuestion:{name:"GetQuestion",I:cp,O:lp,kind:P.Unary},questionDetail:{name:"QuestionDetail",I:mp,O:dp,kind:P.Unary},submitAnswer:{name:"SubmitAnswer",I:yp,O:gp,kind:P.Unary},submitInplay:{name:"SubmitInplay",I:hp,O:Mp,kind:P.Unary},skipQuestion:{name:"SkipQuestion",I:Ip,O:Np,kind:P.Unary},pickHistory:{name:"PickHistory",I:Ep,O:Dp,kind:P.Unary},insightHistory:{name:"InsightHistory",I:_p,O:jp,kind:P.Unary},tweetHistory:{name:"TweetHistory",I:Lp,O:Cp,kind:P.Unary},promotionHistory:{name:"PromotionHistory",I:Gp,O:Vp,kind:P.Unary}}},HM=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"}]),$o=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(HM)},{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:$o,repeated:!0},{no:6,name:"created_at",kind:"scalar",T:3}]),Ts=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}]),ZM=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem",()=>[{no:1,name:"summary",kind:"message",T:Ts},{no:2,name:"percentage",kind:"message",T:KM}]),KM=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"}),JM=l.makeMessageType("streamlayer.interactive.leaderboard.ListRequest",()=>[{no:1,name:"pagination",kind:"message",T:os},{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}]),XM=l.makeMessageType("streamlayer.interactive.leaderboard.ListResponse",()=>[{no:1,name:"data",kind:"message",T:eI,repeated:!0},{no:2,name:"meta",kind:"message",T:nI}]),eI=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:Ts}],{localName:"ListResponse_ListResponseData"}),nI=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"}),tI=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}]),aI=l.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:sI}]),sI=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:ZM}],{localName:"SummaryResponse_SummaryResponseData"}),rI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9}]),iI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse",()=>[{no:2,name:"data",kind:"message",T:oI}]),oI=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:$o}],{localName:"EventLeaderboardsResponse_EventLeaderboardsResponseData"}),cI=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:os},{no:4,name:"sort",kind:"message",T:Ud}]),lI=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse",()=>[{no:1,name:"data",kind:"message",T:uI,repeated:!0},{no:2,name:"meta",kind:"message",T:mI}]),uI=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:Ts}],{localName:"EventLeaderboardResponse_ListResponseData"}),mI=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"}),dI={typeName:"streamlayer.interactive.leaderboard.Leaderboard",methods:{list:{name:"List",I:JM,O:XM,kind:P.Unary},summary:{name:"Summary",I:tI,O:aI,kind:P.Unary},eventLeaderboards:{name:"EventLeaderboards",I:rI,O:iI,kind:P.Unary},eventLeaderboard:{name:"EventLeaderboard",I:cI,O:lI,kind:P.Unary}}},pI=(n,e,t)=>{const{client:a,queryKey:s}=t.createPromiseClient(dI,{method:"summary",params:[n,e]});return t.nanoquery.createFetcherStore(s,{fetcher:async(r,i,c,m)=>{var y;return(y=(await a.summary({eventId:c,userId:m})).data)==null?void 0:y.attributes}})},yI=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ve,{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}})},fI=(n,e)=>{const{client:t}=e.createCallbackClient(Ve),a=De.atom({eventId:n.get()||"",feedId:""});return n.subscribe((r="")=>{a.set({eventId:r,feedId:""})}),e.addSubscription(t.subscription,a,{name:"feedSubscription"})},gI=(n,e)=>{const{client:t}=e.createCallbackClient(Ve);return e.addSubscription(t.questionSubscription,{questionId:n},{name:"questionSubscription"})},TI=async(n,e)=>{var s,r;const{client:t}=e.createPromiseClient(Ve,{method:"questionByUser",params:[n]});return(r=(s=(await t.questionByUser({questionId:n})).data)==null?void 0:s.attributes)==null?void 0:r.question},hI=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ve,{method:"questionByUser",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,i)=>{var m,p;return(p=(m=(await t.questionByUser({questionId:i})).data)==null?void 0:m.attributes)==null?void 0:p.question}})},kI=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ve,{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:p})=>p):void 0}})},MI=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ve,{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:p})=>p):void 0}})},II=(n,e)=>{const{client:t}=n.createPromiseClient(Ve,{method:"submitAnswer"});return t.submitAnswer({data:e})},SI=(n,e)=>{const{client:t}=n.createPromiseClient(Ve,{method:"submitInplay"});return t.submitInplay({data:{eventId:+e}})},NI=(n,e)=>{const{client:t}=n.createPromiseClient(Ve,{method:"skipQuestion"});return t.skipQuestion({data:{id:e}})};class AI extends io{constructor(t,a,s){super(t,a);N(this,"userSummary");N(this,"questions");N(this,"insights");N(this,"leaderboardId");N(this,"slStreamId");N(this,"userId");N(this,"organizationId");N(this,"openedQuestionId");N(this,"openedQuestion");N(this,"activeQuestionId");N(this,"moderationId");N(this,"feedId");N(this,"onbordingComplete");N(this,"notifications");N(this,"transport");N(this,"questionSubscription");N(this,"feedSubscription");N(this,"showOnbordingInApp",t=>{var i,c,m,p;if(t)return;const{inplayGame:a}=this.featureSettings.get();if(!a)return;const{titleCard:s,overview:r}=a;this.notifications.add({type:"_onboarding",id:"_",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:(c=s==null?void 0:s.media)==null?void 0:c.icon,sponsorLogo:(m=s==null?void 0:s.media)==null?void 0:m.sponsorLogo,primaryColor:(p=r==null?void 0:r.appearance)==null?void 0:p.primaryColor}})});N(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||""}`});N(this,"connect",t=>{var a;this.userSummary=new xe(pI(this.slStreamId,this.userId,t),"gamification:userSummary"),this.questions=new xe(kI(this.slStreamId,t),"gamification:questions"),this.insights=new xe(MI(this.slStreamId,t),"gamification:insights"),this.activeQuestionId=new xe(yI(this.slStreamId,t),"gamification:activeQuestionId"),this.openedQuestion=new xe(hI(this.openedQuestionId,t),"gamification:activeQuestionId"),this.questionSubscription&&(this.questionSubscription.disconnect(),this.questionSubscription=void 0),this.openedQuestionId.listen(s=>{var r;s?(this.questionSubscription=gI(s,t),this.questionSubscription.addListener("feed-subscription-opened-question",i=>{window.requestAnimationFrame(()=>{var c,m,p,y,T;(p=this.openedQuestion)==null||p.getStore().mutate((m=(c=i.data)==null?void 0:c.attributes)==null?void 0:m.question),(y=this.openedQuestion)==null||y.getStore().invalidate(),(T=this.userSummary)==null||T.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()&&(console.log("1"),(i=(r=s==null?void 0:s.data)==null?void 0:r.notification)!=null&&i.title&&s.data.question.status===nn.ACTIVE&&this.notifications.add({type:"_question",action:()=>this.openQuestion(s.data.question.id),close:()=>this.closeQuestion(),delay:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${s.data.question.id}`}),data:s.data}))}),this.feedSubscription&&(this.feedSubscription.disconnect(),this.feedSubscription=void 0),this.feedSubscription=fI(this.slStreamId,t),this.feedSubscription.addListener("feed-subscription-active-question",s=>{window.requestAnimationFrame(()=>{var i,c;const r=(i=this.activeQuestionId)==null?void 0:i.getStore();r&&r.mutate((c=s.data)==null?void 0:c.attributes)})}),this.feedSubscription.addListener("feed-subscription-prediction-close",s=>{window.requestAnimationFrame(async()=>{var p,y;const r=(y=(p=s.data)==null?void 0:p.attributes)==null?void 0:y.question;if(!r)return;const{status:i,type:c,id:m}=r;if(i===nn.RESOLVED&&c===Ee.PREDICTION){const T=await TI(m,t),g=T==null?void 0:T.answers.find(({correct:I})=>I);this.notifications.add({type:"_question",action:()=>this.openQuestion(m),close:()=>this.closeQuestion(),delay:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${m}-prediction-close`}),data:{question:T,notification:{title:g!=null&&g.youVoted?`Congratulations! You answered correctly! You won ${g.points} pts!`:`Better luck next time! Correct: ${g==null?void 0:g.text}!`}}})}})}),this.feedSubscription.addListener("feed-subscription-questions-list",()=>{window.requestAnimationFrame(()=>{var s;(s=this.questions)==null||s.invalidate()})})});N(this,"disconnect",()=>{var t,a;(t=this.questionSubscription)==null||t.disconnect(),(a=this.feedSubscription)==null||a.disconnect()});N(this,"submitInplay",async()=>{const t=this.slStreamId.get();t&&(await SI(this.transport,t),this.onbordingComplete.set(!0),localStorage.setItem(`sl-onbording:${this.userId.get()}:${t}`,"true"))});N(this,"submitAnswer",async(t,a)=>{var s;await II(this.transport,{questionId:t,answerId:a}),(s=this.questions)==null||s.invalidate()});N(this,"skipQuestion",async t=>{var a;await NI(this.transport,t),(a=this.questions)==null||a.invalidate()});N(this,"openQuestion",t=>{this.openedQuestionId.set(t),this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${t}`}))});N(this,"closeQuestion",()=>{this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${this.openedQuestionId.get()}`})),window.requestAnimationFrame(()=>{this.openedQuestionId.set(void 0)})});if(this.leaderboardId=new ve(we(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 ve(we(),"moderationId").getStore(),this.feedId=new ve(we(),"feedId").getStore(),this.onbordingComplete=new ve(we(!1),"onbordingComplete").getStore(),this.openedQuestionId=new ve(we(),"openedQuestionId").getStore(),this.notifications=s.notifications,this.transport=s.transport,!this.userId.get())this.userId.subscribe(r=>{r&&window.requestAnimationFrame(()=>{const c=!!localStorage.getItem(`sl-onbording:${r}:${this.slStreamId.get()}`);this.onbordingComplete.set(c),this.showOnbordingInApp(c)})});else{const r=this.userId.get(),c=!!localStorage.getItem(`sl-onbording:${r}:${this.slStreamId.get()}`);this.onbordingComplete.set(c),this.showOnbordingInApp(c)}this.status.subscribe(r=>{r===mn.Ready?this.connect(s.transport):this.disconnect()}),this.onbordingComplete.subscribe(r=>{var i;r&&((i=this.activeQuestionId)==null||i.invalidate())})}}class EI extends io{}const bI=(n,e,t)=>n.type===Xe.GAMES?new AI(n,e,t):new EI(n,e),DI=(n,e,t)=>{n.features=new Map,n.activeFeature=new ve(we(),"activeFeature"),n.sdk.getFeatures=()=>n.features,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=Nn.ORGANIZATION)=>{const r=bI(a,s,n);n.features.set(a.name,r)},n.updateFeature=(a,s)=>{var r;(r=n.features.get(a.name))==null||r.update(a,s)},n.destroyFeature=a=>{n.features.delete(a.name)},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,Nn.ORGANIZATION)},n.stores.providerStreamId.listen(a=>{a||n.reinitializeFeatures()}),n.storeSubscribe=()=>{const a=(r,i)=>{if(i!=null&&i.overlays){r===Nn.STREAM&&n.features.clear();for(const c of i.overlays){const m=c.name;n.features.has(m)?n.updateFeature(c,r):n.initFeature(c,r)}}},s={organizationSettings:r=>{if(r.data)try{a(Nn.ORGANIZATION,r.data)}catch(i){console.log(i)}},streamSettings:r=>{if(r.data)try{a(Nn.STREAM,r.data)}catch(i){console.log(i)}}};n.store.subscribe(s)},t()};var hs={exports:{}},ks={exports:{}};function vI(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 wI=vI,_I=wI;function qo(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=_I(OI),s=null,r=null,i=0,c=null,m={push:D,drain:Re,saturated:Re,pause:y,paused:!1,concurrency:t,running:p,resume:I,idle:E,length:T,getQueue:g,unshift:R,empty:Re,kill:L,killAndDrain:C,error:U};return m;function p(){return i}function y(){m.paused=!0}function T(){for(var z=s,B=0;z;)z=z.next,B++;return B}function g(){for(var z=s,B=[];z;)B.push(z.value),z=z.next;return B}function I(){if(m.paused){m.paused=!1;for(var z=0;z<m.concurrency;z++)i++,O()}}function E(){return i===0&&m.length()===0}function D(z,B){var x=a.get();x.context=n,x.release=O,x.value=z,x.callback=B||Re,x.errorHandler=c,i===m.concurrency||m.paused?r?(r.next=x,r=x):(s=x,r=x,m.saturated()):(i++,e.call(n,x.value,x.worked))}function R(z,B){var x=a.get();x.context=n,x.release=O,x.value=z,x.callback=B||Re,i===m.concurrency||m.paused?s?(x.next=s,s=x):(s=x,r=x,m.saturated()):(i++,e.call(n,x.value,x.worked))}function O(z){z&&a.release(z);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 L(){s=null,r=null,m.drain=Re}function C(){s=null,r=null,m.drain(),m.drain=Re}function U(z){c=z}}function Re(){}function OI(){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 jI(n,e,t){typeof n=="function"&&(t=e,e=n,n=null);function a(y,T){e.call(this,y).then(function(g){T(null,g)},T)}var s=qo(n,a,t),r=s.push,i=s.unshift;return s.push=c,s.unshift=m,s.drained=p,s;function c(y){var T=new Promise(function(g,I){r(y,function(E,D){if(E){I(E);return}g(D)})});return T.catch(Re),T}function m(y){var T=new Promise(function(g,I){i(y,function(E,D){if(E){I(E);return}g(D)})});return T.catch(Re),T}function p(){if(s.idle())return new Promise(function(g){g()});var y=s.drain,T=new Promise(function(g){s.drain=function(){y(),g()}});return T}}ks.exports=qo;ks.exports.promise=jI;var Wo=ks.exports,Ms={exports:{}},_n=typeof Reflect=="object"?Reflect:null,$r=_n&&typeof _n.apply=="function"?_n.apply:function(e,t,a){return Function.prototype.apply.call(e,t,a)},kt;_n&&typeof _n.ownKeys=="function"?kt=_n.ownKeys:Object.getOwnPropertySymbols?kt=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:kt=function(e){return Object.getOwnPropertyNames(e)};function RI(n){console&&console.warn&&console.warn(n)}var Ho=Number.isNaN||function(e){return e!==e};function te(){te.init.call(this)}Ms.exports=te;Ms.exports.once=UI;te.EventEmitter=te;te.prototype._events=void 0;te.prototype._eventsCount=0;te.prototype._maxListeners=void 0;var qr=10;function $t(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 qr},set:function(n){if(typeof n!="number"||n<0||Ho(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");qr=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||Ho(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 Zo(n){return n._maxListeners===void 0?te.defaultMaxListeners:n._maxListeners}te.prototype.getMaxListeners=function(){return Zo(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 c=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw c.context=i,c}var m=r[e];if(m===void 0)return!1;if(typeof m=="function")$r(m,this,t);else for(var p=m.length,y=nc(m,p),a=0;a<p;++a)$r(y[a],this,t);return!0};function Ko(n,e,t,a){var s,r,i;if($t(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=Zo(n),s>0&&i.length>s&&!i.warned){i.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=n,c.type=e,c.count=i.length,RI(c)}return n}te.prototype.addListener=function(e,t){return Ko(this,e,t,!1)};te.prototype.on=te.prototype.addListener;te.prototype.prependListener=function(e,t){return Ko(this,e,t,!0)};function LI(){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 Jo(n,e,t){var a={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},s=LI.bind(a);return s.listener=t,a.wrapFn=s,s}te.prototype.once=function(e,t){return $t(t),this.on(e,Jo(this,e,t)),this};te.prototype.prependOnceListener=function(e,t){return $t(t),this.prependListener(e,Jo(this,e,t)),this};te.prototype.removeListener=function(e,t){var a,s,r,i,c;if($t(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){c=a[i].listener,r=i;break}if(r<0)return this;r===0?a.shift():xI(a,r),a.length===1&&(s[e]=a[0]),s.removeListener!==void 0&&this.emit("removeListener",e,c||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 Xo(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?CI(s):nc(s,s.length)}te.prototype.listeners=function(e){return Xo(this,e,!0)};te.prototype.rawListeners=function(e){return Xo(this,e,!1)};te.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):ec.call(n,e)};te.prototype.listenerCount=ec;function ec(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 nc(n,e){for(var t=new Array(e),a=0;a<e;++a)t[a]=n[a];return t}function xI(n,e){for(;e+1<n.length;e++)n[e]=n[e+1];n.pop()}function CI(n){for(var e=new Array(n.length),t=0;t<e.length;++t)e[t]=n[t].listener||n[t];return e}function UI(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))}tc(n,e,r,{once:!0}),e!=="error"&&zI(n,s,{once:!0})})}function zI(n,e,t){typeof n.on=="function"&&tc(n,"error",e,t)}function tc(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 ac=Ms.exports,qt={},sc={},rc=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},PI=rc,Is=function(){return PI()&&!!Symbol.toStringTag},Wr=typeof Symbol<"u"&&Symbol,BI=rc,FI=function(){return typeof Wr!="function"||typeof Symbol!="function"||typeof Wr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:BI()},Hr={foo:{}},QI=Object,GI=function(){return{__proto__:Hr}.foo===Hr.foo&&!({__proto__:null}instanceof QI)},YI="Function.prototype.bind called on incompatible ",VI=Object.prototype.toString,$I=Math.max,qI="[object Function]",Zr=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},WI=function(e,t){for(var a=[],s=t||0,r=0;s<e.length;s+=1,r+=1)a[r]=e[s];return a},HI=function(n,e){for(var t="",a=0;a<n.length;a+=1)t+=n[a],a+1<n.length&&(t+=e);return t},ZI=function(e){var t=this;if(typeof t!="function"||VI.apply(t)!==qI)throw new TypeError(YI+t);for(var a=WI(arguments,1),s,r=function(){if(this instanceof s){var y=t.apply(this,Zr(a,arguments));return Object(y)===y?y:this}return t.apply(e,Zr(a,arguments))},i=$I(0,t.length-a.length),c=[],m=0;m<i;m++)c[m]="$"+m;if(s=Function("binder","return function ("+HI(c,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var p=function(){};p.prototype=t.prototype,s.prototype=new p,p.prototype=null}return s},KI=ZI,ic=Function.prototype.bind||KI,Kr={}.hasOwnProperty,ga=Function.prototype.call,JI=ga.bind?ga.bind(Kr):function(n,e){return ga.call(Kr,n,e)},q,Un=SyntaxError,oc=Function,On=TypeError,Ta=function(n){try{return oc('"use strict"; return ('+n+").constructor;")()}catch{}},dn=Object.getOwnPropertyDescriptor;if(dn)try{dn({},"")}catch{dn=null}var ha=function(){throw new On},XI=dn?function(){try{return arguments.callee,ha}catch{try{return dn(arguments,"callee").get}catch{return ha}}}():ha,In=FI(),eS=GI(),ge=Object.getPrototypeOf||(eS?function(n){return n.__proto__}:null),En={},nS=typeof Uint8Array>"u"||!ge?q:ge(Uint8Array),pn={"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":In&&ge?ge([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":En,"%AsyncGenerator%":En,"%AsyncGeneratorFunction%":En,"%AsyncIteratorPrototype%":En,"%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%":oc,"%GeneratorFunction%":En,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":In&&ge?ge(ge([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!In||!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"||!In||!ge?q:ge(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":In&&ge?ge(""[Symbol.iterator]()):q,"%Symbol%":In?Symbol:q,"%SyntaxError%":Un,"%ThrowTypeError%":XI,"%TypedArray%":nS,"%TypeError%":On,"%Uint8Array%":typeof Uint8Array>"u"?q:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?q:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?q:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?q:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?q:WeakMap,"%WeakRef%":typeof WeakRef>"u"?q:WeakRef,"%WeakSet%":typeof WeakSet>"u"?q:WeakSet};if(ge)try{null.error}catch(n){var tS=ge(ge(n));pn["%Error.prototype%"]=tS}var aS=function n(e){var t;if(e==="%AsyncFunction%")t=Ta("async function () {}");else if(e==="%GeneratorFunction%")t=Ta("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Ta("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 pn[e]=t,t},Jr={"%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"]},it=ic,vt=JI,sS=it.call(Function.call,Array.prototype.concat),rS=it.call(Function.apply,Array.prototype.splice),Xr=it.call(Function.call,String.prototype.replace),wt=it.call(Function.call,String.prototype.slice),iS=it.call(Function.call,RegExp.prototype.exec),oS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,cS=/\\(\\)?/g,lS=function(e){var t=wt(e,0,1),a=wt(e,-1);if(t==="%"&&a!=="%")throw new Un("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&t!=="%")throw new Un("invalid intrinsic syntax, expected opening `%`");var s=[];return Xr(e,oS,function(r,i,c,m){s[s.length]=c?Xr(m,cS,"$1"):i||r}),s},uS=function(e,t){var a=e,s;if(vt(Jr,a)&&(s=Jr[a],a="%"+s[0]+"%"),vt(pn,a)){var r=pn[a];if(r===En&&(r=aS(a)),typeof r>"u"&&!t)throw new On("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:a,value:r}}throw new Un("intrinsic "+e+" does not exist!")},Qn=function(e,t){if(typeof e!="string"||e.length===0)throw new On("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new On('"allowMissing" argument must be a boolean');if(iS(/^%?[^%]*%?$/,e)===null)throw new Un("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=lS(e),s=a.length>0?a[0]:"",r=uS("%"+s+"%",t),i=r.name,c=r.value,m=!1,p=r.alias;p&&(s=p[0],rS(a,sS([0,1],p)));for(var y=1,T=!0;y<a.length;y+=1){var g=a[y],I=wt(g,0,1),E=wt(g,-1);if((I==='"'||I==="'"||I==="`"||E==='"'||E==="'"||E==="`")&&I!==E)throw new Un("property names with quotes must have matching quotes");if((g==="constructor"||!T)&&(m=!0),s+="."+g,i="%"+s+"%",vt(pn,i))c=pn[i];else if(c!=null){if(!(g in c)){if(!t)throw new On("base intrinsic for "+e+" exists, but the property is not available.");return}if(dn&&y+1>=a.length){var D=dn(c,g);T=!!D,T&&"get"in D&&!("originalValue"in D.get)?c=D.get:c=c[g]}else T=vt(c,g),c=c[g];T&&!m&&(pn[i]=c)}}return c},cc={exports:{}},mS=Qn,Qa=mS("%Object.defineProperty%",!0),Ga=function(){if(Qa)try{return Qa({},"a",{value:1}),!0}catch{return!1}return!1};Ga.hasArrayLengthDefineBug=function(){if(!Ga())return null;try{return Qa([],"length",{value:1}).length!==1}catch{return!0}};var lc=Ga,dS=Qn,Mt=dS("%Object.getOwnPropertyDescriptor%",!0);if(Mt)try{Mt([],"length")}catch{Mt=null}var Ss=Mt,pS=lc(),Ns=Qn,Xn=pS&&Ns("%Object.defineProperty%",!0);if(Xn)try{Xn({},"a",{value:1})}catch{Xn=!1}var yS=Ns("%SyntaxError%"),Sn=Ns("%TypeError%"),ei=Ss,fS=function(e,t,a){if(!e||typeof e!="object"&&typeof e!="function")throw new Sn("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Sn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Sn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Sn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Sn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Sn("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,m=!!ei&&ei(e,t);if(Xn)Xn(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(c||!s&&!r&&!i)e[t]=a;else throw new yS("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},uc=Qn,ni=fS,gS=lc(),ti=Ss,ai=uc("%TypeError%"),TS=uc("%Math.floor%"),hS=function(e,t){if(typeof e!="function")throw new ai("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||TS(t)!==t)throw new ai("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],s=!0,r=!0;if("length"in e&&ti){var i=ti(e,"length");i&&!i.configurable&&(s=!1),i&&!i.writable&&(r=!1)}return(s||r||!a)&&(gS?ni(e,"length",t,!0,!0):ni(e,"length",t)),e};(function(n){var e=ic,t=Qn,a=hS,s=t("%TypeError%"),r=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),c=t("%Reflect.apply%",!0)||e.call(i,r),m=t("%Object.defineProperty%",!0),p=t("%Math.max%");if(m)try{m({},"a",{value:1})}catch{m=null}n.exports=function(g){if(typeof g!="function")throw new s("a function is required");var I=c(e,i,arguments);return a(I,1+p(0,g.length-(arguments.length-1)),!0)};var y=function(){return c(e,r,arguments)};m?m(n.exports,"apply",{value:y}):n.exports.apply=y})(cc);var mc=cc.exports,dc=Qn,pc=mc,kS=pc(dc("String.prototype.indexOf")),yc=function(e,t){var a=dc(e,!!t);return typeof a=="function"&&kS(e,".prototype.")>-1?pc(a):a},MS=Is(),IS=yc,Ya=IS("Object.prototype.toString"),Wt=function(e){return MS&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Ya(e)==="[object Arguments]"},fc=function(e){return Wt(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ya(e)!=="[object Array]"&&Ya(e.callee)==="[object Function]"},SS=function(){return Wt(arguments)}();Wt.isLegacyArguments=fc;var NS=SS?Wt:fc,AS=Object.prototype.toString,ES=Function.prototype.toString,bS=/^\s*(?:function)?\*/,gc=Is(),ka=Object.getPrototypeOf,DS=function(){if(!gc)return!1;try{return Function("return function*() {}")()}catch{}},Ma,vS=function(e){if(typeof e!="function")return!1;if(bS.test(ES.call(e)))return!0;if(!gc){var t=AS.call(e);return t==="[object GeneratorFunction]"}if(!ka)return!1;if(typeof Ma>"u"){var a=DS();Ma=a?ka(a):!1}return ka(e)===Ma},Tc=Function.prototype.toString,Dn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Va,It;if(typeof Dn=="function"&&typeof Object.defineProperty=="function")try{Va=Object.defineProperty({},"length",{get:function(){throw It}}),It={},Dn(function(){throw 42},null,Va)}catch(n){n!==It&&(Dn=null)}else Dn=null;var wS=/^\s*class\b/,$a=function(e){try{var t=Tc.call(e);return wS.test(t)}catch{return!1}},Ia=function(e){try{return $a(e)?!1:(Tc.call(e),!0)}catch{return!1}},St=Object.prototype.toString,_S="[object Object]",OS="[object Function]",jS="[object GeneratorFunction]",RS="[object HTMLAllCollection]",LS="[object HTML document.all class]",xS="[object HTMLCollection]",CS=typeof Symbol=="function"&&!!Symbol.toStringTag,US=!(0 in[,]),qa=function(){return!1};if(typeof document=="object"){var zS=document.all;St.call(zS)===St.call(document.all)&&(qa=function(e){if((US||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=St.call(e);return(t===RS||t===LS||t===xS||t===_S)&&e("")==null}catch{}return!1})}var PS=Dn?function(e){if(qa(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Dn(e,null,Va)}catch(t){if(t!==It)return!1}return!$a(e)&&Ia(e)}:function(e){if(qa(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(CS)return Ia(e);if($a(e))return!1;var t=St.call(e);return t!==OS&&t!==jS&&!/^\[object HTML/.test(t)?!1:Ia(e)},BS=PS,FS=Object.prototype.toString,hc=Object.prototype.hasOwnProperty,QS=function(e,t,a){for(var s=0,r=e.length;s<r;s++)hc.call(e,s)&&(a==null?t(e[s],s,e):t.call(a,e[s],s,e))},GS=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)},YS=function(e,t,a){for(var s in e)hc.call(e,s)&&(a==null?t(e[s],s,e):t.call(a,e[s],s,e))},VS=function(e,t,a){if(!BS(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=a),FS.call(e)==="[object Array]"?QS(e,t,s):typeof e=="string"?GS(e,t,s):YS(e,t,s)},$S=VS,Sa=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],qS=typeof globalThis>"u"?pi:globalThis,WS=function(){for(var e=[],t=0;t<Sa.length;t++)typeof qS[Sa[t]]=="function"&&(e[e.length]=Sa[t]);return e},_t=$S,HS=WS,si=mc,As=yc,Nt=Ss,ZS=As("Object.prototype.toString"),kc=Is(),ri=typeof globalThis>"u"?pi:globalThis,Wa=HS(),Es=As("String.prototype.slice"),Na=Object.getPrototypeOf,KS=As("Array.prototype.indexOf",!0)||function(e,t){for(var a=0;a<e.length;a+=1)if(e[a]===t)return a;return-1},Ot={__proto__:null};kc&&Nt&&Na?_t(Wa,function(n){var e=new ri[n];if(Symbol.toStringTag in e){var t=Na(e),a=Nt(t,Symbol.toStringTag);if(!a){var s=Na(t);a=Nt(s,Symbol.toStringTag)}Ot["$"+n]=si(a.get)}}):_t(Wa,function(n){var e=new ri[n],t=e.slice||e.set;t&&(Ot["$"+n]=si(t))});var JS=function(e){var t=!1;return _t(Ot,function(a,s){if(!t)try{"$"+a(e)===s&&(t=Es(s,1))}catch{}}),t},XS=function(e){var t=!1;return _t(Ot,function(a,s){if(!t)try{a(e),t=Es(s,1)}catch{}}),t},Mc=function(e){if(!e||typeof e!="object")return!1;if(!kc){var t=Es(ZS(e),8,-1);return KS(Wa,t)>-1?t:t!=="Object"?!1:XS(e)}return Nt?JS(e):null},eN=Mc,nN=function(e){return!!eN(e)};(function(n){var e=NS,t=vS,a=Mc,s=nN;function r(_){return _.call.bind(_)}var i=typeof BigInt<"u",c=typeof Symbol<"u",m=r(Object.prototype.toString),p=r(Number.prototype.valueOf),y=r(String.prototype.valueOf),T=r(Boolean.prototype.valueOf);if(i)var g=r(BigInt.prototype.valueOf);if(c)var I=r(Symbol.prototype.valueOf);function E(_,ct){if(typeof _!="object")return!1;try{return ct(_),!0}catch{return!1}}n.isArgumentsObject=e,n.isGeneratorFunction=t,n.isTypedArray=s;function D(_){return typeof Promise<"u"&&_ instanceof Promise||_!==null&&typeof _=="object"&&typeof _.then=="function"&&typeof _.catch=="function"}n.isPromise=D;function R(_){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(_):s(_)||v(_)}n.isArrayBufferView=R;function O(_){return a(_)==="Uint8Array"}n.isUint8Array=O;function L(_){return a(_)==="Uint8ClampedArray"}n.isUint8ClampedArray=L;function C(_){return a(_)==="Uint16Array"}n.isUint16Array=C;function U(_){return a(_)==="Uint32Array"}n.isUint32Array=U;function z(_){return a(_)==="Int8Array"}n.isInt8Array=z;function B(_){return a(_)==="Int16Array"}n.isInt16Array=B;function x(_){return a(_)==="Int32Array"}n.isInt32Array=x;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 $e(_){return typeof WeakMap>"u"?!1:Ie.working?Ie(_):_ instanceof WeakMap}n.isWeakMap=$e;function Ue(_){return m(_)==="[object WeakSet]"}Ue.working=typeof WeakSet<"u"&&Ue(new WeakSet);function Se(_){return Ue(_)}n.isWeakSet=Se;function Ne(_){return m(_)==="[object ArrayBuffer]"}Ne.working=typeof ArrayBuffer<"u"&&Ne(new ArrayBuffer);function K(_){return typeof ArrayBuffer>"u"?!1:Ne.working?Ne(_):_ 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 Q(_){return m(_)==="[object SharedArrayBuffer]"}function W(_){return typeof j>"u"?!1:(typeof Q.working>"u"&&(Q.working=Q(new j)),Q.working?Q(_):_ 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 ze(_){return E(_,p)}n.isNumberObject=ze;function Le(_){return E(_,y)}n.isStringObject=Le;function Oe(_){return E(_,T)}n.isBooleanObject=Oe;function Tn(_){return i&&E(_,g)}n.isBigIntObject=Tn;function ot(_){return c&&E(_,I)}n.isSymbolObject=ot;function Yn(_){return ze(_)||Le(_)||Oe(_)||Tn(_)||ot(_)}n.isBoxedPrimitive=Yn;function Ht(_){return typeof Uint8Array<"u"&&(K(_)||W(_))}n.isAnyArrayBuffer=Ht,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(_){Object.defineProperty(n,_,{enumerable:!1,value:function(){throw new Error(_+" is not supported in userland")}})})})(sc);var tN=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Ha={exports:{}};typeof Object.create=="function"?Ha.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ha.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 aN=Ha.exports;(function(n){var e=Object.getOwnPropertyDescriptors||function(v){for(var j=Object.keys(v),Q={},W=0;W<j.length;W++)Q[j[W]]=Object.getOwnPropertyDescriptor(v,j[W]);return Q},t=/%[sdj%]/g;n.format=function(M){if(!z(M)){for(var v=[],j=0;j<arguments.length;j++)v.push(i(arguments[j]));return v.join(" ")}for(var j=1,Q=arguments,W=Q.length,J=String(M).replace(t,function($){if($==="%%")return"%";if(j>=W)return $;switch($){case"%s":return String(Q[j++]);case"%d":return Number(Q[j++]);case"%j":try{return JSON.stringify(Q[j++])}catch{return"[Circular]"}default:return $}}),Y=Q[j];j<W;Y=Q[++j])L(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 Q(){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 Q};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),x(j.showHidden)&&(j.showHidden=!1),x(j.depth)&&(j.depth=2),x(j.colors)&&(j.colors=!1),x(j.customInspect)&&(j.customInspect=!0),j.colors&&(j.stylize=c),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 c(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 p(M){var v={};return M.forEach(function(j,Q){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 Q=v.inspect(j,M);return z(Q)||(Q=y(M,Q,j)),Q}var W=T(M,v);if(W)return W;var J=Object.keys(v),Y=p(J);if(M.showHidden&&(J=Object.getOwnPropertyNames(v)),ie(v)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return g(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 g(v)}var X="",Me=!1,ze=["{","}"];if(R(v)&&(Me=!0,ze=["[","]"]),ue(v)){var Le=v.name?": "+v.name:"";X=" [Function"+Le+"]"}if(H(v)&&(X=" "+RegExp.prototype.toString.call(v)),se(v)&&(X=" "+Date.prototype.toUTCString.call(v)),ie(v)&&(X=" "+g(v)),J.length===0&&(!Me||v.length==0))return ze[0]+X+ze[1];if(j<0)return H(v)?M.stylize(RegExp.prototype.toString.call(v),"regexp"):M.stylize("[Object]","special");M.seen.push(v);var Oe;return Me?Oe=I(M,v,j,Y,J):Oe=J.map(function(Tn){return E(M,v,j,Y,Tn,Me)}),M.seen.pop(),D(Oe,X,ze)}function T(M,v){if(x(v))return M.stylize("undefined","undefined");if(z(v)){var j="'"+JSON.stringify(v).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return M.stylize(j,"string")}if(U(v))return M.stylize(""+v,"number");if(O(v))return M.stylize(""+v,"boolean");if(L(v))return M.stylize("null","null")}function g(M){return"["+Error.prototype.toString.call(M)+"]"}function I(M,v,j,Q,W){for(var J=[],Y=0,$=v.length;Y<$;++Y)Ue(v,String(Y))?J.push(E(M,v,j,Q,String(Y),!0)):J.push("");return W.forEach(function(X){X.match(/^\d+$/)||J.push(E(M,v,j,Q,X,!0))}),J}function E(M,v,j,Q,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(Q,W)||(Y="["+W+"]"),$||(M.seen.indexOf(X.value)<0?(L(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")),x(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 D(M,v,j){var Q=M.reduce(function(W,J){return J.indexOf(`
25
- `)>=0,W+J.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Q>60?j[0]+(v===""?"":v+`
26
- `)+" "+M.join(`,
27
- `)+" "+j[1]:j[0]+v+" "+M.join(", ")+" "+j[1]}n.types=sc;function R(M){return Array.isArray(M)}n.isArray=R;function O(M){return typeof M=="boolean"}n.isBoolean=O;function L(M){return M===null}n.isNull=L;function C(M){return M==null}n.isNullOrUndefined=C;function U(M){return typeof M=="number"}n.isNumber=U;function z(M){return typeof M=="string"}n.isString=z;function B(M){return typeof M=="symbol"}n.isSymbol=B;function x(M){return M===void 0}n.isUndefined=x;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=tN;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 $e(){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",$e(),n.format.apply(n,arguments))},n.inherits=aN,n._extend=function(M,v){if(!v||!ne(v))return M;for(var j=Object.keys(v),Q=j.length;Q--;)M[j[Q]]=v[j[Q]];return M};function Ue(M,v){return Object.prototype.hasOwnProperty.call(M,v)}var Se=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(Se&&v[Se]){var j=v[Se];if(typeof j!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(j,Se,{value:j,enumerable:!1,writable:!1,configurable:!0}),j}function j(){for(var Q,W,J=new Promise(function(X,Me){Q=X,W=Me}),Y=[],$=0;$<arguments.length;$++)Y.push(arguments[$]);Y.push(function(X,Me){X?W(X):Q(Me)});try{v.apply(this,Y)}catch(X){W(X)}return J}return Object.setPrototypeOf(j,Object.getPrototypeOf(v)),Se&&Object.defineProperty(j,Se,{value:j,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(j,e(v))},n.promisify.custom=Se;function Ne(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=[],Q=0;Q<arguments.length;Q++)j.push(arguments[Q]);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(Ne.bind(null,$,Y))})}return Object.setPrototypeOf(v,Object.getPrototypeOf(M)),Object.defineProperties(v,e(M)),v}n.callbackify=K})(qt);const{inherits:sN,format:Aa}=qt;function cn(n,e,t=Error){if(!n)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function a(s,r,i){if(!new.target)return new a(s,r,i);Error.captureStackTrace(this,a),this.code=n,this.message=e,this.name="AvvioError",s&&r&&i?this.message=Aa(e,s,r,i):s&&r?this.message=Aa(e,s,r):s?this.message=Aa(e,s):this.message=e}return a.prototype[Symbol.toStringTag]="Error",a.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},sN(a,t),a}var Ic={createError:cn,AVV_ERR_EXPOSE_ALREADY_DEFINED:cn("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:cn("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:cn("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:cn("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:cn("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:cn("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},rN=function n(e,t,a){t===void 0&&(t=""),a||(a={});var s=function(m){var p={"│":"|","└":"`","├":"+","─":"-","┬":"-"};return a.unicode===!1?p[m]:m};typeof e=="string"&&(e={label:e});var r=e.nodes||[],i=(e.label||"").split(`
28
- `),c=`
29
- `+t+(r.length?s("│"):" ")+" ";return t+i.join(c)+`
30
- `+r.map(function(m,p){var y=p===r.length-1,T=m.nodes&&m.nodes.length,g=t+(y?" ":s("│"))+" ";return t+s(y?"└":"├")+s("─")+s(T?"┬":"─")+" "+n(m,g,a).slice(t.length+2)}).join("")};const iN=rN,ii=Symbol("avvio.TimeTree.untrackNode"),Ea=Symbol("avvio.TimeTree.trackNode"),oi=Symbol("avvio.TimeTree.getParent"),ci=Symbol("avvio.TimeTree.getNode"),li=Symbol("avvio.TimeTree.addNode");let oN=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Ea](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])}[ii](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)}[oi](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[ci](e){return this.tableId.get(e)}[li](e,t,a){if(e===null)return this.root={id:"root",label:t,start:a,nodes:[]},this[Ea](this.root),this.root.id;const r=this[oi](e),i=`${t}-${Math.random()}`,c={id:i,parent:e,start:a,label:t,nodes:[]};return r.nodes.push(c),this[Ea](c),i}start(e,t,a=Date.now()){return this[li](e,t,a)}stop(e,t=Date.now()){const a=this[ci](e);a&&(a.stop=t,a.diff=a.stop-a.start||0,this[ii](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 iN(t)}};var cN=oN,bs={exports:{}},Za={exports:{}},ba,ui;function lN(){if(ui)return ba;ui=1;var n=1e3,e=n*60,t=e*60,a=t*24,s=a*7,r=a*365.25;ba=function(y,T){T=T||{};var g=typeof y;if(g==="string"&&y.length>0)return i(y);if(g==="number"&&isFinite(y))return T.long?m(y):c(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 T=/^(-?(?:\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(T){var g=parseFloat(T[1]),I=(T[2]||"ms").toLowerCase();switch(I){case"years":case"year":case"yrs":case"yr":case"y":return g*r;case"weeks":case"week":case"w":return g*s;case"days":case"day":case"d":return g*a;case"hours":case"hour":case"hrs":case"hr":case"h":return g*t;case"minutes":case"minute":case"mins":case"min":case"m":return g*e;case"seconds":case"second":case"secs":case"sec":case"s":return g*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}function c(y){var T=Math.abs(y);return T>=a?Math.round(y/a)+"d":T>=t?Math.round(y/t)+"h":T>=e?Math.round(y/e)+"m":T>=n?Math.round(y/n)+"s":y+"ms"}function m(y){var T=Math.abs(y);return T>=a?p(y,T,a,"day"):T>=t?p(y,T,t,"hour"):T>=e?p(y,T,e,"minute"):T>=n?p(y,T,n,"second"):y+" ms"}function p(y,T,g,I){var E=T>=g*1.5;return Math.round(y/g)+" "+I+(E?"s":"")}return ba}function uN(n){t.debug=t,t.default=t,t.coerce=m,t.disable=r,t.enable=s,t.enabled=i,t.humanize=lN(),t.destroy=p,Object.keys(n).forEach(y=>{t[y]=n[y]}),t.names=[],t.skips=[],t.formatters={};function e(y){let T=0;for(let g=0;g<y.length;g++)T=(T<<5)-T+y.charCodeAt(g),T|=0;return t.colors[Math.abs(T)%t.colors.length]}t.selectColor=e;function t(y){let T,g=null,I,E;function D(...R){if(!D.enabled)return;const O=D,L=Number(new Date),C=L-(T||L);O.diff=C,O.prev=T,O.curr=L,T=L,R[0]=t.coerce(R[0]),typeof R[0]!="string"&&R.unshift("%O");let U=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,(B,x)=>{if(B==="%%")return"%";U++;const H=t.formatters[x];if(typeof H=="function"){const ne=R[U];B=H.call(O,ne),R.splice(U,1),U--}return B}),t.formatArgs.call(O,R),(O.log||t.log).apply(O,R)}return D.namespace=y,D.useColors=t.useColors(),D.color=t.selectColor(y),D.extend=a,D.destroy=t.destroy,Object.defineProperty(D,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(I!==t.namespaces&&(I=t.namespaces,E=t.enabled(y)),E),set:R=>{g=R}}),typeof t.init=="function"&&t.init(D),D}function a(y,T){const g=t(this.namespace+(typeof T>"u"?":":T)+y);return g.log=this.log,g}function s(y){t.save(y),t.namespaces=y,t.names=[],t.skips=[];let T;const g=(typeof y=="string"?y:"").split(/[\s,]+/),I=g.length;for(T=0;T<I;T++)g[T]&&(y=g[T].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(c),...t.skips.map(c).map(T=>"-"+T)].join(",");return t.enable(""),y}function i(y){if(y[y.length-1]==="*")return!0;let T,g;for(T=0,g=t.skips.length;T<g;T++)if(t.skips[T].test(y))return!1;for(T=0,g=t.names.length;T<g;T++)if(t.names[T].test(y))return!0;return!1}function c(y){return y.toString().substring(2,y.toString().length-2).replace(/\.\*\?$/,"*")}function m(y){return y instanceof Error?y.stack||y.message:y}function p(){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 mN=uN;(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 p="color: "+this.color;m.splice(1,0,p,"color: inherit");let y=0,T=0;m[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(y++,g==="%c"&&(T=y))}),m.splice(T,0,p)}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=mN(e);const{formatters:c}=n.exports;c.j=function(m){try{return JSON.stringify(m)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(Za,Za.exports);var Sc=Za.exports;const dN=Wo,pN=ac.EventEmitter,yN=qt.inherits,Te=Sc("avvio"),{AVV_ERR_READY_TIMEOUT:fN}=Ic,Da=Symbol.for("plugin-meta");function gN(n,e){return n[Da]&&n[Da].name?n[Da].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 TN(){const n={};return n.promise=new Promise((e,t)=>{n.resolve=e,n.reject=t}),n}function Gn(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=gN(e,t),this.isAfter=a,this.q=dN(n,hN,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}yN(Gn,pN);Gn.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 fN(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 c=t(this.server,this.opts,i);c&&typeof c.then=="function"&&(Te("exec: resolving promise",s),c.then(()=>G.process.nextTick(i),m=>G.process.nextTick(i,m)))};Gn.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=TN(),e=this._promise.promise,this.server?n():this.on("start",n)),e};Gn.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)};Gn.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=kN,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function hN(n,e){const t=this;G.process.nextTick(Ds.bind(t),n,e)}function Ds(n,e){if(typeof n.func.then=="function"){n.func.then(a=>{typeof a.default=="function"&&(a=a.default),n.func=a,Ds.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 kN(){}bs.exports=Gn;bs.exports.loadPlugin=Ds;var MN=bs.exports;const mi=Wo,IN=ac.EventEmitter,SN=qt.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:va,AVV_ERR_CALLBACK_NOT_FN:et,AVV_ERR_PLUGIN_NOT_VALID:NN,AVV_ERR_ROOT_PLG_BOOTED:AN,AVV_ERR_READY_TIMEOUT:EN}=Ic,bN=cN,Ka=MN,zn=Sc("avvio"),jt=Symbol("kAvvio"),wa=Symbol("kThenifyDoNotWrap");function DN(n,e,t){const a=e.expose||{},s=a.use||"use",r=a.after||"after",i=a.ready||"ready",c=a.onClose||"onClose",m=a.close||"close";if(n[s])throw new va(s);if(n[r])throw new va(r);if(n[i])throw new va(i);n[s]=function(p,y){return t.use(p,y),this},Object.defineProperty(n,"then",{get:Nc.bind(t)}),n[jt]=!0,n[r]=function(p){return typeof p!="function"?t._loadRegistered():(t.after(_a(p,this)),this)},n[i]=function(p){if(p&&typeof p!="function")throw new et(i,typeof p);return t.ready(p?_a(p,this):void 0)},n[c]=function(p){if(typeof p!="function")throw new et(c,typeof p);return t.onClose(jN(p,this)),this},n[m]=function(p){if(p&&typeof p!="function")throw new et(m,typeof p);return p?(t.close(_a(p,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&&DN(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 bN,this._readyQ=mi(this,Ac,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=di},this._closeQ=mi(this,ON,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=di},this._doStart=null,this._root=new Ka(this,vN.bind(this),e,!1,0),this._root.once("start",(a,s,r)=>{const i=this.pluginTree.start(null,s,r);this._root.once("loaded",(c,m,p)=>{this.pluginTree.stop(i,p)})}),Ka.loadPlugin.call(this,this._root,a=>{zn("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 vN(n,e,t){this._doStart=t,e.autostart&&this.start()}SN(ke,IN);ke.prototype.start=function(){return this.started=!0,G.process.nextTick(this._doStart),this};ke.prototype.override=function(n,e,t){return n};function wN(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new NN(typeof n);return n}ke.prototype[jt]=!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:Nc});ke.prototype._addPlugin=function(n,e,t){if(n=wN(n),e=e||{},this.booted)throw new AN;const a=this._current[0],s=new Ka(this,n,e,t);if(s.once("start",(r,i,c)=>{const m=this.pluginTree.start(a.name,i,c);s.once("loaded",(p,y,T)=>{this.pluginTree.stop(m,T)})}),a.loaded)throw new Error(s.name,a.name);return a.enqueue(s,r=>{r&&(this._error=r)}),s};ke.prototype.after=function(n){if(!n)return this._loadRegistered();this._addPlugin(e.bind(this),{},!0);function e(t,a,s){Ac.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 et("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 et("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,c){r?t(r):e(a),G.process.nextTick(c)}})};ke.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};ke.prototype.toJSON=function(){return this.pluginTree.toJSON()};function di(){}function Nc(){if(this.booted){zn("thenify returning null because we are already booted");return}if(this[wa]){this[wa]=!1;return}return zn("thenify"),(n,e)=>this._loadRegistered().then(()=>(this[wa]=!0,n(this._server)),e)}function Ac(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[jt]&&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[jt]&&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 _N.call(this,n,a,t,e)}function _N(n,e,t,a){const s=n.name;zn("setting up ready timeout",s,this._timeout);let r=setTimeout(()=>{zn("timed out",s),r=null;const c=new EN(s);c.fn=n,this._error=c,a(c)},this._timeout);n.length===2?n(e,i.bind(this)):n(e,t,i.bind(this));function i(c){r&&(clearTimeout(r),this._error=c,a(this._error))}}function ON(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"?(zn("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 jN(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 _a(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)}}hs.exports=ke;hs.exports.express=function(n){return ke(n,{expose:{use:"load"}})};var RN=hs.exports;const LN=Oc(RN);function xN(n,e=!0){const t=e?"https://grpc-web.streamlayer.io:443":"https://grpc-web.next.streamlayer.io:443",a=LN(Object.create(null),{autostart:!1});return a.use(WM),a.use(QM,{sdkKey:n,host:t}),a.use(VM),a.use(qM),a.use(DI),a.use(Fg),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 Ec=(n,e,t)=>{const[a,s]=F.useState(null);return F.useEffect(()=>{let r=!1;if(!n)throw new Error("sdk key should be provided");const i=xN(n,t);if(e)for(const c of e)i.use(c);return i.ready().then(c=>{r||(window.instance=c,s(c.sdk))}).catch(c=>console.log(c)),()=>{r=!0,i.close(function(c){if(c)throw c})}},[n]),a};var Ja=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(Ja||{});const vs=F.createContext({status:0}),CN=({sdkKey:n,plugins:e,children:t,production:a=!0})=>{const s=Ec(n,e,a),r=F.useMemo(()=>s?{sdk:s,status:2}:{status:1},[s]);return h.jsx(_T,{children:h.jsx(vs.Provider,{value:r,children:t})})},UN=()=>{const{sdk:n}=F.useContext(vs);return n},zN=()=>{const{sdk:n,status:e}=F.useContext(vs);if(e===Ja.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return e===Ja.CONNECTED?h.jsx("div",{children:"wait"}):n===void 0?h.jsx("div",{children:"sdk not initialized"}):h.jsx(vT,{sdk:n})};exports.StreamLayerProvider=CN;exports.StreamLayerSDKReact=zN;exports.useStreamLayer=UN;exports.useStreamLayerApp=Ec;