@devvit/runtime-lite 0.11.3-next-2024-10-31-9ef830d31.0 → 0.11.3-next-2024-11-11-9c32efd17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/browser-lite.worker.js +1 -1
- package/browser-lite.worker.js.map +2 -2
- package/client/BrowserLiteClient.d.ts +1 -1
- package/client/BrowserLiteClient.d.ts.map +1 -1
- package/client/BrowserLiteClient.js +5 -3
- package/client/ClientShared.d.ts +2 -0
- package/client/ClientShared.d.ts.map +1 -1
- package/mobile-lite.js +1 -1
- package/package.json +6 -6
- package/types/Commands.d.ts +8 -1
- package/types/Commands.d.ts.map +1 -1
- package/workers/RuntimeLiteWorker.js +10 -1
package/mobile-lite.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
"use strict";var Ki=(e82,n,t)=>{if(!n.has(e82))throw TypeError("Cannot "+t)},on=(e82,n,t)=>(Ki(e82,n,"read from private field"),t?t.call(e82):n.get(e82)),kn=(e82,n,t)=>{if(n.has(e82))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e82):n.set(e82,t)},$n=(e82,n,t,o)=>(Ki(e82,n,"write to private field"),o?o.call(e82,t):n.set(e82,t),t),it=(e82,n,t,o)=>({set _(d){$n(e82,n,d,t)},get _(){return on(e82,n,o)}}),Kn=(e82,n,t)=>(Ki(e82,n,"access private method"),t),mm=Object.create,Iu=Object.defineProperty,Em=Object.getOwnPropertyDescriptor,Sm=Object.getOwnPropertyNames,Im=Object.getPrototypeOf,Am=Object.prototype.hasOwnProperty,i$1=(e82,n)=>()=>(n||e82((n={exports:{}}).exports,n),n.exports),bm=(e82,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let d of Sm(n))!Am.call(e82,d)&&d!==t&&Iu(e82,d,{get:()=>n[d],enumerable:!(o=Em(n,d))||o.enumerable});return e82},A=(e82,n,t)=>(t=e82!=null?mm(Im(e82)):{},bm(Iu(t,"default",{value:e82,enumerable:!0}),e82)),I=i$1((e82,n)=>{var t=function(o){return o&&o.Math==Math&&o};n.exports=t(typeof globalThis=="object"&&globalThis)||t(typeof window=="object"&&window)||t(typeof self=="object"&&self)||t(typeof global=="object"&&global)||function(){return this}()||Function("return this")()}),y=i$1((e82,n)=>{n.exports=function(t){try{return!!t()}catch{return!0}}}),x=i$1((e82,n)=>{var t=y();n.exports=!t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),Ae=i$1((e82,n)=>{var t=y();n.exports=!t(function(){var o=function(){}.bind();return typeof o!="function"||o.hasOwnProperty("prototype")})}),C=i$1((e82,n)=>{var t=Ae(),o=Function.prototype.call;n.exports=t?o.bind(o):function(){return o.apply(o,arguments)}}),Ma=i$1(e82=>{var n={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,o=t&&!n.call({1:2},1);e82.f=o?function(d){var r=t(this,d);return!!r&&r.enumerable}:n}),vr=i$1((e82,n)=>{n.exports=function(t,o){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:o}}}),q=i$1((e82,n)=>{var t=Ae(),o=Function.prototype,d=o.call,r=t&&o.bind.bind(d,d);n.exports=t?r:function(a){return function(){return d.apply(a,arguments)}}}),jr=i$1((e82,n)=>{var t=q(),o=t({}.toString),d=t("".slice);n.exports=function(r){return d(o(r),8,-1)}}),yt=i$1((e82,n)=>{var t=q(),o=y(),d=jr(),r=Object,a=t("".split);n.exports=o(function(){return!r("z").propertyIsEnumerable(0)})?function(u){return d(u)=="String"?a(u,""):r(u)}:r}),Br=i$1((e82,n)=>{n.exports=function(t){return t==null}}),Or=i$1((e82,n)=>{var t=Br(),o=TypeError;n.exports=function(d){if(t(d))throw o("Can't call method on "+d);return d}}),rr=i$1((e82,n)=>{var t=yt(),o=Or();n.exports=function(d){return t(o(d))}}),Ua=i$1((e82,n)=>{var t=typeof document=="object"&&document.all,o=typeof t>"u"&&t!==void 0;n.exports={all:t,IS_HTMLDDA:o}}),b=i$1((e82,n)=>{var t=Ua(),o=t.all;n.exports=t.IS_HTMLDDA?function(d){return typeof d=="function"||d===o}:function(d){return typeof d=="function"}}),L=i$1((e82,n)=>{var t=b(),o=Ua(),d=o.all;n.exports=o.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:t(r)||r===d}:function(r){return typeof r=="object"?r!==null:t(r)}}),k=i$1((e82,n)=>{var t=I(),o=b(),d=function(r){return o(r)?r:void 0};n.exports=function(r,a){return arguments.length<2?d(t[r]):t[r]&&t[r][a]}}),xr=i$1((e82,n)=>{var t=q();n.exports=t({}.isPrototypeOf)}),Gr=i$1((e82,n)=>{n.exports=typeof navigator<"u"&&String(navigator.userAgent)||""}),be=i$1((e82,n)=>{var t=I(),o=Gr(),d=t.process,r=t.Deno,a=d&&d.versions||r&&r.version,u=a&&a.v8,l,s;u&&(l=u.split("."),s=l[0]>0&&l[0]<4?1:+(l[0]+l[1])),!s&&o&&(l=o.match(/Edge\/(\d+)/),(!l||l[1]>=74)&&(l=o.match(/Chrome\/(\d+)/),l&&(s=+l[1]))),n.exports=s}),Ga=i$1((e82,n)=>{var t=be(),o=y();n.exports=!!Object.getOwnPropertySymbols&&!o(function(){var d=Symbol();return!String(d)||!(Object(d)instanceof Symbol)||!Symbol.sham&&t&&t<41})}),$a=i$1((e82,n)=>{var t=Ga();n.exports=t&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),mt=i$1((e82,n)=>{var t=k(),o=b(),d=xr(),r=$a(),a=Object;n.exports=r?function(u){return typeof u=="symbol"}:function(u){var l=t("Symbol");return o(l)&&d(l.prototype,a(u))}}),re=i$1((e82,n)=>{var t=String;n.exports=function(o){try{return t(o)}catch{return"Object"}}}),Rr=i$1((e82,n)=>{var t=b(),o=re(),d=TypeError;n.exports=function(r){if(t(r))return r;throw d(o(r)+" is not a function")}}),Et=i$1((e82,n)=>{var t=Rr(),o=Br();n.exports=function(d,r){var a=d[r];return o(a)?void 0:t(a)}}),cs=i$1((e82,n)=>{var t=C(),o=b(),d=L(),r=TypeError;n.exports=function(a,u){var l,s;if(u==="string"&&o(l=a.toString)&&!d(s=t(l,a))||o(l=a.valueOf)&&!d(s=t(l,a))||u!=="string"&&o(l=a.toString)&&!d(s=t(l,a)))return s;throw r("Can't convert object to primitive value")}}),cr=i$1((e82,n)=>{n.exports=!1}),St=i$1((e82,n)=>{var t=I(),o=Object.defineProperty;n.exports=function(d,r){try{o(t,d,{value:r,configurable:!0,writable:!0})}catch{t[d]=r}return r}}),It=i$1((e82,n)=>{var t=I(),o=St(),d="__core-js_shared__",r=t[d]||o(d,{});n.exports=r}),Ka=i$1((e82,n)=>{var t=cr(),o=It();(n.exports=function(d,r){return o[d]||(o[d]=r!==void 0?r:{})})("versions",[]).push({version:"3.27.2",mode:t?"pure":"global",copyright:"\xA9 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",source:"https://github.com/zloirock/core-js"})}),dr=i$1((e82,n)=>{var t=Or(),o=Object;n.exports=function(d){return o(t(d))}}),O=i$1((e82,n)=>{var t=q(),o=dr(),d=t({}.hasOwnProperty);n.exports=Object.hasOwn||function(r,a){return d(o(r),a)}}),ee=i$1((e82,n)=>{var t=q(),o=0,d=Math.random(),r=t(1 .toString);n.exports=function(a){return"Symbol("+(a===void 0?"":a)+")_"+r(++o+d,36)}}),R=i$1((e82,n)=>{var t=I(),o=Ka(),d=O(),r=ee(),a=Ga(),u=$a(),l=t.Symbol,s=o("wks"),f=u?l.for||l:l&&l.withoutSetter||r;n.exports=function(c){return d(s,c)||(s[c]=a&&d(l,c)?l[c]:f("Symbol."+c)),s[c]}}),Ya=i$1((e82,n)=>{var t=C(),o=L(),d=mt(),r=Et(),a=cs(),u=R(),l=TypeError,s=u("toPrimitive");n.exports=function(f,c){if(!o(f)||d(f))return f;var p=r(f,s),S;if(p){if(c===void 0&&(c="default"),S=t(p,f,c),!o(S)||d(S))return S;throw l("Can't convert object to primitive value")}return c===void 0&&(c="number"),a(f,c)}}),At=i$1((e82,n)=>{var t=Ya(),o=mt();n.exports=function(d){var r=t(d,"string");return o(r)?r:r+""}}),Te=i$1((e82,n)=>{var t=I(),o=L(),d=t.document,r=o(d)&&o(d.createElement);n.exports=function(a){return r?d.createElement(a):{}}}),Qa=i$1((e82,n)=>{var t=x(),o=y(),d=Te();n.exports=!t&&!o(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!=7})}),Ja=i$1(e82=>{var n=x(),t=C(),o=Ma(),d=vr(),r=rr(),a=At(),u=O(),l=Qa(),s=Object.getOwnPropertyDescriptor;e82.f=n?s:function(f,c){if(f=r(f),c=a(c),l)try{return s(f,c)}catch{}if(u(f,c))return d(!t(o.f,f,c),f[c])}}),Za=i$1((e82,n)=>{var t=x(),o=y();n.exports=t&&o(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})}),D=i$1((e82,n)=>{var t=L(),o=String,d=TypeError;n.exports=function(r){if(t(r))return r;throw d(o(r)+" is not an object")}}),w=i$1(e82=>{var n=x(),t=Qa(),o=Za(),d=D(),r=At(),a=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,s="enumerable",f="configurable",c="writable";e82.f=n?o?function(p,S,m){if(d(p),S=r(S),d(m),typeof p=="function"&&S==="prototype"&&"value"in m&&c in m&&!m[c]){var N=l(p,S);N&&N[c]&&(p[S]=m.value,m={configurable:f in m?m[f]:N[f],enumerable:s in m?m[s]:N[s],writable:!1})}return u(p,S,m)}:u:function(p,S,m){if(d(p),S=r(S),d(m),t)try{return u(p,S,m)}catch{}if("get"in m||"set"in m)throw a("Accessors not supported");return"value"in m&&(p[S]=m.value),p}}),tr=i$1((e82,n)=>{var t=x(),o=w(),d=vr();n.exports=t?function(r,a,u){return o.f(r,a,d(1,u))}:function(r,a,u){return r[a]=u,r}}),un=i$1((e82,n)=>{var t=x(),o=O(),d=Function.prototype,r=t&&Object.getOwnPropertyDescriptor,a=o(d,"name"),u=a&&function(){}.name==="something",l=a&&(!t||t&&r(d,"name").configurable);n.exports={EXISTS:a,PROPER:u,CONFIGURABLE:l}}),vn=i$1((e82,n)=>{var t=q(),o=b(),d=It(),r=t(Function.toString);o(d.inspectSource)||(d.inspectSource=function(a){return r(a)}),n.exports=d.inspectSource}),Gs=i$1((e82,n)=>{var t=I(),o=b(),d=t.WeakMap;n.exports=o(d)&&/native code/.test(String(d))}),Tt=i$1((e82,n)=>{var t=Ka(),o=ee(),d=t("keys");n.exports=function(r){return d[r]||(d[r]=o(r))}}),Oe=i$1((e82,n)=>{n.exports={}}),qr=i$1((e82,n)=>{var t=Gs(),o=I(),d=L(),r=tr(),a=O(),u=It(),l=Tt(),s=Oe(),f="Object already initialized",c=o.TypeError,p=o.WeakMap,S,m,N,E=function(v){return N(v)?m(v):S(v,{})},P=function(v){return function(M){var _;if(!d(M)||(_=m(M)).type!==v)throw c("Incompatible receiver, "+v+" required");return _}};t||u.state?(F=u.state||(u.state=new p),F.get=F.get,F.has=F.has,F.set=F.set,S=function(v,M){if(F.has(v))throw c(f);return M.facade=v,F.set(v,M),M},m=function(v){return F.get(v)||{}},N=function(v){return F.has(v)}):(J=l("state"),s[J]=!0,S=function(v,M){if(a(v,J))throw c(f);return M.facade=v,r(v,J,M),M},m=function(v){return a(v,J)?v[J]:{}},N=function(v){return a(v,J)});var F,J;n.exports={set:S,get:m,has:N,enforce:E,getterFor:P}}),dn=i$1((e82,n)=>{var t=q(),o=y(),d=b(),r=O(),a=x(),u=un().CONFIGURABLE,l=vn(),s=qr(),f=s.enforce,c=s.get,p=String,S=Object.defineProperty,m=t("".slice),N=t("".replace),E=t([].join),P=a&&!o(function(){return S(function(){},"length",{value:8}).length!==8}),F=String(String).split("String"),J=n.exports=function(v,M,_){m(p(M),0,7)==="Symbol("&&(M="["+N(p(M),/^Symbol\(([^)]*)\)/,"$1")+"]"),_&&_.getter&&(M="get "+M),_&&_.setter&&(M="set "+M),(!r(v,"name")||u&&v.name!==M)&&(a?S(v,"name",{value:M,configurable:!0}):v.name=M),P&&_&&r(_,"arity")&&v.length!==_.arity&&S(v,"length",{value:_.arity});try{_&&r(_,"constructor")&&_.constructor?a&&S(v,"prototype",{writable:!1}):v.prototype&&(v.prototype=void 0)}catch{}var X=f(v);return r(X,"source")||(X.source=E(F,typeof M=="string"?M:"")),v};Function.prototype.toString=J(function(){return d(this)&&c(this).source||l(this)},"toString")}),V=i$1((e82,n)=>{var t=b(),o=w(),d=dn(),r=St();n.exports=function(a,u,l,s){s||(s={});var f=s.enumerable,c=s.name!==void 0?s.name:u;if(t(l)&&d(l,c,s),s.global)f?a[u]=l:r(u,l);else{try{s.unsafe?a[u]&&(f=!0):delete a[u]}catch{}f?a[u]=l:o.f(a,u,{value:l,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return a}}),rv=i$1((e82,n)=>{var t=Math.ceil,o=Math.floor;n.exports=Math.trunc||function(d){var r=+d;return(r>0?o:t)(r)}}),nr=i$1((e82,n)=>{var t=rv();n.exports=function(o){var d=+o;return d!==d||d===0?0:t(d)}}),Pt=i$1((e82,n)=>{var t=nr(),o=Math.max,d=Math.min;n.exports=function(r,a){var u=t(r);return u<0?o(u+a,0):d(u,a)}}),nv=i$1((e82,n)=>{var t=nr(),o=Math.min;n.exports=function(d){return d>0?o(t(d),9007199254740991):0}}),U=i$1((e82,n)=>{var t=nv();n.exports=function(o){return t(o.length)}}),sv=i$1((e82,n)=>{var t=rr(),o=Pt(),d=U(),r=function(a){return function(u,l,s){var f=t(u),c=d(f),p=o(s,c),S;if(a&&l!=l){for(;c>p;)if(S=f[p++],S!=S)return!0}else for(;c>p;p++)if((a||p in f)&&f[p]===l)return a||p||0;return!a&&-1}};n.exports={includes:r(!0),indexOf:r(!1)}}),yn=i$1((e82,n)=>{var t=q(),o=O(),d=rr(),r=sv().indexOf,a=Oe(),u=t([].push);n.exports=function(l,s){var f=d(l),c=0,p=[],S;for(S in f)!o(a,S)&&o(f,S)&&u(p,S);for(;s.length>c;)o(f,S=s[c++])&&(~r(p,S)||u(p,S));return p}}),_t=i$1((e82,n)=>{n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),Ct=i$1(e82=>{var n=yn(),t=_t(),o=t.concat("length","prototype");e82.f=Object.getOwnPropertyNames||function(d){return n(d,o)}}),gn=i$1(e82=>{e82.f=Object.getOwnPropertySymbols}),dv=i$1((e82,n)=>{var t=k(),o=q(),d=Ct(),r=gn(),a=D(),u=o([].concat);n.exports=t("Reflect","ownKeys")||function(l){var s=d.f(a(l)),f=r.f;return f?u(s,f(l)):s}}),Lt=i$1((e82,n)=>{var t=O(),o=dv(),d=Ja(),r=w();n.exports=function(a,u,l){for(var s=o(u),f=r.f,c=d.f,p=0;p<s.length;p++){var S=s[p];!t(a,S)&&!(l&&t(l,S))&&f(a,S,c(u,S))}}}),mn=i$1((e82,n)=>{var t=y(),o=b(),d=/#|\.prototype\./,r=function(f,c){var p=u[a(f)];return p==s?!0:p==l?!1:o(c)?t(c):!!c},a=r.normalize=function(f){return String(f).replace(d,".").toLowerCase()},u=r.data={},l=r.NATIVE="N",s=r.POLYFILL="P";n.exports=r}),g=i$1((e82,n)=>{var t=I(),o=Ja().f,d=tr(),r=V(),a=St(),u=Lt(),l=mn();n.exports=function(s,f){var c=s.target,p=s.global,S=s.stat,m,N,E,P,F,J;if(p?N=t:S?N=t[c]||a(c,{}):N=(t[c]||{}).prototype,N)for(E in f){if(F=f[E],s.dontCallGetSet?(J=o(N,E),P=J&&J.value):P=N[E],m=l(p?E:c+(S?".":"#")+E,s.forced),!m&&P!==void 0){if(typeof F==typeof P)continue;u(F,P)}(s.sham||P&&P.sham)&&d(F,"sham",!0),r(N,E,F,s)}}}),we=i$1((e82,n)=>{var t=Ae(),o=Function.prototype,d=o.apply,r=o.call;n.exports=typeof Reflect=="object"&&Reflect.apply||(t?r.bind(d):function(){return r.apply(d,arguments)})}),Tv=i$1((e82,n)=>{var t=b(),o=String,d=TypeError;n.exports=function(r){if(typeof r=="object"||t(r))return r;throw d("Can't set "+o(r)+" as a prototype")}}),ae=i$1((e82,n)=>{var t=q(),o=D(),d=Tv();n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,a={},u;try{u=t(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),u(a,[]),r=a instanceof Array}catch{}return function(l,s){return o(l),d(s),r?u(l,s):l.__proto__=s,l}}():void 0)}),Rv=i$1((e82,n)=>{var t=w().f;n.exports=function(o,d,r){r in o||t(o,r,{configurable:!0,get:function(){return d[r]},set:function(a){d[r]=a}})}}),Dt=i$1((e82,n)=>{var t=b(),o=L(),d=ae();n.exports=function(r,a,u){var l,s;return d&&t(l=a.constructor)&&l!==u&&o(s=l.prototype)&&s!==u.prototype&&d(r,s),r}}),Mt=i$1((e82,n)=>{var t=R(),o=t("toStringTag"),d={};d[o]="z",n.exports=String(d)==="[object z]"}),yr=i$1((e82,n)=>{var t=Mt(),o=b(),d=jr(),r=R(),a=r("toStringTag"),u=Object,l=d(function(){return arguments}())=="Arguments",s=function(f,c){try{return f[c]}catch{}};n.exports=t?d:function(f){var c,p,S;return f===void 0?"Undefined":f===null?"Null":typeof(p=s(c=u(f),a))=="string"?p:l?d(c):(S=d(c))=="Object"&&o(c.callee)?"Arguments":S}}),G=i$1((e82,n)=>{var t=yr(),o=String;n.exports=function(d){if(t(d)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return o(d)}}),ne=i$1((e82,n)=>{var t=G();n.exports=function(o,d){return o===void 0?arguments.length<2?"":d:t(o)}}),Sn=i$1((e82,n)=>{var t=L(),o=tr();n.exports=function(d,r){t(r)&&"cause"in r&&o(d,"cause",r.cause)}}),Ft=i$1((e82,n)=>{var t=q(),o=Error,d=t("".replace),r=function(l){return String(o(l).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,u=a.test(r);n.exports=function(l,s){if(u&&typeof l=="string"&&!o.prepareStackTrace)for(;s--;)l=d(l,a,"");return l}}),In=i$1((e82,n)=>{var t=y(),o=vr();n.exports=!t(function(){var d=Error("a");return"stack"in d?(Object.defineProperty(d,"stack",o(1,7)),d.stack!==7):!0})}),An=i$1((e82,n)=>{var t=tr(),o=Ft(),d=In(),r=Error.captureStackTrace;n.exports=function(a,u,l,s){d&&(r?r(a,u):t(a,"stack",o(l,s)))}}),bn=i$1((e82,n)=>{var t=k(),o=O(),d=tr(),r=xr(),a=ae(),u=Lt(),l=Rv(),s=Dt(),f=ne(),c=Sn(),p=An(),S=x(),m=cr();n.exports=function(N,E,P,F){var J="stackTraceLimit",v=F?2:1,M=N.split("."),_=M[M.length-1],X=t.apply(null,M);if(X){var Q=X.prototype;if(!m&&o(Q,"cause")&&delete Q.cause,!P)return X;var Z=t("Error"),H=E(function(ue,fe){var te=f(F?fe:ue,void 0),j=F?new X(ue):new X;return te!==void 0&&d(j,"message",te),p(j,H,j.stack,2),this&&r(Q,this)&&s(j,this,H),arguments.length>v&&c(j,arguments[v]),j});if(H.prototype=Q,_!=="Error"?a?a(H,Z):u(H,Z,{name:!0}):S&&J in X&&(l(H,X,J),l(H,X,"prepareStackTrace")),u(H,X),!m)try{Q.name!==_&&d(Q,"name",_),Q.constructor=H}catch{}return H}}}),xn=i$1(()=>{var e82=g(),n=I(),t=we(),o=bn(),d="WebAssembly",r=n[d],a=Error("e",{cause:7}).cause!==7,u=function(s,f){var c={};c[s]=o(s,f,a),e82({global:!0,constructor:!0,arity:1,forced:a},c)},l=function(s,f){if(r&&r[s]){var c={};c[s]=o(d+"."+s,f,a),e82({target:d,stat:!0,constructor:!0,arity:1,forced:a},c)}};u("Error",function(s){return function(f){return t(s,this,arguments)}}),u("EvalError",function(s){return function(f){return t(s,this,arguments)}}),u("RangeError",function(s){return function(f){return t(s,this,arguments)}}),u("ReferenceError",function(s){return function(f){return t(s,this,arguments)}}),u("SyntaxError",function(s){return function(f){return t(s,this,arguments)}}),u("TypeError",function(s){return function(f){return t(s,this,arguments)}}),u("URIError",function(s){return function(f){return t(s,this,arguments)}}),l("CompileError",function(s){return function(f){return t(s,this,arguments)}}),l("LinkError",function(s){return function(f){return t(s,this,arguments)}}),l("RuntimeError",function(s){return function(f){return t(s,this,arguments)}})}),Ut=i$1((e82,n)=>{var t=yn(),o=_t();n.exports=Object.keys||function(d){return t(d,o)}}),ec=i$1(e82=>{var n=x(),t=Za(),o=w(),d=D(),r=rr(),a=Ut();e82.f=n&&!t?Object.defineProperties:function(u,l){d(u);for(var s=r(l),f=a(l),c=f.length,p=0,S;c>p;)o.f(u,S=f[p++],s[S]);return u}}),Rn=i$1((e82,n)=>{var t=k();n.exports=t("document","documentElement")}),gr=i$1((e82,n)=>{var t=D(),o=ec(),d=_t(),r=Oe(),a=Rn(),u=Te(),l=Tt(),s=">",f="<",c="prototype",p="script",S=l("IE_PROTO"),m=function(){},N=function(v){return f+p+s+v+f+"/"+p+s},E=function(v){v.write(N("")),v.close();var M=v.parentWindow.Object;return v=null,M},P=function(){var v=u("iframe"),M="java"+p+":",_;return v.style.display="none",a.appendChild(v),v.src=String(M),_=v.contentWindow.document,_.open(),_.write(N("document.F=Object")),_.close(),_.F},F,J=function(){try{F=new ActiveXObject("htmlfile")}catch{}J=typeof document<"u"?document.domain&&F?E(F):P():E(F);for(var v=d.length;v--;)delete J[c][d[v]];return J()};r[S]=!0,n.exports=Object.create||function(v,M){var _;return v!==null?(m[c]=t(v),_=new m,m[c]=null,_[S]=v):_=J(),M===void 0?_:o.f(_,M)}}),Cn=i$1((e82,n)=>{var t=x(),o=y(),d=D(),r=gr(),a=ne(),u=Error.prototype.toString,l=o(function(){if(t){var s=r(Object.defineProperty({},"name",{get:function(){return this===s}}));if(u.call(s)!=="true")return!0}return u.call({message:1,name:2})!=="2: 1"||u.call({})!=="Error"});n.exports=l?function(){var s=d(this),f=a(s.name,"Error"),c=a(s.message);return f?c?f+": "+c:f:c}:u}),ie=i$1(()=>{var e82=V(),n=Cn(),t=Error.prototype;t.toString!==n&&e82(t,"toString",n)}),W=i$1((e82,n)=>{var t=I();n.exports=t}),qc=i$1((e82,n)=>{xn(),ie();var t=W();n.exports=t}),gc=i$1((e82,n)=>{var t=qc();n.exports=t}),Ec=i$1((e82,n)=>{var t=gc();n.exports=t}),Ic=i$1((e82,n)=>{var t=Ec();n.exports=t}),bc=i$1((e82,n)=>{var t=y();n.exports=!t(function(){function o(){}return o.prototype.constructor=null,Object.getPrototypeOf(new o)!==o.prototype})}),Pe=i$1((e82,n)=>{var t=O(),o=b(),d=dr(),r=Tt(),a=bc(),u=r("IE_PROTO"),l=Object,s=l.prototype;n.exports=a?l.getPrototypeOf:function(f){var c=d(f);if(t(c,u))return c[u];var p=c.constructor;return o(p)&&c instanceof p?p.prototype:c instanceof l?s:null}}),Dn=i$1((e82,n)=>{var t=jr(),o=q();n.exports=function(d){if(t(d)==="Function")return o(d)}}),wr=i$1((e82,n)=>{var t=Dn(),o=Rr(),d=Ae(),r=t(t.bind);n.exports=function(a,u){return o(a),u===void 0?a:d?r(a,u):function(){return a.apply(u,arguments)}}}),oe=i$1((e82,n)=>{n.exports={}}),Mn=i$1((e82,n)=>{var t=R(),o=oe(),d=t("iterator"),r=Array.prototype;n.exports=function(a){return a!==void 0&&(o.Array===a||r[d]===a)}}),_e=i$1((e82,n)=>{var t=yr(),o=Et(),d=Br(),r=oe(),a=R(),u=a("iterator");n.exports=function(l){if(!d(l))return o(l,u)||o(l,"@@iterator")||r[t(l)]}}),$t=i$1((e82,n)=>{var t=C(),o=Rr(),d=D(),r=re(),a=_e(),u=TypeError;n.exports=function(l,s){var f=arguments.length<2?a(l):s;if(o(f))return d(t(f,l));throw u(r(l)+" is not iterable")}}),Nn=i$1((e82,n)=>{var t=C(),o=D(),d=Et();n.exports=function(r,a,u){var l,s;o(r);try{if(l=d(r,"return"),!l){if(a==="throw")throw u;return u}l=t(l,r)}catch(f){s=!0,l=f}if(a==="throw")throw u;if(s)throw l;return o(l),u}}),Ce=i$1((e82,n)=>{var t=wr(),o=C(),d=D(),r=re(),a=Mn(),u=U(),l=xr(),s=$t(),f=_e(),c=Nn(),p=TypeError,S=function(N,E){this.stopped=N,this.result=E},m=S.prototype;n.exports=function(N,E,P){var F=P&&P.that,J=!!(P&&P.AS_ENTRIES),v=!!(P&&P.IS_RECORD),M=!!(P&&P.IS_ITERATOR),_=!!(P&&P.INTERRUPTED),X=t(E,F),Q,Z,H,ue,fe,te,j,ke=function(ve){return Q&&c(Q,"normal",ve),new S(!0,ve)},le=function(ve){return J?(d(ve),_?X(ve[0],ve[1],ke):X(ve[0],ve[1])):_?X(ve,ke):X(ve)};if(v)Q=N.iterator;else if(M)Q=N;else{if(Z=f(N),!Z)throw p(r(N)+" is not iterable");if(a(Z)){for(H=0,ue=u(N);ue>H;H++)if(fe=le(N[H]),fe&&l(m,fe))return fe;return new S(!1)}Q=s(N,Z)}for(te=v?N.next:Q.next;!(j=o(te,Q)).done;){try{fe=le(j.value)}catch(ve){c(Q,"throw",ve)}if(typeof fe=="object"&&fe&&l(m,fe))return fe}return new S(!1)}}),Gc=i$1(()=>{var e82=g(),n=xr(),t=Pe(),o=ae(),d=Lt(),r=gr(),a=tr(),u=vr(),l=Sn(),s=An(),f=Ce(),c=ne(),p=R(),S=p("toStringTag"),m=Error,N=[].push,E=function(F,J){var v=n(P,this),M;o?M=o(m(),v?t(this):P):(M=v?this:r(P),a(M,S,"Error")),J!==void 0&&a(M,"message",c(J)),s(M,E,M.stack,1),arguments.length>2&&l(M,arguments[2]);var _=[];return f(F,N,{that:_}),a(M,"errors",_),M};o?o(E,m):d(E,m,{name:!0});var P=E.prototype=r(m.prototype,{constructor:u(1,E),message:u(1,""),name:u(1,"AggregateError")});e82({global:!0,constructor:!0,arity:2},{AggregateError:E})}),jn=i$1(()=>{Gc()}),Bn=i$1(()=>{jn()}),Wc=i$1(()=>{var e82=g(),n=k(),t=we(),o=y(),d=bn(),r="AggregateError",a=n(r),u=!o(function(){return a([1]).errors[0]!==1})&&o(function(){return a([1],r,{cause:7}).cause!==7});e82({global:!0,constructor:!0,arity:2,forced:u},{AggregateError:d(r,function(l){return function(s,f){return t(l,this,arguments)}},u,!0)})}),Pr=i$1((e82,n)=>{var t=R(),o=gr(),d=w().f,r=t("unscopables"),a=Array.prototype;a[r]==null&&d(a,r,{configurable:!0,value:o(null)}),n.exports=function(u){a[r][u]=!0}}),zn=i$1((e82,n)=>{var t=y(),o=b(),d=L(),r=gr(),a=Pe(),u=V(),l=R(),s=cr(),f=l("iterator"),c=!1,p,S,m;[].keys&&(m=[].keys(),"next"in m?(S=a(a(m)),S!==Object.prototype&&(p=S)):c=!0);var N=!d(p)||t(function(){var E={};return p[f].call(E)!==E});N?p={}:s&&(p=r(p)),o(p[f])||u(p,f,function(){return this}),n.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:c}}),Vr=i$1((e82,n)=>{var t=w().f,o=O(),d=R(),r=d("toStringTag");n.exports=function(a,u,l){a&&!l&&(a=a.prototype),a&&!o(a,r)&&t(a,r,{configurable:!0,value:u})}}),Yn=i$1((e82,n)=>{var t=zn().IteratorPrototype,o=gr(),d=vr(),r=Vr(),a=oe(),u=function(){return this};n.exports=function(l,s,f,c){var p=s+" Iterator";return l.prototype=o(t,{next:d(+!c,f)}),r(l,p,!1,!0),a[p]=u,l}}),Yt=i$1((e82,n)=>{var t=g(),o=C(),d=cr(),r=un(),a=b(),u=Yn(),l=Pe(),s=ae(),f=Vr(),c=tr(),p=V(),S=R(),m=oe(),N=zn(),E=r.PROPER,P=r.CONFIGURABLE,F=N.IteratorPrototype,J=N.BUGGY_SAFARI_ITERATORS,v=S("iterator"),M="keys",_="values",X="entries",Q=function(){return this};n.exports=function(Z,H,ue,fe,te,j,ke){u(ue,H,fe);var le=function(We){if(We===te&&Ee)return Ee;if(!J&&We in Re)return Re[We];switch(We){case M:return function(){return new ue(this,We)};case _:return function(){return new ue(this,We)};case X:return function(){return new ue(this,We)}}return function(){return new ue(this)}},ve=H+" Iterator",pe=!1,Re=Z.prototype,ye=Re[v]||Re["@@iterator"]||te&&Re[te],Ee=!J&&ye||le(te),xe=H=="Array"&&Re.entries||ye,qe,He,Ze;if(xe&&(qe=l(xe.call(new Z)),qe!==Object.prototype&&qe.next&&(!d&&l(qe)!==F&&(s?s(qe,F):a(qe[v])||p(qe,v,Q)),f(qe,ve,!0,!0),d&&(m[ve]=Q))),E&&te==_&&ye&&ye.name!==_&&(!d&&P?c(Re,"name",_):(pe=!0,Ee=function(){return o(ye,this)})),te)if(He={values:le(_),keys:j?Ee:le(M),entries:le(X)},ke)for(Ze in He)(J||pe||!(Ze in Re))&&p(Re,Ze,He[Ze]);else t({target:H,proto:!0,forced:J||pe},He);return(!d||ke)&&Re[v]!==Ee&&p(Re,v,Ee,{name:te}),m[H]=Ee,He}}),Xt=i$1((e82,n)=>{n.exports=function(t,o){return{value:t,done:o}}}),Me=i$1((e82,n)=>{var t=rr(),o=Pr(),d=oe(),r=qr(),a=w().f,u=Yt(),l=Xt(),s=cr(),f=x(),c="Array Iterator",p=r.set,S=r.getterFor(c);n.exports=u(Array,"Array",function(N,E){p(this,{type:c,target:t(N),index:0,kind:E})},function(){var N=S(this),E=N.target,P=N.kind,F=N.index++;return!E||F>=E.length?(N.target=void 0,l(void 0,!0)):P=="keys"?l(F,!1):P=="values"?l(E[F],!1):l([F,E[F]],!1)},"values");var m=d.Arguments=d.Array;if(o("keys"),o("values"),o("entries"),!s&&f&&m.name!=="values")try{a(m,"name",{value:"values"})}catch{}}),Jt=i$1((e82,n)=>{var t=q(),o=nr(),d=G(),r=Or(),a=t("".charAt),u=t("".charCodeAt),l=t("".slice),s=function(f){return function(c,p){var S=d(r(c)),m=o(p),N=S.length,E,P;return m<0||m>=N?f?"":void 0:(E=u(S,m),E<55296||E>56319||m+1===N||(P=u(S,m+1))<56320||P>57343?f?a(S,m):E:f?l(S,m,m+2):(E-55296<<10)+(P-56320)+65536)}};n.exports={codeAt:s(!1),charAt:s(!0)}}),Zn=i$1(()=>{var e82=Jt().charAt,n=G(),t=qr(),o=Yt(),d=Xt(),r="String Iterator",a=t.set,u=t.getterFor(r);o(String,"String",function(l){a(this,{type:r,string:n(l),index:0})},function(){var l=u(this),s=l.string,f=l.index,c;return f>=s.length?d(void 0,!0):(c=e82(s,f),l.index+=c.length,d(c,!1))})}),bf=i$1((e82,n)=>{xn(),jn(),Wc(),Me(),Zn();var t=W();n.exports=t.AggregateError}),Of=i$1((e82,n)=>{n.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),wf=i$1((e82,n)=>{var t=Te(),o=t("span").classList,d=o&&o.constructor&&o.constructor.prototype;n.exports=d===Object.prototype?void 0:d}),ni=i$1(()=>{var e82=I(),n=Of(),t=wf(),o=Me(),d=tr(),r=R(),a=r("iterator"),u=r("toStringTag"),l=o.values,s=function(c,p){if(c){if(c[a]!==l)try{d(c,a,l)}catch{c[a]=l}if(c[u]||d(c,u,p),n[p]){for(var S in o)if(c[S]!==o[S])try{d(c,S,o[S])}catch{c[S]=o[S]}}}};for(f in n)s(e82[f]&&e82[f].prototype,f);var f;s(t,"DOMTokenList")}),Nf=i$1((e82,n)=>{Bn();var t=bf();ni(),n.exports=t}),kf=i$1((e82,n)=>{var t=Nf();n.exports=t}),jf=i$1((e82,n)=>{Bn();var t=kf();n.exports=t}),ii=i$1(()=>{var e82=g(),n=dr(),t=U(),o=nr(),d=Pr();e82({target:"Array",proto:!0},{at:function(r){var a=n(this),u=t(a),l=o(r),s=l>=0?l:u+l;return s<0||s>=u?void 0:a[s]}}),d("at")}),K=i$1((e82,n)=>{var t=I(),o=q();n.exports=function(d,r){return o(t[d].prototype[r])}}),$f=i$1((e82,n)=>{ii();var t=K();n.exports=t("Array","at")}),Vf=i$1((e82,n)=>{var t=$f();n.exports=t}),Kf=i$1((e82,n)=>{var t=Vf();n.exports=t}),zf=i$1(()=>{ii()}),Xf=i$1((e82,n)=>{var t=Kf();zf(),n.exports=t}),Fe=i$1((e82,n)=>{var t=wr(),o=yt(),d=dr(),r=U(),a=function(u){var l=u==1;return function(s,f,c){for(var p=d(s),S=o(p),m=t(f,c),N=r(S),E,P;N-- >0;)if(E=S[N],P=m(E,N,p),P)switch(u){case 0:return E;case 1:return N}return l?-1:void 0}};n.exports={findLast:a(0),findLastIndex:a(1)}}),oi=i$1(()=>{var e82=g(),n=Fe().findLast,t=Pr();e82({target:"Array",proto:!0},{findLast:function(o){return n(this,o,arguments.length>1?arguments[1]:void 0)}}),t("findLast")}),Zf=i$1(()=>{oi()}),el=i$1((e82,n)=>{oi();var t=K();n.exports=t("Array","findLast")}),al=i$1((e82,n)=>{n.exports=el()}),il=i$1((e82,n)=>{Zf();var t=al();n.exports=t}),ul=i$1((e82,n)=>{var t=il();n.exports=t}),ui=i$1(()=>{var e82=g(),n=Fe().findLastIndex,t=Pr();e82({target:"Array",proto:!0},{findLastIndex:function(o){return n(this,o,arguments.length>1?arguments[1]:void 0)}}),t("findLastIndex")}),sl=i$1(()=>{ui()}),cl=i$1((e82,n)=>{ui();var t=K();n.exports=t("Array","findLastIndex")}),ll=i$1((e82,n)=>{n.exports=cl()}),hl=i$1((e82,n)=>{sl();var t=ll();n.exports=t}),ql=i$1((e82,n)=>{var t=hl();n.exports=t}),si=i$1((e82,n)=>{var t=U();n.exports=function(o,d){for(var r=t(o),a=new d(r),u=0;u<r;u++)a[u]=o[r-u-1];return a}}),gl=i$1(()=>{var e82=g(),n=si(),t=rr(),o=Pr(),d=Array;e82({target:"Array",proto:!0},{toReversed:function(){return n(t(this),d)}}),o("toReversed")}),El=i$1((e82,n)=>{gl();var t=K();n.exports=t("Array","toReversed")}),Al=i$1((e82,n)=>{var t=re(),o=TypeError;n.exports=function(d,r){if(!delete d[r])throw o("Cannot delete property "+t(r)+" of "+t(d))}}),ra=i$1((e82,n)=>{var t=At(),o=w(),d=vr();n.exports=function(r,a,u){var l=t(a);l in r?o.f(r,l,d(0,u)):r[l]=u}}),ea=i$1((e82,n)=>{var t=Pt(),o=U(),d=ra(),r=Array,a=Math.max;n.exports=function(u,l,s){for(var f=o(u),c=t(l,f),p=t(s===void 0?f:s,f),S=r(a(p-c,0)),m=0;c<p;c++,m++)d(S,m,u[c]);return S.length=m,S}}),ta=i$1((e82,n)=>{var t=ea(),o=Math.floor,d=function(u,l){var s=u.length,f=o(s/2);return s<8?r(u,l):a(u,d(t(u,0,f),l),d(t(u,f),l),l)},r=function(u,l){for(var s=u.length,f=1,c,p;f<s;){for(p=f,c=u[f];p&&l(u[p-1],c)>0;)u[p]=u[--p];p!==f++&&(u[p]=c)}return u},a=function(u,l,s,f){for(var c=l.length,p=s.length,S=0,m=0;S<c||m<p;)u[S+m]=S<c&&m<p?f(l[S],s[m])<=0?l[S++]:s[m++]:S<c?l[S++]:s[m++];return u};n.exports=d}),Pl=i$1((e82,n)=>{var t=y();n.exports=function(o,d){var r=[][o];return!!r&&t(function(){r.call(null,d||function(){return 1},1)})}}),ci=i$1((e82,n)=>{var t=Gr(),o=t.match(/firefox\/(\d+)/i);n.exports=!!o&&+o[1]}),fi=i$1((e82,n)=>{var t=Gr();n.exports=/MSIE|Trident/.test(t)}),li=i$1((e82,n)=>{var t=Gr(),o=t.match(/AppleWebKit\/(\d+)\./);n.exports=!!o&&+o[1]}),Hl=i$1(()=>{var e82=g(),n=q(),t=Rr(),o=dr(),d=U(),r=Al(),a=G(),u=y(),l=ta(),s=Pl(),f=ci(),c=fi(),p=be(),S=li(),m=[],N=n(m.sort),E=n(m.push),P=u(function(){m.sort(void 0)}),F=u(function(){m.sort(null)}),J=s("sort"),v=!u(function(){if(p)return p<70;if(!(f&&f>3)){if(c)return!0;if(S)return S<603;var X="",Q,Z,H,ue;for(Q=65;Q<76;Q++){switch(Z=String.fromCharCode(Q),Q){case 66:case 69:case 70:case 72:H=3;break;case 68:case 71:H=4;break;default:H=2}for(ue=0;ue<47;ue++)m.push({k:Z+ue,v:H})}for(m.sort(function(fe,te){return te.v-fe.v}),ue=0;ue<m.length;ue++)Z=m[ue].k.charAt(0),X.charAt(X.length-1)!==Z&&(X+=Z);return X!=="DGBEFHACIJK"}}),M=P||!F||!J||!v,_=function(X){return function(Q,Z){return Z===void 0?-1:Q===void 0?1:X!==void 0?+X(Q,Z)||0:a(Q)>a(Z)?1:-1}};e82({target:"Array",proto:!0,forced:M},{sort:function(X){X!==void 0&&t(X);var Q=o(this);if(v)return X===void 0?N(Q):N(Q,X);var Z=[],H=d(Q),ue,fe;for(fe=0;fe<H;fe++)fe in Q&&E(Z,Q[fe]);for(l(Z,_(X)),ue=d(Z),fe=0;fe<ue;)Q[fe]=Z[fe++];for(;fe<H;)r(Q,fe++);return Q}})}),hi=i$1((e82,n)=>{var t=U();n.exports=function(o,d){for(var r=0,a=t(d),u=new o(a);a>r;)u[r]=d[r++];return u}}),Kl=i$1((e82,n)=>{var t=I();n.exports=function(o){return t[o].prototype}}),zl=i$1(()=>{var e82=g(),n=q(),t=Rr(),o=rr(),d=hi(),r=Kl(),a=Pr(),u=Array,l=n(r("Array").sort);e82({target:"Array",proto:!0},{toSorted:function(s){s!==void 0&&t(s);var f=o(this),c=d(u,f);return l(c,s)}}),a("toSorted")}),Xl=i$1((e82,n)=>{Hl(),zl();var t=K();n.exports=t("Array","toSorted")}),Jl=i$1((e82,n)=>{var t=TypeError,o=9007199254740991;n.exports=function(d){if(d>o)throw t("Maximum allowed index exceeded");return d}}),Zl=i$1(()=>{var e82=g(),n=Pr(),t=Jl(),o=U(),d=Pt(),r=rr(),a=nr(),u=Array,l=Math.max,s=Math.min;e82({target:"Array",proto:!0},{toSpliced:function(f,c){var p=r(this),S=o(p),m=d(f,S),N=arguments.length,E=0,P,F,J,v;for(N===0?P=F=0:N===1?(P=0,F=S-m):(P=N-2,F=s(l(a(c),0),S-m)),J=t(S+P-F),v=u(J);E<m;E++)v[E]=p[E];for(;E<m+P;E++)v[E]=arguments[E-m+2];for(;E<J;E++)v[E]=p[E+F-P];return v}}),n("toSpliced")}),ep=i$1((e82,n)=>{Zl();var t=K();n.exports=t("Array","toSpliced")}),di=i$1((e82,n)=>{var t=U(),o=nr(),d=RangeError;n.exports=function(r,a,u,l){var s=t(r),f=o(u),c=f<0?s+f:f;if(c>=s||c<0)throw d("Incorrect index");for(var p=new a(s),S=0;S<s;S++)p[S]=S===c?l:r[S];return p}}),ap=i$1(()=>{var e82=g(),n=di(),t=rr(),o=Array;e82({target:"Array",proto:!0},{with:function(d,r){return n(t(this),o,d,r)}})}),ip=i$1((e82,n)=>{ap();var t=K();n.exports=t("Array","with")}),yi=i$1((e82,n)=>{var t=x(),o=q(),d=C(),r=y(),a=Ut(),u=gn(),l=Ma(),s=dr(),f=yt(),c=Object.assign,p=Object.defineProperty,S=o([].concat);n.exports=!c||r(function(){if(t&&c({b:1},c(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var m={},N={},E=Symbol(),P="abcdefghijklmnopqrst";return m[E]=7,P.split("").forEach(function(F){N[F]=F}),c({},m)[E]!=7||a(c({},N)).join("")!=P})?function(m,N){for(var E=s(m),P=arguments.length,F=1,J=u.f,v=l.f;P>F;)for(var M=f(arguments[F++]),_=J?S(a(M),J(M)):a(M),X=_.length,Q=0,Z;X>Q;)Z=_[Q++],(!t||d(v,M,Z))&&(E[Z]=M[Z]);return E}:c}),cp=i$1(()=>{var e82=g(),n=yi();e82({target:"Object",stat:!0,arity:2,forced:Object.assign!==n},{assign:n})}),lp=i$1((e82,n)=>{cp();var t=W();n.exports=t.Object.assign}),hp=i$1((e82,n)=>{var t=lp();n.exports=t}),qp=i$1((e82,n)=>{var t=hp();n.exports=t}),gp=i$1((e82,n)=>{var t=qp();n.exports=t}),mp=i$1(()=>{var e82=g(),n=q(),t=Or(),o=nr(),d=G(),r=y(),a=n("".charAt),u=r(function(){return"\u{20BB7}".at(-2)!=="\uD842"});e82({target:"String",proto:!0,forced:u},{at:function(l){var s=d(t(this)),f=s.length,c=o(l),p=c>=0?c:f+c;return p<0||p>=f?void 0:a(s,p)}})}),Sp=i$1((e82,n)=>{mp();var t=K();n.exports=t("String","at")}),Ap=i$1((e82,n)=>{var t=Sp();n.exports=t}),Tp=i$1((e82,n)=>{var t=Ap();n.exports=t}),Op$1=i$1(()=>{var e82=g(),n=Jt().charAt,t=Or(),o=nr(),d=G();e82({target:"String",proto:!0,forced:!0},{at:function(r){var a=d(t(this)),u=a.length,l=o(r),s=l>=0?l:u+l;return s<0||s>=u?void 0:n(a,s)}})}),Rp=i$1((e82,n)=>{Tp(),Op$1(),n.exports=K()("String","at")}),Pp=i$1(()=>{var e82=g(),n=q(),t=Or(),o=G(),d=n("".charCodeAt);e82({target:"String",proto:!0},{isWellFormed:function(){for(var r=o(t(this)),a=r.length,u=0;u<a;u++){var l=d(r,u);if((l&63488)==55296&&(l>=56320||++u>=a||(d(r,u)&64512)!=56320))return!1}return!0}})}),Cp=i$1((e82,n)=>{Pp(),n.exports=K()("String","isWellFormed")}),Dp=i$1((e82,n)=>{var t=Cp();n.exports=t}),Np=i$1(()=>{var e82=g(),n=q(),t=Or(),o=G(),d=Array,r=n("".charAt),a=n("".charCodeAt),u=n([].join),l="\uFFFD";e82({target:"String",proto:!0},{toWellFormed:function(){for(var s=o(t(this)),f=s.length,c=d(f),p=0;p<f;p++){var S=a(s,p);(S&63488)!=55296?c[p]=r(s,p):S>=56320||p+1>=f||(a(s,p+1)&64512)!=56320?c[p]=l:(c[p]=r(s,p),c[++p]=r(s,p))}return u(c,"")}})}),kp=i$1((e82,n)=>{Np(),n.exports=K()("String","toWellFormed")}),jp=i$1((e82,n)=>{var t=kp();n.exports=t}),Gp=i$1((e82,n)=>{n.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"}),Dr=i$1((e82,n)=>{var t=Gp(),o=x(),d=I(),r=b(),a=L(),u=O(),l=yr(),s=re(),f=tr(),c=V(),p=w().f,S=xr(),m=Pe(),N=ae(),E=R(),P=ee(),F=qr(),J=F.enforce,v=F.get,M=d.Int8Array,_=M&&M.prototype,X=d.Uint8ClampedArray,Q=X&&X.prototype,Z=M&&m(M),H=_&&m(_),ue=Object.prototype,fe=d.TypeError,te=E("toStringTag"),j=P("TYPED_ARRAY_TAG"),ke="TypedArrayConstructor",le=t&&!!N&&l(d.opera)!=="Opera",ve=!1,pe,Re,ye,Ee={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},xe={BigInt64Array:8,BigUint64Array:8},qe=function(Ie){if(!a(Ie))return!1;var $e=l(Ie);return $e==="DataView"||u(Ee,$e)||u(xe,$e)},He=function(Ie){var $e=m(Ie);if(a($e)){var Ke=v($e);return Ke&&u(Ke,ke)?Ke[ke]:He($e)}},Ze=function(Ie){if(!a(Ie))return!1;var $e=l(Ie);return u(Ee,$e)||u(xe,$e)},We=function(Ie){if(Ze(Ie))return Ie;throw fe("Target is not a typed array")},Je=function(Ie){if(r(Ie)&&(!N||S(Z,Ie)))return Ie;throw fe(s(Ie)+" is not a typed array constructor")},De=function(Ie,$e,Ke,_n){if(o){if(Ke)for(var sn in Ee){var On=d[sn];if(On&&u(On.prototype,Ie))try{delete On.prototype[Ie]}catch{try{On.prototype[Ie]=$e}catch{}}}(!H[Ie]||Ke)&&c(H,Ie,Ke?$e:le&&_[Ie]||$e,_n)}},tn=function(Ie,$e,Ke){var _n,sn;if(o){if(N){if(Ke){for(_n in Ee)if(sn=d[_n],sn&&u(sn,Ie))try{delete sn[Ie]}catch{}}if(!Z[Ie]||Ke)try{return c(Z,Ie,Ke?$e:le&&Z[Ie]||$e)}catch{}else return}for(_n in Ee)sn=d[_n],sn&&(!sn[Ie]||Ke)&&c(sn,Ie,$e)}};for(pe in Ee)Re=d[pe],ye=Re&&Re.prototype,ye?J(ye)[ke]=Re:le=!1;for(pe in xe)Re=d[pe],ye=Re&&Re.prototype,ye&&(J(ye)[ke]=Re);if((!le||!r(Z)||Z===Function.prototype)&&(Z=function(){throw fe("Incorrect invocation")},le))for(pe in Ee)d[pe]&&N(d[pe],Z);if((!le||!H||H===ue)&&(H=Z.prototype,le))for(pe in Ee)d[pe]&&N(d[pe].prototype,H);if(le&&m(Q)!==H&&N(Q,H),o&&!u(H,te)){ve=!0,p(H,te,{get:function(){return a(this)?this[j]:void 0}});for(pe in Ee)d[pe]&&f(d[pe],j,pe)}n.exports={NATIVE_ARRAY_BUFFER_VIEWS:le,TYPED_ARRAY_TAG:ve&&j,aTypedArray:We,aTypedArrayConstructor:Je,exportTypedArrayMethod:De,exportTypedArrayStaticMethod:tn,getTypedArrayConstructor:He,isView:qe,isTypedArray:Ze,TypedArray:Z,TypedArrayPrototype:H}}),xi=i$1(()=>{var e82=Dr(),n=U(),t=nr(),o=e82.aTypedArray,d=e82.exportTypedArrayMethod;d("at",function(r){var a=o(this),u=n(a),l=t(r),s=l>=0?l:u+l;return s<0||s>=u?void 0:a[s]})}),rh=i$1(()=>{xi()}),th=i$1((e82,n)=>{var t=rh();n.exports=t}),nh=i$1((e82,n)=>{var t=th();n.exports=t}),ih=i$1(()=>{xi()}),uh=i$1((e82,n)=>{var t=nh();ih(),n.exports=t}),Ri=i$1(()=>{var e82=Dr(),n=Fe().findLast,t=e82.aTypedArray,o=e82.exportTypedArrayMethod;o("findLast",function(d){return n(t(this),d,arguments.length>1?arguments[1]:void 0)})}),vh=i$1(()=>{Ri()}),ch=i$1(()=>{Ri()}),lh=i$1((e82,n)=>{n.exports=ch()}),hh=i$1((e82,n)=>{vh();var t=lh();n.exports=t}),qh=i$1((e82,n)=>{var t=hh();n.exports=t}),wi=i$1(()=>{var e82=Dr(),n=Fe().findLastIndex,t=e82.aTypedArray,o=e82.exportTypedArrayMethod;o("findLastIndex",function(d){return n(t(this),d,arguments.length>1?arguments[1]:void 0)})}),gh=i$1(()=>{wi()}),mh=i$1(()=>{wi()}),Sh=i$1((e82,n)=>{n.exports=mh()}),Ah=i$1((e82,n)=>{gh();var t=Sh();n.exports=t}),Th=i$1((e82,n)=>{var t=Ah();n.exports=t}),Oh=i$1(()=>{var e82=si(),n=Dr(),t=n.aTypedArray,o=n.exportTypedArrayMethod,d=n.getTypedArrayConstructor;o("toReversed",function(){return e82(t(this),d(this))})}),xh=i$1(()=>{Oh()}),wh=i$1((e82,n)=>{var t=xh();n.exports=t}),Mh=i$1(()=>{var e82=I(),n=Dn(),t=y(),o=Rr(),d=ta(),r=Dr(),a=ci(),u=fi(),l=be(),s=li(),f=r.aTypedArray,c=r.exportTypedArrayMethod,p=e82.Uint16Array,S=p&&n(p.prototype.sort),m=!!S&&!(t(function(){S(new p(2),null)})&&t(function(){S(new p(2),{})})),N=!!S&&!t(function(){if(l)return l<74;if(a)return a<67;if(u)return!0;if(s)return s<602;var P=new p(516),F=Array(516),J,v;for(J=0;J<516;J++)v=J%4,P[J]=515-J,F[J]=J-2*v+3;for(S(P,function(M,_){return(M/4|0)-(_/4|0)}),J=0;J<516;J++)if(P[J]!==F[J])return!0}),E=function(P){return function(F,J){return P!==void 0?+P(F,J)||0:J!==J?-1:F!==F?1:F===0&&J===0?1/F>0&&1/J<0?1:-1:F>J}};c("sort",function(P){return P!==void 0&&o(P),N?S(this,P):d(f(this),E(P))},!N||m)}),Nh=i$1(()=>{var e82=Dr(),n=q(),t=Rr(),o=hi(),d=e82.aTypedArray,r=e82.getTypedArrayConstructor,a=e82.exportTypedArrayMethod,u=n(e82.TypedArrayPrototype.sort);a("toSorted",function(l){l!==void 0&&t(l);var s=d(this),f=o(r(s),s);return u(f,l)})}),Fh=i$1(()=>{Mh(),Nh()}),Uh=i$1((e82,n)=>{var t=Fh();n.exports=t}),Bh=i$1((e82,n)=>{var t=yr();n.exports=function(o){var d=t(o);return d=="BigInt64Array"||d=="BigUint64Array"}}),$h=i$1((e82,n)=>{var t=Ya(),o=TypeError;n.exports=function(d){var r=t(d,"number");if(typeof r=="number")throw o("Can't convert number to bigint");return BigInt(r)}}),Hh=i$1(()=>{var e82=di(),n=Dr(),t=Bh(),o=nr(),d=$h(),r=n.aTypedArray,a=n.getTypedArrayConstructor,u=n.exportTypedArrayMethod,l=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(s){return s===8}}();u("with",function(s,f){var c=r(this),p=o(s),S=t(c)?d(f):+f;return e82(c,a(c),p,S)},!l)}),Vh=i$1(()=>{Hh()}),Kh=i$1((e82,n)=>{var t=Vh();n.exports=t}),Yh=i$1((e82,n)=>{var t=Mt(),o=yr();n.exports=t?{}.toString:function(){return"[object "+o(this)+"]"}}),sa=i$1(()=>{var e82=Mt(),n=V(),t=Yh();e82||n(Object.prototype,"toString",t,{unsafe:!0})}),Mr=i$1((e82,n)=>{var t=TypeError;n.exports=function(o,d){if(o<d)throw t("Not enough arguments");return o}}),Li=i$1((e82,n)=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o={};for(d=0;d<66;d++)o[t.charAt(d)]=d;var d;n.exports={itoc:t,ctoi:o}}),id=i$1(()=>{var e82=g(),n=I(),t=k(),o=q(),d=C(),r=y(),a=G(),u=O(),l=Mr(),s=Li().ctoi,f=/[^\d+/a-z]/i,c=/[\t\n\f\r ]+/g,p=/[=]+$/,S=t("atob"),m=String.fromCharCode,N=o("".charAt),E=o("".replace),P=o(f.exec),F=r(function(){return S(" ")!==""}),J=!r(function(){S("a")}),v=!F&&!J&&!r(function(){S()}),M=!F&&!J&&S.length!==1;e82({global:!0,bind:!0,enumerable:!0,forced:F||J||v||M},{atob:function(_){if(l(arguments.length,1),v||M)return d(S,n,_);var X=E(a(_),c,""),Q="",Z=0,H=0,ue,fe;if(X.length%4==0&&(X=E(X,p,"")),X.length%4==1||P(f,X))throw new(t("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;ue=N(X,Z++);)u(s,ue)&&(fe=H%4?fe*64+s[ue]:s[ue],H++%4&&(Q+=m(255&fe>>(-2*H&6))));return Q}})}),Be=i$1((e82,n)=>{var t=jr();n.exports=typeof process<"u"&&t(process)=="process"}),sd=i$1((e82,n)=>{var t=Be();n.exports=function(o){try{if(t)return Function('return require("'+o+'")')()}catch{}}}),Ui=i$1((e82,n)=>{var t=dn(),o=w();n.exports=function(d,r,a){return a.get&&t(a.get,r,{getter:!0}),a.set&&t(a.set,r,{setter:!0}),o.f(d,r,a)}}),Wr=i$1((e82,n)=>{var t=xr(),o=TypeError;n.exports=function(d,r){if(t(r,d))return d;throw o("Incorrect invocation")}}),ji=i$1((e82,n)=>{n.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}}),Ve=i$1(()=>{var e82=g(),n=sd(),t=k(),o=y(),d=gr(),r=vr(),a=w().f,u=V(),l=Ui(),s=O(),f=Wr(),c=D(),p=Cn(),S=ne(),m=ji(),N=Ft(),E=qr(),P=x(),F=cr(),J="DOMException",v="DATA_CLONE_ERR",M=t("Error"),_=t(J)||function(){try{var De=t("MessageChannel")||n("worker_threads").MessageChannel;new De().port1.postMessage(new WeakMap)}catch(tn){if(tn.name==v&&tn.code==25)return tn.constructor}}(),X=_&&_.prototype,Q=M.prototype,Z=E.set,H=E.getterFor(J),ue="stack"in M(J),fe=function(De){return s(m,De)&&m[De].m?m[De].c:0},te=function(){f(this,j);var De=arguments.length,tn=S(De<1?void 0:arguments[0]),Ie=S(De<2?void 0:arguments[1],"Error"),$e=fe(Ie);if(Z(this,{type:J,name:Ie,message:tn,code:$e}),P||(this.name=Ie,this.message=tn,this.code=$e),ue){var Ke=M(tn);Ke.name=J,a(this,"stack",r(1,N(Ke.stack,1)))}},j=te.prototype=d(Q),ke=function(De){return{enumerable:!0,configurable:!0,get:De}},le=function(De){return ke(function(){return H(this)[De]})};P&&(l(j,"code",le("code")),l(j,"message",le("message")),l(j,"name",le("name"))),a(j,"constructor",r(1,te));var ve=o(function(){return!(new _ instanceof M)}),pe=ve||o(function(){return Q.toString!==p||String(new _(1,2))!=="2: 1"}),Re=ve||o(function(){return new _(1,"DataCloneError").code!==25}),ye=ve||_[v]!==25||X[v]!==25,Ee=F?pe||Re||ye:ve;e82({global:!0,constructor:!0,forced:Ee},{DOMException:Ee?te:_});var xe=t(J),qe=xe.prototype;pe&&(F||_===xe)&&u(qe,"toString",p),Re&&P&&_===xe&&l(qe,"code",ke(function(){return fe(c(this).name)}));for(Je in m)s(m,Je)&&(He=m[Je],Ze=He.s,We=r(6,He.c),s(xe,Ze)||a(xe,Ze,We),s(qe,Ze)||a(qe,Ze,We));var He,Ze,We,Je}),Ye=i$1(()=>{var e82=g(),n=I(),t=k(),o=vr(),d=w().f,r=O(),a=Wr(),u=Dt(),l=ne(),s=ji(),f=Ft(),c=x(),p=cr(),S="DOMException",m=t("Error"),N=t(S),E=function(){a(this,P);var fe=arguments.length,te=l(fe<1?void 0:arguments[0]),j=l(fe<2?void 0:arguments[1],"Error"),ke=new N(te,j),le=m(te);return le.name=S,d(ke,"stack",o(1,f(le.stack,1))),u(ke,this,E),ke},P=E.prototype=N.prototype,F="stack"in m(S),J="stack"in new N(1,2),v=N&&c&&Object.getOwnPropertyDescriptor(n,S),M=!!v&&!(v.writable&&v.configurable),_=F&&!M&&!J;e82({global:!0,constructor:!0,forced:p||_},{DOMException:_?E:N});var X=t(S),Q=X.prototype;if(Q.constructor!==X){p||d(Q,"constructor",o(1,X));for(ue in s)r(s,ue)&&(Z=s[ue],H=Z.s,r(X,H)||d(X,H,o(6,Z.c)))}var Z,H,ue}),Xe=i$1(()=>{var e82=k(),n=Vr(),t="DOMException";n(e82(t),t)}),_d=i$1((e82,n)=>{ie(),sa(),id(),Ve(),Ye(),Xe();var t=W();n.exports=t.atob}),Ld=i$1((e82,n)=>{var t=_d();n.exports=t}),Md=i$1((e82,n)=>{var t=Ld();n.exports=t}),Hd=i$1(()=>{var e82=g(),n=I(),t=k(),o=q(),d=C(),r=y(),a=G(),u=Mr(),l=Li().itoc,s=t("btoa"),f=o("".charAt),c=o("".charCodeAt),p=!!s&&!r(function(){s()}),S=!!s&&r(function(){return s(null)!=="bnVsbA=="}),m=!!s&&s.length!==1;e82({global:!0,bind:!0,enumerable:!0,forced:p||S||m},{btoa:function(N){if(u(arguments.length,1),p||S||m)return d(s,n,a(N));for(var E=a(N),P="",F=0,J=l,v,M;f(E,F)||(J="=",F%1);){if(M=c(E,F+=3/4),M>255)throw new(t("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");v=v<<8|M,P+=f(J,63&v>>8-F%1*8)}return P}})}),Wd=i$1((e82,n)=>{ie(),sa(),Hd(),Ve(),Ye(),Xe();var t=W();n.exports=t.btoa}),zd=i$1((e82,n)=>{var t=Wd();n.exports=t}),Xd=i$1((e82,n)=>{var t=zd();n.exports=t}),Jd=i$1((e82,n)=>{ie(),Ve(),Ye(),Xe();var t=W();n.exports=t.DOMException}),rq=i$1((e82,n)=>{var t=Jd();n.exports=t}),tq=i$1((e82,n)=>{var t=rq();n.exports=t}),io=i$1((e82,n)=>{var t=q();n.exports=t([].slice)}),iq=i$1((e82,n)=>{var t=Gr();n.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(t)}),ho=i$1((e82,n)=>{var t=I(),o=we(),d=wr(),r=b(),a=O(),u=y(),l=Rn(),s=io(),f=Te(),c=Mr(),p=iq(),S=Be(),m=t.setImmediate,N=t.clearImmediate,E=t.process,P=t.Dispatch,F=t.Function,J=t.MessageChannel,v=t.String,M=0,_={},X="onreadystatechange",Q,Z,H,ue;u(function(){Q=t.location});var fe=function(le){if(a(_,le)){var ve=_[le];delete _[le],ve()}},te=function(le){return function(){fe(le)}},j=function(le){fe(le.data)},ke=function(le){t.postMessage(v(le),Q.protocol+"//"+Q.host)};(!m||!N)&&(m=function(le){c(arguments.length,1);var ve=r(le)?le:F(le),pe=s(arguments,1);return _[++M]=function(){o(ve,void 0,pe)},Z(M),M},N=function(le){delete _[le]},S?Z=function(le){E.nextTick(te(le))}:P&&P.now?Z=function(le){P.now(te(le))}:J&&!p?(H=new J,ue=H.port2,H.port1.onmessage=j,Z=d(ue.postMessage,ue)):t.addEventListener&&r(t.postMessage)&&!t.importScripts&&Q&&Q.protocol!=="file:"&&!u(ke)?(Z=ke,t.addEventListener("message",j,!1)):X in f("script")?Z=function(le){l.appendChild(f("script"))[X]=function(){l.removeChild(this),fe(le)}}:Z=function(le){setTimeout(te(le),0)}),n.exports={set:m,clear:N}}),qq=i$1(()=>{var e82=g(),n=I(),t=ho().clear;e82({global:!0,bind:!0,enumerable:!0,forced:n.clearImmediate!==t},{clearImmediate:t})}),gq=i$1((e82,n)=>{n.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"}),Sq=i$1((e82,n)=>{var t=I(),o=we(),d=b(),r=gq(),a=Gr(),u=io(),l=Mr(),s=t.Function,f=/MSIE .\./.test(a)||r&&function(){var c=t.Bun.version.split(".");return c.length<3||c[0]==0&&(c[1]<3||c[1]==3&&c[2]==0)}();n.exports=function(c,p){var S=p?2:1;return f?function(m,N){var E=l(arguments.length,1)>S,P=d(m)?m:s(m),F=E?u(arguments,S):[],J=E?function(){o(P,this,F)}:P;return p?c(J,N):c(J)}:c}}),Tq=i$1(()=>{var e82=g(),n=I(),t=ho().set,o=Sq(),d=n.setImmediate?o(t,!1):t;e82({global:!0,bind:!0,enumerable:!0,forced:n.setImmediate!==d},{setImmediate:d})}),qo=i$1(()=>{qq(),Tq()}),xq=i$1((e82,n)=>{qo();var t=W();n.exports=t.clearImmediate}),wq=i$1((e82,n)=>{var t=xq();n.exports=t}),_q=i$1((e82,n)=>{var t=wq();n.exports=t}),Lq=i$1((e82,n)=>{qo();var t=W();n.exports=t.setImmediate}),Mq=i$1((e82,n)=>{var t=Lq();n.exports=t}),Fq=i$1((e82,n)=>{var t=Mq();n.exports=t}),Uq=i$1(()=>{var e82=g(),n=dr(),t=Ut(),o=y(),d=o(function(){t(1)});e82({target:"Object",stat:!0,forced:d},{keys:function(r){return t(n(r))}})}),$q=i$1((e82,n)=>{var t=jr(),o=rr(),d=Ct().f,r=ea(),a=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(l){try{return d(l)}catch{return r(a)}};n.exports.f=function(l){return a&&t(l)=="Window"?u(l):d(o(l))}}),Vq=i$1((e82,n)=>{var t=y();n.exports=t(function(){if(typeof ArrayBuffer=="function"){var o=new ArrayBuffer(8);Object.isExtensible(o)&&Object.defineProperty(o,"a",{value:8})}})}),zq=i$1((e82,n)=>{var t=y(),o=L(),d=jr(),r=Vq(),a=Object.isExtensible,u=t(function(){});n.exports=u||r?function(l){return!o(l)||r&&d(l)=="ArrayBuffer"?!1:a?a(l):!0}:a}),Xq=i$1((e82,n)=>{var t=y();n.exports=!t(function(){return Object.isExtensible(Object.preventExtensions({}))})}),Eo=i$1((e82,n)=>{var t=g(),o=q(),d=Oe(),r=L(),a=O(),u=w().f,l=Ct(),s=$q(),f=zq(),c=ee(),p=Xq(),S=!1,m=c("meta"),N=0,E=function(_){u(_,m,{value:{objectID:"O"+N++,weakData:{}}})},P=function(_,X){if(!r(_))return typeof _=="symbol"?_:(typeof _=="string"?"S":"P")+_;if(!a(_,m)){if(!f(_))return"F";if(!X)return"E";E(_)}return _[m].objectID},F=function(_,X){if(!a(_,m)){if(!f(_))return!0;if(!X)return!1;E(_)}return _[m].weakData},J=function(_){return p&&S&&f(_)&&!a(_,m)&&E(_),_},v=function(){M.enable=function(){},S=!0;var _=l.f,X=o([].splice),Q={};Q[m]=1,_(Q).length&&(l.f=function(Z){for(var H=_(Z),ue=0,fe=H.length;ue<fe;ue++)if(H[ue]===m){X(H,ue,1);break}return H},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},M=n.exports={enable:v,fastKey:P,getWeakData:F,onFreeze:J};d[m]=!0}),ny=i$1((e82,n)=>{var t=R(),o=t("iterator"),d=!1;try{r=0,a={next:function(){return{done:!!r++}},return:function(){d=!0}},a[o]=function(){return this},Array.from(a,function(){throw 2})}catch{}var r,a;n.exports=function(u,l){if(!l&&!d)return!1;var s=!1;try{var f={};f[o]=function(){return{next:function(){return{done:s=!0}}}},u(f)}catch{}return s}}),bo=i$1((e82,n)=>{var t=g(),o=I(),d=q(),r=mn(),a=V(),u=Eo(),l=Ce(),s=Wr(),f=b(),c=Br(),p=L(),S=y(),m=ny(),N=Vr(),E=Dt();n.exports=function(P,F,J){var v=P.indexOf("Map")!==-1,M=P.indexOf("Weak")!==-1,_=v?"set":"add",X=o[P],Q=X&&X.prototype,Z=X,H={},ue=function(pe){var Re=d(Q[pe]);a(Q,pe,pe=="add"?function(ye){return Re(this,ye===0?0:ye),this}:pe=="delete"?function(ye){return M&&!p(ye)?!1:Re(this,ye===0?0:ye)}:pe=="get"?function(ye){return M&&!p(ye)?void 0:Re(this,ye===0?0:ye)}:pe=="has"?function(ye){return M&&!p(ye)?!1:Re(this,ye===0?0:ye)}:function(ye,Ee){return Re(this,ye===0?0:ye,Ee),this})},fe=r(P,!f(X)||!(M||Q.forEach&&!S(function(){new X().entries().next()})));if(fe)Z=J.getConstructor(F,P,v,_),u.enable();else if(r(P,!0)){var te=new Z,j=te[_](M?{}:-0,1)!=te,ke=S(function(){te.has(1)}),le=m(function(pe){new X(pe)}),ve=!M&&S(function(){for(var pe=new X,Re=5;Re--;)pe[_](Re,Re);return!pe.has(-0)});le||(Z=F(function(pe,Re){s(pe,Q);var ye=E(new X,pe,Z);return c(Re)||l(Re,ye[_],{that:ye,AS_ENTRIES:v}),ye}),Z.prototype=Q,Q.constructor=Z),(ke||ve)&&(ue("delete"),ue("has"),v&&ue("get")),(ve||j)&&ue(_),M&&Q.clear&&delete Q.clear}return H[P]=Z,t({global:!0,constructor:!0,forced:Z!=X},H),N(Z,P),M||J.setStrong(Z,P,v),Z}}),To=i$1((e82,n)=>{var t=V();n.exports=function(o,d,r){for(var a in d)t(o,a,d[a],r);return o}}),cy=i$1((e82,n)=>{var t=k(),o=w(),d=R(),r=x(),a=d("species");n.exports=function(u){var l=t(u),s=o.f;r&&l&&!l[a]&&s(l,a,{configurable:!0,get:function(){return this}})}}),xo=i$1((e82,n)=>{var t=w().f,o=gr(),d=To(),r=wr(),a=Wr(),u=Br(),l=Ce(),s=Yt(),f=Xt(),c=cy(),p=x(),S=Eo().fastKey,m=qr(),N=m.set,E=m.getterFor;n.exports={getConstructor:function(P,F,J,v){var M=P(function(H,ue){a(H,_),N(H,{type:F,index:o(null),first:void 0,last:void 0,size:0}),p||(H.size=0),u(ue)||l(ue,H[v],{that:H,AS_ENTRIES:J})}),_=M.prototype,X=E(F),Q=function(H,ue,fe){var te=X(H),j=Z(H,ue),ke,le;return j?j.value=fe:(te.last=j={index:le=S(ue,!0),key:ue,value:fe,previous:ke=te.last,next:void 0,removed:!1},te.first||(te.first=j),ke&&(ke.next=j),p?te.size++:H.size++,le!=="F"&&(te.index[le]=j)),H},Z=function(H,ue){var fe=X(H),te=S(ue),j;if(te!=="F")return fe.index[te];for(j=fe.first;j;j=j.next)if(j.key==ue)return j};return d(_,{clear:function(){for(var H=this,ue=X(H),fe=ue.index,te=ue.first;te;)te.removed=!0,te.previous&&(te.previous=te.previous.next=void 0),delete fe[te.index],te=te.next;ue.first=ue.last=void 0,p?ue.size=0:H.size=0},delete:function(H){var ue=this,fe=X(ue),te=Z(ue,H);if(te){var j=te.next,ke=te.previous;delete fe.index[te.index],te.removed=!0,ke&&(ke.next=j),j&&(j.previous=ke),fe.first==te&&(fe.first=j),fe.last==te&&(fe.last=ke),p?fe.size--:ue.size--}return!!te},forEach:function(H){for(var ue=X(this),fe=r(H,arguments.length>1?arguments[1]:void 0),te;te=te?te.next:ue.first;)for(fe(te.value,te.key,this);te&&te.removed;)te=te.previous},has:function(H){return!!Z(this,H)}}),d(_,J?{get:function(H){var ue=Z(this,H);return ue&&ue.value},set:function(H,ue){return Q(this,H===0?0:H,ue)}}:{add:function(H){return Q(this,H=H===0?0:H,H)}}),p&&t(_,"size",{get:function(){return X(this).size}}),M},setStrong:function(P,F,J){var v=F+" Iterator",M=E(F),_=E(v);s(P,F,function(X,Q){N(this,{type:v,target:X,state:M(X),kind:Q,last:void 0})},function(){for(var X=_(this),Q=X.kind,Z=X.last;Z&&Z.removed;)Z=Z.previous;return!X.target||!(X.last=Z=Z?Z.next:X.state.first)?(X.target=void 0,f(void 0,!0)):Q=="keys"?f(Z.key,!1):Q=="values"?f(Z.value,!1):f([Z.key,Z.value],!1)},J?"entries":"values",!J,!0),c(F)}}}),qy=i$1(()=>{var e82=bo(),n=xo();e82("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},n)}),yy=i$1(()=>{qy()}),gy=i$1(()=>{var e82=bo(),n=xo();e82("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},n)}),my=i$1(()=>{gy()}),wo=i$1((e82,n)=>{var t=q(),o=y(),d=b(),r=yr(),a=k(),u=vn(),l=function(){},s=[],f=a("Reflect","construct"),c=/^\s*(?:class|function)\b/,p=t(c.exec),S=!c.exec(l),m=function(E){if(!d(E))return!1;try{return f(l,s,E),!0}catch{return!1}},N=function(E){if(!d(E))return!1;switch(r(E)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return S||!!p(c,u(E))}catch{return!0}};N.sham=!0,n.exports=!f||o(function(){var E;return m(m.call)||!m(Object)||!m(function(){E=!0})||E})?N:m}),Oy=i$1((e82,n)=>{var t=D();n.exports=function(){var o=t(this),d="";return o.hasIndices&&(d+="d"),o.global&&(d+="g"),o.ignoreCase&&(d+="i"),o.multiline&&(d+="m"),o.dotAll&&(d+="s"),o.unicode&&(d+="u"),o.unicodeSets&&(d+="v"),o.sticky&&(d+="y"),d}}),wy=i$1((e82,n)=>{var t=C(),o=O(),d=xr(),r=Oy(),a=RegExp.prototype;n.exports=function(u){var l=u.flags;return l===void 0&&!("flags"in a)&&!o(u,"flags")&&d(a,u)?t(r,u):l}}),_y=i$1((e82,n)=>{var t=q(),o=Map.prototype;n.exports={Map,set:t(o.set),get:t(o.get),has:t(o.has),remove:t(o.delete),proto:o}}),Ly=i$1((e82,n)=>{var t=q(),o=Set.prototype;n.exports={Set,add:t(o.add),has:t(o.has),remove:t(o.delete),proto:o,$has:o.has,$keys:o.keys}}),_o=i$1((e82,n)=>{n.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"}),Ny=i$1((e82,n)=>{var t=_o(),o=Be();n.exports=!t&&!o&&typeof window=="object"&&typeof document=="object"}),Wy=i$1(()=>{var e82=cr(),n=g(),t=I(),o=k(),d=q(),r=y(),a=ee(),u=b(),l=wo(),s=Br(),f=L(),c=mt(),p=Ce(),S=D(),m=yr(),N=O(),E=ra(),P=tr(),F=U(),J=Mr(),v=wy(),M=_y(),_=Ly(),X=In(),Q=be(),Z=Ny(),H=_o(),ue=Be(),fe=t.Object,te=t.Array,j=t.Date,ke=t.Error,le=t.EvalError,ve=t.RangeError,pe=t.ReferenceError,Re=t.SyntaxError,ye=t.TypeError,Ee=t.URIError,xe=t.PerformanceMark,qe=t.WebAssembly,He=qe&&qe.CompileError||ke,Ze=qe&&qe.LinkError||ke,We=qe&&qe.RuntimeError||ke,Je=o("DOMException"),De=M.Map,tn=M.has,Ie=M.get,$e=M.set,Ke=_.Set,_n=_.add,sn=o("Object","keys"),On=d([].push),Bi=d((!0).valueOf),Ii=d(1 .valueOf),ki=d("".valueOf),Ai=d(j.prototype.getTime),an=a("structuredClone"),Un="DataCloneError",ai="Transferring",vi=function(T){return!r(function(){var se=new t.Set([7]),Se=T(se),Ue=T(fe(7));return Se==se||!Se.has(7)||typeof Ue!="object"||Ue!=7})&&T},wn=function(T,se){return!r(function(){var Se=new se,Ue=T({a:Se,b:Se});return!(Ue&&Ue.a===Ue.b&&Ue.a instanceof se&&Ue.a.stack===Se.stack)})},Wn=function(T){return!r(function(){var se=T(new t.AggregateError([1],an,{cause:3}));return se.name!="AggregateError"||se.errors[0]!=1||se.message!=an||se.cause!=3})},hn=t.structuredClone,pi=e82||!wn(hn,ke)||!wn(hn,Je)||!Wn(hn),qn=!hn&&vi(function(T){return new xe(an,{detail:T}).detail}),Qe=vi(hn)||qn,Pn=function(T){throw new Je("Uncloneable type: "+T,Un)},ze=function(T,se){throw new Je((se||"Cloning")+" of "+T+" cannot be properly polyfilled in this engine",Un)},Xn=function(){var T;try{T=new t.DataTransfer}catch{try{T=new t.ClipboardEvent("").clipboardData}catch{}}return T&&T.items&&T.files?T:null},je=function(T,se){if(c(T)&&Pn("Symbol"),!f(T))return T;if(se){if(tn(se,T))return Ie(se,T)}else se=new De;var Se=m(T),Ue=!1,Le,Ge,me,fn,en,pn,Fn,Ln,Qn,Ni;switch(Se){case"Array":me=te(F(T)),Ue=!0;break;case"Object":me={},Ue=!0;break;case"Map":me=new De,Ue=!0;break;case"Set":me=new Ke,Ue=!0;break;case"RegExp":me=new RegExp(T.source,v(T));break;case"Error":switch(Ge=T.name,Ge){case"AggregateError":me=o("AggregateError")([]);break;case"EvalError":me=le();break;case"RangeError":me=ve();break;case"ReferenceError":me=pe();break;case"SyntaxError":me=Re();break;case"TypeError":me=ye();break;case"URIError":me=Ee();break;case"CompileError":me=He();break;case"LinkError":me=Ze();break;case"RuntimeError":me=We();break;default:me=ke()}Ue=!0;break;case"DOMException":me=new Je(T.message,T.name),Ue=!0;break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Le=t[Se],f(Le)||ze(Se),me=new Le(je(T.buffer,se),T.byteOffset,Se==="DataView"?T.byteLength:T.length);break;case"DOMQuad":try{me=new DOMQuad(je(T.p1,se),je(T.p2,se),je(T.p3,se),je(T.p4,se))}catch{Qe?me=Qe(T):ze(Se)}break;case"FileList":if(fn=Xn(),fn){for(en=0,pn=F(T);en<pn;en++)fn.items.add(je(T[en],se));me=fn.files}else Qe?me=Qe(T):ze(Se);break;case"ImageData":try{me=new ImageData(je(T.data,se),T.width,T.height,{colorSpace:T.colorSpace})}catch{Qe?me=Qe(T):ze(Se)}break;default:if(Qe)me=Qe(T);else switch(Se){case"BigInt":me=fe(T.valueOf());break;case"Boolean":me=fe(Bi(T));break;case"Number":me=fe(Ii(T));break;case"String":me=fe(ki(T));break;case"Date":me=new j(Ai(T));break;case"ArrayBuffer":Le=t.DataView,!Le&&typeof T.slice!="function"&&ze(Se);try{if(typeof T.slice=="function")me=T.slice(0);else for(pn=T.byteLength,me=new ArrayBuffer(pn),Qn=new Le(T),Ni=new Le(me),en=0;en<pn;en++)Ni.setUint8(en,Qn.getUint8(en))}catch{throw new Je("ArrayBuffer is detached",Un)}break;case"SharedArrayBuffer":me=T;break;case"Blob":try{me=T.slice(0,T.size,T.type)}catch{ze(Se)}break;case"DOMPoint":case"DOMPointReadOnly":Le=t[Se];try{me=Le.fromPoint?Le.fromPoint(T):new Le(T.x,T.y,T.z,T.w)}catch{ze(Se)}break;case"DOMRect":case"DOMRectReadOnly":Le=t[Se];try{me=Le.fromRect?Le.fromRect(T):new Le(T.x,T.y,T.width,T.height)}catch{ze(Se)}break;case"DOMMatrix":case"DOMMatrixReadOnly":Le=t[Se];try{me=Le.fromMatrix?Le.fromMatrix(T):new Le(T)}catch{ze(Se)}break;case"AudioData":case"VideoFrame":u(T.clone)||ze(Se);try{me=T.clone()}catch{Pn(Se)}break;case"File":try{me=new File([T],T.name,T)}catch{ze(Se)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":ze(Se);default:Pn(Se)}}if($e(se,T,me),Ue)switch(Se){case"Array":case"Object":for(Fn=sn(T),en=0,pn=F(Fn);en<pn;en++)Ln=Fn[en],E(me,Ln,je(T[Ln],se));break;case"Map":T.forEach(function(Si,ei){$e(me,je(ei,se),je(Si,se))});break;case"Set":T.forEach(function(Si){_n(me,je(Si,se))});break;case"Error":P(me,"message",je(T.message,se)),N(T,"cause")&&P(me,"cause",je(T.cause,se)),Ge=="AggregateError"&&(me.errors=je(T.errors,se));case"DOMException":X&&P(me,"stack",je(T.stack,se))}return me},ce=hn&&!r(function(){if(H&&Q>92||ue&&Q>94||Z&&Q>97)return!1;var T=new ArrayBuffer(8),se=hn(T,{transfer:[T]});return T.byteLength!=0||se.byteLength!=8}),ge=function(T,se){if(!f(T))throw ye("Transfer option cannot be converted to a sequence");var Se=[];p(T,function(Qn){On(Se,S(Qn))});var Ue=0,Le=F(Se),Ge,me,fn,en,pn,Fn,Ln;if(ce)for(en=hn(Se,{transfer:Se});Ue<Le;)$e(se,Se[Ue],en[Ue++]);else for(;Ue<Le;){if(Ge=Se[Ue++],tn(se,Ge))throw new Je("Duplicate transferable",Un);switch(me=m(Ge),me){case"ImageBitmap":fn=t.OffscreenCanvas,l(fn)||ze(me,ai);try{Fn=new fn(Ge.width,Ge.height),Ln=Fn.getContext("bitmaprenderer"),Ln.transferFromImageBitmap(Ge),pn=Fn.transferToImageBitmap()}catch{}break;case"AudioData":case"VideoFrame":(!u(Ge.clone)||!u(Ge.close))&&ze(me,ai);try{pn=Ge.clone(),Ge.close()}catch{}break;case"ArrayBuffer":case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":ze(me,ai)}if(pn===void 0)throw new Je("This object cannot be transferred: "+me,Un);$e(se,Ge,pn)}};n({global:!0,enumerable:!0,sham:!ce,forced:pi},{structuredClone:function(T){var se=J(arguments.length,1)>1&&!s(arguments[1])?S(arguments[1]):void 0,Se=se?se.transfer:void 0,Ue;return Se!==void 0&&(Ue=new De,ge(Se,Ue)),je(T,Ue)}})}),zy=i$1((e82,n)=>{ie(),Me(),Uq(),sa(),yy(),my(),Ve(),Ye(),Xe(),Wy();var t=W();n.exports=t.structuredClone}),Xy=i$1((e82,n)=>{var t=zy();n.exports=t}),Jy=i$1((e82,n)=>{var t=Xy();n.exports=t}),Bo=i$1((e82,n)=>{var t=y(),o=R(),d=cr(),r=o("iterator");n.exports=!t(function(){var a=new URL("b?a=1&b=2&c=3","http://a"),u=a.searchParams,l="";return a.pathname="c%20d",u.forEach(function(s,f){u.delete("b"),l+=f+s}),d&&!a.toJSON||!u.sort||a.href!=="http://a/c%20d?a=1&c=3"||u.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!u[r]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("http://a#\u0431").hash!=="#%D0%B1"||l!=="a1c3"||new URL("http://x",void 0).host!=="x"})}),eg=i$1((e82,n)=>{var t=D(),o=Nn();n.exports=function(d,r,a,u){try{return u?r(t(a)[0],a[1]):r(a)}catch(l){o(d,"throw",l)}}}),ig=i$1((e82,n)=>{var t=wr(),o=C(),d=dr(),r=eg(),a=Mn(),u=wo(),l=U(),s=ra(),f=$t(),c=_e(),p=Array;n.exports=function(S){var m=d(S),N=u(this),E=arguments.length,P=E>1?arguments[1]:void 0,F=P!==void 0;F&&(P=t(P,E>2?arguments[2]:void 0));var J=c(m),v=0,M,_,X,Q,Z,H;if(J&&!(this===p&&a(J)))for(Q=f(m,J),Z=Q.next,_=N?new this:[];!(X=o(Z,Q)).done;v++)H=F?r(Q,P,[X.value,v],!0):X.value,s(_,v,H);else for(M=l(m),_=N?new this(M):p(M);M>v;v++)H=F?P(m[v],v):m[v],s(_,v,H);return _.length=v,_}}),hg=i$1((e82,n)=>{var t=q(),o=2147483647,d=36,r=1,a=26,u=38,l=700,s=72,f=128,c="-",p=/[^\0-\u007E]/,S=/[.\u3002\uFF0E\uFF61]/g,m="Overflow: input needs wider integers to process",N=d-r,E=RangeError,P=t(S.exec),F=Math.floor,J=String.fromCharCode,v=t("".charCodeAt),M=t([].join),_=t([].push),X=t("".replace),Q=t("".split),Z=t("".toLowerCase),H=function(j){for(var ke=[],le=0,ve=j.length;le<ve;){var pe=v(j,le++);if(pe>=55296&&pe<=56319&&le<ve){var Re=v(j,le++);(Re&64512)==56320?_(ke,((pe&1023)<<10)+(Re&1023)+65536):(_(ke,pe),le--)}else _(ke,pe)}return ke},ue=function(j){return j+22+75*(j<26)},fe=function(j,ke,le){var ve=0;for(j=le?F(j/l):j>>1,j+=F(j/ke);j>N*a>>1;)j=F(j/N),ve+=d;return F(ve+(N+1)*j/(j+u))},te=function(j){var ke=[];j=H(j);var le=j.length,ve=f,pe=0,Re=s,ye,Ee;for(ye=0;ye<j.length;ye++)Ee=j[ye],Ee<128&&_(ke,J(Ee));var xe=ke.length,qe=xe;for(xe&&_(ke,c);qe<le;){var He=o;for(ye=0;ye<j.length;ye++)Ee=j[ye],Ee>=ve&&Ee<He&&(He=Ee);var Ze=qe+1;if(He-ve>F((o-pe)/Ze))throw E(m);for(pe+=(He-ve)*Ze,ve=He,ye=0;ye<j.length;ye++){if(Ee=j[ye],Ee<ve&&++pe>o)throw E(m);if(Ee==ve){for(var We=pe,Je=d;;){var De=Je<=Re?r:Je>=Re+a?a:Je-Re;if(We<De)break;var tn=We-De,Ie=d-De;_(ke,J(ue(De+tn%Ie))),We=F(tn/Ie),Je+=d}_(ke,J(ue(We))),Re=fe(pe,Ze,qe==xe),pe=0,qe++}}pe++,ve++}return M(ke,"")};n.exports=function(j){var ke=[],le=Q(X(Z(j),S,"."),"."),ve,pe;for(ve=0;ve<le.length;ve++)pe=le[ve],_(ke,P(p,pe)?"xn--"+te(pe):pe);return M(ke,".")}}),eu=i$1((e82,n)=>{Me();var t=g(),o=I(),d=C(),r=q(),a=x(),u=Bo(),l=V(),s=To(),f=Vr(),c=Yn(),p=qr(),S=Wr(),m=b(),N=O(),E=wr(),P=yr(),F=D(),J=L(),v=G(),M=gr(),_=vr(),X=$t(),Q=_e(),Z=Mr(),H=R(),ue=ta(),fe=H("iterator"),te="URLSearchParams",j=te+"Iterator",ke=p.set,le=p.getterFor(te),ve=p.getterFor(j),pe=Object.getOwnPropertyDescriptor,Re=function(ce){if(!a)return o[ce];var ge=pe(o,ce);return ge&&ge.value},ye=Re("fetch"),Ee=Re("Request"),xe=Re("Headers"),qe=Ee&&Ee.prototype,He=xe&&xe.prototype,Ze=o.RegExp,We=o.TypeError,Je=o.decodeURIComponent,De=o.encodeURIComponent,tn=r("".charAt),Ie=r([].join),$e=r([].push),Ke=r("".replace),_n=r([].shift),sn=r([].splice),On=r("".split),Bi=r("".slice),Ii=/\+/g,ki=Array(4),Ai=function(ce){return ki[ce-1]||(ki[ce-1]=Ze("((?:%[\\da-f]{2}){"+ce+"})","gi"))},an=function(ce){try{return Je(ce)}catch{return ce}},Un=function(ce){var ge=Ke(ce,Ii," "),T=4;try{return Je(ge)}catch{for(;T;)ge=Ke(ge,Ai(T--),an);return ge}},ai=/[!'()~]|%20/g,vi={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},wn=function(ce){return vi[ce]},Wn=function(ce){return Ke(De(ce),ai,wn)},hn=c(function(ce,ge){ke(this,{type:j,iterator:X(le(ce).entries),kind:ge})},"Iterator",function(){var ce=ve(this),ge=ce.kind,T=ce.iterator.next(),se=T.value;return T.done||(T.value=ge==="keys"?se.key:ge==="values"?se.value:[se.key,se.value]),T},!0),pi=function(ce){this.entries=[],this.url=null,ce!==void 0&&(J(ce)?this.parseObject(ce):this.parseQuery(typeof ce=="string"?tn(ce,0)==="?"?Bi(ce,1):ce:v(ce)))};pi.prototype={type:te,bindURL:function(ce){this.url=ce,this.update()},parseObject:function(ce){var ge=Q(ce),T,se,Se,Ue,Le,Ge,me;if(ge)for(T=X(ce,ge),se=T.next;!(Se=d(se,T)).done;){if(Ue=X(F(Se.value)),Le=Ue.next,(Ge=d(Le,Ue)).done||(me=d(Le,Ue)).done||!d(Le,Ue).done)throw We("Expected sequence with length 2");$e(this.entries,{key:v(Ge.value),value:v(me.value)})}else for(var fn in ce)N(ce,fn)&&$e(this.entries,{key:fn,value:v(ce[fn])})},parseQuery:function(ce){if(ce)for(var ge=On(ce,"&"),T=0,se,Se;T<ge.length;)se=ge[T++],se.length&&(Se=On(se,"="),$e(this.entries,{key:Un(_n(Se)),value:Un(Ie(Se,"="))}))},serialize:function(){for(var ce=this.entries,ge=[],T=0,se;T<ce.length;)se=ce[T++],$e(ge,Wn(se.key)+"="+Wn(se.value));return Ie(ge,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var qn=function(){S(this,Qe);var ce=arguments.length>0?arguments[0]:void 0;ke(this,new pi(ce))},Qe=qn.prototype;s(Qe,{append:function(ce,ge){Z(arguments.length,2);var T=le(this);$e(T.entries,{key:v(ce),value:v(ge)}),T.updateURL()},delete:function(ce){Z(arguments.length,1);for(var ge=le(this),T=ge.entries,se=v(ce),Se=0;Se<T.length;)T[Se].key===se?sn(T,Se,1):Se++;ge.updateURL()},get:function(ce){Z(arguments.length,1);for(var ge=le(this).entries,T=v(ce),se=0;se<ge.length;se++)if(ge[se].key===T)return ge[se].value;return null},getAll:function(ce){Z(arguments.length,1);for(var ge=le(this).entries,T=v(ce),se=[],Se=0;Se<ge.length;Se++)ge[Se].key===T&&$e(se,ge[Se].value);return se},has:function(ce){Z(arguments.length,1);for(var ge=le(this).entries,T=v(ce),se=0;se<ge.length;)if(ge[se++].key===T)return!0;return!1},set:function(ce,ge){Z(arguments.length,1);for(var T=le(this),se=T.entries,Se=!1,Ue=v(ce),Le=v(ge),Ge=0,me;Ge<se.length;Ge++)me=se[Ge],me.key===Ue&&(Se?sn(se,Ge--,1):(Se=!0,me.value=Le));Se||$e(se,{key:Ue,value:Le}),T.updateURL()},sort:function(){var ce=le(this);ue(ce.entries,function(ge,T){return ge.key>T.key?1:-1}),ce.updateURL()},forEach:function(ce){for(var ge=le(this).entries,T=E(ce,arguments.length>1?arguments[1]:void 0),se=0,Se;se<ge.length;)Se=ge[se++],T(Se.value,Se.key,this)},keys:function(){return new hn(this,"keys")},values:function(){return new hn(this,"values")},entries:function(){return new hn(this,"entries")}},{enumerable:!0}),l(Qe,fe,Qe.entries,{name:"entries"}),l(Qe,"toString",function(){return le(this).serialize()},{enumerable:!0}),f(qn,te),t({global:!0,constructor:!0,forced:!u},{URLSearchParams:qn}),!u&&m(xe)&&(Pn=r(He.has),ze=r(He.set),Xn=function(ce){if(J(ce)){var ge=ce.body,T;if(P(ge)===te)return T=ce.headers?new xe(ce.headers):new xe,Pn(T,"content-type")||ze(T,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),M(ce,{body:_(0,v(ge)),headers:_(0,T)})}return ce},m(ye)&&t({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(ce){return ye(ce,arguments.length>1?Xn(arguments[1]):{})}}),m(Ee)&&(je=function(ce){return S(this,qe),new Ee(ce,arguments.length>1?Xn(arguments[1]):{})},qe.constructor=je,je.prototype=qe,t({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:je})));var Pn,ze,Xn,je;n.exports={URLSearchParams:qn,getState:le}}),Zg=i$1(()=>{Zn();var e82=g(),n=x(),t=Bo(),o=I(),d=wr(),r=q(),a=V(),u=Ui(),l=Wr(),s=O(),f=yi(),c=ig(),p=ea(),S=Jt().codeAt,m=hg(),N=G(),E=Vr(),P=Mr(),F=eu(),J=qr(),v=J.set,M=J.getterFor("URL"),_=F.URLSearchParams,X=F.getState,Q=o.URL,Z=o.TypeError,H=o.parseInt,ue=Math.floor,fe=Math.pow,te=r("".charAt),j=r(/./.exec),ke=r([].join),le=r(1 .toString),ve=r([].pop),pe=r([].push),Re=r("".replace),ye=r([].shift),Ee=r("".split),xe=r("".slice),qe=r("".toLowerCase),He=r([].unshift),Ze="Invalid authority",We="Invalid scheme",Je="Invalid host",De="Invalid port",tn=/[a-z]/i,Ie=/[\d+-.a-z]/i,$e=/\d/,Ke=/^0x/i,_n=/^[0-7]+$/,sn=/^\d+$/,On=/^[\da-f]+$/i,Bi=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Ii=/[\0\t\n\r #/:<>?@[\\\]^|]/,ki=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Ai=/[\t\n\r]/g,an,Un=function(B){var z=Ee(B,"."),$,h,de,Ne,he,nn,rn;if(z.length&&z[z.length-1]==""&&z.length--,$=z.length,$>4)return B;for(h=[],de=0;de<$;de++){if(Ne=z[de],Ne=="")return B;if(he=10,Ne.length>1&&te(Ne,0)=="0"&&(he=j(Ke,Ne)?16:8,Ne=xe(Ne,he==8?1:2)),Ne==="")nn=0;else{if(!j(he==10?sn:he==8?_n:On,Ne))return B;nn=H(Ne,he)}pe(h,nn)}for(de=0;de<$;de++)if(nn=h[de],de==$-1){if(nn>=fe(256,5-$))return null}else if(nn>255)return null;for(rn=ve(h),de=0;de<h.length;de++)rn+=h[de]*fe(256,3-de);return rn},ai=function(B){var z=[0,0,0,0,0,0,0,0],$=0,h=null,de=0,Ne,he,nn,rn,cn,Vn,Y,ln=function(){return te(B,de)};if(ln()==":"){if(te(B,1)!=":")return;de+=2,$++,h=$}for(;ln();){if($==8)return;if(ln()==":"){if(h!==null)return;de++,$++,h=$;continue}for(Ne=he=0;he<4&&j(On,ln());)Ne=Ne*16+H(ln(),16),de++,he++;if(ln()=="."){if(he==0||(de-=he,$>6))return;for(nn=0;ln();){if(rn=null,nn>0)if(ln()=="."&&nn<4)de++;else return;if(!j($e,ln()))return;for(;j($e,ln());){if(cn=H(ln(),10),rn===null)rn=cn;else{if(rn==0)return;rn=rn*10+cn}if(rn>255)return;de++}z[$]=z[$]*256+rn,nn++,(nn==2||nn==4)&&$++}if(nn!=4)return;break}else if(ln()==":"){if(de++,!ln())return}else if(ln())return;z[$++]=Ne}if(h!==null)for(Vn=$-h,$=7;$!=0&&Vn>0;)Y=z[$],z[$--]=z[h+Vn-1],z[h+--Vn]=Y;else if($!=8)return;return z},vi=function(B){for(var z=null,$=1,h=null,de=0,Ne=0;Ne<8;Ne++)B[Ne]!==0?(de>$&&(z=h,$=de),h=null,de=0):(h===null&&(h=Ne),++de);return de>$&&(z=h,$=de),z},wn=function(B){var z,$,h,de;if(typeof B=="number"){for(z=[],$=0;$<4;$++)He(z,B%256),B=ue(B/256);return ke(z,".")}else if(typeof B=="object"){for(z="",h=vi(B),$=0;$<8;$++)de&&B[$]===0||(de&&(de=!1),h===$?(z+=$?":":"::",de=!0):(z+=le(B[$],16),$<7&&(z+=":")));return"["+z+"]"}return B},Wn={},hn=f({},Wn,{" ":1,'"':1,"<":1,">":1,"`":1}),pi=f({},hn,{"#":1,"?":1,"{":1,"}":1}),qn=f({},pi,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Qe=function(B,z){var $=S(B,0);return $>32&&$<127&&!s(z,B)?B:encodeURIComponent(B)},Pn={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ze=function(B,z){var $;return B.length==2&&j(tn,te(B,0))&&(($=te(B,1))==":"||!z&&$=="|")},Xn=function(B){var z;return B.length>1&&ze(xe(B,0,2))&&(B.length==2||(z=te(B,2))==="/"||z==="\\"||z==="?"||z==="#")},je=function(B){return B==="."||qe(B)==="%2e"},ce=function(B){return B=qe(B),B===".."||B==="%2e."||B===".%2e"||B==="%2e%2e"},ge={},T={},se={},Se={},Ue={},Le={},Ge={},me={},fn={},en={},pn={},Fn={},Ln={},Qn={},Ni={},Si={},ei={},Jn={},Yi={},mi={},Gn={},Wi=function(B,z,$){var h=N(B),de,Ne,he;if(z){if(Ne=this.parse(h),Ne)throw Z(Ne);this.searchParams=null}else{if($!==void 0&&(de=new Wi($,!0)),Ne=this.parse(h,null,de),Ne)throw Z(Ne);he=X(new _),he.bindURL(this),this.searchParams=he}};Wi.prototype={type:"URL",parse:function(B,z,$){var h=this,de=z||ge,Ne=0,he="",nn=!1,rn=!1,cn=!1,Vn,Y,ln,Hn;for(B=N(B),z||(h.scheme="",h.username="",h.password="",h.host=null,h.port=null,h.path=[],h.query=null,h.fragment=null,h.cannotBeABaseURL=!1,B=Re(B,ki,"")),B=Re(B,Ai,""),Vn=c(B);Ne<=Vn.length;){switch(Y=Vn[Ne],de){case ge:if(Y&&j(tn,Y))he+=qe(Y),de=T;else{if(z)return We;de=se;continue}break;case T:if(Y&&(j(Ie,Y)||Y=="+"||Y=="-"||Y=="."))he+=qe(Y);else if(Y==":"){if(z&&(h.isSpecial()!=s(Pn,he)||he=="file"&&(h.includesCredentials()||h.port!==null)||h.scheme=="file"&&!h.host))return;if(h.scheme=he,z){h.isSpecial()&&Pn[h.scheme]==h.port&&(h.port=null);return}he="",h.scheme=="file"?de=Qn:h.isSpecial()&&$&&$.scheme==h.scheme?de=Se:h.isSpecial()?de=me:Vn[Ne+1]=="/"?(de=Ue,Ne++):(h.cannotBeABaseURL=!0,pe(h.path,""),de=Yi)}else{if(z)return We;he="",de=se,Ne=0;continue}break;case se:if(!$||$.cannotBeABaseURL&&Y!="#")return We;if($.cannotBeABaseURL&&Y=="#"){h.scheme=$.scheme,h.path=p($.path),h.query=$.query,h.fragment="",h.cannotBeABaseURL=!0,de=Gn;break}de=$.scheme=="file"?Qn:Le;continue;case Se:if(Y=="/"&&Vn[Ne+1]=="/")de=fn,Ne++;else{de=Le;continue}break;case Ue:if(Y=="/"){de=en;break}else{de=Jn;continue}case Le:if(h.scheme=$.scheme,Y==an)h.username=$.username,h.password=$.password,h.host=$.host,h.port=$.port,h.path=p($.path),h.query=$.query;else if(Y=="/"||Y=="\\"&&h.isSpecial())de=Ge;else if(Y=="?")h.username=$.username,h.password=$.password,h.host=$.host,h.port=$.port,h.path=p($.path),h.query="",de=mi;else if(Y=="#")h.username=$.username,h.password=$.password,h.host=$.host,h.port=$.port,h.path=p($.path),h.query=$.query,h.fragment="",de=Gn;else{h.username=$.username,h.password=$.password,h.host=$.host,h.port=$.port,h.path=p($.path),h.path.length--,de=Jn;continue}break;case Ge:if(h.isSpecial()&&(Y=="/"||Y=="\\"))de=fn;else if(Y=="/")de=en;else{h.username=$.username,h.password=$.password,h.host=$.host,h.port=$.port,de=Jn;continue}break;case me:if(de=fn,Y!="/"||te(he,Ne+1)!="/")continue;Ne++;break;case fn:if(Y!="/"&&Y!="\\"){de=en;continue}break;case en:if(Y=="@"){nn&&(he="%40"+he),nn=!0,ln=c(he);for(var zi=0;zi<ln.length;zi++){var et=ln[zi];if(et==":"&&!cn){cn=!0;continue}var nt=Qe(et,qn);cn?h.password+=nt:h.username+=nt}he=""}else if(Y==an||Y=="/"||Y=="?"||Y=="#"||Y=="\\"&&h.isSpecial()){if(nn&&he=="")return Ze;Ne-=c(he).length+1,he="",de=pn}else he+=Y;break;case pn:case Fn:if(z&&h.scheme=="file"){de=Si;continue}else if(Y==":"&&!rn){if(he=="")return Je;if(Hn=h.parseHost(he),Hn)return Hn;if(he="",de=Ln,z==Fn)return}else if(Y==an||Y=="/"||Y=="?"||Y=="#"||Y=="\\"&&h.isSpecial()){if(h.isSpecial()&&he=="")return Je;if(z&&he==""&&(h.includesCredentials()||h.port!==null))return;if(Hn=h.parseHost(he),Hn)return Hn;if(he="",de=ei,z)return;continue}else Y=="["?rn=!0:Y=="]"&&(rn=!1),he+=Y;break;case Ln:if(j($e,Y))he+=Y;else if(Y==an||Y=="/"||Y=="?"||Y=="#"||Y=="\\"&&h.isSpecial()||z){if(he!=""){var Zi=H(he,10);if(Zi>65535)return De;h.port=h.isSpecial()&&Zi===Pn[h.scheme]?null:Zi,he=""}if(z)return;de=ei;continue}else return De;break;case Qn:if(h.scheme="file",Y=="/"||Y=="\\")de=Ni;else if($&&$.scheme=="file")if(Y==an)h.host=$.host,h.path=p($.path),h.query=$.query;else if(Y=="?")h.host=$.host,h.path=p($.path),h.query="",de=mi;else if(Y=="#")h.host=$.host,h.path=p($.path),h.query=$.query,h.fragment="",de=Gn;else{Xn(ke(p(Vn,Ne),""))||(h.host=$.host,h.path=p($.path),h.shortenPath()),de=Jn;continue}else{de=Jn;continue}break;case Ni:if(Y=="/"||Y=="\\"){de=Si;break}$&&$.scheme=="file"&&!Xn(ke(p(Vn,Ne),""))&&(ze($.path[0],!0)?pe(h.path,$.path[0]):h.host=$.host),de=Jn;continue;case Si:if(Y==an||Y=="/"||Y=="\\"||Y=="?"||Y=="#"){if(!z&&ze(he))de=Jn;else if(he==""){if(h.host="",z)return;de=ei}else{if(Hn=h.parseHost(he),Hn)return Hn;if(h.host=="localhost"&&(h.host=""),z)return;he="",de=ei}continue}else he+=Y;break;case ei:if(h.isSpecial()){if(de=Jn,Y!="/"&&Y!="\\")continue}else if(!z&&Y=="?")h.query="",de=mi;else if(!z&&Y=="#")h.fragment="",de=Gn;else if(Y!=an&&(de=Jn,Y!="/"))continue;break;case Jn:if(Y==an||Y=="/"||Y=="\\"&&h.isSpecial()||!z&&(Y=="?"||Y=="#")){if(ce(he)?(h.shortenPath(),Y!="/"&&!(Y=="\\"&&h.isSpecial())&&pe(h.path,"")):je(he)?Y!="/"&&!(Y=="\\"&&h.isSpecial())&&pe(h.path,""):(h.scheme=="file"&&!h.path.length&&ze(he)&&(h.host&&(h.host=""),he=te(he,0)+":"),pe(h.path,he)),he="",h.scheme=="file"&&(Y==an||Y=="?"||Y=="#"))for(;h.path.length>1&&h.path[0]==="";)ye(h.path);Y=="?"?(h.query="",de=mi):Y=="#"&&(h.fragment="",de=Gn)}else he+=Qe(Y,pi);break;case Yi:Y=="?"?(h.query="",de=mi):Y=="#"?(h.fragment="",de=Gn):Y!=an&&(h.path[0]+=Qe(Y,Wn));break;case mi:!z&&Y=="#"?(h.fragment="",de=Gn):Y!=an&&(Y=="'"&&h.isSpecial()?h.query+="%27":Y=="#"?h.query+="%23":h.query+=Qe(Y,Wn));break;case Gn:Y!=an&&(h.fragment+=Qe(Y,hn));break}Ne++}},parseHost:function(B){var z,$,h;if(te(B,0)=="["){if(te(B,B.length-1)!="]"||(z=ai(xe(B,1,-1)),!z))return Je;this.host=z}else if(this.isSpecial()){if(B=m(B),j(Bi,B)||(z=Un(B),z===null))return Je;this.host=z}else{if(j(Ii,B))return Je;for(z="",$=c(B),h=0;h<$.length;h++)z+=Qe($[h],Wn);this.host=z}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme=="file"},includesCredentials:function(){return this.username!=""||this.password!=""},isSpecial:function(){return s(Pn,this.scheme)},shortenPath:function(){var B=this.path,z=B.length;z&&(this.scheme!="file"||z!=1||!ze(B[0],!0))&&B.length--},serialize:function(){var B=this,z=B.scheme,$=B.username,h=B.password,de=B.host,Ne=B.port,he=B.path,nn=B.query,rn=B.fragment,cn=z+":";return de!==null?(cn+="//",B.includesCredentials()&&(cn+=$+(h?":"+h:"")+"@"),cn+=wn(de),Ne!==null&&(cn+=":"+Ne)):z=="file"&&(cn+="//"),cn+=B.cannotBeABaseURL?he[0]:he.length?"/"+ke(he,"/"):"",nn!==null&&(cn+="?"+nn),rn!==null&&(cn+="#"+rn),cn},setHref:function(B){var z=this.parse(B);if(z)throw Z(z);this.searchParams.update()},getOrigin:function(){var B=this.scheme,z=this.port;if(B=="blob")try{return new Ti(B.path[0]).origin}catch{return"null"}return B=="file"||!this.isSpecial()?"null":B+"://"+wn(this.host)+(z!==null?":"+z:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(B){this.parse(N(B)+":",ge)},getUsername:function(){return this.username},setUsername:function(B){var z=c(N(B));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var $=0;$<z.length;$++)this.username+=Qe(z[$],qn)}},getPassword:function(){return this.password},setPassword:function(B){var z=c(N(B));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var $=0;$<z.length;$++)this.password+=Qe(z[$],qn)}},getHost:function(){var B=this.host,z=this.port;return B===null?"":z===null?wn(B):wn(B)+":"+z},setHost:function(B){this.cannotBeABaseURL||this.parse(B,pn)},getHostname:function(){var B=this.host;return B===null?"":wn(B)},setHostname:function(B){this.cannotBeABaseURL||this.parse(B,Fn)},getPort:function(){var B=this.port;return B===null?"":N(B)},setPort:function(B){this.cannotHaveUsernamePasswordPort()||(B=N(B),B==""?this.port=null:this.parse(B,Ln))},getPathname:function(){var B=this.path;return this.cannotBeABaseURL?B[0]:B.length?"/"+ke(B,"/"):""},setPathname:function(B){this.cannotBeABaseURL||(this.path=[],this.parse(B,ei))},getSearch:function(){var B=this.query;return B?"?"+B:""},setSearch:function(B){B=N(B),B==""?this.query=null:(te(B,0)=="?"&&(B=xe(B,1)),this.query="",this.parse(B,mi)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var B=this.fragment;return B?"#"+B:""},setHash:function(B){if(B=N(B),B==""){this.fragment=null;return}te(B,0)=="#"&&(B=xe(B,1)),this.fragment="",this.parse(B,Gn)},update:function(){this.query=this.searchParams.serialize()||null}};var Ti=function(B){var z=l(this,Tn),$=P(arguments.length,1)>1?arguments[1]:void 0,h=v(z,new Wi(B,!1,$));n||(z.href=h.serialize(),z.origin=h.getOrigin(),z.protocol=h.getProtocol(),z.username=h.getUsername(),z.password=h.getPassword(),z.host=h.getHost(),z.hostname=h.getHostname(),z.port=h.getPort(),z.pathname=h.getPathname(),z.search=h.getSearch(),z.searchParams=h.getSearchParams(),z.hash=h.getHash())},Tn=Ti.prototype,En=function(B,z){return{get:function(){return M(this)[B]()},set:z&&function($){return M(this)[z]($)},configurable:!0,enumerable:!0}};n&&(u(Tn,"href",En("serialize","setHref")),u(Tn,"origin",En("getOrigin")),u(Tn,"protocol",En("getProtocol","setProtocol")),u(Tn,"username",En("getUsername","setUsername")),u(Tn,"password",En("getPassword","setPassword")),u(Tn,"host",En("getHost","setHost")),u(Tn,"hostname",En("getHostname","setHostname")),u(Tn,"port",En("getPort","setPort")),u(Tn,"pathname",En("getPathname","setPathname")),u(Tn,"search",En("getSearch","setSearch")),u(Tn,"searchParams",En("getSearchParams")),u(Tn,"hash",En("getHash","setHash"))),a(Tn,"toJSON",function(){return M(this).serialize()},{enumerable:!0}),a(Tn,"toString",function(){return M(this).serialize()},{enumerable:!0}),Q&&(Gi=Q.createObjectURL,Hi=Q.revokeObjectURL,Gi&&a(Ti,"createObjectURL",d(Gi,Q)),Hi&&a(Ti,"revokeObjectURL",d(Hi,Q)));var Gi,Hi;E(Ti,"URL"),e82({global:!0,constructor:!0,forced:!t,sham:!n},{URL:Ti})}),rm=i$1(()=>{Zg()}),em=i$1(()=>{var e82=g(),n=C();e82({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return n(URL.prototype.toString,this)}})}),Su=i$1(()=>{eu()}),am=i$1((e82,n)=>{rm(),em(),Su();var t=W();n.exports=t.URL}),im=i$1((e82,n)=>{var t=am();n.exports=t}),um=i$1((e82,n)=>{var t=im();n.exports=t}),vm=i$1((e82,n)=>{var t=um();n.exports=t}),fm=i$1((e82,n)=>{Su();var t=W();n.exports=t.URLSearchParams}),pm=i$1((e82,n)=>{var t=fm();ni(),n.exports=t}),dm=i$1((e82,n)=>{var t=pm();n.exports=t}),ym=i$1((e82,n)=>{var t=dm();n.exports=t});A(Ic());A(jf());A(Xf());A(ul());A(ql());A(El());A(Xl());A(ep());A(ip());A(gp());A(Rp());A(Dp());A(jp());A(uh());A(qh());A(Th());A(wh());A(Uh());A(Kh());A(Md());A(Xd());A(tq());A(_q());A(Fq());A(Jy());A(vm());A(ym());var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e82){return e82&&e82.__esModule&&Object.prototype.hasOwnProperty.call(e82,"default")?e82.default:e82}var indexMinimal={},minimal$1={},aspromise=asPromise;function asPromise(e82,n){for(var t=new Array(arguments.length-1),o=0,d=2,r=!0;d<arguments.length;)t[o++]=arguments[d++];return new Promise(function(u,l){t[o]=function(f){if(r)if(r=!1,f)l(f);else{for(var c=new Array(arguments.length-1),p=0;p<c.length;)c[p++]=arguments[p];u.apply(null,c)}};try{e82.apply(n||null,t)}catch(s){r&&(r=!1,l(s))}})}var base64$1={};(function(e82){var n=e82;n.length=function(u){var l=u.length;if(!l)return 0;for(var s=0;--l%4>1&&u.charAt(l)==="=";)++s;return Math.ceil(u.length*3)/4-s};for(var t=new Array(64),o=new Array(123),d=0;d<64;)o[t[d]=d<26?d+65:d<52?d+71:d<62?d-4:d-59|43]=d++;n.encode=function(u,l,s){for(var f=null,c=[],p=0,S=0,m;l<s;){var N=u[l++];switch(S){case 0:c[p++]=t[N>>2],m=(N&3)<<4,S=1;break;case 1:c[p++]=t[m|N>>4],m=(N&15)<<2,S=2;break;case 2:c[p++]=t[m|N>>6],c[p++]=t[N&63],S=0;break}p>8191&&((f||(f=[])).push(String.fromCharCode.apply(String,c)),p=0)}return S&&(c[p++]=t[m],c[p++]=61,S===1&&(c[p++]=61)),f?(p&&f.push(String.fromCharCode.apply(String,c.slice(0,p))),f.join("")):String.fromCharCode.apply(String,c.slice(0,p))};var r="invalid encoding";n.decode=function(u,l,s){for(var f=s,c=0,p,S=0;S<u.length;){var m=u.charCodeAt(S++);if(m===61&&c>1)break;if((m=o[m])===void 0)throw Error(r);switch(c){case 0:p=m,c=1;break;case 1:l[s++]=p<<2|(m&48)>>4,p=m,c=2;break;case 2:l[s++]=(p&15)<<4|(m&60)>>2,p=m,c=3;break;case 3:l[s++]=(p&3)<<6|m,c=0;break}}if(c===1)throw Error(r);return s-f},n.test=function(u){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(u)}})(base64$1);var eventemitter=EventEmitter;function EventEmitter(){this._listeners={}}EventEmitter.prototype.on=function(n,t,o){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:t,ctx:o||this}),this};EventEmitter.prototype.off=function(n,t){if(n===void 0)this._listeners={};else if(t===void 0)this._listeners[n]=[];else for(var o=this._listeners[n],d=0;d<o.length;)o[d].fn===t?o.splice(d,1):++d;return this};EventEmitter.prototype.emit=function(n){var t=this._listeners[n];if(t){for(var o=[],d=1;d<arguments.length;)o.push(arguments[d++]);for(d=0;d<t.length;)t[d].fn.apply(t[d++].ctx,o)}return this};var float=factory(factory);function factory(e82){return typeof Float32Array<"u"?function(){var n=new Float32Array([-0]),t=new Uint8Array(n.buffer),o=t[3]===128;function d(l,s,f){n[0]=l,s[f]=t[0],s[f+1]=t[1],s[f+2]=t[2],s[f+3]=t[3]}function r(l,s,f){n[0]=l,s[f]=t[3],s[f+1]=t[2],s[f+2]=t[1],s[f+3]=t[0]}e82.writeFloatLE=o?d:r,e82.writeFloatBE=o?r:d;function a(l,s){return t[0]=l[s],t[1]=l[s+1],t[2]=l[s+2],t[3]=l[s+3],n[0]}function u(l,s){return t[3]=l[s],t[2]=l[s+1],t[1]=l[s+2],t[0]=l[s+3],n[0]}e82.readFloatLE=o?a:u,e82.readFloatBE=o?u:a}():function(){function n(o,d,r,a){var u=d<0?1:0;if(u&&(d=-d),d===0)o(1/d>0?0:2147483648,r,a);else if(isNaN(d))o(2143289344,r,a);else if(d>34028234663852886e22)o((u<<31|2139095040)>>>0,r,a);else if(d<11754943508222875e-54)o((u<<31|Math.round(d/1401298464324817e-60))>>>0,r,a);else{var l=Math.floor(Math.log(d)/Math.LN2),s=Math.round(d*Math.pow(2,-l)*8388608)&8388607;o((u<<31|l+127<<23|s)>>>0,r,a)}}e82.writeFloatLE=n.bind(null,writeUintLE),e82.writeFloatBE=n.bind(null,writeUintBE);function t(o,d,r){var a=o(d,r),u=(a>>31)*2+1,l=a>>>23&255,s=a&8388607;return l===255?s?NaN:u*(1/0):l===0?u*1401298464324817e-60*s:u*Math.pow(2,l-150)*(s+8388608)}e82.readFloatLE=t.bind(null,readUintLE),e82.readFloatBE=t.bind(null,readUintBE)}(),typeof Float64Array<"u"?function(){var n=new Float64Array([-0]),t=new Uint8Array(n.buffer),o=t[7]===128;function d(l,s,f){n[0]=l,s[f]=t[0],s[f+1]=t[1],s[f+2]=t[2],s[f+3]=t[3],s[f+4]=t[4],s[f+5]=t[5],s[f+6]=t[6],s[f+7]=t[7]}function r(l,s,f){n[0]=l,s[f]=t[7],s[f+1]=t[6],s[f+2]=t[5],s[f+3]=t[4],s[f+4]=t[3],s[f+5]=t[2],s[f+6]=t[1],s[f+7]=t[0]}e82.writeDoubleLE=o?d:r,e82.writeDoubleBE=o?r:d;function a(l,s){return t[0]=l[s],t[1]=l[s+1],t[2]=l[s+2],t[3]=l[s+3],t[4]=l[s+4],t[5]=l[s+5],t[6]=l[s+6],t[7]=l[s+7],n[0]}function u(l,s){return t[7]=l[s],t[6]=l[s+1],t[5]=l[s+2],t[4]=l[s+3],t[3]=l[s+4],t[2]=l[s+5],t[1]=l[s+6],t[0]=l[s+7],n[0]}e82.readDoubleLE=o?a:u,e82.readDoubleBE=o?u:a}():function(){function n(o,d,r,a,u,l){var s=a<0?1:0;if(s&&(a=-a),a===0)o(0,u,l+d),o(1/a>0?0:2147483648,u,l+r);else if(isNaN(a))o(0,u,l+d),o(2146959360,u,l+r);else if(a>17976931348623157e292)o(0,u,l+d),o((s<<31|2146435072)>>>0,u,l+r);else{var f;if(a<22250738585072014e-324)f=a/5e-324,o(f>>>0,u,l+d),o((s<<31|f/4294967296)>>>0,u,l+r);else{var c=Math.floor(Math.log(a)/Math.LN2);c===1024&&(c=1023),f=a*Math.pow(2,-c),o(f*4503599627370496>>>0,u,l+d),o((s<<31|c+1023<<20|f*1048576&1048575)>>>0,u,l+r)}}}e82.writeDoubleLE=n.bind(null,writeUintLE,0,4),e82.writeDoubleBE=n.bind(null,writeUintBE,4,0);function t(o,d,r,a,u){var l=o(a,u+d),s=o(a,u+r),f=(s>>31)*2+1,c=s>>>20&2047,p=4294967296*(s&1048575)+l;return c===2047?p?NaN:f*(1/0):c===0?f*5e-324*p:f*Math.pow(2,c-1075)*(p+4503599627370496)}e82.readDoubleLE=t.bind(null,readUintLE,0,4),e82.readDoubleBE=t.bind(null,readUintBE,4,0)}(),e82}function writeUintLE(e82,n,t){n[t]=e82&255,n[t+1]=e82>>>8&255,n[t+2]=e82>>>16&255,n[t+3]=e82>>>24}function writeUintBE(e82,n,t){n[t]=e82>>>24,n[t+1]=e82>>>16&255,n[t+2]=e82>>>8&255,n[t+3]=e82&255}function readUintLE(e82,n){return(e82[n]|e82[n+1]<<8|e82[n+2]<<16|e82[n+3]<<24)>>>0}function readUintBE(e82,n){return(e82[n]<<24|e82[n+1]<<16|e82[n+2]<<8|e82[n+3])>>>0}var inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e82){}return null}var utf8$2={};(function(e82){var n=e82;n.length=function(o){for(var d=0,r=0,a=0;a<o.length;++a)r=o.charCodeAt(a),r<128?d+=1:r<2048?d+=2:(r&64512)===55296&&(o.charCodeAt(a+1)&64512)===56320?(++a,d+=4):d+=3;return d},n.read=function(o,d,r){var a=r-d;if(a<1)return"";for(var u=null,l=[],s=0,f;d<r;)f=o[d++],f<128?l[s++]=f:f>191&&f<224?l[s++]=(f&31)<<6|o[d++]&63:f>239&&f<365?(f=((f&7)<<18|(o[d++]&63)<<12|(o[d++]&63)<<6|o[d++]&63)-65536,l[s++]=55296+(f>>10),l[s++]=56320+(f&1023)):l[s++]=(f&15)<<12|(o[d++]&63)<<6|o[d++]&63,s>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,l)),s=0);return u?(s&&u.push(String.fromCharCode.apply(String,l.slice(0,s))),u.join("")):String.fromCharCode.apply(String,l.slice(0,s))},n.write=function(o,d,r){for(var a=r,u,l,s=0;s<o.length;++s)u=o.charCodeAt(s),u<128?d[r++]=u:u<2048?(d[r++]=u>>6|192,d[r++]=u&63|128):(u&64512)===55296&&((l=o.charCodeAt(s+1))&64512)===56320?(u=65536+((u&1023)<<10)+(l&1023),++s,d[r++]=u>>18|240,d[r++]=u>>12&63|128,d[r++]=u>>6&63|128,d[r++]=u&63|128):(d[r++]=u>>12|224,d[r++]=u>>6&63|128,d[r++]=u&63|128);return r-a}})(utf8$2);var pool_1=pool;function pool(e82,n,t){var o=t||8192,d=o>>>1,r=null,a=o;return function(l){if(l<1||l>d)return e82(l);a+l>o&&(r=e82(o),a=0);var s=n.call(r,a,a+=l);return a&7&&(a=(a|7)+1),s}}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=n;var e82=requireMinimal();function n(r,a){this.lo=r>>>0,this.hi=a>>>0}var t=n.zero=new n(0,0);t.toNumber=function(){return 0},t.zzEncode=t.zzDecode=function(){return this},t.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(a){if(a===0)return t;var u=a<0;u&&(a=-a);var l=a>>>0,s=(a-l)/4294967296>>>0;return u&&(s=~s>>>0,l=~l>>>0,++l>4294967295&&(l=0,++s>4294967295&&(s=0))),new n(l,s)},n.from=function(a){if(typeof a=="number")return n.fromNumber(a);if(e82.isString(a))if(e82.Long)a=e82.Long.fromString(a);else return n.fromNumber(parseInt(a,10));return a.low||a.high?new n(a.low>>>0,a.high>>>0):t},n.prototype.toNumber=function(a){if(!a&&this.hi>>>31){var u=~this.lo+1>>>0,l=~this.hi>>>0;return u||(l=l+1>>>0),-(u+l*4294967296)}return this.lo+this.hi*4294967296},n.prototype.toLong=function(a){return e82.Long?new e82.Long(this.lo|0,this.hi|0,!!a):{low:this.lo|0,high:this.hi|0,unsigned:!!a}};var d=String.prototype.charCodeAt;return n.fromHash=function(a){return a===o?t:new n((d.call(a,0)|d.call(a,1)<<8|d.call(a,2)<<16|d.call(a,3)<<24)>>>0,(d.call(a,4)|d.call(a,5)<<8|d.call(a,6)<<16|d.call(a,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var a=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^a)>>>0,this.lo=(this.lo<<1^a)>>>0,this},n.prototype.zzDecode=function(){var a=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^a)>>>0,this.hi=(this.hi>>>1^a)>>>0,this},n.prototype.length=function(){var a=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,l=this.hi>>>24;return l===0?u===0?a<16384?a<128?1:2:a<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:l<128?9:10},longbits}var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,function(e82){var n=e82;n.asPromise=aspromise,n.base64=base64$1,n.EventEmitter=eventemitter,n.float=float,n.inquire=inquire_1,n.utf8=utf8$2,n.pool=pool_1,n.LongBits=requireLongbits(),n.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),n.global=n.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||commonjsGlobal,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r},n.isString=function(r){return typeof r=="string"||r instanceof String},n.isObject=function(r){return r&&typeof r=="object"},n.isset=n.isSet=function(r,a){var u=r[a];return u!=null&&r.hasOwnProperty(a)?typeof u!="object"||(Array.isArray(u)?u.length:Object.keys(u).length)>0:!1},n.Buffer=function(){try{var d=n.inquire("buffer").Buffer;return d.prototype.utf8Write?d:null}catch{return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(r){return typeof r=="number"?n.Buffer?n._Buffer_allocUnsafe(r):new n.Array(r):n.Buffer?n._Buffer_from(r):typeof Uint8Array>"u"?r:new Uint8Array(r)},n.Array=typeof Uint8Array<"u"?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(r){return r?n.LongBits.from(r).toHash():n.LongBits.zeroHash},n.longFromHash=function(r,a){var u=n.LongBits.fromHash(r);return n.Long?n.Long.fromBits(u.lo,u.hi,a):u.toNumber(!!a)};function t(d,r,a){for(var u=Object.keys(r),l=0;l<u.length;++l)(d[u[l]]===void 0||!a)&&(d[u[l]]=r[u[l]]);return d}n.merge=t,n.lcFirst=function(r){return r.charAt(0).toLowerCase()+r.substring(1)};function o(d){function r(a,u){if(!(this instanceof r))return new r(a,u);Object.defineProperty(this,"message",{get:function(){return a}}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),u&&t(this,u)}return r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return d},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),r}n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(r){for(var a={},u=0;u<r.length;++u)a[r[u]]=1;return function(){for(var l=Object.keys(this),s=l.length-1;s>-1;--s)if(a[l[s]]===1&&this[l[s]]!==void 0&&this[l[s]]!==null)return l[s]}},n.oneOfSetter=function(r){return function(a){for(var u=0;u<r.length;++u)r[u]!==a&&delete this[r[u]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var d=n.Buffer;if(!d){n._Buffer_from=n._Buffer_allocUnsafe=null;return}n._Buffer_from=d.from!==Uint8Array.from&&d.from||function(a,u){return new d(a,u)},n._Buffer_allocUnsafe=d.allocUnsafe||function(a){return new d(a)}}}(minimal$1)),minimal$1}var writer=Writer$1,util$4=requireMinimal(),BufferWriter$1,LongBits$1=util$4.LongBits,base64=util$4.base64,utf8$1=util$4.utf8;function Op(e82,n,t){this.fn=e82,this.len=n,this.next=void 0,this.val=t}function noop(){}function State(e82){this.head=e82.head,this.tail=e82.tail,this.len=e82.len,this.next=e82.states}function Writer$1(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}var create$1=function e(){return util$4.Buffer?function(){return(Writer$1.create=function(){return new BufferWriter$1})()}:function(){return new Writer$1}};Writer$1.create=create$1();Writer$1.alloc=function e2(n){return new util$4.Array(n)};util$4.Array!==Array&&(Writer$1.alloc=util$4.pool(Writer$1.alloc,util$4.Array.prototype.subarray));Writer$1.prototype._push=function e3(n,t,o){return this.tail=this.tail.next=new Op(n,t,o),this.len+=t,this};function writeByte(e82,n,t){n[t]=e82&255}function writeVarint32(e82,n,t){for(;e82>127;)n[t++]=e82&127|128,e82>>>=7;n[t]=e82}function VarintOp(e82,n){this.len=e82,this.next=void 0,this.val=n}VarintOp.prototype=Object.create(Op.prototype);VarintOp.prototype.fn=writeVarint32;Writer$1.prototype.uint32=function e4(n){return this.len+=(this.tail=this.tail.next=new VarintOp((n=n>>>0)<128?1:n<16384?2:n<2097152?3:n<268435456?4:5,n)).len,this};Writer$1.prototype.int32=function e5(n){return n<0?this._push(writeVarint64,10,LongBits$1.fromNumber(n)):this.uint32(n)};Writer$1.prototype.sint32=function e6(n){return this.uint32((n<<1^n>>31)>>>0)};function writeVarint64(e82,n,t){for(;e82.hi;)n[t++]=e82.lo&127|128,e82.lo=(e82.lo>>>7|e82.hi<<25)>>>0,e82.hi>>>=7;for(;e82.lo>127;)n[t++]=e82.lo&127|128,e82.lo=e82.lo>>>7;n[t++]=e82.lo}Writer$1.prototype.uint64=function e7(n){var t=LongBits$1.from(n);return this._push(writeVarint64,t.length(),t)};Writer$1.prototype.int64=Writer$1.prototype.uint64;Writer$1.prototype.sint64=function e8(n){var t=LongBits$1.from(n).zzEncode();return this._push(writeVarint64,t.length(),t)};Writer$1.prototype.bool=function e9(n){return this._push(writeByte,1,n?1:0)};function writeFixed32(e82,n,t){n[t]=e82&255,n[t+1]=e82>>>8&255,n[t+2]=e82>>>16&255,n[t+3]=e82>>>24}Writer$1.prototype.fixed32=function e10(n){return this._push(writeFixed32,4,n>>>0)};Writer$1.prototype.sfixed32=Writer$1.prototype.fixed32;Writer$1.prototype.fixed64=function e11(n){var t=LongBits$1.from(n);return this._push(writeFixed32,4,t.lo)._push(writeFixed32,4,t.hi)};Writer$1.prototype.sfixed64=Writer$1.prototype.fixed64;Writer$1.prototype.float=function e12(n){return this._push(util$4.float.writeFloatLE,4,n)};Writer$1.prototype.double=function e13(n){return this._push(util$4.float.writeDoubleLE,8,n)};var writeBytes=util$4.Array.prototype.set?function e14(n,t,o){t.set(n,o)}:function e15(n,t,o){for(var d=0;d<n.length;++d)t[o+d]=n[d]};Writer$1.prototype.bytes=function e16(n){var t=n.length>>>0;if(!t)return this._push(writeByte,1,0);if(util$4.isString(n)){var o=Writer$1.alloc(t=base64.length(n));base64.decode(n,o,0),n=o}return this.uint32(t)._push(writeBytes,t,n)};Writer$1.prototype.string=function e17(n){var t=utf8$1.length(n);return t?this.uint32(t)._push(utf8$1.write,t,n):this._push(writeByte,1,0)};Writer$1.prototype.fork=function e18(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this};Writer$1.prototype.reset=function e19(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this};Writer$1.prototype.ldelim=function e20(){var n=this.head,t=this.tail,o=this.len;return this.reset().uint32(o),o&&(this.tail.next=n.next,this.tail=t,this.len+=o),this};Writer$1.prototype.finish=function e21(){for(var n=this.head.next,t=this.constructor.alloc(this.len),o=0;n;)n.fn(n.val,t,o),o+=n.len,n=n.next;return t};Writer$1._configure=function(e82){BufferWriter$1=e82,Writer$1.create=create$1(),BufferWriter$1._configure()};var writer_buffer=BufferWriter,Writer=writer;(BufferWriter.prototype=Object.create(Writer.prototype)).constructor=BufferWriter;var util$3=requireMinimal();function BufferWriter(){Writer.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=util$3._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=util$3.Buffer&&util$3.Buffer.prototype instanceof Uint8Array&&util$3.Buffer.prototype.set.name==="set"?function(n,t,o){t.set(n,o)}:function(n,t,o){if(n.copy)n.copy(t,o,0,n.length);else for(var d=0;d<n.length;)t[o++]=n[d++]}};BufferWriter.prototype.bytes=function e22(n){util$3.isString(n)&&(n=util$3._Buffer_from(n,"base64"));var t=n.length>>>0;return this.uint32(t),t&&this._push(BufferWriter.writeBytesBuffer,t,n),this};function writeStringBuffer(e82,n,t){e82.length<40?util$3.utf8.write(e82,n,t):n.utf8Write?n.utf8Write(e82,t):n.write(e82,t)}BufferWriter.prototype.string=function e23(n){var t=util$3.Buffer.byteLength(n);return this.uint32(t),t&&this._push(writeStringBuffer,t,n),this};BufferWriter._configure();var reader=Reader$1,util$2=requireMinimal(),BufferReader$1,LongBits=util$2.LongBits,utf8=util$2.utf8;function indexOutOfRange(e82,n){return RangeError("index out of range: "+e82.pos+" + "+(n||1)+" > "+e82.len)}function Reader$1(e82){this.buf=e82,this.pos=0,this.len=e82.length}var create_array=typeof Uint8Array<"u"?function e24(n){if(n instanceof Uint8Array||Array.isArray(n))return new Reader$1(n);throw Error("illegal buffer")}:function e25(n){if(Array.isArray(n))return new Reader$1(n);throw Error("illegal buffer")},create=function e26(){return util$2.Buffer?function(t){return(Reader$1.create=function(d){return util$2.Buffer.isBuffer(d)?new BufferReader$1(d):create_array(d)})(t)}:create_array};Reader$1.create=create();Reader$1.prototype._slice=util$2.Array.prototype.subarray||util$2.Array.prototype.slice;Reader$1.prototype.uint32=function e27(){var n=4294967295;return function(){if(n=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(n=(n|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(n=(n|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return n;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return n}}();Reader$1.prototype.int32=function e28(){return this.uint32()|0};Reader$1.prototype.sint32=function e29(){var n=this.uint32();return n>>>1^-(n&1)|0};function readLongVarint(){var e82=new LongBits(0,0),n=0;if(this.len-this.pos>4){for(;n<4;++n)if(e82.lo=(e82.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return e82;if(e82.lo=(e82.lo|(this.buf[this.pos]&127)<<28)>>>0,e82.hi=(e82.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e82;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw indexOutOfRange(this);if(e82.lo=(e82.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return e82}return e82.lo=(e82.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,e82}if(this.len-this.pos>4){for(;n<5;++n)if(e82.hi=(e82.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return e82}else for(;n<5;++n){if(this.pos>=this.len)throw indexOutOfRange(this);if(e82.hi=(e82.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return e82}throw Error("invalid varint encoding")}Reader$1.prototype.bool=function e30(){return this.uint32()!==0};function readFixed32_end(e82,n){return(e82[n-4]|e82[n-3]<<8|e82[n-2]<<16|e82[n-1]<<24)>>>0}Reader$1.prototype.fixed32=function e31(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)};Reader$1.prototype.sfixed32=function e32(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)|0};function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new LongBits(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader$1.prototype.float=function e33(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var n=util$2.float.readFloatLE(this.buf,this.pos);return this.pos+=4,n};Reader$1.prototype.double=function e34(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var n=util$2.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,n};Reader$1.prototype.bytes=function e35(){var n=this.uint32(),t=this.pos,o=this.pos+n;if(o>this.len)throw indexOutOfRange(this,n);if(this.pos+=n,Array.isArray(this.buf))return this.buf.slice(t,o);if(t===o){var d=util$2.Buffer;return d?d.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,o)};Reader$1.prototype.string=function e36(){var n=this.bytes();return utf8.read(n,0,n.length)};Reader$1.prototype.skip=function e37(n){if(typeof n=="number"){if(this.pos+n>this.len)throw indexOutOfRange(this,n);this.pos+=n}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(this.buf[this.pos++]&128);return this};Reader$1.prototype.skipType=function(e82){switch(e82){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e82=this.uint32()&7)!==4;)this.skipType(e82);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e82+" at offset "+this.pos)}return this};Reader$1._configure=function(e82){BufferReader$1=e82,Reader$1.create=create(),BufferReader$1._configure();var n=util$2.Long?"toLong":"toNumber";util$2.merge(Reader$1.prototype,{int64:function(){return readLongVarint.call(this)[n](!1)},uint64:function(){return readLongVarint.call(this)[n](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[n](!1)},fixed64:function(){return readFixed64.call(this)[n](!0)},sfixed64:function(){return readFixed64.call(this)[n](!1)}})};var reader_buffer=BufferReader,Reader=reader;(BufferReader.prototype=Object.create(Reader.prototype)).constructor=BufferReader;var util$1=requireMinimal();function BufferReader(e82){Reader.call(this,e82)}BufferReader._configure=function(){util$1.Buffer&&(BufferReader.prototype._slice=util$1.Buffer.prototype.slice)};BufferReader.prototype.string=function e38(){var n=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+n,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+n,this.len))};BufferReader._configure();var rpc={},service=Service,util=requireMinimal();(Service.prototype=Object.create(util.EventEmitter.prototype)).constructor=Service;function Service(e82,n,t){if(typeof e82!="function")throw TypeError("rpcImpl must be a function");util.EventEmitter.call(this),this.rpcImpl=e82,this.requestDelimited=!!n,this.responseDelimited=!!t}Service.prototype.rpcCall=function e39(n,t,o,d,r){if(!d)throw TypeError("request must be specified");var a=this;if(!r)return util.asPromise(e39,a,n,t,o,d);if(!a.rpcImpl){setTimeout(function(){r(Error("already ended"))},0);return}try{return a.rpcImpl(n,t[a.requestDelimited?"encodeDelimited":"encode"](d).finish(),function(l,s){if(l)return a.emit("error",l,n),r(l);if(s===null){a.end(!0);return}if(!(s instanceof o))try{s=o[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(f){return a.emit("error",f,n),r(f)}return a.emit("data",s,n),r(null,s)})}catch(u){a.emit("error",u,n),setTimeout(function(){r(u)},0);return}};Service.prototype.end=function e40(n){return this.rpcImpl&&(n||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this};(function(e82){var n=e82;n.Service=service})(rpc);var roots={};(function(e82){var n=e82;n.build="minimal",n.Writer=writer,n.BufferWriter=writer_buffer,n.Reader=reader,n.BufferReader=reader_buffer,n.util=requireMinimal(),n.rpc=rpc,n.roots=roots,n.configure=t;function t(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}t()})(indexMinimal);var minimal=indexMinimal,_m0=getDefaultExportFromCjs(minimal),messageTypeRegistry=new Map,long=Long,wasm=null;try{wasm=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e82){}function Long(e82,n,t){this.low=e82|0,this.high=n|0,this.unsigned=!!t}Long.prototype.__isLong__;Object.defineProperty(Long.prototype,"__isLong__",{value:!0});function isLong(e82){return(e82&&e82.__isLong__)===!0}Long.isLong=isLong;var INT_CACHE={},UINT_CACHE={};function fromInt(e82,n){var t,o,d;return n?(e82>>>=0,(d=0<=e82&&e82<256)&&(o=UINT_CACHE[e82],o)?o:(t=fromBits(e82,(e82|0)<0?-1:0,!0),d&&(UINT_CACHE[e82]=t),t)):(e82|=0,(d=-128<=e82&&e82<128)&&(o=INT_CACHE[e82],o)?o:(t=fromBits(e82,e82<0?-1:0,!1),d&&(INT_CACHE[e82]=t),t))}Long.fromInt=fromInt;function fromNumber(e82,n){if(isNaN(e82))return n?UZERO:ZERO;if(n){if(e82<0)return UZERO;if(e82>=TWO_PWR_64_DBL)return MAX_UNSIGNED_VALUE}else{if(e82<=-TWO_PWR_63_DBL)return MIN_VALUE;if(e82+1>=TWO_PWR_63_DBL)return MAX_VALUE}return e82<0?fromNumber(-e82,n).neg():fromBits(e82%TWO_PWR_32_DBL|0,e82/TWO_PWR_32_DBL|0,n)}Long.fromNumber=fromNumber;function fromBits(e82,n,t){return new Long(e82,n,t)}Long.fromBits=fromBits;var pow_dbl=Math.pow;function fromString(e82,n,t){if(e82.length===0)throw Error("empty string");if(e82==="NaN"||e82==="Infinity"||e82==="+Infinity"||e82==="-Infinity")return ZERO;if(typeof n=="number"?(t=n,n=!1):n=!!n,t=t||10,t<2||36<t)throw RangeError("radix");var o;if((o=e82.indexOf("-"))>0)throw Error("interior hyphen");if(o===0)return fromString(e82.substring(1),n,t).neg();for(var d=fromNumber(pow_dbl(t,8)),r=ZERO,a=0;a<e82.length;a+=8){var u=Math.min(8,e82.length-a),l=parseInt(e82.substring(a,a+u),t);if(u<8){var s=fromNumber(pow_dbl(t,u));r=r.mul(s).add(fromNumber(l))}else r=r.mul(d),r=r.add(fromNumber(l))}return r.unsigned=n,r}Long.fromString=fromString;function fromValue(e82,n){return typeof e82=="number"?fromNumber(e82,n):typeof e82=="string"?fromString(e82,n):fromBits(e82.low,e82.high,typeof n=="boolean"?n:e82.unsigned)}Long.fromValue=fromValue;var TWO_PWR_16_DBL=65536,TWO_PWR_24_DBL=1<<24,TWO_PWR_32_DBL=TWO_PWR_16_DBL*TWO_PWR_16_DBL,TWO_PWR_64_DBL=TWO_PWR_32_DBL*TWO_PWR_32_DBL,TWO_PWR_63_DBL=TWO_PWR_64_DBL/2,TWO_PWR_24=fromInt(TWO_PWR_24_DBL),ZERO=fromInt(0);Long.ZERO=ZERO;var UZERO=fromInt(0,!0);Long.UZERO=UZERO;var ONE=fromInt(1);Long.ONE=ONE;var UONE=fromInt(1,!0);Long.UONE=UONE;var NEG_ONE=fromInt(-1);Long.NEG_ONE=NEG_ONE;var MAX_VALUE=fromBits(-1,2147483647,!1);Long.MAX_VALUE=MAX_VALUE;var MAX_UNSIGNED_VALUE=fromBits(-1,-1,!0);Long.MAX_UNSIGNED_VALUE=MAX_UNSIGNED_VALUE;var MIN_VALUE=fromBits(0,-2147483648,!1);Long.MIN_VALUE=MIN_VALUE;var LongPrototype=Long.prototype;LongPrototype.toInt=function e41(){return this.unsigned?this.low>>>0:this.low};LongPrototype.toNumber=function e42(){return this.unsigned?(this.high>>>0)*TWO_PWR_32_DBL+(this.low>>>0):this.high*TWO_PWR_32_DBL+(this.low>>>0)};LongPrototype.toString=function e43(n){if(n=n||10,n<2||36<n)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(MIN_VALUE)){var t=fromNumber(n),o=this.div(t),d=o.mul(t).sub(this);return o.toString(n)+d.toInt().toString(n)}else return"-"+this.neg().toString(n);for(var r=fromNumber(pow_dbl(n,6),this.unsigned),a=this,u="";;){var l=a.div(r),s=a.sub(l.mul(r)).toInt()>>>0,f=s.toString(n);if(a=l,a.isZero())return f+u;for(;f.length<6;)f="0"+f;u=""+f+u}};LongPrototype.getHighBits=function e44(){return this.high};LongPrototype.getHighBitsUnsigned=function e45(){return this.high>>>0};LongPrototype.getLowBits=function e46(){return this.low};LongPrototype.getLowBitsUnsigned=function e47(){return this.low>>>0};LongPrototype.getNumBitsAbs=function e48(){if(this.isNegative())return this.eq(MIN_VALUE)?64:this.neg().getNumBitsAbs();for(var n=this.high!=0?this.high:this.low,t=31;t>0&&!(n&1<<t);t--);return this.high!=0?t+33:t+1};LongPrototype.isZero=function e49(){return this.high===0&&this.low===0};LongPrototype.eqz=LongPrototype.isZero;LongPrototype.isNegative=function e50(){return!this.unsigned&&this.high<0};LongPrototype.isPositive=function e51(){return this.unsigned||this.high>=0};LongPrototype.isOdd=function e52(){return(this.low&1)===1};LongPrototype.isEven=function e53(){return(this.low&1)===0};LongPrototype.equals=function e54(n){return isLong(n)||(n=fromValue(n)),this.unsigned!==n.unsigned&&this.high>>>31===1&&n.high>>>31===1?!1:this.high===n.high&&this.low===n.low};LongPrototype.eq=LongPrototype.equals;LongPrototype.notEquals=function e55(n){return!this.eq(n)};LongPrototype.neq=LongPrototype.notEquals;LongPrototype.ne=LongPrototype.notEquals;LongPrototype.lessThan=function e56(n){return this.comp(n)<0};LongPrototype.lt=LongPrototype.lessThan;LongPrototype.lessThanOrEqual=function e57(n){return this.comp(n)<=0};LongPrototype.lte=LongPrototype.lessThanOrEqual;LongPrototype.le=LongPrototype.lessThanOrEqual;LongPrototype.greaterThan=function e58(n){return this.comp(n)>0};LongPrototype.gt=LongPrototype.greaterThan;LongPrototype.greaterThanOrEqual=function e59(n){return this.comp(n)>=0};LongPrototype.gte=LongPrototype.greaterThanOrEqual;LongPrototype.ge=LongPrototype.greaterThanOrEqual;LongPrototype.compare=function e60(n){if(isLong(n)||(n=fromValue(n)),this.eq(n))return 0;var t=this.isNegative(),o=n.isNegative();return t&&!o?-1:!t&&o?1:this.unsigned?n.high>>>0>this.high>>>0||n.high===this.high&&n.low>>>0>this.low>>>0?-1:1:this.sub(n).isNegative()?-1:1};LongPrototype.comp=LongPrototype.compare;LongPrototype.negate=function e61(){return!this.unsigned&&this.eq(MIN_VALUE)?MIN_VALUE:this.not().add(ONE)};LongPrototype.neg=LongPrototype.negate;LongPrototype.add=function e62(n){isLong(n)||(n=fromValue(n));var t=this.high>>>16,o=this.high&65535,d=this.low>>>16,r=this.low&65535,a=n.high>>>16,u=n.high&65535,l=n.low>>>16,s=n.low&65535,f=0,c=0,p=0,S=0;return S+=r+s,p+=S>>>16,S&=65535,p+=d+l,c+=p>>>16,p&=65535,c+=o+u,f+=c>>>16,c&=65535,f+=t+a,f&=65535,fromBits(p<<16|S,f<<16|c,this.unsigned)};LongPrototype.subtract=function e63(n){return isLong(n)||(n=fromValue(n)),this.add(n.neg())};LongPrototype.sub=LongPrototype.subtract;LongPrototype.multiply=function e64(n){if(this.isZero())return ZERO;if(isLong(n)||(n=fromValue(n)),wasm){var t=wasm.mul(this.low,this.high,n.low,n.high);return fromBits(t,wasm.get_high(),this.unsigned)}if(n.isZero())return ZERO;if(this.eq(MIN_VALUE))return n.isOdd()?MIN_VALUE:ZERO;if(n.eq(MIN_VALUE))return this.isOdd()?MIN_VALUE:ZERO;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(TWO_PWR_24)&&n.lt(TWO_PWR_24))return fromNumber(this.toNumber()*n.toNumber(),this.unsigned);var o=this.high>>>16,d=this.high&65535,r=this.low>>>16,a=this.low&65535,u=n.high>>>16,l=n.high&65535,s=n.low>>>16,f=n.low&65535,c=0,p=0,S=0,m=0;return m+=a*f,S+=m>>>16,m&=65535,S+=r*f,p+=S>>>16,S&=65535,S+=a*s,p+=S>>>16,S&=65535,p+=d*f,c+=p>>>16,p&=65535,p+=r*s,c+=p>>>16,p&=65535,p+=a*l,c+=p>>>16,p&=65535,c+=o*f+d*s+r*l+a*u,c&=65535,fromBits(S<<16|m,c<<16|p,this.unsigned)};LongPrototype.mul=LongPrototype.multiply;LongPrototype.divide=function e65(n){if(isLong(n)||(n=fromValue(n)),n.isZero())throw Error("division by zero");if(wasm){if(!this.unsigned&&this.high===-2147483648&&n.low===-1&&n.high===-1)return this;var t=(this.unsigned?wasm.div_u:wasm.div_s)(this.low,this.high,n.low,n.high);return fromBits(t,wasm.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?UZERO:ZERO;var o,d,r;if(this.unsigned){if(n.unsigned||(n=n.toUnsigned()),n.gt(this))return UZERO;if(n.gt(this.shru(1)))return UONE;r=UZERO}else{if(this.eq(MIN_VALUE)){if(n.eq(ONE)||n.eq(NEG_ONE))return MIN_VALUE;if(n.eq(MIN_VALUE))return ONE;var a=this.shr(1);return o=a.div(n).shl(1),o.eq(ZERO)?n.isNegative()?ONE:NEG_ONE:(d=this.sub(n.mul(o)),r=o.add(d.div(n)),r)}else if(n.eq(MIN_VALUE))return this.unsigned?UZERO:ZERO;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg();r=ZERO}for(d=this;d.gte(n);){o=Math.max(1,Math.floor(d.toNumber()/n.toNumber()));for(var u=Math.ceil(Math.log(o)/Math.LN2),l=u<=48?1:pow_dbl(2,u-48),s=fromNumber(o),f=s.mul(n);f.isNegative()||f.gt(d);)o-=l,s=fromNumber(o,this.unsigned),f=s.mul(n);s.isZero()&&(s=ONE),r=r.add(s),d=d.sub(f)}return r};LongPrototype.div=LongPrototype.divide;LongPrototype.modulo=function e66(n){if(isLong(n)||(n=fromValue(n)),wasm){var t=(this.unsigned?wasm.rem_u:wasm.rem_s)(this.low,this.high,n.low,n.high);return fromBits(t,wasm.get_high(),this.unsigned)}return this.sub(this.div(n).mul(n))};LongPrototype.mod=LongPrototype.modulo;LongPrototype.rem=LongPrototype.modulo;LongPrototype.not=function e67(){return fromBits(~this.low,~this.high,this.unsigned)};LongPrototype.and=function e68(n){return isLong(n)||(n=fromValue(n)),fromBits(this.low&n.low,this.high&n.high,this.unsigned)};LongPrototype.or=function e69(n){return isLong(n)||(n=fromValue(n)),fromBits(this.low|n.low,this.high|n.high,this.unsigned)};LongPrototype.xor=function e70(n){return isLong(n)||(n=fromValue(n)),fromBits(this.low^n.low,this.high^n.high,this.unsigned)};LongPrototype.shiftLeft=function e71(n){return isLong(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?fromBits(this.low<<n,this.high<<n|this.low>>>32-n,this.unsigned):fromBits(0,this.low<<n-32,this.unsigned)};LongPrototype.shl=LongPrototype.shiftLeft;LongPrototype.shiftRight=function e72(n){return isLong(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?fromBits(this.low>>>n|this.high<<32-n,this.high>>n,this.unsigned):fromBits(this.high>>n-32,this.high>=0?0:-1,this.unsigned)};LongPrototype.shr=LongPrototype.shiftRight;LongPrototype.shiftRightUnsigned=function e73(n){if(isLong(n)&&(n=n.toInt()),n&=63,n===0)return this;var t=this.high;if(n<32){var o=this.low;return fromBits(o>>>n|t<<32-n,t>>>n,this.unsigned)}else return n===32?fromBits(t,0,this.unsigned):fromBits(t>>>n-32,0,this.unsigned)};LongPrototype.shru=LongPrototype.shiftRightUnsigned;LongPrototype.shr_u=LongPrototype.shiftRightUnsigned;LongPrototype.toSigned=function e74(){return this.unsigned?fromBits(this.low,this.high,!1):this};LongPrototype.toUnsigned=function e75(){return this.unsigned?this:fromBits(this.low,this.high,!0)};LongPrototype.toBytes=function e76(n){return n?this.toBytesLE():this.toBytesBE()};LongPrototype.toBytesLE=function e77(){var n=this.high,t=this.low;return[t&255,t>>>8&255,t>>>16&255,t>>>24,n&255,n>>>8&255,n>>>16&255,n>>>24]};LongPrototype.toBytesBE=function e78(){var n=this.high,t=this.low;return[n>>>24,n>>>16&255,n>>>8&255,n&255,t>>>24,t>>>16&255,t>>>8&255,t&255]};Long.fromBytes=function e79(n,t,o){return o?Long.fromBytesLE(n,t):Long.fromBytesBE(n,t)};Long.fromBytesLE=function e80(n,t){return new Long(n[0]|n[1]<<8|n[2]<<16|n[3]<<24,n[4]|n[5]<<8|n[6]<<16|n[7]<<24,t)};Long.fromBytesBE=function e81(n,t){return new Long(n[4]<<24|n[5]<<16|n[6]<<8|n[7],n[0]<<24|n[1]<<16|n[2]<<8|n[3],t)};var Long$1=getDefaultExportFromCjs(long);function createBaseTimestamp(){return{seconds:0,nanos:0}}var Timestamp={$type:"google.protobuf.Timestamp",encode(e82,n=_m0.Writer.create()){return e82.seconds!==0&&n.uint32(8).int64(e82.seconds),e82.nanos!==0&&n.uint32(16).int32(e82.nanos),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTimestamp();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.seconds=longToNumber$9(t.int64());continue;case 2:if(r!==16)break;d.nanos=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{seconds:isSet$14(e82.seconds)?globalThis.Number(e82.seconds):0,nanos:isSet$14(e82.nanos)?globalThis.Number(e82.nanos):0}},toJSON(e82){let n={};return e82.seconds!==0&&(n.seconds=Math.round(e82.seconds)),e82.nanos!==0&&(n.nanos=Math.round(e82.nanos)),n},create(e82){return Timestamp.fromPartial(e82??{})},fromPartial(e82){let n=createBaseTimestamp();return n.seconds=e82.seconds??0,n.nanos=e82.nanos??0,n}};messageTypeRegistry.set(Timestamp.$type,Timestamp);function longToNumber$9(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isSet$14(e82){return e82!=null}function createBaseCommentV2(){return{id:"",parentId:"",body:"",author:"",numReports:0,collapsedBecauseCrowdControl:!1,spam:!1,deleted:!1,createdAt:0,upvotes:0,downvotes:0,languageCode:"",lastModifiedAt:0,gilded:!1,score:0,permalink:"",hasMedia:!1,postId:"",subredditId:"",elementTypes:[]}}var CommentV2={$type:"devvit.reddit.v2alpha.CommentV2",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id),e82.parentId!==""&&n.uint32(18).string(e82.parentId),e82.body!==""&&n.uint32(26).string(e82.body),e82.author!==""&&n.uint32(34).string(e82.author),e82.numReports!==0&&n.uint32(40).int32(e82.numReports),e82.collapsedBecauseCrowdControl!==!1&&n.uint32(48).bool(e82.collapsedBecauseCrowdControl),e82.spam!==!1&&n.uint32(56).bool(e82.spam),e82.deleted!==!1&&n.uint32(64).bool(e82.deleted),e82.createdAt!==0&&n.uint32(72).int64(e82.createdAt),e82.upvotes!==0&&n.uint32(80).int32(e82.upvotes),e82.downvotes!==0&&n.uint32(88).int32(e82.downvotes),e82.languageCode!==""&&n.uint32(98).string(e82.languageCode),e82.lastModifiedAt!==0&&n.uint32(104).int64(e82.lastModifiedAt),e82.gilded!==!1&&n.uint32(112).bool(e82.gilded),e82.score!==0&&n.uint32(120).int32(e82.score),e82.permalink!==""&&n.uint32(130).string(e82.permalink),e82.hasMedia!==!1&&n.uint32(136).bool(e82.hasMedia),e82.postId!==""&&n.uint32(146).string(e82.postId),e82.subredditId!==""&&n.uint32(154).string(e82.subredditId);for(let t of e82.elementTypes)n.uint32(162).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommentV2();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.parentId=t.string();continue;case 3:if(r!==26)break;d.body=t.string();continue;case 4:if(r!==34)break;d.author=t.string();continue;case 5:if(r!==40)break;d.numReports=t.int32();continue;case 6:if(r!==48)break;d.collapsedBecauseCrowdControl=t.bool();continue;case 7:if(r!==56)break;d.spam=t.bool();continue;case 8:if(r!==64)break;d.deleted=t.bool();continue;case 9:if(r!==72)break;d.createdAt=longToNumber$8(t.int64());continue;case 10:if(r!==80)break;d.upvotes=t.int32();continue;case 11:if(r!==88)break;d.downvotes=t.int32();continue;case 12:if(r!==98)break;d.languageCode=t.string();continue;case 13:if(r!==104)break;d.lastModifiedAt=longToNumber$8(t.int64());continue;case 14:if(r!==112)break;d.gilded=t.bool();continue;case 15:if(r!==120)break;d.score=t.int32();continue;case 16:if(r!==130)break;d.permalink=t.string();continue;case 17:if(r!==136)break;d.hasMedia=t.bool();continue;case 18:if(r!==146)break;d.postId=t.string();continue;case 19:if(r!==154)break;d.subredditId=t.string();continue;case 20:if(r!==162)break;d.elementTypes.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$13(e82.id)?globalThis.String(e82.id):"",parentId:isSet$13(e82.parentId)?globalThis.String(e82.parentId):"",body:isSet$13(e82.body)?globalThis.String(e82.body):"",author:isSet$13(e82.author)?globalThis.String(e82.author):"",numReports:isSet$13(e82.numReports)?globalThis.Number(e82.numReports):0,collapsedBecauseCrowdControl:isSet$13(e82.collapsedBecauseCrowdControl)?globalThis.Boolean(e82.collapsedBecauseCrowdControl):!1,spam:isSet$13(e82.spam)?globalThis.Boolean(e82.spam):!1,deleted:isSet$13(e82.deleted)?globalThis.Boolean(e82.deleted):!1,createdAt:isSet$13(e82.createdAt)?globalThis.Number(e82.createdAt):0,upvotes:isSet$13(e82.upvotes)?globalThis.Number(e82.upvotes):0,downvotes:isSet$13(e82.downvotes)?globalThis.Number(e82.downvotes):0,languageCode:isSet$13(e82.languageCode)?globalThis.String(e82.languageCode):"",lastModifiedAt:isSet$13(e82.lastModifiedAt)?globalThis.Number(e82.lastModifiedAt):0,gilded:isSet$13(e82.gilded)?globalThis.Boolean(e82.gilded):!1,score:isSet$13(e82.score)?globalThis.Number(e82.score):0,permalink:isSet$13(e82.permalink)?globalThis.String(e82.permalink):"",hasMedia:isSet$13(e82.hasMedia)?globalThis.Boolean(e82.hasMedia):!1,postId:isSet$13(e82.postId)?globalThis.String(e82.postId):"",subredditId:isSet$13(e82.subredditId)?globalThis.String(e82.subredditId):"",elementTypes:globalThis.Array.isArray(e82?.elementTypes)?e82.elementTypes.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.id!==""&&(n.id=e82.id),e82.parentId!==""&&(n.parentId=e82.parentId),e82.body!==""&&(n.body=e82.body),e82.author!==""&&(n.author=e82.author),e82.numReports!==0&&(n.numReports=Math.round(e82.numReports)),e82.collapsedBecauseCrowdControl!==!1&&(n.collapsedBecauseCrowdControl=e82.collapsedBecauseCrowdControl),e82.spam!==!1&&(n.spam=e82.spam),e82.deleted!==!1&&(n.deleted=e82.deleted),e82.createdAt!==0&&(n.createdAt=Math.round(e82.createdAt)),e82.upvotes!==0&&(n.upvotes=Math.round(e82.upvotes)),e82.downvotes!==0&&(n.downvotes=Math.round(e82.downvotes)),e82.languageCode!==""&&(n.languageCode=e82.languageCode),e82.lastModifiedAt!==0&&(n.lastModifiedAt=Math.round(e82.lastModifiedAt)),e82.gilded!==!1&&(n.gilded=e82.gilded),e82.score!==0&&(n.score=Math.round(e82.score)),e82.permalink!==""&&(n.permalink=e82.permalink),e82.hasMedia!==!1&&(n.hasMedia=e82.hasMedia),e82.postId!==""&&(n.postId=e82.postId),e82.subredditId!==""&&(n.subredditId=e82.subredditId),(t=e82.elementTypes)!=null&&t.length&&(n.elementTypes=e82.elementTypes),n},create(e82){return CommentV2.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseCommentV2();return n.id=e82.id??"",n.parentId=e82.parentId??"",n.body=e82.body??"",n.author=e82.author??"",n.numReports=e82.numReports??0,n.collapsedBecauseCrowdControl=e82.collapsedBecauseCrowdControl??!1,n.spam=e82.spam??!1,n.deleted=e82.deleted??!1,n.createdAt=e82.createdAt??0,n.upvotes=e82.upvotes??0,n.downvotes=e82.downvotes??0,n.languageCode=e82.languageCode??"",n.lastModifiedAt=e82.lastModifiedAt??0,n.gilded=e82.gilded??!1,n.score=e82.score??0,n.permalink=e82.permalink??"",n.hasMedia=e82.hasMedia??!1,n.postId=e82.postId??"",n.subredditId=e82.subredditId??"",n.elementTypes=((t=e82.elementTypes)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(CommentV2.$type,CommentV2);function longToNumber$8(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isSet$13(e82){return e82!=null}function createBaseLinkFlairV2(){return{text:"",cssClass:"",backgroundColor:"",templateId:"",textColor:""}}var LinkFlairV2={$type:"devvit.reddit.v2alpha.LinkFlairV2",encode(e82,n=_m0.Writer.create()){return e82.text!==""&&n.uint32(10).string(e82.text),e82.cssClass!==""&&n.uint32(18).string(e82.cssClass),e82.backgroundColor!==""&&n.uint32(26).string(e82.backgroundColor),e82.templateId!==""&&n.uint32(34).string(e82.templateId),e82.textColor!==""&&n.uint32(42).string(e82.textColor),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkFlairV2();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.text=t.string();continue;case 2:if(r!==18)break;d.cssClass=t.string();continue;case 3:if(r!==26)break;d.backgroundColor=t.string();continue;case 4:if(r!==34)break;d.templateId=t.string();continue;case 5:if(r!==42)break;d.textColor=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{text:isSet$12(e82.text)?globalThis.String(e82.text):"",cssClass:isSet$12(e82.cssClass)?globalThis.String(e82.cssClass):"",backgroundColor:isSet$12(e82.backgroundColor)?globalThis.String(e82.backgroundColor):"",templateId:isSet$12(e82.templateId)?globalThis.String(e82.templateId):"",textColor:isSet$12(e82.textColor)?globalThis.String(e82.textColor):""}},toJSON(e82){let n={};return e82.text!==""&&(n.text=e82.text),e82.cssClass!==""&&(n.cssClass=e82.cssClass),e82.backgroundColor!==""&&(n.backgroundColor=e82.backgroundColor),e82.templateId!==""&&(n.templateId=e82.templateId),e82.textColor!==""&&(n.textColor=e82.textColor),n},create(e82){return LinkFlairV2.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLinkFlairV2();return n.text=e82.text??"",n.cssClass=e82.cssClass??"",n.backgroundColor=e82.backgroundColor??"",n.templateId=e82.templateId??"",n.textColor=e82.textColor??"",n}};messageTypeRegistry.set(LinkFlairV2.$type,LinkFlairV2);function createBaseUserFlairV2(){return{userId:"",subredditId:"",text:"",cssClass:"",templateId:"",textColor:"",backgroundColor:"",enabled:!1}}var UserFlairV2={$type:"devvit.reddit.v2alpha.UserFlairV2",encode(e82,n=_m0.Writer.create()){return e82.userId!==""&&n.uint32(10).string(e82.userId),e82.subredditId!==""&&n.uint32(18).string(e82.subredditId),e82.text!==""&&n.uint32(26).string(e82.text),e82.cssClass!==""&&n.uint32(34).string(e82.cssClass),e82.templateId!==""&&n.uint32(42).string(e82.templateId),e82.textColor!==""&&n.uint32(50).string(e82.textColor),e82.backgroundColor!==""&&n.uint32(58).string(e82.backgroundColor),e82.enabled!==!1&&n.uint32(64).bool(e82.enabled),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserFlairV2();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.userId=t.string();continue;case 2:if(r!==18)break;d.subredditId=t.string();continue;case 3:if(r!==26)break;d.text=t.string();continue;case 4:if(r!==34)break;d.cssClass=t.string();continue;case 5:if(r!==42)break;d.templateId=t.string();continue;case 6:if(r!==50)break;d.textColor=t.string();continue;case 7:if(r!==58)break;d.backgroundColor=t.string();continue;case 8:if(r!==64)break;d.enabled=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{userId:isSet$12(e82.userId)?globalThis.String(e82.userId):"",subredditId:isSet$12(e82.subredditId)?globalThis.String(e82.subredditId):"",text:isSet$12(e82.text)?globalThis.String(e82.text):"",cssClass:isSet$12(e82.cssClass)?globalThis.String(e82.cssClass):"",templateId:isSet$12(e82.templateId)?globalThis.String(e82.templateId):"",textColor:isSet$12(e82.textColor)?globalThis.String(e82.textColor):"",backgroundColor:isSet$12(e82.backgroundColor)?globalThis.String(e82.backgroundColor):"",enabled:isSet$12(e82.enabled)?globalThis.Boolean(e82.enabled):!1}},toJSON(e82){let n={};return e82.userId!==""&&(n.userId=e82.userId),e82.subredditId!==""&&(n.subredditId=e82.subredditId),e82.text!==""&&(n.text=e82.text),e82.cssClass!==""&&(n.cssClass=e82.cssClass),e82.templateId!==""&&(n.templateId=e82.templateId),e82.textColor!==""&&(n.textColor=e82.textColor),e82.backgroundColor!==""&&(n.backgroundColor=e82.backgroundColor),e82.enabled!==!1&&(n.enabled=e82.enabled),n},create(e82){return UserFlairV2.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserFlairV2();return n.userId=e82.userId??"",n.subredditId=e82.subredditId??"",n.text=e82.text??"",n.cssClass=e82.cssClass??"",n.templateId=e82.templateId??"",n.textColor=e82.textColor??"",n.backgroundColor=e82.backgroundColor??"",n.enabled=e82.enabled??!1,n}};messageTypeRegistry.set(UserFlairV2.$type,UserFlairV2);function isSet$12(e82){return e82!=null}var CrowdControlLevel;(function(e82){e82[e82.OFF=0]="OFF",e82[e82.LENIENT=1]="LENIENT",e82[e82.MEDIUM=2]="MEDIUM",e82[e82.STRICT=3]="STRICT",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(CrowdControlLevel||(CrowdControlLevel={}));function crowdControlLevelFromJSON(e82){switch(e82){case 0:case"OFF":return CrowdControlLevel.OFF;case 1:case"LENIENT":return CrowdControlLevel.LENIENT;case 2:case"MEDIUM":return CrowdControlLevel.MEDIUM;case 3:case"STRICT":return CrowdControlLevel.STRICT;case-1:case"UNRECOGNIZED":default:return CrowdControlLevel.UNRECOGNIZED}}function crowdControlLevelToJSON(e82){switch(e82){case CrowdControlLevel.OFF:return 0;case CrowdControlLevel.LENIENT:return 1;case CrowdControlLevel.MEDIUM:return 2;case CrowdControlLevel.STRICT:return 3;case CrowdControlLevel.UNRECOGNIZED:default:return-1}}var DistinguishType;(function(e82){e82[e82.NULL_VALUE=0]="NULL_VALUE",e82[e82.ADMIN=1]="ADMIN",e82[e82.GOLD=2]="GOLD",e82[e82.GOLD_AUTO=3]="GOLD_AUTO",e82[e82.YES=4]="YES",e82[e82.SPECIAL=5]="SPECIAL",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(DistinguishType||(DistinguishType={}));function distinguishTypeFromJSON(e82){switch(e82){case 0:case"NULL_VALUE":return DistinguishType.NULL_VALUE;case 1:case"ADMIN":return DistinguishType.ADMIN;case 2:case"GOLD":return DistinguishType.GOLD;case 3:case"GOLD_AUTO":return DistinguishType.GOLD_AUTO;case 4:case"YES":return DistinguishType.YES;case 5:case"SPECIAL":return DistinguishType.SPECIAL;case-1:case"UNRECOGNIZED":default:return DistinguishType.UNRECOGNIZED}}function distinguishTypeToJSON(e82){switch(e82){case DistinguishType.NULL_VALUE:return 0;case DistinguishType.ADMIN:return 1;case DistinguishType.GOLD:return 2;case DistinguishType.GOLD_AUTO:return 3;case DistinguishType.YES:return 4;case DistinguishType.SPECIAL:return 5;case DistinguishType.UNRECOGNIZED:default:return-1}}function createBasePostV2(){return{id:"",title:"",selftext:"",nsfw:!1,authorId:"",crowdControlLevel:0,numReports:0,isGallery:!1,isMeta:!1,createdAt:0,isApproved:!1,isArchived:!1,distinguished:0,ignoreReports:!1,isSelf:!1,isVideo:!1,isLocked:!1,isSpoiler:!1,subredditId:"",upvotes:0,downvotes:0,url:"",isSticky:!1,linkFlair:void 0,authorFlair:void 0,spam:!1,deleted:!1,languageCode:"",updatedAt:0,gildings:0,score:0,numComments:0,thumbnail:"",media:void 0,crosspostParentId:"",permalink:"",isPoll:!1,isPromoted:!1,isMultiMedia:!1,type:"",unlisted:!1,galleryImages:[],isImage:!1}}var PostV2={$type:"devvit.reddit.v2alpha.PostV2",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id),e82.title!==""&&n.uint32(18).string(e82.title),e82.selftext!==""&&n.uint32(26).string(e82.selftext),e82.nsfw!==!1&&n.uint32(32).bool(e82.nsfw),e82.authorId!==""&&n.uint32(42).string(e82.authorId),e82.crowdControlLevel!==0&&n.uint32(48).int32(e82.crowdControlLevel),e82.numReports!==0&&n.uint32(56).int32(e82.numReports),e82.isGallery!==!1&&n.uint32(64).bool(e82.isGallery),e82.isMeta!==!1&&n.uint32(72).bool(e82.isMeta),e82.createdAt!==0&&n.uint32(80).int64(e82.createdAt),e82.isApproved!==!1&&n.uint32(88).bool(e82.isApproved),e82.isArchived!==!1&&n.uint32(96).bool(e82.isArchived),e82.distinguished!==0&&n.uint32(104).int32(e82.distinguished),e82.ignoreReports!==!1&&n.uint32(112).bool(e82.ignoreReports),e82.isSelf!==!1&&n.uint32(120).bool(e82.isSelf),e82.isVideo!==!1&&n.uint32(128).bool(e82.isVideo),e82.isLocked!==!1&&n.uint32(136).bool(e82.isLocked),e82.isSpoiler!==!1&&n.uint32(144).bool(e82.isSpoiler),e82.subredditId!==""&&n.uint32(154).string(e82.subredditId),e82.upvotes!==0&&n.uint32(160).int32(e82.upvotes),e82.downvotes!==0&&n.uint32(168).int32(e82.downvotes),e82.url!==""&&n.uint32(178).string(e82.url),e82.isSticky!==!1&&n.uint32(184).bool(e82.isSticky),e82.linkFlair!==void 0&&LinkFlairV2.encode(e82.linkFlair,n.uint32(194).fork()).ldelim(),e82.authorFlair!==void 0&&UserFlairV2.encode(e82.authorFlair,n.uint32(202).fork()).ldelim(),e82.spam!==!1&&n.uint32(208).bool(e82.spam),e82.deleted!==!1&&n.uint32(216).bool(e82.deleted),e82.languageCode!==""&&n.uint32(226).string(e82.languageCode),e82.updatedAt!==0&&n.uint32(232).int64(e82.updatedAt),e82.gildings!==0&&n.uint32(240).int32(e82.gildings),e82.score!==0&&n.uint32(248).int32(e82.score),e82.numComments!==0&&n.uint32(256).int32(e82.numComments),e82.thumbnail!==""&&n.uint32(266).string(e82.thumbnail),e82.media!==void 0&&MediaObject.encode(e82.media,n.uint32(274).fork()).ldelim(),e82.crosspostParentId!==""&&n.uint32(282).string(e82.crosspostParentId),e82.permalink!==""&&n.uint32(290).string(e82.permalink),e82.isPoll!==!1&&n.uint32(296).bool(e82.isPoll),e82.isPromoted!==!1&&n.uint32(304).bool(e82.isPromoted),e82.isMultiMedia!==!1&&n.uint32(312).bool(e82.isMultiMedia),e82.type!==""&&n.uint32(322).string(e82.type),e82.unlisted!==!1&&n.uint32(328).bool(e82.unlisted);for(let t of e82.galleryImages)n.uint32(338).string(t);return e82.isImage!==!1&&n.uint32(344).bool(e82.isImage),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostV2();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.title=t.string();continue;case 3:if(r!==26)break;d.selftext=t.string();continue;case 4:if(r!==32)break;d.nsfw=t.bool();continue;case 5:if(r!==42)break;d.authorId=t.string();continue;case 6:if(r!==48)break;d.crowdControlLevel=t.int32();continue;case 7:if(r!==56)break;d.numReports=t.int32();continue;case 8:if(r!==64)break;d.isGallery=t.bool();continue;case 9:if(r!==72)break;d.isMeta=t.bool();continue;case 10:if(r!==80)break;d.createdAt=longToNumber$7(t.int64());continue;case 11:if(r!==88)break;d.isApproved=t.bool();continue;case 12:if(r!==96)break;d.isArchived=t.bool();continue;case 13:if(r!==104)break;d.distinguished=t.int32();continue;case 14:if(r!==112)break;d.ignoreReports=t.bool();continue;case 15:if(r!==120)break;d.isSelf=t.bool();continue;case 16:if(r!==128)break;d.isVideo=t.bool();continue;case 17:if(r!==136)break;d.isLocked=t.bool();continue;case 18:if(r!==144)break;d.isSpoiler=t.bool();continue;case 19:if(r!==154)break;d.subredditId=t.string();continue;case 20:if(r!==160)break;d.upvotes=t.int32();continue;case 21:if(r!==168)break;d.downvotes=t.int32();continue;case 22:if(r!==178)break;d.url=t.string();continue;case 23:if(r!==184)break;d.isSticky=t.bool();continue;case 24:if(r!==194)break;d.linkFlair=LinkFlairV2.decode(t,t.uint32());continue;case 25:if(r!==202)break;d.authorFlair=UserFlairV2.decode(t,t.uint32());continue;case 26:if(r!==208)break;d.spam=t.bool();continue;case 27:if(r!==216)break;d.deleted=t.bool();continue;case 28:if(r!==226)break;d.languageCode=t.string();continue;case 29:if(r!==232)break;d.updatedAt=longToNumber$7(t.int64());continue;case 30:if(r!==240)break;d.gildings=t.int32();continue;case 31:if(r!==248)break;d.score=t.int32();continue;case 32:if(r!==256)break;d.numComments=t.int32();continue;case 33:if(r!==266)break;d.thumbnail=t.string();continue;case 34:if(r!==274)break;d.media=MediaObject.decode(t,t.uint32());continue;case 35:if(r!==282)break;d.crosspostParentId=t.string();continue;case 36:if(r!==290)break;d.permalink=t.string();continue;case 37:if(r!==296)break;d.isPoll=t.bool();continue;case 38:if(r!==304)break;d.isPromoted=t.bool();continue;case 39:if(r!==312)break;d.isMultiMedia=t.bool();continue;case 40:if(r!==322)break;d.type=t.string();continue;case 41:if(r!==328)break;d.unlisted=t.bool();continue;case 42:if(r!==338)break;d.galleryImages.push(t.string());continue;case 43:if(r!==344)break;d.isImage=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$11(e82.id)?globalThis.String(e82.id):"",title:isSet$11(e82.title)?globalThis.String(e82.title):"",selftext:isSet$11(e82.selftext)?globalThis.String(e82.selftext):"",nsfw:isSet$11(e82.nsfw)?globalThis.Boolean(e82.nsfw):!1,authorId:isSet$11(e82.authorId)?globalThis.String(e82.authorId):"",crowdControlLevel:isSet$11(e82.crowdControlLevel)?crowdControlLevelFromJSON(e82.crowdControlLevel):0,numReports:isSet$11(e82.numReports)?globalThis.Number(e82.numReports):0,isGallery:isSet$11(e82.isGallery)?globalThis.Boolean(e82.isGallery):!1,isMeta:isSet$11(e82.isMeta)?globalThis.Boolean(e82.isMeta):!1,createdAt:isSet$11(e82.createdAt)?globalThis.Number(e82.createdAt):0,isApproved:isSet$11(e82.isApproved)?globalThis.Boolean(e82.isApproved):!1,isArchived:isSet$11(e82.isArchived)?globalThis.Boolean(e82.isArchived):!1,distinguished:isSet$11(e82.distinguished)?distinguishTypeFromJSON(e82.distinguished):0,ignoreReports:isSet$11(e82.ignoreReports)?globalThis.Boolean(e82.ignoreReports):!1,isSelf:isSet$11(e82.isSelf)?globalThis.Boolean(e82.isSelf):!1,isVideo:isSet$11(e82.isVideo)?globalThis.Boolean(e82.isVideo):!1,isLocked:isSet$11(e82.isLocked)?globalThis.Boolean(e82.isLocked):!1,isSpoiler:isSet$11(e82.isSpoiler)?globalThis.Boolean(e82.isSpoiler):!1,subredditId:isSet$11(e82.subredditId)?globalThis.String(e82.subredditId):"",upvotes:isSet$11(e82.upvotes)?globalThis.Number(e82.upvotes):0,downvotes:isSet$11(e82.downvotes)?globalThis.Number(e82.downvotes):0,url:isSet$11(e82.url)?globalThis.String(e82.url):"",isSticky:isSet$11(e82.isSticky)?globalThis.Boolean(e82.isSticky):!1,linkFlair:isSet$11(e82.linkFlair)?LinkFlairV2.fromJSON(e82.linkFlair):void 0,authorFlair:isSet$11(e82.authorFlair)?UserFlairV2.fromJSON(e82.authorFlair):void 0,spam:isSet$11(e82.spam)?globalThis.Boolean(e82.spam):!1,deleted:isSet$11(e82.deleted)?globalThis.Boolean(e82.deleted):!1,languageCode:isSet$11(e82.languageCode)?globalThis.String(e82.languageCode):"",updatedAt:isSet$11(e82.updatedAt)?globalThis.Number(e82.updatedAt):0,gildings:isSet$11(e82.gildings)?globalThis.Number(e82.gildings):0,score:isSet$11(e82.score)?globalThis.Number(e82.score):0,numComments:isSet$11(e82.numComments)?globalThis.Number(e82.numComments):0,thumbnail:isSet$11(e82.thumbnail)?globalThis.String(e82.thumbnail):"",media:isSet$11(e82.media)?MediaObject.fromJSON(e82.media):void 0,crosspostParentId:isSet$11(e82.crosspostParentId)?globalThis.String(e82.crosspostParentId):"",permalink:isSet$11(e82.permalink)?globalThis.String(e82.permalink):"",isPoll:isSet$11(e82.isPoll)?globalThis.Boolean(e82.isPoll):!1,isPromoted:isSet$11(e82.isPromoted)?globalThis.Boolean(e82.isPromoted):!1,isMultiMedia:isSet$11(e82.isMultiMedia)?globalThis.Boolean(e82.isMultiMedia):!1,type:isSet$11(e82.type)?globalThis.String(e82.type):"",unlisted:isSet$11(e82.unlisted)?globalThis.Boolean(e82.unlisted):!1,galleryImages:globalThis.Array.isArray(e82?.galleryImages)?e82.galleryImages.map(n=>globalThis.String(n)):[],isImage:isSet$11(e82.isImage)?globalThis.Boolean(e82.isImage):!1}},toJSON(e82){var t;let n={};return e82.id!==""&&(n.id=e82.id),e82.title!==""&&(n.title=e82.title),e82.selftext!==""&&(n.selftext=e82.selftext),e82.nsfw!==!1&&(n.nsfw=e82.nsfw),e82.authorId!==""&&(n.authorId=e82.authorId),e82.crowdControlLevel!==0&&(n.crowdControlLevel=crowdControlLevelToJSON(e82.crowdControlLevel)),e82.numReports!==0&&(n.numReports=Math.round(e82.numReports)),e82.isGallery!==!1&&(n.isGallery=e82.isGallery),e82.isMeta!==!1&&(n.isMeta=e82.isMeta),e82.createdAt!==0&&(n.createdAt=Math.round(e82.createdAt)),e82.isApproved!==!1&&(n.isApproved=e82.isApproved),e82.isArchived!==!1&&(n.isArchived=e82.isArchived),e82.distinguished!==0&&(n.distinguished=distinguishTypeToJSON(e82.distinguished)),e82.ignoreReports!==!1&&(n.ignoreReports=e82.ignoreReports),e82.isSelf!==!1&&(n.isSelf=e82.isSelf),e82.isVideo!==!1&&(n.isVideo=e82.isVideo),e82.isLocked!==!1&&(n.isLocked=e82.isLocked),e82.isSpoiler!==!1&&(n.isSpoiler=e82.isSpoiler),e82.subredditId!==""&&(n.subredditId=e82.subredditId),e82.upvotes!==0&&(n.upvotes=Math.round(e82.upvotes)),e82.downvotes!==0&&(n.downvotes=Math.round(e82.downvotes)),e82.url!==""&&(n.url=e82.url),e82.isSticky!==!1&&(n.isSticky=e82.isSticky),e82.linkFlair!==void 0&&(n.linkFlair=LinkFlairV2.toJSON(e82.linkFlair)),e82.authorFlair!==void 0&&(n.authorFlair=UserFlairV2.toJSON(e82.authorFlair)),e82.spam!==!1&&(n.spam=e82.spam),e82.deleted!==!1&&(n.deleted=e82.deleted),e82.languageCode!==""&&(n.languageCode=e82.languageCode),e82.updatedAt!==0&&(n.updatedAt=Math.round(e82.updatedAt)),e82.gildings!==0&&(n.gildings=Math.round(e82.gildings)),e82.score!==0&&(n.score=Math.round(e82.score)),e82.numComments!==0&&(n.numComments=Math.round(e82.numComments)),e82.thumbnail!==""&&(n.thumbnail=e82.thumbnail),e82.media!==void 0&&(n.media=MediaObject.toJSON(e82.media)),e82.crosspostParentId!==""&&(n.crosspostParentId=e82.crosspostParentId),e82.permalink!==""&&(n.permalink=e82.permalink),e82.isPoll!==!1&&(n.isPoll=e82.isPoll),e82.isPromoted!==!1&&(n.isPromoted=e82.isPromoted),e82.isMultiMedia!==!1&&(n.isMultiMedia=e82.isMultiMedia),e82.type!==""&&(n.type=e82.type),e82.unlisted!==!1&&(n.unlisted=e82.unlisted),(t=e82.galleryImages)!=null&&t.length&&(n.galleryImages=e82.galleryImages),e82.isImage!==!1&&(n.isImage=e82.isImage),n},create(e82){return PostV2.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBasePostV2();return n.id=e82.id??"",n.title=e82.title??"",n.selftext=e82.selftext??"",n.nsfw=e82.nsfw??!1,n.authorId=e82.authorId??"",n.crowdControlLevel=e82.crowdControlLevel??0,n.numReports=e82.numReports??0,n.isGallery=e82.isGallery??!1,n.isMeta=e82.isMeta??!1,n.createdAt=e82.createdAt??0,n.isApproved=e82.isApproved??!1,n.isArchived=e82.isArchived??!1,n.distinguished=e82.distinguished??0,n.ignoreReports=e82.ignoreReports??!1,n.isSelf=e82.isSelf??!1,n.isVideo=e82.isVideo??!1,n.isLocked=e82.isLocked??!1,n.isSpoiler=e82.isSpoiler??!1,n.subredditId=e82.subredditId??"",n.upvotes=e82.upvotes??0,n.downvotes=e82.downvotes??0,n.url=e82.url??"",n.isSticky=e82.isSticky??!1,n.linkFlair=e82.linkFlair!==void 0&&e82.linkFlair!==null?LinkFlairV2.fromPartial(e82.linkFlair):void 0,n.authorFlair=e82.authorFlair!==void 0&&e82.authorFlair!==null?UserFlairV2.fromPartial(e82.authorFlair):void 0,n.spam=e82.spam??!1,n.deleted=e82.deleted??!1,n.languageCode=e82.languageCode??"",n.updatedAt=e82.updatedAt??0,n.gildings=e82.gildings??0,n.score=e82.score??0,n.numComments=e82.numComments??0,n.thumbnail=e82.thumbnail??"",n.media=e82.media!==void 0&&e82.media!==null?MediaObject.fromPartial(e82.media):void 0,n.crosspostParentId=e82.crosspostParentId??"",n.permalink=e82.permalink??"",n.isPoll=e82.isPoll??!1,n.isPromoted=e82.isPromoted??!1,n.isMultiMedia=e82.isMultiMedia??!1,n.type=e82.type??"",n.unlisted=e82.unlisted??!1,n.galleryImages=((t=e82.galleryImages)==null?void 0:t.map(o=>o))||[],n.isImage=e82.isImage??!1,n}};messageTypeRegistry.set(PostV2.$type,PostV2);function createBaseOembed(){return{type:"",version:"",title:"",description:"",authorName:"",authorUrl:"",providerName:"",providerUrl:"",thumbnailUrl:"",thumbnailWidth:0,thumbnailHeight:0,html:"",width:0,height:0}}var Oembed={$type:"devvit.reddit.v2alpha.Oembed",encode(e82,n=_m0.Writer.create()){return e82.type!==""&&n.uint32(10).string(e82.type),e82.version!==""&&n.uint32(18).string(e82.version),e82.title!==""&&n.uint32(26).string(e82.title),e82.description!==""&&n.uint32(34).string(e82.description),e82.authorName!==""&&n.uint32(42).string(e82.authorName),e82.authorUrl!==""&&n.uint32(50).string(e82.authorUrl),e82.providerName!==""&&n.uint32(58).string(e82.providerName),e82.providerUrl!==""&&n.uint32(66).string(e82.providerUrl),e82.thumbnailUrl!==""&&n.uint32(74).string(e82.thumbnailUrl),e82.thumbnailWidth!==0&&n.uint32(80).int32(e82.thumbnailWidth),e82.thumbnailHeight!==0&&n.uint32(88).int32(e82.thumbnailHeight),e82.html!==""&&n.uint32(98).string(e82.html),e82.width!==0&&n.uint32(104).int32(e82.width),e82.height!==0&&n.uint32(112).int32(e82.height),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseOembed();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.type=t.string();continue;case 2:if(r!==18)break;d.version=t.string();continue;case 3:if(r!==26)break;d.title=t.string();continue;case 4:if(r!==34)break;d.description=t.string();continue;case 5:if(r!==42)break;d.authorName=t.string();continue;case 6:if(r!==50)break;d.authorUrl=t.string();continue;case 7:if(r!==58)break;d.providerName=t.string();continue;case 8:if(r!==66)break;d.providerUrl=t.string();continue;case 9:if(r!==74)break;d.thumbnailUrl=t.string();continue;case 10:if(r!==80)break;d.thumbnailWidth=t.int32();continue;case 11:if(r!==88)break;d.thumbnailHeight=t.int32();continue;case 12:if(r!==98)break;d.html=t.string();continue;case 13:if(r!==104)break;d.width=t.int32();continue;case 14:if(r!==112)break;d.height=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{type:isSet$11(e82.type)?globalThis.String(e82.type):"",version:isSet$11(e82.version)?globalThis.String(e82.version):"",title:isSet$11(e82.title)?globalThis.String(e82.title):"",description:isSet$11(e82.description)?globalThis.String(e82.description):"",authorName:isSet$11(e82.authorName)?globalThis.String(e82.authorName):"",authorUrl:isSet$11(e82.authorUrl)?globalThis.String(e82.authorUrl):"",providerName:isSet$11(e82.providerName)?globalThis.String(e82.providerName):"",providerUrl:isSet$11(e82.providerUrl)?globalThis.String(e82.providerUrl):"",thumbnailUrl:isSet$11(e82.thumbnailUrl)?globalThis.String(e82.thumbnailUrl):"",thumbnailWidth:isSet$11(e82.thumbnailWidth)?globalThis.Number(e82.thumbnailWidth):0,thumbnailHeight:isSet$11(e82.thumbnailHeight)?globalThis.Number(e82.thumbnailHeight):0,html:isSet$11(e82.html)?globalThis.String(e82.html):"",width:isSet$11(e82.width)?globalThis.Number(e82.width):0,height:isSet$11(e82.height)?globalThis.Number(e82.height):0}},toJSON(e82){let n={};return e82.type!==""&&(n.type=e82.type),e82.version!==""&&(n.version=e82.version),e82.title!==""&&(n.title=e82.title),e82.description!==""&&(n.description=e82.description),e82.authorName!==""&&(n.authorName=e82.authorName),e82.authorUrl!==""&&(n.authorUrl=e82.authorUrl),e82.providerName!==""&&(n.providerName=e82.providerName),e82.providerUrl!==""&&(n.providerUrl=e82.providerUrl),e82.thumbnailUrl!==""&&(n.thumbnailUrl=e82.thumbnailUrl),e82.thumbnailWidth!==0&&(n.thumbnailWidth=Math.round(e82.thumbnailWidth)),e82.thumbnailHeight!==0&&(n.thumbnailHeight=Math.round(e82.thumbnailHeight)),e82.html!==""&&(n.html=e82.html),e82.width!==0&&(n.width=Math.round(e82.width)),e82.height!==0&&(n.height=Math.round(e82.height)),n},create(e82){return Oembed.fromPartial(e82??{})},fromPartial(e82){let n=createBaseOembed();return n.type=e82.type??"",n.version=e82.version??"",n.title=e82.title??"",n.description=e82.description??"",n.authorName=e82.authorName??"",n.authorUrl=e82.authorUrl??"",n.providerName=e82.providerName??"",n.providerUrl=e82.providerUrl??"",n.thumbnailUrl=e82.thumbnailUrl??"",n.thumbnailWidth=e82.thumbnailWidth??0,n.thumbnailHeight=e82.thumbnailHeight??0,n.html=e82.html??"",n.width=e82.width??0,n.height=e82.height??0,n}};messageTypeRegistry.set(Oembed.$type,Oembed);function createBaseRedditVideo(){return{bitrateKbps:0,fallbackUrl:"",height:0,width:0,scrubberMediaUrl:"",dashUrl:"",duration:0,hlsUrl:"",isGif:!1,transcodingStatus:""}}var RedditVideo={$type:"devvit.reddit.v2alpha.RedditVideo",encode(e82,n=_m0.Writer.create()){return e82.bitrateKbps!==0&&n.uint32(8).int32(e82.bitrateKbps),e82.fallbackUrl!==""&&n.uint32(18).string(e82.fallbackUrl),e82.height!==0&&n.uint32(24).int32(e82.height),e82.width!==0&&n.uint32(32).int32(e82.width),e82.scrubberMediaUrl!==""&&n.uint32(42).string(e82.scrubberMediaUrl),e82.dashUrl!==""&&n.uint32(50).string(e82.dashUrl),e82.duration!==0&&n.uint32(56).int64(e82.duration),e82.hlsUrl!==""&&n.uint32(66).string(e82.hlsUrl),e82.isGif!==!1&&n.uint32(72).bool(e82.isGif),e82.transcodingStatus!==""&&n.uint32(82).string(e82.transcodingStatus),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedditVideo();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.bitrateKbps=t.int32();continue;case 2:if(r!==18)break;d.fallbackUrl=t.string();continue;case 3:if(r!==24)break;d.height=t.int32();continue;case 4:if(r!==32)break;d.width=t.int32();continue;case 5:if(r!==42)break;d.scrubberMediaUrl=t.string();continue;case 6:if(r!==50)break;d.dashUrl=t.string();continue;case 7:if(r!==56)break;d.duration=longToNumber$7(t.int64());continue;case 8:if(r!==66)break;d.hlsUrl=t.string();continue;case 9:if(r!==72)break;d.isGif=t.bool();continue;case 10:if(r!==82)break;d.transcodingStatus=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{bitrateKbps:isSet$11(e82.bitrateKbps)?globalThis.Number(e82.bitrateKbps):0,fallbackUrl:isSet$11(e82.fallbackUrl)?globalThis.String(e82.fallbackUrl):"",height:isSet$11(e82.height)?globalThis.Number(e82.height):0,width:isSet$11(e82.width)?globalThis.Number(e82.width):0,scrubberMediaUrl:isSet$11(e82.scrubberMediaUrl)?globalThis.String(e82.scrubberMediaUrl):"",dashUrl:isSet$11(e82.dashUrl)?globalThis.String(e82.dashUrl):"",duration:isSet$11(e82.duration)?globalThis.Number(e82.duration):0,hlsUrl:isSet$11(e82.hlsUrl)?globalThis.String(e82.hlsUrl):"",isGif:isSet$11(e82.isGif)?globalThis.Boolean(e82.isGif):!1,transcodingStatus:isSet$11(e82.transcodingStatus)?globalThis.String(e82.transcodingStatus):""}},toJSON(e82){let n={};return e82.bitrateKbps!==0&&(n.bitrateKbps=Math.round(e82.bitrateKbps)),e82.fallbackUrl!==""&&(n.fallbackUrl=e82.fallbackUrl),e82.height!==0&&(n.height=Math.round(e82.height)),e82.width!==0&&(n.width=Math.round(e82.width)),e82.scrubberMediaUrl!==""&&(n.scrubberMediaUrl=e82.scrubberMediaUrl),e82.dashUrl!==""&&(n.dashUrl=e82.dashUrl),e82.duration!==0&&(n.duration=Math.round(e82.duration)),e82.hlsUrl!==""&&(n.hlsUrl=e82.hlsUrl),e82.isGif!==!1&&(n.isGif=e82.isGif),e82.transcodingStatus!==""&&(n.transcodingStatus=e82.transcodingStatus),n},create(e82){return RedditVideo.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedditVideo();return n.bitrateKbps=e82.bitrateKbps??0,n.fallbackUrl=e82.fallbackUrl??"",n.height=e82.height??0,n.width=e82.width??0,n.scrubberMediaUrl=e82.scrubberMediaUrl??"",n.dashUrl=e82.dashUrl??"",n.duration=e82.duration??0,n.hlsUrl=e82.hlsUrl??"",n.isGif=e82.isGif??!1,n.transcodingStatus=e82.transcodingStatus??"",n}};messageTypeRegistry.set(RedditVideo.$type,RedditVideo);function createBaseMediaObject(){return{type:"",oembed:void 0,redditVideo:void 0}}var MediaObject={$type:"devvit.reddit.v2alpha.MediaObject",encode(e82,n=_m0.Writer.create()){return e82.type!==""&&n.uint32(10).string(e82.type),e82.oembed!==void 0&&Oembed.encode(e82.oembed,n.uint32(18).fork()).ldelim(),e82.redditVideo!==void 0&&RedditVideo.encode(e82.redditVideo,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMediaObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.type=t.string();continue;case 2:if(r!==18)break;d.oembed=Oembed.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.redditVideo=RedditVideo.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{type:isSet$11(e82.type)?globalThis.String(e82.type):"",oembed:isSet$11(e82.oembed)?Oembed.fromJSON(e82.oembed):void 0,redditVideo:isSet$11(e82.redditVideo)?RedditVideo.fromJSON(e82.redditVideo):void 0}},toJSON(e82){let n={};return e82.type!==""&&(n.type=e82.type),e82.oembed!==void 0&&(n.oembed=Oembed.toJSON(e82.oembed)),e82.redditVideo!==void 0&&(n.redditVideo=RedditVideo.toJSON(e82.redditVideo)),n},create(e82){return MediaObject.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMediaObject();return n.type=e82.type??"",n.oembed=e82.oembed!==void 0&&e82.oembed!==null?Oembed.fromPartial(e82.oembed):void 0,n.redditVideo=e82.redditVideo!==void 0&&e82.redditVideo!==null?RedditVideo.fromPartial(e82.redditVideo):void 0,n}};messageTypeRegistry.set(MediaObject.$type,MediaObject);function longToNumber$7(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isSet$11(e82){return e82!=null}var SubredditType;(function(e82){e82[e82.ARCHIVED=0]="ARCHIVED",e82[e82.EMPLOYEES_ONLY=1]="EMPLOYEES_ONLY",e82[e82.GOLD_ONLY=2]="GOLD_ONLY",e82[e82.GOLD_RESTRICTED=3]="GOLD_RESTRICTED",e82[e82.PRIVATE=4]="PRIVATE",e82[e82.PUBLIC=5]="PUBLIC",e82[e82.RESTRICTED=6]="RESTRICTED",e82[e82.USER=7]="USER",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(SubredditType||(SubredditType={}));function subredditTypeFromJSON(e82){switch(e82){case 0:case"ARCHIVED":return SubredditType.ARCHIVED;case 1:case"EMPLOYEES_ONLY":return SubredditType.EMPLOYEES_ONLY;case 2:case"GOLD_ONLY":return SubredditType.GOLD_ONLY;case 3:case"GOLD_RESTRICTED":return SubredditType.GOLD_RESTRICTED;case 4:case"PRIVATE":return SubredditType.PRIVATE;case 5:case"PUBLIC":return SubredditType.PUBLIC;case 6:case"RESTRICTED":return SubredditType.RESTRICTED;case 7:case"USER":return SubredditType.USER;case-1:case"UNRECOGNIZED":default:return SubredditType.UNRECOGNIZED}}function subredditTypeToJSON(e82){switch(e82){case SubredditType.ARCHIVED:return 0;case SubredditType.EMPLOYEES_ONLY:return 1;case SubredditType.GOLD_ONLY:return 2;case SubredditType.GOLD_RESTRICTED:return 3;case SubredditType.PRIVATE:return 4;case SubredditType.PUBLIC:return 5;case SubredditType.RESTRICTED:return 6;case SubredditType.USER:return 7;case SubredditType.UNRECOGNIZED:default:return-1}}var SubredditRating;(function(e82){e82[e82.UNKNOWN_SUBREDDIT_RATING=0]="UNKNOWN_SUBREDDIT_RATING",e82[e82.E=1]="E",e82[e82.M1=2]="M1",e82[e82.M2=3]="M2",e82[e82.D=4]="D",e82[e82.V=5]="V",e82[e82.X=6]="X",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(SubredditRating||(SubredditRating={}));function subredditRatingFromJSON(e82){switch(e82){case 0:case"UNKNOWN_SUBREDDIT_RATING":return SubredditRating.UNKNOWN_SUBREDDIT_RATING;case 1:case"E":return SubredditRating.E;case 2:case"M1":return SubredditRating.M1;case 3:case"M2":return SubredditRating.M2;case 4:case"D":return SubredditRating.D;case 5:case"V":return SubredditRating.V;case 6:case"X":return SubredditRating.X;case-1:case"UNRECOGNIZED":default:return SubredditRating.UNRECOGNIZED}}function subredditRatingToJSON(e82){switch(e82){case SubredditRating.UNKNOWN_SUBREDDIT_RATING:return 0;case SubredditRating.E:return 1;case SubredditRating.M1:return 2;case SubredditRating.M2:return 3;case SubredditRating.D:return 4;case SubredditRating.V:return 5;case SubredditRating.X:return 6;case SubredditRating.UNRECOGNIZED:default:return-1}}function createBaseSubredditV2(){return{id:"",name:"",nsfw:!1,type:0,spam:!1,quarantined:!1,topics:[],rating:0,subscribersCount:0,permalink:""}}var SubredditV2={$type:"devvit.reddit.v2alpha.SubredditV2",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id),e82.name!==""&&n.uint32(18).string(e82.name),e82.nsfw!==!1&&n.uint32(24).bool(e82.nsfw),e82.type!==0&&n.uint32(32).int32(e82.type),e82.spam!==!1&&n.uint32(40).bool(e82.spam),e82.quarantined!==!1&&n.uint32(48).bool(e82.quarantined);for(let t of e82.topics)n.uint32(58).string(t);return e82.rating!==0&&n.uint32(64).int32(e82.rating),e82.subscribersCount!==0&&n.uint32(72).int32(e82.subscribersCount),e82.permalink!==""&&n.uint32(82).string(e82.permalink),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditV2();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.name=t.string();continue;case 3:if(r!==24)break;d.nsfw=t.bool();continue;case 4:if(r!==32)break;d.type=t.int32();continue;case 5:if(r!==40)break;d.spam=t.bool();continue;case 6:if(r!==48)break;d.quarantined=t.bool();continue;case 7:if(r!==58)break;d.topics.push(t.string());continue;case 8:if(r!==64)break;d.rating=t.int32();continue;case 9:if(r!==72)break;d.subscribersCount=t.int32();continue;case 10:if(r!==82)break;d.permalink=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$10(e82.id)?globalThis.String(e82.id):"",name:isSet$10(e82.name)?globalThis.String(e82.name):"",nsfw:isSet$10(e82.nsfw)?globalThis.Boolean(e82.nsfw):!1,type:isSet$10(e82.type)?subredditTypeFromJSON(e82.type):0,spam:isSet$10(e82.spam)?globalThis.Boolean(e82.spam):!1,quarantined:isSet$10(e82.quarantined)?globalThis.Boolean(e82.quarantined):!1,topics:globalThis.Array.isArray(e82?.topics)?e82.topics.map(n=>globalThis.String(n)):[],rating:isSet$10(e82.rating)?subredditRatingFromJSON(e82.rating):0,subscribersCount:isSet$10(e82.subscribersCount)?globalThis.Number(e82.subscribersCount):0,permalink:isSet$10(e82.permalink)?globalThis.String(e82.permalink):""}},toJSON(e82){var t;let n={};return e82.id!==""&&(n.id=e82.id),e82.name!==""&&(n.name=e82.name),e82.nsfw!==!1&&(n.nsfw=e82.nsfw),e82.type!==0&&(n.type=subredditTypeToJSON(e82.type)),e82.spam!==!1&&(n.spam=e82.spam),e82.quarantined!==!1&&(n.quarantined=e82.quarantined),(t=e82.topics)!=null&&t.length&&(n.topics=e82.topics),e82.rating!==0&&(n.rating=subredditRatingToJSON(e82.rating)),e82.subscribersCount!==0&&(n.subscribersCount=Math.round(e82.subscribersCount)),e82.permalink!==""&&(n.permalink=e82.permalink),n},create(e82){return SubredditV2.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSubredditV2();return n.id=e82.id??"",n.name=e82.name??"",n.nsfw=e82.nsfw??!1,n.type=e82.type??0,n.spam=e82.spam??!1,n.quarantined=e82.quarantined??!1,n.topics=((t=e82.topics)==null?void 0:t.map(o=>o))||[],n.rating=e82.rating??0,n.subscribersCount=e82.subscribersCount??0,n.permalink=e82.permalink??"",n}};messageTypeRegistry.set(SubredditV2.$type,SubredditV2);function isSet$10(e82){return e82!=null}function createBaseUserV2(){return{id:"",name:"",isGold:!1,snoovatarImage:"",url:"",spam:!1,banned:!1,flair:void 0,karma:0,iconImage:"",description:"",suspended:!1}}var UserV2={$type:"devvit.reddit.v2alpha.UserV2",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.name!==""&&n.uint32(18).string(e82.name),e82.isGold!==!1&&n.uint32(24).bool(e82.isGold),e82.snoovatarImage!==""&&n.uint32(34).string(e82.snoovatarImage),e82.url!==""&&n.uint32(42).string(e82.url),e82.spam!==!1&&n.uint32(48).bool(e82.spam),e82.banned!==!1&&n.uint32(56).bool(e82.banned),e82.flair!==void 0&&UserFlairV2.encode(e82.flair,n.uint32(66).fork()).ldelim(),e82.karma!==0&&n.uint32(72).int64(e82.karma),e82.iconImage!==""&&n.uint32(82).string(e82.iconImage),e82.description!==""&&n.uint32(90).string(e82.description),e82.suspended!==!1&&n.uint32(96).bool(e82.suspended),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserV2();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.name=t.string();continue;case 3:if(r!==24)break;d.isGold=t.bool();continue;case 4:if(r!==34)break;d.snoovatarImage=t.string();continue;case 5:if(r!==42)break;d.url=t.string();continue;case 6:if(r!==48)break;d.spam=t.bool();continue;case 7:if(r!==56)break;d.banned=t.bool();continue;case 8:if(r!==66)break;d.flair=UserFlairV2.decode(t,t.uint32());continue;case 9:if(r!==72)break;d.karma=longToNumber$6(t.int64());continue;case 10:if(r!==82)break;d.iconImage=t.string();continue;case 11:if(r!==90)break;d.description=t.string();continue;case 12:if(r!==96)break;d.suspended=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$$(e82.id)?globalThis.String(e82.id):"",name:isSet$$(e82.name)?globalThis.String(e82.name):"",isGold:isSet$$(e82.isGold)?globalThis.Boolean(e82.isGold):!1,snoovatarImage:isSet$$(e82.snoovatarImage)?globalThis.String(e82.snoovatarImage):"",url:isSet$$(e82.url)?globalThis.String(e82.url):"",spam:isSet$$(e82.spam)?globalThis.Boolean(e82.spam):!1,banned:isSet$$(e82.banned)?globalThis.Boolean(e82.banned):!1,flair:isSet$$(e82.flair)?UserFlairV2.fromJSON(e82.flair):void 0,karma:isSet$$(e82.karma)?globalThis.Number(e82.karma):0,iconImage:isSet$$(e82.iconImage)?globalThis.String(e82.iconImage):"",description:isSet$$(e82.description)?globalThis.String(e82.description):"",suspended:isSet$$(e82.suspended)?globalThis.Boolean(e82.suspended):!1}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.name!==""&&(n.name=e82.name),e82.isGold!==!1&&(n.isGold=e82.isGold),e82.snoovatarImage!==""&&(n.snoovatarImage=e82.snoovatarImage),e82.url!==""&&(n.url=e82.url),e82.spam!==!1&&(n.spam=e82.spam),e82.banned!==!1&&(n.banned=e82.banned),e82.flair!==void 0&&(n.flair=UserFlairV2.toJSON(e82.flair)),e82.karma!==0&&(n.karma=Math.round(e82.karma)),e82.iconImage!==""&&(n.iconImage=e82.iconImage),e82.description!==""&&(n.description=e82.description),e82.suspended!==!1&&(n.suspended=e82.suspended),n},create(e82){return UserV2.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserV2();return n.id=e82.id??"",n.name=e82.name??"",n.isGold=e82.isGold??!1,n.snoovatarImage=e82.snoovatarImage??"",n.url=e82.url??"",n.spam=e82.spam??!1,n.banned=e82.banned??!1,n.flair=e82.flair!==void 0&&e82.flair!==null?UserFlairV2.fromPartial(e82.flair):void 0,n.karma=e82.karma??0,n.iconImage=e82.iconImage??"",n.description=e82.description??"",n.suspended=e82.suspended??!1,n}};messageTypeRegistry.set(UserV2.$type,UserV2);function longToNumber$6(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isSet$$(e82){return e82!=null}var EventSource;(function(e82){e82[e82.UNKNOWN_EVENT_SOURCE=0]="UNKNOWN_EVENT_SOURCE",e82[e82.USER=1]="USER",e82[e82.ADMIN=2]="ADMIN",e82[e82.MODERATOR=3]="MODERATOR",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(EventSource||(EventSource={}));function eventSourceFromJSON(e82){switch(e82){case 0:case"UNKNOWN_EVENT_SOURCE":return EventSource.UNKNOWN_EVENT_SOURCE;case 1:case"USER":return EventSource.USER;case 2:case"ADMIN":return EventSource.ADMIN;case 3:case"MODERATOR":return EventSource.MODERATOR;case-1:case"UNRECOGNIZED":default:return EventSource.UNRECOGNIZED}}function eventSourceToJSON(e82){switch(e82){case EventSource.UNKNOWN_EVENT_SOURCE:return 0;case EventSource.USER:return 1;case EventSource.ADMIN:return 2;case EventSource.MODERATOR:return 3;case EventSource.UNRECOGNIZED:default:return-1}}var DeletionReason;(function(e82){e82[e82.UNSPECIFIED_DELETION_REASON=0]="UNSPECIFIED_DELETION_REASON",e82[e82.SPAM=1]="SPAM",e82[e82.LEGAL=2]="LEGAL",e82[e82.OTHER=3]="OTHER",e82[e82.UNKNOWN=4]="UNKNOWN",e82[e82.EXPLICIT_CONTENT=5]="EXPLICIT_CONTENT",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(DeletionReason||(DeletionReason={}));function deletionReasonFromJSON(e82){switch(e82){case 0:case"UNSPECIFIED_DELETION_REASON":return DeletionReason.UNSPECIFIED_DELETION_REASON;case 1:case"SPAM":return DeletionReason.SPAM;case 2:case"LEGAL":return DeletionReason.LEGAL;case 3:case"OTHER":return DeletionReason.OTHER;case 4:case"UNKNOWN":return DeletionReason.UNKNOWN;case 5:case"EXPLICIT_CONTENT":return DeletionReason.EXPLICIT_CONTENT;case-1:case"UNRECOGNIZED":default:return DeletionReason.UNRECOGNIZED}}function deletionReasonToJSON(e82){switch(e82){case DeletionReason.UNSPECIFIED_DELETION_REASON:return 0;case DeletionReason.SPAM:return 1;case DeletionReason.LEGAL:return 2;case DeletionReason.OTHER:return 3;case DeletionReason.UNKNOWN:return 4;case DeletionReason.EXPLICIT_CONTENT:return 5;case DeletionReason.UNRECOGNIZED:default:return-1}}function createBasePostSubmit(){return{post:void 0,author:void 0,subreddit:void 0}}var PostSubmit={$type:"devvit.events.v1alpha.PostSubmit",encode(e82,n=_m0.Writer.create()){return e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(10).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostSubmit();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.post=PostV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.author=UserV2.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return PostSubmit.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostSubmit();return n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(PostSubmit.$type,PostSubmit);function createBasePostCreate(){return{post:void 0,author:void 0,subreddit:void 0}}var PostCreate={$type:"devvit.events.v1alpha.PostCreate",encode(e82,n=_m0.Writer.create()){return e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(10).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostCreate();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.post=PostV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.author=UserV2.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return PostCreate.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostCreate();return n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(PostCreate.$type,PostCreate);function createBasePostUpdate(){return{post:void 0,author:void 0,previousBody:"",subreddit:void 0}}var PostUpdate={$type:"devvit.events.v1alpha.PostUpdate",encode(e82,n=_m0.Writer.create()){return e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(10).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.previousBody!==""&&n.uint32(26).string(e82.previousBody),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostUpdate();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.post=PostV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.author=UserV2.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.previousBody=t.string();continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,previousBody:isSet$_(e82.previousBody)?globalThis.String(e82.previousBody):"",subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.previousBody!==""&&(n.previousBody=e82.previousBody),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return PostUpdate.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostUpdate();return n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.previousBody=e82.previousBody??"",n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(PostUpdate.$type,PostUpdate);function createBasePostReport(){return{post:void 0,subreddit:void 0,reason:""}}var PostReport={$type:"devvit.events.v1alpha.PostReport",encode(e82,n=_m0.Writer.create()){return e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(10).fork()).ldelim(),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),e82.reason!==""&&n.uint32(26).string(e82.reason),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostReport();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.post=PostV2.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.reason=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0,reason:isSet$_(e82.reason)?globalThis.String(e82.reason):""}},toJSON(e82){let n={};return e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),e82.reason!==""&&(n.reason=e82.reason),n},create(e82){return PostReport.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostReport();return n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n.reason=e82.reason??"",n}};messageTypeRegistry.set(PostReport.$type,PostReport);function createBasePostFlairUpdate(){return{post:void 0,author:void 0,subreddit:void 0}}var PostFlairUpdate={$type:"devvit.events.v1alpha.PostFlairUpdate",encode(e82,n=_m0.Writer.create()){return e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(10).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostFlairUpdate();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.post=PostV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.author=UserV2.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return PostFlairUpdate.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostFlairUpdate();return n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(PostFlairUpdate.$type,PostFlairUpdate);function createBasePostDelete(){return{postId:"",deletedAt:void 0,author:void 0,createdAt:void 0,source:0,reason:0,subreddit:void 0}}var PostDelete={$type:"devvit.events.v1alpha.PostDelete",encode(e82,n=_m0.Writer.create()){return e82.postId!==""&&n.uint32(10).string(e82.postId),e82.deletedAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.deletedAt),n.uint32(18).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(26).fork()).ldelim(),e82.createdAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.createdAt),n.uint32(34).fork()).ldelim(),e82.source!==0&&n.uint32(40).int32(e82.source),e82.reason!==0&&n.uint32(48).int32(e82.reason),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostDelete();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.postId=t.string();continue;case 2:if(r!==18)break;d.deletedAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.author=UserV2.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.createdAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 5:if(r!==40)break;d.source=t.int32();continue;case 6:if(r!==48)break;d.reason=t.int32();continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{postId:isSet$_(e82.postId)?globalThis.String(e82.postId):"",deletedAt:isSet$_(e82.deletedAt)?fromJsonTimestamp$6(e82.deletedAt):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,createdAt:isSet$_(e82.createdAt)?fromJsonTimestamp$6(e82.createdAt):void 0,source:isSet$_(e82.source)?eventSourceFromJSON(e82.source):0,reason:isSet$_(e82.reason)?deletionReasonFromJSON(e82.reason):0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.postId!==""&&(n.postId=e82.postId),e82.deletedAt!==void 0&&(n.deletedAt=e82.deletedAt.toISOString()),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.createdAt!==void 0&&(n.createdAt=e82.createdAt.toISOString()),e82.source!==0&&(n.source=eventSourceToJSON(e82.source)),e82.reason!==0&&(n.reason=deletionReasonToJSON(e82.reason)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return PostDelete.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostDelete();return n.postId=e82.postId??"",n.deletedAt=e82.deletedAt??void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.createdAt=e82.createdAt??void 0,n.source=e82.source??0,n.reason=e82.reason??0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(PostDelete.$type,PostDelete);function createBasePostApprove(){return{post:void 0,approvedAt:void 0,author:void 0,source:0,subreddit:void 0}}var PostApprove={$type:"devvit.events.v1alpha.PostApprove",encode(e82,n=_m0.Writer.create()){return e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(10).fork()).ldelim(),e82.approvedAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.approvedAt),n.uint32(18).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(26).fork()).ldelim(),e82.source!==0&&n.uint32(40).int32(e82.source),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostApprove();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.post=PostV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.approvedAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.author=UserV2.decode(t,t.uint32());continue;case 5:if(r!==40)break;d.source=t.int32();continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,approvedAt:isSet$_(e82.approvedAt)?fromJsonTimestamp$6(e82.approvedAt):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,source:isSet$_(e82.source)?eventSourceFromJSON(e82.source):0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.approvedAt!==void 0&&(n.approvedAt=e82.approvedAt.toISOString()),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.source!==0&&(n.source=eventSourceToJSON(e82.source)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return PostApprove.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostApprove();return n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.approvedAt=e82.approvedAt??void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.source=e82.source??0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(PostApprove.$type,PostApprove);function createBaseCommentApprove(){return{comment:void 0,post:void 0,approvedAt:void 0,author:void 0,source:0,subreddit:void 0}}var CommentApprove={$type:"devvit.events.v1alpha.CommentApprove",encode(e82,n=_m0.Writer.create()){return e82.comment!==void 0&&CommentV2.encode(e82.comment,n.uint32(10).fork()).ldelim(),e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(18).fork()).ldelim(),e82.approvedAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.approvedAt),n.uint32(26).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(34).fork()).ldelim(),e82.source!==0&&n.uint32(48).int32(e82.source),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommentApprove();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.comment=CommentV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.post=PostV2.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.approvedAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.author=UserV2.decode(t,t.uint32());continue;case 6:if(r!==48)break;d.source=t.int32();continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{comment:isSet$_(e82.comment)?CommentV2.fromJSON(e82.comment):void 0,post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,approvedAt:isSet$_(e82.approvedAt)?fromJsonTimestamp$6(e82.approvedAt):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,source:isSet$_(e82.source)?eventSourceFromJSON(e82.source):0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.comment!==void 0&&(n.comment=CommentV2.toJSON(e82.comment)),e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.approvedAt!==void 0&&(n.approvedAt=e82.approvedAt.toISOString()),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.source!==0&&(n.source=eventSourceToJSON(e82.source)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return CommentApprove.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCommentApprove();return n.comment=e82.comment!==void 0&&e82.comment!==null?CommentV2.fromPartial(e82.comment):void 0,n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.approvedAt=e82.approvedAt??void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.source=e82.source??0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(CommentApprove.$type,CommentApprove);function createBaseCommentSubmit(){return{comment:void 0,author:void 0,post:void 0,subreddit:void 0}}var CommentSubmit={$type:"devvit.events.v1alpha.CommentSubmit",encode(e82,n=_m0.Writer.create()){return e82.comment!==void 0&&CommentV2.encode(e82.comment,n.uint32(10).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(26).fork()).ldelim(),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommentSubmit();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.comment=CommentV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.author=UserV2.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.post=PostV2.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{comment:isSet$_(e82.comment)?CommentV2.fromJSON(e82.comment):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.comment!==void 0&&(n.comment=CommentV2.toJSON(e82.comment)),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return CommentSubmit.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCommentSubmit();return n.comment=e82.comment!==void 0&&e82.comment!==null?CommentV2.fromPartial(e82.comment):void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(CommentSubmit.$type,CommentSubmit);function createBaseCommentCreate(){return{comment:void 0,author:void 0,post:void 0,subreddit:void 0}}var CommentCreate={$type:"devvit.events.v1alpha.CommentCreate",encode(e82,n=_m0.Writer.create()){return e82.comment!==void 0&&CommentV2.encode(e82.comment,n.uint32(10).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(26).fork()).ldelim(),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommentCreate();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.comment=CommentV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.author=UserV2.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.post=PostV2.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{comment:isSet$_(e82.comment)?CommentV2.fromJSON(e82.comment):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.comment!==void 0&&(n.comment=CommentV2.toJSON(e82.comment)),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return CommentCreate.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCommentCreate();return n.comment=e82.comment!==void 0&&e82.comment!==null?CommentV2.fromPartial(e82.comment):void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(CommentCreate.$type,CommentCreate);function createBaseCommentUpdate(){return{comment:void 0,author:void 0,post:void 0,previousBody:"",subreddit:void 0}}var CommentUpdate={$type:"devvit.events.v1alpha.CommentUpdate",encode(e82,n=_m0.Writer.create()){return e82.comment!==void 0&&CommentV2.encode(e82.comment,n.uint32(10).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(26).fork()).ldelim(),e82.previousBody!==""&&n.uint32(34).string(e82.previousBody),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommentUpdate();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.comment=CommentV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.author=UserV2.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.post=PostV2.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.previousBody=t.string();continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{comment:isSet$_(e82.comment)?CommentV2.fromJSON(e82.comment):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,previousBody:isSet$_(e82.previousBody)?globalThis.String(e82.previousBody):"",subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.comment!==void 0&&(n.comment=CommentV2.toJSON(e82.comment)),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.previousBody!==""&&(n.previousBody=e82.previousBody),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return CommentUpdate.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCommentUpdate();return n.comment=e82.comment!==void 0&&e82.comment!==null?CommentV2.fromPartial(e82.comment):void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.previousBody=e82.previousBody??"",n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(CommentUpdate.$type,CommentUpdate);function createBaseCommentReport(){return{comment:void 0,subreddit:void 0,reason:""}}var CommentReport={$type:"devvit.events.v1alpha.CommentReport",encode(e82,n=_m0.Writer.create()){return e82.comment!==void 0&&CommentV2.encode(e82.comment,n.uint32(10).fork()).ldelim(),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),e82.reason!==""&&n.uint32(26).string(e82.reason),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommentReport();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.comment=CommentV2.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.reason=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{comment:isSet$_(e82.comment)?CommentV2.fromJSON(e82.comment):void 0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0,reason:isSet$_(e82.reason)?globalThis.String(e82.reason):""}},toJSON(e82){let n={};return e82.comment!==void 0&&(n.comment=CommentV2.toJSON(e82.comment)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),e82.reason!==""&&(n.reason=e82.reason),n},create(e82){return CommentReport.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCommentReport();return n.comment=e82.comment!==void 0&&e82.comment!==null?CommentV2.fromPartial(e82.comment):void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n.reason=e82.reason??"",n}};messageTypeRegistry.set(CommentReport.$type,CommentReport);function createBaseCommentDelete(){return{commentId:"",postId:"",parentId:"",deletedAt:void 0,author:void 0,createdAt:void 0,source:0,reason:0,subreddit:void 0}}var CommentDelete={$type:"devvit.events.v1alpha.CommentDelete",encode(e82,n=_m0.Writer.create()){return e82.commentId!==""&&n.uint32(10).string(e82.commentId),e82.postId!==""&&n.uint32(18).string(e82.postId),e82.parentId!==""&&n.uint32(26).string(e82.parentId),e82.deletedAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.deletedAt),n.uint32(34).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(42).fork()).ldelim(),e82.createdAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.createdAt),n.uint32(50).fork()).ldelim(),e82.source!==0&&n.uint32(56).int32(e82.source),e82.reason!==0&&n.uint32(64).int32(e82.reason),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommentDelete();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.commentId=t.string();continue;case 2:if(r!==18)break;d.postId=t.string();continue;case 3:if(r!==26)break;d.parentId=t.string();continue;case 4:if(r!==34)break;d.deletedAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 5:if(r!==42)break;d.author=UserV2.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.createdAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 7:if(r!==56)break;d.source=t.int32();continue;case 8:if(r!==64)break;d.reason=t.int32();continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{commentId:isSet$_(e82.commentId)?globalThis.String(e82.commentId):"",postId:isSet$_(e82.postId)?globalThis.String(e82.postId):"",parentId:isSet$_(e82.parentId)?globalThis.String(e82.parentId):"",deletedAt:isSet$_(e82.deletedAt)?fromJsonTimestamp$6(e82.deletedAt):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,createdAt:isSet$_(e82.createdAt)?fromJsonTimestamp$6(e82.createdAt):void 0,source:isSet$_(e82.source)?eventSourceFromJSON(e82.source):0,reason:isSet$_(e82.reason)?deletionReasonFromJSON(e82.reason):0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.commentId!==""&&(n.commentId=e82.commentId),e82.postId!==""&&(n.postId=e82.postId),e82.parentId!==""&&(n.parentId=e82.parentId),e82.deletedAt!==void 0&&(n.deletedAt=e82.deletedAt.toISOString()),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.createdAt!==void 0&&(n.createdAt=e82.createdAt.toISOString()),e82.source!==0&&(n.source=eventSourceToJSON(e82.source)),e82.reason!==0&&(n.reason=deletionReasonToJSON(e82.reason)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return CommentDelete.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCommentDelete();return n.commentId=e82.commentId??"",n.postId=e82.postId??"",n.parentId=e82.parentId??"",n.deletedAt=e82.deletedAt??void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.createdAt=e82.createdAt??void 0,n.source=e82.source??0,n.reason=e82.reason??0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(CommentDelete.$type,CommentDelete);function createBaseSubredditSubscribe(){return{subreddit:void 0,subscriber:void 0}}var SubredditSubscribe={$type:"devvit.events.v1alpha.SubredditSubscribe",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(10).fork()).ldelim(),e82.subscriber!==void 0&&UserV2.encode(e82.subscriber,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditSubscribe();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.subscriber=UserV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0,subscriber:isSet$_(e82.subscriber)?UserV2.fromJSON(e82.subscriber):void 0}},toJSON(e82){let n={};return e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),e82.subscriber!==void 0&&(n.subscriber=UserV2.toJSON(e82.subscriber)),n},create(e82){return SubredditSubscribe.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditSubscribe();return n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n.subscriber=e82.subscriber!==void 0&&e82.subscriber!==null?UserV2.fromPartial(e82.subscriber):void 0,n}};messageTypeRegistry.set(SubredditSubscribe.$type,SubredditSubscribe);function createBaseAppInstall(){return{subreddit:void 0,installer:void 0}}var AppInstall={$type:"devvit.events.v1alpha.AppInstall",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(10).fork()).ldelim(),e82.installer!==void 0&&UserV2.encode(e82.installer,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAppInstall();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.installer=UserV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0,installer:isSet$_(e82.installer)?UserV2.fromJSON(e82.installer):void 0}},toJSON(e82){let n={};return e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),e82.installer!==void 0&&(n.installer=UserV2.toJSON(e82.installer)),n},create(e82){return AppInstall.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAppInstall();return n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n.installer=e82.installer!==void 0&&e82.installer!==null?UserV2.fromPartial(e82.installer):void 0,n}};messageTypeRegistry.set(AppInstall.$type,AppInstall);function createBaseAppUpgrade(){return{subreddit:void 0,installer:void 0}}var AppUpgrade={$type:"devvit.events.v1alpha.AppUpgrade",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(10).fork()).ldelim(),e82.installer!==void 0&&UserV2.encode(e82.installer,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAppUpgrade();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.installer=UserV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0,installer:isSet$_(e82.installer)?UserV2.fromJSON(e82.installer):void 0}},toJSON(e82){let n={};return e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),e82.installer!==void 0&&(n.installer=UserV2.toJSON(e82.installer)),n},create(e82){return AppUpgrade.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAppUpgrade();return n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n.installer=e82.installer!==void 0&&e82.installer!==null?UserV2.fromPartial(e82.installer):void 0,n}};messageTypeRegistry.set(AppUpgrade.$type,AppUpgrade);function createBaseAccountDelete(){return{userId:"",deletedAt:void 0,user:void 0}}var AccountDelete={$type:"devvit.events.v1alpha.AccountDelete",encode(e82,n=_m0.Writer.create()){return e82.userId!==""&&n.uint32(10).string(e82.userId),e82.deletedAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.deletedAt),n.uint32(18).fork()).ldelim(),e82.user!==void 0&&UserV2.encode(e82.user,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAccountDelete();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.userId=t.string();continue;case 2:if(r!==18)break;d.deletedAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.user=UserV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{userId:isSet$_(e82.userId)?globalThis.String(e82.userId):"",deletedAt:isSet$_(e82.deletedAt)?fromJsonTimestamp$6(e82.deletedAt):void 0,user:isSet$_(e82.user)?UserV2.fromJSON(e82.user):void 0}},toJSON(e82){let n={};return e82.userId!==""&&(n.userId=e82.userId),e82.deletedAt!==void 0&&(n.deletedAt=e82.deletedAt.toISOString()),e82.user!==void 0&&(n.user=UserV2.toJSON(e82.user)),n},create(e82){return AccountDelete.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAccountDelete();return n.userId=e82.userId??"",n.deletedAt=e82.deletedAt??void 0,n.user=e82.user!==void 0&&e82.user!==null?UserV2.fromPartial(e82.user):void 0,n}};messageTypeRegistry.set(AccountDelete.$type,AccountDelete);function createBaseVote(){return{updatedAt:void 0,comment:void 0,post:void 0,subreddit:void 0,upvoteRatio:0,score:0}}var Vote={$type:"devvit.events.v1alpha.Vote",encode(e82,n=_m0.Writer.create()){return e82.updatedAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.updatedAt),n.uint32(34).fork()).ldelim(),e82.comment!==void 0&&CommentV2.encode(e82.comment,n.uint32(42).fork()).ldelim(),e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(50).fork()).ldelim(),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(58).fork()).ldelim(),e82.upvoteRatio!==0&&n.uint32(69).float(e82.upvoteRatio),e82.score!==0&&n.uint32(72).int32(e82.score),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseVote();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;d.updatedAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 5:if(r!==42)break;d.comment=CommentV2.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.post=PostV2.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue;case 8:if(r!==69)break;d.upvoteRatio=t.float();continue;case 9:if(r!==72)break;d.score=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{updatedAt:isSet$_(e82.updatedAt)?fromJsonTimestamp$6(e82.updatedAt):void 0,comment:isSet$_(e82.comment)?CommentV2.fromJSON(e82.comment):void 0,post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0,upvoteRatio:isSet$_(e82.upvoteRatio)?globalThis.Number(e82.upvoteRatio):0,score:isSet$_(e82.score)?globalThis.Number(e82.score):0}},toJSON(e82){let n={};return e82.updatedAt!==void 0&&(n.updatedAt=e82.updatedAt.toISOString()),e82.comment!==void 0&&(n.comment=CommentV2.toJSON(e82.comment)),e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),e82.upvoteRatio!==0&&(n.upvoteRatio=e82.upvoteRatio),e82.score!==0&&(n.score=Math.round(e82.score)),n},create(e82){return Vote.fromPartial(e82??{})},fromPartial(e82){let n=createBaseVote();return n.updatedAt=e82.updatedAt??void 0,n.comment=e82.comment!==void 0&&e82.comment!==null?CommentV2.fromPartial(e82.comment):void 0,n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n.upvoteRatio=e82.upvoteRatio??0,n.score=e82.score??0,n}};messageTypeRegistry.set(Vote.$type,Vote);function createBaseAutomoderatorFilterPost(){return{post:void 0,removedAt:void 0,reason:"",author:"",subreddit:void 0}}var AutomoderatorFilterPost={$type:"devvit.events.v1alpha.AutomoderatorFilterPost",encode(e82,n=_m0.Writer.create()){return e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(10).fork()).ldelim(),e82.removedAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.removedAt),n.uint32(18).fork()).ldelim(),e82.reason!==""&&n.uint32(26).string(e82.reason),e82.author!==""&&n.uint32(34).string(e82.author),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAutomoderatorFilterPost();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.post=PostV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.removedAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.reason=t.string();continue;case 4:if(r!==34)break;d.author=t.string();continue;case 5:if(r!==42)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,removedAt:isSet$_(e82.removedAt)?fromJsonTimestamp$6(e82.removedAt):void 0,reason:isSet$_(e82.reason)?globalThis.String(e82.reason):"",author:isSet$_(e82.author)?globalThis.String(e82.author):"",subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.removedAt!==void 0&&(n.removedAt=e82.removedAt.toISOString()),e82.reason!==""&&(n.reason=e82.reason),e82.author!==""&&(n.author=e82.author),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return AutomoderatorFilterPost.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAutomoderatorFilterPost();return n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.removedAt=e82.removedAt??void 0,n.reason=e82.reason??"",n.author=e82.author??"",n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(AutomoderatorFilterPost.$type,AutomoderatorFilterPost);function createBaseAutomoderatorFilterComment(){return{comment:void 0,removedAt:void 0,reason:"",author:"",subreddit:void 0}}var AutomoderatorFilterComment={$type:"devvit.events.v1alpha.AutomoderatorFilterComment",encode(e82,n=_m0.Writer.create()){return e82.comment!==void 0&&CommentV2.encode(e82.comment,n.uint32(10).fork()).ldelim(),e82.removedAt!==void 0&&Timestamp.encode(toTimestamp$6(e82.removedAt),n.uint32(18).fork()).ldelim(),e82.reason!==""&&n.uint32(26).string(e82.reason),e82.author!==""&&n.uint32(34).string(e82.author),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAutomoderatorFilterComment();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.comment=CommentV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.removedAt=fromTimestamp$6(Timestamp.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.reason=t.string();continue;case 4:if(r!==34)break;d.author=t.string();continue;case 5:if(r!==42)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{comment:isSet$_(e82.comment)?CommentV2.fromJSON(e82.comment):void 0,removedAt:isSet$_(e82.removedAt)?fromJsonTimestamp$6(e82.removedAt):void 0,reason:isSet$_(e82.reason)?globalThis.String(e82.reason):"",author:isSet$_(e82.author)?globalThis.String(e82.author):"",subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.comment!==void 0&&(n.comment=CommentV2.toJSON(e82.comment)),e82.removedAt!==void 0&&(n.removedAt=e82.removedAt.toISOString()),e82.reason!==""&&(n.reason=e82.reason),e82.author!==""&&(n.author=e82.author),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return AutomoderatorFilterComment.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAutomoderatorFilterComment();return n.comment=e82.comment!==void 0&&e82.comment!==null?CommentV2.fromPartial(e82.comment):void 0,n.removedAt=e82.removedAt??void 0,n.reason=e82.reason??"",n.author=e82.author??"",n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(AutomoderatorFilterComment.$type,AutomoderatorFilterComment);function createBasePostNsfwUpdate(){return{post:void 0,author:void 0,isNsfw:!1,subreddit:void 0}}var PostNsfwUpdate={$type:"devvit.events.v1alpha.PostNsfwUpdate",encode(e82,n=_m0.Writer.create()){return e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(10).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.isNsfw!==!1&&n.uint32(24).bool(e82.isNsfw),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostNsfwUpdate();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.post=PostV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.author=UserV2.decode(t,t.uint32());continue;case 3:if(r!==24)break;d.isNsfw=t.bool();continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,isNsfw:isSet$_(e82.isNsfw)?globalThis.Boolean(e82.isNsfw):!1,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.isNsfw!==!1&&(n.isNsfw=e82.isNsfw),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return PostNsfwUpdate.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostNsfwUpdate();return n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.isNsfw=e82.isNsfw??!1,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(PostNsfwUpdate.$type,PostNsfwUpdate);function createBasePostSpoilerUpdate(){return{post:void 0,author:void 0,isSpoiler:!1,subreddit:void 0}}var PostSpoilerUpdate={$type:"devvit.events.v1alpha.PostSpoilerUpdate",encode(e82,n=_m0.Writer.create()){return e82.post!==void 0&&PostV2.encode(e82.post,n.uint32(10).fork()).ldelim(),e82.author!==void 0&&UserV2.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.isSpoiler!==!1&&n.uint32(32).bool(e82.isSpoiler),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostSpoilerUpdate();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.post=PostV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.author=UserV2.decode(t,t.uint32());continue;case 4:if(r!==32)break;d.isSpoiler=t.bool();continue;case 10:if(r!==82)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$_(e82.post)?PostV2.fromJSON(e82.post):void 0,author:isSet$_(e82.author)?UserV2.fromJSON(e82.author):void 0,isSpoiler:isSet$_(e82.isSpoiler)?globalThis.Boolean(e82.isSpoiler):!1,subreddit:isSet$_(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.post!==void 0&&(n.post=PostV2.toJSON(e82.post)),e82.author!==void 0&&(n.author=UserV2.toJSON(e82.author)),e82.isSpoiler!==!1&&(n.isSpoiler=e82.isSpoiler),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),n},create(e82){return PostSpoilerUpdate.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostSpoilerUpdate();return n.post=e82.post!==void 0&&e82.post!==null?PostV2.fromPartial(e82.post):void 0,n.author=e82.author!==void 0&&e82.author!==null?UserV2.fromPartial(e82.author):void 0,n.isSpoiler=e82.isSpoiler??!1,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(PostSpoilerUpdate.$type,PostSpoilerUpdate);function toTimestamp$6(e82){let n=Math.trunc(e82.getTime()/1e3),t=e82.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function fromTimestamp$6(e82){let n=(e82.seconds||0)*1e3;return n+=(e82.nanos||0)/1e6,new globalThis.Date(n)}function fromJsonTimestamp$6(e82){return e82 instanceof globalThis.Date?e82:typeof e82=="string"?new globalThis.Date(e82):fromTimestamp$6(Timestamp.fromJSON(e82))}function isSet$_(e82){return e82!=null}var ModActionType;(function(e82){e82[e82.UNKNOWN=0]="UNKNOWN",e82[e82.REMOVE_POST=1]="REMOVE_POST",e82[e82.REMOVE_COMMENT=2]="REMOVE_COMMENT",e82[e82.APPROVE_POST=3]="APPROVE_POST",e82[e82.APPROVE_COMMENT=4]="APPROVE_COMMENT",e82[e82.EDIT_POST_FLAIR=5]="EDIT_POST_FLAIR",e82[e82.EDIT_USER_FLAIR=6]="EDIT_USER_FLAIR",e82[e82.LOCK_POST=7]="LOCK_POST",e82[e82.LOCK_COMMENT=8]="LOCK_COMMENT",e82[e82.SPAM_POST=9]="SPAM_POST",e82[e82.SPAM_COMMENT=10]="SPAM_COMMENT",e82[e82.DISTINGUISH_POST=11]="DISTINGUISH_POST",e82[e82.DISTINGUISH_COMMENT=12]="DISTINGUISH_COMMENT",e82[e82.STICKY_POST=13]="STICKY_POST",e82[e82.STICKY_COMMENT=14]="STICKY_COMMENT",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ModActionType||(ModActionType={}));function createBaseModAction(){return{action:void 0,actionedAt:void 0,subreddit:void 0,moderator:void 0,targetUser:void 0,targetComment:void 0,targetPost:void 0}}var ModAction={$type:"devvit.reddit.v2alpha.ModAction",encode(e82,n=_m0.Writer.create()){return e82.action!==void 0&&n.uint32(66).string(e82.action),e82.actionedAt!==void 0&&Timestamp.encode(toTimestamp$5(e82.actionedAt),n.uint32(18).fork()).ldelim(),e82.subreddit!==void 0&&SubredditV2.encode(e82.subreddit,n.uint32(26).fork()).ldelim(),e82.moderator!==void 0&&UserV2.encode(e82.moderator,n.uint32(34).fork()).ldelim(),e82.targetUser!==void 0&&UserV2.encode(e82.targetUser,n.uint32(42).fork()).ldelim(),e82.targetComment!==void 0&&CommentV2.encode(e82.targetComment,n.uint32(50).fork()).ldelim(),e82.targetPost!==void 0&&PostV2.encode(e82.targetPost,n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModAction();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 8:if(r!==66)break;d.action=t.string();continue;case 2:if(r!==18)break;d.actionedAt=fromTimestamp$5(Timestamp.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.subreddit=SubredditV2.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.moderator=UserV2.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.targetUser=UserV2.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.targetComment=CommentV2.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.targetPost=PostV2.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{action:isSet$Z(e82.action)?globalThis.String(e82.action):void 0,actionedAt:isSet$Z(e82.actionedAt)?fromJsonTimestamp$5(e82.actionedAt):void 0,subreddit:isSet$Z(e82.subreddit)?SubredditV2.fromJSON(e82.subreddit):void 0,moderator:isSet$Z(e82.moderator)?UserV2.fromJSON(e82.moderator):void 0,targetUser:isSet$Z(e82.targetUser)?UserV2.fromJSON(e82.targetUser):void 0,targetComment:isSet$Z(e82.targetComment)?CommentV2.fromJSON(e82.targetComment):void 0,targetPost:isSet$Z(e82.targetPost)?PostV2.fromJSON(e82.targetPost):void 0}},toJSON(e82){let n={};return e82.action!==void 0&&(n.action=e82.action),e82.actionedAt!==void 0&&(n.actionedAt=e82.actionedAt.toISOString()),e82.subreddit!==void 0&&(n.subreddit=SubredditV2.toJSON(e82.subreddit)),e82.moderator!==void 0&&(n.moderator=UserV2.toJSON(e82.moderator)),e82.targetUser!==void 0&&(n.targetUser=UserV2.toJSON(e82.targetUser)),e82.targetComment!==void 0&&(n.targetComment=CommentV2.toJSON(e82.targetComment)),e82.targetPost!==void 0&&(n.targetPost=PostV2.toJSON(e82.targetPost)),n},create(e82){return ModAction.fromPartial(e82??{})},fromPartial(e82){let n=createBaseModAction();return n.action=e82.action??void 0,n.actionedAt=e82.actionedAt??void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditV2.fromPartial(e82.subreddit):void 0,n.moderator=e82.moderator!==void 0&&e82.moderator!==null?UserV2.fromPartial(e82.moderator):void 0,n.targetUser=e82.targetUser!==void 0&&e82.targetUser!==null?UserV2.fromPartial(e82.targetUser):void 0,n.targetComment=e82.targetComment!==void 0&&e82.targetComment!==null?CommentV2.fromPartial(e82.targetComment):void 0,n.targetPost=e82.targetPost!==void 0&&e82.targetPost!==null?PostV2.fromPartial(e82.targetPost):void 0,n}};messageTypeRegistry.set(ModAction.$type,ModAction);function toTimestamp$5(e82){let n=Math.trunc(e82.getTime()/1e3),t=e82.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function fromTimestamp$5(e82){let n=(e82.seconds||0)*1e3;return n+=(e82.nanos||0)/1e6,new globalThis.Date(n)}function fromJsonTimestamp$5(e82){return e82 instanceof globalThis.Date?e82:typeof e82=="string"?new globalThis.Date(e82):fromTimestamp$5(Timestamp.fromJSON(e82))}function isSet$Z(e82){return e82!=null}function createBaseModMail(){return{messageAuthor:void 0,createdAt:void 0,messageAuthorType:"",conversationState:"",conversationType:"",isAutoGenerated:!1,conversationSubreddit:void 0,destinationSubreddit:void 0,conversationId:"",messageId:""}}var ModMail={$type:"devvit.reddit.v2alpha.ModMail",encode(e82,n=_m0.Writer.create()){return e82.messageAuthor!==void 0&&UserV2.encode(e82.messageAuthor,n.uint32(10).fork()).ldelim(),e82.createdAt!==void 0&&Timestamp.encode(toTimestamp$4(e82.createdAt),n.uint32(18).fork()).ldelim(),e82.messageAuthorType!==""&&n.uint32(34).string(e82.messageAuthorType),e82.conversationState!==""&&n.uint32(50).string(e82.conversationState),e82.conversationType!==""&&n.uint32(58).string(e82.conversationType),e82.isAutoGenerated!==!1&&n.uint32(64).bool(e82.isAutoGenerated),e82.conversationSubreddit!==void 0&&SubredditV2.encode(e82.conversationSubreddit,n.uint32(74).fork()).ldelim(),e82.destinationSubreddit!==void 0&&SubredditV2.encode(e82.destinationSubreddit,n.uint32(98).fork()).ldelim(),e82.conversationId!==""&&n.uint32(82).string(e82.conversationId),e82.messageId!==""&&n.uint32(90).string(e82.messageId),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModMail();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.messageAuthor=UserV2.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.createdAt=fromTimestamp$4(Timestamp.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.messageAuthorType=t.string();continue;case 6:if(r!==50)break;d.conversationState=t.string();continue;case 7:if(r!==58)break;d.conversationType=t.string();continue;case 8:if(r!==64)break;d.isAutoGenerated=t.bool();continue;case 9:if(r!==74)break;d.conversationSubreddit=SubredditV2.decode(t,t.uint32());continue;case 12:if(r!==98)break;d.destinationSubreddit=SubredditV2.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.conversationId=t.string();continue;case 11:if(r!==90)break;d.messageId=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{messageAuthor:isSet$Y(e82.messageAuthor)?UserV2.fromJSON(e82.messageAuthor):void 0,createdAt:isSet$Y(e82.createdAt)?fromJsonTimestamp$4(e82.createdAt):void 0,messageAuthorType:isSet$Y(e82.messageAuthorType)?globalThis.String(e82.messageAuthorType):"",conversationState:isSet$Y(e82.conversationState)?globalThis.String(e82.conversationState):"",conversationType:isSet$Y(e82.conversationType)?globalThis.String(e82.conversationType):"",isAutoGenerated:isSet$Y(e82.isAutoGenerated)?globalThis.Boolean(e82.isAutoGenerated):!1,conversationSubreddit:isSet$Y(e82.conversationSubreddit)?SubredditV2.fromJSON(e82.conversationSubreddit):void 0,destinationSubreddit:isSet$Y(e82.destinationSubreddit)?SubredditV2.fromJSON(e82.destinationSubreddit):void 0,conversationId:isSet$Y(e82.conversationId)?globalThis.String(e82.conversationId):"",messageId:isSet$Y(e82.messageId)?globalThis.String(e82.messageId):""}},toJSON(e82){let n={};return e82.messageAuthor!==void 0&&(n.messageAuthor=UserV2.toJSON(e82.messageAuthor)),e82.createdAt!==void 0&&(n.createdAt=e82.createdAt.toISOString()),e82.messageAuthorType!==""&&(n.messageAuthorType=e82.messageAuthorType),e82.conversationState!==""&&(n.conversationState=e82.conversationState),e82.conversationType!==""&&(n.conversationType=e82.conversationType),e82.isAutoGenerated!==!1&&(n.isAutoGenerated=e82.isAutoGenerated),e82.conversationSubreddit!==void 0&&(n.conversationSubreddit=SubredditV2.toJSON(e82.conversationSubreddit)),e82.destinationSubreddit!==void 0&&(n.destinationSubreddit=SubredditV2.toJSON(e82.destinationSubreddit)),e82.conversationId!==""&&(n.conversationId=e82.conversationId),e82.messageId!==""&&(n.messageId=e82.messageId),n},create(e82){return ModMail.fromPartial(e82??{})},fromPartial(e82){let n=createBaseModMail();return n.messageAuthor=e82.messageAuthor!==void 0&&e82.messageAuthor!==null?UserV2.fromPartial(e82.messageAuthor):void 0,n.createdAt=e82.createdAt??void 0,n.messageAuthorType=e82.messageAuthorType??"",n.conversationState=e82.conversationState??"",n.conversationType=e82.conversationType??"",n.isAutoGenerated=e82.isAutoGenerated??!1,n.conversationSubreddit=e82.conversationSubreddit!==void 0&&e82.conversationSubreddit!==null?SubredditV2.fromPartial(e82.conversationSubreddit):void 0,n.destinationSubreddit=e82.destinationSubreddit!==void 0&&e82.destinationSubreddit!==null?SubredditV2.fromPartial(e82.destinationSubreddit):void 0,n.conversationId=e82.conversationId??"",n.messageId=e82.messageId??"",n}};messageTypeRegistry.set(ModMail.$type,ModMail);function toTimestamp$4(e82){let n=Math.trunc(e82.getTime()/1e3),t=e82.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function fromTimestamp$4(e82){let n=(e82.seconds||0)*1e3;return n+=(e82.nanos||0)/1e6,new globalThis.Date(n)}function fromJsonTimestamp$4(e82){return e82 instanceof globalThis.Date?e82:typeof e82=="string"?new globalThis.Date(e82):fromTimestamp$4(Timestamp.fromJSON(e82))}function isSet$Y(e82){return e82!=null}function createBaseHandlerResult(){return{}}var HandlerResult={$type:"devvit.actor.automation.v1alpha.HandlerResult",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHandlerResult();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return HandlerResult.fromPartial(e82??{})},fromPartial(e82){return createBaseHandlerResult()}};messageTypeRegistry.set(HandlerResult.$type,HandlerResult);var OnPostSubmitDefinition={name:"OnPostSubmit",fullName:"devvit.actor.automation.v1alpha.OnPostSubmit",methods:{onPostSubmit:{name:"OnPostSubmit",requestType:PostSubmit,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnPostCreateDefinition={name:"OnPostCreate",fullName:"devvit.actor.automation.v1alpha.OnPostCreate",methods:{onPostCreate:{name:"OnPostCreate",requestType:PostCreate,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnPostUpdateDefinition={name:"OnPostUpdate",fullName:"devvit.actor.automation.v1alpha.OnPostUpdate",methods:{onPostUpdate:{name:"OnPostUpdate",requestType:PostUpdate,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnPostReportDefinition={name:"OnPostReport",fullName:"devvit.actor.automation.v1alpha.OnPostReport",methods:{onPostReport:{name:"OnPostReport",requestType:PostReport,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnPostFlairUpdateDefinition={name:"OnPostFlairUpdate",fullName:"devvit.actor.automation.v1alpha.OnPostFlairUpdate",methods:{onPostFlairUpdate:{name:"OnPostFlairUpdate",requestType:PostFlairUpdate,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnPostDeleteDefinition={name:"OnPostDelete",fullName:"devvit.actor.automation.v1alpha.OnPostDelete",methods:{onPostDelete:{name:"OnPostDelete",requestType:PostDelete,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnCommentSubmitDefinition={name:"OnCommentSubmit",fullName:"devvit.actor.automation.v1alpha.OnCommentSubmit",methods:{onCommentSubmit:{name:"OnCommentSubmit",requestType:CommentSubmit,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnCommentCreateDefinition={name:"OnCommentCreate",fullName:"devvit.actor.automation.v1alpha.OnCommentCreate",methods:{onCommentCreate:{name:"OnCommentCreate",requestType:CommentCreate,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnCommentUpdateDefinition={name:"OnCommentUpdate",fullName:"devvit.actor.automation.v1alpha.OnCommentUpdate",methods:{onCommentUpdate:{name:"OnCommentUpdate",requestType:CommentUpdate,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnCommentReportDefinition={name:"OnCommentReport",fullName:"devvit.actor.automation.v1alpha.OnCommentReport",methods:{onCommentReport:{name:"OnCommentReport",requestType:CommentReport,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnCommentDeleteDefinition={name:"OnCommentDelete",fullName:"devvit.actor.automation.v1alpha.OnCommentDelete",methods:{onCommentDelete:{name:"OnCommentDelete",requestType:CommentDelete,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnSubredditSubscribeDefinition={name:"OnSubredditSubscribe",fullName:"devvit.actor.automation.v1alpha.OnSubredditSubscribe",methods:{onSubredditSubscribe:{name:"OnSubredditSubscribe",requestType:SubredditSubscribe,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnAppInstallDefinition={name:"OnAppInstall",fullName:"devvit.actor.automation.v1alpha.OnAppInstall",methods:{onAppInstall:{name:"OnAppInstall",requestType:AppInstall,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnAppUpgradeDefinition={name:"OnAppUpgrade",fullName:"devvit.actor.automation.v1alpha.OnAppUpgrade",methods:{onAppUpgrade:{name:"OnAppUpgrade",requestType:AppUpgrade,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnModActionDefinition={name:"OnModAction",fullName:"devvit.actor.automation.v1alpha.OnModAction",methods:{onModAction:{name:"OnModAction",requestType:ModAction,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnModMailDefinition={name:"OnModMail",fullName:"devvit.actor.automation.v1alpha.OnModMail",methods:{onModMail:{name:"OnModMail",requestType:ModMail,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnPostNsfwUpdateDefinition={name:"OnPostNsfwUpdate",fullName:"devvit.actor.automation.v1alpha.OnPostNsfwUpdate",methods:{onPostNsfwUpdate:{name:"OnPostNsfwUpdate",requestType:PostNsfwUpdate,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnPostSpoilerUpdateDefinition={name:"OnPostSpoilerUpdate",fullName:"devvit.actor.automation.v1alpha.OnPostSpoilerUpdate",methods:{onPostSpoilerUpdate:{name:"OnPostSpoilerUpdate",requestType:PostSpoilerUpdate,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnAutomoderatorFilterPostDefinition={name:"OnAutomoderatorFilterPost",fullName:"devvit.actor.automation.v1alpha.OnAutomoderatorFilterPost",methods:{onAutomoderatorFilterPost:{name:"OnAutomoderatorFilterPost",requestType:AutomoderatorFilterPost,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},OnAutomoderatorFilterCommentDefinition={name:"OnAutomoderatorFilterComment",fullName:"devvit.actor.automation.v1alpha.OnAutomoderatorFilterComment",methods:{onAutomoderatorFilterComment:{name:"OnAutomoderatorFilterComment",requestType:AutomoderatorFilterComment,requestStream:!1,responseType:HandlerResult,responseStream:!1,options:{}}}},FormFieldType;(function(e82){e82[e82.STRING=0]="STRING",e82[e82.PARAGRAPH=1]="PARAGRAPH",e82[e82.NUMBER=2]="NUMBER",e82[e82.BOOLEAN=3]="BOOLEAN",e82[e82.LIST=4]="LIST",e82[e82.SELECTION=5]="SELECTION",e82[e82.GROUP=6]="GROUP",e82[e82.IMAGE=7]="IMAGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(FormFieldType||(FormFieldType={}));function formFieldTypeFromJSON(e82){switch(e82){case 0:case"STRING":return FormFieldType.STRING;case 1:case"PARAGRAPH":return FormFieldType.PARAGRAPH;case 2:case"NUMBER":return FormFieldType.NUMBER;case 3:case"BOOLEAN":return FormFieldType.BOOLEAN;case 4:case"LIST":return FormFieldType.LIST;case 5:case"SELECTION":return FormFieldType.SELECTION;case 6:case"GROUP":return FormFieldType.GROUP;case 7:case"IMAGE":return FormFieldType.IMAGE;case-1:case"UNRECOGNIZED":default:return FormFieldType.UNRECOGNIZED}}function formFieldTypeToJSON(e82){switch(e82){case FormFieldType.STRING:return 0;case FormFieldType.PARAGRAPH:return 1;case FormFieldType.NUMBER:return 2;case FormFieldType.BOOLEAN:return 3;case FormFieldType.LIST:return 4;case FormFieldType.SELECTION:return 5;case FormFieldType.GROUP:return 6;case FormFieldType.IMAGE:return 7;case FormFieldType.UNRECOGNIZED:default:return-1}}function createBaseFormFieldValue(){return{fieldType:0,isSecret:void 0,stringValue:void 0,numberValue:void 0,boolValue:void 0,listValue:void 0,selectionValue:void 0,groupValue:void 0}}var FormFieldValue={$type:"devvit.ui.form_builder.v1alpha.FormFieldValue",encode(e82,n=_m0.Writer.create()){return e82.fieldType!==0&&n.uint32(8).int32(e82.fieldType),e82.isSecret!==void 0&&n.uint32(800).bool(e82.isSecret),e82.stringValue!==void 0&&n.uint32(18).string(e82.stringValue),e82.numberValue!==void 0&&n.uint32(25).double(e82.numberValue),e82.boolValue!==void 0&&n.uint32(32).bool(e82.boolValue),e82.listValue!==void 0&&FormFieldValue_ListValue.encode(e82.listValue,n.uint32(42).fork()).ldelim(),e82.selectionValue!==void 0&&FormFieldValue_SelectionValue.encode(e82.selectionValue,n.uint32(50).fork()).ldelim(),e82.groupValue!==void 0&&FormFieldValue_GroupValue.encode(e82.groupValue,n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFormFieldValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.fieldType=t.int32();continue;case 100:if(r!==800)break;d.isSecret=t.bool();continue;case 2:if(r!==18)break;d.stringValue=t.string();continue;case 3:if(r!==25)break;d.numberValue=t.double();continue;case 4:if(r!==32)break;d.boolValue=t.bool();continue;case 5:if(r!==42)break;d.listValue=FormFieldValue_ListValue.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.selectionValue=FormFieldValue_SelectionValue.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.groupValue=FormFieldValue_GroupValue.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fieldType:isSet$X(e82.fieldType)?formFieldTypeFromJSON(e82.fieldType):0,isSecret:isSet$X(e82.isSecret)?globalThis.Boolean(e82.isSecret):void 0,stringValue:isSet$X(e82.stringValue)?globalThis.String(e82.stringValue):void 0,numberValue:isSet$X(e82.numberValue)?globalThis.Number(e82.numberValue):void 0,boolValue:isSet$X(e82.boolValue)?globalThis.Boolean(e82.boolValue):void 0,listValue:isSet$X(e82.listValue)?FormFieldValue_ListValue.fromJSON(e82.listValue):void 0,selectionValue:isSet$X(e82.selectionValue)?FormFieldValue_SelectionValue.fromJSON(e82.selectionValue):void 0,groupValue:isSet$X(e82.groupValue)?FormFieldValue_GroupValue.fromJSON(e82.groupValue):void 0}},toJSON(e82){let n={};return e82.fieldType!==0&&(n.fieldType=formFieldTypeToJSON(e82.fieldType)),e82.isSecret!==void 0&&(n.isSecret=e82.isSecret),e82.stringValue!==void 0&&(n.stringValue=e82.stringValue),e82.numberValue!==void 0&&(n.numberValue=e82.numberValue),e82.boolValue!==void 0&&(n.boolValue=e82.boolValue),e82.listValue!==void 0&&(n.listValue=FormFieldValue_ListValue.toJSON(e82.listValue)),e82.selectionValue!==void 0&&(n.selectionValue=FormFieldValue_SelectionValue.toJSON(e82.selectionValue)),e82.groupValue!==void 0&&(n.groupValue=FormFieldValue_GroupValue.toJSON(e82.groupValue)),n},create(e82){return FormFieldValue.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFormFieldValue();return n.fieldType=e82.fieldType??0,n.isSecret=e82.isSecret??void 0,n.stringValue=e82.stringValue??void 0,n.numberValue=e82.numberValue??void 0,n.boolValue=e82.boolValue??void 0,n.listValue=e82.listValue!==void 0&&e82.listValue!==null?FormFieldValue_ListValue.fromPartial(e82.listValue):void 0,n.selectionValue=e82.selectionValue!==void 0&&e82.selectionValue!==null?FormFieldValue_SelectionValue.fromPartial(e82.selectionValue):void 0,n.groupValue=e82.groupValue!==void 0&&e82.groupValue!==null?FormFieldValue_GroupValue.fromPartial(e82.groupValue):void 0,n}};messageTypeRegistry.set(FormFieldValue.$type,FormFieldValue);function createBaseFormFieldValue_ListValue(){return{itemType:0,items:[]}}var FormFieldValue_ListValue={$type:"devvit.ui.form_builder.v1alpha.FormFieldValue.ListValue",encode(e82,n=_m0.Writer.create()){e82.itemType!==0&&n.uint32(8).int32(e82.itemType);for(let t of e82.items)FormFieldValue.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFormFieldValue_ListValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.itemType=t.int32();continue;case 2:if(r!==18)break;d.items.push(FormFieldValue.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{itemType:isSet$X(e82.itemType)?formFieldTypeFromJSON(e82.itemType):0,items:globalThis.Array.isArray(e82?.items)?e82.items.map(n=>FormFieldValue.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.itemType!==0&&(n.itemType=formFieldTypeToJSON(e82.itemType)),(t=e82.items)!=null&&t.length&&(n.items=e82.items.map(o=>FormFieldValue.toJSON(o))),n},create(e82){return FormFieldValue_ListValue.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFormFieldValue_ListValue();return n.itemType=e82.itemType??0,n.items=((t=e82.items)==null?void 0:t.map(o=>FormFieldValue.fromPartial(o)))||[],n}};messageTypeRegistry.set(FormFieldValue_ListValue.$type,FormFieldValue_ListValue);function createBaseFormFieldValue_SelectionValue(){return{values:[]}}var FormFieldValue_SelectionValue={$type:"devvit.ui.form_builder.v1alpha.FormFieldValue.SelectionValue",encode(e82,n=_m0.Writer.create()){for(let t of e82.values)n.uint32(10).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFormFieldValue_SelectionValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.values.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{values:globalThis.Array.isArray(e82?.values)?e82.values.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.values)!=null&&t.length&&(n.values=e82.values),n},create(e82){return FormFieldValue_SelectionValue.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFormFieldValue_SelectionValue();return n.values=((t=e82.values)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(FormFieldValue_SelectionValue.$type,FormFieldValue_SelectionValue);function createBaseFormFieldValue_GroupValue(){return{}}var FormFieldValue_GroupValue={$type:"devvit.ui.form_builder.v1alpha.FormFieldValue.GroupValue",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFormFieldValue_GroupValue();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return FormFieldValue_GroupValue.fromPartial(e82??{})},fromPartial(e82){return createBaseFormFieldValue_GroupValue()}};messageTypeRegistry.set(FormFieldValue_GroupValue.$type,FormFieldValue_GroupValue);function isSet$X(e82){return e82!=null}function createBaseFormField(){return{fieldId:"",fieldType:0,label:"",helpText:void 0,defaultValue:void 0,required:void 0,disabled:void 0,fieldConfig:void 0,isSecret:void 0}}var FormField={$type:"devvit.ui.form_builder.v1alpha.FormField",encode(e82,n=_m0.Writer.create()){return e82.fieldId!==""&&n.uint32(10).string(e82.fieldId),e82.fieldType!==0&&n.uint32(16).int32(e82.fieldType),e82.label!==""&&n.uint32(26).string(e82.label),e82.helpText!==void 0&&n.uint32(34).string(e82.helpText),e82.defaultValue!==void 0&&FormFieldValue.encode(e82.defaultValue,n.uint32(42).fork()).ldelim(),e82.required!==void 0&&n.uint32(48).bool(e82.required),e82.disabled!==void 0&&n.uint32(56).bool(e82.disabled),e82.fieldConfig!==void 0&&FieldConfig.encode(e82.fieldConfig,n.uint32(66).fork()).ldelim(),e82.isSecret!==void 0&&n.uint32(72).bool(e82.isSecret),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFormField();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.fieldId=t.string();continue;case 2:if(r!==16)break;d.fieldType=t.int32();continue;case 3:if(r!==26)break;d.label=t.string();continue;case 4:if(r!==34)break;d.helpText=t.string();continue;case 5:if(r!==42)break;d.defaultValue=FormFieldValue.decode(t,t.uint32());continue;case 6:if(r!==48)break;d.required=t.bool();continue;case 7:if(r!==56)break;d.disabled=t.bool();continue;case 8:if(r!==66)break;d.fieldConfig=FieldConfig.decode(t,t.uint32());continue;case 9:if(r!==72)break;d.isSecret=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fieldId:isSet$W(e82.fieldId)?globalThis.String(e82.fieldId):"",fieldType:isSet$W(e82.fieldType)?formFieldTypeFromJSON(e82.fieldType):0,label:isSet$W(e82.label)?globalThis.String(e82.label):"",helpText:isSet$W(e82.helpText)?globalThis.String(e82.helpText):void 0,defaultValue:isSet$W(e82.defaultValue)?FormFieldValue.fromJSON(e82.defaultValue):void 0,required:isSet$W(e82.required)?globalThis.Boolean(e82.required):void 0,disabled:isSet$W(e82.disabled)?globalThis.Boolean(e82.disabled):void 0,fieldConfig:isSet$W(e82.fieldConfig)?FieldConfig.fromJSON(e82.fieldConfig):void 0,isSecret:isSet$W(e82.isSecret)?globalThis.Boolean(e82.isSecret):void 0}},toJSON(e82){let n={};return e82.fieldId!==""&&(n.fieldId=e82.fieldId),e82.fieldType!==0&&(n.fieldType=formFieldTypeToJSON(e82.fieldType)),e82.label!==""&&(n.label=e82.label),e82.helpText!==void 0&&(n.helpText=e82.helpText),e82.defaultValue!==void 0&&(n.defaultValue=FormFieldValue.toJSON(e82.defaultValue)),e82.required!==void 0&&(n.required=e82.required),e82.disabled!==void 0&&(n.disabled=e82.disabled),e82.fieldConfig!==void 0&&(n.fieldConfig=FieldConfig.toJSON(e82.fieldConfig)),e82.isSecret!==void 0&&(n.isSecret=e82.isSecret),n},create(e82){return FormField.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFormField();return n.fieldId=e82.fieldId??"",n.fieldType=e82.fieldType??0,n.label=e82.label??"",n.helpText=e82.helpText??void 0,n.defaultValue=e82.defaultValue!==void 0&&e82.defaultValue!==null?FormFieldValue.fromPartial(e82.defaultValue):void 0,n.required=e82.required??void 0,n.disabled=e82.disabled??void 0,n.fieldConfig=e82.fieldConfig!==void 0&&e82.fieldConfig!==null?FieldConfig.fromPartial(e82.fieldConfig):void 0,n.isSecret=e82.isSecret??void 0,n}};messageTypeRegistry.set(FormField.$type,FormField);function createBaseFieldConfig(){return{stringConfig:void 0,paragraphConfig:void 0,numberConfig:void 0,booleanConfig:void 0,listConfig:void 0,selectionConfig:void 0,groupConfig:void 0}}var FieldConfig={$type:"devvit.ui.form_builder.v1alpha.FieldConfig",encode(e82,n=_m0.Writer.create()){return e82.stringConfig!==void 0&&FieldConfig_String.encode(e82.stringConfig,n.uint32(10).fork()).ldelim(),e82.paragraphConfig!==void 0&&FieldConfig_Paragraph.encode(e82.paragraphConfig,n.uint32(18).fork()).ldelim(),e82.numberConfig!==void 0&&FieldConfig_Number.encode(e82.numberConfig,n.uint32(26).fork()).ldelim(),e82.booleanConfig!==void 0&&FieldConfig_Boolean.encode(e82.booleanConfig,n.uint32(34).fork()).ldelim(),e82.listConfig!==void 0&&FieldConfig_List.encode(e82.listConfig,n.uint32(42).fork()).ldelim(),e82.selectionConfig!==void 0&&FieldConfig_Selection.encode(e82.selectionConfig,n.uint32(50).fork()).ldelim(),e82.groupConfig!==void 0&&FieldConfig_Group.encode(e82.groupConfig,n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFieldConfig();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.stringConfig=FieldConfig_String.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.paragraphConfig=FieldConfig_Paragraph.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.numberConfig=FieldConfig_Number.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.booleanConfig=FieldConfig_Boolean.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.listConfig=FieldConfig_List.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.selectionConfig=FieldConfig_Selection.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.groupConfig=FieldConfig_Group.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{stringConfig:isSet$W(e82.stringConfig)?FieldConfig_String.fromJSON(e82.stringConfig):void 0,paragraphConfig:isSet$W(e82.paragraphConfig)?FieldConfig_Paragraph.fromJSON(e82.paragraphConfig):void 0,numberConfig:isSet$W(e82.numberConfig)?FieldConfig_Number.fromJSON(e82.numberConfig):void 0,booleanConfig:isSet$W(e82.booleanConfig)?FieldConfig_Boolean.fromJSON(e82.booleanConfig):void 0,listConfig:isSet$W(e82.listConfig)?FieldConfig_List.fromJSON(e82.listConfig):void 0,selectionConfig:isSet$W(e82.selectionConfig)?FieldConfig_Selection.fromJSON(e82.selectionConfig):void 0,groupConfig:isSet$W(e82.groupConfig)?FieldConfig_Group.fromJSON(e82.groupConfig):void 0}},toJSON(e82){let n={};return e82.stringConfig!==void 0&&(n.stringConfig=FieldConfig_String.toJSON(e82.stringConfig)),e82.paragraphConfig!==void 0&&(n.paragraphConfig=FieldConfig_Paragraph.toJSON(e82.paragraphConfig)),e82.numberConfig!==void 0&&(n.numberConfig=FieldConfig_Number.toJSON(e82.numberConfig)),e82.booleanConfig!==void 0&&(n.booleanConfig=FieldConfig_Boolean.toJSON(e82.booleanConfig)),e82.listConfig!==void 0&&(n.listConfig=FieldConfig_List.toJSON(e82.listConfig)),e82.selectionConfig!==void 0&&(n.selectionConfig=FieldConfig_Selection.toJSON(e82.selectionConfig)),e82.groupConfig!==void 0&&(n.groupConfig=FieldConfig_Group.toJSON(e82.groupConfig)),n},create(e82){return FieldConfig.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFieldConfig();return n.stringConfig=e82.stringConfig!==void 0&&e82.stringConfig!==null?FieldConfig_String.fromPartial(e82.stringConfig):void 0,n.paragraphConfig=e82.paragraphConfig!==void 0&&e82.paragraphConfig!==null?FieldConfig_Paragraph.fromPartial(e82.paragraphConfig):void 0,n.numberConfig=e82.numberConfig!==void 0&&e82.numberConfig!==null?FieldConfig_Number.fromPartial(e82.numberConfig):void 0,n.booleanConfig=e82.booleanConfig!==void 0&&e82.booleanConfig!==null?FieldConfig_Boolean.fromPartial(e82.booleanConfig):void 0,n.listConfig=e82.listConfig!==void 0&&e82.listConfig!==null?FieldConfig_List.fromPartial(e82.listConfig):void 0,n.selectionConfig=e82.selectionConfig!==void 0&&e82.selectionConfig!==null?FieldConfig_Selection.fromPartial(e82.selectionConfig):void 0,n.groupConfig=e82.groupConfig!==void 0&&e82.groupConfig!==null?FieldConfig_Group.fromPartial(e82.groupConfig):void 0,n}};messageTypeRegistry.set(FieldConfig.$type,FieldConfig);function createBaseFieldConfig_String(){return{minLength:void 0,maxLength:void 0,placeholder:void 0}}var FieldConfig_String={$type:"devvit.ui.form_builder.v1alpha.FieldConfig.String",encode(e82,n=_m0.Writer.create()){return e82.minLength!==void 0&&n.uint32(8).int32(e82.minLength),e82.maxLength!==void 0&&n.uint32(16).int32(e82.maxLength),e82.placeholder!==void 0&&n.uint32(26).string(e82.placeholder),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFieldConfig_String();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.minLength=t.int32();continue;case 2:if(r!==16)break;d.maxLength=t.int32();continue;case 3:if(r!==26)break;d.placeholder=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{minLength:isSet$W(e82.minLength)?globalThis.Number(e82.minLength):void 0,maxLength:isSet$W(e82.maxLength)?globalThis.Number(e82.maxLength):void 0,placeholder:isSet$W(e82.placeholder)?globalThis.String(e82.placeholder):void 0}},toJSON(e82){let n={};return e82.minLength!==void 0&&(n.minLength=Math.round(e82.minLength)),e82.maxLength!==void 0&&(n.maxLength=Math.round(e82.maxLength)),e82.placeholder!==void 0&&(n.placeholder=e82.placeholder),n},create(e82){return FieldConfig_String.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFieldConfig_String();return n.minLength=e82.minLength??void 0,n.maxLength=e82.maxLength??void 0,n.placeholder=e82.placeholder??void 0,n}};messageTypeRegistry.set(FieldConfig_String.$type,FieldConfig_String);function createBaseFieldConfig_Paragraph(){return{maxCharacters:void 0,lineHeight:void 0,placeholder:void 0}}var FieldConfig_Paragraph={$type:"devvit.ui.form_builder.v1alpha.FieldConfig.Paragraph",encode(e82,n=_m0.Writer.create()){return e82.maxCharacters!==void 0&&n.uint32(8).int32(e82.maxCharacters),e82.lineHeight!==void 0&&n.uint32(16).int32(e82.lineHeight),e82.placeholder!==void 0&&n.uint32(26).string(e82.placeholder),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFieldConfig_Paragraph();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.maxCharacters=t.int32();continue;case 2:if(r!==16)break;d.lineHeight=t.int32();continue;case 3:if(r!==26)break;d.placeholder=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{maxCharacters:isSet$W(e82.maxCharacters)?globalThis.Number(e82.maxCharacters):void 0,lineHeight:isSet$W(e82.lineHeight)?globalThis.Number(e82.lineHeight):void 0,placeholder:isSet$W(e82.placeholder)?globalThis.String(e82.placeholder):void 0}},toJSON(e82){let n={};return e82.maxCharacters!==void 0&&(n.maxCharacters=Math.round(e82.maxCharacters)),e82.lineHeight!==void 0&&(n.lineHeight=Math.round(e82.lineHeight)),e82.placeholder!==void 0&&(n.placeholder=e82.placeholder),n},create(e82){return FieldConfig_Paragraph.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFieldConfig_Paragraph();return n.maxCharacters=e82.maxCharacters??void 0,n.lineHeight=e82.lineHeight??void 0,n.placeholder=e82.placeholder??void 0,n}};messageTypeRegistry.set(FieldConfig_Paragraph.$type,FieldConfig_Paragraph);function createBaseFieldConfig_Number(){return{step:void 0,min:void 0,max:void 0}}var FieldConfig_Number={$type:"devvit.ui.form_builder.v1alpha.FieldConfig.Number",encode(e82,n=_m0.Writer.create()){return e82.step!==void 0&&n.uint32(9).double(e82.step),e82.min!==void 0&&n.uint32(17).double(e82.min),e82.max!==void 0&&n.uint32(25).double(e82.max),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFieldConfig_Number();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==9)break;d.step=t.double();continue;case 2:if(r!==17)break;d.min=t.double();continue;case 3:if(r!==25)break;d.max=t.double();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{step:isSet$W(e82.step)?globalThis.Number(e82.step):void 0,min:isSet$W(e82.min)?globalThis.Number(e82.min):void 0,max:isSet$W(e82.max)?globalThis.Number(e82.max):void 0}},toJSON(e82){let n={};return e82.step!==void 0&&(n.step=e82.step),e82.min!==void 0&&(n.min=e82.min),e82.max!==void 0&&(n.max=e82.max),n},create(e82){return FieldConfig_Number.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFieldConfig_Number();return n.step=e82.step??void 0,n.min=e82.min??void 0,n.max=e82.max??void 0,n}};messageTypeRegistry.set(FieldConfig_Number.$type,FieldConfig_Number);function createBaseFieldConfig_Boolean(){return{}}var FieldConfig_Boolean={$type:"devvit.ui.form_builder.v1alpha.FieldConfig.Boolean",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFieldConfig_Boolean();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return FieldConfig_Boolean.fromPartial(e82??{})},fromPartial(e82){return createBaseFieldConfig_Boolean()}};messageTypeRegistry.set(FieldConfig_Boolean.$type,FieldConfig_Boolean);function createBaseFieldConfig_List(){return{itemType:0,itemConfig:void 0,minEntries:void 0,maxEntries:void 0,entryLabel:void 0}}var FieldConfig_List={$type:"devvit.ui.form_builder.v1alpha.FieldConfig.List",encode(e82,n=_m0.Writer.create()){return e82.itemType!==0&&n.uint32(8).int32(e82.itemType),e82.itemConfig!==void 0&&FieldConfig.encode(e82.itemConfig,n.uint32(18).fork()).ldelim(),e82.minEntries!==void 0&&n.uint32(24).int32(e82.minEntries),e82.maxEntries!==void 0&&n.uint32(32).int32(e82.maxEntries),e82.entryLabel!==void 0&&n.uint32(42).string(e82.entryLabel),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFieldConfig_List();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.itemType=t.int32();continue;case 2:if(r!==18)break;d.itemConfig=FieldConfig.decode(t,t.uint32());continue;case 3:if(r!==24)break;d.minEntries=t.int32();continue;case 4:if(r!==32)break;d.maxEntries=t.int32();continue;case 5:if(r!==42)break;d.entryLabel=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{itemType:isSet$W(e82.itemType)?formFieldTypeFromJSON(e82.itemType):0,itemConfig:isSet$W(e82.itemConfig)?FieldConfig.fromJSON(e82.itemConfig):void 0,minEntries:isSet$W(e82.minEntries)?globalThis.Number(e82.minEntries):void 0,maxEntries:isSet$W(e82.maxEntries)?globalThis.Number(e82.maxEntries):void 0,entryLabel:isSet$W(e82.entryLabel)?globalThis.String(e82.entryLabel):void 0}},toJSON(e82){let n={};return e82.itemType!==0&&(n.itemType=formFieldTypeToJSON(e82.itemType)),e82.itemConfig!==void 0&&(n.itemConfig=FieldConfig.toJSON(e82.itemConfig)),e82.minEntries!==void 0&&(n.minEntries=Math.round(e82.minEntries)),e82.maxEntries!==void 0&&(n.maxEntries=Math.round(e82.maxEntries)),e82.entryLabel!==void 0&&(n.entryLabel=e82.entryLabel),n},create(e82){return FieldConfig_List.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFieldConfig_List();return n.itemType=e82.itemType??0,n.itemConfig=e82.itemConfig!==void 0&&e82.itemConfig!==null?FieldConfig.fromPartial(e82.itemConfig):void 0,n.minEntries=e82.minEntries??void 0,n.maxEntries=e82.maxEntries??void 0,n.entryLabel=e82.entryLabel??void 0,n}};messageTypeRegistry.set(FieldConfig_List.$type,FieldConfig_List);function createBaseFieldConfig_Selection(){return{choices:[],multiSelect:void 0,minSelections:void 0,maxSelections:void 0,renderAsList:void 0}}var FieldConfig_Selection={$type:"devvit.ui.form_builder.v1alpha.FieldConfig.Selection",encode(e82,n=_m0.Writer.create()){for(let t of e82.choices)FieldConfig_Selection_Item.encode(t,n.uint32(10).fork()).ldelim();return e82.multiSelect!==void 0&&n.uint32(16).bool(e82.multiSelect),e82.minSelections!==void 0&&n.uint32(24).int32(e82.minSelections),e82.maxSelections!==void 0&&n.uint32(32).int32(e82.maxSelections),e82.renderAsList!==void 0&&n.uint32(40).bool(e82.renderAsList),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFieldConfig_Selection();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.choices.push(FieldConfig_Selection_Item.decode(t,t.uint32()));continue;case 2:if(r!==16)break;d.multiSelect=t.bool();continue;case 3:if(r!==24)break;d.minSelections=t.int32();continue;case 4:if(r!==32)break;d.maxSelections=t.int32();continue;case 5:if(r!==40)break;d.renderAsList=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{choices:globalThis.Array.isArray(e82?.choices)?e82.choices.map(n=>FieldConfig_Selection_Item.fromJSON(n)):[],multiSelect:isSet$W(e82.multiSelect)?globalThis.Boolean(e82.multiSelect):void 0,minSelections:isSet$W(e82.minSelections)?globalThis.Number(e82.minSelections):void 0,maxSelections:isSet$W(e82.maxSelections)?globalThis.Number(e82.maxSelections):void 0,renderAsList:isSet$W(e82.renderAsList)?globalThis.Boolean(e82.renderAsList):void 0}},toJSON(e82){var t;let n={};return(t=e82.choices)!=null&&t.length&&(n.choices=e82.choices.map(o=>FieldConfig_Selection_Item.toJSON(o))),e82.multiSelect!==void 0&&(n.multiSelect=e82.multiSelect),e82.minSelections!==void 0&&(n.minSelections=Math.round(e82.minSelections)),e82.maxSelections!==void 0&&(n.maxSelections=Math.round(e82.maxSelections)),e82.renderAsList!==void 0&&(n.renderAsList=e82.renderAsList),n},create(e82){return FieldConfig_Selection.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFieldConfig_Selection();return n.choices=((t=e82.choices)==null?void 0:t.map(o=>FieldConfig_Selection_Item.fromPartial(o)))||[],n.multiSelect=e82.multiSelect??void 0,n.minSelections=e82.minSelections??void 0,n.maxSelections=e82.maxSelections??void 0,n.renderAsList=e82.renderAsList??void 0,n}};messageTypeRegistry.set(FieldConfig_Selection.$type,FieldConfig_Selection);function createBaseFieldConfig_Selection_Item(){return{label:"",value:""}}var FieldConfig_Selection_Item={$type:"devvit.ui.form_builder.v1alpha.FieldConfig.Selection.Item",encode(e82,n=_m0.Writer.create()){return e82.label!==""&&n.uint32(10).string(e82.label),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFieldConfig_Selection_Item();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.label=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{label:isSet$W(e82.label)?globalThis.String(e82.label):"",value:isSet$W(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.label!==""&&(n.label=e82.label),e82.value!==""&&(n.value=e82.value),n},create(e82){return FieldConfig_Selection_Item.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFieldConfig_Selection_Item();return n.label=e82.label??"",n.value=e82.value??"",n}};messageTypeRegistry.set(FieldConfig_Selection_Item.$type,FieldConfig_Selection_Item);function createBaseFieldConfig_Group(){return{fields:[]}}var FieldConfig_Group={$type:"devvit.ui.form_builder.v1alpha.FieldConfig.Group",encode(e82,n=_m0.Writer.create()){for(let t of e82.fields)FormField.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFieldConfig_Group();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.fields.push(FormField.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fields:globalThis.Array.isArray(e82?.fields)?e82.fields.map(n=>FormField.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.fields)!=null&&t.length&&(n.fields=e82.fields.map(o=>FormField.toJSON(o))),n},create(e82){return FieldConfig_Group.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFieldConfig_Group();return n.fields=((t=e82.fields)==null?void 0:t.map(o=>FormField.fromPartial(o)))||[],n}};messageTypeRegistry.set(FieldConfig_Group.$type,FieldConfig_Group);function isSet$W(e82){return e82!=null}function createBaseForm(){return{fields:[],title:void 0,shortDescription:void 0,acceptLabel:void 0,cancelLabel:void 0,id:void 0}}var Form={$type:"devvit.ui.form_builder.v1alpha.Form",encode(e82,n=_m0.Writer.create()){for(let t of e82.fields)FormField.encode(t,n.uint32(10).fork()).ldelim();return e82.title!==void 0&&n.uint32(18).string(e82.title),e82.shortDescription!==void 0&&n.uint32(26).string(e82.shortDescription),e82.acceptLabel!==void 0&&n.uint32(34).string(e82.acceptLabel),e82.cancelLabel!==void 0&&n.uint32(42).string(e82.cancelLabel),e82.id!==void 0&&n.uint32(50).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseForm();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.fields.push(FormField.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.title=t.string();continue;case 3:if(r!==26)break;d.shortDescription=t.string();continue;case 4:if(r!==34)break;d.acceptLabel=t.string();continue;case 5:if(r!==42)break;d.cancelLabel=t.string();continue;case 6:if(r!==50)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fields:globalThis.Array.isArray(e82?.fields)?e82.fields.map(n=>FormField.fromJSON(n)):[],title:isSet$V(e82.title)?globalThis.String(e82.title):void 0,shortDescription:isSet$V(e82.shortDescription)?globalThis.String(e82.shortDescription):void 0,acceptLabel:isSet$V(e82.acceptLabel)?globalThis.String(e82.acceptLabel):void 0,cancelLabel:isSet$V(e82.cancelLabel)?globalThis.String(e82.cancelLabel):void 0,id:isSet$V(e82.id)?globalThis.String(e82.id):void 0}},toJSON(e82){var t;let n={};return(t=e82.fields)!=null&&t.length&&(n.fields=e82.fields.map(o=>FormField.toJSON(o))),e82.title!==void 0&&(n.title=e82.title),e82.shortDescription!==void 0&&(n.shortDescription=e82.shortDescription),e82.acceptLabel!==void 0&&(n.acceptLabel=e82.acceptLabel),e82.cancelLabel!==void 0&&(n.cancelLabel=e82.cancelLabel),e82.id!==void 0&&(n.id=e82.id),n},create(e82){return Form.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseForm();return n.fields=((t=e82.fields)==null?void 0:t.map(o=>FormField.fromPartial(o)))||[],n.title=e82.title??void 0,n.shortDescription=e82.shortDescription??void 0,n.acceptLabel=e82.acceptLabel??void 0,n.cancelLabel=e82.cancelLabel??void 0,n.id=e82.id??void 0,n}};messageTypeRegistry.set(Form.$type,Form);function isSet$V(e82){return e82!=null}function createBaseGetFieldsRequest(){return{editing:!1}}var GetFieldsRequest={$type:"devvit.actor.settings.v1alpha.GetFieldsRequest",encode(e82,n=_m0.Writer.create()){return e82.editing!==!1&&n.uint32(8).bool(e82.editing),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetFieldsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.editing=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{editing:isSet$U(e82.editing)?globalThis.Boolean(e82.editing):!1}},toJSON(e82){let n={};return e82.editing!==!1&&(n.editing=e82.editing),n},create(e82){return GetFieldsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetFieldsRequest();return n.editing=e82.editing??!1,n}};messageTypeRegistry.set(GetFieldsRequest.$type,GetFieldsRequest);function createBaseGetFieldsResponse(){return{fields:void 0}}var GetFieldsResponse={$type:"devvit.actor.settings.v1alpha.GetFieldsResponse",encode(e82,n=_m0.Writer.create()){return e82.fields!==void 0&&Form.encode(e82.fields,n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetFieldsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.fields=Form.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fields:isSet$U(e82.fields)?Form.fromJSON(e82.fields):void 0}},toJSON(e82){let n={};return e82.fields!==void 0&&(n.fields=Form.toJSON(e82.fields)),n},create(e82){return GetFieldsResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetFieldsResponse();return n.fields=e82.fields!==void 0&&e82.fields!==null?Form.fromPartial(e82.fields):void 0,n}};messageTypeRegistry.set(GetFieldsResponse.$type,GetFieldsResponse);function createBaseValidateFormRequest(){return{editing:!1,fieldValues:{}}}var ValidateFormRequest={$type:"devvit.actor.settings.v1alpha.ValidateFormRequest",encode(e82,n=_m0.Writer.create()){return e82.editing!==!1&&n.uint32(8).bool(e82.editing),Object.entries(e82.fieldValues).forEach(([t,o])=>{ValidateFormRequest_FieldValuesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseValidateFormRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.editing=t.bool();continue;case 2:if(r!==18)break;let a=ValidateFormRequest_FieldValuesEntry.decode(t,t.uint32());a.value!==void 0&&(d.fieldValues[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{editing:isSet$U(e82.editing)?globalThis.Boolean(e82.editing):!1,fieldValues:isObject$q(e82.fieldValues)?Object.entries(e82.fieldValues).reduce((n,[t,o])=>(n[t]=FormFieldValue.fromJSON(o),n),{}):{}}},toJSON(e82){let n={};if(e82.editing!==!1&&(n.editing=e82.editing),e82.fieldValues){let t=Object.entries(e82.fieldValues);t.length>0&&(n.fieldValues={},t.forEach(([o,d])=>{n.fieldValues[o]=FormFieldValue.toJSON(d)}))}return n},create(e82){return ValidateFormRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseValidateFormRequest();return n.editing=e82.editing??!1,n.fieldValues=Object.entries(e82.fieldValues??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=FormFieldValue.fromPartial(d)),t),{}),n}};messageTypeRegistry.set(ValidateFormRequest.$type,ValidateFormRequest);function createBaseValidateFormRequest_FieldValuesEntry(){return{key:"",value:void 0}}var ValidateFormRequest_FieldValuesEntry={$type:"devvit.actor.settings.v1alpha.ValidateFormRequest.FieldValuesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&FormFieldValue.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseValidateFormRequest_FieldValuesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=FormFieldValue.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$U(e82.key)?globalThis.String(e82.key):"",value:isSet$U(e82.value)?FormFieldValue.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=FormFieldValue.toJSON(e82.value)),n},create(e82){return ValidateFormRequest_FieldValuesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseValidateFormRequest_FieldValuesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?FormFieldValue.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(ValidateFormRequest_FieldValuesEntry.$type,ValidateFormRequest_FieldValuesEntry);function createBaseValidateFormResponse(){return{success:!1,errors:{}}}var ValidateFormResponse={$type:"devvit.actor.settings.v1alpha.ValidateFormResponse",encode(e82,n=_m0.Writer.create()){return e82.success!==!1&&n.uint32(8).bool(e82.success),Object.entries(e82.errors).forEach(([t,o])=>{ValidateFormResponse_ErrorsEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseValidateFormResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.success=t.bool();continue;case 2:if(r!==18)break;let a=ValidateFormResponse_ErrorsEntry.decode(t,t.uint32());a.value!==void 0&&(d.errors[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{success:isSet$U(e82.success)?globalThis.Boolean(e82.success):!1,errors:isObject$q(e82.errors)?Object.entries(e82.errors).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{}}},toJSON(e82){let n={};if(e82.success!==!1&&(n.success=e82.success),e82.errors){let t=Object.entries(e82.errors);t.length>0&&(n.errors={},t.forEach(([o,d])=>{n.errors[o]=d}))}return n},create(e82){return ValidateFormResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseValidateFormResponse();return n.success=e82.success??!1,n.errors=Object.entries(e82.errors??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=globalThis.String(d)),t),{}),n}};messageTypeRegistry.set(ValidateFormResponse.$type,ValidateFormResponse);function createBaseValidateFormResponse_ErrorsEntry(){return{key:"",value:""}}var ValidateFormResponse_ErrorsEntry={$type:"devvit.actor.settings.v1alpha.ValidateFormResponse.ErrorsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseValidateFormResponse_ErrorsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$U(e82.key)?globalThis.String(e82.key):"",value:isSet$U(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return ValidateFormResponse_ErrorsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseValidateFormResponse_ErrorsEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(ValidateFormResponse_ErrorsEntry.$type,ValidateFormResponse_ErrorsEntry);function isObject$q(e82){return typeof e82=="object"&&e82!==null}function isSet$U(e82){return e82!=null}var InstanceSettingsDefinition={name:"InstanceSettings",fullName:"devvit.actor.settings.v1alpha.InstanceSettings",methods:{getSettingsFields:{name:"GetSettingsFields",requestType:GetFieldsRequest,requestStream:!1,responseType:GetFieldsResponse,responseStream:!1,options:{}},validateForm:{name:"ValidateForm",requestType:ValidateFormRequest,requestStream:!1,responseType:ValidateFormResponse,responseStream:!1,options:{}}}};function createBaseEmpty(){return{}}var Empty$1={$type:"google.protobuf.Empty",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseEmpty();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return Empty$1.fromPartial(e82??{})},fromPartial(e82){return createBaseEmpty()}};messageTypeRegistry.set(Empty$1.$type,Empty$1);var ConfigFieldType;(function(e82){e82[e82.STRING=0]="STRING",e82[e82.PARAGRAPH=1]="PARAGRAPH",e82[e82.NUMBER=2]="NUMBER",e82[e82.BOOLEAN=3]="BOOLEAN",e82[e82.IMAGE=7]="IMAGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ConfigFieldType||(ConfigFieldType={}));function configFieldTypeFromJSON(e82){switch(e82){case 0:case"STRING":return ConfigFieldType.STRING;case 1:case"PARAGRAPH":return ConfigFieldType.PARAGRAPH;case 2:case"NUMBER":return ConfigFieldType.NUMBER;case 3:case"BOOLEAN":return ConfigFieldType.BOOLEAN;case 7:case"IMAGE":return ConfigFieldType.IMAGE;case-1:case"UNRECOGNIZED":default:return ConfigFieldType.UNRECOGNIZED}}function configFieldTypeToJSON(e82){switch(e82){case ConfigFieldType.STRING:return 0;case ConfigFieldType.PARAGRAPH:return 1;case ConfigFieldType.NUMBER:return 2;case ConfigFieldType.BOOLEAN:return 3;case ConfigFieldType.IMAGE:return 7;case ConfigFieldType.UNRECOGNIZED:default:return-1}}function createBaseConfigForm(){return{fields:[]}}var ConfigForm={$type:"devvit.actor.user_configurable.ConfigForm",encode(e82,n=_m0.Writer.create()){for(let t of e82.fields)ConfigField.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConfigForm();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.fields.push(ConfigField.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fields:globalThis.Array.isArray(e82?.fields)?e82.fields.map(n=>ConfigField.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.fields)!=null&&t.length&&(n.fields=e82.fields.map(o=>ConfigField.toJSON(o))),n},create(e82){return ConfigForm.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseConfigForm();return n.fields=((t=e82.fields)==null?void 0:t.map(o=>ConfigField.fromPartial(o)))||[],n}};messageTypeRegistry.set(ConfigForm.$type,ConfigForm);function createBaseConfigField(){return{fieldType:0,key:"",prompt:"",response:""}}var ConfigField={$type:"devvit.actor.user_configurable.ConfigField",encode(e82,n=_m0.Writer.create()){return e82.fieldType!==0&&n.uint32(8).int32(e82.fieldType),e82.key!==""&&n.uint32(18).string(e82.key),e82.prompt!==""&&n.uint32(26).string(e82.prompt),e82.response!==""&&n.uint32(34).string(e82.response),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConfigField();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.fieldType=t.int32();continue;case 2:if(r!==18)break;d.key=t.string();continue;case 3:if(r!==26)break;d.prompt=t.string();continue;case 4:if(r!==34)break;d.response=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fieldType:isSet$T(e82.fieldType)?configFieldTypeFromJSON(e82.fieldType):0,key:isSet$T(e82.key)?globalThis.String(e82.key):"",prompt:isSet$T(e82.prompt)?globalThis.String(e82.prompt):"",response:isSet$T(e82.response)?globalThis.String(e82.response):""}},toJSON(e82){let n={};return e82.fieldType!==0&&(n.fieldType=configFieldTypeToJSON(e82.fieldType)),e82.key!==""&&(n.key=e82.key),e82.prompt!==""&&(n.prompt=e82.prompt),e82.response!==""&&(n.response=e82.response),n},create(e82){return ConfigField.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConfigField();return n.fieldType=e82.fieldType??0,n.key=e82.key??"",n.prompt=e82.prompt??"",n.response=e82.response??"",n}};messageTypeRegistry.set(ConfigField.$type,ConfigField);function createBaseFormResponse(){return{success:!1,messages:[]}}var FormResponse={$type:"devvit.actor.user_configurable.FormResponse",encode(e82,n=_m0.Writer.create()){e82.success!==!1&&n.uint32(8).bool(e82.success);for(let t of e82.messages)n.uint32(18).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFormResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.success=t.bool();continue;case 2:if(r!==18)break;d.messages.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{success:isSet$T(e82.success)?globalThis.Boolean(e82.success):!1,messages:globalThis.Array.isArray(e82?.messages)?e82.messages.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.success!==!1&&(n.success=e82.success),(t=e82.messages)!=null&&t.length&&(n.messages=e82.messages),n},create(e82){return FormResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFormResponse();return n.success=e82.success??!1,n.messages=((t=e82.messages)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(FormResponse.$type,FormResponse);var UserConfigurableDefinition={name:"UserConfigurable",fullName:"devvit.actor.user_configurable.UserConfigurable",methods:{renderForm:{name:"RenderForm",requestType:Empty$1,requestStream:!1,responseType:ConfigForm,responseStream:!1,options:{}},handleFormResponse:{name:"HandleFormResponse",requestType:ConfigForm,requestStream:!1,responseType:FormResponse,responseStream:!1,options:{}}}};function isSet$T(e82){return e82!=null}var Definition={toSerializable(e82){return isSerializableServiceDefinition(e82)?e82:{name:e82.name,fullName:e82.fullName,methods:Object.values(e82.methods).map(n=>({fullName:"/"+e82.fullName+"/"+n.name,name:n.name,requestStream:n.requestStream,requestType:n.requestType.$type,responseStream:n.responseStream,responseType:n.responseType.$type})),version:""}},fromSerializable(e82){let n={};return Object.values(e82.methods).forEach(t=>{let o=messageTypeRegistry.get(t.requestType),d=messageTypeRegistry.get(t.responseType);if(!o){console.warn(`Request type ${t.requestType} not found, continuing...`);return}if(!d){console.warn(`Response type ${t.responseType} not found, continuing...`);return}let r=t.name[0].toLocaleLowerCase()+t.name.slice(1);n[r]={name:t.name,requestType:o,requestStream:t.requestStream,responseType:d,responseStream:t.responseStream}}),{fullName:e82.fullName,name:e82.name,methods:n}}};function isSerializableServiceDefinition(e82){return Array.isArray(e82.methods)}function createBaseAny(){return{typeUrl:"",value:new Uint8Array(0)}}var Any={$type:"google.protobuf.Any",encode(e82,n=_m0.Writer.create()){return e82.typeUrl!==""&&n.uint32(10).string(e82.typeUrl),e82.value.length!==0&&n.uint32(18).bytes(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAny();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.typeUrl=t.string();continue;case 2:if(r!==18)break;d.value=t.bytes();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{typeUrl:isSet$S(e82.typeUrl)?globalThis.String(e82.typeUrl):"",value:isSet$S(e82.value)?bytesFromBase64$2(e82.value):new Uint8Array(0)}},toJSON(e82){let n={};return e82.typeUrl!==""&&(n.typeUrl=e82.typeUrl),e82.value.length!==0&&(n.value=base64FromBytes$2(e82.value)),n},create(e82){return Any.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAny();return n.typeUrl=e82.typeUrl??"",n.value=e82.value??new Uint8Array(0),n}};messageTypeRegistry.set(Any.$type,Any);function bytesFromBase64$2(e82){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e82,"base64"));{let n=globalThis.atob(e82),t=new Uint8Array(n.length);for(let o=0;o<n.length;++o)t[o]=n.charCodeAt(o);return t}}function base64FromBytes$2(e82){if(globalThis.Buffer)return globalThis.Buffer.from(e82).toString("base64");{let n=[];return e82.forEach(t=>{n.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(n.join(""))}}function isSet$S(e82){return e82!=null}var NullValue;(function(e82){e82[e82.NULL_VALUE=0]="NULL_VALUE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(NullValue||(NullValue={}));function nullValueFromJSON(e82){switch(e82){case 0:case"NULL_VALUE":return NullValue.NULL_VALUE;case-1:case"UNRECOGNIZED":default:return NullValue.UNRECOGNIZED}}function nullValueToJSON(e82){switch(e82){case NullValue.NULL_VALUE:return 0;case NullValue.UNRECOGNIZED:default:return-1}}function createBaseStruct(){return{fields:{}}}var Struct={$type:"google.protobuf.Struct",encode(e82,n=_m0.Writer.create()){return Object.entries(e82.fields).forEach(([t,o])=>{o!==void 0&&Struct_FieldsEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStruct();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=Struct_FieldsEntry.decode(t,t.uint32());a.value!==void 0&&(d.fields[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fields:isObject$p(e82.fields)?Object.entries(e82.fields).reduce((n,[t,o])=>(n[t]=o,n),{}):{}}},toJSON(e82){let n={};if(e82.fields){let t=Object.entries(e82.fields);t.length>0&&(n.fields={},t.forEach(([o,d])=>{n.fields[o]=d}))}return n},create(e82){return Struct.fromPartial(e82??{})},fromPartial(e82){let n=createBaseStruct();return n.fields=Object.entries(e82.fields??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=d),t),{}),n},wrap(e82){let n=createBaseStruct();if(e82!==void 0)for(let t of Object.keys(e82))n.fields[t]=e82[t];return n},unwrap(e82){let n={};if(e82.fields)for(let t of Object.keys(e82.fields))n[t]=e82.fields[t];return n}};messageTypeRegistry.set(Struct.$type,Struct);function createBaseStruct_FieldsEntry(){return{key:"",value:void 0}}var Struct_FieldsEntry={$type:"google.protobuf.Struct.FieldsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&Value.encode(Value.wrap(e82.value),n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStruct_FieldsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=Value.unwrap(Value.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$R(e82.key)?globalThis.String(e82.key):"",value:isSet$R(e82?.value)?e82.value:void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=e82.value),n},create(e82){return Struct_FieldsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseStruct_FieldsEntry();return n.key=e82.key??"",n.value=e82.value??void 0,n}};messageTypeRegistry.set(Struct_FieldsEntry.$type,Struct_FieldsEntry);function createBaseValue(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var Value={$type:"google.protobuf.Value",encode(e82,n=_m0.Writer.create()){return e82.nullValue!==void 0&&n.uint32(8).int32(e82.nullValue),e82.numberValue!==void 0&&n.uint32(17).double(e82.numberValue),e82.stringValue!==void 0&&n.uint32(26).string(e82.stringValue),e82.boolValue!==void 0&&n.uint32(32).bool(e82.boolValue),e82.structValue!==void 0&&Struct.encode(Struct.wrap(e82.structValue),n.uint32(42).fork()).ldelim(),e82.listValue!==void 0&&ListValue.encode(ListValue.wrap(e82.listValue),n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.nullValue=t.int32();continue;case 2:if(r!==17)break;d.numberValue=t.double();continue;case 3:if(r!==26)break;d.stringValue=t.string();continue;case 4:if(r!==32)break;d.boolValue=t.bool();continue;case 5:if(r!==42)break;d.structValue=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 6:if(r!==50)break;d.listValue=ListValue.unwrap(ListValue.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{nullValue:isSet$R(e82.nullValue)?nullValueFromJSON(e82.nullValue):void 0,numberValue:isSet$R(e82.numberValue)?globalThis.Number(e82.numberValue):void 0,stringValue:isSet$R(e82.stringValue)?globalThis.String(e82.stringValue):void 0,boolValue:isSet$R(e82.boolValue)?globalThis.Boolean(e82.boolValue):void 0,structValue:isObject$p(e82.structValue)?e82.structValue:void 0,listValue:globalThis.Array.isArray(e82.listValue)?[...e82.listValue]:void 0}},toJSON(e82){let n={};return e82.nullValue!==void 0&&(n.nullValue=nullValueToJSON(e82.nullValue)),e82.numberValue!==void 0&&(n.numberValue=e82.numberValue),e82.stringValue!==void 0&&(n.stringValue=e82.stringValue),e82.boolValue!==void 0&&(n.boolValue=e82.boolValue),e82.structValue!==void 0&&(n.structValue=e82.structValue),e82.listValue!==void 0&&(n.listValue=e82.listValue),n},create(e82){return Value.fromPartial(e82??{})},fromPartial(e82){let n=createBaseValue();return n.nullValue=e82.nullValue??void 0,n.numberValue=e82.numberValue??void 0,n.stringValue=e82.stringValue??void 0,n.boolValue=e82.boolValue??void 0,n.structValue=e82.structValue??void 0,n.listValue=e82.listValue??void 0,n},wrap(e82){let n=createBaseValue();if(e82===null)n.nullValue=NullValue.NULL_VALUE;else if(typeof e82=="boolean")n.boolValue=e82;else if(typeof e82=="number")n.numberValue=e82;else if(typeof e82=="string")n.stringValue=e82;else if(globalThis.Array.isArray(e82))n.listValue=e82;else if(typeof e82=="object")n.structValue=e82;else if(typeof e82<"u")throw new globalThis.Error("Unsupported any value type: "+typeof e82);return n},unwrap(e82){if(e82.stringValue!==void 0)return e82.stringValue;if(e82?.numberValue!==void 0)return e82.numberValue;if(e82?.boolValue!==void 0)return e82.boolValue;if(e82?.structValue!==void 0)return e82.structValue;if(e82?.listValue!==void 0)return e82.listValue;if(e82?.nullValue!==void 0)return null}};messageTypeRegistry.set(Value.$type,Value);function createBaseListValue(){return{values:[]}}var ListValue={$type:"google.protobuf.ListValue",encode(e82,n=_m0.Writer.create()){for(let t of e82.values)Value.encode(Value.wrap(t),n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseListValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.values.push(Value.unwrap(Value.decode(t,t.uint32())));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{values:globalThis.Array.isArray(e82?.values)?[...e82.values]:[]}},toJSON(e82){var t;let n={};return(t=e82.values)!=null&&t.length&&(n.values=e82.values),n},create(e82){return ListValue.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseListValue();return n.values=((t=e82.values)==null?void 0:t.map(o=>o))||[],n},wrap(e82){let n=createBaseListValue();return n.values=e82??[],n},unwrap(e82){return e82!=null&&e82.hasOwnProperty("values")&&globalThis.Array.isArray(e82.values)?e82.values:e82}};messageTypeRegistry.set(ListValue.$type,ListValue);function isObject$p(e82){return typeof e82=="object"&&e82!==null}function isSet$R(e82){return e82!=null}function createBaseDoubleValue(){return{value:0}}var DoubleValue={$type:"google.protobuf.DoubleValue",encode(e82,n=_m0.Writer.create()){return e82.value!==0&&n.uint32(9).double(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDoubleValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==9)break;d.value=t.double();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$Q(e82.value)?globalThis.Number(e82.value):0}},toJSON(e82){let n={};return e82.value!==0&&(n.value=e82.value),n},create(e82){return DoubleValue.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDoubleValue();return n.value=e82.value??0,n}};messageTypeRegistry.set(DoubleValue.$type,DoubleValue);function createBaseFloatValue(){return{value:0}}var FloatValue={$type:"google.protobuf.FloatValue",encode(e82,n=_m0.Writer.create()){return e82.value!==0&&n.uint32(13).float(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFloatValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==13)break;d.value=t.float();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$Q(e82.value)?globalThis.Number(e82.value):0}},toJSON(e82){let n={};return e82.value!==0&&(n.value=e82.value),n},create(e82){return FloatValue.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFloatValue();return n.value=e82.value??0,n}};messageTypeRegistry.set(FloatValue.$type,FloatValue);function createBaseInt64Value(){return{value:0}}var Int64Value={$type:"google.protobuf.Int64Value",encode(e82,n=_m0.Writer.create()){return e82.value!==0&&n.uint32(8).int64(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseInt64Value();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.value=longToNumber$5(t.int64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$Q(e82.value)?globalThis.Number(e82.value):0}},toJSON(e82){let n={};return e82.value!==0&&(n.value=Math.round(e82.value)),n},create(e82){return Int64Value.fromPartial(e82??{})},fromPartial(e82){let n=createBaseInt64Value();return n.value=e82.value??0,n}};messageTypeRegistry.set(Int64Value.$type,Int64Value);function createBaseUInt64Value(){return{value:0}}var UInt64Value={$type:"google.protobuf.UInt64Value",encode(e82,n=_m0.Writer.create()){return e82.value!==0&&n.uint32(8).uint64(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUInt64Value();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.value=longToNumber$5(t.uint64());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$Q(e82.value)?globalThis.Number(e82.value):0}},toJSON(e82){let n={};return e82.value!==0&&(n.value=Math.round(e82.value)),n},create(e82){return UInt64Value.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUInt64Value();return n.value=e82.value??0,n}};messageTypeRegistry.set(UInt64Value.$type,UInt64Value);function createBaseInt32Value(){return{value:0}}var Int32Value={$type:"google.protobuf.Int32Value",encode(e82,n=_m0.Writer.create()){return e82.value!==0&&n.uint32(8).int32(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseInt32Value();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.value=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$Q(e82.value)?globalThis.Number(e82.value):0}},toJSON(e82){let n={};return e82.value!==0&&(n.value=Math.round(e82.value)),n},create(e82){return Int32Value.fromPartial(e82??{})},fromPartial(e82){let n=createBaseInt32Value();return n.value=e82.value??0,n}};messageTypeRegistry.set(Int32Value.$type,Int32Value);function createBaseUInt32Value(){return{value:0}}var UInt32Value={$type:"google.protobuf.UInt32Value",encode(e82,n=_m0.Writer.create()){return e82.value!==0&&n.uint32(8).uint32(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUInt32Value();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.value=t.uint32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$Q(e82.value)?globalThis.Number(e82.value):0}},toJSON(e82){let n={};return e82.value!==0&&(n.value=Math.round(e82.value)),n},create(e82){return UInt32Value.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUInt32Value();return n.value=e82.value??0,n}};messageTypeRegistry.set(UInt32Value.$type,UInt32Value);function createBaseBoolValue(){return{value:!1}}var BoolValue={$type:"google.protobuf.BoolValue",encode(e82,n=_m0.Writer.create()){return e82.value!==!1&&n.uint32(8).bool(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBoolValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.value=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$Q(e82.value)?globalThis.Boolean(e82.value):!1}},toJSON(e82){let n={};return e82.value!==!1&&(n.value=e82.value),n},create(e82){return BoolValue.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBoolValue();return n.value=e82.value??!1,n}};messageTypeRegistry.set(BoolValue.$type,BoolValue);function createBaseStringValue(){return{value:""}}var StringValue={$type:"google.protobuf.StringValue",encode(e82,n=_m0.Writer.create()){return e82.value!==""&&n.uint32(10).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStringValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$Q(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.value!==""&&(n.value=e82.value),n},create(e82){return StringValue.fromPartial(e82??{})},fromPartial(e82){let n=createBaseStringValue();return n.value=e82.value??"",n}};messageTypeRegistry.set(StringValue.$type,StringValue);function createBaseBytesValue(){return{value:new Uint8Array(0)}}var BytesValue={$type:"google.protobuf.BytesValue",encode(e82,n=_m0.Writer.create()){return e82.value.length!==0&&n.uint32(10).bytes(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBytesValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.value=t.bytes();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$Q(e82.value)?bytesFromBase64$1(e82.value):new Uint8Array(0)}},toJSON(e82){let n={};return e82.value.length!==0&&(n.value=base64FromBytes$1(e82.value)),n},create(e82){return BytesValue.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBytesValue();return n.value=e82.value??new Uint8Array(0),n}};messageTypeRegistry.set(BytesValue.$type,BytesValue);function bytesFromBase64$1(e82){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e82,"base64"));{let n=globalThis.atob(e82),t=new Uint8Array(n.length);for(let o=0;o<n.length;++o)t[o]=n.charCodeAt(o);return t}}function base64FromBytes$1(e82){if(globalThis.Buffer)return globalThis.Buffer.from(e82).toString("base64");{let n=[];return e82.forEach(t=>{n.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(n.join(""))}}function longToNumber$5(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isSet$Q(e82){return e82!=null}var BanInfo_BanInfoAction;(function(e82){e82[e82.UNKNOWN=0]="UNKNOWN",e82[e82.SPAM=1]="SPAM",e82[e82.FILTER=2]="FILTER",e82[e82.REMOVE=3]="REMOVE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BanInfo_BanInfoAction||(BanInfo_BanInfoAction={}));function banInfo_BanInfoActionFromJSON(e82){switch(e82){case 0:case"UNKNOWN":return BanInfo_BanInfoAction.UNKNOWN;case 1:case"SPAM":return BanInfo_BanInfoAction.SPAM;case 2:case"FILTER":return BanInfo_BanInfoAction.FILTER;case 3:case"REMOVE":return BanInfo_BanInfoAction.REMOVE;case-1:case"UNRECOGNIZED":default:return BanInfo_BanInfoAction.UNRECOGNIZED}}function banInfo_BanInfoActionToJSON(e82){switch(e82){case BanInfo_BanInfoAction.UNKNOWN:return 0;case BanInfo_BanInfoAction.SPAM:return 1;case BanInfo_BanInfoAction.FILTER:return 2;case BanInfo_BanInfoAction.REMOVE:return 3;case BanInfo_BanInfoAction.UNRECOGNIZED:default:return-1}}function createBaseAuthorFlairRichText(){return{e:void 0,t:void 0}}var AuthorFlairRichText={$type:"devvit.reddit.AuthorFlairRichText",encode(e82,n=_m0.Writer.create()){return e82.e!==void 0&&StringValue.encode({value:e82.e},n.uint32(10).fork()).ldelim(),e82.t!==void 0&&StringValue.encode({value:e82.t},n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAuthorFlairRichText();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.e=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.t=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{e:isSet$P(e82.e)?String(e82.e):void 0,t:isSet$P(e82.t)?String(e82.t):void 0}},toJSON(e82){let n={};return e82.e!==void 0&&(n.e=e82.e),e82.t!==void 0&&(n.t=e82.t),n},create(e82){return AuthorFlairRichText.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAuthorFlairRichText();return n.e=e82.e??void 0,n.t=e82.t??void 0,n}};messageTypeRegistry.set(AuthorFlairRichText.$type,AuthorFlairRichText);function createBaseAwarding(){return{awardSubType:void 0,awardType:void 0,awardingsRequiredToGrantBenefits:void 0,coinPrice:void 0,coinReward:void 0,count:void 0,daysOfDripExtension:void 0,daysOfPremium:void 0,description:void 0,endDate:void 0,giverCoinReward:void 0,iconFormat:void 0,iconHeight:void 0,iconUrl:void 0,iconWidth:void 0,id:void 0,isEnabled:void 0,isNew:void 0,name:void 0,pennyDonate:void 0,pennyPrice:void 0,resizedIcons:[],resizedStaticIcons:[],startDate:void 0,staticIconHeight:void 0,staticIconUrl:void 0,staticIconWidth:void 0,stickyDurationSeconds:void 0,subredditCoinReward:void 0,subredditId:void 0,tiersByRequiredAwardings:void 0}}var Awarding={$type:"devvit.reddit.Awarding",encode(e82,n=_m0.Writer.create()){e82.awardSubType!==void 0&&StringValue.encode({value:e82.awardSubType},n.uint32(10).fork()).ldelim(),e82.awardType!==void 0&&StringValue.encode({value:e82.awardType},n.uint32(18).fork()).ldelim(),e82.awardingsRequiredToGrantBenefits!==void 0&&Int32Value.encode({value:e82.awardingsRequiredToGrantBenefits},n.uint32(26).fork()).ldelim(),e82.coinPrice!==void 0&&Int64Value.encode({value:e82.coinPrice},n.uint32(34).fork()).ldelim(),e82.coinReward!==void 0&&Int64Value.encode({value:e82.coinReward},n.uint32(42).fork()).ldelim(),e82.count!==void 0&&Int32Value.encode({value:e82.count},n.uint32(50).fork()).ldelim(),e82.daysOfDripExtension!==void 0&&Int32Value.encode({value:e82.daysOfDripExtension},n.uint32(58).fork()).ldelim(),e82.daysOfPremium!==void 0&&Int32Value.encode({value:e82.daysOfPremium},n.uint32(66).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(74).fork()).ldelim(),e82.endDate!==void 0&&StringValue.encode({value:e82.endDate},n.uint32(82).fork()).ldelim(),e82.giverCoinReward!==void 0&&Int32Value.encode({value:e82.giverCoinReward},n.uint32(90).fork()).ldelim(),e82.iconFormat!==void 0&&StringValue.encode({value:e82.iconFormat},n.uint32(98).fork()).ldelim(),e82.iconHeight!==void 0&&Int32Value.encode({value:e82.iconHeight},n.uint32(106).fork()).ldelim(),e82.iconUrl!==void 0&&StringValue.encode({value:e82.iconUrl},n.uint32(114).fork()).ldelim(),e82.iconWidth!==void 0&&Int32Value.encode({value:e82.iconWidth},n.uint32(122).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(130).fork()).ldelim(),e82.isEnabled!==void 0&&BoolValue.encode({value:e82.isEnabled},n.uint32(138).fork()).ldelim(),e82.isNew!==void 0&&BoolValue.encode({value:e82.isNew},n.uint32(146).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(154).fork()).ldelim(),e82.pennyDonate!==void 0&&Int32Value.encode({value:e82.pennyDonate},n.uint32(162).fork()).ldelim(),e82.pennyPrice!==void 0&&Int32Value.encode({value:e82.pennyPrice},n.uint32(170).fork()).ldelim();for(let t of e82.resizedIcons)Awarding_Icon.encode(t,n.uint32(178).fork()).ldelim();for(let t of e82.resizedStaticIcons)Awarding_Icon.encode(t,n.uint32(186).fork()).ldelim();return e82.startDate!==void 0&&StringValue.encode({value:e82.startDate},n.uint32(194).fork()).ldelim(),e82.staticIconHeight!==void 0&&Int32Value.encode({value:e82.staticIconHeight},n.uint32(202).fork()).ldelim(),e82.staticIconUrl!==void 0&&StringValue.encode({value:e82.staticIconUrl},n.uint32(210).fork()).ldelim(),e82.staticIconWidth!==void 0&&Int32Value.encode({value:e82.staticIconWidth},n.uint32(218).fork()).ldelim(),e82.stickyDurationSeconds!==void 0&&Int64Value.encode({value:e82.stickyDurationSeconds},n.uint32(226).fork()).ldelim(),e82.subredditCoinReward!==void 0&&Int64Value.encode({value:e82.subredditCoinReward},n.uint32(234).fork()).ldelim(),e82.subredditId!==void 0&&StringValue.encode({value:e82.subredditId},n.uint32(242).fork()).ldelim(),e82.tiersByRequiredAwardings!==void 0&&StringValue.encode({value:e82.tiersByRequiredAwardings},n.uint32(250).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAwarding();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.awardSubType=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.awardType=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.awardingsRequiredToGrantBenefits=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.coinPrice=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.coinReward=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.count=Int32Value.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.daysOfDripExtension=Int32Value.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.daysOfPremium=Int32Value.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.endDate=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.giverCoinReward=Int32Value.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.iconFormat=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.iconHeight=Int32Value.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.iconUrl=StringValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.iconWidth=Int32Value.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.isEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.isNew=BoolValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.pennyDonate=Int32Value.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.pennyPrice=Int32Value.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.resizedIcons.push(Awarding_Icon.decode(t,t.uint32()));continue;case 23:if(r!==186)break;d.resizedStaticIcons.push(Awarding_Icon.decode(t,t.uint32()));continue;case 24:if(r!==194)break;d.startDate=StringValue.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.staticIconHeight=Int32Value.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.staticIconUrl=StringValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.staticIconWidth=Int32Value.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.stickyDurationSeconds=Int64Value.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.subredditCoinReward=Int64Value.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.subredditId=StringValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.tiersByRequiredAwardings=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{awardSubType:isSet$P(e82.awardSubType)?String(e82.awardSubType):void 0,awardType:isSet$P(e82.awardType)?String(e82.awardType):void 0,awardingsRequiredToGrantBenefits:isSet$P(e82.awardingsRequiredToGrantBenefits)?Number(e82.awardingsRequiredToGrantBenefits):void 0,coinPrice:isSet$P(e82.coinPrice)?Number(e82.coinPrice):void 0,coinReward:isSet$P(e82.coinReward)?Number(e82.coinReward):void 0,count:isSet$P(e82.count)?Number(e82.count):void 0,daysOfDripExtension:isSet$P(e82.daysOfDripExtension)?Number(e82.daysOfDripExtension):void 0,daysOfPremium:isSet$P(e82.daysOfPremium)?Number(e82.daysOfPremium):void 0,description:isSet$P(e82.description)?String(e82.description):void 0,endDate:isSet$P(e82.endDate)?String(e82.endDate):void 0,giverCoinReward:isSet$P(e82.giverCoinReward)?Number(e82.giverCoinReward):void 0,iconFormat:isSet$P(e82.iconFormat)?String(e82.iconFormat):void 0,iconHeight:isSet$P(e82.iconHeight)?Number(e82.iconHeight):void 0,iconUrl:isSet$P(e82.iconUrl)?String(e82.iconUrl):void 0,iconWidth:isSet$P(e82.iconWidth)?Number(e82.iconWidth):void 0,id:isSet$P(e82.id)?String(e82.id):void 0,isEnabled:isSet$P(e82.isEnabled)?!!e82.isEnabled:void 0,isNew:isSet$P(e82.isNew)?!!e82.isNew:void 0,name:isSet$P(e82.name)?String(e82.name):void 0,pennyDonate:isSet$P(e82.pennyDonate)?Number(e82.pennyDonate):void 0,pennyPrice:isSet$P(e82.pennyPrice)?Number(e82.pennyPrice):void 0,resizedIcons:globalThis.Array.isArray(e82?.resizedIcons)?e82.resizedIcons.map(n=>Awarding_Icon.fromJSON(n)):[],resizedStaticIcons:globalThis.Array.isArray(e82?.resizedStaticIcons)?e82.resizedStaticIcons.map(n=>Awarding_Icon.fromJSON(n)):[],startDate:isSet$P(e82.startDate)?String(e82.startDate):void 0,staticIconHeight:isSet$P(e82.staticIconHeight)?Number(e82.staticIconHeight):void 0,staticIconUrl:isSet$P(e82.staticIconUrl)?String(e82.staticIconUrl):void 0,staticIconWidth:isSet$P(e82.staticIconWidth)?Number(e82.staticIconWidth):void 0,stickyDurationSeconds:isSet$P(e82.stickyDurationSeconds)?Number(e82.stickyDurationSeconds):void 0,subredditCoinReward:isSet$P(e82.subredditCoinReward)?Number(e82.subredditCoinReward):void 0,subredditId:isSet$P(e82.subredditId)?String(e82.subredditId):void 0,tiersByRequiredAwardings:isSet$P(e82.tiersByRequiredAwardings)?String(e82.tiersByRequiredAwardings):void 0}},toJSON(e82){var t,o;let n={};return e82.awardSubType!==void 0&&(n.awardSubType=e82.awardSubType),e82.awardType!==void 0&&(n.awardType=e82.awardType),e82.awardingsRequiredToGrantBenefits!==void 0&&(n.awardingsRequiredToGrantBenefits=e82.awardingsRequiredToGrantBenefits),e82.coinPrice!==void 0&&(n.coinPrice=e82.coinPrice),e82.coinReward!==void 0&&(n.coinReward=e82.coinReward),e82.count!==void 0&&(n.count=e82.count),e82.daysOfDripExtension!==void 0&&(n.daysOfDripExtension=e82.daysOfDripExtension),e82.daysOfPremium!==void 0&&(n.daysOfPremium=e82.daysOfPremium),e82.description!==void 0&&(n.description=e82.description),e82.endDate!==void 0&&(n.endDate=e82.endDate),e82.giverCoinReward!==void 0&&(n.giverCoinReward=e82.giverCoinReward),e82.iconFormat!==void 0&&(n.iconFormat=e82.iconFormat),e82.iconHeight!==void 0&&(n.iconHeight=e82.iconHeight),e82.iconUrl!==void 0&&(n.iconUrl=e82.iconUrl),e82.iconWidth!==void 0&&(n.iconWidth=e82.iconWidth),e82.id!==void 0&&(n.id=e82.id),e82.isEnabled!==void 0&&(n.isEnabled=e82.isEnabled),e82.isNew!==void 0&&(n.isNew=e82.isNew),e82.name!==void 0&&(n.name=e82.name),e82.pennyDonate!==void 0&&(n.pennyDonate=e82.pennyDonate),e82.pennyPrice!==void 0&&(n.pennyPrice=e82.pennyPrice),(t=e82.resizedIcons)!=null&&t.length&&(n.resizedIcons=e82.resizedIcons.map(d=>Awarding_Icon.toJSON(d))),(o=e82.resizedStaticIcons)!=null&&o.length&&(n.resizedStaticIcons=e82.resizedStaticIcons.map(d=>Awarding_Icon.toJSON(d))),e82.startDate!==void 0&&(n.startDate=e82.startDate),e82.staticIconHeight!==void 0&&(n.staticIconHeight=e82.staticIconHeight),e82.staticIconUrl!==void 0&&(n.staticIconUrl=e82.staticIconUrl),e82.staticIconWidth!==void 0&&(n.staticIconWidth=e82.staticIconWidth),e82.stickyDurationSeconds!==void 0&&(n.stickyDurationSeconds=e82.stickyDurationSeconds),e82.subredditCoinReward!==void 0&&(n.subredditCoinReward=e82.subredditCoinReward),e82.subredditId!==void 0&&(n.subredditId=e82.subredditId),e82.tiersByRequiredAwardings!==void 0&&(n.tiersByRequiredAwardings=e82.tiersByRequiredAwardings),n},create(e82){return Awarding.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseAwarding();return n.awardSubType=e82.awardSubType??void 0,n.awardType=e82.awardType??void 0,n.awardingsRequiredToGrantBenefits=e82.awardingsRequiredToGrantBenefits??void 0,n.coinPrice=e82.coinPrice??void 0,n.coinReward=e82.coinReward??void 0,n.count=e82.count??void 0,n.daysOfDripExtension=e82.daysOfDripExtension??void 0,n.daysOfPremium=e82.daysOfPremium??void 0,n.description=e82.description??void 0,n.endDate=e82.endDate??void 0,n.giverCoinReward=e82.giverCoinReward??void 0,n.iconFormat=e82.iconFormat??void 0,n.iconHeight=e82.iconHeight??void 0,n.iconUrl=e82.iconUrl??void 0,n.iconWidth=e82.iconWidth??void 0,n.id=e82.id??void 0,n.isEnabled=e82.isEnabled??void 0,n.isNew=e82.isNew??void 0,n.name=e82.name??void 0,n.pennyDonate=e82.pennyDonate??void 0,n.pennyPrice=e82.pennyPrice??void 0,n.resizedIcons=((t=e82.resizedIcons)==null?void 0:t.map(d=>Awarding_Icon.fromPartial(d)))||[],n.resizedStaticIcons=((o=e82.resizedStaticIcons)==null?void 0:o.map(d=>Awarding_Icon.fromPartial(d)))||[],n.startDate=e82.startDate??void 0,n.staticIconHeight=e82.staticIconHeight??void 0,n.staticIconUrl=e82.staticIconUrl??void 0,n.staticIconWidth=e82.staticIconWidth??void 0,n.stickyDurationSeconds=e82.stickyDurationSeconds??void 0,n.subredditCoinReward=e82.subredditCoinReward??void 0,n.subredditId=e82.subredditId??void 0,n.tiersByRequiredAwardings=e82.tiersByRequiredAwardings??void 0,n}};messageTypeRegistry.set(Awarding.$type,Awarding);function createBaseAwarding_Icon(){return{height:void 0,url:void 0,width:void 0}}var Awarding_Icon={$type:"devvit.reddit.Awarding.Icon",encode(e82,n=_m0.Writer.create()){return e82.height!==void 0&&Int32Value.encode({value:e82.height},n.uint32(10).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(18).fork()).ldelim(),e82.width!==void 0&&Int32Value.encode({value:e82.width},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAwarding_Icon();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.height=Int32Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.width=Int32Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{height:isSet$P(e82.height)?Number(e82.height):void 0,url:isSet$P(e82.url)?String(e82.url):void 0,width:isSet$P(e82.width)?Number(e82.width):void 0}},toJSON(e82){let n={};return e82.height!==void 0&&(n.height=e82.height),e82.url!==void 0&&(n.url=e82.url),e82.width!==void 0&&(n.width=e82.width),n},create(e82){return Awarding_Icon.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAwarding_Icon();return n.height=e82.height??void 0,n.url=e82.url??void 0,n.width=e82.width??void 0,n}};messageTypeRegistry.set(Awarding_Icon.$type,Awarding_Icon);function createBaseCommentContributionSettings(){return{allowedMediaTypes:[]}}var CommentContributionSettings={$type:"devvit.reddit.CommentContributionSettings",encode(e82,n=_m0.Writer.create()){for(let t of e82.allowedMediaTypes)StringValue.encode({value:t},n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommentContributionSettings();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.allowedMediaTypes.push(StringValue.decode(t,t.uint32()).value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{allowedMediaTypes:globalThis.Array.isArray(e82?.allowedMediaTypes)?e82.allowedMediaTypes.map(n=>String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.allowedMediaTypes)!=null&&t.length&&(n.allowedMediaTypes=e82.allowedMediaTypes),n},create(e82){return CommentContributionSettings.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseCommentContributionSettings();return n.allowedMediaTypes=((t=e82.allowedMediaTypes)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(CommentContributionSettings.$type,CommentContributionSettings);function createBaseGildings(){return{gid1:void 0,gid2:void 0,gid3:void 0}}var Gildings={$type:"devvit.reddit.Gildings",encode(e82,n=_m0.Writer.create()){return e82.gid1!==void 0&&Int32Value.encode({value:e82.gid1},n.uint32(10).fork()).ldelim(),e82.gid2!==void 0&&Int32Value.encode({value:e82.gid2},n.uint32(18).fork()).ldelim(),e82.gid3!==void 0&&Int32Value.encode({value:e82.gid3},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGildings();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.gid1=Int32Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.gid2=Int32Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.gid3=Int32Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{gid1:isSet$P(e82.gid1)?Number(e82.gid1):void 0,gid2:isSet$P(e82.gid2)?Number(e82.gid2):void 0,gid3:isSet$P(e82.gid3)?Number(e82.gid3):void 0}},toJSON(e82){let n={};return e82.gid1!==void 0&&(n.gid1=e82.gid1),e82.gid2!==void 0&&(n.gid2=e82.gid2),e82.gid3!==void 0&&(n.gid3=e82.gid3),n},create(e82){return Gildings.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGildings();return n.gid1=e82.gid1??void 0,n.gid2=e82.gid2??void 0,n.gid3=e82.gid3??void 0,n}};messageTypeRegistry.set(Gildings.$type,Gildings);function createBaseMediaEmbed(){return{content:void 0,width:void 0,height:void 0,sandbox:void 0,scrolling:void 0,publicThumbnailUrl:void 0}}var MediaEmbed={$type:"devvit.reddit.MediaEmbed",encode(e82,n=_m0.Writer.create()){return e82.content!==void 0&&StringValue.encode({value:e82.content},n.uint32(10).fork()).ldelim(),e82.width!==void 0&&Int32Value.encode({value:e82.width},n.uint32(18).fork()).ldelim(),e82.height!==void 0&&Int32Value.encode({value:e82.height},n.uint32(26).fork()).ldelim(),e82.sandbox!==void 0&&BoolValue.encode({value:e82.sandbox},n.uint32(34).fork()).ldelim(),e82.scrolling!==void 0&&BoolValue.encode({value:e82.scrolling},n.uint32(42).fork()).ldelim(),e82.publicThumbnailUrl!==void 0&&StringValue.encode({value:e82.publicThumbnailUrl},n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMediaEmbed();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.content=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.width=Int32Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.height=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.sandbox=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.scrolling=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.publicThumbnailUrl=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{content:isSet$P(e82.content)?String(e82.content):void 0,width:isSet$P(e82.width)?Number(e82.width):void 0,height:isSet$P(e82.height)?Number(e82.height):void 0,sandbox:isSet$P(e82.sandbox)?!!e82.sandbox:void 0,scrolling:isSet$P(e82.scrolling)?!!e82.scrolling:void 0,publicThumbnailUrl:isSet$P(e82.publicThumbnailUrl)?String(e82.publicThumbnailUrl):void 0}},toJSON(e82){let n={};return e82.content!==void 0&&(n.content=e82.content),e82.width!==void 0&&(n.width=e82.width),e82.height!==void 0&&(n.height=e82.height),e82.sandbox!==void 0&&(n.sandbox=e82.sandbox),e82.scrolling!==void 0&&(n.scrolling=e82.scrolling),e82.publicThumbnailUrl!==void 0&&(n.publicThumbnailUrl=e82.publicThumbnailUrl),n},create(e82){return MediaEmbed.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMediaEmbed();return n.content=e82.content??void 0,n.width=e82.width??void 0,n.height=e82.height??void 0,n.sandbox=e82.sandbox??void 0,n.scrolling=e82.scrolling??void 0,n.publicThumbnailUrl=e82.publicThumbnailUrl??void 0,n}};messageTypeRegistry.set(MediaEmbed.$type,MediaEmbed);function createBaseUserFlairRichtext(){return{e:void 0,t:void 0}}var UserFlairRichtext={$type:"devvit.reddit.UserFlairRichtext",encode(e82,n=_m0.Writer.create()){return e82.e!==void 0&&StringValue.encode({value:e82.e},n.uint32(10).fork()).ldelim(),e82.t!==void 0&&StringValue.encode({value:e82.t},n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserFlairRichtext();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.e=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.t=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{e:isSet$P(e82.e)?String(e82.e):void 0,t:isSet$P(e82.t)?String(e82.t):void 0}},toJSON(e82){let n={};return e82.e!==void 0&&(n.e=e82.e),e82.t!==void 0&&(n.t=e82.t),n},create(e82){return UserFlairRichtext.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserFlairRichtext();return n.e=e82.e??void 0,n.t=e82.t??void 0,n}};messageTypeRegistry.set(UserFlairRichtext.$type,UserFlairRichtext);function createBaseBanInfo(){return{auto:void 0,bannedAt:void 0,banner:void 0,moderatorBanned:void 0,note:void 0,unbanner:void 0,unbannedAt:void 0,resetUsed:void 0,reasonId:void 0,reasonTitle:void 0,reasonMessage:void 0,reasonBy:void 0,modNote:void 0,banAllTriggered:void 0,subredditMessage:void 0,removeAction:0}}var BanInfo={$type:"devvit.reddit.BanInfo",encode(e82,n=_m0.Writer.create()){return e82.auto!==void 0&&BoolValue.encode({value:e82.auto},n.uint32(10).fork()).ldelim(),e82.bannedAt!==void 0&&Int32Value.encode({value:e82.bannedAt},n.uint32(18).fork()).ldelim(),e82.banner!==void 0&&StringValue.encode({value:e82.banner},n.uint32(26).fork()).ldelim(),e82.moderatorBanned!==void 0&&BoolValue.encode({value:e82.moderatorBanned},n.uint32(34).fork()).ldelim(),e82.note!==void 0&&StringValue.encode({value:e82.note},n.uint32(42).fork()).ldelim(),e82.unbanner!==void 0&&StringValue.encode({value:e82.unbanner},n.uint32(50).fork()).ldelim(),e82.unbannedAt!==void 0&&Int32Value.encode({value:e82.unbannedAt},n.uint32(58).fork()).ldelim(),e82.resetUsed!==void 0&&BoolValue.encode({value:e82.resetUsed},n.uint32(66).fork()).ldelim(),e82.reasonId!==void 0&&StringValue.encode({value:e82.reasonId},n.uint32(74).fork()).ldelim(),e82.reasonTitle!==void 0&&StringValue.encode({value:e82.reasonTitle},n.uint32(82).fork()).ldelim(),e82.reasonMessage!==void 0&&StringValue.encode({value:e82.reasonMessage},n.uint32(90).fork()).ldelim(),e82.reasonBy!==void 0&&StringValue.encode({value:e82.reasonBy},n.uint32(98).fork()).ldelim(),e82.modNote!==void 0&&StringValue.encode({value:e82.modNote},n.uint32(106).fork()).ldelim(),e82.banAllTriggered!==void 0&&BoolValue.encode({value:e82.banAllTriggered},n.uint32(114).fork()).ldelim(),e82.subredditMessage!==void 0&&StringValue.encode({value:e82.subredditMessage},n.uint32(122).fork()).ldelim(),e82.removeAction!==0&&n.uint32(128).int32(e82.removeAction),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBanInfo();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.auto=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.bannedAt=Int32Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.banner=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.moderatorBanned=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.note=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.unbanner=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.unbannedAt=Int32Value.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.resetUsed=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.reasonId=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.reasonTitle=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.reasonMessage=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.reasonBy=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.modNote=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.banAllTriggered=BoolValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.subredditMessage=StringValue.decode(t,t.uint32()).value;continue;case 16:if(r!==128)break;d.removeAction=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{auto:isSet$P(e82.auto)?!!e82.auto:void 0,bannedAt:isSet$P(e82.bannedAt)?Number(e82.bannedAt):void 0,banner:isSet$P(e82.banner)?String(e82.banner):void 0,moderatorBanned:isSet$P(e82.moderatorBanned)?!!e82.moderatorBanned:void 0,note:isSet$P(e82.note)?String(e82.note):void 0,unbanner:isSet$P(e82.unbanner)?String(e82.unbanner):void 0,unbannedAt:isSet$P(e82.unbannedAt)?Number(e82.unbannedAt):void 0,resetUsed:isSet$P(e82.resetUsed)?!!e82.resetUsed:void 0,reasonId:isSet$P(e82.reasonId)?String(e82.reasonId):void 0,reasonTitle:isSet$P(e82.reasonTitle)?String(e82.reasonTitle):void 0,reasonMessage:isSet$P(e82.reasonMessage)?String(e82.reasonMessage):void 0,reasonBy:isSet$P(e82.reasonBy)?String(e82.reasonBy):void 0,modNote:isSet$P(e82.modNote)?String(e82.modNote):void 0,banAllTriggered:isSet$P(e82.banAllTriggered)?!!e82.banAllTriggered:void 0,subredditMessage:isSet$P(e82.subredditMessage)?String(e82.subredditMessage):void 0,removeAction:isSet$P(e82.removeAction)?banInfo_BanInfoActionFromJSON(e82.removeAction):0}},toJSON(e82){let n={};return e82.auto!==void 0&&(n.auto=e82.auto),e82.bannedAt!==void 0&&(n.bannedAt=e82.bannedAt),e82.banner!==void 0&&(n.banner=e82.banner),e82.moderatorBanned!==void 0&&(n.moderatorBanned=e82.moderatorBanned),e82.note!==void 0&&(n.note=e82.note),e82.unbanner!==void 0&&(n.unbanner=e82.unbanner),e82.unbannedAt!==void 0&&(n.unbannedAt=e82.unbannedAt),e82.resetUsed!==void 0&&(n.resetUsed=e82.resetUsed),e82.reasonId!==void 0&&(n.reasonId=e82.reasonId),e82.reasonTitle!==void 0&&(n.reasonTitle=e82.reasonTitle),e82.reasonMessage!==void 0&&(n.reasonMessage=e82.reasonMessage),e82.reasonBy!==void 0&&(n.reasonBy=e82.reasonBy),e82.modNote!==void 0&&(n.modNote=e82.modNote),e82.banAllTriggered!==void 0&&(n.banAllTriggered=e82.banAllTriggered),e82.subredditMessage!==void 0&&(n.subredditMessage=e82.subredditMessage),e82.removeAction!==0&&(n.removeAction=banInfo_BanInfoActionToJSON(e82.removeAction)),n},create(e82){return BanInfo.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBanInfo();return n.auto=e82.auto??void 0,n.bannedAt=e82.bannedAt??void 0,n.banner=e82.banner??void 0,n.moderatorBanned=e82.moderatorBanned??void 0,n.note=e82.note??void 0,n.unbanner=e82.unbanner??void 0,n.unbannedAt=e82.unbannedAt??void 0,n.resetUsed=e82.resetUsed??void 0,n.reasonId=e82.reasonId??void 0,n.reasonTitle=e82.reasonTitle??void 0,n.reasonMessage=e82.reasonMessage??void 0,n.reasonBy=e82.reasonBy??void 0,n.modNote=e82.modNote??void 0,n.banAllTriggered=e82.banAllTriggered??void 0,n.subredditMessage=e82.subredditMessage??void 0,n.removeAction=e82.removeAction??0,n}};messageTypeRegistry.set(BanInfo.$type,BanInfo);function isSet$P(e82){return e82!=null}function createBaseSubreddit(){return{acceptFollowers:void 0,accountsActiveIsFuzzed:void 0,accountsActive:void 0,activeUserCount:void 0,advertiserCategory:void 0,allOriginalContent:void 0,allowChatPostCreation:void 0,allowDiscovery:void 0,allowGalleries:void 0,allowImages:void 0,allowPolls:void 0,allowPredictionContributors:void 0,allowPredictionsTournament:void 0,allowPredictions:void 0,allowTalks:void 0,allowVideogifs:void 0,allowVideos:void 0,allowedMediaInComments:[],bannerBackgroundColor:void 0,bannerBackgroundImage:void 0,bannerImg:void 0,bannerSize:[],canAssignLinkFlair:void 0,canAssignUserFlair:void 0,coins:void 0,collapseDeletedComments:void 0,commentContributionSettings:void 0,commentScoreHideMins:void 0,communityIcon:void 0,communityReviewed:void 0,contentCategory:void 0,createdUtc:void 0,created:void 0,defaultSet:void 0,description:void 0,descriptionHtml:void 0,disableContributorRequests:void 0,displayName:void 0,displayNamePrefixed:void 0,emojisCustomSize:[],emojisEnabled:void 0,freeFormReports:void 0,hasMenuWidget:void 0,headerImg:void 0,headerSize:[],headerTitle:void 0,hideAds:void 0,iconColor:void 0,iconImg:void 0,iconSize:[],id:void 0,isChatPostFeatureEnabled:void 0,isCrosspostableSubreddit:void 0,isDefaultBanner:void 0,isDefaultIcon:void 0,isEnrolledInNewModmail:void 0,keyColor:void 0,lang:void 0,linkFlairEnabled:void 0,linkFlairPosition:void 0,mobileBannerImage:void 0,name:void 0,notificationLevel:void 0,originalContentTagEnabled:void 0,over18:void 0,predictionLeaderboardEntryType:void 0,previousNames:[],primaryColor:void 0,publicDescription:void 0,publicDescriptionHtml:void 0,publicTraffic:void 0,quarantine:void 0,restrictCommenting:void 0,restrictPosting:void 0,shouldArchivePosts:void 0,shouldShowMediaInCommentsSetting:void 0,showMedia:void 0,showMediaPreview:void 0,spoilersEnabled:void 0,submissionType:void 0,submitLinkLabel:void 0,submitText:void 0,submitTextHtml:void 0,submitTextLabel:void 0,subredditType:void 0,subscribers:void 0,suggestedCommentSort:void 0,title:void 0,url:void 0,userCanFlairInSr:void 0,userFlairBackgroundColor:void 0,userFlairCssClass:void 0,userFlairEnabledInSr:void 0,userFlairPosition:void 0,userFlairRichtext:[],userFlairTemplateId:void 0,userFlairText:void 0,userFlairTextColor:void 0,userFlairType:void 0,userHasFavorited:void 0,userIsBanned:void 0,userIsContributor:void 0,userIsModerator:void 0,userIsSubscriber:void 0,userSrFlairEnabled:void 0,userSrThemeEnabled:void 0,videostreamLinksCount:void 0,whitelistStatus:void 0,wikiEnabled:void 0,wls:void 0,markedSpam:void 0,postRequirements:void 0,userIsMuted:!1}}var Subreddit={$type:"devvit.reddit.Subreddit",encode(e82,n=_m0.Writer.create()){e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(10).fork()).ldelim(),e82.accountsActiveIsFuzzed!==void 0&&BoolValue.encode({value:e82.accountsActiveIsFuzzed},n.uint32(18).fork()).ldelim(),e82.accountsActive!==void 0&&Int32Value.encode({value:e82.accountsActive},n.uint32(26).fork()).ldelim(),e82.activeUserCount!==void 0&&Int32Value.encode({value:e82.activeUserCount},n.uint32(34).fork()).ldelim(),e82.advertiserCategory!==void 0&&StringValue.encode({value:e82.advertiserCategory},n.uint32(42).fork()).ldelim(),e82.allOriginalContent!==void 0&&BoolValue.encode({value:e82.allOriginalContent},n.uint32(50).fork()).ldelim(),e82.allowChatPostCreation!==void 0&&BoolValue.encode({value:e82.allowChatPostCreation},n.uint32(58).fork()).ldelim(),e82.allowDiscovery!==void 0&&BoolValue.encode({value:e82.allowDiscovery},n.uint32(66).fork()).ldelim(),e82.allowGalleries!==void 0&&BoolValue.encode({value:e82.allowGalleries},n.uint32(74).fork()).ldelim(),e82.allowImages!==void 0&&BoolValue.encode({value:e82.allowImages},n.uint32(82).fork()).ldelim(),e82.allowPolls!==void 0&&BoolValue.encode({value:e82.allowPolls},n.uint32(90).fork()).ldelim(),e82.allowPredictionContributors!==void 0&&BoolValue.encode({value:e82.allowPredictionContributors},n.uint32(98).fork()).ldelim(),e82.allowPredictionsTournament!==void 0&&BoolValue.encode({value:e82.allowPredictionsTournament},n.uint32(106).fork()).ldelim(),e82.allowPredictions!==void 0&&BoolValue.encode({value:e82.allowPredictions},n.uint32(114).fork()).ldelim(),e82.allowTalks!==void 0&&BoolValue.encode({value:e82.allowTalks},n.uint32(122).fork()).ldelim(),e82.allowVideogifs!==void 0&&BoolValue.encode({value:e82.allowVideogifs},n.uint32(130).fork()).ldelim(),e82.allowVideos!==void 0&&BoolValue.encode({value:e82.allowVideos},n.uint32(138).fork()).ldelim();for(let t of e82.allowedMediaInComments)StringValue.encode({value:t},n.uint32(146).fork()).ldelim();e82.bannerBackgroundColor!==void 0&&StringValue.encode({value:e82.bannerBackgroundColor},n.uint32(154).fork()).ldelim(),e82.bannerBackgroundImage!==void 0&&StringValue.encode({value:e82.bannerBackgroundImage},n.uint32(162).fork()).ldelim(),e82.bannerImg!==void 0&&StringValue.encode({value:e82.bannerImg},n.uint32(170).fork()).ldelim();for(let t of e82.bannerSize)Int32Value.encode({value:t},n.uint32(178).fork()).ldelim();e82.canAssignLinkFlair!==void 0&&BoolValue.encode({value:e82.canAssignLinkFlair},n.uint32(186).fork()).ldelim(),e82.canAssignUserFlair!==void 0&&BoolValue.encode({value:e82.canAssignUserFlair},n.uint32(194).fork()).ldelim(),e82.coins!==void 0&&Int32Value.encode({value:e82.coins},n.uint32(202).fork()).ldelim(),e82.collapseDeletedComments!==void 0&&BoolValue.encode({value:e82.collapseDeletedComments},n.uint32(210).fork()).ldelim(),e82.commentContributionSettings!==void 0&&CommentContributionSettings.encode(e82.commentContributionSettings,n.uint32(218).fork()).ldelim(),e82.commentScoreHideMins!==void 0&&Int32Value.encode({value:e82.commentScoreHideMins},n.uint32(226).fork()).ldelim(),e82.communityIcon!==void 0&&StringValue.encode({value:e82.communityIcon},n.uint32(234).fork()).ldelim(),e82.communityReviewed!==void 0&&BoolValue.encode({value:e82.communityReviewed},n.uint32(242).fork()).ldelim(),e82.contentCategory!==void 0&&StringValue.encode({value:e82.contentCategory},n.uint32(250).fork()).ldelim(),e82.createdUtc!==void 0&&Int32Value.encode({value:e82.createdUtc},n.uint32(258).fork()).ldelim(),e82.created!==void 0&&Int32Value.encode({value:e82.created},n.uint32(266).fork()).ldelim(),e82.defaultSet!==void 0&&BoolValue.encode({value:e82.defaultSet},n.uint32(274).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(282).fork()).ldelim(),e82.descriptionHtml!==void 0&&StringValue.encode({value:e82.descriptionHtml},n.uint32(290).fork()).ldelim(),e82.disableContributorRequests!==void 0&&BoolValue.encode({value:e82.disableContributorRequests},n.uint32(298).fork()).ldelim(),e82.displayName!==void 0&&StringValue.encode({value:e82.displayName},n.uint32(306).fork()).ldelim(),e82.displayNamePrefixed!==void 0&&StringValue.encode({value:e82.displayNamePrefixed},n.uint32(314).fork()).ldelim();for(let t of e82.emojisCustomSize)Int32Value.encode({value:t},n.uint32(322).fork()).ldelim();e82.emojisEnabled!==void 0&&BoolValue.encode({value:e82.emojisEnabled},n.uint32(330).fork()).ldelim(),e82.freeFormReports!==void 0&&BoolValue.encode({value:e82.freeFormReports},n.uint32(338).fork()).ldelim(),e82.hasMenuWidget!==void 0&&BoolValue.encode({value:e82.hasMenuWidget},n.uint32(346).fork()).ldelim(),e82.headerImg!==void 0&&StringValue.encode({value:e82.headerImg},n.uint32(354).fork()).ldelim();for(let t of e82.headerSize)Int32Value.encode({value:t},n.uint32(362).fork()).ldelim();e82.headerTitle!==void 0&&StringValue.encode({value:e82.headerTitle},n.uint32(370).fork()).ldelim(),e82.hideAds!==void 0&&BoolValue.encode({value:e82.hideAds},n.uint32(378).fork()).ldelim(),e82.iconColor!==void 0&&StringValue.encode({value:e82.iconColor},n.uint32(386).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(394).fork()).ldelim();for(let t of e82.iconSize)Int32Value.encode({value:t},n.uint32(402).fork()).ldelim();e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(410).fork()).ldelim(),e82.isChatPostFeatureEnabled!==void 0&&BoolValue.encode({value:e82.isChatPostFeatureEnabled},n.uint32(418).fork()).ldelim(),e82.isCrosspostableSubreddit!==void 0&&BoolValue.encode({value:e82.isCrosspostableSubreddit},n.uint32(426).fork()).ldelim(),e82.isDefaultBanner!==void 0&&BoolValue.encode({value:e82.isDefaultBanner},n.uint32(434).fork()).ldelim(),e82.isDefaultIcon!==void 0&&BoolValue.encode({value:e82.isDefaultIcon},n.uint32(442).fork()).ldelim(),e82.isEnrolledInNewModmail!==void 0&&BoolValue.encode({value:e82.isEnrolledInNewModmail},n.uint32(450).fork()).ldelim(),e82.keyColor!==void 0&&StringValue.encode({value:e82.keyColor},n.uint32(458).fork()).ldelim(),e82.lang!==void 0&&StringValue.encode({value:e82.lang},n.uint32(466).fork()).ldelim(),e82.linkFlairEnabled!==void 0&&BoolValue.encode({value:e82.linkFlairEnabled},n.uint32(474).fork()).ldelim(),e82.linkFlairPosition!==void 0&&StringValue.encode({value:e82.linkFlairPosition},n.uint32(482).fork()).ldelim(),e82.mobileBannerImage!==void 0&&StringValue.encode({value:e82.mobileBannerImage},n.uint32(490).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(498).fork()).ldelim(),e82.notificationLevel!==void 0&&StringValue.encode({value:e82.notificationLevel},n.uint32(506).fork()).ldelim(),e82.originalContentTagEnabled!==void 0&&StringValue.encode({value:e82.originalContentTagEnabled},n.uint32(514).fork()).ldelim(),e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(522).fork()).ldelim(),e82.predictionLeaderboardEntryType!==void 0&&StringValue.encode({value:e82.predictionLeaderboardEntryType},n.uint32(530).fork()).ldelim();for(let t of e82.previousNames)StringValue.encode({value:t},n.uint32(538).fork()).ldelim();e82.primaryColor!==void 0&&StringValue.encode({value:e82.primaryColor},n.uint32(546).fork()).ldelim(),e82.publicDescription!==void 0&&StringValue.encode({value:e82.publicDescription},n.uint32(554).fork()).ldelim(),e82.publicDescriptionHtml!==void 0&&StringValue.encode({value:e82.publicDescriptionHtml},n.uint32(562).fork()).ldelim(),e82.publicTraffic!==void 0&&BoolValue.encode({value:e82.publicTraffic},n.uint32(570).fork()).ldelim(),e82.quarantine!==void 0&&BoolValue.encode({value:e82.quarantine},n.uint32(578).fork()).ldelim(),e82.restrictCommenting!==void 0&&BoolValue.encode({value:e82.restrictCommenting},n.uint32(586).fork()).ldelim(),e82.restrictPosting!==void 0&&BoolValue.encode({value:e82.restrictPosting},n.uint32(594).fork()).ldelim(),e82.shouldArchivePosts!==void 0&&BoolValue.encode({value:e82.shouldArchivePosts},n.uint32(602).fork()).ldelim(),e82.shouldShowMediaInCommentsSetting!==void 0&&BoolValue.encode({value:e82.shouldShowMediaInCommentsSetting},n.uint32(610).fork()).ldelim(),e82.showMedia!==void 0&&BoolValue.encode({value:e82.showMedia},n.uint32(618).fork()).ldelim(),e82.showMediaPreview!==void 0&&BoolValue.encode({value:e82.showMediaPreview},n.uint32(626).fork()).ldelim(),e82.spoilersEnabled!==void 0&&BoolValue.encode({value:e82.spoilersEnabled},n.uint32(634).fork()).ldelim(),e82.submissionType!==void 0&&StringValue.encode({value:e82.submissionType},n.uint32(642).fork()).ldelim(),e82.submitLinkLabel!==void 0&&StringValue.encode({value:e82.submitLinkLabel},n.uint32(650).fork()).ldelim(),e82.submitText!==void 0&&StringValue.encode({value:e82.submitText},n.uint32(658).fork()).ldelim(),e82.submitTextHtml!==void 0&&StringValue.encode({value:e82.submitTextHtml},n.uint32(666).fork()).ldelim(),e82.submitTextLabel!==void 0&&StringValue.encode({value:e82.submitTextLabel},n.uint32(674).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(682).fork()).ldelim(),e82.subscribers!==void 0&&Int32Value.encode({value:e82.subscribers},n.uint32(690).fork()).ldelim(),e82.suggestedCommentSort!==void 0&&StringValue.encode({value:e82.suggestedCommentSort},n.uint32(698).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(706).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(714).fork()).ldelim(),e82.userCanFlairInSr!==void 0&&BoolValue.encode({value:e82.userCanFlairInSr},n.uint32(722).fork()).ldelim(),e82.userFlairBackgroundColor!==void 0&&StringValue.encode({value:e82.userFlairBackgroundColor},n.uint32(730).fork()).ldelim(),e82.userFlairCssClass!==void 0&&StringValue.encode({value:e82.userFlairCssClass},n.uint32(738).fork()).ldelim(),e82.userFlairEnabledInSr!==void 0&&BoolValue.encode({value:e82.userFlairEnabledInSr},n.uint32(746).fork()).ldelim(),e82.userFlairPosition!==void 0&&StringValue.encode({value:e82.userFlairPosition},n.uint32(754).fork()).ldelim();for(let t of e82.userFlairRichtext)UserFlairRichtext.encode(t,n.uint32(762).fork()).ldelim();return e82.userFlairTemplateId!==void 0&&StringValue.encode({value:e82.userFlairTemplateId},n.uint32(770).fork()).ldelim(),e82.userFlairText!==void 0&&StringValue.encode({value:e82.userFlairText},n.uint32(778).fork()).ldelim(),e82.userFlairTextColor!==void 0&&StringValue.encode({value:e82.userFlairTextColor},n.uint32(786).fork()).ldelim(),e82.userFlairType!==void 0&&StringValue.encode({value:e82.userFlairType},n.uint32(794).fork()).ldelim(),e82.userHasFavorited!==void 0&&BoolValue.encode({value:e82.userHasFavorited},n.uint32(802).fork()).ldelim(),e82.userIsBanned!==void 0&&BoolValue.encode({value:e82.userIsBanned},n.uint32(810).fork()).ldelim(),e82.userIsContributor!==void 0&&BoolValue.encode({value:e82.userIsContributor},n.uint32(818).fork()).ldelim(),e82.userIsModerator!==void 0&&BoolValue.encode({value:e82.userIsModerator},n.uint32(826).fork()).ldelim(),e82.userIsSubscriber!==void 0&&BoolValue.encode({value:e82.userIsSubscriber},n.uint32(842).fork()).ldelim(),e82.userSrFlairEnabled!==void 0&&BoolValue.encode({value:e82.userSrFlairEnabled},n.uint32(850).fork()).ldelim(),e82.userSrThemeEnabled!==void 0&&BoolValue.encode({value:e82.userSrThemeEnabled},n.uint32(858).fork()).ldelim(),e82.videostreamLinksCount!==void 0&&Int32Value.encode({value:e82.videostreamLinksCount},n.uint32(866).fork()).ldelim(),e82.whitelistStatus!==void 0&&StringValue.encode({value:e82.whitelistStatus},n.uint32(874).fork()).ldelim(),e82.wikiEnabled!==void 0&&BoolValue.encode({value:e82.wikiEnabled},n.uint32(882).fork()).ldelim(),e82.wls!==void 0&&Int32Value.encode({value:e82.wls},n.uint32(890).fork()).ldelim(),e82.markedSpam!==void 0&&BoolValue.encode({value:e82.markedSpam},n.uint32(898).fork()).ldelim(),e82.postRequirements!==void 0&&Subreddit_PostRequirements.encode(e82.postRequirements,n.uint32(906).fork()).ldelim(),e82.userIsMuted!==!1&&n.uint32(912).bool(e82.userIsMuted),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubreddit();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.accountsActiveIsFuzzed=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.accountsActive=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.activeUserCount=Int32Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.advertiserCategory=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.allOriginalContent=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.allowChatPostCreation=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.allowDiscovery=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.allowGalleries=BoolValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.allowImages=BoolValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.allowPolls=BoolValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.allowPredictionContributors=BoolValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.allowPredictionsTournament=BoolValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.allowPredictions=BoolValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.allowTalks=BoolValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.allowVideogifs=BoolValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.allowVideos=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.allowedMediaInComments.push(StringValue.decode(t,t.uint32()).value);continue;case 19:if(r!==154)break;d.bannerBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.bannerBackgroundImage=StringValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.bannerImg=StringValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.bannerSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 23:if(r!==186)break;d.canAssignLinkFlair=BoolValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.canAssignUserFlair=BoolValue.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.coins=Int32Value.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.collapseDeletedComments=BoolValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.commentContributionSettings=CommentContributionSettings.decode(t,t.uint32());continue;case 28:if(r!==226)break;d.commentScoreHideMins=Int32Value.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.communityIcon=StringValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.communityReviewed=BoolValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.contentCategory=StringValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.createdUtc=Int32Value.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.created=Int32Value.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.defaultSet=BoolValue.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.descriptionHtml=StringValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.disableContributorRequests=BoolValue.decode(t,t.uint32()).value;continue;case 38:if(r!==306)break;d.displayName=StringValue.decode(t,t.uint32()).value;continue;case 39:if(r!==314)break;d.displayNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.emojisCustomSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 41:if(r!==330)break;d.emojisEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 42:if(r!==338)break;d.freeFormReports=BoolValue.decode(t,t.uint32()).value;continue;case 43:if(r!==346)break;d.hasMenuWidget=BoolValue.decode(t,t.uint32()).value;continue;case 44:if(r!==354)break;d.headerImg=StringValue.decode(t,t.uint32()).value;continue;case 45:if(r!==362)break;d.headerSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 46:if(r!==370)break;d.headerTitle=StringValue.decode(t,t.uint32()).value;continue;case 47:if(r!==378)break;d.hideAds=BoolValue.decode(t,t.uint32()).value;continue;case 48:if(r!==386)break;d.iconColor=StringValue.decode(t,t.uint32()).value;continue;case 49:if(r!==394)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 50:if(r!==402)break;d.iconSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 51:if(r!==410)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 52:if(r!==418)break;d.isChatPostFeatureEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 53:if(r!==426)break;d.isCrosspostableSubreddit=BoolValue.decode(t,t.uint32()).value;continue;case 54:if(r!==434)break;d.isDefaultBanner=BoolValue.decode(t,t.uint32()).value;continue;case 55:if(r!==442)break;d.isDefaultIcon=BoolValue.decode(t,t.uint32()).value;continue;case 56:if(r!==450)break;d.isEnrolledInNewModmail=BoolValue.decode(t,t.uint32()).value;continue;case 57:if(r!==458)break;d.keyColor=StringValue.decode(t,t.uint32()).value;continue;case 58:if(r!==466)break;d.lang=StringValue.decode(t,t.uint32()).value;continue;case 59:if(r!==474)break;d.linkFlairEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 60:if(r!==482)break;d.linkFlairPosition=StringValue.decode(t,t.uint32()).value;continue;case 61:if(r!==490)break;d.mobileBannerImage=StringValue.decode(t,t.uint32()).value;continue;case 62:if(r!==498)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 63:if(r!==506)break;d.notificationLevel=StringValue.decode(t,t.uint32()).value;continue;case 64:if(r!==514)break;d.originalContentTagEnabled=StringValue.decode(t,t.uint32()).value;continue;case 65:if(r!==522)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 66:if(r!==530)break;d.predictionLeaderboardEntryType=StringValue.decode(t,t.uint32()).value;continue;case 67:if(r!==538)break;d.previousNames.push(StringValue.decode(t,t.uint32()).value);continue;case 68:if(r!==546)break;d.primaryColor=StringValue.decode(t,t.uint32()).value;continue;case 69:if(r!==554)break;d.publicDescription=StringValue.decode(t,t.uint32()).value;continue;case 70:if(r!==562)break;d.publicDescriptionHtml=StringValue.decode(t,t.uint32()).value;continue;case 71:if(r!==570)break;d.publicTraffic=BoolValue.decode(t,t.uint32()).value;continue;case 72:if(r!==578)break;d.quarantine=BoolValue.decode(t,t.uint32()).value;continue;case 73:if(r!==586)break;d.restrictCommenting=BoolValue.decode(t,t.uint32()).value;continue;case 74:if(r!==594)break;d.restrictPosting=BoolValue.decode(t,t.uint32()).value;continue;case 75:if(r!==602)break;d.shouldArchivePosts=BoolValue.decode(t,t.uint32()).value;continue;case 76:if(r!==610)break;d.shouldShowMediaInCommentsSetting=BoolValue.decode(t,t.uint32()).value;continue;case 77:if(r!==618)break;d.showMedia=BoolValue.decode(t,t.uint32()).value;continue;case 78:if(r!==626)break;d.showMediaPreview=BoolValue.decode(t,t.uint32()).value;continue;case 79:if(r!==634)break;d.spoilersEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 80:if(r!==642)break;d.submissionType=StringValue.decode(t,t.uint32()).value;continue;case 81:if(r!==650)break;d.submitLinkLabel=StringValue.decode(t,t.uint32()).value;continue;case 82:if(r!==658)break;d.submitText=StringValue.decode(t,t.uint32()).value;continue;case 83:if(r!==666)break;d.submitTextHtml=StringValue.decode(t,t.uint32()).value;continue;case 84:if(r!==674)break;d.submitTextLabel=StringValue.decode(t,t.uint32()).value;continue;case 85:if(r!==682)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 86:if(r!==690)break;d.subscribers=Int32Value.decode(t,t.uint32()).value;continue;case 87:if(r!==698)break;d.suggestedCommentSort=StringValue.decode(t,t.uint32()).value;continue;case 88:if(r!==706)break;d.title=StringValue.decode(t,t.uint32()).value;continue;case 89:if(r!==714)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 90:if(r!==722)break;d.userCanFlairInSr=BoolValue.decode(t,t.uint32()).value;continue;case 91:if(r!==730)break;d.userFlairBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 92:if(r!==738)break;d.userFlairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 93:if(r!==746)break;d.userFlairEnabledInSr=BoolValue.decode(t,t.uint32()).value;continue;case 94:if(r!==754)break;d.userFlairPosition=StringValue.decode(t,t.uint32()).value;continue;case 95:if(r!==762)break;d.userFlairRichtext.push(UserFlairRichtext.decode(t,t.uint32()));continue;case 96:if(r!==770)break;d.userFlairTemplateId=StringValue.decode(t,t.uint32()).value;continue;case 97:if(r!==778)break;d.userFlairText=StringValue.decode(t,t.uint32()).value;continue;case 98:if(r!==786)break;d.userFlairTextColor=StringValue.decode(t,t.uint32()).value;continue;case 99:if(r!==794)break;d.userFlairType=StringValue.decode(t,t.uint32()).value;continue;case 100:if(r!==802)break;d.userHasFavorited=BoolValue.decode(t,t.uint32()).value;continue;case 101:if(r!==810)break;d.userIsBanned=BoolValue.decode(t,t.uint32()).value;continue;case 102:if(r!==818)break;d.userIsContributor=BoolValue.decode(t,t.uint32()).value;continue;case 103:if(r!==826)break;d.userIsModerator=BoolValue.decode(t,t.uint32()).value;continue;case 105:if(r!==842)break;d.userIsSubscriber=BoolValue.decode(t,t.uint32()).value;continue;case 106:if(r!==850)break;d.userSrFlairEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 107:if(r!==858)break;d.userSrThemeEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 108:if(r!==866)break;d.videostreamLinksCount=Int32Value.decode(t,t.uint32()).value;continue;case 109:if(r!==874)break;d.whitelistStatus=StringValue.decode(t,t.uint32()).value;continue;case 110:if(r!==882)break;d.wikiEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 111:if(r!==890)break;d.wls=Int32Value.decode(t,t.uint32()).value;continue;case 112:if(r!==898)break;d.markedSpam=BoolValue.decode(t,t.uint32()).value;continue;case 113:if(r!==906)break;d.postRequirements=Subreddit_PostRequirements.decode(t,t.uint32());continue;case 114:if(r!==912)break;d.userIsMuted=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{acceptFollowers:isSet$O(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,accountsActiveIsFuzzed:isSet$O(e82.accountsActiveIsFuzzed)?!!e82.accountsActiveIsFuzzed:void 0,accountsActive:isSet$O(e82.accountsActive)?Number(e82.accountsActive):void 0,activeUserCount:isSet$O(e82.activeUserCount)?Number(e82.activeUserCount):void 0,advertiserCategory:isSet$O(e82.advertiserCategory)?String(e82.advertiserCategory):void 0,allOriginalContent:isSet$O(e82.allOriginalContent)?!!e82.allOriginalContent:void 0,allowChatPostCreation:isSet$O(e82.allowChatPostCreation)?!!e82.allowChatPostCreation:void 0,allowDiscovery:isSet$O(e82.allowDiscovery)?!!e82.allowDiscovery:void 0,allowGalleries:isSet$O(e82.allowGalleries)?!!e82.allowGalleries:void 0,allowImages:isSet$O(e82.allowImages)?!!e82.allowImages:void 0,allowPolls:isSet$O(e82.allowPolls)?!!e82.allowPolls:void 0,allowPredictionContributors:isSet$O(e82.allowPredictionContributors)?!!e82.allowPredictionContributors:void 0,allowPredictionsTournament:isSet$O(e82.allowPredictionsTournament)?!!e82.allowPredictionsTournament:void 0,allowPredictions:isSet$O(e82.allowPredictions)?!!e82.allowPredictions:void 0,allowTalks:isSet$O(e82.allowTalks)?!!e82.allowTalks:void 0,allowVideogifs:isSet$O(e82.allowVideogifs)?!!e82.allowVideogifs:void 0,allowVideos:isSet$O(e82.allowVideos)?!!e82.allowVideos:void 0,allowedMediaInComments:globalThis.Array.isArray(e82?.allowedMediaInComments)?e82.allowedMediaInComments.map(n=>String(n)):[],bannerBackgroundColor:isSet$O(e82.bannerBackgroundColor)?String(e82.bannerBackgroundColor):void 0,bannerBackgroundImage:isSet$O(e82.bannerBackgroundImage)?String(e82.bannerBackgroundImage):void 0,bannerImg:isSet$O(e82.bannerImg)?String(e82.bannerImg):void 0,bannerSize:globalThis.Array.isArray(e82?.bannerSize)?e82.bannerSize.map(n=>Number(n)):[],canAssignLinkFlair:isSet$O(e82.canAssignLinkFlair)?!!e82.canAssignLinkFlair:void 0,canAssignUserFlair:isSet$O(e82.canAssignUserFlair)?!!e82.canAssignUserFlair:void 0,coins:isSet$O(e82.coins)?Number(e82.coins):void 0,collapseDeletedComments:isSet$O(e82.collapseDeletedComments)?!!e82.collapseDeletedComments:void 0,commentContributionSettings:isSet$O(e82.commentContributionSettings)?CommentContributionSettings.fromJSON(e82.commentContributionSettings):void 0,commentScoreHideMins:isSet$O(e82.commentScoreHideMins)?Number(e82.commentScoreHideMins):void 0,communityIcon:isSet$O(e82.communityIcon)?String(e82.communityIcon):void 0,communityReviewed:isSet$O(e82.communityReviewed)?!!e82.communityReviewed:void 0,contentCategory:isSet$O(e82.contentCategory)?String(e82.contentCategory):void 0,createdUtc:isSet$O(e82.createdUtc)?Number(e82.createdUtc):void 0,created:isSet$O(e82.created)?Number(e82.created):void 0,defaultSet:isSet$O(e82.defaultSet)?!!e82.defaultSet:void 0,description:isSet$O(e82.description)?String(e82.description):void 0,descriptionHtml:isSet$O(e82.descriptionHtml)?String(e82.descriptionHtml):void 0,disableContributorRequests:isSet$O(e82.disableContributorRequests)?!!e82.disableContributorRequests:void 0,displayName:isSet$O(e82.displayName)?String(e82.displayName):void 0,displayNamePrefixed:isSet$O(e82.displayNamePrefixed)?String(e82.displayNamePrefixed):void 0,emojisCustomSize:globalThis.Array.isArray(e82?.emojisCustomSize)?e82.emojisCustomSize.map(n=>Number(n)):[],emojisEnabled:isSet$O(e82.emojisEnabled)?!!e82.emojisEnabled:void 0,freeFormReports:isSet$O(e82.freeFormReports)?!!e82.freeFormReports:void 0,hasMenuWidget:isSet$O(e82.hasMenuWidget)?!!e82.hasMenuWidget:void 0,headerImg:isSet$O(e82.headerImg)?String(e82.headerImg):void 0,headerSize:globalThis.Array.isArray(e82?.headerSize)?e82.headerSize.map(n=>Number(n)):[],headerTitle:isSet$O(e82.headerTitle)?String(e82.headerTitle):void 0,hideAds:isSet$O(e82.hideAds)?!!e82.hideAds:void 0,iconColor:isSet$O(e82.iconColor)?String(e82.iconColor):void 0,iconImg:isSet$O(e82.iconImg)?String(e82.iconImg):void 0,iconSize:globalThis.Array.isArray(e82?.iconSize)?e82.iconSize.map(n=>Number(n)):[],id:isSet$O(e82.id)?String(e82.id):void 0,isChatPostFeatureEnabled:isSet$O(e82.isChatPostFeatureEnabled)?!!e82.isChatPostFeatureEnabled:void 0,isCrosspostableSubreddit:isSet$O(e82.isCrosspostableSubreddit)?!!e82.isCrosspostableSubreddit:void 0,isDefaultBanner:isSet$O(e82.isDefaultBanner)?!!e82.isDefaultBanner:void 0,isDefaultIcon:isSet$O(e82.isDefaultIcon)?!!e82.isDefaultIcon:void 0,isEnrolledInNewModmail:isSet$O(e82.isEnrolledInNewModmail)?!!e82.isEnrolledInNewModmail:void 0,keyColor:isSet$O(e82.keyColor)?String(e82.keyColor):void 0,lang:isSet$O(e82.lang)?String(e82.lang):void 0,linkFlairEnabled:isSet$O(e82.linkFlairEnabled)?!!e82.linkFlairEnabled:void 0,linkFlairPosition:isSet$O(e82.linkFlairPosition)?String(e82.linkFlairPosition):void 0,mobileBannerImage:isSet$O(e82.mobileBannerImage)?String(e82.mobileBannerImage):void 0,name:isSet$O(e82.name)?String(e82.name):void 0,notificationLevel:isSet$O(e82.notificationLevel)?String(e82.notificationLevel):void 0,originalContentTagEnabled:isSet$O(e82.originalContentTagEnabled)?String(e82.originalContentTagEnabled):void 0,over18:isSet$O(e82.over18)?!!e82.over18:void 0,predictionLeaderboardEntryType:isSet$O(e82.predictionLeaderboardEntryType)?String(e82.predictionLeaderboardEntryType):void 0,previousNames:globalThis.Array.isArray(e82?.previousNames)?e82.previousNames.map(n=>String(n)):[],primaryColor:isSet$O(e82.primaryColor)?String(e82.primaryColor):void 0,publicDescription:isSet$O(e82.publicDescription)?String(e82.publicDescription):void 0,publicDescriptionHtml:isSet$O(e82.publicDescriptionHtml)?String(e82.publicDescriptionHtml):void 0,publicTraffic:isSet$O(e82.publicTraffic)?!!e82.publicTraffic:void 0,quarantine:isSet$O(e82.quarantine)?!!e82.quarantine:void 0,restrictCommenting:isSet$O(e82.restrictCommenting)?!!e82.restrictCommenting:void 0,restrictPosting:isSet$O(e82.restrictPosting)?!!e82.restrictPosting:void 0,shouldArchivePosts:isSet$O(e82.shouldArchivePosts)?!!e82.shouldArchivePosts:void 0,shouldShowMediaInCommentsSetting:isSet$O(e82.shouldShowMediaInCommentsSetting)?!!e82.shouldShowMediaInCommentsSetting:void 0,showMedia:isSet$O(e82.showMedia)?!!e82.showMedia:void 0,showMediaPreview:isSet$O(e82.showMediaPreview)?!!e82.showMediaPreview:void 0,spoilersEnabled:isSet$O(e82.spoilersEnabled)?!!e82.spoilersEnabled:void 0,submissionType:isSet$O(e82.submissionType)?String(e82.submissionType):void 0,submitLinkLabel:isSet$O(e82.submitLinkLabel)?String(e82.submitLinkLabel):void 0,submitText:isSet$O(e82.submitText)?String(e82.submitText):void 0,submitTextHtml:isSet$O(e82.submitTextHtml)?String(e82.submitTextHtml):void 0,submitTextLabel:isSet$O(e82.submitTextLabel)?String(e82.submitTextLabel):void 0,subredditType:isSet$O(e82.subredditType)?String(e82.subredditType):void 0,subscribers:isSet$O(e82.subscribers)?Number(e82.subscribers):void 0,suggestedCommentSort:isSet$O(e82.suggestedCommentSort)?String(e82.suggestedCommentSort):void 0,title:isSet$O(e82.title)?String(e82.title):void 0,url:isSet$O(e82.url)?String(e82.url):void 0,userCanFlairInSr:isSet$O(e82.userCanFlairInSr)?!!e82.userCanFlairInSr:void 0,userFlairBackgroundColor:isSet$O(e82.userFlairBackgroundColor)?String(e82.userFlairBackgroundColor):void 0,userFlairCssClass:isSet$O(e82.userFlairCssClass)?String(e82.userFlairCssClass):void 0,userFlairEnabledInSr:isSet$O(e82.userFlairEnabledInSr)?!!e82.userFlairEnabledInSr:void 0,userFlairPosition:isSet$O(e82.userFlairPosition)?String(e82.userFlairPosition):void 0,userFlairRichtext:globalThis.Array.isArray(e82?.userFlairRichtext)?e82.userFlairRichtext.map(n=>UserFlairRichtext.fromJSON(n)):[],userFlairTemplateId:isSet$O(e82.userFlairTemplateId)?String(e82.userFlairTemplateId):void 0,userFlairText:isSet$O(e82.userFlairText)?String(e82.userFlairText):void 0,userFlairTextColor:isSet$O(e82.userFlairTextColor)?String(e82.userFlairTextColor):void 0,userFlairType:isSet$O(e82.userFlairType)?String(e82.userFlairType):void 0,userHasFavorited:isSet$O(e82.userHasFavorited)?!!e82.userHasFavorited:void 0,userIsBanned:isSet$O(e82.userIsBanned)?!!e82.userIsBanned:void 0,userIsContributor:isSet$O(e82.userIsContributor)?!!e82.userIsContributor:void 0,userIsModerator:isSet$O(e82.userIsModerator)?!!e82.userIsModerator:void 0,userIsSubscriber:isSet$O(e82.userIsSubscriber)?!!e82.userIsSubscriber:void 0,userSrFlairEnabled:isSet$O(e82.userSrFlairEnabled)?!!e82.userSrFlairEnabled:void 0,userSrThemeEnabled:isSet$O(e82.userSrThemeEnabled)?!!e82.userSrThemeEnabled:void 0,videostreamLinksCount:isSet$O(e82.videostreamLinksCount)?Number(e82.videostreamLinksCount):void 0,whitelistStatus:isSet$O(e82.whitelistStatus)?String(e82.whitelistStatus):void 0,wikiEnabled:isSet$O(e82.wikiEnabled)?!!e82.wikiEnabled:void 0,wls:isSet$O(e82.wls)?Number(e82.wls):void 0,markedSpam:isSet$O(e82.markedSpam)?!!e82.markedSpam:void 0,postRequirements:isSet$O(e82.postRequirements)?Subreddit_PostRequirements.fromJSON(e82.postRequirements):void 0,userIsMuted:isSet$O(e82.userIsMuted)?globalThis.Boolean(e82.userIsMuted):!1}},toJSON(e82){var t,o,d,r,a,u,l;let n={};return e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.accountsActiveIsFuzzed!==void 0&&(n.accountsActiveIsFuzzed=e82.accountsActiveIsFuzzed),e82.accountsActive!==void 0&&(n.accountsActive=e82.accountsActive),e82.activeUserCount!==void 0&&(n.activeUserCount=e82.activeUserCount),e82.advertiserCategory!==void 0&&(n.advertiserCategory=e82.advertiserCategory),e82.allOriginalContent!==void 0&&(n.allOriginalContent=e82.allOriginalContent),e82.allowChatPostCreation!==void 0&&(n.allowChatPostCreation=e82.allowChatPostCreation),e82.allowDiscovery!==void 0&&(n.allowDiscovery=e82.allowDiscovery),e82.allowGalleries!==void 0&&(n.allowGalleries=e82.allowGalleries),e82.allowImages!==void 0&&(n.allowImages=e82.allowImages),e82.allowPolls!==void 0&&(n.allowPolls=e82.allowPolls),e82.allowPredictionContributors!==void 0&&(n.allowPredictionContributors=e82.allowPredictionContributors),e82.allowPredictionsTournament!==void 0&&(n.allowPredictionsTournament=e82.allowPredictionsTournament),e82.allowPredictions!==void 0&&(n.allowPredictions=e82.allowPredictions),e82.allowTalks!==void 0&&(n.allowTalks=e82.allowTalks),e82.allowVideogifs!==void 0&&(n.allowVideogifs=e82.allowVideogifs),e82.allowVideos!==void 0&&(n.allowVideos=e82.allowVideos),(t=e82.allowedMediaInComments)!=null&&t.length&&(n.allowedMediaInComments=e82.allowedMediaInComments),e82.bannerBackgroundColor!==void 0&&(n.bannerBackgroundColor=e82.bannerBackgroundColor),e82.bannerBackgroundImage!==void 0&&(n.bannerBackgroundImage=e82.bannerBackgroundImage),e82.bannerImg!==void 0&&(n.bannerImg=e82.bannerImg),(o=e82.bannerSize)!=null&&o.length&&(n.bannerSize=e82.bannerSize),e82.canAssignLinkFlair!==void 0&&(n.canAssignLinkFlair=e82.canAssignLinkFlair),e82.canAssignUserFlair!==void 0&&(n.canAssignUserFlair=e82.canAssignUserFlair),e82.coins!==void 0&&(n.coins=e82.coins),e82.collapseDeletedComments!==void 0&&(n.collapseDeletedComments=e82.collapseDeletedComments),e82.commentContributionSettings!==void 0&&(n.commentContributionSettings=CommentContributionSettings.toJSON(e82.commentContributionSettings)),e82.commentScoreHideMins!==void 0&&(n.commentScoreHideMins=e82.commentScoreHideMins),e82.communityIcon!==void 0&&(n.communityIcon=e82.communityIcon),e82.communityReviewed!==void 0&&(n.communityReviewed=e82.communityReviewed),e82.contentCategory!==void 0&&(n.contentCategory=e82.contentCategory),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.created!==void 0&&(n.created=e82.created),e82.defaultSet!==void 0&&(n.defaultSet=e82.defaultSet),e82.description!==void 0&&(n.description=e82.description),e82.descriptionHtml!==void 0&&(n.descriptionHtml=e82.descriptionHtml),e82.disableContributorRequests!==void 0&&(n.disableContributorRequests=e82.disableContributorRequests),e82.displayName!==void 0&&(n.displayName=e82.displayName),e82.displayNamePrefixed!==void 0&&(n.displayNamePrefixed=e82.displayNamePrefixed),(d=e82.emojisCustomSize)!=null&&d.length&&(n.emojisCustomSize=e82.emojisCustomSize),e82.emojisEnabled!==void 0&&(n.emojisEnabled=e82.emojisEnabled),e82.freeFormReports!==void 0&&(n.freeFormReports=e82.freeFormReports),e82.hasMenuWidget!==void 0&&(n.hasMenuWidget=e82.hasMenuWidget),e82.headerImg!==void 0&&(n.headerImg=e82.headerImg),(r=e82.headerSize)!=null&&r.length&&(n.headerSize=e82.headerSize),e82.headerTitle!==void 0&&(n.headerTitle=e82.headerTitle),e82.hideAds!==void 0&&(n.hideAds=e82.hideAds),e82.iconColor!==void 0&&(n.iconColor=e82.iconColor),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),(a=e82.iconSize)!=null&&a.length&&(n.iconSize=e82.iconSize),e82.id!==void 0&&(n.id=e82.id),e82.isChatPostFeatureEnabled!==void 0&&(n.isChatPostFeatureEnabled=e82.isChatPostFeatureEnabled),e82.isCrosspostableSubreddit!==void 0&&(n.isCrosspostableSubreddit=e82.isCrosspostableSubreddit),e82.isDefaultBanner!==void 0&&(n.isDefaultBanner=e82.isDefaultBanner),e82.isDefaultIcon!==void 0&&(n.isDefaultIcon=e82.isDefaultIcon),e82.isEnrolledInNewModmail!==void 0&&(n.isEnrolledInNewModmail=e82.isEnrolledInNewModmail),e82.keyColor!==void 0&&(n.keyColor=e82.keyColor),e82.lang!==void 0&&(n.lang=e82.lang),e82.linkFlairEnabled!==void 0&&(n.linkFlairEnabled=e82.linkFlairEnabled),e82.linkFlairPosition!==void 0&&(n.linkFlairPosition=e82.linkFlairPosition),e82.mobileBannerImage!==void 0&&(n.mobileBannerImage=e82.mobileBannerImage),e82.name!==void 0&&(n.name=e82.name),e82.notificationLevel!==void 0&&(n.notificationLevel=e82.notificationLevel),e82.originalContentTagEnabled!==void 0&&(n.originalContentTagEnabled=e82.originalContentTagEnabled),e82.over18!==void 0&&(n.over18=e82.over18),e82.predictionLeaderboardEntryType!==void 0&&(n.predictionLeaderboardEntryType=e82.predictionLeaderboardEntryType),(u=e82.previousNames)!=null&&u.length&&(n.previousNames=e82.previousNames),e82.primaryColor!==void 0&&(n.primaryColor=e82.primaryColor),e82.publicDescription!==void 0&&(n.publicDescription=e82.publicDescription),e82.publicDescriptionHtml!==void 0&&(n.publicDescriptionHtml=e82.publicDescriptionHtml),e82.publicTraffic!==void 0&&(n.publicTraffic=e82.publicTraffic),e82.quarantine!==void 0&&(n.quarantine=e82.quarantine),e82.restrictCommenting!==void 0&&(n.restrictCommenting=e82.restrictCommenting),e82.restrictPosting!==void 0&&(n.restrictPosting=e82.restrictPosting),e82.shouldArchivePosts!==void 0&&(n.shouldArchivePosts=e82.shouldArchivePosts),e82.shouldShowMediaInCommentsSetting!==void 0&&(n.shouldShowMediaInCommentsSetting=e82.shouldShowMediaInCommentsSetting),e82.showMedia!==void 0&&(n.showMedia=e82.showMedia),e82.showMediaPreview!==void 0&&(n.showMediaPreview=e82.showMediaPreview),e82.spoilersEnabled!==void 0&&(n.spoilersEnabled=e82.spoilersEnabled),e82.submissionType!==void 0&&(n.submissionType=e82.submissionType),e82.submitLinkLabel!==void 0&&(n.submitLinkLabel=e82.submitLinkLabel),e82.submitText!==void 0&&(n.submitText=e82.submitText),e82.submitTextHtml!==void 0&&(n.submitTextHtml=e82.submitTextHtml),e82.submitTextLabel!==void 0&&(n.submitTextLabel=e82.submitTextLabel),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.subscribers!==void 0&&(n.subscribers=e82.subscribers),e82.suggestedCommentSort!==void 0&&(n.suggestedCommentSort=e82.suggestedCommentSort),e82.title!==void 0&&(n.title=e82.title),e82.url!==void 0&&(n.url=e82.url),e82.userCanFlairInSr!==void 0&&(n.userCanFlairInSr=e82.userCanFlairInSr),e82.userFlairBackgroundColor!==void 0&&(n.userFlairBackgroundColor=e82.userFlairBackgroundColor),e82.userFlairCssClass!==void 0&&(n.userFlairCssClass=e82.userFlairCssClass),e82.userFlairEnabledInSr!==void 0&&(n.userFlairEnabledInSr=e82.userFlairEnabledInSr),e82.userFlairPosition!==void 0&&(n.userFlairPosition=e82.userFlairPosition),(l=e82.userFlairRichtext)!=null&&l.length&&(n.userFlairRichtext=e82.userFlairRichtext.map(s=>UserFlairRichtext.toJSON(s))),e82.userFlairTemplateId!==void 0&&(n.userFlairTemplateId=e82.userFlairTemplateId),e82.userFlairText!==void 0&&(n.userFlairText=e82.userFlairText),e82.userFlairTextColor!==void 0&&(n.userFlairTextColor=e82.userFlairTextColor),e82.userFlairType!==void 0&&(n.userFlairType=e82.userFlairType),e82.userHasFavorited!==void 0&&(n.userHasFavorited=e82.userHasFavorited),e82.userIsBanned!==void 0&&(n.userIsBanned=e82.userIsBanned),e82.userIsContributor!==void 0&&(n.userIsContributor=e82.userIsContributor),e82.userIsModerator!==void 0&&(n.userIsModerator=e82.userIsModerator),e82.userIsSubscriber!==void 0&&(n.userIsSubscriber=e82.userIsSubscriber),e82.userSrFlairEnabled!==void 0&&(n.userSrFlairEnabled=e82.userSrFlairEnabled),e82.userSrThemeEnabled!==void 0&&(n.userSrThemeEnabled=e82.userSrThemeEnabled),e82.videostreamLinksCount!==void 0&&(n.videostreamLinksCount=e82.videostreamLinksCount),e82.whitelistStatus!==void 0&&(n.whitelistStatus=e82.whitelistStatus),e82.wikiEnabled!==void 0&&(n.wikiEnabled=e82.wikiEnabled),e82.wls!==void 0&&(n.wls=e82.wls),e82.markedSpam!==void 0&&(n.markedSpam=e82.markedSpam),e82.postRequirements!==void 0&&(n.postRequirements=Subreddit_PostRequirements.toJSON(e82.postRequirements)),e82.userIsMuted!==!1&&(n.userIsMuted=e82.userIsMuted),n},create(e82){return Subreddit.fromPartial(e82??{})},fromPartial(e82){var t,o,d,r,a,u,l;let n=createBaseSubreddit();return n.acceptFollowers=e82.acceptFollowers??void 0,n.accountsActiveIsFuzzed=e82.accountsActiveIsFuzzed??void 0,n.accountsActive=e82.accountsActive??void 0,n.activeUserCount=e82.activeUserCount??void 0,n.advertiserCategory=e82.advertiserCategory??void 0,n.allOriginalContent=e82.allOriginalContent??void 0,n.allowChatPostCreation=e82.allowChatPostCreation??void 0,n.allowDiscovery=e82.allowDiscovery??void 0,n.allowGalleries=e82.allowGalleries??void 0,n.allowImages=e82.allowImages??void 0,n.allowPolls=e82.allowPolls??void 0,n.allowPredictionContributors=e82.allowPredictionContributors??void 0,n.allowPredictionsTournament=e82.allowPredictionsTournament??void 0,n.allowPredictions=e82.allowPredictions??void 0,n.allowTalks=e82.allowTalks??void 0,n.allowVideogifs=e82.allowVideogifs??void 0,n.allowVideos=e82.allowVideos??void 0,n.allowedMediaInComments=((t=e82.allowedMediaInComments)==null?void 0:t.map(s=>s))||[],n.bannerBackgroundColor=e82.bannerBackgroundColor??void 0,n.bannerBackgroundImage=e82.bannerBackgroundImage??void 0,n.bannerImg=e82.bannerImg??void 0,n.bannerSize=((o=e82.bannerSize)==null?void 0:o.map(s=>s))||[],n.canAssignLinkFlair=e82.canAssignLinkFlair??void 0,n.canAssignUserFlair=e82.canAssignUserFlair??void 0,n.coins=e82.coins??void 0,n.collapseDeletedComments=e82.collapseDeletedComments??void 0,n.commentContributionSettings=e82.commentContributionSettings!==void 0&&e82.commentContributionSettings!==null?CommentContributionSettings.fromPartial(e82.commentContributionSettings):void 0,n.commentScoreHideMins=e82.commentScoreHideMins??void 0,n.communityIcon=e82.communityIcon??void 0,n.communityReviewed=e82.communityReviewed??void 0,n.contentCategory=e82.contentCategory??void 0,n.createdUtc=e82.createdUtc??void 0,n.created=e82.created??void 0,n.defaultSet=e82.defaultSet??void 0,n.description=e82.description??void 0,n.descriptionHtml=e82.descriptionHtml??void 0,n.disableContributorRequests=e82.disableContributorRequests??void 0,n.displayName=e82.displayName??void 0,n.displayNamePrefixed=e82.displayNamePrefixed??void 0,n.emojisCustomSize=((d=e82.emojisCustomSize)==null?void 0:d.map(s=>s))||[],n.emojisEnabled=e82.emojisEnabled??void 0,n.freeFormReports=e82.freeFormReports??void 0,n.hasMenuWidget=e82.hasMenuWidget??void 0,n.headerImg=e82.headerImg??void 0,n.headerSize=((r=e82.headerSize)==null?void 0:r.map(s=>s))||[],n.headerTitle=e82.headerTitle??void 0,n.hideAds=e82.hideAds??void 0,n.iconColor=e82.iconColor??void 0,n.iconImg=e82.iconImg??void 0,n.iconSize=((a=e82.iconSize)==null?void 0:a.map(s=>s))||[],n.id=e82.id??void 0,n.isChatPostFeatureEnabled=e82.isChatPostFeatureEnabled??void 0,n.isCrosspostableSubreddit=e82.isCrosspostableSubreddit??void 0,n.isDefaultBanner=e82.isDefaultBanner??void 0,n.isDefaultIcon=e82.isDefaultIcon??void 0,n.isEnrolledInNewModmail=e82.isEnrolledInNewModmail??void 0,n.keyColor=e82.keyColor??void 0,n.lang=e82.lang??void 0,n.linkFlairEnabled=e82.linkFlairEnabled??void 0,n.linkFlairPosition=e82.linkFlairPosition??void 0,n.mobileBannerImage=e82.mobileBannerImage??void 0,n.name=e82.name??void 0,n.notificationLevel=e82.notificationLevel??void 0,n.originalContentTagEnabled=e82.originalContentTagEnabled??void 0,n.over18=e82.over18??void 0,n.predictionLeaderboardEntryType=e82.predictionLeaderboardEntryType??void 0,n.previousNames=((u=e82.previousNames)==null?void 0:u.map(s=>s))||[],n.primaryColor=e82.primaryColor??void 0,n.publicDescription=e82.publicDescription??void 0,n.publicDescriptionHtml=e82.publicDescriptionHtml??void 0,n.publicTraffic=e82.publicTraffic??void 0,n.quarantine=e82.quarantine??void 0,n.restrictCommenting=e82.restrictCommenting??void 0,n.restrictPosting=e82.restrictPosting??void 0,n.shouldArchivePosts=e82.shouldArchivePosts??void 0,n.shouldShowMediaInCommentsSetting=e82.shouldShowMediaInCommentsSetting??void 0,n.showMedia=e82.showMedia??void 0,n.showMediaPreview=e82.showMediaPreview??void 0,n.spoilersEnabled=e82.spoilersEnabled??void 0,n.submissionType=e82.submissionType??void 0,n.submitLinkLabel=e82.submitLinkLabel??void 0,n.submitText=e82.submitText??void 0,n.submitTextHtml=e82.submitTextHtml??void 0,n.submitTextLabel=e82.submitTextLabel??void 0,n.subredditType=e82.subredditType??void 0,n.subscribers=e82.subscribers??void 0,n.suggestedCommentSort=e82.suggestedCommentSort??void 0,n.title=e82.title??void 0,n.url=e82.url??void 0,n.userCanFlairInSr=e82.userCanFlairInSr??void 0,n.userFlairBackgroundColor=e82.userFlairBackgroundColor??void 0,n.userFlairCssClass=e82.userFlairCssClass??void 0,n.userFlairEnabledInSr=e82.userFlairEnabledInSr??void 0,n.userFlairPosition=e82.userFlairPosition??void 0,n.userFlairRichtext=((l=e82.userFlairRichtext)==null?void 0:l.map(s=>UserFlairRichtext.fromPartial(s)))||[],n.userFlairTemplateId=e82.userFlairTemplateId??void 0,n.userFlairText=e82.userFlairText??void 0,n.userFlairTextColor=e82.userFlairTextColor??void 0,n.userFlairType=e82.userFlairType??void 0,n.userHasFavorited=e82.userHasFavorited??void 0,n.userIsBanned=e82.userIsBanned??void 0,n.userIsContributor=e82.userIsContributor??void 0,n.userIsModerator=e82.userIsModerator??void 0,n.userIsSubscriber=e82.userIsSubscriber??void 0,n.userSrFlairEnabled=e82.userSrFlairEnabled??void 0,n.userSrThemeEnabled=e82.userSrThemeEnabled??void 0,n.videostreamLinksCount=e82.videostreamLinksCount??void 0,n.whitelistStatus=e82.whitelistStatus??void 0,n.wikiEnabled=e82.wikiEnabled??void 0,n.wls=e82.wls??void 0,n.markedSpam=e82.markedSpam??void 0,n.postRequirements=e82.postRequirements!==void 0&&e82.postRequirements!==null?Subreddit_PostRequirements.fromPartial(e82.postRequirements):void 0,n.userIsMuted=e82.userIsMuted??!1,n}};messageTypeRegistry.set(Subreddit.$type,Subreddit);function createBaseSubreddit_PostRequirements(){return{bodyRestrictionPolicy:void 0}}var Subreddit_PostRequirements={$type:"devvit.reddit.Subreddit.PostRequirements",encode(e82,n=_m0.Writer.create()){return e82.bodyRestrictionPolicy!==void 0&&StringValue.encode({value:e82.bodyRestrictionPolicy},n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubreddit_PostRequirements();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.bodyRestrictionPolicy=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{bodyRestrictionPolicy:isSet$O(e82.bodyRestrictionPolicy)?String(e82.bodyRestrictionPolicy):void 0}},toJSON(e82){let n={};return e82.bodyRestrictionPolicy!==void 0&&(n.bodyRestrictionPolicy=e82.bodyRestrictionPolicy),n},create(e82){return Subreddit_PostRequirements.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubreddit_PostRequirements();return n.bodyRestrictionPolicy=e82.bodyRestrictionPolicy??void 0,n}};messageTypeRegistry.set(Subreddit_PostRequirements.$type,Subreddit_PostRequirements);function isSet$O(e82){return e82!=null}function createBaseUser(){return{acceptChats:void 0,acceptFollowers:void 0,acceptPms:void 0,awardeeKarma:void 0,awarderKarma:void 0,canCreateSubreddit:void 0,canEditName:void 0,coins:void 0,commentKarma:void 0,created:void 0,createdUtc:void 0,features:void 0,forcePasswordReset:void 0,goldCreddits:void 0,goldExpiration:void 0,hasAndroidSubscription:void 0,hasExternalAccount:void 0,hasGoldSubscription:void 0,hasIosSubscription:void 0,hasMail:void 0,hasModMail:void 0,hasPaypalSubscription:void 0,hasStripeSubscription:void 0,hasSubscribed:void 0,hasSubscribedToPremium:void 0,hasVerifiedEmail:void 0,hasVisitedNewProfile:void 0,hideFromRobots:void 0,iconImg:void 0,id:void 0,inBeta:void 0,inChat:void 0,inRedesignBeta:void 0,inboxCount:void 0,isBlocked:void 0,isEmployee:void 0,isFriend:void 0,isGold:void 0,isMod:void 0,isSponsor:void 0,isSuspended:void 0,linkKarma:void 0,modhash:void 0,name:void 0,newModmailExists:void 0,numFriends:void 0,over18:void 0,passwordSet:void 0,prefAutoplay:void 0,prefClickgadget:void 0,prefGeopopular:void 0,prefNightmode:void 0,prefNoProfanity:void 0,prefShowPresence:void 0,prefShowSnoovatar:void 0,prefShowTrending:void 0,prefShowTwitter:void 0,prefTopKarmaSubreddits:void 0,prefVideoAutoplay:void 0,snoovatarImg:void 0,snoovatarSize:[],subreddit:void 0,suspensionExpirationUtc:void 0,totalKarma:void 0,verified:void 0,hasPhoneNumber:void 0,subredditsModerated:void 0,hasMetaSubscription:void 0,metaSubscriptionAge:void 0,metaPointsBalance:void 0,metaLockedPointsBalance:void 0,commentSubredditKarma:void 0,postSubredditKarma:void 0,markedSpam:void 0,isSubredditProxyAccount:void 0}}var User={$type:"devvit.reddit.User",encode(e82,n=_m0.Writer.create()){e82.acceptChats!==void 0&&BoolValue.encode({value:e82.acceptChats},n.uint32(10).fork()).ldelim(),e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(18).fork()).ldelim(),e82.acceptPms!==void 0&&BoolValue.encode({value:e82.acceptPms},n.uint32(26).fork()).ldelim(),e82.awardeeKarma!==void 0&&Int32Value.encode({value:e82.awardeeKarma},n.uint32(34).fork()).ldelim(),e82.awarderKarma!==void 0&&Int32Value.encode({value:e82.awarderKarma},n.uint32(42).fork()).ldelim(),e82.canCreateSubreddit!==void 0&&BoolValue.encode({value:e82.canCreateSubreddit},n.uint32(50).fork()).ldelim(),e82.canEditName!==void 0&&BoolValue.encode({value:e82.canEditName},n.uint32(58).fork()).ldelim(),e82.coins!==void 0&&Int32Value.encode({value:e82.coins},n.uint32(66).fork()).ldelim(),e82.commentKarma!==void 0&&Int32Value.encode({value:e82.commentKarma},n.uint32(74).fork()).ldelim(),e82.created!==void 0&&Int32Value.encode({value:e82.created},n.uint32(82).fork()).ldelim(),e82.createdUtc!==void 0&&Int32Value.encode({value:e82.createdUtc},n.uint32(90).fork()).ldelim(),e82.features!==void 0&&UserFeatures.encode(e82.features,n.uint32(98).fork()).ldelim(),e82.forcePasswordReset!==void 0&&BoolValue.encode({value:e82.forcePasswordReset},n.uint32(106).fork()).ldelim(),e82.goldCreddits!==void 0&&Int32Value.encode({value:e82.goldCreddits},n.uint32(114).fork()).ldelim(),e82.goldExpiration!==void 0&&StringValue.encode({value:e82.goldExpiration},n.uint32(122).fork()).ldelim(),e82.hasAndroidSubscription!==void 0&&BoolValue.encode({value:e82.hasAndroidSubscription},n.uint32(130).fork()).ldelim(),e82.hasExternalAccount!==void 0&&BoolValue.encode({value:e82.hasExternalAccount},n.uint32(138).fork()).ldelim(),e82.hasGoldSubscription!==void 0&&BoolValue.encode({value:e82.hasGoldSubscription},n.uint32(146).fork()).ldelim(),e82.hasIosSubscription!==void 0&&BoolValue.encode({value:e82.hasIosSubscription},n.uint32(154).fork()).ldelim(),e82.hasMail!==void 0&&BoolValue.encode({value:e82.hasMail},n.uint32(162).fork()).ldelim(),e82.hasModMail!==void 0&&BoolValue.encode({value:e82.hasModMail},n.uint32(170).fork()).ldelim(),e82.hasPaypalSubscription!==void 0&&BoolValue.encode({value:e82.hasPaypalSubscription},n.uint32(178).fork()).ldelim(),e82.hasStripeSubscription!==void 0&&BoolValue.encode({value:e82.hasStripeSubscription},n.uint32(186).fork()).ldelim(),e82.hasSubscribed!==void 0&&BoolValue.encode({value:e82.hasSubscribed},n.uint32(194).fork()).ldelim(),e82.hasSubscribedToPremium!==void 0&&BoolValue.encode({value:e82.hasSubscribedToPremium},n.uint32(202).fork()).ldelim(),e82.hasVerifiedEmail!==void 0&&BoolValue.encode({value:e82.hasVerifiedEmail},n.uint32(210).fork()).ldelim(),e82.hasVisitedNewProfile!==void 0&&BoolValue.encode({value:e82.hasVisitedNewProfile},n.uint32(218).fork()).ldelim(),e82.hideFromRobots!==void 0&&BoolValue.encode({value:e82.hideFromRobots},n.uint32(226).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(234).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(242).fork()).ldelim(),e82.inBeta!==void 0&&BoolValue.encode({value:e82.inBeta},n.uint32(250).fork()).ldelim(),e82.inChat!==void 0&&BoolValue.encode({value:e82.inChat},n.uint32(258).fork()).ldelim(),e82.inRedesignBeta!==void 0&&BoolValue.encode({value:e82.inRedesignBeta},n.uint32(266).fork()).ldelim(),e82.inboxCount!==void 0&&Int32Value.encode({value:e82.inboxCount},n.uint32(274).fork()).ldelim(),e82.isBlocked!==void 0&&BoolValue.encode({value:e82.isBlocked},n.uint32(282).fork()).ldelim(),e82.isEmployee!==void 0&&BoolValue.encode({value:e82.isEmployee},n.uint32(290).fork()).ldelim(),e82.isFriend!==void 0&&BoolValue.encode({value:e82.isFriend},n.uint32(298).fork()).ldelim(),e82.isGold!==void 0&&BoolValue.encode({value:e82.isGold},n.uint32(306).fork()).ldelim(),e82.isMod!==void 0&&BoolValue.encode({value:e82.isMod},n.uint32(314).fork()).ldelim(),e82.isSponsor!==void 0&&BoolValue.encode({value:e82.isSponsor},n.uint32(322).fork()).ldelim(),e82.isSuspended!==void 0&&BoolValue.encode({value:e82.isSuspended},n.uint32(330).fork()).ldelim(),e82.linkKarma!==void 0&&Int32Value.encode({value:e82.linkKarma},n.uint32(338).fork()).ldelim(),e82.modhash!==void 0&&StringValue.encode({value:e82.modhash},n.uint32(346).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(354).fork()).ldelim(),e82.newModmailExists!==void 0&&BoolValue.encode({value:e82.newModmailExists},n.uint32(362).fork()).ldelim(),e82.numFriends!==void 0&&Int32Value.encode({value:e82.numFriends},n.uint32(370).fork()).ldelim(),e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(378).fork()).ldelim(),e82.passwordSet!==void 0&&BoolValue.encode({value:e82.passwordSet},n.uint32(386).fork()).ldelim(),e82.prefAutoplay!==void 0&&BoolValue.encode({value:e82.prefAutoplay},n.uint32(394).fork()).ldelim(),e82.prefClickgadget!==void 0&&Int32Value.encode({value:e82.prefClickgadget},n.uint32(402).fork()).ldelim(),e82.prefGeopopular!==void 0&&StringValue.encode({value:e82.prefGeopopular},n.uint32(410).fork()).ldelim(),e82.prefNightmode!==void 0&&BoolValue.encode({value:e82.prefNightmode},n.uint32(418).fork()).ldelim(),e82.prefNoProfanity!==void 0&&BoolValue.encode({value:e82.prefNoProfanity},n.uint32(426).fork()).ldelim(),e82.prefShowPresence!==void 0&&BoolValue.encode({value:e82.prefShowPresence},n.uint32(434).fork()).ldelim(),e82.prefShowSnoovatar!==void 0&&BoolValue.encode({value:e82.prefShowSnoovatar},n.uint32(442).fork()).ldelim(),e82.prefShowTrending!==void 0&&BoolValue.encode({value:e82.prefShowTrending},n.uint32(450).fork()).ldelim(),e82.prefShowTwitter!==void 0&&BoolValue.encode({value:e82.prefShowTwitter},n.uint32(458).fork()).ldelim(),e82.prefTopKarmaSubreddits!==void 0&&BoolValue.encode({value:e82.prefTopKarmaSubreddits},n.uint32(466).fork()).ldelim(),e82.prefVideoAutoplay!==void 0&&BoolValue.encode({value:e82.prefVideoAutoplay},n.uint32(474).fork()).ldelim(),e82.snoovatarImg!==void 0&&StringValue.encode({value:e82.snoovatarImg},n.uint32(482).fork()).ldelim();for(let t of e82.snoovatarSize)Int32Value.encode({value:t},n.uint32(490).fork()).ldelim();return e82.subreddit!==void 0&&Subreddit.encode(e82.subreddit,n.uint32(498).fork()).ldelim(),e82.suspensionExpirationUtc!==void 0&&StringValue.encode({value:e82.suspensionExpirationUtc},n.uint32(506).fork()).ldelim(),e82.totalKarma!==void 0&&Int32Value.encode({value:e82.totalKarma},n.uint32(514).fork()).ldelim(),e82.verified!==void 0&&BoolValue.encode({value:e82.verified},n.uint32(522).fork()).ldelim(),e82.hasPhoneNumber!==void 0&&BoolValue.encode({value:e82.hasPhoneNumber},n.uint32(530).fork()).ldelim(),e82.subredditsModerated!==void 0&&Int32Value.encode({value:e82.subredditsModerated},n.uint32(802).fork()).ldelim(),e82.hasMetaSubscription!==void 0&&BoolValue.encode({value:e82.hasMetaSubscription},n.uint32(810).fork()).ldelim(),e82.metaSubscriptionAge!==void 0&&Int32Value.encode({value:e82.metaSubscriptionAge},n.uint32(818).fork()).ldelim(),e82.metaPointsBalance!==void 0&&StringValue.encode({value:e82.metaPointsBalance},n.uint32(826).fork()).ldelim(),e82.metaLockedPointsBalance!==void 0&&StringValue.encode({value:e82.metaLockedPointsBalance},n.uint32(834).fork()).ldelim(),e82.commentSubredditKarma!==void 0&&Int32Value.encode({value:e82.commentSubredditKarma},n.uint32(842).fork()).ldelim(),e82.postSubredditKarma!==void 0&&Int32Value.encode({value:e82.postSubredditKarma},n.uint32(850).fork()).ldelim(),e82.markedSpam!==void 0&&BoolValue.encode({value:e82.markedSpam},n.uint32(858).fork()).ldelim(),e82.isSubredditProxyAccount!==void 0&&BoolValue.encode({value:e82.isSubredditProxyAccount},n.uint32(866).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUser();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.acceptChats=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.acceptPms=BoolValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.awardeeKarma=Int32Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.awarderKarma=Int32Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.canCreateSubreddit=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.canEditName=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.coins=Int32Value.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.commentKarma=Int32Value.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.created=Int32Value.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.createdUtc=Int32Value.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.features=UserFeatures.decode(t,t.uint32());continue;case 13:if(r!==106)break;d.forcePasswordReset=BoolValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.goldCreddits=Int32Value.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.goldExpiration=StringValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.hasAndroidSubscription=BoolValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.hasExternalAccount=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.hasGoldSubscription=BoolValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.hasIosSubscription=BoolValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.hasMail=BoolValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.hasModMail=BoolValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.hasPaypalSubscription=BoolValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.hasStripeSubscription=BoolValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.hasSubscribed=BoolValue.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.hasSubscribedToPremium=BoolValue.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.hasVerifiedEmail=BoolValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.hasVisitedNewProfile=BoolValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.hideFromRobots=BoolValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.inBeta=BoolValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.inChat=BoolValue.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.inRedesignBeta=BoolValue.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.inboxCount=Int32Value.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.isBlocked=BoolValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.isEmployee=BoolValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.isFriend=BoolValue.decode(t,t.uint32()).value;continue;case 38:if(r!==306)break;d.isGold=BoolValue.decode(t,t.uint32()).value;continue;case 39:if(r!==314)break;d.isMod=BoolValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.isSponsor=BoolValue.decode(t,t.uint32()).value;continue;case 41:if(r!==330)break;d.isSuspended=BoolValue.decode(t,t.uint32()).value;continue;case 42:if(r!==338)break;d.linkKarma=Int32Value.decode(t,t.uint32()).value;continue;case 43:if(r!==346)break;d.modhash=StringValue.decode(t,t.uint32()).value;continue;case 44:if(r!==354)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 45:if(r!==362)break;d.newModmailExists=BoolValue.decode(t,t.uint32()).value;continue;case 46:if(r!==370)break;d.numFriends=Int32Value.decode(t,t.uint32()).value;continue;case 47:if(r!==378)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 48:if(r!==386)break;d.passwordSet=BoolValue.decode(t,t.uint32()).value;continue;case 49:if(r!==394)break;d.prefAutoplay=BoolValue.decode(t,t.uint32()).value;continue;case 50:if(r!==402)break;d.prefClickgadget=Int32Value.decode(t,t.uint32()).value;continue;case 51:if(r!==410)break;d.prefGeopopular=StringValue.decode(t,t.uint32()).value;continue;case 52:if(r!==418)break;d.prefNightmode=BoolValue.decode(t,t.uint32()).value;continue;case 53:if(r!==426)break;d.prefNoProfanity=BoolValue.decode(t,t.uint32()).value;continue;case 54:if(r!==434)break;d.prefShowPresence=BoolValue.decode(t,t.uint32()).value;continue;case 55:if(r!==442)break;d.prefShowSnoovatar=BoolValue.decode(t,t.uint32()).value;continue;case 56:if(r!==450)break;d.prefShowTrending=BoolValue.decode(t,t.uint32()).value;continue;case 57:if(r!==458)break;d.prefShowTwitter=BoolValue.decode(t,t.uint32()).value;continue;case 58:if(r!==466)break;d.prefTopKarmaSubreddits=BoolValue.decode(t,t.uint32()).value;continue;case 59:if(r!==474)break;d.prefVideoAutoplay=BoolValue.decode(t,t.uint32()).value;continue;case 60:if(r!==482)break;d.snoovatarImg=StringValue.decode(t,t.uint32()).value;continue;case 61:if(r!==490)break;d.snoovatarSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 62:if(r!==498)break;d.subreddit=Subreddit.decode(t,t.uint32());continue;case 63:if(r!==506)break;d.suspensionExpirationUtc=StringValue.decode(t,t.uint32()).value;continue;case 64:if(r!==514)break;d.totalKarma=Int32Value.decode(t,t.uint32()).value;continue;case 65:if(r!==522)break;d.verified=BoolValue.decode(t,t.uint32()).value;continue;case 66:if(r!==530)break;d.hasPhoneNumber=BoolValue.decode(t,t.uint32()).value;continue;case 100:if(r!==802)break;d.subredditsModerated=Int32Value.decode(t,t.uint32()).value;continue;case 101:if(r!==810)break;d.hasMetaSubscription=BoolValue.decode(t,t.uint32()).value;continue;case 102:if(r!==818)break;d.metaSubscriptionAge=Int32Value.decode(t,t.uint32()).value;continue;case 103:if(r!==826)break;d.metaPointsBalance=StringValue.decode(t,t.uint32()).value;continue;case 104:if(r!==834)break;d.metaLockedPointsBalance=StringValue.decode(t,t.uint32()).value;continue;case 105:if(r!==842)break;d.commentSubredditKarma=Int32Value.decode(t,t.uint32()).value;continue;case 106:if(r!==850)break;d.postSubredditKarma=Int32Value.decode(t,t.uint32()).value;continue;case 107:if(r!==858)break;d.markedSpam=BoolValue.decode(t,t.uint32()).value;continue;case 108:if(r!==866)break;d.isSubredditProxyAccount=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{acceptChats:isSet$N(e82.acceptChats)?!!e82.acceptChats:void 0,acceptFollowers:isSet$N(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,acceptPms:isSet$N(e82.acceptPms)?!!e82.acceptPms:void 0,awardeeKarma:isSet$N(e82.awardeeKarma)?Number(e82.awardeeKarma):void 0,awarderKarma:isSet$N(e82.awarderKarma)?Number(e82.awarderKarma):void 0,canCreateSubreddit:isSet$N(e82.canCreateSubreddit)?!!e82.canCreateSubreddit:void 0,canEditName:isSet$N(e82.canEditName)?!!e82.canEditName:void 0,coins:isSet$N(e82.coins)?Number(e82.coins):void 0,commentKarma:isSet$N(e82.commentKarma)?Number(e82.commentKarma):void 0,created:isSet$N(e82.created)?Number(e82.created):void 0,createdUtc:isSet$N(e82.createdUtc)?Number(e82.createdUtc):void 0,features:isSet$N(e82.features)?UserFeatures.fromJSON(e82.features):void 0,forcePasswordReset:isSet$N(e82.forcePasswordReset)?!!e82.forcePasswordReset:void 0,goldCreddits:isSet$N(e82.goldCreddits)?Number(e82.goldCreddits):void 0,goldExpiration:isSet$N(e82.goldExpiration)?String(e82.goldExpiration):void 0,hasAndroidSubscription:isSet$N(e82.hasAndroidSubscription)?!!e82.hasAndroidSubscription:void 0,hasExternalAccount:isSet$N(e82.hasExternalAccount)?!!e82.hasExternalAccount:void 0,hasGoldSubscription:isSet$N(e82.hasGoldSubscription)?!!e82.hasGoldSubscription:void 0,hasIosSubscription:isSet$N(e82.hasIosSubscription)?!!e82.hasIosSubscription:void 0,hasMail:isSet$N(e82.hasMail)?!!e82.hasMail:void 0,hasModMail:isSet$N(e82.hasModMail)?!!e82.hasModMail:void 0,hasPaypalSubscription:isSet$N(e82.hasPaypalSubscription)?!!e82.hasPaypalSubscription:void 0,hasStripeSubscription:isSet$N(e82.hasStripeSubscription)?!!e82.hasStripeSubscription:void 0,hasSubscribed:isSet$N(e82.hasSubscribed)?!!e82.hasSubscribed:void 0,hasSubscribedToPremium:isSet$N(e82.hasSubscribedToPremium)?!!e82.hasSubscribedToPremium:void 0,hasVerifiedEmail:isSet$N(e82.hasVerifiedEmail)?!!e82.hasVerifiedEmail:void 0,hasVisitedNewProfile:isSet$N(e82.hasVisitedNewProfile)?!!e82.hasVisitedNewProfile:void 0,hideFromRobots:isSet$N(e82.hideFromRobots)?!!e82.hideFromRobots:void 0,iconImg:isSet$N(e82.iconImg)?String(e82.iconImg):void 0,id:isSet$N(e82.id)?String(e82.id):void 0,inBeta:isSet$N(e82.inBeta)?!!e82.inBeta:void 0,inChat:isSet$N(e82.inChat)?!!e82.inChat:void 0,inRedesignBeta:isSet$N(e82.inRedesignBeta)?!!e82.inRedesignBeta:void 0,inboxCount:isSet$N(e82.inboxCount)?Number(e82.inboxCount):void 0,isBlocked:isSet$N(e82.isBlocked)?!!e82.isBlocked:void 0,isEmployee:isSet$N(e82.isEmployee)?!!e82.isEmployee:void 0,isFriend:isSet$N(e82.isFriend)?!!e82.isFriend:void 0,isGold:isSet$N(e82.isGold)?!!e82.isGold:void 0,isMod:isSet$N(e82.isMod)?!!e82.isMod:void 0,isSponsor:isSet$N(e82.isSponsor)?!!e82.isSponsor:void 0,isSuspended:isSet$N(e82.isSuspended)?!!e82.isSuspended:void 0,linkKarma:isSet$N(e82.linkKarma)?Number(e82.linkKarma):void 0,modhash:isSet$N(e82.modhash)?String(e82.modhash):void 0,name:isSet$N(e82.name)?String(e82.name):void 0,newModmailExists:isSet$N(e82.newModmailExists)?!!e82.newModmailExists:void 0,numFriends:isSet$N(e82.numFriends)?Number(e82.numFriends):void 0,over18:isSet$N(e82.over18)?!!e82.over18:void 0,passwordSet:isSet$N(e82.passwordSet)?!!e82.passwordSet:void 0,prefAutoplay:isSet$N(e82.prefAutoplay)?!!e82.prefAutoplay:void 0,prefClickgadget:isSet$N(e82.prefClickgadget)?Number(e82.prefClickgadget):void 0,prefGeopopular:isSet$N(e82.prefGeopopular)?String(e82.prefGeopopular):void 0,prefNightmode:isSet$N(e82.prefNightmode)?!!e82.prefNightmode:void 0,prefNoProfanity:isSet$N(e82.prefNoProfanity)?!!e82.prefNoProfanity:void 0,prefShowPresence:isSet$N(e82.prefShowPresence)?!!e82.prefShowPresence:void 0,prefShowSnoovatar:isSet$N(e82.prefShowSnoovatar)?!!e82.prefShowSnoovatar:void 0,prefShowTrending:isSet$N(e82.prefShowTrending)?!!e82.prefShowTrending:void 0,prefShowTwitter:isSet$N(e82.prefShowTwitter)?!!e82.prefShowTwitter:void 0,prefTopKarmaSubreddits:isSet$N(e82.prefTopKarmaSubreddits)?!!e82.prefTopKarmaSubreddits:void 0,prefVideoAutoplay:isSet$N(e82.prefVideoAutoplay)?!!e82.prefVideoAutoplay:void 0,snoovatarImg:isSet$N(e82.snoovatarImg)?String(e82.snoovatarImg):void 0,snoovatarSize:globalThis.Array.isArray(e82?.snoovatarSize)?e82.snoovatarSize.map(n=>Number(n)):[],subreddit:isSet$N(e82.subreddit)?Subreddit.fromJSON(e82.subreddit):void 0,suspensionExpirationUtc:isSet$N(e82.suspensionExpirationUtc)?String(e82.suspensionExpirationUtc):void 0,totalKarma:isSet$N(e82.totalKarma)?Number(e82.totalKarma):void 0,verified:isSet$N(e82.verified)?!!e82.verified:void 0,hasPhoneNumber:isSet$N(e82.hasPhoneNumber)?!!e82.hasPhoneNumber:void 0,subredditsModerated:isSet$N(e82.subredditsModerated)?Number(e82.subredditsModerated):void 0,hasMetaSubscription:isSet$N(e82.hasMetaSubscription)?!!e82.hasMetaSubscription:void 0,metaSubscriptionAge:isSet$N(e82.metaSubscriptionAge)?Number(e82.metaSubscriptionAge):void 0,metaPointsBalance:isSet$N(e82.metaPointsBalance)?String(e82.metaPointsBalance):void 0,metaLockedPointsBalance:isSet$N(e82.metaLockedPointsBalance)?String(e82.metaLockedPointsBalance):void 0,commentSubredditKarma:isSet$N(e82.commentSubredditKarma)?Number(e82.commentSubredditKarma):void 0,postSubredditKarma:isSet$N(e82.postSubredditKarma)?Number(e82.postSubredditKarma):void 0,markedSpam:isSet$N(e82.markedSpam)?!!e82.markedSpam:void 0,isSubredditProxyAccount:isSet$N(e82.isSubredditProxyAccount)?!!e82.isSubredditProxyAccount:void 0}},toJSON(e82){var t;let n={};return e82.acceptChats!==void 0&&(n.acceptChats=e82.acceptChats),e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.acceptPms!==void 0&&(n.acceptPms=e82.acceptPms),e82.awardeeKarma!==void 0&&(n.awardeeKarma=e82.awardeeKarma),e82.awarderKarma!==void 0&&(n.awarderKarma=e82.awarderKarma),e82.canCreateSubreddit!==void 0&&(n.canCreateSubreddit=e82.canCreateSubreddit),e82.canEditName!==void 0&&(n.canEditName=e82.canEditName),e82.coins!==void 0&&(n.coins=e82.coins),e82.commentKarma!==void 0&&(n.commentKarma=e82.commentKarma),e82.created!==void 0&&(n.created=e82.created),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.features!==void 0&&(n.features=UserFeatures.toJSON(e82.features)),e82.forcePasswordReset!==void 0&&(n.forcePasswordReset=e82.forcePasswordReset),e82.goldCreddits!==void 0&&(n.goldCreddits=e82.goldCreddits),e82.goldExpiration!==void 0&&(n.goldExpiration=e82.goldExpiration),e82.hasAndroidSubscription!==void 0&&(n.hasAndroidSubscription=e82.hasAndroidSubscription),e82.hasExternalAccount!==void 0&&(n.hasExternalAccount=e82.hasExternalAccount),e82.hasGoldSubscription!==void 0&&(n.hasGoldSubscription=e82.hasGoldSubscription),e82.hasIosSubscription!==void 0&&(n.hasIosSubscription=e82.hasIosSubscription),e82.hasMail!==void 0&&(n.hasMail=e82.hasMail),e82.hasModMail!==void 0&&(n.hasModMail=e82.hasModMail),e82.hasPaypalSubscription!==void 0&&(n.hasPaypalSubscription=e82.hasPaypalSubscription),e82.hasStripeSubscription!==void 0&&(n.hasStripeSubscription=e82.hasStripeSubscription),e82.hasSubscribed!==void 0&&(n.hasSubscribed=e82.hasSubscribed),e82.hasSubscribedToPremium!==void 0&&(n.hasSubscribedToPremium=e82.hasSubscribedToPremium),e82.hasVerifiedEmail!==void 0&&(n.hasVerifiedEmail=e82.hasVerifiedEmail),e82.hasVisitedNewProfile!==void 0&&(n.hasVisitedNewProfile=e82.hasVisitedNewProfile),e82.hideFromRobots!==void 0&&(n.hideFromRobots=e82.hideFromRobots),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.id!==void 0&&(n.id=e82.id),e82.inBeta!==void 0&&(n.inBeta=e82.inBeta),e82.inChat!==void 0&&(n.inChat=e82.inChat),e82.inRedesignBeta!==void 0&&(n.inRedesignBeta=e82.inRedesignBeta),e82.inboxCount!==void 0&&(n.inboxCount=e82.inboxCount),e82.isBlocked!==void 0&&(n.isBlocked=e82.isBlocked),e82.isEmployee!==void 0&&(n.isEmployee=e82.isEmployee),e82.isFriend!==void 0&&(n.isFriend=e82.isFriend),e82.isGold!==void 0&&(n.isGold=e82.isGold),e82.isMod!==void 0&&(n.isMod=e82.isMod),e82.isSponsor!==void 0&&(n.isSponsor=e82.isSponsor),e82.isSuspended!==void 0&&(n.isSuspended=e82.isSuspended),e82.linkKarma!==void 0&&(n.linkKarma=e82.linkKarma),e82.modhash!==void 0&&(n.modhash=e82.modhash),e82.name!==void 0&&(n.name=e82.name),e82.newModmailExists!==void 0&&(n.newModmailExists=e82.newModmailExists),e82.numFriends!==void 0&&(n.numFriends=e82.numFriends),e82.over18!==void 0&&(n.over18=e82.over18),e82.passwordSet!==void 0&&(n.passwordSet=e82.passwordSet),e82.prefAutoplay!==void 0&&(n.prefAutoplay=e82.prefAutoplay),e82.prefClickgadget!==void 0&&(n.prefClickgadget=e82.prefClickgadget),e82.prefGeopopular!==void 0&&(n.prefGeopopular=e82.prefGeopopular),e82.prefNightmode!==void 0&&(n.prefNightmode=e82.prefNightmode),e82.prefNoProfanity!==void 0&&(n.prefNoProfanity=e82.prefNoProfanity),e82.prefShowPresence!==void 0&&(n.prefShowPresence=e82.prefShowPresence),e82.prefShowSnoovatar!==void 0&&(n.prefShowSnoovatar=e82.prefShowSnoovatar),e82.prefShowTrending!==void 0&&(n.prefShowTrending=e82.prefShowTrending),e82.prefShowTwitter!==void 0&&(n.prefShowTwitter=e82.prefShowTwitter),e82.prefTopKarmaSubreddits!==void 0&&(n.prefTopKarmaSubreddits=e82.prefTopKarmaSubreddits),e82.prefVideoAutoplay!==void 0&&(n.prefVideoAutoplay=e82.prefVideoAutoplay),e82.snoovatarImg!==void 0&&(n.snoovatarImg=e82.snoovatarImg),(t=e82.snoovatarSize)!=null&&t.length&&(n.snoovatarSize=e82.snoovatarSize),e82.subreddit!==void 0&&(n.subreddit=Subreddit.toJSON(e82.subreddit)),e82.suspensionExpirationUtc!==void 0&&(n.suspensionExpirationUtc=e82.suspensionExpirationUtc),e82.totalKarma!==void 0&&(n.totalKarma=e82.totalKarma),e82.verified!==void 0&&(n.verified=e82.verified),e82.hasPhoneNumber!==void 0&&(n.hasPhoneNumber=e82.hasPhoneNumber),e82.subredditsModerated!==void 0&&(n.subredditsModerated=e82.subredditsModerated),e82.hasMetaSubscription!==void 0&&(n.hasMetaSubscription=e82.hasMetaSubscription),e82.metaSubscriptionAge!==void 0&&(n.metaSubscriptionAge=e82.metaSubscriptionAge),e82.metaPointsBalance!==void 0&&(n.metaPointsBalance=e82.metaPointsBalance),e82.metaLockedPointsBalance!==void 0&&(n.metaLockedPointsBalance=e82.metaLockedPointsBalance),e82.commentSubredditKarma!==void 0&&(n.commentSubredditKarma=e82.commentSubredditKarma),e82.postSubredditKarma!==void 0&&(n.postSubredditKarma=e82.postSubredditKarma),e82.markedSpam!==void 0&&(n.markedSpam=e82.markedSpam),e82.isSubredditProxyAccount!==void 0&&(n.isSubredditProxyAccount=e82.isSubredditProxyAccount),n},create(e82){return User.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUser();return n.acceptChats=e82.acceptChats??void 0,n.acceptFollowers=e82.acceptFollowers??void 0,n.acceptPms=e82.acceptPms??void 0,n.awardeeKarma=e82.awardeeKarma??void 0,n.awarderKarma=e82.awarderKarma??void 0,n.canCreateSubreddit=e82.canCreateSubreddit??void 0,n.canEditName=e82.canEditName??void 0,n.coins=e82.coins??void 0,n.commentKarma=e82.commentKarma??void 0,n.created=e82.created??void 0,n.createdUtc=e82.createdUtc??void 0,n.features=e82.features!==void 0&&e82.features!==null?UserFeatures.fromPartial(e82.features):void 0,n.forcePasswordReset=e82.forcePasswordReset??void 0,n.goldCreddits=e82.goldCreddits??void 0,n.goldExpiration=e82.goldExpiration??void 0,n.hasAndroidSubscription=e82.hasAndroidSubscription??void 0,n.hasExternalAccount=e82.hasExternalAccount??void 0,n.hasGoldSubscription=e82.hasGoldSubscription??void 0,n.hasIosSubscription=e82.hasIosSubscription??void 0,n.hasMail=e82.hasMail??void 0,n.hasModMail=e82.hasModMail??void 0,n.hasPaypalSubscription=e82.hasPaypalSubscription??void 0,n.hasStripeSubscription=e82.hasStripeSubscription??void 0,n.hasSubscribed=e82.hasSubscribed??void 0,n.hasSubscribedToPremium=e82.hasSubscribedToPremium??void 0,n.hasVerifiedEmail=e82.hasVerifiedEmail??void 0,n.hasVisitedNewProfile=e82.hasVisitedNewProfile??void 0,n.hideFromRobots=e82.hideFromRobots??void 0,n.iconImg=e82.iconImg??void 0,n.id=e82.id??void 0,n.inBeta=e82.inBeta??void 0,n.inChat=e82.inChat??void 0,n.inRedesignBeta=e82.inRedesignBeta??void 0,n.inboxCount=e82.inboxCount??void 0,n.isBlocked=e82.isBlocked??void 0,n.isEmployee=e82.isEmployee??void 0,n.isFriend=e82.isFriend??void 0,n.isGold=e82.isGold??void 0,n.isMod=e82.isMod??void 0,n.isSponsor=e82.isSponsor??void 0,n.isSuspended=e82.isSuspended??void 0,n.linkKarma=e82.linkKarma??void 0,n.modhash=e82.modhash??void 0,n.name=e82.name??void 0,n.newModmailExists=e82.newModmailExists??void 0,n.numFriends=e82.numFriends??void 0,n.over18=e82.over18??void 0,n.passwordSet=e82.passwordSet??void 0,n.prefAutoplay=e82.prefAutoplay??void 0,n.prefClickgadget=e82.prefClickgadget??void 0,n.prefGeopopular=e82.prefGeopopular??void 0,n.prefNightmode=e82.prefNightmode??void 0,n.prefNoProfanity=e82.prefNoProfanity??void 0,n.prefShowPresence=e82.prefShowPresence??void 0,n.prefShowSnoovatar=e82.prefShowSnoovatar??void 0,n.prefShowTrending=e82.prefShowTrending??void 0,n.prefShowTwitter=e82.prefShowTwitter??void 0,n.prefTopKarmaSubreddits=e82.prefTopKarmaSubreddits??void 0,n.prefVideoAutoplay=e82.prefVideoAutoplay??void 0,n.snoovatarImg=e82.snoovatarImg??void 0,n.snoovatarSize=((t=e82.snoovatarSize)==null?void 0:t.map(o=>o))||[],n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?Subreddit.fromPartial(e82.subreddit):void 0,n.suspensionExpirationUtc=e82.suspensionExpirationUtc??void 0,n.totalKarma=e82.totalKarma??void 0,n.verified=e82.verified??void 0,n.hasPhoneNumber=e82.hasPhoneNumber??void 0,n.subredditsModerated=e82.subredditsModerated??void 0,n.hasMetaSubscription=e82.hasMetaSubscription??void 0,n.metaSubscriptionAge=e82.metaSubscriptionAge??void 0,n.metaPointsBalance=e82.metaPointsBalance??void 0,n.metaLockedPointsBalance=e82.metaLockedPointsBalance??void 0,n.commentSubredditKarma=e82.commentSubredditKarma??void 0,n.postSubredditKarma=e82.postSubredditKarma??void 0,n.markedSpam=e82.markedSpam??void 0,n.isSubredditProxyAccount=e82.isSubredditProxyAccount??void 0,n}};messageTypeRegistry.set(User.$type,User);function createBaseUserFeatures(){return{awardsOnStreams:void 0,canMakeMobileTestBuildPurchases:void 0,chatGroupRollout:void 0,chatSubreddit:void 0,chatUserSettings:void 0,chat:void 0,cookieConsentBanner:void 0,crosspostNotif:void 0,crowdControlForPost:void 0,customFeedImage:void 0,doNotTrack:void 0,expensiveCoinsPackage:void 0,isEmailPermissionRequired:void 0,liveComments:void 0,liveOrangereds:void 0,modAwards:void 0,modServiceMuteReads:void 0,modServiceMuteWrites:void 0,modlogCopyrightRemoval:void 0,mwebNsfwXpromo:void 0,mwebXpromoInterstitialCommentsAndroid:void 0,mwebXpromoInterstitialCommentsIos:void 0,mwebXpromoModalListingClickDailyDismissibleAndroid:void 0,mwebXpromoModalListingClickDailyDismissibleIos:void 0,mwebXpromoRevampV2:void 0,mwebXpromoRevampV3:void 0,noreferrerToNoopener:void 0,pollsMobile:void 0,premiumSubscriptionsTable:void 0,promotedTrendBlanks:void 0,resizedStylesImages:void 0,showAmpLink:void 0,showNpsSurvey:void 0,spezModal:void 0,usePrefAccountDeployment:void 0,userFlairMigrationTesting:void 0,webhookConfig:void 0}}var UserFeatures={$type:"devvit.reddit.UserFeatures",encode(e82,n=_m0.Writer.create()){return e82.awardsOnStreams!==void 0&&BoolValue.encode({value:e82.awardsOnStreams},n.uint32(10).fork()).ldelim(),e82.canMakeMobileTestBuildPurchases!==void 0&&BoolValue.encode({value:e82.canMakeMobileTestBuildPurchases},n.uint32(18).fork()).ldelim(),e82.chatGroupRollout!==void 0&&BoolValue.encode({value:e82.chatGroupRollout},n.uint32(26).fork()).ldelim(),e82.chatSubreddit!==void 0&&BoolValue.encode({value:e82.chatSubreddit},n.uint32(34).fork()).ldelim(),e82.chatUserSettings!==void 0&&BoolValue.encode({value:e82.chatUserSettings},n.uint32(42).fork()).ldelim(),e82.chat!==void 0&&BoolValue.encode({value:e82.chat},n.uint32(50).fork()).ldelim(),e82.cookieConsentBanner!==void 0&&BoolValue.encode({value:e82.cookieConsentBanner},n.uint32(58).fork()).ldelim(),e82.crosspostNotif!==void 0&&BoolValue.encode({value:e82.crosspostNotif},n.uint32(66).fork()).ldelim(),e82.crowdControlForPost!==void 0&&BoolValue.encode({value:e82.crowdControlForPost},n.uint32(74).fork()).ldelim(),e82.customFeedImage!==void 0&&BoolValue.encode({value:e82.customFeedImage},n.uint32(82).fork()).ldelim(),e82.doNotTrack!==void 0&&BoolValue.encode({value:e82.doNotTrack},n.uint32(90).fork()).ldelim(),e82.expensiveCoinsPackage!==void 0&&BoolValue.encode({value:e82.expensiveCoinsPackage},n.uint32(98).fork()).ldelim(),e82.isEmailPermissionRequired!==void 0&&BoolValue.encode({value:e82.isEmailPermissionRequired},n.uint32(106).fork()).ldelim(),e82.liveComments!==void 0&&BoolValue.encode({value:e82.liveComments},n.uint32(114).fork()).ldelim(),e82.liveOrangereds!==void 0&&BoolValue.encode({value:e82.liveOrangereds},n.uint32(122).fork()).ldelim(),e82.modAwards!==void 0&&BoolValue.encode({value:e82.modAwards},n.uint32(130).fork()).ldelim(),e82.modServiceMuteReads!==void 0&&BoolValue.encode({value:e82.modServiceMuteReads},n.uint32(138).fork()).ldelim(),e82.modServiceMuteWrites!==void 0&&BoolValue.encode({value:e82.modServiceMuteWrites},n.uint32(146).fork()).ldelim(),e82.modlogCopyrightRemoval!==void 0&&BoolValue.encode({value:e82.modlogCopyrightRemoval},n.uint32(154).fork()).ldelim(),e82.mwebNsfwXpromo!==void 0&&UserFeatures_Experiment.encode(e82.mwebNsfwXpromo,n.uint32(162).fork()).ldelim(),e82.mwebXpromoInterstitialCommentsAndroid!==void 0&&BoolValue.encode({value:e82.mwebXpromoInterstitialCommentsAndroid},n.uint32(170).fork()).ldelim(),e82.mwebXpromoInterstitialCommentsIos!==void 0&&BoolValue.encode({value:e82.mwebXpromoInterstitialCommentsIos},n.uint32(178).fork()).ldelim(),e82.mwebXpromoModalListingClickDailyDismissibleAndroid!==void 0&&BoolValue.encode({value:e82.mwebXpromoModalListingClickDailyDismissibleAndroid},n.uint32(186).fork()).ldelim(),e82.mwebXpromoModalListingClickDailyDismissibleIos!==void 0&&BoolValue.encode({value:e82.mwebXpromoModalListingClickDailyDismissibleIos},n.uint32(194).fork()).ldelim(),e82.mwebXpromoRevampV2!==void 0&&UserFeatures_Experiment.encode(e82.mwebXpromoRevampV2,n.uint32(202).fork()).ldelim(),e82.mwebXpromoRevampV3!==void 0&&UserFeatures_Experiment.encode(e82.mwebXpromoRevampV3,n.uint32(210).fork()).ldelim(),e82.noreferrerToNoopener!==void 0&&BoolValue.encode({value:e82.noreferrerToNoopener},n.uint32(218).fork()).ldelim(),e82.pollsMobile!==void 0&&BoolValue.encode({value:e82.pollsMobile},n.uint32(226).fork()).ldelim(),e82.premiumSubscriptionsTable!==void 0&&BoolValue.encode({value:e82.premiumSubscriptionsTable},n.uint32(234).fork()).ldelim(),e82.promotedTrendBlanks!==void 0&&BoolValue.encode({value:e82.promotedTrendBlanks},n.uint32(242).fork()).ldelim(),e82.resizedStylesImages!==void 0&&BoolValue.encode({value:e82.resizedStylesImages},n.uint32(250).fork()).ldelim(),e82.showAmpLink!==void 0&&BoolValue.encode({value:e82.showAmpLink},n.uint32(258).fork()).ldelim(),e82.showNpsSurvey!==void 0&&BoolValue.encode({value:e82.showNpsSurvey},n.uint32(266).fork()).ldelim(),e82.spezModal!==void 0&&BoolValue.encode({value:e82.spezModal},n.uint32(274).fork()).ldelim(),e82.usePrefAccountDeployment!==void 0&&BoolValue.encode({value:e82.usePrefAccountDeployment},n.uint32(282).fork()).ldelim(),e82.userFlairMigrationTesting!==void 0&&BoolValue.encode({value:e82.userFlairMigrationTesting},n.uint32(290).fork()).ldelim(),e82.webhookConfig!==void 0&&BoolValue.encode({value:e82.webhookConfig},n.uint32(298).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserFeatures();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.awardsOnStreams=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.canMakeMobileTestBuildPurchases=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.chatGroupRollout=BoolValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.chatSubreddit=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.chatUserSettings=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.chat=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.cookieConsentBanner=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.crosspostNotif=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.crowdControlForPost=BoolValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.customFeedImage=BoolValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.doNotTrack=BoolValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.expensiveCoinsPackage=BoolValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.isEmailPermissionRequired=BoolValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.liveComments=BoolValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.liveOrangereds=BoolValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.modAwards=BoolValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.modServiceMuteReads=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.modServiceMuteWrites=BoolValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.modlogCopyrightRemoval=BoolValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.mwebNsfwXpromo=UserFeatures_Experiment.decode(t,t.uint32());continue;case 21:if(r!==170)break;d.mwebXpromoInterstitialCommentsAndroid=BoolValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.mwebXpromoInterstitialCommentsIos=BoolValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.mwebXpromoModalListingClickDailyDismissibleAndroid=BoolValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.mwebXpromoModalListingClickDailyDismissibleIos=BoolValue.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.mwebXpromoRevampV2=UserFeatures_Experiment.decode(t,t.uint32());continue;case 26:if(r!==210)break;d.mwebXpromoRevampV3=UserFeatures_Experiment.decode(t,t.uint32());continue;case 27:if(r!==218)break;d.noreferrerToNoopener=BoolValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.pollsMobile=BoolValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.premiumSubscriptionsTable=BoolValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.promotedTrendBlanks=BoolValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.resizedStylesImages=BoolValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.showAmpLink=BoolValue.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.showNpsSurvey=BoolValue.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.spezModal=BoolValue.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.usePrefAccountDeployment=BoolValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.userFlairMigrationTesting=BoolValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.webhookConfig=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{awardsOnStreams:isSet$N(e82.awardsOnStreams)?!!e82.awardsOnStreams:void 0,canMakeMobileTestBuildPurchases:isSet$N(e82.canMakeMobileTestBuildPurchases)?!!e82.canMakeMobileTestBuildPurchases:void 0,chatGroupRollout:isSet$N(e82.chatGroupRollout)?!!e82.chatGroupRollout:void 0,chatSubreddit:isSet$N(e82.chatSubreddit)?!!e82.chatSubreddit:void 0,chatUserSettings:isSet$N(e82.chatUserSettings)?!!e82.chatUserSettings:void 0,chat:isSet$N(e82.chat)?!!e82.chat:void 0,cookieConsentBanner:isSet$N(e82.cookieConsentBanner)?!!e82.cookieConsentBanner:void 0,crosspostNotif:isSet$N(e82.crosspostNotif)?!!e82.crosspostNotif:void 0,crowdControlForPost:isSet$N(e82.crowdControlForPost)?!!e82.crowdControlForPost:void 0,customFeedImage:isSet$N(e82.customFeedImage)?!!e82.customFeedImage:void 0,doNotTrack:isSet$N(e82.doNotTrack)?!!e82.doNotTrack:void 0,expensiveCoinsPackage:isSet$N(e82.expensiveCoinsPackage)?!!e82.expensiveCoinsPackage:void 0,isEmailPermissionRequired:isSet$N(e82.isEmailPermissionRequired)?!!e82.isEmailPermissionRequired:void 0,liveComments:isSet$N(e82.liveComments)?!!e82.liveComments:void 0,liveOrangereds:isSet$N(e82.liveOrangereds)?!!e82.liveOrangereds:void 0,modAwards:isSet$N(e82.modAwards)?!!e82.modAwards:void 0,modServiceMuteReads:isSet$N(e82.modServiceMuteReads)?!!e82.modServiceMuteReads:void 0,modServiceMuteWrites:isSet$N(e82.modServiceMuteWrites)?!!e82.modServiceMuteWrites:void 0,modlogCopyrightRemoval:isSet$N(e82.modlogCopyrightRemoval)?!!e82.modlogCopyrightRemoval:void 0,mwebNsfwXpromo:isSet$N(e82.mwebNsfwXpromo)?UserFeatures_Experiment.fromJSON(e82.mwebNsfwXpromo):void 0,mwebXpromoInterstitialCommentsAndroid:isSet$N(e82.mwebXpromoInterstitialCommentsAndroid)?!!e82.mwebXpromoInterstitialCommentsAndroid:void 0,mwebXpromoInterstitialCommentsIos:isSet$N(e82.mwebXpromoInterstitialCommentsIos)?!!e82.mwebXpromoInterstitialCommentsIos:void 0,mwebXpromoModalListingClickDailyDismissibleAndroid:isSet$N(e82.mwebXpromoModalListingClickDailyDismissibleAndroid)?!!e82.mwebXpromoModalListingClickDailyDismissibleAndroid:void 0,mwebXpromoModalListingClickDailyDismissibleIos:isSet$N(e82.mwebXpromoModalListingClickDailyDismissibleIos)?!!e82.mwebXpromoModalListingClickDailyDismissibleIos:void 0,mwebXpromoRevampV2:isSet$N(e82.mwebXpromoRevampV2)?UserFeatures_Experiment.fromJSON(e82.mwebXpromoRevampV2):void 0,mwebXpromoRevampV3:isSet$N(e82.mwebXpromoRevampV3)?UserFeatures_Experiment.fromJSON(e82.mwebXpromoRevampV3):void 0,noreferrerToNoopener:isSet$N(e82.noreferrerToNoopener)?!!e82.noreferrerToNoopener:void 0,pollsMobile:isSet$N(e82.pollsMobile)?!!e82.pollsMobile:void 0,premiumSubscriptionsTable:isSet$N(e82.premiumSubscriptionsTable)?!!e82.premiumSubscriptionsTable:void 0,promotedTrendBlanks:isSet$N(e82.promotedTrendBlanks)?!!e82.promotedTrendBlanks:void 0,resizedStylesImages:isSet$N(e82.resizedStylesImages)?!!e82.resizedStylesImages:void 0,showAmpLink:isSet$N(e82.showAmpLink)?!!e82.showAmpLink:void 0,showNpsSurvey:isSet$N(e82.showNpsSurvey)?!!e82.showNpsSurvey:void 0,spezModal:isSet$N(e82.spezModal)?!!e82.spezModal:void 0,usePrefAccountDeployment:isSet$N(e82.usePrefAccountDeployment)?!!e82.usePrefAccountDeployment:void 0,userFlairMigrationTesting:isSet$N(e82.userFlairMigrationTesting)?!!e82.userFlairMigrationTesting:void 0,webhookConfig:isSet$N(e82.webhookConfig)?!!e82.webhookConfig:void 0}},toJSON(e82){let n={};return e82.awardsOnStreams!==void 0&&(n.awardsOnStreams=e82.awardsOnStreams),e82.canMakeMobileTestBuildPurchases!==void 0&&(n.canMakeMobileTestBuildPurchases=e82.canMakeMobileTestBuildPurchases),e82.chatGroupRollout!==void 0&&(n.chatGroupRollout=e82.chatGroupRollout),e82.chatSubreddit!==void 0&&(n.chatSubreddit=e82.chatSubreddit),e82.chatUserSettings!==void 0&&(n.chatUserSettings=e82.chatUserSettings),e82.chat!==void 0&&(n.chat=e82.chat),e82.cookieConsentBanner!==void 0&&(n.cookieConsentBanner=e82.cookieConsentBanner),e82.crosspostNotif!==void 0&&(n.crosspostNotif=e82.crosspostNotif),e82.crowdControlForPost!==void 0&&(n.crowdControlForPost=e82.crowdControlForPost),e82.customFeedImage!==void 0&&(n.customFeedImage=e82.customFeedImage),e82.doNotTrack!==void 0&&(n.doNotTrack=e82.doNotTrack),e82.expensiveCoinsPackage!==void 0&&(n.expensiveCoinsPackage=e82.expensiveCoinsPackage),e82.isEmailPermissionRequired!==void 0&&(n.isEmailPermissionRequired=e82.isEmailPermissionRequired),e82.liveComments!==void 0&&(n.liveComments=e82.liveComments),e82.liveOrangereds!==void 0&&(n.liveOrangereds=e82.liveOrangereds),e82.modAwards!==void 0&&(n.modAwards=e82.modAwards),e82.modServiceMuteReads!==void 0&&(n.modServiceMuteReads=e82.modServiceMuteReads),e82.modServiceMuteWrites!==void 0&&(n.modServiceMuteWrites=e82.modServiceMuteWrites),e82.modlogCopyrightRemoval!==void 0&&(n.modlogCopyrightRemoval=e82.modlogCopyrightRemoval),e82.mwebNsfwXpromo!==void 0&&(n.mwebNsfwXpromo=UserFeatures_Experiment.toJSON(e82.mwebNsfwXpromo)),e82.mwebXpromoInterstitialCommentsAndroid!==void 0&&(n.mwebXpromoInterstitialCommentsAndroid=e82.mwebXpromoInterstitialCommentsAndroid),e82.mwebXpromoInterstitialCommentsIos!==void 0&&(n.mwebXpromoInterstitialCommentsIos=e82.mwebXpromoInterstitialCommentsIos),e82.mwebXpromoModalListingClickDailyDismissibleAndroid!==void 0&&(n.mwebXpromoModalListingClickDailyDismissibleAndroid=e82.mwebXpromoModalListingClickDailyDismissibleAndroid),e82.mwebXpromoModalListingClickDailyDismissibleIos!==void 0&&(n.mwebXpromoModalListingClickDailyDismissibleIos=e82.mwebXpromoModalListingClickDailyDismissibleIos),e82.mwebXpromoRevampV2!==void 0&&(n.mwebXpromoRevampV2=UserFeatures_Experiment.toJSON(e82.mwebXpromoRevampV2)),e82.mwebXpromoRevampV3!==void 0&&(n.mwebXpromoRevampV3=UserFeatures_Experiment.toJSON(e82.mwebXpromoRevampV3)),e82.noreferrerToNoopener!==void 0&&(n.noreferrerToNoopener=e82.noreferrerToNoopener),e82.pollsMobile!==void 0&&(n.pollsMobile=e82.pollsMobile),e82.premiumSubscriptionsTable!==void 0&&(n.premiumSubscriptionsTable=e82.premiumSubscriptionsTable),e82.promotedTrendBlanks!==void 0&&(n.promotedTrendBlanks=e82.promotedTrendBlanks),e82.resizedStylesImages!==void 0&&(n.resizedStylesImages=e82.resizedStylesImages),e82.showAmpLink!==void 0&&(n.showAmpLink=e82.showAmpLink),e82.showNpsSurvey!==void 0&&(n.showNpsSurvey=e82.showNpsSurvey),e82.spezModal!==void 0&&(n.spezModal=e82.spezModal),e82.usePrefAccountDeployment!==void 0&&(n.usePrefAccountDeployment=e82.usePrefAccountDeployment),e82.userFlairMigrationTesting!==void 0&&(n.userFlairMigrationTesting=e82.userFlairMigrationTesting),e82.webhookConfig!==void 0&&(n.webhookConfig=e82.webhookConfig),n},create(e82){return UserFeatures.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserFeatures();return n.awardsOnStreams=e82.awardsOnStreams??void 0,n.canMakeMobileTestBuildPurchases=e82.canMakeMobileTestBuildPurchases??void 0,n.chatGroupRollout=e82.chatGroupRollout??void 0,n.chatSubreddit=e82.chatSubreddit??void 0,n.chatUserSettings=e82.chatUserSettings??void 0,n.chat=e82.chat??void 0,n.cookieConsentBanner=e82.cookieConsentBanner??void 0,n.crosspostNotif=e82.crosspostNotif??void 0,n.crowdControlForPost=e82.crowdControlForPost??void 0,n.customFeedImage=e82.customFeedImage??void 0,n.doNotTrack=e82.doNotTrack??void 0,n.expensiveCoinsPackage=e82.expensiveCoinsPackage??void 0,n.isEmailPermissionRequired=e82.isEmailPermissionRequired??void 0,n.liveComments=e82.liveComments??void 0,n.liveOrangereds=e82.liveOrangereds??void 0,n.modAwards=e82.modAwards??void 0,n.modServiceMuteReads=e82.modServiceMuteReads??void 0,n.modServiceMuteWrites=e82.modServiceMuteWrites??void 0,n.modlogCopyrightRemoval=e82.modlogCopyrightRemoval??void 0,n.mwebNsfwXpromo=e82.mwebNsfwXpromo!==void 0&&e82.mwebNsfwXpromo!==null?UserFeatures_Experiment.fromPartial(e82.mwebNsfwXpromo):void 0,n.mwebXpromoInterstitialCommentsAndroid=e82.mwebXpromoInterstitialCommentsAndroid??void 0,n.mwebXpromoInterstitialCommentsIos=e82.mwebXpromoInterstitialCommentsIos??void 0,n.mwebXpromoModalListingClickDailyDismissibleAndroid=e82.mwebXpromoModalListingClickDailyDismissibleAndroid??void 0,n.mwebXpromoModalListingClickDailyDismissibleIos=e82.mwebXpromoModalListingClickDailyDismissibleIos??void 0,n.mwebXpromoRevampV2=e82.mwebXpromoRevampV2!==void 0&&e82.mwebXpromoRevampV2!==null?UserFeatures_Experiment.fromPartial(e82.mwebXpromoRevampV2):void 0,n.mwebXpromoRevampV3=e82.mwebXpromoRevampV3!==void 0&&e82.mwebXpromoRevampV3!==null?UserFeatures_Experiment.fromPartial(e82.mwebXpromoRevampV3):void 0,n.noreferrerToNoopener=e82.noreferrerToNoopener??void 0,n.pollsMobile=e82.pollsMobile??void 0,n.premiumSubscriptionsTable=e82.premiumSubscriptionsTable??void 0,n.promotedTrendBlanks=e82.promotedTrendBlanks??void 0,n.resizedStylesImages=e82.resizedStylesImages??void 0,n.showAmpLink=e82.showAmpLink??void 0,n.showNpsSurvey=e82.showNpsSurvey??void 0,n.spezModal=e82.spezModal??void 0,n.usePrefAccountDeployment=e82.usePrefAccountDeployment??void 0,n.userFlairMigrationTesting=e82.userFlairMigrationTesting??void 0,n.webhookConfig=e82.webhookConfig??void 0,n}};messageTypeRegistry.set(UserFeatures.$type,UserFeatures);function createBaseUserFeatures_Experiment(){return{experimentId:void 0,owner:void 0,variant:void 0}}var UserFeatures_Experiment={$type:"devvit.reddit.UserFeatures.Experiment",encode(e82,n=_m0.Writer.create()){return e82.experimentId!==void 0&&Int32Value.encode({value:e82.experimentId},n.uint32(10).fork()).ldelim(),e82.owner!==void 0&&StringValue.encode({value:e82.owner},n.uint32(18).fork()).ldelim(),e82.variant!==void 0&&StringValue.encode({value:e82.variant},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserFeatures_Experiment();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.experimentId=Int32Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.owner=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.variant=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{experimentId:isSet$N(e82.experimentId)?Number(e82.experimentId):void 0,owner:isSet$N(e82.owner)?String(e82.owner):void 0,variant:isSet$N(e82.variant)?String(e82.variant):void 0}},toJSON(e82){let n={};return e82.experimentId!==void 0&&(n.experimentId=e82.experimentId),e82.owner!==void 0&&(n.owner=e82.owner),e82.variant!==void 0&&(n.variant=e82.variant),n},create(e82){return UserFeatures_Experiment.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserFeatures_Experiment();return n.experimentId=e82.experimentId??void 0,n.owner=e82.owner??void 0,n.variant=e82.variant??void 0,n}};messageTypeRegistry.set(UserFeatures_Experiment.$type,UserFeatures_Experiment);function isSet$N(e82){return e82!=null}var ApiClientConfig_BodyType;(function(e82){e82[e82.NONE=0]="NONE",e82[e82.JSON_CAMEL=1]="JSON_CAMEL",e82[e82.JSON_SNAKE=2]="JSON_SNAKE",e82[e82.FORM_CAMEL=3]="FORM_CAMEL",e82[e82.FORM_SNAKE=4]="FORM_SNAKE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ApiClientConfig_BodyType||(ApiClientConfig_BodyType={}));function apiClientConfig_BodyTypeFromJSON(e82){switch(e82){case 0:case"NONE":return ApiClientConfig_BodyType.NONE;case 1:case"JSON_CAMEL":return ApiClientConfig_BodyType.JSON_CAMEL;case 2:case"JSON_SNAKE":return ApiClientConfig_BodyType.JSON_SNAKE;case 3:case"FORM_CAMEL":return ApiClientConfig_BodyType.FORM_CAMEL;case 4:case"FORM_SNAKE":return ApiClientConfig_BodyType.FORM_SNAKE;case-1:case"UNRECOGNIZED":default:return ApiClientConfig_BodyType.UNRECOGNIZED}}function apiClientConfig_BodyTypeToJSON(e82){switch(e82){case ApiClientConfig_BodyType.NONE:return 0;case ApiClientConfig_BodyType.JSON_CAMEL:return 1;case ApiClientConfig_BodyType.JSON_SNAKE:return 2;case ApiClientConfig_BodyType.FORM_CAMEL:return 3;case ApiClientConfig_BodyType.FORM_SNAKE:return 4;case ApiClientConfig_BodyType.UNRECOGNIZED:default:return-1}}function createBaseListing(){return{kind:"",data:void 0}}var Listing={$type:"devvit.plugin.redditapi.common.Listing",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&Listing_ListingData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseListing();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=Listing_ListingData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$M(e82.kind)?globalThis.String(e82.kind):"",data:isSet$M(e82.data)?Listing_ListingData.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=Listing_ListingData.toJSON(e82.data)),n},create(e82){return Listing.fromPartial(e82??{})},fromPartial(e82){let n=createBaseListing();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?Listing_ListingData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(Listing.$type,Listing);function createBaseListing_ListingData(){return{after:void 0,before:void 0,children:[],dist:void 0}}var Listing_ListingData={$type:"devvit.plugin.redditapi.common.Listing.ListingData",encode(e82,n=_m0.Writer.create()){e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim();for(let t of e82.children)WrappedRedditObject.encode(t,n.uint32(26).fork()).ldelim();return e82.dist!==void 0&&Int64Value.encode({value:e82.dist},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseListing_ListingData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.children.push(WrappedRedditObject.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.dist=Int64Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$M(e82.after)?String(e82.after):void 0,before:isSet$M(e82.before)?String(e82.before):void 0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>WrappedRedditObject.fromJSON(n)):[],dist:isSet$M(e82.dist)?Number(e82.dist):void 0}},toJSON(e82){var t;let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>WrappedRedditObject.toJSON(o))),e82.dist!==void 0&&(n.dist=e82.dist),n},create(e82){return Listing_ListingData.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseListing_ListingData();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.children=((t=e82.children)==null?void 0:t.map(o=>WrappedRedditObject.fromPartial(o)))||[],n.dist=e82.dist??void 0,n}};messageTypeRegistry.set(Listing_ListingData.$type,Listing_ListingData);function createBaseWrappedRedditObject(){return{kind:"",data:void 0}}var WrappedRedditObject={$type:"devvit.plugin.redditapi.common.WrappedRedditObject",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&RedditObject.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWrappedRedditObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=RedditObject.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$M(e82.kind)?globalThis.String(e82.kind):"",data:isSet$M(e82.data)?RedditObject.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=RedditObject.toJSON(e82.data)),n},create(e82){return WrappedRedditObject.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWrappedRedditObject();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?RedditObject.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(WrappedRedditObject.$type,WrappedRedditObject);function createBaseJsonRedditObjects(){return{json:void 0}}var JsonRedditObjects={$type:"devvit.plugin.redditapi.common.JsonRedditObjects",encode(e82,n=_m0.Writer.create()){return e82.json!==void 0&&JsonRedditObjects_JsonType.encode(e82.json,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseJsonRedditObjects();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;d.json=JsonRedditObjects_JsonType.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{json:isSet$M(e82.json)?JsonRedditObjects_JsonType.fromJSON(e82.json):void 0}},toJSON(e82){let n={};return e82.json!==void 0&&(n.json=JsonRedditObjects_JsonType.toJSON(e82.json)),n},create(e82){return JsonRedditObjects.fromPartial(e82??{})},fromPartial(e82){let n=createBaseJsonRedditObjects();return n.json=e82.json!==void 0&&e82.json!==null?JsonRedditObjects_JsonType.fromPartial(e82.json):void 0,n}};messageTypeRegistry.set(JsonRedditObjects.$type,JsonRedditObjects);function createBaseJsonRedditObjects_JsonType(){return{errors:[],data:void 0}}var JsonRedditObjects_JsonType={$type:"devvit.plugin.redditapi.common.JsonRedditObjects.JsonType",encode(e82,n=_m0.Writer.create()){for(let t of e82.errors)Any.encode(t,n.uint32(10).fork()).ldelim();return e82.data!==void 0&&JsonRedditObjects_JsonType_JsonData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseJsonRedditObjects_JsonType();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.errors.push(Any.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.data=JsonRedditObjects_JsonType_JsonData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{errors:globalThis.Array.isArray(e82?.errors)?e82.errors.map(n=>Any.fromJSON(n)):[],data:isSet$M(e82.data)?JsonRedditObjects_JsonType_JsonData.fromJSON(e82.data):void 0}},toJSON(e82){var t;let n={};return(t=e82.errors)!=null&&t.length&&(n.errors=e82.errors.map(o=>Any.toJSON(o))),e82.data!==void 0&&(n.data=JsonRedditObjects_JsonType_JsonData.toJSON(e82.data)),n},create(e82){return JsonRedditObjects_JsonType.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseJsonRedditObjects_JsonType();return n.errors=((t=e82.errors)==null?void 0:t.map(o=>Any.fromPartial(o)))||[],n.data=e82.data!==void 0&&e82.data!==null?JsonRedditObjects_JsonType_JsonData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(JsonRedditObjects_JsonType.$type,JsonRedditObjects_JsonType);function createBaseJsonRedditObjects_JsonType_JsonData(){return{things:[]}}var JsonRedditObjects_JsonType_JsonData={$type:"devvit.plugin.redditapi.common.JsonRedditObjects.JsonType.JsonData",encode(e82,n=_m0.Writer.create()){for(let t of e82.things)WrappedRedditObject.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseJsonRedditObjects_JsonType_JsonData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.things.push(WrappedRedditObject.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{things:globalThis.Array.isArray(e82?.things)?e82.things.map(n=>WrappedRedditObject.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.things)!=null&&t.length&&(n.things=e82.things.map(o=>WrappedRedditObject.toJSON(o))),n},create(e82){return JsonRedditObjects_JsonType_JsonData.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseJsonRedditObjects_JsonType_JsonData();return n.things=((t=e82.things)==null?void 0:t.map(o=>WrappedRedditObject.fromPartial(o)))||[],n}};messageTypeRegistry.set(JsonRedditObjects_JsonType_JsonData.$type,JsonRedditObjects_JsonType_JsonData);function createBaseRedditObject(){return{allAwardings:[],approved:void 0,approvedAtUtc:void 0,approvedBy:void 0,archived:void 0,associatedAward:void 0,author:void 0,authorFlairBackgroundColor:void 0,authorFlairCssClass:void 0,authorFlairRichtext:[],authorFlairTemplateId:void 0,authorFlairText:void 0,authorFlairTextColor:void 0,authorFlairType:void 0,authorFullname:void 0,authorIsBlocked:void 0,authorPatreonFlair:void 0,authorPremium:void 0,awarders:[],bannedAtUtc:void 0,bannedBy:void 0,body:void 0,bodyHtml:void 0,canGild:void 0,canModPost:void 0,collapsed:void 0,collapsedBecauseCrowdControl:void 0,collapsedReason:void 0,collapsedReasonCode:void 0,commentType:void 0,controversiality:void 0,created:void 0,createdUtc:void 0,distinguished:void 0,downs:void 0,edited:void 0,gilded:void 0,gildings:void 0,id:void 0,ignoreReports:void 0,isSubmitter:void 0,likes:void 0,linkId:void 0,locked:void 0,modNote:void 0,modReasonBy:void 0,modReasonTitle:void 0,name:void 0,noFollow:void 0,numReports:void 0,parentId:void 0,permalink:void 0,removalReason:void 0,removed:void 0,replies:void 0,reportReasons:void 0,rteMode:void 0,saved:void 0,score:void 0,scoreHidden:void 0,sendReplies:void 0,spam:void 0,stickied:void 0,subreddit:void 0,subredditId:void 0,subredditNamePrefixed:void 0,subredditType:void 0,topAwardedType:void 0,totalAwardsReceived:void 0,treatmentTags:[],unrepliableReason:void 0,ups:void 0,depth:void 0,linkTitle:void 0,linkAuthor:void 0,numComments:void 0,over18:void 0,linkPermalink:void 0,quarantine:void 0,linkUrl:void 0,selftext:void 0,selftextHtml:void 0,thumbnail:void 0,thumbnailWidth:void 0,thumbnailHeight:void 0,title:void 0,url:void 0,displayName:void 0,modPermissions:[],count:void 0,children:void 0,replyList:void 0,hidden:void 0,linkFlairBackgroundColor:void 0,linkFlairCssClass:void 0,linkFlairRichtext:[],linkFlairTemplateId:void 0,linkFlairText:void 0,linkFlairTextColor:void 0,linkFlairType:void 0,secureMedia:void 0,spoiler:!1,modReports:[],userReports:[],removedBy:void 0,removedByCategory:void 0}}var RedditObject={$type:"devvit.plugin.redditapi.common.RedditObject",encode(e82,n=_m0.Writer.create()){for(let t of e82.allAwardings)Any.encode(t,n.uint32(10).fork()).ldelim();e82.approved!==void 0&&BoolValue.encode({value:e82.approved},n.uint32(18).fork()).ldelim(),e82.approvedAtUtc!==void 0&&Int64Value.encode({value:e82.approvedAtUtc},n.uint32(26).fork()).ldelim(),e82.approvedBy!==void 0&&StringValue.encode({value:e82.approvedBy},n.uint32(34).fork()).ldelim(),e82.archived!==void 0&&BoolValue.encode({value:e82.archived},n.uint32(42).fork()).ldelim(),e82.associatedAward!==void 0&&StringValue.encode({value:e82.associatedAward},n.uint32(50).fork()).ldelim(),e82.author!==void 0&&StringValue.encode({value:e82.author},n.uint32(58).fork()).ldelim(),e82.authorFlairBackgroundColor!==void 0&&StringValue.encode({value:e82.authorFlairBackgroundColor},n.uint32(66).fork()).ldelim(),e82.authorFlairCssClass!==void 0&&StringValue.encode({value:e82.authorFlairCssClass},n.uint32(74).fork()).ldelim();for(let t of e82.authorFlairRichtext)RedditObject_AuthorFlairRichText.encode(t,n.uint32(82).fork()).ldelim();e82.authorFlairTemplateId!==void 0&&StringValue.encode({value:e82.authorFlairTemplateId},n.uint32(90).fork()).ldelim(),e82.authorFlairText!==void 0&&StringValue.encode({value:e82.authorFlairText},n.uint32(98).fork()).ldelim(),e82.authorFlairTextColor!==void 0&&StringValue.encode({value:e82.authorFlairTextColor},n.uint32(106).fork()).ldelim(),e82.authorFlairType!==void 0&&StringValue.encode({value:e82.authorFlairType},n.uint32(114).fork()).ldelim(),e82.authorFullname!==void 0&&StringValue.encode({value:e82.authorFullname},n.uint32(122).fork()).ldelim(),e82.authorIsBlocked!==void 0&&BoolValue.encode({value:e82.authorIsBlocked},n.uint32(130).fork()).ldelim(),e82.authorPatreonFlair!==void 0&&BoolValue.encode({value:e82.authorPatreonFlair},n.uint32(138).fork()).ldelim(),e82.authorPremium!==void 0&&BoolValue.encode({value:e82.authorPremium},n.uint32(146).fork()).ldelim();for(let t of e82.awarders)StringValue.encode({value:t},n.uint32(154).fork()).ldelim();e82.bannedAtUtc!==void 0&&Int64Value.encode({value:e82.bannedAtUtc},n.uint32(162).fork()).ldelim(),e82.bannedBy!==void 0&&StringValue.encode({value:e82.bannedBy},n.uint32(170).fork()).ldelim(),e82.body!==void 0&&StringValue.encode({value:e82.body},n.uint32(178).fork()).ldelim(),e82.bodyHtml!==void 0&&StringValue.encode({value:e82.bodyHtml},n.uint32(186).fork()).ldelim(),e82.canGild!==void 0&&BoolValue.encode({value:e82.canGild},n.uint32(194).fork()).ldelim(),e82.canModPost!==void 0&&BoolValue.encode({value:e82.canModPost},n.uint32(202).fork()).ldelim(),e82.collapsed!==void 0&&BoolValue.encode({value:e82.collapsed},n.uint32(210).fork()).ldelim(),e82.collapsedBecauseCrowdControl!==void 0&&BoolValue.encode({value:e82.collapsedBecauseCrowdControl},n.uint32(218).fork()).ldelim(),e82.collapsedReason!==void 0&&StringValue.encode({value:e82.collapsedReason},n.uint32(226).fork()).ldelim(),e82.collapsedReasonCode!==void 0&&StringValue.encode({value:e82.collapsedReasonCode},n.uint32(234).fork()).ldelim(),e82.commentType!==void 0&&StringValue.encode({value:e82.commentType},n.uint32(242).fork()).ldelim(),e82.controversiality!==void 0&&Int64Value.encode({value:e82.controversiality},n.uint32(250).fork()).ldelim(),e82.created!==void 0&&Int64Value.encode({value:e82.created},n.uint32(258).fork()).ldelim(),e82.createdUtc!==void 0&&Int64Value.encode({value:e82.createdUtc},n.uint32(266).fork()).ldelim(),e82.distinguished!==void 0&&StringValue.encode({value:e82.distinguished},n.uint32(274).fork()).ldelim(),e82.downs!==void 0&&Int64Value.encode({value:e82.downs},n.uint32(282).fork()).ldelim(),e82.edited!==void 0&&BoolValue.encode({value:e82.edited},n.uint32(290).fork()).ldelim(),e82.gilded!==void 0&&Int64Value.encode({value:e82.gilded},n.uint32(298).fork()).ldelim(),e82.gildings!==void 0&&Any.encode(e82.gildings,n.uint32(306).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(314).fork()).ldelim(),e82.ignoreReports!==void 0&&BoolValue.encode({value:e82.ignoreReports},n.uint32(322).fork()).ldelim(),e82.isSubmitter!==void 0&&BoolValue.encode({value:e82.isSubmitter},n.uint32(330).fork()).ldelim(),e82.likes!==void 0&&BoolValue.encode({value:e82.likes},n.uint32(338).fork()).ldelim(),e82.linkId!==void 0&&StringValue.encode({value:e82.linkId},n.uint32(346).fork()).ldelim(),e82.locked!==void 0&&BoolValue.encode({value:e82.locked},n.uint32(354).fork()).ldelim(),e82.modNote!==void 0&&StringValue.encode({value:e82.modNote},n.uint32(362).fork()).ldelim(),e82.modReasonBy!==void 0&&StringValue.encode({value:e82.modReasonBy},n.uint32(370).fork()).ldelim(),e82.modReasonTitle!==void 0&&StringValue.encode({value:e82.modReasonTitle},n.uint32(378).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(394).fork()).ldelim(),e82.noFollow!==void 0&&BoolValue.encode({value:e82.noFollow},n.uint32(402).fork()).ldelim(),e82.numReports!==void 0&&Int64Value.encode({value:e82.numReports},n.uint32(418).fork()).ldelim(),e82.parentId!==void 0&&StringValue.encode({value:e82.parentId},n.uint32(426).fork()).ldelim(),e82.permalink!==void 0&&StringValue.encode({value:e82.permalink},n.uint32(434).fork()).ldelim(),e82.removalReason!==void 0&&StringValue.encode({value:e82.removalReason},n.uint32(442).fork()).ldelim(),e82.removed!==void 0&&BoolValue.encode({value:e82.removed},n.uint32(450).fork()).ldelim(),e82.replies!==void 0&&StringValue.encode({value:e82.replies},n.uint32(458).fork()).ldelim(),e82.reportReasons!==void 0&&ListValue.encode(ListValue.wrap(e82.reportReasons),n.uint32(466).fork()).ldelim(),e82.rteMode!==void 0&&StringValue.encode({value:e82.rteMode},n.uint32(474).fork()).ldelim(),e82.saved!==void 0&&BoolValue.encode({value:e82.saved},n.uint32(482).fork()).ldelim(),e82.score!==void 0&&Int64Value.encode({value:e82.score},n.uint32(490).fork()).ldelim(),e82.scoreHidden!==void 0&&BoolValue.encode({value:e82.scoreHidden},n.uint32(498).fork()).ldelim(),e82.sendReplies!==void 0&&BoolValue.encode({value:e82.sendReplies},n.uint32(506).fork()).ldelim(),e82.spam!==void 0&&BoolValue.encode({value:e82.spam},n.uint32(514).fork()).ldelim(),e82.stickied!==void 0&&BoolValue.encode({value:e82.stickied},n.uint32(522).fork()).ldelim(),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(530).fork()).ldelim(),e82.subredditId!==void 0&&StringValue.encode({value:e82.subredditId},n.uint32(538).fork()).ldelim(),e82.subredditNamePrefixed!==void 0&&StringValue.encode({value:e82.subredditNamePrefixed},n.uint32(546).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(554).fork()).ldelim(),e82.topAwardedType!==void 0&&StringValue.encode({value:e82.topAwardedType},n.uint32(562).fork()).ldelim(),e82.totalAwardsReceived!==void 0&&Int64Value.encode({value:e82.totalAwardsReceived},n.uint32(570).fork()).ldelim();for(let t of e82.treatmentTags)Any.encode(t,n.uint32(578).fork()).ldelim();e82.unrepliableReason!==void 0&&StringValue.encode({value:e82.unrepliableReason},n.uint32(586).fork()).ldelim(),e82.ups!==void 0&&Int64Value.encode({value:e82.ups},n.uint32(594).fork()).ldelim(),e82.depth!==void 0&&Int64Value.encode({value:e82.depth},n.uint32(610).fork()).ldelim(),e82.linkTitle!==void 0&&StringValue.encode({value:e82.linkTitle},n.uint32(618).fork()).ldelim(),e82.linkAuthor!==void 0&&StringValue.encode({value:e82.linkAuthor},n.uint32(626).fork()).ldelim(),e82.numComments!==void 0&&Int64Value.encode({value:e82.numComments},n.uint32(634).fork()).ldelim(),e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(642).fork()).ldelim(),e82.linkPermalink!==void 0&&StringValue.encode({value:e82.linkPermalink},n.uint32(650).fork()).ldelim(),e82.quarantine!==void 0&&BoolValue.encode({value:e82.quarantine},n.uint32(658).fork()).ldelim(),e82.linkUrl!==void 0&&StringValue.encode({value:e82.linkUrl},n.uint32(666).fork()).ldelim(),e82.selftext!==void 0&&StringValue.encode({value:e82.selftext},n.uint32(674).fork()).ldelim(),e82.selftextHtml!==void 0&&StringValue.encode({value:e82.selftextHtml},n.uint32(682).fork()).ldelim(),e82.thumbnail!==void 0&&StringValue.encode({value:e82.thumbnail},n.uint32(698).fork()).ldelim(),e82.thumbnailWidth!==void 0&&Int64Value.encode({value:e82.thumbnailWidth},n.uint32(706).fork()).ldelim(),e82.thumbnailHeight!==void 0&&Int64Value.encode({value:e82.thumbnailHeight},n.uint32(714).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(722).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(730).fork()).ldelim(),e82.displayName!==void 0&&StringValue.encode({value:e82.displayName},n.uint32(738).fork()).ldelim();for(let t of e82.modPermissions)StringValue.encode({value:t},n.uint32(746).fork()).ldelim();e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(754).fork()).ldelim(),e82.children!==void 0&&ListValue.encode(ListValue.wrap(e82.children),n.uint32(762).fork()).ldelim(),e82.replyList!==void 0&&Listing.encode(e82.replyList,n.uint32(770).fork()).ldelim(),e82.hidden!==void 0&&BoolValue.encode({value:e82.hidden},n.uint32(778).fork()).ldelim(),e82.linkFlairBackgroundColor!==void 0&&StringValue.encode({value:e82.linkFlairBackgroundColor},n.uint32(786).fork()).ldelim(),e82.linkFlairCssClass!==void 0&&StringValue.encode({value:e82.linkFlairCssClass},n.uint32(794).fork()).ldelim();for(let t of e82.linkFlairRichtext)RedditObject_LinkFlairRichText.encode(t,n.uint32(802).fork()).ldelim();e82.linkFlairTemplateId!==void 0&&StringValue.encode({value:e82.linkFlairTemplateId},n.uint32(810).fork()).ldelim(),e82.linkFlairText!==void 0&&StringValue.encode({value:e82.linkFlairText},n.uint32(818).fork()).ldelim(),e82.linkFlairTextColor!==void 0&&StringValue.encode({value:e82.linkFlairTextColor},n.uint32(826).fork()).ldelim(),e82.linkFlairType!==void 0&&StringValue.encode({value:e82.linkFlairType},n.uint32(834).fork()).ldelim(),e82.secureMedia!==void 0&&RedditObject_SecureMedia.encode(e82.secureMedia,n.uint32(842).fork()).ldelim(),e82.spoiler!==!1&&n.uint32(848).bool(e82.spoiler);for(let t of e82.modReports)ListValue.encode(ListValue.wrap(t),n.uint32(858).fork()).ldelim();for(let t of e82.userReports)ListValue.encode(ListValue.wrap(t),n.uint32(866).fork()).ldelim();return e82.removedBy!==void 0&&StringValue.encode({value:e82.removedBy},n.uint32(874).fork()).ldelim(),e82.removedByCategory!==void 0&&StringValue.encode({value:e82.removedByCategory},n.uint32(882).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedditObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.allAwardings.push(Any.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.approved=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.approvedAtUtc=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.approvedBy=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.archived=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.associatedAward=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.author=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.authorFlairBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.authorFlairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.authorFlairRichtext.push(RedditObject_AuthorFlairRichText.decode(t,t.uint32()));continue;case 11:if(r!==90)break;d.authorFlairTemplateId=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.authorFlairText=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.authorFlairTextColor=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.authorFlairType=StringValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.authorFullname=StringValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.authorIsBlocked=BoolValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.authorPatreonFlair=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.authorPremium=BoolValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.awarders.push(StringValue.decode(t,t.uint32()).value);continue;case 20:if(r!==162)break;d.bannedAtUtc=Int64Value.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.bannedBy=StringValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.body=StringValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.bodyHtml=StringValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.canGild=BoolValue.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.canModPost=BoolValue.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.collapsed=BoolValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.collapsedBecauseCrowdControl=BoolValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.collapsedReason=StringValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.collapsedReasonCode=StringValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.commentType=StringValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.controversiality=Int64Value.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.created=Int64Value.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.createdUtc=Int64Value.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.distinguished=StringValue.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.downs=Int64Value.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.edited=BoolValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.gilded=Int64Value.decode(t,t.uint32()).value;continue;case 38:if(r!==306)break;d.gildings=Any.decode(t,t.uint32());continue;case 39:if(r!==314)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.ignoreReports=BoolValue.decode(t,t.uint32()).value;continue;case 41:if(r!==330)break;d.isSubmitter=BoolValue.decode(t,t.uint32()).value;continue;case 42:if(r!==338)break;d.likes=BoolValue.decode(t,t.uint32()).value;continue;case 43:if(r!==346)break;d.linkId=StringValue.decode(t,t.uint32()).value;continue;case 44:if(r!==354)break;d.locked=BoolValue.decode(t,t.uint32()).value;continue;case 45:if(r!==362)break;d.modNote=StringValue.decode(t,t.uint32()).value;continue;case 46:if(r!==370)break;d.modReasonBy=StringValue.decode(t,t.uint32()).value;continue;case 47:if(r!==378)break;d.modReasonTitle=StringValue.decode(t,t.uint32()).value;continue;case 49:if(r!==394)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 50:if(r!==402)break;d.noFollow=BoolValue.decode(t,t.uint32()).value;continue;case 52:if(r!==418)break;d.numReports=Int64Value.decode(t,t.uint32()).value;continue;case 53:if(r!==426)break;d.parentId=StringValue.decode(t,t.uint32()).value;continue;case 54:if(r!==434)break;d.permalink=StringValue.decode(t,t.uint32()).value;continue;case 55:if(r!==442)break;d.removalReason=StringValue.decode(t,t.uint32()).value;continue;case 56:if(r!==450)break;d.removed=BoolValue.decode(t,t.uint32()).value;continue;case 57:if(r!==458)break;d.replies=StringValue.decode(t,t.uint32()).value;continue;case 58:if(r!==466)break;d.reportReasons=ListValue.unwrap(ListValue.decode(t,t.uint32()));continue;case 59:if(r!==474)break;d.rteMode=StringValue.decode(t,t.uint32()).value;continue;case 60:if(r!==482)break;d.saved=BoolValue.decode(t,t.uint32()).value;continue;case 61:if(r!==490)break;d.score=Int64Value.decode(t,t.uint32()).value;continue;case 62:if(r!==498)break;d.scoreHidden=BoolValue.decode(t,t.uint32()).value;continue;case 63:if(r!==506)break;d.sendReplies=BoolValue.decode(t,t.uint32()).value;continue;case 64:if(r!==514)break;d.spam=BoolValue.decode(t,t.uint32()).value;continue;case 65:if(r!==522)break;d.stickied=BoolValue.decode(t,t.uint32()).value;continue;case 66:if(r!==530)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 67:if(r!==538)break;d.subredditId=StringValue.decode(t,t.uint32()).value;continue;case 68:if(r!==546)break;d.subredditNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 69:if(r!==554)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 70:if(r!==562)break;d.topAwardedType=StringValue.decode(t,t.uint32()).value;continue;case 71:if(r!==570)break;d.totalAwardsReceived=Int64Value.decode(t,t.uint32()).value;continue;case 72:if(r!==578)break;d.treatmentTags.push(Any.decode(t,t.uint32()));continue;case 73:if(r!==586)break;d.unrepliableReason=StringValue.decode(t,t.uint32()).value;continue;case 74:if(r!==594)break;d.ups=Int64Value.decode(t,t.uint32()).value;continue;case 76:if(r!==610)break;d.depth=Int64Value.decode(t,t.uint32()).value;continue;case 77:if(r!==618)break;d.linkTitle=StringValue.decode(t,t.uint32()).value;continue;case 78:if(r!==626)break;d.linkAuthor=StringValue.decode(t,t.uint32()).value;continue;case 79:if(r!==634)break;d.numComments=Int64Value.decode(t,t.uint32()).value;continue;case 80:if(r!==642)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 81:if(r!==650)break;d.linkPermalink=StringValue.decode(t,t.uint32()).value;continue;case 82:if(r!==658)break;d.quarantine=BoolValue.decode(t,t.uint32()).value;continue;case 83:if(r!==666)break;d.linkUrl=StringValue.decode(t,t.uint32()).value;continue;case 84:if(r!==674)break;d.selftext=StringValue.decode(t,t.uint32()).value;continue;case 85:if(r!==682)break;d.selftextHtml=StringValue.decode(t,t.uint32()).value;continue;case 87:if(r!==698)break;d.thumbnail=StringValue.decode(t,t.uint32()).value;continue;case 88:if(r!==706)break;d.thumbnailWidth=Int64Value.decode(t,t.uint32()).value;continue;case 89:if(r!==714)break;d.thumbnailHeight=Int64Value.decode(t,t.uint32()).value;continue;case 90:if(r!==722)break;d.title=StringValue.decode(t,t.uint32()).value;continue;case 91:if(r!==730)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 92:if(r!==738)break;d.displayName=StringValue.decode(t,t.uint32()).value;continue;case 93:if(r!==746)break;d.modPermissions.push(StringValue.decode(t,t.uint32()).value);continue;case 94:if(r!==754)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 95:if(r!==762)break;d.children=ListValue.unwrap(ListValue.decode(t,t.uint32()));continue;case 96:if(r!==770)break;d.replyList=Listing.decode(t,t.uint32());continue;case 97:if(r!==778)break;d.hidden=BoolValue.decode(t,t.uint32()).value;continue;case 98:if(r!==786)break;d.linkFlairBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 99:if(r!==794)break;d.linkFlairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 100:if(r!==802)break;d.linkFlairRichtext.push(RedditObject_LinkFlairRichText.decode(t,t.uint32()));continue;case 101:if(r!==810)break;d.linkFlairTemplateId=StringValue.decode(t,t.uint32()).value;continue;case 102:if(r!==818)break;d.linkFlairText=StringValue.decode(t,t.uint32()).value;continue;case 103:if(r!==826)break;d.linkFlairTextColor=StringValue.decode(t,t.uint32()).value;continue;case 104:if(r!==834)break;d.linkFlairType=StringValue.decode(t,t.uint32()).value;continue;case 105:if(r!==842)break;d.secureMedia=RedditObject_SecureMedia.decode(t,t.uint32());continue;case 106:if(r!==848)break;d.spoiler=t.bool();continue;case 107:if(r!==858)break;d.modReports.push(ListValue.unwrap(ListValue.decode(t,t.uint32())));continue;case 108:if(r!==866)break;d.userReports.push(ListValue.unwrap(ListValue.decode(t,t.uint32())));continue;case 109:if(r!==874)break;d.removedBy=StringValue.decode(t,t.uint32()).value;continue;case 110:if(r!==882)break;d.removedByCategory=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{allAwardings:globalThis.Array.isArray(e82?.allAwardings)?e82.allAwardings.map(n=>Any.fromJSON(n)):[],approved:isSet$M(e82.approved)?!!e82.approved:void 0,approvedAtUtc:isSet$M(e82.approvedAtUtc)?Number(e82.approvedAtUtc):void 0,approvedBy:isSet$M(e82.approvedBy)?String(e82.approvedBy):void 0,archived:isSet$M(e82.archived)?!!e82.archived:void 0,associatedAward:isSet$M(e82.associatedAward)?String(e82.associatedAward):void 0,author:isSet$M(e82.author)?String(e82.author):void 0,authorFlairBackgroundColor:isSet$M(e82.authorFlairBackgroundColor)?String(e82.authorFlairBackgroundColor):void 0,authorFlairCssClass:isSet$M(e82.authorFlairCssClass)?String(e82.authorFlairCssClass):void 0,authorFlairRichtext:globalThis.Array.isArray(e82?.authorFlairRichtext)?e82.authorFlairRichtext.map(n=>RedditObject_AuthorFlairRichText.fromJSON(n)):[],authorFlairTemplateId:isSet$M(e82.authorFlairTemplateId)?String(e82.authorFlairTemplateId):void 0,authorFlairText:isSet$M(e82.authorFlairText)?String(e82.authorFlairText):void 0,authorFlairTextColor:isSet$M(e82.authorFlairTextColor)?String(e82.authorFlairTextColor):void 0,authorFlairType:isSet$M(e82.authorFlairType)?String(e82.authorFlairType):void 0,authorFullname:isSet$M(e82.authorFullname)?String(e82.authorFullname):void 0,authorIsBlocked:isSet$M(e82.authorIsBlocked)?!!e82.authorIsBlocked:void 0,authorPatreonFlair:isSet$M(e82.authorPatreonFlair)?!!e82.authorPatreonFlair:void 0,authorPremium:isSet$M(e82.authorPremium)?!!e82.authorPremium:void 0,awarders:globalThis.Array.isArray(e82?.awarders)?e82.awarders.map(n=>String(n)):[],bannedAtUtc:isSet$M(e82.bannedAtUtc)?Number(e82.bannedAtUtc):void 0,bannedBy:isSet$M(e82.bannedBy)?String(e82.bannedBy):void 0,body:isSet$M(e82.body)?String(e82.body):void 0,bodyHtml:isSet$M(e82.bodyHtml)?String(e82.bodyHtml):void 0,canGild:isSet$M(e82.canGild)?!!e82.canGild:void 0,canModPost:isSet$M(e82.canModPost)?!!e82.canModPost:void 0,collapsed:isSet$M(e82.collapsed)?!!e82.collapsed:void 0,collapsedBecauseCrowdControl:isSet$M(e82.collapsedBecauseCrowdControl)?!!e82.collapsedBecauseCrowdControl:void 0,collapsedReason:isSet$M(e82.collapsedReason)?String(e82.collapsedReason):void 0,collapsedReasonCode:isSet$M(e82.collapsedReasonCode)?String(e82.collapsedReasonCode):void 0,commentType:isSet$M(e82.commentType)?String(e82.commentType):void 0,controversiality:isSet$M(e82.controversiality)?Number(e82.controversiality):void 0,created:isSet$M(e82.created)?Number(e82.created):void 0,createdUtc:isSet$M(e82.createdUtc)?Number(e82.createdUtc):void 0,distinguished:isSet$M(e82.distinguished)?String(e82.distinguished):void 0,downs:isSet$M(e82.downs)?Number(e82.downs):void 0,edited:isSet$M(e82.edited)?!!e82.edited:void 0,gilded:isSet$M(e82.gilded)?Number(e82.gilded):void 0,gildings:isSet$M(e82.gildings)?Any.fromJSON(e82.gildings):void 0,id:isSet$M(e82.id)?String(e82.id):void 0,ignoreReports:isSet$M(e82.ignoreReports)?!!e82.ignoreReports:void 0,isSubmitter:isSet$M(e82.isSubmitter)?!!e82.isSubmitter:void 0,likes:isSet$M(e82.likes)?!!e82.likes:void 0,linkId:isSet$M(e82.linkId)?String(e82.linkId):void 0,locked:isSet$M(e82.locked)?!!e82.locked:void 0,modNote:isSet$M(e82.modNote)?String(e82.modNote):void 0,modReasonBy:isSet$M(e82.modReasonBy)?String(e82.modReasonBy):void 0,modReasonTitle:isSet$M(e82.modReasonTitle)?String(e82.modReasonTitle):void 0,name:isSet$M(e82.name)?String(e82.name):void 0,noFollow:isSet$M(e82.noFollow)?!!e82.noFollow:void 0,numReports:isSet$M(e82.numReports)?Number(e82.numReports):void 0,parentId:isSet$M(e82.parentId)?String(e82.parentId):void 0,permalink:isSet$M(e82.permalink)?String(e82.permalink):void 0,removalReason:isSet$M(e82.removalReason)?String(e82.removalReason):void 0,removed:isSet$M(e82.removed)?!!e82.removed:void 0,replies:isSet$M(e82.replies)?String(e82.replies):void 0,reportReasons:globalThis.Array.isArray(e82.reportReasons)?[...e82.reportReasons]:void 0,rteMode:isSet$M(e82.rteMode)?String(e82.rteMode):void 0,saved:isSet$M(e82.saved)?!!e82.saved:void 0,score:isSet$M(e82.score)?Number(e82.score):void 0,scoreHidden:isSet$M(e82.scoreHidden)?!!e82.scoreHidden:void 0,sendReplies:isSet$M(e82.sendReplies)?!!e82.sendReplies:void 0,spam:isSet$M(e82.spam)?!!e82.spam:void 0,stickied:isSet$M(e82.stickied)?!!e82.stickied:void 0,subreddit:isSet$M(e82.subreddit)?String(e82.subreddit):void 0,subredditId:isSet$M(e82.subredditId)?String(e82.subredditId):void 0,subredditNamePrefixed:isSet$M(e82.subredditNamePrefixed)?String(e82.subredditNamePrefixed):void 0,subredditType:isSet$M(e82.subredditType)?String(e82.subredditType):void 0,topAwardedType:isSet$M(e82.topAwardedType)?String(e82.topAwardedType):void 0,totalAwardsReceived:isSet$M(e82.totalAwardsReceived)?Number(e82.totalAwardsReceived):void 0,treatmentTags:globalThis.Array.isArray(e82?.treatmentTags)?e82.treatmentTags.map(n=>Any.fromJSON(n)):[],unrepliableReason:isSet$M(e82.unrepliableReason)?String(e82.unrepliableReason):void 0,ups:isSet$M(e82.ups)?Number(e82.ups):void 0,depth:isSet$M(e82.depth)?Number(e82.depth):void 0,linkTitle:isSet$M(e82.linkTitle)?String(e82.linkTitle):void 0,linkAuthor:isSet$M(e82.linkAuthor)?String(e82.linkAuthor):void 0,numComments:isSet$M(e82.numComments)?Number(e82.numComments):void 0,over18:isSet$M(e82.over18)?!!e82.over18:void 0,linkPermalink:isSet$M(e82.linkPermalink)?String(e82.linkPermalink):void 0,quarantine:isSet$M(e82.quarantine)?!!e82.quarantine:void 0,linkUrl:isSet$M(e82.linkUrl)?String(e82.linkUrl):void 0,selftext:isSet$M(e82.selftext)?String(e82.selftext):void 0,selftextHtml:isSet$M(e82.selftextHtml)?String(e82.selftextHtml):void 0,thumbnail:isSet$M(e82.thumbnail)?String(e82.thumbnail):void 0,thumbnailWidth:isSet$M(e82.thumbnailWidth)?Number(e82.thumbnailWidth):void 0,thumbnailHeight:isSet$M(e82.thumbnailHeight)?Number(e82.thumbnailHeight):void 0,title:isSet$M(e82.title)?String(e82.title):void 0,url:isSet$M(e82.url)?String(e82.url):void 0,displayName:isSet$M(e82.displayName)?String(e82.displayName):void 0,modPermissions:globalThis.Array.isArray(e82?.modPermissions)?e82.modPermissions.map(n=>String(n)):[],count:isSet$M(e82.count)?Number(e82.count):void 0,children:globalThis.Array.isArray(e82.children)?[...e82.children]:void 0,replyList:isSet$M(e82.replyList)?Listing.fromJSON(e82.replyList):void 0,hidden:isSet$M(e82.hidden)?!!e82.hidden:void 0,linkFlairBackgroundColor:isSet$M(e82.linkFlairBackgroundColor)?String(e82.linkFlairBackgroundColor):void 0,linkFlairCssClass:isSet$M(e82.linkFlairCssClass)?String(e82.linkFlairCssClass):void 0,linkFlairRichtext:globalThis.Array.isArray(e82?.linkFlairRichtext)?e82.linkFlairRichtext.map(n=>RedditObject_LinkFlairRichText.fromJSON(n)):[],linkFlairTemplateId:isSet$M(e82.linkFlairTemplateId)?String(e82.linkFlairTemplateId):void 0,linkFlairText:isSet$M(e82.linkFlairText)?String(e82.linkFlairText):void 0,linkFlairTextColor:isSet$M(e82.linkFlairTextColor)?String(e82.linkFlairTextColor):void 0,linkFlairType:isSet$M(e82.linkFlairType)?String(e82.linkFlairType):void 0,secureMedia:isSet$M(e82.secureMedia)?RedditObject_SecureMedia.fromJSON(e82.secureMedia):void 0,spoiler:isSet$M(e82.spoiler)?globalThis.Boolean(e82.spoiler):!1,modReports:globalThis.Array.isArray(e82?.modReports)?e82.modReports.map(n=>[...n]):[],userReports:globalThis.Array.isArray(e82?.userReports)?e82.userReports.map(n=>[...n]):[],removedBy:isSet$M(e82.removedBy)?String(e82.removedBy):void 0,removedByCategory:isSet$M(e82.removedByCategory)?String(e82.removedByCategory):void 0}},toJSON(e82){var t,o,d,r,a,u,l,s;let n={};return(t=e82.allAwardings)!=null&&t.length&&(n.allAwardings=e82.allAwardings.map(f=>Any.toJSON(f))),e82.approved!==void 0&&(n.approved=e82.approved),e82.approvedAtUtc!==void 0&&(n.approvedAtUtc=e82.approvedAtUtc),e82.approvedBy!==void 0&&(n.approvedBy=e82.approvedBy),e82.archived!==void 0&&(n.archived=e82.archived),e82.associatedAward!==void 0&&(n.associatedAward=e82.associatedAward),e82.author!==void 0&&(n.author=e82.author),e82.authorFlairBackgroundColor!==void 0&&(n.authorFlairBackgroundColor=e82.authorFlairBackgroundColor),e82.authorFlairCssClass!==void 0&&(n.authorFlairCssClass=e82.authorFlairCssClass),(o=e82.authorFlairRichtext)!=null&&o.length&&(n.authorFlairRichtext=e82.authorFlairRichtext.map(f=>RedditObject_AuthorFlairRichText.toJSON(f))),e82.authorFlairTemplateId!==void 0&&(n.authorFlairTemplateId=e82.authorFlairTemplateId),e82.authorFlairText!==void 0&&(n.authorFlairText=e82.authorFlairText),e82.authorFlairTextColor!==void 0&&(n.authorFlairTextColor=e82.authorFlairTextColor),e82.authorFlairType!==void 0&&(n.authorFlairType=e82.authorFlairType),e82.authorFullname!==void 0&&(n.authorFullname=e82.authorFullname),e82.authorIsBlocked!==void 0&&(n.authorIsBlocked=e82.authorIsBlocked),e82.authorPatreonFlair!==void 0&&(n.authorPatreonFlair=e82.authorPatreonFlair),e82.authorPremium!==void 0&&(n.authorPremium=e82.authorPremium),(d=e82.awarders)!=null&&d.length&&(n.awarders=e82.awarders),e82.bannedAtUtc!==void 0&&(n.bannedAtUtc=e82.bannedAtUtc),e82.bannedBy!==void 0&&(n.bannedBy=e82.bannedBy),e82.body!==void 0&&(n.body=e82.body),e82.bodyHtml!==void 0&&(n.bodyHtml=e82.bodyHtml),e82.canGild!==void 0&&(n.canGild=e82.canGild),e82.canModPost!==void 0&&(n.canModPost=e82.canModPost),e82.collapsed!==void 0&&(n.collapsed=e82.collapsed),e82.collapsedBecauseCrowdControl!==void 0&&(n.collapsedBecauseCrowdControl=e82.collapsedBecauseCrowdControl),e82.collapsedReason!==void 0&&(n.collapsedReason=e82.collapsedReason),e82.collapsedReasonCode!==void 0&&(n.collapsedReasonCode=e82.collapsedReasonCode),e82.commentType!==void 0&&(n.commentType=e82.commentType),e82.controversiality!==void 0&&(n.controversiality=e82.controversiality),e82.created!==void 0&&(n.created=e82.created),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.distinguished!==void 0&&(n.distinguished=e82.distinguished),e82.downs!==void 0&&(n.downs=e82.downs),e82.edited!==void 0&&(n.edited=e82.edited),e82.gilded!==void 0&&(n.gilded=e82.gilded),e82.gildings!==void 0&&(n.gildings=Any.toJSON(e82.gildings)),e82.id!==void 0&&(n.id=e82.id),e82.ignoreReports!==void 0&&(n.ignoreReports=e82.ignoreReports),e82.isSubmitter!==void 0&&(n.isSubmitter=e82.isSubmitter),e82.likes!==void 0&&(n.likes=e82.likes),e82.linkId!==void 0&&(n.linkId=e82.linkId),e82.locked!==void 0&&(n.locked=e82.locked),e82.modNote!==void 0&&(n.modNote=e82.modNote),e82.modReasonBy!==void 0&&(n.modReasonBy=e82.modReasonBy),e82.modReasonTitle!==void 0&&(n.modReasonTitle=e82.modReasonTitle),e82.name!==void 0&&(n.name=e82.name),e82.noFollow!==void 0&&(n.noFollow=e82.noFollow),e82.numReports!==void 0&&(n.numReports=e82.numReports),e82.parentId!==void 0&&(n.parentId=e82.parentId),e82.permalink!==void 0&&(n.permalink=e82.permalink),e82.removalReason!==void 0&&(n.removalReason=e82.removalReason),e82.removed!==void 0&&(n.removed=e82.removed),e82.replies!==void 0&&(n.replies=e82.replies),e82.reportReasons!==void 0&&(n.reportReasons=e82.reportReasons),e82.rteMode!==void 0&&(n.rteMode=e82.rteMode),e82.saved!==void 0&&(n.saved=e82.saved),e82.score!==void 0&&(n.score=e82.score),e82.scoreHidden!==void 0&&(n.scoreHidden=e82.scoreHidden),e82.sendReplies!==void 0&&(n.sendReplies=e82.sendReplies),e82.spam!==void 0&&(n.spam=e82.spam),e82.stickied!==void 0&&(n.stickied=e82.stickied),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.subredditId!==void 0&&(n.subredditId=e82.subredditId),e82.subredditNamePrefixed!==void 0&&(n.subredditNamePrefixed=e82.subredditNamePrefixed),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.topAwardedType!==void 0&&(n.topAwardedType=e82.topAwardedType),e82.totalAwardsReceived!==void 0&&(n.totalAwardsReceived=e82.totalAwardsReceived),(r=e82.treatmentTags)!=null&&r.length&&(n.treatmentTags=e82.treatmentTags.map(f=>Any.toJSON(f))),e82.unrepliableReason!==void 0&&(n.unrepliableReason=e82.unrepliableReason),e82.ups!==void 0&&(n.ups=e82.ups),e82.depth!==void 0&&(n.depth=e82.depth),e82.linkTitle!==void 0&&(n.linkTitle=e82.linkTitle),e82.linkAuthor!==void 0&&(n.linkAuthor=e82.linkAuthor),e82.numComments!==void 0&&(n.numComments=e82.numComments),e82.over18!==void 0&&(n.over18=e82.over18),e82.linkPermalink!==void 0&&(n.linkPermalink=e82.linkPermalink),e82.quarantine!==void 0&&(n.quarantine=e82.quarantine),e82.linkUrl!==void 0&&(n.linkUrl=e82.linkUrl),e82.selftext!==void 0&&(n.selftext=e82.selftext),e82.selftextHtml!==void 0&&(n.selftextHtml=e82.selftextHtml),e82.thumbnail!==void 0&&(n.thumbnail=e82.thumbnail),e82.thumbnailWidth!==void 0&&(n.thumbnailWidth=e82.thumbnailWidth),e82.thumbnailHeight!==void 0&&(n.thumbnailHeight=e82.thumbnailHeight),e82.title!==void 0&&(n.title=e82.title),e82.url!==void 0&&(n.url=e82.url),e82.displayName!==void 0&&(n.displayName=e82.displayName),(a=e82.modPermissions)!=null&&a.length&&(n.modPermissions=e82.modPermissions),e82.count!==void 0&&(n.count=e82.count),e82.children!==void 0&&(n.children=e82.children),e82.replyList!==void 0&&(n.replyList=Listing.toJSON(e82.replyList)),e82.hidden!==void 0&&(n.hidden=e82.hidden),e82.linkFlairBackgroundColor!==void 0&&(n.linkFlairBackgroundColor=e82.linkFlairBackgroundColor),e82.linkFlairCssClass!==void 0&&(n.linkFlairCssClass=e82.linkFlairCssClass),(u=e82.linkFlairRichtext)!=null&&u.length&&(n.linkFlairRichtext=e82.linkFlairRichtext.map(f=>RedditObject_LinkFlairRichText.toJSON(f))),e82.linkFlairTemplateId!==void 0&&(n.linkFlairTemplateId=e82.linkFlairTemplateId),e82.linkFlairText!==void 0&&(n.linkFlairText=e82.linkFlairText),e82.linkFlairTextColor!==void 0&&(n.linkFlairTextColor=e82.linkFlairTextColor),e82.linkFlairType!==void 0&&(n.linkFlairType=e82.linkFlairType),e82.secureMedia!==void 0&&(n.secureMedia=RedditObject_SecureMedia.toJSON(e82.secureMedia)),e82.spoiler!==!1&&(n.spoiler=e82.spoiler),(l=e82.modReports)!=null&&l.length&&(n.modReports=e82.modReports),(s=e82.userReports)!=null&&s.length&&(n.userReports=e82.userReports),e82.removedBy!==void 0&&(n.removedBy=e82.removedBy),e82.removedByCategory!==void 0&&(n.removedByCategory=e82.removedByCategory),n},create(e82){return RedditObject.fromPartial(e82??{})},fromPartial(e82){var t,o,d,r,a,u,l,s;let n=createBaseRedditObject();return n.allAwardings=((t=e82.allAwardings)==null?void 0:t.map(f=>Any.fromPartial(f)))||[],n.approved=e82.approved??void 0,n.approvedAtUtc=e82.approvedAtUtc??void 0,n.approvedBy=e82.approvedBy??void 0,n.archived=e82.archived??void 0,n.associatedAward=e82.associatedAward??void 0,n.author=e82.author??void 0,n.authorFlairBackgroundColor=e82.authorFlairBackgroundColor??void 0,n.authorFlairCssClass=e82.authorFlairCssClass??void 0,n.authorFlairRichtext=((o=e82.authorFlairRichtext)==null?void 0:o.map(f=>RedditObject_AuthorFlairRichText.fromPartial(f)))||[],n.authorFlairTemplateId=e82.authorFlairTemplateId??void 0,n.authorFlairText=e82.authorFlairText??void 0,n.authorFlairTextColor=e82.authorFlairTextColor??void 0,n.authorFlairType=e82.authorFlairType??void 0,n.authorFullname=e82.authorFullname??void 0,n.authorIsBlocked=e82.authorIsBlocked??void 0,n.authorPatreonFlair=e82.authorPatreonFlair??void 0,n.authorPremium=e82.authorPremium??void 0,n.awarders=((d=e82.awarders)==null?void 0:d.map(f=>f))||[],n.bannedAtUtc=e82.bannedAtUtc??void 0,n.bannedBy=e82.bannedBy??void 0,n.body=e82.body??void 0,n.bodyHtml=e82.bodyHtml??void 0,n.canGild=e82.canGild??void 0,n.canModPost=e82.canModPost??void 0,n.collapsed=e82.collapsed??void 0,n.collapsedBecauseCrowdControl=e82.collapsedBecauseCrowdControl??void 0,n.collapsedReason=e82.collapsedReason??void 0,n.collapsedReasonCode=e82.collapsedReasonCode??void 0,n.commentType=e82.commentType??void 0,n.controversiality=e82.controversiality??void 0,n.created=e82.created??void 0,n.createdUtc=e82.createdUtc??void 0,n.distinguished=e82.distinguished??void 0,n.downs=e82.downs??void 0,n.edited=e82.edited??void 0,n.gilded=e82.gilded??void 0,n.gildings=e82.gildings!==void 0&&e82.gildings!==null?Any.fromPartial(e82.gildings):void 0,n.id=e82.id??void 0,n.ignoreReports=e82.ignoreReports??void 0,n.isSubmitter=e82.isSubmitter??void 0,n.likes=e82.likes??void 0,n.linkId=e82.linkId??void 0,n.locked=e82.locked??void 0,n.modNote=e82.modNote??void 0,n.modReasonBy=e82.modReasonBy??void 0,n.modReasonTitle=e82.modReasonTitle??void 0,n.name=e82.name??void 0,n.noFollow=e82.noFollow??void 0,n.numReports=e82.numReports??void 0,n.parentId=e82.parentId??void 0,n.permalink=e82.permalink??void 0,n.removalReason=e82.removalReason??void 0,n.removed=e82.removed??void 0,n.replies=e82.replies??void 0,n.reportReasons=e82.reportReasons??void 0,n.rteMode=e82.rteMode??void 0,n.saved=e82.saved??void 0,n.score=e82.score??void 0,n.scoreHidden=e82.scoreHidden??void 0,n.sendReplies=e82.sendReplies??void 0,n.spam=e82.spam??void 0,n.stickied=e82.stickied??void 0,n.subreddit=e82.subreddit??void 0,n.subredditId=e82.subredditId??void 0,n.subredditNamePrefixed=e82.subredditNamePrefixed??void 0,n.subredditType=e82.subredditType??void 0,n.topAwardedType=e82.topAwardedType??void 0,n.totalAwardsReceived=e82.totalAwardsReceived??void 0,n.treatmentTags=((r=e82.treatmentTags)==null?void 0:r.map(f=>Any.fromPartial(f)))||[],n.unrepliableReason=e82.unrepliableReason??void 0,n.ups=e82.ups??void 0,n.depth=e82.depth??void 0,n.linkTitle=e82.linkTitle??void 0,n.linkAuthor=e82.linkAuthor??void 0,n.numComments=e82.numComments??void 0,n.over18=e82.over18??void 0,n.linkPermalink=e82.linkPermalink??void 0,n.quarantine=e82.quarantine??void 0,n.linkUrl=e82.linkUrl??void 0,n.selftext=e82.selftext??void 0,n.selftextHtml=e82.selftextHtml??void 0,n.thumbnail=e82.thumbnail??void 0,n.thumbnailWidth=e82.thumbnailWidth??void 0,n.thumbnailHeight=e82.thumbnailHeight??void 0,n.title=e82.title??void 0,n.url=e82.url??void 0,n.displayName=e82.displayName??void 0,n.modPermissions=((a=e82.modPermissions)==null?void 0:a.map(f=>f))||[],n.count=e82.count??void 0,n.children=e82.children??void 0,n.replyList=e82.replyList!==void 0&&e82.replyList!==null?Listing.fromPartial(e82.replyList):void 0,n.hidden=e82.hidden??void 0,n.linkFlairBackgroundColor=e82.linkFlairBackgroundColor??void 0,n.linkFlairCssClass=e82.linkFlairCssClass??void 0,n.linkFlairRichtext=((u=e82.linkFlairRichtext)==null?void 0:u.map(f=>RedditObject_LinkFlairRichText.fromPartial(f)))||[],n.linkFlairTemplateId=e82.linkFlairTemplateId??void 0,n.linkFlairText=e82.linkFlairText??void 0,n.linkFlairTextColor=e82.linkFlairTextColor??void 0,n.linkFlairType=e82.linkFlairType??void 0,n.secureMedia=e82.secureMedia!==void 0&&e82.secureMedia!==null?RedditObject_SecureMedia.fromPartial(e82.secureMedia):void 0,n.spoiler=e82.spoiler??!1,n.modReports=((l=e82.modReports)==null?void 0:l.map(f=>f))||[],n.userReports=((s=e82.userReports)==null?void 0:s.map(f=>f))||[],n.removedBy=e82.removedBy??void 0,n.removedByCategory=e82.removedByCategory??void 0,n}};messageTypeRegistry.set(RedditObject.$type,RedditObject);function createBaseRedditObject_OEmbed(){return{type:"",title:void 0,providerName:void 0,providerUrl:void 0,version:"",thumbnailWidth:void 0,thumbnailHeight:void 0,thumbnailUrl:void 0,html:"",height:void 0,width:void 0,authorUrl:void 0,authorName:void 0}}var RedditObject_OEmbed={$type:"devvit.plugin.redditapi.common.RedditObject.OEmbed",encode(e82,n=_m0.Writer.create()){return e82.type!==""&&n.uint32(10).string(e82.type),e82.title!==void 0&&n.uint32(18).string(e82.title),e82.providerName!==void 0&&n.uint32(26).string(e82.providerName),e82.providerUrl!==void 0&&n.uint32(34).string(e82.providerUrl),e82.version!==""&&n.uint32(42).string(e82.version),e82.thumbnailWidth!==void 0&&Int32Value.encode({value:e82.thumbnailWidth},n.uint32(50).fork()).ldelim(),e82.thumbnailHeight!==void 0&&Int32Value.encode({value:e82.thumbnailHeight},n.uint32(58).fork()).ldelim(),e82.thumbnailUrl!==void 0&&n.uint32(66).string(e82.thumbnailUrl),e82.html!==""&&n.uint32(74).string(e82.html),e82.height!==void 0&&Int32Value.encode({value:e82.height},n.uint32(82).fork()).ldelim(),e82.width!==void 0&&Int32Value.encode({value:e82.width},n.uint32(90).fork()).ldelim(),e82.authorUrl!==void 0&&n.uint32(98).string(e82.authorUrl),e82.authorName!==void 0&&n.uint32(106).string(e82.authorName),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedditObject_OEmbed();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.type=t.string();continue;case 2:if(r!==18)break;d.title=t.string();continue;case 3:if(r!==26)break;d.providerName=t.string();continue;case 4:if(r!==34)break;d.providerUrl=t.string();continue;case 5:if(r!==42)break;d.version=t.string();continue;case 6:if(r!==50)break;d.thumbnailWidth=Int32Value.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.thumbnailHeight=Int32Value.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.thumbnailUrl=t.string();continue;case 9:if(r!==74)break;d.html=t.string();continue;case 10:if(r!==82)break;d.height=Int32Value.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.width=Int32Value.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.authorUrl=t.string();continue;case 13:if(r!==106)break;d.authorName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{type:isSet$M(e82.type)?globalThis.String(e82.type):"",title:isSet$M(e82.title)?globalThis.String(e82.title):void 0,providerName:isSet$M(e82.providerName)?globalThis.String(e82.providerName):void 0,providerUrl:isSet$M(e82.providerUrl)?globalThis.String(e82.providerUrl):void 0,version:isSet$M(e82.version)?globalThis.String(e82.version):"",thumbnailWidth:isSet$M(e82.thumbnailWidth)?Number(e82.thumbnailWidth):void 0,thumbnailHeight:isSet$M(e82.thumbnailHeight)?Number(e82.thumbnailHeight):void 0,thumbnailUrl:isSet$M(e82.thumbnailUrl)?globalThis.String(e82.thumbnailUrl):void 0,html:isSet$M(e82.html)?globalThis.String(e82.html):"",height:isSet$M(e82.height)?Number(e82.height):void 0,width:isSet$M(e82.width)?Number(e82.width):void 0,authorUrl:isSet$M(e82.authorUrl)?globalThis.String(e82.authorUrl):void 0,authorName:isSet$M(e82.authorName)?globalThis.String(e82.authorName):void 0}},toJSON(e82){let n={};return e82.type!==""&&(n.type=e82.type),e82.title!==void 0&&(n.title=e82.title),e82.providerName!==void 0&&(n.providerName=e82.providerName),e82.providerUrl!==void 0&&(n.providerUrl=e82.providerUrl),e82.version!==""&&(n.version=e82.version),e82.thumbnailWidth!==void 0&&(n.thumbnailWidth=e82.thumbnailWidth),e82.thumbnailHeight!==void 0&&(n.thumbnailHeight=e82.thumbnailHeight),e82.thumbnailUrl!==void 0&&(n.thumbnailUrl=e82.thumbnailUrl),e82.html!==""&&(n.html=e82.html),e82.height!==void 0&&(n.height=e82.height),e82.width!==void 0&&(n.width=e82.width),e82.authorUrl!==void 0&&(n.authorUrl=e82.authorUrl),e82.authorName!==void 0&&(n.authorName=e82.authorName),n},create(e82){return RedditObject_OEmbed.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedditObject_OEmbed();return n.type=e82.type??"",n.title=e82.title??void 0,n.providerName=e82.providerName??void 0,n.providerUrl=e82.providerUrl??void 0,n.version=e82.version??"",n.thumbnailWidth=e82.thumbnailWidth??void 0,n.thumbnailHeight=e82.thumbnailHeight??void 0,n.thumbnailUrl=e82.thumbnailUrl??void 0,n.html=e82.html??"",n.height=e82.height??void 0,n.width=e82.width??void 0,n.authorUrl=e82.authorUrl??void 0,n.authorName=e82.authorName??void 0,n}};messageTypeRegistry.set(RedditObject_OEmbed.$type,RedditObject_OEmbed);function createBaseRedditObject_RedditVideo(){return{bitrateKbps:void 0,dashUrl:void 0,duration:void 0,fallbackUrl:void 0,height:void 0,hlsUrl:void 0,isGif:void 0,scrubberMediaUrl:void 0,transcodingStatus:void 0,width:void 0}}var RedditObject_RedditVideo={$type:"devvit.plugin.redditapi.common.RedditObject.RedditVideo",encode(e82,n=_m0.Writer.create()){return e82.bitrateKbps!==void 0&&Int32Value.encode({value:e82.bitrateKbps},n.uint32(10).fork()).ldelim(),e82.dashUrl!==void 0&&StringValue.encode({value:e82.dashUrl},n.uint32(18).fork()).ldelim(),e82.duration!==void 0&&Int32Value.encode({value:e82.duration},n.uint32(26).fork()).ldelim(),e82.fallbackUrl!==void 0&&StringValue.encode({value:e82.fallbackUrl},n.uint32(34).fork()).ldelim(),e82.height!==void 0&&Int32Value.encode({value:e82.height},n.uint32(42).fork()).ldelim(),e82.hlsUrl!==void 0&&StringValue.encode({value:e82.hlsUrl},n.uint32(50).fork()).ldelim(),e82.isGif!==void 0&&BoolValue.encode({value:e82.isGif},n.uint32(58).fork()).ldelim(),e82.scrubberMediaUrl!==void 0&&StringValue.encode({value:e82.scrubberMediaUrl},n.uint32(66).fork()).ldelim(),e82.transcodingStatus!==void 0&&StringValue.encode({value:e82.transcodingStatus},n.uint32(74).fork()).ldelim(),e82.width!==void 0&&Int32Value.encode({value:e82.width},n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedditObject_RedditVideo();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.bitrateKbps=Int32Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.dashUrl=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.duration=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.fallbackUrl=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.height=Int32Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.hlsUrl=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.isGif=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.scrubberMediaUrl=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.transcodingStatus=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.width=Int32Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{bitrateKbps:isSet$M(e82.bitrateKbps)?Number(e82.bitrateKbps):void 0,dashUrl:isSet$M(e82.dashUrl)?String(e82.dashUrl):void 0,duration:isSet$M(e82.duration)?Number(e82.duration):void 0,fallbackUrl:isSet$M(e82.fallbackUrl)?String(e82.fallbackUrl):void 0,height:isSet$M(e82.height)?Number(e82.height):void 0,hlsUrl:isSet$M(e82.hlsUrl)?String(e82.hlsUrl):void 0,isGif:isSet$M(e82.isGif)?!!e82.isGif:void 0,scrubberMediaUrl:isSet$M(e82.scrubberMediaUrl)?String(e82.scrubberMediaUrl):void 0,transcodingStatus:isSet$M(e82.transcodingStatus)?String(e82.transcodingStatus):void 0,width:isSet$M(e82.width)?Number(e82.width):void 0}},toJSON(e82){let n={};return e82.bitrateKbps!==void 0&&(n.bitrateKbps=e82.bitrateKbps),e82.dashUrl!==void 0&&(n.dashUrl=e82.dashUrl),e82.duration!==void 0&&(n.duration=e82.duration),e82.fallbackUrl!==void 0&&(n.fallbackUrl=e82.fallbackUrl),e82.height!==void 0&&(n.height=e82.height),e82.hlsUrl!==void 0&&(n.hlsUrl=e82.hlsUrl),e82.isGif!==void 0&&(n.isGif=e82.isGif),e82.scrubberMediaUrl!==void 0&&(n.scrubberMediaUrl=e82.scrubberMediaUrl),e82.transcodingStatus!==void 0&&(n.transcodingStatus=e82.transcodingStatus),e82.width!==void 0&&(n.width=e82.width),n},create(e82){return RedditObject_RedditVideo.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedditObject_RedditVideo();return n.bitrateKbps=e82.bitrateKbps??void 0,n.dashUrl=e82.dashUrl??void 0,n.duration=e82.duration??void 0,n.fallbackUrl=e82.fallbackUrl??void 0,n.height=e82.height??void 0,n.hlsUrl=e82.hlsUrl??void 0,n.isGif=e82.isGif??void 0,n.scrubberMediaUrl=e82.scrubberMediaUrl??void 0,n.transcodingStatus=e82.transcodingStatus??void 0,n.width=e82.width??void 0,n}};messageTypeRegistry.set(RedditObject_RedditVideo.$type,RedditObject_RedditVideo);function createBaseRedditObject_AuthorFlairRichText(){return{e:void 0,t:void 0,a:void 0,u:void 0}}var RedditObject_AuthorFlairRichText={$type:"devvit.plugin.redditapi.common.RedditObject.AuthorFlairRichText",encode(e82,n=_m0.Writer.create()){return e82.e!==void 0&&StringValue.encode({value:e82.e},n.uint32(10).fork()).ldelim(),e82.t!==void 0&&StringValue.encode({value:e82.t},n.uint32(18).fork()).ldelim(),e82.a!==void 0&&StringValue.encode({value:e82.a},n.uint32(26).fork()).ldelim(),e82.u!==void 0&&StringValue.encode({value:e82.u},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedditObject_AuthorFlairRichText();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.e=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.t=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.a=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.u=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{e:isSet$M(e82.e)?String(e82.e):void 0,t:isSet$M(e82.t)?String(e82.t):void 0,a:isSet$M(e82.a)?String(e82.a):void 0,u:isSet$M(e82.u)?String(e82.u):void 0}},toJSON(e82){let n={};return e82.e!==void 0&&(n.e=e82.e),e82.t!==void 0&&(n.t=e82.t),e82.a!==void 0&&(n.a=e82.a),e82.u!==void 0&&(n.u=e82.u),n},create(e82){return RedditObject_AuthorFlairRichText.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedditObject_AuthorFlairRichText();return n.e=e82.e??void 0,n.t=e82.t??void 0,n.a=e82.a??void 0,n.u=e82.u??void 0,n}};messageTypeRegistry.set(RedditObject_AuthorFlairRichText.$type,RedditObject_AuthorFlairRichText);function createBaseRedditObject_LinkFlairRichText(){return{e:void 0,t:void 0,a:void 0,u:void 0}}var RedditObject_LinkFlairRichText={$type:"devvit.plugin.redditapi.common.RedditObject.LinkFlairRichText",encode(e82,n=_m0.Writer.create()){return e82.e!==void 0&&StringValue.encode({value:e82.e},n.uint32(10).fork()).ldelim(),e82.t!==void 0&&StringValue.encode({value:e82.t},n.uint32(18).fork()).ldelim(),e82.a!==void 0&&StringValue.encode({value:e82.a},n.uint32(26).fork()).ldelim(),e82.u!==void 0&&StringValue.encode({value:e82.u},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedditObject_LinkFlairRichText();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.e=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.t=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.a=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.u=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{e:isSet$M(e82.e)?String(e82.e):void 0,t:isSet$M(e82.t)?String(e82.t):void 0,a:isSet$M(e82.a)?String(e82.a):void 0,u:isSet$M(e82.u)?String(e82.u):void 0}},toJSON(e82){let n={};return e82.e!==void 0&&(n.e=e82.e),e82.t!==void 0&&(n.t=e82.t),e82.a!==void 0&&(n.a=e82.a),e82.u!==void 0&&(n.u=e82.u),n},create(e82){return RedditObject_LinkFlairRichText.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedditObject_LinkFlairRichText();return n.e=e82.e??void 0,n.t=e82.t??void 0,n.a=e82.a??void 0,n.u=e82.u??void 0,n}};messageTypeRegistry.set(RedditObject_LinkFlairRichText.$type,RedditObject_LinkFlairRichText);function createBaseRedditObject_SecureMedia(){return{type:"",oembed:void 0,redditVideo:void 0}}var RedditObject_SecureMedia={$type:"devvit.plugin.redditapi.common.RedditObject.SecureMedia",encode(e82,n=_m0.Writer.create()){return e82.type!==""&&n.uint32(10).string(e82.type),e82.oembed!==void 0&&RedditObject_OEmbed.encode(e82.oembed,n.uint32(18).fork()).ldelim(),e82.redditVideo!==void 0&&RedditObject_RedditVideo.encode(e82.redditVideo,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedditObject_SecureMedia();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.type=t.string();continue;case 2:if(r!==18)break;d.oembed=RedditObject_OEmbed.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.redditVideo=RedditObject_RedditVideo.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{type:isSet$M(e82.type)?globalThis.String(e82.type):"",oembed:isSet$M(e82.oembed)?RedditObject_OEmbed.fromJSON(e82.oembed):void 0,redditVideo:isSet$M(e82.redditVideo)?RedditObject_RedditVideo.fromJSON(e82.redditVideo):void 0}},toJSON(e82){let n={};return e82.type!==""&&(n.type=e82.type),e82.oembed!==void 0&&(n.oembed=RedditObject_OEmbed.toJSON(e82.oembed)),e82.redditVideo!==void 0&&(n.redditVideo=RedditObject_RedditVideo.toJSON(e82.redditVideo)),n},create(e82){return RedditObject_SecureMedia.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedditObject_SecureMedia();return n.type=e82.type??"",n.oembed=e82.oembed!==void 0&&e82.oembed!==null?RedditObject_OEmbed.fromPartial(e82.oembed):void 0,n.redditVideo=e82.redditVideo!==void 0&&e82.redditVideo!==null?RedditObject_RedditVideo.fromPartial(e82.redditVideo):void 0,n}};messageTypeRegistry.set(RedditObject_SecureMedia.$type,RedditObject_SecureMedia);function createBaseSubredditObject(){return{defaultSet:void 0,userIsContributor:void 0,bannerImg:void 0,restrictPosting:void 0,userIsBanned:void 0,freeFormReports:void 0,communityIcon:void 0,showMedia:void 0,iconColor:void 0,displayName:void 0,headerImg:void 0,title:void 0,coins:void 0,previousNames:[],over18:void 0,iconSize:[],primaryColor:void 0,iconImg:void 0,description:void 0,submitLinkLabel:void 0,headerSize:void 0,restrictCommenting:void 0,subscribers:void 0,submitTextLabel:void 0,isDefaultIcon:void 0,linkFlairPosition:void 0,displayNamePrefixed:void 0,keyColor:void 0,name:void 0,isDefaultBanner:void 0,url:void 0,quarantine:void 0,bannerSize:[],userIsModerator:void 0,acceptFollowers:void 0,publicDescription:void 0,linkFlairEnabled:void 0,disableContributorRequests:void 0,subredditType:void 0,userIsSubscriber:void 0,publicDescriptionHtml:void 0,id:void 0,userIsMuted:!1}}var SubredditObject={$type:"devvit.plugin.redditapi.common.SubredditObject",encode(e82,n=_m0.Writer.create()){e82.defaultSet!==void 0&&BoolValue.encode({value:e82.defaultSet},n.uint32(10).fork()).ldelim(),e82.userIsContributor!==void 0&&BoolValue.encode({value:e82.userIsContributor},n.uint32(18).fork()).ldelim(),e82.bannerImg!==void 0&&StringValue.encode({value:e82.bannerImg},n.uint32(26).fork()).ldelim(),e82.restrictPosting!==void 0&&BoolValue.encode({value:e82.restrictPosting},n.uint32(34).fork()).ldelim(),e82.userIsBanned!==void 0&&BoolValue.encode({value:e82.userIsBanned},n.uint32(42).fork()).ldelim(),e82.freeFormReports!==void 0&&BoolValue.encode({value:e82.freeFormReports},n.uint32(50).fork()).ldelim(),e82.communityIcon!==void 0&&StringValue.encode({value:e82.communityIcon},n.uint32(58).fork()).ldelim(),e82.showMedia!==void 0&&BoolValue.encode({value:e82.showMedia},n.uint32(66).fork()).ldelim(),e82.iconColor!==void 0&&StringValue.encode({value:e82.iconColor},n.uint32(74).fork()).ldelim(),e82.displayName!==void 0&&StringValue.encode({value:e82.displayName},n.uint32(90).fork()).ldelim(),e82.headerImg!==void 0&&StringValue.encode({value:e82.headerImg},n.uint32(98).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(106).fork()).ldelim(),e82.coins!==void 0&&Int64Value.encode({value:e82.coins},n.uint32(114).fork()).ldelim();for(let t of e82.previousNames)StringValue.encode({value:t},n.uint32(122).fork()).ldelim();e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(130).fork()).ldelim();for(let t of e82.iconSize)Int32Value.encode({value:t},n.uint32(138).fork()).ldelim();e82.primaryColor!==void 0&&StringValue.encode({value:e82.primaryColor},n.uint32(146).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(154).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(162).fork()).ldelim(),e82.submitLinkLabel!==void 0&&StringValue.encode({value:e82.submitLinkLabel},n.uint32(170).fork()).ldelim(),e82.headerSize!==void 0&&StringValue.encode({value:e82.headerSize},n.uint32(178).fork()).ldelim(),e82.restrictCommenting!==void 0&&BoolValue.encode({value:e82.restrictCommenting},n.uint32(186).fork()).ldelim(),e82.subscribers!==void 0&&Int64Value.encode({value:e82.subscribers},n.uint32(194).fork()).ldelim(),e82.submitTextLabel!==void 0&&StringValue.encode({value:e82.submitTextLabel},n.uint32(202).fork()).ldelim(),e82.isDefaultIcon!==void 0&&BoolValue.encode({value:e82.isDefaultIcon},n.uint32(210).fork()).ldelim(),e82.linkFlairPosition!==void 0&&StringValue.encode({value:e82.linkFlairPosition},n.uint32(218).fork()).ldelim(),e82.displayNamePrefixed!==void 0&&StringValue.encode({value:e82.displayNamePrefixed},n.uint32(226).fork()).ldelim(),e82.keyColor!==void 0&&StringValue.encode({value:e82.keyColor},n.uint32(234).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(242).fork()).ldelim(),e82.isDefaultBanner!==void 0&&BoolValue.encode({value:e82.isDefaultBanner},n.uint32(250).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(258).fork()).ldelim(),e82.quarantine!==void 0&&BoolValue.encode({value:e82.quarantine},n.uint32(266).fork()).ldelim();for(let t of e82.bannerSize)Int32Value.encode({value:t},n.uint32(274).fork()).ldelim();return e82.userIsModerator!==void 0&&BoolValue.encode({value:e82.userIsModerator},n.uint32(282).fork()).ldelim(),e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(290).fork()).ldelim(),e82.publicDescription!==void 0&&StringValue.encode({value:e82.publicDescription},n.uint32(298).fork()).ldelim(),e82.linkFlairEnabled!==void 0&&BoolValue.encode({value:e82.linkFlairEnabled},n.uint32(306).fork()).ldelim(),e82.disableContributorRequests!==void 0&&BoolValue.encode({value:e82.disableContributorRequests},n.uint32(314).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(322).fork()).ldelim(),e82.userIsSubscriber!==void 0&&BoolValue.encode({value:e82.userIsSubscriber},n.uint32(330).fork()).ldelim(),e82.publicDescriptionHtml!==void 0&&StringValue.encode({value:e82.publicDescriptionHtml},n.uint32(338).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(346).fork()).ldelim(),e82.userIsMuted!==!1&&n.uint32(352).bool(e82.userIsMuted),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.defaultSet=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.userIsContributor=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.bannerImg=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.restrictPosting=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.userIsBanned=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.freeFormReports=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.communityIcon=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.showMedia=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.iconColor=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.displayName=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.headerImg=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.title=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.coins=Int64Value.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.previousNames.push(StringValue.decode(t,t.uint32()).value);continue;case 16:if(r!==130)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.iconSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 18:if(r!==146)break;d.primaryColor=StringValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.submitLinkLabel=StringValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.headerSize=StringValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.restrictCommenting=BoolValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.subscribers=Int64Value.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.submitTextLabel=StringValue.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.isDefaultIcon=BoolValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.linkFlairPosition=StringValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.displayNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.keyColor=StringValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.isDefaultBanner=BoolValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.quarantine=BoolValue.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.bannerSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 35:if(r!==282)break;d.userIsModerator=BoolValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.publicDescription=StringValue.decode(t,t.uint32()).value;continue;case 38:if(r!==306)break;d.linkFlairEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 39:if(r!==314)break;d.disableContributorRequests=BoolValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 41:if(r!==330)break;d.userIsSubscriber=BoolValue.decode(t,t.uint32()).value;continue;case 42:if(r!==338)break;d.publicDescriptionHtml=StringValue.decode(t,t.uint32()).value;continue;case 43:if(r!==346)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 44:if(r!==352)break;d.userIsMuted=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{defaultSet:isSet$M(e82.defaultSet)?!!e82.defaultSet:void 0,userIsContributor:isSet$M(e82.userIsContributor)?!!e82.userIsContributor:void 0,bannerImg:isSet$M(e82.bannerImg)?String(e82.bannerImg):void 0,restrictPosting:isSet$M(e82.restrictPosting)?!!e82.restrictPosting:void 0,userIsBanned:isSet$M(e82.userIsBanned)?!!e82.userIsBanned:void 0,freeFormReports:isSet$M(e82.freeFormReports)?!!e82.freeFormReports:void 0,communityIcon:isSet$M(e82.communityIcon)?String(e82.communityIcon):void 0,showMedia:isSet$M(e82.showMedia)?!!e82.showMedia:void 0,iconColor:isSet$M(e82.iconColor)?String(e82.iconColor):void 0,displayName:isSet$M(e82.displayName)?String(e82.displayName):void 0,headerImg:isSet$M(e82.headerImg)?String(e82.headerImg):void 0,title:isSet$M(e82.title)?String(e82.title):void 0,coins:isSet$M(e82.coins)?Number(e82.coins):void 0,previousNames:globalThis.Array.isArray(e82?.previousNames)?e82.previousNames.map(n=>String(n)):[],over18:isSet$M(e82.over18)?!!e82.over18:void 0,iconSize:globalThis.Array.isArray(e82?.iconSize)?e82.iconSize.map(n=>Number(n)):[],primaryColor:isSet$M(e82.primaryColor)?String(e82.primaryColor):void 0,iconImg:isSet$M(e82.iconImg)?String(e82.iconImg):void 0,description:isSet$M(e82.description)?String(e82.description):void 0,submitLinkLabel:isSet$M(e82.submitLinkLabel)?String(e82.submitLinkLabel):void 0,headerSize:isSet$M(e82.headerSize)?String(e82.headerSize):void 0,restrictCommenting:isSet$M(e82.restrictCommenting)?!!e82.restrictCommenting:void 0,subscribers:isSet$M(e82.subscribers)?Number(e82.subscribers):void 0,submitTextLabel:isSet$M(e82.submitTextLabel)?String(e82.submitTextLabel):void 0,isDefaultIcon:isSet$M(e82.isDefaultIcon)?!!e82.isDefaultIcon:void 0,linkFlairPosition:isSet$M(e82.linkFlairPosition)?String(e82.linkFlairPosition):void 0,displayNamePrefixed:isSet$M(e82.displayNamePrefixed)?String(e82.displayNamePrefixed):void 0,keyColor:isSet$M(e82.keyColor)?String(e82.keyColor):void 0,name:isSet$M(e82.name)?String(e82.name):void 0,isDefaultBanner:isSet$M(e82.isDefaultBanner)?!!e82.isDefaultBanner:void 0,url:isSet$M(e82.url)?String(e82.url):void 0,quarantine:isSet$M(e82.quarantine)?!!e82.quarantine:void 0,bannerSize:globalThis.Array.isArray(e82?.bannerSize)?e82.bannerSize.map(n=>Number(n)):[],userIsModerator:isSet$M(e82.userIsModerator)?!!e82.userIsModerator:void 0,acceptFollowers:isSet$M(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,publicDescription:isSet$M(e82.publicDescription)?String(e82.publicDescription):void 0,linkFlairEnabled:isSet$M(e82.linkFlairEnabled)?!!e82.linkFlairEnabled:void 0,disableContributorRequests:isSet$M(e82.disableContributorRequests)?!!e82.disableContributorRequests:void 0,subredditType:isSet$M(e82.subredditType)?String(e82.subredditType):void 0,userIsSubscriber:isSet$M(e82.userIsSubscriber)?!!e82.userIsSubscriber:void 0,publicDescriptionHtml:isSet$M(e82.publicDescriptionHtml)?String(e82.publicDescriptionHtml):void 0,id:isSet$M(e82.id)?String(e82.id):void 0,userIsMuted:isSet$M(e82.userIsMuted)?globalThis.Boolean(e82.userIsMuted):!1}},toJSON(e82){var t,o,d;let n={};return e82.defaultSet!==void 0&&(n.defaultSet=e82.defaultSet),e82.userIsContributor!==void 0&&(n.userIsContributor=e82.userIsContributor),e82.bannerImg!==void 0&&(n.bannerImg=e82.bannerImg),e82.restrictPosting!==void 0&&(n.restrictPosting=e82.restrictPosting),e82.userIsBanned!==void 0&&(n.userIsBanned=e82.userIsBanned),e82.freeFormReports!==void 0&&(n.freeFormReports=e82.freeFormReports),e82.communityIcon!==void 0&&(n.communityIcon=e82.communityIcon),e82.showMedia!==void 0&&(n.showMedia=e82.showMedia),e82.iconColor!==void 0&&(n.iconColor=e82.iconColor),e82.displayName!==void 0&&(n.displayName=e82.displayName),e82.headerImg!==void 0&&(n.headerImg=e82.headerImg),e82.title!==void 0&&(n.title=e82.title),e82.coins!==void 0&&(n.coins=e82.coins),(t=e82.previousNames)!=null&&t.length&&(n.previousNames=e82.previousNames),e82.over18!==void 0&&(n.over18=e82.over18),(o=e82.iconSize)!=null&&o.length&&(n.iconSize=e82.iconSize),e82.primaryColor!==void 0&&(n.primaryColor=e82.primaryColor),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.description!==void 0&&(n.description=e82.description),e82.submitLinkLabel!==void 0&&(n.submitLinkLabel=e82.submitLinkLabel),e82.headerSize!==void 0&&(n.headerSize=e82.headerSize),e82.restrictCommenting!==void 0&&(n.restrictCommenting=e82.restrictCommenting),e82.subscribers!==void 0&&(n.subscribers=e82.subscribers),e82.submitTextLabel!==void 0&&(n.submitTextLabel=e82.submitTextLabel),e82.isDefaultIcon!==void 0&&(n.isDefaultIcon=e82.isDefaultIcon),e82.linkFlairPosition!==void 0&&(n.linkFlairPosition=e82.linkFlairPosition),e82.displayNamePrefixed!==void 0&&(n.displayNamePrefixed=e82.displayNamePrefixed),e82.keyColor!==void 0&&(n.keyColor=e82.keyColor),e82.name!==void 0&&(n.name=e82.name),e82.isDefaultBanner!==void 0&&(n.isDefaultBanner=e82.isDefaultBanner),e82.url!==void 0&&(n.url=e82.url),e82.quarantine!==void 0&&(n.quarantine=e82.quarantine),(d=e82.bannerSize)!=null&&d.length&&(n.bannerSize=e82.bannerSize),e82.userIsModerator!==void 0&&(n.userIsModerator=e82.userIsModerator),e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.publicDescription!==void 0&&(n.publicDescription=e82.publicDescription),e82.linkFlairEnabled!==void 0&&(n.linkFlairEnabled=e82.linkFlairEnabled),e82.disableContributorRequests!==void 0&&(n.disableContributorRequests=e82.disableContributorRequests),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.userIsSubscriber!==void 0&&(n.userIsSubscriber=e82.userIsSubscriber),e82.publicDescriptionHtml!==void 0&&(n.publicDescriptionHtml=e82.publicDescriptionHtml),e82.id!==void 0&&(n.id=e82.id),e82.userIsMuted!==!1&&(n.userIsMuted=e82.userIsMuted),n},create(e82){return SubredditObject.fromPartial(e82??{})},fromPartial(e82){var t,o,d;let n=createBaseSubredditObject();return n.defaultSet=e82.defaultSet??void 0,n.userIsContributor=e82.userIsContributor??void 0,n.bannerImg=e82.bannerImg??void 0,n.restrictPosting=e82.restrictPosting??void 0,n.userIsBanned=e82.userIsBanned??void 0,n.freeFormReports=e82.freeFormReports??void 0,n.communityIcon=e82.communityIcon??void 0,n.showMedia=e82.showMedia??void 0,n.iconColor=e82.iconColor??void 0,n.displayName=e82.displayName??void 0,n.headerImg=e82.headerImg??void 0,n.title=e82.title??void 0,n.coins=e82.coins??void 0,n.previousNames=((t=e82.previousNames)==null?void 0:t.map(r=>r))||[],n.over18=e82.over18??void 0,n.iconSize=((o=e82.iconSize)==null?void 0:o.map(r=>r))||[],n.primaryColor=e82.primaryColor??void 0,n.iconImg=e82.iconImg??void 0,n.description=e82.description??void 0,n.submitLinkLabel=e82.submitLinkLabel??void 0,n.headerSize=e82.headerSize??void 0,n.restrictCommenting=e82.restrictCommenting??void 0,n.subscribers=e82.subscribers??void 0,n.submitTextLabel=e82.submitTextLabel??void 0,n.isDefaultIcon=e82.isDefaultIcon??void 0,n.linkFlairPosition=e82.linkFlairPosition??void 0,n.displayNamePrefixed=e82.displayNamePrefixed??void 0,n.keyColor=e82.keyColor??void 0,n.name=e82.name??void 0,n.isDefaultBanner=e82.isDefaultBanner??void 0,n.url=e82.url??void 0,n.quarantine=e82.quarantine??void 0,n.bannerSize=((d=e82.bannerSize)==null?void 0:d.map(r=>r))||[],n.userIsModerator=e82.userIsModerator??void 0,n.acceptFollowers=e82.acceptFollowers??void 0,n.publicDescription=e82.publicDescription??void 0,n.linkFlairEnabled=e82.linkFlairEnabled??void 0,n.disableContributorRequests=e82.disableContributorRequests??void 0,n.subredditType=e82.subredditType??void 0,n.userIsSubscriber=e82.userIsSubscriber??void 0,n.publicDescriptionHtml=e82.publicDescriptionHtml??void 0,n.id=e82.id??void 0,n.userIsMuted=e82.userIsMuted??!1,n}};messageTypeRegistry.set(SubredditObject.$type,SubredditObject);function createBaseJsonStatus(){return{json:void 0}}var JsonStatus={$type:"devvit.plugin.redditapi.common.JsonStatus",encode(e82,n=_m0.Writer.create()){return e82.json!==void 0&&JsonStatus_JsonErrorType.encode(e82.json,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseJsonStatus();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;d.json=JsonStatus_JsonErrorType.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{json:isSet$M(e82.json)?JsonStatus_JsonErrorType.fromJSON(e82.json):void 0}},toJSON(e82){let n={};return e82.json!==void 0&&(n.json=JsonStatus_JsonErrorType.toJSON(e82.json)),n},create(e82){return JsonStatus.fromPartial(e82??{})},fromPartial(e82){let n=createBaseJsonStatus();return n.json=e82.json!==void 0&&e82.json!==null?JsonStatus_JsonErrorType.fromPartial(e82.json):void 0,n}};messageTypeRegistry.set(JsonStatus.$type,JsonStatus);function createBaseJsonStatus_JsonErrorType(){return{errors:[]}}var JsonStatus_JsonErrorType={$type:"devvit.plugin.redditapi.common.JsonStatus.JsonErrorType",encode(e82,n=_m0.Writer.create()){for(let t of e82.errors)StringValue.encode({value:t},n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseJsonStatus_JsonErrorType();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.errors.push(StringValue.decode(t,t.uint32()).value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{errors:globalThis.Array.isArray(e82?.errors)?e82.errors.map(n=>String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.errors)!=null&&t.length&&(n.errors=e82.errors),n},create(e82){return JsonStatus_JsonErrorType.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseJsonStatus_JsonErrorType();return n.errors=((t=e82.errors)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(JsonStatus_JsonErrorType.$type,JsonStatus_JsonErrorType);function createBaseWrappedUserObject(){return{id:void 0,data:void 0}}var WrappedUserObject={$type:"devvit.plugin.redditapi.common.WrappedUserObject",encode(e82,n=_m0.Writer.create()){return e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&User.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWrappedUserObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=User.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$M(e82.id)?String(e82.id):void 0,data:isSet$M(e82.data)?User.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.id!==void 0&&(n.id=e82.id),e82.data!==void 0&&(n.data=User.toJSON(e82.data)),n},create(e82){return WrappedUserObject.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWrappedUserObject();return n.id=e82.id??void 0,n.data=e82.data!==void 0&&e82.data!==null?User.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(WrappedUserObject.$type,WrappedUserObject);function createBaseApiClientConfig(){return{method:"",path:"",requestBodyType:0,enforceJson:!1,requestKindValue:"",validateContentIdContext:"",validateSubredditContext:"",useCustomResponseParser:!1}}var ApiClientConfig={$type:"devvit.plugin.redditapi.common.ApiClientConfig",encode(e82,n=_m0.Writer.create()){return e82.method!==""&&n.uint32(10).string(e82.method),e82.path!==""&&n.uint32(18).string(e82.path),e82.requestBodyType!==0&&n.uint32(24).int32(e82.requestBodyType),e82.enforceJson!==!1&&n.uint32(32).bool(e82.enforceJson),e82.requestKindValue!==""&&n.uint32(42).string(e82.requestKindValue),e82.validateContentIdContext!==""&&n.uint32(50).string(e82.validateContentIdContext),e82.validateSubredditContext!==""&&n.uint32(58).string(e82.validateSubredditContext),e82.useCustomResponseParser!==!1&&n.uint32(64).bool(e82.useCustomResponseParser),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseApiClientConfig();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.method=t.string();continue;case 2:if(r!==18)break;d.path=t.string();continue;case 3:if(r!==24)break;d.requestBodyType=t.int32();continue;case 4:if(r!==32)break;d.enforceJson=t.bool();continue;case 5:if(r!==42)break;d.requestKindValue=t.string();continue;case 6:if(r!==50)break;d.validateContentIdContext=t.string();continue;case 7:if(r!==58)break;d.validateSubredditContext=t.string();continue;case 8:if(r!==64)break;d.useCustomResponseParser=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{method:isSet$M(e82.method)?globalThis.String(e82.method):"",path:isSet$M(e82.path)?globalThis.String(e82.path):"",requestBodyType:isSet$M(e82.requestBodyType)?apiClientConfig_BodyTypeFromJSON(e82.requestBodyType):0,enforceJson:isSet$M(e82.enforceJson)?globalThis.Boolean(e82.enforceJson):!1,requestKindValue:isSet$M(e82.requestKindValue)?globalThis.String(e82.requestKindValue):"",validateContentIdContext:isSet$M(e82.validateContentIdContext)?globalThis.String(e82.validateContentIdContext):"",validateSubredditContext:isSet$M(e82.validateSubredditContext)?globalThis.String(e82.validateSubredditContext):"",useCustomResponseParser:isSet$M(e82.useCustomResponseParser)?globalThis.Boolean(e82.useCustomResponseParser):!1}},toJSON(e82){let n={};return e82.method!==""&&(n.method=e82.method),e82.path!==""&&(n.path=e82.path),e82.requestBodyType!==0&&(n.requestBodyType=apiClientConfig_BodyTypeToJSON(e82.requestBodyType)),e82.enforceJson!==!1&&(n.enforceJson=e82.enforceJson),e82.requestKindValue!==""&&(n.requestKindValue=e82.requestKindValue),e82.validateContentIdContext!==""&&(n.validateContentIdContext=e82.validateContentIdContext),e82.validateSubredditContext!==""&&(n.validateSubredditContext=e82.validateSubredditContext),e82.useCustomResponseParser!==!1&&(n.useCustomResponseParser=e82.useCustomResponseParser),n},create(e82){return ApiClientConfig.fromPartial(e82??{})},fromPartial(e82){let n=createBaseApiClientConfig();return n.method=e82.method??"",n.path=e82.path??"",n.requestBodyType=e82.requestBodyType??0,n.enforceJson=e82.enforceJson??!1,n.requestKindValue=e82.requestKindValue??"",n.validateContentIdContext=e82.validateContentIdContext??"",n.validateSubredditContext=e82.validateSubredditContext??"",n.useCustomResponseParser=e82.useCustomResponseParser??!1,n}};messageTypeRegistry.set(ApiClientConfig.$type,ApiClientConfig);function isSet$M(e82){return e82!=null}var OrderResultStatus;(function(e82){e82[e82.STATUS_CANCELLED=0]="STATUS_CANCELLED",e82[e82.STATUS_SUCCESS=1]="STATUS_SUCCESS",e82[e82.STATUS_ERROR=2]="STATUS_ERROR",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(OrderResultStatus||(OrderResultStatus={}));function orderResultStatusFromJSON(e82){switch(e82){case 0:case"STATUS_CANCELLED":return OrderResultStatus.STATUS_CANCELLED;case 1:case"STATUS_SUCCESS":return OrderResultStatus.STATUS_SUCCESS;case 2:case"STATUS_ERROR":return OrderResultStatus.STATUS_ERROR;case-1:case"UNRECOGNIZED":default:return OrderResultStatus.UNRECOGNIZED}}function orderResultStatusToJSON(e82){switch(e82){case OrderResultStatus.STATUS_CANCELLED:return 0;case OrderResultStatus.STATUS_SUCCESS:return 1;case OrderResultStatus.STATUS_ERROR:return 2;case OrderResultStatus.UNRECOGNIZED:default:return-1}}function createBaseCreateOrderEffect(){return{id:"",skus:[],metadata:{}}}var CreateOrderEffect={$type:"devvit.ui.effects.v1alpha.CreateOrderEffect",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id);for(let t of e82.skus)n.uint32(18).string(t);return Object.entries(e82.metadata).forEach(([t,o])=>{CreateOrderEffect_MetadataEntry.encode({key:t,value:o},n.uint32(26).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCreateOrderEffect();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.skus.push(t.string());continue;case 3:if(r!==26)break;let a=CreateOrderEffect_MetadataEntry.decode(t,t.uint32());a.value!==void 0&&(d.metadata[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$L(e82.id)?globalThis.String(e82.id):"",skus:globalThis.Array.isArray(e82?.skus)?e82.skus.map(n=>globalThis.String(n)):[],metadata:isObject$o(e82.metadata)?Object.entries(e82.metadata).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{}}},toJSON(e82){var t;let n={};if(e82.id!==""&&(n.id=e82.id),(t=e82.skus)!=null&&t.length&&(n.skus=e82.skus),e82.metadata){let o=Object.entries(e82.metadata);o.length>0&&(n.metadata={},o.forEach(([d,r])=>{n.metadata[d]=r}))}return n},create(e82){return CreateOrderEffect.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseCreateOrderEffect();return n.id=e82.id??"",n.skus=((t=e82.skus)==null?void 0:t.map(o=>o))||[],n.metadata=Object.entries(e82.metadata??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=globalThis.String(r)),o),{}),n}};messageTypeRegistry.set(CreateOrderEffect.$type,CreateOrderEffect);function createBaseCreateOrderEffect_MetadataEntry(){return{key:"",value:""}}var CreateOrderEffect_MetadataEntry={$type:"devvit.ui.effects.v1alpha.CreateOrderEffect.MetadataEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCreateOrderEffect_MetadataEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$L(e82.key)?globalThis.String(e82.key):"",value:isSet$L(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return CreateOrderEffect_MetadataEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCreateOrderEffect_MetadataEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(CreateOrderEffect_MetadataEntry.$type,CreateOrderEffect_MetadataEntry);function createBaseOrderResultEvent(){return{errorMessage:void 0,orderId:void 0,order:void 0,status:0,errorCode:void 0}}var OrderResultEvent={$type:"devvit.ui.effects.v1alpha.OrderResultEvent",encode(e82,n=_m0.Writer.create()){return e82.errorMessage!==void 0&&n.uint32(18).string(e82.errorMessage),e82.orderId!==void 0&&n.uint32(26).string(e82.orderId),e82.order!==void 0&&CreateOrderEffect.encode(e82.order,n.uint32(34).fork()).ldelim(),e82.status!==0&&n.uint32(40).int32(e82.status),e82.errorCode!==void 0&&n.uint32(48).int32(e82.errorCode),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseOrderResultEvent();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;d.errorMessage=t.string();continue;case 3:if(r!==26)break;d.orderId=t.string();continue;case 4:if(r!==34)break;d.order=CreateOrderEffect.decode(t,t.uint32());continue;case 5:if(r!==40)break;d.status=t.int32();continue;case 6:if(r!==48)break;d.errorCode=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{errorMessage:isSet$L(e82.errorMessage)?globalThis.String(e82.errorMessage):void 0,orderId:isSet$L(e82.orderId)?globalThis.String(e82.orderId):void 0,order:isSet$L(e82.order)?CreateOrderEffect.fromJSON(e82.order):void 0,status:isSet$L(e82.status)?orderResultStatusFromJSON(e82.status):0,errorCode:isSet$L(e82.errorCode)?globalThis.Number(e82.errorCode):void 0}},toJSON(e82){let n={};return e82.errorMessage!==void 0&&(n.errorMessage=e82.errorMessage),e82.orderId!==void 0&&(n.orderId=e82.orderId),e82.order!==void 0&&(n.order=CreateOrderEffect.toJSON(e82.order)),e82.status!==0&&(n.status=orderResultStatusToJSON(e82.status)),e82.errorCode!==void 0&&(n.errorCode=Math.round(e82.errorCode)),n},create(e82){return OrderResultEvent.fromPartial(e82??{})},fromPartial(e82){let n=createBaseOrderResultEvent();return n.errorMessage=e82.errorMessage??void 0,n.orderId=e82.orderId??void 0,n.order=e82.order!==void 0&&e82.order!==null?CreateOrderEffect.fromPartial(e82.order):void 0,n.status=e82.status??0,n.errorCode=e82.errorCode??void 0,n}};messageTypeRegistry.set(OrderResultEvent.$type,OrderResultEvent);function isObject$o(e82){return typeof e82=="object"&&e82!==null}function isSet$L(e82){return e82!=null}function createBaseDuration(){return{seconds:0,nanos:0}}var Duration={$type:"google.protobuf.Duration",encode(e82,n=_m0.Writer.create()){return e82.seconds!==0&&n.uint32(8).int64(e82.seconds),e82.nanos!==0&&n.uint32(16).int32(e82.nanos),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDuration();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.seconds=longToNumber$4(t.int64());continue;case 2:if(r!==16)break;d.nanos=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{seconds:isSet$K(e82.seconds)?globalThis.Number(e82.seconds):0,nanos:isSet$K(e82.nanos)?globalThis.Number(e82.nanos):0}},toJSON(e82){let n={};return e82.seconds!==0&&(n.seconds=Math.round(e82.seconds)),e82.nanos!==0&&(n.nanos=Math.round(e82.nanos)),n},create(e82){return Duration.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDuration();return n.seconds=e82.seconds??0,n.nanos=e82.nanos??0,n}};messageTypeRegistry.set(Duration.$type,Duration);function longToNumber$4(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isSet$K(e82){return e82!=null}function createBaseSetIntervalsEffect(){return{intervals:{}}}var SetIntervalsEffect={$type:"devvit.ui.effects.v1alpha.SetIntervalsEffect",encode(e82,n=_m0.Writer.create()){return Object.entries(e82.intervals).forEach(([t,o])=>{SetIntervalsEffect_IntervalsEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSetIntervalsEffect();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=SetIntervalsEffect_IntervalsEntry.decode(t,t.uint32());a.value!==void 0&&(d.intervals[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{intervals:isObject$n(e82.intervals)?Object.entries(e82.intervals).reduce((n,[t,o])=>(n[t]=IntervalDetails.fromJSON(o),n),{}):{}}},toJSON(e82){let n={};if(e82.intervals){let t=Object.entries(e82.intervals);t.length>0&&(n.intervals={},t.forEach(([o,d])=>{n.intervals[o]=IntervalDetails.toJSON(d)}))}return n},create(e82){return SetIntervalsEffect.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSetIntervalsEffect();return n.intervals=Object.entries(e82.intervals??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=IntervalDetails.fromPartial(d)),t),{}),n}};messageTypeRegistry.set(SetIntervalsEffect.$type,SetIntervalsEffect);function createBaseSetIntervalsEffect_IntervalsEntry(){return{key:"",value:void 0}}var SetIntervalsEffect_IntervalsEntry={$type:"devvit.ui.effects.v1alpha.SetIntervalsEffect.IntervalsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&IntervalDetails.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSetIntervalsEffect_IntervalsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=IntervalDetails.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$J(e82.key)?globalThis.String(e82.key):"",value:isSet$J(e82.value)?IntervalDetails.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=IntervalDetails.toJSON(e82.value)),n},create(e82){return SetIntervalsEffect_IntervalsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSetIntervalsEffect_IntervalsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?IntervalDetails.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(SetIntervalsEffect_IntervalsEntry.$type,SetIntervalsEffect_IntervalsEntry);function createBaseIntervalDetails(){return{duration:void 0,async:void 0}}var IntervalDetails={$type:"devvit.ui.effects.v1alpha.IntervalDetails",encode(e82,n=_m0.Writer.create()){return e82.duration!==void 0&&Duration.encode(e82.duration,n.uint32(10).fork()).ldelim(),e82.async!==void 0&&BoolValue.encode({value:e82.async},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseIntervalDetails();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.duration=Duration.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.async=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{duration:isSet$J(e82.duration)?Duration.fromJSON(e82.duration):void 0,async:isSet$J(e82.async)?!!e82.async:void 0}},toJSON(e82){let n={};return e82.duration!==void 0&&(n.duration=Duration.toJSON(e82.duration)),e82.async!==void 0&&(n.async=e82.async),n},create(e82){return IntervalDetails.fromPartial(e82??{})},fromPartial(e82){let n=createBaseIntervalDetails();return n.duration=e82.duration!==void 0&&e82.duration!==null?Duration.fromPartial(e82.duration):void 0,n.async=e82.async??void 0,n}};messageTypeRegistry.set(IntervalDetails.$type,IntervalDetails);function isObject$n(e82){return typeof e82=="object"&&e82!==null}function isSet$J(e82){return e82!=null}function createBaseNavigateToUrlEffect(){return{url:"",target:void 0}}var NavigateToUrlEffect={$type:"devvit.ui.effects.v1alpha.NavigateToUrlEffect",encode(e82,n=_m0.Writer.create()){return e82.url!==""&&n.uint32(10).string(e82.url),e82.target!==void 0&&n.uint32(18).string(e82.target),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseNavigateToUrlEffect();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=t.string();continue;case 2:if(r!==18)break;d.target=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$I(e82.url)?globalThis.String(e82.url):"",target:isSet$I(e82.target)?globalThis.String(e82.target):void 0}},toJSON(e82){let n={};return e82.url!==""&&(n.url=e82.url),e82.target!==void 0&&(n.target=e82.target),n},create(e82){return NavigateToUrlEffect.fromPartial(e82??{})},fromPartial(e82){let n=createBaseNavigateToUrlEffect();return n.url=e82.url??"",n.target=e82.target??void 0,n}};messageTypeRegistry.set(NavigateToUrlEffect.$type,NavigateToUrlEffect);function isSet$I(e82){return e82!=null}function createBaseRealtimeRequest(){return{channels:[]}}var RealtimeRequest={$type:"devvit.events.v1alpha.RealtimeRequest",encode(e82,n=_m0.Writer.create()){for(let t of e82.channels)n.uint32(10).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRealtimeRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.channels.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{channels:globalThis.Array.isArray(e82?.channels)?e82.channels.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.channels)!=null&&t.length&&(n.channels=e82.channels),n},create(e82){return RealtimeRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseRealtimeRequest();return n.channels=((t=e82.channels)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(RealtimeRequest.$type,RealtimeRequest);function createBaseRealtimeEvent(){return{channel:"",data:void 0}}var RealtimeEvent={$type:"devvit.events.v1alpha.RealtimeEvent",encode(e82,n=_m0.Writer.create()){return e82.channel!==""&&n.uint32(10).string(e82.channel),e82.data!==void 0&&Struct.encode(Struct.wrap(e82.data),n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRealtimeEvent();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.channel=t.string();continue;case 2:if(r!==18)break;d.data=Struct.unwrap(Struct.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{channel:isSet$H(e82.channel)?globalThis.String(e82.channel):"",data:isObject$m(e82.data)?e82.data:void 0}},toJSON(e82){let n={};return e82.channel!==""&&(n.channel=e82.channel),e82.data!==void 0&&(n.data=e82.data),n},create(e82){return RealtimeEvent.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRealtimeEvent();return n.channel=e82.channel??"",n.data=e82.data??void 0,n}};messageTypeRegistry.set(RealtimeEvent.$type,RealtimeEvent);var RealtimeDefinition={name:"Realtime",fullName:"devvit.events.v1alpha.Realtime",methods:{subscribe:{name:"Subscribe",requestType:RealtimeRequest,requestStream:!1,responseType:RealtimeEvent,responseStream:!0,options:{}},send:{name:"Send",requestType:RealtimeEvent,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}}}};function isObject$m(e82){return typeof e82=="object"&&e82!==null}function isSet$H(e82){return e82!=null}var RealtimeSubscriptionStatus;(function(e82){e82[e82.REALTIME_SUBSCRIBED=0]="REALTIME_SUBSCRIBED",e82[e82.REALTIME_UNSUBSCRIBED=1]="REALTIME_UNSUBSCRIBED",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(RealtimeSubscriptionStatus||(RealtimeSubscriptionStatus={}));function realtimeSubscriptionStatusFromJSON(e82){switch(e82){case 0:case"REALTIME_SUBSCRIBED":return RealtimeSubscriptionStatus.REALTIME_SUBSCRIBED;case 1:case"REALTIME_UNSUBSCRIBED":return RealtimeSubscriptionStatus.REALTIME_UNSUBSCRIBED;case-1:case"UNRECOGNIZED":default:return RealtimeSubscriptionStatus.UNRECOGNIZED}}function realtimeSubscriptionStatusToJSON(e82){switch(e82){case RealtimeSubscriptionStatus.REALTIME_SUBSCRIBED:return 0;case RealtimeSubscriptionStatus.REALTIME_UNSUBSCRIBED:return 1;case RealtimeSubscriptionStatus.UNRECOGNIZED:default:return-1}}function createBaseRealtimeSubscriptionsEffect(){return{subscriptionIds:[]}}var RealtimeSubscriptionsEffect={$type:"devvit.ui.effects.v1alpha.RealtimeSubscriptionsEffect",encode(e82,n=_m0.Writer.create()){for(let t of e82.subscriptionIds)n.uint32(10).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRealtimeSubscriptionsEffect();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subscriptionIds.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subscriptionIds:globalThis.Array.isArray(e82?.subscriptionIds)?e82.subscriptionIds.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.subscriptionIds)!=null&&t.length&&(n.subscriptionIds=e82.subscriptionIds),n},create(e82){return RealtimeSubscriptionsEffect.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseRealtimeSubscriptionsEffect();return n.subscriptionIds=((t=e82.subscriptionIds)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(RealtimeSubscriptionsEffect.$type,RealtimeSubscriptionsEffect);function createBaseRealtimeSubscriptionEvent(){return{event:void 0,status:void 0}}var RealtimeSubscriptionEvent={$type:"devvit.ui.effects.v1alpha.RealtimeSubscriptionEvent",encode(e82,n=_m0.Writer.create()){return e82.event!==void 0&&RealtimeEvent.encode(e82.event,n.uint32(10).fork()).ldelim(),e82.status!==void 0&&n.uint32(16).int32(e82.status),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRealtimeSubscriptionEvent();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.event=RealtimeEvent.decode(t,t.uint32());continue;case 2:if(r!==16)break;d.status=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{event:isSet$G(e82.event)?RealtimeEvent.fromJSON(e82.event):void 0,status:isSet$G(e82.status)?realtimeSubscriptionStatusFromJSON(e82.status):void 0}},toJSON(e82){let n={};return e82.event!==void 0&&(n.event=RealtimeEvent.toJSON(e82.event)),e82.status!==void 0&&(n.status=realtimeSubscriptionStatusToJSON(e82.status)),n},create(e82){return RealtimeSubscriptionEvent.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRealtimeSubscriptionEvent();return n.event=e82.event!==void 0&&e82.event!==null?RealtimeEvent.fromPartial(e82.event):void 0,n.status=e82.status??void 0,n}};messageTypeRegistry.set(RealtimeSubscriptionEvent.$type,RealtimeSubscriptionEvent);function isSet$G(e82){return e82!=null}function createBaseReloadPartEffect(){return{subreddit:void 0,post:void 0,comment:void 0}}var ReloadPartEffect={$type:"devvit.ui.effects.v1alpha.ReloadPartEffect",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==void 0&&ReloadPartEffect_Subreddit.encode(e82.subreddit,n.uint32(10).fork()).ldelim(),e82.post!==void 0&&ReloadPartEffect_Post.encode(e82.post,n.uint32(18).fork()).ldelim(),e82.comment!==void 0&&ReloadPartEffect_Comment.encode(e82.comment,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseReloadPartEffect();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=ReloadPartEffect_Subreddit.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.post=ReloadPartEffect_Post.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.comment=ReloadPartEffect_Comment.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$F(e82.subreddit)?ReloadPartEffect_Subreddit.fromJSON(e82.subreddit):void 0,post:isSet$F(e82.post)?ReloadPartEffect_Post.fromJSON(e82.post):void 0,comment:isSet$F(e82.comment)?ReloadPartEffect_Comment.fromJSON(e82.comment):void 0}},toJSON(e82){let n={};return e82.subreddit!==void 0&&(n.subreddit=ReloadPartEffect_Subreddit.toJSON(e82.subreddit)),e82.post!==void 0&&(n.post=ReloadPartEffect_Post.toJSON(e82.post)),e82.comment!==void 0&&(n.comment=ReloadPartEffect_Comment.toJSON(e82.comment)),n},create(e82){return ReloadPartEffect.fromPartial(e82??{})},fromPartial(e82){let n=createBaseReloadPartEffect();return n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?ReloadPartEffect_Subreddit.fromPartial(e82.subreddit):void 0,n.post=e82.post!==void 0&&e82.post!==null?ReloadPartEffect_Post.fromPartial(e82.post):void 0,n.comment=e82.comment!==void 0&&e82.comment!==null?ReloadPartEffect_Comment.fromPartial(e82.comment):void 0,n}};messageTypeRegistry.set(ReloadPartEffect.$type,ReloadPartEffect);function createBaseReloadPartEffect_Subreddit(){return{subredditId:""}}var ReloadPartEffect_Subreddit={$type:"devvit.ui.effects.v1alpha.ReloadPartEffect.Subreddit",encode(e82,n=_m0.Writer.create()){return e82.subredditId!==""&&n.uint32(10).string(e82.subredditId),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseReloadPartEffect_Subreddit();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subredditId=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subredditId:isSet$F(e82.subredditId)?globalThis.String(e82.subredditId):""}},toJSON(e82){let n={};return e82.subredditId!==""&&(n.subredditId=e82.subredditId),n},create(e82){return ReloadPartEffect_Subreddit.fromPartial(e82??{})},fromPartial(e82){let n=createBaseReloadPartEffect_Subreddit();return n.subredditId=e82.subredditId??"",n}};messageTypeRegistry.set(ReloadPartEffect_Subreddit.$type,ReloadPartEffect_Subreddit);function createBaseReloadPartEffect_Post(){return{postId:"",body:void 0,comments:void 0}}var ReloadPartEffect_Post={$type:"devvit.ui.effects.v1alpha.ReloadPartEffect.Post",encode(e82,n=_m0.Writer.create()){return e82.postId!==""&&n.uint32(10).string(e82.postId),e82.body!==void 0&&n.uint32(16).bool(e82.body),e82.comments!==void 0&&n.uint32(24).bool(e82.comments),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseReloadPartEffect_Post();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.postId=t.string();continue;case 2:if(r!==16)break;d.body=t.bool();continue;case 3:if(r!==24)break;d.comments=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{postId:isSet$F(e82.postId)?globalThis.String(e82.postId):"",body:isSet$F(e82.body)?globalThis.Boolean(e82.body):void 0,comments:isSet$F(e82.comments)?globalThis.Boolean(e82.comments):void 0}},toJSON(e82){let n={};return e82.postId!==""&&(n.postId=e82.postId),e82.body!==void 0&&(n.body=e82.body),e82.comments!==void 0&&(n.comments=e82.comments),n},create(e82){return ReloadPartEffect_Post.fromPartial(e82??{})},fromPartial(e82){let n=createBaseReloadPartEffect_Post();return n.postId=e82.postId??"",n.body=e82.body??void 0,n.comments=e82.comments??void 0,n}};messageTypeRegistry.set(ReloadPartEffect_Post.$type,ReloadPartEffect_Post);function createBaseReloadPartEffect_Comment(){return{postId:"",commentId:"",replies:void 0}}var ReloadPartEffect_Comment={$type:"devvit.ui.effects.v1alpha.ReloadPartEffect.Comment",encode(e82,n=_m0.Writer.create()){return e82.postId!==""&&n.uint32(10).string(e82.postId),e82.commentId!==""&&n.uint32(18).string(e82.commentId),e82.replies!==void 0&&n.uint32(24).bool(e82.replies),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseReloadPartEffect_Comment();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.postId=t.string();continue;case 2:if(r!==18)break;d.commentId=t.string();continue;case 3:if(r!==24)break;d.replies=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{postId:isSet$F(e82.postId)?globalThis.String(e82.postId):"",commentId:isSet$F(e82.commentId)?globalThis.String(e82.commentId):"",replies:isSet$F(e82.replies)?globalThis.Boolean(e82.replies):void 0}},toJSON(e82){let n={};return e82.postId!==""&&(n.postId=e82.postId),e82.commentId!==""&&(n.commentId=e82.commentId),e82.replies!==void 0&&(n.replies=e82.replies),n},create(e82){return ReloadPartEffect_Comment.fromPartial(e82??{})},fromPartial(e82){let n=createBaseReloadPartEffect_Comment();return n.postId=e82.postId??"",n.commentId=e82.commentId??"",n.replies=e82.replies??void 0,n}};messageTypeRegistry.set(ReloadPartEffect_Comment.$type,ReloadPartEffect_Comment);function isSet$F(e82){return e82!=null}function createBaseRerenderEffect(){return{delaySeconds:void 0}}var RerenderEffect={$type:"devvit.ui.effects.v1alpha.RerenderEffect",encode(e82,n=_m0.Writer.create()){return e82.delaySeconds!==void 0&&n.uint32(13).float(e82.delaySeconds),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRerenderEffect();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==13)break;d.delaySeconds=t.float();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{delaySeconds:isSet$E(e82.delaySeconds)?globalThis.Number(e82.delaySeconds):void 0}},toJSON(e82){let n={};return e82.delaySeconds!==void 0&&(n.delaySeconds=e82.delaySeconds),n},create(e82){return RerenderEffect.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRerenderEffect();return n.delaySeconds=e82.delaySeconds??void 0,n}};messageTypeRegistry.set(RerenderEffect.$type,RerenderEffect);function isSet$E(e82){return e82!=null}function createBaseShowFormEffect(){return{form:void 0}}var ShowFormEffect={$type:"devvit.ui.effects.v1alpha.ShowFormEffect",encode(e82,n=_m0.Writer.create()){return e82.form!==void 0&&Form.encode(e82.form,n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseShowFormEffect();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.form=Form.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{form:isSet$D(e82.form)?Form.fromJSON(e82.form):void 0}},toJSON(e82){let n={};return e82.form!==void 0&&(n.form=Form.toJSON(e82.form)),n},create(e82){return ShowFormEffect.fromPartial(e82??{})},fromPartial(e82){let n=createBaseShowFormEffect();return n.form=e82.form!==void 0&&e82.form!==null?Form.fromPartial(e82.form):void 0,n}};messageTypeRegistry.set(ShowFormEffect.$type,ShowFormEffect);function createBaseFormSubmittedEvent(){return{results:{},formId:void 0}}var FormSubmittedEvent={$type:"devvit.ui.effects.v1alpha.FormSubmittedEvent",encode(e82,n=_m0.Writer.create()){return Object.entries(e82.results).forEach(([t,o])=>{FormSubmittedEvent_ResultsEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),e82.formId!==void 0&&n.uint32(18).string(e82.formId),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFormSubmittedEvent();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=FormSubmittedEvent_ResultsEntry.decode(t,t.uint32());a.value!==void 0&&(d.results[a.key]=a.value);continue;case 2:if(r!==18)break;d.formId=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{results:isObject$l(e82.results)?Object.entries(e82.results).reduce((n,[t,o])=>(n[t]=FormFieldValue.fromJSON(o),n),{}):{},formId:isSet$D(e82.formId)?globalThis.String(e82.formId):void 0}},toJSON(e82){let n={};if(e82.results){let t=Object.entries(e82.results);t.length>0&&(n.results={},t.forEach(([o,d])=>{n.results[o]=FormFieldValue.toJSON(d)}))}return e82.formId!==void 0&&(n.formId=e82.formId),n},create(e82){return FormSubmittedEvent.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFormSubmittedEvent();return n.results=Object.entries(e82.results??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=FormFieldValue.fromPartial(d)),t),{}),n.formId=e82.formId??void 0,n}};messageTypeRegistry.set(FormSubmittedEvent.$type,FormSubmittedEvent);function createBaseFormSubmittedEvent_ResultsEntry(){return{key:"",value:void 0}}var FormSubmittedEvent_ResultsEntry={$type:"devvit.ui.effects.v1alpha.FormSubmittedEvent.ResultsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&FormFieldValue.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFormSubmittedEvent_ResultsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=FormFieldValue.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$D(e82.key)?globalThis.String(e82.key):"",value:isSet$D(e82.value)?FormFieldValue.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=FormFieldValue.toJSON(e82.value)),n},create(e82){return FormSubmittedEvent_ResultsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFormSubmittedEvent_ResultsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?FormFieldValue.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(FormSubmittedEvent_ResultsEntry.$type,FormSubmittedEvent_ResultsEntry);function isObject$l(e82){return typeof e82=="object"&&e82!==null}function isSet$D(e82){return e82!=null}var ToastAppearance;(function(e82){e82[e82.NEUTRAL=0]="NEUTRAL",e82[e82.SUCCESS=1]="SUCCESS",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ToastAppearance||(ToastAppearance={}));function toastAppearanceFromJSON(e82){switch(e82){case 0:case"NEUTRAL":return ToastAppearance.NEUTRAL;case 1:case"SUCCESS":return ToastAppearance.SUCCESS;case-1:case"UNRECOGNIZED":default:return ToastAppearance.UNRECOGNIZED}}function toastAppearanceToJSON(e82){switch(e82){case ToastAppearance.NEUTRAL:return 0;case ToastAppearance.SUCCESS:return 1;case ToastAppearance.UNRECOGNIZED:default:return-1}}function createBaseToastLeadingElement(){return{icon:void 0,emoji:void 0,avatar:void 0}}var ToastLeadingElement={$type:"devvit.ui.toast.ToastLeadingElement",encode(e82,n=_m0.Writer.create()){return e82.icon!==void 0&&n.uint32(10).string(e82.icon),e82.emoji!==void 0&&n.uint32(18).string(e82.emoji),e82.avatar!==void 0&&n.uint32(26).string(e82.avatar),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseToastLeadingElement();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.icon=t.string();continue;case 2:if(r!==18)break;d.emoji=t.string();continue;case 3:if(r!==26)break;d.avatar=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{icon:isSet$C(e82.icon)?globalThis.String(e82.icon):void 0,emoji:isSet$C(e82.emoji)?globalThis.String(e82.emoji):void 0,avatar:isSet$C(e82.avatar)?globalThis.String(e82.avatar):void 0}},toJSON(e82){let n={};return e82.icon!==void 0&&(n.icon=e82.icon),e82.emoji!==void 0&&(n.emoji=e82.emoji),e82.avatar!==void 0&&(n.avatar=e82.avatar),n},create(e82){return ToastLeadingElement.fromPartial(e82??{})},fromPartial(e82){let n=createBaseToastLeadingElement();return n.icon=e82.icon??void 0,n.emoji=e82.emoji??void 0,n.avatar=e82.avatar??void 0,n}};messageTypeRegistry.set(ToastLeadingElement.$type,ToastLeadingElement);function createBaseToastTrailingElement(){return{label:void 0,icon:void 0}}var ToastTrailingElement={$type:"devvit.ui.toast.ToastTrailingElement",encode(e82,n=_m0.Writer.create()){return e82.label!==void 0&&n.uint32(10).string(e82.label),e82.icon!==void 0&&n.uint32(18).string(e82.icon),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseToastTrailingElement();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.label=t.string();continue;case 2:if(r!==18)break;d.icon=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{label:isSet$C(e82.label)?globalThis.String(e82.label):void 0,icon:isSet$C(e82.icon)?globalThis.String(e82.icon):void 0}},toJSON(e82){let n={};return e82.label!==void 0&&(n.label=e82.label),e82.icon!==void 0&&(n.icon=e82.icon),n},create(e82){return ToastTrailingElement.fromPartial(e82??{})},fromPartial(e82){let n=createBaseToastTrailingElement();return n.label=e82.label??void 0,n.icon=e82.icon??void 0,n}};messageTypeRegistry.set(ToastTrailingElement.$type,ToastTrailingElement);function createBaseToast(){return{text:"",appearance:void 0,leadingElement:void 0,trailingElement:void 0}}var Toast={$type:"devvit.ui.toast.Toast",encode(e82,n=_m0.Writer.create()){return e82.text!==""&&n.uint32(10).string(e82.text),e82.appearance!==void 0&&n.uint32(16).int32(e82.appearance),e82.leadingElement!==void 0&&ToastLeadingElement.encode(e82.leadingElement,n.uint32(26).fork()).ldelim(),e82.trailingElement!==void 0&&ToastTrailingElement.encode(e82.trailingElement,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseToast();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.text=t.string();continue;case 2:if(r!==16)break;d.appearance=t.int32();continue;case 3:if(r!==26)break;d.leadingElement=ToastLeadingElement.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.trailingElement=ToastTrailingElement.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{text:isSet$C(e82.text)?globalThis.String(e82.text):"",appearance:isSet$C(e82.appearance)?toastAppearanceFromJSON(e82.appearance):void 0,leadingElement:isSet$C(e82.leadingElement)?ToastLeadingElement.fromJSON(e82.leadingElement):void 0,trailingElement:isSet$C(e82.trailingElement)?ToastTrailingElement.fromJSON(e82.trailingElement):void 0}},toJSON(e82){let n={};return e82.text!==""&&(n.text=e82.text),e82.appearance!==void 0&&(n.appearance=toastAppearanceToJSON(e82.appearance)),e82.leadingElement!==void 0&&(n.leadingElement=ToastLeadingElement.toJSON(e82.leadingElement)),e82.trailingElement!==void 0&&(n.trailingElement=ToastTrailingElement.toJSON(e82.trailingElement)),n},create(e82){return Toast.fromPartial(e82??{})},fromPartial(e82){let n=createBaseToast();return n.text=e82.text??"",n.appearance=e82.appearance??void 0,n.leadingElement=e82.leadingElement!==void 0&&e82.leadingElement!==null?ToastLeadingElement.fromPartial(e82.leadingElement):void 0,n.trailingElement=e82.trailingElement!==void 0&&e82.trailingElement!==null?ToastTrailingElement.fromPartial(e82.trailingElement):void 0,n}};messageTypeRegistry.set(Toast.$type,Toast);function isSet$C(e82){return e82!=null}function createBaseShowToastEffect(){return{toast:void 0}}var ShowToastEffect={$type:"devvit.ui.effects.v1alpha.ShowToastEffect",encode(e82,n=_m0.Writer.create()){return e82.toast!==void 0&&Toast.encode(e82.toast,n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseShowToastEffect();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.toast=Toast.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{toast:isSet$B(e82.toast)?Toast.fromJSON(e82.toast):void 0}},toJSON(e82){let n={};return e82.toast!==void 0&&(n.toast=Toast.toJSON(e82.toast)),n},create(e82){return ShowToastEffect.fromPartial(e82??{})},fromPartial(e82){let n=createBaseShowToastEffect();return n.toast=e82.toast!==void 0&&e82.toast!==null?Toast.fromPartial(e82.toast):void 0,n}};messageTypeRegistry.set(ShowToastEffect.$type,ShowToastEffect);function createBaseToastActionEvent(){return{}}var ToastActionEvent={$type:"devvit.ui.effects.v1alpha.ToastActionEvent",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseToastActionEvent();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return ToastActionEvent.fromPartial(e82??{})},fromPartial(e82){return createBaseToastActionEvent()}};messageTypeRegistry.set(ToastActionEvent.$type,ToastActionEvent);function isSet$B(e82){return e82!=null}var EffectType;(function(e82){e82[e82.EFFECT_REALTIME_SUB=0]="EFFECT_REALTIME_SUB",e82[e82.EFFECT_RERENDER_UI=1]="EFFECT_RERENDER_UI",e82[e82.EFFECT_RELOAD_PART=2]="EFFECT_RELOAD_PART",e82[e82.EFFECT_SHOW_FORM=3]="EFFECT_SHOW_FORM",e82[e82.EFFECT_SHOW_TOAST=4]="EFFECT_SHOW_TOAST",e82[e82.EFFECT_NAVIGATE_TO_URL=5]="EFFECT_NAVIGATE_TO_URL",e82[e82.EFFECT_SET_INTERVALS=7]="EFFECT_SET_INTERVALS",e82[e82.EFFECT_CREATE_ORDER=8]="EFFECT_CREATE_ORDER",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(EffectType||(EffectType={}));function effectTypeFromJSON(e82){switch(e82){case 0:case"EFFECT_REALTIME_SUB":return EffectType.EFFECT_REALTIME_SUB;case 1:case"EFFECT_RERENDER_UI":return EffectType.EFFECT_RERENDER_UI;case 2:case"EFFECT_RELOAD_PART":return EffectType.EFFECT_RELOAD_PART;case 3:case"EFFECT_SHOW_FORM":return EffectType.EFFECT_SHOW_FORM;case 4:case"EFFECT_SHOW_TOAST":return EffectType.EFFECT_SHOW_TOAST;case 5:case"EFFECT_NAVIGATE_TO_URL":return EffectType.EFFECT_NAVIGATE_TO_URL;case 7:case"EFFECT_SET_INTERVALS":return EffectType.EFFECT_SET_INTERVALS;case 8:case"EFFECT_CREATE_ORDER":return EffectType.EFFECT_CREATE_ORDER;case-1:case"UNRECOGNIZED":default:return EffectType.UNRECOGNIZED}}function effectTypeToJSON(e82){switch(e82){case EffectType.EFFECT_REALTIME_SUB:return 0;case EffectType.EFFECT_RERENDER_UI:return 1;case EffectType.EFFECT_RELOAD_PART:return 2;case EffectType.EFFECT_SHOW_FORM:return 3;case EffectType.EFFECT_SHOW_TOAST:return 4;case EffectType.EFFECT_NAVIGATE_TO_URL:return 5;case EffectType.EFFECT_SET_INTERVALS:return 7;case EffectType.EFFECT_CREATE_ORDER:return 8;case EffectType.UNRECOGNIZED:default:return-1}}function createBaseEffect(){return{realtimeSubscriptions:void 0,rerenderUi:void 0,reloadPart:void 0,showForm:void 0,showToast:void 0,navigateToUrl:void 0,interval:void 0,createOrder:void 0,type:0}}var Effect={$type:"devvit.ui.effects.v1alpha.Effect",encode(e82,n=_m0.Writer.create()){return e82.realtimeSubscriptions!==void 0&&RealtimeSubscriptionsEffect.encode(e82.realtimeSubscriptions,n.uint32(10).fork()).ldelim(),e82.rerenderUi!==void 0&&RerenderEffect.encode(e82.rerenderUi,n.uint32(18).fork()).ldelim(),e82.reloadPart!==void 0&&ReloadPartEffect.encode(e82.reloadPart,n.uint32(26).fork()).ldelim(),e82.showForm!==void 0&&ShowFormEffect.encode(e82.showForm,n.uint32(34).fork()).ldelim(),e82.showToast!==void 0&&ShowToastEffect.encode(e82.showToast,n.uint32(42).fork()).ldelim(),e82.navigateToUrl!==void 0&&NavigateToUrlEffect.encode(e82.navigateToUrl,n.uint32(50).fork()).ldelim(),e82.interval!==void 0&&SetIntervalsEffect.encode(e82.interval,n.uint32(74).fork()).ldelim(),e82.createOrder!==void 0&&CreateOrderEffect.encode(e82.createOrder,n.uint32(82).fork()).ldelim(),e82.type!==0&&n.uint32(56).int32(e82.type),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseEffect();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.realtimeSubscriptions=RealtimeSubscriptionsEffect.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.rerenderUi=RerenderEffect.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.reloadPart=ReloadPartEffect.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.showForm=ShowFormEffect.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.showToast=ShowToastEffect.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.navigateToUrl=NavigateToUrlEffect.decode(t,t.uint32());continue;case 9:if(r!==74)break;d.interval=SetIntervalsEffect.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.createOrder=CreateOrderEffect.decode(t,t.uint32());continue;case 7:if(r!==56)break;d.type=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{realtimeSubscriptions:isSet$A(e82.realtimeSubscriptions)?RealtimeSubscriptionsEffect.fromJSON(e82.realtimeSubscriptions):void 0,rerenderUi:isSet$A(e82.rerenderUi)?RerenderEffect.fromJSON(e82.rerenderUi):void 0,reloadPart:isSet$A(e82.reloadPart)?ReloadPartEffect.fromJSON(e82.reloadPart):void 0,showForm:isSet$A(e82.showForm)?ShowFormEffect.fromJSON(e82.showForm):void 0,showToast:isSet$A(e82.showToast)?ShowToastEffect.fromJSON(e82.showToast):void 0,navigateToUrl:isSet$A(e82.navigateToUrl)?NavigateToUrlEffect.fromJSON(e82.navigateToUrl):void 0,interval:isSet$A(e82.interval)?SetIntervalsEffect.fromJSON(e82.interval):void 0,createOrder:isSet$A(e82.createOrder)?CreateOrderEffect.fromJSON(e82.createOrder):void 0,type:isSet$A(e82.type)?effectTypeFromJSON(e82.type):0}},toJSON(e82){let n={};return e82.realtimeSubscriptions!==void 0&&(n.realtimeSubscriptions=RealtimeSubscriptionsEffect.toJSON(e82.realtimeSubscriptions)),e82.rerenderUi!==void 0&&(n.rerenderUi=RerenderEffect.toJSON(e82.rerenderUi)),e82.reloadPart!==void 0&&(n.reloadPart=ReloadPartEffect.toJSON(e82.reloadPart)),e82.showForm!==void 0&&(n.showForm=ShowFormEffect.toJSON(e82.showForm)),e82.showToast!==void 0&&(n.showToast=ShowToastEffect.toJSON(e82.showToast)),e82.navigateToUrl!==void 0&&(n.navigateToUrl=NavigateToUrlEffect.toJSON(e82.navigateToUrl)),e82.interval!==void 0&&(n.interval=SetIntervalsEffect.toJSON(e82.interval)),e82.createOrder!==void 0&&(n.createOrder=CreateOrderEffect.toJSON(e82.createOrder)),e82.type!==0&&(n.type=effectTypeToJSON(e82.type)),n},create(e82){return Effect.fromPartial(e82??{})},fromPartial(e82){let n=createBaseEffect();return n.realtimeSubscriptions=e82.realtimeSubscriptions!==void 0&&e82.realtimeSubscriptions!==null?RealtimeSubscriptionsEffect.fromPartial(e82.realtimeSubscriptions):void 0,n.rerenderUi=e82.rerenderUi!==void 0&&e82.rerenderUi!==null?RerenderEffect.fromPartial(e82.rerenderUi):void 0,n.reloadPart=e82.reloadPart!==void 0&&e82.reloadPart!==null?ReloadPartEffect.fromPartial(e82.reloadPart):void 0,n.showForm=e82.showForm!==void 0&&e82.showForm!==null?ShowFormEffect.fromPartial(e82.showForm):void 0,n.showToast=e82.showToast!==void 0&&e82.showToast!==null?ShowToastEffect.fromPartial(e82.showToast):void 0,n.navigateToUrl=e82.navigateToUrl!==void 0&&e82.navigateToUrl!==null?NavigateToUrlEffect.fromPartial(e82.navigateToUrl):void 0,n.interval=e82.interval!==void 0&&e82.interval!==null?SetIntervalsEffect.fromPartial(e82.interval):void 0,n.createOrder=e82.createOrder!==void 0&&e82.createOrder!==null?CreateOrderEffect.fromPartial(e82.createOrder):void 0,n.type=e82.type??0,n}};messageTypeRegistry.set(Effect.$type,Effect);function isSet$A(e82){return e82!=null}var ContextType;(function(e82){e82[e82.POST=0]="POST",e82[e82.COMMENT=1]="COMMENT",e82[e82.SUBREDDIT=2]="SUBREDDIT",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ContextType||(ContextType={}));function contextTypeFromJSON(e82){switch(e82){case 0:case"POST":return ContextType.POST;case 1:case"COMMENT":return ContextType.COMMENT;case 2:case"SUBREDDIT":return ContextType.SUBREDDIT;case-1:case"UNRECOGNIZED":default:return ContextType.UNRECOGNIZED}}function contextTypeToJSON(e82){switch(e82){case ContextType.POST:return 0;case ContextType.COMMENT:return 1;case ContextType.SUBREDDIT:return 2;case ContextType.UNRECOGNIZED:default:return-1}}function createBaseContextActionAllowedContexts(){return{post:!1,comment:!1,subreddit:!1}}var ContextActionAllowedContexts={$type:"devvit.actor.reddit.ContextActionAllowedContexts",encode(e82,n=_m0.Writer.create()){return e82.post!==!1&&n.uint32(8).bool(e82.post),e82.comment!==!1&&n.uint32(16).bool(e82.comment),e82.subreddit!==!1&&n.uint32(24).bool(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseContextActionAllowedContexts();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.post=t.bool();continue;case 2:if(r!==16)break;d.comment=t.bool();continue;case 3:if(r!==24)break;d.subreddit=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{post:isSet$z(e82.post)?globalThis.Boolean(e82.post):!1,comment:isSet$z(e82.comment)?globalThis.Boolean(e82.comment):!1,subreddit:isSet$z(e82.subreddit)?globalThis.Boolean(e82.subreddit):!1}},toJSON(e82){let n={};return e82.post!==!1&&(n.post=e82.post),e82.comment!==!1&&(n.comment=e82.comment),e82.subreddit!==!1&&(n.subreddit=e82.subreddit),n},create(e82){return ContextActionAllowedContexts.fromPartial(e82??{})},fromPartial(e82){let n=createBaseContextActionAllowedContexts();return n.post=e82.post??!1,n.comment=e82.comment??!1,n.subreddit=e82.subreddit??!1,n}};messageTypeRegistry.set(ContextActionAllowedContexts.$type,ContextActionAllowedContexts);function createBaseContextActionAllowedUsers(){return{moderator:!1,member:!1,loggedOut:!1}}var ContextActionAllowedUsers={$type:"devvit.actor.reddit.ContextActionAllowedUsers",encode(e82,n=_m0.Writer.create()){return e82.moderator!==!1&&n.uint32(8).bool(e82.moderator),e82.member!==!1&&n.uint32(16).bool(e82.member),e82.loggedOut!==!1&&n.uint32(24).bool(e82.loggedOut),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseContextActionAllowedUsers();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.moderator=t.bool();continue;case 2:if(r!==16)break;d.member=t.bool();continue;case 3:if(r!==24)break;d.loggedOut=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{moderator:isSet$z(e82.moderator)?globalThis.Boolean(e82.moderator):!1,member:isSet$z(e82.member)?globalThis.Boolean(e82.member):!1,loggedOut:isSet$z(e82.loggedOut)?globalThis.Boolean(e82.loggedOut):!1}},toJSON(e82){let n={};return e82.moderator!==!1&&(n.moderator=e82.moderator),e82.member!==!1&&(n.member=e82.member),e82.loggedOut!==!1&&(n.loggedOut=e82.loggedOut),n},create(e82){return ContextActionAllowedUsers.fromPartial(e82??{})},fromPartial(e82){let n=createBaseContextActionAllowedUsers();return n.moderator=e82.moderator??!1,n.member=e82.member??!1,n.loggedOut=e82.loggedOut??!1,n}};messageTypeRegistry.set(ContextActionAllowedUsers.$type,ContextActionAllowedUsers);function createBaseContextActionPostFilters(){return{currentApp:void 0}}var ContextActionPostFilters={$type:"devvit.actor.reddit.ContextActionPostFilters",encode(e82,n=_m0.Writer.create()){return e82.currentApp!==void 0&&n.uint32(8).bool(e82.currentApp),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseContextActionPostFilters();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.currentApp=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{currentApp:isSet$z(e82.currentApp)?globalThis.Boolean(e82.currentApp):void 0}},toJSON(e82){let n={};return e82.currentApp!==void 0&&(n.currentApp=e82.currentApp),n},create(e82){return ContextActionPostFilters.fromPartial(e82??{})},fromPartial(e82){let n=createBaseContextActionPostFilters();return n.currentApp=e82.currentApp??void 0,n}};messageTypeRegistry.set(ContextActionPostFilters.$type,ContextActionPostFilters);function createBaseContextActionDescription(){return{actionId:"",name:"",description:"",contexts:void 0,users:void 0,userInput:void 0,postFilters:void 0}}var ContextActionDescription={$type:"devvit.actor.reddit.ContextActionDescription",encode(e82,n=_m0.Writer.create()){return e82.actionId!==""&&n.uint32(10).string(e82.actionId),e82.name!==""&&n.uint32(18).string(e82.name),e82.description!==""&&n.uint32(26).string(e82.description),e82.contexts!==void 0&&ContextActionAllowedContexts.encode(e82.contexts,n.uint32(34).fork()).ldelim(),e82.users!==void 0&&ContextActionAllowedUsers.encode(e82.users,n.uint32(42).fork()).ldelim(),e82.userInput!==void 0&&ConfigForm.encode(e82.userInput,n.uint32(50).fork()).ldelim(),e82.postFilters!==void 0&&ContextActionPostFilters.encode(e82.postFilters,n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseContextActionDescription();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actionId=t.string();continue;case 2:if(r!==18)break;d.name=t.string();continue;case 3:if(r!==26)break;d.description=t.string();continue;case 4:if(r!==34)break;d.contexts=ContextActionAllowedContexts.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.users=ContextActionAllowedUsers.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.userInput=ConfigForm.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.postFilters=ContextActionPostFilters.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actionId:isSet$z(e82.actionId)?globalThis.String(e82.actionId):"",name:isSet$z(e82.name)?globalThis.String(e82.name):"",description:isSet$z(e82.description)?globalThis.String(e82.description):"",contexts:isSet$z(e82.contexts)?ContextActionAllowedContexts.fromJSON(e82.contexts):void 0,users:isSet$z(e82.users)?ContextActionAllowedUsers.fromJSON(e82.users):void 0,userInput:isSet$z(e82.userInput)?ConfigForm.fromJSON(e82.userInput):void 0,postFilters:isSet$z(e82.postFilters)?ContextActionPostFilters.fromJSON(e82.postFilters):void 0}},toJSON(e82){let n={};return e82.actionId!==""&&(n.actionId=e82.actionId),e82.name!==""&&(n.name=e82.name),e82.description!==""&&(n.description=e82.description),e82.contexts!==void 0&&(n.contexts=ContextActionAllowedContexts.toJSON(e82.contexts)),e82.users!==void 0&&(n.users=ContextActionAllowedUsers.toJSON(e82.users)),e82.userInput!==void 0&&(n.userInput=ConfigForm.toJSON(e82.userInput)),e82.postFilters!==void 0&&(n.postFilters=ContextActionPostFilters.toJSON(e82.postFilters)),n},create(e82){return ContextActionDescription.fromPartial(e82??{})},fromPartial(e82){let n=createBaseContextActionDescription();return n.actionId=e82.actionId??"",n.name=e82.name??"",n.description=e82.description??"",n.contexts=e82.contexts!==void 0&&e82.contexts!==null?ContextActionAllowedContexts.fromPartial(e82.contexts):void 0,n.users=e82.users!==void 0&&e82.users!==null?ContextActionAllowedUsers.fromPartial(e82.users):void 0,n.userInput=e82.userInput!==void 0&&e82.userInput!==null?ConfigForm.fromPartial(e82.userInput):void 0,n.postFilters=e82.postFilters!==void 0&&e82.postFilters!==null?ContextActionPostFilters.fromPartial(e82.postFilters):void 0,n}};messageTypeRegistry.set(ContextActionDescription.$type,ContextActionDescription);function createBaseContextActionList(){return{actions:[]}}var ContextActionList={$type:"devvit.actor.reddit.ContextActionList",encode(e82,n=_m0.Writer.create()){for(let t of e82.actions)ContextActionDescription.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseContextActionList();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actions.push(ContextActionDescription.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actions:globalThis.Array.isArray(e82?.actions)?e82.actions.map(n=>ContextActionDescription.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.actions)!=null&&t.length&&(n.actions=e82.actions.map(o=>ContextActionDescription.toJSON(o))),n},create(e82){return ContextActionList.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseContextActionList();return n.actions=((t=e82.actions)==null?void 0:t.map(o=>ContextActionDescription.fromPartial(o)))||[],n}};messageTypeRegistry.set(ContextActionList.$type,ContextActionList);function createBaseContextActionRequest(){return{actionId:"",context:0,post:void 0,comment:void 0,subreddit:void 0,userInput:void 0}}var ContextActionRequest={$type:"devvit.actor.reddit.ContextActionRequest",encode(e82,n=_m0.Writer.create()){return e82.actionId!==""&&n.uint32(10).string(e82.actionId),e82.context!==0&&n.uint32(16).int32(e82.context),e82.post!==void 0&&RedditObject.encode(e82.post,n.uint32(26).fork()).ldelim(),e82.comment!==void 0&&RedditObject.encode(e82.comment,n.uint32(34).fork()).ldelim(),e82.subreddit!==void 0&&SubredditObject.encode(e82.subreddit,n.uint32(42).fork()).ldelim(),e82.userInput!==void 0&&ConfigForm.encode(e82.userInput,n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseContextActionRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actionId=t.string();continue;case 2:if(r!==16)break;d.context=t.int32();continue;case 3:if(r!==26)break;d.post=RedditObject.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.comment=RedditObject.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.subreddit=SubredditObject.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.userInput=ConfigForm.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actionId:isSet$z(e82.actionId)?globalThis.String(e82.actionId):"",context:isSet$z(e82.context)?contextTypeFromJSON(e82.context):0,post:isSet$z(e82.post)?RedditObject.fromJSON(e82.post):void 0,comment:isSet$z(e82.comment)?RedditObject.fromJSON(e82.comment):void 0,subreddit:isSet$z(e82.subreddit)?SubredditObject.fromJSON(e82.subreddit):void 0,userInput:isSet$z(e82.userInput)?ConfigForm.fromJSON(e82.userInput):void 0}},toJSON(e82){let n={};return e82.actionId!==""&&(n.actionId=e82.actionId),e82.context!==0&&(n.context=contextTypeToJSON(e82.context)),e82.post!==void 0&&(n.post=RedditObject.toJSON(e82.post)),e82.comment!==void 0&&(n.comment=RedditObject.toJSON(e82.comment)),e82.subreddit!==void 0&&(n.subreddit=SubredditObject.toJSON(e82.subreddit)),e82.userInput!==void 0&&(n.userInput=ConfigForm.toJSON(e82.userInput)),n},create(e82){return ContextActionRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseContextActionRequest();return n.actionId=e82.actionId??"",n.context=e82.context??0,n.post=e82.post!==void 0&&e82.post!==null?RedditObject.fromPartial(e82.post):void 0,n.comment=e82.comment!==void 0&&e82.comment!==null?RedditObject.fromPartial(e82.comment):void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?SubredditObject.fromPartial(e82.subreddit):void 0,n.userInput=e82.userInput!==void 0&&e82.userInput!==null?ConfigForm.fromPartial(e82.userInput):void 0,n}};messageTypeRegistry.set(ContextActionRequest.$type,ContextActionRequest);function createBaseContextActionResponse(){return{success:!1,message:"",effects:[]}}var ContextActionResponse={$type:"devvit.actor.reddit.ContextActionResponse",encode(e82,n=_m0.Writer.create()){e82.success!==!1&&n.uint32(8).bool(e82.success),e82.message!==""&&n.uint32(18).string(e82.message);for(let t of e82.effects)Effect.encode(t,n.uint32(26).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseContextActionResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.success=t.bool();continue;case 2:if(r!==18)break;d.message=t.string();continue;case 3:if(r!==26)break;d.effects.push(Effect.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{success:isSet$z(e82.success)?globalThis.Boolean(e82.success):!1,message:isSet$z(e82.message)?globalThis.String(e82.message):"",effects:globalThis.Array.isArray(e82?.effects)?e82.effects.map(n=>Effect.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.success!==!1&&(n.success=e82.success),e82.message!==""&&(n.message=e82.message),(t=e82.effects)!=null&&t.length&&(n.effects=e82.effects.map(o=>Effect.toJSON(o))),n},create(e82){return ContextActionResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseContextActionResponse();return n.success=e82.success??!1,n.message=e82.message??"",n.effects=((t=e82.effects)==null?void 0:t.map(o=>Effect.fromPartial(o)))||[],n}};messageTypeRegistry.set(ContextActionResponse.$type,ContextActionResponse);var ContextActionDefinition={name:"ContextAction",fullName:"devvit.actor.reddit.ContextAction",methods:{getActions:{name:"GetActions",requestType:Empty$1,requestStream:!1,responseType:ContextActionList,responseStream:!1,options:{}},onAction:{name:"OnAction",requestType:ContextActionRequest,requestStream:!1,responseType:ContextActionResponse,responseStream:!1,options:{}}}};function isSet$z(e82){return e82!=null}function createBaseGetAssetURLRequest(){return{path:"",webview:void 0}}var GetAssetURLRequest={$type:"devvit.plugin.assetresolver.GetAssetURLRequest",encode(e82,n=_m0.Writer.create()){return e82.path!==""&&n.uint32(10).string(e82.path),e82.webview!==void 0&&n.uint32(16).bool(e82.webview),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetAssetURLRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.path=t.string();continue;case 2:if(r!==16)break;d.webview=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{path:isSet$y(e82.path)?globalThis.String(e82.path):"",webview:isSet$y(e82.webview)?globalThis.Boolean(e82.webview):void 0}},toJSON(e82){let n={};return e82.path!==""&&(n.path=e82.path),e82.webview!==void 0&&(n.webview=e82.webview),n},create(e82){return GetAssetURLRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetAssetURLRequest();return n.path=e82.path??"",n.webview=e82.webview??void 0,n}};messageTypeRegistry.set(GetAssetURLRequest.$type,GetAssetURLRequest);function createBaseGetAssetURLResponse(){return{url:"",found:!1}}var GetAssetURLResponse={$type:"devvit.plugin.assetresolver.GetAssetURLResponse",encode(e82,n=_m0.Writer.create()){return e82.url!==""&&n.uint32(10).string(e82.url),e82.found!==!1&&n.uint32(16).bool(e82.found),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetAssetURLResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=t.string();continue;case 2:if(r!==16)break;d.found=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$y(e82.url)?globalThis.String(e82.url):"",found:isSet$y(e82.found)?globalThis.Boolean(e82.found):!1}},toJSON(e82){let n={};return e82.url!==""&&(n.url=e82.url),e82.found!==!1&&(n.found=e82.found),n},create(e82){return GetAssetURLResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetAssetURLResponse();return n.url=e82.url??"",n.found=e82.found??!1,n}};messageTypeRegistry.set(GetAssetURLResponse.$type,GetAssetURLResponse);function createBaseGetMultipleAssetURLsRequest(){return{paths:[]}}var GetMultipleAssetURLsRequest={$type:"devvit.plugin.assetresolver.GetMultipleAssetURLsRequest",encode(e82,n=_m0.Writer.create()){for(let t of e82.paths)n.uint32(10).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetMultipleAssetURLsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.paths.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{paths:globalThis.Array.isArray(e82?.paths)?e82.paths.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.paths)!=null&&t.length&&(n.paths=e82.paths),n},create(e82){return GetMultipleAssetURLsRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGetMultipleAssetURLsRequest();return n.paths=((t=e82.paths)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(GetMultipleAssetURLsRequest.$type,GetMultipleAssetURLsRequest);function createBaseGetMultipleAssetURLsResponse(){return{urls:{}}}var GetMultipleAssetURLsResponse={$type:"devvit.plugin.assetresolver.GetMultipleAssetURLsResponse",encode(e82,n=_m0.Writer.create()){return Object.entries(e82.urls).forEach(([t,o])=>{GetMultipleAssetURLsResponse_UrlsEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetMultipleAssetURLsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=GetMultipleAssetURLsResponse_UrlsEntry.decode(t,t.uint32());a.value!==void 0&&(d.urls[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{urls:isObject$k(e82.urls)?Object.entries(e82.urls).reduce((n,[t,o])=>(n[t]=GetMultipleAssetURLsResponse_GlobResult.fromJSON(o),n),{}):{}}},toJSON(e82){let n={};if(e82.urls){let t=Object.entries(e82.urls);t.length>0&&(n.urls={},t.forEach(([o,d])=>{n.urls[o]=GetMultipleAssetURLsResponse_GlobResult.toJSON(d)}))}return n},create(e82){return GetMultipleAssetURLsResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetMultipleAssetURLsResponse();return n.urls=Object.entries(e82.urls??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=GetMultipleAssetURLsResponse_GlobResult.fromPartial(d)),t),{}),n}};messageTypeRegistry.set(GetMultipleAssetURLsResponse.$type,GetMultipleAssetURLsResponse);function createBaseGetMultipleAssetURLsResponse_GlobResult(){return{found:!1,paths:[]}}var GetMultipleAssetURLsResponse_GlobResult={$type:"devvit.plugin.assetresolver.GetMultipleAssetURLsResponse.GlobResult",encode(e82,n=_m0.Writer.create()){e82.found!==!1&&n.uint32(8).bool(e82.found);for(let t of e82.paths)n.uint32(18).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetMultipleAssetURLsResponse_GlobResult();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.found=t.bool();continue;case 2:if(r!==18)break;d.paths.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{found:isSet$y(e82.found)?globalThis.Boolean(e82.found):!1,paths:globalThis.Array.isArray(e82?.paths)?e82.paths.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.found!==!1&&(n.found=e82.found),(t=e82.paths)!=null&&t.length&&(n.paths=e82.paths),n},create(e82){return GetMultipleAssetURLsResponse_GlobResult.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGetMultipleAssetURLsResponse_GlobResult();return n.found=e82.found??!1,n.paths=((t=e82.paths)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(GetMultipleAssetURLsResponse_GlobResult.$type,GetMultipleAssetURLsResponse_GlobResult);function createBaseGetMultipleAssetURLsResponse_UrlsEntry(){return{key:"",value:void 0}}var GetMultipleAssetURLsResponse_UrlsEntry={$type:"devvit.plugin.assetresolver.GetMultipleAssetURLsResponse.UrlsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&GetMultipleAssetURLsResponse_GlobResult.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetMultipleAssetURLsResponse_UrlsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=GetMultipleAssetURLsResponse_GlobResult.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$y(e82.key)?globalThis.String(e82.key):"",value:isSet$y(e82.value)?GetMultipleAssetURLsResponse_GlobResult.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=GetMultipleAssetURLsResponse_GlobResult.toJSON(e82.value)),n},create(e82){return GetMultipleAssetURLsResponse_UrlsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetMultipleAssetURLsResponse_UrlsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?GetMultipleAssetURLsResponse_GlobResult.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(GetMultipleAssetURLsResponse_UrlsEntry.$type,GetMultipleAssetURLsResponse_UrlsEntry);var AssetResolverDefinition={name:"AssetResolver",fullName:"devvit.plugin.assetresolver.AssetResolver",methods:{getAssetURL:{name:"GetAssetURL",requestType:GetAssetURLRequest,requestStream:!1,responseType:GetAssetURLResponse,responseStream:!1,options:{}},getAssetURLs:{name:"GetAssetURLs",requestType:GetMultipleAssetURLsRequest,requestStream:!1,responseType:GetMultipleAssetURLsResponse,responseStream:!1,options:{}}}};function isObject$k(e82){return typeof e82=="object"&&e82!==null}function isSet$y(e82){return e82!=null}var BlockType;(function(e82){e82[e82.BLOCK_ROOT=0]="BLOCK_ROOT",e82[e82.BLOCK_STACK=1]="BLOCK_STACK",e82[e82.BLOCK_TEXT=2]="BLOCK_TEXT",e82[e82.BLOCK_BUTTON=3]="BLOCK_BUTTON",e82[e82.BLOCK_IMAGE=4]="BLOCK_IMAGE",e82[e82.BLOCK_SPACER=5]="BLOCK_SPACER",e82[e82.BLOCK_ICON=6]="BLOCK_ICON",e82[e82.BLOCK_AVATAR=7]="BLOCK_AVATAR",e82[e82.BLOCK_FULLSNOO=8]="BLOCK_FULLSNOO",e82[e82.BLOCK_ANIMATION=9]="BLOCK_ANIMATION",e82[e82.BLOCK_WEBVIEW=100]="BLOCK_WEBVIEW",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockType||(BlockType={}));function blockTypeFromJSON(e82){switch(e82){case 0:case"BLOCK_ROOT":return BlockType.BLOCK_ROOT;case 1:case"BLOCK_STACK":return BlockType.BLOCK_STACK;case 2:case"BLOCK_TEXT":return BlockType.BLOCK_TEXT;case 3:case"BLOCK_BUTTON":return BlockType.BLOCK_BUTTON;case 4:case"BLOCK_IMAGE":return BlockType.BLOCK_IMAGE;case 5:case"BLOCK_SPACER":return BlockType.BLOCK_SPACER;case 6:case"BLOCK_ICON":return BlockType.BLOCK_ICON;case 7:case"BLOCK_AVATAR":return BlockType.BLOCK_AVATAR;case 8:case"BLOCK_FULLSNOO":return BlockType.BLOCK_FULLSNOO;case 9:case"BLOCK_ANIMATION":return BlockType.BLOCK_ANIMATION;case 100:case"BLOCK_WEBVIEW":return BlockType.BLOCK_WEBVIEW;case-1:case"UNRECOGNIZED":default:return BlockType.UNRECOGNIZED}}function blockTypeToJSON(e82){switch(e82){case BlockType.BLOCK_ROOT:return 0;case BlockType.BLOCK_STACK:return 1;case BlockType.BLOCK_TEXT:return 2;case BlockType.BLOCK_BUTTON:return 3;case BlockType.BLOCK_IMAGE:return 4;case BlockType.BLOCK_SPACER:return 5;case BlockType.BLOCK_ICON:return 6;case BlockType.BLOCK_AVATAR:return 7;case BlockType.BLOCK_FULLSNOO:return 8;case BlockType.BLOCK_ANIMATION:return 9;case BlockType.BLOCK_WEBVIEW:return 100;case BlockType.UNRECOGNIZED:default:return-1}}var BlockActionType;(function(e82){e82[e82.ACTION_CLICK=0]="ACTION_CLICK",e82[e82.ACTION_WEBVIEW=100]="ACTION_WEBVIEW",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockActionType||(BlockActionType={}));function blockActionTypeFromJSON(e82){switch(e82){case 0:case"ACTION_CLICK":return BlockActionType.ACTION_CLICK;case 100:case"ACTION_WEBVIEW":return BlockActionType.ACTION_WEBVIEW;case-1:case"UNRECOGNIZED":default:return BlockActionType.UNRECOGNIZED}}function blockActionTypeToJSON(e82){switch(e82){case BlockActionType.ACTION_CLICK:return 0;case BlockActionType.ACTION_WEBVIEW:return 100;case BlockActionType.UNRECOGNIZED:default:return-1}}var BlockRenderEventType;(function(e82){e82[e82.RENDER_INITIAL=0]="RENDER_INITIAL",e82[e82.RENDER_USER_ACTION=1]="RENDER_USER_ACTION",e82[e82.RENDER_EFFECT_EVENT=2]="RENDER_EFFECT_EVENT",e82[e82.RENDER_CACHED=3]="RENDER_CACHED",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockRenderEventType||(BlockRenderEventType={}));function blockRenderEventTypeFromJSON(e82){switch(e82){case 0:case"RENDER_INITIAL":return BlockRenderEventType.RENDER_INITIAL;case 1:case"RENDER_USER_ACTION":return BlockRenderEventType.RENDER_USER_ACTION;case 2:case"RENDER_EFFECT_EVENT":return BlockRenderEventType.RENDER_EFFECT_EVENT;case 3:case"RENDER_CACHED":return BlockRenderEventType.RENDER_CACHED;case-1:case"UNRECOGNIZED":default:return BlockRenderEventType.UNRECOGNIZED}}function blockRenderEventTypeToJSON(e82){switch(e82){case BlockRenderEventType.RENDER_INITIAL:return 0;case BlockRenderEventType.RENDER_USER_ACTION:return 1;case BlockRenderEventType.RENDER_EFFECT_EVENT:return 2;case BlockRenderEventType.RENDER_CACHED:return 3;case BlockRenderEventType.UNRECOGNIZED:default:return-1}}var BlockStackDirection;(function(e82){e82[e82.STACK_HORIZONTAL=0]="STACK_HORIZONTAL",e82[e82.STACK_VERTICAL=1]="STACK_VERTICAL",e82[e82.STACK_DEPTH=2]="STACK_DEPTH",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockStackDirection||(BlockStackDirection={}));function blockStackDirectionFromJSON(e82){switch(e82){case 0:case"STACK_HORIZONTAL":return BlockStackDirection.STACK_HORIZONTAL;case 1:case"STACK_VERTICAL":return BlockStackDirection.STACK_VERTICAL;case 2:case"STACK_DEPTH":return BlockStackDirection.STACK_DEPTH;case-1:case"UNRECOGNIZED":default:return BlockStackDirection.UNRECOGNIZED}}function blockStackDirectionToJSON(e82){switch(e82){case BlockStackDirection.STACK_HORIZONTAL:return 0;case BlockStackDirection.STACK_VERTICAL:return 1;case BlockStackDirection.STACK_DEPTH:return 2;case BlockStackDirection.UNRECOGNIZED:default:return-1}}var BlockBorderWidth;(function(e82){e82[e82.BORDER_WIDTH_NONE=0]="BORDER_WIDTH_NONE",e82[e82.BORDER_WIDTH_THIN=1]="BORDER_WIDTH_THIN",e82[e82.BORDER_WIDTH_THICK=2]="BORDER_WIDTH_THICK",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockBorderWidth||(BlockBorderWidth={}));function blockBorderWidthFromJSON(e82){switch(e82){case 0:case"BORDER_WIDTH_NONE":return BlockBorderWidth.BORDER_WIDTH_NONE;case 1:case"BORDER_WIDTH_THIN":return BlockBorderWidth.BORDER_WIDTH_THIN;case 2:case"BORDER_WIDTH_THICK":return BlockBorderWidth.BORDER_WIDTH_THICK;case-1:case"UNRECOGNIZED":default:return BlockBorderWidth.UNRECOGNIZED}}function blockBorderWidthToJSON(e82){switch(e82){case BlockBorderWidth.BORDER_WIDTH_NONE:return 0;case BlockBorderWidth.BORDER_WIDTH_THIN:return 1;case BlockBorderWidth.BORDER_WIDTH_THICK:return 2;case BlockBorderWidth.UNRECOGNIZED:default:return-1}}var BlockVerticalAlignment;(function(e82){e82[e82.ALIGN_TOP=0]="ALIGN_TOP",e82[e82.ALIGN_MIDDLE=1]="ALIGN_MIDDLE",e82[e82.ALIGN_BOTTOM=2]="ALIGN_BOTTOM",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockVerticalAlignment||(BlockVerticalAlignment={}));function blockVerticalAlignmentFromJSON(e82){switch(e82){case 0:case"ALIGN_TOP":return BlockVerticalAlignment.ALIGN_TOP;case 1:case"ALIGN_MIDDLE":return BlockVerticalAlignment.ALIGN_MIDDLE;case 2:case"ALIGN_BOTTOM":return BlockVerticalAlignment.ALIGN_BOTTOM;case-1:case"UNRECOGNIZED":default:return BlockVerticalAlignment.UNRECOGNIZED}}function blockVerticalAlignmentToJSON(e82){switch(e82){case BlockVerticalAlignment.ALIGN_TOP:return 0;case BlockVerticalAlignment.ALIGN_MIDDLE:return 1;case BlockVerticalAlignment.ALIGN_BOTTOM:return 2;case BlockVerticalAlignment.UNRECOGNIZED:default:return-1}}var BlockHorizontalAlignment;(function(e82){e82[e82.ALIGN_START=0]="ALIGN_START",e82[e82.ALIGN_CENTER=1]="ALIGN_CENTER",e82[e82.ALIGN_END=2]="ALIGN_END",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockHorizontalAlignment||(BlockHorizontalAlignment={}));function blockHorizontalAlignmentFromJSON(e82){switch(e82){case 0:case"ALIGN_START":return BlockHorizontalAlignment.ALIGN_START;case 1:case"ALIGN_CENTER":return BlockHorizontalAlignment.ALIGN_CENTER;case 2:case"ALIGN_END":return BlockHorizontalAlignment.ALIGN_END;case-1:case"UNRECOGNIZED":default:return BlockHorizontalAlignment.UNRECOGNIZED}}function blockHorizontalAlignmentToJSON(e82){switch(e82){case BlockHorizontalAlignment.ALIGN_START:return 0;case BlockHorizontalAlignment.ALIGN_CENTER:return 1;case BlockHorizontalAlignment.ALIGN_END:return 2;case BlockHorizontalAlignment.UNRECOGNIZED:default:return-1}}var BlockPadding;(function(e82){e82[e82.PADDING_NONE=0]="PADDING_NONE",e82[e82.PADDING_XSMALL=1]="PADDING_XSMALL",e82[e82.PADDING_SMALL=2]="PADDING_SMALL",e82[e82.PADDING_MEDIUM=3]="PADDING_MEDIUM",e82[e82.PADDING_LARGE=4]="PADDING_LARGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockPadding||(BlockPadding={}));function blockPaddingFromJSON(e82){switch(e82){case 0:case"PADDING_NONE":return BlockPadding.PADDING_NONE;case 1:case"PADDING_XSMALL":return BlockPadding.PADDING_XSMALL;case 2:case"PADDING_SMALL":return BlockPadding.PADDING_SMALL;case 3:case"PADDING_MEDIUM":return BlockPadding.PADDING_MEDIUM;case 4:case"PADDING_LARGE":return BlockPadding.PADDING_LARGE;case-1:case"UNRECOGNIZED":default:return BlockPadding.UNRECOGNIZED}}function blockPaddingToJSON(e82){switch(e82){case BlockPadding.PADDING_NONE:return 0;case BlockPadding.PADDING_XSMALL:return 1;case BlockPadding.PADDING_SMALL:return 2;case BlockPadding.PADDING_MEDIUM:return 3;case BlockPadding.PADDING_LARGE:return 4;case BlockPadding.UNRECOGNIZED:default:return-1}}var BlockGap;(function(e82){e82[e82.GAP_NONE=0]="GAP_NONE",e82[e82.GAP_SMALL=1]="GAP_SMALL",e82[e82.GAP_MEDIUM=2]="GAP_MEDIUM",e82[e82.GAP_LARGE=3]="GAP_LARGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockGap||(BlockGap={}));function blockGapFromJSON(e82){switch(e82){case 0:case"GAP_NONE":return BlockGap.GAP_NONE;case 1:case"GAP_SMALL":return BlockGap.GAP_SMALL;case 2:case"GAP_MEDIUM":return BlockGap.GAP_MEDIUM;case 3:case"GAP_LARGE":return BlockGap.GAP_LARGE;case-1:case"UNRECOGNIZED":default:return BlockGap.UNRECOGNIZED}}function blockGapToJSON(e82){switch(e82){case BlockGap.GAP_NONE:return 0;case BlockGap.GAP_SMALL:return 1;case BlockGap.GAP_MEDIUM:return 2;case BlockGap.GAP_LARGE:return 3;case BlockGap.UNRECOGNIZED:default:return-1}}var BlockRadius;(function(e82){e82[e82.RADIUS_NONE=0]="RADIUS_NONE",e82[e82.RADIUS_SMALL=1]="RADIUS_SMALL",e82[e82.RADIUS_MEDIUM=2]="RADIUS_MEDIUM",e82[e82.RADIUS_LARGE=3]="RADIUS_LARGE",e82[e82.RADIUS_FULL=100]="RADIUS_FULL",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockRadius||(BlockRadius={}));function blockRadiusFromJSON(e82){switch(e82){case 0:case"RADIUS_NONE":return BlockRadius.RADIUS_NONE;case 1:case"RADIUS_SMALL":return BlockRadius.RADIUS_SMALL;case 2:case"RADIUS_MEDIUM":return BlockRadius.RADIUS_MEDIUM;case 3:case"RADIUS_LARGE":return BlockRadius.RADIUS_LARGE;case 100:case"RADIUS_FULL":return BlockRadius.RADIUS_FULL;case-1:case"UNRECOGNIZED":default:return BlockRadius.UNRECOGNIZED}}function blockRadiusToJSON(e82){switch(e82){case BlockRadius.RADIUS_NONE:return 0;case BlockRadius.RADIUS_SMALL:return 1;case BlockRadius.RADIUS_MEDIUM:return 2;case BlockRadius.RADIUS_LARGE:return 3;case BlockRadius.RADIUS_FULL:return 100;case BlockRadius.UNRECOGNIZED:default:return-1}}var BlockTextSize;(function(e82){e82[e82.TEXT_SIZE_MEDIUM=0]="TEXT_SIZE_MEDIUM",e82[e82.TEXT_SIZE_XSMALL=1]="TEXT_SIZE_XSMALL",e82[e82.TEXT_SIZE_SMALL=2]="TEXT_SIZE_SMALL",e82[e82.TEXT_SIZE_LARGE=3]="TEXT_SIZE_LARGE",e82[e82.TEXT_SIZE_XLARGE=4]="TEXT_SIZE_XLARGE",e82[e82.TEXT_SIZE_XXLARGE=5]="TEXT_SIZE_XXLARGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockTextSize||(BlockTextSize={}));function blockTextSizeFromJSON(e82){switch(e82){case 0:case"TEXT_SIZE_MEDIUM":return BlockTextSize.TEXT_SIZE_MEDIUM;case 1:case"TEXT_SIZE_XSMALL":return BlockTextSize.TEXT_SIZE_XSMALL;case 2:case"TEXT_SIZE_SMALL":return BlockTextSize.TEXT_SIZE_SMALL;case 3:case"TEXT_SIZE_LARGE":return BlockTextSize.TEXT_SIZE_LARGE;case 4:case"TEXT_SIZE_XLARGE":return BlockTextSize.TEXT_SIZE_XLARGE;case 5:case"TEXT_SIZE_XXLARGE":return BlockTextSize.TEXT_SIZE_XXLARGE;case-1:case"UNRECOGNIZED":default:return BlockTextSize.UNRECOGNIZED}}function blockTextSizeToJSON(e82){switch(e82){case BlockTextSize.TEXT_SIZE_MEDIUM:return 0;case BlockTextSize.TEXT_SIZE_XSMALL:return 1;case BlockTextSize.TEXT_SIZE_SMALL:return 2;case BlockTextSize.TEXT_SIZE_LARGE:return 3;case BlockTextSize.TEXT_SIZE_XLARGE:return 4;case BlockTextSize.TEXT_SIZE_XXLARGE:return 5;case BlockTextSize.UNRECOGNIZED:default:return-1}}var BlockTextWeight;(function(e82){e82[e82.TEXT_WEIGHT_REGULAR=0]="TEXT_WEIGHT_REGULAR",e82[e82.TEXT_WEIGHT_BOLD=1]="TEXT_WEIGHT_BOLD",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockTextWeight||(BlockTextWeight={}));function blockTextWeightFromJSON(e82){switch(e82){case 0:case"TEXT_WEIGHT_REGULAR":return BlockTextWeight.TEXT_WEIGHT_REGULAR;case 1:case"TEXT_WEIGHT_BOLD":return BlockTextWeight.TEXT_WEIGHT_BOLD;case-1:case"UNRECOGNIZED":default:return BlockTextWeight.UNRECOGNIZED}}function blockTextWeightToJSON(e82){switch(e82){case BlockTextWeight.TEXT_WEIGHT_REGULAR:return 0;case BlockTextWeight.TEXT_WEIGHT_BOLD:return 1;case BlockTextWeight.UNRECOGNIZED:default:return-1}}var BlockTextOutline;(function(e82){e82[e82.TEXT_OUTLINE_NONE=0]="TEXT_OUTLINE_NONE",e82[e82.TEXT_OUTLINE_THIN=1]="TEXT_OUTLINE_THIN",e82[e82.TEXT_OUTLINE_THICK=2]="TEXT_OUTLINE_THICK",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockTextOutline||(BlockTextOutline={}));function blockTextOutlineFromJSON(e82){switch(e82){case 0:case"TEXT_OUTLINE_NONE":return BlockTextOutline.TEXT_OUTLINE_NONE;case 1:case"TEXT_OUTLINE_THIN":return BlockTextOutline.TEXT_OUTLINE_THIN;case 2:case"TEXT_OUTLINE_THICK":return BlockTextOutline.TEXT_OUTLINE_THICK;case-1:case"UNRECOGNIZED":default:return BlockTextOutline.UNRECOGNIZED}}function blockTextOutlineToJSON(e82){switch(e82){case BlockTextOutline.TEXT_OUTLINE_NONE:return 0;case BlockTextOutline.TEXT_OUTLINE_THIN:return 1;case BlockTextOutline.TEXT_OUTLINE_THICK:return 2;case BlockTextOutline.UNRECOGNIZED:default:return-1}}var BlockTextStyle;(function(e82){e82[e82.TEXT_STYLE_BODY=0]="TEXT_STYLE_BODY",e82[e82.TEXT_STYLE_METADATA=1]="TEXT_STYLE_METADATA",e82[e82.TEXT_STYLE_HEADING=2]="TEXT_STYLE_HEADING",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockTextStyle||(BlockTextStyle={}));function blockTextStyleFromJSON(e82){switch(e82){case 0:case"TEXT_STYLE_BODY":return BlockTextStyle.TEXT_STYLE_BODY;case 1:case"TEXT_STYLE_METADATA":return BlockTextStyle.TEXT_STYLE_METADATA;case 2:case"TEXT_STYLE_HEADING":return BlockTextStyle.TEXT_STYLE_HEADING;case-1:case"UNRECOGNIZED":default:return BlockTextStyle.UNRECOGNIZED}}function blockTextStyleToJSON(e82){switch(e82){case BlockTextStyle.TEXT_STYLE_BODY:return 0;case BlockTextStyle.TEXT_STYLE_METADATA:return 1;case BlockTextStyle.TEXT_STYLE_HEADING:return 2;case BlockTextStyle.UNRECOGNIZED:default:return-1}}var BlockButtonSize;(function(e82){e82[e82.BUTTON_SIZE_MEDIUM=0]="BUTTON_SIZE_MEDIUM",e82[e82.BUTTON_SIZE_SMALL=1]="BUTTON_SIZE_SMALL",e82[e82.BUTTON_SIZE_LARGE=2]="BUTTON_SIZE_LARGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockButtonSize||(BlockButtonSize={}));function blockButtonSizeFromJSON(e82){switch(e82){case 0:case"BUTTON_SIZE_MEDIUM":return BlockButtonSize.BUTTON_SIZE_MEDIUM;case 1:case"BUTTON_SIZE_SMALL":return BlockButtonSize.BUTTON_SIZE_SMALL;case 2:case"BUTTON_SIZE_LARGE":return BlockButtonSize.BUTTON_SIZE_LARGE;case-1:case"UNRECOGNIZED":default:return BlockButtonSize.UNRECOGNIZED}}function blockButtonSizeToJSON(e82){switch(e82){case BlockButtonSize.BUTTON_SIZE_MEDIUM:return 0;case BlockButtonSize.BUTTON_SIZE_SMALL:return 1;case BlockButtonSize.BUTTON_SIZE_LARGE:return 2;case BlockButtonSize.UNRECOGNIZED:default:return-1}}var BlockButtonAppearance;(function(e82){e82[e82.BUTTON_APPEARANCE_SECONDARY=0]="BUTTON_APPEARANCE_SECONDARY",e82[e82.BUTTON_APPEARANCE_PRIMARY=1]="BUTTON_APPEARANCE_PRIMARY",e82[e82.BUTTON_APPEARANCE_PLAIN=2]="BUTTON_APPEARANCE_PLAIN",e82[e82.BUTTON_APPEARANCE_BORDERED=3]="BUTTON_APPEARANCE_BORDERED",e82[e82.BUTTON_APPEARANCE_MEDIA=4]="BUTTON_APPEARANCE_MEDIA",e82[e82.BUTTON_APPEARANCE_DESTRUCTIVE=5]="BUTTON_APPEARANCE_DESTRUCTIVE",e82[e82.BUTTON_APPEARANCE_CAUTION=6]="BUTTON_APPEARANCE_CAUTION",e82[e82.BUTTON_APPEARANCE_SUCCESS=7]="BUTTON_APPEARANCE_SUCCESS",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockButtonAppearance||(BlockButtonAppearance={}));function blockButtonAppearanceFromJSON(e82){switch(e82){case 0:case"BUTTON_APPEARANCE_SECONDARY":return BlockButtonAppearance.BUTTON_APPEARANCE_SECONDARY;case 1:case"BUTTON_APPEARANCE_PRIMARY":return BlockButtonAppearance.BUTTON_APPEARANCE_PRIMARY;case 2:case"BUTTON_APPEARANCE_PLAIN":return BlockButtonAppearance.BUTTON_APPEARANCE_PLAIN;case 3:case"BUTTON_APPEARANCE_BORDERED":return BlockButtonAppearance.BUTTON_APPEARANCE_BORDERED;case 4:case"BUTTON_APPEARANCE_MEDIA":return BlockButtonAppearance.BUTTON_APPEARANCE_MEDIA;case 5:case"BUTTON_APPEARANCE_DESTRUCTIVE":return BlockButtonAppearance.BUTTON_APPEARANCE_DESTRUCTIVE;case 6:case"BUTTON_APPEARANCE_CAUTION":return BlockButtonAppearance.BUTTON_APPEARANCE_CAUTION;case 7:case"BUTTON_APPEARANCE_SUCCESS":return BlockButtonAppearance.BUTTON_APPEARANCE_SUCCESS;case-1:case"UNRECOGNIZED":default:return BlockButtonAppearance.UNRECOGNIZED}}function blockButtonAppearanceToJSON(e82){switch(e82){case BlockButtonAppearance.BUTTON_APPEARANCE_SECONDARY:return 0;case BlockButtonAppearance.BUTTON_APPEARANCE_PRIMARY:return 1;case BlockButtonAppearance.BUTTON_APPEARANCE_PLAIN:return 2;case BlockButtonAppearance.BUTTON_APPEARANCE_BORDERED:return 3;case BlockButtonAppearance.BUTTON_APPEARANCE_MEDIA:return 4;case BlockButtonAppearance.BUTTON_APPEARANCE_DESTRUCTIVE:return 5;case BlockButtonAppearance.BUTTON_APPEARANCE_CAUTION:return 6;case BlockButtonAppearance.BUTTON_APPEARANCE_SUCCESS:return 7;case BlockButtonAppearance.UNRECOGNIZED:default:return-1}}var BlockImageResizeMode;(function(e82){e82[e82.IMAGE_RESIZE_FIT=0]="IMAGE_RESIZE_FIT",e82[e82.IMAGE_RESIZE_FILL=1]="IMAGE_RESIZE_FILL",e82[e82.IMAGE_RESIZE_COVER=2]="IMAGE_RESIZE_COVER",e82[e82.IMAGE_RESIZE_NONE=3]="IMAGE_RESIZE_NONE",e82[e82.IMAGE_RESIZE_SCALE_DOWN=4]="IMAGE_RESIZE_SCALE_DOWN",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockImageResizeMode||(BlockImageResizeMode={}));function blockImageResizeModeFromJSON(e82){switch(e82){case 0:case"IMAGE_RESIZE_FIT":return BlockImageResizeMode.IMAGE_RESIZE_FIT;case 1:case"IMAGE_RESIZE_FILL":return BlockImageResizeMode.IMAGE_RESIZE_FILL;case 2:case"IMAGE_RESIZE_COVER":return BlockImageResizeMode.IMAGE_RESIZE_COVER;case 3:case"IMAGE_RESIZE_NONE":return BlockImageResizeMode.IMAGE_RESIZE_NONE;case 4:case"IMAGE_RESIZE_SCALE_DOWN":return BlockImageResizeMode.IMAGE_RESIZE_SCALE_DOWN;case-1:case"UNRECOGNIZED":default:return BlockImageResizeMode.UNRECOGNIZED}}function blockImageResizeModeToJSON(e82){switch(e82){case BlockImageResizeMode.IMAGE_RESIZE_FIT:return 0;case BlockImageResizeMode.IMAGE_RESIZE_FILL:return 1;case BlockImageResizeMode.IMAGE_RESIZE_COVER:return 2;case BlockImageResizeMode.IMAGE_RESIZE_NONE:return 3;case BlockImageResizeMode.IMAGE_RESIZE_SCALE_DOWN:return 4;case BlockImageResizeMode.UNRECOGNIZED:default:return-1}}var BlockSpacerSize;(function(e82){e82[e82.SPACER_SMALL=0]="SPACER_SMALL",e82[e82.SPACER_XSMALL=1]="SPACER_XSMALL",e82[e82.SPACER_MEDIUM=2]="SPACER_MEDIUM",e82[e82.SPACER_LARGE=3]="SPACER_LARGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockSpacerSize||(BlockSpacerSize={}));function blockSpacerSizeFromJSON(e82){switch(e82){case 0:case"SPACER_SMALL":return BlockSpacerSize.SPACER_SMALL;case 1:case"SPACER_XSMALL":return BlockSpacerSize.SPACER_XSMALL;case 2:case"SPACER_MEDIUM":return BlockSpacerSize.SPACER_MEDIUM;case 3:case"SPACER_LARGE":return BlockSpacerSize.SPACER_LARGE;case-1:case"UNRECOGNIZED":default:return BlockSpacerSize.UNRECOGNIZED}}function blockSpacerSizeToJSON(e82){switch(e82){case BlockSpacerSize.SPACER_SMALL:return 0;case BlockSpacerSize.SPACER_XSMALL:return 1;case BlockSpacerSize.SPACER_MEDIUM:return 2;case BlockSpacerSize.SPACER_LARGE:return 3;case BlockSpacerSize.UNRECOGNIZED:default:return-1}}var BlockSpacerShape;(function(e82){e82[e82.SPACER_INVISIBLE=0]="SPACER_INVISIBLE",e82[e82.SPACER_THIN=1]="SPACER_THIN",e82[e82.SPACER_SQUARE=2]="SPACER_SQUARE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockSpacerShape||(BlockSpacerShape={}));function blockSpacerShapeFromJSON(e82){switch(e82){case 0:case"SPACER_INVISIBLE":return BlockSpacerShape.SPACER_INVISIBLE;case 1:case"SPACER_THIN":return BlockSpacerShape.SPACER_THIN;case 2:case"SPACER_SQUARE":return BlockSpacerShape.SPACER_SQUARE;case-1:case"UNRECOGNIZED":default:return BlockSpacerShape.UNRECOGNIZED}}function blockSpacerShapeToJSON(e82){switch(e82){case BlockSpacerShape.SPACER_INVISIBLE:return 0;case BlockSpacerShape.SPACER_THIN:return 1;case BlockSpacerShape.SPACER_SQUARE:return 2;case BlockSpacerShape.UNRECOGNIZED:default:return-1}}var BlockIconSize;(function(e82){e82[e82.ICON_SIZE_MEDIUM=0]="ICON_SIZE_MEDIUM",e82[e82.ICON_SIZE_XSMALL=1]="ICON_SIZE_XSMALL",e82[e82.ICON_SIZE_SMALL=2]="ICON_SIZE_SMALL",e82[e82.ICON_SIZE_LARGE=3]="ICON_SIZE_LARGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockIconSize||(BlockIconSize={}));function blockIconSizeFromJSON(e82){switch(e82){case 0:case"ICON_SIZE_MEDIUM":return BlockIconSize.ICON_SIZE_MEDIUM;case 1:case"ICON_SIZE_XSMALL":return BlockIconSize.ICON_SIZE_XSMALL;case 2:case"ICON_SIZE_SMALL":return BlockIconSize.ICON_SIZE_SMALL;case 3:case"ICON_SIZE_LARGE":return BlockIconSize.ICON_SIZE_LARGE;case-1:case"UNRECOGNIZED":default:return BlockIconSize.UNRECOGNIZED}}function blockIconSizeToJSON(e82){switch(e82){case BlockIconSize.ICON_SIZE_MEDIUM:return 0;case BlockIconSize.ICON_SIZE_XSMALL:return 1;case BlockIconSize.ICON_SIZE_SMALL:return 2;case BlockIconSize.ICON_SIZE_LARGE:return 3;case BlockIconSize.UNRECOGNIZED:default:return-1}}var BlockAvatarFacing;(function(e82){e82[e82.AVATAR_FACING_LEFT=0]="AVATAR_FACING_LEFT",e82[e82.AVATAR_FACING_RIGHT=1]="AVATAR_FACING_RIGHT",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockAvatarFacing||(BlockAvatarFacing={}));function blockAvatarFacingFromJSON(e82){switch(e82){case 0:case"AVATAR_FACING_LEFT":return BlockAvatarFacing.AVATAR_FACING_LEFT;case 1:case"AVATAR_FACING_RIGHT":return BlockAvatarFacing.AVATAR_FACING_RIGHT;case-1:case"UNRECOGNIZED":default:return BlockAvatarFacing.UNRECOGNIZED}}function blockAvatarFacingToJSON(e82){switch(e82){case BlockAvatarFacing.AVATAR_FACING_LEFT:return 0;case BlockAvatarFacing.AVATAR_FACING_RIGHT:return 1;case BlockAvatarFacing.UNRECOGNIZED:default:return-1}}var BlockAvatarSize;(function(e82){e82[e82.AVATAR_SIZE_SMALL=0]="AVATAR_SIZE_SMALL",e82[e82.AVATAR_SIZE_XXSMALL=1]="AVATAR_SIZE_XXSMALL",e82[e82.AVATAR_SIZE_XSMALL=2]="AVATAR_SIZE_XSMALL",e82[e82.AVATAR_SIZE_MEDIUM=3]="AVATAR_SIZE_MEDIUM",e82[e82.AVATAR_SIZE_LARGE=4]="AVATAR_SIZE_LARGE",e82[e82.AVATAR_SIZE_XLARGE=5]="AVATAR_SIZE_XLARGE",e82[e82.AVATAR_SIZE_XXLARGE=6]="AVATAR_SIZE_XXLARGE",e82[e82.AVATAR_SIZE_XXXLARGE=7]="AVATAR_SIZE_XXXLARGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockAvatarSize||(BlockAvatarSize={}));function blockAvatarSizeFromJSON(e82){switch(e82){case 0:case"AVATAR_SIZE_SMALL":return BlockAvatarSize.AVATAR_SIZE_SMALL;case 1:case"AVATAR_SIZE_XXSMALL":return BlockAvatarSize.AVATAR_SIZE_XXSMALL;case 2:case"AVATAR_SIZE_XSMALL":return BlockAvatarSize.AVATAR_SIZE_XSMALL;case 3:case"AVATAR_SIZE_MEDIUM":return BlockAvatarSize.AVATAR_SIZE_MEDIUM;case 4:case"AVATAR_SIZE_LARGE":return BlockAvatarSize.AVATAR_SIZE_LARGE;case 5:case"AVATAR_SIZE_XLARGE":return BlockAvatarSize.AVATAR_SIZE_XLARGE;case 6:case"AVATAR_SIZE_XXLARGE":return BlockAvatarSize.AVATAR_SIZE_XXLARGE;case 7:case"AVATAR_SIZE_XXXLARGE":return BlockAvatarSize.AVATAR_SIZE_XXXLARGE;case-1:case"UNRECOGNIZED":default:return BlockAvatarSize.UNRECOGNIZED}}function blockAvatarSizeToJSON(e82){switch(e82){case BlockAvatarSize.AVATAR_SIZE_SMALL:return 0;case BlockAvatarSize.AVATAR_SIZE_XXSMALL:return 1;case BlockAvatarSize.AVATAR_SIZE_XSMALL:return 2;case BlockAvatarSize.AVATAR_SIZE_MEDIUM:return 3;case BlockAvatarSize.AVATAR_SIZE_LARGE:return 4;case BlockAvatarSize.AVATAR_SIZE_XLARGE:return 5;case BlockAvatarSize.AVATAR_SIZE_XXLARGE:return 6;case BlockAvatarSize.AVATAR_SIZE_XXXLARGE:return 7;case BlockAvatarSize.UNRECOGNIZED:default:return-1}}var BlockAvatarBackground;(function(e82){e82[e82.AVATAR_BG_LIGHT=0]="AVATAR_BG_LIGHT",e82[e82.AVATAR_BG_DARK=1]="AVATAR_BG_DARK",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockAvatarBackground||(BlockAvatarBackground={}));function blockAvatarBackgroundFromJSON(e82){switch(e82){case 0:case"AVATAR_BG_LIGHT":return BlockAvatarBackground.AVATAR_BG_LIGHT;case 1:case"AVATAR_BG_DARK":return BlockAvatarBackground.AVATAR_BG_DARK;case-1:case"UNRECOGNIZED":default:return BlockAvatarBackground.UNRECOGNIZED}}function blockAvatarBackgroundToJSON(e82){switch(e82){case BlockAvatarBackground.AVATAR_BG_LIGHT:return 0;case BlockAvatarBackground.AVATAR_BG_DARK:return 1;case BlockAvatarBackground.UNRECOGNIZED:default:return-1}}var BlockFullSnooSize;(function(e82){e82[e82.FULLSNOO_SMALL=0]="FULLSNOO_SMALL",e82[e82.FULLSNOO_XSMALL=1]="FULLSNOO_XSMALL",e82[e82.FULLSNOO_MEDIUM=2]="FULLSNOO_MEDIUM",e82[e82.FULLSNOO_LARGE=3]="FULLSNOO_LARGE",e82[e82.FULLSNOO_XLARGE=4]="FULLSNOO_XLARGE",e82[e82.FULLSNOO_XXLARGE=5]="FULLSNOO_XXLARGE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockFullSnooSize||(BlockFullSnooSize={}));function blockFullSnooSizeFromJSON(e82){switch(e82){case 0:case"FULLSNOO_SMALL":return BlockFullSnooSize.FULLSNOO_SMALL;case 1:case"FULLSNOO_XSMALL":return BlockFullSnooSize.FULLSNOO_XSMALL;case 2:case"FULLSNOO_MEDIUM":return BlockFullSnooSize.FULLSNOO_MEDIUM;case 3:case"FULLSNOO_LARGE":return BlockFullSnooSize.FULLSNOO_LARGE;case 4:case"FULLSNOO_XLARGE":return BlockFullSnooSize.FULLSNOO_XLARGE;case 5:case"FULLSNOO_XXLARGE":return BlockFullSnooSize.FULLSNOO_XXLARGE;case-1:case"UNRECOGNIZED":default:return BlockFullSnooSize.UNRECOGNIZED}}function blockFullSnooSizeToJSON(e82){switch(e82){case BlockFullSnooSize.FULLSNOO_SMALL:return 0;case BlockFullSnooSize.FULLSNOO_XSMALL:return 1;case BlockFullSnooSize.FULLSNOO_MEDIUM:return 2;case BlockFullSnooSize.FULLSNOO_LARGE:return 3;case BlockFullSnooSize.FULLSNOO_XLARGE:return 4;case BlockFullSnooSize.FULLSNOO_XXLARGE:return 5;case BlockFullSnooSize.UNRECOGNIZED:default:return-1}}var BlockAnimationType;(function(e82){e82[e82.ANIM_LOTTIE=0]="ANIM_LOTTIE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockAnimationType||(BlockAnimationType={}));function blockAnimationTypeFromJSON(e82){switch(e82){case 0:case"ANIM_LOTTIE":return BlockAnimationType.ANIM_LOTTIE;case-1:case"UNRECOGNIZED":default:return BlockAnimationType.UNRECOGNIZED}}function blockAnimationTypeToJSON(e82){switch(e82){case BlockAnimationType.ANIM_LOTTIE:return 0;case BlockAnimationType.UNRECOGNIZED:default:return-1}}var BlockAnimationLoopMode;(function(e82){e82[e82.ANIM_LOOP_REPEAT=0]="ANIM_LOOP_REPEAT",e82[e82.ANIM_LOOP_BOUNCE=1]="ANIM_LOOP_BOUNCE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockAnimationLoopMode||(BlockAnimationLoopMode={}));function blockAnimationLoopModeFromJSON(e82){switch(e82){case 0:case"ANIM_LOOP_REPEAT":return BlockAnimationLoopMode.ANIM_LOOP_REPEAT;case 1:case"ANIM_LOOP_BOUNCE":return BlockAnimationLoopMode.ANIM_LOOP_BOUNCE;case-1:case"UNRECOGNIZED":default:return BlockAnimationLoopMode.UNRECOGNIZED}}function blockAnimationLoopModeToJSON(e82){switch(e82){case BlockAnimationLoopMode.ANIM_LOOP_REPEAT:return 0;case BlockAnimationLoopMode.ANIM_LOOP_BOUNCE:return 1;case BlockAnimationLoopMode.UNRECOGNIZED:default:return-1}}var BlockAnimationDirection;(function(e82){e82[e82.ANIM_DIR_FORWARD=0]="ANIM_DIR_FORWARD",e82[e82.ANIM_DIR_BACKWARD=1]="ANIM_DIR_BACKWARD",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockAnimationDirection||(BlockAnimationDirection={}));function blockAnimationDirectionFromJSON(e82){switch(e82){case 0:case"ANIM_DIR_FORWARD":return BlockAnimationDirection.ANIM_DIR_FORWARD;case 1:case"ANIM_DIR_BACKWARD":return BlockAnimationDirection.ANIM_DIR_BACKWARD;case-1:case"UNRECOGNIZED":default:return BlockAnimationDirection.UNRECOGNIZED}}function blockAnimationDirectionToJSON(e82){switch(e82){case BlockAnimationDirection.ANIM_DIR_FORWARD:return 0;case BlockAnimationDirection.ANIM_DIR_BACKWARD:return 1;case BlockAnimationDirection.UNRECOGNIZED:default:return-1}}var BlockSizeUnit;(function(e82){e82[e82.SIZE_UNIT_PERCENT=0]="SIZE_UNIT_PERCENT",e82[e82.SIZE_UNIT_PIXELS=1]="SIZE_UNIT_PIXELS",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockSizeUnit||(BlockSizeUnit={}));function blockSizeUnitFromJSON(e82){switch(e82){case 0:case"SIZE_UNIT_PERCENT":return BlockSizeUnit.SIZE_UNIT_PERCENT;case 1:case"SIZE_UNIT_PIXELS":return BlockSizeUnit.SIZE_UNIT_PIXELS;case-1:case"UNRECOGNIZED":default:return BlockSizeUnit.UNRECOGNIZED}}function blockSizeUnitToJSON(e82){switch(e82){case BlockSizeUnit.SIZE_UNIT_PERCENT:return 0;case BlockSizeUnit.SIZE_UNIT_PIXELS:return 1;case BlockSizeUnit.UNRECOGNIZED:default:return-1}}var BlockTextOverflow;(function(e82){e82[e82.TEXT_OVERFLOW_CLIP=0]="TEXT_OVERFLOW_CLIP",e82[e82.TEXT_OVERFLOW_ELLIPSE=1]="TEXT_OVERFLOW_ELLIPSE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BlockTextOverflow||(BlockTextOverflow={}));function blockTextOverflowFromJSON(e82){switch(e82){case 0:case"TEXT_OVERFLOW_CLIP":return BlockTextOverflow.TEXT_OVERFLOW_CLIP;case 1:case"TEXT_OVERFLOW_ELLIPSE":return BlockTextOverflow.TEXT_OVERFLOW_ELLIPSE;case-1:case"UNRECOGNIZED":default:return BlockTextOverflow.UNRECOGNIZED}}function blockTextOverflowToJSON(e82){switch(e82){case BlockTextOverflow.TEXT_OVERFLOW_CLIP:return 0;case BlockTextOverflow.TEXT_OVERFLOW_ELLIPSE:return 1;case BlockTextOverflow.UNRECOGNIZED:default:return-1}}var PostCollectionsDefinition={name:"PostCollections",fullName:"devvit.plugin.redditapi.postcollections.PostCollections",methods:{}},RedditAPIV2Definition={name:"RedditAPIV2",fullName:"devvit.plugin.redditapiv2.RedditAPIV2",methods:{}},Empty={$type:"google.protobuf.Empty",fromPartial(){return{}}};function createBasePingMessage(){return{message:"",delayMillis:0,successProbability:0}}var PingMessage={$type:"devvit.actor.hello.PingMessage",encode(e82,n=_m0.Writer.create()){return e82.message!==""&&n.uint32(10).string(e82.message),e82.delayMillis!==0&&n.uint32(16).int32(e82.delayMillis),e82.successProbability!==0&&n.uint32(29).float(e82.successProbability),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePingMessage();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.message=t.string();continue;case 2:if(r!==16)break;d.delayMillis=t.int32();continue;case 3:if(r!==29)break;d.successProbability=t.float();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{message:isSet$x(e82.message)?globalThis.String(e82.message):"",delayMillis:isSet$x(e82.delayMillis)?globalThis.Number(e82.delayMillis):0,successProbability:isSet$x(e82.successProbability)?globalThis.Number(e82.successProbability):0}},toJSON(e82){let n={};return e82.message!==""&&(n.message=e82.message),e82.delayMillis!==0&&(n.delayMillis=Math.round(e82.delayMillis)),e82.successProbability!==0&&(n.successProbability=e82.successProbability),n},create(e82){return PingMessage.fromPartial(e82??{})},fromPartial(e82){let n=createBasePingMessage();return n.message=e82.message??"",n.delayMillis=e82.delayMillis??0,n.successProbability=e82.successProbability??0,n}};messageTypeRegistry.set(PingMessage.$type,PingMessage);var HelloDefinition={name:"Hello",fullName:"devvit.actor.hello.Hello",methods:{ping:{name:"Ping",requestType:PingMessage,requestStream:!1,responseType:PingMessage,responseStream:!1,options:{}}}};function isSet$x(e82){return e82!=null}function createBaseScheduledAction(){return{type:"",data:void 0}}var ScheduledAction={$type:"devvit.actor.scheduler.ScheduledAction",encode(e82,n=_m0.Writer.create()){return e82.type!==""&&n.uint32(10).string(e82.type),e82.data!==void 0&&Struct.encode(Struct.wrap(e82.data),n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseScheduledAction();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.type=t.string();continue;case 2:if(r!==18)break;d.data=Struct.unwrap(Struct.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{type:isSet$w(e82.type)?globalThis.String(e82.type):"",data:isObject$j(e82.data)?e82.data:void 0}},toJSON(e82){let n={};return e82.type!==""&&(n.type=e82.type),e82.data!==void 0&&(n.data=e82.data),n},create(e82){return ScheduledAction.fromPartial(e82??{})},fromPartial(e82){let n=createBaseScheduledAction();return n.type=e82.type??"",n.data=e82.data??void 0,n}};messageTypeRegistry.set(ScheduledAction.$type,ScheduledAction);function isObject$j(e82){return typeof e82=="object"&&e82!==null}function isSet$w(e82){return e82!=null}var SchedulerHandlerDefinition={name:"SchedulerHandler",fullName:"devvit.actor.scheduler.SchedulerHandler",methods:{handleScheduledAction:{name:"HandleScheduledAction",requestType:ScheduledAction,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}}}},AppSettingsDefinition={name:"AppSettings",fullName:"devvit.actor.settings.v1alpha.AppSettings",methods:{getAppSettingsFields:{name:"GetAppSettingsFields",requestType:GetFieldsRequest,requestStream:!1,responseType:GetFieldsResponse,responseStream:!1,options:{}},validateAppForm:{name:"ValidateAppForm",requestType:ValidateFormRequest,requestStream:!1,responseType:ValidateFormResponse,responseStream:!1,options:{}}}},InstallationSettingsDefinition={name:"InstallationSettings",fullName:"devvit.actor.settings.v1alpha.InstallationSettings",methods:{getSettingsFields:{name:"GetSettingsFields",requestType:GetFieldsRequest,requestStream:!1,responseType:GetFieldsResponse,responseStream:!1,options:{}},validateForm:{name:"ValidateForm",requestType:ValidateFormRequest,requestStream:!1,responseType:ValidateFormResponse,responseStream:!1,options:{}}}};function createBaseFetchRequest(){return{url:"",data:void 0}}var FetchRequest={$type:"devvit.plugin.http.FetchRequest",encode(e82,n=_m0.Writer.create()){return e82.url!==""&&n.uint32(10).string(e82.url),e82.data!==void 0&&RequestData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFetchRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=t.string();continue;case 2:if(r!==18)break;d.data=RequestData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$v(e82.url)?globalThis.String(e82.url):"",data:isSet$v(e82.data)?RequestData.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.url!==""&&(n.url=e82.url),e82.data!==void 0&&(n.data=RequestData.toJSON(e82.data)),n},create(e82){return FetchRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFetchRequest();return n.url=e82.url??"",n.data=e82.data!==void 0&&e82.data!==null?RequestData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(FetchRequest.$type,FetchRequest);function createBaseRequestData(){return{method:"",headers:{},body:new Uint8Array(0)}}var RequestData={$type:"devvit.plugin.http.RequestData",encode(e82,n=_m0.Writer.create()){return e82.method!==""&&n.uint32(10).string(e82.method),Object.entries(e82.headers).forEach(([t,o])=>{RequestData_HeadersEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),e82.body.length!==0&&n.uint32(26).bytes(e82.body),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRequestData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.method=t.string();continue;case 2:if(r!==18)break;let a=RequestData_HeadersEntry.decode(t,t.uint32());a.value!==void 0&&(d.headers[a.key]=a.value);continue;case 3:if(r!==26)break;d.body=t.bytes();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{method:isSet$v(e82.method)?globalThis.String(e82.method):"",headers:isObject$i(e82.headers)?Object.entries(e82.headers).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{},body:isSet$v(e82.body)?bytesFromBase64(e82.body):new Uint8Array(0)}},toJSON(e82){let n={};if(e82.method!==""&&(n.method=e82.method),e82.headers){let t=Object.entries(e82.headers);t.length>0&&(n.headers={},t.forEach(([o,d])=>{n.headers[o]=d}))}return e82.body.length!==0&&(n.body=base64FromBytes(e82.body)),n},create(e82){return RequestData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRequestData();return n.method=e82.method??"",n.headers=Object.entries(e82.headers??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=globalThis.String(d)),t),{}),n.body=e82.body??new Uint8Array(0),n}};messageTypeRegistry.set(RequestData.$type,RequestData);function createBaseRequestData_HeadersEntry(){return{key:"",value:""}}var RequestData_HeadersEntry={$type:"devvit.plugin.http.RequestData.HeadersEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRequestData_HeadersEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$v(e82.key)?globalThis.String(e82.key):"",value:isSet$v(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return RequestData_HeadersEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRequestData_HeadersEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(RequestData_HeadersEntry.$type,RequestData_HeadersEntry);function createBaseFetchResponse(){return{url:"",body:new Uint8Array(0),status:0,headers:{}}}var FetchResponse={$type:"devvit.plugin.http.FetchResponse",encode(e82,n=_m0.Writer.create()){return e82.url!==""&&n.uint32(10).string(e82.url),e82.body.length!==0&&n.uint32(18).bytes(e82.body),e82.status!==0&&n.uint32(24).int32(e82.status),Object.entries(e82.headers).forEach(([t,o])=>{FetchResponse_HeadersEntry.encode({key:t,value:o},n.uint32(34).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFetchResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=t.string();continue;case 2:if(r!==18)break;d.body=t.bytes();continue;case 3:if(r!==24)break;d.status=t.int32();continue;case 4:if(r!==34)break;let a=FetchResponse_HeadersEntry.decode(t,t.uint32());a.value!==void 0&&(d.headers[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$v(e82.url)?globalThis.String(e82.url):"",body:isSet$v(e82.body)?bytesFromBase64(e82.body):new Uint8Array(0),status:isSet$v(e82.status)?globalThis.Number(e82.status):0,headers:isObject$i(e82.headers)?Object.entries(e82.headers).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{}}},toJSON(e82){let n={};if(e82.url!==""&&(n.url=e82.url),e82.body.length!==0&&(n.body=base64FromBytes(e82.body)),e82.status!==0&&(n.status=Math.round(e82.status)),e82.headers){let t=Object.entries(e82.headers);t.length>0&&(n.headers={},t.forEach(([o,d])=>{n.headers[o]=d}))}return n},create(e82){return FetchResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFetchResponse();return n.url=e82.url??"",n.body=e82.body??new Uint8Array(0),n.status=e82.status??0,n.headers=Object.entries(e82.headers??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=globalThis.String(d)),t),{}),n}};messageTypeRegistry.set(FetchResponse.$type,FetchResponse);function createBaseFetchResponse_HeadersEntry(){return{key:"",value:""}}var FetchResponse_HeadersEntry={$type:"devvit.plugin.http.FetchResponse.HeadersEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFetchResponse_HeadersEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$v(e82.key)?globalThis.String(e82.key):"",value:isSet$v(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return FetchResponse_HeadersEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFetchResponse_HeadersEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(FetchResponse_HeadersEntry.$type,FetchResponse_HeadersEntry);var HTTPDefinition={name:"HTTP",fullName:"devvit.plugin.http.HTTP",methods:{fetch:{name:"Fetch",requestType:FetchRequest,requestStream:!1,responseType:FetchResponse,responseStream:!1,options:{}}}};function bytesFromBase64(e82){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e82,"base64"));{let n=globalThis.atob(e82),t=new Uint8Array(n.length);for(let o=0;o<n.length;++o)t[o]=n.charCodeAt(o);return t}}function base64FromBytes(e82){if(globalThis.Buffer)return globalThis.Buffer.from(e82).toString("base64");{let n=[];return e82.forEach(t=>{n.push(globalThis.String.fromCharCode(t))}),globalThis.btoa(n.join(""))}}function isObject$i(e82){return typeof e82=="object"&&e82!==null}function isSet$v(e82){return e82!=null}function createBaseMessageSet(){return{messages:{}}}var MessageSet={$type:"devvit.plugin.kvstore.MessageSet",encode(e82,n=_m0.Writer.create()){return Object.entries(e82.messages).forEach(([t,o])=>{MessageSet_MessagesEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMessageSet();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=MessageSet_MessagesEntry.decode(t,t.uint32());a.value!==void 0&&(d.messages[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{messages:isObject$h(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{}}},toJSON(e82){let n={};if(e82.messages){let t=Object.entries(e82.messages);t.length>0&&(n.messages={},t.forEach(([o,d])=>{n.messages[o]=d}))}return n},create(e82){return MessageSet.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMessageSet();return n.messages=Object.entries(e82.messages??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=globalThis.String(d)),t),{}),n}};messageTypeRegistry.set(MessageSet.$type,MessageSet);function createBaseMessageSet_MessagesEntry(){return{key:"",value:""}}var MessageSet_MessagesEntry={$type:"devvit.plugin.kvstore.MessageSet.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMessageSet_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$u(e82.key)?globalThis.String(e82.key):"",value:isSet$u(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return MessageSet_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMessageSet_MessagesEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(MessageSet_MessagesEntry.$type,MessageSet_MessagesEntry);function createBaseKeySet(){return{keys:[]}}var KeySet={$type:"devvit.plugin.kvstore.KeySet",encode(e82,n=_m0.Writer.create()){for(let t of e82.keys)n.uint32(10).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseKeySet();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.keys.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{keys:globalThis.Array.isArray(e82?.keys)?e82.keys.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.keys)!=null&&t.length&&(n.keys=e82.keys),n},create(e82){return KeySet.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseKeySet();return n.keys=((t=e82.keys)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(KeySet.$type,KeySet);function createBaseListFilter(){return{filter:""}}var ListFilter={$type:"devvit.plugin.kvstore.ListFilter",encode(e82,n=_m0.Writer.create()){return e82.filter!==""&&n.uint32(10).string(e82.filter),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseListFilter();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.filter=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{filter:isSet$u(e82.filter)?globalThis.String(e82.filter):""}},toJSON(e82){let n={};return e82.filter!==""&&(n.filter=e82.filter),n},create(e82){return ListFilter.fromPartial(e82??{})},fromPartial(e82){let n=createBaseListFilter();return n.filter=e82.filter??"",n}};messageTypeRegistry.set(ListFilter.$type,ListFilter);var KVStoreDefinition={name:"KVStore",fullName:"devvit.plugin.kvstore.KVStore",methods:{put:{name:"Put",requestType:MessageSet,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}},get:{name:"Get",requestType:KeySet,requestStream:!1,responseType:MessageSet,responseStream:!1,options:{}},del:{name:"Del",requestType:KeySet,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}},list:{name:"List",requestType:ListFilter,requestStream:!1,responseType:KeySet,responseStream:!1,options:{}}}};function isObject$h(e82){return typeof e82=="object"&&e82!==null}function isSet$u(e82){return e82!=null}var Severity;(function(e82){e82[e82.DEBUG=0]="DEBUG",e82[e82.INFO=1]="INFO",e82[e82.WARN=2]="WARN",e82[e82.ERROR=3]="ERROR",e82[e82.VERBOSE=4]="VERBOSE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Severity||(Severity={}));function severityFromJSON(e82){switch(e82){case 0:case"DEBUG":return Severity.DEBUG;case 1:case"INFO":return Severity.INFO;case 2:case"WARN":return Severity.WARN;case 3:case"ERROR":return Severity.ERROR;case 4:case"VERBOSE":return Severity.VERBOSE;case-1:case"UNRECOGNIZED":default:return Severity.UNRECOGNIZED}}function severityToJSON(e82){switch(e82){case Severity.DEBUG:return 0;case Severity.INFO:return 1;case Severity.WARN:return 2;case Severity.ERROR:return 3;case Severity.VERBOSE:return 4;case Severity.UNRECOGNIZED:default:return-1}}function createBaseLogErrorMessage(){return{message:"",name:"",fileName:void 0,lineNumber:void 0,columnNumber:void 0,stack:void 0,timestamp:void 0,tags:[]}}var LogErrorMessage={$type:"devvit.plugin.logger.LogErrorMessage",encode(e82,n=_m0.Writer.create()){e82.message!==""&&n.uint32(10).string(e82.message),e82.name!==""&&n.uint32(18).string(e82.name),e82.fileName!==void 0&&StringValue.encode({value:e82.fileName},n.uint32(26).fork()).ldelim(),e82.lineNumber!==void 0&&UInt32Value.encode({value:e82.lineNumber},n.uint32(34).fork()).ldelim(),e82.columnNumber!==void 0&&UInt32Value.encode({value:e82.columnNumber},n.uint32(42).fork()).ldelim(),e82.stack!==void 0&&StringValue.encode({value:e82.stack},n.uint32(50).fork()).ldelim(),e82.timestamp!==void 0&&Timestamp.encode(toTimestamp$3(e82.timestamp),n.uint32(58).fork()).ldelim();for(let t of e82.tags)n.uint32(66).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLogErrorMessage();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.message=t.string();continue;case 2:if(r!==18)break;d.name=t.string();continue;case 3:if(r!==26)break;d.fileName=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.lineNumber=UInt32Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.columnNumber=UInt32Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.stack=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.timestamp=fromTimestamp$3(Timestamp.decode(t,t.uint32()));continue;case 8:if(r!==66)break;d.tags.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{message:isSet$t(e82.message)?globalThis.String(e82.message):"",name:isSet$t(e82.name)?globalThis.String(e82.name):"",fileName:isSet$t(e82.fileName)?String(e82.fileName):void 0,lineNumber:isSet$t(e82.lineNumber)?Number(e82.lineNumber):void 0,columnNumber:isSet$t(e82.columnNumber)?Number(e82.columnNumber):void 0,stack:isSet$t(e82.stack)?String(e82.stack):void 0,timestamp:isSet$t(e82.timestamp)?fromJsonTimestamp$3(e82.timestamp):void 0,tags:globalThis.Array.isArray(e82?.tags)?e82.tags.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.message!==""&&(n.message=e82.message),e82.name!==""&&(n.name=e82.name),e82.fileName!==void 0&&(n.fileName=e82.fileName),e82.lineNumber!==void 0&&(n.lineNumber=e82.lineNumber),e82.columnNumber!==void 0&&(n.columnNumber=e82.columnNumber),e82.stack!==void 0&&(n.stack=e82.stack),e82.timestamp!==void 0&&(n.timestamp=e82.timestamp.toISOString()),(t=e82.tags)!=null&&t.length&&(n.tags=e82.tags),n},create(e82){return LogErrorMessage.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseLogErrorMessage();return n.message=e82.message??"",n.name=e82.name??"",n.fileName=e82.fileName??void 0,n.lineNumber=e82.lineNumber??void 0,n.columnNumber=e82.columnNumber??void 0,n.stack=e82.stack??void 0,n.timestamp=e82.timestamp??void 0,n.tags=((t=e82.tags)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(LogErrorMessage.$type,LogErrorMessage);function createBaseLogEventMessage(){return{type:"",timestamp:void 0,labels:{},data:{}}}var LogEventMessage={$type:"devvit.plugin.logger.LogEventMessage",encode(e82,n=_m0.Writer.create()){return e82.type!==""&&n.uint32(10).string(e82.type),e82.timestamp!==void 0&&Timestamp.encode(toTimestamp$3(e82.timestamp),n.uint32(18).fork()).ldelim(),Object.entries(e82.labels).forEach(([t,o])=>{LogEventMessage_LabelsEntry.encode({key:t,value:o},n.uint32(26).fork()).ldelim()}),Object.entries(e82.data).forEach(([t,o])=>{LogEventMessage_DataEntry.encode({key:t,value:o},n.uint32(34).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLogEventMessage();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.type=t.string();continue;case 2:if(r!==18)break;d.timestamp=fromTimestamp$3(Timestamp.decode(t,t.uint32()));continue;case 3:if(r!==26)break;let a=LogEventMessage_LabelsEntry.decode(t,t.uint32());a.value!==void 0&&(d.labels[a.key]=a.value);continue;case 4:if(r!==34)break;let u=LogEventMessage_DataEntry.decode(t,t.uint32());u.value!==void 0&&(d.data[u.key]=u.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{type:isSet$t(e82.type)?globalThis.String(e82.type):"",timestamp:isSet$t(e82.timestamp)?fromJsonTimestamp$3(e82.timestamp):void 0,labels:isObject$g(e82.labels)?Object.entries(e82.labels).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{},data:isObject$g(e82.data)?Object.entries(e82.data).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{}}},toJSON(e82){let n={};if(e82.type!==""&&(n.type=e82.type),e82.timestamp!==void 0&&(n.timestamp=e82.timestamp.toISOString()),e82.labels){let t=Object.entries(e82.labels);t.length>0&&(n.labels={},t.forEach(([o,d])=>{n.labels[o]=d}))}if(e82.data){let t=Object.entries(e82.data);t.length>0&&(n.data={},t.forEach(([o,d])=>{n.data[o]=d}))}return n},create(e82){return LogEventMessage.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLogEventMessage();return n.type=e82.type??"",n.timestamp=e82.timestamp??void 0,n.labels=Object.entries(e82.labels??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=globalThis.String(d)),t),{}),n.data=Object.entries(e82.data??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=globalThis.String(d)),t),{}),n}};messageTypeRegistry.set(LogEventMessage.$type,LogEventMessage);function createBaseLogEventMessage_LabelsEntry(){return{key:"",value:""}}var LogEventMessage_LabelsEntry={$type:"devvit.plugin.logger.LogEventMessage.LabelsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLogEventMessage_LabelsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$t(e82.key)?globalThis.String(e82.key):"",value:isSet$t(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return LogEventMessage_LabelsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLogEventMessage_LabelsEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(LogEventMessage_LabelsEntry.$type,LogEventMessage_LabelsEntry);function createBaseLogEventMessage_DataEntry(){return{key:"",value:""}}var LogEventMessage_DataEntry={$type:"devvit.plugin.logger.LogEventMessage.DataEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLogEventMessage_DataEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$t(e82.key)?globalThis.String(e82.key):"",value:isSet$t(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return LogEventMessage_DataEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLogEventMessage_DataEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(LogEventMessage_DataEntry.$type,LogEventMessage_DataEntry);function createBaseLogMessage(){return{severity:0,message:"",timestamp:void 0,tags:[]}}var LogMessage={$type:"devvit.plugin.logger.LogMessage",encode(e82,n=_m0.Writer.create()){e82.severity!==0&&n.uint32(8).int32(e82.severity),e82.message!==""&&n.uint32(18).string(e82.message),e82.timestamp!==void 0&&Timestamp.encode(toTimestamp$3(e82.timestamp),n.uint32(26).fork()).ldelim();for(let t of e82.tags)n.uint32(34).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLogMessage();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.severity=t.int32();continue;case 2:if(r!==18)break;d.message=t.string();continue;case 3:if(r!==26)break;d.timestamp=fromTimestamp$3(Timestamp.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.tags.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{severity:isSet$t(e82.severity)?severityFromJSON(e82.severity):0,message:isSet$t(e82.message)?globalThis.String(e82.message):"",timestamp:isSet$t(e82.timestamp)?fromJsonTimestamp$3(e82.timestamp):void 0,tags:globalThis.Array.isArray(e82?.tags)?e82.tags.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.severity!==0&&(n.severity=severityToJSON(e82.severity)),e82.message!==""&&(n.message=e82.message),e82.timestamp!==void 0&&(n.timestamp=e82.timestamp.toISOString()),(t=e82.tags)!=null&&t.length&&(n.tags=e82.tags),n},create(e82){return LogMessage.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseLogMessage();return n.severity=e82.severity??0,n.message=e82.message??"",n.timestamp=e82.timestamp??void 0,n.tags=((t=e82.tags)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(LogMessage.$type,LogMessage);function createBaseLogMessages(){return{messages:[]}}var LogMessages={$type:"devvit.plugin.logger.LogMessages",encode(e82,n=_m0.Writer.create()){for(let t of e82.messages)LogMessage.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLogMessages();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.messages.push(LogMessage.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{messages:globalThis.Array.isArray(e82?.messages)?e82.messages.map(n=>LogMessage.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.messages)!=null&&t.length&&(n.messages=e82.messages.map(o=>LogMessage.toJSON(o))),n},create(e82){return LogMessages.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseLogMessages();return n.messages=((t=e82.messages)==null?void 0:t.map(o=>LogMessage.fromPartial(o)))||[],n}};messageTypeRegistry.set(LogMessages.$type,LogMessages);function createBaseLogErrorResponse(){return{}}var LogErrorResponse={$type:"devvit.plugin.logger.LogErrorResponse",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLogErrorResponse();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return LogErrorResponse.fromPartial(e82??{})},fromPartial(e82){return createBaseLogErrorResponse()}};messageTypeRegistry.set(LogErrorResponse.$type,LogErrorResponse);function createBaseLogEventResponse(){return{}}var LogEventResponse={$type:"devvit.plugin.logger.LogEventResponse",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLogEventResponse();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return LogEventResponse.fromPartial(e82??{})},fromPartial(e82){return createBaseLogEventResponse()}};messageTypeRegistry.set(LogEventResponse.$type,LogEventResponse);function createBaseLogResponse(){return{}}var LogResponse={$type:"devvit.plugin.logger.LogResponse",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLogResponse();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return LogResponse.fromPartial(e82??{})},fromPartial(e82){return createBaseLogResponse()}};messageTypeRegistry.set(LogResponse.$type,LogResponse);var LoggerDefinition={name:"Logger",fullName:"devvit.plugin.logger.Logger",methods:{error:{name:"Error",requestType:LogErrorMessage,requestStream:!1,responseType:LogErrorResponse,responseStream:!1,options:{}},event:{name:"Event",requestType:LogEventMessage,requestStream:!1,responseType:LogEventResponse,responseStream:!1,options:{}},log:{name:"Log",requestType:LogMessage,requestStream:!1,responseType:LogResponse,responseStream:!1,options:{}},logBatch:{name:"LogBatch",requestType:LogMessages,requestStream:!1,responseType:LogResponse,responseStream:!1,options:{}},logStream:{name:"LogStream",requestType:LogMessage,requestStream:!0,responseType:LogResponse,responseStream:!1,options:{}}}};function toTimestamp$3(e82){let n=Math.trunc(e82.getTime()/1e3),t=e82.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function fromTimestamp$3(e82){let n=(e82.seconds||0)*1e3;return n+=(e82.nanos||0)/1e6,new globalThis.Date(n)}function fromJsonTimestamp$3(e82){return e82 instanceof globalThis.Date?e82:typeof e82=="string"?new globalThis.Date(e82):fromTimestamp$3(Timestamp.fromJSON(e82))}function isObject$g(e82){return typeof e82=="object"&&e82!==null}function isSet$t(e82){return e82!=null}function createBaseMediaUploadRequest(){return{url:"",type:""}}var MediaUploadRequest={$type:"devvit.plugin.media.MediaUploadRequest",encode(e82,n=_m0.Writer.create()){return e82.url!==""&&n.uint32(10).string(e82.url),e82.type!==""&&n.uint32(18).string(e82.type),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMediaUploadRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=t.string();continue;case 2:if(r!==18)break;d.type=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$s(e82.url)?globalThis.String(e82.url):"",type:isSet$s(e82.type)?globalThis.String(e82.type):""}},toJSON(e82){let n={};return e82.url!==""&&(n.url=e82.url),e82.type!==""&&(n.type=e82.type),n},create(e82){return MediaUploadRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMediaUploadRequest();return n.url=e82.url??"",n.type=e82.type??"",n}};messageTypeRegistry.set(MediaUploadRequest.$type,MediaUploadRequest);function createBaseMediaUploadResponse(){return{mediaId:"",mediaUrl:""}}var MediaUploadResponse={$type:"devvit.plugin.media.MediaUploadResponse",encode(e82,n=_m0.Writer.create()){return e82.mediaId!==""&&n.uint32(10).string(e82.mediaId),e82.mediaUrl!==""&&n.uint32(18).string(e82.mediaUrl),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMediaUploadResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.mediaId=t.string();continue;case 2:if(r!==18)break;d.mediaUrl=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{mediaId:isSet$s(e82.mediaId)?globalThis.String(e82.mediaId):"",mediaUrl:isSet$s(e82.mediaUrl)?globalThis.String(e82.mediaUrl):""}},toJSON(e82){let n={};return e82.mediaId!==""&&(n.mediaId=e82.mediaId),e82.mediaUrl!==""&&(n.mediaUrl=e82.mediaUrl),n},create(e82){return MediaUploadResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMediaUploadResponse();return n.mediaId=e82.mediaId??"",n.mediaUrl=e82.mediaUrl??"",n}};messageTypeRegistry.set(MediaUploadResponse.$type,MediaUploadResponse);var MediaServiceDefinition={name:"MediaService",fullName:"devvit.plugin.media.MediaService",methods:{upload:{name:"Upload",requestType:MediaUploadRequest,requestStream:!1,responseType:MediaUploadResponse,responseStream:!1,options:{}}}};function isSet$s(e82){return e82!=null}function createBaseModlogRequest(){return{action:"",details:void 0,description:void 0,note:void 0,target:void 0}}var ModlogRequest={$type:"devvit.plugin.modlog.ModlogRequest",encode(e82,n=_m0.Writer.create()){return e82.action!==""&&n.uint32(10).string(e82.action),e82.details!==void 0&&n.uint32(18).string(e82.details),e82.description!==void 0&&n.uint32(26).string(e82.description),e82.note!==void 0&&n.uint32(34).string(e82.note),e82.target!==void 0&&n.uint32(42).string(e82.target),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModlogRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.action=t.string();continue;case 2:if(r!==18)break;d.details=t.string();continue;case 3:if(r!==26)break;d.description=t.string();continue;case 4:if(r!==34)break;d.note=t.string();continue;case 5:if(r!==42)break;d.target=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{action:isSet$r(e82.action)?globalThis.String(e82.action):"",details:isSet$r(e82.details)?globalThis.String(e82.details):void 0,description:isSet$r(e82.description)?globalThis.String(e82.description):void 0,note:isSet$r(e82.note)?globalThis.String(e82.note):void 0,target:isSet$r(e82.target)?globalThis.String(e82.target):void 0}},toJSON(e82){let n={};return e82.action!==""&&(n.action=e82.action),e82.details!==void 0&&(n.details=e82.details),e82.description!==void 0&&(n.description=e82.description),e82.note!==void 0&&(n.note=e82.note),e82.target!==void 0&&(n.target=e82.target),n},create(e82){return ModlogRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseModlogRequest();return n.action=e82.action??"",n.details=e82.details??void 0,n.description=e82.description??void 0,n.note=e82.note??void 0,n.target=e82.target??void 0,n}};messageTypeRegistry.set(ModlogRequest.$type,ModlogRequest);function createBaseModlogResponse(){return{success:!1}}var ModlogResponse={$type:"devvit.plugin.modlog.ModlogResponse",encode(e82,n=_m0.Writer.create()){return e82.success!==!1&&n.uint32(8).bool(e82.success),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModlogResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.success=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{success:isSet$r(e82.success)?globalThis.Boolean(e82.success):!1}},toJSON(e82){let n={};return e82.success!==!1&&(n.success=e82.success),n},create(e82){return ModlogResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseModlogResponse();return n.success=e82.success??!1,n}};messageTypeRegistry.set(ModlogResponse.$type,ModlogResponse);var ModlogDefinition={name:"Modlog",fullName:"devvit.plugin.modlog.Modlog",methods:{add:{name:"Add",requestType:ModlogRequest,requestStream:!1,responseType:ModlogResponse,responseStream:!1,options:{}}}};function isSet$r(e82){return e82!=null}function createBaseClearFlairTemplatesRequest(){return{subreddit:"",flairType:""}}var ClearFlairTemplatesRequest={$type:"devvit.plugin.redditapi.flair.ClearFlairTemplatesRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.flairType!==""&&n.uint32(18).string(e82.flairType),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseClearFlairTemplatesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.flairType=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",flairType:isSet$q(e82.flairType)?globalThis.String(e82.flairType):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.flairType!==""&&(n.flairType=e82.flairType),n},create(e82){return ClearFlairTemplatesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseClearFlairTemplatesRequest();return n.subreddit=e82.subreddit??"",n.flairType=e82.flairType??"",n}};messageTypeRegistry.set(ClearFlairTemplatesRequest.$type,ClearFlairTemplatesRequest);function createBaseDeleteFlairRequest(){return{subreddit:"",name:""}}var DeleteFlairRequest={$type:"devvit.plugin.redditapi.flair.DeleteFlairRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.name!==""&&n.uint32(18).string(e82.name),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDeleteFlairRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.name=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",name:isSet$q(e82.name)?globalThis.String(e82.name):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.name!==""&&(n.name=e82.name),n},create(e82){return DeleteFlairRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDeleteFlairRequest();return n.subreddit=e82.subreddit??"",n.name=e82.name??"",n}};messageTypeRegistry.set(DeleteFlairRequest.$type,DeleteFlairRequest);function createBaseDeleteFlairTemplateRequest(){return{subreddit:"",flairTemplateId:""}}var DeleteFlairTemplateRequest={$type:"devvit.plugin.redditapi.flair.DeleteFlairTemplateRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.flairTemplateId!==""&&n.uint32(18).string(e82.flairTemplateId),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDeleteFlairTemplateRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.flairTemplateId=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",flairTemplateId:isSet$q(e82.flairTemplateId)?globalThis.String(e82.flairTemplateId):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.flairTemplateId!==""&&(n.flairTemplateId=e82.flairTemplateId),n},create(e82){return DeleteFlairTemplateRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDeleteFlairTemplateRequest();return n.subreddit=e82.subreddit??"",n.flairTemplateId=e82.flairTemplateId??"",n}};messageTypeRegistry.set(DeleteFlairTemplateRequest.$type,DeleteFlairTemplateRequest);function createBaseFlairRequest(){return{subreddit:"",cssClass:void 0,link:void 0,name:void 0,text:void 0}}var FlairRequest={$type:"devvit.plugin.redditapi.flair.FlairRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.cssClass!==void 0&&StringValue.encode({value:e82.cssClass},n.uint32(18).fork()).ldelim(),e82.link!==void 0&&StringValue.encode({value:e82.link},n.uint32(26).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(34).fork()).ldelim(),e82.text!==void 0&&StringValue.encode({value:e82.text},n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.cssClass=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.link=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.text=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",cssClass:isSet$q(e82.cssClass)?String(e82.cssClass):void 0,link:isSet$q(e82.link)?String(e82.link):void 0,name:isSet$q(e82.name)?String(e82.name):void 0,text:isSet$q(e82.text)?String(e82.text):void 0}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.cssClass!==void 0&&(n.cssClass=e82.cssClass),e82.link!==void 0&&(n.link=e82.link),e82.name!==void 0&&(n.name=e82.name),e82.text!==void 0&&(n.text=e82.text),n},create(e82){return FlairRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairRequest();return n.subreddit=e82.subreddit??"",n.cssClass=e82.cssClass??void 0,n.link=e82.link??void 0,n.name=e82.name??void 0,n.text=e82.text??void 0,n}};messageTypeRegistry.set(FlairRequest.$type,FlairRequest);function createBaseFlairTemplateOrderRequest(){return{subreddit:"",flairType:"",order:[]}}var FlairTemplateOrderRequest={$type:"devvit.plugin.redditapi.flair.FlairTemplateOrderRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.flairType!==""&&n.uint32(18).string(e82.flairType);for(let t of e82.order)n.uint32(26).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairTemplateOrderRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.flairType=t.string();continue;case 3:if(r!==26)break;d.order.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",flairType:isSet$q(e82.flairType)?globalThis.String(e82.flairType):"",order:globalThis.Array.isArray(e82?.order)?e82.order.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.flairType!==""&&(n.flairType=e82.flairType),(t=e82.order)!=null&&t.length&&(n.order=e82.order),n},create(e82){return FlairTemplateOrderRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFlairTemplateOrderRequest();return n.subreddit=e82.subreddit??"",n.flairType=e82.flairType??"",n.order=((t=e82.order)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(FlairTemplateOrderRequest.$type,FlairTemplateOrderRequest);function createBaseFlairConfigRequest(){return{subreddit:"",flairEnabled:!1,flairPosition:"",flairSelfAssignEnabled:!1,linkFlairPosition:"",linkFlairSelfAssignEnabled:!1}}var FlairConfigRequest={$type:"devvit.plugin.redditapi.flair.FlairConfigRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.flairEnabled!==!1&&n.uint32(16).bool(e82.flairEnabled),e82.flairPosition!==""&&n.uint32(26).string(e82.flairPosition),e82.flairSelfAssignEnabled!==!1&&n.uint32(32).bool(e82.flairSelfAssignEnabled),e82.linkFlairPosition!==""&&n.uint32(42).string(e82.linkFlairPosition),e82.linkFlairSelfAssignEnabled!==!1&&n.uint32(48).bool(e82.linkFlairSelfAssignEnabled),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairConfigRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==16)break;d.flairEnabled=t.bool();continue;case 3:if(r!==26)break;d.flairPosition=t.string();continue;case 4:if(r!==32)break;d.flairSelfAssignEnabled=t.bool();continue;case 5:if(r!==42)break;d.linkFlairPosition=t.string();continue;case 6:if(r!==48)break;d.linkFlairSelfAssignEnabled=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",flairEnabled:isSet$q(e82.flairEnabled)?globalThis.Boolean(e82.flairEnabled):!1,flairPosition:isSet$q(e82.flairPosition)?globalThis.String(e82.flairPosition):"",flairSelfAssignEnabled:isSet$q(e82.flairSelfAssignEnabled)?globalThis.Boolean(e82.flairSelfAssignEnabled):!1,linkFlairPosition:isSet$q(e82.linkFlairPosition)?globalThis.String(e82.linkFlairPosition):"",linkFlairSelfAssignEnabled:isSet$q(e82.linkFlairSelfAssignEnabled)?globalThis.Boolean(e82.linkFlairSelfAssignEnabled):!1}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.flairEnabled!==!1&&(n.flairEnabled=e82.flairEnabled),e82.flairPosition!==""&&(n.flairPosition=e82.flairPosition),e82.flairSelfAssignEnabled!==!1&&(n.flairSelfAssignEnabled=e82.flairSelfAssignEnabled),e82.linkFlairPosition!==""&&(n.linkFlairPosition=e82.linkFlairPosition),e82.linkFlairSelfAssignEnabled!==!1&&(n.linkFlairSelfAssignEnabled=e82.linkFlairSelfAssignEnabled),n},create(e82){return FlairConfigRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairConfigRequest();return n.subreddit=e82.subreddit??"",n.flairEnabled=e82.flairEnabled??!1,n.flairPosition=e82.flairPosition??"",n.flairSelfAssignEnabled=e82.flairSelfAssignEnabled??!1,n.linkFlairPosition=e82.linkFlairPosition??"",n.linkFlairSelfAssignEnabled=e82.linkFlairSelfAssignEnabled??!1,n}};messageTypeRegistry.set(FlairConfigRequest.$type,FlairConfigRequest);function createBaseFlairCsvRequest(){return{subreddit:"",flairCsv:""}}var FlairCsvRequest={$type:"devvit.plugin.redditapi.flair.FlairCsvRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.flairCsv!==""&&n.uint32(18).string(e82.flairCsv),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairCsvRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.flairCsv=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",flairCsv:isSet$q(e82.flairCsv)?globalThis.String(e82.flairCsv):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.flairCsv!==""&&(n.flairCsv=e82.flairCsv),n},create(e82){return FlairCsvRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairCsvRequest();return n.subreddit=e82.subreddit??"",n.flairCsv=e82.flairCsv??"",n}};messageTypeRegistry.set(FlairCsvRequest.$type,FlairCsvRequest);function createBaseFlairListRequest(){return{subreddit:"",after:void 0,before:void 0,count:void 0,limit:void 0,name:void 0,show:void 0}}var FlairListRequest={$type:"devvit.plugin.redditapi.flair.FlairListRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(18).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(26).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(34).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(42).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(50).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairListRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.show=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",after:isSet$q(e82.after)?String(e82.after):void 0,before:isSet$q(e82.before)?String(e82.before):void 0,count:isSet$q(e82.count)?Number(e82.count):void 0,limit:isSet$q(e82.limit)?Number(e82.limit):void 0,name:isSet$q(e82.name)?String(e82.name):void 0,show:isSet$q(e82.show)?String(e82.show):void 0}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.name!==void 0&&(n.name=e82.name),e82.show!==void 0&&(n.show=e82.show),n},create(e82){return FlairListRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairListRequest();return n.subreddit=e82.subreddit??"",n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.name=e82.name??void 0,n.show=e82.show??void 0,n}};messageTypeRegistry.set(FlairListRequest.$type,FlairListRequest);function createBaseFlairSelectorRequest(){return{subreddit:"",isNewlink:!1,link:void 0,name:""}}var FlairSelectorRequest={$type:"devvit.plugin.redditapi.flair.FlairSelectorRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.isNewlink!==!1&&n.uint32(16).bool(e82.isNewlink),e82.link!==void 0&&StringValue.encode({value:e82.link},n.uint32(26).fork()).ldelim(),e82.name!==""&&n.uint32(34).string(e82.name),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairSelectorRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==16)break;d.isNewlink=t.bool();continue;case 3:if(r!==26)break;d.link=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.name=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",isNewlink:isSet$q(e82.isNewlink)?globalThis.Boolean(e82.isNewlink):!1,link:isSet$q(e82.link)?String(e82.link):void 0,name:isSet$q(e82.name)?globalThis.String(e82.name):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.isNewlink!==!1&&(n.isNewlink=e82.isNewlink),e82.link!==void 0&&(n.link=e82.link),e82.name!==""&&(n.name=e82.name),n},create(e82){return FlairSelectorRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairSelectorRequest();return n.subreddit=e82.subreddit??"",n.isNewlink=e82.isNewlink??!1,n.link=e82.link??void 0,n.name=e82.name??"",n}};messageTypeRegistry.set(FlairSelectorRequest.$type,FlairSelectorRequest);function createBaseFlairTemplateRequest(){return{subreddit:"",allowableContent:"",backgroundColor:"",cssClass:"",flairTemplateId:"",flairType:"",maxEmojis:0,modOnly:!1,overrideCss:!1,text:"",textColor:"",textEditable:!1}}var FlairTemplateRequest={$type:"devvit.plugin.redditapi.flair.FlairTemplateRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.allowableContent!==""&&n.uint32(18).string(e82.allowableContent),e82.backgroundColor!==""&&n.uint32(26).string(e82.backgroundColor),e82.cssClass!==""&&n.uint32(34).string(e82.cssClass),e82.flairTemplateId!==""&&n.uint32(42).string(e82.flairTemplateId),e82.flairType!==""&&n.uint32(50).string(e82.flairType),e82.maxEmojis!==0&&n.uint32(56).int64(e82.maxEmojis),e82.modOnly!==!1&&n.uint32(64).bool(e82.modOnly),e82.overrideCss!==!1&&n.uint32(72).bool(e82.overrideCss),e82.text!==""&&n.uint32(82).string(e82.text),e82.textColor!==""&&n.uint32(90).string(e82.textColor),e82.textEditable!==!1&&n.uint32(96).bool(e82.textEditable),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairTemplateRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.allowableContent=t.string();continue;case 3:if(r!==26)break;d.backgroundColor=t.string();continue;case 4:if(r!==34)break;d.cssClass=t.string();continue;case 5:if(r!==42)break;d.flairTemplateId=t.string();continue;case 6:if(r!==50)break;d.flairType=t.string();continue;case 7:if(r!==56)break;d.maxEmojis=longToNumber$3(t.int64());continue;case 8:if(r!==64)break;d.modOnly=t.bool();continue;case 9:if(r!==72)break;d.overrideCss=t.bool();continue;case 10:if(r!==82)break;d.text=t.string();continue;case 11:if(r!==90)break;d.textColor=t.string();continue;case 12:if(r!==96)break;d.textEditable=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",allowableContent:isSet$q(e82.allowableContent)?globalThis.String(e82.allowableContent):"",backgroundColor:isSet$q(e82.backgroundColor)?globalThis.String(e82.backgroundColor):"",cssClass:isSet$q(e82.cssClass)?globalThis.String(e82.cssClass):"",flairTemplateId:isSet$q(e82.flairTemplateId)?globalThis.String(e82.flairTemplateId):"",flairType:isSet$q(e82.flairType)?globalThis.String(e82.flairType):"",maxEmojis:isSet$q(e82.maxEmojis)?globalThis.Number(e82.maxEmojis):0,modOnly:isSet$q(e82.modOnly)?globalThis.Boolean(e82.modOnly):!1,overrideCss:isSet$q(e82.overrideCss)?globalThis.Boolean(e82.overrideCss):!1,text:isSet$q(e82.text)?globalThis.String(e82.text):"",textColor:isSet$q(e82.textColor)?globalThis.String(e82.textColor):"",textEditable:isSet$q(e82.textEditable)?globalThis.Boolean(e82.textEditable):!1}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.allowableContent!==""&&(n.allowableContent=e82.allowableContent),e82.backgroundColor!==""&&(n.backgroundColor=e82.backgroundColor),e82.cssClass!==""&&(n.cssClass=e82.cssClass),e82.flairTemplateId!==""&&(n.flairTemplateId=e82.flairTemplateId),e82.flairType!==""&&(n.flairType=e82.flairType),e82.maxEmojis!==0&&(n.maxEmojis=Math.round(e82.maxEmojis)),e82.modOnly!==!1&&(n.modOnly=e82.modOnly),e82.overrideCss!==!1&&(n.overrideCss=e82.overrideCss),e82.text!==""&&(n.text=e82.text),e82.textColor!==""&&(n.textColor=e82.textColor),e82.textEditable!==!1&&(n.textEditable=e82.textEditable),n},create(e82){return FlairTemplateRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairTemplateRequest();return n.subreddit=e82.subreddit??"",n.allowableContent=e82.allowableContent??"",n.backgroundColor=e82.backgroundColor??"",n.cssClass=e82.cssClass??"",n.flairTemplateId=e82.flairTemplateId??"",n.flairType=e82.flairType??"",n.maxEmojis=e82.maxEmojis??0,n.modOnly=e82.modOnly??!1,n.overrideCss=e82.overrideCss??!1,n.text=e82.text??"",n.textColor=e82.textColor??"",n.textEditable=e82.textEditable??!1,n}};messageTypeRegistry.set(FlairTemplateRequest.$type,FlairTemplateRequest);function createBaseLinkFlairRequest(){return{subreddit:""}}var LinkFlairRequest={$type:"devvit.plugin.redditapi.flair.LinkFlairRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkFlairRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return LinkFlairRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLinkFlairRequest();return n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(LinkFlairRequest.$type,LinkFlairRequest);function createBaseSelectFlairRequest(){return{subreddit:"",backgroundColor:"",cssClass:"",flairTemplateId:"",link:"",name:"",returnRtjson:"",text:"",textColor:""}}var SelectFlairRequest={$type:"devvit.plugin.redditapi.flair.SelectFlairRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.backgroundColor!==""&&n.uint32(18).string(e82.backgroundColor),e82.cssClass!==""&&n.uint32(26).string(e82.cssClass),e82.flairTemplateId!==""&&n.uint32(34).string(e82.flairTemplateId),e82.link!==""&&n.uint32(42).string(e82.link),e82.name!==""&&n.uint32(50).string(e82.name),e82.returnRtjson!==""&&n.uint32(58).string(e82.returnRtjson),e82.text!==""&&n.uint32(66).string(e82.text),e82.textColor!==""&&n.uint32(74).string(e82.textColor),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSelectFlairRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.backgroundColor=t.string();continue;case 3:if(r!==26)break;d.cssClass=t.string();continue;case 4:if(r!==34)break;d.flairTemplateId=t.string();continue;case 5:if(r!==42)break;d.link=t.string();continue;case 6:if(r!==50)break;d.name=t.string();continue;case 7:if(r!==58)break;d.returnRtjson=t.string();continue;case 8:if(r!==66)break;d.text=t.string();continue;case 9:if(r!==74)break;d.textColor=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",backgroundColor:isSet$q(e82.backgroundColor)?globalThis.String(e82.backgroundColor):"",cssClass:isSet$q(e82.cssClass)?globalThis.String(e82.cssClass):"",flairTemplateId:isSet$q(e82.flairTemplateId)?globalThis.String(e82.flairTemplateId):"",link:isSet$q(e82.link)?globalThis.String(e82.link):"",name:isSet$q(e82.name)?globalThis.String(e82.name):"",returnRtjson:isSet$q(e82.returnRtjson)?globalThis.String(e82.returnRtjson):"",text:isSet$q(e82.text)?globalThis.String(e82.text):"",textColor:isSet$q(e82.textColor)?globalThis.String(e82.textColor):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.backgroundColor!==""&&(n.backgroundColor=e82.backgroundColor),e82.cssClass!==""&&(n.cssClass=e82.cssClass),e82.flairTemplateId!==""&&(n.flairTemplateId=e82.flairTemplateId),e82.link!==""&&(n.link=e82.link),e82.name!==""&&(n.name=e82.name),e82.returnRtjson!==""&&(n.returnRtjson=e82.returnRtjson),e82.text!==""&&(n.text=e82.text),e82.textColor!==""&&(n.textColor=e82.textColor),n},create(e82){return SelectFlairRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSelectFlairRequest();return n.subreddit=e82.subreddit??"",n.backgroundColor=e82.backgroundColor??"",n.cssClass=e82.cssClass??"",n.flairTemplateId=e82.flairTemplateId??"",n.link=e82.link??"",n.name=e82.name??"",n.returnRtjson=e82.returnRtjson??"",n.text=e82.text??"",n.textColor=e82.textColor??"",n}};messageTypeRegistry.set(SelectFlairRequest.$type,SelectFlairRequest);function createBaseSetFlairEnabledRequest(){return{subreddit:"",flairEnabled:!1}}var SetFlairEnabledRequest={$type:"devvit.plugin.redditapi.flair.SetFlairEnabledRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.flairEnabled!==!1&&n.uint32(16).bool(e82.flairEnabled),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSetFlairEnabledRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==16)break;d.flairEnabled=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$q(e82.subreddit)?globalThis.String(e82.subreddit):"",flairEnabled:isSet$q(e82.flairEnabled)?globalThis.Boolean(e82.flairEnabled):!1}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.flairEnabled!==!1&&(n.flairEnabled=e82.flairEnabled),n},create(e82){return SetFlairEnabledRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSetFlairEnabledRequest();return n.subreddit=e82.subreddit??"",n.flairEnabled=e82.flairEnabled??!1,n}};messageTypeRegistry.set(SetFlairEnabledRequest.$type,SetFlairEnabledRequest);function createBaseFlairObject(){return{allowableContent:void 0,text:void 0,textColor:void 0,modOnly:!1,backgroundColor:void 0,id:void 0,cssClass:void 0,maxEmojis:0,textEditable:!1,overrideCss:!1,type:void 0,flairType:void 0,richtext:[]}}var FlairObject={$type:"devvit.plugin.redditapi.flair.FlairObject",encode(e82,n=_m0.Writer.create()){e82.allowableContent!==void 0&&StringValue.encode({value:e82.allowableContent},n.uint32(10).fork()).ldelim(),e82.text!==void 0&&StringValue.encode({value:e82.text},n.uint32(18).fork()).ldelim(),e82.textColor!==void 0&&StringValue.encode({value:e82.textColor},n.uint32(26).fork()).ldelim(),e82.modOnly!==!1&&n.uint32(32).bool(e82.modOnly),e82.backgroundColor!==void 0&&StringValue.encode({value:e82.backgroundColor},n.uint32(42).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(50).fork()).ldelim(),e82.cssClass!==void 0&&StringValue.encode({value:e82.cssClass},n.uint32(58).fork()).ldelim(),e82.maxEmojis!==0&&n.uint32(64).int64(e82.maxEmojis),e82.textEditable!==!1&&n.uint32(80).bool(e82.textEditable),e82.overrideCss!==!1&&n.uint32(88).bool(e82.overrideCss),e82.type!==void 0&&StringValue.encode({value:e82.type},n.uint32(98).fork()).ldelim(),e82.flairType!==void 0&&StringValue.encode({value:e82.flairType},n.uint32(106).fork()).ldelim();for(let t of e82.richtext)FlairObject_FlairRichText.encode(t,n.uint32(114).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.allowableContent=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.text=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.textColor=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==32)break;d.modOnly=t.bool();continue;case 5:if(r!==42)break;d.backgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.cssClass=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==64)break;d.maxEmojis=longToNumber$3(t.int64());continue;case 10:if(r!==80)break;d.textEditable=t.bool();continue;case 11:if(r!==88)break;d.overrideCss=t.bool();continue;case 12:if(r!==98)break;d.type=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.flairType=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.richtext.push(FlairObject_FlairRichText.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{allowableContent:isSet$q(e82.allowableContent)?String(e82.allowableContent):void 0,text:isSet$q(e82.text)?String(e82.text):void 0,textColor:isSet$q(e82.textColor)?String(e82.textColor):void 0,modOnly:isSet$q(e82.modOnly)?globalThis.Boolean(e82.modOnly):!1,backgroundColor:isSet$q(e82.backgroundColor)?String(e82.backgroundColor):void 0,id:isSet$q(e82.id)?String(e82.id):void 0,cssClass:isSet$q(e82.cssClass)?String(e82.cssClass):void 0,maxEmojis:isSet$q(e82.maxEmojis)?globalThis.Number(e82.maxEmojis):0,textEditable:isSet$q(e82.textEditable)?globalThis.Boolean(e82.textEditable):!1,overrideCss:isSet$q(e82.overrideCss)?globalThis.Boolean(e82.overrideCss):!1,type:isSet$q(e82.type)?String(e82.type):void 0,flairType:isSet$q(e82.flairType)?String(e82.flairType):void 0,richtext:globalThis.Array.isArray(e82?.richtext)?e82.richtext.map(n=>FlairObject_FlairRichText.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.allowableContent!==void 0&&(n.allowableContent=e82.allowableContent),e82.text!==void 0&&(n.text=e82.text),e82.textColor!==void 0&&(n.textColor=e82.textColor),e82.modOnly!==!1&&(n.modOnly=e82.modOnly),e82.backgroundColor!==void 0&&(n.backgroundColor=e82.backgroundColor),e82.id!==void 0&&(n.id=e82.id),e82.cssClass!==void 0&&(n.cssClass=e82.cssClass),e82.maxEmojis!==0&&(n.maxEmojis=Math.round(e82.maxEmojis)),e82.textEditable!==!1&&(n.textEditable=e82.textEditable),e82.overrideCss!==!1&&(n.overrideCss=e82.overrideCss),e82.type!==void 0&&(n.type=e82.type),e82.flairType!==void 0&&(n.flairType=e82.flairType),(t=e82.richtext)!=null&&t.length&&(n.richtext=e82.richtext.map(o=>FlairObject_FlairRichText.toJSON(o))),n},create(e82){return FlairObject.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFlairObject();return n.allowableContent=e82.allowableContent??void 0,n.text=e82.text??void 0,n.textColor=e82.textColor??void 0,n.modOnly=e82.modOnly??!1,n.backgroundColor=e82.backgroundColor??void 0,n.id=e82.id??void 0,n.cssClass=e82.cssClass??void 0,n.maxEmojis=e82.maxEmojis??0,n.textEditable=e82.textEditable??!1,n.overrideCss=e82.overrideCss??!1,n.type=e82.type??void 0,n.flairType=e82.flairType??void 0,n.richtext=((t=e82.richtext)==null?void 0:t.map(o=>FlairObject_FlairRichText.fromPartial(o)))||[],n}};messageTypeRegistry.set(FlairObject.$type,FlairObject);function createBaseFlairObject_FlairRichText(){return{e:void 0,t:void 0,a:void 0,u:void 0}}var FlairObject_FlairRichText={$type:"devvit.plugin.redditapi.flair.FlairObject.FlairRichText",encode(e82,n=_m0.Writer.create()){return e82.e!==void 0&&StringValue.encode({value:e82.e},n.uint32(10).fork()).ldelim(),e82.t!==void 0&&StringValue.encode({value:e82.t},n.uint32(18).fork()).ldelim(),e82.a!==void 0&&StringValue.encode({value:e82.a},n.uint32(26).fork()).ldelim(),e82.u!==void 0&&StringValue.encode({value:e82.u},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairObject_FlairRichText();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.e=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.t=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.a=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.u=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{e:isSet$q(e82.e)?String(e82.e):void 0,t:isSet$q(e82.t)?String(e82.t):void 0,a:isSet$q(e82.a)?String(e82.a):void 0,u:isSet$q(e82.u)?String(e82.u):void 0}},toJSON(e82){let n={};return e82.e!==void 0&&(n.e=e82.e),e82.t!==void 0&&(n.t=e82.t),e82.a!==void 0&&(n.a=e82.a),e82.u!==void 0&&(n.u=e82.u),n},create(e82){return FlairObject_FlairRichText.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairObject_FlairRichText();return n.e=e82.e??void 0,n.t=e82.t??void 0,n.a=e82.a??void 0,n.u=e82.u??void 0,n}};messageTypeRegistry.set(FlairObject_FlairRichText.$type,FlairObject_FlairRichText);function createBaseFlairArray(){return{flair:[]}}var FlairArray={$type:"devvit.plugin.redditapi.flair.FlairArray",encode(e82,n=_m0.Writer.create()){for(let t of e82.flair)FlairObject.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairArray();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.flair.push(FlairObject.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{flair:globalThis.Array.isArray(e82?.flair)?e82.flair.map(n=>FlairObject.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.flair)!=null&&t.length&&(n.flair=e82.flair.map(o=>FlairObject.toJSON(o))),n},create(e82){return FlairArray.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFlairArray();return n.flair=((t=e82.flair)==null?void 0:t.map(o=>FlairObject.fromPartial(o)))||[],n}};messageTypeRegistry.set(FlairArray.$type,FlairArray);function createBaseFlairSelectorResponseOption(){return{flairCssClass:void 0,flairTemplateId:void 0,flairText:void 0,flairTextEditable:void 0,flairPosition:void 0}}var FlairSelectorResponseOption={$type:"devvit.plugin.redditapi.flair.FlairSelectorResponseOption",encode(e82,n=_m0.Writer.create()){return e82.flairCssClass!==void 0&&StringValue.encode({value:e82.flairCssClass},n.uint32(10).fork()).ldelim(),e82.flairTemplateId!==void 0&&StringValue.encode({value:e82.flairTemplateId},n.uint32(18).fork()).ldelim(),e82.flairText!==void 0&&StringValue.encode({value:e82.flairText},n.uint32(26).fork()).ldelim(),e82.flairTextEditable!==void 0&&BoolValue.encode({value:e82.flairTextEditable},n.uint32(34).fork()).ldelim(),e82.flairPosition!==void 0&&StringValue.encode({value:e82.flairPosition},n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairSelectorResponseOption();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.flairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.flairTemplateId=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.flairText=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.flairTextEditable=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.flairPosition=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{flairCssClass:isSet$q(e82.flairCssClass)?String(e82.flairCssClass):void 0,flairTemplateId:isSet$q(e82.flairTemplateId)?String(e82.flairTemplateId):void 0,flairText:isSet$q(e82.flairText)?String(e82.flairText):void 0,flairTextEditable:isSet$q(e82.flairTextEditable)?!!e82.flairTextEditable:void 0,flairPosition:isSet$q(e82.flairPosition)?String(e82.flairPosition):void 0}},toJSON(e82){let n={};return e82.flairCssClass!==void 0&&(n.flairCssClass=e82.flairCssClass),e82.flairTemplateId!==void 0&&(n.flairTemplateId=e82.flairTemplateId),e82.flairText!==void 0&&(n.flairText=e82.flairText),e82.flairTextEditable!==void 0&&(n.flairTextEditable=e82.flairTextEditable),e82.flairPosition!==void 0&&(n.flairPosition=e82.flairPosition),n},create(e82){return FlairSelectorResponseOption.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairSelectorResponseOption();return n.flairCssClass=e82.flairCssClass??void 0,n.flairTemplateId=e82.flairTemplateId??void 0,n.flairText=e82.flairText??void 0,n.flairTextEditable=e82.flairTextEditable??void 0,n.flairPosition=e82.flairPosition??void 0,n}};messageTypeRegistry.set(FlairSelectorResponseOption.$type,FlairSelectorResponseOption);function createBaseFlairSelectorResponse(){return{current:void 0,choices:[]}}var FlairSelectorResponse={$type:"devvit.plugin.redditapi.flair.FlairSelectorResponse",encode(e82,n=_m0.Writer.create()){e82.current!==void 0&&FlairSelectorResponseOption.encode(e82.current,n.uint32(10).fork()).ldelim();for(let t of e82.choices)FlairSelectorResponseOption.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairSelectorResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.current=FlairSelectorResponseOption.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.choices.push(FlairSelectorResponseOption.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{current:isSet$q(e82.current)?FlairSelectorResponseOption.fromJSON(e82.current):void 0,choices:globalThis.Array.isArray(e82?.choices)?e82.choices.map(n=>FlairSelectorResponseOption.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.current!==void 0&&(n.current=FlairSelectorResponseOption.toJSON(e82.current)),(t=e82.choices)!=null&&t.length&&(n.choices=e82.choices.map(o=>FlairSelectorResponseOption.toJSON(o))),n},create(e82){return FlairSelectorResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFlairSelectorResponse();return n.current=e82.current!==void 0&&e82.current!==null?FlairSelectorResponseOption.fromPartial(e82.current):void 0,n.choices=((t=e82.choices)==null?void 0:t.map(o=>FlairSelectorResponseOption.fromPartial(o)))||[],n}};messageTypeRegistry.set(FlairSelectorResponse.$type,FlairSelectorResponse);function createBaseUserFlair(){return{flairCssClass:void 0,user:void 0,flairText:void 0}}var UserFlair={$type:"devvit.plugin.redditapi.flair.UserFlair",encode(e82,n=_m0.Writer.create()){return e82.flairCssClass!==void 0&&StringValue.encode({value:e82.flairCssClass},n.uint32(10).fork()).ldelim(),e82.user!==void 0&&StringValue.encode({value:e82.user},n.uint32(18).fork()).ldelim(),e82.flairText!==void 0&&StringValue.encode({value:e82.flairText},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserFlair();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.flairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.user=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.flairText=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{flairCssClass:isSet$q(e82.flairCssClass)?String(e82.flairCssClass):void 0,user:isSet$q(e82.user)?String(e82.user):void 0,flairText:isSet$q(e82.flairText)?String(e82.flairText):void 0}},toJSON(e82){let n={};return e82.flairCssClass!==void 0&&(n.flairCssClass=e82.flairCssClass),e82.user!==void 0&&(n.user=e82.user),e82.flairText!==void 0&&(n.flairText=e82.flairText),n},create(e82){return UserFlair.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserFlair();return n.flairCssClass=e82.flairCssClass??void 0,n.user=e82.user??void 0,n.flairText=e82.flairText??void 0,n}};messageTypeRegistry.set(UserFlair.$type,UserFlair);function createBaseFlairListResponse(){return{users:[],next:void 0,prev:void 0}}var FlairListResponse={$type:"devvit.plugin.redditapi.flair.FlairListResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.users)UserFlair.encode(t,n.uint32(10).fork()).ldelim();return e82.next!==void 0&&StringValue.encode({value:e82.next},n.uint32(18).fork()).ldelim(),e82.prev!==void 0&&StringValue.encode({value:e82.prev},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairListResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.users.push(UserFlair.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.next=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.prev=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{users:globalThis.Array.isArray(e82?.users)?e82.users.map(n=>UserFlair.fromJSON(n)):[],next:isSet$q(e82.next)?String(e82.next):void 0,prev:isSet$q(e82.prev)?String(e82.prev):void 0}},toJSON(e82){var t;let n={};return(t=e82.users)!=null&&t.length&&(n.users=e82.users.map(o=>UserFlair.toJSON(o))),e82.next!==void 0&&(n.next=e82.next),e82.prev!==void 0&&(n.prev=e82.prev),n},create(e82){return FlairListResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFlairListResponse();return n.users=((t=e82.users)==null?void 0:t.map(o=>UserFlair.fromPartial(o)))||[],n.next=e82.next??void 0,n.prev=e82.prev??void 0,n}};messageTypeRegistry.set(FlairListResponse.$type,FlairListResponse);function createBaseFlairCsvResultError(){return{css:void 0,row:void 0,user:void 0}}var FlairCsvResultError={$type:"devvit.plugin.redditapi.flair.FlairCsvResultError",encode(e82,n=_m0.Writer.create()){return e82.css!==void 0&&StringValue.encode({value:e82.css},n.uint32(10).fork()).ldelim(),e82.row!==void 0&&StringValue.encode({value:e82.row},n.uint32(18).fork()).ldelim(),e82.user!==void 0&&StringValue.encode({value:e82.user},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairCsvResultError();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.css=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.row=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.user=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{css:isSet$q(e82.css)?String(e82.css):void 0,row:isSet$q(e82.row)?String(e82.row):void 0,user:isSet$q(e82.user)?String(e82.user):void 0}},toJSON(e82){let n={};return e82.css!==void 0&&(n.css=e82.css),e82.row!==void 0&&(n.row=e82.row),e82.user!==void 0&&(n.user=e82.user),n},create(e82){return FlairCsvResultError.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairCsvResultError();return n.css=e82.css??void 0,n.row=e82.row??void 0,n.user=e82.user??void 0,n}};messageTypeRegistry.set(FlairCsvResultError.$type,FlairCsvResultError);function createBaseFlairCsvResultWarning(){return{text:void 0}}var FlairCsvResultWarning={$type:"devvit.plugin.redditapi.flair.FlairCsvResultWarning",encode(e82,n=_m0.Writer.create()){return e82.text!==void 0&&StringValue.encode({value:e82.text},n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairCsvResultWarning();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.text=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{text:isSet$q(e82.text)?String(e82.text):void 0}},toJSON(e82){let n={};return e82.text!==void 0&&(n.text=e82.text),n},create(e82){return FlairCsvResultWarning.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairCsvResultWarning();return n.text=e82.text??void 0,n}};messageTypeRegistry.set(FlairCsvResultWarning.$type,FlairCsvResultWarning);function createBaseFlairCsvResult(){return{status:void 0,ok:void 0,errors:void 0,warnings:void 0}}var FlairCsvResult={$type:"devvit.plugin.redditapi.flair.FlairCsvResult",encode(e82,n=_m0.Writer.create()){return e82.status!==void 0&&StringValue.encode({value:e82.status},n.uint32(10).fork()).ldelim(),e82.ok!==void 0&&BoolValue.encode({value:e82.ok},n.uint32(18).fork()).ldelim(),e82.errors!==void 0&&FlairCsvResultError.encode(e82.errors,n.uint32(26).fork()).ldelim(),e82.warnings!==void 0&&FlairCsvResultWarning.encode(e82.warnings,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairCsvResult();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.status=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.ok=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.errors=FlairCsvResultError.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.warnings=FlairCsvResultWarning.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{status:isSet$q(e82.status)?String(e82.status):void 0,ok:isSet$q(e82.ok)?!!e82.ok:void 0,errors:isSet$q(e82.errors)?FlairCsvResultError.fromJSON(e82.errors):void 0,warnings:isSet$q(e82.warnings)?FlairCsvResultWarning.fromJSON(e82.warnings):void 0}},toJSON(e82){let n={};return e82.status!==void 0&&(n.status=e82.status),e82.ok!==void 0&&(n.ok=e82.ok),e82.errors!==void 0&&(n.errors=FlairCsvResultError.toJSON(e82.errors)),e82.warnings!==void 0&&(n.warnings=FlairCsvResultWarning.toJSON(e82.warnings)),n},create(e82){return FlairCsvResult.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFlairCsvResult();return n.status=e82.status??void 0,n.ok=e82.ok??void 0,n.errors=e82.errors!==void 0&&e82.errors!==null?FlairCsvResultError.fromPartial(e82.errors):void 0,n.warnings=e82.warnings!==void 0&&e82.warnings!==null?FlairCsvResultWarning.fromPartial(e82.warnings):void 0,n}};messageTypeRegistry.set(FlairCsvResult.$type,FlairCsvResult);function createBaseFlairCsvResponse(){return{result:[]}}var FlairCsvResponse={$type:"devvit.plugin.redditapi.flair.FlairCsvResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.result)FlairCsvResult.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFlairCsvResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.result.push(FlairCsvResult.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{result:globalThis.Array.isArray(e82?.result)?e82.result.map(n=>FlairCsvResult.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.result)!=null&&t.length&&(n.result=e82.result.map(o=>FlairCsvResult.toJSON(o))),n},create(e82){return FlairCsvResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseFlairCsvResponse();return n.result=((t=e82.result)==null?void 0:t.map(o=>FlairCsvResult.fromPartial(o)))||[],n}};messageTypeRegistry.set(FlairCsvResponse.$type,FlairCsvResponse);function longToNumber$3(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isSet$q(e82){return e82!=null}var FlairDefinition={name:"Flair",fullName:"devvit.plugin.redditapi.flair.Flair",methods:{clearFlairTemplates:{name:"ClearFlairTemplates",requestType:ClearFlairTemplatesRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([40,18,38,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,99,108,101,97,114,102,108,97,105,114,116,101,109,112,108,97,116,101,115]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},deleteFlair:{name:"DeleteFlair",requestType:DeleteFlairRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,100,101,108,101,116,101,102,108,97,105,114]),new Uint8Array([2,24,4])]}}},deleteFlairTemplate:{name:"DeleteFlairTemplate",requestType:DeleteFlairTemplateRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([40,18,38,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,100,101,108,101,116,101,102,108,97,105,114,116,101,109,112,108,97,116,101]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},flair:{name:"Flair",requestType:FlairRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([26,18,24,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,102,108,97,105,114]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},flairTemplateOrder:{name:"FlairTemplateOrder",requestType:FlairTemplateOrderRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}},flairConfig:{name:"FlairConfig",requestType:FlairConfigRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,102,108,97,105,114,99,111,110,102,105,103]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},flairCsv:{name:"FlairCsv",requestType:FlairCsvRequest,requestStream:!1,responseType:FlairCsvResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([51,18,49,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,102,108,97,105,114,99,115,118,63,102,108,97,105,114,95,99,115,118,61,123,102,108,97,105,114,95,99,115,118,125])]}}},flairList:{name:"FlairList",requestType:FlairListRequest,requestStream:!1,responseType:FlairListResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([117,18,115,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,102,108,97,105,114,108,105,115,116,46,106,115,111,110,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,110,97,109,101,61,123,110,97,109,101,125,38,115,104,111,119,61,123,115,104,111,119,125])]}}},flairSelector:{name:"FlairSelector",requestType:FlairSelectorRequest,requestStream:!1,responseType:FlairSelectorResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([82,18,80,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,102,108,97,105,114,115,101,108,101,99,116,111,114,63,110,97,109,101,61,123,110,97,109,101,125,38,108,105,110,107,61,123,108,105,110,107,125,38,105,115,95,110,101,119,108,105,110,107,61,123,105,115,95,110,101,119,108,105,110,107,125])]}}},flairTemplate:{name:"FlairTemplate",requestType:FlairTemplateRequest,requestStream:!1,responseType:FlairObject,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([37,18,35,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,102,108,97,105,114,116,101,109,112,108,97,116,101,95,118,50]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},linkFlair:{name:"LinkFlair",requestType:LinkFlairRequest,requestStream:!1,responseType:FlairArray,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([34,18,32,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,108,105,110,107,95,102,108,97,105,114,95,118,50]),new Uint8Array([2,64,1])]}}},selectFlair:{name:"SelectFlair",requestType:SelectFlairRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,115,101,108,101,99,116,102,108,97,105,114]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},setFlairEnabled:{name:"SetFlairEnabled",requestType:SetFlairEnabledRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([36,18,34,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,115,101,116,102,108,97,105,114,101,110,97,98,108,101,100]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},userFlair:{name:"UserFlair",requestType:LinkFlairRequest,requestStream:!1,responseType:FlairArray,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([34,18,32,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,117,115,101,114,95,102,108,97,105,114,95,118,50]),new Uint8Array([2,64,1])]}}}}};function createBaseQueryRequest(){return{query:"",variables:void 0}}var QueryRequest={$type:"devvit.plugin.redditapi.graphql.QueryRequest",encode(e82,n=_m0.Writer.create()){return e82.query!==""&&n.uint32(10).string(e82.query),e82.variables!==void 0&&Struct.encode(Struct.wrap(e82.variables),n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseQueryRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.query=t.string();continue;case 2:if(r!==18)break;d.variables=Struct.unwrap(Struct.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{query:isSet$p(e82.query)?globalThis.String(e82.query):"",variables:isObject$f(e82.variables)?e82.variables:void 0}},toJSON(e82){let n={};return e82.query!==""&&(n.query=e82.query),e82.variables!==void 0&&(n.variables=e82.variables),n},create(e82){return QueryRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseQueryRequest();return n.query=e82.query??"",n.variables=e82.variables??void 0,n}};messageTypeRegistry.set(QueryRequest.$type,QueryRequest);function createBasePersistedQueryRequest(){return{id:"",variables:void 0,operationName:""}}var PersistedQueryRequest={$type:"devvit.plugin.redditapi.graphql.PersistedQueryRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.variables!==void 0&&Struct.encode(Struct.wrap(e82.variables),n.uint32(18).fork()).ldelim(),e82.operationName!==""&&n.uint32(26).string(e82.operationName),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePersistedQueryRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.variables=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.operationName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$p(e82.id)?globalThis.String(e82.id):"",variables:isObject$f(e82.variables)?e82.variables:void 0,operationName:isSet$p(e82.operationName)?globalThis.String(e82.operationName):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.variables!==void 0&&(n.variables=e82.variables),e82.operationName!==""&&(n.operationName=e82.operationName),n},create(e82){return PersistedQueryRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBasePersistedQueryRequest();return n.id=e82.id??"",n.variables=e82.variables??void 0,n.operationName=e82.operationName??"",n}};messageTypeRegistry.set(PersistedQueryRequest.$type,PersistedQueryRequest);function createBaseQueryResponse(){return{data:void 0,errors:[],ok:void 0}}var QueryResponse={$type:"devvit.plugin.redditapi.graphql.QueryResponse",encode(e82,n=_m0.Writer.create()){e82.data!==void 0&&Struct.encode(Struct.wrap(e82.data),n.uint32(10).fork()).ldelim();for(let t of e82.errors)GraphQLError.encode(t,n.uint32(18).fork()).ldelim();return e82.ok!==void 0&&n.uint32(24).bool(e82.ok),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseQueryResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.data=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.errors.push(GraphQLError.decode(t,t.uint32()));continue;case 3:if(r!==24)break;d.ok=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{data:isObject$f(e82.data)?e82.data:void 0,errors:globalThis.Array.isArray(e82?.errors)?e82.errors.map(n=>GraphQLError.fromJSON(n)):[],ok:isSet$p(e82.ok)?globalThis.Boolean(e82.ok):void 0}},toJSON(e82){var t;let n={};return e82.data!==void 0&&(n.data=e82.data),(t=e82.errors)!=null&&t.length&&(n.errors=e82.errors.map(o=>GraphQLError.toJSON(o))),e82.ok!==void 0&&(n.ok=e82.ok),n},create(e82){return QueryResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseQueryResponse();return n.data=e82.data??void 0,n.errors=((t=e82.errors)==null?void 0:t.map(o=>GraphQLError.fromPartial(o)))||[],n.ok=e82.ok??void 0,n}};messageTypeRegistry.set(QueryResponse.$type,QueryResponse);function createBaseGraphQLError(){return{code:"",message:""}}var GraphQLError={$type:"devvit.plugin.redditapi.graphql.GraphQLError",encode(e82,n=_m0.Writer.create()){return e82.code!==""&&n.uint32(10).string(e82.code),e82.message!==""&&n.uint32(18).string(e82.message),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGraphQLError();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.code=t.string();continue;case 2:if(r!==18)break;d.message=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{code:isSet$p(e82.code)?globalThis.String(e82.code):"",message:isSet$p(e82.message)?globalThis.String(e82.message):""}},toJSON(e82){let n={};return e82.code!==""&&(n.code=e82.code),e82.message!==""&&(n.message=e82.message),n},create(e82){return GraphQLError.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGraphQLError();return n.code=e82.code??"",n.message=e82.message??"",n}};messageTypeRegistry.set(GraphQLError.$type,GraphQLError);function isObject$f(e82){return typeof e82=="object"&&e82!==null}function isSet$p(e82){return e82!=null}var GraphQLDefinition={name:"GraphQL",fullName:"devvit.plugin.redditapi.graphql.GraphQL",methods:{query:{name:"Query",requestType:QueryRequest,requestStream:!1,responseType:QueryResponse,responseStream:!1,options:{}},persistedQuery:{name:"PersistedQuery",requestType:PersistedQueryRequest,requestStream:!1,responseType:QueryResponse,responseStream:!1,options:{}}}};function createBaseComment(){return{allAwardings:[],approved:void 0,approvedAtUtc:void 0,approvedBy:void 0,archived:void 0,associatedAward:void 0,author:void 0,authorFlairBackgroundColor:void 0,authorFlairCssClass:void 0,authorFlairRichtext:[],authorFlairTemplateId:void 0,authorFlairText:void 0,authorFlairTextColor:void 0,authorFlairType:void 0,authorFullname:void 0,authorIsBlocked:void 0,authorPatreonFlair:void 0,authorPremium:void 0,awarders:[],bannedAtUtc:void 0,bannedBy:void 0,body:void 0,bodyHtml:void 0,canGild:void 0,canModPost:void 0,collapsed:void 0,collapsedBecauseCrowdControl:void 0,collapsedReason:void 0,collapsedReasonCode:void 0,commentType:void 0,controversiality:void 0,created:void 0,createdUtc:void 0,depth:void 0,distinguished:void 0,downs:void 0,edited:void 0,gilded:void 0,gildings:void 0,id:void 0,ignoreReports:void 0,isSubmitter:void 0,likes:void 0,linkId:void 0,locked:void 0,modNote:void 0,modReasonBy:void 0,modReasonTitle:void 0,modReports:[],name:void 0,noFollow:void 0,numReports:void 0,parentId:void 0,permalink:void 0,removalReason:void 0,removed:void 0,replies:void 0,reportReasons:[],rteMode:void 0,saved:void 0,score:void 0,scoreHidden:void 0,sendReplies:void 0,spam:void 0,stickied:void 0,subreddit:void 0,subredditId:void 0,subredditNamePrefixed:void 0,subredditType:void 0,topAwardedType:void 0,totalAwardsReceived:void 0,treatmentTags:[],unrepliableReason:void 0,ups:void 0,userReports:[],count:void 0,children:[],banInfo:void 0,markedSpam:void 0,verdict:void 0}}var Comment={$type:"devvit.reddit.Comment",encode(e82,n=_m0.Writer.create()){for(let t of e82.allAwardings)Awarding.encode(t,n.uint32(10).fork()).ldelim();e82.approved!==void 0&&BoolValue.encode({value:e82.approved},n.uint32(18).fork()).ldelim(),e82.approvedAtUtc!==void 0&&Int32Value.encode({value:e82.approvedAtUtc},n.uint32(26).fork()).ldelim(),e82.approvedBy!==void 0&&StringValue.encode({value:e82.approvedBy},n.uint32(34).fork()).ldelim(),e82.archived!==void 0&&BoolValue.encode({value:e82.archived},n.uint32(42).fork()).ldelim(),e82.associatedAward!==void 0&&StringValue.encode({value:e82.associatedAward},n.uint32(50).fork()).ldelim(),e82.author!==void 0&&StringValue.encode({value:e82.author},n.uint32(58).fork()).ldelim(),e82.authorFlairBackgroundColor!==void 0&&StringValue.encode({value:e82.authorFlairBackgroundColor},n.uint32(66).fork()).ldelim(),e82.authorFlairCssClass!==void 0&&StringValue.encode({value:e82.authorFlairCssClass},n.uint32(74).fork()).ldelim();for(let t of e82.authorFlairRichtext)AuthorFlairRichText.encode(t,n.uint32(82).fork()).ldelim();e82.authorFlairTemplateId!==void 0&&StringValue.encode({value:e82.authorFlairTemplateId},n.uint32(90).fork()).ldelim(),e82.authorFlairText!==void 0&&StringValue.encode({value:e82.authorFlairText},n.uint32(98).fork()).ldelim(),e82.authorFlairTextColor!==void 0&&StringValue.encode({value:e82.authorFlairTextColor},n.uint32(106).fork()).ldelim(),e82.authorFlairType!==void 0&&StringValue.encode({value:e82.authorFlairType},n.uint32(114).fork()).ldelim(),e82.authorFullname!==void 0&&StringValue.encode({value:e82.authorFullname},n.uint32(122).fork()).ldelim(),e82.authorIsBlocked!==void 0&&BoolValue.encode({value:e82.authorIsBlocked},n.uint32(130).fork()).ldelim(),e82.authorPatreonFlair!==void 0&&BoolValue.encode({value:e82.authorPatreonFlair},n.uint32(138).fork()).ldelim(),e82.authorPremium!==void 0&&BoolValue.encode({value:e82.authorPremium},n.uint32(146).fork()).ldelim();for(let t of e82.awarders)StringValue.encode({value:t},n.uint32(154).fork()).ldelim();e82.bannedAtUtc!==void 0&&Int32Value.encode({value:e82.bannedAtUtc},n.uint32(162).fork()).ldelim(),e82.bannedBy!==void 0&&StringValue.encode({value:e82.bannedBy},n.uint32(170).fork()).ldelim(),e82.body!==void 0&&StringValue.encode({value:e82.body},n.uint32(178).fork()).ldelim(),e82.bodyHtml!==void 0&&StringValue.encode({value:e82.bodyHtml},n.uint32(186).fork()).ldelim(),e82.canGild!==void 0&&BoolValue.encode({value:e82.canGild},n.uint32(194).fork()).ldelim(),e82.canModPost!==void 0&&BoolValue.encode({value:e82.canModPost},n.uint32(202).fork()).ldelim(),e82.collapsed!==void 0&&BoolValue.encode({value:e82.collapsed},n.uint32(210).fork()).ldelim(),e82.collapsedBecauseCrowdControl!==void 0&&BoolValue.encode({value:e82.collapsedBecauseCrowdControl},n.uint32(218).fork()).ldelim(),e82.collapsedReason!==void 0&&StringValue.encode({value:e82.collapsedReason},n.uint32(226).fork()).ldelim(),e82.collapsedReasonCode!==void 0&&StringValue.encode({value:e82.collapsedReasonCode},n.uint32(234).fork()).ldelim(),e82.commentType!==void 0&&StringValue.encode({value:e82.commentType},n.uint32(242).fork()).ldelim(),e82.controversiality!==void 0&&Int32Value.encode({value:e82.controversiality},n.uint32(250).fork()).ldelim(),e82.created!==void 0&&Int32Value.encode({value:e82.created},n.uint32(258).fork()).ldelim(),e82.createdUtc!==void 0&&Int32Value.encode({value:e82.createdUtc},n.uint32(266).fork()).ldelim(),e82.depth!==void 0&&Int32Value.encode({value:e82.depth},n.uint32(274).fork()).ldelim(),e82.distinguished!==void 0&&StringValue.encode({value:e82.distinguished},n.uint32(282).fork()).ldelim(),e82.downs!==void 0&&Int32Value.encode({value:e82.downs},n.uint32(290).fork()).ldelim(),e82.edited!==void 0&&BoolValue.encode({value:e82.edited},n.uint32(298).fork()).ldelim(),e82.gilded!==void 0&&Int32Value.encode({value:e82.gilded},n.uint32(306).fork()).ldelim(),e82.gildings!==void 0&&Gildings.encode(e82.gildings,n.uint32(314).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(322).fork()).ldelim(),e82.ignoreReports!==void 0&&BoolValue.encode({value:e82.ignoreReports},n.uint32(330).fork()).ldelim(),e82.isSubmitter!==void 0&&BoolValue.encode({value:e82.isSubmitter},n.uint32(338).fork()).ldelim(),e82.likes!==void 0&&BoolValue.encode({value:e82.likes},n.uint32(346).fork()).ldelim(),e82.linkId!==void 0&&StringValue.encode({value:e82.linkId},n.uint32(354).fork()).ldelim(),e82.locked!==void 0&&BoolValue.encode({value:e82.locked},n.uint32(362).fork()).ldelim(),e82.modNote!==void 0&&StringValue.encode({value:e82.modNote},n.uint32(370).fork()).ldelim(),e82.modReasonBy!==void 0&&StringValue.encode({value:e82.modReasonBy},n.uint32(378).fork()).ldelim(),e82.modReasonTitle!==void 0&&StringValue.encode({value:e82.modReasonTitle},n.uint32(386).fork()).ldelim();for(let t of e82.modReports)ListValue.encode(ListValue.wrap(t),n.uint32(394).fork()).ldelim();e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(402).fork()).ldelim(),e82.noFollow!==void 0&&BoolValue.encode({value:e82.noFollow},n.uint32(410).fork()).ldelim(),e82.numReports!==void 0&&Int32Value.encode({value:e82.numReports},n.uint32(418).fork()).ldelim(),e82.parentId!==void 0&&StringValue.encode({value:e82.parentId},n.uint32(426).fork()).ldelim(),e82.permalink!==void 0&&StringValue.encode({value:e82.permalink},n.uint32(434).fork()).ldelim(),e82.removalReason!==void 0&&StringValue.encode({value:e82.removalReason},n.uint32(442).fork()).ldelim(),e82.removed!==void 0&&BoolValue.encode({value:e82.removed},n.uint32(450).fork()).ldelim(),e82.replies!==void 0&&StringValue.encode({value:e82.replies},n.uint32(458).fork()).ldelim();for(let t of e82.reportReasons)StringValue.encode({value:t},n.uint32(466).fork()).ldelim();e82.rteMode!==void 0&&StringValue.encode({value:e82.rteMode},n.uint32(474).fork()).ldelim(),e82.saved!==void 0&&BoolValue.encode({value:e82.saved},n.uint32(482).fork()).ldelim(),e82.score!==void 0&&Int32Value.encode({value:e82.score},n.uint32(490).fork()).ldelim(),e82.scoreHidden!==void 0&&BoolValue.encode({value:e82.scoreHidden},n.uint32(498).fork()).ldelim(),e82.sendReplies!==void 0&&BoolValue.encode({value:e82.sendReplies},n.uint32(506).fork()).ldelim(),e82.spam!==void 0&&BoolValue.encode({value:e82.spam},n.uint32(514).fork()).ldelim(),e82.stickied!==void 0&&BoolValue.encode({value:e82.stickied},n.uint32(522).fork()).ldelim(),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(530).fork()).ldelim(),e82.subredditId!==void 0&&StringValue.encode({value:e82.subredditId},n.uint32(538).fork()).ldelim(),e82.subredditNamePrefixed!==void 0&&StringValue.encode({value:e82.subredditNamePrefixed},n.uint32(546).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(554).fork()).ldelim(),e82.topAwardedType!==void 0&&StringValue.encode({value:e82.topAwardedType},n.uint32(562).fork()).ldelim(),e82.totalAwardsReceived!==void 0&&Int32Value.encode({value:e82.totalAwardsReceived},n.uint32(570).fork()).ldelim();for(let t of e82.treatmentTags)StringValue.encode({value:t},n.uint32(578).fork()).ldelim();e82.unrepliableReason!==void 0&&StringValue.encode({value:e82.unrepliableReason},n.uint32(586).fork()).ldelim(),e82.ups!==void 0&&Int32Value.encode({value:e82.ups},n.uint32(594).fork()).ldelim();for(let t of e82.userReports)ListValue.encode(ListValue.wrap(t),n.uint32(602).fork()).ldelim();e82.count!==void 0&&Int32Value.encode({value:e82.count},n.uint32(610).fork()).ldelim();for(let t of e82.children)StringValue.encode({value:t},n.uint32(618).fork()).ldelim();return e82.banInfo!==void 0&&BanInfo.encode(e82.banInfo,n.uint32(626).fork()).ldelim(),e82.markedSpam!==void 0&&BoolValue.encode({value:e82.markedSpam},n.uint32(634).fork()).ldelim(),e82.verdict!==void 0&&StringValue.encode({value:e82.verdict},n.uint32(642).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseComment();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.allAwardings.push(Awarding.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.approved=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.approvedAtUtc=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.approvedBy=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.archived=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.associatedAward=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.author=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.authorFlairBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.authorFlairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.authorFlairRichtext.push(AuthorFlairRichText.decode(t,t.uint32()));continue;case 11:if(r!==90)break;d.authorFlairTemplateId=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.authorFlairText=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.authorFlairTextColor=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.authorFlairType=StringValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.authorFullname=StringValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.authorIsBlocked=BoolValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.authorPatreonFlair=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.authorPremium=BoolValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.awarders.push(StringValue.decode(t,t.uint32()).value);continue;case 20:if(r!==162)break;d.bannedAtUtc=Int32Value.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.bannedBy=StringValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.body=StringValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.bodyHtml=StringValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.canGild=BoolValue.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.canModPost=BoolValue.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.collapsed=BoolValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.collapsedBecauseCrowdControl=BoolValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.collapsedReason=StringValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.collapsedReasonCode=StringValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.commentType=StringValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.controversiality=Int32Value.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.created=Int32Value.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.createdUtc=Int32Value.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.depth=Int32Value.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.distinguished=StringValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.downs=Int32Value.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.edited=BoolValue.decode(t,t.uint32()).value;continue;case 38:if(r!==306)break;d.gilded=Int32Value.decode(t,t.uint32()).value;continue;case 39:if(r!==314)break;d.gildings=Gildings.decode(t,t.uint32());continue;case 40:if(r!==322)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 41:if(r!==330)break;d.ignoreReports=BoolValue.decode(t,t.uint32()).value;continue;case 42:if(r!==338)break;d.isSubmitter=BoolValue.decode(t,t.uint32()).value;continue;case 43:if(r!==346)break;d.likes=BoolValue.decode(t,t.uint32()).value;continue;case 44:if(r!==354)break;d.linkId=StringValue.decode(t,t.uint32()).value;continue;case 45:if(r!==362)break;d.locked=BoolValue.decode(t,t.uint32()).value;continue;case 46:if(r!==370)break;d.modNote=StringValue.decode(t,t.uint32()).value;continue;case 47:if(r!==378)break;d.modReasonBy=StringValue.decode(t,t.uint32()).value;continue;case 48:if(r!==386)break;d.modReasonTitle=StringValue.decode(t,t.uint32()).value;continue;case 49:if(r!==394)break;d.modReports.push(ListValue.unwrap(ListValue.decode(t,t.uint32())));continue;case 50:if(r!==402)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 51:if(r!==410)break;d.noFollow=BoolValue.decode(t,t.uint32()).value;continue;case 52:if(r!==418)break;d.numReports=Int32Value.decode(t,t.uint32()).value;continue;case 53:if(r!==426)break;d.parentId=StringValue.decode(t,t.uint32()).value;continue;case 54:if(r!==434)break;d.permalink=StringValue.decode(t,t.uint32()).value;continue;case 55:if(r!==442)break;d.removalReason=StringValue.decode(t,t.uint32()).value;continue;case 56:if(r!==450)break;d.removed=BoolValue.decode(t,t.uint32()).value;continue;case 57:if(r!==458)break;d.replies=StringValue.decode(t,t.uint32()).value;continue;case 58:if(r!==466)break;d.reportReasons.push(StringValue.decode(t,t.uint32()).value);continue;case 59:if(r!==474)break;d.rteMode=StringValue.decode(t,t.uint32()).value;continue;case 60:if(r!==482)break;d.saved=BoolValue.decode(t,t.uint32()).value;continue;case 61:if(r!==490)break;d.score=Int32Value.decode(t,t.uint32()).value;continue;case 62:if(r!==498)break;d.scoreHidden=BoolValue.decode(t,t.uint32()).value;continue;case 63:if(r!==506)break;d.sendReplies=BoolValue.decode(t,t.uint32()).value;continue;case 64:if(r!==514)break;d.spam=BoolValue.decode(t,t.uint32()).value;continue;case 65:if(r!==522)break;d.stickied=BoolValue.decode(t,t.uint32()).value;continue;case 66:if(r!==530)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 67:if(r!==538)break;d.subredditId=StringValue.decode(t,t.uint32()).value;continue;case 68:if(r!==546)break;d.subredditNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 69:if(r!==554)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 70:if(r!==562)break;d.topAwardedType=StringValue.decode(t,t.uint32()).value;continue;case 71:if(r!==570)break;d.totalAwardsReceived=Int32Value.decode(t,t.uint32()).value;continue;case 72:if(r!==578)break;d.treatmentTags.push(StringValue.decode(t,t.uint32()).value);continue;case 73:if(r!==586)break;d.unrepliableReason=StringValue.decode(t,t.uint32()).value;continue;case 74:if(r!==594)break;d.ups=Int32Value.decode(t,t.uint32()).value;continue;case 75:if(r!==602)break;d.userReports.push(ListValue.unwrap(ListValue.decode(t,t.uint32())));continue;case 76:if(r!==610)break;d.count=Int32Value.decode(t,t.uint32()).value;continue;case 77:if(r!==618)break;d.children.push(StringValue.decode(t,t.uint32()).value);continue;case 78:if(r!==626)break;d.banInfo=BanInfo.decode(t,t.uint32());continue;case 79:if(r!==634)break;d.markedSpam=BoolValue.decode(t,t.uint32()).value;continue;case 80:if(r!==642)break;d.verdict=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{allAwardings:globalThis.Array.isArray(e82?.allAwardings)?e82.allAwardings.map(n=>Awarding.fromJSON(n)):[],approved:isSet$o(e82.approved)?!!e82.approved:void 0,approvedAtUtc:isSet$o(e82.approvedAtUtc)?Number(e82.approvedAtUtc):void 0,approvedBy:isSet$o(e82.approvedBy)?String(e82.approvedBy):void 0,archived:isSet$o(e82.archived)?!!e82.archived:void 0,associatedAward:isSet$o(e82.associatedAward)?String(e82.associatedAward):void 0,author:isSet$o(e82.author)?String(e82.author):void 0,authorFlairBackgroundColor:isSet$o(e82.authorFlairBackgroundColor)?String(e82.authorFlairBackgroundColor):void 0,authorFlairCssClass:isSet$o(e82.authorFlairCssClass)?String(e82.authorFlairCssClass):void 0,authorFlairRichtext:globalThis.Array.isArray(e82?.authorFlairRichtext)?e82.authorFlairRichtext.map(n=>AuthorFlairRichText.fromJSON(n)):[],authorFlairTemplateId:isSet$o(e82.authorFlairTemplateId)?String(e82.authorFlairTemplateId):void 0,authorFlairText:isSet$o(e82.authorFlairText)?String(e82.authorFlairText):void 0,authorFlairTextColor:isSet$o(e82.authorFlairTextColor)?String(e82.authorFlairTextColor):void 0,authorFlairType:isSet$o(e82.authorFlairType)?String(e82.authorFlairType):void 0,authorFullname:isSet$o(e82.authorFullname)?String(e82.authorFullname):void 0,authorIsBlocked:isSet$o(e82.authorIsBlocked)?!!e82.authorIsBlocked:void 0,authorPatreonFlair:isSet$o(e82.authorPatreonFlair)?!!e82.authorPatreonFlair:void 0,authorPremium:isSet$o(e82.authorPremium)?!!e82.authorPremium:void 0,awarders:globalThis.Array.isArray(e82?.awarders)?e82.awarders.map(n=>String(n)):[],bannedAtUtc:isSet$o(e82.bannedAtUtc)?Number(e82.bannedAtUtc):void 0,bannedBy:isSet$o(e82.bannedBy)?String(e82.bannedBy):void 0,body:isSet$o(e82.body)?String(e82.body):void 0,bodyHtml:isSet$o(e82.bodyHtml)?String(e82.bodyHtml):void 0,canGild:isSet$o(e82.canGild)?!!e82.canGild:void 0,canModPost:isSet$o(e82.canModPost)?!!e82.canModPost:void 0,collapsed:isSet$o(e82.collapsed)?!!e82.collapsed:void 0,collapsedBecauseCrowdControl:isSet$o(e82.collapsedBecauseCrowdControl)?!!e82.collapsedBecauseCrowdControl:void 0,collapsedReason:isSet$o(e82.collapsedReason)?String(e82.collapsedReason):void 0,collapsedReasonCode:isSet$o(e82.collapsedReasonCode)?String(e82.collapsedReasonCode):void 0,commentType:isSet$o(e82.commentType)?String(e82.commentType):void 0,controversiality:isSet$o(e82.controversiality)?Number(e82.controversiality):void 0,created:isSet$o(e82.created)?Number(e82.created):void 0,createdUtc:isSet$o(e82.createdUtc)?Number(e82.createdUtc):void 0,depth:isSet$o(e82.depth)?Number(e82.depth):void 0,distinguished:isSet$o(e82.distinguished)?String(e82.distinguished):void 0,downs:isSet$o(e82.downs)?Number(e82.downs):void 0,edited:isSet$o(e82.edited)?!!e82.edited:void 0,gilded:isSet$o(e82.gilded)?Number(e82.gilded):void 0,gildings:isSet$o(e82.gildings)?Gildings.fromJSON(e82.gildings):void 0,id:isSet$o(e82.id)?String(e82.id):void 0,ignoreReports:isSet$o(e82.ignoreReports)?!!e82.ignoreReports:void 0,isSubmitter:isSet$o(e82.isSubmitter)?!!e82.isSubmitter:void 0,likes:isSet$o(e82.likes)?!!e82.likes:void 0,linkId:isSet$o(e82.linkId)?String(e82.linkId):void 0,locked:isSet$o(e82.locked)?!!e82.locked:void 0,modNote:isSet$o(e82.modNote)?String(e82.modNote):void 0,modReasonBy:isSet$o(e82.modReasonBy)?String(e82.modReasonBy):void 0,modReasonTitle:isSet$o(e82.modReasonTitle)?String(e82.modReasonTitle):void 0,modReports:globalThis.Array.isArray(e82?.modReports)?e82.modReports.map(n=>[...n]):[],name:isSet$o(e82.name)?String(e82.name):void 0,noFollow:isSet$o(e82.noFollow)?!!e82.noFollow:void 0,numReports:isSet$o(e82.numReports)?Number(e82.numReports):void 0,parentId:isSet$o(e82.parentId)?String(e82.parentId):void 0,permalink:isSet$o(e82.permalink)?String(e82.permalink):void 0,removalReason:isSet$o(e82.removalReason)?String(e82.removalReason):void 0,removed:isSet$o(e82.removed)?!!e82.removed:void 0,replies:isSet$o(e82.replies)?String(e82.replies):void 0,reportReasons:globalThis.Array.isArray(e82?.reportReasons)?e82.reportReasons.map(n=>String(n)):[],rteMode:isSet$o(e82.rteMode)?String(e82.rteMode):void 0,saved:isSet$o(e82.saved)?!!e82.saved:void 0,score:isSet$o(e82.score)?Number(e82.score):void 0,scoreHidden:isSet$o(e82.scoreHidden)?!!e82.scoreHidden:void 0,sendReplies:isSet$o(e82.sendReplies)?!!e82.sendReplies:void 0,spam:isSet$o(e82.spam)?!!e82.spam:void 0,stickied:isSet$o(e82.stickied)?!!e82.stickied:void 0,subreddit:isSet$o(e82.subreddit)?String(e82.subreddit):void 0,subredditId:isSet$o(e82.subredditId)?String(e82.subredditId):void 0,subredditNamePrefixed:isSet$o(e82.subredditNamePrefixed)?String(e82.subredditNamePrefixed):void 0,subredditType:isSet$o(e82.subredditType)?String(e82.subredditType):void 0,topAwardedType:isSet$o(e82.topAwardedType)?String(e82.topAwardedType):void 0,totalAwardsReceived:isSet$o(e82.totalAwardsReceived)?Number(e82.totalAwardsReceived):void 0,treatmentTags:globalThis.Array.isArray(e82?.treatmentTags)?e82.treatmentTags.map(n=>String(n)):[],unrepliableReason:isSet$o(e82.unrepliableReason)?String(e82.unrepliableReason):void 0,ups:isSet$o(e82.ups)?Number(e82.ups):void 0,userReports:globalThis.Array.isArray(e82?.userReports)?e82.userReports.map(n=>[...n]):[],count:isSet$o(e82.count)?Number(e82.count):void 0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>String(n)):[],banInfo:isSet$o(e82.banInfo)?BanInfo.fromJSON(e82.banInfo):void 0,markedSpam:isSet$o(e82.markedSpam)?!!e82.markedSpam:void 0,verdict:isSet$o(e82.verdict)?String(e82.verdict):void 0}},toJSON(e82){var t,o,d,r,a,u,l,s;let n={};return(t=e82.allAwardings)!=null&&t.length&&(n.allAwardings=e82.allAwardings.map(f=>Awarding.toJSON(f))),e82.approved!==void 0&&(n.approved=e82.approved),e82.approvedAtUtc!==void 0&&(n.approvedAtUtc=e82.approvedAtUtc),e82.approvedBy!==void 0&&(n.approvedBy=e82.approvedBy),e82.archived!==void 0&&(n.archived=e82.archived),e82.associatedAward!==void 0&&(n.associatedAward=e82.associatedAward),e82.author!==void 0&&(n.author=e82.author),e82.authorFlairBackgroundColor!==void 0&&(n.authorFlairBackgroundColor=e82.authorFlairBackgroundColor),e82.authorFlairCssClass!==void 0&&(n.authorFlairCssClass=e82.authorFlairCssClass),(o=e82.authorFlairRichtext)!=null&&o.length&&(n.authorFlairRichtext=e82.authorFlairRichtext.map(f=>AuthorFlairRichText.toJSON(f))),e82.authorFlairTemplateId!==void 0&&(n.authorFlairTemplateId=e82.authorFlairTemplateId),e82.authorFlairText!==void 0&&(n.authorFlairText=e82.authorFlairText),e82.authorFlairTextColor!==void 0&&(n.authorFlairTextColor=e82.authorFlairTextColor),e82.authorFlairType!==void 0&&(n.authorFlairType=e82.authorFlairType),e82.authorFullname!==void 0&&(n.authorFullname=e82.authorFullname),e82.authorIsBlocked!==void 0&&(n.authorIsBlocked=e82.authorIsBlocked),e82.authorPatreonFlair!==void 0&&(n.authorPatreonFlair=e82.authorPatreonFlair),e82.authorPremium!==void 0&&(n.authorPremium=e82.authorPremium),(d=e82.awarders)!=null&&d.length&&(n.awarders=e82.awarders),e82.bannedAtUtc!==void 0&&(n.bannedAtUtc=e82.bannedAtUtc),e82.bannedBy!==void 0&&(n.bannedBy=e82.bannedBy),e82.body!==void 0&&(n.body=e82.body),e82.bodyHtml!==void 0&&(n.bodyHtml=e82.bodyHtml),e82.canGild!==void 0&&(n.canGild=e82.canGild),e82.canModPost!==void 0&&(n.canModPost=e82.canModPost),e82.collapsed!==void 0&&(n.collapsed=e82.collapsed),e82.collapsedBecauseCrowdControl!==void 0&&(n.collapsedBecauseCrowdControl=e82.collapsedBecauseCrowdControl),e82.collapsedReason!==void 0&&(n.collapsedReason=e82.collapsedReason),e82.collapsedReasonCode!==void 0&&(n.collapsedReasonCode=e82.collapsedReasonCode),e82.commentType!==void 0&&(n.commentType=e82.commentType),e82.controversiality!==void 0&&(n.controversiality=e82.controversiality),e82.created!==void 0&&(n.created=e82.created),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.depth!==void 0&&(n.depth=e82.depth),e82.distinguished!==void 0&&(n.distinguished=e82.distinguished),e82.downs!==void 0&&(n.downs=e82.downs),e82.edited!==void 0&&(n.edited=e82.edited),e82.gilded!==void 0&&(n.gilded=e82.gilded),e82.gildings!==void 0&&(n.gildings=Gildings.toJSON(e82.gildings)),e82.id!==void 0&&(n.id=e82.id),e82.ignoreReports!==void 0&&(n.ignoreReports=e82.ignoreReports),e82.isSubmitter!==void 0&&(n.isSubmitter=e82.isSubmitter),e82.likes!==void 0&&(n.likes=e82.likes),e82.linkId!==void 0&&(n.linkId=e82.linkId),e82.locked!==void 0&&(n.locked=e82.locked),e82.modNote!==void 0&&(n.modNote=e82.modNote),e82.modReasonBy!==void 0&&(n.modReasonBy=e82.modReasonBy),e82.modReasonTitle!==void 0&&(n.modReasonTitle=e82.modReasonTitle),(r=e82.modReports)!=null&&r.length&&(n.modReports=e82.modReports),e82.name!==void 0&&(n.name=e82.name),e82.noFollow!==void 0&&(n.noFollow=e82.noFollow),e82.numReports!==void 0&&(n.numReports=e82.numReports),e82.parentId!==void 0&&(n.parentId=e82.parentId),e82.permalink!==void 0&&(n.permalink=e82.permalink),e82.removalReason!==void 0&&(n.removalReason=e82.removalReason),e82.removed!==void 0&&(n.removed=e82.removed),e82.replies!==void 0&&(n.replies=e82.replies),(a=e82.reportReasons)!=null&&a.length&&(n.reportReasons=e82.reportReasons),e82.rteMode!==void 0&&(n.rteMode=e82.rteMode),e82.saved!==void 0&&(n.saved=e82.saved),e82.score!==void 0&&(n.score=e82.score),e82.scoreHidden!==void 0&&(n.scoreHidden=e82.scoreHidden),e82.sendReplies!==void 0&&(n.sendReplies=e82.sendReplies),e82.spam!==void 0&&(n.spam=e82.spam),e82.stickied!==void 0&&(n.stickied=e82.stickied),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.subredditId!==void 0&&(n.subredditId=e82.subredditId),e82.subredditNamePrefixed!==void 0&&(n.subredditNamePrefixed=e82.subredditNamePrefixed),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.topAwardedType!==void 0&&(n.topAwardedType=e82.topAwardedType),e82.totalAwardsReceived!==void 0&&(n.totalAwardsReceived=e82.totalAwardsReceived),(u=e82.treatmentTags)!=null&&u.length&&(n.treatmentTags=e82.treatmentTags),e82.unrepliableReason!==void 0&&(n.unrepliableReason=e82.unrepliableReason),e82.ups!==void 0&&(n.ups=e82.ups),(l=e82.userReports)!=null&&l.length&&(n.userReports=e82.userReports),e82.count!==void 0&&(n.count=e82.count),(s=e82.children)!=null&&s.length&&(n.children=e82.children),e82.banInfo!==void 0&&(n.banInfo=BanInfo.toJSON(e82.banInfo)),e82.markedSpam!==void 0&&(n.markedSpam=e82.markedSpam),e82.verdict!==void 0&&(n.verdict=e82.verdict),n},create(e82){return Comment.fromPartial(e82??{})},fromPartial(e82){var t,o,d,r,a,u,l,s;let n=createBaseComment();return n.allAwardings=((t=e82.allAwardings)==null?void 0:t.map(f=>Awarding.fromPartial(f)))||[],n.approved=e82.approved??void 0,n.approvedAtUtc=e82.approvedAtUtc??void 0,n.approvedBy=e82.approvedBy??void 0,n.archived=e82.archived??void 0,n.associatedAward=e82.associatedAward??void 0,n.author=e82.author??void 0,n.authorFlairBackgroundColor=e82.authorFlairBackgroundColor??void 0,n.authorFlairCssClass=e82.authorFlairCssClass??void 0,n.authorFlairRichtext=((o=e82.authorFlairRichtext)==null?void 0:o.map(f=>AuthorFlairRichText.fromPartial(f)))||[],n.authorFlairTemplateId=e82.authorFlairTemplateId??void 0,n.authorFlairText=e82.authorFlairText??void 0,n.authorFlairTextColor=e82.authorFlairTextColor??void 0,n.authorFlairType=e82.authorFlairType??void 0,n.authorFullname=e82.authorFullname??void 0,n.authorIsBlocked=e82.authorIsBlocked??void 0,n.authorPatreonFlair=e82.authorPatreonFlair??void 0,n.authorPremium=e82.authorPremium??void 0,n.awarders=((d=e82.awarders)==null?void 0:d.map(f=>f))||[],n.bannedAtUtc=e82.bannedAtUtc??void 0,n.bannedBy=e82.bannedBy??void 0,n.body=e82.body??void 0,n.bodyHtml=e82.bodyHtml??void 0,n.canGild=e82.canGild??void 0,n.canModPost=e82.canModPost??void 0,n.collapsed=e82.collapsed??void 0,n.collapsedBecauseCrowdControl=e82.collapsedBecauseCrowdControl??void 0,n.collapsedReason=e82.collapsedReason??void 0,n.collapsedReasonCode=e82.collapsedReasonCode??void 0,n.commentType=e82.commentType??void 0,n.controversiality=e82.controversiality??void 0,n.created=e82.created??void 0,n.createdUtc=e82.createdUtc??void 0,n.depth=e82.depth??void 0,n.distinguished=e82.distinguished??void 0,n.downs=e82.downs??void 0,n.edited=e82.edited??void 0,n.gilded=e82.gilded??void 0,n.gildings=e82.gildings!==void 0&&e82.gildings!==null?Gildings.fromPartial(e82.gildings):void 0,n.id=e82.id??void 0,n.ignoreReports=e82.ignoreReports??void 0,n.isSubmitter=e82.isSubmitter??void 0,n.likes=e82.likes??void 0,n.linkId=e82.linkId??void 0,n.locked=e82.locked??void 0,n.modNote=e82.modNote??void 0,n.modReasonBy=e82.modReasonBy??void 0,n.modReasonTitle=e82.modReasonTitle??void 0,n.modReports=((r=e82.modReports)==null?void 0:r.map(f=>f))||[],n.name=e82.name??void 0,n.noFollow=e82.noFollow??void 0,n.numReports=e82.numReports??void 0,n.parentId=e82.parentId??void 0,n.permalink=e82.permalink??void 0,n.removalReason=e82.removalReason??void 0,n.removed=e82.removed??void 0,n.replies=e82.replies??void 0,n.reportReasons=((a=e82.reportReasons)==null?void 0:a.map(f=>f))||[],n.rteMode=e82.rteMode??void 0,n.saved=e82.saved??void 0,n.score=e82.score??void 0,n.scoreHidden=e82.scoreHidden??void 0,n.sendReplies=e82.sendReplies??void 0,n.spam=e82.spam??void 0,n.stickied=e82.stickied??void 0,n.subreddit=e82.subreddit??void 0,n.subredditId=e82.subredditId??void 0,n.subredditNamePrefixed=e82.subredditNamePrefixed??void 0,n.subredditType=e82.subredditType??void 0,n.topAwardedType=e82.topAwardedType??void 0,n.totalAwardsReceived=e82.totalAwardsReceived??void 0,n.treatmentTags=((u=e82.treatmentTags)==null?void 0:u.map(f=>f))||[],n.unrepliableReason=e82.unrepliableReason??void 0,n.ups=e82.ups??void 0,n.userReports=((l=e82.userReports)==null?void 0:l.map(f=>f))||[],n.count=e82.count??void 0,n.children=((s=e82.children)==null?void 0:s.map(f=>f))||[],n.banInfo=e82.banInfo!==void 0&&e82.banInfo!==null?BanInfo.fromPartial(e82.banInfo):void 0,n.markedSpam=e82.markedSpam??void 0,n.verdict=e82.verdict??void 0,n}};messageTypeRegistry.set(Comment.$type,Comment);function isSet$o(e82){return e82!=null}function createBaseCommentRequest(){return{richtextJson:void 0,text:"",thingId:""}}var CommentRequest={$type:"devvit.plugin.redditapi.linksandcomments.CommentRequest",encode(e82,n=_m0.Writer.create()){return e82.richtextJson!==void 0&&StringValue.encode({value:e82.richtextJson},n.uint32(10).fork()).ldelim(),e82.text!==""&&n.uint32(18).string(e82.text),e82.thingId!==""&&n.uint32(26).string(e82.thingId),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommentRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.richtextJson=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.text=t.string();continue;case 3:if(r!==26)break;d.thingId=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{richtextJson:isSet$n(e82.richtextJson)?String(e82.richtextJson):void 0,text:isSet$n(e82.text)?globalThis.String(e82.text):"",thingId:isSet$n(e82.thingId)?globalThis.String(e82.thingId):""}},toJSON(e82){let n={};return e82.richtextJson!==void 0&&(n.richtextJson=e82.richtextJson),e82.text!==""&&(n.text=e82.text),e82.thingId!==""&&(n.thingId=e82.thingId),n},create(e82){return CommentRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCommentRequest();return n.richtextJson=e82.richtextJson??void 0,n.text=e82.text??"",n.thingId=e82.thingId??"",n}};messageTypeRegistry.set(CommentRequest.$type,CommentRequest);function createBaseFollowPostRequest(){return{follow:!1,fullname:""}}var FollowPostRequest={$type:"devvit.plugin.redditapi.linksandcomments.FollowPostRequest",encode(e82,n=_m0.Writer.create()){return e82.follow!==!1&&n.uint32(8).bool(e82.follow),e82.fullname!==""&&n.uint32(18).string(e82.fullname),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFollowPostRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.follow=t.bool();continue;case 2:if(r!==18)break;d.fullname=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{follow:isSet$n(e82.follow)?globalThis.Boolean(e82.follow):!1,fullname:isSet$n(e82.fullname)?globalThis.String(e82.fullname):""}},toJSON(e82){let n={};return e82.follow!==!1&&(n.follow=e82.follow),e82.fullname!==""&&(n.fullname=e82.fullname),n},create(e82){return FollowPostRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFollowPostRequest();return n.follow=e82.follow??!1,n.fullname=e82.fullname??"",n}};messageTypeRegistry.set(FollowPostRequest.$type,FollowPostRequest);function createBaseBasicIdRequest(){return{id:""}}var BasicIdRequest={$type:"devvit.plugin.redditapi.linksandcomments.BasicIdRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBasicIdRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$n(e82.id)?globalThis.String(e82.id):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),n},create(e82){return BasicIdRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBasicIdRequest();return n.id=e82.id??"",n}};messageTypeRegistry.set(BasicIdRequest.$type,BasicIdRequest);function createBaseInfoRequest(){return{subreddits:[],thingIds:[],url:void 0}}var InfoRequest={$type:"devvit.plugin.redditapi.linksandcomments.InfoRequest",encode(e82,n=_m0.Writer.create()){for(let t of e82.subreddits)n.uint32(10).string(t);for(let t of e82.thingIds)n.uint32(18).string(t);return e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseInfoRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddits.push(t.string());continue;case 2:if(r!==18)break;d.thingIds.push(t.string());continue;case 3:if(r!==26)break;d.url=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddits:globalThis.Array.isArray(e82?.subreddits)?e82.subreddits.map(n=>globalThis.String(n)):[],thingIds:globalThis.Array.isArray(e82?.thingIds)?e82.thingIds.map(n=>globalThis.String(n)):[],url:isSet$n(e82.url)?String(e82.url):void 0}},toJSON(e82){var t,o;let n={};return(t=e82.subreddits)!=null&&t.length&&(n.subreddits=e82.subreddits),(o=e82.thingIds)!=null&&o.length&&(n.thingIds=e82.thingIds),e82.url!==void 0&&(n.url=e82.url),n},create(e82){return InfoRequest.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseInfoRequest();return n.subreddits=((t=e82.subreddits)==null?void 0:t.map(d=>d))||[],n.thingIds=((o=e82.thingIds)==null?void 0:o.map(d=>d))||[],n.url=e82.url??void 0,n}};messageTypeRegistry.set(InfoRequest.$type,InfoRequest);function createBaseMoreChildrenRequest(){return{children:[],depth:void 0,limitChildren:void 0,linkId:"",sort:void 0,id:void 0}}var MoreChildrenRequest={$type:"devvit.plugin.redditapi.linksandcomments.MoreChildrenRequest",encode(e82,n=_m0.Writer.create()){for(let t of e82.children)n.uint32(10).string(t);return e82.depth!==void 0&&Int32Value.encode({value:e82.depth},n.uint32(18).fork()).ldelim(),e82.limitChildren!==void 0&&BoolValue.encode({value:e82.limitChildren},n.uint32(34).fork()).ldelim(),e82.linkId!==""&&n.uint32(42).string(e82.linkId),e82.sort!==void 0&&StringValue.encode({value:e82.sort},n.uint32(50).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMoreChildrenRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.children.push(t.string());continue;case 2:if(r!==18)break;d.depth=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limitChildren=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.linkId=t.string();continue;case 6:if(r!==50)break;d.sort=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.id=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>globalThis.String(n)):[],depth:isSet$n(e82.depth)?Number(e82.depth):void 0,limitChildren:isSet$n(e82.limitChildren)?!!e82.limitChildren:void 0,linkId:isSet$n(e82.linkId)?globalThis.String(e82.linkId):"",sort:isSet$n(e82.sort)?String(e82.sort):void 0,id:isSet$n(e82.id)?String(e82.id):void 0}},toJSON(e82){var t;let n={};return(t=e82.children)!=null&&t.length&&(n.children=e82.children),e82.depth!==void 0&&(n.depth=e82.depth),e82.limitChildren!==void 0&&(n.limitChildren=e82.limitChildren),e82.linkId!==""&&(n.linkId=e82.linkId),e82.sort!==void 0&&(n.sort=e82.sort),e82.id!==void 0&&(n.id=e82.id),n},create(e82){return MoreChildrenRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseMoreChildrenRequest();return n.children=((t=e82.children)==null?void 0:t.map(o=>o))||[],n.depth=e82.depth??void 0,n.limitChildren=e82.limitChildren??void 0,n.linkId=e82.linkId??"",n.sort=e82.sort??void 0,n.id=e82.id??void 0,n}};messageTypeRegistry.set(MoreChildrenRequest.$type,MoreChildrenRequest);function createBaseReportRequest(){return{additionalInfo:void 0,customText:void 0,modmailConvId:void 0,otherReason:void 0,reason:"",ruleReason:void 0,siteReason:void 0,srName:void 0,thingId:"",usernames:void 0}}var ReportRequest={$type:"devvit.plugin.redditapi.linksandcomments.ReportRequest",encode(e82,n=_m0.Writer.create()){return e82.additionalInfo!==void 0&&StringValue.encode({value:e82.additionalInfo},n.uint32(10).fork()).ldelim(),e82.customText!==void 0&&StringValue.encode({value:e82.customText},n.uint32(18).fork()).ldelim(),e82.modmailConvId!==void 0&&StringValue.encode({value:e82.modmailConvId},n.uint32(42).fork()).ldelim(),e82.otherReason!==void 0&&StringValue.encode({value:e82.otherReason},n.uint32(50).fork()).ldelim(),e82.reason!==""&&n.uint32(58).string(e82.reason),e82.ruleReason!==void 0&&StringValue.encode({value:e82.ruleReason},n.uint32(66).fork()).ldelim(),e82.siteReason!==void 0&&StringValue.encode({value:e82.siteReason},n.uint32(74).fork()).ldelim(),e82.srName!==void 0&&StringValue.encode({value:e82.srName},n.uint32(82).fork()).ldelim(),e82.thingId!==""&&n.uint32(90).string(e82.thingId),e82.usernames!==void 0&&StringValue.encode({value:e82.usernames},n.uint32(98).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseReportRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.additionalInfo=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.customText=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.modmailConvId=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.otherReason=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.reason=t.string();continue;case 8:if(r!==66)break;d.ruleReason=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.siteReason=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.srName=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.thingId=t.string();continue;case 12:if(r!==98)break;d.usernames=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{additionalInfo:isSet$n(e82.additionalInfo)?String(e82.additionalInfo):void 0,customText:isSet$n(e82.customText)?String(e82.customText):void 0,modmailConvId:isSet$n(e82.modmailConvId)?String(e82.modmailConvId):void 0,otherReason:isSet$n(e82.otherReason)?String(e82.otherReason):void 0,reason:isSet$n(e82.reason)?globalThis.String(e82.reason):"",ruleReason:isSet$n(e82.ruleReason)?String(e82.ruleReason):void 0,siteReason:isSet$n(e82.siteReason)?String(e82.siteReason):void 0,srName:isSet$n(e82.srName)?String(e82.srName):void 0,thingId:isSet$n(e82.thingId)?globalThis.String(e82.thingId):"",usernames:isSet$n(e82.usernames)?String(e82.usernames):void 0}},toJSON(e82){let n={};return e82.additionalInfo!==void 0&&(n.additionalInfo=e82.additionalInfo),e82.customText!==void 0&&(n.customText=e82.customText),e82.modmailConvId!==void 0&&(n.modmailConvId=e82.modmailConvId),e82.otherReason!==void 0&&(n.otherReason=e82.otherReason),e82.reason!==""&&(n.reason=e82.reason),e82.ruleReason!==void 0&&(n.ruleReason=e82.ruleReason),e82.siteReason!==void 0&&(n.siteReason=e82.siteReason),e82.srName!==void 0&&(n.srName=e82.srName),e82.thingId!==""&&(n.thingId=e82.thingId),e82.usernames!==void 0&&(n.usernames=e82.usernames),n},create(e82){return ReportRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseReportRequest();return n.additionalInfo=e82.additionalInfo??void 0,n.customText=e82.customText??void 0,n.modmailConvId=e82.modmailConvId??void 0,n.otherReason=e82.otherReason??void 0,n.reason=e82.reason??"",n.ruleReason=e82.ruleReason??void 0,n.siteReason=e82.siteReason??void 0,n.srName=e82.srName??void 0,n.thingId=e82.thingId??"",n.usernames=e82.usernames??void 0,n}};messageTypeRegistry.set(ReportRequest.$type,ReportRequest);function createBaseReportAwardRequest(){return{awardId:"",reason:void 0}}var ReportAwardRequest={$type:"devvit.plugin.redditapi.linksandcomments.ReportAwardRequest",encode(e82,n=_m0.Writer.create()){return e82.awardId!==""&&n.uint32(10).string(e82.awardId),e82.reason!==void 0&&StringValue.encode({value:e82.reason},n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseReportAwardRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.awardId=t.string();continue;case 2:if(r!==18)break;d.reason=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{awardId:isSet$n(e82.awardId)?globalThis.String(e82.awardId):"",reason:isSet$n(e82.reason)?String(e82.reason):void 0}},toJSON(e82){let n={};return e82.awardId!==""&&(n.awardId=e82.awardId),e82.reason!==void 0&&(n.reason=e82.reason),n},create(e82){return ReportAwardRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseReportAwardRequest();return n.awardId=e82.awardId??"",n.reason=e82.reason??void 0,n}};messageTypeRegistry.set(ReportAwardRequest.$type,ReportAwardRequest);function createBaseSaveRequest(){return{id:""}}var SaveRequest={$type:"devvit.plugin.redditapi.linksandcomments.SaveRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSaveRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$n(e82.id)?globalThis.String(e82.id):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),n},create(e82){return SaveRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSaveRequest();return n.id=e82.id??"",n}};messageTypeRegistry.set(SaveRequest.$type,SaveRequest);function createBaseSendRepliesRequest(){return{id:"",state:!1}}var SendRepliesRequest={$type:"devvit.plugin.redditapi.linksandcomments.SendRepliesRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.state!==!1&&n.uint32(16).bool(e82.state),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSendRepliesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==16)break;d.state=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$n(e82.id)?globalThis.String(e82.id):"",state:isSet$n(e82.state)?globalThis.Boolean(e82.state):!1}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.state!==!1&&(n.state=e82.state),n},create(e82){return SendRepliesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSendRepliesRequest();return n.id=e82.id??"",n.state=e82.state??!1,n}};messageTypeRegistry.set(SendRepliesRequest.$type,SendRepliesRequest);function createBaseSetContestModeRequest(){return{id:"",state:!1}}var SetContestModeRequest={$type:"devvit.plugin.redditapi.linksandcomments.SetContestModeRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.state!==!1&&n.uint32(16).bool(e82.state),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSetContestModeRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==16)break;d.state=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$n(e82.id)?globalThis.String(e82.id):"",state:isSet$n(e82.state)?globalThis.Boolean(e82.state):!1}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.state!==!1&&(n.state=e82.state),n},create(e82){return SetContestModeRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSetContestModeRequest();return n.id=e82.id??"",n.state=e82.state??!1,n}};messageTypeRegistry.set(SetContestModeRequest.$type,SetContestModeRequest);function createBaseSetSubredditStickyRequest(){return{id:"",num:void 0,state:!1,toProfile:void 0}}var SetSubredditStickyRequest={$type:"devvit.plugin.redditapi.linksandcomments.SetSubredditStickyRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.num!==void 0&&Int32Value.encode({value:e82.num},n.uint32(18).fork()).ldelim(),e82.state!==!1&&n.uint32(24).bool(e82.state),e82.toProfile!==void 0&&BoolValue.encode({value:e82.toProfile},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSetSubredditStickyRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.num=Int32Value.decode(t,t.uint32()).value;continue;case 3:if(r!==24)break;d.state=t.bool();continue;case 4:if(r!==34)break;d.toProfile=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$n(e82.id)?globalThis.String(e82.id):"",num:isSet$n(e82.num)?Number(e82.num):void 0,state:isSet$n(e82.state)?globalThis.Boolean(e82.state):!1,toProfile:isSet$n(e82.toProfile)?!!e82.toProfile:void 0}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.num!==void 0&&(n.num=e82.num),e82.state!==!1&&(n.state=e82.state),e82.toProfile!==void 0&&(n.toProfile=e82.toProfile),n},create(e82){return SetSubredditStickyRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSetSubredditStickyRequest();return n.id=e82.id??"",n.num=e82.num??void 0,n.state=e82.state??!1,n.toProfile=e82.toProfile??void 0,n}};messageTypeRegistry.set(SetSubredditStickyRequest.$type,SetSubredditStickyRequest);function createBaseSetSuggestedSortRequest(){return{id:"",sort:""}}var SetSuggestedSortRequest={$type:"devvit.plugin.redditapi.linksandcomments.SetSuggestedSortRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.sort!==""&&n.uint32(18).string(e82.sort),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSetSuggestedSortRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.sort=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$n(e82.id)?globalThis.String(e82.id):"",sort:isSet$n(e82.sort)?globalThis.String(e82.sort):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.sort!==""&&(n.sort=e82.sort),n},create(e82){return SetSuggestedSortRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSetSuggestedSortRequest();return n.id=e82.id??"",n.sort=e82.sort??"",n}};messageTypeRegistry.set(SetSuggestedSortRequest.$type,SetSuggestedSortRequest);function createBaseSubmitRequest(){return{collectionId:void 0,flairId:void 0,flairText:void 0,kind:"",nsfw:void 0,richtextJson:void 0,sendreplies:void 0,spoiler:void 0,sr:"",text:void 0,title:"",url:void 0,videoPosterUrl:void 0,crosspostFullname:void 0,richtextFallback:void 0}}var SubmitRequest={$type:"devvit.plugin.redditapi.linksandcomments.SubmitRequest",encode(e82,n=_m0.Writer.create()){return e82.collectionId!==void 0&&StringValue.encode({value:e82.collectionId},n.uint32(18).fork()).ldelim(),e82.flairId!==void 0&&StringValue.encode({value:e82.flairId},n.uint32(58).fork()).ldelim(),e82.flairText!==void 0&&StringValue.encode({value:e82.flairText},n.uint32(66).fork()).ldelim(),e82.kind!==""&&n.uint32(74).string(e82.kind),e82.nsfw!==void 0&&BoolValue.encode({value:e82.nsfw},n.uint32(82).fork()).ldelim(),e82.richtextJson!==void 0&&StringValue.encode({value:e82.richtextJson},n.uint32(98).fork()).ldelim(),e82.sendreplies!==void 0&&BoolValue.encode({value:e82.sendreplies},n.uint32(106).fork()).ldelim(),e82.spoiler!==void 0&&BoolValue.encode({value:e82.spoiler},n.uint32(114).fork()).ldelim(),e82.sr!==""&&n.uint32(122).string(e82.sr),e82.text!==void 0&&StringValue.encode({value:e82.text},n.uint32(130).fork()).ldelim(),e82.title!==""&&n.uint32(138).string(e82.title),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(146).fork()).ldelim(),e82.videoPosterUrl!==void 0&&StringValue.encode({value:e82.videoPosterUrl},n.uint32(154).fork()).ldelim(),e82.crosspostFullname!==void 0&&StringValue.encode({value:e82.crosspostFullname},n.uint32(162).fork()).ldelim(),e82.richtextFallback!==void 0&&StringValue.encode({value:e82.richtextFallback},n.uint32(170).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubmitRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;d.collectionId=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.flairId=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.flairText=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.kind=t.string();continue;case 10:if(r!==82)break;d.nsfw=BoolValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.richtextJson=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.sendreplies=BoolValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.spoiler=BoolValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.sr=t.string();continue;case 16:if(r!==130)break;d.text=StringValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.title=t.string();continue;case 18:if(r!==146)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.videoPosterUrl=StringValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.crosspostFullname=StringValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.richtextFallback=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{collectionId:isSet$n(e82.collectionId)?String(e82.collectionId):void 0,flairId:isSet$n(e82.flairId)?String(e82.flairId):void 0,flairText:isSet$n(e82.flairText)?String(e82.flairText):void 0,kind:isSet$n(e82.kind)?globalThis.String(e82.kind):"",nsfw:isSet$n(e82.nsfw)?!!e82.nsfw:void 0,richtextJson:isSet$n(e82.richtextJson)?String(e82.richtextJson):void 0,sendreplies:isSet$n(e82.sendreplies)?!!e82.sendreplies:void 0,spoiler:isSet$n(e82.spoiler)?!!e82.spoiler:void 0,sr:isSet$n(e82.sr)?globalThis.String(e82.sr):"",text:isSet$n(e82.text)?String(e82.text):void 0,title:isSet$n(e82.title)?globalThis.String(e82.title):"",url:isSet$n(e82.url)?String(e82.url):void 0,videoPosterUrl:isSet$n(e82.videoPosterUrl)?String(e82.videoPosterUrl):void 0,crosspostFullname:isSet$n(e82.crosspostFullname)?String(e82.crosspostFullname):void 0,richtextFallback:isSet$n(e82.richtextFallback)?String(e82.richtextFallback):void 0}},toJSON(e82){let n={};return e82.collectionId!==void 0&&(n.collectionId=e82.collectionId),e82.flairId!==void 0&&(n.flairId=e82.flairId),e82.flairText!==void 0&&(n.flairText=e82.flairText),e82.kind!==""&&(n.kind=e82.kind),e82.nsfw!==void 0&&(n.nsfw=e82.nsfw),e82.richtextJson!==void 0&&(n.richtextJson=e82.richtextJson),e82.sendreplies!==void 0&&(n.sendreplies=e82.sendreplies),e82.spoiler!==void 0&&(n.spoiler=e82.spoiler),e82.sr!==""&&(n.sr=e82.sr),e82.text!==void 0&&(n.text=e82.text),e82.title!==""&&(n.title=e82.title),e82.url!==void 0&&(n.url=e82.url),e82.videoPosterUrl!==void 0&&(n.videoPosterUrl=e82.videoPosterUrl),e82.crosspostFullname!==void 0&&(n.crosspostFullname=e82.crosspostFullname),e82.richtextFallback!==void 0&&(n.richtextFallback=e82.richtextFallback),n},create(e82){return SubmitRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubmitRequest();return n.collectionId=e82.collectionId??void 0,n.flairId=e82.flairId??void 0,n.flairText=e82.flairText??void 0,n.kind=e82.kind??"",n.nsfw=e82.nsfw??void 0,n.richtextJson=e82.richtextJson??void 0,n.sendreplies=e82.sendreplies??void 0,n.spoiler=e82.spoiler??void 0,n.sr=e82.sr??"",n.text=e82.text??void 0,n.title=e82.title??"",n.url=e82.url??void 0,n.videoPosterUrl=e82.videoPosterUrl??void 0,n.crosspostFullname=e82.crosspostFullname??void 0,n.richtextFallback=e82.richtextFallback??void 0,n}};messageTypeRegistry.set(SubmitRequest.$type,SubmitRequest);function createBaseVoteRequest(){return{dir:0,id:""}}var VoteRequest={$type:"devvit.plugin.redditapi.linksandcomments.VoteRequest",encode(e82,n=_m0.Writer.create()){return e82.dir!==0&&n.uint32(8).int32(e82.dir),e82.id!==""&&n.uint32(18).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseVoteRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.dir=t.int32();continue;case 2:if(r!==18)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{dir:isSet$n(e82.dir)?globalThis.Number(e82.dir):0,id:isSet$n(e82.id)?globalThis.String(e82.id):""}},toJSON(e82){let n={};return e82.dir!==0&&(n.dir=Math.round(e82.dir)),e82.id!==""&&(n.id=e82.id),n},create(e82){return VoteRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseVoteRequest();return n.dir=e82.dir??0,n.id=e82.id??"",n}};messageTypeRegistry.set(VoteRequest.$type,VoteRequest);function createBaseEditCustomPostRequest(){return{thingId:"",richtextFallback:void 0}}var EditCustomPostRequest={$type:"devvit.plugin.redditapi.linksandcomments.EditCustomPostRequest",encode(e82,n=_m0.Writer.create()){return e82.thingId!==""&&n.uint32(10).string(e82.thingId),e82.richtextFallback!==void 0&&StringValue.encode({value:e82.richtextFallback},n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseEditCustomPostRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.thingId=t.string();continue;case 2:if(r!==18)break;d.richtextFallback=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{thingId:isSet$n(e82.thingId)?globalThis.String(e82.thingId):"",richtextFallback:isSet$n(e82.richtextFallback)?String(e82.richtextFallback):void 0}},toJSON(e82){let n={};return e82.thingId!==""&&(n.thingId=e82.thingId),e82.richtextFallback!==void 0&&(n.richtextFallback=e82.richtextFallback),n},create(e82){return EditCustomPostRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseEditCustomPostRequest();return n.thingId=e82.thingId??"",n.richtextFallback=e82.richtextFallback??void 0,n}};messageTypeRegistry.set(EditCustomPostRequest.$type,EditCustomPostRequest);function createBaseJsonWrappedComment(){return{json:void 0}}var JsonWrappedComment={$type:"devvit.plugin.redditapi.linksandcomments.JsonWrappedComment",encode(e82,n=_m0.Writer.create()){return e82.json!==void 0&&JsonWrappedComment_Json.encode(e82.json,n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseJsonWrappedComment();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.json=JsonWrappedComment_Json.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{json:isSet$n(e82.json)?JsonWrappedComment_Json.fromJSON(e82.json):void 0}},toJSON(e82){let n={};return e82.json!==void 0&&(n.json=JsonWrappedComment_Json.toJSON(e82.json)),n},create(e82){return JsonWrappedComment.fromPartial(e82??{})},fromPartial(e82){let n=createBaseJsonWrappedComment();return n.json=e82.json!==void 0&&e82.json!==null?JsonWrappedComment_Json.fromPartial(e82.json):void 0,n}};messageTypeRegistry.set(JsonWrappedComment.$type,JsonWrappedComment);function createBaseJsonWrappedComment_WrappedComment(){return{kind:"",data:void 0}}var JsonWrappedComment_WrappedComment={$type:"devvit.plugin.redditapi.linksandcomments.JsonWrappedComment.WrappedComment",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&Comment.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseJsonWrappedComment_WrappedComment();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=Comment.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$n(e82.kind)?globalThis.String(e82.kind):"",data:isSet$n(e82.data)?Comment.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=Comment.toJSON(e82.data)),n},create(e82){return JsonWrappedComment_WrappedComment.fromPartial(e82??{})},fromPartial(e82){let n=createBaseJsonWrappedComment_WrappedComment();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?Comment.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(JsonWrappedComment_WrappedComment.$type,JsonWrappedComment_WrappedComment);function createBaseJsonWrappedComment_JsonData(){return{things:[]}}var JsonWrappedComment_JsonData={$type:"devvit.plugin.redditapi.linksandcomments.JsonWrappedComment.JsonData",encode(e82,n=_m0.Writer.create()){for(let t of e82.things)JsonWrappedComment_WrappedComment.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseJsonWrappedComment_JsonData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.things.push(JsonWrappedComment_WrappedComment.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{things:globalThis.Array.isArray(e82?.things)?e82.things.map(n=>JsonWrappedComment_WrappedComment.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.things)!=null&&t.length&&(n.things=e82.things.map(o=>JsonWrappedComment_WrappedComment.toJSON(o))),n},create(e82){return JsonWrappedComment_JsonData.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseJsonWrappedComment_JsonData();return n.things=((t=e82.things)==null?void 0:t.map(o=>JsonWrappedComment_WrappedComment.fromPartial(o)))||[],n}};messageTypeRegistry.set(JsonWrappedComment_JsonData.$type,JsonWrappedComment_JsonData);function createBaseJsonWrappedComment_Json(){return{errors:[],data:void 0}}var JsonWrappedComment_Json={$type:"devvit.plugin.redditapi.linksandcomments.JsonWrappedComment.Json",encode(e82,n=_m0.Writer.create()){for(let t of e82.errors)n.uint32(10).string(t);return e82.data!==void 0&&JsonWrappedComment_JsonData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseJsonWrappedComment_Json();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.errors.push(t.string());continue;case 2:if(r!==18)break;d.data=JsonWrappedComment_JsonData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{errors:globalThis.Array.isArray(e82?.errors)?e82.errors.map(n=>globalThis.String(n)):[],data:isSet$n(e82.data)?JsonWrappedComment_JsonData.fromJSON(e82.data):void 0}},toJSON(e82){var t;let n={};return(t=e82.errors)!=null&&t.length&&(n.errors=e82.errors),e82.data!==void 0&&(n.data=JsonWrappedComment_JsonData.toJSON(e82.data)),n},create(e82){return JsonWrappedComment_Json.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseJsonWrappedComment_Json();return n.errors=((t=e82.errors)==null?void 0:t.map(o=>o))||[],n.data=e82.data!==void 0&&e82.data!==null?JsonWrappedComment_JsonData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(JsonWrappedComment_Json.$type,JsonWrappedComment_Json);function createBaseSubmitResponse(){return{json:void 0}}var SubmitResponse={$type:"devvit.plugin.redditapi.linksandcomments.SubmitResponse",encode(e82,n=_m0.Writer.create()){return e82.json!==void 0&&SubmitResponse_JsonType.encode(e82.json,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubmitResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 4:if(r!==34)break;d.json=SubmitResponse_JsonType.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{json:isSet$n(e82.json)?SubmitResponse_JsonType.fromJSON(e82.json):void 0}},toJSON(e82){let n={};return e82.json!==void 0&&(n.json=SubmitResponse_JsonType.toJSON(e82.json)),n},create(e82){return SubmitResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubmitResponse();return n.json=e82.json!==void 0&&e82.json!==null?SubmitResponse_JsonType.fromPartial(e82.json):void 0,n}};messageTypeRegistry.set(SubmitResponse.$type,SubmitResponse);function createBaseSubmitResponse_JsonType(){return{errors:[],data:void 0}}var SubmitResponse_JsonType={$type:"devvit.plugin.redditapi.linksandcomments.SubmitResponse.JsonType",encode(e82,n=_m0.Writer.create()){for(let t of e82.errors)Any.encode(t,n.uint32(10).fork()).ldelim();return e82.data!==void 0&&SubmitResponse_JsonType_JsonData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubmitResponse_JsonType();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.errors.push(Any.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.data=SubmitResponse_JsonType_JsonData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{errors:globalThis.Array.isArray(e82?.errors)?e82.errors.map(n=>Any.fromJSON(n)):[],data:isSet$n(e82.data)?SubmitResponse_JsonType_JsonData.fromJSON(e82.data):void 0}},toJSON(e82){var t;let n={};return(t=e82.errors)!=null&&t.length&&(n.errors=e82.errors.map(o=>Any.toJSON(o))),e82.data!==void 0&&(n.data=SubmitResponse_JsonType_JsonData.toJSON(e82.data)),n},create(e82){return SubmitResponse_JsonType.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSubmitResponse_JsonType();return n.errors=((t=e82.errors)==null?void 0:t.map(o=>Any.fromPartial(o)))||[],n.data=e82.data!==void 0&&e82.data!==null?SubmitResponse_JsonType_JsonData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(SubmitResponse_JsonType.$type,SubmitResponse_JsonType);function createBaseSubmitResponse_JsonType_JsonData(){return{url:void 0,draftsCount:void 0,id:void 0,name:void 0}}var SubmitResponse_JsonType_JsonData={$type:"devvit.plugin.redditapi.linksandcomments.SubmitResponse.JsonType.JsonData",encode(e82,n=_m0.Writer.create()){return e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(10).fork()).ldelim(),e82.draftsCount!==void 0&&Int32Value.encode({value:e82.draftsCount},n.uint32(18).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(26).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubmitResponse_JsonType_JsonData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.draftsCount=Int32Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.name=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$n(e82.url)?String(e82.url):void 0,draftsCount:isSet$n(e82.draftsCount)?Number(e82.draftsCount):void 0,id:isSet$n(e82.id)?String(e82.id):void 0,name:isSet$n(e82.name)?String(e82.name):void 0}},toJSON(e82){let n={};return e82.url!==void 0&&(n.url=e82.url),e82.draftsCount!==void 0&&(n.draftsCount=e82.draftsCount),e82.id!==void 0&&(n.id=e82.id),e82.name!==void 0&&(n.name=e82.name),n},create(e82){return SubmitResponse_JsonType_JsonData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubmitResponse_JsonType_JsonData();return n.url=e82.url??void 0,n.draftsCount=e82.draftsCount??void 0,n.id=e82.id??void 0,n.name=e82.name??void 0,n}};messageTypeRegistry.set(SubmitResponse_JsonType_JsonData.$type,SubmitResponse_JsonType_JsonData);function isSet$n(e82){return e82!=null}var LinksAndCommentsDefinition={name:"LinksAndComments",fullName:"devvit.plugin.redditapi.linksandcomments.LinksAndComments",methods:{comment:{name:"Comment",requestType:CommentRequest,requestStream:!1,responseType:JsonWrappedComment,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([14,18,12,47,97,112,105,47,99,111,109,109,101,110,116]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1]),new Uint8Array([2,64,1])]}}},del:{name:"Del",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([10,18,8,47,97,112,105,47,100,101,108]),new Uint8Array([2,24,4])]}}},editUserText:{name:"EditUserText",requestType:CommentRequest,requestStream:!1,responseType:JsonWrappedComment,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([19,18,17,47,97,112,105,47,101,100,105,116,117,115,101,114,116,101,120,116]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1]),new Uint8Array([2,64,1])]}}},followPost:{name:"FollowPost",requestType:FollowPostRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([18,18,16,47,97,112,105,47,102,111,108,108,111,119,95,112,111,115,116]),new Uint8Array([2,24,4])]}}},hide:{name:"Hide",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([11,18,9,47,97,112,105,47,104,105,100,101]),new Uint8Array([2,24,4])]}}},info:{name:"Info",requestType:InfoRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([68,18,66,47,97,112,105,47,105,110,102,111,46,106,115,111,110,63,115,114,95,110,97,109,101,61,123,115,117,98,114,101,100,100,105,116,115,125,38,105,100,61,123,116,104,105,110,103,95,105,100,115,125,38,117,114,108,61,123,117,114,108,125,38,114,116,106,61,49])]}}},lock:{name:"Lock",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([11,18,9,47,97,112,105,47,108,111,99,107]),new Uint8Array([2,24,4])]}}},markNSFW:{name:"MarkNSFW",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([15,18,13,47,97,112,105,47,109,97,114,107,110,115,102,119]),new Uint8Array([2,24,4])]}}},moreChildren:{name:"MoreChildren",requestType:MoreChildrenRequest,requestStream:!1,responseType:JsonWrappedComment,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([138,1,18,135,1,47,97,112,105,47,109,111,114,101,99,104,105,108,100,114,101,110,63,99,104,105,108,100,114,101,110,61,123,99,104,105,108,100,114,101,110,125,38,100,101,112,116,104,61,123,100,101,112,116,104,125,38,105,100,61,123,105,100,125,38,108,105,109,105,116,95,99,104,105,108,100,114,101,110,61,123,108,105,109,105,116,95,99,104,105,108,100,114,101,110,125,38,108,105,110,107,95,105,100,61,123,108,105,110,107,95,105,100,125,38,115,111,114,116,61,123,115,111,114,116,125,38,97,112,105,95,116,121,112,101,61,106,115,111,110]),new Uint8Array([2,64,1])]}}},report:{name:"Report",requestType:ReportRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([13,18,11,47,97,112,105,47,114,101,112,111,114,116]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},reportAward:{name:"ReportAward",requestType:ReportAwardRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([19,18,17,47,97,112,105,47,114,101,112,111,114,116,95,97,119,97,114,100]),new Uint8Array([2,24,4])]}}},save:{name:"Save",requestType:SaveRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([11,18,9,47,97,112,105,47,115,97,118,101]),new Uint8Array([2,24,4])]}}},sendReplies:{name:"SendReplies",requestType:SendRepliesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([18,18,16,47,97,112,105,47,115,101,110,100,114,101,112,108,105,101,115]),new Uint8Array([2,24,4])]}}},setContestMode:{name:"SetContestMode",requestType:SetContestModeRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([23,18,21,47,97,112,105,47,115,101,116,95,99,111,110,116,101,115,116,95,109,111,100,101]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},editCustomPost:{name:"EditCustomPost",requestType:EditCustomPostRequest,requestStream:!1,responseType:JsonRedditObjects,responseStream:!1,options:{}},setSubredditSticky:{name:"SetSubredditSticky",requestType:SetSubredditStickyRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([27,18,25,47,97,112,105,47,115,101,116,95,115,117,98,114,101,100,100,105,116,95,115,116,105,99,107,121]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},setSuggestedSort:{name:"SetSuggestedSort",requestType:SetSuggestedSortRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([25,18,23,47,97,112,105,47,115,101,116,95,115,117,103,103,101,115,116,101,100,95,115,111,114,116]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},spoiler:{name:"Spoiler",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([14,18,12,47,97,112,105,47,115,112,111,105,108,101,114]),new Uint8Array([2,24,4])]}}},submit:{name:"Submit",requestType:SubmitRequest,requestStream:!1,responseType:SubmitResponse,responseStream:!1,options:{}},submitCustomPost:{name:"SubmitCustomPost",requestType:SubmitRequest,requestStream:!1,responseType:SubmitResponse,responseStream:!1,options:{}},unhide:{name:"Unhide",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([13,18,11,47,97,112,105,47,117,110,104,105,100,101]),new Uint8Array([2,24,4])]}}},unlock:{name:"Unlock",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([13,18,11,47,97,112,105,47,117,110,108,111,99,107]),new Uint8Array([2,24,4])]}}},unmarkNSFW:{name:"UnmarkNSFW",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([17,18,15,47,97,112,105,47,117,110,109,97,114,107,110,115,102,119]),new Uint8Array([2,24,4])]}}},unsave:{name:"Unsave",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([13,18,11,47,97,112,105,47,117,110,115,97,118,101]),new Uint8Array([2,24,4])]}}},unspoiler:{name:"Unspoiler",requestType:BasicIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([16,18,14,47,97,112,105,47,117,110,115,112,111,105,108,101,114]),new Uint8Array([2,24,4])]}}},vote:{name:"Vote",requestType:VoteRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([11,18,9,47,97,112,105,47,118,111,116,101]),new Uint8Array([2,24,4])]}}}}};function createBaseGetBestRequest(){return{after:void 0,before:void 0,count:void 0,limit:void 0,show:void 0}}var GetBestRequest={$type:"devvit.plugin.redditapi.listings.GetBestRequest",encode(e82,n=_m0.Writer.create()){return e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetBestRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.show=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$m(e82.after)?String(e82.after):void 0,before:isSet$m(e82.before)?String(e82.before):void 0,count:isSet$m(e82.count)?Number(e82.count):void 0,limit:isSet$m(e82.limit)?Number(e82.limit):void 0,show:isSet$m(e82.show)?String(e82.show):void 0}},toJSON(e82){let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.show!==void 0&&(n.show=e82.show),n},create(e82){return GetBestRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetBestRequest();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.show=e82.show??void 0,n}};messageTypeRegistry.set(GetBestRequest.$type,GetBestRequest);function createBaseGetSortRequest(){return{subreddit:void 0,sort:"",after:void 0,before:void 0,limit:void 0,count:void 0,show:void 0,t:void 0}}var GetSortRequest={$type:"devvit.plugin.redditapi.listings.GetSortRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(10).fork()).ldelim(),e82.sort!==""&&n.uint32(18).string(e82.sort),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(26).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(34).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(42).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(50).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(58).fork()).ldelim(),e82.t!==void 0&&StringValue.encode({value:e82.t},n.uint32(74).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetSortRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.sort=t.string();continue;case 3:if(r!==26)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.show=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.t=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$m(e82.subreddit)?String(e82.subreddit):void 0,sort:isSet$m(e82.sort)?globalThis.String(e82.sort):"",after:isSet$m(e82.after)?String(e82.after):void 0,before:isSet$m(e82.before)?String(e82.before):void 0,limit:isSet$m(e82.limit)?Number(e82.limit):void 0,count:isSet$m(e82.count)?Number(e82.count):void 0,show:isSet$m(e82.show)?String(e82.show):void 0,t:isSet$m(e82.t)?String(e82.t):void 0}},toJSON(e82){let n={};return e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.sort!==""&&(n.sort=e82.sort),e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.limit!==void 0&&(n.limit=e82.limit),e82.count!==void 0&&(n.count=e82.count),e82.show!==void 0&&(n.show=e82.show),e82.t!==void 0&&(n.t=e82.t),n},create(e82){return GetSortRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetSortRequest();return n.subreddit=e82.subreddit??void 0,n.sort=e82.sort??"",n.after=e82.after??void 0,n.before=e82.before??void 0,n.limit=e82.limit??void 0,n.count=e82.count??void 0,n.show=e82.show??void 0,n.t=e82.t??void 0,n}};messageTypeRegistry.set(GetSortRequest.$type,GetSortRequest);function createBaseGetCommentsRequest(){return{article:"",comment:void 0,context:void 0,depth:void 0,limit:void 0,sort:void 0,threaded:void 0,truncate:void 0}}var GetCommentsRequest={$type:"devvit.plugin.redditapi.listings.GetCommentsRequest",encode(e82,n=_m0.Writer.create()){return e82.article!==""&&n.uint32(10).string(e82.article),e82.comment!==void 0&&StringValue.encode({value:e82.comment},n.uint32(18).fork()).ldelim(),e82.context!==void 0&&Int64Value.encode({value:e82.context},n.uint32(26).fork()).ldelim(),e82.depth!==void 0&&Int64Value.encode({value:e82.depth},n.uint32(34).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(42).fork()).ldelim(),e82.sort!==void 0&&StringValue.encode({value:e82.sort},n.uint32(50).fork()).ldelim(),e82.threaded!==void 0&&BoolValue.encode({value:e82.threaded},n.uint32(58).fork()).ldelim(),e82.truncate!==void 0&&Int64Value.encode({value:e82.truncate},n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetCommentsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.article=t.string();continue;case 2:if(r!==18)break;d.comment=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.context=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.depth=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.sort=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.threaded=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.truncate=Int64Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{article:isSet$m(e82.article)?globalThis.String(e82.article):"",comment:isSet$m(e82.comment)?String(e82.comment):void 0,context:isSet$m(e82.context)?Number(e82.context):void 0,depth:isSet$m(e82.depth)?Number(e82.depth):void 0,limit:isSet$m(e82.limit)?Number(e82.limit):void 0,sort:isSet$m(e82.sort)?String(e82.sort):void 0,threaded:isSet$m(e82.threaded)?!!e82.threaded:void 0,truncate:isSet$m(e82.truncate)?Number(e82.truncate):void 0}},toJSON(e82){let n={};return e82.article!==""&&(n.article=e82.article),e82.comment!==void 0&&(n.comment=e82.comment),e82.context!==void 0&&(n.context=e82.context),e82.depth!==void 0&&(n.depth=e82.depth),e82.limit!==void 0&&(n.limit=e82.limit),e82.sort!==void 0&&(n.sort=e82.sort),e82.threaded!==void 0&&(n.threaded=e82.threaded),e82.truncate!==void 0&&(n.truncate=e82.truncate),n},create(e82){return GetCommentsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetCommentsRequest();return n.article=e82.article??"",n.comment=e82.comment??void 0,n.context=e82.context??void 0,n.depth=e82.depth??void 0,n.limit=e82.limit??void 0,n.sort=e82.sort??void 0,n.threaded=e82.threaded??void 0,n.truncate=e82.truncate??void 0,n}};messageTypeRegistry.set(GetCommentsRequest.$type,GetCommentsRequest);function createBaseGetByIdRequest(){return{postIds:""}}var GetByIdRequest={$type:"devvit.plugin.redditapi.listings.GetByIdRequest",encode(e82,n=_m0.Writer.create()){return e82.postIds!==""&&n.uint32(10).string(e82.postIds),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetByIdRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.postIds=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{postIds:isSet$m(e82.postIds)?globalThis.String(e82.postIds):""}},toJSON(e82){let n={};return e82.postIds!==""&&(n.postIds=e82.postIds),n},create(e82){return GetByIdRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetByIdRequest();return n.postIds=e82.postIds??"",n}};messageTypeRegistry.set(GetByIdRequest.$type,GetByIdRequest);function createBaseGetDuplicatesRequest(){return{article:"",before:void 0,after:void 0,limit:void 0,sort:void 0,sr:void 0,count:void 0,crosspostsOnly:void 0,show:void 0}}var GetDuplicatesRequest={$type:"devvit.plugin.redditapi.listings.GetDuplicatesRequest",encode(e82,n=_m0.Writer.create()){return e82.article!==""&&n.uint32(10).string(e82.article),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.sort!==void 0&&StringValue.encode({value:e82.sort},n.uint32(42).fork()).ldelim(),e82.sr!==void 0&&StringValue.encode({value:e82.sr},n.uint32(50).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(58).fork()).ldelim(),e82.crosspostsOnly!==void 0&&BoolValue.encode({value:e82.crosspostsOnly},n.uint32(66).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(74).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetDuplicatesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.article=t.string();continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.sort=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.sr=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.crosspostsOnly=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.show=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{article:isSet$m(e82.article)?globalThis.String(e82.article):"",before:isSet$m(e82.before)?String(e82.before):void 0,after:isSet$m(e82.after)?String(e82.after):void 0,limit:isSet$m(e82.limit)?Number(e82.limit):void 0,sort:isSet$m(e82.sort)?String(e82.sort):void 0,sr:isSet$m(e82.sr)?String(e82.sr):void 0,count:isSet$m(e82.count)?Number(e82.count):void 0,crosspostsOnly:isSet$m(e82.crosspostsOnly)?!!e82.crosspostsOnly:void 0,show:isSet$m(e82.show)?String(e82.show):void 0}},toJSON(e82){let n={};return e82.article!==""&&(n.article=e82.article),e82.before!==void 0&&(n.before=e82.before),e82.after!==void 0&&(n.after=e82.after),e82.limit!==void 0&&(n.limit=e82.limit),e82.sort!==void 0&&(n.sort=e82.sort),e82.sr!==void 0&&(n.sr=e82.sr),e82.count!==void 0&&(n.count=e82.count),e82.crosspostsOnly!==void 0&&(n.crosspostsOnly=e82.crosspostsOnly),e82.show!==void 0&&(n.show=e82.show),n},create(e82){return GetDuplicatesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetDuplicatesRequest();return n.article=e82.article??"",n.before=e82.before??void 0,n.after=e82.after??void 0,n.limit=e82.limit??void 0,n.sort=e82.sort??void 0,n.sr=e82.sr??void 0,n.count=e82.count??void 0,n.crosspostsOnly=e82.crosspostsOnly??void 0,n.show=e82.show??void 0,n}};messageTypeRegistry.set(GetDuplicatesRequest.$type,GetDuplicatesRequest);function createBaseGetHotRequest(){return{subreddit:void 0,before:void 0,after:void 0,limit:void 0,count:void 0,show:void 0,g:void 0}}var GetHotRequest={$type:"devvit.plugin.redditapi.listings.GetHotRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(42).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(50).fork()).ldelim(),e82.g!==void 0&&StringValue.encode({value:e82.g},n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetHotRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.show=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.g=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$m(e82.subreddit)?String(e82.subreddit):void 0,before:isSet$m(e82.before)?String(e82.before):void 0,after:isSet$m(e82.after)?String(e82.after):void 0,limit:isSet$m(e82.limit)?Number(e82.limit):void 0,count:isSet$m(e82.count)?Number(e82.count):void 0,show:isSet$m(e82.show)?String(e82.show):void 0,g:isSet$m(e82.g)?String(e82.g):void 0}},toJSON(e82){let n={};return e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.before!==void 0&&(n.before=e82.before),e82.after!==void 0&&(n.after=e82.after),e82.limit!==void 0&&(n.limit=e82.limit),e82.count!==void 0&&(n.count=e82.count),e82.show!==void 0&&(n.show=e82.show),e82.g!==void 0&&(n.g=e82.g),n},create(e82){return GetHotRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetHotRequest();return n.subreddit=e82.subreddit??void 0,n.before=e82.before??void 0,n.after=e82.after??void 0,n.limit=e82.limit??void 0,n.count=e82.count??void 0,n.show=e82.show??void 0,n.g=e82.g??void 0,n}};messageTypeRegistry.set(GetHotRequest.$type,GetHotRequest);function createBaseGetNewRequest(){return{subreddit:void 0,before:void 0,after:void 0,limit:void 0,count:void 0,show:void 0}}var GetNewRequest={$type:"devvit.plugin.redditapi.listings.GetNewRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(42).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetNewRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.show=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$m(e82.subreddit)?String(e82.subreddit):void 0,before:isSet$m(e82.before)?String(e82.before):void 0,after:isSet$m(e82.after)?String(e82.after):void 0,limit:isSet$m(e82.limit)?Number(e82.limit):void 0,count:isSet$m(e82.count)?Number(e82.count):void 0,show:isSet$m(e82.show)?String(e82.show):void 0}},toJSON(e82){let n={};return e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.before!==void 0&&(n.before=e82.before),e82.after!==void 0&&(n.after=e82.after),e82.limit!==void 0&&(n.limit=e82.limit),e82.count!==void 0&&(n.count=e82.count),e82.show!==void 0&&(n.show=e82.show),n},create(e82){return GetNewRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetNewRequest();return n.subreddit=e82.subreddit??void 0,n.before=e82.before??void 0,n.after=e82.after??void 0,n.limit=e82.limit??void 0,n.count=e82.count??void 0,n.show=e82.show??void 0,n}};messageTypeRegistry.set(GetNewRequest.$type,GetNewRequest);function createBaseGetRisingRequest(){return{subreddit:void 0,after:void 0,before:void 0,count:void 0,limit:void 0,show:void 0}}var GetRisingRequest={$type:"devvit.plugin.redditapi.listings.GetRisingRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(10).fork()).ldelim(),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(18).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(26).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(34).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(42).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetRisingRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.show=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$m(e82.subreddit)?String(e82.subreddit):void 0,after:isSet$m(e82.after)?String(e82.after):void 0,before:isSet$m(e82.before)?String(e82.before):void 0,count:isSet$m(e82.count)?Number(e82.count):void 0,limit:isSet$m(e82.limit)?Number(e82.limit):void 0,show:isSet$m(e82.show)?String(e82.show):void 0}},toJSON(e82){let n={};return e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.show!==void 0&&(n.show=e82.show),n},create(e82){return GetRisingRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetRisingRequest();return n.subreddit=e82.subreddit??void 0,n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.show=e82.show??void 0,n}};messageTypeRegistry.set(GetRisingRequest.$type,GetRisingRequest);function createBaseListingResponse(){return{listings:[]}}var ListingResponse={$type:"devvit.plugin.redditapi.listings.ListingResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.listings)Listing.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseListingResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.listings.push(Listing.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{listings:globalThis.Array.isArray(e82?.listings)?e82.listings.map(n=>Listing.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.listings)!=null&&t.length&&(n.listings=e82.listings.map(o=>Listing.toJSON(o))),n},create(e82){return ListingResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseListingResponse();return n.listings=((t=e82.listings)==null?void 0:t.map(o=>Listing.fromPartial(o)))||[],n}};messageTypeRegistry.set(ListingResponse.$type,ListingResponse);function isSet$m(e82){return e82!=null}var ListingsDefinition={name:"Listings",fullName:"devvit.plugin.redditapi.listings.Listings",methods:{best:{name:"Best",requestType:GetBestRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([82,18,80,47,98,101,115,116,46,106,115,111,110,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125])]}}},byId:{name:"ById",requestType:GetByIdRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([24,18,22,47,98,121,95,105,100,47,123,112,111,115,116,95,105,100,115,125,46,106,115,111,110])]}}},comments:{name:"Comments",requestType:GetCommentsRequest,requestStream:!1,responseType:ListingResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([143,1,18,140,1,47,99,111,109,109,101,110,116,115,47,123,97,114,116,105,99,108,101,125,46,106,115,111,110,63,99,111,109,109,101,110,116,61,123,99,111,109,109,101,110,116,125,38,99,111,110,116,101,120,116,61,123,99,111,110,116,101,120,116,125,38,100,101,112,116,104,61,123,100,101,112,116,104,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,111,114,116,61,123,115,111,114,116,125,38,116,104,114,101,97,100,101,100,61,123,116,104,114,101,97,100,101,100,125,38,116,114,117,110,99,97,116,101,61,123,116,114,117,110,99,97,116,101,125]),new Uint8Array([2,64,1])]}}},duplicates:{name:"Duplicates",requestType:GetDuplicatesRequest,requestStream:!1,responseType:ListingResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([153,1,18,150,1,47,100,117,112,108,105,99,97,116,101,115,47,123,97,114,116,105,99,108,101,125,46,106,115,111,110,63,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,97,102,116,101,114,61,123,97,102,116,101,114,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,111,114,116,61,123,115,111,114,116,125,38,115,114,61,123,115,114,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,99,114,111,115,115,112,111,115,116,115,95,111,110,108,121,61,123,99,114,111,115,115,112,111,115,116,115,95,111,110,108,121,125,38,115,104,111,119,61,123,115,104,111,119,125]),new Uint8Array([2,64,1])]}}},hot:{name:"Hot",requestType:GetHotRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([101,18,99,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,104,111,116,46,106,115,111,110,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,103,61,123,103,125])]}}},new:{name:"New",requestType:GetNewRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([95,18,93,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,110,101,119,46,106,115,111,110,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125])]}}},rising:{name:"Rising",requestType:GetRisingRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([98,18,96,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,114,105,115,105,110,103,46,106,115,111,110,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125])]}}},sort:{name:"Sort",requestType:GetSortRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([104,18,102,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,123,115,111,114,116,125,46,106,115,111,110,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,116,61,123,116,125])]}}}}};function createBaseAboutLogRequest(){return{after:void 0,before:void 0,count:void 0,limit:void 0,show:void 0,mod:void 0,type:void 0,subreddit:void 0}}var AboutLogRequest={$type:"devvit.plugin.redditapi.moderation.AboutLogRequest",encode(e82,n=_m0.Writer.create()){return e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(42).fork()).ldelim(),e82.mod!==void 0&&StringValue.encode({value:e82.mod},n.uint32(50).fork()).ldelim(),e82.type!==void 0&&StringValue.encode({value:e82.type},n.uint32(66).fork()).ldelim(),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(74).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAboutLogRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.show=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.mod=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.type=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$l(e82.after)?String(e82.after):void 0,before:isSet$l(e82.before)?String(e82.before):void 0,count:isSet$l(e82.count)?Number(e82.count):void 0,limit:isSet$l(e82.limit)?Number(e82.limit):void 0,show:isSet$l(e82.show)?String(e82.show):void 0,mod:isSet$l(e82.mod)?String(e82.mod):void 0,type:isSet$l(e82.type)?String(e82.type):void 0,subreddit:isSet$l(e82.subreddit)?String(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.show!==void 0&&(n.show=e82.show),e82.mod!==void 0&&(n.mod=e82.mod),e82.type!==void 0&&(n.type=e82.type),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),n},create(e82){return AboutLogRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAboutLogRequest();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.show=e82.show??void 0,n.mod=e82.mod??void 0,n.type=e82.type??void 0,n.subreddit=e82.subreddit??void 0,n}};messageTypeRegistry.set(AboutLogRequest.$type,AboutLogRequest);function createBaseAboutLocationRequest(){return{after:void 0,before:void 0,count:void 0,limit:void 0,location:"",only:void 0,show:void 0,subreddit:""}}var AboutLocationRequest={$type:"devvit.plugin.redditapi.moderation.AboutLocationRequest",encode(e82,n=_m0.Writer.create()){return e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.location!==""&&n.uint32(42).string(e82.location),e82.only!==void 0&&StringValue.encode({value:e82.only},n.uint32(50).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(58).fork()).ldelim(),e82.subreddit!==""&&n.uint32(66).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAboutLocationRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.location=t.string();continue;case 6:if(r!==50)break;d.only=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.show=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$l(e82.after)?String(e82.after):void 0,before:isSet$l(e82.before)?String(e82.before):void 0,count:isSet$l(e82.count)?Number(e82.count):void 0,limit:isSet$l(e82.limit)?Number(e82.limit):void 0,location:isSet$l(e82.location)?globalThis.String(e82.location):"",only:isSet$l(e82.only)?String(e82.only):void 0,show:isSet$l(e82.show)?String(e82.show):void 0,subreddit:isSet$l(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.location!==""&&(n.location=e82.location),e82.only!==void 0&&(n.only=e82.only),e82.show!==void 0&&(n.show=e82.show),e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return AboutLocationRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAboutLocationRequest();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.location=e82.location??"",n.only=e82.only??void 0,n.show=e82.show??void 0,n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(AboutLocationRequest.$type,AboutLocationRequest);function createBaseAcceptModeratorInviteRequest(){return{subreddit:""}}var AcceptModeratorInviteRequest={$type:"devvit.plugin.redditapi.moderation.AcceptModeratorInviteRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAcceptModeratorInviteRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$l(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return AcceptModeratorInviteRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAcceptModeratorInviteRequest();return n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(AcceptModeratorInviteRequest.$type,AcceptModeratorInviteRequest);function createBaseBasicModerationIdRequest(){return{id:""}}var BasicModerationIdRequest={$type:"devvit.plugin.redditapi.moderation.BasicModerationIdRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBasicModerationIdRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$l(e82.id)?globalThis.String(e82.id):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),n},create(e82){return BasicModerationIdRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBasicModerationIdRequest();return n.id=e82.id??"",n}};messageTypeRegistry.set(BasicModerationIdRequest.$type,BasicModerationIdRequest);function createBaseDistinguishRequest(){return{how:"",id:"",sticky:!1}}var DistinguishRequest={$type:"devvit.plugin.redditapi.moderation.DistinguishRequest",encode(e82,n=_m0.Writer.create()){return e82.how!==""&&n.uint32(10).string(e82.how),e82.id!==""&&n.uint32(18).string(e82.id),e82.sticky!==!1&&n.uint32(24).bool(e82.sticky),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDistinguishRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.how=t.string();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==24)break;d.sticky=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{how:isSet$l(e82.how)?globalThis.String(e82.how):"",id:isSet$l(e82.id)?globalThis.String(e82.id):"",sticky:isSet$l(e82.sticky)?globalThis.Boolean(e82.sticky):!1}},toJSON(e82){let n={};return e82.how!==""&&(n.how=e82.how),e82.id!==""&&(n.id=e82.id),e82.sticky!==!1&&(n.sticky=e82.sticky),n},create(e82){return DistinguishRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDistinguishRequest();return n.how=e82.how??"",n.id=e82.id??"",n.sticky=e82.sticky??!1,n}};messageTypeRegistry.set(DistinguishRequest.$type,DistinguishRequest);function createBaseRemoveRequest(){return{id:"",spam:!1}}var RemoveRequest={$type:"devvit.plugin.redditapi.moderation.RemoveRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.spam!==!1&&n.uint32(16).bool(e82.spam),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRemoveRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==16)break;d.spam=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$l(e82.id)?globalThis.String(e82.id):"",spam:isSet$l(e82.spam)?globalThis.Boolean(e82.spam):!1}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.spam!==!1&&(n.spam=e82.spam),n},create(e82){return RemoveRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRemoveRequest();return n.id=e82.id??"",n.spam=e82.spam??!1,n}};messageTypeRegistry.set(RemoveRequest.$type,RemoveRequest);function createBaseSnoozeReportsRequest(){return{id:"",reason:""}}var SnoozeReportsRequest={$type:"devvit.plugin.redditapi.moderation.SnoozeReportsRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.reason!==""&&n.uint32(18).string(e82.reason),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSnoozeReportsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.reason=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$l(e82.id)?globalThis.String(e82.id):"",reason:isSet$l(e82.reason)?globalThis.String(e82.reason):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.reason!==""&&(n.reason=e82.reason),n},create(e82){return SnoozeReportsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSnoozeReportsRequest();return n.id=e82.id??"",n.reason=e82.reason??"",n}};messageTypeRegistry.set(SnoozeReportsRequest.$type,SnoozeReportsRequest);function createBaseUpdateCrowdControlLevelRequest(){return{id:"",level:0}}var UpdateCrowdControlLevelRequest={$type:"devvit.plugin.redditapi.moderation.UpdateCrowdControlLevelRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.level!==0&&n.uint32(16).int32(e82.level),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateCrowdControlLevelRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==16)break;d.level=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$l(e82.id)?globalThis.String(e82.id):"",level:isSet$l(e82.level)?globalThis.Number(e82.level):0}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.level!==0&&(n.level=Math.round(e82.level)),n},create(e82){return UpdateCrowdControlLevelRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUpdateCrowdControlLevelRequest();return n.id=e82.id??"",n.level=e82.level??0,n}};messageTypeRegistry.set(UpdateCrowdControlLevelRequest.$type,UpdateCrowdControlLevelRequest);function createBaseStylesheetRequest(){return{subreddit:""}}var StylesheetRequest={$type:"devvit.plugin.redditapi.moderation.StylesheetRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStylesheetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$l(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return StylesheetRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseStylesheetRequest();return n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(StylesheetRequest.$type,StylesheetRequest);function createBaseAboutLogResponse(){return{kind:"",data:void 0}}var AboutLogResponse={$type:"devvit.plugin.redditapi.moderation.AboutLogResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&AboutLogResponse_AboutLogListing.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAboutLogResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=AboutLogResponse_AboutLogListing.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$l(e82.kind)?globalThis.String(e82.kind):"",data:isSet$l(e82.data)?AboutLogResponse_AboutLogListing.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=AboutLogResponse_AboutLogListing.toJSON(e82.data)),n},create(e82){return AboutLogResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAboutLogResponse();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?AboutLogResponse_AboutLogListing.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(AboutLogResponse.$type,AboutLogResponse);function createBaseAboutLogResponse_LogObject(){return{description:void 0,targetBody:void 0,modId36:void 0,createdUtc:void 0,subreddit:void 0,targetTitle:void 0,targetPermalink:void 0,subredditNamePrefixed:void 0,details:void 0,action:void 0,targetAuthor:void 0,targetFullname:void 0,srId36:void 0,id:void 0,mod:void 0}}var AboutLogResponse_LogObject={$type:"devvit.plugin.redditapi.moderation.AboutLogResponse.LogObject",encode(e82,n=_m0.Writer.create()){return e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(10).fork()).ldelim(),e82.targetBody!==void 0&&StringValue.encode({value:e82.targetBody},n.uint32(18).fork()).ldelim(),e82.modId36!==void 0&&StringValue.encode({value:e82.modId36},n.uint32(26).fork()).ldelim(),e82.createdUtc!==void 0&&Int64Value.encode({value:e82.createdUtc},n.uint32(34).fork()).ldelim(),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(42).fork()).ldelim(),e82.targetTitle!==void 0&&StringValue.encode({value:e82.targetTitle},n.uint32(50).fork()).ldelim(),e82.targetPermalink!==void 0&&StringValue.encode({value:e82.targetPermalink},n.uint32(58).fork()).ldelim(),e82.subredditNamePrefixed!==void 0&&StringValue.encode({value:e82.subredditNamePrefixed},n.uint32(66).fork()).ldelim(),e82.details!==void 0&&StringValue.encode({value:e82.details},n.uint32(74).fork()).ldelim(),e82.action!==void 0&&StringValue.encode({value:e82.action},n.uint32(82).fork()).ldelim(),e82.targetAuthor!==void 0&&StringValue.encode({value:e82.targetAuthor},n.uint32(90).fork()).ldelim(),e82.targetFullname!==void 0&&StringValue.encode({value:e82.targetFullname},n.uint32(98).fork()).ldelim(),e82.srId36!==void 0&&StringValue.encode({value:e82.srId36},n.uint32(106).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(114).fork()).ldelim(),e82.mod!==void 0&&StringValue.encode({value:e82.mod},n.uint32(122).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAboutLogResponse_LogObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.targetBody=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.modId36=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.createdUtc=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.targetTitle=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.targetPermalink=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.subredditNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.details=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.action=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.targetAuthor=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.targetFullname=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.srId36=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.mod=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{description:isSet$l(e82.description)?String(e82.description):void 0,targetBody:isSet$l(e82.targetBody)?String(e82.targetBody):void 0,modId36:isSet$l(e82.modId36)?String(e82.modId36):void 0,createdUtc:isSet$l(e82.createdUtc)?Number(e82.createdUtc):void 0,subreddit:isSet$l(e82.subreddit)?String(e82.subreddit):void 0,targetTitle:isSet$l(e82.targetTitle)?String(e82.targetTitle):void 0,targetPermalink:isSet$l(e82.targetPermalink)?String(e82.targetPermalink):void 0,subredditNamePrefixed:isSet$l(e82.subredditNamePrefixed)?String(e82.subredditNamePrefixed):void 0,details:isSet$l(e82.details)?String(e82.details):void 0,action:isSet$l(e82.action)?String(e82.action):void 0,targetAuthor:isSet$l(e82.targetAuthor)?String(e82.targetAuthor):void 0,targetFullname:isSet$l(e82.targetFullname)?String(e82.targetFullname):void 0,srId36:isSet$l(e82.srId36)?String(e82.srId36):void 0,id:isSet$l(e82.id)?String(e82.id):void 0,mod:isSet$l(e82.mod)?String(e82.mod):void 0}},toJSON(e82){let n={};return e82.description!==void 0&&(n.description=e82.description),e82.targetBody!==void 0&&(n.targetBody=e82.targetBody),e82.modId36!==void 0&&(n.modId36=e82.modId36),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.targetTitle!==void 0&&(n.targetTitle=e82.targetTitle),e82.targetPermalink!==void 0&&(n.targetPermalink=e82.targetPermalink),e82.subredditNamePrefixed!==void 0&&(n.subredditNamePrefixed=e82.subredditNamePrefixed),e82.details!==void 0&&(n.details=e82.details),e82.action!==void 0&&(n.action=e82.action),e82.targetAuthor!==void 0&&(n.targetAuthor=e82.targetAuthor),e82.targetFullname!==void 0&&(n.targetFullname=e82.targetFullname),e82.srId36!==void 0&&(n.srId36=e82.srId36),e82.id!==void 0&&(n.id=e82.id),e82.mod!==void 0&&(n.mod=e82.mod),n},create(e82){return AboutLogResponse_LogObject.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAboutLogResponse_LogObject();return n.description=e82.description??void 0,n.targetBody=e82.targetBody??void 0,n.modId36=e82.modId36??void 0,n.createdUtc=e82.createdUtc??void 0,n.subreddit=e82.subreddit??void 0,n.targetTitle=e82.targetTitle??void 0,n.targetPermalink=e82.targetPermalink??void 0,n.subredditNamePrefixed=e82.subredditNamePrefixed??void 0,n.details=e82.details??void 0,n.action=e82.action??void 0,n.targetAuthor=e82.targetAuthor??void 0,n.targetFullname=e82.targetFullname??void 0,n.srId36=e82.srId36??void 0,n.id=e82.id??void 0,n.mod=e82.mod??void 0,n}};messageTypeRegistry.set(AboutLogResponse_LogObject.$type,AboutLogResponse_LogObject);function createBaseAboutLogResponse_AboutLogListing(){return{after:void 0,before:void 0,children:[],dist:void 0}}var AboutLogResponse_AboutLogListing={$type:"devvit.plugin.redditapi.moderation.AboutLogResponse.AboutLogListing",encode(e82,n=_m0.Writer.create()){e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim();for(let t of e82.children)AboutLogResponse_AboutLogListing_WrappedLogObject.encode(t,n.uint32(26).fork()).ldelim();return e82.dist!==void 0&&Int32Value.encode({value:e82.dist},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAboutLogResponse_AboutLogListing();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.children.push(AboutLogResponse_AboutLogListing_WrappedLogObject.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.dist=Int32Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$l(e82.after)?String(e82.after):void 0,before:isSet$l(e82.before)?String(e82.before):void 0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>AboutLogResponse_AboutLogListing_WrappedLogObject.fromJSON(n)):[],dist:isSet$l(e82.dist)?Number(e82.dist):void 0}},toJSON(e82){var t;let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>AboutLogResponse_AboutLogListing_WrappedLogObject.toJSON(o))),e82.dist!==void 0&&(n.dist=e82.dist),n},create(e82){return AboutLogResponse_AboutLogListing.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseAboutLogResponse_AboutLogListing();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.children=((t=e82.children)==null?void 0:t.map(o=>AboutLogResponse_AboutLogListing_WrappedLogObject.fromPartial(o)))||[],n.dist=e82.dist??void 0,n}};messageTypeRegistry.set(AboutLogResponse_AboutLogListing.$type,AboutLogResponse_AboutLogListing);function createBaseAboutLogResponse_AboutLogListing_WrappedLogObject(){return{kind:"",data:void 0}}var AboutLogResponse_AboutLogListing_WrappedLogObject={$type:"devvit.plugin.redditapi.moderation.AboutLogResponse.AboutLogListing.WrappedLogObject",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&AboutLogResponse_LogObject.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAboutLogResponse_AboutLogListing_WrappedLogObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=AboutLogResponse_LogObject.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$l(e82.kind)?globalThis.String(e82.kind):"",data:isSet$l(e82.data)?AboutLogResponse_LogObject.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=AboutLogResponse_LogObject.toJSON(e82.data)),n},create(e82){return AboutLogResponse_AboutLogListing_WrappedLogObject.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAboutLogResponse_AboutLogListing_WrappedLogObject();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?AboutLogResponse_LogObject.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(AboutLogResponse_AboutLogListing_WrappedLogObject.$type,AboutLogResponse_AboutLogListing_WrappedLogObject);function isSet$l(e82){return e82!=null}var ModerationDefinition={name:"Moderation",fullName:"devvit.plugin.redditapi.moderation.Moderation",methods:{aboutLog:{name:"AboutLog",requestType:AboutLogRequest,requestStream:!1,responseType:AboutLogResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([118,18,116,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,108,111,103,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,109,111,100,61,123,109,111,100,125,38,116,121,112,101,61,123,116,121,112,101,125]),new Uint8Array([11,58,9,115,117,98,114,101,100,100,105,116])]}}},aboutLocation:{name:"AboutLocation",requestType:AboutLocationRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([115,18,113,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,123,108,111,99,97,116,105,111,110,125,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,111,110,108,121,61,123,111,110,108,121,125]),new Uint8Array([11,58,9,115,117,98,114,101,100,100,105,116])]}}},aboutReports:{name:"AboutReports",requestType:AboutLocationRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([112,18,110,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,114,101,112,111,114,116,115,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,111,110,108,121,61,123,111,110,108,121,125]),new Uint8Array([11,58,9,115,117,98,114,101,100,100,105,116])]}}},aboutSpam:{name:"AboutSpam",requestType:AboutLocationRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([109,18,107,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,115,112,97,109,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,111,110,108,121,61,123,111,110,108,121,125]),new Uint8Array([11,58,9,115,117,98,114,101,100,100,105,116])]}}},aboutModqueue:{name:"AboutModqueue",requestType:AboutLocationRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([113,18,111,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,109,111,100,113,117,101,117,101,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,111,110,108,121,61,123,111,110,108,121,125]),new Uint8Array([11,58,9,115,117,98,114,101,100,100,105,116])]}}},aboutUnmoderated:{name:"AboutUnmoderated",requestType:AboutLocationRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([116,18,114,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,117,110,109,111,100,101,114,97,116,101,100,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,111,110,108,121,61,123,111,110,108,121,125]),new Uint8Array([11,58,9,115,117,98,114,101,100,100,105,116])]}}},aboutEdited:{name:"AboutEdited",requestType:AboutLocationRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([111,18,109,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,101,100,105,116,101,100,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,111,110,108,121,61,123,111,110,108,121,125]),new Uint8Array([11,58,9,115,117,98,114,101,100,100,105,116])]}}},acceptModeratorInvite:{name:"AcceptModeratorInvite",requestType:AcceptModeratorInviteRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([44,18,42,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,97,99,99,101,112,116,95,109,111,100,101,114,97,116,111,114,95,105,110,118,105,116,101]),new Uint8Array([11,58,9,115,117,98,114,101,100,100,105,116])]}}},approve:{name:"Approve",requestType:BasicModerationIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([14,18,12,47,97,112,105,47,97,112,112,114,111,118,101]),new Uint8Array([2,24,3]),new Uint8Array([4,50,2,105,100])]}}},distinguish:{name:"Distinguish",requestType:DistinguishRequest,requestStream:!1,responseType:JsonRedditObjects,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([18,18,16,47,97,112,105,47,100,105,115,116,105,110,103,117,105,115,104]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1]),new Uint8Array([4,50,2,105,100])]}}},ignoreReports:{name:"IgnoreReports",requestType:BasicModerationIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([21,18,19,47,97,112,105,47,105,103,110,111,114,101,95,114,101,112,111,114,116,115]),new Uint8Array([2,24,3]),new Uint8Array([4,50,2,105,100])]}}},leaveContributor:{name:"LeaveContributor",requestType:BasicModerationIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([23,18,21,47,97,112,105,47,108,101,97,118,101,99,111,110,116,114,105,98,117,116,111,114]),new Uint8Array([2,24,3])]}}},leaveModerator:{name:"LeaveModerator",requestType:BasicModerationIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([21,18,19,47,97,112,105,47,108,101,97,118,101,109,111,100,101,114,97,116,111,114]),new Uint8Array([2,24,3])]}}},muteMessageAuthor:{name:"MuteMessageAuthor",requestType:BasicModerationIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([26,18,24,47,97,112,105,47,109,117,116,101,95,109,101,115,115,97,103,101,95,97,117,116,104,111,114]),new Uint8Array([2,24,3])]}}},remove:{name:"Remove",requestType:RemoveRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([13,18,11,47,97,112,105,47,114,101,109,111,118,101]),new Uint8Array([2,24,3]),new Uint8Array([4,50,2,105,100])]}}},showComment:{name:"ShowComment",requestType:BasicModerationIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([19,18,17,47,97,112,105,47,115,104,111,119,95,99,111,109,109,101,110,116]),new Uint8Array([2,24,3]),new Uint8Array([4,50,2,105,100])]}}},snoozeReports:{name:"SnoozeReports",requestType:SnoozeReportsRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([21,18,19,47,97,112,105,47,115,110,111,111,122,101,95,114,101,112,111,114,116,115]),new Uint8Array([2,24,3]),new Uint8Array([4,50,2,105,100])]}}},unignoreReports:{name:"UnignoreReports",requestType:BasicModerationIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([23,18,21,47,97,112,105,47,117,110,105,103,110,111,114,101,95,114,101,112,111,114,116,115]),new Uint8Array([2,24,3]),new Uint8Array([4,50,2,105,100])]}}},unmuteMessageAuthor:{name:"UnmuteMessageAuthor",requestType:BasicModerationIdRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([28,18,26,47,97,112,105,47,117,110,109,117,116,101,95,109,101,115,115,97,103,101,95,97,117,116,104,111,114]),new Uint8Array([2,24,3])]}}},unsnoozeReports:{name:"UnsnoozeReports",requestType:SnoozeReportsRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([23,18,21,47,97,112,105,47,117,110,115,110,111,111,122,101,95,114,101,112,111,114,116,115]),new Uint8Array([2,24,3]),new Uint8Array([4,50,2,105,100])]}}},updateCrowdControlLevel:{name:"UpdateCrowdControlLevel",requestType:UpdateCrowdControlLevelRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([33,18,31,47,97,112,105,47,117,112,100,97,116,101,95,99,114,111,119,100,95,99,111,110,116,114,111,108,95,108,101,118,101,108]),new Uint8Array([2,24,3]),new Uint8Array([4,50,2,105,100])]}}},stylesheet:{name:"Stylesheet",requestType:StylesheetRequest,requestStream:!1,responseType:StringValue,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,115,116,121,108,101,115,104,101,101,116]),new Uint8Array([2,64,1])]}}}}};function createBaseDeleteNotesRequest(){return{subreddit:"",noteId:"",user:""}}var DeleteNotesRequest={$type:"devvit.plugin.redditapi.modnote.DeleteNotesRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.noteId!==""&&n.uint32(18).string(e82.noteId),e82.user!==""&&n.uint32(26).string(e82.user),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDeleteNotesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.noteId=t.string();continue;case 3:if(r!==26)break;d.user=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$k(e82.subreddit)?globalThis.String(e82.subreddit):"",noteId:isSet$k(e82.noteId)?globalThis.String(e82.noteId):"",user:isSet$k(e82.user)?globalThis.String(e82.user):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.noteId!==""&&(n.noteId=e82.noteId),e82.user!==""&&(n.user=e82.user),n},create(e82){return DeleteNotesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDeleteNotesRequest();return n.subreddit=e82.subreddit??"",n.noteId=e82.noteId??"",n.user=e82.user??"",n}};messageTypeRegistry.set(DeleteNotesRequest.$type,DeleteNotesRequest);function createBaseGetNotesRequest(){return{subreddit:"",before:void 0,filter:void 0,limit:void 0,user:""}}var GetNotesRequest={$type:"devvit.plugin.redditapi.modnote.GetNotesRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.filter!==void 0&&StringValue.encode({value:e82.filter},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.user!==""&&n.uint32(42).string(e82.user),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetNotesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.filter=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.user=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$k(e82.subreddit)?globalThis.String(e82.subreddit):"",before:isSet$k(e82.before)?String(e82.before):void 0,filter:isSet$k(e82.filter)?String(e82.filter):void 0,limit:isSet$k(e82.limit)?Number(e82.limit):void 0,user:isSet$k(e82.user)?globalThis.String(e82.user):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.before!==void 0&&(n.before=e82.before),e82.filter!==void 0&&(n.filter=e82.filter),e82.limit!==void 0&&(n.limit=e82.limit),e82.user!==""&&(n.user=e82.user),n},create(e82){return GetNotesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetNotesRequest();return n.subreddit=e82.subreddit??"",n.before=e82.before??void 0,n.filter=e82.filter??void 0,n.limit=e82.limit??void 0,n.user=e82.user??"",n}};messageTypeRegistry.set(GetNotesRequest.$type,GetNotesRequest);function createBasePostNotesRequest(){return{subreddit:"",label:void 0,note:"",redditId:void 0,user:""}}var PostNotesRequest={$type:"devvit.plugin.redditapi.modnote.PostNotesRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.label!==void 0&&n.uint32(18).string(e82.label),e82.note!==""&&n.uint32(26).string(e82.note),e82.redditId!==void 0&&StringValue.encode({value:e82.redditId},n.uint32(34).fork()).ldelim(),e82.user!==""&&n.uint32(42).string(e82.user),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostNotesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.label=t.string();continue;case 3:if(r!==26)break;d.note=t.string();continue;case 4:if(r!==34)break;d.redditId=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.user=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$k(e82.subreddit)?globalThis.String(e82.subreddit):"",label:isSet$k(e82.label)?globalThis.String(e82.label):void 0,note:isSet$k(e82.note)?globalThis.String(e82.note):"",redditId:isSet$k(e82.redditId)?String(e82.redditId):void 0,user:isSet$k(e82.user)?globalThis.String(e82.user):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.label!==void 0&&(n.label=e82.label),e82.note!==""&&(n.note=e82.note),e82.redditId!==void 0&&(n.redditId=e82.redditId),e82.user!==""&&(n.user=e82.user),n},create(e82){return PostNotesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostNotesRequest();return n.subreddit=e82.subreddit??"",n.label=e82.label??void 0,n.note=e82.note??"",n.redditId=e82.redditId??void 0,n.user=e82.user??"",n}};messageTypeRegistry.set(PostNotesRequest.$type,PostNotesRequest);function createBaseRecentNotesRequest(){return{subreddits:"",users:""}}var RecentNotesRequest={$type:"devvit.plugin.redditapi.modnote.RecentNotesRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddits!==""&&n.uint32(10).string(e82.subreddits),e82.users!==""&&n.uint32(18).string(e82.users),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRecentNotesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddits=t.string();continue;case 2:if(r!==18)break;d.users=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddits:isSet$k(e82.subreddits)?globalThis.String(e82.subreddits):"",users:isSet$k(e82.users)?globalThis.String(e82.users):""}},toJSON(e82){let n={};return e82.subreddits!==""&&(n.subreddits=e82.subreddits),e82.users!==""&&(n.users=e82.users),n},create(e82){return RecentNotesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRecentNotesRequest();return n.subreddits=e82.subreddits??"",n.users=e82.users??"",n}};messageTypeRegistry.set(RecentNotesRequest.$type,RecentNotesRequest);function createBasePostRemovalNoteRequest(){return{itemIds:[],reasonId:"",modNote:void 0}}var PostRemovalNoteRequest={$type:"devvit.plugin.redditapi.modnote.PostRemovalNoteRequest",encode(e82,n=_m0.Writer.create()){for(let t of e82.itemIds)n.uint32(10).string(t);return e82.reasonId!==""&&n.uint32(18).string(e82.reasonId),e82.modNote!==void 0&&StringValue.encode({value:e82.modNote},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostRemovalNoteRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.itemIds.push(t.string());continue;case 2:if(r!==18)break;d.reasonId=t.string();continue;case 3:if(r!==26)break;d.modNote=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{itemIds:globalThis.Array.isArray(e82?.itemIds)?e82.itemIds.map(n=>globalThis.String(n)):[],reasonId:isSet$k(e82.reasonId)?globalThis.String(e82.reasonId):"",modNote:isSet$k(e82.modNote)?String(e82.modNote):void 0}},toJSON(e82){var t;let n={};return(t=e82.itemIds)!=null&&t.length&&(n.itemIds=e82.itemIds),e82.reasonId!==""&&(n.reasonId=e82.reasonId),e82.modNote!==void 0&&(n.modNote=e82.modNote),n},create(e82){return PostRemovalNoteRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBasePostRemovalNoteRequest();return n.itemIds=((t=e82.itemIds)==null?void 0:t.map(o=>o))||[],n.reasonId=e82.reasonId??"",n.modNote=e82.modNote??void 0,n}};messageTypeRegistry.set(PostRemovalNoteRequest.$type,PostRemovalNoteRequest);function createBaseModNotesResponse(){return{modNotes:[],startCursor:void 0,endCursor:void 0,hasNextPage:void 0}}var ModNotesResponse={$type:"devvit.plugin.redditapi.modnote.ModNotesResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.modNotes)ModNoteObject.encode(t,n.uint32(10).fork()).ldelim();return e82.startCursor!==void 0&&StringValue.encode({value:e82.startCursor},n.uint32(18).fork()).ldelim(),e82.endCursor!==void 0&&StringValue.encode({value:e82.endCursor},n.uint32(26).fork()).ldelim(),e82.hasNextPage!==void 0&&BoolValue.encode({value:e82.hasNextPage},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModNotesResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.modNotes.push(ModNoteObject.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.startCursor=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.endCursor=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.hasNextPage=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{modNotes:globalThis.Array.isArray(e82?.modNotes)?e82.modNotes.map(n=>ModNoteObject.fromJSON(n)):[],startCursor:isSet$k(e82.startCursor)?String(e82.startCursor):void 0,endCursor:isSet$k(e82.endCursor)?String(e82.endCursor):void 0,hasNextPage:isSet$k(e82.hasNextPage)?!!e82.hasNextPage:void 0}},toJSON(e82){var t;let n={};return(t=e82.modNotes)!=null&&t.length&&(n.modNotes=e82.modNotes.map(o=>ModNoteObject.toJSON(o))),e82.startCursor!==void 0&&(n.startCursor=e82.startCursor),e82.endCursor!==void 0&&(n.endCursor=e82.endCursor),e82.hasNextPage!==void 0&&(n.hasNextPage=e82.hasNextPage),n},create(e82){return ModNotesResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseModNotesResponse();return n.modNotes=((t=e82.modNotes)==null?void 0:t.map(o=>ModNoteObject.fromPartial(o)))||[],n.startCursor=e82.startCursor??void 0,n.endCursor=e82.endCursor??void 0,n.hasNextPage=e82.hasNextPage??void 0,n}};messageTypeRegistry.set(ModNotesResponse.$type,ModNotesResponse);function createBaseDeleteNotesResponse(){return{deleted:void 0}}var DeleteNotesResponse={$type:"devvit.plugin.redditapi.modnote.DeleteNotesResponse",encode(e82,n=_m0.Writer.create()){return e82.deleted!==void 0&&BoolValue.encode({value:e82.deleted},n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDeleteNotesResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.deleted=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{deleted:isSet$k(e82.deleted)?!!e82.deleted:void 0}},toJSON(e82){let n={};return e82.deleted!==void 0&&(n.deleted=e82.deleted),n},create(e82){return DeleteNotesResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDeleteNotesResponse();return n.deleted=e82.deleted??void 0,n}};messageTypeRegistry.set(DeleteNotesResponse.$type,DeleteNotesResponse);function createBaseModNoteObject(){return{subredditId:void 0,operatorId:void 0,modActionData:void 0,userNoteData:void 0,subreddit:void 0,user:void 0,operator:void 0,id:void 0,userId:void 0,createdAt:void 0,cursor:void 0,type:void 0}}var ModNoteObject={$type:"devvit.plugin.redditapi.modnote.ModNoteObject",encode(e82,n=_m0.Writer.create()){return e82.subredditId!==void 0&&StringValue.encode({value:e82.subredditId},n.uint32(10).fork()).ldelim(),e82.operatorId!==void 0&&StringValue.encode({value:e82.operatorId},n.uint32(18).fork()).ldelim(),e82.modActionData!==void 0&&ModNoteObject_ModActionData.encode(e82.modActionData,n.uint32(26).fork()).ldelim(),e82.userNoteData!==void 0&&ModNoteObject_UserNoteData.encode(e82.userNoteData,n.uint32(34).fork()).ldelim(),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(42).fork()).ldelim(),e82.user!==void 0&&StringValue.encode({value:e82.user},n.uint32(50).fork()).ldelim(),e82.operator!==void 0&&StringValue.encode({value:e82.operator},n.uint32(58).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(66).fork()).ldelim(),e82.userId!==void 0&&StringValue.encode({value:e82.userId},n.uint32(74).fork()).ldelim(),e82.createdAt!==void 0&&Int64Value.encode({value:e82.createdAt},n.uint32(82).fork()).ldelim(),e82.cursor!==void 0&&StringValue.encode({value:e82.cursor},n.uint32(90).fork()).ldelim(),e82.type!==void 0&&StringValue.encode({value:e82.type},n.uint32(98).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModNoteObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subredditId=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.operatorId=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.modActionData=ModNoteObject_ModActionData.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.userNoteData=ModNoteObject_UserNoteData.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.user=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.operator=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.userId=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.createdAt=Int64Value.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.cursor=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.type=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subredditId:isSet$k(e82.subredditId)?String(e82.subredditId):void 0,operatorId:isSet$k(e82.operatorId)?String(e82.operatorId):void 0,modActionData:isSet$k(e82.modActionData)?ModNoteObject_ModActionData.fromJSON(e82.modActionData):void 0,userNoteData:isSet$k(e82.userNoteData)?ModNoteObject_UserNoteData.fromJSON(e82.userNoteData):void 0,subreddit:isSet$k(e82.subreddit)?String(e82.subreddit):void 0,user:isSet$k(e82.user)?String(e82.user):void 0,operator:isSet$k(e82.operator)?String(e82.operator):void 0,id:isSet$k(e82.id)?String(e82.id):void 0,userId:isSet$k(e82.userId)?String(e82.userId):void 0,createdAt:isSet$k(e82.createdAt)?Number(e82.createdAt):void 0,cursor:isSet$k(e82.cursor)?String(e82.cursor):void 0,type:isSet$k(e82.type)?String(e82.type):void 0}},toJSON(e82){let n={};return e82.subredditId!==void 0&&(n.subredditId=e82.subredditId),e82.operatorId!==void 0&&(n.operatorId=e82.operatorId),e82.modActionData!==void 0&&(n.modActionData=ModNoteObject_ModActionData.toJSON(e82.modActionData)),e82.userNoteData!==void 0&&(n.userNoteData=ModNoteObject_UserNoteData.toJSON(e82.userNoteData)),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.user!==void 0&&(n.user=e82.user),e82.operator!==void 0&&(n.operator=e82.operator),e82.id!==void 0&&(n.id=e82.id),e82.userId!==void 0&&(n.userId=e82.userId),e82.createdAt!==void 0&&(n.createdAt=e82.createdAt),e82.cursor!==void 0&&(n.cursor=e82.cursor),e82.type!==void 0&&(n.type=e82.type),n},create(e82){return ModNoteObject.fromPartial(e82??{})},fromPartial(e82){let n=createBaseModNoteObject();return n.subredditId=e82.subredditId??void 0,n.operatorId=e82.operatorId??void 0,n.modActionData=e82.modActionData!==void 0&&e82.modActionData!==null?ModNoteObject_ModActionData.fromPartial(e82.modActionData):void 0,n.userNoteData=e82.userNoteData!==void 0&&e82.userNoteData!==null?ModNoteObject_UserNoteData.fromPartial(e82.userNoteData):void 0,n.subreddit=e82.subreddit??void 0,n.user=e82.user??void 0,n.operator=e82.operator??void 0,n.id=e82.id??void 0,n.userId=e82.userId??void 0,n.createdAt=e82.createdAt??void 0,n.cursor=e82.cursor??void 0,n.type=e82.type??void 0,n}};messageTypeRegistry.set(ModNoteObject.$type,ModNoteObject);function createBaseModNoteObject_ModActionData(){return{action:void 0,redditId:void 0,details:void 0,description:void 0}}var ModNoteObject_ModActionData={$type:"devvit.plugin.redditapi.modnote.ModNoteObject.ModActionData",encode(e82,n=_m0.Writer.create()){return e82.action!==void 0&&StringValue.encode({value:e82.action},n.uint32(10).fork()).ldelim(),e82.redditId!==void 0&&StringValue.encode({value:e82.redditId},n.uint32(18).fork()).ldelim(),e82.details!==void 0&&StringValue.encode({value:e82.details},n.uint32(26).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModNoteObject_ModActionData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.action=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.redditId=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.details=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.description=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{action:isSet$k(e82.action)?String(e82.action):void 0,redditId:isSet$k(e82.redditId)?String(e82.redditId):void 0,details:isSet$k(e82.details)?String(e82.details):void 0,description:isSet$k(e82.description)?String(e82.description):void 0}},toJSON(e82){let n={};return e82.action!==void 0&&(n.action=e82.action),e82.redditId!==void 0&&(n.redditId=e82.redditId),e82.details!==void 0&&(n.details=e82.details),e82.description!==void 0&&(n.description=e82.description),n},create(e82){return ModNoteObject_ModActionData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseModNoteObject_ModActionData();return n.action=e82.action??void 0,n.redditId=e82.redditId??void 0,n.details=e82.details??void 0,n.description=e82.description??void 0,n}};messageTypeRegistry.set(ModNoteObject_ModActionData.$type,ModNoteObject_ModActionData);function createBaseModNoteObject_UserNoteData(){return{note:void 0,redditId:void 0,label:void 0}}var ModNoteObject_UserNoteData={$type:"devvit.plugin.redditapi.modnote.ModNoteObject.UserNoteData",encode(e82,n=_m0.Writer.create()){return e82.note!==void 0&&StringValue.encode({value:e82.note},n.uint32(10).fork()).ldelim(),e82.redditId!==void 0&&StringValue.encode({value:e82.redditId},n.uint32(18).fork()).ldelim(),e82.label!==void 0&&StringValue.encode({value:e82.label},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModNoteObject_UserNoteData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.note=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.redditId=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.label=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{note:isSet$k(e82.note)?String(e82.note):void 0,redditId:isSet$k(e82.redditId)?String(e82.redditId):void 0,label:isSet$k(e82.label)?String(e82.label):void 0}},toJSON(e82){let n={};return e82.note!==void 0&&(n.note=e82.note),e82.redditId!==void 0&&(n.redditId=e82.redditId),e82.label!==void 0&&(n.label=e82.label),n},create(e82){return ModNoteObject_UserNoteData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseModNoteObject_UserNoteData();return n.note=e82.note??void 0,n.redditId=e82.redditId??void 0,n.label=e82.label??void 0,n}};messageTypeRegistry.set(ModNoteObject_UserNoteData.$type,ModNoteObject_UserNoteData);function createBasePostModNotesResponse(){return{created:void 0}}var PostModNotesResponse={$type:"devvit.plugin.redditapi.modnote.PostModNotesResponse",encode(e82,n=_m0.Writer.create()){return e82.created!==void 0&&ModNoteObject.encode(e82.created,n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostModNotesResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.created=ModNoteObject.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{created:isSet$k(e82.created)?ModNoteObject.fromJSON(e82.created):void 0}},toJSON(e82){let n={};return e82.created!==void 0&&(n.created=ModNoteObject.toJSON(e82.created)),n},create(e82){return PostModNotesResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBasePostModNotesResponse();return n.created=e82.created!==void 0&&e82.created!==null?ModNoteObject.fromPartial(e82.created):void 0,n}};messageTypeRegistry.set(PostModNotesResponse.$type,PostModNotesResponse);function isSet$k(e82){return e82!=null}var ModNoteDefinition={name:"ModNote",fullName:"devvit.plugin.redditapi.modnote.ModNote",methods:{getNotes:{name:"GetNotes",requestType:GetNotesRequest,requestStream:!1,responseType:ModNotesResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([96,18,94,47,97,112,105,47,109,111,100,47,110,111,116,101,115,63,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,102,105,108,116,101,114,61,123,102,105,108,116,101,114,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,117,98,114,101,100,100,105,116,61,123,115,117,98,114,101,100,100,105,116,125,38,117,115,101,114,61,123,117,115,101,114,125])]}}},deleteNotes:{name:"DeleteNotes",requestType:DeleteNotesRequest,requestStream:!1,responseType:DeleteNotesResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([8,10,6,68,69,76,69,84,69]),new Uint8Array([68,18,66,47,97,112,105,47,109,111,100,47,110,111,116,101,115,63,110,111,116,101,95,105,100,61,123,110,111,116,101,95,105,100,125,38,115,117,98,114,101,100,100,105,116,61,123,115,117,98,114,101,100,100,105,116,125,38,117,115,101,114,61,123,117,115,101,114,125])]}}},postNotes:{name:"PostNotes",requestType:PostNotesRequest,requestStream:!1,responseType:PostModNotesResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([16,18,14,47,97,112,105,47,109,111,100,47,110,111,116,101,115]),new Uint8Array([2,24,4])]}}},postRemovalNote:{name:"PostRemovalNote",requestType:PostRemovalNoteRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([36,18,34,47,97,112,105,47,118,49,47,109,111,100,97,99,116,105,111,110,115,47,114,101,109,111,118,97,108,95,114,101,97,115,111,110,115]),new Uint8Array([2,24,2])]}}},recentNotes:{name:"RecentNotes",requestType:RecentNotesRequest,requestStream:!1,responseType:ModNotesResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([61,18,59,47,97,112,105,47,109,111,100,47,110,111,116,101,115,47,114,101,99,101,110,116,63,115,117,98,114,101,100,100,105,116,115,61,123,115,117,98,114,101,100,100,105,116,115,125,38,117,115,101,114,115,61,123,117,115,101,114,115,125])]}}}}};function createBaseConversationData(){return{isAuto:void 0,participant:void 0,objIds:[],isRepliable:void 0,lastUserUpdate:void 0,isInternal:void 0,lastModUpdate:void 0,authors:[],lastUpdated:void 0,legacyFirstMessageId:void 0,state:void 0,conversationType:void 0,lastUnread:void 0,owner:void 0,subject:void 0,id:void 0,isHighlighted:void 0,numMessages:void 0,modActions:{}}}var ConversationData={$type:"devvit.plugin.redditapi.newmodmail.ConversationData",encode(e82,n=_m0.Writer.create()){e82.isAuto!==void 0&&BoolValue.encode({value:e82.isAuto},n.uint32(10).fork()).ldelim(),e82.participant!==void 0&&Participant.encode(e82.participant,n.uint32(18).fork()).ldelim();for(let t of e82.objIds)ConversationData_ObjId.encode(t,n.uint32(26).fork()).ldelim();e82.isRepliable!==void 0&&BoolValue.encode({value:e82.isRepliable},n.uint32(34).fork()).ldelim(),e82.lastUserUpdate!==void 0&&StringValue.encode({value:e82.lastUserUpdate},n.uint32(42).fork()).ldelim(),e82.isInternal!==void 0&&BoolValue.encode({value:e82.isInternal},n.uint32(50).fork()).ldelim(),e82.lastModUpdate!==void 0&&StringValue.encode({value:e82.lastModUpdate},n.uint32(58).fork()).ldelim();for(let t of e82.authors)Participant.encode(t,n.uint32(66).fork()).ldelim();return e82.lastUpdated!==void 0&&StringValue.encode({value:e82.lastUpdated},n.uint32(74).fork()).ldelim(),e82.legacyFirstMessageId!==void 0&&StringValue.encode({value:e82.legacyFirstMessageId},n.uint32(82).fork()).ldelim(),e82.state!==void 0&&Int32Value.encode({value:e82.state},n.uint32(90).fork()).ldelim(),e82.conversationType!==void 0&&StringValue.encode({value:e82.conversationType},n.uint32(98).fork()).ldelim(),e82.lastUnread!==void 0&&StringValue.encode({value:e82.lastUnread},n.uint32(106).fork()).ldelim(),e82.owner!==void 0&&ConversationData_Owner.encode(e82.owner,n.uint32(114).fork()).ldelim(),e82.subject!==void 0&&StringValue.encode({value:e82.subject},n.uint32(122).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(130).fork()).ldelim(),e82.isHighlighted!==void 0&&BoolValue.encode({value:e82.isHighlighted},n.uint32(138).fork()).ldelim(),e82.numMessages!==void 0&&Int64Value.encode({value:e82.numMessages},n.uint32(146).fork()).ldelim(),Object.entries(e82.modActions).forEach(([t,o])=>{ConversationData_ModActionsEntry.encode({key:t,value:o},n.uint32(154).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.isAuto=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.participant=Participant.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.objIds.push(ConversationData_ObjId.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.isRepliable=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.lastUserUpdate=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.isInternal=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.lastModUpdate=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.authors.push(Participant.decode(t,t.uint32()));continue;case 9:if(r!==74)break;d.lastUpdated=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.legacyFirstMessageId=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.state=Int32Value.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.conversationType=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.lastUnread=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.owner=ConversationData_Owner.decode(t,t.uint32());continue;case 15:if(r!==122)break;d.subject=StringValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.isHighlighted=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.numMessages=Int64Value.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;let a=ConversationData_ModActionsEntry.decode(t,t.uint32());a.value!==void 0&&(d.modActions[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{isAuto:isSet$j(e82.isAuto)?!!e82.isAuto:void 0,participant:isSet$j(e82.participant)?Participant.fromJSON(e82.participant):void 0,objIds:globalThis.Array.isArray(e82?.objIds)?e82.objIds.map(n=>ConversationData_ObjId.fromJSON(n)):[],isRepliable:isSet$j(e82.isRepliable)?!!e82.isRepliable:void 0,lastUserUpdate:isSet$j(e82.lastUserUpdate)?String(e82.lastUserUpdate):void 0,isInternal:isSet$j(e82.isInternal)?!!e82.isInternal:void 0,lastModUpdate:isSet$j(e82.lastModUpdate)?String(e82.lastModUpdate):void 0,authors:globalThis.Array.isArray(e82?.authors)?e82.authors.map(n=>Participant.fromJSON(n)):[],lastUpdated:isSet$j(e82.lastUpdated)?String(e82.lastUpdated):void 0,legacyFirstMessageId:isSet$j(e82.legacyFirstMessageId)?String(e82.legacyFirstMessageId):void 0,state:isSet$j(e82.state)?Number(e82.state):void 0,conversationType:isSet$j(e82.conversationType)?String(e82.conversationType):void 0,lastUnread:isSet$j(e82.lastUnread)?String(e82.lastUnread):void 0,owner:isSet$j(e82.owner)?ConversationData_Owner.fromJSON(e82.owner):void 0,subject:isSet$j(e82.subject)?String(e82.subject):void 0,id:isSet$j(e82.id)?String(e82.id):void 0,isHighlighted:isSet$j(e82.isHighlighted)?!!e82.isHighlighted:void 0,numMessages:isSet$j(e82.numMessages)?Number(e82.numMessages):void 0,modActions:isObject$e(e82.modActions)?Object.entries(e82.modActions).reduce((n,[t,o])=>(n[t]=ModActionData.fromJSON(o),n),{}):{}}},toJSON(e82){var t,o;let n={};if(e82.isAuto!==void 0&&(n.isAuto=e82.isAuto),e82.participant!==void 0&&(n.participant=Participant.toJSON(e82.participant)),(t=e82.objIds)!=null&&t.length&&(n.objIds=e82.objIds.map(d=>ConversationData_ObjId.toJSON(d))),e82.isRepliable!==void 0&&(n.isRepliable=e82.isRepliable),e82.lastUserUpdate!==void 0&&(n.lastUserUpdate=e82.lastUserUpdate),e82.isInternal!==void 0&&(n.isInternal=e82.isInternal),e82.lastModUpdate!==void 0&&(n.lastModUpdate=e82.lastModUpdate),(o=e82.authors)!=null&&o.length&&(n.authors=e82.authors.map(d=>Participant.toJSON(d))),e82.lastUpdated!==void 0&&(n.lastUpdated=e82.lastUpdated),e82.legacyFirstMessageId!==void 0&&(n.legacyFirstMessageId=e82.legacyFirstMessageId),e82.state!==void 0&&(n.state=e82.state),e82.conversationType!==void 0&&(n.conversationType=e82.conversationType),e82.lastUnread!==void 0&&(n.lastUnread=e82.lastUnread),e82.owner!==void 0&&(n.owner=ConversationData_Owner.toJSON(e82.owner)),e82.subject!==void 0&&(n.subject=e82.subject),e82.id!==void 0&&(n.id=e82.id),e82.isHighlighted!==void 0&&(n.isHighlighted=e82.isHighlighted),e82.numMessages!==void 0&&(n.numMessages=e82.numMessages),e82.modActions){let d=Object.entries(e82.modActions);d.length>0&&(n.modActions={},d.forEach(([r,a])=>{n.modActions[r]=ModActionData.toJSON(a)}))}return n},create(e82){return ConversationData.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseConversationData();return n.isAuto=e82.isAuto??void 0,n.participant=e82.participant!==void 0&&e82.participant!==null?Participant.fromPartial(e82.participant):void 0,n.objIds=((t=e82.objIds)==null?void 0:t.map(d=>ConversationData_ObjId.fromPartial(d)))||[],n.isRepliable=e82.isRepliable??void 0,n.lastUserUpdate=e82.lastUserUpdate??void 0,n.isInternal=e82.isInternal??void 0,n.lastModUpdate=e82.lastModUpdate??void 0,n.authors=((o=e82.authors)==null?void 0:o.map(d=>Participant.fromPartial(d)))||[],n.lastUpdated=e82.lastUpdated??void 0,n.legacyFirstMessageId=e82.legacyFirstMessageId??void 0,n.state=e82.state??void 0,n.conversationType=e82.conversationType??void 0,n.lastUnread=e82.lastUnread??void 0,n.owner=e82.owner!==void 0&&e82.owner!==null?ConversationData_Owner.fromPartial(e82.owner):void 0,n.subject=e82.subject??void 0,n.id=e82.id??void 0,n.isHighlighted=e82.isHighlighted??void 0,n.numMessages=e82.numMessages??void 0,n.modActions=Object.entries(e82.modActions??{}).reduce((d,[r,a])=>(a!==void 0&&(d[r]=ModActionData.fromPartial(a)),d),{}),n}};messageTypeRegistry.set(ConversationData.$type,ConversationData);function createBaseConversationData_ObjId(){return{id:void 0,key:void 0}}var ConversationData_ObjId={$type:"devvit.plugin.redditapi.newmodmail.ConversationData.ObjId",encode(e82,n=_m0.Writer.create()){return e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(10).fork()).ldelim(),e82.key!==void 0&&StringValue.encode({value:e82.key},n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationData_ObjId();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.key=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$j(e82.id)?String(e82.id):void 0,key:isSet$j(e82.key)?String(e82.key):void 0}},toJSON(e82){let n={};return e82.id!==void 0&&(n.id=e82.id),e82.key!==void 0&&(n.key=e82.key),n},create(e82){return ConversationData_ObjId.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationData_ObjId();return n.id=e82.id??void 0,n.key=e82.key??void 0,n}};messageTypeRegistry.set(ConversationData_ObjId.$type,ConversationData_ObjId);function createBaseConversationData_Owner(){return{displayName:void 0,type:void 0,id:void 0}}var ConversationData_Owner={$type:"devvit.plugin.redditapi.newmodmail.ConversationData.Owner",encode(e82,n=_m0.Writer.create()){return e82.displayName!==void 0&&StringValue.encode({value:e82.displayName},n.uint32(10).fork()).ldelim(),e82.type!==void 0&&StringValue.encode({value:e82.type},n.uint32(18).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationData_Owner();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.displayName=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.type=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.id=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{displayName:isSet$j(e82.displayName)?String(e82.displayName):void 0,type:isSet$j(e82.type)?String(e82.type):void 0,id:isSet$j(e82.id)?String(e82.id):void 0}},toJSON(e82){let n={};return e82.displayName!==void 0&&(n.displayName=e82.displayName),e82.type!==void 0&&(n.type=e82.type),e82.id!==void 0&&(n.id=e82.id),n},create(e82){return ConversationData_Owner.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationData_Owner();return n.displayName=e82.displayName??void 0,n.type=e82.type??void 0,n.id=e82.id??void 0,n}};messageTypeRegistry.set(ConversationData_Owner.$type,ConversationData_Owner);function createBaseConversationData_ModActionsEntry(){return{key:"",value:void 0}}var ConversationData_ModActionsEntry={$type:"devvit.plugin.redditapi.newmodmail.ConversationData.ModActionsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ModActionData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationData_ModActionsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ModActionData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ModActionData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ModActionData.toJSON(e82.value)),n},create(e82){return ConversationData_ModActionsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationData_ModActionsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ModActionData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(ConversationData_ModActionsEntry.$type,ConversationData_ModActionsEntry);function createBaseMessageData(){return{body:void 0,author:void 0,isInternal:void 0,date:void 0,bodyMarkdown:void 0,id:void 0,participatingAs:void 0}}var MessageData={$type:"devvit.plugin.redditapi.newmodmail.MessageData",encode(e82,n=_m0.Writer.create()){return e82.body!==void 0&&StringValue.encode({value:e82.body},n.uint32(10).fork()).ldelim(),e82.author!==void 0&&Participant.encode(e82.author,n.uint32(18).fork()).ldelim(),e82.isInternal!==void 0&&BoolValue.encode({value:e82.isInternal},n.uint32(26).fork()).ldelim(),e82.date!==void 0&&StringValue.encode({value:e82.date},n.uint32(34).fork()).ldelim(),e82.bodyMarkdown!==void 0&&StringValue.encode({value:e82.bodyMarkdown},n.uint32(42).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(50).fork()).ldelim(),e82.participatingAs!==void 0&&StringValue.encode({value:e82.participatingAs},n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMessageData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.body=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.author=Participant.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.isInternal=BoolValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.date=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.bodyMarkdown=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.participatingAs=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{body:isSet$j(e82.body)?String(e82.body):void 0,author:isSet$j(e82.author)?Participant.fromJSON(e82.author):void 0,isInternal:isSet$j(e82.isInternal)?!!e82.isInternal:void 0,date:isSet$j(e82.date)?String(e82.date):void 0,bodyMarkdown:isSet$j(e82.bodyMarkdown)?String(e82.bodyMarkdown):void 0,id:isSet$j(e82.id)?String(e82.id):void 0,participatingAs:isSet$j(e82.participatingAs)?String(e82.participatingAs):void 0}},toJSON(e82){let n={};return e82.body!==void 0&&(n.body=e82.body),e82.author!==void 0&&(n.author=Participant.toJSON(e82.author)),e82.isInternal!==void 0&&(n.isInternal=e82.isInternal),e82.date!==void 0&&(n.date=e82.date),e82.bodyMarkdown!==void 0&&(n.bodyMarkdown=e82.bodyMarkdown),e82.id!==void 0&&(n.id=e82.id),e82.participatingAs!==void 0&&(n.participatingAs=e82.participatingAs),n},create(e82){return MessageData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMessageData();return n.body=e82.body??void 0,n.author=e82.author!==void 0&&e82.author!==null?Participant.fromPartial(e82.author):void 0,n.isInternal=e82.isInternal??void 0,n.date=e82.date??void 0,n.bodyMarkdown=e82.bodyMarkdown??void 0,n.id=e82.id??void 0,n.participatingAs=e82.participatingAs??void 0,n}};messageTypeRegistry.set(MessageData.$type,MessageData);function createBaseConversationUserData(){return{recentComments:{},muteStatus:void 0,name:void 0,created:void 0,banStatus:void 0,isSuspended:void 0,approveStatus:void 0,isShadowBanned:void 0,recentPosts:{},recentConvos:{},id:void 0}}var ConversationUserData={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData",encode(e82,n=_m0.Writer.create()){return Object.entries(e82.recentComments).forEach(([t,o])=>{ConversationUserData_RecentCommentsEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),e82.muteStatus!==void 0&&ConversationUserData_MuteStatus.encode(e82.muteStatus,n.uint32(18).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(26).fork()).ldelim(),e82.created!==void 0&&StringValue.encode({value:e82.created},n.uint32(34).fork()).ldelim(),e82.banStatus!==void 0&&ConversationUserData_BanStatus.encode(e82.banStatus,n.uint32(42).fork()).ldelim(),e82.isSuspended!==void 0&&BoolValue.encode({value:e82.isSuspended},n.uint32(50).fork()).ldelim(),e82.approveStatus!==void 0&&ConversationUserData_ApproveStatus.encode(e82.approveStatus,n.uint32(58).fork()).ldelim(),e82.isShadowBanned!==void 0&&BoolValue.encode({value:e82.isShadowBanned},n.uint32(66).fork()).ldelim(),Object.entries(e82.recentPosts).forEach(([t,o])=>{ConversationUserData_RecentPostsEntry.encode({key:t,value:o},n.uint32(74).fork()).ldelim()}),Object.entries(e82.recentConvos).forEach(([t,o])=>{ConversationUserData_RecentConvosEntry.encode({key:t,value:o},n.uint32(82).fork()).ldelim()}),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(90).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=ConversationUserData_RecentCommentsEntry.decode(t,t.uint32());a.value!==void 0&&(d.recentComments[a.key]=a.value);continue;case 2:if(r!==18)break;d.muteStatus=ConversationUserData_MuteStatus.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.created=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.banStatus=ConversationUserData_BanStatus.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.isSuspended=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.approveStatus=ConversationUserData_ApproveStatus.decode(t,t.uint32());continue;case 8:if(r!==66)break;d.isShadowBanned=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;let u=ConversationUserData_RecentPostsEntry.decode(t,t.uint32());u.value!==void 0&&(d.recentPosts[u.key]=u.value);continue;case 10:if(r!==82)break;let l=ConversationUserData_RecentConvosEntry.decode(t,t.uint32());l.value!==void 0&&(d.recentConvos[l.key]=l.value);continue;case 11:if(r!==90)break;d.id=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{recentComments:isObject$e(e82.recentComments)?Object.entries(e82.recentComments).reduce((n,[t,o])=>(n[t]=ConversationUserData_CommentData.fromJSON(o),n),{}):{},muteStatus:isSet$j(e82.muteStatus)?ConversationUserData_MuteStatus.fromJSON(e82.muteStatus):void 0,name:isSet$j(e82.name)?String(e82.name):void 0,created:isSet$j(e82.created)?String(e82.created):void 0,banStatus:isSet$j(e82.banStatus)?ConversationUserData_BanStatus.fromJSON(e82.banStatus):void 0,isSuspended:isSet$j(e82.isSuspended)?!!e82.isSuspended:void 0,approveStatus:isSet$j(e82.approveStatus)?ConversationUserData_ApproveStatus.fromJSON(e82.approveStatus):void 0,isShadowBanned:isSet$j(e82.isShadowBanned)?!!e82.isShadowBanned:void 0,recentPosts:isObject$e(e82.recentPosts)?Object.entries(e82.recentPosts).reduce((n,[t,o])=>(n[t]=ConversationUserData_PostData.fromJSON(o),n),{}):{},recentConvos:isObject$e(e82.recentConvos)?Object.entries(e82.recentConvos).reduce((n,[t,o])=>(n[t]=ConversationUserData_ConvoData.fromJSON(o),n),{}):{},id:isSet$j(e82.id)?String(e82.id):void 0}},toJSON(e82){let n={};if(e82.recentComments){let t=Object.entries(e82.recentComments);t.length>0&&(n.recentComments={},t.forEach(([o,d])=>{n.recentComments[o]=ConversationUserData_CommentData.toJSON(d)}))}if(e82.muteStatus!==void 0&&(n.muteStatus=ConversationUserData_MuteStatus.toJSON(e82.muteStatus)),e82.name!==void 0&&(n.name=e82.name),e82.created!==void 0&&(n.created=e82.created),e82.banStatus!==void 0&&(n.banStatus=ConversationUserData_BanStatus.toJSON(e82.banStatus)),e82.isSuspended!==void 0&&(n.isSuspended=e82.isSuspended),e82.approveStatus!==void 0&&(n.approveStatus=ConversationUserData_ApproveStatus.toJSON(e82.approveStatus)),e82.isShadowBanned!==void 0&&(n.isShadowBanned=e82.isShadowBanned),e82.recentPosts){let t=Object.entries(e82.recentPosts);t.length>0&&(n.recentPosts={},t.forEach(([o,d])=>{n.recentPosts[o]=ConversationUserData_PostData.toJSON(d)}))}if(e82.recentConvos){let t=Object.entries(e82.recentConvos);t.length>0&&(n.recentConvos={},t.forEach(([o,d])=>{n.recentConvos[o]=ConversationUserData_ConvoData.toJSON(d)}))}return e82.id!==void 0&&(n.id=e82.id),n},create(e82){return ConversationUserData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData();return n.recentComments=Object.entries(e82.recentComments??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=ConversationUserData_CommentData.fromPartial(d)),t),{}),n.muteStatus=e82.muteStatus!==void 0&&e82.muteStatus!==null?ConversationUserData_MuteStatus.fromPartial(e82.muteStatus):void 0,n.name=e82.name??void 0,n.created=e82.created??void 0,n.banStatus=e82.banStatus!==void 0&&e82.banStatus!==null?ConversationUserData_BanStatus.fromPartial(e82.banStatus):void 0,n.isSuspended=e82.isSuspended??void 0,n.approveStatus=e82.approveStatus!==void 0&&e82.approveStatus!==null?ConversationUserData_ApproveStatus.fromPartial(e82.approveStatus):void 0,n.isShadowBanned=e82.isShadowBanned??void 0,n.recentPosts=Object.entries(e82.recentPosts??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=ConversationUserData_PostData.fromPartial(d)),t),{}),n.recentConvos=Object.entries(e82.recentConvos??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=ConversationUserData_ConvoData.fromPartial(d)),t),{}),n.id=e82.id??void 0,n}};messageTypeRegistry.set(ConversationUserData.$type,ConversationUserData);function createBaseConversationUserData_CommentData(){return{comment:void 0,date:void 0,permalink:void 0,title:void 0}}var ConversationUserData_CommentData={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData.CommentData",encode(e82,n=_m0.Writer.create()){return e82.comment!==void 0&&StringValue.encode({value:e82.comment},n.uint32(10).fork()).ldelim(),e82.date!==void 0&&StringValue.encode({value:e82.date},n.uint32(18).fork()).ldelim(),e82.permalink!==void 0&&StringValue.encode({value:e82.permalink},n.uint32(26).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData_CommentData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.comment=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.date=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.permalink=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.title=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{comment:isSet$j(e82.comment)?String(e82.comment):void 0,date:isSet$j(e82.date)?String(e82.date):void 0,permalink:isSet$j(e82.permalink)?String(e82.permalink):void 0,title:isSet$j(e82.title)?String(e82.title):void 0}},toJSON(e82){let n={};return e82.comment!==void 0&&(n.comment=e82.comment),e82.date!==void 0&&(n.date=e82.date),e82.permalink!==void 0&&(n.permalink=e82.permalink),e82.title!==void 0&&(n.title=e82.title),n},create(e82){return ConversationUserData_CommentData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData_CommentData();return n.comment=e82.comment??void 0,n.date=e82.date??void 0,n.permalink=e82.permalink??void 0,n.title=e82.title??void 0,n}};messageTypeRegistry.set(ConversationUserData_CommentData.$type,ConversationUserData_CommentData);function createBaseConversationUserData_MuteStatus(){return{muteCount:void 0,isMuted:void 0,endDate:void 0,reason:void 0}}var ConversationUserData_MuteStatus={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData.MuteStatus",encode(e82,n=_m0.Writer.create()){return e82.muteCount!==void 0&&Int64Value.encode({value:e82.muteCount},n.uint32(10).fork()).ldelim(),e82.isMuted!==void 0&&BoolValue.encode({value:e82.isMuted},n.uint32(18).fork()).ldelim(),e82.endDate!==void 0&&StringValue.encode({value:e82.endDate},n.uint32(26).fork()).ldelim(),e82.reason!==void 0&&StringValue.encode({value:e82.reason},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData_MuteStatus();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.muteCount=Int64Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.isMuted=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.endDate=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.reason=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{muteCount:isSet$j(e82.muteCount)?Number(e82.muteCount):void 0,isMuted:isSet$j(e82.isMuted)?!!e82.isMuted:void 0,endDate:isSet$j(e82.endDate)?String(e82.endDate):void 0,reason:isSet$j(e82.reason)?String(e82.reason):void 0}},toJSON(e82){let n={};return e82.muteCount!==void 0&&(n.muteCount=e82.muteCount),e82.isMuted!==void 0&&(n.isMuted=e82.isMuted),e82.endDate!==void 0&&(n.endDate=e82.endDate),e82.reason!==void 0&&(n.reason=e82.reason),n},create(e82){return ConversationUserData_MuteStatus.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData_MuteStatus();return n.muteCount=e82.muteCount??void 0,n.isMuted=e82.isMuted??void 0,n.endDate=e82.endDate??void 0,n.reason=e82.reason??void 0,n}};messageTypeRegistry.set(ConversationUserData_MuteStatus.$type,ConversationUserData_MuteStatus);function createBaseConversationUserData_BanStatus(){return{isBanned:void 0,isPermanent:void 0,endDate:void 0,reason:void 0}}var ConversationUserData_BanStatus={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData.BanStatus",encode(e82,n=_m0.Writer.create()){return e82.isBanned!==void 0&&BoolValue.encode({value:e82.isBanned},n.uint32(10).fork()).ldelim(),e82.isPermanent!==void 0&&BoolValue.encode({value:e82.isPermanent},n.uint32(18).fork()).ldelim(),e82.endDate!==void 0&&StringValue.encode({value:e82.endDate},n.uint32(26).fork()).ldelim(),e82.reason!==void 0&&StringValue.encode({value:e82.reason},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData_BanStatus();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.isBanned=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.isPermanent=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.endDate=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.reason=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{isBanned:isSet$j(e82.isBanned)?!!e82.isBanned:void 0,isPermanent:isSet$j(e82.isPermanent)?!!e82.isPermanent:void 0,endDate:isSet$j(e82.endDate)?String(e82.endDate):void 0,reason:isSet$j(e82.reason)?String(e82.reason):void 0}},toJSON(e82){let n={};return e82.isBanned!==void 0&&(n.isBanned=e82.isBanned),e82.isPermanent!==void 0&&(n.isPermanent=e82.isPermanent),e82.endDate!==void 0&&(n.endDate=e82.endDate),e82.reason!==void 0&&(n.reason=e82.reason),n},create(e82){return ConversationUserData_BanStatus.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData_BanStatus();return n.isBanned=e82.isBanned??void 0,n.isPermanent=e82.isPermanent??void 0,n.endDate=e82.endDate??void 0,n.reason=e82.reason??void 0,n}};messageTypeRegistry.set(ConversationUserData_BanStatus.$type,ConversationUserData_BanStatus);function createBaseConversationUserData_ApproveStatus(){return{isApproved:void 0}}var ConversationUserData_ApproveStatus={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData.ApproveStatus",encode(e82,n=_m0.Writer.create()){return e82.isApproved!==void 0&&BoolValue.encode({value:e82.isApproved},n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData_ApproveStatus();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.isApproved=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{isApproved:isSet$j(e82.isApproved)?!!e82.isApproved:void 0}},toJSON(e82){let n={};return e82.isApproved!==void 0&&(n.isApproved=e82.isApproved),n},create(e82){return ConversationUserData_ApproveStatus.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData_ApproveStatus();return n.isApproved=e82.isApproved??void 0,n}};messageTypeRegistry.set(ConversationUserData_ApproveStatus.$type,ConversationUserData_ApproveStatus);function createBaseConversationUserData_PostData(){return{date:void 0,permalink:void 0,title:void 0}}var ConversationUserData_PostData={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData.PostData",encode(e82,n=_m0.Writer.create()){return e82.date!==void 0&&StringValue.encode({value:e82.date},n.uint32(10).fork()).ldelim(),e82.permalink!==void 0&&StringValue.encode({value:e82.permalink},n.uint32(18).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData_PostData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.date=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.permalink=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.title=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{date:isSet$j(e82.date)?String(e82.date):void 0,permalink:isSet$j(e82.permalink)?String(e82.permalink):void 0,title:isSet$j(e82.title)?String(e82.title):void 0}},toJSON(e82){let n={};return e82.date!==void 0&&(n.date=e82.date),e82.permalink!==void 0&&(n.permalink=e82.permalink),e82.title!==void 0&&(n.title=e82.title),n},create(e82){return ConversationUserData_PostData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData_PostData();return n.date=e82.date??void 0,n.permalink=e82.permalink??void 0,n.title=e82.title??void 0,n}};messageTypeRegistry.set(ConversationUserData_PostData.$type,ConversationUserData_PostData);function createBaseConversationUserData_ConvoData(){return{date:void 0,permalink:void 0,id:void 0,subject:void 0}}var ConversationUserData_ConvoData={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData.ConvoData",encode(e82,n=_m0.Writer.create()){return e82.date!==void 0&&StringValue.encode({value:e82.date},n.uint32(10).fork()).ldelim(),e82.permalink!==void 0&&StringValue.encode({value:e82.permalink},n.uint32(18).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(26).fork()).ldelim(),e82.subject!==void 0&&StringValue.encode({value:e82.subject},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData_ConvoData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.date=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.permalink=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.subject=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{date:isSet$j(e82.date)?String(e82.date):void 0,permalink:isSet$j(e82.permalink)?String(e82.permalink):void 0,id:isSet$j(e82.id)?String(e82.id):void 0,subject:isSet$j(e82.subject)?String(e82.subject):void 0}},toJSON(e82){let n={};return e82.date!==void 0&&(n.date=e82.date),e82.permalink!==void 0&&(n.permalink=e82.permalink),e82.id!==void 0&&(n.id=e82.id),e82.subject!==void 0&&(n.subject=e82.subject),n},create(e82){return ConversationUserData_ConvoData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData_ConvoData();return n.date=e82.date??void 0,n.permalink=e82.permalink??void 0,n.id=e82.id??void 0,n.subject=e82.subject??void 0,n}};messageTypeRegistry.set(ConversationUserData_ConvoData.$type,ConversationUserData_ConvoData);function createBaseConversationUserData_RecentCommentsEntry(){return{key:"",value:void 0}}var ConversationUserData_RecentCommentsEntry={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData.RecentCommentsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ConversationUserData_CommentData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData_RecentCommentsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ConversationUserData_CommentData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ConversationUserData_CommentData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ConversationUserData_CommentData.toJSON(e82.value)),n},create(e82){return ConversationUserData_RecentCommentsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData_RecentCommentsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ConversationUserData_CommentData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(ConversationUserData_RecentCommentsEntry.$type,ConversationUserData_RecentCommentsEntry);function createBaseConversationUserData_RecentPostsEntry(){return{key:"",value:void 0}}var ConversationUserData_RecentPostsEntry={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData.RecentPostsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ConversationUserData_PostData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData_RecentPostsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ConversationUserData_PostData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ConversationUserData_PostData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ConversationUserData_PostData.toJSON(e82.value)),n},create(e82){return ConversationUserData_RecentPostsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData_RecentPostsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ConversationUserData_PostData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(ConversationUserData_RecentPostsEntry.$type,ConversationUserData_RecentPostsEntry);function createBaseConversationUserData_RecentConvosEntry(){return{key:"",value:void 0}}var ConversationUserData_RecentConvosEntry={$type:"devvit.plugin.redditapi.newmodmail.ConversationUserData.RecentConvosEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ConversationUserData_ConvoData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseConversationUserData_RecentConvosEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ConversationUserData_ConvoData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ConversationUserData_ConvoData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ConversationUserData_ConvoData.toJSON(e82.value)),n},create(e82){return ConversationUserData_RecentConvosEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseConversationUserData_RecentConvosEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ConversationUserData_ConvoData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(ConversationUserData_RecentConvosEntry.$type,ConversationUserData_RecentConvosEntry);function createBaseParticipant(){return{isMod:void 0,isAdmin:void 0,name:void 0,isOp:void 0,isParticipant:void 0,isApproved:void 0,isHidden:void 0,id:void 0,isDeleted:void 0}}var Participant={$type:"devvit.plugin.redditapi.newmodmail.Participant",encode(e82,n=_m0.Writer.create()){return e82.isMod!==void 0&&BoolValue.encode({value:e82.isMod},n.uint32(10).fork()).ldelim(),e82.isAdmin!==void 0&&BoolValue.encode({value:e82.isAdmin},n.uint32(18).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(26).fork()).ldelim(),e82.isOp!==void 0&&BoolValue.encode({value:e82.isOp},n.uint32(34).fork()).ldelim(),e82.isParticipant!==void 0&&BoolValue.encode({value:e82.isParticipant},n.uint32(42).fork()).ldelim(),e82.isApproved!==void 0&&BoolValue.encode({value:e82.isApproved},n.uint32(50).fork()).ldelim(),e82.isHidden!==void 0&&BoolValue.encode({value:e82.isHidden},n.uint32(58).fork()).ldelim(),e82.id!==void 0&&Int64Value.encode({value:e82.id},n.uint32(66).fork()).ldelim(),e82.isDeleted!==void 0&&BoolValue.encode({value:e82.isDeleted},n.uint32(74).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseParticipant();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.isMod=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.isAdmin=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.isOp=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.isParticipant=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.isApproved=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.isHidden=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.id=Int64Value.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.isDeleted=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{isMod:isSet$j(e82.isMod)?!!e82.isMod:void 0,isAdmin:isSet$j(e82.isAdmin)?!!e82.isAdmin:void 0,name:isSet$j(e82.name)?String(e82.name):void 0,isOp:isSet$j(e82.isOp)?!!e82.isOp:void 0,isParticipant:isSet$j(e82.isParticipant)?!!e82.isParticipant:void 0,isApproved:isSet$j(e82.isApproved)?!!e82.isApproved:void 0,isHidden:isSet$j(e82.isHidden)?!!e82.isHidden:void 0,id:isSet$j(e82.id)?Number(e82.id):void 0,isDeleted:isSet$j(e82.isDeleted)?!!e82.isDeleted:void 0}},toJSON(e82){let n={};return e82.isMod!==void 0&&(n.isMod=e82.isMod),e82.isAdmin!==void 0&&(n.isAdmin=e82.isAdmin),e82.name!==void 0&&(n.name=e82.name),e82.isOp!==void 0&&(n.isOp=e82.isOp),e82.isParticipant!==void 0&&(n.isParticipant=e82.isParticipant),e82.isApproved!==void 0&&(n.isApproved=e82.isApproved),e82.isHidden!==void 0&&(n.isHidden=e82.isHidden),e82.id!==void 0&&(n.id=e82.id),e82.isDeleted!==void 0&&(n.isDeleted=e82.isDeleted),n},create(e82){return Participant.fromPartial(e82??{})},fromPartial(e82){let n=createBaseParticipant();return n.isMod=e82.isMod??void 0,n.isAdmin=e82.isAdmin??void 0,n.name=e82.name??void 0,n.isOp=e82.isOp??void 0,n.isParticipant=e82.isParticipant??void 0,n.isApproved=e82.isApproved??void 0,n.isHidden=e82.isHidden??void 0,n.id=e82.id??void 0,n.isDeleted=e82.isDeleted??void 0,n}};messageTypeRegistry.set(Participant.$type,Participant);function createBaseModActionData(){return{date:void 0,actionTypeId:void 0,id:void 0,author:void 0}}var ModActionData={$type:"devvit.plugin.redditapi.newmodmail.ModActionData",encode(e82,n=_m0.Writer.create()){return e82.date!==void 0&&StringValue.encode({value:e82.date},n.uint32(10).fork()).ldelim(),e82.actionTypeId!==void 0&&Int32Value.encode({value:e82.actionTypeId},n.uint32(18).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(26).fork()).ldelim(),e82.author!==void 0&&ModActionData_ModActionAuthor.encode(e82.author,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModActionData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.date=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.actionTypeId=Int32Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.author=ModActionData_ModActionAuthor.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{date:isSet$j(e82.date)?String(e82.date):void 0,actionTypeId:isSet$j(e82.actionTypeId)?Number(e82.actionTypeId):void 0,id:isSet$j(e82.id)?String(e82.id):void 0,author:isSet$j(e82.author)?ModActionData_ModActionAuthor.fromJSON(e82.author):void 0}},toJSON(e82){let n={};return e82.date!==void 0&&(n.date=e82.date),e82.actionTypeId!==void 0&&(n.actionTypeId=e82.actionTypeId),e82.id!==void 0&&(n.id=e82.id),e82.author!==void 0&&(n.author=ModActionData_ModActionAuthor.toJSON(e82.author)),n},create(e82){return ModActionData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseModActionData();return n.date=e82.date??void 0,n.actionTypeId=e82.actionTypeId??void 0,n.id=e82.id??void 0,n.author=e82.author!==void 0&&e82.author!==null?ModActionData_ModActionAuthor.fromPartial(e82.author):void 0,n}};messageTypeRegistry.set(ModActionData.$type,ModActionData);function createBaseModActionData_ModActionAuthor(){return{isMod:void 0,isAdmin:void 0,name:void 0,isHidden:void 0,id:void 0,isDeleted:void 0}}var ModActionData_ModActionAuthor={$type:"devvit.plugin.redditapi.newmodmail.ModActionData.ModActionAuthor",encode(e82,n=_m0.Writer.create()){return e82.isMod!==void 0&&BoolValue.encode({value:e82.isMod},n.uint32(10).fork()).ldelim(),e82.isAdmin!==void 0&&BoolValue.encode({value:e82.isAdmin},n.uint32(18).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(26).fork()).ldelim(),e82.isHidden!==void 0&&BoolValue.encode({value:e82.isHidden},n.uint32(34).fork()).ldelim(),e82.id!==void 0&&Int64Value.encode({value:e82.id},n.uint32(42).fork()).ldelim(),e82.isDeleted!==void 0&&BoolValue.encode({value:e82.isDeleted},n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseModActionData_ModActionAuthor();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.isMod=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.isAdmin=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.isHidden=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.id=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.isDeleted=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{isMod:isSet$j(e82.isMod)?!!e82.isMod:void 0,isAdmin:isSet$j(e82.isAdmin)?!!e82.isAdmin:void 0,name:isSet$j(e82.name)?String(e82.name):void 0,isHidden:isSet$j(e82.isHidden)?!!e82.isHidden:void 0,id:isSet$j(e82.id)?Number(e82.id):void 0,isDeleted:isSet$j(e82.isDeleted)?!!e82.isDeleted:void 0}},toJSON(e82){let n={};return e82.isMod!==void 0&&(n.isMod=e82.isMod),e82.isAdmin!==void 0&&(n.isAdmin=e82.isAdmin),e82.name!==void 0&&(n.name=e82.name),e82.isHidden!==void 0&&(n.isHidden=e82.isHidden),e82.id!==void 0&&(n.id=e82.id),e82.isDeleted!==void 0&&(n.isDeleted=e82.isDeleted),n},create(e82){return ModActionData_ModActionAuthor.fromPartial(e82??{})},fromPartial(e82){let n=createBaseModActionData_ModActionAuthor();return n.isMod=e82.isMod??void 0,n.isAdmin=e82.isAdmin??void 0,n.name=e82.name??void 0,n.isHidden=e82.isHidden??void 0,n.id=e82.id??void 0,n.isDeleted=e82.isDeleted??void 0,n}};messageTypeRegistry.set(ModActionData_ModActionAuthor.$type,ModActionData_ModActionAuthor);function createBaseBulkReadConversationsRequest(){return{entity:"",state:""}}var BulkReadConversationsRequest={$type:"devvit.plugin.redditapi.newmodmail.BulkReadConversationsRequest",encode(e82,n=_m0.Writer.create()){return e82.entity!==""&&n.uint32(10).string(e82.entity),e82.state!==""&&n.uint32(18).string(e82.state),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBulkReadConversationsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.entity=t.string();continue;case 2:if(r!==18)break;d.state=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{entity:isSet$j(e82.entity)?globalThis.String(e82.entity):"",state:isSet$j(e82.state)?globalThis.String(e82.state):""}},toJSON(e82){let n={};return e82.entity!==""&&(n.entity=e82.entity),e82.state!==""&&(n.state=e82.state),n},create(e82){return BulkReadConversationsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBulkReadConversationsRequest();return n.entity=e82.entity??"",n.state=e82.state??"",n}};messageTypeRegistry.set(BulkReadConversationsRequest.$type,BulkReadConversationsRequest);function createBaseGetConversationsRequest(){return{after:void 0,entity:void 0,limit:void 0,sort:void 0,state:void 0}}var GetConversationsRequest={$type:"devvit.plugin.redditapi.newmodmail.GetConversationsRequest",encode(e82,n=_m0.Writer.create()){return e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.entity!==void 0&&StringValue.encode({value:e82.entity},n.uint32(18).fork()).ldelim(),e82.limit!==void 0&&Int32Value.encode({value:e82.limit},n.uint32(26).fork()).ldelim(),e82.sort!==void 0&&StringValue.encode({value:e82.sort},n.uint32(34).fork()).ldelim(),e82.state!==void 0&&StringValue.encode({value:e82.state},n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetConversationsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.entity=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.limit=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.sort=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.state=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$j(e82.after)?String(e82.after):void 0,entity:isSet$j(e82.entity)?String(e82.entity):void 0,limit:isSet$j(e82.limit)?Number(e82.limit):void 0,sort:isSet$j(e82.sort)?String(e82.sort):void 0,state:isSet$j(e82.state)?String(e82.state):void 0}},toJSON(e82){let n={};return e82.after!==void 0&&(n.after=e82.after),e82.entity!==void 0&&(n.entity=e82.entity),e82.limit!==void 0&&(n.limit=e82.limit),e82.sort!==void 0&&(n.sort=e82.sort),e82.state!==void 0&&(n.state=e82.state),n},create(e82){return GetConversationsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetConversationsRequest();return n.after=e82.after??void 0,n.entity=e82.entity??void 0,n.limit=e82.limit??void 0,n.sort=e82.sort??void 0,n.state=e82.state??void 0,n}};messageTypeRegistry.set(GetConversationsRequest.$type,GetConversationsRequest);function createBaseCreateConversationRequest(){return{body:"",isAuthorHidden:!1,srName:"",subject:"",to:void 0}}var CreateConversationRequest={$type:"devvit.plugin.redditapi.newmodmail.CreateConversationRequest",encode(e82,n=_m0.Writer.create()){return e82.body!==""&&n.uint32(10).string(e82.body),e82.isAuthorHidden!==!1&&n.uint32(16).bool(e82.isAuthorHidden),e82.srName!==""&&n.uint32(26).string(e82.srName),e82.subject!==""&&n.uint32(34).string(e82.subject),e82.to!==void 0&&StringValue.encode({value:e82.to},n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCreateConversationRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.body=t.string();continue;case 2:if(r!==16)break;d.isAuthorHidden=t.bool();continue;case 3:if(r!==26)break;d.srName=t.string();continue;case 4:if(r!==34)break;d.subject=t.string();continue;case 5:if(r!==42)break;d.to=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{body:isSet$j(e82.body)?globalThis.String(e82.body):"",isAuthorHidden:isSet$j(e82.isAuthorHidden)?globalThis.Boolean(e82.isAuthorHidden):!1,srName:isSet$j(e82.srName)?globalThis.String(e82.srName):"",subject:isSet$j(e82.subject)?globalThis.String(e82.subject):"",to:isSet$j(e82.to)?String(e82.to):void 0}},toJSON(e82){let n={};return e82.body!==""&&(n.body=e82.body),e82.isAuthorHidden!==!1&&(n.isAuthorHidden=e82.isAuthorHidden),e82.srName!==""&&(n.srName=e82.srName),e82.subject!==""&&(n.subject=e82.subject),e82.to!==void 0&&(n.to=e82.to),n},create(e82){return CreateConversationRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCreateConversationRequest();return n.body=e82.body??"",n.isAuthorHidden=e82.isAuthorHidden??!1,n.srName=e82.srName??"",n.subject=e82.subject??"",n.to=e82.to??void 0,n}};messageTypeRegistry.set(CreateConversationRequest.$type,CreateConversationRequest);function createBaseGetConversationRequest(){return{conversationId:"",markRead:!1}}var GetConversationRequest={$type:"devvit.plugin.redditapi.newmodmail.GetConversationRequest",encode(e82,n=_m0.Writer.create()){return e82.conversationId!==""&&n.uint32(10).string(e82.conversationId),e82.markRead!==!1&&n.uint32(16).bool(e82.markRead),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetConversationRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversationId=t.string();continue;case 2:if(r!==16)break;d.markRead=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversationId:isSet$j(e82.conversationId)?globalThis.String(e82.conversationId):"",markRead:isSet$j(e82.markRead)?globalThis.Boolean(e82.markRead):!1}},toJSON(e82){let n={};return e82.conversationId!==""&&(n.conversationId=e82.conversationId),e82.markRead!==!1&&(n.markRead=e82.markRead),n},create(e82){return GetConversationRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetConversationRequest();return n.conversationId=e82.conversationId??"",n.markRead=e82.markRead??!1,n}};messageTypeRegistry.set(GetConversationRequest.$type,GetConversationRequest);function createBaseCreateConversationMessageRequest(){return{body:"",isAuthorHidden:!1,isInternal:!1,conversationId:""}}var CreateConversationMessageRequest={$type:"devvit.plugin.redditapi.newmodmail.CreateConversationMessageRequest",encode(e82,n=_m0.Writer.create()){return e82.body!==""&&n.uint32(10).string(e82.body),e82.isAuthorHidden!==!1&&n.uint32(16).bool(e82.isAuthorHidden),e82.isInternal!==!1&&n.uint32(24).bool(e82.isInternal),e82.conversationId!==""&&n.uint32(34).string(e82.conversationId),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCreateConversationMessageRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.body=t.string();continue;case 2:if(r!==16)break;d.isAuthorHidden=t.bool();continue;case 3:if(r!==24)break;d.isInternal=t.bool();continue;case 4:if(r!==34)break;d.conversationId=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{body:isSet$j(e82.body)?globalThis.String(e82.body):"",isAuthorHidden:isSet$j(e82.isAuthorHidden)?globalThis.Boolean(e82.isAuthorHidden):!1,isInternal:isSet$j(e82.isInternal)?globalThis.Boolean(e82.isInternal):!1,conversationId:isSet$j(e82.conversationId)?globalThis.String(e82.conversationId):""}},toJSON(e82){let n={};return e82.body!==""&&(n.body=e82.body),e82.isAuthorHidden!==!1&&(n.isAuthorHidden=e82.isAuthorHidden),e82.isInternal!==!1&&(n.isInternal=e82.isInternal),e82.conversationId!==""&&(n.conversationId=e82.conversationId),n},create(e82){return CreateConversationMessageRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCreateConversationMessageRequest();return n.body=e82.body??"",n.isAuthorHidden=e82.isAuthorHidden??!1,n.isInternal=e82.isInternal??!1,n.conversationId=e82.conversationId??"",n}};messageTypeRegistry.set(CreateConversationMessageRequest.$type,CreateConversationMessageRequest);function createBaseBasicConversationRequest(){return{conversationId:""}}var BasicConversationRequest={$type:"devvit.plugin.redditapi.newmodmail.BasicConversationRequest",encode(e82,n=_m0.Writer.create()){return e82.conversationId!==""&&n.uint32(10).string(e82.conversationId),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBasicConversationRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversationId=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversationId:isSet$j(e82.conversationId)?globalThis.String(e82.conversationId):""}},toJSON(e82){let n={};return e82.conversationId!==""&&(n.conversationId=e82.conversationId),n},create(e82){return BasicConversationRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBasicConversationRequest();return n.conversationId=e82.conversationId??"",n}};messageTypeRegistry.set(BasicConversationRequest.$type,BasicConversationRequest);function createBaseBasicConversationsRequest(){return{conversationIds:""}}var BasicConversationsRequest={$type:"devvit.plugin.redditapi.newmodmail.BasicConversationsRequest",encode(e82,n=_m0.Writer.create()){return e82.conversationIds!==""&&n.uint32(10).string(e82.conversationIds),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBasicConversationsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversationIds=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversationIds:isSet$j(e82.conversationIds)?globalThis.String(e82.conversationIds):""}},toJSON(e82){let n={};return e82.conversationIds!==""&&(n.conversationIds=e82.conversationIds),n},create(e82){return BasicConversationsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBasicConversationsRequest();return n.conversationIds=e82.conversationIds??"",n}};messageTypeRegistry.set(BasicConversationsRequest.$type,BasicConversationsRequest);function createBaseMuteConversationRequest(){return{conversationId:"",numHours:0}}var MuteConversationRequest={$type:"devvit.plugin.redditapi.newmodmail.MuteConversationRequest",encode(e82,n=_m0.Writer.create()){return e82.conversationId!==""&&n.uint32(10).string(e82.conversationId),e82.numHours!==0&&n.uint32(16).int32(e82.numHours),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMuteConversationRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversationId=t.string();continue;case 2:if(r!==16)break;d.numHours=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversationId:isSet$j(e82.conversationId)?globalThis.String(e82.conversationId):"",numHours:isSet$j(e82.numHours)?globalThis.Number(e82.numHours):0}},toJSON(e82){let n={};return e82.conversationId!==""&&(n.conversationId=e82.conversationId),e82.numHours!==0&&(n.numHours=Math.round(e82.numHours)),n},create(e82){return MuteConversationRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMuteConversationRequest();return n.conversationId=e82.conversationId??"",n.numHours=e82.numHours??0,n}};messageTypeRegistry.set(MuteConversationRequest.$type,MuteConversationRequest);function createBaseTempBanRequest(){return{conversationId:"",duration:0}}var TempBanRequest={$type:"devvit.plugin.redditapi.newmodmail.TempBanRequest",encode(e82,n=_m0.Writer.create()){return e82.conversationId!==""&&n.uint32(10).string(e82.conversationId),e82.duration!==0&&n.uint32(16).int32(e82.duration),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTempBanRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversationId=t.string();continue;case 2:if(r!==16)break;d.duration=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversationId:isSet$j(e82.conversationId)?globalThis.String(e82.conversationId):"",duration:isSet$j(e82.duration)?globalThis.Number(e82.duration):0}},toJSON(e82){let n={};return e82.conversationId!==""&&(n.conversationId=e82.conversationId),e82.duration!==0&&(n.duration=Math.round(e82.duration)),n},create(e82){return TempBanRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseTempBanRequest();return n.conversationId=e82.conversationId??"",n.duration=e82.duration??0,n}};messageTypeRegistry.set(TempBanRequest.$type,TempBanRequest);function createBaseBulkReadConversationsResponse(){return{conversationIds:[]}}var BulkReadConversationsResponse={$type:"devvit.plugin.redditapi.newmodmail.BulkReadConversationsResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.conversationIds)StringValue.encode({value:t},n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBulkReadConversationsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversationIds.push(StringValue.decode(t,t.uint32()).value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversationIds:globalThis.Array.isArray(e82?.conversationIds)?e82.conversationIds.map(n=>String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.conversationIds)!=null&&t.length&&(n.conversationIds=e82.conversationIds),n},create(e82){return BulkReadConversationsResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseBulkReadConversationsResponse();return n.conversationIds=((t=e82.conversationIds)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(BulkReadConversationsResponse.$type,BulkReadConversationsResponse);function createBaseGetConversationsResponse(){return{conversations:{},messages:{},viewerId:void 0,conversationIds:[]}}var GetConversationsResponse={$type:"devvit.plugin.redditapi.newmodmail.GetConversationsResponse",encode(e82,n=_m0.Writer.create()){Object.entries(e82.conversations).forEach(([t,o])=>{GetConversationsResponse_ConversationsEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),Object.entries(e82.messages).forEach(([t,o])=>{GetConversationsResponse_MessagesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),e82.viewerId!==void 0&&StringValue.encode({value:e82.viewerId},n.uint32(26).fork()).ldelim();for(let t of e82.conversationIds)StringValue.encode({value:t},n.uint32(34).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetConversationsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=GetConversationsResponse_ConversationsEntry.decode(t,t.uint32());a.value!==void 0&&(d.conversations[a.key]=a.value);continue;case 2:if(r!==18)break;let u=GetConversationsResponse_MessagesEntry.decode(t,t.uint32());u.value!==void 0&&(d.messages[u.key]=u.value);continue;case 3:if(r!==26)break;d.viewerId=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.conversationIds.push(StringValue.decode(t,t.uint32()).value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversations:isObject$e(e82.conversations)?Object.entries(e82.conversations).reduce((n,[t,o])=>(n[t]=ConversationData.fromJSON(o),n),{}):{},messages:isObject$e(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=MessageData.fromJSON(o),n),{}):{},viewerId:isSet$j(e82.viewerId)?String(e82.viewerId):void 0,conversationIds:globalThis.Array.isArray(e82?.conversationIds)?e82.conversationIds.map(n=>String(n)):[]}},toJSON(e82){var t;let n={};if(e82.conversations){let o=Object.entries(e82.conversations);o.length>0&&(n.conversations={},o.forEach(([d,r])=>{n.conversations[d]=ConversationData.toJSON(r)}))}if(e82.messages){let o=Object.entries(e82.messages);o.length>0&&(n.messages={},o.forEach(([d,r])=>{n.messages[d]=MessageData.toJSON(r)}))}return e82.viewerId!==void 0&&(n.viewerId=e82.viewerId),(t=e82.conversationIds)!=null&&t.length&&(n.conversationIds=e82.conversationIds),n},create(e82){return GetConversationsResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGetConversationsResponse();return n.conversations=Object.entries(e82.conversations??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=ConversationData.fromPartial(r)),o),{}),n.messages=Object.entries(e82.messages??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=MessageData.fromPartial(r)),o),{}),n.viewerId=e82.viewerId??void 0,n.conversationIds=((t=e82.conversationIds)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(GetConversationsResponse.$type,GetConversationsResponse);function createBaseGetConversationsResponse_ConversationsEntry(){return{key:"",value:void 0}}var GetConversationsResponse_ConversationsEntry={$type:"devvit.plugin.redditapi.newmodmail.GetConversationsResponse.ConversationsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ConversationData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetConversationsResponse_ConversationsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ConversationData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ConversationData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ConversationData.toJSON(e82.value)),n},create(e82){return GetConversationsResponse_ConversationsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetConversationsResponse_ConversationsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ConversationData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(GetConversationsResponse_ConversationsEntry.$type,GetConversationsResponse_ConversationsEntry);function createBaseGetConversationsResponse_MessagesEntry(){return{key:"",value:void 0}}var GetConversationsResponse_MessagesEntry={$type:"devvit.plugin.redditapi.newmodmail.GetConversationsResponse.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&MessageData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetConversationsResponse_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=MessageData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?MessageData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=MessageData.toJSON(e82.value)),n},create(e82){return GetConversationsResponse_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetConversationsResponse_MessagesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?MessageData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(GetConversationsResponse_MessagesEntry.$type,GetConversationsResponse_MessagesEntry);function createBaseCreateConversationResponse(){return{conversation:void 0,messages:{},modActions:{},fields:[],reason:void 0,message:void 0,explanation:void 0,user:void 0}}var CreateConversationResponse={$type:"devvit.plugin.redditapi.newmodmail.CreateConversationResponse",encode(e82,n=_m0.Writer.create()){e82.conversation!==void 0&&ConversationData.encode(e82.conversation,n.uint32(10).fork()).ldelim(),Object.entries(e82.messages).forEach(([t,o])=>{CreateConversationResponse_MessagesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),Object.entries(e82.modActions).forEach(([t,o])=>{CreateConversationResponse_ModActionsEntry.encode({key:t,value:o},n.uint32(26).fork()).ldelim()});for(let t of e82.fields)StringValue.encode({value:t},n.uint32(34).fork()).ldelim();return e82.reason!==void 0&&StringValue.encode({value:e82.reason},n.uint32(42).fork()).ldelim(),e82.message!==void 0&&StringValue.encode({value:e82.message},n.uint32(50).fork()).ldelim(),e82.explanation!==void 0&&StringValue.encode({value:e82.explanation},n.uint32(58).fork()).ldelim(),e82.user!==void 0&&ConversationUserData.encode(e82.user,n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCreateConversationResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversation=ConversationData.decode(t,t.uint32());continue;case 2:if(r!==18)break;let a=CreateConversationResponse_MessagesEntry.decode(t,t.uint32());a.value!==void 0&&(d.messages[a.key]=a.value);continue;case 3:if(r!==26)break;let u=CreateConversationResponse_ModActionsEntry.decode(t,t.uint32());u.value!==void 0&&(d.modActions[u.key]=u.value);continue;case 4:if(r!==34)break;d.fields.push(StringValue.decode(t,t.uint32()).value);continue;case 5:if(r!==42)break;d.reason=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.message=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.explanation=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.user=ConversationUserData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversation:isSet$j(e82.conversation)?ConversationData.fromJSON(e82.conversation):void 0,messages:isObject$e(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=MessageData.fromJSON(o),n),{}):{},modActions:isObject$e(e82.modActions)?Object.entries(e82.modActions).reduce((n,[t,o])=>(n[t]=ModActionData.fromJSON(o),n),{}):{},fields:globalThis.Array.isArray(e82?.fields)?e82.fields.map(n=>String(n)):[],reason:isSet$j(e82.reason)?String(e82.reason):void 0,message:isSet$j(e82.message)?String(e82.message):void 0,explanation:isSet$j(e82.explanation)?String(e82.explanation):void 0,user:isSet$j(e82.user)?ConversationUserData.fromJSON(e82.user):void 0}},toJSON(e82){var t;let n={};if(e82.conversation!==void 0&&(n.conversation=ConversationData.toJSON(e82.conversation)),e82.messages){let o=Object.entries(e82.messages);o.length>0&&(n.messages={},o.forEach(([d,r])=>{n.messages[d]=MessageData.toJSON(r)}))}if(e82.modActions){let o=Object.entries(e82.modActions);o.length>0&&(n.modActions={},o.forEach(([d,r])=>{n.modActions[d]=ModActionData.toJSON(r)}))}return(t=e82.fields)!=null&&t.length&&(n.fields=e82.fields),e82.reason!==void 0&&(n.reason=e82.reason),e82.message!==void 0&&(n.message=e82.message),e82.explanation!==void 0&&(n.explanation=e82.explanation),e82.user!==void 0&&(n.user=ConversationUserData.toJSON(e82.user)),n},create(e82){return CreateConversationResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseCreateConversationResponse();return n.conversation=e82.conversation!==void 0&&e82.conversation!==null?ConversationData.fromPartial(e82.conversation):void 0,n.messages=Object.entries(e82.messages??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=MessageData.fromPartial(r)),o),{}),n.modActions=Object.entries(e82.modActions??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=ModActionData.fromPartial(r)),o),{}),n.fields=((t=e82.fields)==null?void 0:t.map(o=>o))||[],n.reason=e82.reason??void 0,n.message=e82.message??void 0,n.explanation=e82.explanation??void 0,n.user=e82.user!==void 0&&e82.user!==null?ConversationUserData.fromPartial(e82.user):void 0,n}};messageTypeRegistry.set(CreateConversationResponse.$type,CreateConversationResponse);function createBaseCreateConversationResponse_MessagesEntry(){return{key:"",value:void 0}}var CreateConversationResponse_MessagesEntry={$type:"devvit.plugin.redditapi.newmodmail.CreateConversationResponse.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&MessageData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCreateConversationResponse_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=MessageData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?MessageData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=MessageData.toJSON(e82.value)),n},create(e82){return CreateConversationResponse_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCreateConversationResponse_MessagesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?MessageData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(CreateConversationResponse_MessagesEntry.$type,CreateConversationResponse_MessagesEntry);function createBaseCreateConversationResponse_ModActionsEntry(){return{key:"",value:void 0}}var CreateConversationResponse_ModActionsEntry={$type:"devvit.plugin.redditapi.newmodmail.CreateConversationResponse.ModActionsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ModActionData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCreateConversationResponse_ModActionsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ModActionData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ModActionData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ModActionData.toJSON(e82.value)),n},create(e82){return CreateConversationResponse_ModActionsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCreateConversationResponse_ModActionsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ModActionData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(CreateConversationResponse_ModActionsEntry.$type,CreateConversationResponse_ModActionsEntry);function createBaseGetConversationResponse(){return{conversation:void 0,messages:{},modActions:{},participantSubreddit:void 0,user:void 0}}var GetConversationResponse={$type:"devvit.plugin.redditapi.newmodmail.GetConversationResponse",encode(e82,n=_m0.Writer.create()){return e82.conversation!==void 0&&ConversationData.encode(e82.conversation,n.uint32(10).fork()).ldelim(),Object.entries(e82.messages).forEach(([t,o])=>{GetConversationResponse_MessagesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),Object.entries(e82.modActions).forEach(([t,o])=>{GetConversationResponse_ModActionsEntry.encode({key:t,value:o},n.uint32(26).fork()).ldelim()}),e82.participantSubreddit!==void 0&&Any.encode(e82.participantSubreddit,n.uint32(34).fork()).ldelim(),e82.user!==void 0&&ConversationUserData.encode(e82.user,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetConversationResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversation=ConversationData.decode(t,t.uint32());continue;case 2:if(r!==18)break;let a=GetConversationResponse_MessagesEntry.decode(t,t.uint32());a.value!==void 0&&(d.messages[a.key]=a.value);continue;case 3:if(r!==26)break;let u=GetConversationResponse_ModActionsEntry.decode(t,t.uint32());u.value!==void 0&&(d.modActions[u.key]=u.value);continue;case 4:if(r!==34)break;d.participantSubreddit=Any.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.user=ConversationUserData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversation:isSet$j(e82.conversation)?ConversationData.fromJSON(e82.conversation):void 0,messages:isObject$e(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=MessageData.fromJSON(o),n),{}):{},modActions:isObject$e(e82.modActions)?Object.entries(e82.modActions).reduce((n,[t,o])=>(n[t]=ModActionData.fromJSON(o),n),{}):{},participantSubreddit:isSet$j(e82.participantSubreddit)?Any.fromJSON(e82.participantSubreddit):void 0,user:isSet$j(e82.user)?ConversationUserData.fromJSON(e82.user):void 0}},toJSON(e82){let n={};if(e82.conversation!==void 0&&(n.conversation=ConversationData.toJSON(e82.conversation)),e82.messages){let t=Object.entries(e82.messages);t.length>0&&(n.messages={},t.forEach(([o,d])=>{n.messages[o]=MessageData.toJSON(d)}))}if(e82.modActions){let t=Object.entries(e82.modActions);t.length>0&&(n.modActions={},t.forEach(([o,d])=>{n.modActions[o]=ModActionData.toJSON(d)}))}return e82.participantSubreddit!==void 0&&(n.participantSubreddit=Any.toJSON(e82.participantSubreddit)),e82.user!==void 0&&(n.user=ConversationUserData.toJSON(e82.user)),n},create(e82){return GetConversationResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetConversationResponse();return n.conversation=e82.conversation!==void 0&&e82.conversation!==null?ConversationData.fromPartial(e82.conversation):void 0,n.messages=Object.entries(e82.messages??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=MessageData.fromPartial(d)),t),{}),n.modActions=Object.entries(e82.modActions??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=ModActionData.fromPartial(d)),t),{}),n.participantSubreddit=e82.participantSubreddit!==void 0&&e82.participantSubreddit!==null?Any.fromPartial(e82.participantSubreddit):void 0,n.user=e82.user!==void 0&&e82.user!==null?ConversationUserData.fromPartial(e82.user):void 0,n}};messageTypeRegistry.set(GetConversationResponse.$type,GetConversationResponse);function createBaseGetConversationResponse_MessagesEntry(){return{key:"",value:void 0}}var GetConversationResponse_MessagesEntry={$type:"devvit.plugin.redditapi.newmodmail.GetConversationResponse.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&MessageData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetConversationResponse_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=MessageData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?MessageData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=MessageData.toJSON(e82.value)),n},create(e82){return GetConversationResponse_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetConversationResponse_MessagesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?MessageData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(GetConversationResponse_MessagesEntry.$type,GetConversationResponse_MessagesEntry);function createBaseGetConversationResponse_ModActionsEntry(){return{key:"",value:void 0}}var GetConversationResponse_ModActionsEntry={$type:"devvit.plugin.redditapi.newmodmail.GetConversationResponse.ModActionsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ModActionData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetConversationResponse_ModActionsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ModActionData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ModActionData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ModActionData.toJSON(e82.value)),n},create(e82){return GetConversationResponse_ModActionsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetConversationResponse_ModActionsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ModActionData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(GetConversationResponse_ModActionsEntry.$type,GetConversationResponse_ModActionsEntry);function createBaseCreateConversationMessageResponse(){return{conversation:void 0,messages:{},user:void 0}}var CreateConversationMessageResponse={$type:"devvit.plugin.redditapi.newmodmail.CreateConversationMessageResponse",encode(e82,n=_m0.Writer.create()){return e82.conversation!==void 0&&ConversationData.encode(e82.conversation,n.uint32(10).fork()).ldelim(),Object.entries(e82.messages).forEach(([t,o])=>{CreateConversationMessageResponse_MessagesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),e82.user!==void 0&&ConversationUserData.encode(e82.user,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCreateConversationMessageResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversation=ConversationData.decode(t,t.uint32());continue;case 2:if(r!==18)break;let a=CreateConversationMessageResponse_MessagesEntry.decode(t,t.uint32());a.value!==void 0&&(d.messages[a.key]=a.value);continue;case 3:if(r!==26)break;d.user=ConversationUserData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversation:isSet$j(e82.conversation)?ConversationData.fromJSON(e82.conversation):void 0,messages:isObject$e(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=MessageData.fromJSON(o),n),{}):{},user:isSet$j(e82.user)?ConversationUserData.fromJSON(e82.user):void 0}},toJSON(e82){let n={};if(e82.conversation!==void 0&&(n.conversation=ConversationData.toJSON(e82.conversation)),e82.messages){let t=Object.entries(e82.messages);t.length>0&&(n.messages={},t.forEach(([o,d])=>{n.messages[o]=MessageData.toJSON(d)}))}return e82.user!==void 0&&(n.user=ConversationUserData.toJSON(e82.user)),n},create(e82){return CreateConversationMessageResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCreateConversationMessageResponse();return n.conversation=e82.conversation!==void 0&&e82.conversation!==null?ConversationData.fromPartial(e82.conversation):void 0,n.messages=Object.entries(e82.messages??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=MessageData.fromPartial(d)),t),{}),n.user=e82.user!==void 0&&e82.user!==null?ConversationUserData.fromPartial(e82.user):void 0,n}};messageTypeRegistry.set(CreateConversationMessageResponse.$type,CreateConversationMessageResponse);function createBaseCreateConversationMessageResponse_MessagesEntry(){return{key:"",value:void 0}}var CreateConversationMessageResponse_MessagesEntry={$type:"devvit.plugin.redditapi.newmodmail.CreateConversationMessageResponse.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&MessageData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCreateConversationMessageResponse_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=MessageData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?MessageData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=MessageData.toJSON(e82.value)),n},create(e82){return CreateConversationMessageResponse_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCreateConversationMessageResponse_MessagesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?MessageData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(CreateConversationMessageResponse_MessagesEntry.$type,CreateConversationMessageResponse_MessagesEntry);function createBaseApproveConversationResponse(){return{conversations:void 0,messages:{},user:void 0,modActions:{},fields:[],reason:void 0,message:void 0,explanation:void 0}}var ApproveConversationResponse={$type:"devvit.plugin.redditapi.newmodmail.ApproveConversationResponse",encode(e82,n=_m0.Writer.create()){e82.conversations!==void 0&&ConversationData.encode(e82.conversations,n.uint32(10).fork()).ldelim(),Object.entries(e82.messages).forEach(([t,o])=>{ApproveConversationResponse_MessagesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),e82.user!==void 0&&ConversationUserData.encode(e82.user,n.uint32(26).fork()).ldelim(),Object.entries(e82.modActions).forEach(([t,o])=>{ApproveConversationResponse_ModActionsEntry.encode({key:t,value:o},n.uint32(34).fork()).ldelim()});for(let t of e82.fields)StringValue.encode({value:t},n.uint32(42).fork()).ldelim();return e82.reason!==void 0&&StringValue.encode({value:e82.reason},n.uint32(50).fork()).ldelim(),e82.message!==void 0&&StringValue.encode({value:e82.message},n.uint32(58).fork()).ldelim(),e82.explanation!==void 0&&StringValue.encode({value:e82.explanation},n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseApproveConversationResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversations=ConversationData.decode(t,t.uint32());continue;case 2:if(r!==18)break;let a=ApproveConversationResponse_MessagesEntry.decode(t,t.uint32());a.value!==void 0&&(d.messages[a.key]=a.value);continue;case 3:if(r!==26)break;d.user=ConversationUserData.decode(t,t.uint32());continue;case 4:if(r!==34)break;let u=ApproveConversationResponse_ModActionsEntry.decode(t,t.uint32());u.value!==void 0&&(d.modActions[u.key]=u.value);continue;case 5:if(r!==42)break;d.fields.push(StringValue.decode(t,t.uint32()).value);continue;case 6:if(r!==50)break;d.reason=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.message=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.explanation=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversations:isSet$j(e82.conversations)?ConversationData.fromJSON(e82.conversations):void 0,messages:isObject$e(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=MessageData.fromJSON(o),n),{}):{},user:isSet$j(e82.user)?ConversationUserData.fromJSON(e82.user):void 0,modActions:isObject$e(e82.modActions)?Object.entries(e82.modActions).reduce((n,[t,o])=>(n[t]=ModActionData.fromJSON(o),n),{}):{},fields:globalThis.Array.isArray(e82?.fields)?e82.fields.map(n=>String(n)):[],reason:isSet$j(e82.reason)?String(e82.reason):void 0,message:isSet$j(e82.message)?String(e82.message):void 0,explanation:isSet$j(e82.explanation)?String(e82.explanation):void 0}},toJSON(e82){var t;let n={};if(e82.conversations!==void 0&&(n.conversations=ConversationData.toJSON(e82.conversations)),e82.messages){let o=Object.entries(e82.messages);o.length>0&&(n.messages={},o.forEach(([d,r])=>{n.messages[d]=MessageData.toJSON(r)}))}if(e82.user!==void 0&&(n.user=ConversationUserData.toJSON(e82.user)),e82.modActions){let o=Object.entries(e82.modActions);o.length>0&&(n.modActions={},o.forEach(([d,r])=>{n.modActions[d]=ModActionData.toJSON(r)}))}return(t=e82.fields)!=null&&t.length&&(n.fields=e82.fields),e82.reason!==void 0&&(n.reason=e82.reason),e82.message!==void 0&&(n.message=e82.message),e82.explanation!==void 0&&(n.explanation=e82.explanation),n},create(e82){return ApproveConversationResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseApproveConversationResponse();return n.conversations=e82.conversations!==void 0&&e82.conversations!==null?ConversationData.fromPartial(e82.conversations):void 0,n.messages=Object.entries(e82.messages??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=MessageData.fromPartial(r)),o),{}),n.user=e82.user!==void 0&&e82.user!==null?ConversationUserData.fromPartial(e82.user):void 0,n.modActions=Object.entries(e82.modActions??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=ModActionData.fromPartial(r)),o),{}),n.fields=((t=e82.fields)==null?void 0:t.map(o=>o))||[],n.reason=e82.reason??void 0,n.message=e82.message??void 0,n.explanation=e82.explanation??void 0,n}};messageTypeRegistry.set(ApproveConversationResponse.$type,ApproveConversationResponse);function createBaseApproveConversationResponse_MessagesEntry(){return{key:"",value:void 0}}var ApproveConversationResponse_MessagesEntry={$type:"devvit.plugin.redditapi.newmodmail.ApproveConversationResponse.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&MessageData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseApproveConversationResponse_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=MessageData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?MessageData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=MessageData.toJSON(e82.value)),n},create(e82){return ApproveConversationResponse_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseApproveConversationResponse_MessagesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?MessageData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(ApproveConversationResponse_MessagesEntry.$type,ApproveConversationResponse_MessagesEntry);function createBaseApproveConversationResponse_ModActionsEntry(){return{key:"",value:void 0}}var ApproveConversationResponse_ModActionsEntry={$type:"devvit.plugin.redditapi.newmodmail.ApproveConversationResponse.ModActionsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ModActionData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseApproveConversationResponse_ModActionsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ModActionData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ModActionData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ModActionData.toJSON(e82.value)),n},create(e82){return ApproveConversationResponse_ModActionsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseApproveConversationResponse_ModActionsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ModActionData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(ApproveConversationResponse_ModActionsEntry.$type,ApproveConversationResponse_ModActionsEntry);function createBaseArchiveConversationResponse(){return{conversations:void 0,messages:{},modActions:{},conversation:void 0}}var ArchiveConversationResponse={$type:"devvit.plugin.redditapi.newmodmail.ArchiveConversationResponse",encode(e82,n=_m0.Writer.create()){return e82.conversations!==void 0&&ConversationData.encode(e82.conversations,n.uint32(10).fork()).ldelim(),Object.entries(e82.messages).forEach(([t,o])=>{ArchiveConversationResponse_MessagesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),Object.entries(e82.modActions).forEach(([t,o])=>{ArchiveConversationResponse_ModActionsEntry.encode({key:t,value:o},n.uint32(26).fork()).ldelim()}),e82.conversation!==void 0&&ConversationData.encode(e82.conversation,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseArchiveConversationResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversations=ConversationData.decode(t,t.uint32());continue;case 2:if(r!==18)break;let a=ArchiveConversationResponse_MessagesEntry.decode(t,t.uint32());a.value!==void 0&&(d.messages[a.key]=a.value);continue;case 3:if(r!==26)break;let u=ArchiveConversationResponse_ModActionsEntry.decode(t,t.uint32());u.value!==void 0&&(d.modActions[u.key]=u.value);continue;case 4:if(r!==34)break;d.conversation=ConversationData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversations:isSet$j(e82.conversations)?ConversationData.fromJSON(e82.conversations):void 0,messages:isObject$e(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=MessageData.fromJSON(o),n),{}):{},modActions:isObject$e(e82.modActions)?Object.entries(e82.modActions).reduce((n,[t,o])=>(n[t]=ModActionData.fromJSON(o),n),{}):{},conversation:isSet$j(e82.conversation)?ConversationData.fromJSON(e82.conversation):void 0}},toJSON(e82){let n={};if(e82.conversations!==void 0&&(n.conversations=ConversationData.toJSON(e82.conversations)),e82.messages){let t=Object.entries(e82.messages);t.length>0&&(n.messages={},t.forEach(([o,d])=>{n.messages[o]=MessageData.toJSON(d)}))}if(e82.modActions){let t=Object.entries(e82.modActions);t.length>0&&(n.modActions={},t.forEach(([o,d])=>{n.modActions[o]=ModActionData.toJSON(d)}))}return e82.conversation!==void 0&&(n.conversation=ConversationData.toJSON(e82.conversation)),n},create(e82){return ArchiveConversationResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseArchiveConversationResponse();return n.conversations=e82.conversations!==void 0&&e82.conversations!==null?ConversationData.fromPartial(e82.conversations):void 0,n.messages=Object.entries(e82.messages??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=MessageData.fromPartial(d)),t),{}),n.modActions=Object.entries(e82.modActions??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=ModActionData.fromPartial(d)),t),{}),n.conversation=e82.conversation!==void 0&&e82.conversation!==null?ConversationData.fromPartial(e82.conversation):void 0,n}};messageTypeRegistry.set(ArchiveConversationResponse.$type,ArchiveConversationResponse);function createBaseArchiveConversationResponse_MessagesEntry(){return{key:"",value:void 0}}var ArchiveConversationResponse_MessagesEntry={$type:"devvit.plugin.redditapi.newmodmail.ArchiveConversationResponse.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&MessageData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseArchiveConversationResponse_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=MessageData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?MessageData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=MessageData.toJSON(e82.value)),n},create(e82){return ArchiveConversationResponse_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseArchiveConversationResponse_MessagesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?MessageData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(ArchiveConversationResponse_MessagesEntry.$type,ArchiveConversationResponse_MessagesEntry);function createBaseArchiveConversationResponse_ModActionsEntry(){return{key:"",value:void 0}}var ArchiveConversationResponse_ModActionsEntry={$type:"devvit.plugin.redditapi.newmodmail.ArchiveConversationResponse.ModActionsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ModActionData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseArchiveConversationResponse_ModActionsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ModActionData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ModActionData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ModActionData.toJSON(e82.value)),n},create(e82){return ArchiveConversationResponse_ModActionsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseArchiveConversationResponse_ModActionsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ModActionData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(ArchiveConversationResponse_ModActionsEntry.$type,ArchiveConversationResponse_ModActionsEntry);function createBaseHighlightConversationResponse(){return{conversations:void 0,messages:{},modActions:{},conversation:void 0}}var HighlightConversationResponse={$type:"devvit.plugin.redditapi.newmodmail.HighlightConversationResponse",encode(e82,n=_m0.Writer.create()){return e82.conversations!==void 0&&ConversationData.encode(e82.conversations,n.uint32(10).fork()).ldelim(),Object.entries(e82.messages).forEach(([t,o])=>{HighlightConversationResponse_MessagesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),Object.entries(e82.modActions).forEach(([t,o])=>{HighlightConversationResponse_ModActionsEntry.encode({key:t,value:o},n.uint32(26).fork()).ldelim()}),e82.conversation!==void 0&&ConversationData.encode(e82.conversation,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHighlightConversationResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversations=ConversationData.decode(t,t.uint32());continue;case 2:if(r!==18)break;let a=HighlightConversationResponse_MessagesEntry.decode(t,t.uint32());a.value!==void 0&&(d.messages[a.key]=a.value);continue;case 3:if(r!==26)break;let u=HighlightConversationResponse_ModActionsEntry.decode(t,t.uint32());u.value!==void 0&&(d.modActions[u.key]=u.value);continue;case 4:if(r!==34)break;d.conversation=ConversationData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversations:isSet$j(e82.conversations)?ConversationData.fromJSON(e82.conversations):void 0,messages:isObject$e(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=MessageData.fromJSON(o),n),{}):{},modActions:isObject$e(e82.modActions)?Object.entries(e82.modActions).reduce((n,[t,o])=>(n[t]=ModActionData.fromJSON(o),n),{}):{},conversation:isSet$j(e82.conversation)?ConversationData.fromJSON(e82.conversation):void 0}},toJSON(e82){let n={};if(e82.conversations!==void 0&&(n.conversations=ConversationData.toJSON(e82.conversations)),e82.messages){let t=Object.entries(e82.messages);t.length>0&&(n.messages={},t.forEach(([o,d])=>{n.messages[o]=MessageData.toJSON(d)}))}if(e82.modActions){let t=Object.entries(e82.modActions);t.length>0&&(n.modActions={},t.forEach(([o,d])=>{n.modActions[o]=ModActionData.toJSON(d)}))}return e82.conversation!==void 0&&(n.conversation=ConversationData.toJSON(e82.conversation)),n},create(e82){return HighlightConversationResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseHighlightConversationResponse();return n.conversations=e82.conversations!==void 0&&e82.conversations!==null?ConversationData.fromPartial(e82.conversations):void 0,n.messages=Object.entries(e82.messages??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=MessageData.fromPartial(d)),t),{}),n.modActions=Object.entries(e82.modActions??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=ModActionData.fromPartial(d)),t),{}),n.conversation=e82.conversation!==void 0&&e82.conversation!==null?ConversationData.fromPartial(e82.conversation):void 0,n}};messageTypeRegistry.set(HighlightConversationResponse.$type,HighlightConversationResponse);function createBaseHighlightConversationResponse_MessagesEntry(){return{key:"",value:void 0}}var HighlightConversationResponse_MessagesEntry={$type:"devvit.plugin.redditapi.newmodmail.HighlightConversationResponse.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&MessageData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHighlightConversationResponse_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=MessageData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?MessageData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=MessageData.toJSON(e82.value)),n},create(e82){return HighlightConversationResponse_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseHighlightConversationResponse_MessagesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?MessageData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(HighlightConversationResponse_MessagesEntry.$type,HighlightConversationResponse_MessagesEntry);function createBaseHighlightConversationResponse_ModActionsEntry(){return{key:"",value:void 0}}var HighlightConversationResponse_ModActionsEntry={$type:"devvit.plugin.redditapi.newmodmail.HighlightConversationResponse.ModActionsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ModActionData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHighlightConversationResponse_ModActionsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ModActionData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ModActionData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ModActionData.toJSON(e82.value)),n},create(e82){return HighlightConversationResponse_ModActionsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseHighlightConversationResponse_ModActionsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ModActionData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(HighlightConversationResponse_ModActionsEntry.$type,HighlightConversationResponse_ModActionsEntry);function createBaseMuteConversationResponse(){return{conversations:void 0,messages:{},user:void 0,modActions:{}}}var MuteConversationResponse={$type:"devvit.plugin.redditapi.newmodmail.MuteConversationResponse",encode(e82,n=_m0.Writer.create()){return e82.conversations!==void 0&&ConversationData.encode(e82.conversations,n.uint32(10).fork()).ldelim(),Object.entries(e82.messages).forEach(([t,o])=>{MuteConversationResponse_MessagesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),e82.user!==void 0&&ConversationUserData.encode(e82.user,n.uint32(26).fork()).ldelim(),Object.entries(e82.modActions).forEach(([t,o])=>{MuteConversationResponse_ModActionsEntry.encode({key:t,value:o},n.uint32(34).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMuteConversationResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversations=ConversationData.decode(t,t.uint32());continue;case 2:if(r!==18)break;let a=MuteConversationResponse_MessagesEntry.decode(t,t.uint32());a.value!==void 0&&(d.messages[a.key]=a.value);continue;case 3:if(r!==26)break;d.user=ConversationUserData.decode(t,t.uint32());continue;case 4:if(r!==34)break;let u=MuteConversationResponse_ModActionsEntry.decode(t,t.uint32());u.value!==void 0&&(d.modActions[u.key]=u.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversations:isSet$j(e82.conversations)?ConversationData.fromJSON(e82.conversations):void 0,messages:isObject$e(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=MessageData.fromJSON(o),n),{}):{},user:isSet$j(e82.user)?ConversationUserData.fromJSON(e82.user):void 0,modActions:isObject$e(e82.modActions)?Object.entries(e82.modActions).reduce((n,[t,o])=>(n[t]=ModActionData.fromJSON(o),n),{}):{}}},toJSON(e82){let n={};if(e82.conversations!==void 0&&(n.conversations=ConversationData.toJSON(e82.conversations)),e82.messages){let t=Object.entries(e82.messages);t.length>0&&(n.messages={},t.forEach(([o,d])=>{n.messages[o]=MessageData.toJSON(d)}))}if(e82.user!==void 0&&(n.user=ConversationUserData.toJSON(e82.user)),e82.modActions){let t=Object.entries(e82.modActions);t.length>0&&(n.modActions={},t.forEach(([o,d])=>{n.modActions[o]=ModActionData.toJSON(d)}))}return n},create(e82){return MuteConversationResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMuteConversationResponse();return n.conversations=e82.conversations!==void 0&&e82.conversations!==null?ConversationData.fromPartial(e82.conversations):void 0,n.messages=Object.entries(e82.messages??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=MessageData.fromPartial(d)),t),{}),n.user=e82.user!==void 0&&e82.user!==null?ConversationUserData.fromPartial(e82.user):void 0,n.modActions=Object.entries(e82.modActions??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=ModActionData.fromPartial(d)),t),{}),n}};messageTypeRegistry.set(MuteConversationResponse.$type,MuteConversationResponse);function createBaseMuteConversationResponse_MessagesEntry(){return{key:"",value:void 0}}var MuteConversationResponse_MessagesEntry={$type:"devvit.plugin.redditapi.newmodmail.MuteConversationResponse.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&MessageData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMuteConversationResponse_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=MessageData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?MessageData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=MessageData.toJSON(e82.value)),n},create(e82){return MuteConversationResponse_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMuteConversationResponse_MessagesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?MessageData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(MuteConversationResponse_MessagesEntry.$type,MuteConversationResponse_MessagesEntry);function createBaseMuteConversationResponse_ModActionsEntry(){return{key:"",value:void 0}}var MuteConversationResponse_ModActionsEntry={$type:"devvit.plugin.redditapi.newmodmail.MuteConversationResponse.ModActionsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ModActionData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMuteConversationResponse_ModActionsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ModActionData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ModActionData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ModActionData.toJSON(e82.value)),n},create(e82){return MuteConversationResponse_ModActionsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMuteConversationResponse_ModActionsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ModActionData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(MuteConversationResponse_ModActionsEntry.$type,MuteConversationResponse_ModActionsEntry);function createBaseTempBanResponse(){return{conversations:void 0,messages:{},user:void 0,modActions:{},fields:[],reason:void 0,message:void 0}}var TempBanResponse={$type:"devvit.plugin.redditapi.newmodmail.TempBanResponse",encode(e82,n=_m0.Writer.create()){e82.conversations!==void 0&&ConversationData.encode(e82.conversations,n.uint32(10).fork()).ldelim(),Object.entries(e82.messages).forEach(([t,o])=>{TempBanResponse_MessagesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),e82.user!==void 0&&ConversationUserData.encode(e82.user,n.uint32(26).fork()).ldelim(),Object.entries(e82.modActions).forEach(([t,o])=>{TempBanResponse_ModActionsEntry.encode({key:t,value:o},n.uint32(34).fork()).ldelim()});for(let t of e82.fields)StringValue.encode({value:t},n.uint32(42).fork()).ldelim();return e82.reason!==void 0&&StringValue.encode({value:e82.reason},n.uint32(50).fork()).ldelim(),e82.message!==void 0&&StringValue.encode({value:e82.message},n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTempBanResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.conversations=ConversationData.decode(t,t.uint32());continue;case 2:if(r!==18)break;let a=TempBanResponse_MessagesEntry.decode(t,t.uint32());a.value!==void 0&&(d.messages[a.key]=a.value);continue;case 3:if(r!==26)break;d.user=ConversationUserData.decode(t,t.uint32());continue;case 4:if(r!==34)break;let u=TempBanResponse_ModActionsEntry.decode(t,t.uint32());u.value!==void 0&&(d.modActions[u.key]=u.value);continue;case 5:if(r!==42)break;d.fields.push(StringValue.decode(t,t.uint32()).value);continue;case 6:if(r!==50)break;d.reason=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.message=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{conversations:isSet$j(e82.conversations)?ConversationData.fromJSON(e82.conversations):void 0,messages:isObject$e(e82.messages)?Object.entries(e82.messages).reduce((n,[t,o])=>(n[t]=MessageData.fromJSON(o),n),{}):{},user:isSet$j(e82.user)?ConversationUserData.fromJSON(e82.user):void 0,modActions:isObject$e(e82.modActions)?Object.entries(e82.modActions).reduce((n,[t,o])=>(n[t]=ModActionData.fromJSON(o),n),{}):{},fields:globalThis.Array.isArray(e82?.fields)?e82.fields.map(n=>String(n)):[],reason:isSet$j(e82.reason)?String(e82.reason):void 0,message:isSet$j(e82.message)?String(e82.message):void 0}},toJSON(e82){var t;let n={};if(e82.conversations!==void 0&&(n.conversations=ConversationData.toJSON(e82.conversations)),e82.messages){let o=Object.entries(e82.messages);o.length>0&&(n.messages={},o.forEach(([d,r])=>{n.messages[d]=MessageData.toJSON(r)}))}if(e82.user!==void 0&&(n.user=ConversationUserData.toJSON(e82.user)),e82.modActions){let o=Object.entries(e82.modActions);o.length>0&&(n.modActions={},o.forEach(([d,r])=>{n.modActions[d]=ModActionData.toJSON(r)}))}return(t=e82.fields)!=null&&t.length&&(n.fields=e82.fields),e82.reason!==void 0&&(n.reason=e82.reason),e82.message!==void 0&&(n.message=e82.message),n},create(e82){return TempBanResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseTempBanResponse();return n.conversations=e82.conversations!==void 0&&e82.conversations!==null?ConversationData.fromPartial(e82.conversations):void 0,n.messages=Object.entries(e82.messages??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=MessageData.fromPartial(r)),o),{}),n.user=e82.user!==void 0&&e82.user!==null?ConversationUserData.fromPartial(e82.user):void 0,n.modActions=Object.entries(e82.modActions??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=ModActionData.fromPartial(r)),o),{}),n.fields=((t=e82.fields)==null?void 0:t.map(o=>o))||[],n.reason=e82.reason??void 0,n.message=e82.message??void 0,n}};messageTypeRegistry.set(TempBanResponse.$type,TempBanResponse);function createBaseTempBanResponse_MessagesEntry(){return{key:"",value:void 0}}var TempBanResponse_MessagesEntry={$type:"devvit.plugin.redditapi.newmodmail.TempBanResponse.MessagesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&MessageData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTempBanResponse_MessagesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=MessageData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?MessageData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=MessageData.toJSON(e82.value)),n},create(e82){return TempBanResponse_MessagesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseTempBanResponse_MessagesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?MessageData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(TempBanResponse_MessagesEntry.$type,TempBanResponse_MessagesEntry);function createBaseTempBanResponse_ModActionsEntry(){return{key:"",value:void 0}}var TempBanResponse_ModActionsEntry={$type:"devvit.plugin.redditapi.newmodmail.TempBanResponse.ModActionsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&ModActionData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTempBanResponse_ModActionsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=ModActionData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?ModActionData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=ModActionData.toJSON(e82.value)),n},create(e82){return TempBanResponse_ModActionsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseTempBanResponse_ModActionsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?ModActionData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(TempBanResponse_ModActionsEntry.$type,TempBanResponse_ModActionsEntry);function createBaseSubredditsResponse(){return{subreddits:{}}}var SubredditsResponse={$type:"devvit.plugin.redditapi.newmodmail.SubredditsResponse",encode(e82,n=_m0.Writer.create()){return Object.entries(e82.subreddits).forEach(([t,o])=>{SubredditsResponse_SubredditsEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=SubredditsResponse_SubredditsEntry.decode(t,t.uint32());a.value!==void 0&&(d.subreddits[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddits:isObject$e(e82.subreddits)?Object.entries(e82.subreddits).reduce((n,[t,o])=>(n[t]=SubredditsResponse_SubredditData.fromJSON(o),n),{}):{}}},toJSON(e82){let n={};if(e82.subreddits){let t=Object.entries(e82.subreddits);t.length>0&&(n.subreddits={},t.forEach(([o,d])=>{n.subreddits[o]=SubredditsResponse_SubredditData.toJSON(d)}))}return n},create(e82){return SubredditsResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditsResponse();return n.subreddits=Object.entries(e82.subreddits??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=SubredditsResponse_SubredditData.fromPartial(d)),t),{}),n}};messageTypeRegistry.set(SubredditsResponse.$type,SubredditsResponse);function createBaseSubredditsResponse_SubredditData(){return{communityIcon:void 0,keyColor:void 0,displayName:void 0,name:void 0,subscribers:void 0,primaryColor:void 0,id:void 0,lastUpdated:void 0,icon:void 0}}var SubredditsResponse_SubredditData={$type:"devvit.plugin.redditapi.newmodmail.SubredditsResponse.SubredditData",encode(e82,n=_m0.Writer.create()){return e82.communityIcon!==void 0&&StringValue.encode({value:e82.communityIcon},n.uint32(10).fork()).ldelim(),e82.keyColor!==void 0&&StringValue.encode({value:e82.keyColor},n.uint32(18).fork()).ldelim(),e82.displayName!==void 0&&StringValue.encode({value:e82.displayName},n.uint32(26).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(34).fork()).ldelim(),e82.subscribers!==void 0&&Int32Value.encode({value:e82.subscribers},n.uint32(42).fork()).ldelim(),e82.primaryColor!==void 0&&StringValue.encode({value:e82.primaryColor},n.uint32(50).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(58).fork()).ldelim(),e82.lastUpdated!==void 0&&StringValue.encode({value:e82.lastUpdated},n.uint32(66).fork()).ldelim(),e82.icon!==void 0&&StringValue.encode({value:e82.icon},n.uint32(74).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditsResponse_SubredditData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.communityIcon=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.keyColor=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.displayName=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.subscribers=Int32Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.primaryColor=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.lastUpdated=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.icon=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{communityIcon:isSet$j(e82.communityIcon)?String(e82.communityIcon):void 0,keyColor:isSet$j(e82.keyColor)?String(e82.keyColor):void 0,displayName:isSet$j(e82.displayName)?String(e82.displayName):void 0,name:isSet$j(e82.name)?String(e82.name):void 0,subscribers:isSet$j(e82.subscribers)?Number(e82.subscribers):void 0,primaryColor:isSet$j(e82.primaryColor)?String(e82.primaryColor):void 0,id:isSet$j(e82.id)?String(e82.id):void 0,lastUpdated:isSet$j(e82.lastUpdated)?String(e82.lastUpdated):void 0,icon:isSet$j(e82.icon)?String(e82.icon):void 0}},toJSON(e82){let n={};return e82.communityIcon!==void 0&&(n.communityIcon=e82.communityIcon),e82.keyColor!==void 0&&(n.keyColor=e82.keyColor),e82.displayName!==void 0&&(n.displayName=e82.displayName),e82.name!==void 0&&(n.name=e82.name),e82.subscribers!==void 0&&(n.subscribers=e82.subscribers),e82.primaryColor!==void 0&&(n.primaryColor=e82.primaryColor),e82.id!==void 0&&(n.id=e82.id),e82.lastUpdated!==void 0&&(n.lastUpdated=e82.lastUpdated),e82.icon!==void 0&&(n.icon=e82.icon),n},create(e82){return SubredditsResponse_SubredditData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditsResponse_SubredditData();return n.communityIcon=e82.communityIcon??void 0,n.keyColor=e82.keyColor??void 0,n.displayName=e82.displayName??void 0,n.name=e82.name??void 0,n.subscribers=e82.subscribers??void 0,n.primaryColor=e82.primaryColor??void 0,n.id=e82.id??void 0,n.lastUpdated=e82.lastUpdated??void 0,n.icon=e82.icon??void 0,n}};messageTypeRegistry.set(SubredditsResponse_SubredditData.$type,SubredditsResponse_SubredditData);function createBaseSubredditsResponse_SubredditsEntry(){return{key:"",value:void 0}}var SubredditsResponse_SubredditsEntry={$type:"devvit.plugin.redditapi.newmodmail.SubredditsResponse.SubredditsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&SubredditsResponse_SubredditData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditsResponse_SubredditsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=SubredditsResponse_SubredditData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$j(e82.key)?globalThis.String(e82.key):"",value:isSet$j(e82.value)?SubredditsResponse_SubredditData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=SubredditsResponse_SubredditData.toJSON(e82.value)),n},create(e82){return SubredditsResponse_SubredditsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditsResponse_SubredditsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?SubredditsResponse_SubredditData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(SubredditsResponse_SubredditsEntry.$type,SubredditsResponse_SubredditsEntry);function createBaseUnreadCountResponse(){return{archived:void 0,appeals:void 0,highlighted:void 0,notifications:void 0,joinRequests:void 0,filtered:void 0,new:void 0,inprogress:void 0,mod:void 0}}var UnreadCountResponse={$type:"devvit.plugin.redditapi.newmodmail.UnreadCountResponse",encode(e82,n=_m0.Writer.create()){return e82.archived!==void 0&&Int32Value.encode({value:e82.archived},n.uint32(10).fork()).ldelim(),e82.appeals!==void 0&&Int32Value.encode({value:e82.appeals},n.uint32(18).fork()).ldelim(),e82.highlighted!==void 0&&Int32Value.encode({value:e82.highlighted},n.uint32(26).fork()).ldelim(),e82.notifications!==void 0&&Int32Value.encode({value:e82.notifications},n.uint32(34).fork()).ldelim(),e82.joinRequests!==void 0&&Int32Value.encode({value:e82.joinRequests},n.uint32(42).fork()).ldelim(),e82.filtered!==void 0&&Int32Value.encode({value:e82.filtered},n.uint32(50).fork()).ldelim(),e82.new!==void 0&&Int32Value.encode({value:e82.new},n.uint32(58).fork()).ldelim(),e82.inprogress!==void 0&&Int32Value.encode({value:e82.inprogress},n.uint32(66).fork()).ldelim(),e82.mod!==void 0&&Int32Value.encode({value:e82.mod},n.uint32(74).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUnreadCountResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.archived=Int32Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.appeals=Int32Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.highlighted=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.notifications=Int32Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.joinRequests=Int32Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.filtered=Int32Value.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.new=Int32Value.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.inprogress=Int32Value.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.mod=Int32Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{archived:isSet$j(e82.archived)?Number(e82.archived):void 0,appeals:isSet$j(e82.appeals)?Number(e82.appeals):void 0,highlighted:isSet$j(e82.highlighted)?Number(e82.highlighted):void 0,notifications:isSet$j(e82.notifications)?Number(e82.notifications):void 0,joinRequests:isSet$j(e82.joinRequests)?Number(e82.joinRequests):void 0,filtered:isSet$j(e82.filtered)?Number(e82.filtered):void 0,new:isSet$j(e82.new)?Number(e82.new):void 0,inprogress:isSet$j(e82.inprogress)?Number(e82.inprogress):void 0,mod:isSet$j(e82.mod)?Number(e82.mod):void 0}},toJSON(e82){let n={};return e82.archived!==void 0&&(n.archived=e82.archived),e82.appeals!==void 0&&(n.appeals=e82.appeals),e82.highlighted!==void 0&&(n.highlighted=e82.highlighted),e82.notifications!==void 0&&(n.notifications=e82.notifications),e82.joinRequests!==void 0&&(n.joinRequests=e82.joinRequests),e82.filtered!==void 0&&(n.filtered=e82.filtered),e82.new!==void 0&&(n.new=e82.new),e82.inprogress!==void 0&&(n.inprogress=e82.inprogress),e82.mod!==void 0&&(n.mod=e82.mod),n},create(e82){return UnreadCountResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUnreadCountResponse();return n.archived=e82.archived??void 0,n.appeals=e82.appeals??void 0,n.highlighted=e82.highlighted??void 0,n.notifications=e82.notifications??void 0,n.joinRequests=e82.joinRequests??void 0,n.filtered=e82.filtered??void 0,n.new=e82.new??void 0,n.inprogress=e82.inprogress??void 0,n.mod=e82.mod??void 0,n}};messageTypeRegistry.set(UnreadCountResponse.$type,UnreadCountResponse);function isObject$e(e82){return typeof e82=="object"&&e82!==null}function isSet$j(e82){return e82!=null}var NewModmailDefinition={name:"NewModmail",fullName:"devvit.plugin.redditapi.newmodmail.NewModmail",methods:{bulkReadConversations:{name:"BulkReadConversations",requestType:BulkReadConversationsRequest,requestStream:!1,responseType:BulkReadConversationsResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([34,18,32,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,98,117,108,107,47,114,101,97,100]),new Uint8Array([2,24,3])]}}},getConversations:{name:"GetConversations",requestType:GetConversationsRequest,requestStream:!1,responseType:GetConversationsResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([94,18,92,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,101,110,116,105,116,121,61,123,101,110,116,105,116,121,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,111,114,116,61,123,115,111,114,116,125,38,115,116,97,116,101,61,123,115,116,97,116,101,125]),new Uint8Array([2,64,1])]}}},createConversation:{name:"CreateConversation",requestType:CreateConversationRequest,requestStream:!1,responseType:CreateConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([24,18,22,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115]),new Uint8Array([2,24,3])]}}},getConversation:{name:"GetConversation",requestType:GetConversationRequest,requestStream:!1,responseType:GetConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([63,18,61,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,63,109,97,114,107,82,101,97,100,61,123,109,97,114,107,95,114,101,97,100,125]),new Uint8Array([2,64,1])]}}},createConversationMessage:{name:"CreateConversationMessage",requestType:CreateConversationMessageRequest,requestStream:!1,responseType:CreateConversationMessageResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([42,18,40,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125]),new Uint8Array([2,24,3])]}}},approveConversation:{name:"ApproveConversation",requestType:BasicConversationRequest,requestStream:!1,responseType:ApproveConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([50,18,48,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,97,112,112,114,111,118,101])]}}},archiveConversation:{name:"ArchiveConversation",requestType:BasicConversationRequest,requestStream:!1,responseType:ArchiveConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([50,18,48,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,97,114,99,104,105,118,101])]}}},disapproveConversation:{name:"DisapproveConversation",requestType:BasicConversationRequest,requestStream:!1,responseType:ApproveConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([53,18,51,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,100,105,115,97,112,112,114,111,118,101])]}}},unhighlightConversation:{name:"UnhighlightConversation",requestType:BasicConversationRequest,requestStream:!1,responseType:HighlightConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([8,10,6,68,69,76,69,84,69]),new Uint8Array([52,18,50,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,104,105,103,104,108,105,103,104,116])]}}},highlightConversation:{name:"HighlightConversation",requestType:BasicConversationRequest,requestStream:!1,responseType:HighlightConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([52,18,50,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,104,105,103,104,108,105,103,104,116])]}}},muteConversation:{name:"MuteConversation",requestType:MuteConversationRequest,requestStream:!1,responseType:MuteConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([47,18,45,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,109,117,116,101]),new Uint8Array([2,24,4])]}}},tempBan:{name:"TempBan",requestType:TempBanRequest,requestStream:!1,responseType:TempBanResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([51,18,49,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,116,101,109,112,95,98,97,110]),new Uint8Array([2,24,1])]}}},unarchiveConversation:{name:"UnarchiveConversation",requestType:BasicConversationRequest,requestStream:!1,responseType:ArchiveConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([52,18,50,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,117,110,97,114,99,104,105,118,101])]}}},unban:{name:"Unban",requestType:BasicConversationRequest,requestStream:!1,responseType:TempBanResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([48,18,46,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,117,110,98,97,110])]}}},unmuteConversation:{name:"UnmuteConversation",requestType:BasicConversationRequest,requestStream:!1,responseType:MuteConversationResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([49,18,47,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,117,110,109,117,116,101])]}}},userConversations:{name:"UserConversations",requestType:BasicConversationRequest,requestStream:!1,responseType:ConversationUserData,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([47,18,45,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,123,99,111,110,118,101,114,115,97,116,105,111,110,95,105,100,125,47,117,115,101,114])]}}},read:{name:"Read",requestType:BasicConversationsRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([29,18,27,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,114,101,97,100]),new Uint8Array([2,24,3])]}}},subreddits:{name:"Subreddits",requestType:Empty$1,requestStream:!1,responseType:SubredditsResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([35,18,33,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,115,117,98,114,101,100,100,105,116,115])]}}},unread:{name:"Unread",requestType:BasicConversationsRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([31,18,29,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,117,110,114,101,97,100]),new Uint8Array([2,24,3])]}}},unreadCount:{name:"UnreadCount",requestType:Empty$1,requestStream:!1,responseType:UnreadCountResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([37,18,35,47,97,112,105,47,109,111,100,47,99,111,110,118,101,114,115,97,116,105,111,110,115,47,117,110,114,101,97,100,47,99,111,117,110,116])]}}}}};function createBaseGenericPrivateMessagesRequest(){return{id:""}}var GenericPrivateMessagesRequest={$type:"devvit.plugin.redditapi.privatemessages.GenericPrivateMessagesRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGenericPrivateMessagesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$i(e82.id)?globalThis.String(e82.id):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),n},create(e82){return GenericPrivateMessagesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGenericPrivateMessagesRequest();return n.id=e82.id??"",n}};messageTypeRegistry.set(GenericPrivateMessagesRequest.$type,GenericPrivateMessagesRequest);function createBaseComposeRequest(){return{to:"",subject:"",text:"",fromSr:""}}var ComposeRequest={$type:"devvit.plugin.redditapi.privatemessages.ComposeRequest",encode(e82,n=_m0.Writer.create()){return e82.to!==""&&n.uint32(10).string(e82.to),e82.subject!==""&&n.uint32(18).string(e82.subject),e82.text!==""&&n.uint32(26).string(e82.text),e82.fromSr!==""&&n.uint32(34).string(e82.fromSr),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseComposeRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.to=t.string();continue;case 2:if(r!==18)break;d.subject=t.string();continue;case 3:if(r!==26)break;d.text=t.string();continue;case 4:if(r!==34)break;d.fromSr=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{to:isSet$i(e82.to)?globalThis.String(e82.to):"",subject:isSet$i(e82.subject)?globalThis.String(e82.subject):"",text:isSet$i(e82.text)?globalThis.String(e82.text):"",fromSr:isSet$i(e82.fromSr)?globalThis.String(e82.fromSr):""}},toJSON(e82){let n={};return e82.to!==""&&(n.to=e82.to),e82.subject!==""&&(n.subject=e82.subject),e82.text!==""&&(n.text=e82.text),e82.fromSr!==""&&(n.fromSr=e82.fromSr),n},create(e82){return ComposeRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseComposeRequest();return n.to=e82.to??"",n.subject=e82.subject??"",n.text=e82.text??"",n.fromSr=e82.fromSr??"",n}};messageTypeRegistry.set(ComposeRequest.$type,ComposeRequest);function createBaseReadAllMessagesRequest(){return{filterTypes:""}}var ReadAllMessagesRequest={$type:"devvit.plugin.redditapi.privatemessages.ReadAllMessagesRequest",encode(e82,n=_m0.Writer.create()){return e82.filterTypes!==""&&n.uint32(10).string(e82.filterTypes),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseReadAllMessagesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.filterTypes=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{filterTypes:isSet$i(e82.filterTypes)?globalThis.String(e82.filterTypes):""}},toJSON(e82){let n={};return e82.filterTypes!==""&&(n.filterTypes=e82.filterTypes),n},create(e82){return ReadAllMessagesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseReadAllMessagesRequest();return n.filterTypes=e82.filterTypes??"",n}};messageTypeRegistry.set(ReadAllMessagesRequest.$type,ReadAllMessagesRequest);function createBaseMessageWhereRequest(){return{where:"",mark:void 0,mid:void 0,after:void 0,before:void 0,count:void 0,limit:void 0,show:void 0}}var MessageWhereRequest={$type:"devvit.plugin.redditapi.privatemessages.MessageWhereRequest",encode(e82,n=_m0.Writer.create()){return e82.where!==""&&n.uint32(10).string(e82.where),e82.mark!==void 0&&BoolValue.encode({value:e82.mark},n.uint32(18).fork()).ldelim(),e82.mid!==void 0&&StringValue.encode({value:e82.mid},n.uint32(26).fork()).ldelim(),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(34).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(42).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(50).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(58).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMessageWhereRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.where=t.string();continue;case 2:if(r!==18)break;d.mark=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.mid=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.show=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{where:isSet$i(e82.where)?globalThis.String(e82.where):"",mark:isSet$i(e82.mark)?!!e82.mark:void 0,mid:isSet$i(e82.mid)?String(e82.mid):void 0,after:isSet$i(e82.after)?String(e82.after):void 0,before:isSet$i(e82.before)?String(e82.before):void 0,count:isSet$i(e82.count)?Number(e82.count):void 0,limit:isSet$i(e82.limit)?Number(e82.limit):void 0,show:isSet$i(e82.show)?String(e82.show):void 0}},toJSON(e82){let n={};return e82.where!==""&&(n.where=e82.where),e82.mark!==void 0&&(n.mark=e82.mark),e82.mid!==void 0&&(n.mid=e82.mid),e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.show!==void 0&&(n.show=e82.show),n},create(e82){return MessageWhereRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseMessageWhereRequest();return n.where=e82.where??"",n.mark=e82.mark??void 0,n.mid=e82.mid??void 0,n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.show=e82.show??void 0,n}};messageTypeRegistry.set(MessageWhereRequest.$type,MessageWhereRequest);function isSet$i(e82){return e82!=null}var PrivateMessagesDefinition={name:"PrivateMessages",fullName:"devvit.plugin.redditapi.privatemessages.PrivateMessages",methods:{block:{name:"Block",requestType:GenericPrivateMessagesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([12,18,10,47,97,112,105,47,98,108,111,99,107]),new Uint8Array([2,24,3])]}}},collapseMessage:{name:"CollapseMessage",requestType:GenericPrivateMessagesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([28,18,26,47,97,112,105,47,99,111,108,108,97,112,115,101,95,109,101,115,115,97,103,101,46,106,115,111,110]),new Uint8Array([2,24,1])]}}},compose:{name:"Compose",requestType:ComposeRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([14,18,12,47,97,112,105,47,99,111,109,112,111,115,101]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},delMsg:{name:"DelMsg",requestType:GenericPrivateMessagesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([19,18,17,47,97,112,105,47,100,101,108,95,109,115,103,46,106,115,111,110]),new Uint8Array([2,24,1])]}}},readAllMessages:{name:"ReadAllMessages",requestType:ReadAllMessagesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([29,18,27,47,97,112,105,47,114,101,97,100,95,97,108,108,95,109,101,115,115,97,103,101,115,46,106,115,111,110]),new Uint8Array([2,24,1])]}}},readMessage:{name:"ReadMessage",requestType:GenericPrivateMessagesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([24,18,22,47,97,112,105,47,114,101,97,100,95,109,101,115,115,97,103,101,46,106,115,111,110]),new Uint8Array([2,24,1])]}}},unblockSubreddit:{name:"UnblockSubreddit",requestType:GenericPrivateMessagesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([29,18,27,47,97,112,105,47,117,110,98,108,111,99,107,95,115,117,98,114,101,100,100,105,116,46,106,115,111,110]),new Uint8Array([2,24,1])]}}},uncollapseMessage:{name:"UncollapseMessage",requestType:GenericPrivateMessagesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([30,18,28,47,97,112,105,47,117,110,99,111,108,108,97,112,115,101,95,109,101,115,115,97,103,101,46,106,115,111,110]),new Uint8Array([2,24,1])]}}},unreadMessage:{name:"UnreadMessage",requestType:GenericPrivateMessagesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([26,18,24,47,97,112,105,47,117,110,114,101,97,100,95,109,101,115,115,97,103,101,46,106,115,111,110]),new Uint8Array([2,24,1])]}}},messageWhere:{name:"MessageWhere",requestType:MessageWhereRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([115,18,113,47,109,101,115,115,97,103,101,47,123,119,104,101,114,101,125,46,106,115,111,110,63,109,97,114,107,61,123,109,97,114,107,125,38,109,105,100,61,123,109,105,100,125,38,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125])]}}}}};function createBaseAboutWhereRequest(){return{after:void 0,before:void 0,count:void 0,limit:void 0,show:void 0,user:void 0,subreddit:void 0,where:""}}var AboutWhereRequest={$type:"devvit.plugin.redditapi.subreddits.AboutWhereRequest",encode(e82,n=_m0.Writer.create()){return e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(42).fork()).ldelim(),e82.user!==void 0&&StringValue.encode({value:e82.user},n.uint32(58).fork()).ldelim(),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(66).fork()).ldelim(),e82.where!==""&&n.uint32(74).string(e82.where),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAboutWhereRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.show=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.user=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.where=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$h(e82.after)?String(e82.after):void 0,before:isSet$h(e82.before)?String(e82.before):void 0,count:isSet$h(e82.count)?Number(e82.count):void 0,limit:isSet$h(e82.limit)?Number(e82.limit):void 0,show:isSet$h(e82.show)?String(e82.show):void 0,user:isSet$h(e82.user)?String(e82.user):void 0,subreddit:isSet$h(e82.subreddit)?String(e82.subreddit):void 0,where:isSet$h(e82.where)?globalThis.String(e82.where):""}},toJSON(e82){let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.show!==void 0&&(n.show=e82.show),e82.user!==void 0&&(n.user=e82.user),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.where!==""&&(n.where=e82.where),n},create(e82){return AboutWhereRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAboutWhereRequest();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.show=e82.show??void 0,n.user=e82.user??void 0,n.subreddit=e82.subreddit??void 0,n.where=e82.where??"",n}};messageTypeRegistry.set(AboutWhereRequest.$type,AboutWhereRequest);function createBaseBasicSubredditRequest(){return{subreddit:""}}var BasicSubredditRequest={$type:"devvit.plugin.redditapi.subreddits.BasicSubredditRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBasicSubredditRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$h(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return BasicSubredditRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBasicSubredditRequest();return n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(BasicSubredditRequest.$type,BasicSubredditRequest);function createBaseDeleteSrImgRequest(){return{subreddit:"",imgName:""}}var DeleteSrImgRequest={$type:"devvit.plugin.redditapi.subreddits.DeleteSrImgRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.imgName!==""&&n.uint32(18).string(e82.imgName),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDeleteSrImgRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.imgName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$h(e82.subreddit)?globalThis.String(e82.subreddit):"",imgName:isSet$h(e82.imgName)?globalThis.String(e82.imgName):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.imgName!==""&&(n.imgName=e82.imgName),n},create(e82){return DeleteSrImgRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDeleteSrImgRequest();return n.subreddit=e82.subreddit??"",n.imgName=e82.imgName??"",n}};messageTypeRegistry.set(DeleteSrImgRequest.$type,DeleteSrImgRequest);function createBaseBasicSearchRequest(){return{exact:void 0,includeOver18:void 0,includeUnadvertisable:void 0,query:"",searchQueryId:void 0,typeaheadActive:void 0}}var BasicSearchRequest={$type:"devvit.plugin.redditapi.subreddits.BasicSearchRequest",encode(e82,n=_m0.Writer.create()){return e82.exact!==void 0&&BoolValue.encode({value:e82.exact},n.uint32(10).fork()).ldelim(),e82.includeOver18!==void 0&&BoolValue.encode({value:e82.includeOver18},n.uint32(18).fork()).ldelim(),e82.includeUnadvertisable!==void 0&&BoolValue.encode({value:e82.includeUnadvertisable},n.uint32(26).fork()).ldelim(),e82.query!==""&&n.uint32(34).string(e82.query),e82.searchQueryId!==void 0&&StringValue.encode({value:e82.searchQueryId},n.uint32(42).fork()).ldelim(),e82.typeaheadActive!==void 0&&BoolValue.encode({value:e82.typeaheadActive},n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBasicSearchRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.exact=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.includeOver18=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.includeUnadvertisable=BoolValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.query=t.string();continue;case 5:if(r!==42)break;d.searchQueryId=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.typeaheadActive=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{exact:isSet$h(e82.exact)?!!e82.exact:void 0,includeOver18:isSet$h(e82.includeOver18)?!!e82.includeOver18:void 0,includeUnadvertisable:isSet$h(e82.includeUnadvertisable)?!!e82.includeUnadvertisable:void 0,query:isSet$h(e82.query)?globalThis.String(e82.query):"",searchQueryId:isSet$h(e82.searchQueryId)?String(e82.searchQueryId):void 0,typeaheadActive:isSet$h(e82.typeaheadActive)?!!e82.typeaheadActive:void 0}},toJSON(e82){let n={};return e82.exact!==void 0&&(n.exact=e82.exact),e82.includeOver18!==void 0&&(n.includeOver18=e82.includeOver18),e82.includeUnadvertisable!==void 0&&(n.includeUnadvertisable=e82.includeUnadvertisable),e82.query!==""&&(n.query=e82.query),e82.searchQueryId!==void 0&&(n.searchQueryId=e82.searchQueryId),e82.typeaheadActive!==void 0&&(n.typeaheadActive=e82.typeaheadActive),n},create(e82){return BasicSearchRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBasicSearchRequest();return n.exact=e82.exact??void 0,n.includeOver18=e82.includeOver18??void 0,n.includeUnadvertisable=e82.includeUnadvertisable??void 0,n.query=e82.query??"",n.searchQueryId=e82.searchQueryId??void 0,n.typeaheadActive=e82.typeaheadActive??void 0,n}};messageTypeRegistry.set(BasicSearchRequest.$type,BasicSearchRequest);function createBaseSiteAdminRequest(){return{acceptFollowers:!1,adminOverrideSpamComments:!1,adminOverrideSpamLinks:!1,adminOverrideSpamSelfposts:!1,allOriginalContent:!1,allowChatPostCreation:!1,allowDiscovery:!1,allowGalleries:!1,allowImages:!1,allowPolls:!1,allowPostCrossposts:!1,allowPredictionContributors:!1,allowPredictions:!1,allowPredictionsTournament:!1,allowTalks:!1,allowTop:!1,allowVideos:!1,banEvasionThreshold:0,collapseDeletedComments:!1,commentContributionSettings:void 0,commentScoreHideMins:0,crowdControlFilter:!1,crowdControlLevel:0,crowdControlMode:!1,crowdControlPostLevel:0,description:"",disableContributorRequests:!1,excludeBannedModqueue:!1,freeFormReports:!1,gRecaptchaResponse:"",hatefulContentThresholdAbuse:0,hatefulContentThresholdIdentity:0,headerTitle:"",keyColor:"",linkType:"",name:"",newPinnedPostPnsEnabled:!1,originalContentTagEnabled:!1,over18:!1,predictionLeaderboardEntryType:0,publicDescription:"",restrictCommenting:!1,restrictPosting:!1,shouldArchivePosts:!1,showMedia:!1,showMediaPreview:!1,spamComments:"",spamLinks:"",spamSelfposts:"",spoilersEnabled:!1,sr:"",submitLinkLabel:"",submitText:"",submitTextLabel:"",suggestedCommentSort:"",title:"",toxicityThresholdChatLevel:0,type:"",userFlairPnsEnabled:!1,welcomeMessageEnabled:!1,welcomeMessageText:"",wikiEditAge:0,wikiEditKarma:0,wikimode:"",crowdControlChatLevel:0,hideAds:!1,modmailHarassmentFilterEnabled:!1}}var SiteAdminRequest={$type:"devvit.plugin.redditapi.subreddits.SiteAdminRequest",encode(e82,n=_m0.Writer.create()){return e82.acceptFollowers!==!1&&n.uint32(8).bool(e82.acceptFollowers),e82.adminOverrideSpamComments!==!1&&n.uint32(16).bool(e82.adminOverrideSpamComments),e82.adminOverrideSpamLinks!==!1&&n.uint32(24).bool(e82.adminOverrideSpamLinks),e82.adminOverrideSpamSelfposts!==!1&&n.uint32(32).bool(e82.adminOverrideSpamSelfposts),e82.allOriginalContent!==!1&&n.uint32(40).bool(e82.allOriginalContent),e82.allowChatPostCreation!==!1&&n.uint32(48).bool(e82.allowChatPostCreation),e82.allowDiscovery!==!1&&n.uint32(56).bool(e82.allowDiscovery),e82.allowGalleries!==!1&&n.uint32(64).bool(e82.allowGalleries),e82.allowImages!==!1&&n.uint32(72).bool(e82.allowImages),e82.allowPolls!==!1&&n.uint32(80).bool(e82.allowPolls),e82.allowPostCrossposts!==!1&&n.uint32(88).bool(e82.allowPostCrossposts),e82.allowPredictionContributors!==!1&&n.uint32(96).bool(e82.allowPredictionContributors),e82.allowPredictions!==!1&&n.uint32(104).bool(e82.allowPredictions),e82.allowPredictionsTournament!==!1&&n.uint32(112).bool(e82.allowPredictionsTournament),e82.allowTalks!==!1&&n.uint32(120).bool(e82.allowTalks),e82.allowTop!==!1&&n.uint32(128).bool(e82.allowTop),e82.allowVideos!==!1&&n.uint32(136).bool(e82.allowVideos),e82.banEvasionThreshold!==0&&n.uint32(144).int64(e82.banEvasionThreshold),e82.collapseDeletedComments!==!1&&n.uint32(152).bool(e82.collapseDeletedComments),e82.commentContributionSettings!==void 0&&CommentContributionSettings.encode(e82.commentContributionSettings,n.uint32(162).fork()).ldelim(),e82.commentScoreHideMins!==0&&n.uint32(168).int32(e82.commentScoreHideMins),e82.crowdControlFilter!==!1&&n.uint32(176).bool(e82.crowdControlFilter),e82.crowdControlLevel!==0&&n.uint32(184).int64(e82.crowdControlLevel),e82.crowdControlMode!==!1&&n.uint32(192).bool(e82.crowdControlMode),e82.crowdControlPostLevel!==0&&n.uint32(200).int64(e82.crowdControlPostLevel),e82.description!==""&&n.uint32(210).string(e82.description),e82.disableContributorRequests!==!1&&n.uint32(216).bool(e82.disableContributorRequests),e82.excludeBannedModqueue!==!1&&n.uint32(224).bool(e82.excludeBannedModqueue),e82.freeFormReports!==!1&&n.uint32(232).bool(e82.freeFormReports),e82.gRecaptchaResponse!==""&&n.uint32(242).string(e82.gRecaptchaResponse),e82.hatefulContentThresholdAbuse!==0&&n.uint32(248).int64(e82.hatefulContentThresholdAbuse),e82.hatefulContentThresholdIdentity!==0&&n.uint32(256).int64(e82.hatefulContentThresholdIdentity),e82.headerTitle!==""&&n.uint32(266).string(e82.headerTitle),e82.keyColor!==""&&n.uint32(274).string(e82.keyColor),e82.linkType!==""&&n.uint32(290).string(e82.linkType),e82.name!==""&&n.uint32(298).string(e82.name),e82.newPinnedPostPnsEnabled!==!1&&n.uint32(304).bool(e82.newPinnedPostPnsEnabled),e82.originalContentTagEnabled!==!1&&n.uint32(312).bool(e82.originalContentTagEnabled),e82.over18!==!1&&n.uint32(320).bool(e82.over18),e82.predictionLeaderboardEntryType!==0&&n.uint32(328).int64(e82.predictionLeaderboardEntryType),e82.publicDescription!==""&&n.uint32(338).string(e82.publicDescription),e82.restrictCommenting!==!1&&n.uint32(344).bool(e82.restrictCommenting),e82.restrictPosting!==!1&&n.uint32(352).bool(e82.restrictPosting),e82.shouldArchivePosts!==!1&&n.uint32(360).bool(e82.shouldArchivePosts),e82.showMedia!==!1&&n.uint32(368).bool(e82.showMedia),e82.showMediaPreview!==!1&&n.uint32(376).bool(e82.showMediaPreview),e82.spamComments!==""&&n.uint32(386).string(e82.spamComments),e82.spamLinks!==""&&n.uint32(394).string(e82.spamLinks),e82.spamSelfposts!==""&&n.uint32(402).string(e82.spamSelfposts),e82.spoilersEnabled!==!1&&n.uint32(408).bool(e82.spoilersEnabled),e82.sr!==""&&n.uint32(418).string(e82.sr),e82.submitLinkLabel!==""&&n.uint32(426).string(e82.submitLinkLabel),e82.submitText!==""&&n.uint32(434).string(e82.submitText),e82.submitTextLabel!==""&&n.uint32(442).string(e82.submitTextLabel),e82.suggestedCommentSort!==""&&n.uint32(450).string(e82.suggestedCommentSort),e82.title!==""&&n.uint32(458).string(e82.title),e82.toxicityThresholdChatLevel!==0&&n.uint32(464).int64(e82.toxicityThresholdChatLevel),e82.type!==""&&n.uint32(474).string(e82.type),e82.userFlairPnsEnabled!==!1&&n.uint32(480).bool(e82.userFlairPnsEnabled),e82.welcomeMessageEnabled!==!1&&n.uint32(488).bool(e82.welcomeMessageEnabled),e82.welcomeMessageText!==""&&n.uint32(498).string(e82.welcomeMessageText),e82.wikiEditAge!==0&&n.uint32(504).int64(e82.wikiEditAge),e82.wikiEditKarma!==0&&n.uint32(512).int64(e82.wikiEditKarma),e82.wikimode!==""&&n.uint32(522).string(e82.wikimode),e82.crowdControlChatLevel!==0&&n.uint32(528).int64(e82.crowdControlChatLevel),e82.hideAds!==!1&&n.uint32(536).bool(e82.hideAds),e82.modmailHarassmentFilterEnabled!==!1&&n.uint32(544).bool(e82.modmailHarassmentFilterEnabled),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSiteAdminRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.acceptFollowers=t.bool();continue;case 2:if(r!==16)break;d.adminOverrideSpamComments=t.bool();continue;case 3:if(r!==24)break;d.adminOverrideSpamLinks=t.bool();continue;case 4:if(r!==32)break;d.adminOverrideSpamSelfposts=t.bool();continue;case 5:if(r!==40)break;d.allOriginalContent=t.bool();continue;case 6:if(r!==48)break;d.allowChatPostCreation=t.bool();continue;case 7:if(r!==56)break;d.allowDiscovery=t.bool();continue;case 8:if(r!==64)break;d.allowGalleries=t.bool();continue;case 9:if(r!==72)break;d.allowImages=t.bool();continue;case 10:if(r!==80)break;d.allowPolls=t.bool();continue;case 11:if(r!==88)break;d.allowPostCrossposts=t.bool();continue;case 12:if(r!==96)break;d.allowPredictionContributors=t.bool();continue;case 13:if(r!==104)break;d.allowPredictions=t.bool();continue;case 14:if(r!==112)break;d.allowPredictionsTournament=t.bool();continue;case 15:if(r!==120)break;d.allowTalks=t.bool();continue;case 16:if(r!==128)break;d.allowTop=t.bool();continue;case 17:if(r!==136)break;d.allowVideos=t.bool();continue;case 18:if(r!==144)break;d.banEvasionThreshold=longToNumber$2(t.int64());continue;case 19:if(r!==152)break;d.collapseDeletedComments=t.bool();continue;case 20:if(r!==162)break;d.commentContributionSettings=CommentContributionSettings.decode(t,t.uint32());continue;case 21:if(r!==168)break;d.commentScoreHideMins=t.int32();continue;case 22:if(r!==176)break;d.crowdControlFilter=t.bool();continue;case 23:if(r!==184)break;d.crowdControlLevel=longToNumber$2(t.int64());continue;case 24:if(r!==192)break;d.crowdControlMode=t.bool();continue;case 25:if(r!==200)break;d.crowdControlPostLevel=longToNumber$2(t.int64());continue;case 26:if(r!==210)break;d.description=t.string();continue;case 27:if(r!==216)break;d.disableContributorRequests=t.bool();continue;case 28:if(r!==224)break;d.excludeBannedModqueue=t.bool();continue;case 29:if(r!==232)break;d.freeFormReports=t.bool();continue;case 30:if(r!==242)break;d.gRecaptchaResponse=t.string();continue;case 31:if(r!==248)break;d.hatefulContentThresholdAbuse=longToNumber$2(t.int64());continue;case 32:if(r!==256)break;d.hatefulContentThresholdIdentity=longToNumber$2(t.int64());continue;case 33:if(r!==266)break;d.headerTitle=t.string();continue;case 34:if(r!==274)break;d.keyColor=t.string();continue;case 36:if(r!==290)break;d.linkType=t.string();continue;case 37:if(r!==298)break;d.name=t.string();continue;case 38:if(r!==304)break;d.newPinnedPostPnsEnabled=t.bool();continue;case 39:if(r!==312)break;d.originalContentTagEnabled=t.bool();continue;case 40:if(r!==320)break;d.over18=t.bool();continue;case 41:if(r!==328)break;d.predictionLeaderboardEntryType=longToNumber$2(t.int64());continue;case 42:if(r!==338)break;d.publicDescription=t.string();continue;case 43:if(r!==344)break;d.restrictCommenting=t.bool();continue;case 44:if(r!==352)break;d.restrictPosting=t.bool();continue;case 45:if(r!==360)break;d.shouldArchivePosts=t.bool();continue;case 46:if(r!==368)break;d.showMedia=t.bool();continue;case 47:if(r!==376)break;d.showMediaPreview=t.bool();continue;case 48:if(r!==386)break;d.spamComments=t.string();continue;case 49:if(r!==394)break;d.spamLinks=t.string();continue;case 50:if(r!==402)break;d.spamSelfposts=t.string();continue;case 51:if(r!==408)break;d.spoilersEnabled=t.bool();continue;case 52:if(r!==418)break;d.sr=t.string();continue;case 53:if(r!==426)break;d.submitLinkLabel=t.string();continue;case 54:if(r!==434)break;d.submitText=t.string();continue;case 55:if(r!==442)break;d.submitTextLabel=t.string();continue;case 56:if(r!==450)break;d.suggestedCommentSort=t.string();continue;case 57:if(r!==458)break;d.title=t.string();continue;case 58:if(r!==464)break;d.toxicityThresholdChatLevel=longToNumber$2(t.int64());continue;case 59:if(r!==474)break;d.type=t.string();continue;case 60:if(r!==480)break;d.userFlairPnsEnabled=t.bool();continue;case 61:if(r!==488)break;d.welcomeMessageEnabled=t.bool();continue;case 62:if(r!==498)break;d.welcomeMessageText=t.string();continue;case 63:if(r!==504)break;d.wikiEditAge=longToNumber$2(t.int64());continue;case 64:if(r!==512)break;d.wikiEditKarma=longToNumber$2(t.int64());continue;case 65:if(r!==522)break;d.wikimode=t.string();continue;case 66:if(r!==528)break;d.crowdControlChatLevel=longToNumber$2(t.int64());continue;case 67:if(r!==536)break;d.hideAds=t.bool();continue;case 68:if(r!==544)break;d.modmailHarassmentFilterEnabled=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{acceptFollowers:isSet$h(e82.acceptFollowers)?globalThis.Boolean(e82.acceptFollowers):!1,adminOverrideSpamComments:isSet$h(e82.adminOverrideSpamComments)?globalThis.Boolean(e82.adminOverrideSpamComments):!1,adminOverrideSpamLinks:isSet$h(e82.adminOverrideSpamLinks)?globalThis.Boolean(e82.adminOverrideSpamLinks):!1,adminOverrideSpamSelfposts:isSet$h(e82.adminOverrideSpamSelfposts)?globalThis.Boolean(e82.adminOverrideSpamSelfposts):!1,allOriginalContent:isSet$h(e82.allOriginalContent)?globalThis.Boolean(e82.allOriginalContent):!1,allowChatPostCreation:isSet$h(e82.allowChatPostCreation)?globalThis.Boolean(e82.allowChatPostCreation):!1,allowDiscovery:isSet$h(e82.allowDiscovery)?globalThis.Boolean(e82.allowDiscovery):!1,allowGalleries:isSet$h(e82.allowGalleries)?globalThis.Boolean(e82.allowGalleries):!1,allowImages:isSet$h(e82.allowImages)?globalThis.Boolean(e82.allowImages):!1,allowPolls:isSet$h(e82.allowPolls)?globalThis.Boolean(e82.allowPolls):!1,allowPostCrossposts:isSet$h(e82.allowPostCrossposts)?globalThis.Boolean(e82.allowPostCrossposts):!1,allowPredictionContributors:isSet$h(e82.allowPredictionContributors)?globalThis.Boolean(e82.allowPredictionContributors):!1,allowPredictions:isSet$h(e82.allowPredictions)?globalThis.Boolean(e82.allowPredictions):!1,allowPredictionsTournament:isSet$h(e82.allowPredictionsTournament)?globalThis.Boolean(e82.allowPredictionsTournament):!1,allowTalks:isSet$h(e82.allowTalks)?globalThis.Boolean(e82.allowTalks):!1,allowTop:isSet$h(e82.allowTop)?globalThis.Boolean(e82.allowTop):!1,allowVideos:isSet$h(e82.allowVideos)?globalThis.Boolean(e82.allowVideos):!1,banEvasionThreshold:isSet$h(e82.banEvasionThreshold)?globalThis.Number(e82.banEvasionThreshold):0,collapseDeletedComments:isSet$h(e82.collapseDeletedComments)?globalThis.Boolean(e82.collapseDeletedComments):!1,commentContributionSettings:isSet$h(e82.commentContributionSettings)?CommentContributionSettings.fromJSON(e82.commentContributionSettings):void 0,commentScoreHideMins:isSet$h(e82.commentScoreHideMins)?globalThis.Number(e82.commentScoreHideMins):0,crowdControlFilter:isSet$h(e82.crowdControlFilter)?globalThis.Boolean(e82.crowdControlFilter):!1,crowdControlLevel:isSet$h(e82.crowdControlLevel)?globalThis.Number(e82.crowdControlLevel):0,crowdControlMode:isSet$h(e82.crowdControlMode)?globalThis.Boolean(e82.crowdControlMode):!1,crowdControlPostLevel:isSet$h(e82.crowdControlPostLevel)?globalThis.Number(e82.crowdControlPostLevel):0,description:isSet$h(e82.description)?globalThis.String(e82.description):"",disableContributorRequests:isSet$h(e82.disableContributorRequests)?globalThis.Boolean(e82.disableContributorRequests):!1,excludeBannedModqueue:isSet$h(e82.excludeBannedModqueue)?globalThis.Boolean(e82.excludeBannedModqueue):!1,freeFormReports:isSet$h(e82.freeFormReports)?globalThis.Boolean(e82.freeFormReports):!1,gRecaptchaResponse:isSet$h(e82.gRecaptchaResponse)?globalThis.String(e82.gRecaptchaResponse):"",hatefulContentThresholdAbuse:isSet$h(e82.hatefulContentThresholdAbuse)?globalThis.Number(e82.hatefulContentThresholdAbuse):0,hatefulContentThresholdIdentity:isSet$h(e82.hatefulContentThresholdIdentity)?globalThis.Number(e82.hatefulContentThresholdIdentity):0,headerTitle:isSet$h(e82.headerTitle)?globalThis.String(e82.headerTitle):"",keyColor:isSet$h(e82.keyColor)?globalThis.String(e82.keyColor):"",linkType:isSet$h(e82.linkType)?globalThis.String(e82.linkType):"",name:isSet$h(e82.name)?globalThis.String(e82.name):"",newPinnedPostPnsEnabled:isSet$h(e82.newPinnedPostPnsEnabled)?globalThis.Boolean(e82.newPinnedPostPnsEnabled):!1,originalContentTagEnabled:isSet$h(e82.originalContentTagEnabled)?globalThis.Boolean(e82.originalContentTagEnabled):!1,over18:isSet$h(e82.over18)?globalThis.Boolean(e82.over18):!1,predictionLeaderboardEntryType:isSet$h(e82.predictionLeaderboardEntryType)?globalThis.Number(e82.predictionLeaderboardEntryType):0,publicDescription:isSet$h(e82.publicDescription)?globalThis.String(e82.publicDescription):"",restrictCommenting:isSet$h(e82.restrictCommenting)?globalThis.Boolean(e82.restrictCommenting):!1,restrictPosting:isSet$h(e82.restrictPosting)?globalThis.Boolean(e82.restrictPosting):!1,shouldArchivePosts:isSet$h(e82.shouldArchivePosts)?globalThis.Boolean(e82.shouldArchivePosts):!1,showMedia:isSet$h(e82.showMedia)?globalThis.Boolean(e82.showMedia):!1,showMediaPreview:isSet$h(e82.showMediaPreview)?globalThis.Boolean(e82.showMediaPreview):!1,spamComments:isSet$h(e82.spamComments)?globalThis.String(e82.spamComments):"",spamLinks:isSet$h(e82.spamLinks)?globalThis.String(e82.spamLinks):"",spamSelfposts:isSet$h(e82.spamSelfposts)?globalThis.String(e82.spamSelfposts):"",spoilersEnabled:isSet$h(e82.spoilersEnabled)?globalThis.Boolean(e82.spoilersEnabled):!1,sr:isSet$h(e82.sr)?globalThis.String(e82.sr):"",submitLinkLabel:isSet$h(e82.submitLinkLabel)?globalThis.String(e82.submitLinkLabel):"",submitText:isSet$h(e82.submitText)?globalThis.String(e82.submitText):"",submitTextLabel:isSet$h(e82.submitTextLabel)?globalThis.String(e82.submitTextLabel):"",suggestedCommentSort:isSet$h(e82.suggestedCommentSort)?globalThis.String(e82.suggestedCommentSort):"",title:isSet$h(e82.title)?globalThis.String(e82.title):"",toxicityThresholdChatLevel:isSet$h(e82.toxicityThresholdChatLevel)?globalThis.Number(e82.toxicityThresholdChatLevel):0,type:isSet$h(e82.type)?globalThis.String(e82.type):"",userFlairPnsEnabled:isSet$h(e82.userFlairPnsEnabled)?globalThis.Boolean(e82.userFlairPnsEnabled):!1,welcomeMessageEnabled:isSet$h(e82.welcomeMessageEnabled)?globalThis.Boolean(e82.welcomeMessageEnabled):!1,welcomeMessageText:isSet$h(e82.welcomeMessageText)?globalThis.String(e82.welcomeMessageText):"",wikiEditAge:isSet$h(e82.wikiEditAge)?globalThis.Number(e82.wikiEditAge):0,wikiEditKarma:isSet$h(e82.wikiEditKarma)?globalThis.Number(e82.wikiEditKarma):0,wikimode:isSet$h(e82.wikimode)?globalThis.String(e82.wikimode):"",crowdControlChatLevel:isSet$h(e82.crowdControlChatLevel)?globalThis.Number(e82.crowdControlChatLevel):0,hideAds:isSet$h(e82.hideAds)?globalThis.Boolean(e82.hideAds):!1,modmailHarassmentFilterEnabled:isSet$h(e82.modmailHarassmentFilterEnabled)?globalThis.Boolean(e82.modmailHarassmentFilterEnabled):!1}},toJSON(e82){let n={};return e82.acceptFollowers!==!1&&(n.acceptFollowers=e82.acceptFollowers),e82.adminOverrideSpamComments!==!1&&(n.adminOverrideSpamComments=e82.adminOverrideSpamComments),e82.adminOverrideSpamLinks!==!1&&(n.adminOverrideSpamLinks=e82.adminOverrideSpamLinks),e82.adminOverrideSpamSelfposts!==!1&&(n.adminOverrideSpamSelfposts=e82.adminOverrideSpamSelfposts),e82.allOriginalContent!==!1&&(n.allOriginalContent=e82.allOriginalContent),e82.allowChatPostCreation!==!1&&(n.allowChatPostCreation=e82.allowChatPostCreation),e82.allowDiscovery!==!1&&(n.allowDiscovery=e82.allowDiscovery),e82.allowGalleries!==!1&&(n.allowGalleries=e82.allowGalleries),e82.allowImages!==!1&&(n.allowImages=e82.allowImages),e82.allowPolls!==!1&&(n.allowPolls=e82.allowPolls),e82.allowPostCrossposts!==!1&&(n.allowPostCrossposts=e82.allowPostCrossposts),e82.allowPredictionContributors!==!1&&(n.allowPredictionContributors=e82.allowPredictionContributors),e82.allowPredictions!==!1&&(n.allowPredictions=e82.allowPredictions),e82.allowPredictionsTournament!==!1&&(n.allowPredictionsTournament=e82.allowPredictionsTournament),e82.allowTalks!==!1&&(n.allowTalks=e82.allowTalks),e82.allowTop!==!1&&(n.allowTop=e82.allowTop),e82.allowVideos!==!1&&(n.allowVideos=e82.allowVideos),e82.banEvasionThreshold!==0&&(n.banEvasionThreshold=Math.round(e82.banEvasionThreshold)),e82.collapseDeletedComments!==!1&&(n.collapseDeletedComments=e82.collapseDeletedComments),e82.commentContributionSettings!==void 0&&(n.commentContributionSettings=CommentContributionSettings.toJSON(e82.commentContributionSettings)),e82.commentScoreHideMins!==0&&(n.commentScoreHideMins=Math.round(e82.commentScoreHideMins)),e82.crowdControlFilter!==!1&&(n.crowdControlFilter=e82.crowdControlFilter),e82.crowdControlLevel!==0&&(n.crowdControlLevel=Math.round(e82.crowdControlLevel)),e82.crowdControlMode!==!1&&(n.crowdControlMode=e82.crowdControlMode),e82.crowdControlPostLevel!==0&&(n.crowdControlPostLevel=Math.round(e82.crowdControlPostLevel)),e82.description!==""&&(n.description=e82.description),e82.disableContributorRequests!==!1&&(n.disableContributorRequests=e82.disableContributorRequests),e82.excludeBannedModqueue!==!1&&(n.excludeBannedModqueue=e82.excludeBannedModqueue),e82.freeFormReports!==!1&&(n.freeFormReports=e82.freeFormReports),e82.gRecaptchaResponse!==""&&(n.gRecaptchaResponse=e82.gRecaptchaResponse),e82.hatefulContentThresholdAbuse!==0&&(n.hatefulContentThresholdAbuse=Math.round(e82.hatefulContentThresholdAbuse)),e82.hatefulContentThresholdIdentity!==0&&(n.hatefulContentThresholdIdentity=Math.round(e82.hatefulContentThresholdIdentity)),e82.headerTitle!==""&&(n.headerTitle=e82.headerTitle),e82.keyColor!==""&&(n.keyColor=e82.keyColor),e82.linkType!==""&&(n.linkType=e82.linkType),e82.name!==""&&(n.name=e82.name),e82.newPinnedPostPnsEnabled!==!1&&(n.newPinnedPostPnsEnabled=e82.newPinnedPostPnsEnabled),e82.originalContentTagEnabled!==!1&&(n.originalContentTagEnabled=e82.originalContentTagEnabled),e82.over18!==!1&&(n.over18=e82.over18),e82.predictionLeaderboardEntryType!==0&&(n.predictionLeaderboardEntryType=Math.round(e82.predictionLeaderboardEntryType)),e82.publicDescription!==""&&(n.publicDescription=e82.publicDescription),e82.restrictCommenting!==!1&&(n.restrictCommenting=e82.restrictCommenting),e82.restrictPosting!==!1&&(n.restrictPosting=e82.restrictPosting),e82.shouldArchivePosts!==!1&&(n.shouldArchivePosts=e82.shouldArchivePosts),e82.showMedia!==!1&&(n.showMedia=e82.showMedia),e82.showMediaPreview!==!1&&(n.showMediaPreview=e82.showMediaPreview),e82.spamComments!==""&&(n.spamComments=e82.spamComments),e82.spamLinks!==""&&(n.spamLinks=e82.spamLinks),e82.spamSelfposts!==""&&(n.spamSelfposts=e82.spamSelfposts),e82.spoilersEnabled!==!1&&(n.spoilersEnabled=e82.spoilersEnabled),e82.sr!==""&&(n.sr=e82.sr),e82.submitLinkLabel!==""&&(n.submitLinkLabel=e82.submitLinkLabel),e82.submitText!==""&&(n.submitText=e82.submitText),e82.submitTextLabel!==""&&(n.submitTextLabel=e82.submitTextLabel),e82.suggestedCommentSort!==""&&(n.suggestedCommentSort=e82.suggestedCommentSort),e82.title!==""&&(n.title=e82.title),e82.toxicityThresholdChatLevel!==0&&(n.toxicityThresholdChatLevel=Math.round(e82.toxicityThresholdChatLevel)),e82.type!==""&&(n.type=e82.type),e82.userFlairPnsEnabled!==!1&&(n.userFlairPnsEnabled=e82.userFlairPnsEnabled),e82.welcomeMessageEnabled!==!1&&(n.welcomeMessageEnabled=e82.welcomeMessageEnabled),e82.welcomeMessageText!==""&&(n.welcomeMessageText=e82.welcomeMessageText),e82.wikiEditAge!==0&&(n.wikiEditAge=Math.round(e82.wikiEditAge)),e82.wikiEditKarma!==0&&(n.wikiEditKarma=Math.round(e82.wikiEditKarma)),e82.wikimode!==""&&(n.wikimode=e82.wikimode),e82.crowdControlChatLevel!==0&&(n.crowdControlChatLevel=Math.round(e82.crowdControlChatLevel)),e82.hideAds!==!1&&(n.hideAds=e82.hideAds),e82.modmailHarassmentFilterEnabled!==!1&&(n.modmailHarassmentFilterEnabled=e82.modmailHarassmentFilterEnabled),n},create(e82){return SiteAdminRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSiteAdminRequest();return n.acceptFollowers=e82.acceptFollowers??!1,n.adminOverrideSpamComments=e82.adminOverrideSpamComments??!1,n.adminOverrideSpamLinks=e82.adminOverrideSpamLinks??!1,n.adminOverrideSpamSelfposts=e82.adminOverrideSpamSelfposts??!1,n.allOriginalContent=e82.allOriginalContent??!1,n.allowChatPostCreation=e82.allowChatPostCreation??!1,n.allowDiscovery=e82.allowDiscovery??!1,n.allowGalleries=e82.allowGalleries??!1,n.allowImages=e82.allowImages??!1,n.allowPolls=e82.allowPolls??!1,n.allowPostCrossposts=e82.allowPostCrossposts??!1,n.allowPredictionContributors=e82.allowPredictionContributors??!1,n.allowPredictions=e82.allowPredictions??!1,n.allowPredictionsTournament=e82.allowPredictionsTournament??!1,n.allowTalks=e82.allowTalks??!1,n.allowTop=e82.allowTop??!1,n.allowVideos=e82.allowVideos??!1,n.banEvasionThreshold=e82.banEvasionThreshold??0,n.collapseDeletedComments=e82.collapseDeletedComments??!1,n.commentContributionSettings=e82.commentContributionSettings!==void 0&&e82.commentContributionSettings!==null?CommentContributionSettings.fromPartial(e82.commentContributionSettings):void 0,n.commentScoreHideMins=e82.commentScoreHideMins??0,n.crowdControlFilter=e82.crowdControlFilter??!1,n.crowdControlLevel=e82.crowdControlLevel??0,n.crowdControlMode=e82.crowdControlMode??!1,n.crowdControlPostLevel=e82.crowdControlPostLevel??0,n.description=e82.description??"",n.disableContributorRequests=e82.disableContributorRequests??!1,n.excludeBannedModqueue=e82.excludeBannedModqueue??!1,n.freeFormReports=e82.freeFormReports??!1,n.gRecaptchaResponse=e82.gRecaptchaResponse??"",n.hatefulContentThresholdAbuse=e82.hatefulContentThresholdAbuse??0,n.hatefulContentThresholdIdentity=e82.hatefulContentThresholdIdentity??0,n.headerTitle=e82.headerTitle??"",n.keyColor=e82.keyColor??"",n.linkType=e82.linkType??"",n.name=e82.name??"",n.newPinnedPostPnsEnabled=e82.newPinnedPostPnsEnabled??!1,n.originalContentTagEnabled=e82.originalContentTagEnabled??!1,n.over18=e82.over18??!1,n.predictionLeaderboardEntryType=e82.predictionLeaderboardEntryType??0,n.publicDescription=e82.publicDescription??"",n.restrictCommenting=e82.restrictCommenting??!1,n.restrictPosting=e82.restrictPosting??!1,n.shouldArchivePosts=e82.shouldArchivePosts??!1,n.showMedia=e82.showMedia??!1,n.showMediaPreview=e82.showMediaPreview??!1,n.spamComments=e82.spamComments??"",n.spamLinks=e82.spamLinks??"",n.spamSelfposts=e82.spamSelfposts??"",n.spoilersEnabled=e82.spoilersEnabled??!1,n.sr=e82.sr??"",n.submitLinkLabel=e82.submitLinkLabel??"",n.submitText=e82.submitText??"",n.submitTextLabel=e82.submitTextLabel??"",n.suggestedCommentSort=e82.suggestedCommentSort??"",n.title=e82.title??"",n.toxicityThresholdChatLevel=e82.toxicityThresholdChatLevel??0,n.type=e82.type??"",n.userFlairPnsEnabled=e82.userFlairPnsEnabled??!1,n.welcomeMessageEnabled=e82.welcomeMessageEnabled??!1,n.welcomeMessageText=e82.welcomeMessageText??"",n.wikiEditAge=e82.wikiEditAge??0,n.wikiEditKarma=e82.wikiEditKarma??0,n.wikimode=e82.wikimode??"",n.crowdControlChatLevel=e82.crowdControlChatLevel??0,n.hideAds=e82.hideAds??!1,n.modmailHarassmentFilterEnabled=e82.modmailHarassmentFilterEnabled??!1,n}};messageTypeRegistry.set(SiteAdminRequest.$type,SiteAdminRequest);function createBaseSubredditAutocompleteRequest(){return{includeOver18:void 0,includeProfiles:void 0,limit:void 0,query:"",searchQueryId:void 0,typeaheadActive:void 0}}var SubredditAutocompleteRequest={$type:"devvit.plugin.redditapi.subreddits.SubredditAutocompleteRequest",encode(e82,n=_m0.Writer.create()){return e82.includeOver18!==void 0&&BoolValue.encode({value:e82.includeOver18},n.uint32(10).fork()).ldelim(),e82.includeProfiles!==void 0&&BoolValue.encode({value:e82.includeProfiles},n.uint32(18).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(26).fork()).ldelim(),e82.query!==""&&n.uint32(34).string(e82.query),e82.searchQueryId!==void 0&&StringValue.encode({value:e82.searchQueryId},n.uint32(42).fork()).ldelim(),e82.typeaheadActive!==void 0&&BoolValue.encode({value:e82.typeaheadActive},n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAutocompleteRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.includeOver18=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.includeProfiles=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.query=t.string();continue;case 5:if(r!==42)break;d.searchQueryId=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.typeaheadActive=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{includeOver18:isSet$h(e82.includeOver18)?!!e82.includeOver18:void 0,includeProfiles:isSet$h(e82.includeProfiles)?!!e82.includeProfiles:void 0,limit:isSet$h(e82.limit)?Number(e82.limit):void 0,query:isSet$h(e82.query)?globalThis.String(e82.query):"",searchQueryId:isSet$h(e82.searchQueryId)?String(e82.searchQueryId):void 0,typeaheadActive:isSet$h(e82.typeaheadActive)?!!e82.typeaheadActive:void 0}},toJSON(e82){let n={};return e82.includeOver18!==void 0&&(n.includeOver18=e82.includeOver18),e82.includeProfiles!==void 0&&(n.includeProfiles=e82.includeProfiles),e82.limit!==void 0&&(n.limit=e82.limit),e82.query!==""&&(n.query=e82.query),e82.searchQueryId!==void 0&&(n.searchQueryId=e82.searchQueryId),e82.typeaheadActive!==void 0&&(n.typeaheadActive=e82.typeaheadActive),n},create(e82){return SubredditAutocompleteRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAutocompleteRequest();return n.includeOver18=e82.includeOver18??void 0,n.includeProfiles=e82.includeProfiles??void 0,n.limit=e82.limit??void 0,n.query=e82.query??"",n.searchQueryId=e82.searchQueryId??void 0,n.typeaheadActive=e82.typeaheadActive??void 0,n}};messageTypeRegistry.set(SubredditAutocompleteRequest.$type,SubredditAutocompleteRequest);function createBaseSubredditStylesheetRequest(){return{op:"",reason:"",stylesheetContents:"",subreddit:""}}var SubredditStylesheetRequest={$type:"devvit.plugin.redditapi.subreddits.SubredditStylesheetRequest",encode(e82,n=_m0.Writer.create()){return e82.op!==""&&n.uint32(10).string(e82.op),e82.reason!==""&&n.uint32(18).string(e82.reason),e82.stylesheetContents!==""&&n.uint32(26).string(e82.stylesheetContents),e82.subreddit!==""&&n.uint32(34).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditStylesheetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.op=t.string();continue;case 2:if(r!==18)break;d.reason=t.string();continue;case 3:if(r!==26)break;d.stylesheetContents=t.string();continue;case 4:if(r!==34)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{op:isSet$h(e82.op)?globalThis.String(e82.op):"",reason:isSet$h(e82.reason)?globalThis.String(e82.reason):"",stylesheetContents:isSet$h(e82.stylesheetContents)?globalThis.String(e82.stylesheetContents):"",subreddit:isSet$h(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.op!==""&&(n.op=e82.op),e82.reason!==""&&(n.reason=e82.reason),e82.stylesheetContents!==""&&(n.stylesheetContents=e82.stylesheetContents),e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return SubredditStylesheetRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditStylesheetRequest();return n.op=e82.op??"",n.reason=e82.reason??"",n.stylesheetContents=e82.stylesheetContents??"",n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(SubredditStylesheetRequest.$type,SubredditStylesheetRequest);function createBaseSubscribeRequest(){return{action:"",actionSource:"",skipInitialDefaults:!1,sr:"",srName:""}}var SubscribeRequest={$type:"devvit.plugin.redditapi.subreddits.SubscribeRequest",encode(e82,n=_m0.Writer.create()){return e82.action!==""&&n.uint32(10).string(e82.action),e82.actionSource!==""&&n.uint32(18).string(e82.actionSource),e82.skipInitialDefaults!==!1&&n.uint32(24).bool(e82.skipInitialDefaults),e82.sr!==""&&n.uint32(34).string(e82.sr),e82.srName!==""&&n.uint32(42).string(e82.srName),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubscribeRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.action=t.string();continue;case 2:if(r!==18)break;d.actionSource=t.string();continue;case 3:if(r!==24)break;d.skipInitialDefaults=t.bool();continue;case 4:if(r!==34)break;d.sr=t.string();continue;case 5:if(r!==42)break;d.srName=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{action:isSet$h(e82.action)?globalThis.String(e82.action):"",actionSource:isSet$h(e82.actionSource)?globalThis.String(e82.actionSource):"",skipInitialDefaults:isSet$h(e82.skipInitialDefaults)?globalThis.Boolean(e82.skipInitialDefaults):!1,sr:isSet$h(e82.sr)?globalThis.String(e82.sr):"",srName:isSet$h(e82.srName)?globalThis.String(e82.srName):""}},toJSON(e82){let n={};return e82.action!==""&&(n.action=e82.action),e82.actionSource!==""&&(n.actionSource=e82.actionSource),e82.skipInitialDefaults!==!1&&(n.skipInitialDefaults=e82.skipInitialDefaults),e82.sr!==""&&(n.sr=e82.sr),e82.srName!==""&&(n.srName=e82.srName),n},create(e82){return SubscribeRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubscribeRequest();return n.action=e82.action??"",n.actionSource=e82.actionSource??"",n.skipInitialDefaults=e82.skipInitialDefaults??!1,n.sr=e82.sr??"",n.srName=e82.srName??"",n}};messageTypeRegistry.set(SubscribeRequest.$type,SubscribeRequest);function createBaseUploadSrImgRequest(){return{file:"",header:0,imgType:"",name:"",uploadType:"",subreddit:""}}var UploadSrImgRequest={$type:"devvit.plugin.redditapi.subreddits.UploadSrImgRequest",encode(e82,n=_m0.Writer.create()){return e82.file!==""&&n.uint32(10).string(e82.file),e82.header!==0&&n.uint32(16).int64(e82.header),e82.imgType!==""&&n.uint32(26).string(e82.imgType),e82.name!==""&&n.uint32(34).string(e82.name),e82.uploadType!==""&&n.uint32(42).string(e82.uploadType),e82.subreddit!==""&&n.uint32(50).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUploadSrImgRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.file=t.string();continue;case 2:if(r!==16)break;d.header=longToNumber$2(t.int64());continue;case 3:if(r!==26)break;d.imgType=t.string();continue;case 4:if(r!==34)break;d.name=t.string();continue;case 5:if(r!==42)break;d.uploadType=t.string();continue;case 6:if(r!==50)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{file:isSet$h(e82.file)?globalThis.String(e82.file):"",header:isSet$h(e82.header)?globalThis.Number(e82.header):0,imgType:isSet$h(e82.imgType)?globalThis.String(e82.imgType):"",name:isSet$h(e82.name)?globalThis.String(e82.name):"",uploadType:isSet$h(e82.uploadType)?globalThis.String(e82.uploadType):"",subreddit:isSet$h(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.file!==""&&(n.file=e82.file),e82.header!==0&&(n.header=Math.round(e82.header)),e82.imgType!==""&&(n.imgType=e82.imgType),e82.name!==""&&(n.name=e82.name),e82.uploadType!==""&&(n.uploadType=e82.uploadType),e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return UploadSrImgRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUploadSrImgRequest();return n.file=e82.file??"",n.header=e82.header??0,n.imgType=e82.imgType??"",n.name=e82.name??"",n.uploadType=e82.uploadType??"",n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(UploadSrImgRequest.$type,UploadSrImgRequest);function createBaseSubredditAboutEditRequest(){return{created:"",location:"",subreddit:""}}var SubredditAboutEditRequest={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutEditRequest",encode(e82,n=_m0.Writer.create()){return e82.created!==""&&n.uint32(10).string(e82.created),e82.location!==""&&n.uint32(18).string(e82.location),e82.subreddit!==""&&n.uint32(26).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutEditRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.created=t.string();continue;case 2:if(r!==18)break;d.location=t.string();continue;case 3:if(r!==26)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{created:isSet$h(e82.created)?globalThis.String(e82.created):"",location:isSet$h(e82.location)?globalThis.String(e82.location):"",subreddit:isSet$h(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.created!==""&&(n.created=e82.created),e82.location!==""&&(n.location=e82.location),e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return SubredditAboutEditRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAboutEditRequest();return n.created=e82.created??"",n.location=e82.location??"",n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(SubredditAboutEditRequest.$type,SubredditAboutEditRequest);function createBaseStickyRequest(){return{num:0,subreddit:""}}var StickyRequest={$type:"devvit.plugin.redditapi.subreddits.StickyRequest",encode(e82,n=_m0.Writer.create()){return e82.num!==0&&n.uint32(8).int64(e82.num),e82.subreddit!==""&&n.uint32(18).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStickyRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.num=longToNumber$2(t.int64());continue;case 2:if(r!==18)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{num:isSet$h(e82.num)?globalThis.Number(e82.num):0,subreddit:isSet$h(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.num!==0&&(n.num=Math.round(e82.num)),e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return StickyRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseStickyRequest();return n.num=e82.num??0,n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(StickyRequest.$type,StickyRequest);function createBaseBasicWhereRequest(){return{after:void 0,before:void 0,count:void 0,limit:void 0,show:void 0,where:""}}var BasicWhereRequest={$type:"devvit.plugin.redditapi.subreddits.BasicWhereRequest",encode(e82,n=_m0.Writer.create()){return e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(42).fork()).ldelim(),e82.where!==""&&n.uint32(58).string(e82.where),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBasicWhereRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.show=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.where=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$h(e82.after)?String(e82.after):void 0,before:isSet$h(e82.before)?String(e82.before):void 0,count:isSet$h(e82.count)?Number(e82.count):void 0,limit:isSet$h(e82.limit)?Number(e82.limit):void 0,show:isSet$h(e82.show)?String(e82.show):void 0,where:isSet$h(e82.where)?globalThis.String(e82.where):""}},toJSON(e82){let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.show!==void 0&&(n.show=e82.show),e82.where!==""&&(n.where=e82.where),n},create(e82){return BasicWhereRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBasicWhereRequest();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.show=e82.show??void 0,n.where=e82.where??"",n}};messageTypeRegistry.set(BasicWhereRequest.$type,BasicWhereRequest);function createBaseSubredditsSearchRequest(){return{after:void 0,before:void 0,count:void 0,limit:void 0,q:"",searchQueryId:void 0,show:void 0,showUsers:void 0,sort:void 0,typeaheadActive:void 0}}var SubredditsSearchRequest={$type:"devvit.plugin.redditapi.subreddits.SubredditsSearchRequest",encode(e82,n=_m0.Writer.create()){return e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.q!==""&&n.uint32(42).string(e82.q),e82.searchQueryId!==void 0&&StringValue.encode({value:e82.searchQueryId},n.uint32(50).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(58).fork()).ldelim(),e82.showUsers!==void 0&&BoolValue.encode({value:e82.showUsers},n.uint32(66).fork()).ldelim(),e82.sort!==void 0&&StringValue.encode({value:e82.sort},n.uint32(74).fork()).ldelim(),e82.typeaheadActive!==void 0&&BoolValue.encode({value:e82.typeaheadActive},n.uint32(90).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditsSearchRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.q=t.string();continue;case 6:if(r!==50)break;d.searchQueryId=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.show=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.showUsers=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.sort=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.typeaheadActive=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$h(e82.after)?String(e82.after):void 0,before:isSet$h(e82.before)?String(e82.before):void 0,count:isSet$h(e82.count)?Number(e82.count):void 0,limit:isSet$h(e82.limit)?Number(e82.limit):void 0,q:isSet$h(e82.q)?globalThis.String(e82.q):"",searchQueryId:isSet$h(e82.searchQueryId)?String(e82.searchQueryId):void 0,show:isSet$h(e82.show)?String(e82.show):void 0,showUsers:isSet$h(e82.showUsers)?!!e82.showUsers:void 0,sort:isSet$h(e82.sort)?String(e82.sort):void 0,typeaheadActive:isSet$h(e82.typeaheadActive)?!!e82.typeaheadActive:void 0}},toJSON(e82){let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.q!==""&&(n.q=e82.q),e82.searchQueryId!==void 0&&(n.searchQueryId=e82.searchQueryId),e82.show!==void 0&&(n.show=e82.show),e82.showUsers!==void 0&&(n.showUsers=e82.showUsers),e82.sort!==void 0&&(n.sort=e82.sort),e82.typeaheadActive!==void 0&&(n.typeaheadActive=e82.typeaheadActive),n},create(e82){return SubredditsSearchRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditsSearchRequest();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.q=e82.q??"",n.searchQueryId=e82.searchQueryId??void 0,n.show=e82.show??void 0,n.showUsers=e82.showUsers??void 0,n.sort=e82.sort??void 0,n.typeaheadActive=e82.typeaheadActive??void 0,n}};messageTypeRegistry.set(SubredditsSearchRequest.$type,SubredditsSearchRequest);function createBaseUsersSearchRequest(){return{after:void 0,before:void 0,count:void 0,limit:void 0,q:"",searchQueryId:void 0,show:void 0,sort:void 0,typeaheadActive:void 0}}var UsersSearchRequest={$type:"devvit.plugin.redditapi.subreddits.UsersSearchRequest",encode(e82,n=_m0.Writer.create()){return e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.q!==""&&n.uint32(42).string(e82.q),e82.searchQueryId!==void 0&&StringValue.encode({value:e82.searchQueryId},n.uint32(50).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(58).fork()).ldelim(),e82.sort!==void 0&&StringValue.encode({value:e82.sort},n.uint32(66).fork()).ldelim(),e82.typeaheadActive!==void 0&&BoolValue.encode({value:e82.typeaheadActive},n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUsersSearchRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.q=t.string();continue;case 6:if(r!==50)break;d.searchQueryId=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.show=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.sort=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.typeaheadActive=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$h(e82.after)?String(e82.after):void 0,before:isSet$h(e82.before)?String(e82.before):void 0,count:isSet$h(e82.count)?Number(e82.count):void 0,limit:isSet$h(e82.limit)?Number(e82.limit):void 0,q:isSet$h(e82.q)?globalThis.String(e82.q):"",searchQueryId:isSet$h(e82.searchQueryId)?String(e82.searchQueryId):void 0,show:isSet$h(e82.show)?String(e82.show):void 0,sort:isSet$h(e82.sort)?String(e82.sort):void 0,typeaheadActive:isSet$h(e82.typeaheadActive)?!!e82.typeaheadActive:void 0}},toJSON(e82){let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.q!==""&&(n.q=e82.q),e82.searchQueryId!==void 0&&(n.searchQueryId=e82.searchQueryId),e82.show!==void 0&&(n.show=e82.show),e82.sort!==void 0&&(n.sort=e82.sort),e82.typeaheadActive!==void 0&&(n.typeaheadActive=e82.typeaheadActive),n},create(e82){return UsersSearchRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUsersSearchRequest();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.q=e82.q??"",n.searchQueryId=e82.searchQueryId??void 0,n.show=e82.show??void 0,n.sort=e82.sort??void 0,n.typeaheadActive=e82.typeaheadActive??void 0,n}};messageTypeRegistry.set(UsersSearchRequest.$type,UsersSearchRequest);function createBaseSearchRedditNamesResponse(){return{names:[]}}var SearchRedditNamesResponse={$type:"devvit.plugin.redditapi.subreddits.SearchRedditNamesResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.names)StringValue.encode({value:t},n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSearchRedditNamesResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.names.push(StringValue.decode(t,t.uint32()).value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{names:globalThis.Array.isArray(e82?.names)?e82.names.map(n=>String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.names)!=null&&t.length&&(n.names=e82.names),n},create(e82){return SearchRedditNamesResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSearchRedditNamesResponse();return n.names=((t=e82.names)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(SearchRedditNamesResponse.$type,SearchRedditNamesResponse);function createBaseSearchSubredditsResponse(){return{subreddits:[]}}var SearchSubredditsResponse={$type:"devvit.plugin.redditapi.subreddits.SearchSubredditsResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.subreddits)SearchSubredditsResponse_SubredditData.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSearchSubredditsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddits.push(SearchSubredditsResponse_SubredditData.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddits:globalThis.Array.isArray(e82?.subreddits)?e82.subreddits.map(n=>SearchSubredditsResponse_SubredditData.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.subreddits)!=null&&t.length&&(n.subreddits=e82.subreddits.map(o=>SearchSubredditsResponse_SubredditData.toJSON(o))),n},create(e82){return SearchSubredditsResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSearchSubredditsResponse();return n.subreddits=((t=e82.subreddits)==null?void 0:t.map(o=>SearchSubredditsResponse_SubredditData.fromPartial(o)))||[],n}};messageTypeRegistry.set(SearchSubredditsResponse.$type,SearchSubredditsResponse);function createBaseSearchSubredditsResponse_SubredditData(){return{activeUserCount:void 0,iconImg:void 0,keyColor:void 0,name:void 0,subscriberCount:void 0,isChatPostFeatureEnabled:void 0,allowChatPostCreation:void 0,allowImages:void 0}}var SearchSubredditsResponse_SubredditData={$type:"devvit.plugin.redditapi.subreddits.SearchSubredditsResponse.SubredditData",encode(e82,n=_m0.Writer.create()){return e82.activeUserCount!==void 0&&Int32Value.encode({value:e82.activeUserCount},n.uint32(10).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(18).fork()).ldelim(),e82.keyColor!==void 0&&StringValue.encode({value:e82.keyColor},n.uint32(26).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(34).fork()).ldelim(),e82.subscriberCount!==void 0&&Int32Value.encode({value:e82.subscriberCount},n.uint32(42).fork()).ldelim(),e82.isChatPostFeatureEnabled!==void 0&&BoolValue.encode({value:e82.isChatPostFeatureEnabled},n.uint32(50).fork()).ldelim(),e82.allowChatPostCreation!==void 0&&BoolValue.encode({value:e82.allowChatPostCreation},n.uint32(58).fork()).ldelim(),e82.allowImages!==void 0&&BoolValue.encode({value:e82.allowImages},n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSearchSubredditsResponse_SubredditData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.activeUserCount=Int32Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.keyColor=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.subscriberCount=Int32Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.isChatPostFeatureEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.allowChatPostCreation=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.allowImages=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{activeUserCount:isSet$h(e82.activeUserCount)?Number(e82.activeUserCount):void 0,iconImg:isSet$h(e82.iconImg)?String(e82.iconImg):void 0,keyColor:isSet$h(e82.keyColor)?String(e82.keyColor):void 0,name:isSet$h(e82.name)?String(e82.name):void 0,subscriberCount:isSet$h(e82.subscriberCount)?Number(e82.subscriberCount):void 0,isChatPostFeatureEnabled:isSet$h(e82.isChatPostFeatureEnabled)?!!e82.isChatPostFeatureEnabled:void 0,allowChatPostCreation:isSet$h(e82.allowChatPostCreation)?!!e82.allowChatPostCreation:void 0,allowImages:isSet$h(e82.allowImages)?!!e82.allowImages:void 0}},toJSON(e82){let n={};return e82.activeUserCount!==void 0&&(n.activeUserCount=e82.activeUserCount),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.keyColor!==void 0&&(n.keyColor=e82.keyColor),e82.name!==void 0&&(n.name=e82.name),e82.subscriberCount!==void 0&&(n.subscriberCount=e82.subscriberCount),e82.isChatPostFeatureEnabled!==void 0&&(n.isChatPostFeatureEnabled=e82.isChatPostFeatureEnabled),e82.allowChatPostCreation!==void 0&&(n.allowChatPostCreation=e82.allowChatPostCreation),e82.allowImages!==void 0&&(n.allowImages=e82.allowImages),n},create(e82){return SearchSubredditsResponse_SubredditData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSearchSubredditsResponse_SubredditData();return n.activeUserCount=e82.activeUserCount??void 0,n.iconImg=e82.iconImg??void 0,n.keyColor=e82.keyColor??void 0,n.name=e82.name??void 0,n.subscriberCount=e82.subscriberCount??void 0,n.isChatPostFeatureEnabled=e82.isChatPostFeatureEnabled??void 0,n.allowChatPostCreation=e82.allowChatPostCreation??void 0,n.allowImages=e82.allowImages??void 0,n}};messageTypeRegistry.set(SearchSubredditsResponse_SubredditData.$type,SearchSubredditsResponse_SubredditData);function createBaseSubmitTextResponse(){return{submitText:void 0,submitTextHtml:void 0}}var SubmitTextResponse={$type:"devvit.plugin.redditapi.subreddits.SubmitTextResponse",encode(e82,n=_m0.Writer.create()){return e82.submitText!==void 0&&StringValue.encode({value:e82.submitText},n.uint32(10).fork()).ldelim(),e82.submitTextHtml!==void 0&&StringValue.encode({value:e82.submitTextHtml},n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubmitTextResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.submitText=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.submitTextHtml=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{submitText:isSet$h(e82.submitText)?String(e82.submitText):void 0,submitTextHtml:isSet$h(e82.submitTextHtml)?String(e82.submitTextHtml):void 0}},toJSON(e82){let n={};return e82.submitText!==void 0&&(n.submitText=e82.submitText),e82.submitTextHtml!==void 0&&(n.submitTextHtml=e82.submitTextHtml),n},create(e82){return SubmitTextResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubmitTextResponse();return n.submitText=e82.submitText??void 0,n.submitTextHtml=e82.submitTextHtml??void 0,n}};messageTypeRegistry.set(SubmitTextResponse.$type,SubmitTextResponse);function createBaseSubredditAutocompleteResponse(){return{kind:void 0,data:void 0}}var SubredditAutocompleteResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditAutocompleteResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&SubredditAutocompleteResponse_AutocompleteResponse.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAutocompleteResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=SubredditAutocompleteResponse_AutocompleteResponse.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,data:isSet$h(e82.data)?SubredditAutocompleteResponse_AutocompleteResponse.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=SubredditAutocompleteResponse_AutocompleteResponse.toJSON(e82.data)),n},create(e82){return SubredditAutocompleteResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAutocompleteResponse();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?SubredditAutocompleteResponse_AutocompleteResponse.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(SubredditAutocompleteResponse.$type,SubredditAutocompleteResponse);function createBaseSubredditAutocompleteResponse_AutocompleteAccount(){return{isEmployee:void 0,isFriend:void 0,snoovatarSize:void 0,id:void 0,verified:void 0,isGold:void 0,isMod:void 0,hasVerifiedEmail:void 0,iconImg:void 0,hideFromRobots:void 0,linkKarma:void 0,acceptChats:void 0,isBlocked:void 0,prefShowSnoovatar:void 0,name:void 0,created:void 0,createdUtc:void 0,snoovatarImg:void 0,commentKarma:void 0,acceptFollowers:void 0,hasSubscribed:void 0,acceptPms:void 0}}var SubredditAutocompleteResponse_AutocompleteAccount={$type:"devvit.plugin.redditapi.subreddits.SubredditAutocompleteResponse.AutocompleteAccount",encode(e82,n=_m0.Writer.create()){return e82.isEmployee!==void 0&&BoolValue.encode({value:e82.isEmployee},n.uint32(10).fork()).ldelim(),e82.isFriend!==void 0&&BoolValue.encode({value:e82.isFriend},n.uint32(18).fork()).ldelim(),e82.snoovatarSize!==void 0&&Int32Value.encode({value:e82.snoovatarSize},n.uint32(26).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(34).fork()).ldelim(),e82.verified!==void 0&&BoolValue.encode({value:e82.verified},n.uint32(42).fork()).ldelim(),e82.isGold!==void 0&&BoolValue.encode({value:e82.isGold},n.uint32(50).fork()).ldelim(),e82.isMod!==void 0&&BoolValue.encode({value:e82.isMod},n.uint32(58).fork()).ldelim(),e82.hasVerifiedEmail!==void 0&&BoolValue.encode({value:e82.hasVerifiedEmail},n.uint32(66).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(74).fork()).ldelim(),e82.hideFromRobots!==void 0&&BoolValue.encode({value:e82.hideFromRobots},n.uint32(82).fork()).ldelim(),e82.linkKarma!==void 0&&Int32Value.encode({value:e82.linkKarma},n.uint32(90).fork()).ldelim(),e82.acceptChats!==void 0&&BoolValue.encode({value:e82.acceptChats},n.uint32(98).fork()).ldelim(),e82.isBlocked!==void 0&&BoolValue.encode({value:e82.isBlocked},n.uint32(106).fork()).ldelim(),e82.prefShowSnoovatar!==void 0&&BoolValue.encode({value:e82.prefShowSnoovatar},n.uint32(114).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(122).fork()).ldelim(),e82.created!==void 0&&Int64Value.encode({value:e82.created},n.uint32(130).fork()).ldelim(),e82.createdUtc!==void 0&&Int64Value.encode({value:e82.createdUtc},n.uint32(138).fork()).ldelim(),e82.snoovatarImg!==void 0&&StringValue.encode({value:e82.snoovatarImg},n.uint32(146).fork()).ldelim(),e82.commentKarma!==void 0&&Int64Value.encode({value:e82.commentKarma},n.uint32(154).fork()).ldelim(),e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(162).fork()).ldelim(),e82.hasSubscribed!==void 0&&BoolValue.encode({value:e82.hasSubscribed},n.uint32(170).fork()).ldelim(),e82.acceptPms!==void 0&&BoolValue.encode({value:e82.acceptPms},n.uint32(178).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAutocompleteResponse_AutocompleteAccount();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.isEmployee=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.isFriend=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.snoovatarSize=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.verified=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.isGold=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.isMod=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.hasVerifiedEmail=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.hideFromRobots=BoolValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.linkKarma=Int32Value.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.acceptChats=BoolValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.isBlocked=BoolValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.prefShowSnoovatar=BoolValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.created=Int64Value.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.createdUtc=Int64Value.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.snoovatarImg=StringValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.commentKarma=Int64Value.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.hasSubscribed=BoolValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.acceptPms=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{isEmployee:isSet$h(e82.isEmployee)?!!e82.isEmployee:void 0,isFriend:isSet$h(e82.isFriend)?!!e82.isFriend:void 0,snoovatarSize:isSet$h(e82.snoovatarSize)?Number(e82.snoovatarSize):void 0,id:isSet$h(e82.id)?String(e82.id):void 0,verified:isSet$h(e82.verified)?!!e82.verified:void 0,isGold:isSet$h(e82.isGold)?!!e82.isGold:void 0,isMod:isSet$h(e82.isMod)?!!e82.isMod:void 0,hasVerifiedEmail:isSet$h(e82.hasVerifiedEmail)?!!e82.hasVerifiedEmail:void 0,iconImg:isSet$h(e82.iconImg)?String(e82.iconImg):void 0,hideFromRobots:isSet$h(e82.hideFromRobots)?!!e82.hideFromRobots:void 0,linkKarma:isSet$h(e82.linkKarma)?Number(e82.linkKarma):void 0,acceptChats:isSet$h(e82.acceptChats)?!!e82.acceptChats:void 0,isBlocked:isSet$h(e82.isBlocked)?!!e82.isBlocked:void 0,prefShowSnoovatar:isSet$h(e82.prefShowSnoovatar)?!!e82.prefShowSnoovatar:void 0,name:isSet$h(e82.name)?String(e82.name):void 0,created:isSet$h(e82.created)?Number(e82.created):void 0,createdUtc:isSet$h(e82.createdUtc)?Number(e82.createdUtc):void 0,snoovatarImg:isSet$h(e82.snoovatarImg)?String(e82.snoovatarImg):void 0,commentKarma:isSet$h(e82.commentKarma)?Number(e82.commentKarma):void 0,acceptFollowers:isSet$h(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,hasSubscribed:isSet$h(e82.hasSubscribed)?!!e82.hasSubscribed:void 0,acceptPms:isSet$h(e82.acceptPms)?!!e82.acceptPms:void 0}},toJSON(e82){let n={};return e82.isEmployee!==void 0&&(n.isEmployee=e82.isEmployee),e82.isFriend!==void 0&&(n.isFriend=e82.isFriend),e82.snoovatarSize!==void 0&&(n.snoovatarSize=e82.snoovatarSize),e82.id!==void 0&&(n.id=e82.id),e82.verified!==void 0&&(n.verified=e82.verified),e82.isGold!==void 0&&(n.isGold=e82.isGold),e82.isMod!==void 0&&(n.isMod=e82.isMod),e82.hasVerifiedEmail!==void 0&&(n.hasVerifiedEmail=e82.hasVerifiedEmail),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.hideFromRobots!==void 0&&(n.hideFromRobots=e82.hideFromRobots),e82.linkKarma!==void 0&&(n.linkKarma=e82.linkKarma),e82.acceptChats!==void 0&&(n.acceptChats=e82.acceptChats),e82.isBlocked!==void 0&&(n.isBlocked=e82.isBlocked),e82.prefShowSnoovatar!==void 0&&(n.prefShowSnoovatar=e82.prefShowSnoovatar),e82.name!==void 0&&(n.name=e82.name),e82.created!==void 0&&(n.created=e82.created),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.snoovatarImg!==void 0&&(n.snoovatarImg=e82.snoovatarImg),e82.commentKarma!==void 0&&(n.commentKarma=e82.commentKarma),e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.hasSubscribed!==void 0&&(n.hasSubscribed=e82.hasSubscribed),e82.acceptPms!==void 0&&(n.acceptPms=e82.acceptPms),n},create(e82){return SubredditAutocompleteResponse_AutocompleteAccount.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAutocompleteResponse_AutocompleteAccount();return n.isEmployee=e82.isEmployee??void 0,n.isFriend=e82.isFriend??void 0,n.snoovatarSize=e82.snoovatarSize??void 0,n.id=e82.id??void 0,n.verified=e82.verified??void 0,n.isGold=e82.isGold??void 0,n.isMod=e82.isMod??void 0,n.hasVerifiedEmail=e82.hasVerifiedEmail??void 0,n.iconImg=e82.iconImg??void 0,n.hideFromRobots=e82.hideFromRobots??void 0,n.linkKarma=e82.linkKarma??void 0,n.acceptChats=e82.acceptChats??void 0,n.isBlocked=e82.isBlocked??void 0,n.prefShowSnoovatar=e82.prefShowSnoovatar??void 0,n.name=e82.name??void 0,n.created=e82.created??void 0,n.createdUtc=e82.createdUtc??void 0,n.snoovatarImg=e82.snoovatarImg??void 0,n.commentKarma=e82.commentKarma??void 0,n.acceptFollowers=e82.acceptFollowers??void 0,n.hasSubscribed=e82.hasSubscribed??void 0,n.acceptPms=e82.acceptPms??void 0,n}};messageTypeRegistry.set(SubredditAutocompleteResponse_AutocompleteAccount.$type,SubredditAutocompleteResponse_AutocompleteAccount);function createBaseSubredditAutocompleteResponse_AutocompleteAccount_Subreddit(){return{defaultSet:void 0,userIsContributor:void 0,bannerImg:void 0,allowedMediaInComments:[],userIsBanned:void 0,freeFormReports:void 0,communityIcon:void 0,showMedia:void 0,iconColor:void 0,userIsMuted:void 0,displayName:void 0,headerImg:void 0,title:void 0,previousNames:[],over18:void 0,iconSize:[],primaryColor:void 0,iconImg:void 0,description:void 0,submitLinkLabel:void 0,headerSize:void 0,restrictPosting:void 0,restrictCommenting:void 0,subscribers:void 0,submitTextLabel:void 0,isDefaultIcon:void 0,inkFlairPosition:void 0,displayNamePrefixed:void 0,keyColor:void 0,name:void 0,isDefaultBanner:void 0,url:void 0,quarantine:void 0,bannerSize:void 0,userIsModerator:void 0,acceptFollowers:void 0,publicDescription:void 0,linkFlairEnabled:void 0,disableContributorRequests:void 0,subredditType:void 0,userIsSubscriber:void 0}}var SubredditAutocompleteResponse_AutocompleteAccount_Subreddit={$type:"devvit.plugin.redditapi.subreddits.SubredditAutocompleteResponse.AutocompleteAccount.Subreddit",encode(e82,n=_m0.Writer.create()){e82.defaultSet!==void 0&&BoolValue.encode({value:e82.defaultSet},n.uint32(10).fork()).ldelim(),e82.userIsContributor!==void 0&&BoolValue.encode({value:e82.userIsContributor},n.uint32(18).fork()).ldelim(),e82.bannerImg!==void 0&&StringValue.encode({value:e82.bannerImg},n.uint32(26).fork()).ldelim();for(let t of e82.allowedMediaInComments)StringValue.encode({value:t},n.uint32(34).fork()).ldelim();e82.userIsBanned!==void 0&&BoolValue.encode({value:e82.userIsBanned},n.uint32(42).fork()).ldelim(),e82.freeFormReports!==void 0&&BoolValue.encode({value:e82.freeFormReports},n.uint32(50).fork()).ldelim(),e82.communityIcon!==void 0&&StringValue.encode({value:e82.communityIcon},n.uint32(58).fork()).ldelim(),e82.showMedia!==void 0&&BoolValue.encode({value:e82.showMedia},n.uint32(66).fork()).ldelim(),e82.iconColor!==void 0&&StringValue.encode({value:e82.iconColor},n.uint32(74).fork()).ldelim(),e82.userIsMuted!==void 0&&BoolValue.encode({value:e82.userIsMuted},n.uint32(82).fork()).ldelim(),e82.displayName!==void 0&&StringValue.encode({value:e82.displayName},n.uint32(90).fork()).ldelim(),e82.headerImg!==void 0&&StringValue.encode({value:e82.headerImg},n.uint32(98).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(106).fork()).ldelim();for(let t of e82.previousNames)StringValue.encode({value:t},n.uint32(114).fork()).ldelim();e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(122).fork()).ldelim();for(let t of e82.iconSize)Int32Value.encode({value:t},n.uint32(130).fork()).ldelim();return e82.primaryColor!==void 0&&StringValue.encode({value:e82.primaryColor},n.uint32(138).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(146).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(154).fork()).ldelim(),e82.submitLinkLabel!==void 0&&StringValue.encode({value:e82.submitLinkLabel},n.uint32(162).fork()).ldelim(),e82.headerSize!==void 0&&Int32Value.encode({value:e82.headerSize},n.uint32(170).fork()).ldelim(),e82.restrictPosting!==void 0&&BoolValue.encode({value:e82.restrictPosting},n.uint32(178).fork()).ldelim(),e82.restrictCommenting!==void 0&&BoolValue.encode({value:e82.restrictCommenting},n.uint32(186).fork()).ldelim(),e82.subscribers!==void 0&&Int64Value.encode({value:e82.subscribers},n.uint32(194).fork()).ldelim(),e82.submitTextLabel!==void 0&&StringValue.encode({value:e82.submitTextLabel},n.uint32(202).fork()).ldelim(),e82.isDefaultIcon!==void 0&&BoolValue.encode({value:e82.isDefaultIcon},n.uint32(210).fork()).ldelim(),e82.inkFlairPosition!==void 0&&StringValue.encode({value:e82.inkFlairPosition},n.uint32(218).fork()).ldelim(),e82.displayNamePrefixed!==void 0&&StringValue.encode({value:e82.displayNamePrefixed},n.uint32(226).fork()).ldelim(),e82.keyColor!==void 0&&StringValue.encode({value:e82.keyColor},n.uint32(234).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(242).fork()).ldelim(),e82.isDefaultBanner!==void 0&&BoolValue.encode({value:e82.isDefaultBanner},n.uint32(250).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(258).fork()).ldelim(),e82.quarantine!==void 0&&BoolValue.encode({value:e82.quarantine},n.uint32(266).fork()).ldelim(),e82.bannerSize!==void 0&&Int32Value.encode({value:e82.bannerSize},n.uint32(274).fork()).ldelim(),e82.userIsModerator!==void 0&&BoolValue.encode({value:e82.userIsModerator},n.uint32(282).fork()).ldelim(),e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(290).fork()).ldelim(),e82.publicDescription!==void 0&&StringValue.encode({value:e82.publicDescription},n.uint32(298).fork()).ldelim(),e82.linkFlairEnabled!==void 0&&BoolValue.encode({value:e82.linkFlairEnabled},n.uint32(306).fork()).ldelim(),e82.disableContributorRequests!==void 0&&BoolValue.encode({value:e82.disableContributorRequests},n.uint32(314).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(322).fork()).ldelim(),e82.userIsSubscriber!==void 0&&BoolValue.encode({value:e82.userIsSubscriber},n.uint32(330).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAutocompleteResponse_AutocompleteAccount_Subreddit();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.defaultSet=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.userIsContributor=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.bannerImg=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.allowedMediaInComments.push(StringValue.decode(t,t.uint32()).value);continue;case 5:if(r!==42)break;d.userIsBanned=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.freeFormReports=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.communityIcon=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.showMedia=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.iconColor=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.userIsMuted=BoolValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.displayName=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.headerImg=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.title=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.previousNames.push(StringValue.decode(t,t.uint32()).value);continue;case 15:if(r!==122)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.iconSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 17:if(r!==138)break;d.primaryColor=StringValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.submitLinkLabel=StringValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.headerSize=Int32Value.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.restrictPosting=BoolValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.restrictCommenting=BoolValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.subscribers=Int64Value.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.submitTextLabel=StringValue.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.isDefaultIcon=BoolValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.inkFlairPosition=StringValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.displayNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.keyColor=StringValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.isDefaultBanner=BoolValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.quarantine=BoolValue.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.bannerSize=Int32Value.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.userIsModerator=BoolValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.publicDescription=StringValue.decode(t,t.uint32()).value;continue;case 38:if(r!==306)break;d.linkFlairEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 39:if(r!==314)break;d.disableContributorRequests=BoolValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 41:if(r!==330)break;d.userIsSubscriber=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{defaultSet:isSet$h(e82.defaultSet)?!!e82.defaultSet:void 0,userIsContributor:isSet$h(e82.userIsContributor)?!!e82.userIsContributor:void 0,bannerImg:isSet$h(e82.bannerImg)?String(e82.bannerImg):void 0,allowedMediaInComments:globalThis.Array.isArray(e82?.allowedMediaInComments)?e82.allowedMediaInComments.map(n=>String(n)):[],userIsBanned:isSet$h(e82.userIsBanned)?!!e82.userIsBanned:void 0,freeFormReports:isSet$h(e82.freeFormReports)?!!e82.freeFormReports:void 0,communityIcon:isSet$h(e82.communityIcon)?String(e82.communityIcon):void 0,showMedia:isSet$h(e82.showMedia)?!!e82.showMedia:void 0,iconColor:isSet$h(e82.iconColor)?String(e82.iconColor):void 0,userIsMuted:isSet$h(e82.userIsMuted)?!!e82.userIsMuted:void 0,displayName:isSet$h(e82.displayName)?String(e82.displayName):void 0,headerImg:isSet$h(e82.headerImg)?String(e82.headerImg):void 0,title:isSet$h(e82.title)?String(e82.title):void 0,previousNames:globalThis.Array.isArray(e82?.previousNames)?e82.previousNames.map(n=>String(n)):[],over18:isSet$h(e82.over18)?!!e82.over18:void 0,iconSize:globalThis.Array.isArray(e82?.iconSize)?e82.iconSize.map(n=>Number(n)):[],primaryColor:isSet$h(e82.primaryColor)?String(e82.primaryColor):void 0,iconImg:isSet$h(e82.iconImg)?String(e82.iconImg):void 0,description:isSet$h(e82.description)?String(e82.description):void 0,submitLinkLabel:isSet$h(e82.submitLinkLabel)?String(e82.submitLinkLabel):void 0,headerSize:isSet$h(e82.headerSize)?Number(e82.headerSize):void 0,restrictPosting:isSet$h(e82.restrictPosting)?!!e82.restrictPosting:void 0,restrictCommenting:isSet$h(e82.restrictCommenting)?!!e82.restrictCommenting:void 0,subscribers:isSet$h(e82.subscribers)?Number(e82.subscribers):void 0,submitTextLabel:isSet$h(e82.submitTextLabel)?String(e82.submitTextLabel):void 0,isDefaultIcon:isSet$h(e82.isDefaultIcon)?!!e82.isDefaultIcon:void 0,inkFlairPosition:isSet$h(e82.inkFlairPosition)?String(e82.inkFlairPosition):void 0,displayNamePrefixed:isSet$h(e82.displayNamePrefixed)?String(e82.displayNamePrefixed):void 0,keyColor:isSet$h(e82.keyColor)?String(e82.keyColor):void 0,name:isSet$h(e82.name)?String(e82.name):void 0,isDefaultBanner:isSet$h(e82.isDefaultBanner)?!!e82.isDefaultBanner:void 0,url:isSet$h(e82.url)?String(e82.url):void 0,quarantine:isSet$h(e82.quarantine)?!!e82.quarantine:void 0,bannerSize:isSet$h(e82.bannerSize)?Number(e82.bannerSize):void 0,userIsModerator:isSet$h(e82.userIsModerator)?!!e82.userIsModerator:void 0,acceptFollowers:isSet$h(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,publicDescription:isSet$h(e82.publicDescription)?String(e82.publicDescription):void 0,linkFlairEnabled:isSet$h(e82.linkFlairEnabled)?!!e82.linkFlairEnabled:void 0,disableContributorRequests:isSet$h(e82.disableContributorRequests)?!!e82.disableContributorRequests:void 0,subredditType:isSet$h(e82.subredditType)?String(e82.subredditType):void 0,userIsSubscriber:isSet$h(e82.userIsSubscriber)?!!e82.userIsSubscriber:void 0}},toJSON(e82){var t,o,d;let n={};return e82.defaultSet!==void 0&&(n.defaultSet=e82.defaultSet),e82.userIsContributor!==void 0&&(n.userIsContributor=e82.userIsContributor),e82.bannerImg!==void 0&&(n.bannerImg=e82.bannerImg),(t=e82.allowedMediaInComments)!=null&&t.length&&(n.allowedMediaInComments=e82.allowedMediaInComments),e82.userIsBanned!==void 0&&(n.userIsBanned=e82.userIsBanned),e82.freeFormReports!==void 0&&(n.freeFormReports=e82.freeFormReports),e82.communityIcon!==void 0&&(n.communityIcon=e82.communityIcon),e82.showMedia!==void 0&&(n.showMedia=e82.showMedia),e82.iconColor!==void 0&&(n.iconColor=e82.iconColor),e82.userIsMuted!==void 0&&(n.userIsMuted=e82.userIsMuted),e82.displayName!==void 0&&(n.displayName=e82.displayName),e82.headerImg!==void 0&&(n.headerImg=e82.headerImg),e82.title!==void 0&&(n.title=e82.title),(o=e82.previousNames)!=null&&o.length&&(n.previousNames=e82.previousNames),e82.over18!==void 0&&(n.over18=e82.over18),(d=e82.iconSize)!=null&&d.length&&(n.iconSize=e82.iconSize),e82.primaryColor!==void 0&&(n.primaryColor=e82.primaryColor),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.description!==void 0&&(n.description=e82.description),e82.submitLinkLabel!==void 0&&(n.submitLinkLabel=e82.submitLinkLabel),e82.headerSize!==void 0&&(n.headerSize=e82.headerSize),e82.restrictPosting!==void 0&&(n.restrictPosting=e82.restrictPosting),e82.restrictCommenting!==void 0&&(n.restrictCommenting=e82.restrictCommenting),e82.subscribers!==void 0&&(n.subscribers=e82.subscribers),e82.submitTextLabel!==void 0&&(n.submitTextLabel=e82.submitTextLabel),e82.isDefaultIcon!==void 0&&(n.isDefaultIcon=e82.isDefaultIcon),e82.inkFlairPosition!==void 0&&(n.inkFlairPosition=e82.inkFlairPosition),e82.displayNamePrefixed!==void 0&&(n.displayNamePrefixed=e82.displayNamePrefixed),e82.keyColor!==void 0&&(n.keyColor=e82.keyColor),e82.name!==void 0&&(n.name=e82.name),e82.isDefaultBanner!==void 0&&(n.isDefaultBanner=e82.isDefaultBanner),e82.url!==void 0&&(n.url=e82.url),e82.quarantine!==void 0&&(n.quarantine=e82.quarantine),e82.bannerSize!==void 0&&(n.bannerSize=e82.bannerSize),e82.userIsModerator!==void 0&&(n.userIsModerator=e82.userIsModerator),e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.publicDescription!==void 0&&(n.publicDescription=e82.publicDescription),e82.linkFlairEnabled!==void 0&&(n.linkFlairEnabled=e82.linkFlairEnabled),e82.disableContributorRequests!==void 0&&(n.disableContributorRequests=e82.disableContributorRequests),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.userIsSubscriber!==void 0&&(n.userIsSubscriber=e82.userIsSubscriber),n},create(e82){return SubredditAutocompleteResponse_AutocompleteAccount_Subreddit.fromPartial(e82??{})},fromPartial(e82){var t,o,d;let n=createBaseSubredditAutocompleteResponse_AutocompleteAccount_Subreddit();return n.defaultSet=e82.defaultSet??void 0,n.userIsContributor=e82.userIsContributor??void 0,n.bannerImg=e82.bannerImg??void 0,n.allowedMediaInComments=((t=e82.allowedMediaInComments)==null?void 0:t.map(r=>r))||[],n.userIsBanned=e82.userIsBanned??void 0,n.freeFormReports=e82.freeFormReports??void 0,n.communityIcon=e82.communityIcon??void 0,n.showMedia=e82.showMedia??void 0,n.iconColor=e82.iconColor??void 0,n.userIsMuted=e82.userIsMuted??void 0,n.displayName=e82.displayName??void 0,n.headerImg=e82.headerImg??void 0,n.title=e82.title??void 0,n.previousNames=((o=e82.previousNames)==null?void 0:o.map(r=>r))||[],n.over18=e82.over18??void 0,n.iconSize=((d=e82.iconSize)==null?void 0:d.map(r=>r))||[],n.primaryColor=e82.primaryColor??void 0,n.iconImg=e82.iconImg??void 0,n.description=e82.description??void 0,n.submitLinkLabel=e82.submitLinkLabel??void 0,n.headerSize=e82.headerSize??void 0,n.restrictPosting=e82.restrictPosting??void 0,n.restrictCommenting=e82.restrictCommenting??void 0,n.subscribers=e82.subscribers??void 0,n.submitTextLabel=e82.submitTextLabel??void 0,n.isDefaultIcon=e82.isDefaultIcon??void 0,n.inkFlairPosition=e82.inkFlairPosition??void 0,n.displayNamePrefixed=e82.displayNamePrefixed??void 0,n.keyColor=e82.keyColor??void 0,n.name=e82.name??void 0,n.isDefaultBanner=e82.isDefaultBanner??void 0,n.url=e82.url??void 0,n.quarantine=e82.quarantine??void 0,n.bannerSize=e82.bannerSize??void 0,n.userIsModerator=e82.userIsModerator??void 0,n.acceptFollowers=e82.acceptFollowers??void 0,n.publicDescription=e82.publicDescription??void 0,n.linkFlairEnabled=e82.linkFlairEnabled??void 0,n.disableContributorRequests=e82.disableContributorRequests??void 0,n.subredditType=e82.subredditType??void 0,n.userIsSubscriber=e82.userIsSubscriber??void 0,n}};messageTypeRegistry.set(SubredditAutocompleteResponse_AutocompleteAccount_Subreddit.$type,SubredditAutocompleteResponse_AutocompleteAccount_Subreddit);function createBaseSubredditAutocompleteResponse_WrappedAutoCompleteSubreddit(){return{kind:"",data:void 0}}var SubredditAutocompleteResponse_WrappedAutoCompleteSubreddit={$type:"devvit.plugin.redditapi.subreddits.SubredditAutocompleteResponse.WrappedAutoCompleteSubreddit",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&FullSubredditObject.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAutocompleteResponse_WrappedAutoCompleteSubreddit();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=FullSubredditObject.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?globalThis.String(e82.kind):"",data:isSet$h(e82.data)?FullSubredditObject.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=FullSubredditObject.toJSON(e82.data)),n},create(e82){return SubredditAutocompleteResponse_WrappedAutoCompleteSubreddit.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAutocompleteResponse_WrappedAutoCompleteSubreddit();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?FullSubredditObject.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(SubredditAutocompleteResponse_WrappedAutoCompleteSubreddit.$type,SubredditAutocompleteResponse_WrappedAutoCompleteSubreddit);function createBaseSubredditAutocompleteResponse_WrappedAutoCompleteAccount(){return{kind:"",data:void 0}}var SubredditAutocompleteResponse_WrappedAutoCompleteAccount={$type:"devvit.plugin.redditapi.subreddits.SubredditAutocompleteResponse.WrappedAutoCompleteAccount",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&SubredditAutocompleteResponse_AutocompleteAccount.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAutocompleteResponse_WrappedAutoCompleteAccount();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=SubredditAutocompleteResponse_AutocompleteAccount.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?globalThis.String(e82.kind):"",data:isSet$h(e82.data)?SubredditAutocompleteResponse_AutocompleteAccount.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=SubredditAutocompleteResponse_AutocompleteAccount.toJSON(e82.data)),n},create(e82){return SubredditAutocompleteResponse_WrappedAutoCompleteAccount.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAutocompleteResponse_WrappedAutoCompleteAccount();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?SubredditAutocompleteResponse_AutocompleteAccount.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(SubredditAutocompleteResponse_WrappedAutoCompleteAccount.$type,SubredditAutocompleteResponse_WrappedAutoCompleteAccount);function createBaseSubredditAutocompleteResponse_AutocompleteResponse(){return{after:void 0,before:void 0,dist:void 0,childrenSubreddits:[],childrenAccounts:[]}}var SubredditAutocompleteResponse_AutocompleteResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditAutocompleteResponse.AutocompleteResponse",encode(e82,n=_m0.Writer.create()){e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.dist!==void 0&&Int32Value.encode({value:e82.dist},n.uint32(26).fork()).ldelim();for(let t of e82.childrenSubreddits)SubredditAutocompleteResponse_WrappedAutoCompleteSubreddit.encode(t,n.uint32(34).fork()).ldelim();for(let t of e82.childrenAccounts)SubredditAutocompleteResponse_WrappedAutoCompleteAccount.encode(t,n.uint32(42).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAutocompleteResponse_AutocompleteResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.dist=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.childrenSubreddits.push(SubredditAutocompleteResponse_WrappedAutoCompleteSubreddit.decode(t,t.uint32()));continue;case 5:if(r!==42)break;d.childrenAccounts.push(SubredditAutocompleteResponse_WrappedAutoCompleteAccount.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$h(e82.after)?String(e82.after):void 0,before:isSet$h(e82.before)?String(e82.before):void 0,dist:isSet$h(e82.dist)?Number(e82.dist):void 0,childrenSubreddits:globalThis.Array.isArray(e82?.childrenSubreddits)?e82.childrenSubreddits.map(n=>SubredditAutocompleteResponse_WrappedAutoCompleteSubreddit.fromJSON(n)):[],childrenAccounts:globalThis.Array.isArray(e82?.childrenAccounts)?e82.childrenAccounts.map(n=>SubredditAutocompleteResponse_WrappedAutoCompleteAccount.fromJSON(n)):[]}},toJSON(e82){var t,o;let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.dist!==void 0&&(n.dist=e82.dist),(t=e82.childrenSubreddits)!=null&&t.length&&(n.childrenSubreddits=e82.childrenSubreddits.map(d=>SubredditAutocompleteResponse_WrappedAutoCompleteSubreddit.toJSON(d))),(o=e82.childrenAccounts)!=null&&o.length&&(n.childrenAccounts=e82.childrenAccounts.map(d=>SubredditAutocompleteResponse_WrappedAutoCompleteAccount.toJSON(d))),n},create(e82){return SubredditAutocompleteResponse_AutocompleteResponse.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseSubredditAutocompleteResponse_AutocompleteResponse();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.dist=e82.dist??void 0,n.childrenSubreddits=((t=e82.childrenSubreddits)==null?void 0:t.map(d=>SubredditAutocompleteResponse_WrappedAutoCompleteSubreddit.fromPartial(d)))||[],n.childrenAccounts=((o=e82.childrenAccounts)==null?void 0:o.map(d=>SubredditAutocompleteResponse_WrappedAutoCompleteAccount.fromPartial(d)))||[],n}};messageTypeRegistry.set(SubredditAutocompleteResponse_AutocompleteResponse.$type,SubredditAutocompleteResponse_AutocompleteResponse);function createBaseUploadSrImgResponse(){return{errors:[],imgSrc:void 0,errorsValues:[]}}var UploadSrImgResponse={$type:"devvit.plugin.redditapi.subreddits.UploadSrImgResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.errors)StringValue.encode({value:t},n.uint32(10).fork()).ldelim();e82.imgSrc!==void 0&&StringValue.encode({value:e82.imgSrc},n.uint32(18).fork()).ldelim();for(let t of e82.errorsValues)StringValue.encode({value:t},n.uint32(26).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUploadSrImgResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.errors.push(StringValue.decode(t,t.uint32()).value);continue;case 2:if(r!==18)break;d.imgSrc=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.errorsValues.push(StringValue.decode(t,t.uint32()).value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{errors:globalThis.Array.isArray(e82?.errors)?e82.errors.map(n=>String(n)):[],imgSrc:isSet$h(e82.imgSrc)?String(e82.imgSrc):void 0,errorsValues:globalThis.Array.isArray(e82?.errorsValues)?e82.errorsValues.map(n=>String(n)):[]}},toJSON(e82){var t,o;let n={};return(t=e82.errors)!=null&&t.length&&(n.errors=e82.errors),e82.imgSrc!==void 0&&(n.imgSrc=e82.imgSrc),(o=e82.errorsValues)!=null&&o.length&&(n.errorsValues=e82.errorsValues),n},create(e82){return UploadSrImgResponse.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseUploadSrImgResponse();return n.errors=((t=e82.errors)==null?void 0:t.map(d=>d))||[],n.imgSrc=e82.imgSrc??void 0,n.errorsValues=((o=e82.errorsValues)==null?void 0:o.map(d=>d))||[],n}};messageTypeRegistry.set(UploadSrImgResponse.$type,UploadSrImgResponse);function createBaseSubredditPostRequirementsResponse(){return{titleRegexes:[],bodyBlacklistedStrings:[],titleBlacklistedStrings:[],bodyTextMaxLength:void 0,titleRequiredStrings:[],guidelinesText:void 0,galleryMinItems:void 0,domainBlacklist:[],domainWhitelist:[],titleTextMaxLength:void 0,bodyRestrictionPolicy:void 0,linkRestrictionPolicy:void 0,guidelinesDisplayPolicy:void 0,bodyRequiredStrings:[],titleTextMinLength:void 0,galleryCaptionsRequirement:void 0,isFlairRequired:void 0,galleryMaxItems:void 0,galleryUrlsRequirement:void 0,bodyRegexes:[],linkRepostAge:void 0,bodyTextMinLength:void 0}}var SubredditPostRequirementsResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditPostRequirementsResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.titleRegexes)StringValue.encode({value:t},n.uint32(10).fork()).ldelim();for(let t of e82.bodyBlacklistedStrings)StringValue.encode({value:t},n.uint32(18).fork()).ldelim();for(let t of e82.titleBlacklistedStrings)StringValue.encode({value:t},n.uint32(26).fork()).ldelim();e82.bodyTextMaxLength!==void 0&&Int32Value.encode({value:e82.bodyTextMaxLength},n.uint32(34).fork()).ldelim();for(let t of e82.titleRequiredStrings)StringValue.encode({value:t},n.uint32(42).fork()).ldelim();e82.guidelinesText!==void 0&&StringValue.encode({value:e82.guidelinesText},n.uint32(50).fork()).ldelim(),e82.galleryMinItems!==void 0&&Int32Value.encode({value:e82.galleryMinItems},n.uint32(58).fork()).ldelim();for(let t of e82.domainBlacklist)StringValue.encode({value:t},n.uint32(66).fork()).ldelim();for(let t of e82.domainWhitelist)StringValue.encode({value:t},n.uint32(74).fork()).ldelim();e82.titleTextMaxLength!==void 0&&Int32Value.encode({value:e82.titleTextMaxLength},n.uint32(82).fork()).ldelim(),e82.bodyRestrictionPolicy!==void 0&&StringValue.encode({value:e82.bodyRestrictionPolicy},n.uint32(90).fork()).ldelim(),e82.linkRestrictionPolicy!==void 0&&StringValue.encode({value:e82.linkRestrictionPolicy},n.uint32(98).fork()).ldelim(),e82.guidelinesDisplayPolicy!==void 0&&StringValue.encode({value:e82.guidelinesDisplayPolicy},n.uint32(106).fork()).ldelim();for(let t of e82.bodyRequiredStrings)StringValue.encode({value:t},n.uint32(114).fork()).ldelim();e82.titleTextMinLength!==void 0&&Int32Value.encode({value:e82.titleTextMinLength},n.uint32(122).fork()).ldelim(),e82.galleryCaptionsRequirement!==void 0&&StringValue.encode({value:e82.galleryCaptionsRequirement},n.uint32(130).fork()).ldelim(),e82.isFlairRequired!==void 0&&BoolValue.encode({value:e82.isFlairRequired},n.uint32(138).fork()).ldelim(),e82.galleryMaxItems!==void 0&&Int32Value.encode({value:e82.galleryMaxItems},n.uint32(146).fork()).ldelim(),e82.galleryUrlsRequirement!==void 0&&StringValue.encode({value:e82.galleryUrlsRequirement},n.uint32(154).fork()).ldelim();for(let t of e82.bodyRegexes)StringValue.encode({value:t},n.uint32(162).fork()).ldelim();return e82.linkRepostAge!==void 0&&Int32Value.encode({value:e82.linkRepostAge},n.uint32(170).fork()).ldelim(),e82.bodyTextMinLength!==void 0&&Int32Value.encode({value:e82.bodyTextMinLength},n.uint32(178).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditPostRequirementsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.titleRegexes.push(StringValue.decode(t,t.uint32()).value);continue;case 2:if(r!==18)break;d.bodyBlacklistedStrings.push(StringValue.decode(t,t.uint32()).value);continue;case 3:if(r!==26)break;d.titleBlacklistedStrings.push(StringValue.decode(t,t.uint32()).value);continue;case 4:if(r!==34)break;d.bodyTextMaxLength=Int32Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.titleRequiredStrings.push(StringValue.decode(t,t.uint32()).value);continue;case 6:if(r!==50)break;d.guidelinesText=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.galleryMinItems=Int32Value.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.domainBlacklist.push(StringValue.decode(t,t.uint32()).value);continue;case 9:if(r!==74)break;d.domainWhitelist.push(StringValue.decode(t,t.uint32()).value);continue;case 10:if(r!==82)break;d.titleTextMaxLength=Int32Value.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.bodyRestrictionPolicy=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.linkRestrictionPolicy=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.guidelinesDisplayPolicy=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.bodyRequiredStrings.push(StringValue.decode(t,t.uint32()).value);continue;case 15:if(r!==122)break;d.titleTextMinLength=Int32Value.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.galleryCaptionsRequirement=StringValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.isFlairRequired=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.galleryMaxItems=Int32Value.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.galleryUrlsRequirement=StringValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.bodyRegexes.push(StringValue.decode(t,t.uint32()).value);continue;case 21:if(r!==170)break;d.linkRepostAge=Int32Value.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.bodyTextMinLength=Int32Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{titleRegexes:globalThis.Array.isArray(e82?.titleRegexes)?e82.titleRegexes.map(n=>String(n)):[],bodyBlacklistedStrings:globalThis.Array.isArray(e82?.bodyBlacklistedStrings)?e82.bodyBlacklistedStrings.map(n=>String(n)):[],titleBlacklistedStrings:globalThis.Array.isArray(e82?.titleBlacklistedStrings)?e82.titleBlacklistedStrings.map(n=>String(n)):[],bodyTextMaxLength:isSet$h(e82.bodyTextMaxLength)?Number(e82.bodyTextMaxLength):void 0,titleRequiredStrings:globalThis.Array.isArray(e82?.titleRequiredStrings)?e82.titleRequiredStrings.map(n=>String(n)):[],guidelinesText:isSet$h(e82.guidelinesText)?String(e82.guidelinesText):void 0,galleryMinItems:isSet$h(e82.galleryMinItems)?Number(e82.galleryMinItems):void 0,domainBlacklist:globalThis.Array.isArray(e82?.domainBlacklist)?e82.domainBlacklist.map(n=>String(n)):[],domainWhitelist:globalThis.Array.isArray(e82?.domainWhitelist)?e82.domainWhitelist.map(n=>String(n)):[],titleTextMaxLength:isSet$h(e82.titleTextMaxLength)?Number(e82.titleTextMaxLength):void 0,bodyRestrictionPolicy:isSet$h(e82.bodyRestrictionPolicy)?String(e82.bodyRestrictionPolicy):void 0,linkRestrictionPolicy:isSet$h(e82.linkRestrictionPolicy)?String(e82.linkRestrictionPolicy):void 0,guidelinesDisplayPolicy:isSet$h(e82.guidelinesDisplayPolicy)?String(e82.guidelinesDisplayPolicy):void 0,bodyRequiredStrings:globalThis.Array.isArray(e82?.bodyRequiredStrings)?e82.bodyRequiredStrings.map(n=>String(n)):[],titleTextMinLength:isSet$h(e82.titleTextMinLength)?Number(e82.titleTextMinLength):void 0,galleryCaptionsRequirement:isSet$h(e82.galleryCaptionsRequirement)?String(e82.galleryCaptionsRequirement):void 0,isFlairRequired:isSet$h(e82.isFlairRequired)?!!e82.isFlairRequired:void 0,galleryMaxItems:isSet$h(e82.galleryMaxItems)?Number(e82.galleryMaxItems):void 0,galleryUrlsRequirement:isSet$h(e82.galleryUrlsRequirement)?String(e82.galleryUrlsRequirement):void 0,bodyRegexes:globalThis.Array.isArray(e82?.bodyRegexes)?e82.bodyRegexes.map(n=>String(n)):[],linkRepostAge:isSet$h(e82.linkRepostAge)?Number(e82.linkRepostAge):void 0,bodyTextMinLength:isSet$h(e82.bodyTextMinLength)?Number(e82.bodyTextMinLength):void 0}},toJSON(e82){var t,o,d,r,a,u,l,s;let n={};return(t=e82.titleRegexes)!=null&&t.length&&(n.titleRegexes=e82.titleRegexes),(o=e82.bodyBlacklistedStrings)!=null&&o.length&&(n.bodyBlacklistedStrings=e82.bodyBlacklistedStrings),(d=e82.titleBlacklistedStrings)!=null&&d.length&&(n.titleBlacklistedStrings=e82.titleBlacklistedStrings),e82.bodyTextMaxLength!==void 0&&(n.bodyTextMaxLength=e82.bodyTextMaxLength),(r=e82.titleRequiredStrings)!=null&&r.length&&(n.titleRequiredStrings=e82.titleRequiredStrings),e82.guidelinesText!==void 0&&(n.guidelinesText=e82.guidelinesText),e82.galleryMinItems!==void 0&&(n.galleryMinItems=e82.galleryMinItems),(a=e82.domainBlacklist)!=null&&a.length&&(n.domainBlacklist=e82.domainBlacklist),(u=e82.domainWhitelist)!=null&&u.length&&(n.domainWhitelist=e82.domainWhitelist),e82.titleTextMaxLength!==void 0&&(n.titleTextMaxLength=e82.titleTextMaxLength),e82.bodyRestrictionPolicy!==void 0&&(n.bodyRestrictionPolicy=e82.bodyRestrictionPolicy),e82.linkRestrictionPolicy!==void 0&&(n.linkRestrictionPolicy=e82.linkRestrictionPolicy),e82.guidelinesDisplayPolicy!==void 0&&(n.guidelinesDisplayPolicy=e82.guidelinesDisplayPolicy),(l=e82.bodyRequiredStrings)!=null&&l.length&&(n.bodyRequiredStrings=e82.bodyRequiredStrings),e82.titleTextMinLength!==void 0&&(n.titleTextMinLength=e82.titleTextMinLength),e82.galleryCaptionsRequirement!==void 0&&(n.galleryCaptionsRequirement=e82.galleryCaptionsRequirement),e82.isFlairRequired!==void 0&&(n.isFlairRequired=e82.isFlairRequired),e82.galleryMaxItems!==void 0&&(n.galleryMaxItems=e82.galleryMaxItems),e82.galleryUrlsRequirement!==void 0&&(n.galleryUrlsRequirement=e82.galleryUrlsRequirement),(s=e82.bodyRegexes)!=null&&s.length&&(n.bodyRegexes=e82.bodyRegexes),e82.linkRepostAge!==void 0&&(n.linkRepostAge=e82.linkRepostAge),e82.bodyTextMinLength!==void 0&&(n.bodyTextMinLength=e82.bodyTextMinLength),n},create(e82){return SubredditPostRequirementsResponse.fromPartial(e82??{})},fromPartial(e82){var t,o,d,r,a,u,l,s;let n=createBaseSubredditPostRequirementsResponse();return n.titleRegexes=((t=e82.titleRegexes)==null?void 0:t.map(f=>f))||[],n.bodyBlacklistedStrings=((o=e82.bodyBlacklistedStrings)==null?void 0:o.map(f=>f))||[],n.titleBlacklistedStrings=((d=e82.titleBlacklistedStrings)==null?void 0:d.map(f=>f))||[],n.bodyTextMaxLength=e82.bodyTextMaxLength??void 0,n.titleRequiredStrings=((r=e82.titleRequiredStrings)==null?void 0:r.map(f=>f))||[],n.guidelinesText=e82.guidelinesText??void 0,n.galleryMinItems=e82.galleryMinItems??void 0,n.domainBlacklist=((a=e82.domainBlacklist)==null?void 0:a.map(f=>f))||[],n.domainWhitelist=((u=e82.domainWhitelist)==null?void 0:u.map(f=>f))||[],n.titleTextMaxLength=e82.titleTextMaxLength??void 0,n.bodyRestrictionPolicy=e82.bodyRestrictionPolicy??void 0,n.linkRestrictionPolicy=e82.linkRestrictionPolicy??void 0,n.guidelinesDisplayPolicy=e82.guidelinesDisplayPolicy??void 0,n.bodyRequiredStrings=((l=e82.bodyRequiredStrings)==null?void 0:l.map(f=>f))||[],n.titleTextMinLength=e82.titleTextMinLength??void 0,n.galleryCaptionsRequirement=e82.galleryCaptionsRequirement??void 0,n.isFlairRequired=e82.isFlairRequired??void 0,n.galleryMaxItems=e82.galleryMaxItems??void 0,n.galleryUrlsRequirement=e82.galleryUrlsRequirement??void 0,n.bodyRegexes=((s=e82.bodyRegexes)==null?void 0:s.map(f=>f))||[],n.linkRepostAge=e82.linkRepostAge??void 0,n.bodyTextMinLength=e82.bodyTextMinLength??void 0,n}};messageTypeRegistry.set(SubredditPostRequirementsResponse.$type,SubredditPostRequirementsResponse);function createBaseSubredditAboutResponse(){return{kind:void 0,data:void 0}}var SubredditAboutResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&SubredditAboutResponse_AboutData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=SubredditAboutResponse_AboutData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,data:isSet$h(e82.data)?SubredditAboutResponse_AboutData.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=SubredditAboutResponse_AboutData.toJSON(e82.data)),n},create(e82){return SubredditAboutResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAboutResponse();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?SubredditAboutResponse_AboutData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(SubredditAboutResponse.$type,SubredditAboutResponse);function createBaseSubredditAboutResponse_AboutData(){return{userFlairBackgroundColor:void 0,submitTextHtml:void 0,restrictPosting:void 0,userIsBanned:void 0,freeFormReports:void 0,wikiEnabled:void 0,userIsMuted:void 0,userCanFlairInSr:void 0,displayName:void 0,headerImg:void 0,title:void 0,allowGalleries:void 0,primaryColor:void 0,activeUserCount:void 0,iconImg:void 0,displayNamePrefixed:void 0,accountsActive:void 0,publicTraffic:void 0,subscribers:void 0,userFlairRichtext:[],name:void 0,quarantine:void 0,hideAds:void 0,emojisEnabled:void 0,advertiserCategory:void 0,publicDescription:void 0,commentScoreHideMins:void 0,allowPredictions:void 0,userHasFavorited:void 0,userFlairTemplateId:void 0,communityIcon:void 0,bannerBackgroundImage:void 0,originalContentTagEnabled:void 0,communityReviewed:void 0,submitText:void 0,descriptionHtml:void 0,spoilersEnabled:void 0,commentContributionSettings:void 0,allowTalks:void 0,userFlairPosition:void 0,allOriginalContent:void 0,collectionsEnabled:void 0,isEnrolledInNewModmail:void 0,keyColor:void 0,eventPostsEnabled:void 0,canAssignUserFlair:void 0,created:void 0,showMediaPreview:void 0,submissionType:void 0,userIsSubscriber:void 0,allowedMediaInComments:[],allowVideogifs:void 0,shouldArchivePosts:void 0,userFlairType:void 0,allowPolls:void 0,collapseDeletedComments:void 0,coins:void 0,publicDescriptionHtml:void 0,allowVideos:void 0,isCrosspostableSubreddit:void 0,notificationLevel:void 0,shouldShowMediaInCommentsSetting:void 0,canAssignLinkFlair:void 0,hasMenuWidget:void 0,accountsActiveIsFuzzed:void 0,allowPredictionContributors:void 0,submitTextLabel:void 0,linkFlairPosition:void 0,userSrFlairEnabled:void 0,userFlairEnabledInSr:void 0,allowChatPostCreation:void 0,allowDiscovery:void 0,acceptFollowers:void 0,userSrThemeEnabled:void 0,linkFlairEnabled:void 0,disableContributorRequests:void 0,subredditType:void 0,suggestedCommentSort:void 0,bannerImg:void 0,userFlairText:void 0,bannerBackgroundColor:void 0,showMedia:void 0,id:void 0,userIsModerator:void 0,over18:void 0,headerTitle:void 0,description:void 0,isChatPostFeatureEnabled:void 0,submitLinkLabel:void 0,userFlairTextColor:void 0,restrictCommenting:void 0,userFlairCssClass:void 0,allowImages:void 0,lang:void 0,url:void 0,createdUtc:void 0,bannerSize:[],mobileBannerImage:void 0,userIsContributor:void 0,allowPredictionsTournament:void 0,iconSize:[],headerSize:[],wls:void 0,whitelistStatus:void 0,emojisCustomSize:[]}}var SubredditAboutResponse_AboutData={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutResponse.AboutData",encode(e82,n=_m0.Writer.create()){e82.userFlairBackgroundColor!==void 0&&StringValue.encode({value:e82.userFlairBackgroundColor},n.uint32(10).fork()).ldelim(),e82.submitTextHtml!==void 0&&StringValue.encode({value:e82.submitTextHtml},n.uint32(18).fork()).ldelim(),e82.restrictPosting!==void 0&&BoolValue.encode({value:e82.restrictPosting},n.uint32(26).fork()).ldelim(),e82.userIsBanned!==void 0&&BoolValue.encode({value:e82.userIsBanned},n.uint32(34).fork()).ldelim(),e82.freeFormReports!==void 0&&BoolValue.encode({value:e82.freeFormReports},n.uint32(42).fork()).ldelim(),e82.wikiEnabled!==void 0&&BoolValue.encode({value:e82.wikiEnabled},n.uint32(50).fork()).ldelim(),e82.userIsMuted!==void 0&&BoolValue.encode({value:e82.userIsMuted},n.uint32(58).fork()).ldelim(),e82.userCanFlairInSr!==void 0&&BoolValue.encode({value:e82.userCanFlairInSr},n.uint32(66).fork()).ldelim(),e82.displayName!==void 0&&StringValue.encode({value:e82.displayName},n.uint32(74).fork()).ldelim(),e82.headerImg!==void 0&&StringValue.encode({value:e82.headerImg},n.uint32(82).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(90).fork()).ldelim(),e82.allowGalleries!==void 0&&BoolValue.encode({value:e82.allowGalleries},n.uint32(98).fork()).ldelim(),e82.primaryColor!==void 0&&StringValue.encode({value:e82.primaryColor},n.uint32(114).fork()).ldelim(),e82.activeUserCount!==void 0&&Int64Value.encode({value:e82.activeUserCount},n.uint32(122).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(130).fork()).ldelim(),e82.displayNamePrefixed!==void 0&&StringValue.encode({value:e82.displayNamePrefixed},n.uint32(138).fork()).ldelim(),e82.accountsActive!==void 0&&Int64Value.encode({value:e82.accountsActive},n.uint32(146).fork()).ldelim(),e82.publicTraffic!==void 0&&BoolValue.encode({value:e82.publicTraffic},n.uint32(154).fork()).ldelim(),e82.subscribers!==void 0&&Int64Value.encode({value:e82.subscribers},n.uint32(162).fork()).ldelim();for(let t of e82.userFlairRichtext)UserFlairRichtext.encode(t,n.uint32(170).fork()).ldelim();e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(178).fork()).ldelim(),e82.quarantine!==void 0&&BoolValue.encode({value:e82.quarantine},n.uint32(186).fork()).ldelim(),e82.hideAds!==void 0&&BoolValue.encode({value:e82.hideAds},n.uint32(194).fork()).ldelim(),e82.emojisEnabled!==void 0&&BoolValue.encode({value:e82.emojisEnabled},n.uint32(210).fork()).ldelim(),e82.advertiserCategory!==void 0&&StringValue.encode({value:e82.advertiserCategory},n.uint32(218).fork()).ldelim(),e82.publicDescription!==void 0&&StringValue.encode({value:e82.publicDescription},n.uint32(226).fork()).ldelim(),e82.commentScoreHideMins!==void 0&&Int32Value.encode({value:e82.commentScoreHideMins},n.uint32(234).fork()).ldelim(),e82.allowPredictions!==void 0&&BoolValue.encode({value:e82.allowPredictions},n.uint32(242).fork()).ldelim(),e82.userHasFavorited!==void 0&&BoolValue.encode({value:e82.userHasFavorited},n.uint32(250).fork()).ldelim(),e82.userFlairTemplateId!==void 0&&StringValue.encode({value:e82.userFlairTemplateId},n.uint32(258).fork()).ldelim(),e82.communityIcon!==void 0&&StringValue.encode({value:e82.communityIcon},n.uint32(266).fork()).ldelim(),e82.bannerBackgroundImage!==void 0&&StringValue.encode({value:e82.bannerBackgroundImage},n.uint32(274).fork()).ldelim(),e82.originalContentTagEnabled!==void 0&&BoolValue.encode({value:e82.originalContentTagEnabled},n.uint32(282).fork()).ldelim(),e82.communityReviewed!==void 0&&BoolValue.encode({value:e82.communityReviewed},n.uint32(290).fork()).ldelim(),e82.submitText!==void 0&&StringValue.encode({value:e82.submitText},n.uint32(298).fork()).ldelim(),e82.descriptionHtml!==void 0&&StringValue.encode({value:e82.descriptionHtml},n.uint32(306).fork()).ldelim(),e82.spoilersEnabled!==void 0&&BoolValue.encode({value:e82.spoilersEnabled},n.uint32(314).fork()).ldelim(),e82.commentContributionSettings!==void 0&&CommentContributionSettings.encode(e82.commentContributionSettings,n.uint32(322).fork()).ldelim(),e82.allowTalks!==void 0&&BoolValue.encode({value:e82.allowTalks},n.uint32(330).fork()).ldelim(),e82.userFlairPosition!==void 0&&StringValue.encode({value:e82.userFlairPosition},n.uint32(346).fork()).ldelim(),e82.allOriginalContent!==void 0&&BoolValue.encode({value:e82.allOriginalContent},n.uint32(354).fork()).ldelim(),e82.collectionsEnabled!==void 0&&BoolValue.encode({value:e82.collectionsEnabled},n.uint32(362).fork()).ldelim(),e82.isEnrolledInNewModmail!==void 0&&BoolValue.encode({value:e82.isEnrolledInNewModmail},n.uint32(370).fork()).ldelim(),e82.keyColor!==void 0&&StringValue.encode({value:e82.keyColor},n.uint32(378).fork()).ldelim(),e82.eventPostsEnabled!==void 0&&BoolValue.encode({value:e82.eventPostsEnabled},n.uint32(386).fork()).ldelim(),e82.canAssignUserFlair!==void 0&&BoolValue.encode({value:e82.canAssignUserFlair},n.uint32(394).fork()).ldelim(),e82.created!==void 0&&Int64Value.encode({value:e82.created},n.uint32(402).fork()).ldelim(),e82.showMediaPreview!==void 0&&BoolValue.encode({value:e82.showMediaPreview},n.uint32(418).fork()).ldelim(),e82.submissionType!==void 0&&StringValue.encode({value:e82.submissionType},n.uint32(426).fork()).ldelim(),e82.userIsSubscriber!==void 0&&BoolValue.encode({value:e82.userIsSubscriber},n.uint32(434).fork()).ldelim();for(let t of e82.allowedMediaInComments)StringValue.encode({value:t},n.uint32(442).fork()).ldelim();e82.allowVideogifs!==void 0&&BoolValue.encode({value:e82.allowVideogifs},n.uint32(450).fork()).ldelim(),e82.shouldArchivePosts!==void 0&&BoolValue.encode({value:e82.shouldArchivePosts},n.uint32(458).fork()).ldelim(),e82.userFlairType!==void 0&&StringValue.encode({value:e82.userFlairType},n.uint32(466).fork()).ldelim(),e82.allowPolls!==void 0&&BoolValue.encode({value:e82.allowPolls},n.uint32(474).fork()).ldelim(),e82.collapseDeletedComments!==void 0&&BoolValue.encode({value:e82.collapseDeletedComments},n.uint32(482).fork()).ldelim(),e82.coins!==void 0&&Int64Value.encode({value:e82.coins},n.uint32(490).fork()).ldelim(),e82.publicDescriptionHtml!==void 0&&StringValue.encode({value:e82.publicDescriptionHtml},n.uint32(506).fork()).ldelim(),e82.allowVideos!==void 0&&BoolValue.encode({value:e82.allowVideos},n.uint32(514).fork()).ldelim(),e82.isCrosspostableSubreddit!==void 0&&BoolValue.encode({value:e82.isCrosspostableSubreddit},n.uint32(522).fork()).ldelim(),e82.notificationLevel!==void 0&&StringValue.encode({value:e82.notificationLevel},n.uint32(530).fork()).ldelim(),e82.shouldShowMediaInCommentsSetting!==void 0&&BoolValue.encode({value:e82.shouldShowMediaInCommentsSetting},n.uint32(538).fork()).ldelim(),e82.canAssignLinkFlair!==void 0&&BoolValue.encode({value:e82.canAssignLinkFlair},n.uint32(546).fork()).ldelim(),e82.hasMenuWidget!==void 0&&BoolValue.encode({value:e82.hasMenuWidget},n.uint32(554).fork()).ldelim(),e82.accountsActiveIsFuzzed!==void 0&&BoolValue.encode({value:e82.accountsActiveIsFuzzed},n.uint32(562).fork()).ldelim(),e82.allowPredictionContributors!==void 0&&BoolValue.encode({value:e82.allowPredictionContributors},n.uint32(570).fork()).ldelim(),e82.submitTextLabel!==void 0&&StringValue.encode({value:e82.submitTextLabel},n.uint32(578).fork()).ldelim(),e82.linkFlairPosition!==void 0&&StringValue.encode({value:e82.linkFlairPosition},n.uint32(586).fork()).ldelim(),e82.userSrFlairEnabled!==void 0&&BoolValue.encode({value:e82.userSrFlairEnabled},n.uint32(594).fork()).ldelim(),e82.userFlairEnabledInSr!==void 0&&BoolValue.encode({value:e82.userFlairEnabledInSr},n.uint32(602).fork()).ldelim(),e82.allowChatPostCreation!==void 0&&BoolValue.encode({value:e82.allowChatPostCreation},n.uint32(610).fork()).ldelim(),e82.allowDiscovery!==void 0&&BoolValue.encode({value:e82.allowDiscovery},n.uint32(618).fork()).ldelim(),e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(626).fork()).ldelim(),e82.userSrThemeEnabled!==void 0&&BoolValue.encode({value:e82.userSrThemeEnabled},n.uint32(634).fork()).ldelim(),e82.linkFlairEnabled!==void 0&&BoolValue.encode({value:e82.linkFlairEnabled},n.uint32(642).fork()).ldelim(),e82.disableContributorRequests!==void 0&&BoolValue.encode({value:e82.disableContributorRequests},n.uint32(650).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(658).fork()).ldelim(),e82.suggestedCommentSort!==void 0&&StringValue.encode({value:e82.suggestedCommentSort},n.uint32(666).fork()).ldelim(),e82.bannerImg!==void 0&&StringValue.encode({value:e82.bannerImg},n.uint32(674).fork()).ldelim(),e82.userFlairText!==void 0&&StringValue.encode({value:e82.userFlairText},n.uint32(682).fork()).ldelim(),e82.bannerBackgroundColor!==void 0&&StringValue.encode({value:e82.bannerBackgroundColor},n.uint32(690).fork()).ldelim(),e82.showMedia!==void 0&&BoolValue.encode({value:e82.showMedia},n.uint32(698).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(706).fork()).ldelim(),e82.userIsModerator!==void 0&&BoolValue.encode({value:e82.userIsModerator},n.uint32(714).fork()).ldelim(),e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(722).fork()).ldelim(),e82.headerTitle!==void 0&&StringValue.encode({value:e82.headerTitle},n.uint32(730).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(738).fork()).ldelim(),e82.isChatPostFeatureEnabled!==void 0&&BoolValue.encode({value:e82.isChatPostFeatureEnabled},n.uint32(746).fork()).ldelim(),e82.submitLinkLabel!==void 0&&StringValue.encode({value:e82.submitLinkLabel},n.uint32(754).fork()).ldelim(),e82.userFlairTextColor!==void 0&&StringValue.encode({value:e82.userFlairTextColor},n.uint32(762).fork()).ldelim(),e82.restrictCommenting!==void 0&&BoolValue.encode({value:e82.restrictCommenting},n.uint32(770).fork()).ldelim(),e82.userFlairCssClass!==void 0&&StringValue.encode({value:e82.userFlairCssClass},n.uint32(778).fork()).ldelim(),e82.allowImages!==void 0&&BoolValue.encode({value:e82.allowImages},n.uint32(786).fork()).ldelim(),e82.lang!==void 0&&StringValue.encode({value:e82.lang},n.uint32(794).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(810).fork()).ldelim(),e82.createdUtc!==void 0&&Int64Value.encode({value:e82.createdUtc},n.uint32(818).fork()).ldelim();for(let t of e82.bannerSize)Int64Value.encode({value:t},n.uint32(826).fork()).ldelim();e82.mobileBannerImage!==void 0&&StringValue.encode({value:e82.mobileBannerImage},n.uint32(834).fork()).ldelim(),e82.userIsContributor!==void 0&&BoolValue.encode({value:e82.userIsContributor},n.uint32(842).fork()).ldelim(),e82.allowPredictionsTournament!==void 0&&BoolValue.encode({value:e82.allowPredictionsTournament},n.uint32(850).fork()).ldelim();for(let t of e82.iconSize)Int64Value.encode({value:t},n.uint32(858).fork()).ldelim();for(let t of e82.headerSize)Int64Value.encode({value:t},n.uint32(866).fork()).ldelim();e82.wls!==void 0&&Int32Value.encode({value:e82.wls},n.uint32(874).fork()).ldelim(),e82.whitelistStatus!==void 0&&StringValue.encode({value:e82.whitelistStatus},n.uint32(882).fork()).ldelim();for(let t of e82.emojisCustomSize)Int64Value.encode({value:t},n.uint32(890).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutResponse_AboutData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.userFlairBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.submitTextHtml=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.restrictPosting=BoolValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.userIsBanned=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.freeFormReports=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.wikiEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.userIsMuted=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.userCanFlairInSr=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.displayName=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.headerImg=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.title=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.allowGalleries=BoolValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.primaryColor=StringValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.activeUserCount=Int64Value.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.displayNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.accountsActive=Int64Value.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.publicTraffic=BoolValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.subscribers=Int64Value.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.userFlairRichtext.push(UserFlairRichtext.decode(t,t.uint32()));continue;case 22:if(r!==178)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.quarantine=BoolValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.hideAds=BoolValue.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.emojisEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.advertiserCategory=StringValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.publicDescription=StringValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.commentScoreHideMins=Int32Value.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.allowPredictions=BoolValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.userHasFavorited=BoolValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.userFlairTemplateId=StringValue.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.communityIcon=StringValue.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.bannerBackgroundImage=StringValue.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.originalContentTagEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.communityReviewed=BoolValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.submitText=StringValue.decode(t,t.uint32()).value;continue;case 38:if(r!==306)break;d.descriptionHtml=StringValue.decode(t,t.uint32()).value;continue;case 39:if(r!==314)break;d.spoilersEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.commentContributionSettings=CommentContributionSettings.decode(t,t.uint32());continue;case 41:if(r!==330)break;d.allowTalks=BoolValue.decode(t,t.uint32()).value;continue;case 43:if(r!==346)break;d.userFlairPosition=StringValue.decode(t,t.uint32()).value;continue;case 44:if(r!==354)break;d.allOriginalContent=BoolValue.decode(t,t.uint32()).value;continue;case 45:if(r!==362)break;d.collectionsEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 46:if(r!==370)break;d.isEnrolledInNewModmail=BoolValue.decode(t,t.uint32()).value;continue;case 47:if(r!==378)break;d.keyColor=StringValue.decode(t,t.uint32()).value;continue;case 48:if(r!==386)break;d.eventPostsEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 49:if(r!==394)break;d.canAssignUserFlair=BoolValue.decode(t,t.uint32()).value;continue;case 50:if(r!==402)break;d.created=Int64Value.decode(t,t.uint32()).value;continue;case 52:if(r!==418)break;d.showMediaPreview=BoolValue.decode(t,t.uint32()).value;continue;case 53:if(r!==426)break;d.submissionType=StringValue.decode(t,t.uint32()).value;continue;case 54:if(r!==434)break;d.userIsSubscriber=BoolValue.decode(t,t.uint32()).value;continue;case 55:if(r!==442)break;d.allowedMediaInComments.push(StringValue.decode(t,t.uint32()).value);continue;case 56:if(r!==450)break;d.allowVideogifs=BoolValue.decode(t,t.uint32()).value;continue;case 57:if(r!==458)break;d.shouldArchivePosts=BoolValue.decode(t,t.uint32()).value;continue;case 58:if(r!==466)break;d.userFlairType=StringValue.decode(t,t.uint32()).value;continue;case 59:if(r!==474)break;d.allowPolls=BoolValue.decode(t,t.uint32()).value;continue;case 60:if(r!==482)break;d.collapseDeletedComments=BoolValue.decode(t,t.uint32()).value;continue;case 61:if(r!==490)break;d.coins=Int64Value.decode(t,t.uint32()).value;continue;case 63:if(r!==506)break;d.publicDescriptionHtml=StringValue.decode(t,t.uint32()).value;continue;case 64:if(r!==514)break;d.allowVideos=BoolValue.decode(t,t.uint32()).value;continue;case 65:if(r!==522)break;d.isCrosspostableSubreddit=BoolValue.decode(t,t.uint32()).value;continue;case 66:if(r!==530)break;d.notificationLevel=StringValue.decode(t,t.uint32()).value;continue;case 67:if(r!==538)break;d.shouldShowMediaInCommentsSetting=BoolValue.decode(t,t.uint32()).value;continue;case 68:if(r!==546)break;d.canAssignLinkFlair=BoolValue.decode(t,t.uint32()).value;continue;case 69:if(r!==554)break;d.hasMenuWidget=BoolValue.decode(t,t.uint32()).value;continue;case 70:if(r!==562)break;d.accountsActiveIsFuzzed=BoolValue.decode(t,t.uint32()).value;continue;case 71:if(r!==570)break;d.allowPredictionContributors=BoolValue.decode(t,t.uint32()).value;continue;case 72:if(r!==578)break;d.submitTextLabel=StringValue.decode(t,t.uint32()).value;continue;case 73:if(r!==586)break;d.linkFlairPosition=StringValue.decode(t,t.uint32()).value;continue;case 74:if(r!==594)break;d.userSrFlairEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 75:if(r!==602)break;d.userFlairEnabledInSr=BoolValue.decode(t,t.uint32()).value;continue;case 76:if(r!==610)break;d.allowChatPostCreation=BoolValue.decode(t,t.uint32()).value;continue;case 77:if(r!==618)break;d.allowDiscovery=BoolValue.decode(t,t.uint32()).value;continue;case 78:if(r!==626)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 79:if(r!==634)break;d.userSrThemeEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 80:if(r!==642)break;d.linkFlairEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 81:if(r!==650)break;d.disableContributorRequests=BoolValue.decode(t,t.uint32()).value;continue;case 82:if(r!==658)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 83:if(r!==666)break;d.suggestedCommentSort=StringValue.decode(t,t.uint32()).value;continue;case 84:if(r!==674)break;d.bannerImg=StringValue.decode(t,t.uint32()).value;continue;case 85:if(r!==682)break;d.userFlairText=StringValue.decode(t,t.uint32()).value;continue;case 86:if(r!==690)break;d.bannerBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 87:if(r!==698)break;d.showMedia=BoolValue.decode(t,t.uint32()).value;continue;case 88:if(r!==706)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 89:if(r!==714)break;d.userIsModerator=BoolValue.decode(t,t.uint32()).value;continue;case 90:if(r!==722)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 91:if(r!==730)break;d.headerTitle=StringValue.decode(t,t.uint32()).value;continue;case 92:if(r!==738)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 93:if(r!==746)break;d.isChatPostFeatureEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 94:if(r!==754)break;d.submitLinkLabel=StringValue.decode(t,t.uint32()).value;continue;case 95:if(r!==762)break;d.userFlairTextColor=StringValue.decode(t,t.uint32()).value;continue;case 96:if(r!==770)break;d.restrictCommenting=BoolValue.decode(t,t.uint32()).value;continue;case 97:if(r!==778)break;d.userFlairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 98:if(r!==786)break;d.allowImages=BoolValue.decode(t,t.uint32()).value;continue;case 99:if(r!==794)break;d.lang=StringValue.decode(t,t.uint32()).value;continue;case 101:if(r!==810)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 102:if(r!==818)break;d.createdUtc=Int64Value.decode(t,t.uint32()).value;continue;case 103:if(r!==826)break;d.bannerSize.push(Int64Value.decode(t,t.uint32()).value);continue;case 104:if(r!==834)break;d.mobileBannerImage=StringValue.decode(t,t.uint32()).value;continue;case 105:if(r!==842)break;d.userIsContributor=BoolValue.decode(t,t.uint32()).value;continue;case 106:if(r!==850)break;d.allowPredictionsTournament=BoolValue.decode(t,t.uint32()).value;continue;case 107:if(r!==858)break;d.iconSize.push(Int64Value.decode(t,t.uint32()).value);continue;case 108:if(r!==866)break;d.headerSize.push(Int64Value.decode(t,t.uint32()).value);continue;case 109:if(r!==874)break;d.wls=Int32Value.decode(t,t.uint32()).value;continue;case 110:if(r!==882)break;d.whitelistStatus=StringValue.decode(t,t.uint32()).value;continue;case 111:if(r!==890)break;d.emojisCustomSize.push(Int64Value.decode(t,t.uint32()).value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{userFlairBackgroundColor:isSet$h(e82.userFlairBackgroundColor)?String(e82.userFlairBackgroundColor):void 0,submitTextHtml:isSet$h(e82.submitTextHtml)?String(e82.submitTextHtml):void 0,restrictPosting:isSet$h(e82.restrictPosting)?!!e82.restrictPosting:void 0,userIsBanned:isSet$h(e82.userIsBanned)?!!e82.userIsBanned:void 0,freeFormReports:isSet$h(e82.freeFormReports)?!!e82.freeFormReports:void 0,wikiEnabled:isSet$h(e82.wikiEnabled)?!!e82.wikiEnabled:void 0,userIsMuted:isSet$h(e82.userIsMuted)?!!e82.userIsMuted:void 0,userCanFlairInSr:isSet$h(e82.userCanFlairInSr)?!!e82.userCanFlairInSr:void 0,displayName:isSet$h(e82.displayName)?String(e82.displayName):void 0,headerImg:isSet$h(e82.headerImg)?String(e82.headerImg):void 0,title:isSet$h(e82.title)?String(e82.title):void 0,allowGalleries:isSet$h(e82.allowGalleries)?!!e82.allowGalleries:void 0,primaryColor:isSet$h(e82.primaryColor)?String(e82.primaryColor):void 0,activeUserCount:isSet$h(e82.activeUserCount)?Number(e82.activeUserCount):void 0,iconImg:isSet$h(e82.iconImg)?String(e82.iconImg):void 0,displayNamePrefixed:isSet$h(e82.displayNamePrefixed)?String(e82.displayNamePrefixed):void 0,accountsActive:isSet$h(e82.accountsActive)?Number(e82.accountsActive):void 0,publicTraffic:isSet$h(e82.publicTraffic)?!!e82.publicTraffic:void 0,subscribers:isSet$h(e82.subscribers)?Number(e82.subscribers):void 0,userFlairRichtext:globalThis.Array.isArray(e82?.userFlairRichtext)?e82.userFlairRichtext.map(n=>UserFlairRichtext.fromJSON(n)):[],name:isSet$h(e82.name)?String(e82.name):void 0,quarantine:isSet$h(e82.quarantine)?!!e82.quarantine:void 0,hideAds:isSet$h(e82.hideAds)?!!e82.hideAds:void 0,emojisEnabled:isSet$h(e82.emojisEnabled)?!!e82.emojisEnabled:void 0,advertiserCategory:isSet$h(e82.advertiserCategory)?String(e82.advertiserCategory):void 0,publicDescription:isSet$h(e82.publicDescription)?String(e82.publicDescription):void 0,commentScoreHideMins:isSet$h(e82.commentScoreHideMins)?Number(e82.commentScoreHideMins):void 0,allowPredictions:isSet$h(e82.allowPredictions)?!!e82.allowPredictions:void 0,userHasFavorited:isSet$h(e82.userHasFavorited)?!!e82.userHasFavorited:void 0,userFlairTemplateId:isSet$h(e82.userFlairTemplateId)?String(e82.userFlairTemplateId):void 0,communityIcon:isSet$h(e82.communityIcon)?String(e82.communityIcon):void 0,bannerBackgroundImage:isSet$h(e82.bannerBackgroundImage)?String(e82.bannerBackgroundImage):void 0,originalContentTagEnabled:isSet$h(e82.originalContentTagEnabled)?!!e82.originalContentTagEnabled:void 0,communityReviewed:isSet$h(e82.communityReviewed)?!!e82.communityReviewed:void 0,submitText:isSet$h(e82.submitText)?String(e82.submitText):void 0,descriptionHtml:isSet$h(e82.descriptionHtml)?String(e82.descriptionHtml):void 0,spoilersEnabled:isSet$h(e82.spoilersEnabled)?!!e82.spoilersEnabled:void 0,commentContributionSettings:isSet$h(e82.commentContributionSettings)?CommentContributionSettings.fromJSON(e82.commentContributionSettings):void 0,allowTalks:isSet$h(e82.allowTalks)?!!e82.allowTalks:void 0,userFlairPosition:isSet$h(e82.userFlairPosition)?String(e82.userFlairPosition):void 0,allOriginalContent:isSet$h(e82.allOriginalContent)?!!e82.allOriginalContent:void 0,collectionsEnabled:isSet$h(e82.collectionsEnabled)?!!e82.collectionsEnabled:void 0,isEnrolledInNewModmail:isSet$h(e82.isEnrolledInNewModmail)?!!e82.isEnrolledInNewModmail:void 0,keyColor:isSet$h(e82.keyColor)?String(e82.keyColor):void 0,eventPostsEnabled:isSet$h(e82.eventPostsEnabled)?!!e82.eventPostsEnabled:void 0,canAssignUserFlair:isSet$h(e82.canAssignUserFlair)?!!e82.canAssignUserFlair:void 0,created:isSet$h(e82.created)?Number(e82.created):void 0,showMediaPreview:isSet$h(e82.showMediaPreview)?!!e82.showMediaPreview:void 0,submissionType:isSet$h(e82.submissionType)?String(e82.submissionType):void 0,userIsSubscriber:isSet$h(e82.userIsSubscriber)?!!e82.userIsSubscriber:void 0,allowedMediaInComments:globalThis.Array.isArray(e82?.allowedMediaInComments)?e82.allowedMediaInComments.map(n=>String(n)):[],allowVideogifs:isSet$h(e82.allowVideogifs)?!!e82.allowVideogifs:void 0,shouldArchivePosts:isSet$h(e82.shouldArchivePosts)?!!e82.shouldArchivePosts:void 0,userFlairType:isSet$h(e82.userFlairType)?String(e82.userFlairType):void 0,allowPolls:isSet$h(e82.allowPolls)?!!e82.allowPolls:void 0,collapseDeletedComments:isSet$h(e82.collapseDeletedComments)?!!e82.collapseDeletedComments:void 0,coins:isSet$h(e82.coins)?Number(e82.coins):void 0,publicDescriptionHtml:isSet$h(e82.publicDescriptionHtml)?String(e82.publicDescriptionHtml):void 0,allowVideos:isSet$h(e82.allowVideos)?!!e82.allowVideos:void 0,isCrosspostableSubreddit:isSet$h(e82.isCrosspostableSubreddit)?!!e82.isCrosspostableSubreddit:void 0,notificationLevel:isSet$h(e82.notificationLevel)?String(e82.notificationLevel):void 0,shouldShowMediaInCommentsSetting:isSet$h(e82.shouldShowMediaInCommentsSetting)?!!e82.shouldShowMediaInCommentsSetting:void 0,canAssignLinkFlair:isSet$h(e82.canAssignLinkFlair)?!!e82.canAssignLinkFlair:void 0,hasMenuWidget:isSet$h(e82.hasMenuWidget)?!!e82.hasMenuWidget:void 0,accountsActiveIsFuzzed:isSet$h(e82.accountsActiveIsFuzzed)?!!e82.accountsActiveIsFuzzed:void 0,allowPredictionContributors:isSet$h(e82.allowPredictionContributors)?!!e82.allowPredictionContributors:void 0,submitTextLabel:isSet$h(e82.submitTextLabel)?String(e82.submitTextLabel):void 0,linkFlairPosition:isSet$h(e82.linkFlairPosition)?String(e82.linkFlairPosition):void 0,userSrFlairEnabled:isSet$h(e82.userSrFlairEnabled)?!!e82.userSrFlairEnabled:void 0,userFlairEnabledInSr:isSet$h(e82.userFlairEnabledInSr)?!!e82.userFlairEnabledInSr:void 0,allowChatPostCreation:isSet$h(e82.allowChatPostCreation)?!!e82.allowChatPostCreation:void 0,allowDiscovery:isSet$h(e82.allowDiscovery)?!!e82.allowDiscovery:void 0,acceptFollowers:isSet$h(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,userSrThemeEnabled:isSet$h(e82.userSrThemeEnabled)?!!e82.userSrThemeEnabled:void 0,linkFlairEnabled:isSet$h(e82.linkFlairEnabled)?!!e82.linkFlairEnabled:void 0,disableContributorRequests:isSet$h(e82.disableContributorRequests)?!!e82.disableContributorRequests:void 0,subredditType:isSet$h(e82.subredditType)?String(e82.subredditType):void 0,suggestedCommentSort:isSet$h(e82.suggestedCommentSort)?String(e82.suggestedCommentSort):void 0,bannerImg:isSet$h(e82.bannerImg)?String(e82.bannerImg):void 0,userFlairText:isSet$h(e82.userFlairText)?String(e82.userFlairText):void 0,bannerBackgroundColor:isSet$h(e82.bannerBackgroundColor)?String(e82.bannerBackgroundColor):void 0,showMedia:isSet$h(e82.showMedia)?!!e82.showMedia:void 0,id:isSet$h(e82.id)?String(e82.id):void 0,userIsModerator:isSet$h(e82.userIsModerator)?!!e82.userIsModerator:void 0,over18:isSet$h(e82.over18)?!!e82.over18:void 0,headerTitle:isSet$h(e82.headerTitle)?String(e82.headerTitle):void 0,description:isSet$h(e82.description)?String(e82.description):void 0,isChatPostFeatureEnabled:isSet$h(e82.isChatPostFeatureEnabled)?!!e82.isChatPostFeatureEnabled:void 0,submitLinkLabel:isSet$h(e82.submitLinkLabel)?String(e82.submitLinkLabel):void 0,userFlairTextColor:isSet$h(e82.userFlairTextColor)?String(e82.userFlairTextColor):void 0,restrictCommenting:isSet$h(e82.restrictCommenting)?!!e82.restrictCommenting:void 0,userFlairCssClass:isSet$h(e82.userFlairCssClass)?String(e82.userFlairCssClass):void 0,allowImages:isSet$h(e82.allowImages)?!!e82.allowImages:void 0,lang:isSet$h(e82.lang)?String(e82.lang):void 0,url:isSet$h(e82.url)?String(e82.url):void 0,createdUtc:isSet$h(e82.createdUtc)?Number(e82.createdUtc):void 0,bannerSize:globalThis.Array.isArray(e82?.bannerSize)?e82.bannerSize.map(n=>Number(n)):[],mobileBannerImage:isSet$h(e82.mobileBannerImage)?String(e82.mobileBannerImage):void 0,userIsContributor:isSet$h(e82.userIsContributor)?!!e82.userIsContributor:void 0,allowPredictionsTournament:isSet$h(e82.allowPredictionsTournament)?!!e82.allowPredictionsTournament:void 0,iconSize:globalThis.Array.isArray(e82?.iconSize)?e82.iconSize.map(n=>Number(n)):[],headerSize:globalThis.Array.isArray(e82?.headerSize)?e82.headerSize.map(n=>Number(n)):[],wls:isSet$h(e82.wls)?Number(e82.wls):void 0,whitelistStatus:isSet$h(e82.whitelistStatus)?String(e82.whitelistStatus):void 0,emojisCustomSize:globalThis.Array.isArray(e82?.emojisCustomSize)?e82.emojisCustomSize.map(n=>Number(n)):[]}},toJSON(e82){var t,o,d,r,a,u;let n={};return e82.userFlairBackgroundColor!==void 0&&(n.userFlairBackgroundColor=e82.userFlairBackgroundColor),e82.submitTextHtml!==void 0&&(n.submitTextHtml=e82.submitTextHtml),e82.restrictPosting!==void 0&&(n.restrictPosting=e82.restrictPosting),e82.userIsBanned!==void 0&&(n.userIsBanned=e82.userIsBanned),e82.freeFormReports!==void 0&&(n.freeFormReports=e82.freeFormReports),e82.wikiEnabled!==void 0&&(n.wikiEnabled=e82.wikiEnabled),e82.userIsMuted!==void 0&&(n.userIsMuted=e82.userIsMuted),e82.userCanFlairInSr!==void 0&&(n.userCanFlairInSr=e82.userCanFlairInSr),e82.displayName!==void 0&&(n.displayName=e82.displayName),e82.headerImg!==void 0&&(n.headerImg=e82.headerImg),e82.title!==void 0&&(n.title=e82.title),e82.allowGalleries!==void 0&&(n.allowGalleries=e82.allowGalleries),e82.primaryColor!==void 0&&(n.primaryColor=e82.primaryColor),e82.activeUserCount!==void 0&&(n.activeUserCount=e82.activeUserCount),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.displayNamePrefixed!==void 0&&(n.displayNamePrefixed=e82.displayNamePrefixed),e82.accountsActive!==void 0&&(n.accountsActive=e82.accountsActive),e82.publicTraffic!==void 0&&(n.publicTraffic=e82.publicTraffic),e82.subscribers!==void 0&&(n.subscribers=e82.subscribers),(t=e82.userFlairRichtext)!=null&&t.length&&(n.userFlairRichtext=e82.userFlairRichtext.map(l=>UserFlairRichtext.toJSON(l))),e82.name!==void 0&&(n.name=e82.name),e82.quarantine!==void 0&&(n.quarantine=e82.quarantine),e82.hideAds!==void 0&&(n.hideAds=e82.hideAds),e82.emojisEnabled!==void 0&&(n.emojisEnabled=e82.emojisEnabled),e82.advertiserCategory!==void 0&&(n.advertiserCategory=e82.advertiserCategory),e82.publicDescription!==void 0&&(n.publicDescription=e82.publicDescription),e82.commentScoreHideMins!==void 0&&(n.commentScoreHideMins=e82.commentScoreHideMins),e82.allowPredictions!==void 0&&(n.allowPredictions=e82.allowPredictions),e82.userHasFavorited!==void 0&&(n.userHasFavorited=e82.userHasFavorited),e82.userFlairTemplateId!==void 0&&(n.userFlairTemplateId=e82.userFlairTemplateId),e82.communityIcon!==void 0&&(n.communityIcon=e82.communityIcon),e82.bannerBackgroundImage!==void 0&&(n.bannerBackgroundImage=e82.bannerBackgroundImage),e82.originalContentTagEnabled!==void 0&&(n.originalContentTagEnabled=e82.originalContentTagEnabled),e82.communityReviewed!==void 0&&(n.communityReviewed=e82.communityReviewed),e82.submitText!==void 0&&(n.submitText=e82.submitText),e82.descriptionHtml!==void 0&&(n.descriptionHtml=e82.descriptionHtml),e82.spoilersEnabled!==void 0&&(n.spoilersEnabled=e82.spoilersEnabled),e82.commentContributionSettings!==void 0&&(n.commentContributionSettings=CommentContributionSettings.toJSON(e82.commentContributionSettings)),e82.allowTalks!==void 0&&(n.allowTalks=e82.allowTalks),e82.userFlairPosition!==void 0&&(n.userFlairPosition=e82.userFlairPosition),e82.allOriginalContent!==void 0&&(n.allOriginalContent=e82.allOriginalContent),e82.collectionsEnabled!==void 0&&(n.collectionsEnabled=e82.collectionsEnabled),e82.isEnrolledInNewModmail!==void 0&&(n.isEnrolledInNewModmail=e82.isEnrolledInNewModmail),e82.keyColor!==void 0&&(n.keyColor=e82.keyColor),e82.eventPostsEnabled!==void 0&&(n.eventPostsEnabled=e82.eventPostsEnabled),e82.canAssignUserFlair!==void 0&&(n.canAssignUserFlair=e82.canAssignUserFlair),e82.created!==void 0&&(n.created=e82.created),e82.showMediaPreview!==void 0&&(n.showMediaPreview=e82.showMediaPreview),e82.submissionType!==void 0&&(n.submissionType=e82.submissionType),e82.userIsSubscriber!==void 0&&(n.userIsSubscriber=e82.userIsSubscriber),(o=e82.allowedMediaInComments)!=null&&o.length&&(n.allowedMediaInComments=e82.allowedMediaInComments),e82.allowVideogifs!==void 0&&(n.allowVideogifs=e82.allowVideogifs),e82.shouldArchivePosts!==void 0&&(n.shouldArchivePosts=e82.shouldArchivePosts),e82.userFlairType!==void 0&&(n.userFlairType=e82.userFlairType),e82.allowPolls!==void 0&&(n.allowPolls=e82.allowPolls),e82.collapseDeletedComments!==void 0&&(n.collapseDeletedComments=e82.collapseDeletedComments),e82.coins!==void 0&&(n.coins=e82.coins),e82.publicDescriptionHtml!==void 0&&(n.publicDescriptionHtml=e82.publicDescriptionHtml),e82.allowVideos!==void 0&&(n.allowVideos=e82.allowVideos),e82.isCrosspostableSubreddit!==void 0&&(n.isCrosspostableSubreddit=e82.isCrosspostableSubreddit),e82.notificationLevel!==void 0&&(n.notificationLevel=e82.notificationLevel),e82.shouldShowMediaInCommentsSetting!==void 0&&(n.shouldShowMediaInCommentsSetting=e82.shouldShowMediaInCommentsSetting),e82.canAssignLinkFlair!==void 0&&(n.canAssignLinkFlair=e82.canAssignLinkFlair),e82.hasMenuWidget!==void 0&&(n.hasMenuWidget=e82.hasMenuWidget),e82.accountsActiveIsFuzzed!==void 0&&(n.accountsActiveIsFuzzed=e82.accountsActiveIsFuzzed),e82.allowPredictionContributors!==void 0&&(n.allowPredictionContributors=e82.allowPredictionContributors),e82.submitTextLabel!==void 0&&(n.submitTextLabel=e82.submitTextLabel),e82.linkFlairPosition!==void 0&&(n.linkFlairPosition=e82.linkFlairPosition),e82.userSrFlairEnabled!==void 0&&(n.userSrFlairEnabled=e82.userSrFlairEnabled),e82.userFlairEnabledInSr!==void 0&&(n.userFlairEnabledInSr=e82.userFlairEnabledInSr),e82.allowChatPostCreation!==void 0&&(n.allowChatPostCreation=e82.allowChatPostCreation),e82.allowDiscovery!==void 0&&(n.allowDiscovery=e82.allowDiscovery),e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.userSrThemeEnabled!==void 0&&(n.userSrThemeEnabled=e82.userSrThemeEnabled),e82.linkFlairEnabled!==void 0&&(n.linkFlairEnabled=e82.linkFlairEnabled),e82.disableContributorRequests!==void 0&&(n.disableContributorRequests=e82.disableContributorRequests),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.suggestedCommentSort!==void 0&&(n.suggestedCommentSort=e82.suggestedCommentSort),e82.bannerImg!==void 0&&(n.bannerImg=e82.bannerImg),e82.userFlairText!==void 0&&(n.userFlairText=e82.userFlairText),e82.bannerBackgroundColor!==void 0&&(n.bannerBackgroundColor=e82.bannerBackgroundColor),e82.showMedia!==void 0&&(n.showMedia=e82.showMedia),e82.id!==void 0&&(n.id=e82.id),e82.userIsModerator!==void 0&&(n.userIsModerator=e82.userIsModerator),e82.over18!==void 0&&(n.over18=e82.over18),e82.headerTitle!==void 0&&(n.headerTitle=e82.headerTitle),e82.description!==void 0&&(n.description=e82.description),e82.isChatPostFeatureEnabled!==void 0&&(n.isChatPostFeatureEnabled=e82.isChatPostFeatureEnabled),e82.submitLinkLabel!==void 0&&(n.submitLinkLabel=e82.submitLinkLabel),e82.userFlairTextColor!==void 0&&(n.userFlairTextColor=e82.userFlairTextColor),e82.restrictCommenting!==void 0&&(n.restrictCommenting=e82.restrictCommenting),e82.userFlairCssClass!==void 0&&(n.userFlairCssClass=e82.userFlairCssClass),e82.allowImages!==void 0&&(n.allowImages=e82.allowImages),e82.lang!==void 0&&(n.lang=e82.lang),e82.url!==void 0&&(n.url=e82.url),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),(d=e82.bannerSize)!=null&&d.length&&(n.bannerSize=e82.bannerSize),e82.mobileBannerImage!==void 0&&(n.mobileBannerImage=e82.mobileBannerImage),e82.userIsContributor!==void 0&&(n.userIsContributor=e82.userIsContributor),e82.allowPredictionsTournament!==void 0&&(n.allowPredictionsTournament=e82.allowPredictionsTournament),(r=e82.iconSize)!=null&&r.length&&(n.iconSize=e82.iconSize),(a=e82.headerSize)!=null&&a.length&&(n.headerSize=e82.headerSize),e82.wls!==void 0&&(n.wls=e82.wls),e82.whitelistStatus!==void 0&&(n.whitelistStatus=e82.whitelistStatus),(u=e82.emojisCustomSize)!=null&&u.length&&(n.emojisCustomSize=e82.emojisCustomSize),n},create(e82){return SubredditAboutResponse_AboutData.fromPartial(e82??{})},fromPartial(e82){var t,o,d,r,a,u;let n=createBaseSubredditAboutResponse_AboutData();return n.userFlairBackgroundColor=e82.userFlairBackgroundColor??void 0,n.submitTextHtml=e82.submitTextHtml??void 0,n.restrictPosting=e82.restrictPosting??void 0,n.userIsBanned=e82.userIsBanned??void 0,n.freeFormReports=e82.freeFormReports??void 0,n.wikiEnabled=e82.wikiEnabled??void 0,n.userIsMuted=e82.userIsMuted??void 0,n.userCanFlairInSr=e82.userCanFlairInSr??void 0,n.displayName=e82.displayName??void 0,n.headerImg=e82.headerImg??void 0,n.title=e82.title??void 0,n.allowGalleries=e82.allowGalleries??void 0,n.primaryColor=e82.primaryColor??void 0,n.activeUserCount=e82.activeUserCount??void 0,n.iconImg=e82.iconImg??void 0,n.displayNamePrefixed=e82.displayNamePrefixed??void 0,n.accountsActive=e82.accountsActive??void 0,n.publicTraffic=e82.publicTraffic??void 0,n.subscribers=e82.subscribers??void 0,n.userFlairRichtext=((t=e82.userFlairRichtext)==null?void 0:t.map(l=>UserFlairRichtext.fromPartial(l)))||[],n.name=e82.name??void 0,n.quarantine=e82.quarantine??void 0,n.hideAds=e82.hideAds??void 0,n.emojisEnabled=e82.emojisEnabled??void 0,n.advertiserCategory=e82.advertiserCategory??void 0,n.publicDescription=e82.publicDescription??void 0,n.commentScoreHideMins=e82.commentScoreHideMins??void 0,n.allowPredictions=e82.allowPredictions??void 0,n.userHasFavorited=e82.userHasFavorited??void 0,n.userFlairTemplateId=e82.userFlairTemplateId??void 0,n.communityIcon=e82.communityIcon??void 0,n.bannerBackgroundImage=e82.bannerBackgroundImage??void 0,n.originalContentTagEnabled=e82.originalContentTagEnabled??void 0,n.communityReviewed=e82.communityReviewed??void 0,n.submitText=e82.submitText??void 0,n.descriptionHtml=e82.descriptionHtml??void 0,n.spoilersEnabled=e82.spoilersEnabled??void 0,n.commentContributionSettings=e82.commentContributionSettings!==void 0&&e82.commentContributionSettings!==null?CommentContributionSettings.fromPartial(e82.commentContributionSettings):void 0,n.allowTalks=e82.allowTalks??void 0,n.userFlairPosition=e82.userFlairPosition??void 0,n.allOriginalContent=e82.allOriginalContent??void 0,n.collectionsEnabled=e82.collectionsEnabled??void 0,n.isEnrolledInNewModmail=e82.isEnrolledInNewModmail??void 0,n.keyColor=e82.keyColor??void 0,n.eventPostsEnabled=e82.eventPostsEnabled??void 0,n.canAssignUserFlair=e82.canAssignUserFlair??void 0,n.created=e82.created??void 0,n.showMediaPreview=e82.showMediaPreview??void 0,n.submissionType=e82.submissionType??void 0,n.userIsSubscriber=e82.userIsSubscriber??void 0,n.allowedMediaInComments=((o=e82.allowedMediaInComments)==null?void 0:o.map(l=>l))||[],n.allowVideogifs=e82.allowVideogifs??void 0,n.shouldArchivePosts=e82.shouldArchivePosts??void 0,n.userFlairType=e82.userFlairType??void 0,n.allowPolls=e82.allowPolls??void 0,n.collapseDeletedComments=e82.collapseDeletedComments??void 0,n.coins=e82.coins??void 0,n.publicDescriptionHtml=e82.publicDescriptionHtml??void 0,n.allowVideos=e82.allowVideos??void 0,n.isCrosspostableSubreddit=e82.isCrosspostableSubreddit??void 0,n.notificationLevel=e82.notificationLevel??void 0,n.shouldShowMediaInCommentsSetting=e82.shouldShowMediaInCommentsSetting??void 0,n.canAssignLinkFlair=e82.canAssignLinkFlair??void 0,n.hasMenuWidget=e82.hasMenuWidget??void 0,n.accountsActiveIsFuzzed=e82.accountsActiveIsFuzzed??void 0,n.allowPredictionContributors=e82.allowPredictionContributors??void 0,n.submitTextLabel=e82.submitTextLabel??void 0,n.linkFlairPosition=e82.linkFlairPosition??void 0,n.userSrFlairEnabled=e82.userSrFlairEnabled??void 0,n.userFlairEnabledInSr=e82.userFlairEnabledInSr??void 0,n.allowChatPostCreation=e82.allowChatPostCreation??void 0,n.allowDiscovery=e82.allowDiscovery??void 0,n.acceptFollowers=e82.acceptFollowers??void 0,n.userSrThemeEnabled=e82.userSrThemeEnabled??void 0,n.linkFlairEnabled=e82.linkFlairEnabled??void 0,n.disableContributorRequests=e82.disableContributorRequests??void 0,n.subredditType=e82.subredditType??void 0,n.suggestedCommentSort=e82.suggestedCommentSort??void 0,n.bannerImg=e82.bannerImg??void 0,n.userFlairText=e82.userFlairText??void 0,n.bannerBackgroundColor=e82.bannerBackgroundColor??void 0,n.showMedia=e82.showMedia??void 0,n.id=e82.id??void 0,n.userIsModerator=e82.userIsModerator??void 0,n.over18=e82.over18??void 0,n.headerTitle=e82.headerTitle??void 0,n.description=e82.description??void 0,n.isChatPostFeatureEnabled=e82.isChatPostFeatureEnabled??void 0,n.submitLinkLabel=e82.submitLinkLabel??void 0,n.userFlairTextColor=e82.userFlairTextColor??void 0,n.restrictCommenting=e82.restrictCommenting??void 0,n.userFlairCssClass=e82.userFlairCssClass??void 0,n.allowImages=e82.allowImages??void 0,n.lang=e82.lang??void 0,n.url=e82.url??void 0,n.createdUtc=e82.createdUtc??void 0,n.bannerSize=((d=e82.bannerSize)==null?void 0:d.map(l=>l))||[],n.mobileBannerImage=e82.mobileBannerImage??void 0,n.userIsContributor=e82.userIsContributor??void 0,n.allowPredictionsTournament=e82.allowPredictionsTournament??void 0,n.iconSize=((r=e82.iconSize)==null?void 0:r.map(l=>l))||[],n.headerSize=((a=e82.headerSize)==null?void 0:a.map(l=>l))||[],n.wls=e82.wls??void 0,n.whitelistStatus=e82.whitelistStatus??void 0,n.emojisCustomSize=((u=e82.emojisCustomSize)==null?void 0:u.map(l=>l))||[],n}};messageTypeRegistry.set(SubredditAboutResponse_AboutData.$type,SubredditAboutResponse_AboutData);function createBaseSubredditAboutEditResponse(){return{kind:void 0,data:void 0}}var SubredditAboutEditResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutEditResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&SubredditAboutEditResponse_SubredditSettings.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutEditResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=SubredditAboutEditResponse_SubredditSettings.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,data:isSet$h(e82.data)?SubredditAboutEditResponse_SubredditSettings.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=SubredditAboutEditResponse_SubredditSettings.toJSON(e82.data)),n},create(e82){return SubredditAboutEditResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAboutEditResponse();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?SubredditAboutEditResponse_SubredditSettings.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(SubredditAboutEditResponse.$type,SubredditAboutEditResponse);function createBaseSubredditAboutEditResponse_SubredditSettings(){return{defaultSet:void 0,toxicityThresholdChatLevel:void 0,crowdControlChatLevel:void 0,restrictPosting:void 0,publicDescription:void 0,subredditId:void 0,allowImages:void 0,freeFormReports:void 0,domain:void 0,originalContentTagEnabled:void 0,showMedia:void 0,excludeBannedModqueue:void 0,shouldArchivePosts:void 0,submitText:void 0,spamLinks:void 0,title:void 0,collapseDeletedComments:void 0,wikimode:void 0,over18:void 0,allowVideos:void 0,allowGalleries:void 0,crowdControlLevel:void 0,banEvasionThreshold:void 0,crowdControlMode:void 0,welcomeMessageEnabled:void 0,welcomeMessageText:void 0,suggestedCommentSort:void 0,disableContributorRequests:void 0,allowTalks:void 0,description:void 0,submitLinkLabel:void 0,spoilersEnabled:void 0,allowPostCrossposts:void 0,spamComments:void 0,publicTraffic:void 0,restrictCommenting:void 0,allowPolls:void 0,commentContributionSettings:void 0,submitTextLabel:void 0,commentScoreHideMins:void 0,allOriginalContent:void 0,spamSelfposts:void 0,keyColor:void 0,language:void 0,newPinnedPostPnsEnabled:void 0,hideAds:void 0,predictionLeaderboardEntryType:void 0,headerHoverText:void 0,wikiEditAge:void 0,allowChatPostCreation:void 0,allowPredictionContributors:void 0,allowDiscovery:void 0,acceptFollowers:void 0,crowdControlPostLevel:void 0,allowPredictionsTournament:void 0,wikiEditKarma:void 0,showMediaPreview:void 0,crowdControlFilter:void 0,subredditType:void 0,allowPredictions:void 0,userFlairPnsEnabled:void 0,contentOptions:void 0}}var SubredditAboutEditResponse_SubredditSettings={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutEditResponse.SubredditSettings",encode(e82,n=_m0.Writer.create()){return e82.defaultSet!==void 0&&BoolValue.encode({value:e82.defaultSet},n.uint32(10).fork()).ldelim(),e82.toxicityThresholdChatLevel!==void 0&&Int32Value.encode({value:e82.toxicityThresholdChatLevel},n.uint32(18).fork()).ldelim(),e82.crowdControlChatLevel!==void 0&&Int32Value.encode({value:e82.crowdControlChatLevel},n.uint32(26).fork()).ldelim(),e82.restrictPosting!==void 0&&BoolValue.encode({value:e82.restrictPosting},n.uint32(34).fork()).ldelim(),e82.publicDescription!==void 0&&StringValue.encode({value:e82.publicDescription},n.uint32(42).fork()).ldelim(),e82.subredditId!==void 0&&StringValue.encode({value:e82.subredditId},n.uint32(50).fork()).ldelim(),e82.allowImages!==void 0&&BoolValue.encode({value:e82.allowImages},n.uint32(58).fork()).ldelim(),e82.freeFormReports!==void 0&&BoolValue.encode({value:e82.freeFormReports},n.uint32(66).fork()).ldelim(),e82.domain!==void 0&&StringValue.encode({value:e82.domain},n.uint32(74).fork()).ldelim(),e82.originalContentTagEnabled!==void 0&&BoolValue.encode({value:e82.originalContentTagEnabled},n.uint32(82).fork()).ldelim(),e82.showMedia!==void 0&&BoolValue.encode({value:e82.showMedia},n.uint32(90).fork()).ldelim(),e82.excludeBannedModqueue!==void 0&&BoolValue.encode({value:e82.excludeBannedModqueue},n.uint32(98).fork()).ldelim(),e82.shouldArchivePosts!==void 0&&BoolValue.encode({value:e82.shouldArchivePosts},n.uint32(106).fork()).ldelim(),e82.submitText!==void 0&&StringValue.encode({value:e82.submitText},n.uint32(114).fork()).ldelim(),e82.spamLinks!==void 0&&StringValue.encode({value:e82.spamLinks},n.uint32(122).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(130).fork()).ldelim(),e82.collapseDeletedComments!==void 0&&BoolValue.encode({value:e82.collapseDeletedComments},n.uint32(138).fork()).ldelim(),e82.wikimode!==void 0&&StringValue.encode({value:e82.wikimode},n.uint32(146).fork()).ldelim(),e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(154).fork()).ldelim(),e82.allowVideos!==void 0&&BoolValue.encode({value:e82.allowVideos},n.uint32(162).fork()).ldelim(),e82.allowGalleries!==void 0&&BoolValue.encode({value:e82.allowGalleries},n.uint32(170).fork()).ldelim(),e82.crowdControlLevel!==void 0&&Int32Value.encode({value:e82.crowdControlLevel},n.uint32(178).fork()).ldelim(),e82.banEvasionThreshold!==void 0&&Int32Value.encode({value:e82.banEvasionThreshold},n.uint32(186).fork()).ldelim(),e82.crowdControlMode!==void 0&&BoolValue.encode({value:e82.crowdControlMode},n.uint32(194).fork()).ldelim(),e82.welcomeMessageEnabled!==void 0&&BoolValue.encode({value:e82.welcomeMessageEnabled},n.uint32(202).fork()).ldelim(),e82.welcomeMessageText!==void 0&&StringValue.encode({value:e82.welcomeMessageText},n.uint32(210).fork()).ldelim(),e82.suggestedCommentSort!==void 0&&BoolValue.encode({value:e82.suggestedCommentSort},n.uint32(218).fork()).ldelim(),e82.disableContributorRequests!==void 0&&BoolValue.encode({value:e82.disableContributorRequests},n.uint32(226).fork()).ldelim(),e82.allowTalks!==void 0&&BoolValue.encode({value:e82.allowTalks},n.uint32(234).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(242).fork()).ldelim(),e82.submitLinkLabel!==void 0&&StringValue.encode({value:e82.submitLinkLabel},n.uint32(250).fork()).ldelim(),e82.spoilersEnabled!==void 0&&BoolValue.encode({value:e82.spoilersEnabled},n.uint32(258).fork()).ldelim(),e82.allowPostCrossposts!==void 0&&BoolValue.encode({value:e82.allowPostCrossposts},n.uint32(266).fork()).ldelim(),e82.spamComments!==void 0&&StringValue.encode({value:e82.spamComments},n.uint32(274).fork()).ldelim(),e82.publicTraffic!==void 0&&BoolValue.encode({value:e82.publicTraffic},n.uint32(282).fork()).ldelim(),e82.restrictCommenting!==void 0&&BoolValue.encode({value:e82.restrictCommenting},n.uint32(290).fork()).ldelim(),e82.allowPolls!==void 0&&BoolValue.encode({value:e82.allowPolls},n.uint32(298).fork()).ldelim(),e82.commentContributionSettings!==void 0&&CommentContributionSettings.encode(e82.commentContributionSettings,n.uint32(306).fork()).ldelim(),e82.submitTextLabel!==void 0&&StringValue.encode({value:e82.submitTextLabel},n.uint32(314).fork()).ldelim(),e82.commentScoreHideMins!==void 0&&Int32Value.encode({value:e82.commentScoreHideMins},n.uint32(322).fork()).ldelim(),e82.allOriginalContent!==void 0&&BoolValue.encode({value:e82.allOriginalContent},n.uint32(330).fork()).ldelim(),e82.spamSelfposts!==void 0&&StringValue.encode({value:e82.spamSelfposts},n.uint32(338).fork()).ldelim(),e82.keyColor!==void 0&&StringValue.encode({value:e82.keyColor},n.uint32(346).fork()).ldelim(),e82.language!==void 0&&StringValue.encode({value:e82.language},n.uint32(354).fork()).ldelim(),e82.newPinnedPostPnsEnabled!==void 0&&BoolValue.encode({value:e82.newPinnedPostPnsEnabled},n.uint32(362).fork()).ldelim(),e82.hideAds!==void 0&&BoolValue.encode({value:e82.hideAds},n.uint32(370).fork()).ldelim(),e82.predictionLeaderboardEntryType!==void 0&&Int32Value.encode({value:e82.predictionLeaderboardEntryType},n.uint32(378).fork()).ldelim(),e82.headerHoverText!==void 0&&StringValue.encode({value:e82.headerHoverText},n.uint32(386).fork()).ldelim(),e82.wikiEditAge!==void 0&&Int32Value.encode({value:e82.wikiEditAge},n.uint32(394).fork()).ldelim(),e82.allowChatPostCreation!==void 0&&BoolValue.encode({value:e82.allowChatPostCreation},n.uint32(402).fork()).ldelim(),e82.allowPredictionContributors!==void 0&&BoolValue.encode({value:e82.allowPredictionContributors},n.uint32(410).fork()).ldelim(),e82.allowDiscovery!==void 0&&BoolValue.encode({value:e82.allowDiscovery},n.uint32(418).fork()).ldelim(),e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(426).fork()).ldelim(),e82.crowdControlPostLevel!==void 0&&Int32Value.encode({value:e82.crowdControlPostLevel},n.uint32(434).fork()).ldelim(),e82.allowPredictionsTournament!==void 0&&BoolValue.encode({value:e82.allowPredictionsTournament},n.uint32(442).fork()).ldelim(),e82.wikiEditKarma!==void 0&&Int32Value.encode({value:e82.wikiEditKarma},n.uint32(450).fork()).ldelim(),e82.showMediaPreview!==void 0&&BoolValue.encode({value:e82.showMediaPreview},n.uint32(458).fork()).ldelim(),e82.crowdControlFilter!==void 0&&BoolValue.encode({value:e82.crowdControlFilter},n.uint32(466).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(474).fork()).ldelim(),e82.allowPredictions!==void 0&&BoolValue.encode({value:e82.allowPredictions},n.uint32(482).fork()).ldelim(),e82.userFlairPnsEnabled!==void 0&&BoolValue.encode({value:e82.userFlairPnsEnabled},n.uint32(490).fork()).ldelim(),e82.contentOptions!==void 0&&StringValue.encode({value:e82.contentOptions},n.uint32(498).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutEditResponse_SubredditSettings();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.defaultSet=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.toxicityThresholdChatLevel=Int32Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.crowdControlChatLevel=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.restrictPosting=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.publicDescription=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.subredditId=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.allowImages=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.freeFormReports=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.domain=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.originalContentTagEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.showMedia=BoolValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.excludeBannedModqueue=BoolValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.shouldArchivePosts=BoolValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.submitText=StringValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.spamLinks=StringValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.title=StringValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.collapseDeletedComments=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.wikimode=StringValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.allowVideos=BoolValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.allowGalleries=BoolValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.crowdControlLevel=Int32Value.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.banEvasionThreshold=Int32Value.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.crowdControlMode=BoolValue.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.welcomeMessageEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.welcomeMessageText=StringValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.suggestedCommentSort=BoolValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.disableContributorRequests=BoolValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.allowTalks=BoolValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.submitLinkLabel=StringValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.spoilersEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.allowPostCrossposts=BoolValue.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.spamComments=StringValue.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.publicTraffic=BoolValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.restrictCommenting=BoolValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.allowPolls=BoolValue.decode(t,t.uint32()).value;continue;case 38:if(r!==306)break;d.commentContributionSettings=CommentContributionSettings.decode(t,t.uint32());continue;case 39:if(r!==314)break;d.submitTextLabel=StringValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.commentScoreHideMins=Int32Value.decode(t,t.uint32()).value;continue;case 41:if(r!==330)break;d.allOriginalContent=BoolValue.decode(t,t.uint32()).value;continue;case 42:if(r!==338)break;d.spamSelfposts=StringValue.decode(t,t.uint32()).value;continue;case 43:if(r!==346)break;d.keyColor=StringValue.decode(t,t.uint32()).value;continue;case 44:if(r!==354)break;d.language=StringValue.decode(t,t.uint32()).value;continue;case 45:if(r!==362)break;d.newPinnedPostPnsEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 46:if(r!==370)break;d.hideAds=BoolValue.decode(t,t.uint32()).value;continue;case 47:if(r!==378)break;d.predictionLeaderboardEntryType=Int32Value.decode(t,t.uint32()).value;continue;case 48:if(r!==386)break;d.headerHoverText=StringValue.decode(t,t.uint32()).value;continue;case 49:if(r!==394)break;d.wikiEditAge=Int32Value.decode(t,t.uint32()).value;continue;case 50:if(r!==402)break;d.allowChatPostCreation=BoolValue.decode(t,t.uint32()).value;continue;case 51:if(r!==410)break;d.allowPredictionContributors=BoolValue.decode(t,t.uint32()).value;continue;case 52:if(r!==418)break;d.allowDiscovery=BoolValue.decode(t,t.uint32()).value;continue;case 53:if(r!==426)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 54:if(r!==434)break;d.crowdControlPostLevel=Int32Value.decode(t,t.uint32()).value;continue;case 55:if(r!==442)break;d.allowPredictionsTournament=BoolValue.decode(t,t.uint32()).value;continue;case 56:if(r!==450)break;d.wikiEditKarma=Int32Value.decode(t,t.uint32()).value;continue;case 57:if(r!==458)break;d.showMediaPreview=BoolValue.decode(t,t.uint32()).value;continue;case 58:if(r!==466)break;d.crowdControlFilter=BoolValue.decode(t,t.uint32()).value;continue;case 59:if(r!==474)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 60:if(r!==482)break;d.allowPredictions=BoolValue.decode(t,t.uint32()).value;continue;case 61:if(r!==490)break;d.userFlairPnsEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 62:if(r!==498)break;d.contentOptions=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{defaultSet:isSet$h(e82.defaultSet)?!!e82.defaultSet:void 0,toxicityThresholdChatLevel:isSet$h(e82.toxicityThresholdChatLevel)?Number(e82.toxicityThresholdChatLevel):void 0,crowdControlChatLevel:isSet$h(e82.crowdControlChatLevel)?Number(e82.crowdControlChatLevel):void 0,restrictPosting:isSet$h(e82.restrictPosting)?!!e82.restrictPosting:void 0,publicDescription:isSet$h(e82.publicDescription)?String(e82.publicDescription):void 0,subredditId:isSet$h(e82.subredditId)?String(e82.subredditId):void 0,allowImages:isSet$h(e82.allowImages)?!!e82.allowImages:void 0,freeFormReports:isSet$h(e82.freeFormReports)?!!e82.freeFormReports:void 0,domain:isSet$h(e82.domain)?String(e82.domain):void 0,originalContentTagEnabled:isSet$h(e82.originalContentTagEnabled)?!!e82.originalContentTagEnabled:void 0,showMedia:isSet$h(e82.showMedia)?!!e82.showMedia:void 0,excludeBannedModqueue:isSet$h(e82.excludeBannedModqueue)?!!e82.excludeBannedModqueue:void 0,shouldArchivePosts:isSet$h(e82.shouldArchivePosts)?!!e82.shouldArchivePosts:void 0,submitText:isSet$h(e82.submitText)?String(e82.submitText):void 0,spamLinks:isSet$h(e82.spamLinks)?String(e82.spamLinks):void 0,title:isSet$h(e82.title)?String(e82.title):void 0,collapseDeletedComments:isSet$h(e82.collapseDeletedComments)?!!e82.collapseDeletedComments:void 0,wikimode:isSet$h(e82.wikimode)?String(e82.wikimode):void 0,over18:isSet$h(e82.over18)?!!e82.over18:void 0,allowVideos:isSet$h(e82.allowVideos)?!!e82.allowVideos:void 0,allowGalleries:isSet$h(e82.allowGalleries)?!!e82.allowGalleries:void 0,crowdControlLevel:isSet$h(e82.crowdControlLevel)?Number(e82.crowdControlLevel):void 0,banEvasionThreshold:isSet$h(e82.banEvasionThreshold)?Number(e82.banEvasionThreshold):void 0,crowdControlMode:isSet$h(e82.crowdControlMode)?!!e82.crowdControlMode:void 0,welcomeMessageEnabled:isSet$h(e82.welcomeMessageEnabled)?!!e82.welcomeMessageEnabled:void 0,welcomeMessageText:isSet$h(e82.welcomeMessageText)?String(e82.welcomeMessageText):void 0,suggestedCommentSort:isSet$h(e82.suggestedCommentSort)?!!e82.suggestedCommentSort:void 0,disableContributorRequests:isSet$h(e82.disableContributorRequests)?!!e82.disableContributorRequests:void 0,allowTalks:isSet$h(e82.allowTalks)?!!e82.allowTalks:void 0,description:isSet$h(e82.description)?String(e82.description):void 0,submitLinkLabel:isSet$h(e82.submitLinkLabel)?String(e82.submitLinkLabel):void 0,spoilersEnabled:isSet$h(e82.spoilersEnabled)?!!e82.spoilersEnabled:void 0,allowPostCrossposts:isSet$h(e82.allowPostCrossposts)?!!e82.allowPostCrossposts:void 0,spamComments:isSet$h(e82.spamComments)?String(e82.spamComments):void 0,publicTraffic:isSet$h(e82.publicTraffic)?!!e82.publicTraffic:void 0,restrictCommenting:isSet$h(e82.restrictCommenting)?!!e82.restrictCommenting:void 0,allowPolls:isSet$h(e82.allowPolls)?!!e82.allowPolls:void 0,commentContributionSettings:isSet$h(e82.commentContributionSettings)?CommentContributionSettings.fromJSON(e82.commentContributionSettings):void 0,submitTextLabel:isSet$h(e82.submitTextLabel)?String(e82.submitTextLabel):void 0,commentScoreHideMins:isSet$h(e82.commentScoreHideMins)?Number(e82.commentScoreHideMins):void 0,allOriginalContent:isSet$h(e82.allOriginalContent)?!!e82.allOriginalContent:void 0,spamSelfposts:isSet$h(e82.spamSelfposts)?String(e82.spamSelfposts):void 0,keyColor:isSet$h(e82.keyColor)?String(e82.keyColor):void 0,language:isSet$h(e82.language)?String(e82.language):void 0,newPinnedPostPnsEnabled:isSet$h(e82.newPinnedPostPnsEnabled)?!!e82.newPinnedPostPnsEnabled:void 0,hideAds:isSet$h(e82.hideAds)?!!e82.hideAds:void 0,predictionLeaderboardEntryType:isSet$h(e82.predictionLeaderboardEntryType)?Number(e82.predictionLeaderboardEntryType):void 0,headerHoverText:isSet$h(e82.headerHoverText)?String(e82.headerHoverText):void 0,wikiEditAge:isSet$h(e82.wikiEditAge)?Number(e82.wikiEditAge):void 0,allowChatPostCreation:isSet$h(e82.allowChatPostCreation)?!!e82.allowChatPostCreation:void 0,allowPredictionContributors:isSet$h(e82.allowPredictionContributors)?!!e82.allowPredictionContributors:void 0,allowDiscovery:isSet$h(e82.allowDiscovery)?!!e82.allowDiscovery:void 0,acceptFollowers:isSet$h(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,crowdControlPostLevel:isSet$h(e82.crowdControlPostLevel)?Number(e82.crowdControlPostLevel):void 0,allowPredictionsTournament:isSet$h(e82.allowPredictionsTournament)?!!e82.allowPredictionsTournament:void 0,wikiEditKarma:isSet$h(e82.wikiEditKarma)?Number(e82.wikiEditKarma):void 0,showMediaPreview:isSet$h(e82.showMediaPreview)?!!e82.showMediaPreview:void 0,crowdControlFilter:isSet$h(e82.crowdControlFilter)?!!e82.crowdControlFilter:void 0,subredditType:isSet$h(e82.subredditType)?String(e82.subredditType):void 0,allowPredictions:isSet$h(e82.allowPredictions)?!!e82.allowPredictions:void 0,userFlairPnsEnabled:isSet$h(e82.userFlairPnsEnabled)?!!e82.userFlairPnsEnabled:void 0,contentOptions:isSet$h(e82.contentOptions)?String(e82.contentOptions):void 0}},toJSON(e82){let n={};return e82.defaultSet!==void 0&&(n.defaultSet=e82.defaultSet),e82.toxicityThresholdChatLevel!==void 0&&(n.toxicityThresholdChatLevel=e82.toxicityThresholdChatLevel),e82.crowdControlChatLevel!==void 0&&(n.crowdControlChatLevel=e82.crowdControlChatLevel),e82.restrictPosting!==void 0&&(n.restrictPosting=e82.restrictPosting),e82.publicDescription!==void 0&&(n.publicDescription=e82.publicDescription),e82.subredditId!==void 0&&(n.subredditId=e82.subredditId),e82.allowImages!==void 0&&(n.allowImages=e82.allowImages),e82.freeFormReports!==void 0&&(n.freeFormReports=e82.freeFormReports),e82.domain!==void 0&&(n.domain=e82.domain),e82.originalContentTagEnabled!==void 0&&(n.originalContentTagEnabled=e82.originalContentTagEnabled),e82.showMedia!==void 0&&(n.showMedia=e82.showMedia),e82.excludeBannedModqueue!==void 0&&(n.excludeBannedModqueue=e82.excludeBannedModqueue),e82.shouldArchivePosts!==void 0&&(n.shouldArchivePosts=e82.shouldArchivePosts),e82.submitText!==void 0&&(n.submitText=e82.submitText),e82.spamLinks!==void 0&&(n.spamLinks=e82.spamLinks),e82.title!==void 0&&(n.title=e82.title),e82.collapseDeletedComments!==void 0&&(n.collapseDeletedComments=e82.collapseDeletedComments),e82.wikimode!==void 0&&(n.wikimode=e82.wikimode),e82.over18!==void 0&&(n.over18=e82.over18),e82.allowVideos!==void 0&&(n.allowVideos=e82.allowVideos),e82.allowGalleries!==void 0&&(n.allowGalleries=e82.allowGalleries),e82.crowdControlLevel!==void 0&&(n.crowdControlLevel=e82.crowdControlLevel),e82.banEvasionThreshold!==void 0&&(n.banEvasionThreshold=e82.banEvasionThreshold),e82.crowdControlMode!==void 0&&(n.crowdControlMode=e82.crowdControlMode),e82.welcomeMessageEnabled!==void 0&&(n.welcomeMessageEnabled=e82.welcomeMessageEnabled),e82.welcomeMessageText!==void 0&&(n.welcomeMessageText=e82.welcomeMessageText),e82.suggestedCommentSort!==void 0&&(n.suggestedCommentSort=e82.suggestedCommentSort),e82.disableContributorRequests!==void 0&&(n.disableContributorRequests=e82.disableContributorRequests),e82.allowTalks!==void 0&&(n.allowTalks=e82.allowTalks),e82.description!==void 0&&(n.description=e82.description),e82.submitLinkLabel!==void 0&&(n.submitLinkLabel=e82.submitLinkLabel),e82.spoilersEnabled!==void 0&&(n.spoilersEnabled=e82.spoilersEnabled),e82.allowPostCrossposts!==void 0&&(n.allowPostCrossposts=e82.allowPostCrossposts),e82.spamComments!==void 0&&(n.spamComments=e82.spamComments),e82.publicTraffic!==void 0&&(n.publicTraffic=e82.publicTraffic),e82.restrictCommenting!==void 0&&(n.restrictCommenting=e82.restrictCommenting),e82.allowPolls!==void 0&&(n.allowPolls=e82.allowPolls),e82.commentContributionSettings!==void 0&&(n.commentContributionSettings=CommentContributionSettings.toJSON(e82.commentContributionSettings)),e82.submitTextLabel!==void 0&&(n.submitTextLabel=e82.submitTextLabel),e82.commentScoreHideMins!==void 0&&(n.commentScoreHideMins=e82.commentScoreHideMins),e82.allOriginalContent!==void 0&&(n.allOriginalContent=e82.allOriginalContent),e82.spamSelfposts!==void 0&&(n.spamSelfposts=e82.spamSelfposts),e82.keyColor!==void 0&&(n.keyColor=e82.keyColor),e82.language!==void 0&&(n.language=e82.language),e82.newPinnedPostPnsEnabled!==void 0&&(n.newPinnedPostPnsEnabled=e82.newPinnedPostPnsEnabled),e82.hideAds!==void 0&&(n.hideAds=e82.hideAds),e82.predictionLeaderboardEntryType!==void 0&&(n.predictionLeaderboardEntryType=e82.predictionLeaderboardEntryType),e82.headerHoverText!==void 0&&(n.headerHoverText=e82.headerHoverText),e82.wikiEditAge!==void 0&&(n.wikiEditAge=e82.wikiEditAge),e82.allowChatPostCreation!==void 0&&(n.allowChatPostCreation=e82.allowChatPostCreation),e82.allowPredictionContributors!==void 0&&(n.allowPredictionContributors=e82.allowPredictionContributors),e82.allowDiscovery!==void 0&&(n.allowDiscovery=e82.allowDiscovery),e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.crowdControlPostLevel!==void 0&&(n.crowdControlPostLevel=e82.crowdControlPostLevel),e82.allowPredictionsTournament!==void 0&&(n.allowPredictionsTournament=e82.allowPredictionsTournament),e82.wikiEditKarma!==void 0&&(n.wikiEditKarma=e82.wikiEditKarma),e82.showMediaPreview!==void 0&&(n.showMediaPreview=e82.showMediaPreview),e82.crowdControlFilter!==void 0&&(n.crowdControlFilter=e82.crowdControlFilter),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.allowPredictions!==void 0&&(n.allowPredictions=e82.allowPredictions),e82.userFlairPnsEnabled!==void 0&&(n.userFlairPnsEnabled=e82.userFlairPnsEnabled),e82.contentOptions!==void 0&&(n.contentOptions=e82.contentOptions),n},create(e82){return SubredditAboutEditResponse_SubredditSettings.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAboutEditResponse_SubredditSettings();return n.defaultSet=e82.defaultSet??void 0,n.toxicityThresholdChatLevel=e82.toxicityThresholdChatLevel??void 0,n.crowdControlChatLevel=e82.crowdControlChatLevel??void 0,n.restrictPosting=e82.restrictPosting??void 0,n.publicDescription=e82.publicDescription??void 0,n.subredditId=e82.subredditId??void 0,n.allowImages=e82.allowImages??void 0,n.freeFormReports=e82.freeFormReports??void 0,n.domain=e82.domain??void 0,n.originalContentTagEnabled=e82.originalContentTagEnabled??void 0,n.showMedia=e82.showMedia??void 0,n.excludeBannedModqueue=e82.excludeBannedModqueue??void 0,n.shouldArchivePosts=e82.shouldArchivePosts??void 0,n.submitText=e82.submitText??void 0,n.spamLinks=e82.spamLinks??void 0,n.title=e82.title??void 0,n.collapseDeletedComments=e82.collapseDeletedComments??void 0,n.wikimode=e82.wikimode??void 0,n.over18=e82.over18??void 0,n.allowVideos=e82.allowVideos??void 0,n.allowGalleries=e82.allowGalleries??void 0,n.crowdControlLevel=e82.crowdControlLevel??void 0,n.banEvasionThreshold=e82.banEvasionThreshold??void 0,n.crowdControlMode=e82.crowdControlMode??void 0,n.welcomeMessageEnabled=e82.welcomeMessageEnabled??void 0,n.welcomeMessageText=e82.welcomeMessageText??void 0,n.suggestedCommentSort=e82.suggestedCommentSort??void 0,n.disableContributorRequests=e82.disableContributorRequests??void 0,n.allowTalks=e82.allowTalks??void 0,n.description=e82.description??void 0,n.submitLinkLabel=e82.submitLinkLabel??void 0,n.spoilersEnabled=e82.spoilersEnabled??void 0,n.allowPostCrossposts=e82.allowPostCrossposts??void 0,n.spamComments=e82.spamComments??void 0,n.publicTraffic=e82.publicTraffic??void 0,n.restrictCommenting=e82.restrictCommenting??void 0,n.allowPolls=e82.allowPolls??void 0,n.commentContributionSettings=e82.commentContributionSettings!==void 0&&e82.commentContributionSettings!==null?CommentContributionSettings.fromPartial(e82.commentContributionSettings):void 0,n.submitTextLabel=e82.submitTextLabel??void 0,n.commentScoreHideMins=e82.commentScoreHideMins??void 0,n.allOriginalContent=e82.allOriginalContent??void 0,n.spamSelfposts=e82.spamSelfposts??void 0,n.keyColor=e82.keyColor??void 0,n.language=e82.language??void 0,n.newPinnedPostPnsEnabled=e82.newPinnedPostPnsEnabled??void 0,n.hideAds=e82.hideAds??void 0,n.predictionLeaderboardEntryType=e82.predictionLeaderboardEntryType??void 0,n.headerHoverText=e82.headerHoverText??void 0,n.wikiEditAge=e82.wikiEditAge??void 0,n.allowChatPostCreation=e82.allowChatPostCreation??void 0,n.allowPredictionContributors=e82.allowPredictionContributors??void 0,n.allowDiscovery=e82.allowDiscovery??void 0,n.acceptFollowers=e82.acceptFollowers??void 0,n.crowdControlPostLevel=e82.crowdControlPostLevel??void 0,n.allowPredictionsTournament=e82.allowPredictionsTournament??void 0,n.wikiEditKarma=e82.wikiEditKarma??void 0,n.showMediaPreview=e82.showMediaPreview??void 0,n.crowdControlFilter=e82.crowdControlFilter??void 0,n.subredditType=e82.subredditType??void 0,n.allowPredictions=e82.allowPredictions??void 0,n.userFlairPnsEnabled=e82.userFlairPnsEnabled??void 0,n.contentOptions=e82.contentOptions??void 0,n}};messageTypeRegistry.set(SubredditAboutEditResponse_SubredditSettings.$type,SubredditAboutEditResponse_SubredditSettings);function createBaseSubredditAboutRulesResponse(){return{rules:[],siteRules:[],siteRulesFlow:[]}}var SubredditAboutRulesResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutRulesResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.rules)SubredditAboutRulesResponse_SubredditRule.encode(t,n.uint32(10).fork()).ldelim();for(let t of e82.siteRules)StringValue.encode({value:t},n.uint32(18).fork()).ldelim();for(let t of e82.siteRulesFlow)SubredditAboutRulesResponse_RuleFlow.encode(t,n.uint32(26).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutRulesResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.rules.push(SubredditAboutRulesResponse_SubredditRule.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.siteRules.push(StringValue.decode(t,t.uint32()).value);continue;case 3:if(r!==26)break;d.siteRulesFlow.push(SubredditAboutRulesResponse_RuleFlow.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{rules:globalThis.Array.isArray(e82?.rules)?e82.rules.map(n=>SubredditAboutRulesResponse_SubredditRule.fromJSON(n)):[],siteRules:globalThis.Array.isArray(e82?.siteRules)?e82.siteRules.map(n=>String(n)):[],siteRulesFlow:globalThis.Array.isArray(e82?.siteRulesFlow)?e82.siteRulesFlow.map(n=>SubredditAboutRulesResponse_RuleFlow.fromJSON(n)):[]}},toJSON(e82){var t,o,d;let n={};return(t=e82.rules)!=null&&t.length&&(n.rules=e82.rules.map(r=>SubredditAboutRulesResponse_SubredditRule.toJSON(r))),(o=e82.siteRules)!=null&&o.length&&(n.siteRules=e82.siteRules),(d=e82.siteRulesFlow)!=null&&d.length&&(n.siteRulesFlow=e82.siteRulesFlow.map(r=>SubredditAboutRulesResponse_RuleFlow.toJSON(r))),n},create(e82){return SubredditAboutRulesResponse.fromPartial(e82??{})},fromPartial(e82){var t,o,d;let n=createBaseSubredditAboutRulesResponse();return n.rules=((t=e82.rules)==null?void 0:t.map(r=>SubredditAboutRulesResponse_SubredditRule.fromPartial(r)))||[],n.siteRules=((o=e82.siteRules)==null?void 0:o.map(r=>r))||[],n.siteRulesFlow=((d=e82.siteRulesFlow)==null?void 0:d.map(r=>SubredditAboutRulesResponse_RuleFlow.fromPartial(r)))||[],n}};messageTypeRegistry.set(SubredditAboutRulesResponse.$type,SubredditAboutRulesResponse);function createBaseSubredditAboutRulesResponse_SubredditRule(){return{kind:void 0,description:void 0,shortName:void 0,violationReason:void 0,createdUtc:void 0,priority:void 0,descriptionHtml:void 0}}var SubredditAboutRulesResponse_SubredditRule={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutRulesResponse.SubredditRule",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(18).fork()).ldelim(),e82.shortName!==void 0&&StringValue.encode({value:e82.shortName},n.uint32(26).fork()).ldelim(),e82.violationReason!==void 0&&StringValue.encode({value:e82.violationReason},n.uint32(34).fork()).ldelim(),e82.createdUtc!==void 0&&Int64Value.encode({value:e82.createdUtc},n.uint32(42).fork()).ldelim(),e82.priority!==void 0&&Int32Value.encode({value:e82.priority},n.uint32(50).fork()).ldelim(),e82.descriptionHtml!==void 0&&StringValue.encode({value:e82.descriptionHtml},n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutRulesResponse_SubredditRule();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.shortName=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.violationReason=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.createdUtc=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.priority=Int32Value.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.descriptionHtml=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,description:isSet$h(e82.description)?String(e82.description):void 0,shortName:isSet$h(e82.shortName)?String(e82.shortName):void 0,violationReason:isSet$h(e82.violationReason)?String(e82.violationReason):void 0,createdUtc:isSet$h(e82.createdUtc)?Number(e82.createdUtc):void 0,priority:isSet$h(e82.priority)?Number(e82.priority):void 0,descriptionHtml:isSet$h(e82.descriptionHtml)?String(e82.descriptionHtml):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.description!==void 0&&(n.description=e82.description),e82.shortName!==void 0&&(n.shortName=e82.shortName),e82.violationReason!==void 0&&(n.violationReason=e82.violationReason),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.priority!==void 0&&(n.priority=e82.priority),e82.descriptionHtml!==void 0&&(n.descriptionHtml=e82.descriptionHtml),n},create(e82){return SubredditAboutRulesResponse_SubredditRule.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAboutRulesResponse_SubredditRule();return n.kind=e82.kind??void 0,n.description=e82.description??void 0,n.shortName=e82.shortName??void 0,n.violationReason=e82.violationReason??void 0,n.createdUtc=e82.createdUtc??void 0,n.priority=e82.priority??void 0,n.descriptionHtml=e82.descriptionHtml??void 0,n}};messageTypeRegistry.set(SubredditAboutRulesResponse_SubredditRule.$type,SubredditAboutRulesResponse_SubredditRule);function createBaseSubredditAboutRulesResponse_RuleFlow(){return{reasonTextToShow:void 0,reasonText:void 0,nextStepHeader:void 0,nextStepReasons:[],complaintButtonText:void 0,complaintUrl:void 0,complaintPageTitle:void 0,fileComplaint:void 0,complaintPrompt:void 0,canWriteNotes:void 0,isAbuseOfReportButton:void 0,notesInputTitle:void 0,usernamesInputTitle:void 0,canSpecifyUsernames:void 0,requestCrisisSupport:void 0,oneUsername:void 0}}var SubredditAboutRulesResponse_RuleFlow={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutRulesResponse.RuleFlow",encode(e82,n=_m0.Writer.create()){e82.reasonTextToShow!==void 0&&StringValue.encode({value:e82.reasonTextToShow},n.uint32(10).fork()).ldelim(),e82.reasonText!==void 0&&StringValue.encode({value:e82.reasonText},n.uint32(18).fork()).ldelim(),e82.nextStepHeader!==void 0&&StringValue.encode({value:e82.nextStepHeader},n.uint32(26).fork()).ldelim();for(let t of e82.nextStepReasons)SubredditAboutRulesResponse_RuleFlow.encode(t,n.uint32(34).fork()).ldelim();return e82.complaintButtonText!==void 0&&StringValue.encode({value:e82.complaintButtonText},n.uint32(42).fork()).ldelim(),e82.complaintUrl!==void 0&&StringValue.encode({value:e82.complaintUrl},n.uint32(50).fork()).ldelim(),e82.complaintPageTitle!==void 0&&StringValue.encode({value:e82.complaintPageTitle},n.uint32(58).fork()).ldelim(),e82.fileComplaint!==void 0&&BoolValue.encode({value:e82.fileComplaint},n.uint32(66).fork()).ldelim(),e82.complaintPrompt!==void 0&&StringValue.encode({value:e82.complaintPrompt},n.uint32(74).fork()).ldelim(),e82.canWriteNotes!==void 0&&BoolValue.encode({value:e82.canWriteNotes},n.uint32(82).fork()).ldelim(),e82.isAbuseOfReportButton!==void 0&&BoolValue.encode({value:e82.isAbuseOfReportButton},n.uint32(90).fork()).ldelim(),e82.notesInputTitle!==void 0&&StringValue.encode({value:e82.notesInputTitle},n.uint32(98).fork()).ldelim(),e82.usernamesInputTitle!==void 0&&StringValue.encode({value:e82.usernamesInputTitle},n.uint32(106).fork()).ldelim(),e82.canSpecifyUsernames!==void 0&&BoolValue.encode({value:e82.canSpecifyUsernames},n.uint32(114).fork()).ldelim(),e82.requestCrisisSupport!==void 0&&BoolValue.encode({value:e82.requestCrisisSupport},n.uint32(122).fork()).ldelim(),e82.oneUsername!==void 0&&BoolValue.encode({value:e82.oneUsername},n.uint32(130).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutRulesResponse_RuleFlow();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.reasonTextToShow=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.reasonText=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.nextStepHeader=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.nextStepReasons.push(SubredditAboutRulesResponse_RuleFlow.decode(t,t.uint32()));continue;case 5:if(r!==42)break;d.complaintButtonText=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.complaintUrl=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.complaintPageTitle=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.fileComplaint=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.complaintPrompt=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.canWriteNotes=BoolValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.isAbuseOfReportButton=BoolValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.notesInputTitle=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.usernamesInputTitle=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.canSpecifyUsernames=BoolValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.requestCrisisSupport=BoolValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.oneUsername=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{reasonTextToShow:isSet$h(e82.reasonTextToShow)?String(e82.reasonTextToShow):void 0,reasonText:isSet$h(e82.reasonText)?String(e82.reasonText):void 0,nextStepHeader:isSet$h(e82.nextStepHeader)?String(e82.nextStepHeader):void 0,nextStepReasons:globalThis.Array.isArray(e82?.nextStepReasons)?e82.nextStepReasons.map(n=>SubredditAboutRulesResponse_RuleFlow.fromJSON(n)):[],complaintButtonText:isSet$h(e82.complaintButtonText)?String(e82.complaintButtonText):void 0,complaintUrl:isSet$h(e82.complaintUrl)?String(e82.complaintUrl):void 0,complaintPageTitle:isSet$h(e82.complaintPageTitle)?String(e82.complaintPageTitle):void 0,fileComplaint:isSet$h(e82.fileComplaint)?!!e82.fileComplaint:void 0,complaintPrompt:isSet$h(e82.complaintPrompt)?String(e82.complaintPrompt):void 0,canWriteNotes:isSet$h(e82.canWriteNotes)?!!e82.canWriteNotes:void 0,isAbuseOfReportButton:isSet$h(e82.isAbuseOfReportButton)?!!e82.isAbuseOfReportButton:void 0,notesInputTitle:isSet$h(e82.notesInputTitle)?String(e82.notesInputTitle):void 0,usernamesInputTitle:isSet$h(e82.usernamesInputTitle)?String(e82.usernamesInputTitle):void 0,canSpecifyUsernames:isSet$h(e82.canSpecifyUsernames)?!!e82.canSpecifyUsernames:void 0,requestCrisisSupport:isSet$h(e82.requestCrisisSupport)?!!e82.requestCrisisSupport:void 0,oneUsername:isSet$h(e82.oneUsername)?!!e82.oneUsername:void 0}},toJSON(e82){var t;let n={};return e82.reasonTextToShow!==void 0&&(n.reasonTextToShow=e82.reasonTextToShow),e82.reasonText!==void 0&&(n.reasonText=e82.reasonText),e82.nextStepHeader!==void 0&&(n.nextStepHeader=e82.nextStepHeader),(t=e82.nextStepReasons)!=null&&t.length&&(n.nextStepReasons=e82.nextStepReasons.map(o=>SubredditAboutRulesResponse_RuleFlow.toJSON(o))),e82.complaintButtonText!==void 0&&(n.complaintButtonText=e82.complaintButtonText),e82.complaintUrl!==void 0&&(n.complaintUrl=e82.complaintUrl),e82.complaintPageTitle!==void 0&&(n.complaintPageTitle=e82.complaintPageTitle),e82.fileComplaint!==void 0&&(n.fileComplaint=e82.fileComplaint),e82.complaintPrompt!==void 0&&(n.complaintPrompt=e82.complaintPrompt),e82.canWriteNotes!==void 0&&(n.canWriteNotes=e82.canWriteNotes),e82.isAbuseOfReportButton!==void 0&&(n.isAbuseOfReportButton=e82.isAbuseOfReportButton),e82.notesInputTitle!==void 0&&(n.notesInputTitle=e82.notesInputTitle),e82.usernamesInputTitle!==void 0&&(n.usernamesInputTitle=e82.usernamesInputTitle),e82.canSpecifyUsernames!==void 0&&(n.canSpecifyUsernames=e82.canSpecifyUsernames),e82.requestCrisisSupport!==void 0&&(n.requestCrisisSupport=e82.requestCrisisSupport),e82.oneUsername!==void 0&&(n.oneUsername=e82.oneUsername),n},create(e82){return SubredditAboutRulesResponse_RuleFlow.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSubredditAboutRulesResponse_RuleFlow();return n.reasonTextToShow=e82.reasonTextToShow??void 0,n.reasonText=e82.reasonText??void 0,n.nextStepHeader=e82.nextStepHeader??void 0,n.nextStepReasons=((t=e82.nextStepReasons)==null?void 0:t.map(o=>SubredditAboutRulesResponse_RuleFlow.fromPartial(o)))||[],n.complaintButtonText=e82.complaintButtonText??void 0,n.complaintUrl=e82.complaintUrl??void 0,n.complaintPageTitle=e82.complaintPageTitle??void 0,n.fileComplaint=e82.fileComplaint??void 0,n.complaintPrompt=e82.complaintPrompt??void 0,n.canWriteNotes=e82.canWriteNotes??void 0,n.isAbuseOfReportButton=e82.isAbuseOfReportButton??void 0,n.notesInputTitle=e82.notesInputTitle??void 0,n.usernamesInputTitle=e82.usernamesInputTitle??void 0,n.canSpecifyUsernames=e82.canSpecifyUsernames??void 0,n.requestCrisisSupport=e82.requestCrisisSupport??void 0,n.oneUsername=e82.oneUsername??void 0,n}};messageTypeRegistry.set(SubredditAboutRulesResponse_RuleFlow.$type,SubredditAboutRulesResponse_RuleFlow);function createBaseSubredditAboutTrafficResponse(){return{day:[],hour:[],month:[]}}var SubredditAboutTrafficResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutTrafficResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.day)SubredditAboutTrafficResponse_Data.encode(t,n.uint32(10).fork()).ldelim();for(let t of e82.hour)SubredditAboutTrafficResponse_Data.encode(t,n.uint32(18).fork()).ldelim();for(let t of e82.month)SubredditAboutTrafficResponse_Data.encode(t,n.uint32(26).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutTrafficResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.day.push(SubredditAboutTrafficResponse_Data.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.hour.push(SubredditAboutTrafficResponse_Data.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.month.push(SubredditAboutTrafficResponse_Data.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{day:globalThis.Array.isArray(e82?.day)?e82.day.map(n=>SubredditAboutTrafficResponse_Data.fromJSON(n)):[],hour:globalThis.Array.isArray(e82?.hour)?e82.hour.map(n=>SubredditAboutTrafficResponse_Data.fromJSON(n)):[],month:globalThis.Array.isArray(e82?.month)?e82.month.map(n=>SubredditAboutTrafficResponse_Data.fromJSON(n)):[]}},toJSON(e82){var t,o,d;let n={};return(t=e82.day)!=null&&t.length&&(n.day=e82.day.map(r=>SubredditAboutTrafficResponse_Data.toJSON(r))),(o=e82.hour)!=null&&o.length&&(n.hour=e82.hour.map(r=>SubredditAboutTrafficResponse_Data.toJSON(r))),(d=e82.month)!=null&&d.length&&(n.month=e82.month.map(r=>SubredditAboutTrafficResponse_Data.toJSON(r))),n},create(e82){return SubredditAboutTrafficResponse.fromPartial(e82??{})},fromPartial(e82){var t,o,d;let n=createBaseSubredditAboutTrafficResponse();return n.day=((t=e82.day)==null?void 0:t.map(r=>SubredditAboutTrafficResponse_Data.fromPartial(r)))||[],n.hour=((o=e82.hour)==null?void 0:o.map(r=>SubredditAboutTrafficResponse_Data.fromPartial(r)))||[],n.month=((d=e82.month)==null?void 0:d.map(r=>SubredditAboutTrafficResponse_Data.fromPartial(r)))||[],n}};messageTypeRegistry.set(SubredditAboutTrafficResponse.$type,SubredditAboutTrafficResponse);function createBaseSubredditAboutTrafficResponse_Data(){return{values:[]}}var SubredditAboutTrafficResponse_Data={$type:"devvit.plugin.redditapi.subreddits.SubredditAboutTrafficResponse.Data",encode(e82,n=_m0.Writer.create()){for(let t of e82.values)Int64Value.encode({value:t},n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAboutTrafficResponse_Data();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.values.push(Int64Value.decode(t,t.uint32()).value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{values:globalThis.Array.isArray(e82?.values)?e82.values.map(n=>Number(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.values)!=null&&t.length&&(n.values=e82.values),n},create(e82){return SubredditAboutTrafficResponse_Data.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSubredditAboutTrafficResponse_Data();return n.values=((t=e82.values)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(SubredditAboutTrafficResponse_Data.$type,SubredditAboutTrafficResponse_Data);function createBaseStickyResponse(){return{kind:void 0,data:void 0}}var StickyResponse={$type:"devvit.plugin.redditapi.subreddits.StickyResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&StickyResponse_StickyResponseData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStickyResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=StickyResponse_StickyResponseData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,data:isSet$h(e82.data)?StickyResponse_StickyResponseData.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=StickyResponse_StickyResponseData.toJSON(e82.data)),n},create(e82){return StickyResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseStickyResponse();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?StickyResponse_StickyResponseData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(StickyResponse.$type,StickyResponse);function createBaseStickyResponse_LinkData(){return{authorFlairBackgroundColor:void 0,approvedAtUtc:void 0,subreddit:void 0,selftext:void 0,userReports:[],saved:void 0,modReasonTitle:void 0,gilded:void 0,clicked:void 0,title:void 0,linkFlairRichtext:[],subredditNamePrefixed:void 0,hidden:void 0,pwls:void 0,linkFlairCssClass:void 0,downs:void 0,thumbnailHeight:void 0,topAwardedType:void 0,parentWhitelistStatus:void 0,hideScore:void 0,name:void 0,quarantine:void 0,linkFlairTextColor:void 0,upvoteRatio:void 0,ignoreReports:void 0,ups:void 0,domain:void 0,mediaEmbed:void 0,thumbnailWidth:void 0,authorFlairTemplateId:void 0,isOriginalContent:void 0,authorFullname:void 0,secureMedia:void 0,isRedditMediaDomain:void 0,isMeta:void 0,category:void 0,secureMediaEmbed:void 0,linkFlairText:void 0,canModPost:void 0,score:void 0,approvedBy:void 0,isCreatedFromAdsUi:void 0,authorPremium:void 0,thumbnail:void 0,edited:void 0,authorFlairCssClass:void 0,previousVisits:[],authorFlairRichtext:[],gildings:void 0,contentCategories:void 0,isSelf:void 0,subredditType:void 0,created:void 0,linkFlairType:void 0,wls:void 0,removedByCategory:void 0,bannedBy:void 0,authorFlairType:void 0,totalAwardsReceived:void 0,allowLiveComments:void 0,selftextHtml:void 0,likes:void 0,suggestedSort:void 0,bannedAtUtc:void 0,viewCount:void 0,archived:void 0,noFollow:void 0,spam:void 0,isCrosspostable:void 0,pinned:void 0,over18:void 0,allAwardings:[],awarders:[],mediaOnly:void 0,canGild:void 0,removed:void 0,spoiler:void 0,locked:void 0,authorFlairText:void 0,treatmentTags:[],rteMode:void 0,visited:void 0,removedBy:void 0,modNote:void 0,distinguished:void 0,subredditId:void 0,authorIsBlocked:void 0,modReasonBy:void 0,numReports:void 0,removalReason:void 0,linkFlairBackgroundColor:void 0,id:void 0,isRobotIndexable:void 0,numDuplicates:void 0,reportReasons:[],author:void 0,discussionType:void 0,numComments:void 0,sendReplies:void 0,media:void 0,contestMode:void 0,authorPatreonFlair:void 0,approved:void 0,authorFlairTextColor:void 0,permalink:void 0,whitelistStatus:void 0,stickied:void 0,url:void 0,subredditSubscribers:void 0,createdUtc:void 0,numCrossposts:void 0,modReports:[],isVideo:void 0}}var StickyResponse_LinkData={$type:"devvit.plugin.redditapi.subreddits.StickyResponse.LinkData",encode(e82,n=_m0.Writer.create()){e82.authorFlairBackgroundColor!==void 0&&StringValue.encode({value:e82.authorFlairBackgroundColor},n.uint32(10).fork()).ldelim(),e82.approvedAtUtc!==void 0&&Int32Value.encode({value:e82.approvedAtUtc},n.uint32(18).fork()).ldelim(),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(26).fork()).ldelim(),e82.selftext!==void 0&&StringValue.encode({value:e82.selftext},n.uint32(34).fork()).ldelim();for(let t of e82.userReports)StringValue.encode({value:t},n.uint32(42).fork()).ldelim();e82.saved!==void 0&&BoolValue.encode({value:e82.saved},n.uint32(50).fork()).ldelim(),e82.modReasonTitle!==void 0&&StringValue.encode({value:e82.modReasonTitle},n.uint32(58).fork()).ldelim(),e82.gilded!==void 0&&Int64Value.encode({value:e82.gilded},n.uint32(66).fork()).ldelim(),e82.clicked!==void 0&&BoolValue.encode({value:e82.clicked},n.uint32(74).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(82).fork()).ldelim();for(let t of e82.linkFlairRichtext)StringValue.encode({value:t},n.uint32(90).fork()).ldelim();e82.subredditNamePrefixed!==void 0&&StringValue.encode({value:e82.subredditNamePrefixed},n.uint32(98).fork()).ldelim(),e82.hidden!==void 0&&BoolValue.encode({value:e82.hidden},n.uint32(106).fork()).ldelim(),e82.pwls!==void 0&&StringValue.encode({value:e82.pwls},n.uint32(114).fork()).ldelim(),e82.linkFlairCssClass!==void 0&&StringValue.encode({value:e82.linkFlairCssClass},n.uint32(122).fork()).ldelim(),e82.downs!==void 0&&Int64Value.encode({value:e82.downs},n.uint32(130).fork()).ldelim(),e82.thumbnailHeight!==void 0&&Int32Value.encode({value:e82.thumbnailHeight},n.uint32(138).fork()).ldelim(),e82.topAwardedType!==void 0&&StringValue.encode({value:e82.topAwardedType},n.uint32(146).fork()).ldelim(),e82.parentWhitelistStatus!==void 0&&BoolValue.encode({value:e82.parentWhitelistStatus},n.uint32(154).fork()).ldelim(),e82.hideScore!==void 0&&BoolValue.encode({value:e82.hideScore},n.uint32(162).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(170).fork()).ldelim(),e82.quarantine!==void 0&&BoolValue.encode({value:e82.quarantine},n.uint32(178).fork()).ldelim(),e82.linkFlairTextColor!==void 0&&StringValue.encode({value:e82.linkFlairTextColor},n.uint32(186).fork()).ldelim(),e82.upvoteRatio!==void 0&&Int64Value.encode({value:e82.upvoteRatio},n.uint32(194).fork()).ldelim(),e82.ignoreReports!==void 0&&BoolValue.encode({value:e82.ignoreReports},n.uint32(202).fork()).ldelim(),e82.ups!==void 0&&Int64Value.encode({value:e82.ups},n.uint32(210).fork()).ldelim(),e82.domain!==void 0&&StringValue.encode({value:e82.domain},n.uint32(218).fork()).ldelim(),e82.mediaEmbed!==void 0&&MediaEmbed.encode(e82.mediaEmbed,n.uint32(226).fork()).ldelim(),e82.thumbnailWidth!==void 0&&Int32Value.encode({value:e82.thumbnailWidth},n.uint32(234).fork()).ldelim(),e82.authorFlairTemplateId!==void 0&&StringValue.encode({value:e82.authorFlairTemplateId},n.uint32(242).fork()).ldelim(),e82.isOriginalContent!==void 0&&BoolValue.encode({value:e82.isOriginalContent},n.uint32(250).fork()).ldelim(),e82.authorFullname!==void 0&&StringValue.encode({value:e82.authorFullname},n.uint32(258).fork()).ldelim(),e82.secureMedia!==void 0&&BoolValue.encode({value:e82.secureMedia},n.uint32(266).fork()).ldelim(),e82.isRedditMediaDomain!==void 0&&BoolValue.encode({value:e82.isRedditMediaDomain},n.uint32(274).fork()).ldelim(),e82.isMeta!==void 0&&BoolValue.encode({value:e82.isMeta},n.uint32(282).fork()).ldelim(),e82.category!==void 0&&StringValue.encode({value:e82.category},n.uint32(290).fork()).ldelim(),e82.secureMediaEmbed!==void 0&&MediaEmbed.encode(e82.secureMediaEmbed,n.uint32(298).fork()).ldelim(),e82.linkFlairText!==void 0&&StringValue.encode({value:e82.linkFlairText},n.uint32(306).fork()).ldelim(),e82.canModPost!==void 0&&BoolValue.encode({value:e82.canModPost},n.uint32(314).fork()).ldelim(),e82.score!==void 0&&Int64Value.encode({value:e82.score},n.uint32(322).fork()).ldelim(),e82.approvedBy!==void 0&&StringValue.encode({value:e82.approvedBy},n.uint32(330).fork()).ldelim(),e82.isCreatedFromAdsUi!==void 0&&BoolValue.encode({value:e82.isCreatedFromAdsUi},n.uint32(338).fork()).ldelim(),e82.authorPremium!==void 0&&BoolValue.encode({value:e82.authorPremium},n.uint32(346).fork()).ldelim(),e82.thumbnail!==void 0&&StringValue.encode({value:e82.thumbnail},n.uint32(354).fork()).ldelim(),e82.edited!==void 0&&BoolValue.encode({value:e82.edited},n.uint32(362).fork()).ldelim(),e82.authorFlairCssClass!==void 0&&StringValue.encode({value:e82.authorFlairCssClass},n.uint32(370).fork()).ldelim();for(let t of e82.previousVisits)Int64Value.encode({value:t},n.uint32(378).fork()).ldelim();for(let t of e82.authorFlairRichtext)StringValue.encode({value:t},n.uint32(386).fork()).ldelim();e82.gildings!==void 0&&Any.encode(e82.gildings,n.uint32(394).fork()).ldelim(),e82.contentCategories!==void 0&&StringValue.encode({value:e82.contentCategories},n.uint32(402).fork()).ldelim(),e82.isSelf!==void 0&&BoolValue.encode({value:e82.isSelf},n.uint32(410).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(418).fork()).ldelim(),e82.created!==void 0&&Int64Value.encode({value:e82.created},n.uint32(426).fork()).ldelim(),e82.linkFlairType!==void 0&&StringValue.encode({value:e82.linkFlairType},n.uint32(434).fork()).ldelim(),e82.wls!==void 0&&StringValue.encode({value:e82.wls},n.uint32(442).fork()).ldelim(),e82.removedByCategory!==void 0&&StringValue.encode({value:e82.removedByCategory},n.uint32(450).fork()).ldelim(),e82.bannedBy!==void 0&&StringValue.encode({value:e82.bannedBy},n.uint32(458).fork()).ldelim(),e82.authorFlairType!==void 0&&StringValue.encode({value:e82.authorFlairType},n.uint32(466).fork()).ldelim(),e82.totalAwardsReceived!==void 0&&Int64Value.encode({value:e82.totalAwardsReceived},n.uint32(474).fork()).ldelim(),e82.allowLiveComments!==void 0&&BoolValue.encode({value:e82.allowLiveComments},n.uint32(482).fork()).ldelim(),e82.selftextHtml!==void 0&&StringValue.encode({value:e82.selftextHtml},n.uint32(490).fork()).ldelim(),e82.likes!==void 0&&BoolValue.encode({value:e82.likes},n.uint32(498).fork()).ldelim(),e82.suggestedSort!==void 0&&StringValue.encode({value:e82.suggestedSort},n.uint32(506).fork()).ldelim(),e82.bannedAtUtc!==void 0&&Int32Value.encode({value:e82.bannedAtUtc},n.uint32(514).fork()).ldelim(),e82.viewCount!==void 0&&Int32Value.encode({value:e82.viewCount},n.uint32(522).fork()).ldelim(),e82.archived!==void 0&&BoolValue.encode({value:e82.archived},n.uint32(530).fork()).ldelim(),e82.noFollow!==void 0&&BoolValue.encode({value:e82.noFollow},n.uint32(538).fork()).ldelim(),e82.spam!==void 0&&BoolValue.encode({value:e82.spam},n.uint32(546).fork()).ldelim(),e82.isCrosspostable!==void 0&&BoolValue.encode({value:e82.isCrosspostable},n.uint32(554).fork()).ldelim(),e82.pinned!==void 0&&BoolValue.encode({value:e82.pinned},n.uint32(562).fork()).ldelim(),e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(570).fork()).ldelim();for(let t of e82.allAwardings)Any.encode(t,n.uint32(578).fork()).ldelim();for(let t of e82.awarders)StringValue.encode({value:t},n.uint32(586).fork()).ldelim();e82.mediaOnly!==void 0&&BoolValue.encode({value:e82.mediaOnly},n.uint32(594).fork()).ldelim(),e82.canGild!==void 0&&BoolValue.encode({value:e82.canGild},n.uint32(602).fork()).ldelim(),e82.removed!==void 0&&BoolValue.encode({value:e82.removed},n.uint32(610).fork()).ldelim(),e82.spoiler!==void 0&&BoolValue.encode({value:e82.spoiler},n.uint32(618).fork()).ldelim(),e82.locked!==void 0&&BoolValue.encode({value:e82.locked},n.uint32(626).fork()).ldelim(),e82.authorFlairText!==void 0&&StringValue.encode({value:e82.authorFlairText},n.uint32(634).fork()).ldelim();for(let t of e82.treatmentTags)Any.encode(t,n.uint32(642).fork()).ldelim();e82.rteMode!==void 0&&StringValue.encode({value:e82.rteMode},n.uint32(650).fork()).ldelim(),e82.visited!==void 0&&BoolValue.encode({value:e82.visited},n.uint32(658).fork()).ldelim(),e82.removedBy!==void 0&&StringValue.encode({value:e82.removedBy},n.uint32(666).fork()).ldelim(),e82.modNote!==void 0&&StringValue.encode({value:e82.modNote},n.uint32(674).fork()).ldelim(),e82.distinguished!==void 0&&StringValue.encode({value:e82.distinguished},n.uint32(682).fork()).ldelim(),e82.subredditId!==void 0&&StringValue.encode({value:e82.subredditId},n.uint32(690).fork()).ldelim(),e82.authorIsBlocked!==void 0&&BoolValue.encode({value:e82.authorIsBlocked},n.uint32(698).fork()).ldelim(),e82.modReasonBy!==void 0&&StringValue.encode({value:e82.modReasonBy},n.uint32(706).fork()).ldelim(),e82.numReports!==void 0&&Int64Value.encode({value:e82.numReports},n.uint32(714).fork()).ldelim(),e82.removalReason!==void 0&&StringValue.encode({value:e82.removalReason},n.uint32(722).fork()).ldelim(),e82.linkFlairBackgroundColor!==void 0&&StringValue.encode({value:e82.linkFlairBackgroundColor},n.uint32(730).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(738).fork()).ldelim(),e82.isRobotIndexable!==void 0&&BoolValue.encode({value:e82.isRobotIndexable},n.uint32(746).fork()).ldelim(),e82.numDuplicates!==void 0&&Int32Value.encode({value:e82.numDuplicates},n.uint32(754).fork()).ldelim();for(let t of e82.reportReasons)Any.encode(t,n.uint32(762).fork()).ldelim();e82.author!==void 0&&StringValue.encode({value:e82.author},n.uint32(770).fork()).ldelim(),e82.discussionType!==void 0&&StringValue.encode({value:e82.discussionType},n.uint32(778).fork()).ldelim(),e82.numComments!==void 0&&Int64Value.encode({value:e82.numComments},n.uint32(786).fork()).ldelim(),e82.sendReplies!==void 0&&BoolValue.encode({value:e82.sendReplies},n.uint32(794).fork()).ldelim(),e82.media!==void 0&&StringValue.encode({value:e82.media},n.uint32(802).fork()).ldelim(),e82.contestMode!==void 0&&BoolValue.encode({value:e82.contestMode},n.uint32(810).fork()).ldelim(),e82.authorPatreonFlair!==void 0&&BoolValue.encode({value:e82.authorPatreonFlair},n.uint32(818).fork()).ldelim(),e82.approved!==void 0&&BoolValue.encode({value:e82.approved},n.uint32(826).fork()).ldelim(),e82.authorFlairTextColor!==void 0&&StringValue.encode({value:e82.authorFlairTextColor},n.uint32(834).fork()).ldelim(),e82.permalink!==void 0&&StringValue.encode({value:e82.permalink},n.uint32(842).fork()).ldelim(),e82.whitelistStatus!==void 0&&BoolValue.encode({value:e82.whitelistStatus},n.uint32(850).fork()).ldelim(),e82.stickied!==void 0&&BoolValue.encode({value:e82.stickied},n.uint32(858).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(866).fork()).ldelim(),e82.subredditSubscribers!==void 0&&Int64Value.encode({value:e82.subredditSubscribers},n.uint32(874).fork()).ldelim(),e82.createdUtc!==void 0&&Int64Value.encode({value:e82.createdUtc},n.uint32(882).fork()).ldelim(),e82.numCrossposts!==void 0&&Int64Value.encode({value:e82.numCrossposts},n.uint32(890).fork()).ldelim();for(let t of e82.modReports)Any.encode(t,n.uint32(898).fork()).ldelim();return e82.isVideo!==void 0&&BoolValue.encode({value:e82.isVideo},n.uint32(906).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStickyResponse_LinkData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.authorFlairBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.approvedAtUtc=Int32Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.selftext=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.userReports.push(StringValue.decode(t,t.uint32()).value);continue;case 6:if(r!==50)break;d.saved=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.modReasonTitle=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.gilded=Int64Value.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.clicked=BoolValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.title=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.linkFlairRichtext.push(StringValue.decode(t,t.uint32()).value);continue;case 12:if(r!==98)break;d.subredditNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.hidden=BoolValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.pwls=StringValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.linkFlairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.downs=Int64Value.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.thumbnailHeight=Int32Value.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.topAwardedType=StringValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.parentWhitelistStatus=BoolValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.hideScore=BoolValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.quarantine=BoolValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.linkFlairTextColor=StringValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.upvoteRatio=Int64Value.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.ignoreReports=BoolValue.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.ups=Int64Value.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.domain=StringValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.mediaEmbed=MediaEmbed.decode(t,t.uint32());continue;case 29:if(r!==234)break;d.thumbnailWidth=Int32Value.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.authorFlairTemplateId=StringValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.isOriginalContent=BoolValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.authorFullname=StringValue.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.secureMedia=BoolValue.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.isRedditMediaDomain=BoolValue.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.isMeta=BoolValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.category=StringValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.secureMediaEmbed=MediaEmbed.decode(t,t.uint32());continue;case 38:if(r!==306)break;d.linkFlairText=StringValue.decode(t,t.uint32()).value;continue;case 39:if(r!==314)break;d.canModPost=BoolValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.score=Int64Value.decode(t,t.uint32()).value;continue;case 41:if(r!==330)break;d.approvedBy=StringValue.decode(t,t.uint32()).value;continue;case 42:if(r!==338)break;d.isCreatedFromAdsUi=BoolValue.decode(t,t.uint32()).value;continue;case 43:if(r!==346)break;d.authorPremium=BoolValue.decode(t,t.uint32()).value;continue;case 44:if(r!==354)break;d.thumbnail=StringValue.decode(t,t.uint32()).value;continue;case 45:if(r!==362)break;d.edited=BoolValue.decode(t,t.uint32()).value;continue;case 46:if(r!==370)break;d.authorFlairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 47:if(r!==378)break;d.previousVisits.push(Int64Value.decode(t,t.uint32()).value);continue;case 48:if(r!==386)break;d.authorFlairRichtext.push(StringValue.decode(t,t.uint32()).value);continue;case 49:if(r!==394)break;d.gildings=Any.decode(t,t.uint32());continue;case 50:if(r!==402)break;d.contentCategories=StringValue.decode(t,t.uint32()).value;continue;case 51:if(r!==410)break;d.isSelf=BoolValue.decode(t,t.uint32()).value;continue;case 52:if(r!==418)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 53:if(r!==426)break;d.created=Int64Value.decode(t,t.uint32()).value;continue;case 54:if(r!==434)break;d.linkFlairType=StringValue.decode(t,t.uint32()).value;continue;case 55:if(r!==442)break;d.wls=StringValue.decode(t,t.uint32()).value;continue;case 56:if(r!==450)break;d.removedByCategory=StringValue.decode(t,t.uint32()).value;continue;case 57:if(r!==458)break;d.bannedBy=StringValue.decode(t,t.uint32()).value;continue;case 58:if(r!==466)break;d.authorFlairType=StringValue.decode(t,t.uint32()).value;continue;case 59:if(r!==474)break;d.totalAwardsReceived=Int64Value.decode(t,t.uint32()).value;continue;case 60:if(r!==482)break;d.allowLiveComments=BoolValue.decode(t,t.uint32()).value;continue;case 61:if(r!==490)break;d.selftextHtml=StringValue.decode(t,t.uint32()).value;continue;case 62:if(r!==498)break;d.likes=BoolValue.decode(t,t.uint32()).value;continue;case 63:if(r!==506)break;d.suggestedSort=StringValue.decode(t,t.uint32()).value;continue;case 64:if(r!==514)break;d.bannedAtUtc=Int32Value.decode(t,t.uint32()).value;continue;case 65:if(r!==522)break;d.viewCount=Int32Value.decode(t,t.uint32()).value;continue;case 66:if(r!==530)break;d.archived=BoolValue.decode(t,t.uint32()).value;continue;case 67:if(r!==538)break;d.noFollow=BoolValue.decode(t,t.uint32()).value;continue;case 68:if(r!==546)break;d.spam=BoolValue.decode(t,t.uint32()).value;continue;case 69:if(r!==554)break;d.isCrosspostable=BoolValue.decode(t,t.uint32()).value;continue;case 70:if(r!==562)break;d.pinned=BoolValue.decode(t,t.uint32()).value;continue;case 71:if(r!==570)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 72:if(r!==578)break;d.allAwardings.push(Any.decode(t,t.uint32()));continue;case 73:if(r!==586)break;d.awarders.push(StringValue.decode(t,t.uint32()).value);continue;case 74:if(r!==594)break;d.mediaOnly=BoolValue.decode(t,t.uint32()).value;continue;case 75:if(r!==602)break;d.canGild=BoolValue.decode(t,t.uint32()).value;continue;case 76:if(r!==610)break;d.removed=BoolValue.decode(t,t.uint32()).value;continue;case 77:if(r!==618)break;d.spoiler=BoolValue.decode(t,t.uint32()).value;continue;case 78:if(r!==626)break;d.locked=BoolValue.decode(t,t.uint32()).value;continue;case 79:if(r!==634)break;d.authorFlairText=StringValue.decode(t,t.uint32()).value;continue;case 80:if(r!==642)break;d.treatmentTags.push(Any.decode(t,t.uint32()));continue;case 81:if(r!==650)break;d.rteMode=StringValue.decode(t,t.uint32()).value;continue;case 82:if(r!==658)break;d.visited=BoolValue.decode(t,t.uint32()).value;continue;case 83:if(r!==666)break;d.removedBy=StringValue.decode(t,t.uint32()).value;continue;case 84:if(r!==674)break;d.modNote=StringValue.decode(t,t.uint32()).value;continue;case 85:if(r!==682)break;d.distinguished=StringValue.decode(t,t.uint32()).value;continue;case 86:if(r!==690)break;d.subredditId=StringValue.decode(t,t.uint32()).value;continue;case 87:if(r!==698)break;d.authorIsBlocked=BoolValue.decode(t,t.uint32()).value;continue;case 88:if(r!==706)break;d.modReasonBy=StringValue.decode(t,t.uint32()).value;continue;case 89:if(r!==714)break;d.numReports=Int64Value.decode(t,t.uint32()).value;continue;case 90:if(r!==722)break;d.removalReason=StringValue.decode(t,t.uint32()).value;continue;case 91:if(r!==730)break;d.linkFlairBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 92:if(r!==738)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 93:if(r!==746)break;d.isRobotIndexable=BoolValue.decode(t,t.uint32()).value;continue;case 94:if(r!==754)break;d.numDuplicates=Int32Value.decode(t,t.uint32()).value;continue;case 95:if(r!==762)break;d.reportReasons.push(Any.decode(t,t.uint32()));continue;case 96:if(r!==770)break;d.author=StringValue.decode(t,t.uint32()).value;continue;case 97:if(r!==778)break;d.discussionType=StringValue.decode(t,t.uint32()).value;continue;case 98:if(r!==786)break;d.numComments=Int64Value.decode(t,t.uint32()).value;continue;case 99:if(r!==794)break;d.sendReplies=BoolValue.decode(t,t.uint32()).value;continue;case 100:if(r!==802)break;d.media=StringValue.decode(t,t.uint32()).value;continue;case 101:if(r!==810)break;d.contestMode=BoolValue.decode(t,t.uint32()).value;continue;case 102:if(r!==818)break;d.authorPatreonFlair=BoolValue.decode(t,t.uint32()).value;continue;case 103:if(r!==826)break;d.approved=BoolValue.decode(t,t.uint32()).value;continue;case 104:if(r!==834)break;d.authorFlairTextColor=StringValue.decode(t,t.uint32()).value;continue;case 105:if(r!==842)break;d.permalink=StringValue.decode(t,t.uint32()).value;continue;case 106:if(r!==850)break;d.whitelistStatus=BoolValue.decode(t,t.uint32()).value;continue;case 107:if(r!==858)break;d.stickied=BoolValue.decode(t,t.uint32()).value;continue;case 108:if(r!==866)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 109:if(r!==874)break;d.subredditSubscribers=Int64Value.decode(t,t.uint32()).value;continue;case 110:if(r!==882)break;d.createdUtc=Int64Value.decode(t,t.uint32()).value;continue;case 111:if(r!==890)break;d.numCrossposts=Int64Value.decode(t,t.uint32()).value;continue;case 112:if(r!==898)break;d.modReports.push(Any.decode(t,t.uint32()));continue;case 113:if(r!==906)break;d.isVideo=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{authorFlairBackgroundColor:isSet$h(e82.authorFlairBackgroundColor)?String(e82.authorFlairBackgroundColor):void 0,approvedAtUtc:isSet$h(e82.approvedAtUtc)?Number(e82.approvedAtUtc):void 0,subreddit:isSet$h(e82.subreddit)?String(e82.subreddit):void 0,selftext:isSet$h(e82.selftext)?String(e82.selftext):void 0,userReports:globalThis.Array.isArray(e82?.userReports)?e82.userReports.map(n=>String(n)):[],saved:isSet$h(e82.saved)?!!e82.saved:void 0,modReasonTitle:isSet$h(e82.modReasonTitle)?String(e82.modReasonTitle):void 0,gilded:isSet$h(e82.gilded)?Number(e82.gilded):void 0,clicked:isSet$h(e82.clicked)?!!e82.clicked:void 0,title:isSet$h(e82.title)?String(e82.title):void 0,linkFlairRichtext:globalThis.Array.isArray(e82?.linkFlairRichtext)?e82.linkFlairRichtext.map(n=>String(n)):[],subredditNamePrefixed:isSet$h(e82.subredditNamePrefixed)?String(e82.subredditNamePrefixed):void 0,hidden:isSet$h(e82.hidden)?!!e82.hidden:void 0,pwls:isSet$h(e82.pwls)?String(e82.pwls):void 0,linkFlairCssClass:isSet$h(e82.linkFlairCssClass)?String(e82.linkFlairCssClass):void 0,downs:isSet$h(e82.downs)?Number(e82.downs):void 0,thumbnailHeight:isSet$h(e82.thumbnailHeight)?Number(e82.thumbnailHeight):void 0,topAwardedType:isSet$h(e82.topAwardedType)?String(e82.topAwardedType):void 0,parentWhitelistStatus:isSet$h(e82.parentWhitelistStatus)?!!e82.parentWhitelistStatus:void 0,hideScore:isSet$h(e82.hideScore)?!!e82.hideScore:void 0,name:isSet$h(e82.name)?String(e82.name):void 0,quarantine:isSet$h(e82.quarantine)?!!e82.quarantine:void 0,linkFlairTextColor:isSet$h(e82.linkFlairTextColor)?String(e82.linkFlairTextColor):void 0,upvoteRatio:isSet$h(e82.upvoteRatio)?Number(e82.upvoteRatio):void 0,ignoreReports:isSet$h(e82.ignoreReports)?!!e82.ignoreReports:void 0,ups:isSet$h(e82.ups)?Number(e82.ups):void 0,domain:isSet$h(e82.domain)?String(e82.domain):void 0,mediaEmbed:isSet$h(e82.mediaEmbed)?MediaEmbed.fromJSON(e82.mediaEmbed):void 0,thumbnailWidth:isSet$h(e82.thumbnailWidth)?Number(e82.thumbnailWidth):void 0,authorFlairTemplateId:isSet$h(e82.authorFlairTemplateId)?String(e82.authorFlairTemplateId):void 0,isOriginalContent:isSet$h(e82.isOriginalContent)?!!e82.isOriginalContent:void 0,authorFullname:isSet$h(e82.authorFullname)?String(e82.authorFullname):void 0,secureMedia:isSet$h(e82.secureMedia)?!!e82.secureMedia:void 0,isRedditMediaDomain:isSet$h(e82.isRedditMediaDomain)?!!e82.isRedditMediaDomain:void 0,isMeta:isSet$h(e82.isMeta)?!!e82.isMeta:void 0,category:isSet$h(e82.category)?String(e82.category):void 0,secureMediaEmbed:isSet$h(e82.secureMediaEmbed)?MediaEmbed.fromJSON(e82.secureMediaEmbed):void 0,linkFlairText:isSet$h(e82.linkFlairText)?String(e82.linkFlairText):void 0,canModPost:isSet$h(e82.canModPost)?!!e82.canModPost:void 0,score:isSet$h(e82.score)?Number(e82.score):void 0,approvedBy:isSet$h(e82.approvedBy)?String(e82.approvedBy):void 0,isCreatedFromAdsUi:isSet$h(e82.isCreatedFromAdsUi)?!!e82.isCreatedFromAdsUi:void 0,authorPremium:isSet$h(e82.authorPremium)?!!e82.authorPremium:void 0,thumbnail:isSet$h(e82.thumbnail)?String(e82.thumbnail):void 0,edited:isSet$h(e82.edited)?!!e82.edited:void 0,authorFlairCssClass:isSet$h(e82.authorFlairCssClass)?String(e82.authorFlairCssClass):void 0,previousVisits:globalThis.Array.isArray(e82?.previousVisits)?e82.previousVisits.map(n=>Number(n)):[],authorFlairRichtext:globalThis.Array.isArray(e82?.authorFlairRichtext)?e82.authorFlairRichtext.map(n=>String(n)):[],gildings:isSet$h(e82.gildings)?Any.fromJSON(e82.gildings):void 0,contentCategories:isSet$h(e82.contentCategories)?String(e82.contentCategories):void 0,isSelf:isSet$h(e82.isSelf)?!!e82.isSelf:void 0,subredditType:isSet$h(e82.subredditType)?String(e82.subredditType):void 0,created:isSet$h(e82.created)?Number(e82.created):void 0,linkFlairType:isSet$h(e82.linkFlairType)?String(e82.linkFlairType):void 0,wls:isSet$h(e82.wls)?String(e82.wls):void 0,removedByCategory:isSet$h(e82.removedByCategory)?String(e82.removedByCategory):void 0,bannedBy:isSet$h(e82.bannedBy)?String(e82.bannedBy):void 0,authorFlairType:isSet$h(e82.authorFlairType)?String(e82.authorFlairType):void 0,totalAwardsReceived:isSet$h(e82.totalAwardsReceived)?Number(e82.totalAwardsReceived):void 0,allowLiveComments:isSet$h(e82.allowLiveComments)?!!e82.allowLiveComments:void 0,selftextHtml:isSet$h(e82.selftextHtml)?String(e82.selftextHtml):void 0,likes:isSet$h(e82.likes)?!!e82.likes:void 0,suggestedSort:isSet$h(e82.suggestedSort)?String(e82.suggestedSort):void 0,bannedAtUtc:isSet$h(e82.bannedAtUtc)?Number(e82.bannedAtUtc):void 0,viewCount:isSet$h(e82.viewCount)?Number(e82.viewCount):void 0,archived:isSet$h(e82.archived)?!!e82.archived:void 0,noFollow:isSet$h(e82.noFollow)?!!e82.noFollow:void 0,spam:isSet$h(e82.spam)?!!e82.spam:void 0,isCrosspostable:isSet$h(e82.isCrosspostable)?!!e82.isCrosspostable:void 0,pinned:isSet$h(e82.pinned)?!!e82.pinned:void 0,over18:isSet$h(e82.over18)?!!e82.over18:void 0,allAwardings:globalThis.Array.isArray(e82?.allAwardings)?e82.allAwardings.map(n=>Any.fromJSON(n)):[],awarders:globalThis.Array.isArray(e82?.awarders)?e82.awarders.map(n=>String(n)):[],mediaOnly:isSet$h(e82.mediaOnly)?!!e82.mediaOnly:void 0,canGild:isSet$h(e82.canGild)?!!e82.canGild:void 0,removed:isSet$h(e82.removed)?!!e82.removed:void 0,spoiler:isSet$h(e82.spoiler)?!!e82.spoiler:void 0,locked:isSet$h(e82.locked)?!!e82.locked:void 0,authorFlairText:isSet$h(e82.authorFlairText)?String(e82.authorFlairText):void 0,treatmentTags:globalThis.Array.isArray(e82?.treatmentTags)?e82.treatmentTags.map(n=>Any.fromJSON(n)):[],rteMode:isSet$h(e82.rteMode)?String(e82.rteMode):void 0,visited:isSet$h(e82.visited)?!!e82.visited:void 0,removedBy:isSet$h(e82.removedBy)?String(e82.removedBy):void 0,modNote:isSet$h(e82.modNote)?String(e82.modNote):void 0,distinguished:isSet$h(e82.distinguished)?String(e82.distinguished):void 0,subredditId:isSet$h(e82.subredditId)?String(e82.subredditId):void 0,authorIsBlocked:isSet$h(e82.authorIsBlocked)?!!e82.authorIsBlocked:void 0,modReasonBy:isSet$h(e82.modReasonBy)?String(e82.modReasonBy):void 0,numReports:isSet$h(e82.numReports)?Number(e82.numReports):void 0,removalReason:isSet$h(e82.removalReason)?String(e82.removalReason):void 0,linkFlairBackgroundColor:isSet$h(e82.linkFlairBackgroundColor)?String(e82.linkFlairBackgroundColor):void 0,id:isSet$h(e82.id)?String(e82.id):void 0,isRobotIndexable:isSet$h(e82.isRobotIndexable)?!!e82.isRobotIndexable:void 0,numDuplicates:isSet$h(e82.numDuplicates)?Number(e82.numDuplicates):void 0,reportReasons:globalThis.Array.isArray(e82?.reportReasons)?e82.reportReasons.map(n=>Any.fromJSON(n)):[],author:isSet$h(e82.author)?String(e82.author):void 0,discussionType:isSet$h(e82.discussionType)?String(e82.discussionType):void 0,numComments:isSet$h(e82.numComments)?Number(e82.numComments):void 0,sendReplies:isSet$h(e82.sendReplies)?!!e82.sendReplies:void 0,media:isSet$h(e82.media)?String(e82.media):void 0,contestMode:isSet$h(e82.contestMode)?!!e82.contestMode:void 0,authorPatreonFlair:isSet$h(e82.authorPatreonFlair)?!!e82.authorPatreonFlair:void 0,approved:isSet$h(e82.approved)?!!e82.approved:void 0,authorFlairTextColor:isSet$h(e82.authorFlairTextColor)?String(e82.authorFlairTextColor):void 0,permalink:isSet$h(e82.permalink)?String(e82.permalink):void 0,whitelistStatus:isSet$h(e82.whitelistStatus)?!!e82.whitelistStatus:void 0,stickied:isSet$h(e82.stickied)?!!e82.stickied:void 0,url:isSet$h(e82.url)?String(e82.url):void 0,subredditSubscribers:isSet$h(e82.subredditSubscribers)?Number(e82.subredditSubscribers):void 0,createdUtc:isSet$h(e82.createdUtc)?Number(e82.createdUtc):void 0,numCrossposts:isSet$h(e82.numCrossposts)?Number(e82.numCrossposts):void 0,modReports:globalThis.Array.isArray(e82?.modReports)?e82.modReports.map(n=>Any.fromJSON(n)):[],isVideo:isSet$h(e82.isVideo)?!!e82.isVideo:void 0}},toJSON(e82){var t,o,d,r,a,u,l,s,f;let n={};return e82.authorFlairBackgroundColor!==void 0&&(n.authorFlairBackgroundColor=e82.authorFlairBackgroundColor),e82.approvedAtUtc!==void 0&&(n.approvedAtUtc=e82.approvedAtUtc),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),e82.selftext!==void 0&&(n.selftext=e82.selftext),(t=e82.userReports)!=null&&t.length&&(n.userReports=e82.userReports),e82.saved!==void 0&&(n.saved=e82.saved),e82.modReasonTitle!==void 0&&(n.modReasonTitle=e82.modReasonTitle),e82.gilded!==void 0&&(n.gilded=e82.gilded),e82.clicked!==void 0&&(n.clicked=e82.clicked),e82.title!==void 0&&(n.title=e82.title),(o=e82.linkFlairRichtext)!=null&&o.length&&(n.linkFlairRichtext=e82.linkFlairRichtext),e82.subredditNamePrefixed!==void 0&&(n.subredditNamePrefixed=e82.subredditNamePrefixed),e82.hidden!==void 0&&(n.hidden=e82.hidden),e82.pwls!==void 0&&(n.pwls=e82.pwls),e82.linkFlairCssClass!==void 0&&(n.linkFlairCssClass=e82.linkFlairCssClass),e82.downs!==void 0&&(n.downs=e82.downs),e82.thumbnailHeight!==void 0&&(n.thumbnailHeight=e82.thumbnailHeight),e82.topAwardedType!==void 0&&(n.topAwardedType=e82.topAwardedType),e82.parentWhitelistStatus!==void 0&&(n.parentWhitelistStatus=e82.parentWhitelistStatus),e82.hideScore!==void 0&&(n.hideScore=e82.hideScore),e82.name!==void 0&&(n.name=e82.name),e82.quarantine!==void 0&&(n.quarantine=e82.quarantine),e82.linkFlairTextColor!==void 0&&(n.linkFlairTextColor=e82.linkFlairTextColor),e82.upvoteRatio!==void 0&&(n.upvoteRatio=e82.upvoteRatio),e82.ignoreReports!==void 0&&(n.ignoreReports=e82.ignoreReports),e82.ups!==void 0&&(n.ups=e82.ups),e82.domain!==void 0&&(n.domain=e82.domain),e82.mediaEmbed!==void 0&&(n.mediaEmbed=MediaEmbed.toJSON(e82.mediaEmbed)),e82.thumbnailWidth!==void 0&&(n.thumbnailWidth=e82.thumbnailWidth),e82.authorFlairTemplateId!==void 0&&(n.authorFlairTemplateId=e82.authorFlairTemplateId),e82.isOriginalContent!==void 0&&(n.isOriginalContent=e82.isOriginalContent),e82.authorFullname!==void 0&&(n.authorFullname=e82.authorFullname),e82.secureMedia!==void 0&&(n.secureMedia=e82.secureMedia),e82.isRedditMediaDomain!==void 0&&(n.isRedditMediaDomain=e82.isRedditMediaDomain),e82.isMeta!==void 0&&(n.isMeta=e82.isMeta),e82.category!==void 0&&(n.category=e82.category),e82.secureMediaEmbed!==void 0&&(n.secureMediaEmbed=MediaEmbed.toJSON(e82.secureMediaEmbed)),e82.linkFlairText!==void 0&&(n.linkFlairText=e82.linkFlairText),e82.canModPost!==void 0&&(n.canModPost=e82.canModPost),e82.score!==void 0&&(n.score=e82.score),e82.approvedBy!==void 0&&(n.approvedBy=e82.approvedBy),e82.isCreatedFromAdsUi!==void 0&&(n.isCreatedFromAdsUi=e82.isCreatedFromAdsUi),e82.authorPremium!==void 0&&(n.authorPremium=e82.authorPremium),e82.thumbnail!==void 0&&(n.thumbnail=e82.thumbnail),e82.edited!==void 0&&(n.edited=e82.edited),e82.authorFlairCssClass!==void 0&&(n.authorFlairCssClass=e82.authorFlairCssClass),(d=e82.previousVisits)!=null&&d.length&&(n.previousVisits=e82.previousVisits),(r=e82.authorFlairRichtext)!=null&&r.length&&(n.authorFlairRichtext=e82.authorFlairRichtext),e82.gildings!==void 0&&(n.gildings=Any.toJSON(e82.gildings)),e82.contentCategories!==void 0&&(n.contentCategories=e82.contentCategories),e82.isSelf!==void 0&&(n.isSelf=e82.isSelf),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.created!==void 0&&(n.created=e82.created),e82.linkFlairType!==void 0&&(n.linkFlairType=e82.linkFlairType),e82.wls!==void 0&&(n.wls=e82.wls),e82.removedByCategory!==void 0&&(n.removedByCategory=e82.removedByCategory),e82.bannedBy!==void 0&&(n.bannedBy=e82.bannedBy),e82.authorFlairType!==void 0&&(n.authorFlairType=e82.authorFlairType),e82.totalAwardsReceived!==void 0&&(n.totalAwardsReceived=e82.totalAwardsReceived),e82.allowLiveComments!==void 0&&(n.allowLiveComments=e82.allowLiveComments),e82.selftextHtml!==void 0&&(n.selftextHtml=e82.selftextHtml),e82.likes!==void 0&&(n.likes=e82.likes),e82.suggestedSort!==void 0&&(n.suggestedSort=e82.suggestedSort),e82.bannedAtUtc!==void 0&&(n.bannedAtUtc=e82.bannedAtUtc),e82.viewCount!==void 0&&(n.viewCount=e82.viewCount),e82.archived!==void 0&&(n.archived=e82.archived),e82.noFollow!==void 0&&(n.noFollow=e82.noFollow),e82.spam!==void 0&&(n.spam=e82.spam),e82.isCrosspostable!==void 0&&(n.isCrosspostable=e82.isCrosspostable),e82.pinned!==void 0&&(n.pinned=e82.pinned),e82.over18!==void 0&&(n.over18=e82.over18),(a=e82.allAwardings)!=null&&a.length&&(n.allAwardings=e82.allAwardings.map(c=>Any.toJSON(c))),(u=e82.awarders)!=null&&u.length&&(n.awarders=e82.awarders),e82.mediaOnly!==void 0&&(n.mediaOnly=e82.mediaOnly),e82.canGild!==void 0&&(n.canGild=e82.canGild),e82.removed!==void 0&&(n.removed=e82.removed),e82.spoiler!==void 0&&(n.spoiler=e82.spoiler),e82.locked!==void 0&&(n.locked=e82.locked),e82.authorFlairText!==void 0&&(n.authorFlairText=e82.authorFlairText),(l=e82.treatmentTags)!=null&&l.length&&(n.treatmentTags=e82.treatmentTags.map(c=>Any.toJSON(c))),e82.rteMode!==void 0&&(n.rteMode=e82.rteMode),e82.visited!==void 0&&(n.visited=e82.visited),e82.removedBy!==void 0&&(n.removedBy=e82.removedBy),e82.modNote!==void 0&&(n.modNote=e82.modNote),e82.distinguished!==void 0&&(n.distinguished=e82.distinguished),e82.subredditId!==void 0&&(n.subredditId=e82.subredditId),e82.authorIsBlocked!==void 0&&(n.authorIsBlocked=e82.authorIsBlocked),e82.modReasonBy!==void 0&&(n.modReasonBy=e82.modReasonBy),e82.numReports!==void 0&&(n.numReports=e82.numReports),e82.removalReason!==void 0&&(n.removalReason=e82.removalReason),e82.linkFlairBackgroundColor!==void 0&&(n.linkFlairBackgroundColor=e82.linkFlairBackgroundColor),e82.id!==void 0&&(n.id=e82.id),e82.isRobotIndexable!==void 0&&(n.isRobotIndexable=e82.isRobotIndexable),e82.numDuplicates!==void 0&&(n.numDuplicates=e82.numDuplicates),(s=e82.reportReasons)!=null&&s.length&&(n.reportReasons=e82.reportReasons.map(c=>Any.toJSON(c))),e82.author!==void 0&&(n.author=e82.author),e82.discussionType!==void 0&&(n.discussionType=e82.discussionType),e82.numComments!==void 0&&(n.numComments=e82.numComments),e82.sendReplies!==void 0&&(n.sendReplies=e82.sendReplies),e82.media!==void 0&&(n.media=e82.media),e82.contestMode!==void 0&&(n.contestMode=e82.contestMode),e82.authorPatreonFlair!==void 0&&(n.authorPatreonFlair=e82.authorPatreonFlair),e82.approved!==void 0&&(n.approved=e82.approved),e82.authorFlairTextColor!==void 0&&(n.authorFlairTextColor=e82.authorFlairTextColor),e82.permalink!==void 0&&(n.permalink=e82.permalink),e82.whitelistStatus!==void 0&&(n.whitelistStatus=e82.whitelistStatus),e82.stickied!==void 0&&(n.stickied=e82.stickied),e82.url!==void 0&&(n.url=e82.url),e82.subredditSubscribers!==void 0&&(n.subredditSubscribers=e82.subredditSubscribers),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.numCrossposts!==void 0&&(n.numCrossposts=e82.numCrossposts),(f=e82.modReports)!=null&&f.length&&(n.modReports=e82.modReports.map(c=>Any.toJSON(c))),e82.isVideo!==void 0&&(n.isVideo=e82.isVideo),n},create(e82){return StickyResponse_LinkData.fromPartial(e82??{})},fromPartial(e82){var t,o,d,r,a,u,l,s,f;let n=createBaseStickyResponse_LinkData();return n.authorFlairBackgroundColor=e82.authorFlairBackgroundColor??void 0,n.approvedAtUtc=e82.approvedAtUtc??void 0,n.subreddit=e82.subreddit??void 0,n.selftext=e82.selftext??void 0,n.userReports=((t=e82.userReports)==null?void 0:t.map(c=>c))||[],n.saved=e82.saved??void 0,n.modReasonTitle=e82.modReasonTitle??void 0,n.gilded=e82.gilded??void 0,n.clicked=e82.clicked??void 0,n.title=e82.title??void 0,n.linkFlairRichtext=((o=e82.linkFlairRichtext)==null?void 0:o.map(c=>c))||[],n.subredditNamePrefixed=e82.subredditNamePrefixed??void 0,n.hidden=e82.hidden??void 0,n.pwls=e82.pwls??void 0,n.linkFlairCssClass=e82.linkFlairCssClass??void 0,n.downs=e82.downs??void 0,n.thumbnailHeight=e82.thumbnailHeight??void 0,n.topAwardedType=e82.topAwardedType??void 0,n.parentWhitelistStatus=e82.parentWhitelistStatus??void 0,n.hideScore=e82.hideScore??void 0,n.name=e82.name??void 0,n.quarantine=e82.quarantine??void 0,n.linkFlairTextColor=e82.linkFlairTextColor??void 0,n.upvoteRatio=e82.upvoteRatio??void 0,n.ignoreReports=e82.ignoreReports??void 0,n.ups=e82.ups??void 0,n.domain=e82.domain??void 0,n.mediaEmbed=e82.mediaEmbed!==void 0&&e82.mediaEmbed!==null?MediaEmbed.fromPartial(e82.mediaEmbed):void 0,n.thumbnailWidth=e82.thumbnailWidth??void 0,n.authorFlairTemplateId=e82.authorFlairTemplateId??void 0,n.isOriginalContent=e82.isOriginalContent??void 0,n.authorFullname=e82.authorFullname??void 0,n.secureMedia=e82.secureMedia??void 0,n.isRedditMediaDomain=e82.isRedditMediaDomain??void 0,n.isMeta=e82.isMeta??void 0,n.category=e82.category??void 0,n.secureMediaEmbed=e82.secureMediaEmbed!==void 0&&e82.secureMediaEmbed!==null?MediaEmbed.fromPartial(e82.secureMediaEmbed):void 0,n.linkFlairText=e82.linkFlairText??void 0,n.canModPost=e82.canModPost??void 0,n.score=e82.score??void 0,n.approvedBy=e82.approvedBy??void 0,n.isCreatedFromAdsUi=e82.isCreatedFromAdsUi??void 0,n.authorPremium=e82.authorPremium??void 0,n.thumbnail=e82.thumbnail??void 0,n.edited=e82.edited??void 0,n.authorFlairCssClass=e82.authorFlairCssClass??void 0,n.previousVisits=((d=e82.previousVisits)==null?void 0:d.map(c=>c))||[],n.authorFlairRichtext=((r=e82.authorFlairRichtext)==null?void 0:r.map(c=>c))||[],n.gildings=e82.gildings!==void 0&&e82.gildings!==null?Any.fromPartial(e82.gildings):void 0,n.contentCategories=e82.contentCategories??void 0,n.isSelf=e82.isSelf??void 0,n.subredditType=e82.subredditType??void 0,n.created=e82.created??void 0,n.linkFlairType=e82.linkFlairType??void 0,n.wls=e82.wls??void 0,n.removedByCategory=e82.removedByCategory??void 0,n.bannedBy=e82.bannedBy??void 0,n.authorFlairType=e82.authorFlairType??void 0,n.totalAwardsReceived=e82.totalAwardsReceived??void 0,n.allowLiveComments=e82.allowLiveComments??void 0,n.selftextHtml=e82.selftextHtml??void 0,n.likes=e82.likes??void 0,n.suggestedSort=e82.suggestedSort??void 0,n.bannedAtUtc=e82.bannedAtUtc??void 0,n.viewCount=e82.viewCount??void 0,n.archived=e82.archived??void 0,n.noFollow=e82.noFollow??void 0,n.spam=e82.spam??void 0,n.isCrosspostable=e82.isCrosspostable??void 0,n.pinned=e82.pinned??void 0,n.over18=e82.over18??void 0,n.allAwardings=((a=e82.allAwardings)==null?void 0:a.map(c=>Any.fromPartial(c)))||[],n.awarders=((u=e82.awarders)==null?void 0:u.map(c=>c))||[],n.mediaOnly=e82.mediaOnly??void 0,n.canGild=e82.canGild??void 0,n.removed=e82.removed??void 0,n.spoiler=e82.spoiler??void 0,n.locked=e82.locked??void 0,n.authorFlairText=e82.authorFlairText??void 0,n.treatmentTags=((l=e82.treatmentTags)==null?void 0:l.map(c=>Any.fromPartial(c)))||[],n.rteMode=e82.rteMode??void 0,n.visited=e82.visited??void 0,n.removedBy=e82.removedBy??void 0,n.modNote=e82.modNote??void 0,n.distinguished=e82.distinguished??void 0,n.subredditId=e82.subredditId??void 0,n.authorIsBlocked=e82.authorIsBlocked??void 0,n.modReasonBy=e82.modReasonBy??void 0,n.numReports=e82.numReports??void 0,n.removalReason=e82.removalReason??void 0,n.linkFlairBackgroundColor=e82.linkFlairBackgroundColor??void 0,n.id=e82.id??void 0,n.isRobotIndexable=e82.isRobotIndexable??void 0,n.numDuplicates=e82.numDuplicates??void 0,n.reportReasons=((s=e82.reportReasons)==null?void 0:s.map(c=>Any.fromPartial(c)))||[],n.author=e82.author??void 0,n.discussionType=e82.discussionType??void 0,n.numComments=e82.numComments??void 0,n.sendReplies=e82.sendReplies??void 0,n.media=e82.media??void 0,n.contestMode=e82.contestMode??void 0,n.authorPatreonFlair=e82.authorPatreonFlair??void 0,n.approved=e82.approved??void 0,n.authorFlairTextColor=e82.authorFlairTextColor??void 0,n.permalink=e82.permalink??void 0,n.whitelistStatus=e82.whitelistStatus??void 0,n.stickied=e82.stickied??void 0,n.url=e82.url??void 0,n.subredditSubscribers=e82.subredditSubscribers??void 0,n.createdUtc=e82.createdUtc??void 0,n.numCrossposts=e82.numCrossposts??void 0,n.modReports=((f=e82.modReports)==null?void 0:f.map(c=>Any.fromPartial(c)))||[],n.isVideo=e82.isVideo??void 0,n}};messageTypeRegistry.set(StickyResponse_LinkData.$type,StickyResponse_LinkData);function createBaseStickyResponse_WrappedStickyListing(){return{kind:void 0,data:void 0}}var StickyResponse_WrappedStickyListing={$type:"devvit.plugin.redditapi.subreddits.StickyResponse.WrappedStickyListing",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&StickyResponse_LinkData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStickyResponse_WrappedStickyListing();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=StickyResponse_LinkData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,data:isSet$h(e82.data)?StickyResponse_LinkData.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=StickyResponse_LinkData.toJSON(e82.data)),n},create(e82){return StickyResponse_WrappedStickyListing.fromPartial(e82??{})},fromPartial(e82){let n=createBaseStickyResponse_WrappedStickyListing();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?StickyResponse_LinkData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(StickyResponse_WrappedStickyListing.$type,StickyResponse_WrappedStickyListing);function createBaseStickyResponse_StickyResponseData(){return{after:void 0,before:void 0,dist:void 0,modhash:void 0,geoFilter:void 0,children:[]}}var StickyResponse_StickyResponseData={$type:"devvit.plugin.redditapi.subreddits.StickyResponse.StickyResponseData",encode(e82,n=_m0.Writer.create()){e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.dist!==void 0&&Int32Value.encode({value:e82.dist},n.uint32(26).fork()).ldelim(),e82.modhash!==void 0&&StringValue.encode({value:e82.modhash},n.uint32(34).fork()).ldelim(),e82.geoFilter!==void 0&&StringValue.encode({value:e82.geoFilter},n.uint32(42).fork()).ldelim();for(let t of e82.children)StickyResponse_WrappedStickyListing.encode(t,n.uint32(50).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStickyResponse_StickyResponseData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.dist=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.modhash=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.geoFilter=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.children.push(StickyResponse_WrappedStickyListing.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$h(e82.after)?String(e82.after):void 0,before:isSet$h(e82.before)?String(e82.before):void 0,dist:isSet$h(e82.dist)?Number(e82.dist):void 0,modhash:isSet$h(e82.modhash)?String(e82.modhash):void 0,geoFilter:isSet$h(e82.geoFilter)?String(e82.geoFilter):void 0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>StickyResponse_WrappedStickyListing.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.dist!==void 0&&(n.dist=e82.dist),e82.modhash!==void 0&&(n.modhash=e82.modhash),e82.geoFilter!==void 0&&(n.geoFilter=e82.geoFilter),(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>StickyResponse_WrappedStickyListing.toJSON(o))),n},create(e82){return StickyResponse_StickyResponseData.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseStickyResponse_StickyResponseData();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.dist=e82.dist??void 0,n.modhash=e82.modhash??void 0,n.geoFilter=e82.geoFilter??void 0,n.children=((t=e82.children)==null?void 0:t.map(o=>StickyResponse_WrappedStickyListing.fromPartial(o)))||[],n}};messageTypeRegistry.set(StickyResponse_StickyResponseData.$type,StickyResponse_StickyResponseData);function createBaseFullSubredditObject(){return{userFlairBackgroundColor:void 0,submitTextHtml:void 0,restrictPosting:void 0,userIsBanned:void 0,freeFormReports:void 0,wikiEnabled:void 0,userIsMuted:void 0,userCanFlairInSr:void 0,displayName:void 0,headerImg:void 0,title:void 0,allowGalleries:void 0,iconSize:[],primaryColor:void 0,activeUserCount:void 0,iconImg:void 0,displayNamePrefixed:void 0,accountsActive:void 0,publicTraffic:void 0,subscribers:void 0,userFlairRichtext:[],videostreamLinksCount:void 0,name:void 0,quarantine:void 0,hideAds:void 0,emojisEnabled:void 0,advertiserCategory:void 0,publicDescription:void 0,commentScoreHideMins:void 0,allowPredictions:void 0,userHasFavorited:void 0,userFlairTemplateId:void 0,communityIcon:void 0,bannerBackgroundImage:void 0,originalContentTagEnabled:void 0,communityReviewed:void 0,submitText:void 0,descriptionHtml:void 0,spoilersEnabled:void 0,commentContributionSettings:void 0,allowTalks:void 0,headerSize:[],userFlairPosition:void 0,allOriginalContent:void 0,hasMenuWidget:void 0,isEnrolledInNewModmail:void 0,keyColor:void 0,canAssignUserFlair:void 0,created:void 0,wls:void 0,showMediaPreview:void 0,submissionType:void 0,userIsSubscriber:void 0,allowedMediaInComments:[],allowVideogifs:void 0,shouldArchivePosts:void 0,userFlairType:void 0,allowPolls:void 0,collapseDeletedComments:void 0,emojisCustomSize:[],publicDescriptionHtml:void 0,allowVideos:void 0,isCrosspostableSubreddit:void 0,notificationLevel:void 0,shouldShowMediaInCommentsSetting:void 0,canAssignLinkFlair:void 0,accountsActiveIsFuzzed:void 0,allowPredictionContributors:void 0,submitTextLabel:void 0,linkFlairPosition:void 0,userSrFlairEnabled:void 0,userFlairEnabledInSr:void 0,allowChatPostCreation:void 0,allowDiscovery:void 0,acceptFollowers:void 0,userSrThemeEnabled:void 0,linkFlairEnabled:void 0,disableContributorRequests:void 0,subredditType:void 0,suggestedCommentSort:void 0,bannerImg:void 0,userFlairText:void 0,contentCategory:void 0,bannerBackgroundColor:void 0,showMedia:void 0,id:void 0,userIsModerator:void 0,over18:void 0,headerTitle:void 0,description:void 0,isChatPostFeatureEnabled:void 0,submitLinkLabel:void 0,userFlairTextColor:void 0,restrictCommenting:void 0,userFlairCssClass:void 0,allowImages:void 0,lang:void 0,whitelistStatus:void 0,url:void 0,createdUtc:void 0,bannerSize:[],mobileBannerImage:void 0,userIsContributor:void 0,allowPredictionsTournament:void 0}}var FullSubredditObject={$type:"devvit.plugin.redditapi.subreddits.FullSubredditObject",encode(e82,n=_m0.Writer.create()){e82.userFlairBackgroundColor!==void 0&&StringValue.encode({value:e82.userFlairBackgroundColor},n.uint32(10).fork()).ldelim(),e82.submitTextHtml!==void 0&&StringValue.encode({value:e82.submitTextHtml},n.uint32(18).fork()).ldelim(),e82.restrictPosting!==void 0&&BoolValue.encode({value:e82.restrictPosting},n.uint32(26).fork()).ldelim(),e82.userIsBanned!==void 0&&BoolValue.encode({value:e82.userIsBanned},n.uint32(34).fork()).ldelim(),e82.freeFormReports!==void 0&&BoolValue.encode({value:e82.freeFormReports},n.uint32(42).fork()).ldelim(),e82.wikiEnabled!==void 0&&BoolValue.encode({value:e82.wikiEnabled},n.uint32(50).fork()).ldelim(),e82.userIsMuted!==void 0&&BoolValue.encode({value:e82.userIsMuted},n.uint32(58).fork()).ldelim(),e82.userCanFlairInSr!==void 0&&BoolValue.encode({value:e82.userCanFlairInSr},n.uint32(66).fork()).ldelim(),e82.displayName!==void 0&&StringValue.encode({value:e82.displayName},n.uint32(74).fork()).ldelim(),e82.headerImg!==void 0&&StringValue.encode({value:e82.headerImg},n.uint32(82).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(90).fork()).ldelim(),e82.allowGalleries!==void 0&&BoolValue.encode({value:e82.allowGalleries},n.uint32(98).fork()).ldelim();for(let t of e82.iconSize)Int64Value.encode({value:t},n.uint32(106).fork()).ldelim();e82.primaryColor!==void 0&&StringValue.encode({value:e82.primaryColor},n.uint32(114).fork()).ldelim(),e82.activeUserCount!==void 0&&Int64Value.encode({value:e82.activeUserCount},n.uint32(122).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(130).fork()).ldelim(),e82.displayNamePrefixed!==void 0&&StringValue.encode({value:e82.displayNamePrefixed},n.uint32(138).fork()).ldelim(),e82.accountsActive!==void 0&&Int64Value.encode({value:e82.accountsActive},n.uint32(146).fork()).ldelim(),e82.publicTraffic!==void 0&&BoolValue.encode({value:e82.publicTraffic},n.uint32(154).fork()).ldelim(),e82.subscribers!==void 0&&Int64Value.encode({value:e82.subscribers},n.uint32(162).fork()).ldelim();for(let t of e82.userFlairRichtext)StringValue.encode({value:t},n.uint32(170).fork()).ldelim();e82.videostreamLinksCount!==void 0&&Int64Value.encode({value:e82.videostreamLinksCount},n.uint32(178).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(186).fork()).ldelim(),e82.quarantine!==void 0&&BoolValue.encode({value:e82.quarantine},n.uint32(194).fork()).ldelim(),e82.hideAds!==void 0&&BoolValue.encode({value:e82.hideAds},n.uint32(202).fork()).ldelim(),e82.emojisEnabled!==void 0&&BoolValue.encode({value:e82.emojisEnabled},n.uint32(218).fork()).ldelim(),e82.advertiserCategory!==void 0&&StringValue.encode({value:e82.advertiserCategory},n.uint32(226).fork()).ldelim(),e82.publicDescription!==void 0&&StringValue.encode({value:e82.publicDescription},n.uint32(234).fork()).ldelim(),e82.commentScoreHideMins!==void 0&&Int32Value.encode({value:e82.commentScoreHideMins},n.uint32(242).fork()).ldelim(),e82.allowPredictions!==void 0&&BoolValue.encode({value:e82.allowPredictions},n.uint32(250).fork()).ldelim(),e82.userHasFavorited!==void 0&&BoolValue.encode({value:e82.userHasFavorited},n.uint32(258).fork()).ldelim(),e82.userFlairTemplateId!==void 0&&StringValue.encode({value:e82.userFlairTemplateId},n.uint32(266).fork()).ldelim(),e82.communityIcon!==void 0&&StringValue.encode({value:e82.communityIcon},n.uint32(274).fork()).ldelim(),e82.bannerBackgroundImage!==void 0&&StringValue.encode({value:e82.bannerBackgroundImage},n.uint32(282).fork()).ldelim(),e82.originalContentTagEnabled!==void 0&&BoolValue.encode({value:e82.originalContentTagEnabled},n.uint32(290).fork()).ldelim(),e82.communityReviewed!==void 0&&BoolValue.encode({value:e82.communityReviewed},n.uint32(298).fork()).ldelim(),e82.submitText!==void 0&&StringValue.encode({value:e82.submitText},n.uint32(314).fork()).ldelim(),e82.descriptionHtml!==void 0&&StringValue.encode({value:e82.descriptionHtml},n.uint32(322).fork()).ldelim(),e82.spoilersEnabled!==void 0&&BoolValue.encode({value:e82.spoilersEnabled},n.uint32(330).fork()).ldelim(),e82.commentContributionSettings!==void 0&&CommentContributionSettings.encode(e82.commentContributionSettings,n.uint32(338).fork()).ldelim(),e82.allowTalks!==void 0&&BoolValue.encode({value:e82.allowTalks},n.uint32(346).fork()).ldelim();for(let t of e82.headerSize)Int64Value.encode({value:t},n.uint32(354).fork()).ldelim();e82.userFlairPosition!==void 0&&StringValue.encode({value:e82.userFlairPosition},n.uint32(362).fork()).ldelim(),e82.allOriginalContent!==void 0&&BoolValue.encode({value:e82.allOriginalContent},n.uint32(370).fork()).ldelim(),e82.hasMenuWidget!==void 0&&BoolValue.encode({value:e82.hasMenuWidget},n.uint32(378).fork()).ldelim(),e82.isEnrolledInNewModmail!==void 0&&BoolValue.encode({value:e82.isEnrolledInNewModmail},n.uint32(386).fork()).ldelim(),e82.keyColor!==void 0&&StringValue.encode({value:e82.keyColor},n.uint32(394).fork()).ldelim(),e82.canAssignUserFlair!==void 0&&BoolValue.encode({value:e82.canAssignUserFlair},n.uint32(402).fork()).ldelim(),e82.created!==void 0&&Int64Value.encode({value:e82.created},n.uint32(410).fork()).ldelim(),e82.wls!==void 0&&Int32Value.encode({value:e82.wls},n.uint32(418).fork()).ldelim(),e82.showMediaPreview!==void 0&&BoolValue.encode({value:e82.showMediaPreview},n.uint32(426).fork()).ldelim(),e82.submissionType!==void 0&&StringValue.encode({value:e82.submissionType},n.uint32(434).fork()).ldelim(),e82.userIsSubscriber!==void 0&&BoolValue.encode({value:e82.userIsSubscriber},n.uint32(442).fork()).ldelim();for(let t of e82.allowedMediaInComments)StringValue.encode({value:t},n.uint32(450).fork()).ldelim();e82.allowVideogifs!==void 0&&BoolValue.encode({value:e82.allowVideogifs},n.uint32(458).fork()).ldelim(),e82.shouldArchivePosts!==void 0&&BoolValue.encode({value:e82.shouldArchivePosts},n.uint32(466).fork()).ldelim(),e82.userFlairType!==void 0&&StringValue.encode({value:e82.userFlairType},n.uint32(474).fork()).ldelim(),e82.allowPolls!==void 0&&BoolValue.encode({value:e82.allowPolls},n.uint32(482).fork()).ldelim(),e82.collapseDeletedComments!==void 0&&BoolValue.encode({value:e82.collapseDeletedComments},n.uint32(490).fork()).ldelim();for(let t of e82.emojisCustomSize)Int64Value.encode({value:t},n.uint32(498).fork()).ldelim();e82.publicDescriptionHtml!==void 0&&StringValue.encode({value:e82.publicDescriptionHtml},n.uint32(506).fork()).ldelim(),e82.allowVideos!==void 0&&BoolValue.encode({value:e82.allowVideos},n.uint32(514).fork()).ldelim(),e82.isCrosspostableSubreddit!==void 0&&BoolValue.encode({value:e82.isCrosspostableSubreddit},n.uint32(522).fork()).ldelim(),e82.notificationLevel!==void 0&&StringValue.encode({value:e82.notificationLevel},n.uint32(530).fork()).ldelim(),e82.shouldShowMediaInCommentsSetting!==void 0&&BoolValue.encode({value:e82.shouldShowMediaInCommentsSetting},n.uint32(538).fork()).ldelim(),e82.canAssignLinkFlair!==void 0&&BoolValue.encode({value:e82.canAssignLinkFlair},n.uint32(546).fork()).ldelim(),e82.accountsActiveIsFuzzed!==void 0&&BoolValue.encode({value:e82.accountsActiveIsFuzzed},n.uint32(554).fork()).ldelim(),e82.allowPredictionContributors!==void 0&&BoolValue.encode({value:e82.allowPredictionContributors},n.uint32(562).fork()).ldelim(),e82.submitTextLabel!==void 0&&StringValue.encode({value:e82.submitTextLabel},n.uint32(570).fork()).ldelim(),e82.linkFlairPosition!==void 0&&StringValue.encode({value:e82.linkFlairPosition},n.uint32(578).fork()).ldelim(),e82.userSrFlairEnabled!==void 0&&BoolValue.encode({value:e82.userSrFlairEnabled},n.uint32(586).fork()).ldelim(),e82.userFlairEnabledInSr!==void 0&&BoolValue.encode({value:e82.userFlairEnabledInSr},n.uint32(594).fork()).ldelim(),e82.allowChatPostCreation!==void 0&&BoolValue.encode({value:e82.allowChatPostCreation},n.uint32(602).fork()).ldelim(),e82.allowDiscovery!==void 0&&BoolValue.encode({value:e82.allowDiscovery},n.uint32(610).fork()).ldelim(),e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(618).fork()).ldelim(),e82.userSrThemeEnabled!==void 0&&BoolValue.encode({value:e82.userSrThemeEnabled},n.uint32(626).fork()).ldelim(),e82.linkFlairEnabled!==void 0&&BoolValue.encode({value:e82.linkFlairEnabled},n.uint32(634).fork()).ldelim(),e82.disableContributorRequests!==void 0&&BoolValue.encode({value:e82.disableContributorRequests},n.uint32(642).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(650).fork()).ldelim(),e82.suggestedCommentSort!==void 0&&StringValue.encode({value:e82.suggestedCommentSort},n.uint32(658).fork()).ldelim(),e82.bannerImg!==void 0&&StringValue.encode({value:e82.bannerImg},n.uint32(666).fork()).ldelim(),e82.userFlairText!==void 0&&StringValue.encode({value:e82.userFlairText},n.uint32(674).fork()).ldelim(),e82.contentCategory!==void 0&&StringValue.encode({value:e82.contentCategory},n.uint32(682).fork()).ldelim(),e82.bannerBackgroundColor!==void 0&&StringValue.encode({value:e82.bannerBackgroundColor},n.uint32(690).fork()).ldelim(),e82.showMedia!==void 0&&BoolValue.encode({value:e82.showMedia},n.uint32(698).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(706).fork()).ldelim(),e82.userIsModerator!==void 0&&BoolValue.encode({value:e82.userIsModerator},n.uint32(714).fork()).ldelim(),e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(722).fork()).ldelim(),e82.headerTitle!==void 0&&StringValue.encode({value:e82.headerTitle},n.uint32(730).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(738).fork()).ldelim(),e82.isChatPostFeatureEnabled!==void 0&&BoolValue.encode({value:e82.isChatPostFeatureEnabled},n.uint32(746).fork()).ldelim(),e82.submitLinkLabel!==void 0&&StringValue.encode({value:e82.submitLinkLabel},n.uint32(754).fork()).ldelim(),e82.userFlairTextColor!==void 0&&StringValue.encode({value:e82.userFlairTextColor},n.uint32(762).fork()).ldelim(),e82.restrictCommenting!==void 0&&BoolValue.encode({value:e82.restrictCommenting},n.uint32(770).fork()).ldelim(),e82.userFlairCssClass!==void 0&&StringValue.encode({value:e82.userFlairCssClass},n.uint32(778).fork()).ldelim(),e82.allowImages!==void 0&&BoolValue.encode({value:e82.allowImages},n.uint32(786).fork()).ldelim(),e82.lang!==void 0&&StringValue.encode({value:e82.lang},n.uint32(794).fork()).ldelim(),e82.whitelistStatus!==void 0&&StringValue.encode({value:e82.whitelistStatus},n.uint32(802).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(810).fork()).ldelim(),e82.createdUtc!==void 0&&Int64Value.encode({value:e82.createdUtc},n.uint32(818).fork()).ldelim();for(let t of e82.bannerSize)Int32Value.encode({value:t},n.uint32(826).fork()).ldelim();return e82.mobileBannerImage!==void 0&&StringValue.encode({value:e82.mobileBannerImage},n.uint32(834).fork()).ldelim(),e82.userIsContributor!==void 0&&BoolValue.encode({value:e82.userIsContributor},n.uint32(842).fork()).ldelim(),e82.allowPredictionsTournament!==void 0&&BoolValue.encode({value:e82.allowPredictionsTournament},n.uint32(850).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFullSubredditObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.userFlairBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.submitTextHtml=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.restrictPosting=BoolValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.userIsBanned=BoolValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.freeFormReports=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.wikiEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.userIsMuted=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.userCanFlairInSr=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.displayName=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.headerImg=StringValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.title=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.allowGalleries=BoolValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.iconSize.push(Int64Value.decode(t,t.uint32()).value);continue;case 14:if(r!==114)break;d.primaryColor=StringValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.activeUserCount=Int64Value.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.displayNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.accountsActive=Int64Value.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.publicTraffic=BoolValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.subscribers=Int64Value.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.userFlairRichtext.push(StringValue.decode(t,t.uint32()).value);continue;case 22:if(r!==178)break;d.videostreamLinksCount=Int64Value.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.quarantine=BoolValue.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.hideAds=BoolValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.emojisEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.advertiserCategory=StringValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.publicDescription=StringValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.commentScoreHideMins=Int32Value.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.allowPredictions=BoolValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.userHasFavorited=BoolValue.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.userFlairTemplateId=StringValue.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.communityIcon=StringValue.decode(t,t.uint32()).value;continue;case 35:if(r!==282)break;d.bannerBackgroundImage=StringValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.originalContentTagEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.communityReviewed=BoolValue.decode(t,t.uint32()).value;continue;case 39:if(r!==314)break;d.submitText=StringValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.descriptionHtml=StringValue.decode(t,t.uint32()).value;continue;case 41:if(r!==330)break;d.spoilersEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 42:if(r!==338)break;d.commentContributionSettings=CommentContributionSettings.decode(t,t.uint32());continue;case 43:if(r!==346)break;d.allowTalks=BoolValue.decode(t,t.uint32()).value;continue;case 44:if(r!==354)break;d.headerSize.push(Int64Value.decode(t,t.uint32()).value);continue;case 45:if(r!==362)break;d.userFlairPosition=StringValue.decode(t,t.uint32()).value;continue;case 46:if(r!==370)break;d.allOriginalContent=BoolValue.decode(t,t.uint32()).value;continue;case 47:if(r!==378)break;d.hasMenuWidget=BoolValue.decode(t,t.uint32()).value;continue;case 48:if(r!==386)break;d.isEnrolledInNewModmail=BoolValue.decode(t,t.uint32()).value;continue;case 49:if(r!==394)break;d.keyColor=StringValue.decode(t,t.uint32()).value;continue;case 50:if(r!==402)break;d.canAssignUserFlair=BoolValue.decode(t,t.uint32()).value;continue;case 51:if(r!==410)break;d.created=Int64Value.decode(t,t.uint32()).value;continue;case 52:if(r!==418)break;d.wls=Int32Value.decode(t,t.uint32()).value;continue;case 53:if(r!==426)break;d.showMediaPreview=BoolValue.decode(t,t.uint32()).value;continue;case 54:if(r!==434)break;d.submissionType=StringValue.decode(t,t.uint32()).value;continue;case 55:if(r!==442)break;d.userIsSubscriber=BoolValue.decode(t,t.uint32()).value;continue;case 56:if(r!==450)break;d.allowedMediaInComments.push(StringValue.decode(t,t.uint32()).value);continue;case 57:if(r!==458)break;d.allowVideogifs=BoolValue.decode(t,t.uint32()).value;continue;case 58:if(r!==466)break;d.shouldArchivePosts=BoolValue.decode(t,t.uint32()).value;continue;case 59:if(r!==474)break;d.userFlairType=StringValue.decode(t,t.uint32()).value;continue;case 60:if(r!==482)break;d.allowPolls=BoolValue.decode(t,t.uint32()).value;continue;case 61:if(r!==490)break;d.collapseDeletedComments=BoolValue.decode(t,t.uint32()).value;continue;case 62:if(r!==498)break;d.emojisCustomSize.push(Int64Value.decode(t,t.uint32()).value);continue;case 63:if(r!==506)break;d.publicDescriptionHtml=StringValue.decode(t,t.uint32()).value;continue;case 64:if(r!==514)break;d.allowVideos=BoolValue.decode(t,t.uint32()).value;continue;case 65:if(r!==522)break;d.isCrosspostableSubreddit=BoolValue.decode(t,t.uint32()).value;continue;case 66:if(r!==530)break;d.notificationLevel=StringValue.decode(t,t.uint32()).value;continue;case 67:if(r!==538)break;d.shouldShowMediaInCommentsSetting=BoolValue.decode(t,t.uint32()).value;continue;case 68:if(r!==546)break;d.canAssignLinkFlair=BoolValue.decode(t,t.uint32()).value;continue;case 69:if(r!==554)break;d.accountsActiveIsFuzzed=BoolValue.decode(t,t.uint32()).value;continue;case 70:if(r!==562)break;d.allowPredictionContributors=BoolValue.decode(t,t.uint32()).value;continue;case 71:if(r!==570)break;d.submitTextLabel=StringValue.decode(t,t.uint32()).value;continue;case 72:if(r!==578)break;d.linkFlairPosition=StringValue.decode(t,t.uint32()).value;continue;case 73:if(r!==586)break;d.userSrFlairEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 74:if(r!==594)break;d.userFlairEnabledInSr=BoolValue.decode(t,t.uint32()).value;continue;case 75:if(r!==602)break;d.allowChatPostCreation=BoolValue.decode(t,t.uint32()).value;continue;case 76:if(r!==610)break;d.allowDiscovery=BoolValue.decode(t,t.uint32()).value;continue;case 77:if(r!==618)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 78:if(r!==626)break;d.userSrThemeEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 79:if(r!==634)break;d.linkFlairEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 80:if(r!==642)break;d.disableContributorRequests=BoolValue.decode(t,t.uint32()).value;continue;case 81:if(r!==650)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 82:if(r!==658)break;d.suggestedCommentSort=StringValue.decode(t,t.uint32()).value;continue;case 83:if(r!==666)break;d.bannerImg=StringValue.decode(t,t.uint32()).value;continue;case 84:if(r!==674)break;d.userFlairText=StringValue.decode(t,t.uint32()).value;continue;case 85:if(r!==682)break;d.contentCategory=StringValue.decode(t,t.uint32()).value;continue;case 86:if(r!==690)break;d.bannerBackgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 87:if(r!==698)break;d.showMedia=BoolValue.decode(t,t.uint32()).value;continue;case 88:if(r!==706)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 89:if(r!==714)break;d.userIsModerator=BoolValue.decode(t,t.uint32()).value;continue;case 90:if(r!==722)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 91:if(r!==730)break;d.headerTitle=StringValue.decode(t,t.uint32()).value;continue;case 92:if(r!==738)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 93:if(r!==746)break;d.isChatPostFeatureEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 94:if(r!==754)break;d.submitLinkLabel=StringValue.decode(t,t.uint32()).value;continue;case 95:if(r!==762)break;d.userFlairTextColor=StringValue.decode(t,t.uint32()).value;continue;case 96:if(r!==770)break;d.restrictCommenting=BoolValue.decode(t,t.uint32()).value;continue;case 97:if(r!==778)break;d.userFlairCssClass=StringValue.decode(t,t.uint32()).value;continue;case 98:if(r!==786)break;d.allowImages=BoolValue.decode(t,t.uint32()).value;continue;case 99:if(r!==794)break;d.lang=StringValue.decode(t,t.uint32()).value;continue;case 100:if(r!==802)break;d.whitelistStatus=StringValue.decode(t,t.uint32()).value;continue;case 101:if(r!==810)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 102:if(r!==818)break;d.createdUtc=Int64Value.decode(t,t.uint32()).value;continue;case 103:if(r!==826)break;d.bannerSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 104:if(r!==834)break;d.mobileBannerImage=StringValue.decode(t,t.uint32()).value;continue;case 105:if(r!==842)break;d.userIsContributor=BoolValue.decode(t,t.uint32()).value;continue;case 106:if(r!==850)break;d.allowPredictionsTournament=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{userFlairBackgroundColor:isSet$h(e82.userFlairBackgroundColor)?String(e82.userFlairBackgroundColor):void 0,submitTextHtml:isSet$h(e82.submitTextHtml)?String(e82.submitTextHtml):void 0,restrictPosting:isSet$h(e82.restrictPosting)?!!e82.restrictPosting:void 0,userIsBanned:isSet$h(e82.userIsBanned)?!!e82.userIsBanned:void 0,freeFormReports:isSet$h(e82.freeFormReports)?!!e82.freeFormReports:void 0,wikiEnabled:isSet$h(e82.wikiEnabled)?!!e82.wikiEnabled:void 0,userIsMuted:isSet$h(e82.userIsMuted)?!!e82.userIsMuted:void 0,userCanFlairInSr:isSet$h(e82.userCanFlairInSr)?!!e82.userCanFlairInSr:void 0,displayName:isSet$h(e82.displayName)?String(e82.displayName):void 0,headerImg:isSet$h(e82.headerImg)?String(e82.headerImg):void 0,title:isSet$h(e82.title)?String(e82.title):void 0,allowGalleries:isSet$h(e82.allowGalleries)?!!e82.allowGalleries:void 0,iconSize:globalThis.Array.isArray(e82?.iconSize)?e82.iconSize.map(n=>Number(n)):[],primaryColor:isSet$h(e82.primaryColor)?String(e82.primaryColor):void 0,activeUserCount:isSet$h(e82.activeUserCount)?Number(e82.activeUserCount):void 0,iconImg:isSet$h(e82.iconImg)?String(e82.iconImg):void 0,displayNamePrefixed:isSet$h(e82.displayNamePrefixed)?String(e82.displayNamePrefixed):void 0,accountsActive:isSet$h(e82.accountsActive)?Number(e82.accountsActive):void 0,publicTraffic:isSet$h(e82.publicTraffic)?!!e82.publicTraffic:void 0,subscribers:isSet$h(e82.subscribers)?Number(e82.subscribers):void 0,userFlairRichtext:globalThis.Array.isArray(e82?.userFlairRichtext)?e82.userFlairRichtext.map(n=>String(n)):[],videostreamLinksCount:isSet$h(e82.videostreamLinksCount)?Number(e82.videostreamLinksCount):void 0,name:isSet$h(e82.name)?String(e82.name):void 0,quarantine:isSet$h(e82.quarantine)?!!e82.quarantine:void 0,hideAds:isSet$h(e82.hideAds)?!!e82.hideAds:void 0,emojisEnabled:isSet$h(e82.emojisEnabled)?!!e82.emojisEnabled:void 0,advertiserCategory:isSet$h(e82.advertiserCategory)?String(e82.advertiserCategory):void 0,publicDescription:isSet$h(e82.publicDescription)?String(e82.publicDescription):void 0,commentScoreHideMins:isSet$h(e82.commentScoreHideMins)?Number(e82.commentScoreHideMins):void 0,allowPredictions:isSet$h(e82.allowPredictions)?!!e82.allowPredictions:void 0,userHasFavorited:isSet$h(e82.userHasFavorited)?!!e82.userHasFavorited:void 0,userFlairTemplateId:isSet$h(e82.userFlairTemplateId)?String(e82.userFlairTemplateId):void 0,communityIcon:isSet$h(e82.communityIcon)?String(e82.communityIcon):void 0,bannerBackgroundImage:isSet$h(e82.bannerBackgroundImage)?String(e82.bannerBackgroundImage):void 0,originalContentTagEnabled:isSet$h(e82.originalContentTagEnabled)?!!e82.originalContentTagEnabled:void 0,communityReviewed:isSet$h(e82.communityReviewed)?!!e82.communityReviewed:void 0,submitText:isSet$h(e82.submitText)?String(e82.submitText):void 0,descriptionHtml:isSet$h(e82.descriptionHtml)?String(e82.descriptionHtml):void 0,spoilersEnabled:isSet$h(e82.spoilersEnabled)?!!e82.spoilersEnabled:void 0,commentContributionSettings:isSet$h(e82.commentContributionSettings)?CommentContributionSettings.fromJSON(e82.commentContributionSettings):void 0,allowTalks:isSet$h(e82.allowTalks)?!!e82.allowTalks:void 0,headerSize:globalThis.Array.isArray(e82?.headerSize)?e82.headerSize.map(n=>Number(n)):[],userFlairPosition:isSet$h(e82.userFlairPosition)?String(e82.userFlairPosition):void 0,allOriginalContent:isSet$h(e82.allOriginalContent)?!!e82.allOriginalContent:void 0,hasMenuWidget:isSet$h(e82.hasMenuWidget)?!!e82.hasMenuWidget:void 0,isEnrolledInNewModmail:isSet$h(e82.isEnrolledInNewModmail)?!!e82.isEnrolledInNewModmail:void 0,keyColor:isSet$h(e82.keyColor)?String(e82.keyColor):void 0,canAssignUserFlair:isSet$h(e82.canAssignUserFlair)?!!e82.canAssignUserFlair:void 0,created:isSet$h(e82.created)?Number(e82.created):void 0,wls:isSet$h(e82.wls)?Number(e82.wls):void 0,showMediaPreview:isSet$h(e82.showMediaPreview)?!!e82.showMediaPreview:void 0,submissionType:isSet$h(e82.submissionType)?String(e82.submissionType):void 0,userIsSubscriber:isSet$h(e82.userIsSubscriber)?!!e82.userIsSubscriber:void 0,allowedMediaInComments:globalThis.Array.isArray(e82?.allowedMediaInComments)?e82.allowedMediaInComments.map(n=>String(n)):[],allowVideogifs:isSet$h(e82.allowVideogifs)?!!e82.allowVideogifs:void 0,shouldArchivePosts:isSet$h(e82.shouldArchivePosts)?!!e82.shouldArchivePosts:void 0,userFlairType:isSet$h(e82.userFlairType)?String(e82.userFlairType):void 0,allowPolls:isSet$h(e82.allowPolls)?!!e82.allowPolls:void 0,collapseDeletedComments:isSet$h(e82.collapseDeletedComments)?!!e82.collapseDeletedComments:void 0,emojisCustomSize:globalThis.Array.isArray(e82?.emojisCustomSize)?e82.emojisCustomSize.map(n=>Number(n)):[],publicDescriptionHtml:isSet$h(e82.publicDescriptionHtml)?String(e82.publicDescriptionHtml):void 0,allowVideos:isSet$h(e82.allowVideos)?!!e82.allowVideos:void 0,isCrosspostableSubreddit:isSet$h(e82.isCrosspostableSubreddit)?!!e82.isCrosspostableSubreddit:void 0,notificationLevel:isSet$h(e82.notificationLevel)?String(e82.notificationLevel):void 0,shouldShowMediaInCommentsSetting:isSet$h(e82.shouldShowMediaInCommentsSetting)?!!e82.shouldShowMediaInCommentsSetting:void 0,canAssignLinkFlair:isSet$h(e82.canAssignLinkFlair)?!!e82.canAssignLinkFlair:void 0,accountsActiveIsFuzzed:isSet$h(e82.accountsActiveIsFuzzed)?!!e82.accountsActiveIsFuzzed:void 0,allowPredictionContributors:isSet$h(e82.allowPredictionContributors)?!!e82.allowPredictionContributors:void 0,submitTextLabel:isSet$h(e82.submitTextLabel)?String(e82.submitTextLabel):void 0,linkFlairPosition:isSet$h(e82.linkFlairPosition)?String(e82.linkFlairPosition):void 0,userSrFlairEnabled:isSet$h(e82.userSrFlairEnabled)?!!e82.userSrFlairEnabled:void 0,userFlairEnabledInSr:isSet$h(e82.userFlairEnabledInSr)?!!e82.userFlairEnabledInSr:void 0,allowChatPostCreation:isSet$h(e82.allowChatPostCreation)?!!e82.allowChatPostCreation:void 0,allowDiscovery:isSet$h(e82.allowDiscovery)?!!e82.allowDiscovery:void 0,acceptFollowers:isSet$h(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,userSrThemeEnabled:isSet$h(e82.userSrThemeEnabled)?!!e82.userSrThemeEnabled:void 0,linkFlairEnabled:isSet$h(e82.linkFlairEnabled)?!!e82.linkFlairEnabled:void 0,disableContributorRequests:isSet$h(e82.disableContributorRequests)?!!e82.disableContributorRequests:void 0,subredditType:isSet$h(e82.subredditType)?String(e82.subredditType):void 0,suggestedCommentSort:isSet$h(e82.suggestedCommentSort)?String(e82.suggestedCommentSort):void 0,bannerImg:isSet$h(e82.bannerImg)?String(e82.bannerImg):void 0,userFlairText:isSet$h(e82.userFlairText)?String(e82.userFlairText):void 0,contentCategory:isSet$h(e82.contentCategory)?String(e82.contentCategory):void 0,bannerBackgroundColor:isSet$h(e82.bannerBackgroundColor)?String(e82.bannerBackgroundColor):void 0,showMedia:isSet$h(e82.showMedia)?!!e82.showMedia:void 0,id:isSet$h(e82.id)?String(e82.id):void 0,userIsModerator:isSet$h(e82.userIsModerator)?!!e82.userIsModerator:void 0,over18:isSet$h(e82.over18)?!!e82.over18:void 0,headerTitle:isSet$h(e82.headerTitle)?String(e82.headerTitle):void 0,description:isSet$h(e82.description)?String(e82.description):void 0,isChatPostFeatureEnabled:isSet$h(e82.isChatPostFeatureEnabled)?!!e82.isChatPostFeatureEnabled:void 0,submitLinkLabel:isSet$h(e82.submitLinkLabel)?String(e82.submitLinkLabel):void 0,userFlairTextColor:isSet$h(e82.userFlairTextColor)?String(e82.userFlairTextColor):void 0,restrictCommenting:isSet$h(e82.restrictCommenting)?!!e82.restrictCommenting:void 0,userFlairCssClass:isSet$h(e82.userFlairCssClass)?String(e82.userFlairCssClass):void 0,allowImages:isSet$h(e82.allowImages)?!!e82.allowImages:void 0,lang:isSet$h(e82.lang)?String(e82.lang):void 0,whitelistStatus:isSet$h(e82.whitelistStatus)?String(e82.whitelistStatus):void 0,url:isSet$h(e82.url)?String(e82.url):void 0,createdUtc:isSet$h(e82.createdUtc)?Number(e82.createdUtc):void 0,bannerSize:globalThis.Array.isArray(e82?.bannerSize)?e82.bannerSize.map(n=>Number(n)):[],mobileBannerImage:isSet$h(e82.mobileBannerImage)?String(e82.mobileBannerImage):void 0,userIsContributor:isSet$h(e82.userIsContributor)?!!e82.userIsContributor:void 0,allowPredictionsTournament:isSet$h(e82.allowPredictionsTournament)?!!e82.allowPredictionsTournament:void 0}},toJSON(e82){var t,o,d,r,a,u;let n={};return e82.userFlairBackgroundColor!==void 0&&(n.userFlairBackgroundColor=e82.userFlairBackgroundColor),e82.submitTextHtml!==void 0&&(n.submitTextHtml=e82.submitTextHtml),e82.restrictPosting!==void 0&&(n.restrictPosting=e82.restrictPosting),e82.userIsBanned!==void 0&&(n.userIsBanned=e82.userIsBanned),e82.freeFormReports!==void 0&&(n.freeFormReports=e82.freeFormReports),e82.wikiEnabled!==void 0&&(n.wikiEnabled=e82.wikiEnabled),e82.userIsMuted!==void 0&&(n.userIsMuted=e82.userIsMuted),e82.userCanFlairInSr!==void 0&&(n.userCanFlairInSr=e82.userCanFlairInSr),e82.displayName!==void 0&&(n.displayName=e82.displayName),e82.headerImg!==void 0&&(n.headerImg=e82.headerImg),e82.title!==void 0&&(n.title=e82.title),e82.allowGalleries!==void 0&&(n.allowGalleries=e82.allowGalleries),(t=e82.iconSize)!=null&&t.length&&(n.iconSize=e82.iconSize),e82.primaryColor!==void 0&&(n.primaryColor=e82.primaryColor),e82.activeUserCount!==void 0&&(n.activeUserCount=e82.activeUserCount),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.displayNamePrefixed!==void 0&&(n.displayNamePrefixed=e82.displayNamePrefixed),e82.accountsActive!==void 0&&(n.accountsActive=e82.accountsActive),e82.publicTraffic!==void 0&&(n.publicTraffic=e82.publicTraffic),e82.subscribers!==void 0&&(n.subscribers=e82.subscribers),(o=e82.userFlairRichtext)!=null&&o.length&&(n.userFlairRichtext=e82.userFlairRichtext),e82.videostreamLinksCount!==void 0&&(n.videostreamLinksCount=e82.videostreamLinksCount),e82.name!==void 0&&(n.name=e82.name),e82.quarantine!==void 0&&(n.quarantine=e82.quarantine),e82.hideAds!==void 0&&(n.hideAds=e82.hideAds),e82.emojisEnabled!==void 0&&(n.emojisEnabled=e82.emojisEnabled),e82.advertiserCategory!==void 0&&(n.advertiserCategory=e82.advertiserCategory),e82.publicDescription!==void 0&&(n.publicDescription=e82.publicDescription),e82.commentScoreHideMins!==void 0&&(n.commentScoreHideMins=e82.commentScoreHideMins),e82.allowPredictions!==void 0&&(n.allowPredictions=e82.allowPredictions),e82.userHasFavorited!==void 0&&(n.userHasFavorited=e82.userHasFavorited),e82.userFlairTemplateId!==void 0&&(n.userFlairTemplateId=e82.userFlairTemplateId),e82.communityIcon!==void 0&&(n.communityIcon=e82.communityIcon),e82.bannerBackgroundImage!==void 0&&(n.bannerBackgroundImage=e82.bannerBackgroundImage),e82.originalContentTagEnabled!==void 0&&(n.originalContentTagEnabled=e82.originalContentTagEnabled),e82.communityReviewed!==void 0&&(n.communityReviewed=e82.communityReviewed),e82.submitText!==void 0&&(n.submitText=e82.submitText),e82.descriptionHtml!==void 0&&(n.descriptionHtml=e82.descriptionHtml),e82.spoilersEnabled!==void 0&&(n.spoilersEnabled=e82.spoilersEnabled),e82.commentContributionSettings!==void 0&&(n.commentContributionSettings=CommentContributionSettings.toJSON(e82.commentContributionSettings)),e82.allowTalks!==void 0&&(n.allowTalks=e82.allowTalks),(d=e82.headerSize)!=null&&d.length&&(n.headerSize=e82.headerSize),e82.userFlairPosition!==void 0&&(n.userFlairPosition=e82.userFlairPosition),e82.allOriginalContent!==void 0&&(n.allOriginalContent=e82.allOriginalContent),e82.hasMenuWidget!==void 0&&(n.hasMenuWidget=e82.hasMenuWidget),e82.isEnrolledInNewModmail!==void 0&&(n.isEnrolledInNewModmail=e82.isEnrolledInNewModmail),e82.keyColor!==void 0&&(n.keyColor=e82.keyColor),e82.canAssignUserFlair!==void 0&&(n.canAssignUserFlair=e82.canAssignUserFlair),e82.created!==void 0&&(n.created=e82.created),e82.wls!==void 0&&(n.wls=e82.wls),e82.showMediaPreview!==void 0&&(n.showMediaPreview=e82.showMediaPreview),e82.submissionType!==void 0&&(n.submissionType=e82.submissionType),e82.userIsSubscriber!==void 0&&(n.userIsSubscriber=e82.userIsSubscriber),(r=e82.allowedMediaInComments)!=null&&r.length&&(n.allowedMediaInComments=e82.allowedMediaInComments),e82.allowVideogifs!==void 0&&(n.allowVideogifs=e82.allowVideogifs),e82.shouldArchivePosts!==void 0&&(n.shouldArchivePosts=e82.shouldArchivePosts),e82.userFlairType!==void 0&&(n.userFlairType=e82.userFlairType),e82.allowPolls!==void 0&&(n.allowPolls=e82.allowPolls),e82.collapseDeletedComments!==void 0&&(n.collapseDeletedComments=e82.collapseDeletedComments),(a=e82.emojisCustomSize)!=null&&a.length&&(n.emojisCustomSize=e82.emojisCustomSize),e82.publicDescriptionHtml!==void 0&&(n.publicDescriptionHtml=e82.publicDescriptionHtml),e82.allowVideos!==void 0&&(n.allowVideos=e82.allowVideos),e82.isCrosspostableSubreddit!==void 0&&(n.isCrosspostableSubreddit=e82.isCrosspostableSubreddit),e82.notificationLevel!==void 0&&(n.notificationLevel=e82.notificationLevel),e82.shouldShowMediaInCommentsSetting!==void 0&&(n.shouldShowMediaInCommentsSetting=e82.shouldShowMediaInCommentsSetting),e82.canAssignLinkFlair!==void 0&&(n.canAssignLinkFlair=e82.canAssignLinkFlair),e82.accountsActiveIsFuzzed!==void 0&&(n.accountsActiveIsFuzzed=e82.accountsActiveIsFuzzed),e82.allowPredictionContributors!==void 0&&(n.allowPredictionContributors=e82.allowPredictionContributors),e82.submitTextLabel!==void 0&&(n.submitTextLabel=e82.submitTextLabel),e82.linkFlairPosition!==void 0&&(n.linkFlairPosition=e82.linkFlairPosition),e82.userSrFlairEnabled!==void 0&&(n.userSrFlairEnabled=e82.userSrFlairEnabled),e82.userFlairEnabledInSr!==void 0&&(n.userFlairEnabledInSr=e82.userFlairEnabledInSr),e82.allowChatPostCreation!==void 0&&(n.allowChatPostCreation=e82.allowChatPostCreation),e82.allowDiscovery!==void 0&&(n.allowDiscovery=e82.allowDiscovery),e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.userSrThemeEnabled!==void 0&&(n.userSrThemeEnabled=e82.userSrThemeEnabled),e82.linkFlairEnabled!==void 0&&(n.linkFlairEnabled=e82.linkFlairEnabled),e82.disableContributorRequests!==void 0&&(n.disableContributorRequests=e82.disableContributorRequests),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.suggestedCommentSort!==void 0&&(n.suggestedCommentSort=e82.suggestedCommentSort),e82.bannerImg!==void 0&&(n.bannerImg=e82.bannerImg),e82.userFlairText!==void 0&&(n.userFlairText=e82.userFlairText),e82.contentCategory!==void 0&&(n.contentCategory=e82.contentCategory),e82.bannerBackgroundColor!==void 0&&(n.bannerBackgroundColor=e82.bannerBackgroundColor),e82.showMedia!==void 0&&(n.showMedia=e82.showMedia),e82.id!==void 0&&(n.id=e82.id),e82.userIsModerator!==void 0&&(n.userIsModerator=e82.userIsModerator),e82.over18!==void 0&&(n.over18=e82.over18),e82.headerTitle!==void 0&&(n.headerTitle=e82.headerTitle),e82.description!==void 0&&(n.description=e82.description),e82.isChatPostFeatureEnabled!==void 0&&(n.isChatPostFeatureEnabled=e82.isChatPostFeatureEnabled),e82.submitLinkLabel!==void 0&&(n.submitLinkLabel=e82.submitLinkLabel),e82.userFlairTextColor!==void 0&&(n.userFlairTextColor=e82.userFlairTextColor),e82.restrictCommenting!==void 0&&(n.restrictCommenting=e82.restrictCommenting),e82.userFlairCssClass!==void 0&&(n.userFlairCssClass=e82.userFlairCssClass),e82.allowImages!==void 0&&(n.allowImages=e82.allowImages),e82.lang!==void 0&&(n.lang=e82.lang),e82.whitelistStatus!==void 0&&(n.whitelistStatus=e82.whitelistStatus),e82.url!==void 0&&(n.url=e82.url),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),(u=e82.bannerSize)!=null&&u.length&&(n.bannerSize=e82.bannerSize),e82.mobileBannerImage!==void 0&&(n.mobileBannerImage=e82.mobileBannerImage),e82.userIsContributor!==void 0&&(n.userIsContributor=e82.userIsContributor),e82.allowPredictionsTournament!==void 0&&(n.allowPredictionsTournament=e82.allowPredictionsTournament),n},create(e82){return FullSubredditObject.fromPartial(e82??{})},fromPartial(e82){var t,o,d,r,a,u;let n=createBaseFullSubredditObject();return n.userFlairBackgroundColor=e82.userFlairBackgroundColor??void 0,n.submitTextHtml=e82.submitTextHtml??void 0,n.restrictPosting=e82.restrictPosting??void 0,n.userIsBanned=e82.userIsBanned??void 0,n.freeFormReports=e82.freeFormReports??void 0,n.wikiEnabled=e82.wikiEnabled??void 0,n.userIsMuted=e82.userIsMuted??void 0,n.userCanFlairInSr=e82.userCanFlairInSr??void 0,n.displayName=e82.displayName??void 0,n.headerImg=e82.headerImg??void 0,n.title=e82.title??void 0,n.allowGalleries=e82.allowGalleries??void 0,n.iconSize=((t=e82.iconSize)==null?void 0:t.map(l=>l))||[],n.primaryColor=e82.primaryColor??void 0,n.activeUserCount=e82.activeUserCount??void 0,n.iconImg=e82.iconImg??void 0,n.displayNamePrefixed=e82.displayNamePrefixed??void 0,n.accountsActive=e82.accountsActive??void 0,n.publicTraffic=e82.publicTraffic??void 0,n.subscribers=e82.subscribers??void 0,n.userFlairRichtext=((o=e82.userFlairRichtext)==null?void 0:o.map(l=>l))||[],n.videostreamLinksCount=e82.videostreamLinksCount??void 0,n.name=e82.name??void 0,n.quarantine=e82.quarantine??void 0,n.hideAds=e82.hideAds??void 0,n.emojisEnabled=e82.emojisEnabled??void 0,n.advertiserCategory=e82.advertiserCategory??void 0,n.publicDescription=e82.publicDescription??void 0,n.commentScoreHideMins=e82.commentScoreHideMins??void 0,n.allowPredictions=e82.allowPredictions??void 0,n.userHasFavorited=e82.userHasFavorited??void 0,n.userFlairTemplateId=e82.userFlairTemplateId??void 0,n.communityIcon=e82.communityIcon??void 0,n.bannerBackgroundImage=e82.bannerBackgroundImage??void 0,n.originalContentTagEnabled=e82.originalContentTagEnabled??void 0,n.communityReviewed=e82.communityReviewed??void 0,n.submitText=e82.submitText??void 0,n.descriptionHtml=e82.descriptionHtml??void 0,n.spoilersEnabled=e82.spoilersEnabled??void 0,n.commentContributionSettings=e82.commentContributionSettings!==void 0&&e82.commentContributionSettings!==null?CommentContributionSettings.fromPartial(e82.commentContributionSettings):void 0,n.allowTalks=e82.allowTalks??void 0,n.headerSize=((d=e82.headerSize)==null?void 0:d.map(l=>l))||[],n.userFlairPosition=e82.userFlairPosition??void 0,n.allOriginalContent=e82.allOriginalContent??void 0,n.hasMenuWidget=e82.hasMenuWidget??void 0,n.isEnrolledInNewModmail=e82.isEnrolledInNewModmail??void 0,n.keyColor=e82.keyColor??void 0,n.canAssignUserFlair=e82.canAssignUserFlair??void 0,n.created=e82.created??void 0,n.wls=e82.wls??void 0,n.showMediaPreview=e82.showMediaPreview??void 0,n.submissionType=e82.submissionType??void 0,n.userIsSubscriber=e82.userIsSubscriber??void 0,n.allowedMediaInComments=((r=e82.allowedMediaInComments)==null?void 0:r.map(l=>l))||[],n.allowVideogifs=e82.allowVideogifs??void 0,n.shouldArchivePosts=e82.shouldArchivePosts??void 0,n.userFlairType=e82.userFlairType??void 0,n.allowPolls=e82.allowPolls??void 0,n.collapseDeletedComments=e82.collapseDeletedComments??void 0,n.emojisCustomSize=((a=e82.emojisCustomSize)==null?void 0:a.map(l=>l))||[],n.publicDescriptionHtml=e82.publicDescriptionHtml??void 0,n.allowVideos=e82.allowVideos??void 0,n.isCrosspostableSubreddit=e82.isCrosspostableSubreddit??void 0,n.notificationLevel=e82.notificationLevel??void 0,n.shouldShowMediaInCommentsSetting=e82.shouldShowMediaInCommentsSetting??void 0,n.canAssignLinkFlair=e82.canAssignLinkFlair??void 0,n.accountsActiveIsFuzzed=e82.accountsActiveIsFuzzed??void 0,n.allowPredictionContributors=e82.allowPredictionContributors??void 0,n.submitTextLabel=e82.submitTextLabel??void 0,n.linkFlairPosition=e82.linkFlairPosition??void 0,n.userSrFlairEnabled=e82.userSrFlairEnabled??void 0,n.userFlairEnabledInSr=e82.userFlairEnabledInSr??void 0,n.allowChatPostCreation=e82.allowChatPostCreation??void 0,n.allowDiscovery=e82.allowDiscovery??void 0,n.acceptFollowers=e82.acceptFollowers??void 0,n.userSrThemeEnabled=e82.userSrThemeEnabled??void 0,n.linkFlairEnabled=e82.linkFlairEnabled??void 0,n.disableContributorRequests=e82.disableContributorRequests??void 0,n.subredditType=e82.subredditType??void 0,n.suggestedCommentSort=e82.suggestedCommentSort??void 0,n.bannerImg=e82.bannerImg??void 0,n.userFlairText=e82.userFlairText??void 0,n.contentCategory=e82.contentCategory??void 0,n.bannerBackgroundColor=e82.bannerBackgroundColor??void 0,n.showMedia=e82.showMedia??void 0,n.id=e82.id??void 0,n.userIsModerator=e82.userIsModerator??void 0,n.over18=e82.over18??void 0,n.headerTitle=e82.headerTitle??void 0,n.description=e82.description??void 0,n.isChatPostFeatureEnabled=e82.isChatPostFeatureEnabled??void 0,n.submitLinkLabel=e82.submitLinkLabel??void 0,n.userFlairTextColor=e82.userFlairTextColor??void 0,n.restrictCommenting=e82.restrictCommenting??void 0,n.userFlairCssClass=e82.userFlairCssClass??void 0,n.allowImages=e82.allowImages??void 0,n.lang=e82.lang??void 0,n.whitelistStatus=e82.whitelistStatus??void 0,n.url=e82.url??void 0,n.createdUtc=e82.createdUtc??void 0,n.bannerSize=((u=e82.bannerSize)==null?void 0:u.map(l=>l))||[],n.mobileBannerImage=e82.mobileBannerImage??void 0,n.userIsContributor=e82.userIsContributor??void 0,n.allowPredictionsTournament=e82.allowPredictionsTournament??void 0,n}};messageTypeRegistry.set(FullSubredditObject.$type,FullSubredditObject);function createBaseSubredditsSearchResponse(){return{kind:void 0,data:void 0}}var SubredditsSearchResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditsSearchResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&SubredditsSearchResponse_WrappedSubredditObject.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditsSearchResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=SubredditsSearchResponse_WrappedSubredditObject.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,data:isSet$h(e82.data)?SubredditsSearchResponse_WrappedSubredditObject.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=SubredditsSearchResponse_WrappedSubredditObject.toJSON(e82.data)),n},create(e82){return SubredditsSearchResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditsSearchResponse();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?SubredditsSearchResponse_WrappedSubredditObject.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(SubredditsSearchResponse.$type,SubredditsSearchResponse);function createBaseSubredditsSearchResponse_WrappedSubredditObject(){return{after:void 0,before:void 0,dist:void 0,geoFilter:void 0,children:[]}}var SubredditsSearchResponse_WrappedSubredditObject={$type:"devvit.plugin.redditapi.subreddits.SubredditsSearchResponse.WrappedSubredditObject",encode(e82,n=_m0.Writer.create()){e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim(),e82.dist!==void 0&&Int32Value.encode({value:e82.dist},n.uint32(26).fork()).ldelim(),e82.geoFilter!==void 0&&StringValue.encode({value:e82.geoFilter},n.uint32(34).fork()).ldelim();for(let t of e82.children)SubredditsSearchResponse_WrappedSubredditObject_SubredditData.encode(t,n.uint32(42).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditsSearchResponse_WrappedSubredditObject();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.dist=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.geoFilter=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.children.push(SubredditsSearchResponse_WrappedSubredditObject_SubredditData.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$h(e82.after)?String(e82.after):void 0,before:isSet$h(e82.before)?String(e82.before):void 0,dist:isSet$h(e82.dist)?Number(e82.dist):void 0,geoFilter:isSet$h(e82.geoFilter)?String(e82.geoFilter):void 0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>SubredditsSearchResponse_WrappedSubredditObject_SubredditData.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.dist!==void 0&&(n.dist=e82.dist),e82.geoFilter!==void 0&&(n.geoFilter=e82.geoFilter),(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>SubredditsSearchResponse_WrappedSubredditObject_SubredditData.toJSON(o))),n},create(e82){return SubredditsSearchResponse_WrappedSubredditObject.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSubredditsSearchResponse_WrappedSubredditObject();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.dist=e82.dist??void 0,n.geoFilter=e82.geoFilter??void 0,n.children=((t=e82.children)==null?void 0:t.map(o=>SubredditsSearchResponse_WrappedSubredditObject_SubredditData.fromPartial(o)))||[],n}};messageTypeRegistry.set(SubredditsSearchResponse_WrappedSubredditObject.$type,SubredditsSearchResponse_WrappedSubredditObject);function createBaseSubredditsSearchResponse_WrappedSubredditObject_SubredditData(){return{kind:void 0,data:void 0}}var SubredditsSearchResponse_WrappedSubredditObject_SubredditData={$type:"devvit.plugin.redditapi.subreddits.SubredditsSearchResponse.WrappedSubredditObject.SubredditData",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&FullSubredditObject.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditsSearchResponse_WrappedSubredditObject_SubredditData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=FullSubredditObject.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,data:isSet$h(e82.data)?FullSubredditObject.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=FullSubredditObject.toJSON(e82.data)),n},create(e82){return SubredditsSearchResponse_WrappedSubredditObject_SubredditData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditsSearchResponse_WrappedSubredditObject_SubredditData();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?FullSubredditObject.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(SubredditsSearchResponse_WrappedSubredditObject_SubredditData.$type,SubredditsSearchResponse_WrappedSubredditObject_SubredditData);function createBaseUserSearchResponse(){return{kind:void 0,data:void 0}}var UserSearchResponse={$type:"devvit.plugin.redditapi.subreddits.UserSearchResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&UserSearchResponse_AccData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserSearchResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=UserSearchResponse_AccData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,data:isSet$h(e82.data)?UserSearchResponse_AccData.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=UserSearchResponse_AccData.toJSON(e82.data)),n},create(e82){return UserSearchResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserSearchResponse();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?UserSearchResponse_AccData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(UserSearchResponse.$type,UserSearchResponse);function createBaseUserSearchResponse_AccData(){return{after:void 0,dist:void 0,modhash:void 0,geoFilter:void 0,children:[],before:void 0}}var UserSearchResponse_AccData={$type:"devvit.plugin.redditapi.subreddits.UserSearchResponse.AccData",encode(e82,n=_m0.Writer.create()){e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.dist!==void 0&&Int64Value.encode({value:e82.dist},n.uint32(18).fork()).ldelim(),e82.modhash!==void 0&&StringValue.encode({value:e82.modhash},n.uint32(26).fork()).ldelim(),e82.geoFilter!==void 0&&StringValue.encode({value:e82.geoFilter},n.uint32(34).fork()).ldelim();for(let t of e82.children)UserSearchResponse_Account.encode(t,n.uint32(42).fork()).ldelim();return e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserSearchResponse_AccData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.dist=Int64Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.modhash=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.geoFilter=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.children.push(UserSearchResponse_Account.decode(t,t.uint32()));continue;case 6:if(r!==50)break;d.before=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$h(e82.after)?String(e82.after):void 0,dist:isSet$h(e82.dist)?Number(e82.dist):void 0,modhash:isSet$h(e82.modhash)?String(e82.modhash):void 0,geoFilter:isSet$h(e82.geoFilter)?String(e82.geoFilter):void 0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>UserSearchResponse_Account.fromJSON(n)):[],before:isSet$h(e82.before)?String(e82.before):void 0}},toJSON(e82){var t;let n={};return e82.after!==void 0&&(n.after=e82.after),e82.dist!==void 0&&(n.dist=e82.dist),e82.modhash!==void 0&&(n.modhash=e82.modhash),e82.geoFilter!==void 0&&(n.geoFilter=e82.geoFilter),(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>UserSearchResponse_Account.toJSON(o))),e82.before!==void 0&&(n.before=e82.before),n},create(e82){return UserSearchResponse_AccData.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUserSearchResponse_AccData();return n.after=e82.after??void 0,n.dist=e82.dist??void 0,n.modhash=e82.modhash??void 0,n.geoFilter=e82.geoFilter??void 0,n.children=((t=e82.children)==null?void 0:t.map(o=>UserSearchResponse_Account.fromPartial(o)))||[],n.before=e82.before??void 0,n}};messageTypeRegistry.set(UserSearchResponse_AccData.$type,UserSearchResponse_AccData);function createBaseUserSearchResponse_Account(){return{kind:void 0,data:void 0}}var UserSearchResponse_Account={$type:"devvit.plugin.redditapi.subreddits.UserSearchResponse.Account",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&UserSearchResponse_AccountData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserSearchResponse_Account();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=UserSearchResponse_AccountData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$h(e82.kind)?String(e82.kind):void 0,data:isSet$h(e82.data)?UserSearchResponse_AccountData.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=UserSearchResponse_AccountData.toJSON(e82.data)),n},create(e82){return UserSearchResponse_Account.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserSearchResponse_Account();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?UserSearchResponse_AccountData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(UserSearchResponse_Account.$type,UserSearchResponse_Account);function createBaseUserSearchResponse_AccountData(){return{isEmployee:void 0,isFriend:void 0,snoovatarSize:[],id:void 0,verified:void 0,isGold:void 0,isMod:void 0,hasVerifiedEmail:void 0,iconImg:void 0,hideFromRobots:void 0,linkKarma:void 0,acceptChats:void 0,isBlocked:void 0,prefShowSnoovatar:void 0,name:void 0,created:void 0,createdUtc:void 0,snoovatarImg:void 0,commentKarma:void 0,acceptFollowers:void 0,hasSubscribed:void 0,acceptPms:void 0,isSuspended:void 0,subreddit:void 0}}var UserSearchResponse_AccountData={$type:"devvit.plugin.redditapi.subreddits.UserSearchResponse.AccountData",encode(e82,n=_m0.Writer.create()){e82.isEmployee!==void 0&&BoolValue.encode({value:e82.isEmployee},n.uint32(10).fork()).ldelim(),e82.isFriend!==void 0&&BoolValue.encode({value:e82.isFriend},n.uint32(18).fork()).ldelim();for(let t of e82.snoovatarSize)Int32Value.encode({value:t},n.uint32(26).fork()).ldelim();return e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(34).fork()).ldelim(),e82.verified!==void 0&&BoolValue.encode({value:e82.verified},n.uint32(42).fork()).ldelim(),e82.isGold!==void 0&&BoolValue.encode({value:e82.isGold},n.uint32(50).fork()).ldelim(),e82.isMod!==void 0&&BoolValue.encode({value:e82.isMod},n.uint32(58).fork()).ldelim(),e82.hasVerifiedEmail!==void 0&&BoolValue.encode({value:e82.hasVerifiedEmail},n.uint32(66).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(74).fork()).ldelim(),e82.hideFromRobots!==void 0&&BoolValue.encode({value:e82.hideFromRobots},n.uint32(82).fork()).ldelim(),e82.linkKarma!==void 0&&Int32Value.encode({value:e82.linkKarma},n.uint32(90).fork()).ldelim(),e82.acceptChats!==void 0&&BoolValue.encode({value:e82.acceptChats},n.uint32(98).fork()).ldelim(),e82.isBlocked!==void 0&&BoolValue.encode({value:e82.isBlocked},n.uint32(106).fork()).ldelim(),e82.prefShowSnoovatar!==void 0&&BoolValue.encode({value:e82.prefShowSnoovatar},n.uint32(114).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(122).fork()).ldelim(),e82.created!==void 0&&Int64Value.encode({value:e82.created},n.uint32(130).fork()).ldelim(),e82.createdUtc!==void 0&&Int64Value.encode({value:e82.createdUtc},n.uint32(138).fork()).ldelim(),e82.snoovatarImg!==void 0&&StringValue.encode({value:e82.snoovatarImg},n.uint32(146).fork()).ldelim(),e82.commentKarma!==void 0&&Int64Value.encode({value:e82.commentKarma},n.uint32(154).fork()).ldelim(),e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(162).fork()).ldelim(),e82.hasSubscribed!==void 0&&BoolValue.encode({value:e82.hasSubscribed},n.uint32(170).fork()).ldelim(),e82.acceptPms!==void 0&&BoolValue.encode({value:e82.acceptPms},n.uint32(178).fork()).ldelim(),e82.isSuspended!==void 0&&BoolValue.encode({value:e82.isSuspended},n.uint32(186).fork()).ldelim(),e82.subreddit!==void 0&&UserSearchResponse_AccountData_Subreddit.encode(e82.subreddit,n.uint32(194).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserSearchResponse_AccountData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.isEmployee=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.isFriend=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.snoovatarSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 4:if(r!==34)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.verified=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.isGold=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.isMod=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.hasVerifiedEmail=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.hideFromRobots=BoolValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.linkKarma=Int32Value.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.acceptChats=BoolValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.isBlocked=BoolValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.prefShowSnoovatar=BoolValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.created=Int64Value.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.createdUtc=Int64Value.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.snoovatarImg=StringValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.commentKarma=Int64Value.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.hasSubscribed=BoolValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.acceptPms=BoolValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.isSuspended=BoolValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.subreddit=UserSearchResponse_AccountData_Subreddit.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{isEmployee:isSet$h(e82.isEmployee)?!!e82.isEmployee:void 0,isFriend:isSet$h(e82.isFriend)?!!e82.isFriend:void 0,snoovatarSize:globalThis.Array.isArray(e82?.snoovatarSize)?e82.snoovatarSize.map(n=>Number(n)):[],id:isSet$h(e82.id)?String(e82.id):void 0,verified:isSet$h(e82.verified)?!!e82.verified:void 0,isGold:isSet$h(e82.isGold)?!!e82.isGold:void 0,isMod:isSet$h(e82.isMod)?!!e82.isMod:void 0,hasVerifiedEmail:isSet$h(e82.hasVerifiedEmail)?!!e82.hasVerifiedEmail:void 0,iconImg:isSet$h(e82.iconImg)?String(e82.iconImg):void 0,hideFromRobots:isSet$h(e82.hideFromRobots)?!!e82.hideFromRobots:void 0,linkKarma:isSet$h(e82.linkKarma)?Number(e82.linkKarma):void 0,acceptChats:isSet$h(e82.acceptChats)?!!e82.acceptChats:void 0,isBlocked:isSet$h(e82.isBlocked)?!!e82.isBlocked:void 0,prefShowSnoovatar:isSet$h(e82.prefShowSnoovatar)?!!e82.prefShowSnoovatar:void 0,name:isSet$h(e82.name)?String(e82.name):void 0,created:isSet$h(e82.created)?Number(e82.created):void 0,createdUtc:isSet$h(e82.createdUtc)?Number(e82.createdUtc):void 0,snoovatarImg:isSet$h(e82.snoovatarImg)?String(e82.snoovatarImg):void 0,commentKarma:isSet$h(e82.commentKarma)?Number(e82.commentKarma):void 0,acceptFollowers:isSet$h(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,hasSubscribed:isSet$h(e82.hasSubscribed)?!!e82.hasSubscribed:void 0,acceptPms:isSet$h(e82.acceptPms)?!!e82.acceptPms:void 0,isSuspended:isSet$h(e82.isSuspended)?!!e82.isSuspended:void 0,subreddit:isSet$h(e82.subreddit)?UserSearchResponse_AccountData_Subreddit.fromJSON(e82.subreddit):void 0}},toJSON(e82){var t;let n={};return e82.isEmployee!==void 0&&(n.isEmployee=e82.isEmployee),e82.isFriend!==void 0&&(n.isFriend=e82.isFriend),(t=e82.snoovatarSize)!=null&&t.length&&(n.snoovatarSize=e82.snoovatarSize),e82.id!==void 0&&(n.id=e82.id),e82.verified!==void 0&&(n.verified=e82.verified),e82.isGold!==void 0&&(n.isGold=e82.isGold),e82.isMod!==void 0&&(n.isMod=e82.isMod),e82.hasVerifiedEmail!==void 0&&(n.hasVerifiedEmail=e82.hasVerifiedEmail),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.hideFromRobots!==void 0&&(n.hideFromRobots=e82.hideFromRobots),e82.linkKarma!==void 0&&(n.linkKarma=e82.linkKarma),e82.acceptChats!==void 0&&(n.acceptChats=e82.acceptChats),e82.isBlocked!==void 0&&(n.isBlocked=e82.isBlocked),e82.prefShowSnoovatar!==void 0&&(n.prefShowSnoovatar=e82.prefShowSnoovatar),e82.name!==void 0&&(n.name=e82.name),e82.created!==void 0&&(n.created=e82.created),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.snoovatarImg!==void 0&&(n.snoovatarImg=e82.snoovatarImg),e82.commentKarma!==void 0&&(n.commentKarma=e82.commentKarma),e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.hasSubscribed!==void 0&&(n.hasSubscribed=e82.hasSubscribed),e82.acceptPms!==void 0&&(n.acceptPms=e82.acceptPms),e82.isSuspended!==void 0&&(n.isSuspended=e82.isSuspended),e82.subreddit!==void 0&&(n.subreddit=UserSearchResponse_AccountData_Subreddit.toJSON(e82.subreddit)),n},create(e82){return UserSearchResponse_AccountData.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUserSearchResponse_AccountData();return n.isEmployee=e82.isEmployee??void 0,n.isFriend=e82.isFriend??void 0,n.snoovatarSize=((t=e82.snoovatarSize)==null?void 0:t.map(o=>o))||[],n.id=e82.id??void 0,n.verified=e82.verified??void 0,n.isGold=e82.isGold??void 0,n.isMod=e82.isMod??void 0,n.hasVerifiedEmail=e82.hasVerifiedEmail??void 0,n.iconImg=e82.iconImg??void 0,n.hideFromRobots=e82.hideFromRobots??void 0,n.linkKarma=e82.linkKarma??void 0,n.acceptChats=e82.acceptChats??void 0,n.isBlocked=e82.isBlocked??void 0,n.prefShowSnoovatar=e82.prefShowSnoovatar??void 0,n.name=e82.name??void 0,n.created=e82.created??void 0,n.createdUtc=e82.createdUtc??void 0,n.snoovatarImg=e82.snoovatarImg??void 0,n.commentKarma=e82.commentKarma??void 0,n.acceptFollowers=e82.acceptFollowers??void 0,n.hasSubscribed=e82.hasSubscribed??void 0,n.acceptPms=e82.acceptPms??void 0,n.isSuspended=e82.isSuspended??void 0,n.subreddit=e82.subreddit!==void 0&&e82.subreddit!==null?UserSearchResponse_AccountData_Subreddit.fromPartial(e82.subreddit):void 0,n}};messageTypeRegistry.set(UserSearchResponse_AccountData.$type,UserSearchResponse_AccountData);function createBaseUserSearchResponse_AccountData_Subreddit(){return{defaultSet:void 0,userIsContributor:void 0,bannerImg:void 0,allowedMediaInComments:[],userIsBanned:void 0,freeFormReports:void 0,communityIcon:void 0,showMedia:void 0,iconColor:void 0,userIsMuted:void 0,displayName:void 0,headerImg:void 0,title:void 0,previousNames:[],over18:void 0,iconSize:[],primaryColor:void 0,iconImg:void 0,description:void 0,submitLinkLabel:void 0,headerSize:[],restrictPosting:void 0,restrictCommenting:void 0,subscribers:void 0,submitTextLabel:void 0,isDefaultIcon:void 0,linkFlairPosition:void 0,displayNamePrefixed:void 0,keyColor:void 0,name:void 0,isDefaultBanner:void 0,url:void 0,quarantine:void 0,bannerSize:[],userIsModerator:void 0,acceptFollowers:void 0,publicDescription:void 0,linkFlairEnabled:void 0,disableContributorRequests:void 0,subredditType:void 0,userIsSubscriber:void 0}}var UserSearchResponse_AccountData_Subreddit={$type:"devvit.plugin.redditapi.subreddits.UserSearchResponse.AccountData.Subreddit",encode(e82,n=_m0.Writer.create()){e82.defaultSet!==void 0&&BoolValue.encode({value:e82.defaultSet},n.uint32(10).fork()).ldelim(),e82.userIsContributor!==void 0&&BoolValue.encode({value:e82.userIsContributor},n.uint32(18).fork()).ldelim(),e82.bannerImg!==void 0&&StringValue.encode({value:e82.bannerImg},n.uint32(26).fork()).ldelim();for(let t of e82.allowedMediaInComments)StringValue.encode({value:t},n.uint32(34).fork()).ldelim();e82.userIsBanned!==void 0&&BoolValue.encode({value:e82.userIsBanned},n.uint32(42).fork()).ldelim(),e82.freeFormReports!==void 0&&BoolValue.encode({value:e82.freeFormReports},n.uint32(50).fork()).ldelim(),e82.communityIcon!==void 0&&StringValue.encode({value:e82.communityIcon},n.uint32(58).fork()).ldelim(),e82.showMedia!==void 0&&BoolValue.encode({value:e82.showMedia},n.uint32(66).fork()).ldelim(),e82.iconColor!==void 0&&StringValue.encode({value:e82.iconColor},n.uint32(74).fork()).ldelim(),e82.userIsMuted!==void 0&&BoolValue.encode({value:e82.userIsMuted},n.uint32(82).fork()).ldelim(),e82.displayName!==void 0&&StringValue.encode({value:e82.displayName},n.uint32(90).fork()).ldelim(),e82.headerImg!==void 0&&StringValue.encode({value:e82.headerImg},n.uint32(98).fork()).ldelim(),e82.title!==void 0&&StringValue.encode({value:e82.title},n.uint32(106).fork()).ldelim();for(let t of e82.previousNames)StringValue.encode({value:t},n.uint32(114).fork()).ldelim();e82.over18!==void 0&&BoolValue.encode({value:e82.over18},n.uint32(122).fork()).ldelim();for(let t of e82.iconSize)Int32Value.encode({value:t},n.uint32(130).fork()).ldelim();e82.primaryColor!==void 0&&StringValue.encode({value:e82.primaryColor},n.uint32(138).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(146).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(154).fork()).ldelim(),e82.submitLinkLabel!==void 0&&StringValue.encode({value:e82.submitLinkLabel},n.uint32(162).fork()).ldelim();for(let t of e82.headerSize)Int32Value.encode({value:t},n.uint32(170).fork()).ldelim();e82.restrictPosting!==void 0&&BoolValue.encode({value:e82.restrictPosting},n.uint32(178).fork()).ldelim(),e82.restrictCommenting!==void 0&&BoolValue.encode({value:e82.restrictCommenting},n.uint32(186).fork()).ldelim(),e82.subscribers!==void 0&&Int64Value.encode({value:e82.subscribers},n.uint32(194).fork()).ldelim(),e82.submitTextLabel!==void 0&&StringValue.encode({value:e82.submitTextLabel},n.uint32(202).fork()).ldelim(),e82.isDefaultIcon!==void 0&&BoolValue.encode({value:e82.isDefaultIcon},n.uint32(210).fork()).ldelim(),e82.linkFlairPosition!==void 0&&StringValue.encode({value:e82.linkFlairPosition},n.uint32(218).fork()).ldelim(),e82.displayNamePrefixed!==void 0&&StringValue.encode({value:e82.displayNamePrefixed},n.uint32(226).fork()).ldelim(),e82.keyColor!==void 0&&StringValue.encode({value:e82.keyColor},n.uint32(234).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(242).fork()).ldelim(),e82.isDefaultBanner!==void 0&&BoolValue.encode({value:e82.isDefaultBanner},n.uint32(250).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(258).fork()).ldelim(),e82.quarantine!==void 0&&BoolValue.encode({value:e82.quarantine},n.uint32(266).fork()).ldelim();for(let t of e82.bannerSize)Int32Value.encode({value:t},n.uint32(274).fork()).ldelim();return e82.userIsModerator!==void 0&&BoolValue.encode({value:e82.userIsModerator},n.uint32(282).fork()).ldelim(),e82.acceptFollowers!==void 0&&BoolValue.encode({value:e82.acceptFollowers},n.uint32(290).fork()).ldelim(),e82.publicDescription!==void 0&&StringValue.encode({value:e82.publicDescription},n.uint32(298).fork()).ldelim(),e82.linkFlairEnabled!==void 0&&BoolValue.encode({value:e82.linkFlairEnabled},n.uint32(306).fork()).ldelim(),e82.disableContributorRequests!==void 0&&BoolValue.encode({value:e82.disableContributorRequests},n.uint32(314).fork()).ldelim(),e82.subredditType!==void 0&&StringValue.encode({value:e82.subredditType},n.uint32(322).fork()).ldelim(),e82.userIsSubscriber!==void 0&&BoolValue.encode({value:e82.userIsSubscriber},n.uint32(330).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserSearchResponse_AccountData_Subreddit();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.defaultSet=BoolValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.userIsContributor=BoolValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.bannerImg=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.allowedMediaInComments.push(StringValue.decode(t,t.uint32()).value);continue;case 5:if(r!==42)break;d.userIsBanned=BoolValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.freeFormReports=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.communityIcon=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.showMedia=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.iconColor=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.userIsMuted=BoolValue.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.displayName=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.headerImg=StringValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.title=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.previousNames.push(StringValue.decode(t,t.uint32()).value);continue;case 15:if(r!==122)break;d.over18=BoolValue.decode(t,t.uint32()).value;continue;case 16:if(r!==130)break;d.iconSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 17:if(r!==138)break;d.primaryColor=StringValue.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.submitLinkLabel=StringValue.decode(t,t.uint32()).value;continue;case 21:if(r!==170)break;d.headerSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 22:if(r!==178)break;d.restrictPosting=BoolValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.restrictCommenting=BoolValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.subscribers=Int64Value.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.submitTextLabel=StringValue.decode(t,t.uint32()).value;continue;case 26:if(r!==210)break;d.isDefaultIcon=BoolValue.decode(t,t.uint32()).value;continue;case 27:if(r!==218)break;d.linkFlairPosition=StringValue.decode(t,t.uint32()).value;continue;case 28:if(r!==226)break;d.displayNamePrefixed=StringValue.decode(t,t.uint32()).value;continue;case 29:if(r!==234)break;d.keyColor=StringValue.decode(t,t.uint32()).value;continue;case 30:if(r!==242)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 31:if(r!==250)break;d.isDefaultBanner=BoolValue.decode(t,t.uint32()).value;continue;case 32:if(r!==258)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 33:if(r!==266)break;d.quarantine=BoolValue.decode(t,t.uint32()).value;continue;case 34:if(r!==274)break;d.bannerSize.push(Int32Value.decode(t,t.uint32()).value);continue;case 35:if(r!==282)break;d.userIsModerator=BoolValue.decode(t,t.uint32()).value;continue;case 36:if(r!==290)break;d.acceptFollowers=BoolValue.decode(t,t.uint32()).value;continue;case 37:if(r!==298)break;d.publicDescription=StringValue.decode(t,t.uint32()).value;continue;case 38:if(r!==306)break;d.linkFlairEnabled=BoolValue.decode(t,t.uint32()).value;continue;case 39:if(r!==314)break;d.disableContributorRequests=BoolValue.decode(t,t.uint32()).value;continue;case 40:if(r!==322)break;d.subredditType=StringValue.decode(t,t.uint32()).value;continue;case 41:if(r!==330)break;d.userIsSubscriber=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{defaultSet:isSet$h(e82.defaultSet)?!!e82.defaultSet:void 0,userIsContributor:isSet$h(e82.userIsContributor)?!!e82.userIsContributor:void 0,bannerImg:isSet$h(e82.bannerImg)?String(e82.bannerImg):void 0,allowedMediaInComments:globalThis.Array.isArray(e82?.allowedMediaInComments)?e82.allowedMediaInComments.map(n=>String(n)):[],userIsBanned:isSet$h(e82.userIsBanned)?!!e82.userIsBanned:void 0,freeFormReports:isSet$h(e82.freeFormReports)?!!e82.freeFormReports:void 0,communityIcon:isSet$h(e82.communityIcon)?String(e82.communityIcon):void 0,showMedia:isSet$h(e82.showMedia)?!!e82.showMedia:void 0,iconColor:isSet$h(e82.iconColor)?String(e82.iconColor):void 0,userIsMuted:isSet$h(e82.userIsMuted)?!!e82.userIsMuted:void 0,displayName:isSet$h(e82.displayName)?String(e82.displayName):void 0,headerImg:isSet$h(e82.headerImg)?String(e82.headerImg):void 0,title:isSet$h(e82.title)?String(e82.title):void 0,previousNames:globalThis.Array.isArray(e82?.previousNames)?e82.previousNames.map(n=>String(n)):[],over18:isSet$h(e82.over18)?!!e82.over18:void 0,iconSize:globalThis.Array.isArray(e82?.iconSize)?e82.iconSize.map(n=>Number(n)):[],primaryColor:isSet$h(e82.primaryColor)?String(e82.primaryColor):void 0,iconImg:isSet$h(e82.iconImg)?String(e82.iconImg):void 0,description:isSet$h(e82.description)?String(e82.description):void 0,submitLinkLabel:isSet$h(e82.submitLinkLabel)?String(e82.submitLinkLabel):void 0,headerSize:globalThis.Array.isArray(e82?.headerSize)?e82.headerSize.map(n=>Number(n)):[],restrictPosting:isSet$h(e82.restrictPosting)?!!e82.restrictPosting:void 0,restrictCommenting:isSet$h(e82.restrictCommenting)?!!e82.restrictCommenting:void 0,subscribers:isSet$h(e82.subscribers)?Number(e82.subscribers):void 0,submitTextLabel:isSet$h(e82.submitTextLabel)?String(e82.submitTextLabel):void 0,isDefaultIcon:isSet$h(e82.isDefaultIcon)?!!e82.isDefaultIcon:void 0,linkFlairPosition:isSet$h(e82.linkFlairPosition)?String(e82.linkFlairPosition):void 0,displayNamePrefixed:isSet$h(e82.displayNamePrefixed)?String(e82.displayNamePrefixed):void 0,keyColor:isSet$h(e82.keyColor)?String(e82.keyColor):void 0,name:isSet$h(e82.name)?String(e82.name):void 0,isDefaultBanner:isSet$h(e82.isDefaultBanner)?!!e82.isDefaultBanner:void 0,url:isSet$h(e82.url)?String(e82.url):void 0,quarantine:isSet$h(e82.quarantine)?!!e82.quarantine:void 0,bannerSize:globalThis.Array.isArray(e82?.bannerSize)?e82.bannerSize.map(n=>Number(n)):[],userIsModerator:isSet$h(e82.userIsModerator)?!!e82.userIsModerator:void 0,acceptFollowers:isSet$h(e82.acceptFollowers)?!!e82.acceptFollowers:void 0,publicDescription:isSet$h(e82.publicDescription)?String(e82.publicDescription):void 0,linkFlairEnabled:isSet$h(e82.linkFlairEnabled)?!!e82.linkFlairEnabled:void 0,disableContributorRequests:isSet$h(e82.disableContributorRequests)?!!e82.disableContributorRequests:void 0,subredditType:isSet$h(e82.subredditType)?String(e82.subredditType):void 0,userIsSubscriber:isSet$h(e82.userIsSubscriber)?!!e82.userIsSubscriber:void 0}},toJSON(e82){var t,o,d,r,a;let n={};return e82.defaultSet!==void 0&&(n.defaultSet=e82.defaultSet),e82.userIsContributor!==void 0&&(n.userIsContributor=e82.userIsContributor),e82.bannerImg!==void 0&&(n.bannerImg=e82.bannerImg),(t=e82.allowedMediaInComments)!=null&&t.length&&(n.allowedMediaInComments=e82.allowedMediaInComments),e82.userIsBanned!==void 0&&(n.userIsBanned=e82.userIsBanned),e82.freeFormReports!==void 0&&(n.freeFormReports=e82.freeFormReports),e82.communityIcon!==void 0&&(n.communityIcon=e82.communityIcon),e82.showMedia!==void 0&&(n.showMedia=e82.showMedia),e82.iconColor!==void 0&&(n.iconColor=e82.iconColor),e82.userIsMuted!==void 0&&(n.userIsMuted=e82.userIsMuted),e82.displayName!==void 0&&(n.displayName=e82.displayName),e82.headerImg!==void 0&&(n.headerImg=e82.headerImg),e82.title!==void 0&&(n.title=e82.title),(o=e82.previousNames)!=null&&o.length&&(n.previousNames=e82.previousNames),e82.over18!==void 0&&(n.over18=e82.over18),(d=e82.iconSize)!=null&&d.length&&(n.iconSize=e82.iconSize),e82.primaryColor!==void 0&&(n.primaryColor=e82.primaryColor),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.description!==void 0&&(n.description=e82.description),e82.submitLinkLabel!==void 0&&(n.submitLinkLabel=e82.submitLinkLabel),(r=e82.headerSize)!=null&&r.length&&(n.headerSize=e82.headerSize),e82.restrictPosting!==void 0&&(n.restrictPosting=e82.restrictPosting),e82.restrictCommenting!==void 0&&(n.restrictCommenting=e82.restrictCommenting),e82.subscribers!==void 0&&(n.subscribers=e82.subscribers),e82.submitTextLabel!==void 0&&(n.submitTextLabel=e82.submitTextLabel),e82.isDefaultIcon!==void 0&&(n.isDefaultIcon=e82.isDefaultIcon),e82.linkFlairPosition!==void 0&&(n.linkFlairPosition=e82.linkFlairPosition),e82.displayNamePrefixed!==void 0&&(n.displayNamePrefixed=e82.displayNamePrefixed),e82.keyColor!==void 0&&(n.keyColor=e82.keyColor),e82.name!==void 0&&(n.name=e82.name),e82.isDefaultBanner!==void 0&&(n.isDefaultBanner=e82.isDefaultBanner),e82.url!==void 0&&(n.url=e82.url),e82.quarantine!==void 0&&(n.quarantine=e82.quarantine),(a=e82.bannerSize)!=null&&a.length&&(n.bannerSize=e82.bannerSize),e82.userIsModerator!==void 0&&(n.userIsModerator=e82.userIsModerator),e82.acceptFollowers!==void 0&&(n.acceptFollowers=e82.acceptFollowers),e82.publicDescription!==void 0&&(n.publicDescription=e82.publicDescription),e82.linkFlairEnabled!==void 0&&(n.linkFlairEnabled=e82.linkFlairEnabled),e82.disableContributorRequests!==void 0&&(n.disableContributorRequests=e82.disableContributorRequests),e82.subredditType!==void 0&&(n.subredditType=e82.subredditType),e82.userIsSubscriber!==void 0&&(n.userIsSubscriber=e82.userIsSubscriber),n},create(e82){return UserSearchResponse_AccountData_Subreddit.fromPartial(e82??{})},fromPartial(e82){var t,o,d,r,a;let n=createBaseUserSearchResponse_AccountData_Subreddit();return n.defaultSet=e82.defaultSet??void 0,n.userIsContributor=e82.userIsContributor??void 0,n.bannerImg=e82.bannerImg??void 0,n.allowedMediaInComments=((t=e82.allowedMediaInComments)==null?void 0:t.map(u=>u))||[],n.userIsBanned=e82.userIsBanned??void 0,n.freeFormReports=e82.freeFormReports??void 0,n.communityIcon=e82.communityIcon??void 0,n.showMedia=e82.showMedia??void 0,n.iconColor=e82.iconColor??void 0,n.userIsMuted=e82.userIsMuted??void 0,n.displayName=e82.displayName??void 0,n.headerImg=e82.headerImg??void 0,n.title=e82.title??void 0,n.previousNames=((o=e82.previousNames)==null?void 0:o.map(u=>u))||[],n.over18=e82.over18??void 0,n.iconSize=((d=e82.iconSize)==null?void 0:d.map(u=>u))||[],n.primaryColor=e82.primaryColor??void 0,n.iconImg=e82.iconImg??void 0,n.description=e82.description??void 0,n.submitLinkLabel=e82.submitLinkLabel??void 0,n.headerSize=((r=e82.headerSize)==null?void 0:r.map(u=>u))||[],n.restrictPosting=e82.restrictPosting??void 0,n.restrictCommenting=e82.restrictCommenting??void 0,n.subscribers=e82.subscribers??void 0,n.submitTextLabel=e82.submitTextLabel??void 0,n.isDefaultIcon=e82.isDefaultIcon??void 0,n.linkFlairPosition=e82.linkFlairPosition??void 0,n.displayNamePrefixed=e82.displayNamePrefixed??void 0,n.keyColor=e82.keyColor??void 0,n.name=e82.name??void 0,n.isDefaultBanner=e82.isDefaultBanner??void 0,n.url=e82.url??void 0,n.quarantine=e82.quarantine??void 0,n.bannerSize=((a=e82.bannerSize)==null?void 0:a.map(u=>u))||[],n.userIsModerator=e82.userIsModerator??void 0,n.acceptFollowers=e82.acceptFollowers??void 0,n.publicDescription=e82.publicDescription??void 0,n.linkFlairEnabled=e82.linkFlairEnabled??void 0,n.disableContributorRequests=e82.disableContributorRequests??void 0,n.subredditType=e82.subredditType??void 0,n.userIsSubscriber=e82.userIsSubscriber??void 0,n}};messageTypeRegistry.set(UserSearchResponse_AccountData_Subreddit.$type,UserSearchResponse_AccountData_Subreddit);function createBaseSubredditAddRemovalReasonRequest(){return{subreddit:"",message:"",title:""}}var SubredditAddRemovalReasonRequest={$type:"devvit.plugin.redditapi.subreddits.SubredditAddRemovalReasonRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.message!==""&&n.uint32(18).string(e82.message),e82.title!==""&&n.uint32(26).string(e82.title),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAddRemovalReasonRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.message=t.string();continue;case 3:if(r!==26)break;d.title=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$h(e82.subreddit)?globalThis.String(e82.subreddit):"",message:isSet$h(e82.message)?globalThis.String(e82.message):"",title:isSet$h(e82.title)?globalThis.String(e82.title):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.message!==""&&(n.message=e82.message),e82.title!==""&&(n.title=e82.title),n},create(e82){return SubredditAddRemovalReasonRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAddRemovalReasonRequest();return n.subreddit=e82.subreddit??"",n.message=e82.message??"",n.title=e82.title??"",n}};messageTypeRegistry.set(SubredditAddRemovalReasonRequest.$type,SubredditAddRemovalReasonRequest);function createBaseSubredditAddRemovalReasonResponse(){return{id:""}}var SubredditAddRemovalReasonResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditAddRemovalReasonResponse",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditAddRemovalReasonResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$h(e82.id)?globalThis.String(e82.id):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),n},create(e82){return SubredditAddRemovalReasonResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditAddRemovalReasonResponse();return n.id=e82.id??"",n}};messageTypeRegistry.set(SubredditAddRemovalReasonResponse.$type,SubredditAddRemovalReasonResponse);function createBaseSubredditGetRemovalReasonsRequest(){return{subreddit:""}}var SubredditGetRemovalReasonsRequest={$type:"devvit.plugin.redditapi.subreddits.SubredditGetRemovalReasonsRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditGetRemovalReasonsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$h(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return SubredditGetRemovalReasonsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditGetRemovalReasonsRequest();return n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(SubredditGetRemovalReasonsRequest.$type,SubredditGetRemovalReasonsRequest);function createBaseSubredditGetRemovalReasonsResponse(){return{data:{},order:[]}}var SubredditGetRemovalReasonsResponse={$type:"devvit.plugin.redditapi.subreddits.SubredditGetRemovalReasonsResponse",encode(e82,n=_m0.Writer.create()){Object.entries(e82.data).forEach(([t,o])=>{SubredditGetRemovalReasonsResponse_DataEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()});for(let t of e82.order)n.uint32(18).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditGetRemovalReasonsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=SubredditGetRemovalReasonsResponse_DataEntry.decode(t,t.uint32());a.value!==void 0&&(d.data[a.key]=a.value);continue;case 2:if(r!==18)break;d.order.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{data:isObject$d(e82.data)?Object.entries(e82.data).reduce((n,[t,o])=>(n[t]=SubredditGetRemovalReasonsResponse_SubredditRemovalReason.fromJSON(o),n),{}):{},order:globalThis.Array.isArray(e82?.order)?e82.order.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};if(e82.data){let o=Object.entries(e82.data);o.length>0&&(n.data={},o.forEach(([d,r])=>{n.data[d]=SubredditGetRemovalReasonsResponse_SubredditRemovalReason.toJSON(r)}))}return(t=e82.order)!=null&&t.length&&(n.order=e82.order),n},create(e82){return SubredditGetRemovalReasonsResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSubredditGetRemovalReasonsResponse();return n.data=Object.entries(e82.data??{}).reduce((o,[d,r])=>(r!==void 0&&(o[d]=SubredditGetRemovalReasonsResponse_SubredditRemovalReason.fromPartial(r)),o),{}),n.order=((t=e82.order)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(SubredditGetRemovalReasonsResponse.$type,SubredditGetRemovalReasonsResponse);function createBaseSubredditGetRemovalReasonsResponse_SubredditRemovalReason(){return{id:"",message:"",title:""}}var SubredditGetRemovalReasonsResponse_SubredditRemovalReason={$type:"devvit.plugin.redditapi.subreddits.SubredditGetRemovalReasonsResponse.SubredditRemovalReason",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.message!==""&&n.uint32(18).string(e82.message),e82.title!==""&&n.uint32(26).string(e82.title),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditGetRemovalReasonsResponse_SubredditRemovalReason();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.message=t.string();continue;case 3:if(r!==26)break;d.title=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$h(e82.id)?globalThis.String(e82.id):"",message:isSet$h(e82.message)?globalThis.String(e82.message):"",title:isSet$h(e82.title)?globalThis.String(e82.title):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.message!==""&&(n.message=e82.message),e82.title!==""&&(n.title=e82.title),n},create(e82){return SubredditGetRemovalReasonsResponse_SubredditRemovalReason.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditGetRemovalReasonsResponse_SubredditRemovalReason();return n.id=e82.id??"",n.message=e82.message??"",n.title=e82.title??"",n}};messageTypeRegistry.set(SubredditGetRemovalReasonsResponse_SubredditRemovalReason.$type,SubredditGetRemovalReasonsResponse_SubredditRemovalReason);function createBaseSubredditGetRemovalReasonsResponse_DataEntry(){return{key:"",value:void 0}}var SubredditGetRemovalReasonsResponse_DataEntry={$type:"devvit.plugin.redditapi.subreddits.SubredditGetRemovalReasonsResponse.DataEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&SubredditGetRemovalReasonsResponse_SubredditRemovalReason.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSubredditGetRemovalReasonsResponse_DataEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=SubredditGetRemovalReasonsResponse_SubredditRemovalReason.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$h(e82.key)?globalThis.String(e82.key):"",value:isSet$h(e82.value)?SubredditGetRemovalReasonsResponse_SubredditRemovalReason.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=SubredditGetRemovalReasonsResponse_SubredditRemovalReason.toJSON(e82.value)),n},create(e82){return SubredditGetRemovalReasonsResponse_DataEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSubredditGetRemovalReasonsResponse_DataEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?SubredditGetRemovalReasonsResponse_SubredditRemovalReason.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(SubredditGetRemovalReasonsResponse_DataEntry.$type,SubredditGetRemovalReasonsResponse_DataEntry);function longToNumber$2(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isObject$d(e82){return typeof e82=="object"&&e82!==null}function isSet$h(e82){return e82!=null}var SubredditsDefinition={name:"Subreddits",fullName:"devvit.plugin.redditapi.subreddits.Subreddits",methods:{aboutWhere:{name:"AboutWhere",requestType:AboutWhereRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([112,18,110,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,123,119,104,101,114,101,125,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,117,115,101,114,61,123,117,115,101,114,125]),new Uint8Array([2,64,1])]}}},deleteSrBanner:{name:"DeleteSrBanner",requestType:BasicSubredditRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([37,18,35,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,100,101,108,101,116,101,95,115,114,95,98,97,110,110,101,114])]}}},deleteSrHeader:{name:"DeleteSrHeader",requestType:BasicSubredditRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([37,18,35,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,100,101,108,101,116,101,95,115,114,95,104,101,97,100,101,114])]}}},deleteSrIcon:{name:"DeleteSrIcon",requestType:BasicSubredditRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([35,18,33,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,100,101,108,101,116,101,95,115,114,95,105,99,111,110])]}}},deleteSrImg:{name:"DeleteSrImg",requestType:DeleteSrImgRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([34,18,32,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,100,101,108,101,116,101,95,115,114,95,105,109,103]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},searchRedditNames:{name:"SearchRedditNames",requestType:BasicSearchRequest,requestStream:!1,responseType:SearchRedditNamesResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([26,18,24,47,97,112,105,47,115,101,97,114,99,104,95,114,101,100,100,105,116,95,110,97,109,101,115]),new Uint8Array([2,24,4])]}}},searchSubreddits:{name:"SearchSubreddits",requestType:BasicSearchRequest,requestStream:!1,responseType:SearchSubredditsResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([24,18,22,47,97,112,105,47,115,101,97,114,99,104,95,115,117,98,114,101,100,100,105,116,115]),new Uint8Array([2,24,4])]}}},siteAdmin:{name:"SiteAdmin",requestType:SiteAdminRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([17,18,15,47,97,112,105,47,115,105,116,101,95,97,100,109,105,110]),new Uint8Array([2,24,2]),new Uint8Array([2,32,1])]}}},submitText:{name:"SubmitText",requestType:BasicSubredditRequest,requestStream:!1,responseType:SubmitTextResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,115,117,98,109,105,116,95,116,101,120,116])]}}},subredditAutocomplete:{name:"SubredditAutocomplete",requestType:SubredditAutocompleteRequest,requestStream:!1,responseType:SubredditAutocompleteResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([201,1,18,198,1,47,97,112,105,47,115,117,98,114,101,100,100,105,116,95,97,117,116,111,99,111,109,112,108,101,116,101,95,118,50,63,105,110,99,108,117,100,101,95,111,118,101,114,95,49,56,61,123,105,110,99,108,117,100,101,95,111,118,101,114,95,49,56,125,38,105,110,99,108,117,100,101,95,112,114,111,102,105,108,101,115,61,123,105,110,99,108,117,100,101,95,112,114,111,102,105,108,101,115,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,113,117,101,114,121,61,123,113,117,101,114,121,125,38,115,101,97,114,99,104,95,113,117,101,114,121,95,105,100,61,123,115,101,97,114,99,104,95,113,117,101,114,121,95,105,100,125,38,116,121,112,101,97,104,101,97,100,95,97,99,116,105,118,101,61,123,116,121,112,101,97,104,101,97,100,95,97,99,116,105,118,101,125])]}}},subredditStylesheet:{name:"SubredditStylesheet",requestType:SubredditStylesheetRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([41,18,39,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,115,117,98,114,101,100,100,105,116,95,115,116,121,108,101,115,104,101,101,116]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},subscribe:{name:"Subscribe",requestType:SubscribeRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([16,18,14,47,97,112,105,47,115,117,98,115,99,114,105,98,101]),new Uint8Array([2,24,4])]}}},uploadSrImg:{name:"UploadSrImg",requestType:UploadSrImgRequest,requestStream:!1,responseType:UploadSrImgResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([34,18,32,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,117,112,108,111,97,100,95,115,114,95,105,109,103]),new Uint8Array([2,24,4])]}}},subredditPostRequirements:{name:"SubredditPostRequirements",requestType:BasicSubredditRequest,requestStream:!1,responseType:SubredditPostRequirementsResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([39,18,37,47,97,112,105,47,118,49,47,123,115,117,98,114,101,100,100,105,116,125,47,112,111,115,116,95,114,101,113,117,105,114,101,109,101,110,116,115])]}}},subredditAbout:{name:"SubredditAbout",requestType:BasicSubredditRequest,requestStream:!1,responseType:SubredditAboutResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([55,18,53,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,63,113,117,97,114,97,110,116,105,110,101,95,111,112,116,105,110,61,49,38,103,97,116,101,100,95,111,112,116,105,110,61,49])]}}},subredditAboutEdit:{name:"SubredditAboutEdit",requestType:SubredditAboutEditRequest,requestStream:!1,responseType:SubredditAboutEditResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([65,18,63,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,101,100,105,116,63,99,114,101,97,116,101,100,61,123,99,114,101,97,116,101,100,125,38,108,111,99,97,116,105,111,110,61,123,108,111,99,97,116,105,111,110,125])]}}},subredditAboutRules:{name:"SubredditAboutRules",requestType:BasicSubredditRequest,requestStream:!1,responseType:SubredditAboutRulesResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([28,18,26,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,114,117,108,101,115])]}}},subredditAboutTraffic:{name:"SubredditAboutTraffic",requestType:BasicSubredditRequest,requestStream:!1,responseType:SubredditAboutTrafficResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([30,18,28,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,98,111,117,116,47,116,114,97,102,102,105,99])]}}},sidebar:{name:"Sidebar",requestType:BasicSubredditRequest,requestStream:!1,responseType:StringValue,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([24,18,22,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,115,105,100,101,98,97,114]),new Uint8Array([2,64,1])]}}},sticky:{name:"Sticky",requestType:StickyRequest,requestStream:!1,responseType:StickyResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([33,18,31,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,115,116,105,99,107,121,63,110,117,109,61,123,110,117,109,125])]}}},subredditsMineWhere:{name:"SubredditsMineWhere",requestType:BasicWhereRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([96,18,94,47,115,117,98,114,101,100,100,105,116,115,47,109,105,110,101,47,123,119,104,101,114,101,125,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125])]}}},subredditsSearch:{name:"SubredditsSearch",requestType:SubredditsSearchRequest,requestStream:!1,responseType:SubredditsSearchResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([203,1,18,200,1,47,115,117,98,114,101,100,100,105,116,115,47,115,101,97,114,99,104,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,113,61,123,113,125,38,115,101,97,114,99,104,95,113,117,101,114,121,95,105,100,61,123,115,101,97,114,99,104,95,113,117,101,114,121,95,105,100,125,38,115,104,111,119,61,123,115,104,111,119,125,38,115,104,111,119,95,117,115,101,114,115,61,123,115,104,111,119,95,117,115,101,114,115,125,38,115,111,114,116,61,123,115,111,114,116,125,38,116,121,112,101,97,104,101,97,100,95,97,99,116,105,118,101,61,123,116,121,112,101,97,104,101,97,100,95,97,99,116,105,118,101,125])]}}},subredditsWhere:{name:"SubredditsWhere",requestType:BasicWhereRequest,requestStream:!1,responseType:SubredditsSearchResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([91,18,89,47,115,117,98,114,101,100,100,105,116,115,47,123,119,104,101,114,101,125,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125])]}}},usersSearch:{name:"UsersSearch",requestType:UsersSearchRequest,requestStream:!1,responseType:UserSearchResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([174,1,18,171,1,47,117,115,101,114,115,47,115,101,97,114,99,104,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,113,61,123,113,125,38,115,101,97,114,99,104,95,113,117,101,114,121,95,105,100,61,123,115,101,97,114,99,104,95,113,117,101,114,121,95,105,100,125,38,115,104,111,119,61,123,115,104,111,119,125,38,115,111,114,116,61,123,115,111,114,116,125,38,116,121,112,101,97,104,101,97,100,95,97,99,116,105,118,101,61,123,116,121,112,101,97,104,101,97,100,95,97,99,116,105,118,101,125])]}}},usersWhere:{name:"UsersWhere",requestType:BasicWhereRequest,requestStream:!1,responseType:SubredditsSearchResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([86,18,84,47,117,115,101,114,115,47,123,119,104,101,114,101,125,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125])]}}},subredditAddRemovalReason:{name:"SubredditAddRemovalReason",requestType:SubredditAddRemovalReasonRequest,requestStream:!1,responseType:SubredditAddRemovalReasonResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([37,18,35,47,97,112,105,47,118,49,47,123,115,117,98,114,101,100,100,105,116,125,47,114,101,109,111,118,97,108,95,114,101,97,115,111,110,115]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},subredditGetRemovalReasons:{name:"SubredditGetRemovalReasons",requestType:SubredditGetRemovalReasonsRequest,requestStream:!1,responseType:SubredditGetRemovalReasonsResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([37,18,35,47,97,112,105,47,118,49,47,123,115,117,98,114,101,100,100,105,116,125,47,114,101,109,111,118,97,108,95,114,101,97,115,111,110,115])]}}}}};function createBaseGenericUsersRequest(){return{id:void 0,username:""}}var GenericUsersRequest={$type:"devvit.plugin.redditapi.users.GenericUsersRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(10).fork()).ldelim(),e82.username!==""&&n.uint32(18).string(e82.username),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGenericUsersRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.username=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$g(e82.id)?String(e82.id):void 0,username:isSet$g(e82.username)?globalThis.String(e82.username):""}},toJSON(e82){let n={};return e82.id!==void 0&&(n.id=e82.id),e82.username!==""&&(n.username=e82.username),n},create(e82){return GenericUsersRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGenericUsersRequest();return n.id=e82.id??void 0,n.username=e82.username??"",n}};messageTypeRegistry.set(GenericUsersRequest.$type,GenericUsersRequest);function createBaseBlockUserRequest(){return{accountId:void 0,name:void 0}}var BlockUserRequest={$type:"devvit.plugin.redditapi.users.BlockUserRequest",encode(e82,n=_m0.Writer.create()){return e82.accountId!==void 0&&StringValue.encode({value:e82.accountId},n.uint32(10).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockUserRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.accountId=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.name=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{accountId:isSet$g(e82.accountId)?String(e82.accountId):void 0,name:isSet$g(e82.name)?String(e82.name):void 0}},toJSON(e82){let n={};return e82.accountId!==void 0&&(n.accountId=e82.accountId),e82.name!==void 0&&(n.name=e82.name),n},create(e82){return BlockUserRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockUserRequest();return n.accountId=e82.accountId??void 0,n.name=e82.name??void 0,n}};messageTypeRegistry.set(BlockUserRequest.$type,BlockUserRequest);function createBaseFriendRequest(){return{banContext:void 0,banMessage:void 0,banReason:void 0,duration:void 0,name:"",note:void 0,permissions:void 0,type:"",subreddit:void 0}}var FriendRequest={$type:"devvit.plugin.redditapi.users.FriendRequest",encode(e82,n=_m0.Writer.create()){return e82.banContext!==void 0&&StringValue.encode({value:e82.banContext},n.uint32(10).fork()).ldelim(),e82.banMessage!==void 0&&StringValue.encode({value:e82.banMessage},n.uint32(18).fork()).ldelim(),e82.banReason!==void 0&&StringValue.encode({value:e82.banReason},n.uint32(26).fork()).ldelim(),e82.duration!==void 0&&Int32Value.encode({value:e82.duration},n.uint32(34).fork()).ldelim(),e82.name!==""&&n.uint32(42).string(e82.name),e82.note!==void 0&&StringValue.encode({value:e82.note},n.uint32(50).fork()).ldelim(),e82.permissions!==void 0&&StringValue.encode({value:e82.permissions},n.uint32(58).fork()).ldelim(),e82.type!==""&&n.uint32(66).string(e82.type),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(74).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseFriendRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.banContext=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.banMessage=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.banReason=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.duration=Int32Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.name=t.string();continue;case 6:if(r!==50)break;d.note=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.permissions=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.type=t.string();continue;case 9:if(r!==74)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{banContext:isSet$g(e82.banContext)?String(e82.banContext):void 0,banMessage:isSet$g(e82.banMessage)?String(e82.banMessage):void 0,banReason:isSet$g(e82.banReason)?String(e82.banReason):void 0,duration:isSet$g(e82.duration)?Number(e82.duration):void 0,name:isSet$g(e82.name)?globalThis.String(e82.name):"",note:isSet$g(e82.note)?String(e82.note):void 0,permissions:isSet$g(e82.permissions)?String(e82.permissions):void 0,type:isSet$g(e82.type)?globalThis.String(e82.type):"",subreddit:isSet$g(e82.subreddit)?String(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.banContext!==void 0&&(n.banContext=e82.banContext),e82.banMessage!==void 0&&(n.banMessage=e82.banMessage),e82.banReason!==void 0&&(n.banReason=e82.banReason),e82.duration!==void 0&&(n.duration=e82.duration),e82.name!==""&&(n.name=e82.name),e82.note!==void 0&&(n.note=e82.note),e82.permissions!==void 0&&(n.permissions=e82.permissions),e82.type!==""&&(n.type=e82.type),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),n},create(e82){return FriendRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseFriendRequest();return n.banContext=e82.banContext??void 0,n.banMessage=e82.banMessage??void 0,n.banReason=e82.banReason??void 0,n.duration=e82.duration??void 0,n.name=e82.name??"",n.note=e82.note??void 0,n.permissions=e82.permissions??void 0,n.type=e82.type??"",n.subreddit=e82.subreddit??void 0,n}};messageTypeRegistry.set(FriendRequest.$type,FriendRequest);function createBaseReportUserRequest(){return{details:"",reason:"",user:""}}var ReportUserRequest={$type:"devvit.plugin.redditapi.users.ReportUserRequest",encode(e82,n=_m0.Writer.create()){return e82.details!==""&&n.uint32(10).string(e82.details),e82.reason!==""&&n.uint32(18).string(e82.reason),e82.user!==""&&n.uint32(26).string(e82.user),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseReportUserRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.details=t.string();continue;case 2:if(r!==18)break;d.reason=t.string();continue;case 3:if(r!==26)break;d.user=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{details:isSet$g(e82.details)?globalThis.String(e82.details):"",reason:isSet$g(e82.reason)?globalThis.String(e82.reason):"",user:isSet$g(e82.user)?globalThis.String(e82.user):""}},toJSON(e82){let n={};return e82.details!==""&&(n.details=e82.details),e82.reason!==""&&(n.reason=e82.reason),e82.user!==""&&(n.user=e82.user),n},create(e82){return ReportUserRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseReportUserRequest();return n.details=e82.details??"",n.reason=e82.reason??"",n.user=e82.user??"",n}};messageTypeRegistry.set(ReportUserRequest.$type,ReportUserRequest);function createBaseSetPermissionsRequest(){return{name:"",subreddit:"",permissions:"",type:""}}var SetPermissionsRequest={$type:"devvit.plugin.redditapi.users.SetPermissionsRequest",encode(e82,n=_m0.Writer.create()){return e82.name!==""&&n.uint32(10).string(e82.name),e82.subreddit!==""&&n.uint32(18).string(e82.subreddit),e82.permissions!==""&&n.uint32(26).string(e82.permissions),e82.type!==""&&n.uint32(34).string(e82.type),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSetPermissionsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.name=t.string();continue;case 2:if(r!==18)break;d.subreddit=t.string();continue;case 3:if(r!==26)break;d.permissions=t.string();continue;case 4:if(r!==34)break;d.type=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{name:isSet$g(e82.name)?globalThis.String(e82.name):"",subreddit:isSet$g(e82.subreddit)?globalThis.String(e82.subreddit):"",permissions:isSet$g(e82.permissions)?globalThis.String(e82.permissions):"",type:isSet$g(e82.type)?globalThis.String(e82.type):""}},toJSON(e82){let n={};return e82.name!==""&&(n.name=e82.name),e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.permissions!==""&&(n.permissions=e82.permissions),e82.type!==""&&(n.type=e82.type),n},create(e82){return SetPermissionsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSetPermissionsRequest();return n.name=e82.name??"",n.subreddit=e82.subreddit??"",n.permissions=e82.permissions??"",n.type=e82.type??"",n}};messageTypeRegistry.set(SetPermissionsRequest.$type,SetPermissionsRequest);function createBaseUnfriendRequest(){return{id:void 0,name:void 0,type:"",subreddit:void 0}}var UnfriendRequest={$type:"devvit.plugin.redditapi.users.UnfriendRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(10).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(18).fork()).ldelim(),e82.type!==""&&n.uint32(26).string(e82.type),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUnfriendRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.type=t.string();continue;case 4:if(r!==34)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$g(e82.id)?String(e82.id):void 0,name:isSet$g(e82.name)?String(e82.name):void 0,type:isSet$g(e82.type)?globalThis.String(e82.type):"",subreddit:isSet$g(e82.subreddit)?String(e82.subreddit):void 0}},toJSON(e82){let n={};return e82.id!==void 0&&(n.id=e82.id),e82.name!==void 0&&(n.name=e82.name),e82.type!==""&&(n.type=e82.type),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),n},create(e82){return UnfriendRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUnfriendRequest();return n.id=e82.id??void 0,n.name=e82.name??void 0,n.type=e82.type??"",n.subreddit=e82.subreddit??void 0,n}};messageTypeRegistry.set(UnfriendRequest.$type,UnfriendRequest);function createBaseUserDataByAccountIdsRequest(){return{ids:""}}var UserDataByAccountIdsRequest={$type:"devvit.plugin.redditapi.users.UserDataByAccountIdsRequest",encode(e82,n=_m0.Writer.create()){return e82.ids!==""&&n.uint32(10).string(e82.ids),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserDataByAccountIdsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.ids=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{ids:isSet$g(e82.ids)?globalThis.String(e82.ids):""}},toJSON(e82){let n={};return e82.ids!==""&&(n.ids=e82.ids),n},create(e82){return UserDataByAccountIdsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserDataByAccountIdsRequest();return n.ids=e82.ids??"",n}};messageTypeRegistry.set(UserDataByAccountIdsRequest.$type,UserDataByAccountIdsRequest);function createBaseUsernameAvailableRequest(){return{user:""}}var UsernameAvailableRequest={$type:"devvit.plugin.redditapi.users.UsernameAvailableRequest",encode(e82,n=_m0.Writer.create()){return e82.user!==""&&n.uint32(10).string(e82.user),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUsernameAvailableRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.user=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{user:isSet$g(e82.user)?globalThis.String(e82.user):""}},toJSON(e82){let n={};return e82.user!==""&&(n.user=e82.user),n},create(e82){return UsernameAvailableRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUsernameAvailableRequest();return n.user=e82.user??"",n}};messageTypeRegistry.set(UsernameAvailableRequest.$type,UsernameAvailableRequest);function createBaseUpdateFriendRelationshipRequest(){return{name:"",note:""}}var UpdateFriendRelationshipRequest={$type:"devvit.plugin.redditapi.users.UpdateFriendRelationshipRequest",encode(e82,n=_m0.Writer.create()){return e82.name!==""&&n.uint32(10).string(e82.name),e82.note!==""&&n.uint32(18).string(e82.note),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateFriendRelationshipRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.name=t.string();continue;case 2:if(r!==18)break;d.note=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{name:isSet$g(e82.name)?globalThis.String(e82.name):"",note:isSet$g(e82.note)?globalThis.String(e82.note):""}},toJSON(e82){let n={};return e82.name!==""&&(n.name=e82.name),e82.note!==""&&(n.note=e82.note),n},create(e82){return UpdateFriendRelationshipRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUpdateFriendRelationshipRequest();return n.name=e82.name??"",n.note=e82.note??"",n}};messageTypeRegistry.set(UpdateFriendRelationshipRequest.$type,UpdateFriendRelationshipRequest);function createBaseUserAboutRequest(){return{username:""}}var UserAboutRequest={$type:"devvit.plugin.redditapi.users.UserAboutRequest",encode(e82,n=_m0.Writer.create()){return e82.username!==""&&n.uint32(10).string(e82.username),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserAboutRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.username=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{username:isSet$g(e82.username)?globalThis.String(e82.username):""}},toJSON(e82){let n={};return e82.username!==""&&(n.username=e82.username),n},create(e82){return UserAboutRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserAboutRequest();return n.username=e82.username??"",n}};messageTypeRegistry.set(UserAboutRequest.$type,UserAboutRequest);function createBaseUserWhereRequest(){return{context:void 0,show:void 0,sort:void 0,t:void 0,type:void 0,after:void 0,before:void 0,count:void 0,limit:void 0,username:void 0,where:""}}var UserWhereRequest={$type:"devvit.plugin.redditapi.users.UserWhereRequest",encode(e82,n=_m0.Writer.create()){return e82.context!==void 0&&Int32Value.encode({value:e82.context},n.uint32(10).fork()).ldelim(),e82.show!==void 0&&StringValue.encode({value:e82.show},n.uint32(18).fork()).ldelim(),e82.sort!==void 0&&StringValue.encode({value:e82.sort},n.uint32(26).fork()).ldelim(),e82.t!==void 0&&StringValue.encode({value:e82.t},n.uint32(34).fork()).ldelim(),e82.type!==void 0&&StringValue.encode({value:e82.type},n.uint32(42).fork()).ldelim(),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(50).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(58).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(66).fork()).ldelim(),e82.limit!==void 0&&Int32Value.encode({value:e82.limit},n.uint32(74).fork()).ldelim(),e82.username!==void 0&&StringValue.encode({value:e82.username},n.uint32(90).fork()).ldelim(),e82.where!==""&&n.uint32(98).string(e82.where),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserWhereRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.context=Int32Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.show=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.sort=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.t=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.type=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.limit=Int32Value.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.username=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.where=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{context:isSet$g(e82.context)?Number(e82.context):void 0,show:isSet$g(e82.show)?String(e82.show):void 0,sort:isSet$g(e82.sort)?String(e82.sort):void 0,t:isSet$g(e82.t)?String(e82.t):void 0,type:isSet$g(e82.type)?String(e82.type):void 0,after:isSet$g(e82.after)?String(e82.after):void 0,before:isSet$g(e82.before)?String(e82.before):void 0,count:isSet$g(e82.count)?Number(e82.count):void 0,limit:isSet$g(e82.limit)?Number(e82.limit):void 0,username:isSet$g(e82.username)?String(e82.username):void 0,where:isSet$g(e82.where)?globalThis.String(e82.where):""}},toJSON(e82){let n={};return e82.context!==void 0&&(n.context=e82.context),e82.show!==void 0&&(n.show=e82.show),e82.sort!==void 0&&(n.sort=e82.sort),e82.t!==void 0&&(n.t=e82.t),e82.type!==void 0&&(n.type=e82.type),e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.count!==void 0&&(n.count=e82.count),e82.limit!==void 0&&(n.limit=e82.limit),e82.username!==void 0&&(n.username=e82.username),e82.where!==""&&(n.where=e82.where),n},create(e82){return UserWhereRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserWhereRequest();return n.context=e82.context??void 0,n.show=e82.show??void 0,n.sort=e82.sort??void 0,n.t=e82.t??void 0,n.type=e82.type??void 0,n.after=e82.after??void 0,n.before=e82.before??void 0,n.count=e82.count??void 0,n.limit=e82.limit??void 0,n.username=e82.username??void 0,n.where=e82.where??"",n}};messageTypeRegistry.set(UserWhereRequest.$type,UserWhereRequest);function createBaseGeneralFriendResponse(){return{date:void 0,relId:void 0,name:void 0,id:void 0,fields:[],explanation:void 0,message:void 0,reason:void 0}}var GeneralFriendResponse={$type:"devvit.plugin.redditapi.users.GeneralFriendResponse",encode(e82,n=_m0.Writer.create()){e82.date!==void 0&&Int64Value.encode({value:e82.date},n.uint32(10).fork()).ldelim(),e82.relId!==void 0&&StringValue.encode({value:e82.relId},n.uint32(18).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(26).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(34).fork()).ldelim();for(let t of e82.fields)StringValue.encode({value:t},n.uint32(42).fork()).ldelim();return e82.explanation!==void 0&&StringValue.encode({value:e82.explanation},n.uint32(50).fork()).ldelim(),e82.message!==void 0&&StringValue.encode({value:e82.message},n.uint32(58).fork()).ldelim(),e82.reason!==void 0&&StringValue.encode({value:e82.reason},n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGeneralFriendResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.date=Int64Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.relId=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.fields.push(StringValue.decode(t,t.uint32()).value);continue;case 6:if(r!==50)break;d.explanation=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.message=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.reason=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{date:isSet$g(e82.date)?Number(e82.date):void 0,relId:isSet$g(e82.relId)?String(e82.relId):void 0,name:isSet$g(e82.name)?String(e82.name):void 0,id:isSet$g(e82.id)?String(e82.id):void 0,fields:globalThis.Array.isArray(e82?.fields)?e82.fields.map(n=>String(n)):[],explanation:isSet$g(e82.explanation)?String(e82.explanation):void 0,message:isSet$g(e82.message)?String(e82.message):void 0,reason:isSet$g(e82.reason)?String(e82.reason):void 0}},toJSON(e82){var t;let n={};return e82.date!==void 0&&(n.date=e82.date),e82.relId!==void 0&&(n.relId=e82.relId),e82.name!==void 0&&(n.name=e82.name),e82.id!==void 0&&(n.id=e82.id),(t=e82.fields)!=null&&t.length&&(n.fields=e82.fields),e82.explanation!==void 0&&(n.explanation=e82.explanation),e82.message!==void 0&&(n.message=e82.message),e82.reason!==void 0&&(n.reason=e82.reason),n},create(e82){return GeneralFriendResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGeneralFriendResponse();return n.date=e82.date??void 0,n.relId=e82.relId??void 0,n.name=e82.name??void 0,n.id=e82.id??void 0,n.fields=((t=e82.fields)==null?void 0:t.map(o=>o))||[],n.explanation=e82.explanation??void 0,n.message=e82.message??void 0,n.reason=e82.reason??void 0,n}};messageTypeRegistry.set(GeneralFriendResponse.$type,GeneralFriendResponse);function createBaseBlockUserResponse(){return{date:void 0,iconImg:void 0,id:void 0,name:void 0}}var BlockUserResponse={$type:"devvit.plugin.redditapi.users.BlockUserResponse",encode(e82,n=_m0.Writer.create()){return e82.date!==void 0&&Int64Value.encode({value:e82.date},n.uint32(10).fork()).ldelim(),e82.iconImg!==void 0&&StringValue.encode({value:e82.iconImg},n.uint32(18).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(26).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockUserResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.date=Int64Value.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.iconImg=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.name=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{date:isSet$g(e82.date)?Number(e82.date):void 0,iconImg:isSet$g(e82.iconImg)?String(e82.iconImg):void 0,id:isSet$g(e82.id)?String(e82.id):void 0,name:isSet$g(e82.name)?String(e82.name):void 0}},toJSON(e82){let n={};return e82.date!==void 0&&(n.date=e82.date),e82.iconImg!==void 0&&(n.iconImg=e82.iconImg),e82.id!==void 0&&(n.id=e82.id),e82.name!==void 0&&(n.name=e82.name),n},create(e82){return BlockUserResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockUserResponse();return n.date=e82.date??void 0,n.iconImg=e82.iconImg??void 0,n.id=e82.id??void 0,n.name=e82.name??void 0,n}};messageTypeRegistry.set(BlockUserResponse.$type,BlockUserResponse);function createBaseUserDataByAccountIdsResponse(){return{users:{}}}var UserDataByAccountIdsResponse={$type:"devvit.plugin.redditapi.users.UserDataByAccountIdsResponse",encode(e82,n=_m0.Writer.create()){return Object.entries(e82.users).forEach(([t,o])=>{UserDataByAccountIdsResponse_UsersEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserDataByAccountIdsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=UserDataByAccountIdsResponse_UsersEntry.decode(t,t.uint32());a.value!==void 0&&(d.users[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{users:isObject$c(e82.users)?Object.entries(e82.users).reduce((n,[t,o])=>(n[t]=UserDataByAccountIdsResponse_UserAccountData.fromJSON(o),n),{}):{}}},toJSON(e82){let n={};if(e82.users){let t=Object.entries(e82.users);t.length>0&&(n.users={},t.forEach(([o,d])=>{n.users[o]=UserDataByAccountIdsResponse_UserAccountData.toJSON(d)}))}return n},create(e82){return UserDataByAccountIdsResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserDataByAccountIdsResponse();return n.users=Object.entries(e82.users??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=UserDataByAccountIdsResponse_UserAccountData.fromPartial(d)),t),{}),n}};messageTypeRegistry.set(UserDataByAccountIdsResponse.$type,UserDataByAccountIdsResponse);function createBaseUserDataByAccountIdsResponse_UserAccountData(){return{name:void 0,createdUtc:void 0,linkKarma:void 0,commentKarma:void 0,profileImg:void 0,profileColor:void 0,profileOver18:void 0}}var UserDataByAccountIdsResponse_UserAccountData={$type:"devvit.plugin.redditapi.users.UserDataByAccountIdsResponse.UserAccountData",encode(e82,n=_m0.Writer.create()){return e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(10).fork()).ldelim(),e82.createdUtc!==void 0&&Int64Value.encode({value:e82.createdUtc},n.uint32(18).fork()).ldelim(),e82.linkKarma!==void 0&&Int64Value.encode({value:e82.linkKarma},n.uint32(26).fork()).ldelim(),e82.commentKarma!==void 0&&Int64Value.encode({value:e82.commentKarma},n.uint32(34).fork()).ldelim(),e82.profileImg!==void 0&&StringValue.encode({value:e82.profileImg},n.uint32(42).fork()).ldelim(),e82.profileColor!==void 0&&StringValue.encode({value:e82.profileColor},n.uint32(50).fork()).ldelim(),e82.profileOver18!==void 0&&BoolValue.encode({value:e82.profileOver18},n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserDataByAccountIdsResponse_UserAccountData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.createdUtc=Int64Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.linkKarma=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.commentKarma=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.profileImg=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.profileColor=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.profileOver18=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{name:isSet$g(e82.name)?String(e82.name):void 0,createdUtc:isSet$g(e82.createdUtc)?Number(e82.createdUtc):void 0,linkKarma:isSet$g(e82.linkKarma)?Number(e82.linkKarma):void 0,commentKarma:isSet$g(e82.commentKarma)?Number(e82.commentKarma):void 0,profileImg:isSet$g(e82.profileImg)?String(e82.profileImg):void 0,profileColor:isSet$g(e82.profileColor)?String(e82.profileColor):void 0,profileOver18:isSet$g(e82.profileOver18)?!!e82.profileOver18:void 0}},toJSON(e82){let n={};return e82.name!==void 0&&(n.name=e82.name),e82.createdUtc!==void 0&&(n.createdUtc=e82.createdUtc),e82.linkKarma!==void 0&&(n.linkKarma=e82.linkKarma),e82.commentKarma!==void 0&&(n.commentKarma=e82.commentKarma),e82.profileImg!==void 0&&(n.profileImg=e82.profileImg),e82.profileColor!==void 0&&(n.profileColor=e82.profileColor),e82.profileOver18!==void 0&&(n.profileOver18=e82.profileOver18),n},create(e82){return UserDataByAccountIdsResponse_UserAccountData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserDataByAccountIdsResponse_UserAccountData();return n.name=e82.name??void 0,n.createdUtc=e82.createdUtc??void 0,n.linkKarma=e82.linkKarma??void 0,n.commentKarma=e82.commentKarma??void 0,n.profileImg=e82.profileImg??void 0,n.profileColor=e82.profileColor??void 0,n.profileOver18=e82.profileOver18??void 0,n}};messageTypeRegistry.set(UserDataByAccountIdsResponse_UserAccountData.$type,UserDataByAccountIdsResponse_UserAccountData);function createBaseUserDataByAccountIdsResponse_UsersEntry(){return{key:"",value:void 0}}var UserDataByAccountIdsResponse_UsersEntry={$type:"devvit.plugin.redditapi.users.UserDataByAccountIdsResponse.UsersEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&UserDataByAccountIdsResponse_UserAccountData.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserDataByAccountIdsResponse_UsersEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=UserDataByAccountIdsResponse_UserAccountData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$g(e82.key)?globalThis.String(e82.key):"",value:isSet$g(e82.value)?UserDataByAccountIdsResponse_UserAccountData.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=UserDataByAccountIdsResponse_UserAccountData.toJSON(e82.value)),n},create(e82){return UserDataByAccountIdsResponse_UsersEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserDataByAccountIdsResponse_UsersEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?UserDataByAccountIdsResponse_UserAccountData.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(UserDataByAccountIdsResponse_UsersEntry.$type,UserDataByAccountIdsResponse_UsersEntry);function createBaseUserTrophiesResponse(){return{kind:void 0,data:void 0}}var UserTrophiesResponse={$type:"devvit.plugin.redditapi.users.UserTrophiesResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&UserTrophiesResponse_UserTrophiesData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserTrophiesResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=UserTrophiesResponse_UserTrophiesData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$g(e82.kind)?String(e82.kind):void 0,data:isSet$g(e82.data)?UserTrophiesResponse_UserTrophiesData.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=UserTrophiesResponse_UserTrophiesData.toJSON(e82.data)),n},create(e82){return UserTrophiesResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserTrophiesResponse();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?UserTrophiesResponse_UserTrophiesData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(UserTrophiesResponse.$type,UserTrophiesResponse);function createBaseUserTrophiesResponse_TrophiesData(){return{icon70:void 0,grantedAt:void 0,url:void 0,icon40:void 0,name:void 0,awardId:void 0,id:void 0,description:void 0}}var UserTrophiesResponse_TrophiesData={$type:"devvit.plugin.redditapi.users.UserTrophiesResponse.TrophiesData",encode(e82,n=_m0.Writer.create()){return e82.icon70!==void 0&&StringValue.encode({value:e82.icon70},n.uint32(10).fork()).ldelim(),e82.grantedAt!==void 0&&Int64Value.encode({value:e82.grantedAt},n.uint32(18).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(26).fork()).ldelim(),e82.icon40!==void 0&&StringValue.encode({value:e82.icon40},n.uint32(34).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(42).fork()).ldelim(),e82.awardId!==void 0&&StringValue.encode({value:e82.awardId},n.uint32(50).fork()).ldelim(),e82.id!==void 0&&StringValue.encode({value:e82.id},n.uint32(58).fork()).ldelim(),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserTrophiesResponse_TrophiesData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.icon70=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.grantedAt=Int64Value.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.icon40=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.awardId=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.id=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.description=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{icon70:isSet$g(e82.icon70)?String(e82.icon70):void 0,grantedAt:isSet$g(e82.grantedAt)?Number(e82.grantedAt):void 0,url:isSet$g(e82.url)?String(e82.url):void 0,icon40:isSet$g(e82.icon40)?String(e82.icon40):void 0,name:isSet$g(e82.name)?String(e82.name):void 0,awardId:isSet$g(e82.awardId)?String(e82.awardId):void 0,id:isSet$g(e82.id)?String(e82.id):void 0,description:isSet$g(e82.description)?String(e82.description):void 0}},toJSON(e82){let n={};return e82.icon70!==void 0&&(n.icon70=e82.icon70),e82.grantedAt!==void 0&&(n.grantedAt=e82.grantedAt),e82.url!==void 0&&(n.url=e82.url),e82.icon40!==void 0&&(n.icon40=e82.icon40),e82.name!==void 0&&(n.name=e82.name),e82.awardId!==void 0&&(n.awardId=e82.awardId),e82.id!==void 0&&(n.id=e82.id),e82.description!==void 0&&(n.description=e82.description),n},create(e82){return UserTrophiesResponse_TrophiesData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserTrophiesResponse_TrophiesData();return n.icon70=e82.icon70??void 0,n.grantedAt=e82.grantedAt??void 0,n.url=e82.url??void 0,n.icon40=e82.icon40??void 0,n.name=e82.name??void 0,n.awardId=e82.awardId??void 0,n.id=e82.id??void 0,n.description=e82.description??void 0,n}};messageTypeRegistry.set(UserTrophiesResponse_TrophiesData.$type,UserTrophiesResponse_TrophiesData);function createBaseUserTrophiesResponse_TrophiesType(){return{kind:void 0,data:void 0}}var UserTrophiesResponse_TrophiesType={$type:"devvit.plugin.redditapi.users.UserTrophiesResponse.TrophiesType",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&UserTrophiesResponse_TrophiesData.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserTrophiesResponse_TrophiesType();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=UserTrophiesResponse_TrophiesData.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$g(e82.kind)?String(e82.kind):void 0,data:isSet$g(e82.data)?UserTrophiesResponse_TrophiesData.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=UserTrophiesResponse_TrophiesData.toJSON(e82.data)),n},create(e82){return UserTrophiesResponse_TrophiesType.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserTrophiesResponse_TrophiesType();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?UserTrophiesResponse_TrophiesData.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(UserTrophiesResponse_TrophiesType.$type,UserTrophiesResponse_TrophiesType);function createBaseUserTrophiesResponse_UserTrophiesData(){return{trophies:[]}}var UserTrophiesResponse_UserTrophiesData={$type:"devvit.plugin.redditapi.users.UserTrophiesResponse.UserTrophiesData",encode(e82,n=_m0.Writer.create()){for(let t of e82.trophies)UserTrophiesResponse_TrophiesType.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserTrophiesResponse_UserTrophiesData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.trophies.push(UserTrophiesResponse_TrophiesType.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{trophies:globalThis.Array.isArray(e82?.trophies)?e82.trophies.map(n=>UserTrophiesResponse_TrophiesType.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.trophies)!=null&&t.length&&(n.trophies=e82.trophies.map(o=>UserTrophiesResponse_TrophiesType.toJSON(o))),n},create(e82){return UserTrophiesResponse_UserTrophiesData.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUserTrophiesResponse_UserTrophiesData();return n.trophies=((t=e82.trophies)==null?void 0:t.map(o=>UserTrophiesResponse_TrophiesType.fromPartial(o)))||[],n}};messageTypeRegistry.set(UserTrophiesResponse_UserTrophiesData.$type,UserTrophiesResponse_UserTrophiesData);function createBaseUserAboutResponse(){return{kind:void 0,data:void 0}}var UserAboutResponse={$type:"devvit.plugin.redditapi.users.UserAboutResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==void 0&&StringValue.encode({value:e82.kind},n.uint32(10).fork()).ldelim(),e82.data!==void 0&&User.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserAboutResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.data=User.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$g(e82.kind)?String(e82.kind):void 0,data:isSet$g(e82.data)?User.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==void 0&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=User.toJSON(e82.data)),n},create(e82){return UserAboutResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserAboutResponse();return n.kind=e82.kind??void 0,n.data=e82.data!==void 0&&e82.data!==null?User.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(UserAboutResponse.$type,UserAboutResponse);function isObject$c(e82){return typeof e82=="object"&&e82!==null}function isSet$g(e82){return e82!=null}var UsersDefinition={name:"Users",fullName:"devvit.plugin.redditapi.users.Users",methods:{blockUser:{name:"BlockUser",requestType:BlockUserRequest,requestStream:!1,responseType:BlockUserResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([17,18,15,47,97,112,105,47,98,108,111,99,107,95,117,115,101,114]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},friend:{name:"Friend",requestType:FriendRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,102,114,105,101,110,100]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},reportUser:{name:"ReportUser",requestType:ReportUserRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([18,18,16,47,97,112,105,47,114,101,112,111,114,116,95,117,115,101,114]),new Uint8Array([2,24,4])]}}},setPermissions:{name:"SetPermissions",requestType:SetPermissionsRequest,requestStream:!1,responseType:JsonStatus,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([35,18,33,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,115,101,116,112,101,114,109,105,115,115,105,111,110,115]),new Uint8Array([2,24,4]),new Uint8Array([2,32,1])]}}},unfriend:{name:"Unfriend",requestType:UnfriendRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([29,18,27,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,117,110,102,114,105,101,110,100]),new Uint8Array([2,24,4])]}}},userDataByAccountIds:{name:"UserDataByAccountIds",requestType:UserDataByAccountIdsRequest,requestStream:!1,responseType:UserDataByAccountIdsResponse,responseStream:!1,options:{}},usernameAvailable:{name:"UsernameAvailable",requestType:UsernameAvailableRequest,requestStream:!1,responseType:BoolValue,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([37,18,35,47,97,112,105,47,117,115,101,114,110,97,109,101,95,97,118,97,105,108,97,98,108,101,63,117,115,101,114,61,123,117,115,101,114,125]),new Uint8Array([2,64,1])]}}},unfriendUser:{name:"UnfriendUser",requestType:GenericUsersRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([8,10,6,68,69,76,69,84,69]),new Uint8Array([39,18,37,47,97,112,105,47,118,49,47,109,101,47,102,114,105,101,110,100,115,47,123,117,115,101,114,110,97,109,101,125,63,105,100,61,123,105,100,125])]}}},getFriendInformation:{name:"GetFriendInformation",requestType:GenericUsersRequest,requestStream:!1,responseType:GeneralFriendResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([39,18,37,47,97,112,105,47,118,49,47,109,101,47,102,114,105,101,110,100,115,47,123,117,115,101,114,110,97,109,101,125,63,105,100,61,123,105,100,125])]}}},updateFriendRelationship:{name:"UpdateFriendRelationship",requestType:UpdateFriendRelationshipRequest,requestStream:!1,responseType:GeneralFriendResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,80,85,84]),new Uint8Array([27,18,25,47,97,112,105,47,118,49,47,109,101,47,102,114,105,101,110,100,115,47,123,110,97,109,101,125]),new Uint8Array([2,24,1])]}}},userTrophies:{name:"UserTrophies",requestType:GenericUsersRequest,requestStream:!1,responseType:UserTrophiesResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([42,18,40,47,97,112,105,47,118,49,47,117,115,101,114,47,123,117,115,101,114,110,97,109,101,125,47,116,114,111,112,104,105,101,115,63,105,100,61,123,105,100,125])]}}},userAbout:{name:"UserAbout",requestType:UserAboutRequest,requestStream:!1,responseType:UserAboutResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([24,18,22,47,117,115,101,114,47,123,117,115,101,114,110,97,109,101,125,47,97,98,111,117,116])]}}},userWhere:{name:"UserWhere",requestType:UserWhereRequest,requestStream:!1,responseType:Listing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([145,1,18,142,1,47,117,115,101,114,47,123,117,115,101,114,110,97,109,101,125,47,123,119,104,101,114,101,125,63,99,111,110,116,101,120,116,61,123,99,111,110,116,101,120,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,115,111,114,116,61,123,115,111,114,116,125,38,116,61,123,116,125,38,116,121,112,101,61,123,116,121,112,101,125,38,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125])]}}}}};function createBaseWidgetStyles(){return{backgroundColor:void 0,headerColor:void 0}}var WidgetStyles={$type:"devvit.plugin.redditapi.widgets.WidgetStyles",encode(e82,n=_m0.Writer.create()){return e82.backgroundColor!==void 0&&StringValue.encode({value:e82.backgroundColor},n.uint32(10).fork()).ldelim(),e82.headerColor!==void 0&&StringValue.encode({value:e82.headerColor},n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWidgetStyles();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.backgroundColor=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.headerColor=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{backgroundColor:isSet$f(e82.backgroundColor)?String(e82.backgroundColor):void 0,headerColor:isSet$f(e82.headerColor)?String(e82.headerColor):void 0}},toJSON(e82){let n={};return e82.backgroundColor!==void 0&&(n.backgroundColor=e82.backgroundColor),e82.headerColor!==void 0&&(n.headerColor=e82.headerColor),n},create(e82){return WidgetStyles.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWidgetStyles();return n.backgroundColor=e82.backgroundColor??void 0,n.headerColor=e82.headerColor??void 0,n}};messageTypeRegistry.set(WidgetStyles.$type,WidgetStyles);function createBaseWidgetImage(){return{url:"",linkUrl:"",height:0,width:0}}var WidgetImage={$type:"devvit.plugin.redditapi.widgets.WidgetImage",encode(e82,n=_m0.Writer.create()){return e82.url!==""&&n.uint32(10).string(e82.url),e82.linkUrl!==""&&n.uint32(18).string(e82.linkUrl),e82.height!==0&&n.uint32(24).int32(e82.height),e82.width!==0&&n.uint32(32).int32(e82.width),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWidgetImage();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=t.string();continue;case 2:if(r!==18)break;d.linkUrl=t.string();continue;case 3:if(r!==24)break;d.height=t.int32();continue;case 4:if(r!==32)break;d.width=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$f(e82.url)?globalThis.String(e82.url):"",linkUrl:isSet$f(e82.linkUrl)?globalThis.String(e82.linkUrl):"",height:isSet$f(e82.height)?globalThis.Number(e82.height):0,width:isSet$f(e82.width)?globalThis.Number(e82.width):0}},toJSON(e82){let n={};return e82.url!==""&&(n.url=e82.url),e82.linkUrl!==""&&(n.linkUrl=e82.linkUrl),e82.height!==0&&(n.height=Math.round(e82.height)),e82.width!==0&&(n.width=Math.round(e82.width)),n},create(e82){return WidgetImage.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWidgetImage();return n.url=e82.url??"",n.linkUrl=e82.linkUrl??"",n.height=e82.height??0,n.width=e82.width??0,n}};messageTypeRegistry.set(WidgetImage.$type,WidgetImage);function createBaseImageWidget(){return{id:"",kind:"",data:[],shortName:"",styles:void 0,subreddit:void 0}}var ImageWidget={$type:"devvit.plugin.redditapi.widgets.ImageWidget",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id),e82.kind!==""&&n.uint32(18).string(e82.kind);for(let t of e82.data)WidgetImage.encode(t,n.uint32(26).fork()).ldelim();return e82.shortName!==""&&n.uint32(34).string(e82.shortName),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(42).fork()).ldelim(),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseImageWidget();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.kind=t.string();continue;case 3:if(r!==26)break;d.data.push(WidgetImage.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.shortName=t.string();continue;case 5:if(r!==42)break;d.styles=WidgetStyles.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$f(e82.id)?globalThis.String(e82.id):"",kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",data:globalThis.Array.isArray(e82?.data)?e82.data.map(n=>WidgetImage.fromJSON(n)):[],shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0,subreddit:isSet$f(e82.subreddit)?String(e82.subreddit):void 0}},toJSON(e82){var t;let n={};return e82.id!==""&&(n.id=e82.id),e82.kind!==""&&(n.kind=e82.kind),(t=e82.data)!=null&&t.length&&(n.data=e82.data.map(o=>WidgetImage.toJSON(o))),e82.shortName!==""&&(n.shortName=e82.shortName),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),n},create(e82){return ImageWidget.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseImageWidget();return n.id=e82.id??"",n.kind=e82.kind??"",n.data=((t=e82.data)==null?void 0:t.map(o=>WidgetImage.fromPartial(o)))||[],n.shortName=e82.shortName??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n.subreddit=e82.subreddit??void 0,n}};messageTypeRegistry.set(ImageWidget.$type,ImageWidget);function createBaseAddImageWidgetRequest(){return{subreddit:"",data:[],shortName:"",styles:void 0}}var AddImageWidgetRequest={$type:"devvit.plugin.redditapi.widgets.AddImageWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit);for(let t of e82.data)WidgetImage.encode(t,n.uint32(18).fork()).ldelim();return e82.shortName!==""&&n.uint32(26).string(e82.shortName),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAddImageWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.data.push(WidgetImage.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.shortName=t.string();continue;case 4:if(r!==34)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",data:globalThis.Array.isArray(e82?.data)?e82.data.map(n=>WidgetImage.fromJSON(n)):[],shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),(t=e82.data)!=null&&t.length&&(n.data=e82.data.map(o=>WidgetImage.toJSON(o))),e82.shortName!==""&&(n.shortName=e82.shortName),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return AddImageWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseAddImageWidgetRequest();return n.subreddit=e82.subreddit??"",n.data=((t=e82.data)==null?void 0:t.map(o=>WidgetImage.fromPartial(o)))||[],n.shortName=e82.shortName??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(AddImageWidgetRequest.$type,AddImageWidgetRequest);function createBaseUpdateImageWidgetRequest(){return{subreddit:"",id:"",data:[],shortName:"",styles:void 0}}var UpdateImageWidgetRequest={$type:"devvit.plugin.redditapi.widgets.UpdateImageWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.id!==""&&n.uint32(18).string(e82.id);for(let t of e82.data)WidgetImage.encode(t,n.uint32(26).fork()).ldelim();return e82.shortName!==""&&n.uint32(34).string(e82.shortName),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateImageWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==26)break;d.data.push(WidgetImage.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.shortName=t.string();continue;case 5:if(r!==42)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",id:isSet$f(e82.id)?globalThis.String(e82.id):"",data:globalThis.Array.isArray(e82?.data)?e82.data.map(n=>WidgetImage.fromJSON(n)):[],shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.id!==""&&(n.id=e82.id),(t=e82.data)!=null&&t.length&&(n.data=e82.data.map(o=>WidgetImage.toJSON(o))),e82.shortName!==""&&(n.shortName=e82.shortName),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return UpdateImageWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUpdateImageWidgetRequest();return n.subreddit=e82.subreddit??"",n.id=e82.id??"",n.data=((t=e82.data)==null?void 0:t.map(o=>WidgetImage.fromPartial(o)))||[],n.shortName=e82.shortName??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(UpdateImageWidgetRequest.$type,UpdateImageWidgetRequest);function createBaseCalendarWidgetConfiguration(){return{numEvents:0,showDate:!1,showDescription:!1,showLocation:!1,showTime:!1,showTitle:!1}}var CalendarWidgetConfiguration={$type:"devvit.plugin.redditapi.widgets.CalendarWidgetConfiguration",encode(e82,n=_m0.Writer.create()){return e82.numEvents!==0&&n.uint32(8).int32(e82.numEvents),e82.showDate!==!1&&n.uint32(16).bool(e82.showDate),e82.showDescription!==!1&&n.uint32(24).bool(e82.showDescription),e82.showLocation!==!1&&n.uint32(32).bool(e82.showLocation),e82.showTime!==!1&&n.uint32(40).bool(e82.showTime),e82.showTitle!==!1&&n.uint32(48).bool(e82.showTitle),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCalendarWidgetConfiguration();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.numEvents=t.int32();continue;case 2:if(r!==16)break;d.showDate=t.bool();continue;case 3:if(r!==24)break;d.showDescription=t.bool();continue;case 4:if(r!==32)break;d.showLocation=t.bool();continue;case 5:if(r!==40)break;d.showTime=t.bool();continue;case 6:if(r!==48)break;d.showTitle=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{numEvents:isSet$f(e82.numEvents)?globalThis.Number(e82.numEvents):0,showDate:isSet$f(e82.showDate)?globalThis.Boolean(e82.showDate):!1,showDescription:isSet$f(e82.showDescription)?globalThis.Boolean(e82.showDescription):!1,showLocation:isSet$f(e82.showLocation)?globalThis.Boolean(e82.showLocation):!1,showTime:isSet$f(e82.showTime)?globalThis.Boolean(e82.showTime):!1,showTitle:isSet$f(e82.showTitle)?globalThis.Boolean(e82.showTitle):!1}},toJSON(e82){let n={};return e82.numEvents!==0&&(n.numEvents=Math.round(e82.numEvents)),e82.showDate!==!1&&(n.showDate=e82.showDate),e82.showDescription!==!1&&(n.showDescription=e82.showDescription),e82.showLocation!==!1&&(n.showLocation=e82.showLocation),e82.showTime!==!1&&(n.showTime=e82.showTime),e82.showTitle!==!1&&(n.showTitle=e82.showTitle),n},create(e82){return CalendarWidgetConfiguration.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCalendarWidgetConfiguration();return n.numEvents=e82.numEvents??0,n.showDate=e82.showDate??!1,n.showDescription=e82.showDescription??!1,n.showLocation=e82.showLocation??!1,n.showTime=e82.showTime??!1,n.showTitle=e82.showTitle??!1,n}};messageTypeRegistry.set(CalendarWidgetConfiguration.$type,CalendarWidgetConfiguration);function createBaseCalendarWidget(){return{id:"",kind:"",configuration:void 0,googleCalendarId:"",requiresSync:!1,shortName:"",styles:void 0}}var CalendarWidget={$type:"devvit.plugin.redditapi.widgets.CalendarWidget",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.kind!==""&&n.uint32(18).string(e82.kind),e82.configuration!==void 0&&CalendarWidgetConfiguration.encode(e82.configuration,n.uint32(26).fork()).ldelim(),e82.googleCalendarId!==""&&n.uint32(34).string(e82.googleCalendarId),e82.requiresSync!==!1&&n.uint32(40).bool(e82.requiresSync),e82.shortName!==""&&n.uint32(50).string(e82.shortName),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCalendarWidget();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.kind=t.string();continue;case 3:if(r!==26)break;d.configuration=CalendarWidgetConfiguration.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.googleCalendarId=t.string();continue;case 5:if(r!==40)break;d.requiresSync=t.bool();continue;case 6:if(r!==50)break;d.shortName=t.string();continue;case 7:if(r!==58)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$f(e82.id)?globalThis.String(e82.id):"",kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",configuration:isSet$f(e82.configuration)?CalendarWidgetConfiguration.fromJSON(e82.configuration):void 0,googleCalendarId:isSet$f(e82.googleCalendarId)?globalThis.String(e82.googleCalendarId):"",requiresSync:isSet$f(e82.requiresSync)?globalThis.Boolean(e82.requiresSync):!1,shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.kind!==""&&(n.kind=e82.kind),e82.configuration!==void 0&&(n.configuration=CalendarWidgetConfiguration.toJSON(e82.configuration)),e82.googleCalendarId!==""&&(n.googleCalendarId=e82.googleCalendarId),e82.requiresSync!==!1&&(n.requiresSync=e82.requiresSync),e82.shortName!==""&&(n.shortName=e82.shortName),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return CalendarWidget.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCalendarWidget();return n.id=e82.id??"",n.kind=e82.kind??"",n.configuration=e82.configuration!==void 0&&e82.configuration!==null?CalendarWidgetConfiguration.fromPartial(e82.configuration):void 0,n.googleCalendarId=e82.googleCalendarId??"",n.requiresSync=e82.requiresSync??!1,n.shortName=e82.shortName??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(CalendarWidget.$type,CalendarWidget);function createBaseAddCalendarWidgetRequest(){return{subreddit:"",configuration:void 0,googleCalendarId:"",requiresSync:!1,shortName:"",styles:void 0}}var AddCalendarWidgetRequest={$type:"devvit.plugin.redditapi.widgets.AddCalendarWidgetRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.configuration!==void 0&&CalendarWidgetConfiguration.encode(e82.configuration,n.uint32(18).fork()).ldelim(),e82.googleCalendarId!==""&&n.uint32(26).string(e82.googleCalendarId),e82.requiresSync!==!1&&n.uint32(32).bool(e82.requiresSync),e82.shortName!==""&&n.uint32(42).string(e82.shortName),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAddCalendarWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.configuration=CalendarWidgetConfiguration.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.googleCalendarId=t.string();continue;case 4:if(r!==32)break;d.requiresSync=t.bool();continue;case 5:if(r!==42)break;d.shortName=t.string();continue;case 6:if(r!==50)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",configuration:isSet$f(e82.configuration)?CalendarWidgetConfiguration.fromJSON(e82.configuration):void 0,googleCalendarId:isSet$f(e82.googleCalendarId)?globalThis.String(e82.googleCalendarId):"",requiresSync:isSet$f(e82.requiresSync)?globalThis.Boolean(e82.requiresSync):!1,shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.configuration!==void 0&&(n.configuration=CalendarWidgetConfiguration.toJSON(e82.configuration)),e82.googleCalendarId!==""&&(n.googleCalendarId=e82.googleCalendarId),e82.requiresSync!==!1&&(n.requiresSync=e82.requiresSync),e82.shortName!==""&&(n.shortName=e82.shortName),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return AddCalendarWidgetRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAddCalendarWidgetRequest();return n.subreddit=e82.subreddit??"",n.configuration=e82.configuration!==void 0&&e82.configuration!==null?CalendarWidgetConfiguration.fromPartial(e82.configuration):void 0,n.googleCalendarId=e82.googleCalendarId??"",n.requiresSync=e82.requiresSync??!1,n.shortName=e82.shortName??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(AddCalendarWidgetRequest.$type,AddCalendarWidgetRequest);function createBaseUpdateCalendarWidgetRequest(){return{subreddit:"",id:"",configuration:void 0,googleCalendarId:"",requiresSync:!1,shortName:"",styles:void 0}}var UpdateCalendarWidgetRequest={$type:"devvit.plugin.redditapi.widgets.UpdateCalendarWidgetRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.id!==""&&n.uint32(18).string(e82.id),e82.configuration!==void 0&&CalendarWidgetConfiguration.encode(e82.configuration,n.uint32(26).fork()).ldelim(),e82.googleCalendarId!==""&&n.uint32(34).string(e82.googleCalendarId),e82.requiresSync!==!1&&n.uint32(40).bool(e82.requiresSync),e82.shortName!==""&&n.uint32(50).string(e82.shortName),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateCalendarWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==26)break;d.configuration=CalendarWidgetConfiguration.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.googleCalendarId=t.string();continue;case 5:if(r!==40)break;d.requiresSync=t.bool();continue;case 6:if(r!==50)break;d.shortName=t.string();continue;case 7:if(r!==58)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",id:isSet$f(e82.id)?globalThis.String(e82.id):"",configuration:isSet$f(e82.configuration)?CalendarWidgetConfiguration.fromJSON(e82.configuration):void 0,googleCalendarId:isSet$f(e82.googleCalendarId)?globalThis.String(e82.googleCalendarId):"",requiresSync:isSet$f(e82.requiresSync)?globalThis.Boolean(e82.requiresSync):!1,shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.id!==""&&(n.id=e82.id),e82.configuration!==void 0&&(n.configuration=CalendarWidgetConfiguration.toJSON(e82.configuration)),e82.googleCalendarId!==""&&(n.googleCalendarId=e82.googleCalendarId),e82.requiresSync!==!1&&(n.requiresSync=e82.requiresSync),e82.shortName!==""&&(n.shortName=e82.shortName),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return UpdateCalendarWidgetRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUpdateCalendarWidgetRequest();return n.subreddit=e82.subreddit??"",n.id=e82.id??"",n.configuration=e82.configuration!==void 0&&e82.configuration!==null?CalendarWidgetConfiguration.fromPartial(e82.configuration):void 0,n.googleCalendarId=e82.googleCalendarId??"",n.requiresSync=e82.requiresSync??!1,n.shortName=e82.shortName??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(UpdateCalendarWidgetRequest.$type,UpdateCalendarWidgetRequest);function createBaseTextAreaWidget(){return{id:"",kind:"",shortName:"",text:"",styles:void 0}}var TextAreaWidget={$type:"devvit.plugin.redditapi.widgets.TextAreaWidget",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.kind!==""&&n.uint32(18).string(e82.kind),e82.shortName!==""&&n.uint32(26).string(e82.shortName),e82.text!==""&&n.uint32(34).string(e82.text),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTextAreaWidget();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.kind=t.string();continue;case 3:if(r!==26)break;d.shortName=t.string();continue;case 4:if(r!==34)break;d.text=t.string();continue;case 5:if(r!==42)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$f(e82.id)?globalThis.String(e82.id):"",kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",text:isSet$f(e82.text)?globalThis.String(e82.text):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.kind!==""&&(n.kind=e82.kind),e82.shortName!==""&&(n.shortName=e82.shortName),e82.text!==""&&(n.text=e82.text),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return TextAreaWidget.fromPartial(e82??{})},fromPartial(e82){let n=createBaseTextAreaWidget();return n.id=e82.id??"",n.kind=e82.kind??"",n.shortName=e82.shortName??"",n.text=e82.text??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(TextAreaWidget.$type,TextAreaWidget);function createBaseAddTextAreaWidgetRequest(){return{subreddit:"",shortName:"",text:"",styles:void 0}}var AddTextAreaWidgetRequest={$type:"devvit.plugin.redditapi.widgets.AddTextAreaWidgetRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.shortName!==""&&n.uint32(18).string(e82.shortName),e82.text!==""&&n.uint32(26).string(e82.text),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAddTextAreaWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.shortName=t.string();continue;case 3:if(r!==26)break;d.text=t.string();continue;case 4:if(r!==34)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",text:isSet$f(e82.text)?globalThis.String(e82.text):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.shortName!==""&&(n.shortName=e82.shortName),e82.text!==""&&(n.text=e82.text),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return AddTextAreaWidgetRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAddTextAreaWidgetRequest();return n.subreddit=e82.subreddit??"",n.shortName=e82.shortName??"",n.text=e82.text??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(AddTextAreaWidgetRequest.$type,AddTextAreaWidgetRequest);function createBaseUpdateTextAreaWidgetRequest(){return{subreddit:"",id:"",shortName:"",text:"",styles:void 0}}var UpdateTextAreaWidgetRequest={$type:"devvit.plugin.redditapi.widgets.UpdateTextAreaWidgetRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.id!==""&&n.uint32(18).string(e82.id),e82.shortName!==""&&n.uint32(26).string(e82.shortName),e82.text!==""&&n.uint32(34).string(e82.text),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateTextAreaWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==26)break;d.shortName=t.string();continue;case 4:if(r!==34)break;d.text=t.string();continue;case 5:if(r!==42)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",id:isSet$f(e82.id)?globalThis.String(e82.id):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",text:isSet$f(e82.text)?globalThis.String(e82.text):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.id!==""&&(n.id=e82.id),e82.shortName!==""&&(n.shortName=e82.shortName),e82.text!==""&&(n.text=e82.text),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return UpdateTextAreaWidgetRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUpdateTextAreaWidgetRequest();return n.subreddit=e82.subreddit??"",n.id=e82.id??"",n.shortName=e82.shortName??"",n.text=e82.text??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(UpdateTextAreaWidgetRequest.$type,UpdateTextAreaWidgetRequest);function createBaseWidgetButton(){return{kind:"",text:"",url:void 0,imageUrl:void 0,linkUrl:void 0,color:void 0,fillColor:void 0,textColor:void 0,height:void 0,width:void 0,hoverState:void 0}}var WidgetButton={$type:"devvit.plugin.redditapi.widgets.WidgetButton",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.text!==""&&n.uint32(18).string(e82.text),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(26).fork()).ldelim(),e82.imageUrl!==void 0&&StringValue.encode({value:e82.imageUrl},n.uint32(34).fork()).ldelim(),e82.linkUrl!==void 0&&StringValue.encode({value:e82.linkUrl},n.uint32(42).fork()).ldelim(),e82.color!==void 0&&StringValue.encode({value:e82.color},n.uint32(50).fork()).ldelim(),e82.fillColor!==void 0&&StringValue.encode({value:e82.fillColor},n.uint32(58).fork()).ldelim(),e82.textColor!==void 0&&StringValue.encode({value:e82.textColor},n.uint32(66).fork()).ldelim(),e82.height!==void 0&&Int32Value.encode({value:e82.height},n.uint32(74).fork()).ldelim(),e82.width!==void 0&&Int32Value.encode({value:e82.width},n.uint32(82).fork()).ldelim(),e82.hoverState!==void 0&&WidgetButton_HoverState.encode(e82.hoverState,n.uint32(90).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWidgetButton();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.text=t.string();continue;case 3:if(r!==26)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.imageUrl=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.linkUrl=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.color=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.fillColor=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.textColor=StringValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.height=Int32Value.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.width=Int32Value.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.hoverState=WidgetButton_HoverState.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",text:isSet$f(e82.text)?globalThis.String(e82.text):"",url:isSet$f(e82.url)?String(e82.url):void 0,imageUrl:isSet$f(e82.imageUrl)?String(e82.imageUrl):void 0,linkUrl:isSet$f(e82.linkUrl)?String(e82.linkUrl):void 0,color:isSet$f(e82.color)?String(e82.color):void 0,fillColor:isSet$f(e82.fillColor)?String(e82.fillColor):void 0,textColor:isSet$f(e82.textColor)?String(e82.textColor):void 0,height:isSet$f(e82.height)?Number(e82.height):void 0,width:isSet$f(e82.width)?Number(e82.width):void 0,hoverState:isSet$f(e82.hoverState)?WidgetButton_HoverState.fromJSON(e82.hoverState):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.text!==""&&(n.text=e82.text),e82.url!==void 0&&(n.url=e82.url),e82.imageUrl!==void 0&&(n.imageUrl=e82.imageUrl),e82.linkUrl!==void 0&&(n.linkUrl=e82.linkUrl),e82.color!==void 0&&(n.color=e82.color),e82.fillColor!==void 0&&(n.fillColor=e82.fillColor),e82.textColor!==void 0&&(n.textColor=e82.textColor),e82.height!==void 0&&(n.height=e82.height),e82.width!==void 0&&(n.width=e82.width),e82.hoverState!==void 0&&(n.hoverState=WidgetButton_HoverState.toJSON(e82.hoverState)),n},create(e82){return WidgetButton.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWidgetButton();return n.kind=e82.kind??"",n.text=e82.text??"",n.url=e82.url??void 0,n.imageUrl=e82.imageUrl??void 0,n.linkUrl=e82.linkUrl??void 0,n.color=e82.color??void 0,n.fillColor=e82.fillColor??void 0,n.textColor=e82.textColor??void 0,n.height=e82.height??void 0,n.width=e82.width??void 0,n.hoverState=e82.hoverState!==void 0&&e82.hoverState!==null?WidgetButton_HoverState.fromPartial(e82.hoverState):void 0,n}};messageTypeRegistry.set(WidgetButton.$type,WidgetButton);function createBaseWidgetButton_HoverState(){return{kind:"",color:void 0,fillColor:void 0,text:void 0,textColor:void 0,imageUrl:void 0,height:void 0,width:void 0}}var WidgetButton_HoverState={$type:"devvit.plugin.redditapi.widgets.WidgetButton.HoverState",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.color!==void 0&&StringValue.encode({value:e82.color},n.uint32(18).fork()).ldelim(),e82.fillColor!==void 0&&StringValue.encode({value:e82.fillColor},n.uint32(26).fork()).ldelim(),e82.text!==void 0&&StringValue.encode({value:e82.text},n.uint32(34).fork()).ldelim(),e82.textColor!==void 0&&StringValue.encode({value:e82.textColor},n.uint32(42).fork()).ldelim(),e82.imageUrl!==void 0&&StringValue.encode({value:e82.imageUrl},n.uint32(50).fork()).ldelim(),e82.height!==void 0&&Int32Value.encode({value:e82.height},n.uint32(58).fork()).ldelim(),e82.width!==void 0&&Int32Value.encode({value:e82.width},n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWidgetButton_HoverState();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.color=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.fillColor=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.text=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.textColor=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.imageUrl=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.height=Int32Value.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.width=Int32Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",color:isSet$f(e82.color)?String(e82.color):void 0,fillColor:isSet$f(e82.fillColor)?String(e82.fillColor):void 0,text:isSet$f(e82.text)?String(e82.text):void 0,textColor:isSet$f(e82.textColor)?String(e82.textColor):void 0,imageUrl:isSet$f(e82.imageUrl)?String(e82.imageUrl):void 0,height:isSet$f(e82.height)?Number(e82.height):void 0,width:isSet$f(e82.width)?Number(e82.width):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.color!==void 0&&(n.color=e82.color),e82.fillColor!==void 0&&(n.fillColor=e82.fillColor),e82.text!==void 0&&(n.text=e82.text),e82.textColor!==void 0&&(n.textColor=e82.textColor),e82.imageUrl!==void 0&&(n.imageUrl=e82.imageUrl),e82.height!==void 0&&(n.height=e82.height),e82.width!==void 0&&(n.width=e82.width),n},create(e82){return WidgetButton_HoverState.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWidgetButton_HoverState();return n.kind=e82.kind??"",n.color=e82.color??void 0,n.fillColor=e82.fillColor??void 0,n.text=e82.text??void 0,n.textColor=e82.textColor??void 0,n.imageUrl=e82.imageUrl??void 0,n.height=e82.height??void 0,n.width=e82.width??void 0,n}};messageTypeRegistry.set(WidgetButton_HoverState.$type,WidgetButton_HoverState);function createBaseButtonWidget(){return{id:"",kind:"",shortName:"",description:"",buttons:[],styles:void 0}}var ButtonWidget={$type:"devvit.plugin.redditapi.widgets.ButtonWidget",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id),e82.kind!==""&&n.uint32(18).string(e82.kind),e82.shortName!==""&&n.uint32(26).string(e82.shortName),e82.description!==""&&n.uint32(34).string(e82.description);for(let t of e82.buttons)WidgetButton.encode(t,n.uint32(42).fork()).ldelim();return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseButtonWidget();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.kind=t.string();continue;case 3:if(r!==26)break;d.shortName=t.string();continue;case 4:if(r!==34)break;d.description=t.string();continue;case 5:if(r!==42)break;d.buttons.push(WidgetButton.decode(t,t.uint32()));continue;case 6:if(r!==50)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$f(e82.id)?globalThis.String(e82.id):"",kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",description:isSet$f(e82.description)?globalThis.String(e82.description):"",buttons:globalThis.Array.isArray(e82?.buttons)?e82.buttons.map(n=>WidgetButton.fromJSON(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.id!==""&&(n.id=e82.id),e82.kind!==""&&(n.kind=e82.kind),e82.shortName!==""&&(n.shortName=e82.shortName),e82.description!==""&&(n.description=e82.description),(t=e82.buttons)!=null&&t.length&&(n.buttons=e82.buttons.map(o=>WidgetButton.toJSON(o))),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return ButtonWidget.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseButtonWidget();return n.id=e82.id??"",n.kind=e82.kind??"",n.shortName=e82.shortName??"",n.description=e82.description??"",n.buttons=((t=e82.buttons)==null?void 0:t.map(o=>WidgetButton.fromPartial(o)))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(ButtonWidget.$type,ButtonWidget);function createBaseAddButtonWidgetRequest(){return{subreddit:"",shortName:"",description:"",buttons:[],styles:void 0}}var AddButtonWidgetRequest={$type:"devvit.plugin.redditapi.widgets.AddButtonWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.shortName!==""&&n.uint32(18).string(e82.shortName),e82.description!==""&&n.uint32(26).string(e82.description);for(let t of e82.buttons)WidgetButton.encode(t,n.uint32(34).fork()).ldelim();return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAddButtonWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.shortName=t.string();continue;case 3:if(r!==26)break;d.description=t.string();continue;case 4:if(r!==34)break;d.buttons.push(WidgetButton.decode(t,t.uint32()));continue;case 5:if(r!==42)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",description:isSet$f(e82.description)?globalThis.String(e82.description):"",buttons:globalThis.Array.isArray(e82?.buttons)?e82.buttons.map(n=>WidgetButton.fromJSON(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.shortName!==""&&(n.shortName=e82.shortName),e82.description!==""&&(n.description=e82.description),(t=e82.buttons)!=null&&t.length&&(n.buttons=e82.buttons.map(o=>WidgetButton.toJSON(o))),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return AddButtonWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseAddButtonWidgetRequest();return n.subreddit=e82.subreddit??"",n.shortName=e82.shortName??"",n.description=e82.description??"",n.buttons=((t=e82.buttons)==null?void 0:t.map(o=>WidgetButton.fromPartial(o)))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(AddButtonWidgetRequest.$type,AddButtonWidgetRequest);function createBaseUpdateButtonWidgetRequest(){return{subreddit:"",id:"",shortName:"",description:"",buttons:[],styles:void 0}}var UpdateButtonWidgetRequest={$type:"devvit.plugin.redditapi.widgets.UpdateButtonWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.id!==""&&n.uint32(18).string(e82.id),e82.shortName!==""&&n.uint32(26).string(e82.shortName),e82.description!==""&&n.uint32(34).string(e82.description);for(let t of e82.buttons)WidgetButton.encode(t,n.uint32(42).fork()).ldelim();return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateButtonWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==26)break;d.shortName=t.string();continue;case 4:if(r!==34)break;d.description=t.string();continue;case 5:if(r!==42)break;d.buttons.push(WidgetButton.decode(t,t.uint32()));continue;case 6:if(r!==50)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",id:isSet$f(e82.id)?globalThis.String(e82.id):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",description:isSet$f(e82.description)?globalThis.String(e82.description):"",buttons:globalThis.Array.isArray(e82?.buttons)?e82.buttons.map(n=>WidgetButton.fromJSON(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.id!==""&&(n.id=e82.id),e82.shortName!==""&&(n.shortName=e82.shortName),e82.description!==""&&(n.description=e82.description),(t=e82.buttons)!=null&&t.length&&(n.buttons=e82.buttons.map(o=>WidgetButton.toJSON(o))),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return UpdateButtonWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUpdateButtonWidgetRequest();return n.subreddit=e82.subreddit??"",n.id=e82.id??"",n.shortName=e82.shortName??"",n.description=e82.description??"",n.buttons=((t=e82.buttons)==null?void 0:t.map(o=>WidgetButton.fromPartial(o)))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(UpdateButtonWidgetRequest.$type,UpdateButtonWidgetRequest);function createBaseCommunityListWidget(){return{id:"",kind:"",shortName:"",data:[],styles:void 0}}var CommunityListWidget={$type:"devvit.plugin.redditapi.widgets.CommunityListWidget",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id),e82.kind!==""&&n.uint32(18).string(e82.kind),e82.shortName!==""&&n.uint32(26).string(e82.shortName);for(let t of e82.data)CommunityListWidget_CommunityData.encode(t,n.uint32(34).fork()).ldelim();return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommunityListWidget();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.kind=t.string();continue;case 3:if(r!==26)break;d.shortName=t.string();continue;case 4:if(r!==34)break;d.data.push(CommunityListWidget_CommunityData.decode(t,t.uint32()));continue;case 5:if(r!==42)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$f(e82.id)?globalThis.String(e82.id):"",kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",data:globalThis.Array.isArray(e82?.data)?e82.data.map(n=>CommunityListWidget_CommunityData.fromJSON(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.id!==""&&(n.id=e82.id),e82.kind!==""&&(n.kind=e82.kind),e82.shortName!==""&&(n.shortName=e82.shortName),(t=e82.data)!=null&&t.length&&(n.data=e82.data.map(o=>CommunityListWidget_CommunityData.toJSON(o))),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return CommunityListWidget.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseCommunityListWidget();return n.id=e82.id??"",n.kind=e82.kind??"",n.shortName=e82.shortName??"",n.data=((t=e82.data)==null?void 0:t.map(o=>CommunityListWidget_CommunityData.fromPartial(o)))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(CommunityListWidget.$type,CommunityListWidget);function createBaseCommunityListWidget_CommunityData(){return{communityIcon:"",iconUrl:"",isNsfw:!1,isSubscribed:!1,name:"",prefixedName:"",primaryColor:"",subscribers:0,type:""}}var CommunityListWidget_CommunityData={$type:"devvit.plugin.redditapi.widgets.CommunityListWidget.CommunityData",encode(e82,n=_m0.Writer.create()){return e82.communityIcon!==""&&n.uint32(10).string(e82.communityIcon),e82.iconUrl!==""&&n.uint32(18).string(e82.iconUrl),e82.isNsfw!==!1&&n.uint32(24).bool(e82.isNsfw),e82.isSubscribed!==!1&&n.uint32(32).bool(e82.isSubscribed),e82.name!==""&&n.uint32(42).string(e82.name),e82.prefixedName!==""&&n.uint32(50).string(e82.prefixedName),e82.primaryColor!==""&&n.uint32(58).string(e82.primaryColor),e82.subscribers!==0&&n.uint32(64).int32(e82.subscribers),e82.type!==""&&n.uint32(74).string(e82.type),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCommunityListWidget_CommunityData();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.communityIcon=t.string();continue;case 2:if(r!==18)break;d.iconUrl=t.string();continue;case 3:if(r!==24)break;d.isNsfw=t.bool();continue;case 4:if(r!==32)break;d.isSubscribed=t.bool();continue;case 5:if(r!==42)break;d.name=t.string();continue;case 6:if(r!==50)break;d.prefixedName=t.string();continue;case 7:if(r!==58)break;d.primaryColor=t.string();continue;case 8:if(r!==64)break;d.subscribers=t.int32();continue;case 9:if(r!==74)break;d.type=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{communityIcon:isSet$f(e82.communityIcon)?globalThis.String(e82.communityIcon):"",iconUrl:isSet$f(e82.iconUrl)?globalThis.String(e82.iconUrl):"",isNsfw:isSet$f(e82.isNsfw)?globalThis.Boolean(e82.isNsfw):!1,isSubscribed:isSet$f(e82.isSubscribed)?globalThis.Boolean(e82.isSubscribed):!1,name:isSet$f(e82.name)?globalThis.String(e82.name):"",prefixedName:isSet$f(e82.prefixedName)?globalThis.String(e82.prefixedName):"",primaryColor:isSet$f(e82.primaryColor)?globalThis.String(e82.primaryColor):"",subscribers:isSet$f(e82.subscribers)?globalThis.Number(e82.subscribers):0,type:isSet$f(e82.type)?globalThis.String(e82.type):""}},toJSON(e82){let n={};return e82.communityIcon!==""&&(n.communityIcon=e82.communityIcon),e82.iconUrl!==""&&(n.iconUrl=e82.iconUrl),e82.isNsfw!==!1&&(n.isNsfw=e82.isNsfw),e82.isSubscribed!==!1&&(n.isSubscribed=e82.isSubscribed),e82.name!==""&&(n.name=e82.name),e82.prefixedName!==""&&(n.prefixedName=e82.prefixedName),e82.primaryColor!==""&&(n.primaryColor=e82.primaryColor),e82.subscribers!==0&&(n.subscribers=Math.round(e82.subscribers)),e82.type!==""&&(n.type=e82.type),n},create(e82){return CommunityListWidget_CommunityData.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCommunityListWidget_CommunityData();return n.communityIcon=e82.communityIcon??"",n.iconUrl=e82.iconUrl??"",n.isNsfw=e82.isNsfw??!1,n.isSubscribed=e82.isSubscribed??!1,n.name=e82.name??"",n.prefixedName=e82.prefixedName??"",n.primaryColor=e82.primaryColor??"",n.subscribers=e82.subscribers??0,n.type=e82.type??"",n}};messageTypeRegistry.set(CommunityListWidget_CommunityData.$type,CommunityListWidget_CommunityData);function createBaseAddCommunityListWidgetRequest(){return{subreddit:"",shortName:"",data:[],styles:void 0}}var AddCommunityListWidgetRequest={$type:"devvit.plugin.redditapi.widgets.AddCommunityListWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.shortName!==""&&n.uint32(18).string(e82.shortName);for(let t of e82.data)n.uint32(26).string(t);return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAddCommunityListWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.shortName=t.string();continue;case 3:if(r!==26)break;d.data.push(t.string());continue;case 4:if(r!==34)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",data:globalThis.Array.isArray(e82?.data)?e82.data.map(n=>globalThis.String(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.shortName!==""&&(n.shortName=e82.shortName),(t=e82.data)!=null&&t.length&&(n.data=e82.data),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return AddCommunityListWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseAddCommunityListWidgetRequest();return n.subreddit=e82.subreddit??"",n.shortName=e82.shortName??"",n.data=((t=e82.data)==null?void 0:t.map(o=>o))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(AddCommunityListWidgetRequest.$type,AddCommunityListWidgetRequest);function createBaseUpdateCommunityListWidgetRequest(){return{subreddit:"",id:"",shortName:"",data:[],styles:void 0}}var UpdateCommunityListWidgetRequest={$type:"devvit.plugin.redditapi.widgets.UpdateCommunityListWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.id!==""&&n.uint32(18).string(e82.id),e82.shortName!==""&&n.uint32(26).string(e82.shortName);for(let t of e82.data)n.uint32(34).string(t);return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateCommunityListWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==26)break;d.shortName=t.string();continue;case 4:if(r!==34)break;d.data.push(t.string());continue;case 5:if(r!==42)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",id:isSet$f(e82.id)?globalThis.String(e82.id):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",data:globalThis.Array.isArray(e82?.data)?e82.data.map(n=>globalThis.String(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.id!==""&&(n.id=e82.id),e82.shortName!==""&&(n.shortName=e82.shortName),(t=e82.data)!=null&&t.length&&(n.data=e82.data),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return UpdateCommunityListWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUpdateCommunityListWidgetRequest();return n.subreddit=e82.subreddit??"",n.id=e82.id??"",n.shortName=e82.shortName??"",n.data=((t=e82.data)==null?void 0:t.map(o=>o))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(UpdateCommunityListWidgetRequest.$type,UpdateCommunityListWidgetRequest);function createBaseUpdateCommunityListWidgetResponse(){return{kind:"",shortName:"",data:[],styles:void 0}}var UpdateCommunityListWidgetResponse={$type:"devvit.plugin.redditapi.widgets.UpdateCommunityListWidgetResponse",encode(e82,n=_m0.Writer.create()){e82.kind!==""&&n.uint32(10).string(e82.kind),e82.shortName!==""&&n.uint32(18).string(e82.shortName);for(let t of e82.data)n.uint32(26).string(t);return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateCommunityListWidgetResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.shortName=t.string();continue;case 3:if(r!==26)break;d.data.push(t.string());continue;case 4:if(r!==34)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",data:globalThis.Array.isArray(e82?.data)?e82.data.map(n=>globalThis.String(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.shortName!==""&&(n.shortName=e82.shortName),(t=e82.data)!=null&&t.length&&(n.data=e82.data),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return UpdateCommunityListWidgetResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUpdateCommunityListWidgetResponse();return n.kind=e82.kind??"",n.shortName=e82.shortName??"",n.data=((t=e82.data)==null?void 0:t.map(o=>o))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(UpdateCommunityListWidgetResponse.$type,UpdateCommunityListWidgetResponse);function createBasePostFlairWidget(){return{id:"",kind:"",display:"",order:[],shortName:"",styles:void 0,subreddit:void 0}}var PostFlairWidget={$type:"devvit.plugin.redditapi.widgets.PostFlairWidget",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id),e82.kind!==""&&n.uint32(18).string(e82.kind),e82.display!==""&&n.uint32(26).string(e82.display);for(let t of e82.order)n.uint32(34).string(t);return e82.shortName!==""&&n.uint32(42).string(e82.shortName),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(50).fork()).ldelim(),e82.subreddit!==void 0&&StringValue.encode({value:e82.subreddit},n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePostFlairWidget();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.kind=t.string();continue;case 3:if(r!==26)break;d.display=t.string();continue;case 4:if(r!==34)break;d.order.push(t.string());continue;case 5:if(r!==42)break;d.shortName=t.string();continue;case 6:if(r!==50)break;d.styles=WidgetStyles.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.subreddit=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$f(e82.id)?globalThis.String(e82.id):"",kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",display:isSet$f(e82.display)?globalThis.String(e82.display):"",order:globalThis.Array.isArray(e82?.order)?e82.order.map(n=>globalThis.String(n)):[],shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0,subreddit:isSet$f(e82.subreddit)?String(e82.subreddit):void 0}},toJSON(e82){var t;let n={};return e82.id!==""&&(n.id=e82.id),e82.kind!==""&&(n.kind=e82.kind),e82.display!==""&&(n.display=e82.display),(t=e82.order)!=null&&t.length&&(n.order=e82.order),e82.shortName!==""&&(n.shortName=e82.shortName),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),e82.subreddit!==void 0&&(n.subreddit=e82.subreddit),n},create(e82){return PostFlairWidget.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBasePostFlairWidget();return n.id=e82.id??"",n.kind=e82.kind??"",n.display=e82.display??"",n.order=((t=e82.order)==null?void 0:t.map(o=>o))||[],n.shortName=e82.shortName??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n.subreddit=e82.subreddit??void 0,n}};messageTypeRegistry.set(PostFlairWidget.$type,PostFlairWidget);function createBaseAddPostFlairWidgetRequest(){return{subreddit:"",display:"",order:[],shortName:"",styles:void 0}}var AddPostFlairWidgetRequest={$type:"devvit.plugin.redditapi.widgets.AddPostFlairWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.display!==""&&n.uint32(18).string(e82.display);for(let t of e82.order)n.uint32(26).string(t);return e82.shortName!==""&&n.uint32(34).string(e82.shortName),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAddPostFlairWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.display=t.string();continue;case 3:if(r!==26)break;d.order.push(t.string());continue;case 4:if(r!==34)break;d.shortName=t.string();continue;case 5:if(r!==42)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",display:isSet$f(e82.display)?globalThis.String(e82.display):"",order:globalThis.Array.isArray(e82?.order)?e82.order.map(n=>globalThis.String(n)):[],shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.display!==""&&(n.display=e82.display),(t=e82.order)!=null&&t.length&&(n.order=e82.order),e82.shortName!==""&&(n.shortName=e82.shortName),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return AddPostFlairWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseAddPostFlairWidgetRequest();return n.subreddit=e82.subreddit??"",n.display=e82.display??"",n.order=((t=e82.order)==null?void 0:t.map(o=>o))||[],n.shortName=e82.shortName??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(AddPostFlairWidgetRequest.$type,AddPostFlairWidgetRequest);function createBaseUpdatePostFlairWidgetRequest(){return{subreddit:"",id:"",display:"",order:[],shortName:"",styles:void 0}}var UpdatePostFlairWidgetRequest={$type:"devvit.plugin.redditapi.widgets.UpdatePostFlairWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.id!==""&&n.uint32(18).string(e82.id),e82.display!==""&&n.uint32(26).string(e82.display);for(let t of e82.order)n.uint32(34).string(t);return e82.shortName!==""&&n.uint32(42).string(e82.shortName),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdatePostFlairWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==26)break;d.display=t.string();continue;case 4:if(r!==34)break;d.order.push(t.string());continue;case 5:if(r!==42)break;d.shortName=t.string();continue;case 6:if(r!==50)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",id:isSet$f(e82.id)?globalThis.String(e82.id):"",display:isSet$f(e82.display)?globalThis.String(e82.display):"",order:globalThis.Array.isArray(e82?.order)?e82.order.map(n=>globalThis.String(n)):[],shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.id!==""&&(n.id=e82.id),e82.display!==""&&(n.display=e82.display),(t=e82.order)!=null&&t.length&&(n.order=e82.order),e82.shortName!==""&&(n.shortName=e82.shortName),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return UpdatePostFlairWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUpdatePostFlairWidgetRequest();return n.subreddit=e82.subreddit??"",n.id=e82.id??"",n.display=e82.display??"",n.order=((t=e82.order)==null?void 0:t.map(o=>o))||[],n.shortName=e82.shortName??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(UpdatePostFlairWidgetRequest.$type,UpdatePostFlairWidgetRequest);function createBaseDeleteWidgetRequest(){return{id:"",subreddit:""}}var DeleteWidgetRequest={$type:"devvit.plugin.redditapi.widgets.DeleteWidgetRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.subreddit!==""&&n.uint32(18).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDeleteWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$f(e82.id)?globalThis.String(e82.id):"",subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return DeleteWidgetRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDeleteWidgetRequest();return n.id=e82.id??"",n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(DeleteWidgetRequest.$type,DeleteWidgetRequest);function createBaseGetWidgetsRequest(){return{subreddit:"",progressiveImages:void 0}}var GetWidgetsRequest={$type:"devvit.plugin.redditapi.widgets.GetWidgetsRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.progressiveImages!==void 0&&BoolValue.encode({value:e82.progressiveImages},n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.progressiveImages=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",progressiveImages:isSet$f(e82.progressiveImages)?!!e82.progressiveImages:void 0}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.progressiveImages!==void 0&&(n.progressiveImages=e82.progressiveImages),n},create(e82){return GetWidgetsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWidgetsRequest();return n.subreddit=e82.subreddit??"",n.progressiveImages=e82.progressiveImages??void 0,n}};messageTypeRegistry.set(GetWidgetsRequest.$type,GetWidgetsRequest);function createBaseGetWidgetsResponse(){return{layout:void 0,items:{}}}var GetWidgetsResponse={$type:"devvit.plugin.redditapi.widgets.GetWidgetsResponse",encode(e82,n=_m0.Writer.create()){return e82.layout!==void 0&&GetWidgetsResponse_Layout.encode(e82.layout,n.uint32(10).fork()).ldelim(),Object.entries(e82.items).forEach(([t,o])=>{GetWidgetsResponse_ItemsEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.layout=GetWidgetsResponse_Layout.decode(t,t.uint32());continue;case 2:if(r!==18)break;let a=GetWidgetsResponse_ItemsEntry.decode(t,t.uint32());a.value!==void 0&&(d.items[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{layout:isSet$f(e82.layout)?GetWidgetsResponse_Layout.fromJSON(e82.layout):void 0,items:isObject$b(e82.items)?Object.entries(e82.items).reduce((n,[t,o])=>(n[t]=GetWidgetsResponse_WidgetItem.fromJSON(o),n),{}):{}}},toJSON(e82){let n={};if(e82.layout!==void 0&&(n.layout=GetWidgetsResponse_Layout.toJSON(e82.layout)),e82.items){let t=Object.entries(e82.items);t.length>0&&(n.items={},t.forEach(([o,d])=>{n.items[o]=GetWidgetsResponse_WidgetItem.toJSON(d)}))}return n},create(e82){return GetWidgetsResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWidgetsResponse();return n.layout=e82.layout!==void 0&&e82.layout!==null?GetWidgetsResponse_Layout.fromPartial(e82.layout):void 0,n.items=Object.entries(e82.items??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=GetWidgetsResponse_WidgetItem.fromPartial(d)),t),{}),n}};messageTypeRegistry.set(GetWidgetsResponse.$type,GetWidgetsResponse);function createBaseGetWidgetsResponse_WidgetOrdering(){return{order:[]}}var GetWidgetsResponse_WidgetOrdering={$type:"devvit.plugin.redditapi.widgets.GetWidgetsResponse.WidgetOrdering",encode(e82,n=_m0.Writer.create()){for(let t of e82.order)n.uint32(10).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsResponse_WidgetOrdering();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.order.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{order:globalThis.Array.isArray(e82?.order)?e82.order.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.order)!=null&&t.length&&(n.order=e82.order),n},create(e82){return GetWidgetsResponse_WidgetOrdering.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGetWidgetsResponse_WidgetOrdering();return n.order=((t=e82.order)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(GetWidgetsResponse_WidgetOrdering.$type,GetWidgetsResponse_WidgetOrdering);function createBaseGetWidgetsResponse_Layout(){return{idCardWidget:"",topbar:void 0,sidebar:void 0,moderatorWidget:""}}var GetWidgetsResponse_Layout={$type:"devvit.plugin.redditapi.widgets.GetWidgetsResponse.Layout",encode(e82,n=_m0.Writer.create()){return e82.idCardWidget!==""&&n.uint32(10).string(e82.idCardWidget),e82.topbar!==void 0&&GetWidgetsResponse_WidgetOrdering.encode(e82.topbar,n.uint32(18).fork()).ldelim(),e82.sidebar!==void 0&&GetWidgetsResponse_WidgetOrdering.encode(e82.sidebar,n.uint32(26).fork()).ldelim(),e82.moderatorWidget!==""&&n.uint32(34).string(e82.moderatorWidget),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsResponse_Layout();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.idCardWidget=t.string();continue;case 2:if(r!==18)break;d.topbar=GetWidgetsResponse_WidgetOrdering.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.sidebar=GetWidgetsResponse_WidgetOrdering.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.moderatorWidget=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{idCardWidget:isSet$f(e82.idCardWidget)?globalThis.String(e82.idCardWidget):"",topbar:isSet$f(e82.topbar)?GetWidgetsResponse_WidgetOrdering.fromJSON(e82.topbar):void 0,sidebar:isSet$f(e82.sidebar)?GetWidgetsResponse_WidgetOrdering.fromJSON(e82.sidebar):void 0,moderatorWidget:isSet$f(e82.moderatorWidget)?globalThis.String(e82.moderatorWidget):""}},toJSON(e82){let n={};return e82.idCardWidget!==""&&(n.idCardWidget=e82.idCardWidget),e82.topbar!==void 0&&(n.topbar=GetWidgetsResponse_WidgetOrdering.toJSON(e82.topbar)),e82.sidebar!==void 0&&(n.sidebar=GetWidgetsResponse_WidgetOrdering.toJSON(e82.sidebar)),e82.moderatorWidget!==""&&(n.moderatorWidget=e82.moderatorWidget),n},create(e82){return GetWidgetsResponse_Layout.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWidgetsResponse_Layout();return n.idCardWidget=e82.idCardWidget??"",n.topbar=e82.topbar!==void 0&&e82.topbar!==null?GetWidgetsResponse_WidgetOrdering.fromPartial(e82.topbar):void 0,n.sidebar=e82.sidebar!==void 0&&e82.sidebar!==null?GetWidgetsResponse_WidgetOrdering.fromPartial(e82.sidebar):void 0,n.moderatorWidget=e82.moderatorWidget??"",n}};messageTypeRegistry.set(GetWidgetsResponse_Layout.$type,GetWidgetsResponse_Layout);function createBaseGetWidgetsResponse_WidgetItem(){return{id:"",kind:"",styles:void 0,shortName:"",description:void 0,data:[],buttons:[],subscribersCount:void 0,currentlyViewingText:void 0,currentlyViewingCount:void 0,subscribersText:void 0,showWiki:void 0,templates:{},display:void 0,order:[],mods:[],totalMods:void 0,googleCalendarId:void 0,requiresSync:void 0,configuration:void 0,text:void 0,css:void 0,stylesheetUrl:void 0,height:void 0,imageData:[]}}var GetWidgetsResponse_WidgetItem={$type:"devvit.plugin.redditapi.widgets.GetWidgetsResponse.WidgetItem",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id),e82.kind!==""&&n.uint32(18).string(e82.kind),e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(26).fork()).ldelim(),e82.shortName!==""&&n.uint32(34).string(e82.shortName),e82.description!==void 0&&StringValue.encode({value:e82.description},n.uint32(42).fork()).ldelim();for(let t of e82.data)GetWidgetsResponse_WidgetItem_Data.encode(t,n.uint32(50).fork()).ldelim();for(let t of e82.buttons)WidgetButton.encode(t,n.uint32(58).fork()).ldelim();e82.subscribersCount!==void 0&&Int64Value.encode({value:e82.subscribersCount},n.uint32(66).fork()).ldelim(),e82.currentlyViewingText!==void 0&&StringValue.encode({value:e82.currentlyViewingText},n.uint32(74).fork()).ldelim(),e82.currentlyViewingCount!==void 0&&Int64Value.encode({value:e82.currentlyViewingCount},n.uint32(82).fork()).ldelim(),e82.subscribersText!==void 0&&StringValue.encode({value:e82.subscribersText},n.uint32(90).fork()).ldelim(),e82.showWiki!==void 0&&BoolValue.encode({value:e82.showWiki},n.uint32(98).fork()).ldelim(),Object.entries(e82.templates).forEach(([t,o])=>{GetWidgetsResponse_WidgetItem_TemplatesEntry.encode({key:t,value:o},n.uint32(106).fork()).ldelim()}),e82.display!==void 0&&StringValue.encode({value:e82.display},n.uint32(114).fork()).ldelim();for(let t of e82.order)n.uint32(122).string(t);for(let t of e82.mods)GetWidgetsResponse_WidgetItem_Moderator.encode(t,n.uint32(130).fork()).ldelim();e82.totalMods!==void 0&&Int64Value.encode({value:e82.totalMods},n.uint32(138).fork()).ldelim(),e82.googleCalendarId!==void 0&&StringValue.encode({value:e82.googleCalendarId},n.uint32(146).fork()).ldelim(),e82.requiresSync!==void 0&&BoolValue.encode({value:e82.requiresSync},n.uint32(154).fork()).ldelim(),e82.configuration!==void 0&&CalendarWidgetConfiguration.encode(e82.configuration,n.uint32(162).fork()).ldelim(),e82.text!==void 0&&StringValue.encode({value:e82.text},n.uint32(170).fork()).ldelim(),e82.css!==void 0&&StringValue.encode({value:e82.css},n.uint32(178).fork()).ldelim(),e82.stylesheetUrl!==void 0&&StringValue.encode({value:e82.stylesheetUrl},n.uint32(186).fork()).ldelim(),e82.height!==void 0&&Int64Value.encode({value:e82.height},n.uint32(194).fork()).ldelim();for(let t of e82.imageData)WidgetImage.encode(t,n.uint32(202).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsResponse_WidgetItem();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.kind=t.string();continue;case 3:if(r!==26)break;d.styles=WidgetStyles.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.shortName=t.string();continue;case 5:if(r!==42)break;d.description=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.data.push(GetWidgetsResponse_WidgetItem_Data.decode(t,t.uint32()));continue;case 7:if(r!==58)break;d.buttons.push(WidgetButton.decode(t,t.uint32()));continue;case 8:if(r!==66)break;d.subscribersCount=Int64Value.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.currentlyViewingText=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.currentlyViewingCount=Int64Value.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.subscribersText=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.showWiki=BoolValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;let a=GetWidgetsResponse_WidgetItem_TemplatesEntry.decode(t,t.uint32());a.value!==void 0&&(d.templates[a.key]=a.value);continue;case 14:if(r!==114)break;d.display=StringValue.decode(t,t.uint32()).value;continue;case 15:if(r!==122)break;d.order.push(t.string());continue;case 16:if(r!==130)break;d.mods.push(GetWidgetsResponse_WidgetItem_Moderator.decode(t,t.uint32()));continue;case 17:if(r!==138)break;d.totalMods=Int64Value.decode(t,t.uint32()).value;continue;case 18:if(r!==146)break;d.googleCalendarId=StringValue.decode(t,t.uint32()).value;continue;case 19:if(r!==154)break;d.requiresSync=BoolValue.decode(t,t.uint32()).value;continue;case 20:if(r!==162)break;d.configuration=CalendarWidgetConfiguration.decode(t,t.uint32());continue;case 21:if(r!==170)break;d.text=StringValue.decode(t,t.uint32()).value;continue;case 22:if(r!==178)break;d.css=StringValue.decode(t,t.uint32()).value;continue;case 23:if(r!==186)break;d.stylesheetUrl=StringValue.decode(t,t.uint32()).value;continue;case 24:if(r!==194)break;d.height=Int64Value.decode(t,t.uint32()).value;continue;case 25:if(r!==202)break;d.imageData.push(WidgetImage.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$f(e82.id)?globalThis.String(e82.id):"",kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0,shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",description:isSet$f(e82.description)?String(e82.description):void 0,data:globalThis.Array.isArray(e82?.data)?e82.data.map(n=>GetWidgetsResponse_WidgetItem_Data.fromJSON(n)):[],buttons:globalThis.Array.isArray(e82?.buttons)?e82.buttons.map(n=>WidgetButton.fromJSON(n)):[],subscribersCount:isSet$f(e82.subscribersCount)?Number(e82.subscribersCount):void 0,currentlyViewingText:isSet$f(e82.currentlyViewingText)?String(e82.currentlyViewingText):void 0,currentlyViewingCount:isSet$f(e82.currentlyViewingCount)?Number(e82.currentlyViewingCount):void 0,subscribersText:isSet$f(e82.subscribersText)?String(e82.subscribersText):void 0,showWiki:isSet$f(e82.showWiki)?!!e82.showWiki:void 0,templates:isObject$b(e82.templates)?Object.entries(e82.templates).reduce((n,[t,o])=>(n[t]=GetWidgetsResponse_WidgetItem_PostFlairTemplate.fromJSON(o),n),{}):{},display:isSet$f(e82.display)?String(e82.display):void 0,order:globalThis.Array.isArray(e82?.order)?e82.order.map(n=>globalThis.String(n)):[],mods:globalThis.Array.isArray(e82?.mods)?e82.mods.map(n=>GetWidgetsResponse_WidgetItem_Moderator.fromJSON(n)):[],totalMods:isSet$f(e82.totalMods)?Number(e82.totalMods):void 0,googleCalendarId:isSet$f(e82.googleCalendarId)?String(e82.googleCalendarId):void 0,requiresSync:isSet$f(e82.requiresSync)?!!e82.requiresSync:void 0,configuration:isSet$f(e82.configuration)?CalendarWidgetConfiguration.fromJSON(e82.configuration):void 0,text:isSet$f(e82.text)?String(e82.text):void 0,css:isSet$f(e82.css)?String(e82.css):void 0,stylesheetUrl:isSet$f(e82.stylesheetUrl)?String(e82.stylesheetUrl):void 0,height:isSet$f(e82.height)?Number(e82.height):void 0,imageData:globalThis.Array.isArray(e82?.imageData)?e82.imageData.map(n=>WidgetImage.fromJSON(n)):[]}},toJSON(e82){var t,o,d,r,a;let n={};if(e82.id!==""&&(n.id=e82.id),e82.kind!==""&&(n.kind=e82.kind),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),e82.shortName!==""&&(n.shortName=e82.shortName),e82.description!==void 0&&(n.description=e82.description),(t=e82.data)!=null&&t.length&&(n.data=e82.data.map(u=>GetWidgetsResponse_WidgetItem_Data.toJSON(u))),(o=e82.buttons)!=null&&o.length&&(n.buttons=e82.buttons.map(u=>WidgetButton.toJSON(u))),e82.subscribersCount!==void 0&&(n.subscribersCount=e82.subscribersCount),e82.currentlyViewingText!==void 0&&(n.currentlyViewingText=e82.currentlyViewingText),e82.currentlyViewingCount!==void 0&&(n.currentlyViewingCount=e82.currentlyViewingCount),e82.subscribersText!==void 0&&(n.subscribersText=e82.subscribersText),e82.showWiki!==void 0&&(n.showWiki=e82.showWiki),e82.templates){let u=Object.entries(e82.templates);u.length>0&&(n.templates={},u.forEach(([l,s])=>{n.templates[l]=GetWidgetsResponse_WidgetItem_PostFlairTemplate.toJSON(s)}))}return e82.display!==void 0&&(n.display=e82.display),(d=e82.order)!=null&&d.length&&(n.order=e82.order),(r=e82.mods)!=null&&r.length&&(n.mods=e82.mods.map(u=>GetWidgetsResponse_WidgetItem_Moderator.toJSON(u))),e82.totalMods!==void 0&&(n.totalMods=e82.totalMods),e82.googleCalendarId!==void 0&&(n.googleCalendarId=e82.googleCalendarId),e82.requiresSync!==void 0&&(n.requiresSync=e82.requiresSync),e82.configuration!==void 0&&(n.configuration=CalendarWidgetConfiguration.toJSON(e82.configuration)),e82.text!==void 0&&(n.text=e82.text),e82.css!==void 0&&(n.css=e82.css),e82.stylesheetUrl!==void 0&&(n.stylesheetUrl=e82.stylesheetUrl),e82.height!==void 0&&(n.height=e82.height),(a=e82.imageData)!=null&&a.length&&(n.imageData=e82.imageData.map(u=>WidgetImage.toJSON(u))),n},create(e82){return GetWidgetsResponse_WidgetItem.fromPartial(e82??{})},fromPartial(e82){var t,o,d,r,a;let n=createBaseGetWidgetsResponse_WidgetItem();return n.id=e82.id??"",n.kind=e82.kind??"",n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n.shortName=e82.shortName??"",n.description=e82.description??void 0,n.data=((t=e82.data)==null?void 0:t.map(u=>GetWidgetsResponse_WidgetItem_Data.fromPartial(u)))||[],n.buttons=((o=e82.buttons)==null?void 0:o.map(u=>WidgetButton.fromPartial(u)))||[],n.subscribersCount=e82.subscribersCount??void 0,n.currentlyViewingText=e82.currentlyViewingText??void 0,n.currentlyViewingCount=e82.currentlyViewingCount??void 0,n.subscribersText=e82.subscribersText??void 0,n.showWiki=e82.showWiki??void 0,n.templates=Object.entries(e82.templates??{}).reduce((u,[l,s])=>(s!==void 0&&(u[l]=GetWidgetsResponse_WidgetItem_PostFlairTemplate.fromPartial(s)),u),{}),n.display=e82.display??void 0,n.order=((d=e82.order)==null?void 0:d.map(u=>u))||[],n.mods=((r=e82.mods)==null?void 0:r.map(u=>GetWidgetsResponse_WidgetItem_Moderator.fromPartial(u)))||[],n.totalMods=e82.totalMods??void 0,n.googleCalendarId=e82.googleCalendarId??void 0,n.requiresSync=e82.requiresSync??void 0,n.configuration=e82.configuration!==void 0&&e82.configuration!==null?CalendarWidgetConfiguration.fromPartial(e82.configuration):void 0,n.text=e82.text??void 0,n.css=e82.css??void 0,n.stylesheetUrl=e82.stylesheetUrl??void 0,n.height=e82.height??void 0,n.imageData=((a=e82.imageData)==null?void 0:a.map(u=>WidgetImage.fromPartial(u)))||[],n}};messageTypeRegistry.set(GetWidgetsResponse_WidgetItem.$type,GetWidgetsResponse_WidgetItem);function createBaseGetWidgetsResponse_WidgetItem_Data(){return{url:void 0,linkUrl:void 0,height:void 0,width:void 0,iconUrl:void 0,name:void 0,prefixedName:void 0,isSubscribed:void 0,type:void 0,subscribers:void 0,communityIcon:void 0,isNsfw:void 0,text:void 0,children:[]}}var GetWidgetsResponse_WidgetItem_Data={$type:"devvit.plugin.redditapi.widgets.GetWidgetsResponse.WidgetItem.Data",encode(e82,n=_m0.Writer.create()){e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(10).fork()).ldelim(),e82.linkUrl!==void 0&&StringValue.encode({value:e82.linkUrl},n.uint32(18).fork()).ldelim(),e82.height!==void 0&&Int32Value.encode({value:e82.height},n.uint32(26).fork()).ldelim(),e82.width!==void 0&&Int32Value.encode({value:e82.width},n.uint32(34).fork()).ldelim(),e82.iconUrl!==void 0&&StringValue.encode({value:e82.iconUrl},n.uint32(42).fork()).ldelim(),e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(50).fork()).ldelim(),e82.prefixedName!==void 0&&StringValue.encode({value:e82.prefixedName},n.uint32(58).fork()).ldelim(),e82.isSubscribed!==void 0&&BoolValue.encode({value:e82.isSubscribed},n.uint32(66).fork()).ldelim(),e82.type!==void 0&&StringValue.encode({value:e82.type},n.uint32(74).fork()).ldelim(),e82.subscribers!==void 0&&Int64Value.encode({value:e82.subscribers},n.uint32(82).fork()).ldelim(),e82.communityIcon!==void 0&&StringValue.encode({value:e82.communityIcon},n.uint32(90).fork()).ldelim(),e82.isNsfw!==void 0&&BoolValue.encode({value:e82.isNsfw},n.uint32(98).fork()).ldelim(),e82.text!==void 0&&StringValue.encode({value:e82.text},n.uint32(106).fork()).ldelim();for(let t of e82.children)MenuWidgetItem.encode(t,n.uint32(114).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsResponse_WidgetItem_Data();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.linkUrl=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.height=Int32Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.width=Int32Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.iconUrl=StringValue.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.prefixedName=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.isSubscribed=BoolValue.decode(t,t.uint32()).value;continue;case 9:if(r!==74)break;d.type=StringValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.subscribers=Int64Value.decode(t,t.uint32()).value;continue;case 11:if(r!==90)break;d.communityIcon=StringValue.decode(t,t.uint32()).value;continue;case 12:if(r!==98)break;d.isNsfw=BoolValue.decode(t,t.uint32()).value;continue;case 13:if(r!==106)break;d.text=StringValue.decode(t,t.uint32()).value;continue;case 14:if(r!==114)break;d.children.push(MenuWidgetItem.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$f(e82.url)?String(e82.url):void 0,linkUrl:isSet$f(e82.linkUrl)?String(e82.linkUrl):void 0,height:isSet$f(e82.height)?Number(e82.height):void 0,width:isSet$f(e82.width)?Number(e82.width):void 0,iconUrl:isSet$f(e82.iconUrl)?String(e82.iconUrl):void 0,name:isSet$f(e82.name)?String(e82.name):void 0,prefixedName:isSet$f(e82.prefixedName)?String(e82.prefixedName):void 0,isSubscribed:isSet$f(e82.isSubscribed)?!!e82.isSubscribed:void 0,type:isSet$f(e82.type)?String(e82.type):void 0,subscribers:isSet$f(e82.subscribers)?Number(e82.subscribers):void 0,communityIcon:isSet$f(e82.communityIcon)?String(e82.communityIcon):void 0,isNsfw:isSet$f(e82.isNsfw)?!!e82.isNsfw:void 0,text:isSet$f(e82.text)?String(e82.text):void 0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>MenuWidgetItem.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.url!==void 0&&(n.url=e82.url),e82.linkUrl!==void 0&&(n.linkUrl=e82.linkUrl),e82.height!==void 0&&(n.height=e82.height),e82.width!==void 0&&(n.width=e82.width),e82.iconUrl!==void 0&&(n.iconUrl=e82.iconUrl),e82.name!==void 0&&(n.name=e82.name),e82.prefixedName!==void 0&&(n.prefixedName=e82.prefixedName),e82.isSubscribed!==void 0&&(n.isSubscribed=e82.isSubscribed),e82.type!==void 0&&(n.type=e82.type),e82.subscribers!==void 0&&(n.subscribers=e82.subscribers),e82.communityIcon!==void 0&&(n.communityIcon=e82.communityIcon),e82.isNsfw!==void 0&&(n.isNsfw=e82.isNsfw),e82.text!==void 0&&(n.text=e82.text),(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>MenuWidgetItem.toJSON(o))),n},create(e82){return GetWidgetsResponse_WidgetItem_Data.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGetWidgetsResponse_WidgetItem_Data();return n.url=e82.url??void 0,n.linkUrl=e82.linkUrl??void 0,n.height=e82.height??void 0,n.width=e82.width??void 0,n.iconUrl=e82.iconUrl??void 0,n.name=e82.name??void 0,n.prefixedName=e82.prefixedName??void 0,n.isSubscribed=e82.isSubscribed??void 0,n.type=e82.type??void 0,n.subscribers=e82.subscribers??void 0,n.communityIcon=e82.communityIcon??void 0,n.isNsfw=e82.isNsfw??void 0,n.text=e82.text??void 0,n.children=((t=e82.children)==null?void 0:t.map(o=>MenuWidgetItem.fromPartial(o)))||[],n}};messageTypeRegistry.set(GetWidgetsResponse_WidgetItem_Data.$type,GetWidgetsResponse_WidgetItem_Data);function createBaseGetWidgetsResponse_WidgetItem_Moderator(){return{name:"",authorFlairType:"",authorFlairTextColor:"",authorFlairBackgroundColor:"",authorFalirText:"",authorFlairRichtext:[]}}var GetWidgetsResponse_WidgetItem_Moderator={$type:"devvit.plugin.redditapi.widgets.GetWidgetsResponse.WidgetItem.Moderator",encode(e82,n=_m0.Writer.create()){e82.name!==""&&n.uint32(10).string(e82.name),e82.authorFlairType!==""&&n.uint32(18).string(e82.authorFlairType),e82.authorFlairTextColor!==""&&n.uint32(26).string(e82.authorFlairTextColor),e82.authorFlairBackgroundColor!==""&&n.uint32(34).string(e82.authorFlairBackgroundColor),e82.authorFalirText!==""&&n.uint32(42).string(e82.authorFalirText);for(let t of e82.authorFlairRichtext)AuthorFlairRichText.encode(t,n.uint32(50).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsResponse_WidgetItem_Moderator();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.name=t.string();continue;case 2:if(r!==18)break;d.authorFlairType=t.string();continue;case 3:if(r!==26)break;d.authorFlairTextColor=t.string();continue;case 4:if(r!==34)break;d.authorFlairBackgroundColor=t.string();continue;case 5:if(r!==42)break;d.authorFalirText=t.string();continue;case 6:if(r!==50)break;d.authorFlairRichtext.push(AuthorFlairRichText.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{name:isSet$f(e82.name)?globalThis.String(e82.name):"",authorFlairType:isSet$f(e82.authorFlairType)?globalThis.String(e82.authorFlairType):"",authorFlairTextColor:isSet$f(e82.authorFlairTextColor)?globalThis.String(e82.authorFlairTextColor):"",authorFlairBackgroundColor:isSet$f(e82.authorFlairBackgroundColor)?globalThis.String(e82.authorFlairBackgroundColor):"",authorFalirText:isSet$f(e82.authorFalirText)?globalThis.String(e82.authorFalirText):"",authorFlairRichtext:globalThis.Array.isArray(e82?.authorFlairRichtext)?e82.authorFlairRichtext.map(n=>AuthorFlairRichText.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.name!==""&&(n.name=e82.name),e82.authorFlairType!==""&&(n.authorFlairType=e82.authorFlairType),e82.authorFlairTextColor!==""&&(n.authorFlairTextColor=e82.authorFlairTextColor),e82.authorFlairBackgroundColor!==""&&(n.authorFlairBackgroundColor=e82.authorFlairBackgroundColor),e82.authorFalirText!==""&&(n.authorFalirText=e82.authorFalirText),(t=e82.authorFlairRichtext)!=null&&t.length&&(n.authorFlairRichtext=e82.authorFlairRichtext.map(o=>AuthorFlairRichText.toJSON(o))),n},create(e82){return GetWidgetsResponse_WidgetItem_Moderator.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGetWidgetsResponse_WidgetItem_Moderator();return n.name=e82.name??"",n.authorFlairType=e82.authorFlairType??"",n.authorFlairTextColor=e82.authorFlairTextColor??"",n.authorFlairBackgroundColor=e82.authorFlairBackgroundColor??"",n.authorFalirText=e82.authorFalirText??"",n.authorFlairRichtext=((t=e82.authorFlairRichtext)==null?void 0:t.map(o=>AuthorFlairRichText.fromPartial(o)))||[],n}};messageTypeRegistry.set(GetWidgetsResponse_WidgetItem_Moderator.$type,GetWidgetsResponse_WidgetItem_Moderator);function createBaseGetWidgetsResponse_WidgetItem_PostFlairTemplate(){return{text:"",richtext:[],backgroundColor:"",templateId:"",textColor:"",type:""}}var GetWidgetsResponse_WidgetItem_PostFlairTemplate={$type:"devvit.plugin.redditapi.widgets.GetWidgetsResponse.WidgetItem.PostFlairTemplate",encode(e82,n=_m0.Writer.create()){e82.text!==""&&n.uint32(10).string(e82.text);for(let t of e82.richtext)AuthorFlairRichText.encode(t,n.uint32(18).fork()).ldelim();return e82.backgroundColor!==""&&n.uint32(26).string(e82.backgroundColor),e82.templateId!==""&&n.uint32(34).string(e82.templateId),e82.textColor!==""&&n.uint32(42).string(e82.textColor),e82.type!==""&&n.uint32(50).string(e82.type),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsResponse_WidgetItem_PostFlairTemplate();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.text=t.string();continue;case 2:if(r!==18)break;d.richtext.push(AuthorFlairRichText.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.backgroundColor=t.string();continue;case 4:if(r!==34)break;d.templateId=t.string();continue;case 5:if(r!==42)break;d.textColor=t.string();continue;case 6:if(r!==50)break;d.type=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{text:isSet$f(e82.text)?globalThis.String(e82.text):"",richtext:globalThis.Array.isArray(e82?.richtext)?e82.richtext.map(n=>AuthorFlairRichText.fromJSON(n)):[],backgroundColor:isSet$f(e82.backgroundColor)?globalThis.String(e82.backgroundColor):"",templateId:isSet$f(e82.templateId)?globalThis.String(e82.templateId):"",textColor:isSet$f(e82.textColor)?globalThis.String(e82.textColor):"",type:isSet$f(e82.type)?globalThis.String(e82.type):""}},toJSON(e82){var t;let n={};return e82.text!==""&&(n.text=e82.text),(t=e82.richtext)!=null&&t.length&&(n.richtext=e82.richtext.map(o=>AuthorFlairRichText.toJSON(o))),e82.backgroundColor!==""&&(n.backgroundColor=e82.backgroundColor),e82.templateId!==""&&(n.templateId=e82.templateId),e82.textColor!==""&&(n.textColor=e82.textColor),e82.type!==""&&(n.type=e82.type),n},create(e82){return GetWidgetsResponse_WidgetItem_PostFlairTemplate.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGetWidgetsResponse_WidgetItem_PostFlairTemplate();return n.text=e82.text??"",n.richtext=((t=e82.richtext)==null?void 0:t.map(o=>AuthorFlairRichText.fromPartial(o)))||[],n.backgroundColor=e82.backgroundColor??"",n.templateId=e82.templateId??"",n.textColor=e82.textColor??"",n.type=e82.type??"",n}};messageTypeRegistry.set(GetWidgetsResponse_WidgetItem_PostFlairTemplate.$type,GetWidgetsResponse_WidgetItem_PostFlairTemplate);function createBaseGetWidgetsResponse_WidgetItem_TemplatesEntry(){return{key:"",value:void 0}}var GetWidgetsResponse_WidgetItem_TemplatesEntry={$type:"devvit.plugin.redditapi.widgets.GetWidgetsResponse.WidgetItem.TemplatesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&GetWidgetsResponse_WidgetItem_PostFlairTemplate.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsResponse_WidgetItem_TemplatesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=GetWidgetsResponse_WidgetItem_PostFlairTemplate.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$f(e82.key)?globalThis.String(e82.key):"",value:isSet$f(e82.value)?GetWidgetsResponse_WidgetItem_PostFlairTemplate.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=GetWidgetsResponse_WidgetItem_PostFlairTemplate.toJSON(e82.value)),n},create(e82){return GetWidgetsResponse_WidgetItem_TemplatesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWidgetsResponse_WidgetItem_TemplatesEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?GetWidgetsResponse_WidgetItem_PostFlairTemplate.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(GetWidgetsResponse_WidgetItem_TemplatesEntry.$type,GetWidgetsResponse_WidgetItem_TemplatesEntry);function createBaseGetWidgetsResponse_ItemsEntry(){return{key:"",value:void 0}}var GetWidgetsResponse_ItemsEntry={$type:"devvit.plugin.redditapi.widgets.GetWidgetsResponse.ItemsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&GetWidgetsResponse_WidgetItem.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetsResponse_ItemsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=GetWidgetsResponse_WidgetItem.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$f(e82.key)?globalThis.String(e82.key):"",value:isSet$f(e82.value)?GetWidgetsResponse_WidgetItem.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=GetWidgetsResponse_WidgetItem.toJSON(e82.value)),n},create(e82){return GetWidgetsResponse_ItemsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWidgetsResponse_ItemsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?GetWidgetsResponse_WidgetItem.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(GetWidgetsResponse_ItemsEntry.$type,GetWidgetsResponse_ItemsEntry);function createBaseMenuWidgetItem(){return{text:void 0,url:void 0,children:[]}}var MenuWidgetItem={$type:"devvit.plugin.redditapi.widgets.MenuWidgetItem",encode(e82,n=_m0.Writer.create()){e82.text!==void 0&&StringValue.encode({value:e82.text},n.uint32(10).fork()).ldelim(),e82.url!==void 0&&StringValue.encode({value:e82.url},n.uint32(18).fork()).ldelim();for(let t of e82.children)MenuWidgetItem.encode(t,n.uint32(26).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseMenuWidgetItem();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.text=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.url=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.children.push(MenuWidgetItem.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{text:isSet$f(e82.text)?String(e82.text):void 0,url:isSet$f(e82.url)?String(e82.url):void 0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>MenuWidgetItem.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.text!==void 0&&(n.text=e82.text),e82.url!==void 0&&(n.url=e82.url),(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>MenuWidgetItem.toJSON(o))),n},create(e82){return MenuWidgetItem.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseMenuWidgetItem();return n.text=e82.text??void 0,n.url=e82.url??void 0,n.children=((t=e82.children)==null?void 0:t.map(o=>MenuWidgetItem.fromPartial(o)))||[],n}};messageTypeRegistry.set(MenuWidgetItem.$type,MenuWidgetItem);function createBaseOrderWidgetsRequest(){return{subreddit:"",order:[]}}var OrderWidgetsRequest={$type:"devvit.plugin.redditapi.widgets.OrderWidgetsRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit);for(let t of e82.order)n.uint32(18).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseOrderWidgetsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.order.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",order:globalThis.Array.isArray(e82?.order)?e82.order.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),(t=e82.order)!=null&&t.length&&(n.order=e82.order),n},create(e82){return OrderWidgetsRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseOrderWidgetsRequest();return n.subreddit=e82.subreddit??"",n.order=((t=e82.order)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(OrderWidgetsRequest.$type,OrderWidgetsRequest);function createBaseGetWidgetImageUploadLeaseRequest(){return{subreddit:"",filepath:"",mimetype:""}}var GetWidgetImageUploadLeaseRequest={$type:"devvit.plugin.redditapi.widgets.GetWidgetImageUploadLeaseRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.filepath!==""&&n.uint32(18).string(e82.filepath),e82.mimetype!==""&&n.uint32(26).string(e82.mimetype),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetImageUploadLeaseRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.filepath=t.string();continue;case 3:if(r!==26)break;d.mimetype=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",filepath:isSet$f(e82.filepath)?globalThis.String(e82.filepath):"",mimetype:isSet$f(e82.mimetype)?globalThis.String(e82.mimetype):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.filepath!==""&&(n.filepath=e82.filepath),e82.mimetype!==""&&(n.mimetype=e82.mimetype),n},create(e82){return GetWidgetImageUploadLeaseRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWidgetImageUploadLeaseRequest();return n.subreddit=e82.subreddit??"",n.filepath=e82.filepath??"",n.mimetype=e82.mimetype??"",n}};messageTypeRegistry.set(GetWidgetImageUploadLeaseRequest.$type,GetWidgetImageUploadLeaseRequest);function createBaseGetWidgetImageUploadLeaseResponse(){return{s3UploadLease:void 0,websocketUrl:""}}var GetWidgetImageUploadLeaseResponse={$type:"devvit.plugin.redditapi.widgets.GetWidgetImageUploadLeaseResponse",encode(e82,n=_m0.Writer.create()){return e82.s3UploadLease!==void 0&&GetWidgetImageUploadLeaseResponse_S3UploadLease.encode(e82.s3UploadLease,n.uint32(10).fork()).ldelim(),e82.websocketUrl!==""&&n.uint32(18).string(e82.websocketUrl),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetImageUploadLeaseResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.s3UploadLease=GetWidgetImageUploadLeaseResponse_S3UploadLease.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.websocketUrl=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{s3UploadLease:isSet$f(e82.s3UploadLease)?GetWidgetImageUploadLeaseResponse_S3UploadLease.fromJSON(e82.s3UploadLease):void 0,websocketUrl:isSet$f(e82.websocketUrl)?globalThis.String(e82.websocketUrl):""}},toJSON(e82){let n={};return e82.s3UploadLease!==void 0&&(n.s3UploadLease=GetWidgetImageUploadLeaseResponse_S3UploadLease.toJSON(e82.s3UploadLease)),e82.websocketUrl!==""&&(n.websocketUrl=e82.websocketUrl),n},create(e82){return GetWidgetImageUploadLeaseResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWidgetImageUploadLeaseResponse();return n.s3UploadLease=e82.s3UploadLease!==void 0&&e82.s3UploadLease!==null?GetWidgetImageUploadLeaseResponse_S3UploadLease.fromPartial(e82.s3UploadLease):void 0,n.websocketUrl=e82.websocketUrl??"",n}};messageTypeRegistry.set(GetWidgetImageUploadLeaseResponse.$type,GetWidgetImageUploadLeaseResponse);function createBaseGetWidgetImageUploadLeaseResponse_S3UploadLease(){return{action:"",fields:[]}}var GetWidgetImageUploadLeaseResponse_S3UploadLease={$type:"devvit.plugin.redditapi.widgets.GetWidgetImageUploadLeaseResponse.S3UploadLease",encode(e82,n=_m0.Writer.create()){e82.action!==""&&n.uint32(10).string(e82.action);for(let t of e82.fields)GetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetImageUploadLeaseResponse_S3UploadLease();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.action=t.string();continue;case 2:if(r!==18)break;d.fields.push(GetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{action:isSet$f(e82.action)?globalThis.String(e82.action):"",fields:globalThis.Array.isArray(e82?.fields)?e82.fields.map(n=>GetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.action!==""&&(n.action=e82.action),(t=e82.fields)!=null&&t.length&&(n.fields=e82.fields.map(o=>GetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair.toJSON(o))),n},create(e82){return GetWidgetImageUploadLeaseResponse_S3UploadLease.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGetWidgetImageUploadLeaseResponse_S3UploadLease();return n.action=e82.action??"",n.fields=((t=e82.fields)==null?void 0:t.map(o=>GetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair.fromPartial(o)))||[],n}};messageTypeRegistry.set(GetWidgetImageUploadLeaseResponse_S3UploadLease.$type,GetWidgetImageUploadLeaseResponse_S3UploadLease);function createBaseGetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair(){return{name:"",value:""}}var GetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair={$type:"devvit.plugin.redditapi.widgets.GetWidgetImageUploadLeaseResponse.S3UploadLease.NameValuePair",encode(e82,n=_m0.Writer.create()){return e82.name!==""&&n.uint32(10).string(e82.name),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.name=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{name:isSet$f(e82.name)?globalThis.String(e82.name):"",value:isSet$f(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.name!==""&&(n.name=e82.name),e82.value!==""&&(n.value=e82.value),n},create(e82){return GetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair();return n.name=e82.name??"",n.value=e82.value??"",n}};messageTypeRegistry.set(GetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair.$type,GetWidgetImageUploadLeaseResponse_S3UploadLease_NameValuePair);function createBaseCustomWidget(){return{id:"",kind:"",shortName:"",text:"",height:0,css:"",imageData:[],styles:void 0}}var CustomWidget={$type:"devvit.plugin.redditapi.widgets.CustomWidget",encode(e82,n=_m0.Writer.create()){e82.id!==""&&n.uint32(10).string(e82.id),e82.kind!==""&&n.uint32(18).string(e82.kind),e82.shortName!==""&&n.uint32(26).string(e82.shortName),e82.text!==""&&n.uint32(34).string(e82.text),e82.height!==0&&n.uint32(48).int32(e82.height),e82.css!==""&&n.uint32(58).string(e82.css);for(let t of e82.imageData)WidgetImage.encode(t,n.uint32(66).fork()).ldelim();return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(74).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCustomWidget();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.kind=t.string();continue;case 3:if(r!==26)break;d.shortName=t.string();continue;case 4:if(r!==34)break;d.text=t.string();continue;case 6:if(r!==48)break;d.height=t.int32();continue;case 7:if(r!==58)break;d.css=t.string();continue;case 8:if(r!==66)break;d.imageData.push(WidgetImage.decode(t,t.uint32()));continue;case 9:if(r!==74)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$f(e82.id)?globalThis.String(e82.id):"",kind:isSet$f(e82.kind)?globalThis.String(e82.kind):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",text:isSet$f(e82.text)?globalThis.String(e82.text):"",height:isSet$f(e82.height)?globalThis.Number(e82.height):0,css:isSet$f(e82.css)?globalThis.String(e82.css):"",imageData:globalThis.Array.isArray(e82?.imageData)?e82.imageData.map(n=>WidgetImage.fromJSON(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.id!==""&&(n.id=e82.id),e82.kind!==""&&(n.kind=e82.kind),e82.shortName!==""&&(n.shortName=e82.shortName),e82.text!==""&&(n.text=e82.text),e82.height!==0&&(n.height=Math.round(e82.height)),e82.css!==""&&(n.css=e82.css),(t=e82.imageData)!=null&&t.length&&(n.imageData=e82.imageData.map(o=>WidgetImage.toJSON(o))),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return CustomWidget.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseCustomWidget();return n.id=e82.id??"",n.kind=e82.kind??"",n.shortName=e82.shortName??"",n.text=e82.text??"",n.height=e82.height??0,n.css=e82.css??"",n.imageData=((t=e82.imageData)==null?void 0:t.map(o=>WidgetImage.fromPartial(o)))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(CustomWidget.$type,CustomWidget);function createBaseAddCustomWidgetRequest(){return{subreddit:"",shortName:"",text:"",height:0,css:"",imageData:[],styles:void 0}}var AddCustomWidgetRequest={$type:"devvit.plugin.redditapi.widgets.AddCustomWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.shortName!==""&&n.uint32(18).string(e82.shortName),e82.text!==""&&n.uint32(26).string(e82.text),e82.height!==0&&n.uint32(32).int32(e82.height),e82.css!==""&&n.uint32(42).string(e82.css);for(let t of e82.imageData)WidgetImage.encode(t,n.uint32(50).fork()).ldelim();return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAddCustomWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.shortName=t.string();continue;case 3:if(r!==26)break;d.text=t.string();continue;case 4:if(r!==32)break;d.height=t.int32();continue;case 5:if(r!==42)break;d.css=t.string();continue;case 6:if(r!==50)break;d.imageData.push(WidgetImage.decode(t,t.uint32()));continue;case 7:if(r!==58)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",text:isSet$f(e82.text)?globalThis.String(e82.text):"",height:isSet$f(e82.height)?globalThis.Number(e82.height):0,css:isSet$f(e82.css)?globalThis.String(e82.css):"",imageData:globalThis.Array.isArray(e82?.imageData)?e82.imageData.map(n=>WidgetImage.fromJSON(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.shortName!==""&&(n.shortName=e82.shortName),e82.text!==""&&(n.text=e82.text),e82.height!==0&&(n.height=Math.round(e82.height)),e82.css!==""&&(n.css=e82.css),(t=e82.imageData)!=null&&t.length&&(n.imageData=e82.imageData.map(o=>WidgetImage.toJSON(o))),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return AddCustomWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseAddCustomWidgetRequest();return n.subreddit=e82.subreddit??"",n.shortName=e82.shortName??"",n.text=e82.text??"",n.height=e82.height??0,n.css=e82.css??"",n.imageData=((t=e82.imageData)==null?void 0:t.map(o=>WidgetImage.fromPartial(o)))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(AddCustomWidgetRequest.$type,AddCustomWidgetRequest);function createBaseUpdateCustomWidgetRequest(){return{subreddit:"",id:"",shortName:"",text:"",height:0,css:"",imageData:[],styles:void 0}}var UpdateCustomWidgetRequest={$type:"devvit.plugin.redditapi.widgets.UpdateCustomWidgetRequest",encode(e82,n=_m0.Writer.create()){e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.id!==""&&n.uint32(18).string(e82.id),e82.shortName!==""&&n.uint32(26).string(e82.shortName),e82.text!==""&&n.uint32(34).string(e82.text),e82.height!==0&&n.uint32(40).int32(e82.height),e82.css!==""&&n.uint32(50).string(e82.css);for(let t of e82.imageData)WidgetImage.encode(t,n.uint32(58).fork()).ldelim();return e82.styles!==void 0&&WidgetStyles.encode(e82.styles,n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateCustomWidgetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==26)break;d.shortName=t.string();continue;case 4:if(r!==34)break;d.text=t.string();continue;case 5:if(r!==40)break;d.height=t.int32();continue;case 6:if(r!==50)break;d.css=t.string();continue;case 7:if(r!==58)break;d.imageData.push(WidgetImage.decode(t,t.uint32()));continue;case 8:if(r!==66)break;d.styles=WidgetStyles.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$f(e82.subreddit)?globalThis.String(e82.subreddit):"",id:isSet$f(e82.id)?globalThis.String(e82.id):"",shortName:isSet$f(e82.shortName)?globalThis.String(e82.shortName):"",text:isSet$f(e82.text)?globalThis.String(e82.text):"",height:isSet$f(e82.height)?globalThis.Number(e82.height):0,css:isSet$f(e82.css)?globalThis.String(e82.css):"",imageData:globalThis.Array.isArray(e82?.imageData)?e82.imageData.map(n=>WidgetImage.fromJSON(n)):[],styles:isSet$f(e82.styles)?WidgetStyles.fromJSON(e82.styles):void 0}},toJSON(e82){var t;let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.id!==""&&(n.id=e82.id),e82.shortName!==""&&(n.shortName=e82.shortName),e82.text!==""&&(n.text=e82.text),e82.height!==0&&(n.height=Math.round(e82.height)),e82.css!==""&&(n.css=e82.css),(t=e82.imageData)!=null&&t.length&&(n.imageData=e82.imageData.map(o=>WidgetImage.toJSON(o))),e82.styles!==void 0&&(n.styles=WidgetStyles.toJSON(e82.styles)),n},create(e82){return UpdateCustomWidgetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUpdateCustomWidgetRequest();return n.subreddit=e82.subreddit??"",n.id=e82.id??"",n.shortName=e82.shortName??"",n.text=e82.text??"",n.height=e82.height??0,n.css=e82.css??"",n.imageData=((t=e82.imageData)==null?void 0:t.map(o=>WidgetImage.fromPartial(o)))||[],n.styles=e82.styles!==void 0&&e82.styles!==null?WidgetStyles.fromPartial(e82.styles):void 0,n}};messageTypeRegistry.set(UpdateCustomWidgetRequest.$type,UpdateCustomWidgetRequest);function isObject$b(e82){return typeof e82=="object"&&e82!==null}function isSet$f(e82){return e82!=null}var WidgetsDefinition={name:"Widgets",fullName:"devvit.plugin.redditapi.widgets.Widgets",methods:{addButtonWidget:{name:"AddButtonWidget",requestType:AddButtonWidgetRequest,requestStream:!1,responseType:ButtonWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116]),new Uint8Array([2,24,1]),new Uint8Array([8,42,6,98,117,116,116,111,110])]}}},addImageWidget:{name:"AddImageWidget",requestType:AddImageWidgetRequest,requestStream:!1,responseType:ImageWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116]),new Uint8Array([2,24,1]),new Uint8Array([7,42,5,105,109,97,103,101])]}}},addCalendarWidget:{name:"AddCalendarWidget",requestType:AddCalendarWidgetRequest,requestStream:!1,responseType:CalendarWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116]),new Uint8Array([2,24,1]),new Uint8Array([10,42,8,99,97,108,101,110,100,97,114])]}}},addTextAreaWidget:{name:"AddTextAreaWidget",requestType:AddTextAreaWidgetRequest,requestStream:!1,responseType:TextAreaWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116]),new Uint8Array([2,24,1]),new Uint8Array([10,42,8,116,101,120,116,97,114,101,97])]}}},addCommunityListWidget:{name:"AddCommunityListWidget",requestType:AddCommunityListWidgetRequest,requestStream:!1,responseType:CommunityListWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116]),new Uint8Array([2,24,1]),new Uint8Array([16,42,14,99,111,109,109,117,110,105,116,121,45,108,105,115,116])]}}},addPostFlairWidget:{name:"AddPostFlairWidget",requestType:AddPostFlairWidgetRequest,requestStream:!1,responseType:PostFlairWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116]),new Uint8Array([2,24,1]),new Uint8Array([12,42,10,112,111,115,116,45,102,108,97,105,114])]}}},addCustomWidget:{name:"AddCustomWidget",requestType:AddCustomWidgetRequest,requestStream:!1,responseType:CustomWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116]),new Uint8Array([2,24,1]),new Uint8Array([8,42,6,99,117,115,116,111,109])]}}},deleteWidget:{name:"DeleteWidget",requestType:DeleteWidgetRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([8,10,6,68,69,76,69,84,69]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,47,123,105,100,125])]}}},updateButtonWidget:{name:"UpdateButtonWidget",requestType:UpdateButtonWidgetRequest,requestStream:!1,responseType:ButtonWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,80,85,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,47,123,105,100,125]),new Uint8Array([2,24,1]),new Uint8Array([8,42,6,98,117,116,116,111,110])]}}},updateImageWidget:{name:"UpdateImageWidget",requestType:UpdateImageWidgetRequest,requestStream:!1,responseType:ImageWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,80,85,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,47,123,105,100,125]),new Uint8Array([2,24,1]),new Uint8Array([7,42,5,105,109,97,103,101])]}}},updateCalendarWidget:{name:"UpdateCalendarWidget",requestType:UpdateCalendarWidgetRequest,requestStream:!1,responseType:CalendarWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,80,85,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,47,123,105,100,125]),new Uint8Array([2,24,1]),new Uint8Array([10,42,8,99,97,108,101,110,100,97,114])]}}},updateTextAreaWidget:{name:"UpdateTextAreaWidget",requestType:UpdateTextAreaWidgetRequest,requestStream:!1,responseType:TextAreaWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,80,85,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,47,123,105,100,125]),new Uint8Array([2,24,1]),new Uint8Array([10,42,8,116,101,120,116,97,114,101,97])]}}},updateCommunityListWidget:{name:"UpdateCommunityListWidget",requestType:UpdateCommunityListWidgetRequest,requestStream:!1,responseType:UpdateCommunityListWidgetResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,80,85,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,47,123,105,100,125]),new Uint8Array([2,24,1]),new Uint8Array([16,42,14,99,111,109,109,117,110,105,116,121,45,108,105,115,116])]}}},updatePostFlairWidget:{name:"UpdatePostFlairWidget",requestType:UpdatePostFlairWidgetRequest,requestStream:!1,responseType:PostFlairWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,80,85,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,47,123,105,100,125]),new Uint8Array([2,24,1]),new Uint8Array([12,42,10,112,111,115,116,45,102,108,97,105,114])]}}},updateCustomWidget:{name:"UpdateCustomWidget",requestType:UpdateCustomWidgetRequest,requestStream:!1,responseType:CustomWidget,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,80,85,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,47,123,105,100,125]),new Uint8Array([2,24,1]),new Uint8Array([8,42,6,99,117,115,116,111,109])]}}},getWidgetImageUploadLease:{name:"GetWidgetImageUploadLease",requestType:GetWidgetImageUploadLeaseRequest,requestStream:!1,responseType:GetWidgetImageUploadLeaseResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([43,18,41,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,95,105,109,97,103,101,95,117,112,108,111,97,100,95,115,51]),new Uint8Array([2,24,3])]}}},orderWidgets:{name:"OrderWidgets",requestType:OrderWidgetsRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([7,10,5,80,65,84,67,72]),new Uint8Array([41,18,39,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,95,111,114,100,101,114,47,115,101,99,116,105,111,110]),new Uint8Array([2,24,1])]}}},getWidgets:{name:"GetWidgets",requestType:GetWidgetsRequest,requestStream:!1,responseType:GetWidgetsResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([28,18,26,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,100,103,101,116,115])]}}}}};function createBaseGetWikiPagesRequest(){return{subreddit:""}}var GetWikiPagesRequest={$type:"devvit.plugin.redditapi.wiki.GetWikiPagesRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWikiPagesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),n},create(e82){return GetWikiPagesRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWikiPagesRequest();return n.subreddit=e82.subreddit??"",n}};messageTypeRegistry.set(GetWikiPagesRequest.$type,GetWikiPagesRequest);function createBaseGetWikiPagesResponse(){return{kind:"",data:[]}}var GetWikiPagesResponse={$type:"devvit.plugin.redditapi.wiki.GetWikiPagesResponse",encode(e82,n=_m0.Writer.create()){e82.kind!==""&&n.uint32(10).string(e82.kind);for(let t of e82.data)n.uint32(18).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWikiPagesResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$e(e82.kind)?globalThis.String(e82.kind):"",data:globalThis.Array.isArray(e82?.data)?e82.data.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.kind!==""&&(n.kind=e82.kind),(t=e82.data)!=null&&t.length&&(n.data=e82.data),n},create(e82){return GetWikiPagesResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseGetWikiPagesResponse();return n.kind=e82.kind??"",n.data=((t=e82.data)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(GetWikiPagesResponse.$type,GetWikiPagesResponse);function createBaseGetWikiPageRequest(){return{subreddit:"",page:""}}var GetWikiPageRequest={$type:"devvit.plugin.redditapi.wiki.GetWikiPageRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.page!==""&&n.uint32(18).string(e82.page),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWikiPageRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.page=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):"",page:isSet$e(e82.page)?globalThis.String(e82.page):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.page!==""&&(n.page=e82.page),n},create(e82){return GetWikiPageRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWikiPageRequest();return n.subreddit=e82.subreddit??"",n.page=e82.page??"",n}};messageTypeRegistry.set(GetWikiPageRequest.$type,GetWikiPageRequest);function createBaseWikiPage(){return{contentMd:"",contentHtml:"",revisionId:"",revisionDate:0,mayRevise:!1,reason:void 0,revisionBy:void 0}}var WikiPage={$type:"devvit.plugin.redditapi.wiki.WikiPage",encode(e82,n=_m0.Writer.create()){return e82.contentMd!==""&&n.uint32(10).string(e82.contentMd),e82.contentHtml!==""&&n.uint32(18).string(e82.contentHtml),e82.revisionId!==""&&n.uint32(26).string(e82.revisionId),e82.revisionDate!==0&&n.uint32(32).int64(e82.revisionDate),e82.mayRevise!==!1&&n.uint32(40).bool(e82.mayRevise),e82.reason!==void 0&&StringValue.encode({value:e82.reason},n.uint32(50).fork()).ldelim(),e82.revisionBy!==void 0&&WrappedUserObject.encode(e82.revisionBy,n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWikiPage();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.contentMd=t.string();continue;case 2:if(r!==18)break;d.contentHtml=t.string();continue;case 3:if(r!==26)break;d.revisionId=t.string();continue;case 4:if(r!==32)break;d.revisionDate=longToNumber$1(t.int64());continue;case 5:if(r!==40)break;d.mayRevise=t.bool();continue;case 6:if(r!==50)break;d.reason=StringValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.revisionBy=WrappedUserObject.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{contentMd:isSet$e(e82.contentMd)?globalThis.String(e82.contentMd):"",contentHtml:isSet$e(e82.contentHtml)?globalThis.String(e82.contentHtml):"",revisionId:isSet$e(e82.revisionId)?globalThis.String(e82.revisionId):"",revisionDate:isSet$e(e82.revisionDate)?globalThis.Number(e82.revisionDate):0,mayRevise:isSet$e(e82.mayRevise)?globalThis.Boolean(e82.mayRevise):!1,reason:isSet$e(e82.reason)?String(e82.reason):void 0,revisionBy:isSet$e(e82.revisionBy)?WrappedUserObject.fromJSON(e82.revisionBy):void 0}},toJSON(e82){let n={};return e82.contentMd!==""&&(n.contentMd=e82.contentMd),e82.contentHtml!==""&&(n.contentHtml=e82.contentHtml),e82.revisionId!==""&&(n.revisionId=e82.revisionId),e82.revisionDate!==0&&(n.revisionDate=Math.round(e82.revisionDate)),e82.mayRevise!==!1&&(n.mayRevise=e82.mayRevise),e82.reason!==void 0&&(n.reason=e82.reason),e82.revisionBy!==void 0&&(n.revisionBy=WrappedUserObject.toJSON(e82.revisionBy)),n},create(e82){return WikiPage.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWikiPage();return n.contentMd=e82.contentMd??"",n.contentHtml=e82.contentHtml??"",n.revisionId=e82.revisionId??"",n.revisionDate=e82.revisionDate??0,n.mayRevise=e82.mayRevise??!1,n.reason=e82.reason??void 0,n.revisionBy=e82.revisionBy!==void 0&&e82.revisionBy!==null?WrappedUserObject.fromPartial(e82.revisionBy):void 0,n}};messageTypeRegistry.set(WikiPage.$type,WikiPage);function createBaseGetWikiPageResponse(){return{kind:"",data:void 0}}var GetWikiPageResponse={$type:"devvit.plugin.redditapi.wiki.GetWikiPageResponse",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&WikiPage.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWikiPageResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=WikiPage.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$e(e82.kind)?globalThis.String(e82.kind):"",data:isSet$e(e82.data)?WikiPage.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=WikiPage.toJSON(e82.data)),n},create(e82){return GetWikiPageResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWikiPageResponse();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?WikiPage.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(GetWikiPageResponse.$type,GetWikiPageResponse);function createBaseEditWikiPageRequest(){return{subreddit:"",page:"",content:"",reason:""}}var EditWikiPageRequest={$type:"devvit.plugin.redditapi.wiki.EditWikiPageRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.page!==""&&n.uint32(18).string(e82.page),e82.content!==""&&n.uint32(26).string(e82.content),e82.reason!==""&&n.uint32(34).string(e82.reason),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseEditWikiPageRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.page=t.string();continue;case 3:if(r!==26)break;d.content=t.string();continue;case 4:if(r!==34)break;d.reason=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):"",page:isSet$e(e82.page)?globalThis.String(e82.page):"",content:isSet$e(e82.content)?globalThis.String(e82.content):"",reason:isSet$e(e82.reason)?globalThis.String(e82.reason):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.page!==""&&(n.page=e82.page),e82.content!==""&&(n.content=e82.content),e82.reason!==""&&(n.reason=e82.reason),n},create(e82){return EditWikiPageRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseEditWikiPageRequest();return n.subreddit=e82.subreddit??"",n.page=e82.page??"",n.content=e82.content??"",n.reason=e82.reason??"",n}};messageTypeRegistry.set(EditWikiPageRequest.$type,EditWikiPageRequest);function createBaseHideWikiPageRevisionRequest(){return{subreddit:"",page:"",revision:""}}var HideWikiPageRevisionRequest={$type:"devvit.plugin.redditapi.wiki.HideWikiPageRevisionRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.page!==""&&n.uint32(18).string(e82.page),e82.revision!==""&&n.uint32(26).string(e82.revision),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHideWikiPageRevisionRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.page=t.string();continue;case 3:if(r!==26)break;d.revision=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):"",page:isSet$e(e82.page)?globalThis.String(e82.page):"",revision:isSet$e(e82.revision)?globalThis.String(e82.revision):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.page!==""&&(n.page=e82.page),e82.revision!==""&&(n.revision=e82.revision),n},create(e82){return HideWikiPageRevisionRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseHideWikiPageRevisionRequest();return n.subreddit=e82.subreddit??"",n.page=e82.page??"",n.revision=e82.revision??"",n}};messageTypeRegistry.set(HideWikiPageRevisionRequest.$type,HideWikiPageRevisionRequest);function createBaseHideWikiPageRevisionResponse(){return{status:!1}}var HideWikiPageRevisionResponse={$type:"devvit.plugin.redditapi.wiki.HideWikiPageRevisionResponse",encode(e82,n=_m0.Writer.create()){return e82.status!==!1&&n.uint32(8).bool(e82.status),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHideWikiPageRevisionResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.status=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{status:isSet$e(e82.status)?globalThis.Boolean(e82.status):!1}},toJSON(e82){let n={};return e82.status!==!1&&(n.status=e82.status),n},create(e82){return HideWikiPageRevisionResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseHideWikiPageRevisionResponse();return n.status=e82.status??!1,n}};messageTypeRegistry.set(HideWikiPageRevisionResponse.$type,HideWikiPageRevisionResponse);function createBaseGetWikiPageRevisionsRequest(){return{subreddit:"",page:"",after:void 0,before:void 0,limit:void 0,count:void 0,show:void 0,srDetail:void 0}}var GetWikiPageRevisionsRequest={$type:"devvit.plugin.redditapi.wiki.GetWikiPageRevisionsRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.page!==""&&n.uint32(18).string(e82.page),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(26).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(34).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(42).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(50).fork()).ldelim(),e82.show!==void 0&&BoolValue.encode({value:e82.show},n.uint32(58).fork()).ldelim(),e82.srDetail!==void 0&&BoolValue.encode({value:e82.srDetail},n.uint32(66).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWikiPageRevisionsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.page=t.string();continue;case 3:if(r!==26)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.show=BoolValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;d.srDetail=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):"",page:isSet$e(e82.page)?globalThis.String(e82.page):"",after:isSet$e(e82.after)?String(e82.after):void 0,before:isSet$e(e82.before)?String(e82.before):void 0,limit:isSet$e(e82.limit)?Number(e82.limit):void 0,count:isSet$e(e82.count)?Number(e82.count):void 0,show:isSet$e(e82.show)?!!e82.show:void 0,srDetail:isSet$e(e82.srDetail)?!!e82.srDetail:void 0}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.page!==""&&(n.page=e82.page),e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.limit!==void 0&&(n.limit=e82.limit),e82.count!==void 0&&(n.count=e82.count),e82.show!==void 0&&(n.show=e82.show),e82.srDetail!==void 0&&(n.srDetail=e82.srDetail),n},create(e82){return GetWikiPageRevisionsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWikiPageRevisionsRequest();return n.subreddit=e82.subreddit??"",n.page=e82.page??"",n.after=e82.after??void 0,n.before=e82.before??void 0,n.limit=e82.limit??void 0,n.count=e82.count??void 0,n.show=e82.show??void 0,n.srDetail=e82.srDetail??void 0,n}};messageTypeRegistry.set(GetWikiPageRevisionsRequest.$type,GetWikiPageRevisionsRequest);function createBaseWikiPageRevision(){return{id:"",page:"",timestamp:0,reason:"",revisionHidden:!1,author:void 0}}var WikiPageRevision={$type:"devvit.plugin.redditapi.wiki.WikiPageRevision",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.page!==""&&n.uint32(18).string(e82.page),e82.timestamp!==0&&n.uint32(24).int64(e82.timestamp),e82.reason!==""&&n.uint32(34).string(e82.reason),e82.revisionHidden!==!1&&n.uint32(40).bool(e82.revisionHidden),e82.author!==void 0&&WrappedUserObject.encode(e82.author,n.uint32(50).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWikiPageRevision();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.page=t.string();continue;case 3:if(r!==24)break;d.timestamp=longToNumber$1(t.int64());continue;case 4:if(r!==34)break;d.reason=t.string();continue;case 5:if(r!==40)break;d.revisionHidden=t.bool();continue;case 6:if(r!==50)break;d.author=WrappedUserObject.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$e(e82.id)?globalThis.String(e82.id):"",page:isSet$e(e82.page)?globalThis.String(e82.page):"",timestamp:isSet$e(e82.timestamp)?globalThis.Number(e82.timestamp):0,reason:isSet$e(e82.reason)?globalThis.String(e82.reason):"",revisionHidden:isSet$e(e82.revisionHidden)?globalThis.Boolean(e82.revisionHidden):!1,author:isSet$e(e82.author)?WrappedUserObject.fromJSON(e82.author):void 0}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.page!==""&&(n.page=e82.page),e82.timestamp!==0&&(n.timestamp=Math.round(e82.timestamp)),e82.reason!==""&&(n.reason=e82.reason),e82.revisionHidden!==!1&&(n.revisionHidden=e82.revisionHidden),e82.author!==void 0&&(n.author=WrappedUserObject.toJSON(e82.author)),n},create(e82){return WikiPageRevision.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWikiPageRevision();return n.id=e82.id??"",n.page=e82.page??"",n.timestamp=e82.timestamp??0,n.reason=e82.reason??"",n.revisionHidden=e82.revisionHidden??!1,n.author=e82.author!==void 0&&e82.author!==null?WrappedUserObject.fromPartial(e82.author):void 0,n}};messageTypeRegistry.set(WikiPageRevision.$type,WikiPageRevision);function createBaseWikiPageRevisionListing(){return{kind:"",data:void 0}}var WikiPageRevisionListing={$type:"devvit.plugin.redditapi.wiki.WikiPageRevisionListing",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&WikiPageRevisionListing_Data.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWikiPageRevisionListing();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=WikiPageRevisionListing_Data.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$e(e82.kind)?globalThis.String(e82.kind):"",data:isSet$e(e82.data)?WikiPageRevisionListing_Data.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=WikiPageRevisionListing_Data.toJSON(e82.data)),n},create(e82){return WikiPageRevisionListing.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWikiPageRevisionListing();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?WikiPageRevisionListing_Data.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(WikiPageRevisionListing.$type,WikiPageRevisionListing);function createBaseWikiPageRevisionListing_Data(){return{after:void 0,before:void 0,children:[],dist:void 0}}var WikiPageRevisionListing_Data={$type:"devvit.plugin.redditapi.wiki.WikiPageRevisionListing.Data",encode(e82,n=_m0.Writer.create()){e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(10).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(18).fork()).ldelim();for(let t of e82.children)WikiPageRevision.encode(t,n.uint32(26).fork()).ldelim();return e82.dist!==void 0&&Int64Value.encode({value:e82.dist},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWikiPageRevisionListing_Data();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.children.push(WikiPageRevision.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.dist=Int64Value.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{after:isSet$e(e82.after)?String(e82.after):void 0,before:isSet$e(e82.before)?String(e82.before):void 0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>WikiPageRevision.fromJSON(n)):[],dist:isSet$e(e82.dist)?Number(e82.dist):void 0}},toJSON(e82){var t;let n={};return e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>WikiPageRevision.toJSON(o))),e82.dist!==void 0&&(n.dist=e82.dist),n},create(e82){return WikiPageRevisionListing_Data.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseWikiPageRevisionListing_Data();return n.after=e82.after??void 0,n.before=e82.before??void 0,n.children=((t=e82.children)==null?void 0:t.map(o=>WikiPageRevision.fromPartial(o)))||[],n.dist=e82.dist??void 0,n}};messageTypeRegistry.set(WikiPageRevisionListing_Data.$type,WikiPageRevisionListing_Data);function createBaseGetWikiRevisionsRequest(){return{subreddit:"",after:void 0,before:void 0,limit:void 0,count:void 0,show:void 0,srDetail:void 0}}var GetWikiRevisionsRequest={$type:"devvit.plugin.redditapi.wiki.GetWikiRevisionsRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.after!==void 0&&StringValue.encode({value:e82.after},n.uint32(18).fork()).ldelim(),e82.before!==void 0&&StringValue.encode({value:e82.before},n.uint32(26).fork()).ldelim(),e82.limit!==void 0&&Int64Value.encode({value:e82.limit},n.uint32(34).fork()).ldelim(),e82.count!==void 0&&Int64Value.encode({value:e82.count},n.uint32(42).fork()).ldelim(),e82.show!==void 0&&BoolValue.encode({value:e82.show},n.uint32(50).fork()).ldelim(),e82.srDetail!==void 0&&BoolValue.encode({value:e82.srDetail},n.uint32(58).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWikiRevisionsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.after=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.before=StringValue.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.limit=Int64Value.decode(t,t.uint32()).value;continue;case 5:if(r!==42)break;d.count=Int64Value.decode(t,t.uint32()).value;continue;case 6:if(r!==50)break;d.show=BoolValue.decode(t,t.uint32()).value;continue;case 7:if(r!==58)break;d.srDetail=BoolValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):"",after:isSet$e(e82.after)?String(e82.after):void 0,before:isSet$e(e82.before)?String(e82.before):void 0,limit:isSet$e(e82.limit)?Number(e82.limit):void 0,count:isSet$e(e82.count)?Number(e82.count):void 0,show:isSet$e(e82.show)?!!e82.show:void 0,srDetail:isSet$e(e82.srDetail)?!!e82.srDetail:void 0}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.after!==void 0&&(n.after=e82.after),e82.before!==void 0&&(n.before=e82.before),e82.limit!==void 0&&(n.limit=e82.limit),e82.count!==void 0&&(n.count=e82.count),e82.show!==void 0&&(n.show=e82.show),e82.srDetail!==void 0&&(n.srDetail=e82.srDetail),n},create(e82){return GetWikiRevisionsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWikiRevisionsRequest();return n.subreddit=e82.subreddit??"",n.after=e82.after??void 0,n.before=e82.before??void 0,n.limit=e82.limit??void 0,n.count=e82.count??void 0,n.show=e82.show??void 0,n.srDetail=e82.srDetail??void 0,n}};messageTypeRegistry.set(GetWikiRevisionsRequest.$type,GetWikiRevisionsRequest);function createBaseRevertWikiPageRequest(){return{subreddit:"",page:"",revision:""}}var RevertWikiPageRequest={$type:"devvit.plugin.redditapi.wiki.RevertWikiPageRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.page!==""&&n.uint32(18).string(e82.page),e82.revision!==""&&n.uint32(26).string(e82.revision),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRevertWikiPageRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.page=t.string();continue;case 3:if(r!==26)break;d.revision=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):"",page:isSet$e(e82.page)?globalThis.String(e82.page):"",revision:isSet$e(e82.revision)?globalThis.String(e82.revision):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.page!==""&&(n.page=e82.page),e82.revision!==""&&(n.revision=e82.revision),n},create(e82){return RevertWikiPageRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRevertWikiPageRequest();return n.subreddit=e82.subreddit??"",n.page=e82.page??"",n.revision=e82.revision??"",n}};messageTypeRegistry.set(RevertWikiPageRequest.$type,RevertWikiPageRequest);function createBaseGetWikiPageSettingsRequest(){return{subreddit:"",page:""}}var GetWikiPageSettingsRequest={$type:"devvit.plugin.redditapi.wiki.GetWikiPageSettingsRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.page!==""&&n.uint32(18).string(e82.page),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetWikiPageSettingsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.page=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):"",page:isSet$e(e82.page)?globalThis.String(e82.page):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.page!==""&&(n.page=e82.page),n},create(e82){return GetWikiPageSettingsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetWikiPageSettingsRequest();return n.subreddit=e82.subreddit??"",n.page=e82.page??"",n}};messageTypeRegistry.set(GetWikiPageSettingsRequest.$type,GetWikiPageSettingsRequest);function createBaseWikiPageSettings(){return{kind:"",data:void 0}}var WikiPageSettings={$type:"devvit.plugin.redditapi.wiki.WikiPageSettings",encode(e82,n=_m0.Writer.create()){return e82.kind!==""&&n.uint32(10).string(e82.kind),e82.data!==void 0&&WikiPageSettings_Data.encode(e82.data,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWikiPageSettings();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kind=t.string();continue;case 2:if(r!==18)break;d.data=WikiPageSettings_Data.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kind:isSet$e(e82.kind)?globalThis.String(e82.kind):"",data:isSet$e(e82.data)?WikiPageSettings_Data.fromJSON(e82.data):void 0}},toJSON(e82){let n={};return e82.kind!==""&&(n.kind=e82.kind),e82.data!==void 0&&(n.data=WikiPageSettings_Data.toJSON(e82.data)),n},create(e82){return WikiPageSettings.fromPartial(e82??{})},fromPartial(e82){let n=createBaseWikiPageSettings();return n.kind=e82.kind??"",n.data=e82.data!==void 0&&e82.data!==null?WikiPageSettings_Data.fromPartial(e82.data):void 0,n}};messageTypeRegistry.set(WikiPageSettings.$type,WikiPageSettings);function createBaseWikiPageSettings_Data(){return{permLevel:0,editors:[],listed:!1}}var WikiPageSettings_Data={$type:"devvit.plugin.redditapi.wiki.WikiPageSettings.Data",encode(e82,n=_m0.Writer.create()){e82.permLevel!==0&&n.uint32(8).int32(e82.permLevel);for(let t of e82.editors)WrappedUserObject.encode(t,n.uint32(18).fork()).ldelim();return e82.listed!==!1&&n.uint32(24).bool(e82.listed),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWikiPageSettings_Data();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.permLevel=t.int32();continue;case 2:if(r!==18)break;d.editors.push(WrappedUserObject.decode(t,t.uint32()));continue;case 3:if(r!==24)break;d.listed=t.bool();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{permLevel:isSet$e(e82.permLevel)?globalThis.Number(e82.permLevel):0,editors:globalThis.Array.isArray(e82?.editors)?e82.editors.map(n=>WrappedUserObject.fromJSON(n)):[],listed:isSet$e(e82.listed)?globalThis.Boolean(e82.listed):!1}},toJSON(e82){var t;let n={};return e82.permLevel!==0&&(n.permLevel=Math.round(e82.permLevel)),(t=e82.editors)!=null&&t.length&&(n.editors=e82.editors.map(o=>WrappedUserObject.toJSON(o))),e82.listed!==!1&&(n.listed=e82.listed),n},create(e82){return WikiPageSettings_Data.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseWikiPageSettings_Data();return n.permLevel=e82.permLevel??0,n.editors=((t=e82.editors)==null?void 0:t.map(o=>WrappedUserObject.fromPartial(o)))||[],n.listed=e82.listed??!1,n}};messageTypeRegistry.set(WikiPageSettings_Data.$type,WikiPageSettings_Data);function createBaseUpdateWikiPageSettingsRequest(){return{subreddit:"",page:"",permlevel:0,listed:""}}var UpdateWikiPageSettingsRequest={$type:"devvit.plugin.redditapi.wiki.UpdateWikiPageSettingsRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.page!==""&&n.uint32(18).string(e82.page),e82.permlevel!==0&&n.uint32(24).int32(e82.permlevel),e82.listed!==""&&n.uint32(34).string(e82.listed),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUpdateWikiPageSettingsRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.page=t.string();continue;case 3:if(r!==24)break;d.permlevel=t.int32();continue;case 4:if(r!==34)break;d.listed=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):"",page:isSet$e(e82.page)?globalThis.String(e82.page):"",permlevel:isSet$e(e82.permlevel)?globalThis.Number(e82.permlevel):0,listed:isSet$e(e82.listed)?globalThis.String(e82.listed):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.page!==""&&(n.page=e82.page),e82.permlevel!==0&&(n.permlevel=Math.round(e82.permlevel)),e82.listed!==""&&(n.listed=e82.listed),n},create(e82){return UpdateWikiPageSettingsRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUpdateWikiPageSettingsRequest();return n.subreddit=e82.subreddit??"",n.page=e82.page??"",n.permlevel=e82.permlevel??0,n.listed=e82.listed??"",n}};messageTypeRegistry.set(UpdateWikiPageSettingsRequest.$type,UpdateWikiPageSettingsRequest);function createBaseAllowEditorRequest(){return{subreddit:"",page:"",act:"",username:""}}var AllowEditorRequest={$type:"devvit.plugin.redditapi.wiki.AllowEditorRequest",encode(e82,n=_m0.Writer.create()){return e82.subreddit!==""&&n.uint32(10).string(e82.subreddit),e82.page!==""&&n.uint32(18).string(e82.page),e82.act!==""&&n.uint32(26).string(e82.act),e82.username!==""&&n.uint32(34).string(e82.username),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAllowEditorRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.subreddit=t.string();continue;case 2:if(r!==18)break;d.page=t.string();continue;case 3:if(r!==26)break;d.act=t.string();continue;case 4:if(r!==34)break;d.username=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{subreddit:isSet$e(e82.subreddit)?globalThis.String(e82.subreddit):"",page:isSet$e(e82.page)?globalThis.String(e82.page):"",act:isSet$e(e82.act)?globalThis.String(e82.act):"",username:isSet$e(e82.username)?globalThis.String(e82.username):""}},toJSON(e82){let n={};return e82.subreddit!==""&&(n.subreddit=e82.subreddit),e82.page!==""&&(n.page=e82.page),e82.act!==""&&(n.act=e82.act),e82.username!==""&&(n.username=e82.username),n},create(e82){return AllowEditorRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAllowEditorRequest();return n.subreddit=e82.subreddit??"",n.page=e82.page??"",n.act=e82.act??"",n.username=e82.username??"",n}};messageTypeRegistry.set(AllowEditorRequest.$type,AllowEditorRequest);function longToNumber$1(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isSet$e(e82){return e82!=null}var WikiDefinition={name:"Wiki",fullName:"devvit.plugin.redditapi.wiki.Wiki",methods:{getWikiPages:{name:"GetWikiPages",requestType:GetWikiPagesRequest,requestStream:!1,responseType:GetWikiPagesResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([27,18,25,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,119,105,107,105,47,112,97,103,101,115])]}}},getWikiPage:{name:"GetWikiPage",requestType:GetWikiPageRequest,requestStream:!1,responseType:GetWikiPageResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([28,18,26,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,119,105,107,105,47,123,112,97,103,101,125]),new Uint8Array([2,64,1])]}}},editWikiPage:{name:"EditWikiPage",requestType:EditWikiPageRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([30,18,28,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,107,105,47,101,100,105,116]),new Uint8Array([2,24,4])]}}},hideWikiPageRevision:{name:"HideWikiPageRevision",requestType:HideWikiPageRevisionRequest,requestStream:!1,responseType:HideWikiPageRevisionResponse,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([30,18,28,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,107,105,47,104,105,100,101]),new Uint8Array([2,24,4])]}}},getWikiPageRevisions:{name:"GetWikiPageRevisions",requestType:GetWikiPageRevisionsRequest,requestStream:!1,responseType:WikiPageRevisionListing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([131,1,18,128,1,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,119,105,107,105,47,114,101,118,105,115,105,111,110,115,47,123,112,97,103,101,125,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,115,114,95,100,101,116,97,105,108,61,123,115,114,95,100,101,116,97,105,108,125])]}}},getWikiRevisions:{name:"GetWikiRevisions",requestType:GetWikiRevisionsRequest,requestStream:!1,responseType:WikiPageRevisionListing,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([123,18,121,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,119,105,107,105,47,114,101,118,105,115,105,111,110,115,63,97,102,116,101,114,61,123,97,102,116,101,114,125,38,98,101,102,111,114,101,61,123,98,101,102,111,114,101,125,38,99,111,117,110,116,61,123,99,111,117,110,116,125,38,108,105,109,105,116,61,123,108,105,109,105,116,125,38,115,104,111,119,61,123,115,104,111,119,125,38,115,114,95,100,101,116,97,105,108,61,123,115,114,95,100,101,116,97,105,108,125])]}}},revertWikiPage:{name:"RevertWikiPage",requestType:RevertWikiPageRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([32,18,30,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,107,105,47,114,101,118,101,114,116]),new Uint8Array([2,24,4])]}}},getWikiPageSettings:{name:"GetWikiPageSettings",requestType:GetWikiPageSettingsRequest,requestStream:!1,responseType:WikiPageSettings,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([5,10,3,71,69,84]),new Uint8Array([37,18,35,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,119,105,107,105,47,115,101,116,116,105,110,103,115,47,123,112,97,103,101,125])]}}},updateWikiPageSettings:{name:"UpdateWikiPageSettings",requestType:UpdateWikiPageSettingsRequest,requestStream:!1,responseType:WikiPageSettings,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([37,18,35,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,119,105,107,105,47,115,101,116,116,105,110,103,115,47,123,112,97,103,101,125]),new Uint8Array([2,24,3])]}}},allowEditor:{name:"AllowEditor",requestType:AllowEditorRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{_unknownFields:{480010:[new Uint8Array([6,10,4,80,79,83,84]),new Uint8Array([43,18,41,47,114,47,123,115,117,98,114,101,100,100,105,116,125,47,97,112,105,47,119,105,107,105,47,97,108,108,111,119,101,100,105,116,111,114,47,123,97,99,116,125]),new Uint8Array([2,24,4])]}}}}},RedisKeyScope;(function(e82){e82[e82.INSTALLATION=0]="INSTALLATION",e82[e82.GLOBAL=1]="GLOBAL",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(RedisKeyScope||(RedisKeyScope={}));function redisKeyScopeFromJSON(e82){switch(e82){case 0:case"INSTALLATION":return RedisKeyScope.INSTALLATION;case 1:case"GLOBAL":return RedisKeyScope.GLOBAL;case-1:case"UNRECOGNIZED":default:return RedisKeyScope.UNRECOGNIZED}}function redisKeyScopeToJSON(e82){switch(e82){case RedisKeyScope.INSTALLATION:return 0;case RedisKeyScope.GLOBAL:return 1;case RedisKeyScope.UNRECOGNIZED:default:return-1}}function createBaseTransactionResponses(){return{response:[]}}var TransactionResponses={$type:"devvit.plugin.redis.TransactionResponses",encode(e82,n=_m0.Writer.create()){for(let t of e82.response)TransactionResponse.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTransactionResponses();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.response.push(TransactionResponse.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{response:globalThis.Array.isArray(e82?.response)?e82.response.map(n=>TransactionResponse.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.response)!=null&&t.length&&(n.response=e82.response.map(o=>TransactionResponse.toJSON(o))),n},create(e82){return TransactionResponses.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseTransactionResponses();return n.response=((t=e82.response)==null?void 0:t.map(o=>TransactionResponse.fromPartial(o)))||[],n}};messageTypeRegistry.set(TransactionResponses.$type,TransactionResponses);function createBaseTransactionResponse(){return{str:void 0,nil:void 0,num:void 0,members:void 0,values:void 0}}var TransactionResponse={$type:"devvit.plugin.redis.TransactionResponse",encode(e82,n=_m0.Writer.create()){return e82.str!==void 0&&StringValue.encode({value:e82.str},n.uint32(10).fork()).ldelim(),e82.nil!==void 0&&Empty$1.encode(e82.nil,n.uint32(18).fork()).ldelim(),e82.num!==void 0&&Int64Value.encode({value:e82.num},n.uint32(26).fork()).ldelim(),e82.members!==void 0&&ZMembers.encode(e82.members,n.uint32(34).fork()).ldelim(),e82.values!==void 0&&RedisValues.encode(e82.values,n.uint32(42).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTransactionResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.str=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.nil=Empty$1.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.num=Int64Value.decode(t,t.uint32()).value;continue;case 4:if(r!==34)break;d.members=ZMembers.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.values=RedisValues.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{str:isSet$d(e82.str)?String(e82.str):void 0,nil:isSet$d(e82.nil)?Empty$1.fromJSON(e82.nil):void 0,num:isSet$d(e82.num)?Number(e82.num):void 0,members:isSet$d(e82.members)?ZMembers.fromJSON(e82.members):void 0,values:isSet$d(e82.values)?RedisValues.fromJSON(e82.values):void 0}},toJSON(e82){let n={};return e82.str!==void 0&&(n.str=e82.str),e82.nil!==void 0&&(n.nil=Empty$1.toJSON(e82.nil)),e82.num!==void 0&&(n.num=e82.num),e82.members!==void 0&&(n.members=ZMembers.toJSON(e82.members)),e82.values!==void 0&&(n.values=RedisValues.toJSON(e82.values)),n},create(e82){return TransactionResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseTransactionResponse();return n.str=e82.str??void 0,n.nil=e82.nil!==void 0&&e82.nil!==null?Empty$1.fromPartial(e82.nil):void 0,n.num=e82.num??void 0,n.members=e82.members!==void 0&&e82.members!==null?ZMembers.fromPartial(e82.members):void 0,n.values=e82.values!==void 0&&e82.values!==null?RedisValues.fromPartial(e82.values):void 0,n}};messageTypeRegistry.set(TransactionResponse.$type,TransactionResponse);function createBaseZRangeRequest(){return{key:void 0,start:"",stop:"",byScore:!1,byLex:!1,rev:!1,offset:0,count:0,scope:void 0}}var ZRangeRequest={$type:"devvit.plugin.redis.ZRangeRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==void 0&&KeyRequest.encode(e82.key,n.uint32(10).fork()).ldelim(),e82.start!==""&&n.uint32(18).string(e82.start),e82.stop!==""&&n.uint32(26).string(e82.stop),e82.byScore!==!1&&n.uint32(32).bool(e82.byScore),e82.byLex!==!1&&n.uint32(40).bool(e82.byLex),e82.rev!==!1&&n.uint32(48).bool(e82.rev),e82.offset!==0&&n.uint32(56).int32(e82.offset),e82.count!==0&&n.uint32(64).int32(e82.count),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZRangeRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=KeyRequest.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.start=t.string();continue;case 3:if(r!==26)break;d.stop=t.string();continue;case 4:if(r!==32)break;d.byScore=t.bool();continue;case 5:if(r!==40)break;d.byLex=t.bool();continue;case 6:if(r!==48)break;d.rev=t.bool();continue;case 7:if(r!==56)break;d.offset=t.int32();continue;case 8:if(r!==64)break;d.count=t.int32();continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?KeyRequest.fromJSON(e82.key):void 0,start:isSet$d(e82.start)?globalThis.String(e82.start):"",stop:isSet$d(e82.stop)?globalThis.String(e82.stop):"",byScore:isSet$d(e82.byScore)?globalThis.Boolean(e82.byScore):!1,byLex:isSet$d(e82.byLex)?globalThis.Boolean(e82.byLex):!1,rev:isSet$d(e82.rev)?globalThis.Boolean(e82.rev):!1,offset:isSet$d(e82.offset)?globalThis.Number(e82.offset):0,count:isSet$d(e82.count)?globalThis.Number(e82.count):0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==void 0&&(n.key=KeyRequest.toJSON(e82.key)),e82.start!==""&&(n.start=e82.start),e82.stop!==""&&(n.stop=e82.stop),e82.byScore!==!1&&(n.byScore=e82.byScore),e82.byLex!==!1&&(n.byLex=e82.byLex),e82.rev!==!1&&(n.rev=e82.rev),e82.offset!==0&&(n.offset=Math.round(e82.offset)),e82.count!==0&&(n.count=Math.round(e82.count)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZRangeRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZRangeRequest();return n.key=e82.key!==void 0&&e82.key!==null?KeyRequest.fromPartial(e82.key):void 0,n.start=e82.start??"",n.stop=e82.stop??"",n.byScore=e82.byScore??!1,n.byLex=e82.byLex??!1,n.rev=e82.rev??!1,n.offset=e82.offset??0,n.count=e82.count??0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZRangeRequest.$type,ZRangeRequest);function createBaseZRangeByLexRequest(){return{key:void 0,min:"",max:"",scope:void 0}}var ZRangeByLexRequest={$type:"devvit.plugin.redis.ZRangeByLexRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==void 0&&KeyRequest.encode(e82.key,n.uint32(10).fork()).ldelim(),e82.min!==""&&n.uint32(18).string(e82.min),e82.max!==""&&n.uint32(26).string(e82.max),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZRangeByLexRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=KeyRequest.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.min=t.string();continue;case 3:if(r!==26)break;d.max=t.string();continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?KeyRequest.fromJSON(e82.key):void 0,min:isSet$d(e82.min)?globalThis.String(e82.min):"",max:isSet$d(e82.max)?globalThis.String(e82.max):"",scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==void 0&&(n.key=KeyRequest.toJSON(e82.key)),e82.min!==""&&(n.min=e82.min),e82.max!==""&&(n.max=e82.max),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZRangeByLexRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZRangeByLexRequest();return n.key=e82.key!==void 0&&e82.key!==null?KeyRequest.fromPartial(e82.key):void 0,n.min=e82.min??"",n.max=e82.max??"",n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZRangeByLexRequest.$type,ZRangeByLexRequest);function createBaseZRangeByScoreRequest(){return{key:void 0,min:0,max:0,withScores:!1,scope:void 0}}var ZRangeByScoreRequest={$type:"devvit.plugin.redis.ZRangeByScoreRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==void 0&&KeyRequest.encode(e82.key,n.uint32(10).fork()).ldelim(),e82.min!==0&&n.uint32(17).double(e82.min),e82.max!==0&&n.uint32(25).double(e82.max),e82.withScores!==!1&&n.uint32(32).bool(e82.withScores),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZRangeByScoreRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=KeyRequest.decode(t,t.uint32());continue;case 2:if(r!==17)break;d.min=t.double();continue;case 3:if(r!==25)break;d.max=t.double();continue;case 4:if(r!==32)break;d.withScores=t.bool();continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?KeyRequest.fromJSON(e82.key):void 0,min:isSet$d(e82.min)?globalThis.Number(e82.min):0,max:isSet$d(e82.max)?globalThis.Number(e82.max):0,withScores:isSet$d(e82.withScores)?globalThis.Boolean(e82.withScores):!1,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==void 0&&(n.key=KeyRequest.toJSON(e82.key)),e82.min!==0&&(n.min=e82.min),e82.max!==0&&(n.max=e82.max),e82.withScores!==!1&&(n.withScores=e82.withScores),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZRangeByScoreRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZRangeByScoreRequest();return n.key=e82.key!==void 0&&e82.key!==null?KeyRequest.fromPartial(e82.key):void 0,n.min=e82.min??0,n.max=e82.max??0,n.withScores=e82.withScores??!1,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZRangeByScoreRequest.$type,ZRangeByScoreRequest);function createBaseZRemRequest(){return{key:void 0,members:[],scope:void 0}}var ZRemRequest={$type:"devvit.plugin.redis.ZRemRequest",encode(e82,n=_m0.Writer.create()){e82.key!==void 0&&KeyRequest.encode(e82.key,n.uint32(10).fork()).ldelim();for(let t of e82.members)n.uint32(18).string(t);return e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZRemRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=KeyRequest.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.members.push(t.string());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?KeyRequest.fromJSON(e82.key):void 0,members:globalThis.Array.isArray(e82?.members)?e82.members.map(n=>globalThis.String(n)):[],scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){var t;let n={};return e82.key!==void 0&&(n.key=KeyRequest.toJSON(e82.key)),(t=e82.members)!=null&&t.length&&(n.members=e82.members),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZRemRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseZRemRequest();return n.key=e82.key!==void 0&&e82.key!==null?KeyRequest.fromPartial(e82.key):void 0,n.members=((t=e82.members)==null?void 0:t.map(o=>o))||[],n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZRemRequest.$type,ZRemRequest);function createBaseZRemRangeByLexRequest(){return{key:void 0,min:"",max:"",scope:void 0}}var ZRemRangeByLexRequest={$type:"devvit.plugin.redis.ZRemRangeByLexRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==void 0&&KeyRequest.encode(e82.key,n.uint32(10).fork()).ldelim(),e82.min!==""&&n.uint32(18).string(e82.min),e82.max!==""&&n.uint32(26).string(e82.max),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZRemRangeByLexRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=KeyRequest.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.min=t.string();continue;case 3:if(r!==26)break;d.max=t.string();continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?KeyRequest.fromJSON(e82.key):void 0,min:isSet$d(e82.min)?globalThis.String(e82.min):"",max:isSet$d(e82.max)?globalThis.String(e82.max):"",scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==void 0&&(n.key=KeyRequest.toJSON(e82.key)),e82.min!==""&&(n.min=e82.min),e82.max!==""&&(n.max=e82.max),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZRemRangeByLexRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZRemRangeByLexRequest();return n.key=e82.key!==void 0&&e82.key!==null?KeyRequest.fromPartial(e82.key):void 0,n.min=e82.min??"",n.max=e82.max??"",n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZRemRangeByLexRequest.$type,ZRemRangeByLexRequest);function createBaseZRemRangeByRankRequest(){return{key:void 0,start:0,stop:0,scope:void 0}}var ZRemRangeByRankRequest={$type:"devvit.plugin.redis.ZRemRangeByRankRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==void 0&&KeyRequest.encode(e82.key,n.uint32(10).fork()).ldelim(),e82.start!==0&&n.uint32(16).int32(e82.start),e82.stop!==0&&n.uint32(24).int32(e82.stop),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZRemRangeByRankRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=KeyRequest.decode(t,t.uint32());continue;case 2:if(r!==16)break;d.start=t.int32();continue;case 3:if(r!==24)break;d.stop=t.int32();continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?KeyRequest.fromJSON(e82.key):void 0,start:isSet$d(e82.start)?globalThis.Number(e82.start):0,stop:isSet$d(e82.stop)?globalThis.Number(e82.stop):0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==void 0&&(n.key=KeyRequest.toJSON(e82.key)),e82.start!==0&&(n.start=Math.round(e82.start)),e82.stop!==0&&(n.stop=Math.round(e82.stop)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZRemRangeByRankRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZRemRangeByRankRequest();return n.key=e82.key!==void 0&&e82.key!==null?KeyRequest.fromPartial(e82.key):void 0,n.start=e82.start??0,n.stop=e82.stop??0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZRemRangeByRankRequest.$type,ZRemRangeByRankRequest);function createBaseZRemRangeByScoreRequest(){return{key:void 0,min:0,max:0,scope:void 0}}var ZRemRangeByScoreRequest={$type:"devvit.plugin.redis.ZRemRangeByScoreRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==void 0&&KeyRequest.encode(e82.key,n.uint32(10).fork()).ldelim(),e82.min!==0&&n.uint32(17).double(e82.min),e82.max!==0&&n.uint32(25).double(e82.max),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZRemRangeByScoreRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=KeyRequest.decode(t,t.uint32());continue;case 2:if(r!==17)break;d.min=t.double();continue;case 3:if(r!==25)break;d.max=t.double();continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?KeyRequest.fromJSON(e82.key):void 0,min:isSet$d(e82.min)?globalThis.Number(e82.min):0,max:isSet$d(e82.max)?globalThis.Number(e82.max):0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==void 0&&(n.key=KeyRequest.toJSON(e82.key)),e82.min!==0&&(n.min=e82.min),e82.max!==0&&(n.max=e82.max),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZRemRangeByScoreRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZRemRangeByScoreRequest();return n.key=e82.key!==void 0&&e82.key!==null?KeyRequest.fromPartial(e82.key):void 0,n.min=e82.min??0,n.max=e82.max??0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZRemRangeByScoreRequest.$type,ZRemRangeByScoreRequest);function createBaseZScoreRequest(){return{key:void 0,member:"",scope:void 0}}var ZScoreRequest={$type:"devvit.plugin.redis.ZScoreRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==void 0&&KeyRequest.encode(e82.key,n.uint32(10).fork()).ldelim(),e82.member!==""&&n.uint32(18).string(e82.member),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZScoreRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=KeyRequest.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.member=t.string();continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?KeyRequest.fromJSON(e82.key):void 0,member:isSet$d(e82.member)?globalThis.String(e82.member):"",scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==void 0&&(n.key=KeyRequest.toJSON(e82.key)),e82.member!==""&&(n.member=e82.member),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZScoreRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZScoreRequest();return n.key=e82.key!==void 0&&e82.key!==null?KeyRequest.fromPartial(e82.key):void 0,n.member=e82.member??"",n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZScoreRequest.$type,ZScoreRequest);function createBaseZRankRequest(){return{key:void 0,member:"",scope:void 0}}var ZRankRequest={$type:"devvit.plugin.redis.ZRankRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==void 0&&KeyRequest.encode(e82.key,n.uint32(10).fork()).ldelim(),e82.member!==""&&n.uint32(18).string(e82.member),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZRankRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=KeyRequest.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.member=t.string();continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?KeyRequest.fromJSON(e82.key):void 0,member:isSet$d(e82.member)?globalThis.String(e82.member):"",scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==void 0&&(n.key=KeyRequest.toJSON(e82.key)),e82.member!==""&&(n.member=e82.member),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZRankRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZRankRequest();return n.key=e82.key!==void 0&&e82.key!==null?KeyRequest.fromPartial(e82.key):void 0,n.member=e82.member??"",n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZRankRequest.$type,ZRankRequest);function createBaseZIncrByRequest(){return{key:"",member:"",value:0,transactionId:void 0,scope:void 0}}var ZIncrByRequest={$type:"devvit.plugin.redis.ZIncrByRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.member!==""&&n.uint32(18).string(e82.member),e82.value!==0&&n.uint32(25).double(e82.value),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(50).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZIncrByRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.member=t.string();continue;case 3:if(r!==25)break;d.value=t.double();continue;case 6:if(r!==50)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",member:isSet$d(e82.member)?globalThis.String(e82.member):"",value:isSet$d(e82.value)?globalThis.Number(e82.value):0,transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.member!==""&&(n.member=e82.member),e82.value!==0&&(n.value=e82.value),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZIncrByRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZIncrByRequest();return n.key=e82.key??"",n.member=e82.member??"",n.value=e82.value??0,n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZIncrByRequest.$type,ZIncrByRequest);function createBaseKeyRequest(){return{key:"",transactionId:void 0,scope:void 0}}var KeyRequest={$type:"devvit.plugin.redis.KeyRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(18).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseKeyRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return KeyRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseKeyRequest();return n.key=e82.key??"",n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(KeyRequest.$type,KeyRequest);function createBaseIncrByRequest(){return{key:"",value:0,transactionId:void 0,scope:void 0}}var IncrByRequest={$type:"devvit.plugin.redis.IncrByRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==0&&n.uint32(16).int64(e82.value),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(50).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseIncrByRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==16)break;d.value=longToNumber(t.int64());continue;case 6:if(r!==50)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",value:isSet$d(e82.value)?globalThis.Number(e82.value):0,transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==0&&(n.value=Math.round(e82.value)),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return IncrByRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseIncrByRequest();return n.key=e82.key??"",n.value=e82.value??0,n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(IncrByRequest.$type,IncrByRequest);function createBaseSetRequest(){return{key:"",value:"",expiration:0,nx:!1,xx:!1,transactionId:void 0,scope:void 0}}var SetRequest={$type:"devvit.plugin.redis.SetRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),e82.expiration!==0&&n.uint32(24).int64(e82.expiration),e82.nx!==!1&&n.uint32(32).bool(e82.nx),e82.xx!==!1&&n.uint32(40).bool(e82.xx),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(50).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue;case 3:if(r!==24)break;d.expiration=longToNumber(t.int64());continue;case 4:if(r!==32)break;d.nx=t.bool();continue;case 5:if(r!==40)break;d.xx=t.bool();continue;case 6:if(r!==50)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",value:isSet$d(e82.value)?globalThis.String(e82.value):"",expiration:isSet$d(e82.expiration)?globalThis.Number(e82.expiration):0,nx:isSet$d(e82.nx)?globalThis.Boolean(e82.nx):!1,xx:isSet$d(e82.xx)?globalThis.Boolean(e82.xx):!1,transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),e82.expiration!==0&&(n.expiration=Math.round(e82.expiration)),e82.nx!==!1&&(n.nx=e82.nx),e82.xx!==!1&&(n.xx=e82.xx),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return SetRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSetRequest();return n.key=e82.key??"",n.value=e82.value??"",n.expiration=e82.expiration??0,n.nx=e82.nx??!1,n.xx=e82.xx??!1,n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(SetRequest.$type,SetRequest);function createBaseKeyRangeRequest(){return{key:"",start:0,end:0,transactionId:void 0,scope:void 0}}var KeyRangeRequest={$type:"devvit.plugin.redis.KeyRangeRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.start!==0&&n.uint32(16).int32(e82.start),e82.end!==0&&n.uint32(24).int32(e82.end),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(34).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseKeyRangeRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==16)break;d.start=t.int32();continue;case 3:if(r!==24)break;d.end=t.int32();continue;case 4:if(r!==34)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",start:isSet$d(e82.start)?globalThis.Number(e82.start):0,end:isSet$d(e82.end)?globalThis.Number(e82.end):0,transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.start!==0&&(n.start=Math.round(e82.start)),e82.end!==0&&(n.end=Math.round(e82.end)),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return KeyRangeRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseKeyRangeRequest();return n.key=e82.key??"",n.start=e82.start??0,n.end=e82.end??0,n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(KeyRangeRequest.$type,KeyRangeRequest);function createBaseSetRangeRequest(){return{key:"",offset:0,value:"",transactionId:void 0,scope:void 0}}var SetRangeRequest={$type:"devvit.plugin.redis.SetRangeRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.offset!==0&&n.uint32(16).int32(e82.offset),e82.value!==""&&n.uint32(26).string(e82.value),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(34).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSetRangeRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==16)break;d.offset=t.int32();continue;case 3:if(r!==26)break;d.value=t.string();continue;case 4:if(r!==34)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",offset:isSet$d(e82.offset)?globalThis.Number(e82.offset):0,value:isSet$d(e82.value)?globalThis.String(e82.value):"",transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.offset!==0&&(n.offset=Math.round(e82.offset)),e82.value!==""&&(n.value=e82.value),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return SetRangeRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSetRangeRequest();return n.key=e82.key??"",n.offset=e82.offset??0,n.value=e82.value??"",n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(SetRangeRequest.$type,SetRangeRequest);function createBaseKeysRequest(){return{keys:[],transactionId:void 0,scope:void 0}}var KeysRequest={$type:"devvit.plugin.redis.KeysRequest",encode(e82,n=_m0.Writer.create()){for(let t of e82.keys)n.uint32(10).string(t);return e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(18).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseKeysRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.keys.push(t.string());continue;case 2:if(r!==18)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{keys:globalThis.Array.isArray(e82?.keys)?e82.keys.map(n=>globalThis.String(n)):[],transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){var t;let n={};return(t=e82.keys)!=null&&t.length&&(n.keys=e82.keys),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return KeysRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseKeysRequest();return n.keys=((t=e82.keys)==null?void 0:t.map(o=>o))||[],n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(KeysRequest.$type,KeysRequest);function createBaseKeysResponse(){return{keys:[]}}var KeysResponse={$type:"devvit.plugin.redis.KeysResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.keys)n.uint32(10).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseKeysResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.keys.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{keys:globalThis.Array.isArray(e82?.keys)?e82.keys.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.keys)!=null&&t.length&&(n.keys=e82.keys),n},create(e82){return KeysResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseKeysResponse();return n.keys=((t=e82.keys)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(KeysResponse.$type,KeysResponse);function createBaseHGetRequest(){return{key:"",field:"",transactionId:void 0,scope:void 0}}var HGetRequest={$type:"devvit.plugin.redis.HGetRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.field!==""&&n.uint32(18).string(e82.field),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(26).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHGetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.field=t.string();continue;case 3:if(r!==26)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",field:isSet$d(e82.field)?globalThis.String(e82.field):"",transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.field!==""&&(n.field=e82.field),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return HGetRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseHGetRequest();return n.key=e82.key??"",n.field=e82.field??"",n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(HGetRequest.$type,HGetRequest);function createBaseHSetRequest(){return{key:"",fv:[],transactionId:void 0,scope:void 0}}var HSetRequest={$type:"devvit.plugin.redis.HSetRequest",encode(e82,n=_m0.Writer.create()){e82.key!==""&&n.uint32(10).string(e82.key);for(let t of e82.fv)RedisFieldValue.encode(t,n.uint32(18).fork()).ldelim();return e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(26).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHSetRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.fv.push(RedisFieldValue.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",fv:globalThis.Array.isArray(e82?.fv)?e82.fv.map(n=>RedisFieldValue.fromJSON(n)):[],transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){var t;let n={};return e82.key!==""&&(n.key=e82.key),(t=e82.fv)!=null&&t.length&&(n.fv=e82.fv.map(o=>RedisFieldValue.toJSON(o))),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return HSetRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseHSetRequest();return n.key=e82.key??"",n.fv=((t=e82.fv)==null?void 0:t.map(o=>RedisFieldValue.fromPartial(o)))||[],n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(HSetRequest.$type,HSetRequest);function createBaseHDelRequest(){return{key:"",fields:[],transactionId:void 0,scope:void 0}}var HDelRequest={$type:"devvit.plugin.redis.HDelRequest",encode(e82,n=_m0.Writer.create()){e82.key!==""&&n.uint32(10).string(e82.key);for(let t of e82.fields)n.uint32(18).string(t);return e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(26).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHDelRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.fields.push(t.string());continue;case 3:if(r!==26)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",fields:globalThis.Array.isArray(e82?.fields)?e82.fields.map(n=>globalThis.String(n)):[],transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){var t;let n={};return e82.key!==""&&(n.key=e82.key),(t=e82.fields)!=null&&t.length&&(n.fields=e82.fields),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return HDelRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseHDelRequest();return n.key=e82.key??"",n.fields=((t=e82.fields)==null?void 0:t.map(o=>o))||[],n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(HDelRequest.$type,HDelRequest);function createBaseHScanRequest(){return{key:"",cursor:0,pattern:void 0,count:void 0,transactionId:void 0,scope:void 0}}var HScanRequest={$type:"devvit.plugin.redis.HScanRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.cursor!==0&&n.uint32(16).uint64(e82.cursor),e82.pattern!==void 0&&n.uint32(26).string(e82.pattern),e82.count!==void 0&&n.uint32(32).int64(e82.count),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(42).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHScanRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==16)break;d.cursor=longToNumber(t.uint64());continue;case 3:if(r!==26)break;d.pattern=t.string();continue;case 4:if(r!==32)break;d.count=longToNumber(t.int64());continue;case 5:if(r!==42)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",cursor:isSet$d(e82.cursor)?globalThis.Number(e82.cursor):0,pattern:isSet$d(e82.pattern)?globalThis.String(e82.pattern):void 0,count:isSet$d(e82.count)?globalThis.Number(e82.count):void 0,transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.cursor!==0&&(n.cursor=Math.round(e82.cursor)),e82.pattern!==void 0&&(n.pattern=e82.pattern),e82.count!==void 0&&(n.count=Math.round(e82.count)),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return HScanRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseHScanRequest();return n.key=e82.key??"",n.cursor=e82.cursor??0,n.pattern=e82.pattern??void 0,n.count=e82.count??void 0,n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(HScanRequest.$type,HScanRequest);function createBaseHScanResponse(){return{cursor:0,fieldValues:[]}}var HScanResponse={$type:"devvit.plugin.redis.HScanResponse",encode(e82,n=_m0.Writer.create()){e82.cursor!==0&&n.uint32(8).uint64(e82.cursor);for(let t of e82.fieldValues)RedisFieldValue.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHScanResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.cursor=longToNumber(t.uint64());continue;case 2:if(r!==18)break;d.fieldValues.push(RedisFieldValue.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{cursor:isSet$d(e82.cursor)?globalThis.Number(e82.cursor):0,fieldValues:globalThis.Array.isArray(e82?.fieldValues)?e82.fieldValues.map(n=>RedisFieldValue.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.cursor!==0&&(n.cursor=Math.round(e82.cursor)),(t=e82.fieldValues)!=null&&t.length&&(n.fieldValues=e82.fieldValues.map(o=>RedisFieldValue.toJSON(o))),n},create(e82){return HScanResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseHScanResponse();return n.cursor=e82.cursor??0,n.fieldValues=((t=e82.fieldValues)==null?void 0:t.map(o=>RedisFieldValue.fromPartial(o)))||[],n}};messageTypeRegistry.set(HScanResponse.$type,HScanResponse);function createBaseHIncrByRequest(){return{key:"",field:"",value:0,transactionId:void 0,scope:void 0}}var HIncrByRequest={$type:"devvit.plugin.redis.HIncrByRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.field!==""&&n.uint32(18).string(e82.field),e82.value!==0&&n.uint32(24).int64(e82.value),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(50).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHIncrByRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.field=t.string();continue;case 3:if(r!==24)break;d.value=longToNumber(t.int64());continue;case 6:if(r!==50)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",field:isSet$d(e82.field)?globalThis.String(e82.field):"",value:isSet$d(e82.value)?globalThis.Number(e82.value):0,transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.field!==""&&(n.field=e82.field),e82.value!==0&&(n.value=Math.round(e82.value)),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return HIncrByRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseHIncrByRequest();return n.key=e82.key??"",n.field=e82.field??"",n.value=e82.value??0,n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(HIncrByRequest.$type,HIncrByRequest);function createBaseRedisFieldValue(){return{field:"",value:""}}var RedisFieldValue={$type:"devvit.plugin.redis.RedisFieldValue",encode(e82,n=_m0.Writer.create()){return e82.field!==""&&n.uint32(10).string(e82.field),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedisFieldValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.field=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{field:isSet$d(e82.field)?globalThis.String(e82.field):"",value:isSet$d(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.field!==""&&(n.field=e82.field),e82.value!==""&&(n.value=e82.value),n},create(e82){return RedisFieldValue.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedisFieldValue();return n.field=e82.field??"",n.value=e82.value??"",n}};messageTypeRegistry.set(RedisFieldValue.$type,RedisFieldValue);function createBaseRedisFieldValues(){return{fieldValues:{}}}var RedisFieldValues={$type:"devvit.plugin.redis.RedisFieldValues",encode(e82,n=_m0.Writer.create()){return Object.entries(e82.fieldValues).forEach(([t,o])=>{RedisFieldValues_FieldValuesEntry.encode({key:t,value:o},n.uint32(10).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedisFieldValues();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;let a=RedisFieldValues_FieldValuesEntry.decode(t,t.uint32());a.value!==void 0&&(d.fieldValues[a.key]=a.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fieldValues:isObject$a(e82.fieldValues)?Object.entries(e82.fieldValues).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{}}},toJSON(e82){let n={};if(e82.fieldValues){let t=Object.entries(e82.fieldValues);t.length>0&&(n.fieldValues={},t.forEach(([o,d])=>{n.fieldValues[o]=d}))}return n},create(e82){return RedisFieldValues.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedisFieldValues();return n.fieldValues=Object.entries(e82.fieldValues??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=globalThis.String(d)),t),{}),n}};messageTypeRegistry.set(RedisFieldValues.$type,RedisFieldValues);function createBaseRedisFieldValues_FieldValuesEntry(){return{key:"",value:""}}var RedisFieldValues_FieldValuesEntry={$type:"devvit.plugin.redis.RedisFieldValues.FieldValuesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedisFieldValues_FieldValuesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",value:isSet$d(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return RedisFieldValues_FieldValuesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedisFieldValues_FieldValuesEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(RedisFieldValues_FieldValuesEntry.$type,RedisFieldValues_FieldValuesEntry);function createBaseKeyValuesRequest(){return{kv:[],transactionId:void 0,scope:void 0}}var KeyValuesRequest={$type:"devvit.plugin.redis.KeyValuesRequest",encode(e82,n=_m0.Writer.create()){for(let t of e82.kv)RedisKeyValue.encode(t,n.uint32(10).fork()).ldelim();return e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(18).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseKeyValuesRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.kv.push(RedisKeyValue.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{kv:globalThis.Array.isArray(e82?.kv)?e82.kv.map(n=>RedisKeyValue.fromJSON(n)):[],transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){var t;let n={};return(t=e82.kv)!=null&&t.length&&(n.kv=e82.kv.map(o=>RedisKeyValue.toJSON(o))),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return KeyValuesRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseKeyValuesRequest();return n.kv=((t=e82.kv)==null?void 0:t.map(o=>RedisKeyValue.fromPartial(o)))||[],n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(KeyValuesRequest.$type,KeyValuesRequest);function createBaseRedisKeyValue(){return{key:"",value:""}}var RedisKeyValue={$type:"devvit.plugin.redis.RedisKeyValue",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedisKeyValue();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",value:isSet$d(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return RedisKeyValue.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRedisKeyValue();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(RedisKeyValue.$type,RedisKeyValue);function createBaseRedisValues(){return{values:[]}}var RedisValues={$type:"devvit.plugin.redis.RedisValues",encode(e82,n=_m0.Writer.create()){for(let t of e82.values)StringValue.encode({value:t},n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRedisValues();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.values.push(StringValue.decode(t,t.uint32()).value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{values:globalThis.Array.isArray(e82?.values)?e82.values.map(n=>String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.values)!=null&&t.length&&(n.values=e82.values),n},create(e82){return RedisValues.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseRedisValues();return n.values=((t=e82.values)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(RedisValues.$type,RedisValues);function createBaseExpireRequest(){return{key:"",seconds:0,transactionId:void 0,scope:void 0}}var ExpireRequest={$type:"devvit.plugin.redis.ExpireRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.seconds!==0&&n.uint32(16).int32(e82.seconds),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(26).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseExpireRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==16)break;d.seconds=t.int32();continue;case 3:if(r!==26)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",seconds:isSet$d(e82.seconds)?globalThis.Number(e82.seconds):0,transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.seconds!==0&&(n.seconds=Math.round(e82.seconds)),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ExpireRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseExpireRequest();return n.key=e82.key??"",n.seconds=e82.seconds??0,n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ExpireRequest.$type,ExpireRequest);function createBaseZAddRequest(){return{key:"",members:[],transactionId:void 0,scope:void 0}}var ZAddRequest={$type:"devvit.plugin.redis.ZAddRequest",encode(e82,n=_m0.Writer.create()){e82.key!==""&&n.uint32(10).string(e82.key);for(let t of e82.members)ZMember.encode(t,n.uint32(18).fork()).ldelim();return e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(26).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZAddRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.members.push(ZMember.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",members:globalThis.Array.isArray(e82?.members)?e82.members.map(n=>ZMember.fromJSON(n)):[],transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){var t;let n={};return e82.key!==""&&(n.key=e82.key),(t=e82.members)!=null&&t.length&&(n.members=e82.members.map(o=>ZMember.toJSON(o))),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZAddRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseZAddRequest();return n.key=e82.key??"",n.members=((t=e82.members)==null?void 0:t.map(o=>ZMember.fromPartial(o)))||[],n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZAddRequest.$type,ZAddRequest);function createBaseZScanRequest(){return{key:"",cursor:0,pattern:void 0,count:void 0,transactionId:void 0,scope:void 0}}var ZScanRequest={$type:"devvit.plugin.redis.ZScanRequest",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.cursor!==0&&n.uint32(16).uint64(e82.cursor),e82.pattern!==void 0&&n.uint32(26).string(e82.pattern),e82.count!==void 0&&n.uint32(32).int64(e82.count),e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(42).fork()).ldelim(),e82.scope!==void 0&&n.uint32(800).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZScanRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==16)break;d.cursor=longToNumber(t.uint64());continue;case 3:if(r!==26)break;d.pattern=t.string();continue;case 4:if(r!==32)break;d.count=longToNumber(t.int64());continue;case 5:if(r!==42)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 100:if(r!==800)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$d(e82.key)?globalThis.String(e82.key):"",cursor:isSet$d(e82.cursor)?globalThis.Number(e82.cursor):0,pattern:isSet$d(e82.pattern)?globalThis.String(e82.pattern):void 0,count:isSet$d(e82.count)?globalThis.Number(e82.count):void 0,transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,scope:isSet$d(e82.scope)?redisKeyScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.cursor!==0&&(n.cursor=Math.round(e82.cursor)),e82.pattern!==void 0&&(n.pattern=e82.pattern),e82.count!==void 0&&(n.count=Math.round(e82.count)),e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),e82.scope!==void 0&&(n.scope=redisKeyScopeToJSON(e82.scope)),n},create(e82){return ZScanRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZScanRequest();return n.key=e82.key??"",n.cursor=e82.cursor??0,n.pattern=e82.pattern??void 0,n.count=e82.count??void 0,n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(ZScanRequest.$type,ZScanRequest);function createBaseZScanResponse(){return{cursor:0,members:[]}}var ZScanResponse={$type:"devvit.plugin.redis.ZScanResponse",encode(e82,n=_m0.Writer.create()){e82.cursor!==0&&n.uint32(8).uint64(e82.cursor);for(let t of e82.members)ZMember.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZScanResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.cursor=longToNumber(t.uint64());continue;case 2:if(r!==18)break;d.members.push(ZMember.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{cursor:isSet$d(e82.cursor)?globalThis.Number(e82.cursor):0,members:globalThis.Array.isArray(e82?.members)?e82.members.map(n=>ZMember.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.cursor!==0&&(n.cursor=Math.round(e82.cursor)),(t=e82.members)!=null&&t.length&&(n.members=e82.members.map(o=>ZMember.toJSON(o))),n},create(e82){return ZScanResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseZScanResponse();return n.cursor=e82.cursor??0,n.members=((t=e82.members)==null?void 0:t.map(o=>ZMember.fromPartial(o)))||[],n}};messageTypeRegistry.set(ZScanResponse.$type,ZScanResponse);function createBaseZMembers(){return{members:[]}}var ZMembers={$type:"devvit.plugin.redis.ZMembers",encode(e82,n=_m0.Writer.create()){for(let t of e82.members)ZMember.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZMembers();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.members.push(ZMember.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{members:globalThis.Array.isArray(e82?.members)?e82.members.map(n=>ZMember.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.members)!=null&&t.length&&(n.members=e82.members.map(o=>ZMember.toJSON(o))),n},create(e82){return ZMembers.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseZMembers();return n.members=((t=e82.members)==null?void 0:t.map(o=>ZMember.fromPartial(o)))||[],n}};messageTypeRegistry.set(ZMembers.$type,ZMembers);function createBaseZMember(){return{score:0,member:""}}var ZMember={$type:"devvit.plugin.redis.ZMember",encode(e82,n=_m0.Writer.create()){return e82.score!==0&&n.uint32(9).double(e82.score),e82.member!==""&&n.uint32(18).string(e82.member),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseZMember();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==9)break;d.score=t.double();continue;case 2:if(r!==18)break;d.member=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{score:isSet$d(e82.score)?globalThis.Number(e82.score):0,member:isSet$d(e82.member)?globalThis.String(e82.member):""}},toJSON(e82){let n={};return e82.score!==0&&(n.score=e82.score),e82.member!==""&&(n.member=e82.member),n},create(e82){return ZMember.fromPartial(e82??{})},fromPartial(e82){let n=createBaseZMember();return n.score=e82.score??0,n.member=e82.member??"",n}};messageTypeRegistry.set(ZMember.$type,ZMember);function createBaseTransactionId(){return{id:""}}var TransactionId={$type:"devvit.plugin.redis.TransactionId",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTransactionId();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$d(e82.id)?globalThis.String(e82.id):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),n},create(e82){return TransactionId.fromPartial(e82??{})},fromPartial(e82){let n=createBaseTransactionId();return n.id=e82.id??"",n}};messageTypeRegistry.set(TransactionId.$type,TransactionId);function createBaseWatchRequest(){return{transactionId:void 0,keys:[]}}var WatchRequest={$type:"devvit.plugin.redis.WatchRequest",encode(e82,n=_m0.Writer.create()){e82.transactionId!==void 0&&TransactionId.encode(e82.transactionId,n.uint32(10).fork()).ldelim();for(let t of e82.keys)n.uint32(18).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseWatchRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.transactionId=TransactionId.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.keys.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{transactionId:isSet$d(e82.transactionId)?TransactionId.fromJSON(e82.transactionId):void 0,keys:globalThis.Array.isArray(e82?.keys)?e82.keys.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.transactionId!==void 0&&(n.transactionId=TransactionId.toJSON(e82.transactionId)),(t=e82.keys)!=null&&t.length&&(n.keys=e82.keys),n},create(e82){return WatchRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseWatchRequest();return n.transactionId=e82.transactionId!==void 0&&e82.transactionId!==null?TransactionId.fromPartial(e82.transactionId):void 0,n.keys=((t=e82.keys)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(WatchRequest.$type,WatchRequest);var RedisAPIDefinition={name:"RedisAPI",fullName:"devvit.plugin.redis.RedisAPI",methods:{get:{name:"Get",requestType:KeyRequest,requestStream:!1,responseType:StringValue,responseStream:!1,options:{}},set:{name:"Set",requestType:SetRequest,requestStream:!1,responseType:StringValue,responseStream:!1,options:{}},del:{name:"Del",requestType:KeysRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},type:{name:"Type",requestType:KeyRequest,requestStream:!1,responseType:StringValue,responseStream:!1,options:{}},incrBy:{name:"IncrBy",requestType:IncrByRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},hSet:{name:"HSet",requestType:HSetRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},hGet:{name:"HGet",requestType:HGetRequest,requestStream:!1,responseType:StringValue,responseStream:!1,options:{}},hGetAll:{name:"HGetAll",requestType:KeyRequest,requestStream:!1,responseType:RedisFieldValues,responseStream:!1,options:{}},hDel:{name:"HDel",requestType:HDelRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},hScan:{name:"HScan",requestType:HScanRequest,requestStream:!1,responseType:HScanResponse,responseStream:!1,options:{}},hKeys:{name:"HKeys",requestType:KeyRequest,requestStream:!1,responseType:KeysResponse,responseStream:!1,options:{}},hIncrBy:{name:"HIncrBy",requestType:HIncrByRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},hLen:{name:"HLen",requestType:KeyRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},multi:{name:"Multi",requestType:TransactionId,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}},exec:{name:"Exec",requestType:TransactionId,requestStream:!1,responseType:TransactionResponses,responseStream:!1,options:{}},discard:{name:"Discard",requestType:TransactionId,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}},watch:{name:"Watch",requestType:WatchRequest,requestStream:!1,responseType:TransactionId,responseStream:!1,options:{}},unwatch:{name:"Unwatch",requestType:TransactionId,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}},getRange:{name:"GetRange",requestType:KeyRangeRequest,requestStream:!1,responseType:StringValue,responseStream:!1,options:{}},setRange:{name:"SetRange",requestType:SetRangeRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},strlen:{name:"Strlen",requestType:KeyRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},mGet:{name:"MGet",requestType:KeysRequest,requestStream:!1,responseType:RedisValues,responseStream:!1,options:{}},mSet:{name:"MSet",requestType:KeyValuesRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}},expire:{name:"Expire",requestType:ExpireRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}},expireTime:{name:"ExpireTime",requestType:KeyRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},zAdd:{name:"ZAdd",requestType:ZAddRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},zCard:{name:"ZCard",requestType:KeyRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},zRange:{name:"ZRange",requestType:ZRangeRequest,requestStream:!1,responseType:ZMembers,responseStream:!1,options:{}},zRem:{name:"ZRem",requestType:ZRemRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},zRemRangeByLex:{name:"ZRemRangeByLex",requestType:ZRemRangeByLexRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},zRemRangeByRank:{name:"ZRemRangeByRank",requestType:ZRemRangeByRankRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},zRemRangeByScore:{name:"ZRemRangeByScore",requestType:ZRemRangeByScoreRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},zScore:{name:"ZScore",requestType:ZScoreRequest,requestStream:!1,responseType:DoubleValue,responseStream:!1,options:{}},zRank:{name:"ZRank",requestType:ZRankRequest,requestStream:!1,responseType:Int64Value,responseStream:!1,options:{}},zIncrBy:{name:"ZIncrBy",requestType:ZIncrByRequest,requestStream:!1,responseType:DoubleValue,responseStream:!1,options:{}},zScan:{name:"ZScan",requestType:ZScanRequest,requestStream:!1,responseType:ZScanResponse,responseStream:!1,options:{}}}};function longToNumber(e82){if(e82.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e82.toNumber()}_m0.util.Long!==Long$1&&(_m0.util.Long=Long$1,_m0.configure());function isObject$a(e82){return typeof e82=="object"&&e82!==null}function isSet$d(e82){return e82!=null}function createBaseStrings(){return{values:[]}}var Strings={$type:"devvit.runtime.Strings",encode(e82,n=_m0.Writer.create()){for(let t of e82.values)n.uint32(10).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStrings();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.values.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{values:globalThis.Array.isArray(e82?.values)?e82.values.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.values)!=null&&t.length&&(n.values=e82.values),n},create(e82){return Strings.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseStrings();return n.values=((t=e82.values)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(Strings.$type,Strings);var StorableAction_State;(function(e82){e82[e82.WAITING=0]="WAITING",e82[e82.CANCELED=1]="CANCELED",e82[e82.FAILED=2]="FAILED",e82[e82.DELIVERED=3]="DELIVERED",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(StorableAction_State||(StorableAction_State={}));function storableAction_StateFromJSON(e82){switch(e82){case 0:case"WAITING":return StorableAction_State.WAITING;case 1:case"CANCELED":return StorableAction_State.CANCELED;case 2:case"FAILED":return StorableAction_State.FAILED;case 3:case"DELIVERED":return StorableAction_State.DELIVERED;case-1:case"UNRECOGNIZED":default:return StorableAction_State.UNRECOGNIZED}}function storableAction_StateToJSON(e82){switch(e82){case StorableAction_State.WAITING:return 0;case StorableAction_State.CANCELED:return 1;case StorableAction_State.FAILED:return 2;case StorableAction_State.DELIVERED:return 3;case StorableAction_State.UNRECOGNIZED:default:return-1}}function createBaseScheduledActionRequest(){return{when:void 0,cron:void 0,action:void 0}}var ScheduledActionRequest={$type:"devvit.plugin.scheduler.ScheduledActionRequest",encode(e82,n=_m0.Writer.create()){return e82.when!==void 0&&Timestamp.encode(toTimestamp$2(e82.when),n.uint32(10).fork()).ldelim(),e82.cron!==void 0&&n.uint32(18).string(e82.cron),e82.action!==void 0&&ScheduledAction.encode(e82.action,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseScheduledActionRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.when=fromTimestamp$2(Timestamp.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.cron=t.string();continue;case 3:if(r!==26)break;d.action=ScheduledAction.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{when:isSet$c(e82.when)?fromJsonTimestamp$2(e82.when):void 0,cron:isSet$c(e82.cron)?globalThis.String(e82.cron):void 0,action:isSet$c(e82.action)?ScheduledAction.fromJSON(e82.action):void 0}},toJSON(e82){let n={};return e82.when!==void 0&&(n.when=e82.when.toISOString()),e82.cron!==void 0&&(n.cron=e82.cron),e82.action!==void 0&&(n.action=ScheduledAction.toJSON(e82.action)),n},create(e82){return ScheduledActionRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseScheduledActionRequest();return n.when=e82.when??void 0,n.cron=e82.cron??void 0,n.action=e82.action!==void 0&&e82.action!==null?ScheduledAction.fromPartial(e82.action):void 0,n}};messageTypeRegistry.set(ScheduledActionRequest.$type,ScheduledActionRequest);function createBaseScheduledActionResponse(){return{id:""}}var ScheduledActionResponse={$type:"devvit.plugin.scheduler.ScheduledActionResponse",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseScheduledActionResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$c(e82.id)?globalThis.String(e82.id):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),n},create(e82){return ScheduledActionResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseScheduledActionResponse();return n.id=e82.id??"",n}};messageTypeRegistry.set(ScheduledActionResponse.$type,ScheduledActionResponse);function createBaseCancelActionRequest(){return{id:""}}var CancelActionRequest={$type:"devvit.plugin.scheduler.CancelActionRequest",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseCancelActionRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$c(e82.id)?globalThis.String(e82.id):""}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),n},create(e82){return CancelActionRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseCancelActionRequest();return n.id=e82.id??"",n}};messageTypeRegistry.set(CancelActionRequest.$type,CancelActionRequest);function createBaseStorableAction(){return{id:"",actorHostname:"",request:void 0,metadata:{},state:void 0}}var StorableAction={$type:"devvit.plugin.scheduler.StorableAction",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.actorHostname!==""&&n.uint32(18).string(e82.actorHostname),e82.request!==void 0&&ScheduledActionRequest.encode(e82.request,n.uint32(26).fork()).ldelim(),Object.entries(e82.metadata).forEach(([t,o])=>{StorableAction_MetadataEntry.encode({key:t,value:o},n.uint32(74).fork()).ldelim()}),e82.state!==void 0&&n.uint32(80).int32(e82.state),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStorableAction();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.actorHostname=t.string();continue;case 3:if(r!==26)break;d.request=ScheduledActionRequest.decode(t,t.uint32());continue;case 9:if(r!==74)break;let a=StorableAction_MetadataEntry.decode(t,t.uint32());a.value!==void 0&&(d.metadata[a.key]=a.value);continue;case 10:if(r!==80)break;d.state=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$c(e82.id)?globalThis.String(e82.id):"",actorHostname:isSet$c(e82.actorHostname)?globalThis.String(e82.actorHostname):"",request:isSet$c(e82.request)?ScheduledActionRequest.fromJSON(e82.request):void 0,metadata:isObject$9(e82.metadata)?Object.entries(e82.metadata).reduce((n,[t,o])=>(n[t]=Strings.fromJSON(o),n),{}):{},state:isSet$c(e82.state)?storableAction_StateFromJSON(e82.state):void 0}},toJSON(e82){let n={};if(e82.id!==""&&(n.id=e82.id),e82.actorHostname!==""&&(n.actorHostname=e82.actorHostname),e82.request!==void 0&&(n.request=ScheduledActionRequest.toJSON(e82.request)),e82.metadata){let t=Object.entries(e82.metadata);t.length>0&&(n.metadata={},t.forEach(([o,d])=>{n.metadata[o]=Strings.toJSON(d)}))}return e82.state!==void 0&&(n.state=storableAction_StateToJSON(e82.state)),n},create(e82){return StorableAction.fromPartial(e82??{})},fromPartial(e82){let n=createBaseStorableAction();return n.id=e82.id??"",n.actorHostname=e82.actorHostname??"",n.request=e82.request!==void 0&&e82.request!==null?ScheduledActionRequest.fromPartial(e82.request):void 0,n.metadata=Object.entries(e82.metadata??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=Strings.fromPartial(d)),t),{}),n.state=e82.state??void 0,n}};messageTypeRegistry.set(StorableAction.$type,StorableAction);function createBaseStorableAction_MetadataEntry(){return{key:"",value:void 0}}var StorableAction_MetadataEntry={$type:"devvit.plugin.scheduler.StorableAction.MetadataEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&Strings.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseStorableAction_MetadataEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=Strings.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$c(e82.key)?globalThis.String(e82.key):"",value:isSet$c(e82.value)?Strings.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=Strings.toJSON(e82.value)),n},create(e82){return StorableAction_MetadataEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseStorableAction_MetadataEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?Strings.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(StorableAction_MetadataEntry.$type,StorableAction_MetadataEntry);function createBaseListActionRequest(){return{before:void 0,after:void 0}}var ListActionRequest={$type:"devvit.plugin.scheduler.ListActionRequest",encode(e82,n=_m0.Writer.create()){return e82.before!==void 0&&Timestamp.encode(toTimestamp$2(e82.before),n.uint32(10).fork()).ldelim(),e82.after!==void 0&&Timestamp.encode(toTimestamp$2(e82.after),n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseListActionRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.before=fromTimestamp$2(Timestamp.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.after=fromTimestamp$2(Timestamp.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{before:isSet$c(e82.before)?fromJsonTimestamp$2(e82.before):void 0,after:isSet$c(e82.after)?fromJsonTimestamp$2(e82.after):void 0}},toJSON(e82){let n={};return e82.before!==void 0&&(n.before=e82.before.toISOString()),e82.after!==void 0&&(n.after=e82.after.toISOString()),n},create(e82){return ListActionRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseListActionRequest();return n.before=e82.before??void 0,n.after=e82.after??void 0,n}};messageTypeRegistry.set(ListActionRequest.$type,ListActionRequest);function createBaseGetActionResponse(){return{id:"",request:void 0}}var GetActionResponse={$type:"devvit.plugin.scheduler.GetActionResponse",encode(e82,n=_m0.Writer.create()){return e82.id!==""&&n.uint32(10).string(e82.id),e82.request!==void 0&&ScheduledActionRequest.encode(e82.request,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseGetActionResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.id=t.string();continue;case 2:if(r!==18)break;d.request=ScheduledActionRequest.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{id:isSet$c(e82.id)?globalThis.String(e82.id):"",request:isSet$c(e82.request)?ScheduledActionRequest.fromJSON(e82.request):void 0}},toJSON(e82){let n={};return e82.id!==""&&(n.id=e82.id),e82.request!==void 0&&(n.request=ScheduledActionRequest.toJSON(e82.request)),n},create(e82){return GetActionResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseGetActionResponse();return n.id=e82.id??"",n.request=e82.request!==void 0&&e82.request!==null?ScheduledActionRequest.fromPartial(e82.request):void 0,n}};messageTypeRegistry.set(GetActionResponse.$type,GetActionResponse);function createBaseListActionResponse(){return{actions:[]}}var ListActionResponse={$type:"devvit.plugin.scheduler.ListActionResponse",encode(e82,n=_m0.Writer.create()){for(let t of e82.actions)GetActionResponse.encode(t,n.uint32(10).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseListActionResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actions.push(GetActionResponse.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actions:globalThis.Array.isArray(e82?.actions)?e82.actions.map(n=>GetActionResponse.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return(t=e82.actions)!=null&&t.length&&(n.actions=e82.actions.map(o=>GetActionResponse.toJSON(o))),n},create(e82){return ListActionResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseListActionResponse();return n.actions=((t=e82.actions)==null?void 0:t.map(o=>GetActionResponse.fromPartial(o)))||[],n}};messageTypeRegistry.set(ListActionResponse.$type,ListActionResponse);var SchedulerDefinition={name:"Scheduler",fullName:"devvit.plugin.scheduler.Scheduler",methods:{schedule:{name:"Schedule",requestType:ScheduledActionRequest,requestStream:!1,responseType:ScheduledActionResponse,responseStream:!1,options:{}},cancel:{name:"Cancel",requestType:CancelActionRequest,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}},list:{name:"List",requestType:ListActionRequest,requestStream:!1,responseType:ListActionResponse,responseStream:!1,options:{}}}};function toTimestamp$2(e82){let n=Math.trunc(e82.getTime()/1e3),t=e82.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function fromTimestamp$2(e82){let n=(e82.seconds||0)*1e3;return n+=(e82.nanos||0)/1e6,new globalThis.Date(n)}function fromJsonTimestamp$2(e82){return e82 instanceof globalThis.Date?e82:typeof e82=="string"?new globalThis.Date(e82):fromTimestamp$2(Timestamp.fromJSON(e82))}function isObject$9(e82){return typeof e82=="object"&&e82!==null}function isSet$c(e82){return e82!=null}function createBaseSettingsValues(){return{version:"",settings:{},timestamp:void 0}}var SettingsValues={$type:"devvit.plugin.settings.v1alpha.SettingsValues",encode(e82,n=_m0.Writer.create()){return e82.version!==""&&n.uint32(10).string(e82.version),Object.entries(e82.settings).forEach(([t,o])=>{SettingsValues_SettingsEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),e82.timestamp!==void 0&&Timestamp.encode(toTimestamp$1(e82.timestamp),n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSettingsValues();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.version=t.string();continue;case 2:if(r!==18)break;let a=SettingsValues_SettingsEntry.decode(t,t.uint32());a.value!==void 0&&(d.settings[a.key]=a.value);continue;case 3:if(r!==26)break;d.timestamp=fromTimestamp$1(Timestamp.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{version:isSet$b(e82.version)?globalThis.String(e82.version):"",settings:isObject$8(e82.settings)?Object.entries(e82.settings).reduce((n,[t,o])=>(n[t]=FormFieldValue.fromJSON(o),n),{}):{},timestamp:isSet$b(e82.timestamp)?fromJsonTimestamp$1(e82.timestamp):void 0}},toJSON(e82){let n={};if(e82.version!==""&&(n.version=e82.version),e82.settings){let t=Object.entries(e82.settings);t.length>0&&(n.settings={},t.forEach(([o,d])=>{n.settings[o]=FormFieldValue.toJSON(d)}))}return e82.timestamp!==void 0&&(n.timestamp=e82.timestamp.toISOString()),n},create(e82){return SettingsValues.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSettingsValues();return n.version=e82.version??"",n.settings=Object.entries(e82.settings??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=FormFieldValue.fromPartial(d)),t),{}),n.timestamp=e82.timestamp??void 0,n}};messageTypeRegistry.set(SettingsValues.$type,SettingsValues);function createBaseSettingsValues_SettingsEntry(){return{key:"",value:void 0}}var SettingsValues_SettingsEntry={$type:"devvit.plugin.settings.v1alpha.SettingsValues.SettingsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==void 0&&FormFieldValue.encode(e82.value,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSettingsValues_SettingsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=FormFieldValue.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet$b(e82.key)?globalThis.String(e82.key):"",value:isSet$b(e82.value)?FormFieldValue.fromJSON(e82.value):void 0}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==void 0&&(n.value=FormFieldValue.toJSON(e82.value)),n},create(e82){return SettingsValues_SettingsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSettingsValues_SettingsEntry();return n.key=e82.key??"",n.value=e82.value!==void 0&&e82.value!==null?FormFieldValue.fromPartial(e82.value):void 0,n}};messageTypeRegistry.set(SettingsValues_SettingsEntry.$type,SettingsValues_SettingsEntry);function createBaseSettingsRequest(){return{}}var SettingsRequest={$type:"devvit.plugin.settings.v1alpha.SettingsRequest",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSettingsRequest();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return SettingsRequest.fromPartial(e82??{})},fromPartial(e82){return createBaseSettingsRequest()}};messageTypeRegistry.set(SettingsRequest.$type,SettingsRequest);function createBaseSettingsResponse(){return{installationSettings:void 0,instanceSettings:void 0,appSettings:void 0}}var SettingsResponse={$type:"devvit.plugin.settings.v1alpha.SettingsResponse",encode(e82,n=_m0.Writer.create()){return e82.installationSettings!==void 0&&SettingsValues.encode(e82.installationSettings,n.uint32(10).fork()).ldelim(),e82.instanceSettings!==void 0&&SettingsValues.encode(e82.instanceSettings,n.uint32(18).fork()).ldelim(),e82.appSettings!==void 0&&SettingsValues.encode(e82.appSettings,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSettingsResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.installationSettings=SettingsValues.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.instanceSettings=SettingsValues.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.appSettings=SettingsValues.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{installationSettings:isSet$b(e82.installationSettings)?SettingsValues.fromJSON(e82.installationSettings):void 0,instanceSettings:isSet$b(e82.instanceSettings)?SettingsValues.fromJSON(e82.instanceSettings):void 0,appSettings:isSet$b(e82.appSettings)?SettingsValues.fromJSON(e82.appSettings):void 0}},toJSON(e82){let n={};return e82.installationSettings!==void 0&&(n.installationSettings=SettingsValues.toJSON(e82.installationSettings)),e82.instanceSettings!==void 0&&(n.instanceSettings=SettingsValues.toJSON(e82.instanceSettings)),e82.appSettings!==void 0&&(n.appSettings=SettingsValues.toJSON(e82.appSettings)),n},create(e82){return SettingsResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSettingsResponse();return n.installationSettings=e82.installationSettings!==void 0&&e82.installationSettings!==null?SettingsValues.fromPartial(e82.installationSettings):void 0,n.instanceSettings=e82.instanceSettings!==void 0&&e82.instanceSettings!==null?SettingsValues.fromPartial(e82.instanceSettings):void 0,n.appSettings=e82.appSettings!==void 0&&e82.appSettings!==null?SettingsValues.fromPartial(e82.appSettings):void 0,n}};messageTypeRegistry.set(SettingsResponse.$type,SettingsResponse);var SettingsDefinition={name:"Settings",fullName:"devvit.plugin.settings.v1alpha.Settings",methods:{getSettings:{name:"GetSettings",requestType:SettingsRequest,requestStream:!1,responseType:SettingsResponse,responseStream:!1,options:{}}}};function toTimestamp$1(e82){let n=Math.trunc(e82.getTime()/1e3),t=e82.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function fromTimestamp$1(e82){let n=(e82.seconds||0)*1e3;return n+=(e82.nanos||0)/1e6,new globalThis.Date(n)}function fromJsonTimestamp$1(e82){return e82 instanceof globalThis.Date?e82:typeof e82=="string"?new globalThis.Date(e82):fromTimestamp$1(Timestamp.fromJSON(e82))}function isObject$8(e82){return typeof e82=="object"&&e82!==null}function isSet$b(e82){return e82!=null}function createBaseTimerMessage(){return{durationMillis:0}}var TimerMessage={$type:"devvit.plugin.timer.TimerMessage",encode(e82,n=_m0.Writer.create()){return e82.durationMillis!==0&&n.uint32(8).int32(e82.durationMillis),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTimerMessage();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.durationMillis=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{durationMillis:isSet$a(e82.durationMillis)?globalThis.Number(e82.durationMillis):0}},toJSON(e82){let n={};return e82.durationMillis!==0&&(n.durationMillis=Math.round(e82.durationMillis)),n},create(e82){return TimerMessage.fromPartial(e82??{})},fromPartial(e82){let n=createBaseTimerMessage();return n.durationMillis=e82.durationMillis??0,n}};messageTypeRegistry.set(TimerMessage.$type,TimerMessage);var TimerDefinition={name:"Timer",fullName:"devvit.plugin.timer.Timer",methods:{wait:{name:"Wait",requestType:TimerMessage,requestStream:!1,responseType:Empty$1,responseStream:!1,options:{}}}};function isSet$a(e82){return e82!=null}function createBaseBlockAlignment(){return{vertical:void 0,horizontal:void 0}}var BlockAlignment={$type:"devvit.ui.block_kit.v1beta.BlockAlignment",encode(e82,n=_m0.Writer.create()){return e82.vertical!==void 0&&n.uint32(8).int32(e82.vertical),e82.horizontal!==void 0&&n.uint32(16).int32(e82.horizontal),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockAlignment();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.vertical=t.int32();continue;case 2:if(r!==16)break;d.horizontal=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{vertical:isSet$9(e82.vertical)?blockVerticalAlignmentFromJSON(e82.vertical):void 0,horizontal:isSet$9(e82.horizontal)?blockHorizontalAlignmentFromJSON(e82.horizontal):void 0}},toJSON(e82){let n={};return e82.vertical!==void 0&&(n.vertical=blockVerticalAlignmentToJSON(e82.vertical)),e82.horizontal!==void 0&&(n.horizontal=blockHorizontalAlignmentToJSON(e82.horizontal)),n},create(e82){return BlockAlignment.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockAlignment();return n.vertical=e82.vertical??void 0,n.horizontal=e82.horizontal??void 0,n}};messageTypeRegistry.set(BlockAlignment.$type,BlockAlignment);function createBaseBlockBorder(){return{color:void 0,width:void 0,colors:void 0}}var BlockBorder={$type:"devvit.ui.block_kit.v1beta.BlockBorder",encode(e82,n=_m0.Writer.create()){return e82.color!==void 0&&n.uint32(10).string(e82.color),e82.width!==void 0&&n.uint32(16).int32(e82.width),e82.colors!==void 0&&BlockColor.encode(e82.colors,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockBorder();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.color=t.string();continue;case 2:if(r!==16)break;d.width=t.int32();continue;case 3:if(r!==26)break;d.colors=BlockColor.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{color:isSet$9(e82.color)?globalThis.String(e82.color):void 0,width:isSet$9(e82.width)?blockBorderWidthFromJSON(e82.width):void 0,colors:isSet$9(e82.colors)?BlockColor.fromJSON(e82.colors):void 0}},toJSON(e82){let n={};return e82.color!==void 0&&(n.color=e82.color),e82.width!==void 0&&(n.width=blockBorderWidthToJSON(e82.width)),e82.colors!==void 0&&(n.colors=BlockColor.toJSON(e82.colors)),n},create(e82){return BlockBorder.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockBorder();return n.color=e82.color??void 0,n.width=e82.width??void 0,n.colors=e82.colors!==void 0&&e82.colors!==null?BlockColor.fromPartial(e82.colors):void 0,n}};messageTypeRegistry.set(BlockBorder.$type,BlockBorder);function createBaseBlockSizes(){return{grow:void 0,width:void 0,height:void 0}}var BlockSizes={$type:"devvit.ui.block_kit.v1beta.BlockSizes",encode(e82,n=_m0.Writer.create()){return e82.grow!==void 0&&n.uint32(8).bool(e82.grow),e82.width!==void 0&&BlockSizes_Dimension.encode(e82.width,n.uint32(18).fork()).ldelim(),e82.height!==void 0&&BlockSizes_Dimension.encode(e82.height,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockSizes();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.grow=t.bool();continue;case 2:if(r!==18)break;d.width=BlockSizes_Dimension.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.height=BlockSizes_Dimension.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{grow:isSet$9(e82.grow)?globalThis.Boolean(e82.grow):void 0,width:isSet$9(e82.width)?BlockSizes_Dimension.fromJSON(e82.width):void 0,height:isSet$9(e82.height)?BlockSizes_Dimension.fromJSON(e82.height):void 0}},toJSON(e82){let n={};return e82.grow!==void 0&&(n.grow=e82.grow),e82.width!==void 0&&(n.width=BlockSizes_Dimension.toJSON(e82.width)),e82.height!==void 0&&(n.height=BlockSizes_Dimension.toJSON(e82.height)),n},create(e82){return BlockSizes.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockSizes();return n.grow=e82.grow??void 0,n.width=e82.width!==void 0&&e82.width!==null?BlockSizes_Dimension.fromPartial(e82.width):void 0,n.height=e82.height!==void 0&&e82.height!==null?BlockSizes_Dimension.fromPartial(e82.height):void 0,n}};messageTypeRegistry.set(BlockSizes.$type,BlockSizes);function createBaseBlockSizes_Dimension(){return{value:void 0,min:void 0,max:void 0}}var BlockSizes_Dimension={$type:"devvit.ui.block_kit.v1beta.BlockSizes.Dimension",encode(e82,n=_m0.Writer.create()){return e82.value!==void 0&&BlockSizes_Dimension_Value.encode(e82.value,n.uint32(10).fork()).ldelim(),e82.min!==void 0&&BlockSizes_Dimension_Value.encode(e82.min,n.uint32(18).fork()).ldelim(),e82.max!==void 0&&BlockSizes_Dimension_Value.encode(e82.max,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockSizes_Dimension();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.value=BlockSizes_Dimension_Value.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.min=BlockSizes_Dimension_Value.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.max=BlockSizes_Dimension_Value.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$9(e82.value)?BlockSizes_Dimension_Value.fromJSON(e82.value):void 0,min:isSet$9(e82.min)?BlockSizes_Dimension_Value.fromJSON(e82.min):void 0,max:isSet$9(e82.max)?BlockSizes_Dimension_Value.fromJSON(e82.max):void 0}},toJSON(e82){let n={};return e82.value!==void 0&&(n.value=BlockSizes_Dimension_Value.toJSON(e82.value)),e82.min!==void 0&&(n.min=BlockSizes_Dimension_Value.toJSON(e82.min)),e82.max!==void 0&&(n.max=BlockSizes_Dimension_Value.toJSON(e82.max)),n},create(e82){return BlockSizes_Dimension.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockSizes_Dimension();return n.value=e82.value!==void 0&&e82.value!==null?BlockSizes_Dimension_Value.fromPartial(e82.value):void 0,n.min=e82.min!==void 0&&e82.min!==null?BlockSizes_Dimension_Value.fromPartial(e82.min):void 0,n.max=e82.max!==void 0&&e82.max!==null?BlockSizes_Dimension_Value.fromPartial(e82.max):void 0,n}};messageTypeRegistry.set(BlockSizes_Dimension.$type,BlockSizes_Dimension);function createBaseBlockSizes_Dimension_Value(){return{value:0,unit:0}}var BlockSizes_Dimension_Value={$type:"devvit.ui.block_kit.v1beta.BlockSizes.Dimension.Value",encode(e82,n=_m0.Writer.create()){return e82.value!==0&&n.uint32(13).float(e82.value),e82.unit!==0&&n.uint32(16).int32(e82.unit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockSizes_Dimension_Value();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==13)break;d.value=t.float();continue;case 2:if(r!==16)break;d.unit=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{value:isSet$9(e82.value)?globalThis.Number(e82.value):0,unit:isSet$9(e82.unit)?blockSizeUnitFromJSON(e82.unit):0}},toJSON(e82){let n={};return e82.value!==0&&(n.value=e82.value),e82.unit!==0&&(n.unit=blockSizeUnitToJSON(e82.unit)),n},create(e82){return BlockSizes_Dimension_Value.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockSizes_Dimension_Value();return n.value=e82.value??0,n.unit=e82.unit??0,n}};messageTypeRegistry.set(BlockSizes_Dimension_Value.$type,BlockSizes_Dimension_Value);function createBaseBlockSize(){return{grow:void 0,width:void 0,widthUnit:void 0,height:void 0,heightUnit:void 0}}var BlockSize={$type:"devvit.ui.block_kit.v1beta.BlockSize",encode(e82,n=_m0.Writer.create()){return e82.grow!==void 0&&n.uint32(8).bool(e82.grow),e82.width!==void 0&&n.uint32(21).float(e82.width),e82.widthUnit!==void 0&&n.uint32(32).int32(e82.widthUnit),e82.height!==void 0&&n.uint32(29).float(e82.height),e82.heightUnit!==void 0&&n.uint32(40).int32(e82.heightUnit),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockSize();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.grow=t.bool();continue;case 2:if(r!==21)break;d.width=t.float();continue;case 4:if(r!==32)break;d.widthUnit=t.int32();continue;case 3:if(r!==29)break;d.height=t.float();continue;case 5:if(r!==40)break;d.heightUnit=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{grow:isSet$9(e82.grow)?globalThis.Boolean(e82.grow):void 0,width:isSet$9(e82.width)?globalThis.Number(e82.width):void 0,widthUnit:isSet$9(e82.widthUnit)?blockSizeUnitFromJSON(e82.widthUnit):void 0,height:isSet$9(e82.height)?globalThis.Number(e82.height):void 0,heightUnit:isSet$9(e82.heightUnit)?blockSizeUnitFromJSON(e82.heightUnit):void 0}},toJSON(e82){let n={};return e82.grow!==void 0&&(n.grow=e82.grow),e82.width!==void 0&&(n.width=e82.width),e82.widthUnit!==void 0&&(n.widthUnit=blockSizeUnitToJSON(e82.widthUnit)),e82.height!==void 0&&(n.height=e82.height),e82.heightUnit!==void 0&&(n.heightUnit=blockSizeUnitToJSON(e82.heightUnit)),n},create(e82){return BlockSize.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockSize();return n.grow=e82.grow??void 0,n.width=e82.width??void 0,n.widthUnit=e82.widthUnit??void 0,n.height=e82.height??void 0,n.heightUnit=e82.heightUnit??void 0,n}};messageTypeRegistry.set(BlockSize.$type,BlockSize);function createBaseBlockAction(){return{type:0,id:"",data:void 0}}var BlockAction={$type:"devvit.ui.block_kit.v1beta.BlockAction",encode(e82,n=_m0.Writer.create()){return e82.type!==0&&n.uint32(8).int32(e82.type),e82.id!==""&&n.uint32(18).string(e82.id),e82.data!==void 0&&Struct.encode(Struct.wrap(e82.data),n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockAction();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.type=t.int32();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==26)break;d.data=Struct.unwrap(Struct.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{type:isSet$9(e82.type)?blockActionTypeFromJSON(e82.type):0,id:isSet$9(e82.id)?globalThis.String(e82.id):"",data:isObject$7(e82.data)?e82.data:void 0}},toJSON(e82){let n={};return e82.type!==0&&(n.type=blockActionTypeToJSON(e82.type)),e82.id!==""&&(n.id=e82.id),e82.data!==void 0&&(n.data=e82.data),n},create(e82){return BlockAction.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockAction();return n.type=e82.type??0,n.id=e82.id??"",n.data=e82.data??void 0,n}};messageTypeRegistry.set(BlockAction.$type,BlockAction);function createBaseBlockColor(){return{light:void 0,dark:void 0}}var BlockColor={$type:"devvit.ui.block_kit.v1beta.BlockColor",encode(e82,n=_m0.Writer.create()){return e82.light!==void 0&&n.uint32(10).string(e82.light),e82.dark!==void 0&&n.uint32(18).string(e82.dark),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockColor();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.light=t.string();continue;case 2:if(r!==18)break;d.dark=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{light:isSet$9(e82.light)?globalThis.String(e82.light):void 0,dark:isSet$9(e82.dark)?globalThis.String(e82.dark):void 0}},toJSON(e82){let n={};return e82.light!==void 0&&(n.light=e82.light),e82.dark!==void 0&&(n.dark=e82.dark),n},create(e82){return BlockColor.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockColor();return n.light=e82.light??void 0,n.dark=e82.dark??void 0,n}};messageTypeRegistry.set(BlockColor.$type,BlockColor);function isObject$7(e82){return typeof e82=="object"&&e82!==null}function isSet$9(e82){return e82!=null}function createBaseBlock(){return{type:0,size:void 0,sizes:void 0,config:void 0,actions:[],id:void 0,key:void 0}}var Block={$type:"devvit.ui.block_kit.v1beta.Block",encode(e82,n=_m0.Writer.create()){e82.type!==0&&n.uint32(8).int32(e82.type),e82.size!==void 0&&BlockSize.encode(e82.size,n.uint32(18).fork()).ldelim(),e82.sizes!==void 0&&BlockSizes.encode(e82.sizes,n.uint32(42).fork()).ldelim(),e82.config!==void 0&&BlockConfig.encode(e82.config,n.uint32(26).fork()).ldelim();for(let t of e82.actions)BlockAction.encode(t,n.uint32(34).fork()).ldelim();return e82.id!==void 0&&n.uint32(50).string(e82.id),e82.key!==void 0&&n.uint32(58).string(e82.key),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlock();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.type=t.int32();continue;case 2:if(r!==18)break;d.size=BlockSize.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.sizes=BlockSizes.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.config=BlockConfig.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.actions.push(BlockAction.decode(t,t.uint32()));continue;case 6:if(r!==50)break;d.id=t.string();continue;case 7:if(r!==58)break;d.key=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{type:isSet$8(e82.type)?blockTypeFromJSON(e82.type):0,size:isSet$8(e82.size)?BlockSize.fromJSON(e82.size):void 0,sizes:isSet$8(e82.sizes)?BlockSizes.fromJSON(e82.sizes):void 0,config:isSet$8(e82.config)?BlockConfig.fromJSON(e82.config):void 0,actions:globalThis.Array.isArray(e82?.actions)?e82.actions.map(n=>BlockAction.fromJSON(n)):[],id:isSet$8(e82.id)?globalThis.String(e82.id):void 0,key:isSet$8(e82.key)?globalThis.String(e82.key):void 0}},toJSON(e82){var t;let n={};return e82.type!==0&&(n.type=blockTypeToJSON(e82.type)),e82.size!==void 0&&(n.size=BlockSize.toJSON(e82.size)),e82.sizes!==void 0&&(n.sizes=BlockSizes.toJSON(e82.sizes)),e82.config!==void 0&&(n.config=BlockConfig.toJSON(e82.config)),(t=e82.actions)!=null&&t.length&&(n.actions=e82.actions.map(o=>BlockAction.toJSON(o))),e82.id!==void 0&&(n.id=e82.id),e82.key!==void 0&&(n.key=e82.key),n},create(e82){return Block.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseBlock();return n.type=e82.type??0,n.size=e82.size!==void 0&&e82.size!==null?BlockSize.fromPartial(e82.size):void 0,n.sizes=e82.sizes!==void 0&&e82.sizes!==null?BlockSizes.fromPartial(e82.sizes):void 0,n.config=e82.config!==void 0&&e82.config!==null?BlockConfig.fromPartial(e82.config):void 0,n.actions=((t=e82.actions)==null?void 0:t.map(o=>BlockAction.fromPartial(o)))||[],n.id=e82.id??void 0,n.key=e82.key??void 0,n}};messageTypeRegistry.set(Block.$type,Block);function createBaseBlockConfig(){return{rootConfig:void 0,stackConfig:void 0,textConfig:void 0,buttonConfig:void 0,imageConfig:void 0,spacerConfig:void 0,iconConfig:void 0,avatarConfig:void 0,fullsnooConfig:void 0,animationConfig:void 0,webviewConfig:void 0}}var BlockConfig={$type:"devvit.ui.block_kit.v1beta.BlockConfig",encode(e82,n=_m0.Writer.create()){return e82.rootConfig!==void 0&&BlockConfig_Root.encode(e82.rootConfig,n.uint32(10).fork()).ldelim(),e82.stackConfig!==void 0&&BlockConfig_Stack.encode(e82.stackConfig,n.uint32(18).fork()).ldelim(),e82.textConfig!==void 0&&BlockConfig_Text.encode(e82.textConfig,n.uint32(26).fork()).ldelim(),e82.buttonConfig!==void 0&&BlockConfig_Button.encode(e82.buttonConfig,n.uint32(34).fork()).ldelim(),e82.imageConfig!==void 0&&BlockConfig_Image.encode(e82.imageConfig,n.uint32(42).fork()).ldelim(),e82.spacerConfig!==void 0&&BlockConfig_Spacer.encode(e82.spacerConfig,n.uint32(50).fork()).ldelim(),e82.iconConfig!==void 0&&BlockConfig_Icon.encode(e82.iconConfig,n.uint32(58).fork()).ldelim(),e82.avatarConfig!==void 0&&BlockConfig_Avatar.encode(e82.avatarConfig,n.uint32(66).fork()).ldelim(),e82.fullsnooConfig!==void 0&&BlockConfig_FullSnoo.encode(e82.fullsnooConfig,n.uint32(74).fork()).ldelim(),e82.animationConfig!==void 0&&BlockConfig_Animation.encode(e82.animationConfig,n.uint32(82).fork()).ldelim(),e82.webviewConfig!==void 0&&BlockConfig_WebView.encode(e82.webviewConfig,n.uint32(802).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.rootConfig=BlockConfig_Root.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.stackConfig=BlockConfig_Stack.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.textConfig=BlockConfig_Text.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.buttonConfig=BlockConfig_Button.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.imageConfig=BlockConfig_Image.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.spacerConfig=BlockConfig_Spacer.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.iconConfig=BlockConfig_Icon.decode(t,t.uint32());continue;case 8:if(r!==66)break;d.avatarConfig=BlockConfig_Avatar.decode(t,t.uint32());continue;case 9:if(r!==74)break;d.fullsnooConfig=BlockConfig_FullSnoo.decode(t,t.uint32());continue;case 10:if(r!==82)break;d.animationConfig=BlockConfig_Animation.decode(t,t.uint32());continue;case 100:if(r!==802)break;d.webviewConfig=BlockConfig_WebView.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{rootConfig:isSet$8(e82.rootConfig)?BlockConfig_Root.fromJSON(e82.rootConfig):void 0,stackConfig:isSet$8(e82.stackConfig)?BlockConfig_Stack.fromJSON(e82.stackConfig):void 0,textConfig:isSet$8(e82.textConfig)?BlockConfig_Text.fromJSON(e82.textConfig):void 0,buttonConfig:isSet$8(e82.buttonConfig)?BlockConfig_Button.fromJSON(e82.buttonConfig):void 0,imageConfig:isSet$8(e82.imageConfig)?BlockConfig_Image.fromJSON(e82.imageConfig):void 0,spacerConfig:isSet$8(e82.spacerConfig)?BlockConfig_Spacer.fromJSON(e82.spacerConfig):void 0,iconConfig:isSet$8(e82.iconConfig)?BlockConfig_Icon.fromJSON(e82.iconConfig):void 0,avatarConfig:isSet$8(e82.avatarConfig)?BlockConfig_Avatar.fromJSON(e82.avatarConfig):void 0,fullsnooConfig:isSet$8(e82.fullsnooConfig)?BlockConfig_FullSnoo.fromJSON(e82.fullsnooConfig):void 0,animationConfig:isSet$8(e82.animationConfig)?BlockConfig_Animation.fromJSON(e82.animationConfig):void 0,webviewConfig:isSet$8(e82.webviewConfig)?BlockConfig_WebView.fromJSON(e82.webviewConfig):void 0}},toJSON(e82){let n={};return e82.rootConfig!==void 0&&(n.rootConfig=BlockConfig_Root.toJSON(e82.rootConfig)),e82.stackConfig!==void 0&&(n.stackConfig=BlockConfig_Stack.toJSON(e82.stackConfig)),e82.textConfig!==void 0&&(n.textConfig=BlockConfig_Text.toJSON(e82.textConfig)),e82.buttonConfig!==void 0&&(n.buttonConfig=BlockConfig_Button.toJSON(e82.buttonConfig)),e82.imageConfig!==void 0&&(n.imageConfig=BlockConfig_Image.toJSON(e82.imageConfig)),e82.spacerConfig!==void 0&&(n.spacerConfig=BlockConfig_Spacer.toJSON(e82.spacerConfig)),e82.iconConfig!==void 0&&(n.iconConfig=BlockConfig_Icon.toJSON(e82.iconConfig)),e82.avatarConfig!==void 0&&(n.avatarConfig=BlockConfig_Avatar.toJSON(e82.avatarConfig)),e82.fullsnooConfig!==void 0&&(n.fullsnooConfig=BlockConfig_FullSnoo.toJSON(e82.fullsnooConfig)),e82.animationConfig!==void 0&&(n.animationConfig=BlockConfig_Animation.toJSON(e82.animationConfig)),e82.webviewConfig!==void 0&&(n.webviewConfig=BlockConfig_WebView.toJSON(e82.webviewConfig)),n},create(e82){return BlockConfig.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig();return n.rootConfig=e82.rootConfig!==void 0&&e82.rootConfig!==null?BlockConfig_Root.fromPartial(e82.rootConfig):void 0,n.stackConfig=e82.stackConfig!==void 0&&e82.stackConfig!==null?BlockConfig_Stack.fromPartial(e82.stackConfig):void 0,n.textConfig=e82.textConfig!==void 0&&e82.textConfig!==null?BlockConfig_Text.fromPartial(e82.textConfig):void 0,n.buttonConfig=e82.buttonConfig!==void 0&&e82.buttonConfig!==null?BlockConfig_Button.fromPartial(e82.buttonConfig):void 0,n.imageConfig=e82.imageConfig!==void 0&&e82.imageConfig!==null?BlockConfig_Image.fromPartial(e82.imageConfig):void 0,n.spacerConfig=e82.spacerConfig!==void 0&&e82.spacerConfig!==null?BlockConfig_Spacer.fromPartial(e82.spacerConfig):void 0,n.iconConfig=e82.iconConfig!==void 0&&e82.iconConfig!==null?BlockConfig_Icon.fromPartial(e82.iconConfig):void 0,n.avatarConfig=e82.avatarConfig!==void 0&&e82.avatarConfig!==null?BlockConfig_Avatar.fromPartial(e82.avatarConfig):void 0,n.fullsnooConfig=e82.fullsnooConfig!==void 0&&e82.fullsnooConfig!==null?BlockConfig_FullSnoo.fromPartial(e82.fullsnooConfig):void 0,n.animationConfig=e82.animationConfig!==void 0&&e82.animationConfig!==null?BlockConfig_Animation.fromPartial(e82.animationConfig):void 0,n.webviewConfig=e82.webviewConfig!==void 0&&e82.webviewConfig!==null?BlockConfig_WebView.fromPartial(e82.webviewConfig):void 0,n}};messageTypeRegistry.set(BlockConfig.$type,BlockConfig);function createBaseBlockConfig_Root(){return{children:[],height:0}}var BlockConfig_Root={$type:"devvit.ui.block_kit.v1beta.BlockConfig.Root",encode(e82,n=_m0.Writer.create()){for(let t of e82.children)Block.encode(t,n.uint32(10).fork()).ldelim();return e82.height!==0&&n.uint32(16).int32(e82.height),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_Root();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.children.push(Block.decode(t,t.uint32()));continue;case 2:if(r!==16)break;d.height=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>Block.fromJSON(n)):[],height:isSet$8(e82.height)?globalThis.Number(e82.height):0}},toJSON(e82){var t;let n={};return(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>Block.toJSON(o))),e82.height!==0&&(n.height=Math.round(e82.height)),n},create(e82){return BlockConfig_Root.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseBlockConfig_Root();return n.children=((t=e82.children)==null?void 0:t.map(o=>Block.fromPartial(o)))||[],n.height=e82.height??0,n}};messageTypeRegistry.set(BlockConfig_Root.$type,BlockConfig_Root);function createBaseBlockConfig_Stack(){return{direction:0,children:[],reverse:void 0,alignment:void 0,padding:void 0,gap:void 0,border:void 0,cornerRadius:void 0,backgroundColor:void 0,backgroundColors:void 0}}var BlockConfig_Stack={$type:"devvit.ui.block_kit.v1beta.BlockConfig.Stack",encode(e82,n=_m0.Writer.create()){e82.direction!==0&&n.uint32(8).int32(e82.direction);for(let t of e82.children)Block.encode(t,n.uint32(18).fork()).ldelim();return e82.reverse!==void 0&&n.uint32(24).bool(e82.reverse),e82.alignment!==void 0&&BlockAlignment.encode(e82.alignment,n.uint32(34).fork()).ldelim(),e82.padding!==void 0&&n.uint32(40).int32(e82.padding),e82.gap!==void 0&&n.uint32(48).int32(e82.gap),e82.border!==void 0&&BlockBorder.encode(e82.border,n.uint32(58).fork()).ldelim(),e82.cornerRadius!==void 0&&n.uint32(64).int32(e82.cornerRadius),e82.backgroundColor!==void 0&&n.uint32(74).string(e82.backgroundColor),e82.backgroundColors!==void 0&&BlockColor.encode(e82.backgroundColors,n.uint32(82).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_Stack();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.direction=t.int32();continue;case 2:if(r!==18)break;d.children.push(Block.decode(t,t.uint32()));continue;case 3:if(r!==24)break;d.reverse=t.bool();continue;case 4:if(r!==34)break;d.alignment=BlockAlignment.decode(t,t.uint32());continue;case 5:if(r!==40)break;d.padding=t.int32();continue;case 6:if(r!==48)break;d.gap=t.int32();continue;case 7:if(r!==58)break;d.border=BlockBorder.decode(t,t.uint32());continue;case 8:if(r!==64)break;d.cornerRadius=t.int32();continue;case 9:if(r!==74)break;d.backgroundColor=t.string();continue;case 10:if(r!==82)break;d.backgroundColors=BlockColor.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{direction:isSet$8(e82.direction)?blockStackDirectionFromJSON(e82.direction):0,children:globalThis.Array.isArray(e82?.children)?e82.children.map(n=>Block.fromJSON(n)):[],reverse:isSet$8(e82.reverse)?globalThis.Boolean(e82.reverse):void 0,alignment:isSet$8(e82.alignment)?BlockAlignment.fromJSON(e82.alignment):void 0,padding:isSet$8(e82.padding)?blockPaddingFromJSON(e82.padding):void 0,gap:isSet$8(e82.gap)?blockGapFromJSON(e82.gap):void 0,border:isSet$8(e82.border)?BlockBorder.fromJSON(e82.border):void 0,cornerRadius:isSet$8(e82.cornerRadius)?blockRadiusFromJSON(e82.cornerRadius):void 0,backgroundColor:isSet$8(e82.backgroundColor)?globalThis.String(e82.backgroundColor):void 0,backgroundColors:isSet$8(e82.backgroundColors)?BlockColor.fromJSON(e82.backgroundColors):void 0}},toJSON(e82){var t;let n={};return e82.direction!==0&&(n.direction=blockStackDirectionToJSON(e82.direction)),(t=e82.children)!=null&&t.length&&(n.children=e82.children.map(o=>Block.toJSON(o))),e82.reverse!==void 0&&(n.reverse=e82.reverse),e82.alignment!==void 0&&(n.alignment=BlockAlignment.toJSON(e82.alignment)),e82.padding!==void 0&&(n.padding=blockPaddingToJSON(e82.padding)),e82.gap!==void 0&&(n.gap=blockGapToJSON(e82.gap)),e82.border!==void 0&&(n.border=BlockBorder.toJSON(e82.border)),e82.cornerRadius!==void 0&&(n.cornerRadius=blockRadiusToJSON(e82.cornerRadius)),e82.backgroundColor!==void 0&&(n.backgroundColor=e82.backgroundColor),e82.backgroundColors!==void 0&&(n.backgroundColors=BlockColor.toJSON(e82.backgroundColors)),n},create(e82){return BlockConfig_Stack.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseBlockConfig_Stack();return n.direction=e82.direction??0,n.children=((t=e82.children)==null?void 0:t.map(o=>Block.fromPartial(o)))||[],n.reverse=e82.reverse??void 0,n.alignment=e82.alignment!==void 0&&e82.alignment!==null?BlockAlignment.fromPartial(e82.alignment):void 0,n.padding=e82.padding??void 0,n.gap=e82.gap??void 0,n.border=e82.border!==void 0&&e82.border!==null?BlockBorder.fromPartial(e82.border):void 0,n.cornerRadius=e82.cornerRadius??void 0,n.backgroundColor=e82.backgroundColor??void 0,n.backgroundColors=e82.backgroundColors!==void 0&&e82.backgroundColors!==null?BlockColor.fromPartial(e82.backgroundColors):void 0,n}};messageTypeRegistry.set(BlockConfig_Stack.$type,BlockConfig_Stack);function createBaseBlockConfig_Text(){return{text:"",size:void 0,weight:void 0,color:void 0,alignment:void 0,outline:void 0,style:void 0,selectable:void 0,colors:void 0,wrap:void 0,overflow:void 0}}var BlockConfig_Text={$type:"devvit.ui.block_kit.v1beta.BlockConfig.Text",encode(e82,n=_m0.Writer.create()){return e82.text!==""&&n.uint32(10).string(e82.text),e82.size!==void 0&&n.uint32(16).int32(e82.size),e82.weight!==void 0&&n.uint32(24).int32(e82.weight),e82.color!==void 0&&n.uint32(34).string(e82.color),e82.alignment!==void 0&&BlockAlignment.encode(e82.alignment,n.uint32(42).fork()).ldelim(),e82.outline!==void 0&&n.uint32(48).int32(e82.outline),e82.style!==void 0&&n.uint32(56).int32(e82.style),e82.selectable!==void 0&&n.uint32(64).bool(e82.selectable),e82.colors!==void 0&&BlockColor.encode(e82.colors,n.uint32(74).fork()).ldelim(),e82.wrap!==void 0&&n.uint32(80).bool(e82.wrap),e82.overflow!==void 0&&n.uint32(88).int32(e82.overflow),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_Text();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.text=t.string();continue;case 2:if(r!==16)break;d.size=t.int32();continue;case 3:if(r!==24)break;d.weight=t.int32();continue;case 4:if(r!==34)break;d.color=t.string();continue;case 5:if(r!==42)break;d.alignment=BlockAlignment.decode(t,t.uint32());continue;case 6:if(r!==48)break;d.outline=t.int32();continue;case 7:if(r!==56)break;d.style=t.int32();continue;case 8:if(r!==64)break;d.selectable=t.bool();continue;case 9:if(r!==74)break;d.colors=BlockColor.decode(t,t.uint32());continue;case 10:if(r!==80)break;d.wrap=t.bool();continue;case 11:if(r!==88)break;d.overflow=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{text:isSet$8(e82.text)?globalThis.String(e82.text):"",size:isSet$8(e82.size)?blockTextSizeFromJSON(e82.size):void 0,weight:isSet$8(e82.weight)?blockTextWeightFromJSON(e82.weight):void 0,color:isSet$8(e82.color)?globalThis.String(e82.color):void 0,alignment:isSet$8(e82.alignment)?BlockAlignment.fromJSON(e82.alignment):void 0,outline:isSet$8(e82.outline)?blockTextOutlineFromJSON(e82.outline):void 0,style:isSet$8(e82.style)?blockTextStyleFromJSON(e82.style):void 0,selectable:isSet$8(e82.selectable)?globalThis.Boolean(e82.selectable):void 0,colors:isSet$8(e82.colors)?BlockColor.fromJSON(e82.colors):void 0,wrap:isSet$8(e82.wrap)?globalThis.Boolean(e82.wrap):void 0,overflow:isSet$8(e82.overflow)?blockTextOverflowFromJSON(e82.overflow):void 0}},toJSON(e82){let n={};return e82.text!==""&&(n.text=e82.text),e82.size!==void 0&&(n.size=blockTextSizeToJSON(e82.size)),e82.weight!==void 0&&(n.weight=blockTextWeightToJSON(e82.weight)),e82.color!==void 0&&(n.color=e82.color),e82.alignment!==void 0&&(n.alignment=BlockAlignment.toJSON(e82.alignment)),e82.outline!==void 0&&(n.outline=blockTextOutlineToJSON(e82.outline)),e82.style!==void 0&&(n.style=blockTextStyleToJSON(e82.style)),e82.selectable!==void 0&&(n.selectable=e82.selectable),e82.colors!==void 0&&(n.colors=BlockColor.toJSON(e82.colors)),e82.wrap!==void 0&&(n.wrap=e82.wrap),e82.overflow!==void 0&&(n.overflow=blockTextOverflowToJSON(e82.overflow)),n},create(e82){return BlockConfig_Text.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig_Text();return n.text=e82.text??"",n.size=e82.size??void 0,n.weight=e82.weight??void 0,n.color=e82.color??void 0,n.alignment=e82.alignment!==void 0&&e82.alignment!==null?BlockAlignment.fromPartial(e82.alignment):void 0,n.outline=e82.outline??void 0,n.style=e82.style??void 0,n.selectable=e82.selectable??void 0,n.colors=e82.colors!==void 0&&e82.colors!==null?BlockColor.fromPartial(e82.colors):void 0,n.wrap=e82.wrap??void 0,n.overflow=e82.overflow??void 0,n}};messageTypeRegistry.set(BlockConfig_Text.$type,BlockConfig_Text);function createBaseBlockConfig_Button(){return{text:void 0,icon:void 0,buttonSize:void 0,buttonAppearance:void 0,textColor:void 0,backgroundColor:void 0,disabled:void 0,textColors:void 0,backgroundColors:void 0}}var BlockConfig_Button={$type:"devvit.ui.block_kit.v1beta.BlockConfig.Button",encode(e82,n=_m0.Writer.create()){return e82.text!==void 0&&n.uint32(10).string(e82.text),e82.icon!==void 0&&n.uint32(18).string(e82.icon),e82.buttonSize!==void 0&&n.uint32(24).int32(e82.buttonSize),e82.buttonAppearance!==void 0&&n.uint32(32).int32(e82.buttonAppearance),e82.textColor!==void 0&&n.uint32(42).string(e82.textColor),e82.backgroundColor!==void 0&&n.uint32(50).string(e82.backgroundColor),e82.disabled!==void 0&&n.uint32(56).bool(e82.disabled),e82.textColors!==void 0&&BlockColor.encode(e82.textColors,n.uint32(66).fork()).ldelim(),e82.backgroundColors!==void 0&&BlockColor.encode(e82.backgroundColors,n.uint32(74).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_Button();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.text=t.string();continue;case 2:if(r!==18)break;d.icon=t.string();continue;case 3:if(r!==24)break;d.buttonSize=t.int32();continue;case 4:if(r!==32)break;d.buttonAppearance=t.int32();continue;case 5:if(r!==42)break;d.textColor=t.string();continue;case 6:if(r!==50)break;d.backgroundColor=t.string();continue;case 7:if(r!==56)break;d.disabled=t.bool();continue;case 8:if(r!==66)break;d.textColors=BlockColor.decode(t,t.uint32());continue;case 9:if(r!==74)break;d.backgroundColors=BlockColor.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{text:isSet$8(e82.text)?globalThis.String(e82.text):void 0,icon:isSet$8(e82.icon)?globalThis.String(e82.icon):void 0,buttonSize:isSet$8(e82.buttonSize)?blockButtonSizeFromJSON(e82.buttonSize):void 0,buttonAppearance:isSet$8(e82.buttonAppearance)?blockButtonAppearanceFromJSON(e82.buttonAppearance):void 0,textColor:isSet$8(e82.textColor)?globalThis.String(e82.textColor):void 0,backgroundColor:isSet$8(e82.backgroundColor)?globalThis.String(e82.backgroundColor):void 0,disabled:isSet$8(e82.disabled)?globalThis.Boolean(e82.disabled):void 0,textColors:isSet$8(e82.textColors)?BlockColor.fromJSON(e82.textColors):void 0,backgroundColors:isSet$8(e82.backgroundColors)?BlockColor.fromJSON(e82.backgroundColors):void 0}},toJSON(e82){let n={};return e82.text!==void 0&&(n.text=e82.text),e82.icon!==void 0&&(n.icon=e82.icon),e82.buttonSize!==void 0&&(n.buttonSize=blockButtonSizeToJSON(e82.buttonSize)),e82.buttonAppearance!==void 0&&(n.buttonAppearance=blockButtonAppearanceToJSON(e82.buttonAppearance)),e82.textColor!==void 0&&(n.textColor=e82.textColor),e82.backgroundColor!==void 0&&(n.backgroundColor=e82.backgroundColor),e82.disabled!==void 0&&(n.disabled=e82.disabled),e82.textColors!==void 0&&(n.textColors=BlockColor.toJSON(e82.textColors)),e82.backgroundColors!==void 0&&(n.backgroundColors=BlockColor.toJSON(e82.backgroundColors)),n},create(e82){return BlockConfig_Button.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig_Button();return n.text=e82.text??void 0,n.icon=e82.icon??void 0,n.buttonSize=e82.buttonSize??void 0,n.buttonAppearance=e82.buttonAppearance??void 0,n.textColor=e82.textColor??void 0,n.backgroundColor=e82.backgroundColor??void 0,n.disabled=e82.disabled??void 0,n.textColors=e82.textColors!==void 0&&e82.textColors!==null?BlockColor.fromPartial(e82.textColors):void 0,n.backgroundColors=e82.backgroundColors!==void 0&&e82.backgroundColors!==null?BlockColor.fromPartial(e82.backgroundColors):void 0,n}};messageTypeRegistry.set(BlockConfig_Button.$type,BlockConfig_Button);function createBaseBlockConfig_Image(){return{url:"",width:0,height:0,description:void 0,resizeMode:void 0}}var BlockConfig_Image={$type:"devvit.ui.block_kit.v1beta.BlockConfig.Image",encode(e82,n=_m0.Writer.create()){return e82.url!==""&&n.uint32(10).string(e82.url),e82.width!==0&&n.uint32(16).int32(e82.width),e82.height!==0&&n.uint32(24).int32(e82.height),e82.description!==void 0&&n.uint32(34).string(e82.description),e82.resizeMode!==void 0&&n.uint32(40).int32(e82.resizeMode),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_Image();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=t.string();continue;case 2:if(r!==16)break;d.width=t.int32();continue;case 3:if(r!==24)break;d.height=t.int32();continue;case 4:if(r!==34)break;d.description=t.string();continue;case 5:if(r!==40)break;d.resizeMode=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$8(e82.url)?globalThis.String(e82.url):"",width:isSet$8(e82.width)?globalThis.Number(e82.width):0,height:isSet$8(e82.height)?globalThis.Number(e82.height):0,description:isSet$8(e82.description)?globalThis.String(e82.description):void 0,resizeMode:isSet$8(e82.resizeMode)?blockImageResizeModeFromJSON(e82.resizeMode):void 0}},toJSON(e82){let n={};return e82.url!==""&&(n.url=e82.url),e82.width!==0&&(n.width=Math.round(e82.width)),e82.height!==0&&(n.height=Math.round(e82.height)),e82.description!==void 0&&(n.description=e82.description),e82.resizeMode!==void 0&&(n.resizeMode=blockImageResizeModeToJSON(e82.resizeMode)),n},create(e82){return BlockConfig_Image.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig_Image();return n.url=e82.url??"",n.width=e82.width??0,n.height=e82.height??0,n.description=e82.description??void 0,n.resizeMode=e82.resizeMode??void 0,n}};messageTypeRegistry.set(BlockConfig_Image.$type,BlockConfig_Image);function createBaseBlockConfig_Spacer(){return{size:void 0,shape:void 0}}var BlockConfig_Spacer={$type:"devvit.ui.block_kit.v1beta.BlockConfig.Spacer",encode(e82,n=_m0.Writer.create()){return e82.size!==void 0&&n.uint32(8).int32(e82.size),e82.shape!==void 0&&n.uint32(16).int32(e82.shape),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_Spacer();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.size=t.int32();continue;case 2:if(r!==16)break;d.shape=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{size:isSet$8(e82.size)?blockSpacerSizeFromJSON(e82.size):void 0,shape:isSet$8(e82.shape)?blockSpacerShapeFromJSON(e82.shape):void 0}},toJSON(e82){let n={};return e82.size!==void 0&&(n.size=blockSpacerSizeToJSON(e82.size)),e82.shape!==void 0&&(n.shape=blockSpacerShapeToJSON(e82.shape)),n},create(e82){return BlockConfig_Spacer.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig_Spacer();return n.size=e82.size??void 0,n.shape=e82.shape??void 0,n}};messageTypeRegistry.set(BlockConfig_Spacer.$type,BlockConfig_Spacer);function createBaseBlockConfig_Icon(){return{icon:"",color:void 0,size:void 0,colors:void 0}}var BlockConfig_Icon={$type:"devvit.ui.block_kit.v1beta.BlockConfig.Icon",encode(e82,n=_m0.Writer.create()){return e82.icon!==""&&n.uint32(10).string(e82.icon),e82.color!==void 0&&n.uint32(18).string(e82.color),e82.size!==void 0&&n.uint32(24).int32(e82.size),e82.colors!==void 0&&BlockColor.encode(e82.colors,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_Icon();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.icon=t.string();continue;case 2:if(r!==18)break;d.color=t.string();continue;case 3:if(r!==24)break;d.size=t.int32();continue;case 4:if(r!==34)break;d.colors=BlockColor.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{icon:isSet$8(e82.icon)?globalThis.String(e82.icon):"",color:isSet$8(e82.color)?globalThis.String(e82.color):void 0,size:isSet$8(e82.size)?blockIconSizeFromJSON(e82.size):void 0,colors:isSet$8(e82.colors)?BlockColor.fromJSON(e82.colors):void 0}},toJSON(e82){let n={};return e82.icon!==""&&(n.icon=e82.icon),e82.color!==void 0&&(n.color=e82.color),e82.size!==void 0&&(n.size=blockIconSizeToJSON(e82.size)),e82.colors!==void 0&&(n.colors=BlockColor.toJSON(e82.colors)),n},create(e82){return BlockConfig_Icon.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig_Icon();return n.icon=e82.icon??"",n.color=e82.color??void 0,n.size=e82.size??void 0,n.colors=e82.colors!==void 0&&e82.colors!==null?BlockColor.fromPartial(e82.colors):void 0,n}};messageTypeRegistry.set(BlockConfig_Icon.$type,BlockConfig_Icon);function createBaseBlockConfig_Avatar(){return{thingId:"",facing:void 0,size:void 0,background:void 0}}var BlockConfig_Avatar={$type:"devvit.ui.block_kit.v1beta.BlockConfig.Avatar",encode(e82,n=_m0.Writer.create()){return e82.thingId!==""&&n.uint32(10).string(e82.thingId),e82.facing!==void 0&&n.uint32(16).int32(e82.facing),e82.size!==void 0&&n.uint32(24).int32(e82.size),e82.background!==void 0&&n.uint32(32).int32(e82.background),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_Avatar();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.thingId=t.string();continue;case 2:if(r!==16)break;d.facing=t.int32();continue;case 3:if(r!==24)break;d.size=t.int32();continue;case 4:if(r!==32)break;d.background=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{thingId:isSet$8(e82.thingId)?globalThis.String(e82.thingId):"",facing:isSet$8(e82.facing)?blockAvatarFacingFromJSON(e82.facing):void 0,size:isSet$8(e82.size)?blockAvatarSizeFromJSON(e82.size):void 0,background:isSet$8(e82.background)?blockAvatarBackgroundFromJSON(e82.background):void 0}},toJSON(e82){let n={};return e82.thingId!==""&&(n.thingId=e82.thingId),e82.facing!==void 0&&(n.facing=blockAvatarFacingToJSON(e82.facing)),e82.size!==void 0&&(n.size=blockAvatarSizeToJSON(e82.size)),e82.background!==void 0&&(n.background=blockAvatarBackgroundToJSON(e82.background)),n},create(e82){return BlockConfig_Avatar.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig_Avatar();return n.thingId=e82.thingId??"",n.facing=e82.facing??void 0,n.size=e82.size??void 0,n.background=e82.background??void 0,n}};messageTypeRegistry.set(BlockConfig_Avatar.$type,BlockConfig_Avatar);function createBaseBlockConfig_FullSnoo(){return{userId:"",facing:void 0,size:void 0}}var BlockConfig_FullSnoo={$type:"devvit.ui.block_kit.v1beta.BlockConfig.FullSnoo",encode(e82,n=_m0.Writer.create()){return e82.userId!==""&&n.uint32(10).string(e82.userId),e82.facing!==void 0&&n.uint32(16).int32(e82.facing),e82.size!==void 0&&n.uint32(24).int32(e82.size),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_FullSnoo();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.userId=t.string();continue;case 2:if(r!==16)break;d.facing=t.int32();continue;case 3:if(r!==24)break;d.size=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{userId:isSet$8(e82.userId)?globalThis.String(e82.userId):"",facing:isSet$8(e82.facing)?blockAvatarFacingFromJSON(e82.facing):void 0,size:isSet$8(e82.size)?blockFullSnooSizeFromJSON(e82.size):void 0}},toJSON(e82){let n={};return e82.userId!==""&&(n.userId=e82.userId),e82.facing!==void 0&&(n.facing=blockAvatarFacingToJSON(e82.facing)),e82.size!==void 0&&(n.size=blockFullSnooSizeToJSON(e82.size)),n},create(e82){return BlockConfig_FullSnoo.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig_FullSnoo();return n.userId=e82.userId??"",n.facing=e82.facing??void 0,n.size=e82.size??void 0,n}};messageTypeRegistry.set(BlockConfig_FullSnoo.$type,BlockConfig_FullSnoo);function createBaseBlockConfig_Animation(){return{url:"",width:0,height:0,type:0,loop:void 0,loopMode:void 0,autoplay:void 0,speed:void 0,direction:void 0}}var BlockConfig_Animation={$type:"devvit.ui.block_kit.v1beta.BlockConfig.Animation",encode(e82,n=_m0.Writer.create()){return e82.url!==""&&n.uint32(10).string(e82.url),e82.width!==0&&n.uint32(16).int32(e82.width),e82.height!==0&&n.uint32(24).int32(e82.height),e82.type!==0&&n.uint32(32).int32(e82.type),e82.loop!==void 0&&n.uint32(40).bool(e82.loop),e82.loopMode!==void 0&&n.uint32(48).int32(e82.loopMode),e82.autoplay!==void 0&&n.uint32(56).bool(e82.autoplay),e82.speed!==void 0&&n.uint32(69).float(e82.speed),e82.direction!==void 0&&n.uint32(72).int32(e82.direction),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_Animation();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=t.string();continue;case 2:if(r!==16)break;d.width=t.int32();continue;case 3:if(r!==24)break;d.height=t.int32();continue;case 4:if(r!==32)break;d.type=t.int32();continue;case 5:if(r!==40)break;d.loop=t.bool();continue;case 6:if(r!==48)break;d.loopMode=t.int32();continue;case 7:if(r!==56)break;d.autoplay=t.bool();continue;case 8:if(r!==69)break;d.speed=t.float();continue;case 9:if(r!==72)break;d.direction=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$8(e82.url)?globalThis.String(e82.url):"",width:isSet$8(e82.width)?globalThis.Number(e82.width):0,height:isSet$8(e82.height)?globalThis.Number(e82.height):0,type:isSet$8(e82.type)?blockAnimationTypeFromJSON(e82.type):0,loop:isSet$8(e82.loop)?globalThis.Boolean(e82.loop):void 0,loopMode:isSet$8(e82.loopMode)?blockAnimationLoopModeFromJSON(e82.loopMode):void 0,autoplay:isSet$8(e82.autoplay)?globalThis.Boolean(e82.autoplay):void 0,speed:isSet$8(e82.speed)?globalThis.Number(e82.speed):void 0,direction:isSet$8(e82.direction)?blockAnimationDirectionFromJSON(e82.direction):void 0}},toJSON(e82){let n={};return e82.url!==""&&(n.url=e82.url),e82.width!==0&&(n.width=Math.round(e82.width)),e82.height!==0&&(n.height=Math.round(e82.height)),e82.type!==0&&(n.type=blockAnimationTypeToJSON(e82.type)),e82.loop!==void 0&&(n.loop=e82.loop),e82.loopMode!==void 0&&(n.loopMode=blockAnimationLoopModeToJSON(e82.loopMode)),e82.autoplay!==void 0&&(n.autoplay=e82.autoplay),e82.speed!==void 0&&(n.speed=e82.speed),e82.direction!==void 0&&(n.direction=blockAnimationDirectionToJSON(e82.direction)),n},create(e82){return BlockConfig_Animation.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig_Animation();return n.url=e82.url??"",n.width=e82.width??0,n.height=e82.height??0,n.type=e82.type??0,n.loop=e82.loop??void 0,n.loopMode=e82.loopMode??void 0,n.autoplay=e82.autoplay??void 0,n.speed=e82.speed??void 0,n.direction=e82.direction??void 0,n}};messageTypeRegistry.set(BlockConfig_Animation.$type,BlockConfig_Animation);function createBaseBlockConfig_WebView(){return{url:"",state:void 0}}var BlockConfig_WebView={$type:"devvit.ui.block_kit.v1beta.BlockConfig.WebView",encode(e82,n=_m0.Writer.create()){return e82.url!==""&&n.uint32(10).string(e82.url),e82.state!==void 0&&Struct.encode(Struct.wrap(e82.state),n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockConfig_WebView();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.url=t.string();continue;case 2:if(r!==18)break;d.state=Struct.unwrap(Struct.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{url:isSet$8(e82.url)?globalThis.String(e82.url):"",state:isObject$6(e82.state)?e82.state:void 0}},toJSON(e82){let n={};return e82.url!==""&&(n.url=e82.url),e82.state!==void 0&&(n.state=e82.state),n},create(e82){return BlockConfig_WebView.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockConfig_WebView();return n.url=e82.url??"",n.state=e82.state??void 0,n}};messageTypeRegistry.set(BlockConfig_WebView.$type,BlockConfig_WebView);function isObject$6(e82){return typeof e82=="object"&&e82!==null}function isSet$8(e82){return e82!=null}function createBaseBlockRenderRequest(){return{type:0,id:void 0,data:void 0}}var BlockRenderRequest={$type:"devvit.ui.block_kit.v1beta.BlockRenderRequest",encode(e82,n=_m0.Writer.create()){return e82.type!==0&&n.uint32(8).int32(e82.type),e82.id!==void 0&&n.uint32(18).string(e82.id),e82.data!==void 0&&Struct.encode(Struct.wrap(e82.data),n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockRenderRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.type=t.int32();continue;case 2:if(r!==18)break;d.id=t.string();continue;case 3:if(r!==26)break;d.data=Struct.unwrap(Struct.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{type:isSet$7(e82.type)?blockRenderEventTypeFromJSON(e82.type):0,id:isSet$7(e82.id)?globalThis.String(e82.id):void 0,data:isObject$5(e82.data)?e82.data:void 0}},toJSON(e82){let n={};return e82.type!==0&&(n.type=blockRenderEventTypeToJSON(e82.type)),e82.id!==void 0&&(n.id=e82.id),e82.data!==void 0&&(n.data=e82.data),n},create(e82){return BlockRenderRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockRenderRequest();return n.type=e82.type??0,n.id=e82.id??void 0,n.data=e82.data??void 0,n}};messageTypeRegistry.set(BlockRenderRequest.$type,BlockRenderRequest);function createBaseBlockRenderResponse(){return{ui:void 0}}var BlockRenderResponse={$type:"devvit.ui.block_kit.v1beta.BlockRenderResponse",encode(e82,n=_m0.Writer.create()){return e82.ui!==void 0&&Block.encode(e82.ui,n.uint32(10).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockRenderResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.ui=Block.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{ui:isSet$7(e82.ui)?Block.fromJSON(e82.ui):void 0}},toJSON(e82){let n={};return e82.ui!==void 0&&(n.ui=Block.toJSON(e82.ui)),n},create(e82){return BlockRenderResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBlockRenderResponse();return n.ui=e82.ui!==void 0&&e82.ui!==null?Block.fromPartial(e82.ui):void 0,n}};messageTypeRegistry.set(BlockRenderResponse.$type,BlockRenderResponse);function isObject$5(e82){return typeof e82=="object"&&e82!==null}function isSet$7(e82){return e82!=null}function createBaseUIDimensions(){return{height:0,width:0,scale:0,fontScale:void 0}}var UIDimensions={$type:"devvit.ui.common.v1alpha.UIDimensions",encode(e82,n=_m0.Writer.create()){return e82.height!==0&&n.uint32(8).int32(e82.height),e82.width!==0&&n.uint32(16).int32(e82.width),e82.scale!==0&&n.uint32(29).float(e82.scale),e82.fontScale!==void 0&&n.uint32(37).float(e82.fontScale),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUIDimensions();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.height=t.int32();continue;case 2:if(r!==16)break;d.width=t.int32();continue;case 3:if(r!==29)break;d.scale=t.float();continue;case 4:if(r!==37)break;d.fontScale=t.float();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{height:isSet$6(e82.height)?globalThis.Number(e82.height):0,width:isSet$6(e82.width)?globalThis.Number(e82.width):0,scale:isSet$6(e82.scale)?globalThis.Number(e82.scale):0,fontScale:isSet$6(e82.fontScale)?globalThis.Number(e82.fontScale):void 0}},toJSON(e82){let n={};return e82.height!==0&&(n.height=Math.round(e82.height)),e82.width!==0&&(n.width=Math.round(e82.width)),e82.scale!==0&&(n.scale=e82.scale),e82.fontScale!==void 0&&(n.fontScale=e82.fontScale),n},create(e82){return UIDimensions.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUIDimensions();return n.height=e82.height??0,n.width=e82.width??0,n.scale=e82.scale??0,n.fontScale=e82.fontScale??void 0,n}};messageTypeRegistry.set(UIDimensions.$type,UIDimensions);function isSet$6(e82){return e82!=null}var UIEventScope;(function(e82){e82[e82.ALL=0]="ALL",e82[e82.LOCAL=1]="LOCAL",e82[e82.REMOTE=2]="REMOTE",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(UIEventScope||(UIEventScope={}));function uIEventScopeFromJSON(e82){switch(e82){case 0:case"ALL":return UIEventScope.ALL;case 1:case"LOCAL":return UIEventScope.LOCAL;case 2:case"REMOTE":return UIEventScope.REMOTE;case-1:case"UNRECOGNIZED":default:return UIEventScope.UNRECOGNIZED}}function uIEventScopeToJSON(e82){switch(e82){case UIEventScope.ALL:return 0;case UIEventScope.LOCAL:return 1;case UIEventScope.REMOTE:return 2;case UIEventScope.UNRECOGNIZED:default:return-1}}function createBaseUIEvent(){return{realtimeEvent:void 0,formSubmitted:void 0,orderResult:void 0,toastAction:void 0,userAction:void 0,asyncRequest:void 0,asyncResponse:void 0,timer:void 0,blocking:void 0,resize:void 0,async:void 0,hook:void 0,retry:void 0,scope:void 0}}var UIEvent={$type:"devvit.ui.events.v1alpha.UIEvent",encode(e82,n=_m0.Writer.create()){return e82.realtimeEvent!==void 0&&RealtimeSubscriptionEvent.encode(e82.realtimeEvent,n.uint32(18).fork()).ldelim(),e82.formSubmitted!==void 0&&FormSubmittedEvent.encode(e82.formSubmitted,n.uint32(26).fork()).ldelim(),e82.orderResult!==void 0&&OrderResultEvent.encode(e82.orderResult,n.uint32(154).fork()).ldelim(),e82.toastAction!==void 0&&ToastActionEvent.encode(e82.toastAction,n.uint32(34).fork()).ldelim(),e82.userAction!==void 0&&UserAction.encode(e82.userAction,n.uint32(50).fork()).ldelim(),e82.asyncRequest!==void 0&&AsyncRequest.encode(e82.asyncRequest,n.uint32(58).fork()).ldelim(),e82.asyncResponse!==void 0&&AsyncResponse.encode(e82.asyncResponse,n.uint32(66).fork()).ldelim(),e82.timer!==void 0&&TimerEvent.encode(e82.timer,n.uint32(98).fork()).ldelim(),e82.blocking!==void 0&&BlockingRenderEvent.encode(e82.blocking,n.uint32(106).fork()).ldelim(),e82.resize!==void 0&&ResizeEvent.encode(e82.resize,n.uint32(114).fork()).ldelim(),e82.async!==void 0&&BoolValue.encode({value:e82.async},n.uint32(122).fork()).ldelim(),e82.hook!==void 0&&StringValue.encode({value:e82.hook},n.uint32(82).fork()).ldelim(),e82.retry!==void 0&&BoolValue.encode({value:e82.retry},n.uint32(138).fork()).ldelim(),e82.scope!==void 0&&n.uint32(144).int32(e82.scope),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUIEvent();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 2:if(r!==18)break;d.realtimeEvent=RealtimeSubscriptionEvent.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.formSubmitted=FormSubmittedEvent.decode(t,t.uint32());continue;case 19:if(r!==154)break;d.orderResult=OrderResultEvent.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.toastAction=ToastActionEvent.decode(t,t.uint32());continue;case 6:if(r!==50)break;d.userAction=UserAction.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.asyncRequest=AsyncRequest.decode(t,t.uint32());continue;case 8:if(r!==66)break;d.asyncResponse=AsyncResponse.decode(t,t.uint32());continue;case 12:if(r!==98)break;d.timer=TimerEvent.decode(t,t.uint32());continue;case 13:if(r!==106)break;d.blocking=BlockingRenderEvent.decode(t,t.uint32());continue;case 14:if(r!==114)break;d.resize=ResizeEvent.decode(t,t.uint32());continue;case 15:if(r!==122)break;d.async=BoolValue.decode(t,t.uint32()).value;continue;case 10:if(r!==82)break;d.hook=StringValue.decode(t,t.uint32()).value;continue;case 17:if(r!==138)break;d.retry=BoolValue.decode(t,t.uint32()).value;continue;case 18:if(r!==144)break;d.scope=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{realtimeEvent:isSet$5(e82.realtimeEvent)?RealtimeSubscriptionEvent.fromJSON(e82.realtimeEvent):void 0,formSubmitted:isSet$5(e82.formSubmitted)?FormSubmittedEvent.fromJSON(e82.formSubmitted):void 0,orderResult:isSet$5(e82.orderResult)?OrderResultEvent.fromJSON(e82.orderResult):void 0,toastAction:isSet$5(e82.toastAction)?ToastActionEvent.fromJSON(e82.toastAction):void 0,userAction:isSet$5(e82.userAction)?UserAction.fromJSON(e82.userAction):void 0,asyncRequest:isSet$5(e82.asyncRequest)?AsyncRequest.fromJSON(e82.asyncRequest):void 0,asyncResponse:isSet$5(e82.asyncResponse)?AsyncResponse.fromJSON(e82.asyncResponse):void 0,timer:isSet$5(e82.timer)?TimerEvent.fromJSON(e82.timer):void 0,blocking:isSet$5(e82.blocking)?BlockingRenderEvent.fromJSON(e82.blocking):void 0,resize:isSet$5(e82.resize)?ResizeEvent.fromJSON(e82.resize):void 0,async:isSet$5(e82.async)?!!e82.async:void 0,hook:isSet$5(e82.hook)?String(e82.hook):void 0,retry:isSet$5(e82.retry)?!!e82.retry:void 0,scope:isSet$5(e82.scope)?uIEventScopeFromJSON(e82.scope):void 0}},toJSON(e82){let n={};return e82.realtimeEvent!==void 0&&(n.realtimeEvent=RealtimeSubscriptionEvent.toJSON(e82.realtimeEvent)),e82.formSubmitted!==void 0&&(n.formSubmitted=FormSubmittedEvent.toJSON(e82.formSubmitted)),e82.orderResult!==void 0&&(n.orderResult=OrderResultEvent.toJSON(e82.orderResult)),e82.toastAction!==void 0&&(n.toastAction=ToastActionEvent.toJSON(e82.toastAction)),e82.userAction!==void 0&&(n.userAction=UserAction.toJSON(e82.userAction)),e82.asyncRequest!==void 0&&(n.asyncRequest=AsyncRequest.toJSON(e82.asyncRequest)),e82.asyncResponse!==void 0&&(n.asyncResponse=AsyncResponse.toJSON(e82.asyncResponse)),e82.timer!==void 0&&(n.timer=TimerEvent.toJSON(e82.timer)),e82.blocking!==void 0&&(n.blocking=BlockingRenderEvent.toJSON(e82.blocking)),e82.resize!==void 0&&(n.resize=ResizeEvent.toJSON(e82.resize)),e82.async!==void 0&&(n.async=e82.async),e82.hook!==void 0&&(n.hook=e82.hook),e82.retry!==void 0&&(n.retry=e82.retry),e82.scope!==void 0&&(n.scope=uIEventScopeToJSON(e82.scope)),n},create(e82){return UIEvent.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUIEvent();return n.realtimeEvent=e82.realtimeEvent!==void 0&&e82.realtimeEvent!==null?RealtimeSubscriptionEvent.fromPartial(e82.realtimeEvent):void 0,n.formSubmitted=e82.formSubmitted!==void 0&&e82.formSubmitted!==null?FormSubmittedEvent.fromPartial(e82.formSubmitted):void 0,n.orderResult=e82.orderResult!==void 0&&e82.orderResult!==null?OrderResultEvent.fromPartial(e82.orderResult):void 0,n.toastAction=e82.toastAction!==void 0&&e82.toastAction!==null?ToastActionEvent.fromPartial(e82.toastAction):void 0,n.userAction=e82.userAction!==void 0&&e82.userAction!==null?UserAction.fromPartial(e82.userAction):void 0,n.asyncRequest=e82.asyncRequest!==void 0&&e82.asyncRequest!==null?AsyncRequest.fromPartial(e82.asyncRequest):void 0,n.asyncResponse=e82.asyncResponse!==void 0&&e82.asyncResponse!==null?AsyncResponse.fromPartial(e82.asyncResponse):void 0,n.timer=e82.timer!==void 0&&e82.timer!==null?TimerEvent.fromPartial(e82.timer):void 0,n.blocking=e82.blocking!==void 0&&e82.blocking!==null?BlockingRenderEvent.fromPartial(e82.blocking):void 0,n.resize=e82.resize!==void 0&&e82.resize!==null?ResizeEvent.fromPartial(e82.resize):void 0,n.async=e82.async??void 0,n.hook=e82.hook??void 0,n.retry=e82.retry??void 0,n.scope=e82.scope??void 0,n}};messageTypeRegistry.set(UIEvent.$type,UIEvent);function createBaseBlockingRenderEvent(){return{}}var BlockingRenderEvent={$type:"devvit.ui.events.v1alpha.BlockingRenderEvent",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBlockingRenderEvent();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return BlockingRenderEvent.fromPartial(e82??{})},fromPartial(e82){return createBaseBlockingRenderEvent()}};messageTypeRegistry.set(BlockingRenderEvent.$type,BlockingRenderEvent);function createBaseResizeEvent(){return{}}var ResizeEvent={$type:"devvit.ui.events.v1alpha.ResizeEvent",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseResizeEvent();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return ResizeEvent.fromPartial(e82??{})},fromPartial(e82){return createBaseResizeEvent()}};messageTypeRegistry.set(ResizeEvent.$type,ResizeEvent);function createBaseTimerEvent(){return{}}var TimerEvent={$type:"devvit.ui.events.v1alpha.TimerEvent",encode(e82,n=_m0.Writer.create()){return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseTimerEvent();for(;t.pos<o;){let r=t.uint32();if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{}},toJSON(e82){return{}},create(e82){return TimerEvent.fromPartial(e82??{})},fromPartial(e82){return createBaseTimerEvent()}};messageTypeRegistry.set(TimerEvent.$type,TimerEvent);function createBaseAsyncError(){return{message:"",details:""}}var AsyncError={$type:"devvit.ui.events.v1alpha.AsyncError",encode(e82,n=_m0.Writer.create()){return e82.message!==""&&n.uint32(10).string(e82.message),e82.details!==""&&n.uint32(18).string(e82.details),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAsyncError();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.message=t.string();continue;case 2:if(r!==18)break;d.details=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{message:isSet$5(e82.message)?globalThis.String(e82.message):"",details:isSet$5(e82.details)?globalThis.String(e82.details):""}},toJSON(e82){let n={};return e82.message!==""&&(n.message=e82.message),e82.details!==""&&(n.details=e82.details),n},create(e82){return AsyncError.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAsyncError();return n.message=e82.message??"",n.details=e82.details??"",n}};messageTypeRegistry.set(AsyncError.$type,AsyncError);function createBaseAsyncRequest(){return{requestId:"",data:void 0}}var AsyncRequest={$type:"devvit.ui.events.v1alpha.AsyncRequest",encode(e82,n=_m0.Writer.create()){return e82.requestId!==""&&n.uint32(10).string(e82.requestId),e82.data!==void 0&&Struct.encode(Struct.wrap(e82.data),n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAsyncRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.requestId=t.string();continue;case 2:if(r!==18)break;d.data=Struct.unwrap(Struct.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{requestId:isSet$5(e82.requestId)?globalThis.String(e82.requestId):"",data:isObject$4(e82.data)?e82.data:void 0}},toJSON(e82){let n={};return e82.requestId!==""&&(n.requestId=e82.requestId),e82.data!==void 0&&(n.data=e82.data),n},create(e82){return AsyncRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAsyncRequest();return n.requestId=e82.requestId??"",n.data=e82.data??void 0,n}};messageTypeRegistry.set(AsyncRequest.$type,AsyncRequest);function createBaseAsyncResponse(){return{requestId:"",data:void 0,error:void 0}}var AsyncResponse={$type:"devvit.ui.events.v1alpha.AsyncResponse",encode(e82,n=_m0.Writer.create()){return e82.requestId!==""&&n.uint32(10).string(e82.requestId),e82.data!==void 0&&Struct.encode(Struct.wrap(e82.data),n.uint32(18).fork()).ldelim(),e82.error!==void 0&&AsyncError.encode(e82.error,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseAsyncResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.requestId=t.string();continue;case 2:if(r!==18)break;d.data=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.error=AsyncError.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{requestId:isSet$5(e82.requestId)?globalThis.String(e82.requestId):"",data:isObject$4(e82.data)?e82.data:void 0,error:isSet$5(e82.error)?AsyncError.fromJSON(e82.error):void 0}},toJSON(e82){let n={};return e82.requestId!==""&&(n.requestId=e82.requestId),e82.data!==void 0&&(n.data=e82.data),e82.error!==void 0&&(n.error=AsyncError.toJSON(e82.error)),n},create(e82){return AsyncResponse.fromPartial(e82??{})},fromPartial(e82){let n=createBaseAsyncResponse();return n.requestId=e82.requestId??"",n.data=e82.data??void 0,n.error=e82.error!==void 0&&e82.error!==null?AsyncError.fromPartial(e82.error):void 0,n}};messageTypeRegistry.set(AsyncResponse.$type,AsyncResponse);function createBaseUserAction(){return{actionId:"",data:void 0}}var UserAction={$type:"devvit.ui.events.v1alpha.UserAction",encode(e82,n=_m0.Writer.create()){return e82.actionId!==""&&n.uint32(10).string(e82.actionId),e82.data!==void 0&&Struct.encode(Struct.wrap(e82.data),n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUserAction();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actionId=t.string();continue;case 2:if(r!==18)break;d.data=Struct.unwrap(Struct.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actionId:isSet$5(e82.actionId)?globalThis.String(e82.actionId):"",data:isObject$4(e82.data)?e82.data:void 0}},toJSON(e82){let n={};return e82.actionId!==""&&(n.actionId=e82.actionId),e82.data!==void 0&&(n.data=e82.data),n},create(e82){return UserAction.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUserAction();return n.actionId=e82.actionId??"",n.data=e82.data??void 0,n}};messageTypeRegistry.set(UserAction.$type,UserAction);function isObject$4(e82){return typeof e82=="object"&&e82!==null}function isSet$5(e82){return e82!=null}function createBaseUIRequest(){return{env:void 0,props:void 0,state:void 0,events:[]}}var UIRequest={$type:"devvit.ui.block_kit.v1beta.UIRequest",encode(e82,n=_m0.Writer.create()){e82.env!==void 0&&UIEnvironment.encode(e82.env,n.uint32(42).fork()).ldelim(),e82.props!==void 0&&Struct.encode(Struct.wrap(e82.props),n.uint32(10).fork()).ldelim(),e82.state!==void 0&&Struct.encode(Struct.wrap(e82.state),n.uint32(18).fork()).ldelim();for(let t of e82.events)UIEvent.encode(t,n.uint32(26).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUIRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 5:if(r!==42)break;d.env=UIEnvironment.decode(t,t.uint32());continue;case 1:if(r!==10)break;d.props=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.state=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.events.push(UIEvent.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{env:isSet$4(e82.env)?UIEnvironment.fromJSON(e82.env):void 0,props:isObject$3(e82.props)?e82.props:void 0,state:isObject$3(e82.state)?e82.state:void 0,events:globalThis.Array.isArray(e82?.events)?e82.events.map(n=>UIEvent.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.env!==void 0&&(n.env=UIEnvironment.toJSON(e82.env)),e82.props!==void 0&&(n.props=e82.props),e82.state!==void 0&&(n.state=e82.state),(t=e82.events)!=null&&t.length&&(n.events=e82.events.map(o=>UIEvent.toJSON(o))),n},create(e82){return UIRequest.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseUIRequest();return n.env=e82.env!==void 0&&e82.env!==null?UIEnvironment.fromPartial(e82.env):void 0,n.props=e82.props??void 0,n.state=e82.state??void 0,n.events=((t=e82.events)==null?void 0:t.map(o=>UIEvent.fromPartial(o)))||[],n}};messageTypeRegistry.set(UIRequest.$type,UIRequest);function createBaseUIResponse(){return{state:void 0,effects:[],events:[],blocks:void 0}}var UIResponse={$type:"devvit.ui.block_kit.v1beta.UIResponse",encode(e82,n=_m0.Writer.create()){e82.state!==void 0&&Struct.encode(Struct.wrap(e82.state),n.uint32(10).fork()).ldelim();for(let t of e82.effects)Effect.encode(t,n.uint32(18).fork()).ldelim();for(let t of e82.events)UIEvent.encode(t,n.uint32(42).fork()).ldelim();return e82.blocks!==void 0&&Block.encode(e82.blocks,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUIResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.state=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.effects.push(Effect.decode(t,t.uint32()));continue;case 5:if(r!==42)break;d.events.push(UIEvent.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.blocks=Block.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{state:isObject$3(e82.state)?e82.state:void 0,effects:globalThis.Array.isArray(e82?.effects)?e82.effects.map(n=>Effect.fromJSON(n)):[],events:globalThis.Array.isArray(e82?.events)?e82.events.map(n=>UIEvent.fromJSON(n)):[],blocks:isSet$4(e82.blocks)?Block.fromJSON(e82.blocks):void 0}},toJSON(e82){var t,o;let n={};return e82.state!==void 0&&(n.state=e82.state),(t=e82.effects)!=null&&t.length&&(n.effects=e82.effects.map(d=>Effect.toJSON(d))),(o=e82.events)!=null&&o.length&&(n.events=e82.events.map(d=>UIEvent.toJSON(d))),e82.blocks!==void 0&&(n.blocks=Block.toJSON(e82.blocks)),n},create(e82){return UIResponse.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseUIResponse();return n.state=e82.state??void 0,n.effects=((t=e82.effects)==null?void 0:t.map(d=>Effect.fromPartial(d)))||[],n.events=((o=e82.events)==null?void 0:o.map(d=>UIEvent.fromPartial(d)))||[],n.blocks=e82.blocks!==void 0&&e82.blocks!==null?Block.fromPartial(e82.blocks):void 0,n}};messageTypeRegistry.set(UIResponse.$type,UIResponse);function createBaseUIEnvironment(){return{locale:void 0,colorScheme:void 0,dimensions:void 0,timezone:void 0}}var UIEnvironment={$type:"devvit.ui.block_kit.v1beta.UIEnvironment",encode(e82,n=_m0.Writer.create()){return e82.locale!==void 0&&n.uint32(10).string(e82.locale),e82.colorScheme!==void 0&&n.uint32(18).string(e82.colorScheme),e82.dimensions!==void 0&&UIDimensions.encode(e82.dimensions,n.uint32(26).fork()).ldelim(),e82.timezone!==void 0&&n.uint32(42).string(e82.timezone),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseUIEnvironment();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.locale=t.string();continue;case 2:if(r!==18)break;d.colorScheme=t.string();continue;case 3:if(r!==26)break;d.dimensions=UIDimensions.decode(t,t.uint32());continue;case 5:if(r!==42)break;d.timezone=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{locale:isSet$4(e82.locale)?globalThis.String(e82.locale):void 0,colorScheme:isSet$4(e82.colorScheme)?globalThis.String(e82.colorScheme):void 0,dimensions:isSet$4(e82.dimensions)?UIDimensions.fromJSON(e82.dimensions):void 0,timezone:isSet$4(e82.timezone)?globalThis.String(e82.timezone):void 0}},toJSON(e82){let n={};return e82.locale!==void 0&&(n.locale=e82.locale),e82.colorScheme!==void 0&&(n.colorScheme=e82.colorScheme),e82.dimensions!==void 0&&(n.dimensions=UIDimensions.toJSON(e82.dimensions)),e82.timezone!==void 0&&(n.timezone=e82.timezone),n},create(e82){return UIEnvironment.fromPartial(e82??{})},fromPartial(e82){let n=createBaseUIEnvironment();return n.locale=e82.locale??void 0,n.colorScheme=e82.colorScheme??void 0,n.dimensions=e82.dimensions!==void 0&&e82.dimensions!==null?UIDimensions.fromPartial(e82.dimensions):void 0,n.timezone=e82.timezone??void 0,n}};messageTypeRegistry.set(UIEnvironment.$type,UIEnvironment);function isObject$3(e82){return typeof e82=="object"&&e82!==null}function isSet$4(e82){return e82!=null}function createBaseDimensions(){return{height:0,width:0,scale:0,fontScale:void 0}}var Dimensions={$type:"devvit.reddit.custom_post.v1alpha.Dimensions",encode(e82,n=_m0.Writer.create()){return e82.height!==0&&n.uint32(8).int32(e82.height),e82.width!==0&&n.uint32(16).int32(e82.width),e82.scale!==0&&n.uint32(29).float(e82.scale),e82.fontScale!==void 0&&n.uint32(37).float(e82.fontScale),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDimensions();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==8)break;d.height=t.int32();continue;case 2:if(r!==16)break;d.width=t.int32();continue;case 3:if(r!==29)break;d.scale=t.float();continue;case 4:if(r!==37)break;d.fontScale=t.float();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{height:isSet$3(e82.height)?globalThis.Number(e82.height):0,width:isSet$3(e82.width)?globalThis.Number(e82.width):0,scale:isSet$3(e82.scale)?globalThis.Number(e82.scale):0,fontScale:isSet$3(e82.fontScale)?globalThis.Number(e82.fontScale):void 0}},toJSON(e82){let n={};return e82.height!==0&&(n.height=Math.round(e82.height)),e82.width!==0&&(n.width=Math.round(e82.width)),e82.scale!==0&&(n.scale=e82.scale),e82.fontScale!==void 0&&(n.fontScale=e82.fontScale),n},create(e82){return Dimensions.fromPartial(e82??{})},fromPartial(e82){let n=createBaseDimensions();return n.height=e82.height??0,n.width=e82.width??0,n.scale=e82.scale??0,n.fontScale=e82.fontScale??void 0,n}};messageTypeRegistry.set(Dimensions.$type,Dimensions);function createBaseRenderPostRequest(){return{state:void 0,blocks:void 0,dimensions:void 0}}var RenderPostRequest={$type:"devvit.reddit.custom_post.v1alpha.RenderPostRequest",encode(e82,n=_m0.Writer.create()){return e82.state!==void 0&&Struct.encode(Struct.wrap(e82.state),n.uint32(10).fork()).ldelim(),e82.blocks!==void 0&&BlockRenderRequest.encode(e82.blocks,n.uint32(18).fork()).ldelim(),e82.dimensions!==void 0&&Dimensions.encode(e82.dimensions,n.uint32(26).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRenderPostRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.state=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.blocks=BlockRenderRequest.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.dimensions=Dimensions.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{state:isObject$2(e82.state)?e82.state:void 0,blocks:isSet$3(e82.blocks)?BlockRenderRequest.fromJSON(e82.blocks):void 0,dimensions:isSet$3(e82.dimensions)?Dimensions.fromJSON(e82.dimensions):void 0}},toJSON(e82){let n={};return e82.state!==void 0&&(n.state=e82.state),e82.blocks!==void 0&&(n.blocks=BlockRenderRequest.toJSON(e82.blocks)),e82.dimensions!==void 0&&(n.dimensions=Dimensions.toJSON(e82.dimensions)),n},create(e82){return RenderPostRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseRenderPostRequest();return n.state=e82.state??void 0,n.blocks=e82.blocks!==void 0&&e82.blocks!==null?BlockRenderRequest.fromPartial(e82.blocks):void 0,n.dimensions=e82.dimensions!==void 0&&e82.dimensions!==null?Dimensions.fromPartial(e82.dimensions):void 0,n}};messageTypeRegistry.set(RenderPostRequest.$type,RenderPostRequest);function createBaseRenderPostResponse(){return{state:void 0,effects:[],blocks:void 0}}var RenderPostResponse={$type:"devvit.reddit.custom_post.v1alpha.RenderPostResponse",encode(e82,n=_m0.Writer.create()){e82.state!==void 0&&Struct.encode(Struct.wrap(e82.state),n.uint32(10).fork()).ldelim();for(let t of e82.effects)Effect.encode(t,n.uint32(18).fork()).ldelim();return e82.blocks!==void 0&&BlockRenderResponse.encode(e82.blocks,n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseRenderPostResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.state=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.effects.push(Effect.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.blocks=BlockRenderResponse.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{state:isObject$2(e82.state)?e82.state:void 0,effects:globalThis.Array.isArray(e82?.effects)?e82.effects.map(n=>Effect.fromJSON(n)):[],blocks:isSet$3(e82.blocks)?BlockRenderResponse.fromJSON(e82.blocks):void 0}},toJSON(e82){var t;let n={};return e82.state!==void 0&&(n.state=e82.state),(t=e82.effects)!=null&&t.length&&(n.effects=e82.effects.map(o=>Effect.toJSON(o))),e82.blocks!==void 0&&(n.blocks=BlockRenderResponse.toJSON(e82.blocks)),n},create(e82){return RenderPostResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseRenderPostResponse();return n.state=e82.state??void 0,n.effects=((t=e82.effects)==null?void 0:t.map(o=>Effect.fromPartial(o)))||[],n.blocks=e82.blocks!==void 0&&e82.blocks!==null?BlockRenderResponse.fromPartial(e82.blocks):void 0,n}};messageTypeRegistry.set(RenderPostResponse.$type,RenderPostResponse);var CustomPostDefinition={name:"CustomPost",fullName:"devvit.reddit.custom_post.v1alpha.CustomPost",methods:{renderPost:{name:"RenderPost",requestType:RenderPostRequest,requestStream:!1,responseType:RenderPostResponse,responseStream:!1,options:{}},renderPostContent:{name:"RenderPostContent",requestType:UIRequest,requestStream:!1,responseType:UIResponse,responseStream:!1,options:{}},renderPostComposer:{name:"RenderPostComposer",requestType:UIRequest,requestStream:!1,responseType:UIResponse,responseStream:!1,options:{}}}};function isObject$2(e82){return typeof e82=="object"&&e82!==null}function isSet$3(e82){return e82!=null}function createBaseHandleUIEventRequest(){return{state:void 0,event:void 0}}var HandleUIEventRequest={$type:"devvit.ui.events.v1alpha.HandleUIEventRequest",encode(e82,n=_m0.Writer.create()){return e82.state!==void 0&&Struct.encode(Struct.wrap(e82.state),n.uint32(10).fork()).ldelim(),e82.event!==void 0&&UIEvent.encode(e82.event,n.uint32(18).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHandleUIEventRequest();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.state=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.event=UIEvent.decode(t,t.uint32());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{state:isObject$1(e82.state)?e82.state:void 0,event:isSet$2(e82.event)?UIEvent.fromJSON(e82.event):void 0}},toJSON(e82){let n={};return e82.state!==void 0&&(n.state=e82.state),e82.event!==void 0&&(n.event=UIEvent.toJSON(e82.event)),n},create(e82){return HandleUIEventRequest.fromPartial(e82??{})},fromPartial(e82){let n=createBaseHandleUIEventRequest();return n.state=e82.state??void 0,n.event=e82.event!==void 0&&e82.event!==null?UIEvent.fromPartial(e82.event):void 0,n}};messageTypeRegistry.set(HandleUIEventRequest.$type,HandleUIEventRequest);function createBaseHandleUIEventResponse(){return{state:void 0,effects:[]}}var HandleUIEventResponse={$type:"devvit.ui.events.v1alpha.HandleUIEventResponse",encode(e82,n=_m0.Writer.create()){e82.state!==void 0&&Struct.encode(Struct.wrap(e82.state),n.uint32(10).fork()).ldelim();for(let t of e82.effects)Effect.encode(t,n.uint32(18).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseHandleUIEventResponse();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.state=Struct.unwrap(Struct.decode(t,t.uint32()));continue;case 2:if(r!==18)break;d.effects.push(Effect.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{state:isObject$1(e82.state)?e82.state:void 0,effects:globalThis.Array.isArray(e82?.effects)?e82.effects.map(n=>Effect.fromJSON(n)):[]}},toJSON(e82){var t;let n={};return e82.state!==void 0&&(n.state=e82.state),(t=e82.effects)!=null&&t.length&&(n.effects=e82.effects.map(o=>Effect.toJSON(o))),n},create(e82){return HandleUIEventResponse.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseHandleUIEventResponse();return n.state=e82.state??void 0,n.effects=((t=e82.effects)==null?void 0:t.map(o=>Effect.fromPartial(o)))||[],n}};messageTypeRegistry.set(HandleUIEventResponse.$type,HandleUIEventResponse);var UIEventHandlerDefinition={name:"UIEventHandler",fullName:"devvit.ui.events.v1alpha.UIEventHandler",methods:{handleUIEvent:{name:"HandleUIEvent",requestType:HandleUIEventRequest,requestStream:!1,responseType:HandleUIEventResponse,responseStream:!1,options:{}}}};function isObject$1(e82){return typeof e82=="object"&&e82!==null}function isSet$2(e82){return e82!=null}var protos=Object.freeze(Object.defineProperty({__proto__:null,AppSettingsDefinition,AssetResolverDefinition,Block,get BlockActionType(){return BlockActionType},get BlockAnimationDirection(){return BlockAnimationDirection},get BlockAnimationLoopMode(){return BlockAnimationLoopMode},get BlockAnimationType(){return BlockAnimationType},get BlockAvatarBackground(){return BlockAvatarBackground},get BlockAvatarFacing(){return BlockAvatarFacing},get BlockAvatarSize(){return BlockAvatarSize},get BlockBorderWidth(){return BlockBorderWidth},get BlockButtonAppearance(){return BlockButtonAppearance},get BlockButtonSize(){return BlockButtonSize},get BlockFullSnooSize(){return BlockFullSnooSize},get BlockGap(){return BlockGap},get BlockHorizontalAlignment(){return BlockHorizontalAlignment},get BlockIconSize(){return BlockIconSize},get BlockImageResizeMode(){return BlockImageResizeMode},get BlockPadding(){return BlockPadding},get BlockRadius(){return BlockRadius},get BlockRenderEventType(){return BlockRenderEventType},BlockRenderRequest,get BlockSizeUnit(){return BlockSizeUnit},get BlockSpacerShape(){return BlockSpacerShape},get BlockSpacerSize(){return BlockSpacerSize},get BlockStackDirection(){return BlockStackDirection},get BlockTextOutline(){return BlockTextOutline},get BlockTextOverflow(){return BlockTextOverflow},get BlockTextSize(){return BlockTextSize},get BlockTextStyle(){return BlockTextStyle},get BlockTextWeight(){return BlockTextWeight},get BlockType(){return BlockType},get BlockVerticalAlignment(){return BlockVerticalAlignment},CommunityListWidget_CommunityData,get ConfigFieldType(){return ConfigFieldType},ConfigForm,ContextActionDefinition,ContextActionDescription,ContextActionList,ContextActionResponse,get ContextType(){return ContextType},ConversationData,CustomPostDefinition,Definition,DeleteNotesRequest,get EffectType(){return EffectType},Empty,FlairDefinition,Form,FormField,get FormFieldType(){return FormFieldType},FormSubmittedEvent,GetFieldsResponse,GetNotesRequest,GetWidgetsResponse_WidgetItem,GraphQLDefinition,HTTPDefinition,HandleUIEventResponse,HandlerResult,HelloDefinition,InstallationSettingsDefinition,InstanceSettingsDefinition,KVStoreDefinition,LinksAndCommentsDefinition,ListingsDefinition,LoggerDefinition,MediaServiceDefinition,MessageData,ModActionData,ModNoteDefinition,ModNoteObject,ModerationDefinition,ModlogDefinition,NewModmailDefinition,OnAppInstallDefinition,OnAppUpgradeDefinition,OnAutomoderatorFilterCommentDefinition,OnAutomoderatorFilterPostDefinition,OnCommentCreateDefinition,OnCommentDeleteDefinition,OnCommentReportDefinition,OnCommentSubmitDefinition,OnCommentUpdateDefinition,OnModActionDefinition,OnModMailDefinition,OnPostCreateDefinition,OnPostDeleteDefinition,OnPostFlairUpdateDefinition,OnPostNsfwUpdateDefinition,OnPostReportDefinition,OnPostSpoilerUpdateDefinition,OnPostSubmitDefinition,OnPostUpdateDefinition,OnSubredditSubscribeDefinition,PostCollectionsDefinition,PostNotesRequest,PostRemovalNoteRequest,PrivateMessagesDefinition,RealtimeDefinition,RealtimeSubscriptionEvent,get RealtimeSubscriptionStatus(){return RealtimeSubscriptionStatus},RedditAPIV2Definition,RedditObject,RedisAPIDefinition,get RedisKeyScope(){return RedisKeyScope},RenderPostResponse,SchedulerDefinition,SchedulerHandlerDefinition,SettingsDefinition,get Severity(){return Severity},SubmitResponse,SubredditsDefinition,TimerDefinition,get ToastAppearance(){return ToastAppearance},UIEventHandlerDefinition,get UIEventScope(){return UIEventScope},UIResponse,UserConfigurableDefinition,UserDataByAccountIdsResponse,UserDataByAccountIdsResponse_UserAccountData,UsersDefinition,ValidateFormResponse,WidgetsDefinition,WikiDefinition},Symbol.toStringTag,{value:"Module"})),CIRCUIT_BREAKER_MSG="ServerCallRequired";function CircuitBreak(e82){let n=Error("ServerCallRequired");return n.cause={method:e82,stack:n.stack},n}var CircuitBreakerResponse=class extends Error{constructor(n,t){super(CIRCUIT_BREAKER_MSG),this.response=n,this.cause=t,this.name="CircuitBreakerResponse"}};function isCircuitBreaker(e82){return e82?.message===CIRCUIT_BREAKER_MSG}var indentPerLevel=" ",smallThreshold=55,defaultOptions={depth:2};function inspect(e82,n){let t="",o={visited:new Map,currentNumber:0},d={...defaultOptions};return inspectRoot(e82,d,o,t)}function inspectRoot(e82,n,t,o){switch(typeof e82){case"object":return e82===null?"null":e82 instanceof Date?e82.toISOString():e82 instanceof Error?e82.stack||`${e82.name}: ${e82.message}`:e82 instanceof Promise?"[Promise]":inspectObject(e82,n,t,o);case"undefined":return"undefined";case"function":return`[Function: ${e82.name}]`;case"string":case"number":case"bigint":case"boolean":case"symbol":return e82.toString();default:return""}}function inspectObject(e82,n,t,o){let d=t.visited.get(e82);if(d===void 0&&(d={isBeingPrinted:!1},t.visited.set(e82,d)),d.isBeingPrinted)return d.refNumber===void 0&&(d.refNumber=++t.currentNumber),`[Circular *${d.refNumber}]`;d.isBeingPrinted=!0;let r=n.depth;if(r!==null&&r<0)return d.isBeingPrinted=!1,Array.isArray(e82)?"[Array]":"[Object]";r!==null&&(r-=1);let a=[],u=0,l={...n,depth:r};if(Array.isArray(e82))for(let c of e82){let p=inspectRoot(c,l,t,o+indentPerLevel);a.push(p),u+=p.length}else for(let c in e82){let p=inspectRoot(e82[c],l,t,o+indentPerLevel);a.push([c,p]),u+=c.length,u+=p.length,u+=2}d.isBeingPrinted=!1;let s=d.refNumber?`\u27E8ref *${d.refNumber}\u27E9 `:"";if(u<smallThreshold)return Array.isArray(e82)?`${s}[ ${a.join(", ")} ]`:`${s}{${a.map(([c,p])=>`${c}: ${p}`).join(", ")}}`;let f=`${s}${Array.isArray(e82)?"[":"{"}`;for(let c=0;c<a.length;c++){let p=c===a.length-1,S=a[c];if(Array.isArray(e82))f+=`
|
2
2
|
${o}${indentPerLevel}${S}`;else{let[m,N]=S;f+=`
|
3
3
|
${o}${indentPerLevel}${m}: ${N}`}p||(f+=",")}return f+=`
|
4
|
-
${o}${Array.isArray(e82)?"]":"}"}`,f}var QueueConsole=class{constructor(){this.logs=[]}debug(...n){this.logs.push({method:"debug",args:n.map(t=>inspect(t))})}error(...n){this.logs.push({method:"error",args:n.map(t=>inspect(t))})}info(...n){this.logs.push({method:"info",args:n.map(t=>inspect(t))})}log(...n){this.logs.push({method:"log",args:n.map(t=>inspect(t))})}trace(...n){this.logs.push({method:"trace",args:n.map(t=>inspect(t))})}warn(...n){this.logs.push({method:"warn",args:n.map(t=>inspect(t))})}},ActorCommand=(e82=>(e82.ENABLE_APP_LOGGING="enableAppLogging",e82.ENABLE_DEBUG_LOGGING="enableDebugLogging",e82.ENABLE_PLUGINS="enablePlugins",e82.LOAD_BUNDLE="loadBundle",e82.CALL="call",e82.PLUGIN_RESPONSE="pluginResponse",e82.QUIT="quit",e82))(ActorCommand||{}),ActorResponse=(e82=>(e82.READY="ready",e82.PLUGINS_CONFIGURED="pluginsConfigured",e82.BUNDLE_LOADED="bundleLoaded",e82.BUNDLE_LOAD_FAILED="bundleLoadFailed",e82.RETURN="return",e82.ERROR="error",e82.CIRCUIT_BREAKER="circuitBreaker",e82.PLUGIN_CALL="pluginCall",e82.UNHANDLED_REJECTION="unhandledRejection",e82))(ActorResponse||{}),Header=Object.freeze({Actor:"devvit-actor",App:"devvit-app",AppUser:"devvit-app-user",AppViewerAuthToken:"devvit-app-viewer-authorization",Caller:"devvit-caller",CallerPortID:"devvit-caller-port-id",Canary:"devvit-canary",Debug:"devvit-debug",GQLHost:"devvit-gql-host",Installation:"devvit-installation",ModPermissions:"devvit-mod-permissions",Post:"devvit-post",PostAuthor:"devvit-post-author",R2Auth:"devvit-sec-authorization",R2Host:"devvit-r2-host",RemoteHostname:"devvit-remote-hostname",SettingsUri:"devvit-sec-settings-uri",StreamID:"devvit-stream-id",Subreddit:"devvit-subreddit",SubredditName:"devvit-subreddit-name",TraceID:"devvit-trace-id",User:"devvit-user",UserAgent:"devvit-user-agent",Version:"devvit-version",Language:"devvit-accept-language",Timezone:"devvit-accept-timezone",AppDependencies:"devvit-app-dependencies",WebviewTemplate:"devvit-webview-template"}),AppDebug;(function(e82){e82.Blocks="blocks",e82.EmitSnapshots="emitSnapshots",e82.EmitState="emitState",e82.Realtime="realtime",e82.Runtime="runtime",e82.Surface="surface",e82.UseAsync="useAsync",e82.Payments="payments",e82.Bootstrap="bootstrap"})(AppDebug||(AppDebug={}));function getDependencyMetadata(e82){var o;let n=(o=e82?.buildInfo)==null?void 0:o.dependencies;if(!n)return{};let t=Object.entries(n).map(([d,r])=>`${d}=${r}`);return{[Header.AppDependencies]:{values:t}}}var box=globalThis.self??globalThis,_i,ti,Oi,Ei,qi,gi,Vi,$i,ri,Ci,Di,bi,Mi,Ji,tt,Pi,Xi,Fi,Qi,UnsandboxedRuntimeLite=class{constructor(e82={},n){kn(this,bi),kn(this,Ji),kn(this,Pi),kn(this,Fi),kn(this,_i,void 0),kn(this,ti,!1),kn(this,Oi,{}),kn(this,Ei,[]),kn(this,qi,0),kn(this,gi,{}),kn(this,Vi,{}),kn(this,$i,{}),kn(this,ri,""),kn(this,Ci,void 0),kn(this,Di,(e83,n2)=>({assets:e83,webviewAssets:n2,use:t=>{if(on(this,Ei).includes(t.fullName)){let o={};for(let d of Object.values(t.methods))o[d.name]=async(r,a)=>{let u=++it(this,qi)._,l=new Promise((s,f)=>{on(this,gi)[u]={resolve:s,reject:f}});return box.postMessage([ActorResponse.PLUGIN_CALL,u,t.fullName,d.name,r,a]),l};return o}else{let o={};for(let d of Object.values(t.methods))o[d.name]=()=>{throw $n(this,ti,!0),box.console.logs=[],CircuitBreak(d.name)};return o}},provides:t=>{Object.values(t.methods).forEach(o=>{on(this,Oi)[o.name]={req:o.requestType,res:o.responseType}})}})),e82={"@devvit/protos":protos,...e82},$n(this,Ci,n),box.require=t=>e82[t],box.fetch=()=>{throw box.log("[unsandboxed runtime] circuit break: fetch"),$n(this,ti,!0),box.console.logs=[],CircuitBreak("fetch")},box.clearCircuitBreak=()=>{$n(this,ti,!1),box.log("[unsandboxed runtime] circuit break cleared")}}enableAppLogging(){box.console=new QueueConsole}getCallState(){return{logs:box.console.logs??[]}}async init(){box.log("[unsandboxed runtime] init")}setPluginList(e82){$n(this,Ei,e82)}setLocalMetadata(e82){$n(this,Vi,e82)}loadBundle(bundle){box.console.logs=[],$n(this,$i,getDependencyMetadata(bundle));let module={};bundle.sourceMap&&$n(this,ri,bundle.sourceMap),Kn(this,Pi,Xi).call(this,()=>{eval(bundle.code)});let config=on(this,Di).call(this,bundle.assets,bundle.webviewAssets);Kn(this,Ji,tt).call(this,config),Kn(this,Pi,Xi).call(this,()=>{var e82;if(!((e82=module?.exports)!=null&&e82.default))throw Error("bundle missing default export");$n(this,_i,new module.exports.default(config))})}async callBinary(e82,n,t){return Kn(this,Fi,Qi).call(this,async()=>{let{req:o,res:d}=on(this,Oi)[e82],r=o.decode(n),a=await this.call(e82,r,t,!1);return a.value&&(a.value=d.encode(d.fromJSON(a.value)).finish()),a})}async call(e82,n,t,o){if(o)return await this.callBinary(e82,n,t);$n(this,ti,!1),box.console.logs=[];try{let d={...on(this,Vi),...t,...on(this,$i)},r=await Kn(this,Fi,Qi).call(this,()=>{var a,u;return(u=(a=on(this,_i))==null?void 0:a[e82])==null?void 0:u.call(a,n,d)});if(on(this,ti))throw box.console.logs=[],CircuitBreak(e82);return{error:void 0,success:!0,value:r}}catch(d){return Kn(this,bi,Mi).call(this,d),{error:d,success:!1,value:void 0}}}onPluginResponse(e82,n){let t=on(this,gi)[e82];n.success?t.resolve(n.value):t.reject(n.error),delete on(this,gi)[e82]}quit(){box.log("[unsandboxed runtime] quitting"),box.close()}};_i=new WeakMap,ti=new WeakMap,Oi=new WeakMap,Ei=new WeakMap,qi=new WeakMap,gi=new WeakMap,Vi=new WeakMap,$i=new WeakMap,ri=new WeakMap,Ci=new WeakMap,Di=new WeakMap,bi=new WeakSet,Mi=function(e82){var n;isCircuitBreaker(e82)||((n=box.console).logs??(n.logs=[]),box.console.logs.push({method:"error",args:[inspect(e82)]}))},Ji=new WeakSet,tt=function(e82){var t;let n=globalThis;n.devvit??(n.devvit={}),(t=n.devvit).config??(t.config={assets:e82.assets})},Pi=new WeakSet,Xi=function(e82){var n;try{return e82()}catch(t){let o=t instanceof Error?t:void 0;throw Kn(this,bi,Mi).call(this,t),o!=null&&o.stack&&on(this,ri)&&((n=on(this,Ci))==null||n.handleException(on(this,ri),o)),t}},Fi=new WeakSet,Qi=async function(e82){var n;try{return await e82()}catch(t){let o=t instanceof Error?t:void 0;throw Kn(this,bi,Mi).call(this,t),o!=null&&o.stack&&on(this,ri)&&((n=on(this,Ci))==null||n.handleException(on(this,ri),o)),t}};function getAppName(e82){return e82.hostname.split(".")[1]??e82.hostname}function getAppTitle(e82){var t,o;return`${getAppName(e82)}@${(t=e82.actor)==null?void 0:t.version} by ${(o=e82.actor)==null?void 0:o.owner}`}function assignRuntime(e82,n){Object.assign(e82,{CircuitBreakerResponse,log,onmessage,onunhandledrejection,runtime:n})}function startRuntime(e82){e82.postMessage([ActorResponse.READY,{start:performance.timeOrigin,end:performance.timeOrigin+performance.now()}])}function log(...e82){this.debugLogging&&console.debug.apply(null,e82)}async function onmessage(e82){switch(e82.data[0]){case ActorCommand.ENABLE_APP_LOGGING:this.runtime.enableAppLogging(),this.log("<App logs enabled>");break;case ActorCommand.ENABLE_DEBUG_LOGGING:this.debugLogging=!0,this.log("<Debug logs enabled>");break;case ActorCommand.ENABLE_PLUGINS:{let[,n]=e82.data;this.log("<Enabling local plugins:>");for(let t of n)this.log(` ${t}`);this.runtime.setPluginList(n),this.postMessage([ActorResponse.PLUGINS_CONFIGURED]);break}case ActorCommand.LOAD_BUNDLE:{let[,n]=e82.data;this.log(`Loading bundle for app ${getAppTitle(n)}`);try{this.runtime.loadBundle(n),this.postMessage([ActorResponse.BUNDLE_LOADED,this.runtime.getCallState().logs])}catch(t){this.postMessage([ActorResponse.BUNDLE_LOAD_FAILED,void 0,t,this.runtime.getCallState().logs])}break}case ActorCommand.CALL:{let[,n,t,o,d,r]=e82.data;this.log(`${n} \u2192 [Call] ${t}`);let a=r?await this.runtime.callBinary(t,o,d):await this.runtime.call(t,o,d);a.success?this.postMessage([ActorResponse.RETURN,n,a.value,this.runtime.getCallState().logs]):isCircuitBreaker(a.error)?this.postMessage([ActorResponse.CIRCUIT_BREAKER,n,a.value,a.error.cause]):this.postMessage([ActorResponse.ERROR,n,a.error,this.runtime.getCallState().logs]);break}case ActorCommand.PLUGIN_RESPONSE:{let[,n,t]=e82.data;this.runtime.onPluginResponse(n,t);break}case ActorCommand.QUIT:this.log("<Shutdown>"),this.runtime.quit();break}}function onunhandledrejection(e82){var o;let n;e82.reason instanceof Error?n=CloneableError(e82.reason):e82.reason!=null&&(n=String(e82.reason));let t=[...((o=this.runtime)==null?void 0:o.getCallState().logs)??[]];t.push({method:"error",args:[inspect(e82.reason)]}),this.postMessage([ActorResponse.UNHANDLED_REJECTION,void 0,n,t])}function CloneableError(e82){return{cause:e82.cause==null?void 0:String(e82.cause),columnNumber:e82.columnNumber,fileName:e82.fileName,lineNumber:e82.lineNumber,message:e82.message,name:e82.name,...e82.stack&&{stack:e82.stack}}}function createBaseSerializableServiceDefinition(){return{fullName:"",methods:[],name:"",version:""}}var SerializableServiceDefinition={$type:"devvit.runtime.SerializableServiceDefinition",encode(e82,n=_m0.Writer.create()){e82.fullName!==""&&n.uint32(10).string(e82.fullName);for(let t of e82.methods)SerializableMethodDefinition.encode(t,n.uint32(18).fork()).ldelim();return e82.name!==""&&n.uint32(26).string(e82.name),e82.version!==""&&n.uint32(34).string(e82.version),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSerializableServiceDefinition();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.fullName=t.string();continue;case 2:if(r!==18)break;d.methods.push(SerializableMethodDefinition.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.name=t.string();continue;case 4:if(r!==34)break;d.version=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fullName:isSet$1(e82.fullName)?globalThis.String(e82.fullName):"",methods:globalThis.Array.isArray(e82?.methods)?e82.methods.map(n=>SerializableMethodDefinition.fromJSON(n)):[],name:isSet$1(e82.name)?globalThis.String(e82.name):"",version:isSet$1(e82.version)?globalThis.String(e82.version):""}},toJSON(e82){var t;let n={};return e82.fullName!==""&&(n.fullName=e82.fullName),(t=e82.methods)!=null&&t.length&&(n.methods=e82.methods.map(o=>SerializableMethodDefinition.toJSON(o))),e82.name!==""&&(n.name=e82.name),e82.version!==""&&(n.version=e82.version),n},create(e82){return SerializableServiceDefinition.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSerializableServiceDefinition();return n.fullName=e82.fullName??"",n.methods=((t=e82.methods)==null?void 0:t.map(o=>SerializableMethodDefinition.fromPartial(o)))||[],n.name=e82.name??"",n.version=e82.version??"",n}};messageTypeRegistry.set(SerializableServiceDefinition.$type,SerializableServiceDefinition);function createBaseSerializableMethodDefinition(){return{fullName:"",name:"",requestStream:!1,responseStream:!1,requestType:"",responseType:""}}var SerializableMethodDefinition={$type:"devvit.runtime.SerializableMethodDefinition",encode(e82,n=_m0.Writer.create()){return e82.fullName!==""&&n.uint32(10).string(e82.fullName),e82.name!==""&&n.uint32(18).string(e82.name),e82.requestStream!==!1&&n.uint32(24).bool(e82.requestStream),e82.responseStream!==!1&&n.uint32(32).bool(e82.responseStream),e82.requestType!==""&&n.uint32(42).string(e82.requestType),e82.responseType!==""&&n.uint32(50).string(e82.responseType),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSerializableMethodDefinition();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.fullName=t.string();continue;case 2:if(r!==18)break;d.name=t.string();continue;case 3:if(r!==24)break;d.requestStream=t.bool();continue;case 4:if(r!==32)break;d.responseStream=t.bool();continue;case 5:if(r!==42)break;d.requestType=t.string();continue;case 6:if(r!==50)break;d.responseType=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fullName:isSet$1(e82.fullName)?globalThis.String(e82.fullName):"",name:isSet$1(e82.name)?globalThis.String(e82.name):"",requestStream:isSet$1(e82.requestStream)?globalThis.Boolean(e82.requestStream):!1,responseStream:isSet$1(e82.responseStream)?globalThis.Boolean(e82.responseStream):!1,requestType:isSet$1(e82.requestType)?globalThis.String(e82.requestType):"",responseType:isSet$1(e82.responseType)?globalThis.String(e82.responseType):""}},toJSON(e82){let n={};return e82.fullName!==""&&(n.fullName=e82.fullName),e82.name!==""&&(n.name=e82.name),e82.requestStream!==!1&&(n.requestStream=e82.requestStream),e82.responseStream!==!1&&(n.responseStream=e82.responseStream),e82.requestType!==""&&(n.requestType=e82.requestType),e82.responseType!==""&&(n.responseType=e82.responseType),n},create(e82){return SerializableMethodDefinition.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSerializableMethodDefinition();return n.fullName=e82.fullName??"",n.name=e82.name??"",n.requestStream=e82.requestStream??!1,n.responseStream=e82.responseStream??!1,n.requestType=e82.requestType??"",n.responseType=e82.responseType??"",n}};messageTypeRegistry.set(SerializableMethodDefinition.$type,SerializableMethodDefinition);function isSet$1(e82){return e82!=null}var LinkedBundleTargetPlatform;(function(e82){e82[e82.BROWSER=0]="BROWSER",e82[e82.V8=1]="V8",e82[e82.SKINNY=2]="SKINNY",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(LinkedBundleTargetPlatform||(LinkedBundleTargetPlatform={}));var TargetRuntime;(function(e82){e82[e82.UNIVERSAL=0]="UNIVERSAL",e82[e82.CLIENT=1]="CLIENT",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(TargetRuntime||(TargetRuntime={}));function targetRuntimeFromJSON(e82){switch(e82){case 0:case"UNIVERSAL":return TargetRuntime.UNIVERSAL;case 1:case"CLIENT":return TargetRuntime.CLIENT;case-1:case"UNRECOGNIZED":default:return TargetRuntime.UNRECOGNIZED}}function targetRuntimeToJSON(e82){switch(e82){case TargetRuntime.UNIVERSAL:return 0;case TargetRuntime.CLIENT:return 1;case TargetRuntime.UNRECOGNIZED:default:return-1}}function createBaseActorSpec(){return{name:"",owner:"",version:""}}var ActorSpec={$type:"devvit.runtime.ActorSpec",encode(e82,n=_m0.Writer.create()){return e82.name!==""&&n.uint32(10).string(e82.name),e82.owner!==""&&n.uint32(18).string(e82.owner),e82.version!==""&&n.uint32(26).string(e82.version),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseActorSpec();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.name=t.string();continue;case 2:if(r!==18)break;d.owner=t.string();continue;case 3:if(r!==26)break;d.version=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{name:isSet(e82.name)?globalThis.String(e82.name):"",owner:isSet(e82.owner)?globalThis.String(e82.owner):"",version:isSet(e82.version)?globalThis.String(e82.version):""}},toJSON(e82){let n={};return e82.name!==""&&(n.name=e82.name),e82.owner!==""&&(n.owner=e82.owner),e82.version!==""&&(n.version=e82.version),n},create(e82){return ActorSpec.fromPartial(e82??{})},fromPartial(e82){let n=createBaseActorSpec();return n.name=e82.name??"",n.owner=e82.owner??"",n.version=e82.version??"",n}};messageTypeRegistry.set(ActorSpec.$type,ActorSpec);function createBaseLocationFilter(){return{allow:[],deny:[]}}var LocationFilter={$type:"devvit.runtime.LocationFilter",encode(e82,n=_m0.Writer.create()){for(let t of e82.allow)n.uint32(10).string(t);for(let t of e82.deny)n.uint32(18).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLocationFilter();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.allow.push(t.string());continue;case 2:if(r!==18)break;d.deny.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{allow:globalThis.Array.isArray(e82?.allow)?e82.allow.map(n=>globalThis.String(n)):[],deny:globalThis.Array.isArray(e82?.deny)?e82.deny.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t,o;let n={};return(t=e82.allow)!=null&&t.length&&(n.allow=e82.allow),(o=e82.deny)!=null&&o.length&&(n.deny=e82.deny),n},create(e82){return LocationFilter.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseLocationFilter();return n.allow=((t=e82.allow)==null?void 0:t.map(d=>d))||[],n.deny=((o=e82.deny)==null?void 0:o.map(d=>d))||[],n}};messageTypeRegistry.set(LocationFilter.$type,LocationFilter);function createBasePackageSpec(){return{actor:void 0,definition:void 0,locations:void 0,partitionsBy:[]}}var PackageSpec={$type:"devvit.runtime.PackageSpec",encode(e82,n=_m0.Writer.create()){e82.actor!==void 0&&ActorSpec.encode(e82.actor,n.uint32(10).fork()).ldelim(),e82.definition!==void 0&&SerializableServiceDefinition.encode(e82.definition,n.uint32(18).fork()).ldelim(),e82.locations!==void 0&&LocationFilter.encode(e82.locations,n.uint32(26).fork()).ldelim();for(let t of e82.partitionsBy)n.uint32(34).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePackageSpec();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actor=ActorSpec.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.definition=SerializableServiceDefinition.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.locations=LocationFilter.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.partitionsBy.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actor:isSet(e82.actor)?ActorSpec.fromJSON(e82.actor):void 0,definition:isSet(e82.definition)?SerializableServiceDefinition.fromJSON(e82.definition):void 0,locations:isSet(e82.locations)?LocationFilter.fromJSON(e82.locations):void 0,partitionsBy:globalThis.Array.isArray(e82?.partitionsBy)?e82.partitionsBy.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.actor!==void 0&&(n.actor=ActorSpec.toJSON(e82.actor)),e82.definition!==void 0&&(n.definition=SerializableServiceDefinition.toJSON(e82.definition)),e82.locations!==void 0&&(n.locations=LocationFilter.toJSON(e82.locations)),(t=e82.partitionsBy)!=null&&t.length&&(n.partitionsBy=e82.partitionsBy),n},create(e82){return PackageSpec.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBasePackageSpec();return n.actor=e82.actor!==void 0&&e82.actor!==null?ActorSpec.fromPartial(e82.actor):void 0,n.definition=e82.definition!==void 0&&e82.definition!==null?SerializableServiceDefinition.fromPartial(e82.definition):void 0,n.locations=e82.locations!==void 0&&e82.locations!==null?LocationFilter.fromPartial(e82.locations):void 0,n.partitionsBy=((t=e82.partitionsBy)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(PackageSpec.$type,PackageSpec);function createBasePackageQuery(){return{name:void 0,owner:void 0,typeName:"",versions:void 0}}var PackageQuery={$type:"devvit.runtime.PackageQuery",encode(e82,n=_m0.Writer.create()){return e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(10).fork()).ldelim(),e82.owner!==void 0&&StringValue.encode({value:e82.owner},n.uint32(18).fork()).ldelim(),e82.typeName!==""&&n.uint32(26).string(e82.typeName),e82.versions!==void 0&&StringValue.encode({value:e82.versions},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePackageQuery();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.owner=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.typeName=t.string();continue;case 4:if(r!==34)break;d.versions=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{name:isSet(e82.name)?String(e82.name):void 0,owner:isSet(e82.owner)?String(e82.owner):void 0,typeName:isSet(e82.typeName)?globalThis.String(e82.typeName):"",versions:isSet(e82.versions)?String(e82.versions):void 0}},toJSON(e82){let n={};return e82.name!==void 0&&(n.name=e82.name),e82.owner!==void 0&&(n.owner=e82.owner),e82.typeName!==""&&(n.typeName=e82.typeName),e82.versions!==void 0&&(n.versions=e82.versions),n},create(e82){return PackageQuery.fromPartial(e82??{})},fromPartial(e82){let n=createBasePackageQuery();return n.name=e82.name??void 0,n.owner=e82.owner??void 0,n.typeName=e82.typeName??"",n.versions=e82.versions??void 0,n}};messageTypeRegistry.set(PackageQuery.$type,PackageQuery);function createBaseDependencySpec(){return{actor:void 0,hostname:"",provides:[],uses:[]}}var DependencySpec={$type:"devvit.runtime.DependencySpec",encode(e82,n=_m0.Writer.create()){e82.actor!==void 0&&ActorSpec.encode(e82.actor,n.uint32(10).fork()).ldelim(),e82.hostname!==""&&n.uint32(18).string(e82.hostname);for(let t of e82.provides)PackageSpec.encode(t,n.uint32(26).fork()).ldelim();for(let t of e82.uses)PackageQuery.encode(t,n.uint32(34).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDependencySpec();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actor=ActorSpec.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.hostname=t.string();continue;case 3:if(r!==26)break;d.provides.push(PackageSpec.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.uses.push(PackageQuery.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actor:isSet(e82.actor)?ActorSpec.fromJSON(e82.actor):void 0,hostname:isSet(e82.hostname)?globalThis.String(e82.hostname):"",provides:globalThis.Array.isArray(e82?.provides)?e82.provides.map(n=>PackageSpec.fromJSON(n)):[],uses:globalThis.Array.isArray(e82?.uses)?e82.uses.map(n=>PackageQuery.fromJSON(n)):[]}},toJSON(e82){var t,o;let n={};return e82.actor!==void 0&&(n.actor=ActorSpec.toJSON(e82.actor)),e82.hostname!==""&&(n.hostname=e82.hostname),(t=e82.provides)!=null&&t.length&&(n.provides=e82.provides.map(d=>PackageSpec.toJSON(d))),(o=e82.uses)!=null&&o.length&&(n.uses=e82.uses.map(d=>PackageQuery.toJSON(d))),n},create(e82){return DependencySpec.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseDependencySpec();return n.actor=e82.actor!==void 0&&e82.actor!==null?ActorSpec.fromPartial(e82.actor):void 0,n.hostname=e82.hostname??"",n.provides=((t=e82.provides)==null?void 0:t.map(d=>PackageSpec.fromPartial(d)))||[],n.uses=((o=e82.uses)==null?void 0:o.map(d=>PackageQuery.fromPartial(d)))||[],n}};messageTypeRegistry.set(DependencySpec.$type,DependencySpec);function createBaseLinkedBundle(){return{actor:void 0,code:"",sourceMap:void 0,hostname:"",provides:[],uses:[],buildInfo:void 0,assetsUrl:void 0,assets:{},webviewAssets:{},products:{}}}var LinkedBundle={$type:"devvit.runtime.LinkedBundle",encode(e82,n=_m0.Writer.create()){e82.actor!==void 0&&ActorSpec.encode(e82.actor,n.uint32(10).fork()).ldelim(),e82.code!==""&&n.uint32(18).string(e82.code),e82.sourceMap!==void 0&&StringValue.encode({value:e82.sourceMap},n.uint32(82).fork()).ldelim(),e82.hostname!==""&&n.uint32(26).string(e82.hostname);for(let t of e82.provides)SerializableServiceDefinition.encode(t,n.uint32(34).fork()).ldelim();for(let t of e82.uses)LinkedBundle.encode(t,n.uint32(42).fork()).ldelim();return e82.buildInfo!==void 0&&BuildInfo.encode(e82.buildInfo,n.uint32(50).fork()).ldelim(),e82.assetsUrl!==void 0&&StringValue.encode({value:e82.assetsUrl},n.uint32(58).fork()).ldelim(),Object.entries(e82.assets).forEach(([t,o])=>{LinkedBundle_AssetsEntry.encode({key:t,value:o},n.uint32(66).fork()).ldelim()}),Object.entries(e82.webviewAssets).forEach(([t,o])=>{LinkedBundle_WebviewAssetsEntry.encode({key:t,value:o},n.uint32(74).fork()).ldelim()}),Object.entries(e82.products).forEach(([t,o])=>{LinkedBundle_ProductsEntry.encode({key:t,value:o},n.uint32(90).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkedBundle();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actor=ActorSpec.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.code=t.string();continue;case 10:if(r!==82)break;d.sourceMap=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.hostname=t.string();continue;case 4:if(r!==34)break;d.provides.push(SerializableServiceDefinition.decode(t,t.uint32()));continue;case 5:if(r!==42)break;d.uses.push(LinkedBundle.decode(t,t.uint32()));continue;case 6:if(r!==50)break;d.buildInfo=BuildInfo.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.assetsUrl=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;let a=LinkedBundle_AssetsEntry.decode(t,t.uint32());a.value!==void 0&&(d.assets[a.key]=a.value);continue;case 9:if(r!==74)break;let u=LinkedBundle_WebviewAssetsEntry.decode(t,t.uint32());u.value!==void 0&&(d.webviewAssets[u.key]=u.value);continue;case 11:if(r!==90)break;let l=LinkedBundle_ProductsEntry.decode(t,t.uint32());l.value!==void 0&&(d.products[l.key]=l.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actor:isSet(e82.actor)?ActorSpec.fromJSON(e82.actor):void 0,code:isSet(e82.code)?globalThis.String(e82.code):"",sourceMap:isSet(e82.sourceMap)?String(e82.sourceMap):void 0,hostname:isSet(e82.hostname)?globalThis.String(e82.hostname):"",provides:globalThis.Array.isArray(e82?.provides)?e82.provides.map(n=>SerializableServiceDefinition.fromJSON(n)):[],uses:globalThis.Array.isArray(e82?.uses)?e82.uses.map(n=>LinkedBundle.fromJSON(n)):[],buildInfo:isSet(e82.buildInfo)?BuildInfo.fromJSON(e82.buildInfo):void 0,assetsUrl:isSet(e82.assetsUrl)?String(e82.assetsUrl):void 0,assets:isObject(e82.assets)?Object.entries(e82.assets).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{},webviewAssets:isObject(e82.webviewAssets)?Object.entries(e82.webviewAssets).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{},products:isObject(e82.products)?Object.entries(e82.products).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{}}},toJSON(e82){var t,o;let n={};if(e82.actor!==void 0&&(n.actor=ActorSpec.toJSON(e82.actor)),e82.code!==""&&(n.code=e82.code),e82.sourceMap!==void 0&&(n.sourceMap=e82.sourceMap),e82.hostname!==""&&(n.hostname=e82.hostname),(t=e82.provides)!=null&&t.length&&(n.provides=e82.provides.map(d=>SerializableServiceDefinition.toJSON(d))),(o=e82.uses)!=null&&o.length&&(n.uses=e82.uses.map(d=>LinkedBundle.toJSON(d))),e82.buildInfo!==void 0&&(n.buildInfo=BuildInfo.toJSON(e82.buildInfo)),e82.assetsUrl!==void 0&&(n.assetsUrl=e82.assetsUrl),e82.assets){let d=Object.entries(e82.assets);d.length>0&&(n.assets={},d.forEach(([r,a])=>{n.assets[r]=a}))}if(e82.webviewAssets){let d=Object.entries(e82.webviewAssets);d.length>0&&(n.webviewAssets={},d.forEach(([r,a])=>{n.webviewAssets[r]=a}))}if(e82.products){let d=Object.entries(e82.products);d.length>0&&(n.products={},d.forEach(([r,a])=>{n.products[r]=a}))}return n},create(e82){return LinkedBundle.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseLinkedBundle();return n.actor=e82.actor!==void 0&&e82.actor!==null?ActorSpec.fromPartial(e82.actor):void 0,n.code=e82.code??"",n.sourceMap=e82.sourceMap??void 0,n.hostname=e82.hostname??"",n.provides=((t=e82.provides)==null?void 0:t.map(d=>SerializableServiceDefinition.fromPartial(d)))||[],n.uses=((o=e82.uses)==null?void 0:o.map(d=>LinkedBundle.fromPartial(d)))||[],n.buildInfo=e82.buildInfo!==void 0&&e82.buildInfo!==null?BuildInfo.fromPartial(e82.buildInfo):void 0,n.assetsUrl=e82.assetsUrl??void 0,n.assets=Object.entries(e82.assets??{}).reduce((d,[r,a])=>(a!==void 0&&(d[r]=globalThis.String(a)),d),{}),n.webviewAssets=Object.entries(e82.webviewAssets??{}).reduce((d,[r,a])=>(a!==void 0&&(d[r]=globalThis.String(a)),d),{}),n.products=Object.entries(e82.products??{}).reduce((d,[r,a])=>(a!==void 0&&(d[r]=globalThis.String(a)),d),{}),n}};messageTypeRegistry.set(LinkedBundle.$type,LinkedBundle);function createBaseLinkedBundle_AssetsEntry(){return{key:"",value:""}}var LinkedBundle_AssetsEntry={$type:"devvit.runtime.LinkedBundle.AssetsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkedBundle_AssetsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet(e82.key)?globalThis.String(e82.key):"",value:isSet(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return LinkedBundle_AssetsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLinkedBundle_AssetsEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(LinkedBundle_AssetsEntry.$type,LinkedBundle_AssetsEntry);function createBaseLinkedBundle_WebviewAssetsEntry(){return{key:"",value:""}}var LinkedBundle_WebviewAssetsEntry={$type:"devvit.runtime.LinkedBundle.WebviewAssetsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkedBundle_WebviewAssetsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet(e82.key)?globalThis.String(e82.key):"",value:isSet(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return LinkedBundle_WebviewAssetsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLinkedBundle_WebviewAssetsEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(LinkedBundle_WebviewAssetsEntry.$type,LinkedBundle_WebviewAssetsEntry);function createBaseLinkedBundle_ProductsEntry(){return{key:"",value:""}}var LinkedBundle_ProductsEntry={$type:"devvit.runtime.LinkedBundle.ProductsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkedBundle_ProductsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet(e82.key)?globalThis.String(e82.key):"",value:isSet(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return LinkedBundle_ProductsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLinkedBundle_ProductsEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(LinkedBundle_ProductsEntry.$type,LinkedBundle_ProductsEntry);function createBaseBuildInfo(){return{created:void 0,dependencies:{},targetRuntime:0}}var BuildInfo={$type:"devvit.runtime.BuildInfo",encode(e82,n=_m0.Writer.create()){return e82.created!==void 0&&Timestamp.encode(toTimestamp(e82.created),n.uint32(10).fork()).ldelim(),Object.entries(e82.dependencies).forEach(([t,o])=>{BuildInfo_DependenciesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),e82.targetRuntime!==0&&n.uint32(24).int32(e82.targetRuntime),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBuildInfo();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.created=fromTimestamp(Timestamp.decode(t,t.uint32()));continue;case 2:if(r!==18)break;let a=BuildInfo_DependenciesEntry.decode(t,t.uint32());a.value!==void 0&&(d.dependencies[a.key]=a.value);continue;case 3:if(r!==24)break;d.targetRuntime=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{created:isSet(e82.created)?fromJsonTimestamp(e82.created):void 0,dependencies:isObject(e82.dependencies)?Object.entries(e82.dependencies).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{},targetRuntime:isSet(e82.targetRuntime)?targetRuntimeFromJSON(e82.targetRuntime):0}},toJSON(e82){let n={};if(e82.created!==void 0&&(n.created=e82.created.toISOString()),e82.dependencies){let t=Object.entries(e82.dependencies);t.length>0&&(n.dependencies={},t.forEach(([o,d])=>{n.dependencies[o]=d}))}return e82.targetRuntime!==0&&(n.targetRuntime=targetRuntimeToJSON(e82.targetRuntime)),n},create(e82){return BuildInfo.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBuildInfo();return n.created=e82.created??void 0,n.dependencies=Object.entries(e82.dependencies??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=globalThis.String(d)),t),{}),n.targetRuntime=e82.targetRuntime??0,n}};messageTypeRegistry.set(BuildInfo.$type,BuildInfo);function createBaseBuildInfo_DependenciesEntry(){return{key:"",value:""}}var BuildInfo_DependenciesEntry={$type:"devvit.runtime.BuildInfo.DependenciesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBuildInfo_DependenciesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet(e82.key)?globalThis.String(e82.key):"",value:isSet(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return BuildInfo_DependenciesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBuildInfo_DependenciesEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(BuildInfo_DependenciesEntry.$type,BuildInfo_DependenciesEntry);function toTimestamp(e82){let n=Math.trunc(e82.getTime()/1e3),t=e82.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function fromTimestamp(e82){let n=(e82.seconds||0)*1e3;return n+=(e82.nanos||0)/1e6,new globalThis.Date(n)}function fromJsonTimestamp(e82){return e82 instanceof globalThis.Date?e82:typeof e82=="string"?new globalThis.Date(e82):fromTimestamp(Timestamp.fromJSON(e82))}function isObject(e82){return typeof e82=="object"&&e82!==null}function isSet(e82){return e82!=null}var toByteArray_1=toByteArray,fromByteArray_1=fromByteArray,lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;var i,len;revLookup[45]=62;revLookup[95]=63;function getLens(e82){var n=e82.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e82.indexOf("=");t===-1&&(t=n);var o=t===n?0:4-t%4;return[t,o]}function _byteLength(e82,n,t){return(n+t)*3/4-t}function toByteArray(e82){var n,t=getLens(e82),o=t[0],d=t[1],r=new Arr(_byteLength(e82,o,d)),a=0,u=d>0?o-4:o,l;for(l=0;l<u;l+=4)n=revLookup[e82.charCodeAt(l)]<<18|revLookup[e82.charCodeAt(l+1)]<<12|revLookup[e82.charCodeAt(l+2)]<<6|revLookup[e82.charCodeAt(l+3)],r[a++]=n>>16&255,r[a++]=n>>8&255,r[a++]=n&255;return d===2&&(n=revLookup[e82.charCodeAt(l)]<<2|revLookup[e82.charCodeAt(l+1)]>>4,r[a++]=n&255),d===1&&(n=revLookup[e82.charCodeAt(l)]<<10|revLookup[e82.charCodeAt(l+1)]<<4|revLookup[e82.charCodeAt(l+2)]>>2,r[a++]=n>>8&255,r[a++]=n&255),r}function tripletToBase64(e82){return lookup[e82>>18&63]+lookup[e82>>12&63]+lookup[e82>>6&63]+lookup[e82&63]}function encodeChunk(e82,n,t){for(var o,d=[],r=n;r<t;r+=3)o=(e82[r]<<16&16711680)+(e82[r+1]<<8&65280)+(e82[r+2]&255),d.push(tripletToBase64(o));return d.join("")}function fromByteArray(e82){for(var n,t=e82.length,o=t%3,d=[],r=16383,a=0,u=t-o;a<u;a+=r)d.push(encodeChunk(e82,a,a+r>u?u:a+r));return o===1?(n=e82[t-1],d.push(lookup[n>>2]+lookup[n<<4&63]+"==")):o===2&&(n=(e82[t-2]<<8)+e82[t-1],d.push(lookup[n>>10]+lookup[n>>4&63]+lookup[n<<2&63]+"=")),d.join("")}var ready=!1,callId=0,onLoadHandler,isReadyCallback,onPluginsReadyHandler,returnHandlers={},initMetric;function fakePostMessage(e82,n){var t;(t=e82.onmessage)==null||t.call(e82,{data:n})}function isReady(){return new Promise(e82=>{ready?e82():isReadyCallback=e82})}function postMessage(e82){var n,t,o;switch(e82[0]){case ActorResponse.READY:{this.log("Worker is ready");let[,d]=e82;initMetric=d,ready=!0,isReadyCallback?.();break}case ActorResponse.PLUGINS_CONFIGURED:this.log("Plugins configured"),onPluginsReadyHandler?.resolve(),onPluginsReadyHandler=void 0;break;case ActorResponse.BUNDLE_LOADED:{this.log("Worker loaded app bundle successfully"),onLoadHandler?.resolve({metrics:{init:initMetric}}),onLoadHandler=void 0;break}case ActorResponse.BUNDLE_LOAD_FAILED:{this.log("Worker failed to load app bundle");let[,,d,r]=e82;onLoadHandler?.reject(d),onLoadHandler=void 0;break}case ActorResponse.RETURN:{let[,d,r,a]=e82;this.log(`${d} \u2190 [Return]`),(n=returnHandlers[d])==null||n.resolve(fromByteArray_1(r)),delete returnHandlers[d];break}case ActorResponse.ERROR:{let[,d,r,a]=e82;console.error(`${d} \u2190 [Error]`,r),(t=returnHandlers[d])==null||t.reject(r),delete returnHandlers[d];break}case ActorResponse.PLUGIN_CALL:break;case ActorResponse.CIRCUIT_BREAKER:{let[,d,r,a]=e82;this.log(`${d} \u2190 [Circuit Breaker] Re-run on server`),(o=returnHandlers[d])==null||o.reject(new CircuitBreakerResponse(r&&fromByteArray_1(r),a)),delete returnHandlers[d];break}}}async function loadBundle(e82){await isReady();let n=typeof e82=="string"?toByteArray_1(e82):e82;return new Promise((t,o)=>{let d=LinkedBundle.decode(n);onLoadHandler={resolve:t,reject:o},fakePostMessage(this,[ActorCommand.LOAD_BUNDLE,d])})}async function call(e82,n,t,o){return new Promise((d,r)=>{let a;typeof n=="string"?a=toByteArray_1(n):a=n;let u=JSON.parse(t),l=++callId;returnHandlers[l]={resolve:s=>{o?.(s),d(s)},reject:r},fakePostMessage(this,[ActorCommand.CALL,l,e82,a,u,!0])})}function quit(){fakePostMessage(this,[ActorCommand.QUIT])}function assignMobileHooks(e82){Object.assign(e82,{postMessage,loadBundle,call,quit})}async function main(){let e82=globalThis.self??globalThis,n=new UnsandboxedRuntimeLite;assignRuntime(e82,n),assignMobileHooks(e82),await n.init(),startRuntime(e82)}main().catch(console.error);
|
4
|
+
${o}${Array.isArray(e82)?"]":"}"}`,f}var QueueConsole=class{constructor(){this.logs=[]}debug(...n){this.logs.push({method:"debug",args:n.map(t=>inspect(t))})}error(...n){this.logs.push({method:"error",args:n.map(t=>inspect(t))})}info(...n){this.logs.push({method:"info",args:n.map(t=>inspect(t))})}log(...n){this.logs.push({method:"log",args:n.map(t=>inspect(t))})}trace(...n){this.logs.push({method:"trace",args:n.map(t=>inspect(t))})}warn(...n){this.logs.push({method:"warn",args:n.map(t=>inspect(t))})}},ActorCommand=(e82=>(e82.ENABLE_APP_LOGGING="enableAppLogging",e82.ENABLE_DEBUG_LOGGING="enableDebugLogging",e82.ENABLE_PLUGINS="enablePlugins",e82.LOAD_BUNDLE="loadBundle",e82.CALL="call",e82.PLUGIN_RESPONSE="pluginResponse",e82.QUIT="quit",e82))(ActorCommand||{}),ActorResponse=(e82=>(e82.READY="ready",e82.PLUGINS_CONFIGURED="pluginsConfigured",e82.BUNDLE_LOADED="bundleLoaded",e82.BUNDLE_LOAD_FAILED="bundleLoadFailed",e82.RETURN="return",e82.ERROR="error",e82.CIRCUIT_BREAKER="circuitBreaker",e82.PLUGIN_CALL="pluginCall",e82.UNHANDLED_REJECTION="unhandledRejection",e82))(ActorResponse||{}),Header=Object.freeze({Actor:"devvit-actor",App:"devvit-app",AppUser:"devvit-app-user",AppViewerAuthToken:"devvit-app-viewer-authorization",Caller:"devvit-caller",CallerPortID:"devvit-caller-port-id",Canary:"devvit-canary",Debug:"devvit-debug",GQLHost:"devvit-gql-host",Installation:"devvit-installation",ModPermissions:"devvit-mod-permissions",Post:"devvit-post",PostAuthor:"devvit-post-author",R2Auth:"devvit-sec-authorization",R2Host:"devvit-r2-host",RemoteHostname:"devvit-remote-hostname",SettingsUri:"devvit-sec-settings-uri",StreamID:"devvit-stream-id",Subreddit:"devvit-subreddit",SubredditName:"devvit-subreddit-name",TraceID:"devvit-trace-id",User:"devvit-user",UserAgent:"devvit-user-agent",Version:"devvit-version",Language:"devvit-accept-language",Timezone:"devvit-accept-timezone",AppDependencies:"devvit-app-dependencies",WebviewTemplate:"devvit-webview-template"}),AppDebug;(function(e82){e82.Blocks="blocks",e82.EmitSnapshots="emitSnapshots",e82.EmitState="emitState",e82.Realtime="realtime",e82.Runtime="runtime",e82.Surface="surface",e82.UseAsync="useAsync",e82.Payments="payments",e82.Bootstrap="bootstrap"})(AppDebug||(AppDebug={}));function getDependencyMetadata(e82){var o;let n=(o=e82?.buildInfo)==null?void 0:o.dependencies;if(!n)return{};let t=Object.entries(n).map(([d,r])=>`${d}=${r}`);return{[Header.AppDependencies]:{values:t}}}var box=globalThis.self??globalThis,_i,ti,Oi,Ei,qi,gi,Vi,$i,ri,Ci,Di,bi,Mi,Ji,tt,Pi,Xi,Fi,Qi,UnsandboxedRuntimeLite=class{constructor(e82={},n){kn(this,bi),kn(this,Ji),kn(this,Pi),kn(this,Fi),kn(this,_i,void 0),kn(this,ti,!1),kn(this,Oi,{}),kn(this,Ei,[]),kn(this,qi,0),kn(this,gi,{}),kn(this,Vi,{}),kn(this,$i,{}),kn(this,ri,""),kn(this,Ci,void 0),kn(this,Di,(e83,n2)=>({assets:e83,webviewAssets:n2,use:t=>{if(on(this,Ei).includes(t.fullName)){let o={};for(let d of Object.values(t.methods))o[d.name]=async(r,a)=>{let u=++it(this,qi)._,l=new Promise((s,f)=>{on(this,gi)[u]={resolve:s,reject:f}});return box.postMessage([ActorResponse.PLUGIN_CALL,u,t.fullName,d.name,r,a]),l};return o}else{let o={};for(let d of Object.values(t.methods))o[d.name]=()=>{throw $n(this,ti,!0),box.console.logs=[],CircuitBreak(d.name)};return o}},provides:t=>{Object.values(t.methods).forEach(o=>{on(this,Oi)[o.name]={req:o.requestType,res:o.responseType}})}})),e82={"@devvit/protos":protos,...e82},$n(this,Ci,n),box.require=t=>e82[t],box.fetch=()=>{throw box.log("[unsandboxed runtime] circuit break: fetch"),$n(this,ti,!0),box.console.logs=[],CircuitBreak("fetch")},box.clearCircuitBreak=()=>{$n(this,ti,!1),box.log("[unsandboxed runtime] circuit break cleared")}}enableAppLogging(){box.console=new QueueConsole}getCallState(){return{logs:box.console.logs??[]}}async init(){box.log("[unsandboxed runtime] init")}setPluginList(e82){$n(this,Ei,e82)}setLocalMetadata(e82){$n(this,Vi,e82)}loadBundle(bundle){box.console.logs=[],$n(this,$i,getDependencyMetadata(bundle));let module={};bundle.sourceMap&&$n(this,ri,bundle.sourceMap),Kn(this,Pi,Xi).call(this,()=>{eval(bundle.code)});let config=on(this,Di).call(this,bundle.assets,bundle.webviewAssets);Kn(this,Ji,tt).call(this,config),Kn(this,Pi,Xi).call(this,()=>{var e82;if(!((e82=module?.exports)!=null&&e82.default))throw Error("bundle missing default export");$n(this,_i,new module.exports.default(config))})}async callBinary(e82,n,t){return Kn(this,Fi,Qi).call(this,async()=>{let{req:o,res:d}=on(this,Oi)[e82],r=o.decode(n),a=await this.call(e82,r,t,!1);return a.value&&(a.value=d.encode(d.fromJSON(a.value)).finish()),a})}async call(e82,n,t,o){if(o)return await this.callBinary(e82,n,t);$n(this,ti,!1),box.console.logs=[];try{let d={...on(this,Vi),...t,...on(this,$i)},r=await Kn(this,Fi,Qi).call(this,()=>{var a,u;return(u=(a=on(this,_i))==null?void 0:a[e82])==null?void 0:u.call(a,n,d)});if(on(this,ti))throw box.console.logs=[],CircuitBreak(e82);return{error:void 0,success:!0,value:r}}catch(d){return Kn(this,bi,Mi).call(this,d),{error:d,success:!1,value:void 0}}}onPluginResponse(e82,n){let t=on(this,gi)[e82];n.success?t.resolve(n.value):t.reject(n.error),delete on(this,gi)[e82]}quit(){box.log("[unsandboxed runtime] quitting"),box.close()}};_i=new WeakMap,ti=new WeakMap,Oi=new WeakMap,Ei=new WeakMap,qi=new WeakMap,gi=new WeakMap,Vi=new WeakMap,$i=new WeakMap,ri=new WeakMap,Ci=new WeakMap,Di=new WeakMap,bi=new WeakSet,Mi=function(e82){var n;isCircuitBreaker(e82)||((n=box.console).logs??(n.logs=[]),box.console.logs.push({method:"error",args:[inspect(e82)]}))},Ji=new WeakSet,tt=function(e82){var t;let n=globalThis;n.devvit??(n.devvit={}),(t=n.devvit).config??(t.config={assets:e82.assets})},Pi=new WeakSet,Xi=function(e82){var n;try{return e82()}catch(t){let o=t instanceof Error?t:void 0;throw Kn(this,bi,Mi).call(this,t),o!=null&&o.stack&&on(this,ri)&&((n=on(this,Ci))==null||n.handleException(on(this,ri),o)),t}},Fi=new WeakSet,Qi=async function(e82){var n;try{return await e82()}catch(t){let o=t instanceof Error?t:void 0;throw Kn(this,bi,Mi).call(this,t),o!=null&&o.stack&&on(this,ri)&&((n=on(this,Ci))==null||n.handleException(on(this,ri),o)),t}};function getAppName(e82){return e82.hostname.split(".")[1]??e82.hostname}function getAppTitle(e82){var t,o;return`${getAppName(e82)}@${(t=e82.actor)==null?void 0:t.version} by ${(o=e82.actor)==null?void 0:o.owner}`}function assignRuntime(e82,n){Object.assign(e82,{CircuitBreakerResponse,log,onmessage,onunhandledrejection,runtime:n})}function startRuntime(e82){e82.postMessage([ActorResponse.READY,{start:performance.timeOrigin,end:performance.timeOrigin+performance.now()}])}function log(...e82){this.debugLogging&&console.debug.apply(null,e82)}async function onmessage(e82){switch(e82.data[0]){case ActorCommand.ENABLE_APP_LOGGING:this.runtime.enableAppLogging(),this.log("<App logs enabled>");break;case ActorCommand.ENABLE_DEBUG_LOGGING:this.debugLogging=!0,this.log("<Debug logs enabled>");break;case ActorCommand.ENABLE_PLUGINS:{let[,n]=e82.data;this.log("<Enabling local plugins:>");for(let t of n)this.log(` ${t}`);this.runtime.setPluginList(n),this.postMessage([ActorResponse.PLUGINS_CONFIGURED]);break}case ActorCommand.LOAD_BUNDLE:{let[,n]=e82.data;this.log(`Loading bundle for app ${getAppTitle(n)}`);try{let t=performance.now();this.runtime.loadBundle(n);let o=performance.now();this.postMessage([ActorResponse.BUNDLE_LOADED,this.runtime.getCallState().logs,{start:t,end:o}])}catch(t){this.postMessage([ActorResponse.BUNDLE_LOAD_FAILED,void 0,t,this.runtime.getCallState().logs])}break}case ActorCommand.CALL:{let[,n,t,o,d,r]=e82.data;this.log(`${n} \u2192 [Call] ${t}`);let a=r?await this.runtime.callBinary(t,o,d):await this.runtime.call(t,o,d);a.success?this.postMessage([ActorResponse.RETURN,n,a.value,this.runtime.getCallState().logs]):isCircuitBreaker(a.error)?this.postMessage([ActorResponse.CIRCUIT_BREAKER,n,a.value,a.error.cause]):this.postMessage([ActorResponse.ERROR,n,a.error,this.runtime.getCallState().logs]);break}case ActorCommand.PLUGIN_RESPONSE:{let[,n,t]=e82.data;this.runtime.onPluginResponse(n,t);break}case ActorCommand.QUIT:this.log("<Shutdown>"),this.runtime.quit();break}}function onunhandledrejection(e82){var o;let n;e82.reason instanceof Error?n=CloneableError(e82.reason):e82.reason!=null&&(n=String(e82.reason));let t=[...((o=this.runtime)==null?void 0:o.getCallState().logs)??[]];t.push({method:"error",args:[inspect(e82.reason)]}),this.postMessage([ActorResponse.UNHANDLED_REJECTION,void 0,n,t])}function CloneableError(e82){return{cause:e82.cause==null?void 0:String(e82.cause),columnNumber:e82.columnNumber,fileName:e82.fileName,lineNumber:e82.lineNumber,message:e82.message,name:e82.name,...e82.stack&&{stack:e82.stack}}}function createBaseSerializableServiceDefinition(){return{fullName:"",methods:[],name:"",version:""}}var SerializableServiceDefinition={$type:"devvit.runtime.SerializableServiceDefinition",encode(e82,n=_m0.Writer.create()){e82.fullName!==""&&n.uint32(10).string(e82.fullName);for(let t of e82.methods)SerializableMethodDefinition.encode(t,n.uint32(18).fork()).ldelim();return e82.name!==""&&n.uint32(26).string(e82.name),e82.version!==""&&n.uint32(34).string(e82.version),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSerializableServiceDefinition();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.fullName=t.string();continue;case 2:if(r!==18)break;d.methods.push(SerializableMethodDefinition.decode(t,t.uint32()));continue;case 3:if(r!==26)break;d.name=t.string();continue;case 4:if(r!==34)break;d.version=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fullName:isSet$1(e82.fullName)?globalThis.String(e82.fullName):"",methods:globalThis.Array.isArray(e82?.methods)?e82.methods.map(n=>SerializableMethodDefinition.fromJSON(n)):[],name:isSet$1(e82.name)?globalThis.String(e82.name):"",version:isSet$1(e82.version)?globalThis.String(e82.version):""}},toJSON(e82){var t;let n={};return e82.fullName!==""&&(n.fullName=e82.fullName),(t=e82.methods)!=null&&t.length&&(n.methods=e82.methods.map(o=>SerializableMethodDefinition.toJSON(o))),e82.name!==""&&(n.name=e82.name),e82.version!==""&&(n.version=e82.version),n},create(e82){return SerializableServiceDefinition.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBaseSerializableServiceDefinition();return n.fullName=e82.fullName??"",n.methods=((t=e82.methods)==null?void 0:t.map(o=>SerializableMethodDefinition.fromPartial(o)))||[],n.name=e82.name??"",n.version=e82.version??"",n}};messageTypeRegistry.set(SerializableServiceDefinition.$type,SerializableServiceDefinition);function createBaseSerializableMethodDefinition(){return{fullName:"",name:"",requestStream:!1,responseStream:!1,requestType:"",responseType:""}}var SerializableMethodDefinition={$type:"devvit.runtime.SerializableMethodDefinition",encode(e82,n=_m0.Writer.create()){return e82.fullName!==""&&n.uint32(10).string(e82.fullName),e82.name!==""&&n.uint32(18).string(e82.name),e82.requestStream!==!1&&n.uint32(24).bool(e82.requestStream),e82.responseStream!==!1&&n.uint32(32).bool(e82.responseStream),e82.requestType!==""&&n.uint32(42).string(e82.requestType),e82.responseType!==""&&n.uint32(50).string(e82.responseType),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseSerializableMethodDefinition();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.fullName=t.string();continue;case 2:if(r!==18)break;d.name=t.string();continue;case 3:if(r!==24)break;d.requestStream=t.bool();continue;case 4:if(r!==32)break;d.responseStream=t.bool();continue;case 5:if(r!==42)break;d.requestType=t.string();continue;case 6:if(r!==50)break;d.responseType=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{fullName:isSet$1(e82.fullName)?globalThis.String(e82.fullName):"",name:isSet$1(e82.name)?globalThis.String(e82.name):"",requestStream:isSet$1(e82.requestStream)?globalThis.Boolean(e82.requestStream):!1,responseStream:isSet$1(e82.responseStream)?globalThis.Boolean(e82.responseStream):!1,requestType:isSet$1(e82.requestType)?globalThis.String(e82.requestType):"",responseType:isSet$1(e82.responseType)?globalThis.String(e82.responseType):""}},toJSON(e82){let n={};return e82.fullName!==""&&(n.fullName=e82.fullName),e82.name!==""&&(n.name=e82.name),e82.requestStream!==!1&&(n.requestStream=e82.requestStream),e82.responseStream!==!1&&(n.responseStream=e82.responseStream),e82.requestType!==""&&(n.requestType=e82.requestType),e82.responseType!==""&&(n.responseType=e82.responseType),n},create(e82){return SerializableMethodDefinition.fromPartial(e82??{})},fromPartial(e82){let n=createBaseSerializableMethodDefinition();return n.fullName=e82.fullName??"",n.name=e82.name??"",n.requestStream=e82.requestStream??!1,n.responseStream=e82.responseStream??!1,n.requestType=e82.requestType??"",n.responseType=e82.responseType??"",n}};messageTypeRegistry.set(SerializableMethodDefinition.$type,SerializableMethodDefinition);function isSet$1(e82){return e82!=null}var LinkedBundleTargetPlatform;(function(e82){e82[e82.BROWSER=0]="BROWSER",e82[e82.V8=1]="V8",e82[e82.SKINNY=2]="SKINNY",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(LinkedBundleTargetPlatform||(LinkedBundleTargetPlatform={}));var TargetRuntime;(function(e82){e82[e82.UNIVERSAL=0]="UNIVERSAL",e82[e82.CLIENT=1]="CLIENT",e82[e82.UNRECOGNIZED=-1]="UNRECOGNIZED"})(TargetRuntime||(TargetRuntime={}));function targetRuntimeFromJSON(e82){switch(e82){case 0:case"UNIVERSAL":return TargetRuntime.UNIVERSAL;case 1:case"CLIENT":return TargetRuntime.CLIENT;case-1:case"UNRECOGNIZED":default:return TargetRuntime.UNRECOGNIZED}}function targetRuntimeToJSON(e82){switch(e82){case TargetRuntime.UNIVERSAL:return 0;case TargetRuntime.CLIENT:return 1;case TargetRuntime.UNRECOGNIZED:default:return-1}}function createBaseActorSpec(){return{name:"",owner:"",version:""}}var ActorSpec={$type:"devvit.runtime.ActorSpec",encode(e82,n=_m0.Writer.create()){return e82.name!==""&&n.uint32(10).string(e82.name),e82.owner!==""&&n.uint32(18).string(e82.owner),e82.version!==""&&n.uint32(26).string(e82.version),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseActorSpec();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.name=t.string();continue;case 2:if(r!==18)break;d.owner=t.string();continue;case 3:if(r!==26)break;d.version=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{name:isSet(e82.name)?globalThis.String(e82.name):"",owner:isSet(e82.owner)?globalThis.String(e82.owner):"",version:isSet(e82.version)?globalThis.String(e82.version):""}},toJSON(e82){let n={};return e82.name!==""&&(n.name=e82.name),e82.owner!==""&&(n.owner=e82.owner),e82.version!==""&&(n.version=e82.version),n},create(e82){return ActorSpec.fromPartial(e82??{})},fromPartial(e82){let n=createBaseActorSpec();return n.name=e82.name??"",n.owner=e82.owner??"",n.version=e82.version??"",n}};messageTypeRegistry.set(ActorSpec.$type,ActorSpec);function createBaseLocationFilter(){return{allow:[],deny:[]}}var LocationFilter={$type:"devvit.runtime.LocationFilter",encode(e82,n=_m0.Writer.create()){for(let t of e82.allow)n.uint32(10).string(t);for(let t of e82.deny)n.uint32(18).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLocationFilter();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.allow.push(t.string());continue;case 2:if(r!==18)break;d.deny.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{allow:globalThis.Array.isArray(e82?.allow)?e82.allow.map(n=>globalThis.String(n)):[],deny:globalThis.Array.isArray(e82?.deny)?e82.deny.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t,o;let n={};return(t=e82.allow)!=null&&t.length&&(n.allow=e82.allow),(o=e82.deny)!=null&&o.length&&(n.deny=e82.deny),n},create(e82){return LocationFilter.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseLocationFilter();return n.allow=((t=e82.allow)==null?void 0:t.map(d=>d))||[],n.deny=((o=e82.deny)==null?void 0:o.map(d=>d))||[],n}};messageTypeRegistry.set(LocationFilter.$type,LocationFilter);function createBasePackageSpec(){return{actor:void 0,definition:void 0,locations:void 0,partitionsBy:[]}}var PackageSpec={$type:"devvit.runtime.PackageSpec",encode(e82,n=_m0.Writer.create()){e82.actor!==void 0&&ActorSpec.encode(e82.actor,n.uint32(10).fork()).ldelim(),e82.definition!==void 0&&SerializableServiceDefinition.encode(e82.definition,n.uint32(18).fork()).ldelim(),e82.locations!==void 0&&LocationFilter.encode(e82.locations,n.uint32(26).fork()).ldelim();for(let t of e82.partitionsBy)n.uint32(34).string(t);return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePackageSpec();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actor=ActorSpec.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.definition=SerializableServiceDefinition.decode(t,t.uint32());continue;case 3:if(r!==26)break;d.locations=LocationFilter.decode(t,t.uint32());continue;case 4:if(r!==34)break;d.partitionsBy.push(t.string());continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actor:isSet(e82.actor)?ActorSpec.fromJSON(e82.actor):void 0,definition:isSet(e82.definition)?SerializableServiceDefinition.fromJSON(e82.definition):void 0,locations:isSet(e82.locations)?LocationFilter.fromJSON(e82.locations):void 0,partitionsBy:globalThis.Array.isArray(e82?.partitionsBy)?e82.partitionsBy.map(n=>globalThis.String(n)):[]}},toJSON(e82){var t;let n={};return e82.actor!==void 0&&(n.actor=ActorSpec.toJSON(e82.actor)),e82.definition!==void 0&&(n.definition=SerializableServiceDefinition.toJSON(e82.definition)),e82.locations!==void 0&&(n.locations=LocationFilter.toJSON(e82.locations)),(t=e82.partitionsBy)!=null&&t.length&&(n.partitionsBy=e82.partitionsBy),n},create(e82){return PackageSpec.fromPartial(e82??{})},fromPartial(e82){var t;let n=createBasePackageSpec();return n.actor=e82.actor!==void 0&&e82.actor!==null?ActorSpec.fromPartial(e82.actor):void 0,n.definition=e82.definition!==void 0&&e82.definition!==null?SerializableServiceDefinition.fromPartial(e82.definition):void 0,n.locations=e82.locations!==void 0&&e82.locations!==null?LocationFilter.fromPartial(e82.locations):void 0,n.partitionsBy=((t=e82.partitionsBy)==null?void 0:t.map(o=>o))||[],n}};messageTypeRegistry.set(PackageSpec.$type,PackageSpec);function createBasePackageQuery(){return{name:void 0,owner:void 0,typeName:"",versions:void 0}}var PackageQuery={$type:"devvit.runtime.PackageQuery",encode(e82,n=_m0.Writer.create()){return e82.name!==void 0&&StringValue.encode({value:e82.name},n.uint32(10).fork()).ldelim(),e82.owner!==void 0&&StringValue.encode({value:e82.owner},n.uint32(18).fork()).ldelim(),e82.typeName!==""&&n.uint32(26).string(e82.typeName),e82.versions!==void 0&&StringValue.encode({value:e82.versions},n.uint32(34).fork()).ldelim(),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBasePackageQuery();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.name=StringValue.decode(t,t.uint32()).value;continue;case 2:if(r!==18)break;d.owner=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.typeName=t.string();continue;case 4:if(r!==34)break;d.versions=StringValue.decode(t,t.uint32()).value;continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{name:isSet(e82.name)?String(e82.name):void 0,owner:isSet(e82.owner)?String(e82.owner):void 0,typeName:isSet(e82.typeName)?globalThis.String(e82.typeName):"",versions:isSet(e82.versions)?String(e82.versions):void 0}},toJSON(e82){let n={};return e82.name!==void 0&&(n.name=e82.name),e82.owner!==void 0&&(n.owner=e82.owner),e82.typeName!==""&&(n.typeName=e82.typeName),e82.versions!==void 0&&(n.versions=e82.versions),n},create(e82){return PackageQuery.fromPartial(e82??{})},fromPartial(e82){let n=createBasePackageQuery();return n.name=e82.name??void 0,n.owner=e82.owner??void 0,n.typeName=e82.typeName??"",n.versions=e82.versions??void 0,n}};messageTypeRegistry.set(PackageQuery.$type,PackageQuery);function createBaseDependencySpec(){return{actor:void 0,hostname:"",provides:[],uses:[]}}var DependencySpec={$type:"devvit.runtime.DependencySpec",encode(e82,n=_m0.Writer.create()){e82.actor!==void 0&&ActorSpec.encode(e82.actor,n.uint32(10).fork()).ldelim(),e82.hostname!==""&&n.uint32(18).string(e82.hostname);for(let t of e82.provides)PackageSpec.encode(t,n.uint32(26).fork()).ldelim();for(let t of e82.uses)PackageQuery.encode(t,n.uint32(34).fork()).ldelim();return n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseDependencySpec();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actor=ActorSpec.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.hostname=t.string();continue;case 3:if(r!==26)break;d.provides.push(PackageSpec.decode(t,t.uint32()));continue;case 4:if(r!==34)break;d.uses.push(PackageQuery.decode(t,t.uint32()));continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actor:isSet(e82.actor)?ActorSpec.fromJSON(e82.actor):void 0,hostname:isSet(e82.hostname)?globalThis.String(e82.hostname):"",provides:globalThis.Array.isArray(e82?.provides)?e82.provides.map(n=>PackageSpec.fromJSON(n)):[],uses:globalThis.Array.isArray(e82?.uses)?e82.uses.map(n=>PackageQuery.fromJSON(n)):[]}},toJSON(e82){var t,o;let n={};return e82.actor!==void 0&&(n.actor=ActorSpec.toJSON(e82.actor)),e82.hostname!==""&&(n.hostname=e82.hostname),(t=e82.provides)!=null&&t.length&&(n.provides=e82.provides.map(d=>PackageSpec.toJSON(d))),(o=e82.uses)!=null&&o.length&&(n.uses=e82.uses.map(d=>PackageQuery.toJSON(d))),n},create(e82){return DependencySpec.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseDependencySpec();return n.actor=e82.actor!==void 0&&e82.actor!==null?ActorSpec.fromPartial(e82.actor):void 0,n.hostname=e82.hostname??"",n.provides=((t=e82.provides)==null?void 0:t.map(d=>PackageSpec.fromPartial(d)))||[],n.uses=((o=e82.uses)==null?void 0:o.map(d=>PackageQuery.fromPartial(d)))||[],n}};messageTypeRegistry.set(DependencySpec.$type,DependencySpec);function createBaseLinkedBundle(){return{actor:void 0,code:"",sourceMap:void 0,hostname:"",provides:[],uses:[],buildInfo:void 0,assetsUrl:void 0,assets:{},webviewAssets:{},products:{}}}var LinkedBundle={$type:"devvit.runtime.LinkedBundle",encode(e82,n=_m0.Writer.create()){e82.actor!==void 0&&ActorSpec.encode(e82.actor,n.uint32(10).fork()).ldelim(),e82.code!==""&&n.uint32(18).string(e82.code),e82.sourceMap!==void 0&&StringValue.encode({value:e82.sourceMap},n.uint32(82).fork()).ldelim(),e82.hostname!==""&&n.uint32(26).string(e82.hostname);for(let t of e82.provides)SerializableServiceDefinition.encode(t,n.uint32(34).fork()).ldelim();for(let t of e82.uses)LinkedBundle.encode(t,n.uint32(42).fork()).ldelim();return e82.buildInfo!==void 0&&BuildInfo.encode(e82.buildInfo,n.uint32(50).fork()).ldelim(),e82.assetsUrl!==void 0&&StringValue.encode({value:e82.assetsUrl},n.uint32(58).fork()).ldelim(),Object.entries(e82.assets).forEach(([t,o])=>{LinkedBundle_AssetsEntry.encode({key:t,value:o},n.uint32(66).fork()).ldelim()}),Object.entries(e82.webviewAssets).forEach(([t,o])=>{LinkedBundle_WebviewAssetsEntry.encode({key:t,value:o},n.uint32(74).fork()).ldelim()}),Object.entries(e82.products).forEach(([t,o])=>{LinkedBundle_ProductsEntry.encode({key:t,value:o},n.uint32(90).fork()).ldelim()}),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkedBundle();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.actor=ActorSpec.decode(t,t.uint32());continue;case 2:if(r!==18)break;d.code=t.string();continue;case 10:if(r!==82)break;d.sourceMap=StringValue.decode(t,t.uint32()).value;continue;case 3:if(r!==26)break;d.hostname=t.string();continue;case 4:if(r!==34)break;d.provides.push(SerializableServiceDefinition.decode(t,t.uint32()));continue;case 5:if(r!==42)break;d.uses.push(LinkedBundle.decode(t,t.uint32()));continue;case 6:if(r!==50)break;d.buildInfo=BuildInfo.decode(t,t.uint32());continue;case 7:if(r!==58)break;d.assetsUrl=StringValue.decode(t,t.uint32()).value;continue;case 8:if(r!==66)break;let a=LinkedBundle_AssetsEntry.decode(t,t.uint32());a.value!==void 0&&(d.assets[a.key]=a.value);continue;case 9:if(r!==74)break;let u=LinkedBundle_WebviewAssetsEntry.decode(t,t.uint32());u.value!==void 0&&(d.webviewAssets[u.key]=u.value);continue;case 11:if(r!==90)break;let l=LinkedBundle_ProductsEntry.decode(t,t.uint32());l.value!==void 0&&(d.products[l.key]=l.value);continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{actor:isSet(e82.actor)?ActorSpec.fromJSON(e82.actor):void 0,code:isSet(e82.code)?globalThis.String(e82.code):"",sourceMap:isSet(e82.sourceMap)?String(e82.sourceMap):void 0,hostname:isSet(e82.hostname)?globalThis.String(e82.hostname):"",provides:globalThis.Array.isArray(e82?.provides)?e82.provides.map(n=>SerializableServiceDefinition.fromJSON(n)):[],uses:globalThis.Array.isArray(e82?.uses)?e82.uses.map(n=>LinkedBundle.fromJSON(n)):[],buildInfo:isSet(e82.buildInfo)?BuildInfo.fromJSON(e82.buildInfo):void 0,assetsUrl:isSet(e82.assetsUrl)?String(e82.assetsUrl):void 0,assets:isObject(e82.assets)?Object.entries(e82.assets).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{},webviewAssets:isObject(e82.webviewAssets)?Object.entries(e82.webviewAssets).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{},products:isObject(e82.products)?Object.entries(e82.products).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{}}},toJSON(e82){var t,o;let n={};if(e82.actor!==void 0&&(n.actor=ActorSpec.toJSON(e82.actor)),e82.code!==""&&(n.code=e82.code),e82.sourceMap!==void 0&&(n.sourceMap=e82.sourceMap),e82.hostname!==""&&(n.hostname=e82.hostname),(t=e82.provides)!=null&&t.length&&(n.provides=e82.provides.map(d=>SerializableServiceDefinition.toJSON(d))),(o=e82.uses)!=null&&o.length&&(n.uses=e82.uses.map(d=>LinkedBundle.toJSON(d))),e82.buildInfo!==void 0&&(n.buildInfo=BuildInfo.toJSON(e82.buildInfo)),e82.assetsUrl!==void 0&&(n.assetsUrl=e82.assetsUrl),e82.assets){let d=Object.entries(e82.assets);d.length>0&&(n.assets={},d.forEach(([r,a])=>{n.assets[r]=a}))}if(e82.webviewAssets){let d=Object.entries(e82.webviewAssets);d.length>0&&(n.webviewAssets={},d.forEach(([r,a])=>{n.webviewAssets[r]=a}))}if(e82.products){let d=Object.entries(e82.products);d.length>0&&(n.products={},d.forEach(([r,a])=>{n.products[r]=a}))}return n},create(e82){return LinkedBundle.fromPartial(e82??{})},fromPartial(e82){var t,o;let n=createBaseLinkedBundle();return n.actor=e82.actor!==void 0&&e82.actor!==null?ActorSpec.fromPartial(e82.actor):void 0,n.code=e82.code??"",n.sourceMap=e82.sourceMap??void 0,n.hostname=e82.hostname??"",n.provides=((t=e82.provides)==null?void 0:t.map(d=>SerializableServiceDefinition.fromPartial(d)))||[],n.uses=((o=e82.uses)==null?void 0:o.map(d=>LinkedBundle.fromPartial(d)))||[],n.buildInfo=e82.buildInfo!==void 0&&e82.buildInfo!==null?BuildInfo.fromPartial(e82.buildInfo):void 0,n.assetsUrl=e82.assetsUrl??void 0,n.assets=Object.entries(e82.assets??{}).reduce((d,[r,a])=>(a!==void 0&&(d[r]=globalThis.String(a)),d),{}),n.webviewAssets=Object.entries(e82.webviewAssets??{}).reduce((d,[r,a])=>(a!==void 0&&(d[r]=globalThis.String(a)),d),{}),n.products=Object.entries(e82.products??{}).reduce((d,[r,a])=>(a!==void 0&&(d[r]=globalThis.String(a)),d),{}),n}};messageTypeRegistry.set(LinkedBundle.$type,LinkedBundle);function createBaseLinkedBundle_AssetsEntry(){return{key:"",value:""}}var LinkedBundle_AssetsEntry={$type:"devvit.runtime.LinkedBundle.AssetsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkedBundle_AssetsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet(e82.key)?globalThis.String(e82.key):"",value:isSet(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return LinkedBundle_AssetsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLinkedBundle_AssetsEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(LinkedBundle_AssetsEntry.$type,LinkedBundle_AssetsEntry);function createBaseLinkedBundle_WebviewAssetsEntry(){return{key:"",value:""}}var LinkedBundle_WebviewAssetsEntry={$type:"devvit.runtime.LinkedBundle.WebviewAssetsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkedBundle_WebviewAssetsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet(e82.key)?globalThis.String(e82.key):"",value:isSet(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return LinkedBundle_WebviewAssetsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLinkedBundle_WebviewAssetsEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(LinkedBundle_WebviewAssetsEntry.$type,LinkedBundle_WebviewAssetsEntry);function createBaseLinkedBundle_ProductsEntry(){return{key:"",value:""}}var LinkedBundle_ProductsEntry={$type:"devvit.runtime.LinkedBundle.ProductsEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseLinkedBundle_ProductsEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet(e82.key)?globalThis.String(e82.key):"",value:isSet(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return LinkedBundle_ProductsEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseLinkedBundle_ProductsEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(LinkedBundle_ProductsEntry.$type,LinkedBundle_ProductsEntry);function createBaseBuildInfo(){return{created:void 0,dependencies:{},targetRuntime:0}}var BuildInfo={$type:"devvit.runtime.BuildInfo",encode(e82,n=_m0.Writer.create()){return e82.created!==void 0&&Timestamp.encode(toTimestamp(e82.created),n.uint32(10).fork()).ldelim(),Object.entries(e82.dependencies).forEach(([t,o])=>{BuildInfo_DependenciesEntry.encode({key:t,value:o},n.uint32(18).fork()).ldelim()}),e82.targetRuntime!==0&&n.uint32(24).int32(e82.targetRuntime),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBuildInfo();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.created=fromTimestamp(Timestamp.decode(t,t.uint32()));continue;case 2:if(r!==18)break;let a=BuildInfo_DependenciesEntry.decode(t,t.uint32());a.value!==void 0&&(d.dependencies[a.key]=a.value);continue;case 3:if(r!==24)break;d.targetRuntime=t.int32();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{created:isSet(e82.created)?fromJsonTimestamp(e82.created):void 0,dependencies:isObject(e82.dependencies)?Object.entries(e82.dependencies).reduce((n,[t,o])=>(n[t]=String(o),n),{}):{},targetRuntime:isSet(e82.targetRuntime)?targetRuntimeFromJSON(e82.targetRuntime):0}},toJSON(e82){let n={};if(e82.created!==void 0&&(n.created=e82.created.toISOString()),e82.dependencies){let t=Object.entries(e82.dependencies);t.length>0&&(n.dependencies={},t.forEach(([o,d])=>{n.dependencies[o]=d}))}return e82.targetRuntime!==0&&(n.targetRuntime=targetRuntimeToJSON(e82.targetRuntime)),n},create(e82){return BuildInfo.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBuildInfo();return n.created=e82.created??void 0,n.dependencies=Object.entries(e82.dependencies??{}).reduce((t,[o,d])=>(d!==void 0&&(t[o]=globalThis.String(d)),t),{}),n.targetRuntime=e82.targetRuntime??0,n}};messageTypeRegistry.set(BuildInfo.$type,BuildInfo);function createBaseBuildInfo_DependenciesEntry(){return{key:"",value:""}}var BuildInfo_DependenciesEntry={$type:"devvit.runtime.BuildInfo.DependenciesEntry",encode(e82,n=_m0.Writer.create()){return e82.key!==""&&n.uint32(10).string(e82.key),e82.value!==""&&n.uint32(18).string(e82.value),n},decode(e82,n){let t=e82 instanceof _m0.Reader?e82:_m0.Reader.create(e82),o=n===void 0?t.len:t.pos+n,d=createBaseBuildInfo_DependenciesEntry();for(;t.pos<o;){let r=t.uint32();switch(r>>>3){case 1:if(r!==10)break;d.key=t.string();continue;case 2:if(r!==18)break;d.value=t.string();continue}if((r&7)===4||r===0)break;t.skipType(r&7)}return d},fromJSON(e82){return{key:isSet(e82.key)?globalThis.String(e82.key):"",value:isSet(e82.value)?globalThis.String(e82.value):""}},toJSON(e82){let n={};return e82.key!==""&&(n.key=e82.key),e82.value!==""&&(n.value=e82.value),n},create(e82){return BuildInfo_DependenciesEntry.fromPartial(e82??{})},fromPartial(e82){let n=createBaseBuildInfo_DependenciesEntry();return n.key=e82.key??"",n.value=e82.value??"",n}};messageTypeRegistry.set(BuildInfo_DependenciesEntry.$type,BuildInfo_DependenciesEntry);function toTimestamp(e82){let n=Math.trunc(e82.getTime()/1e3),t=e82.getTime()%1e3*1e6;return{seconds:n,nanos:t}}function fromTimestamp(e82){let n=(e82.seconds||0)*1e3;return n+=(e82.nanos||0)/1e6,new globalThis.Date(n)}function fromJsonTimestamp(e82){return e82 instanceof globalThis.Date?e82:typeof e82=="string"?new globalThis.Date(e82):fromTimestamp(Timestamp.fromJSON(e82))}function isObject(e82){return typeof e82=="object"&&e82!==null}function isSet(e82){return e82!=null}var toByteArray_1=toByteArray,fromByteArray_1=fromByteArray,lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;var i,len;revLookup[45]=62;revLookup[95]=63;function getLens(e82){var n=e82.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e82.indexOf("=");t===-1&&(t=n);var o=t===n?0:4-t%4;return[t,o]}function _byteLength(e82,n,t){return(n+t)*3/4-t}function toByteArray(e82){var n,t=getLens(e82),o=t[0],d=t[1],r=new Arr(_byteLength(e82,o,d)),a=0,u=d>0?o-4:o,l;for(l=0;l<u;l+=4)n=revLookup[e82.charCodeAt(l)]<<18|revLookup[e82.charCodeAt(l+1)]<<12|revLookup[e82.charCodeAt(l+2)]<<6|revLookup[e82.charCodeAt(l+3)],r[a++]=n>>16&255,r[a++]=n>>8&255,r[a++]=n&255;return d===2&&(n=revLookup[e82.charCodeAt(l)]<<2|revLookup[e82.charCodeAt(l+1)]>>4,r[a++]=n&255),d===1&&(n=revLookup[e82.charCodeAt(l)]<<10|revLookup[e82.charCodeAt(l+1)]<<4|revLookup[e82.charCodeAt(l+2)]>>2,r[a++]=n>>8&255,r[a++]=n&255),r}function tripletToBase64(e82){return lookup[e82>>18&63]+lookup[e82>>12&63]+lookup[e82>>6&63]+lookup[e82&63]}function encodeChunk(e82,n,t){for(var o,d=[],r=n;r<t;r+=3)o=(e82[r]<<16&16711680)+(e82[r+1]<<8&65280)+(e82[r+2]&255),d.push(tripletToBase64(o));return d.join("")}function fromByteArray(e82){for(var n,t=e82.length,o=t%3,d=[],r=16383,a=0,u=t-o;a<u;a+=r)d.push(encodeChunk(e82,a,a+r>u?u:a+r));return o===1?(n=e82[t-1],d.push(lookup[n>>2]+lookup[n<<4&63]+"==")):o===2&&(n=(e82[t-2]<<8)+e82[t-1],d.push(lookup[n>>10]+lookup[n>>4&63]+lookup[n<<2&63]+"=")),d.join("")}var ready=!1,callId=0,onLoadHandler,isReadyCallback,onPluginsReadyHandler,returnHandlers={},initMetric;function fakePostMessage(e82,n){var t;(t=e82.onmessage)==null||t.call(e82,{data:n})}function isReady(){return new Promise(e82=>{ready?e82():isReadyCallback=e82})}function postMessage(e82){var n,t,o;switch(e82[0]){case ActorResponse.READY:{this.log("Worker is ready");let[,d]=e82;initMetric=d,ready=!0,isReadyCallback?.();break}case ActorResponse.PLUGINS_CONFIGURED:this.log("Plugins configured"),onPluginsReadyHandler?.resolve(),onPluginsReadyHandler=void 0;break;case ActorResponse.BUNDLE_LOADED:{this.log("Worker loaded app bundle successfully"),onLoadHandler?.resolve({metrics:{init:initMetric}}),onLoadHandler=void 0;break}case ActorResponse.BUNDLE_LOAD_FAILED:{this.log("Worker failed to load app bundle");let[,,d,r]=e82;onLoadHandler?.reject(d),onLoadHandler=void 0;break}case ActorResponse.RETURN:{let[,d,r,a]=e82;this.log(`${d} \u2190 [Return]`),(n=returnHandlers[d])==null||n.resolve(fromByteArray_1(r)),delete returnHandlers[d];break}case ActorResponse.ERROR:{let[,d,r,a]=e82;console.error(`${d} \u2190 [Error]`,r),(t=returnHandlers[d])==null||t.reject(r),delete returnHandlers[d];break}case ActorResponse.PLUGIN_CALL:break;case ActorResponse.CIRCUIT_BREAKER:{let[,d,r,a]=e82;this.log(`${d} \u2190 [Circuit Breaker] Re-run on server`),(o=returnHandlers[d])==null||o.reject(new CircuitBreakerResponse(r&&fromByteArray_1(r),a)),delete returnHandlers[d];break}}}async function loadBundle(e82){await isReady();let n=typeof e82=="string"?toByteArray_1(e82):e82;return new Promise((t,o)=>{let d=LinkedBundle.decode(n);onLoadHandler={resolve:t,reject:o},fakePostMessage(this,[ActorCommand.LOAD_BUNDLE,d])})}async function call(e82,n,t,o){return new Promise((d,r)=>{let a;typeof n=="string"?a=toByteArray_1(n):a=n;let u=JSON.parse(t),l=++callId;returnHandlers[l]={resolve:s=>{o?.(s),d(s)},reject:r},fakePostMessage(this,[ActorCommand.CALL,l,e82,a,u,!0])})}function quit(){fakePostMessage(this,[ActorCommand.QUIT])}function assignMobileHooks(e82){Object.assign(e82,{postMessage,loadBundle,call,quit})}async function main(){let e82=globalThis.self??globalThis,n=new UnsandboxedRuntimeLite;assignRuntime(e82,n),assignMobileHooks(e82),await n.init(),startRuntime(e82)}main().catch(console.error);
|