PageSourceSearch

https://home.ibotta.com/_next/static/chunks/9522-06a2e6262b467564.js

js ibotta.com collected 2026-09-24 08:33:31 UTC 418,795 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9522],{39522:function(e,t,n){"use strict";let r;n.d(t,{pf:function(){return rd},j:function(){return fj}});var i,a,s,o,l,u,c,d,f,m,p,h,g,T,y,I,N,E,k,b,_,w,v,O,S,A,F,D,B,R,P,U,x,L,C,J,j,M,$,V,G,q,Y,W,X,K,H,Z,z,Q,ee,et,en,er,ei,ea,es,eo,el,eu,ec,ed,ef,em,ep,eh,eg,eT,ey,eI,eN,eE,ek,eb,e_,ew,ev,eO,eS,eA,eF,eD,eB,eR,eP,eU,ex,eL,eC,eJ,ej,eM,e$,eV,eG,eq,eY,eW,eX,eK,eH,eZ,ez,eQ,e0,e1,e2,e3,e4,e6,e9,e8,e7,e5,te,tt,tn,tr,ti,ta,ts,to,tl,tu,tc,td,tf,tm,tp,th,tg,tT,ty,tI,tN,tE,tk,tb,t_,tw,tv,tO,tS,tA,tF,tD,tB,tR,tP,tU,tx,tL,tC,tJ,tj,tM,t$,tV,tG,tq,tY=n(98007),tW=n.n(tY);(i=eP||(eP={})).assertEqual=e=>{},i.assertIs=function(e){},i.assertNever=function(e){throw Error()},i.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},i.getValidEnumValues=e=>{let t=i.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),n={};for(let r of t)n[r]=e[r];return i.objectValues(n)},i.objectValues=e=>i.objectKeys(e).map(function(t){return e[t]}),i.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},i.find=(e,t)=>{for(let n of e)if(t(n))return n},i.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,i.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},i.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(eU||(eU={})).mergeShapes=(e,t)=>({...e,...t});let tX=eP.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),tK=e=>{switch(typeof e){case"undefined":return tX.undefined;case"string":return tX.string;case"number":return Number.isNaN(e)?tX.nan:tX.number;case"boolean":return tX.boolean;case"function":return tX.function;case"bigint":return tX.bigint;case"symbol":return tX.symbol;case"object":if(Array.isArray(e))return tX.array;if(null===e)return tX.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return tX.promise;if("undefined"!=typeof Map&&e instanceof Map)return tX.map;if("undefined"!=typeof Set&&e instanceof Set)return tX.set;if("undefined"!=typeof Date&&e instanceof Date)return tX.date;return tX.object;default:return tX.unknown}}
1,tH=eP.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class tZ extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof tZ))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,eP.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}tZ.create=e=>new tZ(e);var tz=(e,t)=>{let n;switch(e.code){case tH.invalid_type:n=e.received===tX.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case tH.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,eP.jsonStringifyReplacer)}`;break;case tH.unrecognized_keys:n=`Unrecognized key(s) in object: ${eP.joinValues(e.keys,", ")}`;break;case tH.invalid_union:n="Invalid input";break;case tH.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${eP.joinValues(e.options)}`;break;case tH.invalid_enum_value:n=`Invalid enum value. Expected ${eP.joinValues(e.options)}, received '${e.received}'`;break;case tH.invalid_arguments:n="Invalid function arguments";break;case tH.invalid_return_type:n="Invalid function return type";break;case tH.invalid_date:n="Invalid date";break;case tH.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:eP.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case tH.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case tH.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case tH.custom:n="Invalid input";break;case tH.invalid_intersection_types:n="Intersection results could not be merged";break;case tH.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case tH.not_finite:n="Number must be finite";break;default:n=t.defaultError,eP.assertNever(e)}return{message:n}};(a=ex||(ex={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},a.toString=e=>"string"==typeof e?e:e?.message;let tQ=e=>
1{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],s={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";for(let e of r.filter(e=>!!e).slice().reverse())o=e(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function t0(e,t){let n=tQ({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,tz,tz==tz?void 0:tz].filter(e=>!!e)});e.common.issues.push(n)}class t1{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return t2;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t){let t=await e.key,r=await e.value;n.push({key:t,value:r})}return t1.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return t2;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let t2=Object.freeze({status:"aborted"}),t3=e=>({status:"dirty",value:e}),t4=e=>({status:"valid",value:e}),t6=e=>"aborted"===e.status,t9=e=>"dirty"===e.status,t8=e=>"valid"===e.status,t7=e=>"undefined"!=typeof Promise&&e instanceof Promise;class t5{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let ne=(e,t)=>{if(t8(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new tZ(e.common.issues);return this._error=t,this._error}}};function nt(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return"invalid_enum_value"===t.code?{message:a??i.defaultError}:void 0===i.data?{message:a??r??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:a??n??i.defaultError}},description:i}}class nn{get description(){return this._def.description}_getType(e){return tK(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:tK(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new t1,ctx:{common:e.parent.common,data:e.data,parsedType:tK(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(t7(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:tK(e)},r=this._parseSync({data:e,path:n.path,parent:n});return ne(n,r)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:tK(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:t});return t8(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>t8(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:tK(e)}
1,r=this._parse({data:e,path:n.path,parent:n});return ne(n,await (t7(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:tH.custom,...n(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new nK({schema:this,typeName:eL.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return nH.create(this,this._def)}nullable(){return nZ.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nB.create(this)}promise(){return nX.create(this,this._def)}or(e){return nP.create([this,e],this._def)}and(e){return nL.create(this,e,this._def)}transform(e){return new nK({...nt(this._def),schema:this,typeName:eL.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new nz({...nt(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:eL.ZodDefault})}brand(){return new n1({typeName:eL.ZodBranded,type:this,...nt(this._def)})}catch(e){return new nQ({...nt(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:eL.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return n2.create(this,e)}readonly(){return n3.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let nr=/^c[^\s-]{8,}$/i,ni=/^[0-9a-z]+$/,na=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ns=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,no=/^[a-z0-9_-]{21}$/i,nl=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nu=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,nc=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,nd=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nf=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,nm=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,np=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nh=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ng=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nT="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ny=RegExp(`^${nT}$`);function nI(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}class nN extends nn{_parse(e){var t,n,i,a;let s;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==tX.string){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.string,received:t.parsedType}),t2}let o=new t1;for(let l of this._def.checks)if("min"===l.kind)e.data.length<l.value&&(t0(s=this._getOrReturnCtx(e,s),{code:tH.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("max"===l.kind)e.data.length>l.value&&(t0(s=this._getOrReturnCtx(e,s),{code:tH.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("length"===l.kind){let t=e.data.length>l.value,n=e.data.length<l.value;(t||n)&&(s=this._getOrReturnCtx(e,s),t?t0(s,{code:tH.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):n&&t0(s,{code:tH.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if("email"===l.kind)nc.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"email",code:tH.invalid_string,message:l.message}),o.dirty());else if("emoji"===l.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"emoji",code:tH.invalid_string,message:l.message}),o.dirty());else if("uuid"===l.kind)ns.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"uuid",code:tH.invalid_string,message:l.message}),o.dirty());else if("nanoid"===l.kind)no.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"nanoid",code:tH.invalid_string,message:l.message}),o.dirty());else if("cuid"===l.kind)nr.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"cuid",code:tH.invalid_string,message:l.message}),o.dirty());else if("cuid2"===l.kind)ni.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"cuid2",code:tH.invalid_string,message:l.message}),o.dirty());else if("ulid"===l.kind)na.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"ulid",code:tH.invalid_string,message:l.message}),o.dirty());else if("url"===l.kind)try{new URL(e.data)}catch{t0(s=this._getOrReturnCtx(e,s),{validation:"url",code:tH.invalid_string,message:l.message}),o.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"regex",code:tH.invalid_string,message:l.message}),o.dirty())):"trim"===l.kind?e.data=e.data.trim():"includes"===l.kind?e.data.includes(l.value,l.position)||(t0(s=this._getOrReturnCtx(e,s),{code:tH.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):"toLowerCase"===l.kind?e.data=e.data.toLowerCase():"toUpperCase"===l.kind?e.data=e.data.toUpperCase():"startsWith"===l.kind?e.data.startsWith(l.value)||(t0(s=this._getOrReturnCtx(e,s),{code:tH.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):"endsWith"===l.kind?e.data.endsWith(l.value)||(t0(s=this._getOrReturnCtx(e,s),{code:tH.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):"datetime"===l.kind?(function(e){let t=`${nT}T${nI(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,RegExp(`^${t}$`)})(l).test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{code:tH.invalid_string,validation:"datetime",message:l.message}),o.dirty()):"date"===l.kind?ny.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{code:tH.invalid_string,validation:"date",message:l.message}),o.dirty()):"time"===l.kind?RegExp(`^${nI(l)}$`).test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{code:tH.invalid_string,validation:"time",message:l.message}),o.dirty()):"duration"===l.kind?nu.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"duration",code:tH.invalid_string,message:l.message}),o.dirty()):"ip"===l.kind?(t=e.data,("v4"===(n=l.version)||!n)&&nd.test(t)||("v6"===n||!n)&&nm.test(t)||(t0(s=this._getOrReturnCtx(e,s),{validation:"ip",code:tH.invalid_string,message:l.message}),o.dirty())):"jwt"===l.kind?!function(e,t){if(!nl.test(e))return!1;
1try{let[n]=e.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(e.data,l.alg)&&(t0(s=this._getOrReturnCtx(e,s),{validation:"jwt",code:tH.invalid_string,message:l.message}),o.dirty()):"cidr"===l.kind?(i=e.data,("v4"===(a=l.version)||!a)&&nf.test(i)||("v6"===a||!a)&&np.test(i)||(t0(s=this._getOrReturnCtx(e,s),{validation:"cidr",code:tH.invalid_string,message:l.message}),o.dirty())):"base64"===l.kind?nh.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"base64",code:tH.invalid_string,message:l.message}),o.dirty()):"base64url"===l.kind?ng.test(e.data)||(t0(s=this._getOrReturnCtx(e,s),{validation:"base64url",code:tH.invalid_string,message:l.message}),o.dirty()):eP.assertNever(l);return{status:o.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:tH.invalid_string,...ex.errToObj(n)})}_addCheck(e){return new nN({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ex.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ex.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ex.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ex.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ex.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ex.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ex.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ex.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ex.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ex.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ex.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ex.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ex.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...ex.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...ex.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ex.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...ex.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...ex.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...ex.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...ex.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...ex.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...ex.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...ex.errToObj(t)})}nonempty(e){return this.min(1,ex.errToObj(e))}trim(){return new nN({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new nN({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new nN({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}nN.create=e=>new nN({checks:[],typeName:eL.ZodString,coerce:e?.coerce??!1,...nt(e)});
1class nE extends nn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==tX.number){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.number,received:t.parsedType}),t2}let n=new t1;for(let r of this._def.checks)"int"===r.kind?eP.isInteger(e.data)||(t0(t=this._getOrReturnCtx(e,t),{code:tH.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t0(t=this._getOrReturnCtx(e,t),{code:tH.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t0(t=this._getOrReturnCtx(e,t),{code:tH.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,r.value)&&(t0(t=this._getOrReturnCtx(e,t),{code:tH.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t0(t=this._getOrReturnCtx(e,t),{code:tH.not_finite,message:r.message}),n.dirty()):eP.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,ex.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ex.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ex.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ex.toString(t))}setLimit(e,t,n,r){return new nE({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:ex.toString(r)}]})}_addCheck(e){return new nE({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ex.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ex.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ex.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ex.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ex.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ex.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:ex.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ex.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ex.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&eP.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}nE.create=e=>new nE({checks:[],typeName:eL.ZodNumber,coerce:e?.coerce||!1,...nt(e)});class nk extends nn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==tX.bigint)return this._getInvalidInput(e);let n=new t1;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t0(t=this._getOrReturnCtx(e,t),{code:tH.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t0(t=this._getOrReturnCtx(e,t),{code:tH.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t0(t=this._getOrReturnCtx(e,t),{code:tH.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):eP.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.bigint,received:t.parsedType}),t2}gte(e,t){return this.setLimit("min",e,!0,ex.toString(t))}gt(e,t){return this.setLimit("min",e,!1,ex.toString(t))}lte(e,t){return this.setLimit("max",e,!0,ex.toString(t))}lt(e,t){return this.setLimit("max",e,!1,ex.toString(t))}setLimit(e,t,n,r){return new nk({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:ex.toString(r)}]})}_addCheck(e){return new nk({...this._def,checks:[...this._def.checks,e]})}
1positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ex.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ex.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ex.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ex.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:ex.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}nk.create=e=>new nk({checks:[],typeName:eL.ZodBigInt,coerce:e?.coerce??!1,...nt(e)});class nb extends nn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==tX.boolean){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.boolean,received:t.parsedType}),t2}return t4(e.data)}}nb.create=e=>new nb({typeName:eL.ZodBoolean,coerce:e?.coerce||!1,...nt(e)});class n_ extends nn{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==tX.date){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.date,received:t.parsedType}),t2}if(Number.isNaN(e.data.getTime()))return t0(this._getOrReturnCtx(e),{code:tH.invalid_date}),t2;let n=new t1;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(t0(t=this._getOrReturnCtx(e,t),{code:tH.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(t0(t=this._getOrReturnCtx(e,t),{code:tH.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):eP.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new n_({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:ex.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:ex.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}n_.create=e=>new n_({checks:[],coerce:e?.coerce||!1,typeName:eL.ZodDate,...nt(e)});class nw extends nn{_parse(e){if(this._getType(e)!==tX.symbol){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.symbol,received:t.parsedType}),t2}return t4(e.data)}}nw.create=e=>new nw({typeName:eL.ZodSymbol,...nt(e)});class nv extends nn{_parse(e){if(this._getType(e)!==tX.undefined){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.undefined,received:t.parsedType}),t2}return t4(e.data)}}nv.create=e=>new nv({typeName:eL.ZodUndefined,...nt(e)});class nO extends nn{_parse(e){if(this._getType(e)!==tX.null){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.null,received:t.parsedType}),t2}return t4(e.data)}}nO.create=e=>new nO({typeName:eL.ZodNull,...nt(e)});class nS extends nn{constructor(){super(...arguments),this._any=!0}_parse(e){return t4(e.data)}}nS.create=e=>new nS({typeName:eL.ZodAny,...nt(e)});class nA extends nn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return t4(e.data)}}nA.create=e=>new nA({typeName:eL.ZodUnknown,...nt(e)});class nF extends nn{_parse(e){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.never,received:t.parsedType}),t2}}nF.create=e=>new nF({typeName:eL.ZodNever,...nt(e)});class nD extends nn{_parse(e){if(this._getType(e)!==tX.undefined){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.void,received:t.parsedType}),t2}return t4(e.data)}}nD.create=e=>new nD({typeName:eL.ZodVoid,...nt(e)});class nB extends nn{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==tX.array)return t0(t,{code:tH.invalid_type,expected:tX.array,received:t.parsedType}),t2;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(t0(t,{code:e?tH.too_big:tH.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(t0(t,{code:tH.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(t0(t,{code:tH.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new t5(t,e,t.path,n)))).then(e=>t1.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new t5(t,e,t.path,n)));return t1.mergeArray(n,i)}
1get element(){return this._def.type}min(e,t){return new nB({...this._def,minLength:{value:e,message:ex.toString(t)}})}max(e,t){return new nB({...this._def,maxLength:{value:e,message:ex.toString(t)}})}length(e,t){return new nB({...this._def,exactLength:{value:e,message:ex.toString(t)}})}nonempty(e){return this.min(1,e)}}nB.create=(e,t)=>new nB({type:e,minLength:null,maxLength:null,exactLength:null,typeName:eL.ZodArray,...nt(t)});class nR extends nn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=eP.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==tX.object){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.object,received:t.parsedType}),t2}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof nF&&"strip"===this._def.unknownKeys))for(let e in n.data)i.includes(e)||a.push(e);let s=[];for(let e of i){let t=r[e],i=n.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new t5(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof nF){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)s.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(t0(n,{code:tH.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new t5(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>t1.mergeObjectSync(t,e)):t1.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return ex.errToObj,new nR({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{let r=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:ex.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new nR({...this._def,unknownKeys:"strip"})}passthrough(){return new nR({...this._def,unknownKeys:"passthrough"})}extend(e){return new nR({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new nR({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:eL.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new nR({...this._def,catchall:e})}pick(e){let t={};for(let n of eP.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new nR({...this._def,shape:()=>t})}omit(e){let t={};for(let n of eP.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new nR({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof nR){let n={};for(let r in t.shape){let i=t.shape[r];n[r]=nH.create(e(i))}return new nR({...t._def,shape:()=>n})}return t instanceof nB?new nB({...t._def,type:e(t.element)}):t instanceof nH?nH.create(e(t.unwrap())):t instanceof nZ?nZ.create(e(t.unwrap())):t instanceof nC?nC.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};for(let n of eP.objectKeys(this.shape)){let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}return new nR({...this._def,shape:()=>t})}required(e){let t={};for(let n of eP.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof nH;)e=e._def.innerType;t[n]=e}return new nR({...this._def,shape:()=>t})}keyof(){return nq(eP.objectKeys(this.shape))}}nR.create=(e,t)=>new nR({shape:()=>e,unknownKeys:"strip",catchall:nF.create(),typeName:eL.ZodObject,...nt(t)}),nR.strictCreate=(e,t)=>new nR({shape:()=>e,unknownKeys:"strict",catchall:nF.create(),typeName:eL.ZodObject,...nt(t)}),nR.lazycreate=(e,t)=>new nR({shape:e,unknownKeys:"strip",catchall:nF.create(),typeName:eL.ZodObject,...nt(t)});class nP extends nn{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new tZ(e.ctx.common.issues));return t0(t,{code:tH.invalid_union,unionErrors:n}),t2});{let e;let r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new tZ(e));return t0(t,{code:tH.invalid_union,unionErrors:i}),t2}}get options(){return this._def.options}}nP.create=(e,t)=>
1new nP({options:e,typeName:eL.ZodUnion,...nt(t)});let nU=e=>{if(e instanceof nV)return nU(e.schema);if(e instanceof nK)return nU(e.innerType());if(e instanceof nG)return[e.value];if(e instanceof nY)return e.options;if(e instanceof nW)return eP.objectValues(e.enum);if(e instanceof nz)return nU(e._def.innerType);if(e instanceof nv)return[void 0];else if(e instanceof nO)return[null];else if(e instanceof nH)return[void 0,...nU(e.unwrap())];else if(e instanceof nZ)return[null,...nU(e.unwrap())];else if(e instanceof n1)return nU(e.unwrap());else if(e instanceof n3)return nU(e.unwrap());else if(e instanceof nQ)return nU(e._def.innerType);else return[]};class nx extends nn{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==tX.object)return t0(t,{code:tH.invalid_type,expected:tX.object,received:t.parsedType}),t2;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(t0(t,{code:tH.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),t2)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=nU(n.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new nx({typeName:eL.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...nt(n)})}}class nL extends nn{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(t6(e)||t6(r))return t2;let i=function e(t,n){let r=tK(t),i=tK(n);if(t===n)return{valid:!0,data:t};if(r===tX.object&&i===tX.object){let r=eP.objectKeys(n),i=eP.objectKeys(t).filter(e=>-1!==r.indexOf(e)),a={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};a[r]=i.data}return{valid:!0,data:a}}if(r===tX.array&&i===tX.array){if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;i<t.length;i++){let a=e(t[i],n[i]);if(!a.valid)return{valid:!1};r.push(a.data)}return{valid:!0,data:r}}return r===tX.date&&i===tX.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}(e.value,r.value);return i.valid?((t9(e)||t9(r))&&t.dirty(),{status:t.value,value:i.data}):(t0(n,{code:tH.invalid_intersection_types}),t2)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}nL.create=(e,t,n)=>new nL({left:e,right:t,typeName:eL.ZodIntersection,...nt(n)});class nC extends nn{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==tX.array)return t0(n,{code:tH.invalid_type,expected:tX.array,received:n.parsedType}),t2;if(n.data.length<this._def.items.length)return t0(n,{code:tH.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t2;!this._def.rest&&n.data.length>this._def.items.length&&(t0(n,{code:tH.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new t5(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>t1.mergeArray(t,e)):t1.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new nC({...this._def,rest:e})}}nC.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new nC({items:e,typeName:eL.ZodTuple,rest:null,...nt(t)})};class nJ extends nn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==tX.object)return t0(n,{code:tH.invalid_type,expected:tX.object,received:n.parsedType}),t2;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new t5(n,e,n.path,e)),value:a._parse(new t5(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?t1.mergeObjectAsync(t,r):t1.mergeObjectSync(t,r)}
1get element(){return this._def.valueType}static create(e,t,n){return new nJ(t instanceof nn?{keyType:e,valueType:t,typeName:eL.ZodRecord,...nt(n)}:{keyType:nN.create(),valueType:e,typeName:eL.ZodRecord,...nt(t)})}}class nj extends nn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==tX.map)return t0(n,{code:tH.invalid_type,expected:tX.map,received:n.parsedType}),t2;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new t5(n,e,n.path,[a,"key"])),value:i._parse(new t5(n,t,n.path,[a,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return t2;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return t2;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}nj.create=(e,t,n)=>new nj({valueType:t,keyType:e,typeName:eL.ZodMap,...nt(n)});class nM extends nn{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==tX.set)return t0(n,{code:tH.invalid_type,expected:tX.set,received:n.parsedType}),t2;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(t0(n,{code:tH.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(t0(n,{code:tH.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if("aborted"===r.status)return t2;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let s=[...n.data.values()].map((e,t)=>i._parse(new t5(n,e,n.path,t)));return n.common.async?Promise.all(s).then(e=>a(e)):a(s)}min(e,t){return new nM({...this._def,minSize:{value:e,message:ex.toString(t)}})}max(e,t){return new nM({...this._def,maxSize:{value:e,message:ex.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}nM.create=(e,t)=>new nM({valueType:e,minSize:null,maxSize:null,typeName:eL.ZodSet,...nt(t)});class n$ extends nn{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==tX.function)return t0(t,{code:tH.invalid_type,expected:tX.function,received:t.parsedType}),t2;function n(e,n){return tQ({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,tz,tz].filter(e=>!!e),issueData:{code:tH.invalid_arguments,argumentsError:n}})}function r(e,n){return tQ({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,tz,tz].filter(e=>!!e),issueData:{code:tH.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof nX){let e=this;return t4(async function(...t){let s=new tZ([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw s.addIssue(n(t,e)),s}),l=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw s.addIssue(r(l,e)),s})})}{let e=this;return t4(function(...t){let s=e._def.args.safeParse(t,i);if(!s.success)throw new tZ([n(t,s.error)]);let o=Reflect.apply(a,this,s.data),l=e._def.returns.safeParse(o,i);if(!l.success)throw new tZ([r(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new n$({...this._def,args:nC.create(e).rest(nA.create())})}returns(e){return new n$({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new n$({args:e||nC.create([]).rest(nA.create()),returns:t||nA.create(),typeName:eL.ZodFunction,...nt(n)})}}class nV extends nn{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}nV.create=(e,t)=>
1new nV({getter:e,typeName:eL.ZodLazy,...nt(t)});class nG extends nn{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return t0(t,{received:t.data,code:tH.invalid_literal,expected:this._def.value}),t2}return{status:"valid",value:e.data}}get value(){return this._def.value}}function nq(e,t){return new nY({values:e,typeName:eL.ZodEnum,...nt(t)})}nG.create=(e,t)=>new nG({value:e,typeName:eL.ZodLiteral,...nt(t)});class nY extends nn{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return t0(t,{expected:eP.joinValues(n),received:t.parsedType,code:tH.invalid_type}),t2}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return t0(t,{received:t.data,code:tH.invalid_enum_value,options:n}),t2}return t4(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return nY.create(e,{...this._def,...t})}exclude(e,t=this._def){return nY.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}nY.create=nq;class nW extends nn{_parse(e){let t=eP.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==tX.string&&n.parsedType!==tX.number){let e=eP.objectValues(t);return t0(n,{expected:eP.joinValues(e),received:n.parsedType,code:tH.invalid_type}),t2}if(this._cache||(this._cache=new Set(eP.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=eP.objectValues(t);return t0(n,{received:n.data,code:tH.invalid_enum_value,options:e}),t2}return t4(e.data)}get enum(){return this._def.values}}nW.create=(e,t)=>new nW({values:e,typeName:eL.ZodNativeEnum,...nt(t)});class nX extends nn{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==tX.promise&&!1===t.common.async?(t0(t,{code:tH.invalid_type,expected:tX.promise,received:t.parsedType}),t2):t4((t.parsedType===tX.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}nX.create=(e,t)=>new nX({type:e,typeName:eL.ZodPromise,...nt(t)});class nK extends nn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===eL.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{t0(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return t2;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?t2:"dirty"===r.status||"dirty"===t.value?t3(r.value):r});{if("aborted"===t.value)return t2;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?t2:"dirty"===r.status||"dirty"===t.value?t3(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?t2:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?t2:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type){if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>t8(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):t2);{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!t8(e))return t2;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}}eP.assertNever(r)}}
1nK.create=(e,t,n)=>new nK({schema:e,typeName:eL.ZodEffects,effect:t,...nt(n)}),nK.createWithPreprocess=(e,t,n)=>new nK({schema:t,effect:{type:"preprocess",transform:e},typeName:eL.ZodEffects,...nt(n)});class nH extends nn{_parse(e){return this._getType(e)===tX.undefined?t4(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}nH.create=(e,t)=>new nH({innerType:e,typeName:eL.ZodOptional,...nt(t)});class nZ extends nn{_parse(e){return this._getType(e)===tX.null?t4(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}nZ.create=(e,t)=>new nZ({innerType:e,typeName:eL.ZodNullable,...nt(t)});class nz extends nn{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===tX.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}nz.create=(e,t)=>new nz({innerType:e,typeName:eL.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...nt(t)});class nQ extends nn{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return t7(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new tZ(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new tZ(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}nQ.create=(e,t)=>new nQ({innerType:e,typeName:eL.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...nt(t)});class n0 extends nn{_parse(e){if(this._getType(e)!==tX.nan){let t=this._getOrReturnCtx(e);return t0(t,{code:tH.invalid_type,expected:tX.nan,received:t.parsedType}),t2}return{status:"valid",value:e.data}}}n0.create=e=>new n0({typeName:eL.ZodNaN,...nt(e)}),Symbol("zod_brand");class n1 extends nn{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class n2 extends nn{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?t2:"dirty"===e.status?(t.dirty(),t3(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?t2:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new n2({in:e,out:t,typeName:eL.ZodPipeline})}}class n3 extends nn{_parse(e){let t=this._def.innerType._parse(e),n=e=>(t8(e)&&(e.value=Object.freeze(e.value)),e);return t7(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}n3.create=(e,t)=>new n3({innerType:e,typeName:eL.ZodReadonly,...nt(t)}),nR.lazycreate,(s=eL||(eL={})).ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly";let n4=nN.create,n6=nE.create;n0.create;let n9=nk.create,n8=nb.create;n_.create,nw.create;let n7=nv.create;nO.create,nS.create,nA.create,nF.create,nD.create;let n5=nB.create,re=nR.create;nR.strictCreate;let rt=nP.create;nx.create,nL.create,nC.create,nJ.create,nj.create,nM.create;let rn=n$.create;nV.create;let rr=nG.create,ri=nY.create,ra=nW.create,rs=nX.create;nK.create,nH.create,nZ.create,nK.createWithPreprocess,n2.create;let ro=re({userId:rn().args().returns(rs(n4())),deviceId:rn().args().returns(rs(n4())),deviceModel:rn().args().returns(rs(n4())),earlyIdentifier:rn().args().returns(rs(n4())),osName:rn().args().returns(rs(n4())),osVersion:rn().args().returns(rs(n4())),releaseStage:rn().args().returns(rs(n4())),appVersion:rn().args().returns(rs(n4())),platform:rn().args().returns(rs(ra({BROWSER_EXTENSION:"browser_extension",WEB_V2:"web_v2",PORTAL:"portal",MARKETING_CONSUMER:"marketing_consumer",MARKETING_CORPORATE:"marketing_corporate"}))),trackingEnabled:rn().args().returns(rs(n8())).optional(),globalSessionId:rn().args().returns(rs(n4()))});
1var rl=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}l((r=r.apply(e,t||[])).next())})};let ru={PRODUCTION:"https://tracking.ibotta-classic.ipn-ops.net/v1/track_message",STAGING:"https://tracking.ibotta-classic.staging.ipn-ops.net/v1/track_message"},rc={userId:()=>rl(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the user id for your user. See @ibotta/web-tracking README for more information.")}),deviceId:()=>rl(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the device id. See @ibotta/web-tracking README for more information.")}),deviceModel:()=>rl(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the device model. See @ibotta/web-tracking README for more information.")}),earlyIdentifier:()=>rl(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the early identifier. See @ibotta/web-tracking README for more information.")}),osName:()=>rl(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the OS name. See @ibotta/web-tracking README for more information.")}),osVersion:()=>rl(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the OS version. See @ibotta/web-tracking README for more information.")}),releaseStage:()=>rl(void 0,void 0,void 0,function*(){return"staging"}),appVersion:()=>rl(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the app version. See @ibotta/web-tracking README for more information.")}),platform:()=>rl(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the platform. See @ibotta/web-tracking README for more information.")}),trackingEnabled:()=>rl(void 0,void 0,void 0,function*(){return!0}),gatewayUrl:()=>rl(void 0,void 0,void 0,function*(){return ru.STAGING}),globalSessionId:()=>rl(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the global session id. See @ibotta/web-tracking README for more information.")})};function rd(e){let t=ro.safeParse(e);t.success?tW()(rc,t.data,{gatewayUrl:()=>rl(this,void 0,void 0,function*(){return"production"===(yield t.data.releaseStage())?ru.PRODUCTION:ru.STAGING})}):console.error("Invalid tracking configuration: "+t.error.message)}function rf(e,t){if(!e)throw Error(t)}function rm(e){if("number"!=typeof e)throw Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error("invalid int 32: "+e)}function rp(e){if("number"!=typeof e)throw Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error("invalid uint 32: "+e)}function rh(e){if("number"!=typeof e)throw Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error("invalid float 32: "+e)}let rg=Symbol("@bufbuild/protobuf/enum-type");function rT(e){let t=e[rg];return rf(t,"missing enum type on enum object"),t}function ry(e,t,n,r){e[rg]=rI(t,n.map(t=>({no:t.no,name:t.name,localName:e[t.no]})),r)}function rI(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let e of t){let t=rE(e);a.push(t),r[e.name]=t,i[e.no]=t}return{typeName:e,values:a,findName:e=>r[e],findNumber:e=>i[e]}}function rN(e,t,n){let r={};for(let e of t){let t=rE(e);r[t.localName]=t.no,r[t.no]=t.localName}return ry(r,e,t,n),r}function rE(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class rk{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){let n=this.getType().runtime.bin,r=n.makeReadOptions(t);return n.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){let n=this.getType(),r=n.runtime.json,i=r.makeReadOptions(t);return r.readMessage(n,e,i,this),this}fromJsonString(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`cannot decode ${this.getType().typeName} from JSON: ${e instanceof Error?e.message:String(e)}`)}return this.fromJson(n,t)}toBinary(e){let t=this.getType().runtime.bin,n=t.makeWriteOptions(e),r=n.writerFactory();return t.writeMessage(this,r,n),r.finish()}
1toJson(e){let t=this.getType().runtime.json,n=t.makeWriteOptions(e);return t.writeMessage(this,n)}toJsonString(e){var t;return JSON.stringify(this.toJson(e),null,null!==(t=null==e?void 0:e.prettySpaces)&&void 0!==t?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function rb(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(15&n)<<28,t=(112&n)>>4,(128&n)==0)return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}throw Error("invalid varint")}function r_(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(i>>>7==0&&0==t),s=(a?128|i:i)&255;if(n.push(s),!a)return}let r=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(n.push((i?128|r:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=r>>>7!=0,a=(i?128|r:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}function rw(e){let t="-"===e[0];t&&(e=e.slice(1));let n=0,r=0;function i(t,i){let a=Number(e.slice(t,i));r*=1e6,(n=1e6*n+a)>=4294967296&&(r+=n/4294967296|0,n%=4294967296)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?rS(n,r):rO(n,r)}function rv(e,t){if({lo:e,hi:t}={lo:e>>>0,hi:t>>>0},t<=2097151)return String(4294967296*t+e);let n=16777215&e,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+6777216*r+6710656*i,s=r+8147497*i,o=2*i;return a>=1e7&&(s+=Math.floor(a/1e7),a%=1e7),s>=1e7&&(o+=Math.floor(s/1e7),s%=1e7),o.toString()+rA(s)+rA(a)}function rO(e,t){return{lo:0|e,hi:0|t}}function rS(e,t){return t=~t,e?e=~e+1:t+=1,rO(e,t)}let rA=e=>{let t=String(e);return"0000000".slice(t.length)+t};function rF(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(127&e|128),e>>=7;t.push(1)}}function rD(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}var rB=n(74859);let rR=function(){let e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&("object"!=typeof rB||"object"!=typeof rB.env||"1"!==rB.env.BUF_BIGINT_DISABLE)){let t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){let r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw Error(`int64 invalid: ${e}`);return r},uParse(e){let t="bigint"==typeof e?e:BigInt(e);if(t>i||t<r)throw Error(`uint64 invalid: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}let t=e=>rf(/^-?[0-9]+$/.test(e),`int64 invalid: ${e}`),n=e=>rf(/^[0-9]+$/.test(e),`uint64 invalid: ${e}`);return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),t(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),n(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),t(e),rw(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),n(e),rw(e)),dec:(e,t)=>(function(e,t){let n=rO(e,t),r=2147483648&n.hi;r&&(n=rS(n.lo,n.hi));let i=rv(n.lo,n.hi);return r?"-"+i:i})(e,t),uDec:(e,t)=>rv(e,t)}}();function rP(e,t,n){if(t===n)return!0;if(e==eC.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case eC.UINT64:case eC.FIXED64:case eC.INT64:case eC.SFIXED64:case eC.SINT64:return t==n}return!1}function rU(e,t){switch(e){case eC.BOOL:return!1;case eC.UINT64:case eC.FIXED64:case eC.INT64:case eC.SFIXED64:case eC.SINT64:return 0==t?rR.zero:"0";case eC.DOUBLE:case eC.FLOAT:return 0;case eC.BYTES:return new Uint8Array(0);case eC.STRING:return"";default:return 0}}function rx(e,t){switch(e){case eC.BOOL:return!1===t;case eC.STRING:return""===t;case eC.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return 0==t}}function rL(e){let t=e.field.localName,n=Object.create(null);return n[t]=function(e){let t=e.field;if(t.repeated)return[];if(void 0!==t.default)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return rU(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}(e),[n,()=>n[t]]}(o=eC||(eC={}))[o.DOUBLE=1]="DOUBLE",o[o.FLOAT=2]="FLOAT",o[o.INT64=3]="INT64",o[o.UINT64=4]="UINT64",o[o.INT32=5]="INT32",o[o.FIXED64=6]="FIXED64",o[o.FIXED32=7]="FIXED32",o[o.BOOL=8]="BOOL",o[o.STRING=9]="STRING",o[o.BYTES=12]="BYTES",o[o.UINT32=13]="UINT32",o[o.SFIXED32=15]="SFIXED32",o[o.SFIXED64=16]="SFIXED64",o[o.SINT32=17]="SINT32",o[o.S
1INT64=18]="SINT64",(l=eJ||(eJ={}))[l.BIGINT=0]="BIGINT",l[l.STRING=1]="STRING";let rC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),rJ=[];for(let e=0;e<rC.length;e++)rJ[rC[e].charCodeAt(0)]=e;rJ["-".charCodeAt(0)]=rC.indexOf("+"),rJ["_".charCodeAt(0)]=rC.indexOf("/");let rj={dec(e){let t=3*e.length/4;"="==e[e.length-2]?t-=2:"="==e[e.length-1]&&(t-=1);let n=new Uint8Array(t),r=0,i=0,a,s=0;for(let t=0;t<e.length;t++){if(void 0===(a=rJ[e.charCodeAt(t)]))switch(e[t]){case"=":i=0;case"\n":case"\r":case"	":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:s=a,i=1;break;case 1:n[r++]=s<<2|(48&a)>>4,s=a,i=2;break;case 2:n[r++]=(15&s)<<4|(60&a)>>2,s=a,i=3;break;case 3:n[r++]=(3&s)<<6|a,i=0}}if(1==i)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a<e.length;a++)switch(r=e[a],n){case 0:t+=rC[r>>2],i=(3&r)<<4,n=1;break;case 1:t+=rC[i|r>>4],i=(15&r)<<2,n=2;break;case 2:t+=rC[i|r>>6]+rC[63&r],n=0}return n&&(t+=rC[i]+"=",1==n&&(t+="=")),t}};function rM(e,t){let n=e.getType();return t.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(e).find(e=>e.no==t.field.no)}function r$(e,t){rf(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}function rV(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":if(e.opt||e.req)return void 0!==t[n];if("enum"==e.kind)return t[n]!==e.T.values[0].no;return!rx(e.T,t[n]);case"message":return void 0!==t[n];case"map":return Object.keys(t[n]).length>0}}function rG(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?rU(e.T,e.L):void 0;break;case"message":t[n]=void 0}}function rq(e,t){if(null===e||"object"!=typeof e||!Object.getOwnPropertyNames(rk.prototype).every(t=>t in e&&"function"==typeof e[t]))return!1;let n=e.getType();return null!==n&&"function"==typeof n&&"typeName"in n&&"string"==typeof n.typeName&&(void 0===t||n.typeName==t.typeName)}function rY(e,t){return rq(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}eC.DOUBLE,eC.FLOAT,eC.INT64,eC.UINT64,eC.INT32,eC.UINT32,eC.BOOL,eC.STRING,eC.BYTES;let rW={ignoreUnknownFields:!1},rX={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function rK(e){return e?Object.assign(Object.assign({},rW),e):rW}function rH(e){return e?Object.assign(Object.assign({},rX),e):rX}let rZ=Symbol(),rz=Symbol();function rQ(e){if(null===e)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function r0(e,t,n,r,i){let a=n.localName;if(n.repeated){if(rf("map"!=n.kind),null===t)return;if(!Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${rQ(t)}`);let s=e[a];for(let e of t){if(null===e)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${rQ(e)}`);switch(n.kind){case"message":s.push(n.T.fromJson(e,r));break;case"enum":let t=r2(n.T,e,r.ignoreUnknownFields,!0);t!==rz&&s.push(t);break;case"scalar":try{s.push(r1(n.T,e,n.L,!0))}catch(r){let t=`cannot decode field ${i.typeName}.${n.name} from JSON: ${rQ(e)}`;throw r instanceof Error&&r.message.length>0&&(t+=`: ${r.message}`),Error(t)}}}}else if("map"==n.kind){if(null===t)return;if("object"!=typeof t||Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${rQ(t)}`);let s=e[a];for(let[e,a]of Object.entries(t)){let o;if(null===a)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);try{o=function(e,t){if(e===eC.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1}return r1(e,t,eJ.BIGINT,!0).toString()}(n.K,e)}catch(r){let e=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${rQ(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}switch(n.V.kind){case"message":s[o]=n.V.T.fromJson(a,r);break;case"enum":let l=r2(n.V.T,a,r.ignoreUnknownFields,!0);l!==rz&&(s[o]=l);break;case"scalar":try{s[o]=r1(n.V.T,a,eJ.BIGINT,!0)}catch(r){let e=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${rQ(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let s=n.T;if(null===t&&"google.protobuf.Value"!=s.typeName)return;let o=e[a];rq(o)?o.fromJson(t,r):(e[a]=o=s.fromJson(t,r),s.fieldWrapper&&!n.oneof&&(e[a]=s.fieldWrapper.unwrapField(o)));break;case"enum":let l=r2(n.T,t,r.ignoreUnknownFields,!1);switch(l){case rZ:rG(n,e);break;case rz:break;default:e[a]=l}break;case"scalar":try{let r=r1(n.T,t,n.L,!1);r===rZ?rG(n,e):e[a]=r}catch(r){let e=`cannot decode field ${i.typeName}.${n.name} from JSON: ${rQ(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}function r1(e,t,n,r){if(null===t)return r?rU(e,n):rZ;switch(e){case eC.DOUBLE:case eC.FLOAT:if("NaN"===t)return Number.NaN;if("Infinity"===t)return Number.POSITIVE_INFINITY;if("-Infinity"===t)return Number.NEGATIVE_INFINITY;if(""===t||"string"==typeof t&&t.trim().length!==t.length||"string"!=typeof t&&"number"!=typeof t)break;let i=Number(t);
1if(Number.isNaN(i)||!Number.isFinite(i))break;return e==eC.FLOAT&&rh(i),i;case eC.INT32:case eC.FIXED32:case eC.SFIXED32:case eC.SINT32:case eC.UINT32:let a;if("number"==typeof t?a=t:"string"==typeof t&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),void 0===a)break;return e==eC.UINT32?rp(a):rm(a),a;case eC.INT64:case eC.SFIXED64:case eC.SINT64:if("number"!=typeof t&&"string"!=typeof t)break;let s=rR.parse(t);return n?s.toString():s;case eC.FIXED64:case eC.UINT64:if("number"!=typeof t&&"string"!=typeof t)break;let o=rR.uParse(t);return n?o.toString():o;case eC.BOOL:if("boolean"!=typeof t)break;return t;case eC.STRING:if("string"!=typeof t)break;try{encodeURIComponent(t)}catch(e){throw Error("invalid UTF8")}return t;case eC.BYTES:if(""===t)return new Uint8Array(0);if("string"!=typeof t)break;return rj.dec(t)}throw Error()}function r2(e,t,n,r){if(null===t)return"google.protobuf.NullValue"==e.typeName?0:r?e.values[0].no:rZ;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(void 0!==i)return i.no;if(n)return rz}throw Error(`cannot decode enum ${e.typeName} from JSON: ${rQ(t)}`)}function r3(e,t,n){if("map"==e.kind){rf("object"==typeof t&&null!=t);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[t,n]of i)r[t.toString()]=r6(e.V.T,n);break;case"message":for(let[e,t]of i)r[e.toString()]=t.toJson(n);break;case"enum":let a=e.V.T;for(let[e,t]of i)r[e.toString()]=r4(a,t,n.enumAsInteger)}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){rf(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let n=0;n<t.length;n++)r.push(r6(e.T,t[n]));break;case"enum":for(let i=0;i<t.length;i++)r.push(r4(e.T,t[i],n.enumAsInteger));break;case"message":for(let e=0;e<t.length;e++)r.push(t[e].toJson(n))}return n.emitDefaultValues||r.length>0?r:void 0}switch(e.kind){case"scalar":return r6(e.T,t);case"enum":return r4(e.T,t,n.enumAsInteger);case"message":return rY(e.T,t).toJson(n)}}function r4(e,t,n){var r;if(rf("number"==typeof t),"google.protobuf.NullValue"==e.typeName)return null;if(n)return t;let i=e.findNumber(t);return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:t}function r6(e,t){switch(e){case eC.INT32:case eC.SFIXED32:case eC.SINT32:case eC.FIXED32:case eC.UINT32:return rf("number"==typeof t),t;case eC.FLOAT:case eC.DOUBLE:if(rf("number"==typeof t),Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case eC.STRING:return rf("string"==typeof t),t;case eC.BOOL:return rf("boolean"==typeof t),t;case eC.UINT64:case eC.FIXED64:case eC.INT64:case eC.SFIXED64:case eC.SINT64:return rf("bigint"==typeof t||"string"==typeof t||"number"==typeof t),t.toString();case eC.BYTES:return rf(t instanceof Uint8Array),rj.enc(t)}}(u=ej||(ej={}))[u.Varint=0]="Varint",u[u.Bit64=1]="Bit64",u[u.LengthDelimited=2]="LengthDelimited",u[u.StartGroup=3]="StartGroup",u[u.EndGroup=4]="EndGroup",u[u.Bit32=5]="Bit32";class r9{constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(rp(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return rm(e),rF(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){rh(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){rp(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){rm(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return rm(e),rF(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=rR.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=rR.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=rR.enc(e);return r_(t.lo,t.hi,this.buf),this}sint64(e){let t=rR.enc(e),n=t.hi>>31;return r_(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=rR.uEnc(e);return r_(t.lo,t.hi,this.buf),this}}class r8{constructor(e,t){this.varint64=rb,this.uint32=rD,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=t?t:new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,n=7&e;
1if(t<=0||n<0||n>5)throw Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e){let t=this.pos;switch(e){case ej.Varint:for(;128&this.buf[this.pos++];);break;case ej.Bit64:this.pos+=4;case ej.Bit32:this.pos+=4;break;case ej.LengthDelimited:let n=this.uint32();this.pos+=n;break;case ej.StartGroup:let r;for(;(r=this.tag()[1])!==ej.EndGroup;)this.skip(r);break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return rR.dec(...this.varint64())}uint64(){return rR.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,rR.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return rR.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return rR.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}let r7=Symbol("@bufbuild/protobuf/unknown-fields"),r5={readUnknownFields:!0,readerFactory:e=>new r8(e)},ie={writeUnknownFields:!0,writerFactory:()=>new r9};function it(e){return e?Object.assign(Object.assign({},r5),e):r5}function ir(e){return e?Object.assign(Object.assign({},ie),e):ie}function ii(e,t,n,r,i){let{repeated:a,localName:s}=n;switch(n.oneof&&((e=e[n.oneof.localName]).case!=s&&delete e.value,e.case=s,s="value"),n.kind){case"scalar":case"enum":let o="enum"==n.kind?eC.INT32:n.T,l=io;if("scalar"==n.kind&&n.L>0&&(l=is),a){let n=e[s];if(r==ej.LengthDelimited&&o!=eC.STRING&&o!=eC.BYTES){let e=t.uint32()+t.pos;for(;t.pos<e;)n.push(l(t,o))}else n.push(l(t,o))}else e[s]=l(t,o);break;case"message":let u=n.T;a?e[s].push(ia(t,new u,i,n)):rq(e[s])?ia(t,e[s],i,n):(e[s]=ia(t,new u,i,n),!u.fieldWrapper||n.oneof||n.repeated||(e[s]=u.fieldWrapper.unwrapField(e[s])));break;case"map":let[c,d]=function(e,t,n){let r,i;let a=t.uint32(),s=t.pos+a;for(;t.pos<s;){let[a]=t.tag();switch(a){case 1:r=io(t,e.K);break;case 2:switch(e.V.kind){case"scalar":i=io(t,e.V.T);break;case"enum":i=t.int32();break;case"message":i=ia(t,new e.V.T,n,void 0)}}}if(void 0===r&&(r=rU(e.K,eJ.BIGINT)),"string"!=typeof r&&"number"!=typeof r&&(r=r.toString()),void 0===i)switch(e.V.kind){case"scalar":i=rU(e.V.T,eJ.BIGINT);break;case"enum":i=e.V.T.values[0].no;break;case"message":i=new e.V.T}return[r,i]}(n,t,i);e[s][c]=d}}function ia(e,t,n,r){let i=t.getType().runtime.bin,a=null==r?void 0:r.delimited;return i.readMessage(t,e,a?r.no:e.uint32(),n,a),t}function is(e,t){let n=io(e,t);return"bigint"==typeof n?n.toString():n}function io(e,t){switch(t){case eC.STRING:return e.string();case eC.BOOL:return e.bool();case eC.DOUBLE:return e.double();case eC.FLOAT:return e.float();case eC.INT32:return e.int32();case eC.INT64:return e.int64();case eC.UINT64:return e.uint64();case eC.FIXED64:return e.fixed64();case eC.BYTES:return e.bytes();case eC.FIXED32:return e.fixed32();case eC.SFIXED32:return e.sfixed32();case eC.SFIXED64:return e.sfixed64();case eC.SINT64:return e.sint64();case eC.UINT32:return e.uint32();case eC.SINT32:return e.sint32()}}function il(e,t,n,r){rf(void 0!==t);let i=e.repeated;switch(e.kind){case"scalar":case"enum":let a="enum"==e.kind?eC.INT32:e.T;if(i){if(rf(Array.isArray(t)),e.packed)!function(e,t,n,r){if(!r.length)return;e.tag(n,ej.LengthDelimited).fork();let[,i]=id(t);for(let t=0;t<r.length;t++)e[i](r[t]);e.join()}(n,a,e.no,t);else for(let r of t)ic(n,a,e.no,r)}else ic(n,a,e.no,t);break;case"message":if(i)for(let i of(rf(Array.isArray(t)),t))iu(n,r,e,i);else iu(n,r,e,t);break;case"map":for(let[i,a]of(rf("object"==typeof t&&null!=t),Object.entries(t)))!function(e,t,n,r,i){e.tag(n.no,ej.LengthDelimited),e.fork();let a=r;switch(n.K){case eC.INT32:case eC.FIXED32:case eC.UINT32:case eC.SFIXED32:case eC.SINT32:a=Number.parseInt(r);break;case eC.BOOL:rf("true"==r||"false"==r),a="true"==r}switch(ic(e,n.K,1,a),n.V.kind){case"scalar":ic(e,n.V.T,2,i);break;case"enum":ic(e,eC.INT32,2,i);break;case"message":rf(void 0!==i),e.tag(2,ej.LengthDelimited).bytes(i.toBinary(t))}e.join()}(n,r,e,i,a)}}function iu(e,t,n,r){let i=rY(n.T,r);n.delimited?e.tag(n.no,ej.StartGroup).raw(i.toBinary(t)).tag(n.no,ej.EndGroup):e.tag(n.no,ej.LengthDelimited).bytes(i.toBinary(t))}function ic(e,t,n,r){rf(void 0!==r);let[i,a]=id(t);e.tag(n,i)[a](r)}function id(e){let t=ej.Varint;switch(e){case eC.BYTES:case eC.STRING:t=ej.LengthDelimited;break;case eC.DOUBLE:case eC.FIXED64:case eC.SFIXED64:t=ej.Bit64;break;case eC.FIXED32:case eC.SFIXED32:case eC.FLOAT:t=ej.Bit32}return[t,eC[e].toLowerCase()]}function im(e){if(void 0===e)return e;if(rq(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function ip(e){return e instanceof Uint8Array?e:new Uint8Array(e)}
1function ih(e,t,n){return{syntax:e,json:{makeReadOptions:rK,makeWriteOptions:rH,readMessage(e,t,n,r){if(null==t||Array.isArray(t)||"object"!=typeof t)throw Error(`cannot decode message ${e.typeName} from JSON: ${rQ(t)}`);r=null!=r?r:new e;let i=new Map,a=n.typeRegistry;for(let[s,o]of Object.entries(t)){let t=e.fields.findJsonName(s);if(t){if(t.oneof){if(null===o&&"scalar"==t.kind)continue;let n=i.get(t.oneof);if(void 0!==n)throw Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${t.oneof.name}" present: "${n}", "${s}"`);i.set(t.oneof,s)}r0(r,o,t,n,e)}else{let t=!1;if((null==a?void 0:a.findExtension)&&s.startsWith("[")&&s.endsWith("]")){let i=a.findExtension(s.substring(1,s.length-1));if(i&&i.extendee.typeName==e.typeName){t=!0;let[e,a]=rL(i);r0(e,o,i.field,n,i),function(e,t,n,r){r$(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(rM(e,t)){let n=e.getType().runtime.bin.listUnknownFields(e).filter(e=>e.no!=t.field.no);for(let t of(e.getType().runtime.bin.discardUnknownFields(e),n))e.getType().runtime.bin.onUnknownField(e,t.no,t.wireType,t.data)}let s=a.writerFactory(),o=t.field;o.opt||o.repeated||"enum"!=o.kind&&"scalar"!=o.kind||(o=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(o,n,s,a);let l=i.readerFactory(s.finish());for(;l.pos<l.len;){let[t,n]=l.tag(),r=l.skip(n);e.getType().runtime.bin.onUnknownField(e,t,n,r)}}(r,i,a(),n)}}if(!t&&!n.ignoreUnknownFields)throw Error(`cannot decode message ${e.typeName} from JSON: key "${s}" is unknown`)}}return r},writeMessage(e,t){let n;let r=e.getType(),i={};try{for(n of r.fields.byNumber()){if(!rV(n,e)){var a;if(n.req)throw"required field not set";if(!t.emitDefaultValues||!((a=n).repeated||"map"==a.kind||!a.oneof&&"message"!=a.kind&&!a.opt&&!a.req))continue}let r=n.oneof?e[n.oneof.localName].value:e[n.localName],s=r3(n,r,t);void 0!==s&&(i[t.useProtoFieldName?n.name:n.jsonName]=s)}let s=t.typeRegistry;if(null==s?void 0:s.findExtensionFor)for(let n of r.runtime.bin.listUnknownFields(e)){let a=s.findExtensionFor(r.typeName,n.no);if(a&&rM(e,a)){let n=function(e,t,n){r$(t,e);let r=t.runtime.bin.makeReadOptions(n),i=function(e,t){if(!t.repeated&&("enum"==t.kind||"scalar"==t.kind)){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(e=>e.no===t.no)}(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,s]=rL(t);for(let e of i)t.runtime.bin.readField(a,r.readerFactory(e.data),t.field,e.wireType,r);return s()}(e,a,t),r=r3(a.field,n,t);void 0!==r&&(i[a.field.jsonName]=r)}}}catch(i){let e=n?`cannot encode field ${r.typeName}.${n.name} to JSON`:`cannot encode message ${r.typeName} to JSON`,t=i instanceof Error?i.message:String(i);throw Error(e+(t.length>0?`: ${t}`:""))}return i},readScalar:(e,t,n)=>r1(e,t,null!=n?n:eJ.BIGINT,!0),writeScalar(e,t,n){if(void 0!==t&&(n||rx(e,t)))return r6(e,t)},debug:rQ},bin:{makeReadOptions:it,makeWriteOptions:ir,listUnknownFields(e){var t;return null!==(t=e[r7])&&void 0!==t?t:[]},discardUnknownFields(e){delete e[r7]},writeUnknownFields(e,t){let n=e[r7];if(n)for(let e of n)t.tag(e.no,e.wireType).raw(e.data)},onUnknownField(e,t,n,r){Array.isArray(e[r7])||(e[r7]=[]),e[r7].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a,s;let o=e.getType(),l=i?t.len:t.pos+n;for(;
1t.pos<l&&([a,s]=t.tag(),s!=ej.EndGroup);){let n=o.fields.find(a);if(!n){let n=t.skip(s);r.readUnknownFields&&this.onUnknownField(e,a,s,n);continue}ii(e,t,n,s,r)}if(i&&(s!=ej.EndGroup||a!==n))throw Error("invalid end group tag")},readField:ii,writeMessage(e,t,n){let r=e.getType();for(let i of r.fields.byNumber()){if(!rV(i,e)){if(i.req)throw Error(`cannot encode field ${r.typeName}.${i.name} to binary: required field not set`);continue}let a=i.oneof?e[i.oneof.localName].value:e[i.localName];il(i,a,t,n)}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t},writeField(e,t,n,r){void 0!==t&&il(e,t,n,r)}},util:Object.assign(Object.assign({},{setEnumType:ry,initPartial(e,t){if(void 0!==e)for(let n of t.getType().fields.byMember()){let r=n.localName;if(void 0!==e[r])switch(n.kind){case"oneof":let i=e[r].case;if(void 0===i)continue;let a=n.findField(i),s=e[r].value;a&&"message"==a.kind&&!rq(s,a.T)?s=new a.T(s):a&&"scalar"===a.kind&&a.T===eC.BYTES&&(s=ip(s)),t[r]={case:i,value:s};break;case"scalar":case"enum":let o=e[r];n.T===eC.BYTES&&(o=n.repeated?o.map(ip):ip(o)),t[r]=o;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===eC.BYTES)for(let[n,i]of Object.entries(e[r]))t[r][n]=ip(i);else Object.assign(t[r],e[r]);break;case"message":let l=n.V.T;for(let n of Object.keys(e[r])){let i=e[r][n];l.fieldWrapper||(i=new l(i)),t[r][n]=i}}break;case"message":let u=n.T;if(n.repeated)t[r]=e[r].map(e=>rq(e,u)?e:new u(e));else{let n=e[r];u.fieldWrapper?"google.protobuf.BytesValue"===u.typeName?t[r]=ip(n):t[r]=n:t[r]=rq(n,u)?n:new u(n)}}}},equals:(e,t,n)=>t===n||!!t&&!!n&&e.fields.byMember().every(e=>{let r=t[e.localName],i=n[e.localName];if(e.repeated){if(r.length!==i.length)return!1;switch(e.kind){case"message":return r.every((t,n)=>e.T.equals(t,i[n]));case"scalar":return r.every((t,n)=>rP(e.T,t,i[n]));case"enum":return r.every((e,t)=>rP(eC.INT32,e,i[t]))}throw Error(`repeated cannot contain ${e.kind}`)}switch(e.kind){case"message":return e.T.equals(r,i);case"enum":return rP(eC.INT32,r,i);case"scalar":return rP(e.T,r,i);case"oneof":if(r.case!==i.case)return!1;let a=e.findField(r.case);if(void 0===a)return!0;switch(a.kind){case"message":return a.T.equals(r.value,i.value);case"enum":return rP(eC.INT32,r.value,i.value);case"scalar":return rP(a.T,r.value,i.value)}throw Error(`oneof cannot contain ${a.kind}`);case"map":let s=Object.keys(r).concat(Object.keys(i));switch(e.V.kind){case"message":let o=e.V.T;return s.every(e=>o.equals(r[e],i[e]));case"enum":return s.every(e=>rP(eC.INT32,r[e],i[e]));case"scalar":let l=e.V.T;return s.every(e=>rP(l,r[e],i[e]))}}}),clone(e){let t=e.getType(),n=new t;for(let r of t.fields.byMember()){let t;let i=e[r.localName];if(r.repeated)t=i.map(im);else if("map"==r.kind)for(let[e,a]of(t=n[r.localName],Object.entries(i)))t[e]=im(a);else t="oneof"==r.kind?r.findField(i.case)?{case:i.case,value:im(i.value)}:{case:void 0}:im(i);n[r.localName]=t}return n}}),{newFieldList:t,initFields:n}),makeMessageType(e,t,n){return function(e,t,n,r){var i;let a=null!==(i=null==r?void 0:r.localName)&&void 0!==i?i:t.substring(t.lastIndexOf(".")+1),s={[a]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[a];return Object.setPrototypeOf(s.prototype,new rk),Object.assign(s,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary:(e,t)=>new s().fromBinary(e,t),fromJson:(e,t)=>new s().fromJson(e,t),fromJsonString:(e,t)=>new s().fromJsonString(e,t),equals:(t,n)=>e.util.equals(s,t,n)}),s}(this,e,t,n)},makeEnum:rN,makeEnumType:rI,getEnumType:rT,makeExtension(e,t,n){var r;let i;return r=this,{typeName:e,extendee:t,get field(){if(!i){let t="function"==typeof n?n():n;t.name=e.split(".").pop(),t.jsonName=`[${e}]`,i=r.util.newFieldList([t]).list()[0]}return i},runtime:r}}}}class ig{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){let e={};for(let t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[e]}find(e){if(!this.numbers){let e={};for(let t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,t)=>
1e.no-t.no)),this.numbersAsc}byMember(){if(!this.members){let e;this.members=[];let t=this.members;for(let n of this.list())n.oneof?n.oneof!==e&&(e=n.oneof,t.push(e)):t.push(n)}return this.members}}function iT(e,t){let n=iI(e);return t?n:i_(ib(n))}let iy=iI;function iI(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);switch(i){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(i),t=!1;break;default:t&&(t=!1,i=i.toUpperCase()),n.push(i)}}return n.join("")}let iN=new Set(["constructor","toString","toJSON","valueOf"]),iE=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),ik=e=>`${e}$`,ib=e=>iE.has(e)?ik(e):e,i_=e=>iN.has(e)?ik(e):e;class iw{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=iT(e,!1)}addField(e){rf(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let e=0;e<this.fields.length;e++)this._lookup[this.fields[e].localName]=this.fields[e]}return this._lookup[e]}}function iv(e,t){var n,r,i,a,s,o;let l;let u=[];for(let c of"function"==typeof e?e():e){if(c.localName=iT(c.name,void 0!==c.oneof),c.jsonName=null!==(n=c.jsonName)&&void 0!==n?n:iy(c.name),c.repeated=null!==(r=c.repeated)&&void 0!==r&&r,"scalar"==c.kind&&(c.L=null!==(i=c.L)&&void 0!==i?i:eJ.BIGINT),c.delimited=null!==(a=c.delimited)&&void 0!==a&&a,c.req=null!==(s=c.req)&&void 0!==s&&s,c.opt=null!==(o=c.opt)&&void 0!==o&&o,void 0===c.packed&&(t?c.packed="enum"==c.kind||"scalar"==c.kind&&c.T!=eC.BYTES&&c.T!=eC.STRING:c.packed=!1),void 0!==c.oneof){let e="string"==typeof c.oneof?c.oneof:c.oneof.name;l&&l.name==e||(l=new iw(e)),c.oneof=l,l.addField(c)}u.push(c)}return u}let iO=ih("proto3",e=>new ig(e,e=>iv(e,!0)),e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName;if(t.repeated){e[n]=[];continue}switch(t.kind){case"oneof":e[n]={case:void 0};break;case"enum":e[n]=0;break;case"map":e[n]={};break;case"scalar":e[n]=rU(t.T,t.L)}}});(c=eM||(eM={}))[c.UNSPECIFIED=0]="UNSPECIFIED",c[c.IBOTTA=1]="IBOTTA",c[c.OCTOSHOP=2]="OCTOSHOP",iO.util.setEnumType(eM,"ibotta.tracking.common.v1.ExtensionName",[{no:0,name:"EXTENSION_NAME_UNSPECIFIED"},{no:1,name:"EXTENSION_NAME_IBOTTA"},{no:2,name:"EXTENSION_NAME_OCTOSHOP"}]),(d=e$||(e$={}))[d.UNSPECIFIED=0]="UNSPECIFIED",d[d.CLAIMED=1]="CLAIMED",d[d.UNCLAIMED=2]="UNCLAIMED",d[d.ATTRIBUTION_LOST=3]="ATTRIBUTION_LOST",iO.util.setEnumType(e$,"ibotta.tracking.common.v1.AffiliationStatus",[{no:0,name:"AFFILIATION_STATUS_UNSPECIFIED"},{no:1,name:"AFFILIATION_STATUS_CLAIMED"},{no:2,name:"AFFILIATION_STATUS_UNCLAIMED"},{no:3,name:"AFFILIATION_STATUS_ATTRIBUTION_LOST"}]),(f=eV||(eV={}))[f.UNSPECIFIED=0]="UNSPECIFIED",f[f.PROD=1]="PROD",f[f.STAGING=2]="STAGING",f[f.DEV=3]="DEV",f[f.TEST=4]="TEST",iO.util.setEnumType(eV,"ibotta.tracking.common.v1.Environment",[{no:0,name:"ENVIRONMENT_UNSPECIFIED"},{no:1,name:"ENVIRONMENT_PROD"},{no:2,name:"ENVIRONMENT_STAGING"},{no:3,name:"ENVIRONMENT_DEV"},{no:4,name:"ENVIRONMENT_TEST"}]);class iS extends rk{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),iO.util.initPartial(e,this)}toJson(e){var t;if(""===this.typeUrl)return{};let n=this.typeUrlToName(this.typeUrl),r=null===(t=null==e?void 0:e.typeRegistry)||void 0===t?void 0:t.findMessage(n);if(!r)throw Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let i=r.fromBinary(this.value).toJson(e);return(n.startsWith("google.protobuf.")||null===i||Array.isArray(i)||"object"!=typeof i)&&(i={value:i}),i["@type"]=this.typeUrl,i}fromJson(e,t){var n;let r;if(null===e||Array.isArray(e)||"object"!=typeof e)throw Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${null===e?"null":Array.isArray(e)?"array":typeof e}`);if(0==Object.keys(e).length)return this;let i=e["@type"];if("string"!=typeof i||""==i)throw Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');let a=this.typeUrlToName(i),s=null===(n=null==t?void 0:t.typeRegistry)||void 0===n?void 0:n.findMessage(a);if(!s)throw Error(`cannot decode message google.protobuf.Any from JSON: ${i} is not in the type registry`);
1if(a.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))r=s.fromJson(e.value,t);else{let n=Object.assign({},e);delete n["@type"],r=s.fromJson(n,t)}return this.packFrom(r),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return!!this.is(e.getType())&&(e.fromBinary(this.value),!0)}unpack(e){if(""===this.typeUrl)return;let t=e.findMessage(this.typeUrlToName(this.typeUrl));if(t)return t.fromBinary(this.value)}is(e){if(""===this.typeUrl)return!1;let t=this.typeUrlToName(this.typeUrl);return t===("string"==typeof e?e:e.typeName)}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw Error(`invalid type url: ${e}`);let t=e.lastIndexOf("/"),n=t>=0?e.substring(t+1):e;if(!n.length)throw Error(`invalid type url: ${e}`);return n}static pack(e){let t=new iS;return t.packFrom(e),t}static fromBinary(e,t){return new iS().fromBinary(e,t)}static fromJson(e,t){return new iS().fromJson(e,t)}static fromJsonString(e,t){return new iS().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(iS,e,t)}}iS.runtime=iO,iS.typeName="google.protobuf.Any",iS.fields=iO.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);class iA extends rk{messages=[];constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.EventBatch";static fields=iO.util.newFieldList(()=>[{no:1,name:"messages",kind:"message",T:iS,repeated:!0}]);static fromBinary(e,t){return new iA().fromBinary(e,t)}static fromJson(e,t){return new iA().fromJson(e,t)}static fromJsonString(e,t){return new iA().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(iA,e,t)}}class iF extends rk{millis=rR.zero;constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.Timestamp";static fields=iO.util.newFieldList(()=>[{no:10,name:"millis",kind:"scalar",T:3}]);static fromBinary(e,t){return new iF().fromBinary(e,t)}static fromJson(e,t){return new iF().fromJson(e,t)}static fromJsonString(e,t){return new iF().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(iF,e,t)}}class iD extends rk{type="";id="";constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.URI";static fields=iO.util.newFieldList(()=>[{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:9}]);static fromBinary(e,t){return new iD().fromBinary(e,t)}static fromJson(e,t){return new iD().fromJson(e,t)}static fromJsonString(e,t){return new iD().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(iD,e,t)}}class iB extends rk{eventUri;eventAt;environment=eV.UNSPECIFIED;agent="";revision="";zoneId="";ip="";constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.EventHeader";static fields=iO.util.newFieldList(()=>[{no:1,name:"event_uri",kind:"message",T:iD},{no:2,name:"event_at",kind:"message",T:iF},{no:3,name:"environment",kind:"enum",T:iO.getEnumType(eV)},{no:10,name:"agent",kind:"scalar",T:9},{no:20,name:"revision",kind:"scalar",T:9},{no:30,name:"zone_id",kind:"scalar",T:9},{no:100,name:"ip",kind:"scalar",T:9}]);static fromBinary(e,t){return new iB().fromBinary(e,t)}static fromJson(e,t){return new iB().fromJson(e,t)}static fromJsonString(e,t){return new iB().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(iB,e,t)}}let iR=ih("proto2",e=>new ig(e,e=>iv(e,!1)),e=>{for(let t of e.getType().fields.byMember()){let n=t.localName;if(t.repeated){e[n]=[];continue}switch(t.kind){case"oneof":e[n]={case:void 0};break;case"map":e[n]={}}}});(m=eG||(eG={}))[m.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",m[m.EDITION_PROTO2=998]="EDITION_PROTO2",m[m.EDITION_PROTO3=999]="EDITION_PROTO3",m[m.EDITION_2023=1e3]="EDITION_2023",m[m.EDITION_2024=1001]="EDITION_2024",m[m.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",m[m.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",m[m.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",m[m.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",m[m.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",m[m.EDITION_MAX=2147483647]="EDITION_MAX",iR.util.setEnumType(eG,"google.protobuf.Edition",[{no:0,name:"EDITION_UNKNOWN"},{no:998,name:"EDITION_PROTO2"},{no:999,name:"EDITION_PROTO3"},{no:1e3,name:"EDITION_2023"},{no:1001,name:"EDITION_2024"},{no:1,name:"EDITION_1_TEST_ONLY"},{no:2,name:"EDITION_2_TEST_ONLY"},{no:99997,name:"EDITION_99997_TEST_ONLY"},{no:99998,name:"EDITION_99998_TEST_ONLY"},{no:99999,name:"EDITION_99999_TEST_ONLY"},{no:2147483647,name:"EDITION_MAX"}]);class iP extends rk{constructor(e){super(),this.file=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iP().fromBinary(e,t)}static fromJson(e,t){return new iP().fromJson(e,t)}static fromJsonString(e,t){return new iP().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iP,e,t)}}iP.runtime=iR,iP.typeName="google.protobuf.FileDescriptorSet",iP.fields=iR.util.newFieldList(()=>[{no:1,name:"file",kind:"message",T:iU,repeated:!0}]);class iU extends rk{constructor(e){super(),this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iU().fromBinary(e,t)}static fromJson(e,t){return new iU().fromJson(e,t)}static fromJsonString(e,t){return new iU().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iU,e,t)}}iU.runtime=iR,iU.typeName="google.protobuf.FileDescriptorProto",iU.fields=iR.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"package",kind:"scalar",T:9,opt:!0},{no:3,name:"dependency",kind:"scalar",T:9,repeated:!0},{no:10,name:"public_dependency",kind:"scalar",T:5,repeated:!0},{no:11,name:"weak_dependency",kind:"scalar",T:5,repeated:!0},{no:4,name:"message_type",kind:"message",T:ix,repeated:!0},{no:5,name:"enum_type",kind:"message",T:iV,repeated:!0},{no:6,name:"service",kind:"message",T:iY,repeated:!0},{no:7,name:"extension",kind:"message",T:iM,repeated:!0},{no:8,name:"options",kind:"message",T:iX,opt:!0},{no:9,name:"source_code_info",kind:"message",T:i7,opt:!0},{no:12,name:"syntax",kind:"scalar",T:9,opt:!0},{no:14,name:"edition",kind:"enum",T:iR.getEnumType(eG),opt:!0}]);class ix extends rk{constructor(e){super(),this.field=[],this.extension=[],this.nestedType=[],this.enumType=[],this.extensionRange=[],this.oneofDecl=[],this.reservedRange=[],this.reservedName=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new ix().fromBinary(e,t)}static fromJson(e,t){return new ix().fromJson(e,t)}static fromJsonString(e,t){return new ix().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(ix,e,t)}}ix.runtime=iR,ix.typeName="google.protobuf.DescriptorProto",ix.fields=iR.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"field",kind:"message",T:iM,repeated:!0},{no:6,name:"extension",kind:"message",T:iM,repeated:!0},{no:3,name:"nested_type",kind:"message",T:ix,repeated:!0},{no:4,name:"enum_type",kind:"message",T:iV,repeated:!0},{no:5,name:"extension_range",kind:"message",T:iL,repeated:!0},{no:8,name:"oneof_decl",kind:"message",T:i$,repeated:!0},{no:7,name:"options",kind:"message",T:iK,opt:!0},{no:9,name:"reserved_range",kind:"message",T:iC,repeated:!0},{no:10,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class iL extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new iL().fromBinary(e,t)}static fromJson(e,t){return new iL().fromJson(e,t)}static fromJsonString(e,t){return new iL().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iL,e,t)}}iL.runtime=iR,iL.typeName="google.protobuf.DescriptorProto.ExtensionRange",iL.fields=iR.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:iJ,opt:!0}]);class iC extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new iC().fromBinary(e,t)}static fromJson(e,t){return new iC().fromJson(e,t)}static fromJsonString(e,t){return new iC().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iC,e,t)}}iC.runtime=iR,iC.typeName="google.protobuf.DescriptorProto.ReservedRange",iC.fields=iR.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class iJ extends rk{constructor(e){super(),this.uninterpretedOption=[],this.declaration=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iJ().fromBinary(e,t)}static fromJson(e,t){return new iJ().fromJson(e,t)}static fromJsonString(e,t){return new iJ().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iJ,e,t)}}iJ.runtime=iR,iJ.typeName="google.protobuf.ExtensionRangeOptions",iJ.fields=iR.util.newFieldList(()=>[{no:999,name:"uninterpreted_option",kind:"message",T:i3,repeated:!0},{no:2,name:"declaration",kind:"message",T:ij,repeated:!0},{no:50,name:"features",kind:"message",T:i6,opt:!0},{no:3,name:"verification",kind:"enum",T:iR.getEnumType(eq),opt:!0,default:eq.UNVERIFIED}]),(p=eq||(eq={}))[p.DECLARATION=0]="DECLARATION",p[p.UNVERIFIED=1]="UNVERIFIED",iR.util.setEnumType(eq,"google.protobuf.ExtensionRangeOptions.VerificationState",[{no:0,name:"DECLARATION"},{no:1,name:"UNVERIFIED"}]);class ij extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new ij().fromBinary(e,t)}static fromJson(e,t){return new ij().fromJson(e,t)}static fromJsonString(e,t){return new ij().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(ij,e,t)}}ij.runtime=iR,ij.typeName="google.protobuf.ExtensionRangeOptions.Declaration",ij.fields=iR.util.newFieldList(()=>[{no:1,name:"number",kind:"scalar",T:5,opt:!0},{no:2,name:"full_name",kind:"scalar",T:9,opt:!0},{no:3,name:"type",kind:"scalar",T:9,opt:!0},{no:5,name:"reserved",kind:"scalar",T:8,opt:!0},{no:6,name:"repeated",kind:"scalar",T:8,opt:!0}]);class iM extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new iM().fromBinary(e,t)}static fromJson(e,t){return new iM().fromJson(e,t)}static fromJsonString(e,t){return new iM().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iM,e,t)}}iM.runtime=iR,iM.typeName="google.protobuf.FieldDescriptorProto",iM.fields=iR.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"number",kind:"scalar",T:5,opt:!0},{no:4,name:"label",kind:"enum",T:iR.getEnumType(eW),opt:!0},{no:5,name:"type",kind:"enum",T:iR.getEnumType(eY),opt:!0},{no:6,name:"type_name",kind:"scalar",T:9,opt:!0},{no:2,name:"extendee",kind:"scalar",T:9,opt:!0},{no:7,name:"default_value",kind:"scalar",T:9,opt:!0},{no:9,name:"oneof_index",kind:"scalar",T:5,opt:!0},{no:10,name:"json_name",kind:"scalar",T:9,opt:!0},{no:8,name:"options",kind:"message",T:iH,opt:!0},{no:17,name:"proto3_optional",kind:"scalar",T:8,opt:!0}]),(h=eY||(eY={}
1))[h.DOUBLE=1]="DOUBLE",h[h.FLOAT=2]="FLOAT",h[h.INT64=3]="INT64",h[h.UINT64=4]="UINT64",h[h.INT32=5]="INT32",h[h.FIXED64=6]="FIXED64",h[h.FIXED32=7]="FIXED32",h[h.BOOL=8]="BOOL",h[h.STRING=9]="STRING",h[h.GROUP=10]="GROUP",h[h.MESSAGE=11]="MESSAGE",h[h.BYTES=12]="BYTES",h[h.UINT32=13]="UINT32",h[h.ENUM=14]="ENUM",h[h.SFIXED32=15]="SFIXED32",h[h.SFIXED64=16]="SFIXED64",h[h.SINT32=17]="SINT32",h[h.SINT64=18]="SINT64",iR.util.setEnumType(eY,"google.protobuf.FieldDescriptorProto.Type",[{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]),(g=eW||(eW={}))[g.OPTIONAL=1]="OPTIONAL",g[g.REPEATED=3]="REPEATED",g[g.REQUIRED=2]="REQUIRED",iR.util.setEnumType(eW,"google.protobuf.FieldDescriptorProto.Label",[{no:1,name:"LABEL_OPTIONAL"},{no:3,name:"LABEL_REPEATED"},{no:2,name:"LABEL_REQUIRED"}]);class i$ extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new i$().fromBinary(e,t)}static fromJson(e,t){return new i$().fromJson(e,t)}static fromJsonString(e,t){return new i$().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i$,e,t)}}i$.runtime=iR,i$.typeName="google.protobuf.OneofDescriptorProto",i$.fields=iR.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"options",kind:"message",T:iz,opt:!0}]);class iV extends rk{constructor(e){super(),this.value=[],this.reservedRange=[],this.reservedName=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iV().fromBinary(e,t)}static fromJson(e,t){return new iV().fromJson(e,t)}static fromJsonString(e,t){return new iV().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iV,e,t)}}iV.runtime=iR,iV.typeName="google.protobuf.EnumDescriptorProto",iV.fields=iR.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"value",kind:"message",T:iq,repeated:!0},{no:3,name:"options",kind:"message",T:iQ,opt:!0},{no:4,name:"reserved_range",kind:"message",T:iG,repeated:!0},{no:5,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class iG extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new iG().fromBinary(e,t)}static fromJson(e,t){return new iG().fromJson(e,t)}static fromJsonString(e,t){return new iG().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iG,e,t)}}iG.runtime=iR,iG.typeName="google.protobuf.EnumDescriptorProto.EnumReservedRange",iG.fields=iR.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class iq extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new iq().fromBinary(e,t)}static fromJson(e,t){return new iq().fromJson(e,t)}static fromJsonString(e,t){return new iq().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iq,e,t)}}iq.runtime=iR,iq.typeName="google.protobuf.EnumValueDescriptorProto",iq.fields=iR.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"number",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:i0,opt:!0}]);class iY extends rk{constructor(e){super(),this.method=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iY().fromBinary(e,t)}static fromJson(e,t){return new iY().fromJson(e,t)}static fromJsonString(e,t){return new iY().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iY,e,t)}}iY.runtime=iR,iY.typeName="google.protobuf.ServiceDescriptorProto",iY.fields=iR.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"method",kind:"message",T:iW,repeated:!0},{no:3,name:"options",kind:"message",T:i1,opt:!0}]);class iW extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new iW().fromBinary(e,t)}static fromJson(e,t){return new iW().fromJson(e,t)}static fromJsonString(e,t){return new iW().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iW,e,t)}}iW.runtime=iR,iW.typeName="google.protobuf.MethodDescriptorProto",iW.fields=iR.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"input_type",kind:"scalar",T:9,opt:!0},{no:3,name:"output_type",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:i2,opt:!0},{no:5,name:"client_streaming",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"server_streaming",kind:"scalar",T:8,opt:!0,default:!1}]);class iX extends rk{constructor(e){super(),this.uninterpretedOption=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iX().fromBinary(e,t)}static fromJson(e,t){return new iX().fromJson(e,t)}static fromJsonString(e,t){return new iX().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iX,e,t)}}iX.runtime=iR,iX.typeName="google.protobuf.FileOptions",iX.fields=iR.util.newFieldList(()=>[{no:1,name:"java_package",kind:"scalar",T:9,opt:!0},{no:8,name:"java_outer_classname",kind:"scalar",T:9,opt:!0},{no:10,name:"java_multiple_files",kind:"scalar",T:8,opt:!0,default:!1},{no:20,name:"java_generate_equals_and_hash",kind:"scalar",T:8,opt:!0},{no:27,name:"java_string_check_utf8",kind:"scalar",T:8,opt:!0,default:!1},{no:9,name:"optimize_for",kind:"enum",T:iR.getEnumType(eX),opt:!0,default:eX.SPEED},{no:11,name:"go_package",kind:"scalar",T:9,opt:!0},{no:16,name:"cc_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"java_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:18,name:"py_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:23,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:31,name:"cc_enable_arenas",kind:"scalar",T:8,opt:!0,default:!0},{no:36,name:"objc_class_prefix",kind:"scalar",T:9,opt:!0},{no:37,name:"csharp_namespace",kind:"scalar",T:9,opt:!0},{no:39,name:"swift_prefix",kind:"scalar",T:9,opt:!0},{no:40,name:"php_class_prefix",kind:"scalar",T:9,opt:!0},{no:41,name:"php_namespace",kind:"scalar",T:9,opt:!0},{no:44,name:"php_metadata_namespace",kind:"scalar",T:9,opt:!0},{no:45,name:"ruby_package",kind:"scalar",T:9,opt:!0},{no:50,name:"features",kind:"message",T:i6,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:i3,repeated:!0}]),(T=eX||(eX={}))[T.SPEED=1]="SPEED",T[T.CODE_SIZE=2]="CODE_SIZE",T[T.LITE_RUNTIME=3]="LITE_RUNTIME",iR.util.setEnumType(eX,"google.protobuf.FileOptions.OptimizeMode",[{no:1,name:"SPEED"},{no:2,name:"CODE_SIZE"},{no:3,name:"LITE_RUNTIME"}]);class iK extends rk{constructor(e){super(),this.uninterpretedOption=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iK().fromBinary(e,t)}static fromJson(e,t){return new iK().fromJson(e,t)}static fromJsonString(e,t){return new iK().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iK,e,t)}}iK.runtime=iR,iK.typeName="google.protobuf.MessageOptions",iK.fields=iR.util.newFieldList(()=>[{no:1,name:"message_set_wire_format",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"no_standard_descriptor_accessor",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:7,name:"map_entry",kind:"scalar",T:8,opt:!0},{no:11,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:12,name:"features",kind:"message",T:i6,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:i3,repeated:!0}]);class iH extends rk{constructor(e){super(),this.targets=[],this.editionDefaults=[],this.uninterpretedOption=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iH().fromBinary(e,t)}static fromJson(e,t){return new iH().fromJson(e,t)}static fromJsonString(e,t){return new iH().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iH,e,t)}}iH.runtime=iR,iH.typeName="google.protobuf.FieldOptions",iH.fields=iR.util.newFieldList(()=>[{no:1,name:"ctype",kind:"enum",T:iR.getEnumType(eK),opt:!0,default:eK.STRING},{no:2,name:"packed",kind:"scalar",T:8,opt:!0},{no:6,name:"jstype",kind:"enum",T:iR.getEnumType(eH),opt:!0,default:eH.JS_NORMAL},{no:5,name:"lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:15,name:"unverified_lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:10,name:"weak",kind:"scalar",T:8,opt:!0,default:!1},{no:16,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"retention",kind:"enum",T:iR.getEnumType(eZ),opt:!0},{no:19,name:"targets",kind:"enum",T:iR.getEnumType(ez),repeated:!0},{no:20,name:"edition_defaults",kind:"message",T:iZ,repeated:!0},{no:21,name:"features",kind:"message",T:i6,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:i3,repeated:!0}]),(y=eK||(eK={}
1))[y.STRING=0]="STRING",y[y.CORD=1]="CORD",y[y.STRING_PIECE=2]="STRING_PIECE",iR.util.setEnumType(eK,"google.protobuf.FieldOptions.CType",[{no:0,name:"STRING"},{no:1,name:"CORD"},{no:2,name:"STRING_PIECE"}]),(I=eH||(eH={}))[I.JS_NORMAL=0]="JS_NORMAL",I[I.JS_STRING=1]="JS_STRING",I[I.JS_NUMBER=2]="JS_NUMBER",iR.util.setEnumType(eH,"google.protobuf.FieldOptions.JSType",[{no:0,name:"JS_NORMAL"},{no:1,name:"JS_STRING"},{no:2,name:"JS_NUMBER"}]),(N=eZ||(eZ={}))[N.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",N[N.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",N[N.RETENTION_SOURCE=2]="RETENTION_SOURCE",iR.util.setEnumType(eZ,"google.protobuf.FieldOptions.OptionRetention",[{no:0,name:"RETENTION_UNKNOWN"},{no:1,name:"RETENTION_RUNTIME"},{no:2,name:"RETENTION_SOURCE"}]),(E=ez||(ez={}))[E.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",E[E.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",E[E.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",E[E.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",E[E.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",E[E.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",E[E.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",E[E.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",E[E.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",E[E.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD",iR.util.setEnumType(ez,"google.protobuf.FieldOptions.OptionTargetType",[{no:0,name:"TARGET_TYPE_UNKNOWN"},{no:1,name:"TARGET_TYPE_FILE"},{no:2,name:"TARGET_TYPE_EXTENSION_RANGE"},{no:3,name:"TARGET_TYPE_MESSAGE"},{no:4,name:"TARGET_TYPE_FIELD"},{no:5,name:"TARGET_TYPE_ONEOF"},{no:6,name:"TARGET_TYPE_ENUM"},{no:7,name:"TARGET_TYPE_ENUM_ENTRY"},{no:8,name:"TARGET_TYPE_SERVICE"},{no:9,name:"TARGET_TYPE_METHOD"}]);class iZ extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new iZ().fromBinary(e,t)}static fromJson(e,t){return new iZ().fromJson(e,t)}static fromJsonString(e,t){return new iZ().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iZ,e,t)}}iZ.runtime=iR,iZ.typeName="google.protobuf.FieldOptions.EditionDefault",iZ.fields=iR.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:iR.getEnumType(eG),opt:!0},{no:2,name:"value",kind:"scalar",T:9,opt:!0}]);class iz extends rk{constructor(e){super(),this.uninterpretedOption=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iz().fromBinary(e,t)}static fromJson(e,t){return new iz().fromJson(e,t)}static fromJsonString(e,t){return new iz().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iz,e,t)}}iz.runtime=iR,iz.typeName="google.protobuf.OneofOptions",iz.fields=iR.util.newFieldList(()=>[{no:1,name:"features",kind:"message",T:i6,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:i3,repeated:!0}]);class iQ extends rk{constructor(e){super(),this.uninterpretedOption=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new iQ().fromBinary(e,t)}static fromJson(e,t){return new iQ().fromJson(e,t)}static fromJsonString(e,t){return new iQ().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(iQ,e,t)}}iQ.runtime=iR,iQ.typeName="google.protobuf.EnumOptions",iQ.fields=iR.util.newFieldList(()=>[{no:2,name:"allow_alias",kind:"scalar",T:8,opt:!0},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:7,name:"features",kind:"message",T:i6,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:i3,repeated:!0}]);class i0 extends rk{constructor(e){super(),this.uninterpretedOption=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new i0().fromBinary(e,t)}static fromJson(e,t){return new i0().fromJson(e,t)}static fromJsonString(e,t){return new i0().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i0,e,t)}}i0.runtime=iR,i0.typeName="google.protobuf.EnumValueOptions",i0.fields=iR.util.newFieldList(()=>[{no:1,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"features",kind:"message",T:i6,opt:!0},{no:3,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:i3,repeated:!0}]);class i1 extends rk{constructor(e){super(),this.uninterpretedOption=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new i1().fromBinary(e,t)}static fromJson(e,t){return new i1().fromJson(e,t)}static fromJsonString(e,t){return new i1().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i1,e,t)}}i1.runtime=iR,i1.typeName="google.protobuf.ServiceOptions",i1.fields=iR.util.newFieldList(()=>[{no:34,name:"features",kind:"message",T:i6,opt:!0},{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:i3,repeated:!0}]);class i2 extends rk{constructor(e){super(),this.uninterpretedOption=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new i2().fromBinary(e,t)}static fromJson(e,t){return new i2().fromJson(e,t)}static fromJsonString(e,t){return new i2().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i2,e,t)}}i2.runtime=iR,i2.typeName="google.protobuf.MethodOptions",i2.fields=iR.util.newFieldList(()=>[{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:34,name:"idempotency_level",kind:"enum",T:iR.getEnumType(eQ),opt:!0,default:eQ.IDEMPOTENCY_UNKNOWN},{no:35,name:"features",kind:"message",T:i6,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:i3,repeated:!0}]),(k=eQ||(eQ={}))[k.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",k[k.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",k[k.IDEMPOTENT=2]="IDEMPOTENT",iR.util.setEnumType(eQ,"google.protobuf.MethodOptions.IdempotencyLevel",[{no:0,name:"IDEMPOTENCY_UNKNOWN"},{no:1,name:"NO_SIDE_EFFECTS"},{no:2,name:"IDEMPOTENT"}]);class i3 extends rk{constructor(e){super(),this.name=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new i3().fromBinary(e,t)}static fromJson(e,t){return new i3().fromJson(e,t)}static fromJsonString(e,t){return new i3().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i3,e,t)}}i3.runtime=iR,i3.typeName="google.protobuf.UninterpretedOption",i3.fields=iR.util.newFieldList(()=>[{no:2,name:"name",kind:"message",T:i4,repeated:!0},{no:3,name:"identifier_value",kind:"scalar",T:9,opt:!0},{no:4,name:"positive_int_value",kind:"scalar",T:4,opt:!0},{no:5,name:"negative_int_value",kind:"scalar",T:3,opt:!0},{no:6,name:"double_value",kind:"scalar",T:1,opt:!0},{no:7,name:"string_value",kind:"scalar",T:12,opt:!0},{no:8,name:"aggregate_value",kind:"scalar",T:9,opt:!0}]);class i4 extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new i4().fromBinary(e,t)}static fromJson(e,t){return new i4().fromJson(e,t)}static fromJsonString(e,t){return new i4().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i4,e,t)}}i4.runtime=iR,i4.typeName="google.protobuf.UninterpretedOption.NamePart",i4.fields=iR.util.newFieldList(()=>[{no:1,name:"name_part",kind:"scalar",T:9,req:!0},{no:2,name:"is_extension",kind:"scalar",T:8,req:!0}]);class i6 extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new i6().fromBinary(e,t)}static fromJson(e,t){return new i6().fromJson(e,t)}static fromJsonString(e,t){return new i6().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i6,e,t)}}i6.runtime=iR,i6.typeName="google.protobuf.FeatureSet",i6.fields=iR.util.newFieldList(()=>[{no:1,name:"field_presence",kind:"enum",T:iR.getEnumType(e0),opt:!0},{no:2,name:"enum_type",kind:"enum",T:iR.getEnumType(e1),opt:!0},{no:3,name:"repeated_field_encoding",kind:"enum",T:iR.getEnumType(e2),opt:!0},{no:4,name:"utf8_validation",kind:"enum",T:iR.getEnumType(e3),opt:!0},{no:5,name:"message_encoding",kind:"enum",T:iR.getEnumType(e4),opt:!0},{no:6,name:"json_format",kind:"enum",T:iR.getEnumType(e6),opt:!0}]),(b=e0||(e0={}))[b.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",b[b.EXPLICIT=1]="EXPLICIT",b[b.IMPLICIT=2]="IMPLICIT",b[b.LEGACY_REQUIRED=3]="LEGACY_REQUIRED",iR.util.setEnumType(e0,"google.protobuf.FeatureSet.FieldPresence",[{no:0,name:"FIELD_PRESENCE_UNKNOWN"},{no:1,name:"EXPLICIT"},{no:2,name:"IMPLICIT"},{no:3,name:"LEGACY_REQUIRED"}]),(_=e1||(e1={}))[_.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",_[_.OPEN=1]="OPEN",_[_.CLOSED=2]="CLOSED",iR.util.setEnumType(e1,"google.protobuf.FeatureSet.EnumType",[{no:0,name:"ENUM_TYPE_UNKNOWN"},{no:1,name:"OPEN"},{no:2,name:"CLOSED"}]),(w=e2||(e2={}
1))[w.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",w[w.PACKED=1]="PACKED",w[w.EXPANDED=2]="EXPANDED",iR.util.setEnumType(e2,"google.protobuf.FeatureSet.RepeatedFieldEncoding",[{no:0,name:"REPEATED_FIELD_ENCODING_UNKNOWN"},{no:1,name:"PACKED"},{no:2,name:"EXPANDED"}]),(v=e3||(e3={}))[v.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",v[v.VERIFY=2]="VERIFY",v[v.NONE=3]="NONE",iR.util.setEnumType(e3,"google.protobuf.FeatureSet.Utf8Validation",[{no:0,name:"UTF8_VALIDATION_UNKNOWN"},{no:2,name:"VERIFY"},{no:3,name:"NONE"}]),(O=e4||(e4={}))[O.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",O[O.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",O[O.DELIMITED=2]="DELIMITED",iR.util.setEnumType(e4,"google.protobuf.FeatureSet.MessageEncoding",[{no:0,name:"MESSAGE_ENCODING_UNKNOWN"},{no:1,name:"LENGTH_PREFIXED"},{no:2,name:"DELIMITED"}]),(S=e6||(e6={}))[S.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",S[S.ALLOW=1]="ALLOW",S[S.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT",iR.util.setEnumType(e6,"google.protobuf.FeatureSet.JsonFormat",[{no:0,name:"JSON_FORMAT_UNKNOWN"},{no:1,name:"ALLOW"},{no:2,name:"LEGACY_BEST_EFFORT"}]);class i9 extends rk{constructor(e){super(),this.defaults=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new i9().fromBinary(e,t)}static fromJson(e,t){return new i9().fromJson(e,t)}static fromJsonString(e,t){return new i9().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i9,e,t)}}i9.runtime=iR,i9.typeName="google.protobuf.FeatureSetDefaults",i9.fields=iR.util.newFieldList(()=>[{no:1,name:"defaults",kind:"message",T:i8,repeated:!0},{no:4,name:"minimum_edition",kind:"enum",T:iR.getEnumType(eG),opt:!0},{no:5,name:"maximum_edition",kind:"enum",T:iR.getEnumType(eG),opt:!0}]);class i8 extends rk{constructor(e){super(),iR.util.initPartial(e,this)}static fromBinary(e,t){return new i8().fromBinary(e,t)}static fromJson(e,t){return new i8().fromJson(e,t)}static fromJsonString(e,t){return new i8().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i8,e,t)}}i8.runtime=iR,i8.typeName="google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault",i8.fields=iR.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:iR.getEnumType(eG),opt:!0},{no:2,name:"features",kind:"message",T:i6,opt:!0}]);class i7 extends rk{constructor(e){super(),this.location=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new i7().fromBinary(e,t)}static fromJson(e,t){return new i7().fromJson(e,t)}static fromJsonString(e,t){return new i7().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i7,e,t)}}i7.runtime=iR,i7.typeName="google.protobuf.SourceCodeInfo",i7.fields=iR.util.newFieldList(()=>[{no:1,name:"location",kind:"message",T:i5,repeated:!0}]);class i5 extends rk{constructor(e){super(),this.path=[],this.span=[],this.leadingDetachedComments=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new i5().fromBinary(e,t)}static fromJson(e,t){return new i5().fromJson(e,t)}static fromJsonString(e,t){return new i5().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(i5,e,t)}}i5.runtime=iR,i5.typeName="google.protobuf.SourceCodeInfo.Location",i5.fields=iR.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"span",kind:"scalar",T:5,repeated:!0,packed:!0},{no:3,name:"leading_comments",kind:"scalar",T:9,opt:!0},{no:4,name:"trailing_comments",kind:"scalar",T:9,opt:!0},{no:6,name:"leading_detached_comments",kind:"scalar",T:9,repeated:!0}]);class ae extends rk{constructor(e){super(),this.annotation=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new ae().fromBinary(e,t)}static fromJson(e,t){return new ae().fromJson(e,t)}static fromJsonString(e,t){return new ae().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(ae,e,t)}}ae.runtime=iR,ae.typeName="google.protobuf.GeneratedCodeInfo",ae.fields=iR.util.newFieldList(()=>[{no:1,name:"annotation",kind:"message",T:at,repeated:!0}]);class at extends rk{constructor(e){super(),this.path=[],iR.util.initPartial(e,this)}static fromBinary(e,t){return new at().fromBinary(e,t)}static fromJson(e,t){return new at().fromJson(e,t)}static fromJsonString(e,t){return new at().fromJsonString(e,t)}static equals(e,t){return iR.util.equals(at,e,t)}}at.runtime=iR,at.typeName="google.protobuf.GeneratedCodeInfo.Annotation",at.fields=iR.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"source_file",kind:"scalar",T:9,opt:!0},{no:3,name:"begin",kind:"scalar",T:5,opt:!0},{no:4,name:"end",kind:"scalar",T:5,opt:!0},{no:5,name:"semantic",kind:"enum",T:iR.getEnumType(e9),opt:!0}]),(A=e9||(e9={}))[A.NONE=0]="NONE",A[A.SET=1]="SET",A[A.ALIAS=2]="ALIAS",iR.util.setEnumType(e9,"google.protobuf.GeneratedCodeInfo.Annotation.Semantic",[{no:0,name:"NONE"},{no:1,name:"SET"},{no:2,name:"ALIAS"}]),iO.makeExtension("ibotta.tracking.common.v1.add_interface",iK,{no:59100,kind:"scalar",T:9,repeated:!0}),iO.makeExtension("ibotta.tracking.common.v1.is_interface",iK,{no:59110,kind:"scalar",T:8}),(F=e8||(e8={}))[F.UNSPECIFIED=0]="UNSPECIFIED",F[F.IOS=10]="IOS",F[F.ANDROID=20]="ANDROID",F[F.WEBAPP=30]="WEBAPP",F[F.WEB_V2=40]="WEB_V2",F[F.KINDLE=50]="KINDLE",F[F.BROWSER_EXTENSION=60]="BROWSER_EXTENSION",F[F.UNIFIED_ACCOUNT_LINKING=70]="UNIFIED_ACCOUNT_LINKING",F[F.BRAZE=80]="BRAZE",F[F.CONNECTION_CONTENT=90]="CONNECTION_CONTENT",F[F.IPN_PARTNER_PORTAL=100]="IPN_PARTNER_PORTAL",F[F.IPN_CLIENT_PORTAL=110]="IPN_CLIENT_PORTAL",F[F.IPN_PORTAL=120]="IPN_PORTAL",F[F.MARKETING_CONSUMER=130]="MARKETING_CONSUMER",F[F.MARKETING_CORPORATE=140]="MARKETING_CORPORATE",iO.util.setEnumType(e8,"ibotta.tracking.common.v1.IbottaPlatform",[{no:0,name:"IBOTTA_PLATFORM_UNSPECIFIED"},{no:10,name:"IBOTTA_PLATFORM_IOS"},{no:20,name:"IBOTTA_PLATFORM_ANDROID"},{no:30,name:"IBOTTA_PLATFORM_WEBAPP"},{no:40,name:"IBOTTA_PLATFORM_WEB_V2"},{no:50,name:"IBOTTA_PLATFORM_KINDLE"},{no:60,name:"IBOTTA_PLATFORM_BROWSER_EXTENSION"},{no:70,name:"IBOTTA_PLATFORM_UNIFIED_ACCOUNT_LINKING"},{no:80,name:"IBOTTA_PLATFORM_BRAZE"},{no:90,name:"IBOTTA_PLATFORM_CONNECTION_CONTENT"},{no:100,name:"IBOTTA_PLATFORM_IPN_PARTNER_PORTAL"},{no:110,name:"IBOTTA_PLATFORM_IPN_CLIENT_PORTAL"},{no:120,name:"IBOTTA_PLATFORM_IPN_PORTAL"},{no:130,name:"IBOTTA_PLATFORM_MARKETING_CONSUMER"},{no:140,name:"IBOTTA_PLATFORM_MARKETING_CORPORATE"}]);class an extends rk{lat=0;lng=0;horizontalAccuracyMeters=0;constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.Location";static fields=iO.util.newFieldList(()=>[{no:10,name:"lat",kind:"scalar",T:1},{no:20,name:"lng",kind:"scalar",T:1},{no:30,name:"horizontal_accuracy_meters",kind:"scalar",T:1}]);static fromBinary(e,t){return new an().fromBinary(e,t)}static fromJson(e,t){return new an().fromJson(e,t)}static fromJsonString(e,t){return new an().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(an,e,t)}}class ar extends rk{eventId="";trackedAt;userId="";earlyIdentifier="";appVersion="";platform=e8.UNSPECIFIED;osName="";osVersion="";deviceId="";
1deviceAdvertiserId="";deviceModel="";globalSessionId="";location;constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.TrackingHeader";static fields=iO.util.newFieldList(()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:10,name:"tracked_at",kind:"message",T:iF},{no:20,name:"user_id",kind:"scalar",T:9},{no:30,name:"early_identifier",kind:"scalar",T:9},{no:40,name:"app_version",kind:"scalar",T:9},{no:50,name:"platform",kind:"enum",T:iO.getEnumType(e8)},{no:60,name:"os_name",kind:"scalar",T:9},{no:70,name:"os_version",kind:"scalar",T:9},{no:80,name:"device_id",kind:"scalar",T:9},{no:90,name:"device_advertiser_id",kind:"scalar",T:9},{no:100,name:"device_model",kind:"scalar",T:9},{no:120,name:"global_session_id",kind:"scalar",T:9},{no:130,name:"location",kind:"message",T:an}]);static fromBinary(e,t){return new ar().fromBinary(e,t)}static fromJson(e,t){return new ar().fromJson(e,t)}static fromJsonString(e,t){return new ar().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(ar,e,t)}}class ai extends rk{eventHeader;trackingHeader;constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.EventShape";static fields=iO.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:iB},{no:2,name:"tracking_header",kind:"message",T:ar}]);static fromBinary(e,t){return new ai().fromBinary(e,t)}static fromJson(e,t){return new ai().fromJson(e,t)}static fromJsonString(e,t){return new ai().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(ai,e,t)}}class aa extends rk{id="";featureFlag="";props={};constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.Experiment";static fields=iO.util.newFieldList(()=>[{no:10,name:"id",kind:"scalar",T:9},{no:20,name:"feature_flag",kind:"scalar",T:9},{no:30,name:"props",kind:"map",K:9,V:{kind:"scalar",T:9}}]);static fromBinary(e,t){return new aa().fromBinary(e,t)}static fromJson(e,t){return new aa().fromJson(e,t)}static fromJsonString(e,t){return new aa().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(aa,e,t)}}(D=e7||(e7={}))[D.UNSPECIFIED=0]="UNSPECIFIED",D[D.USD=1]="USD",iO.util.setEnumType(e7,"ibotta.tracking.common.v1.Currency",[{no:0,name:"CURRENCY_UNSPECIFIED"},{no:1,name:"CURRENCY_USD"}]);class as extends rk{currency=e7.UNSPECIFIED;micros=rR.zero;constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.Money";static fields=iO.util.newFieldList(()=>[{no:1,name:"currency",kind:"enum",T:iO.getEnumType(e7)},{no:2,name:"micros",kind:"scalar",T:3}]);static fromBinary(e,t){return new as().fromBinary(e,t)}static fromJson(e,t){return new as().fromJson(e,t)}static fromJsonString(e,t){return new as().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(as,e,t)}}class ao extends rk{reward={case:void 0};constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.RewardProperties";static fields=iO.util.newFieldList(()=>[{no:110,name:"amount",kind:"message",T:as,oneof:"reward"},{no:120,name:"percent",kind:"scalar",T:2,oneof:"reward"}]);static fromBinary(e,t){return new ao().fromBinary(e,t)}static fromJson(e,t){return new ao().fromJson(e,t)}static fromJsonString(e,t){return new ao().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(ao,e,t)}}class al extends rk{sessionId="";actionId="";constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.SearchProperties";static fields=iO.util.newFieldList(()=>[{no:100,name:"session_id",kind:"scalar",T:9},{no:110,name:"action_id",kind:"scalar",T:9}]);static fromBinary(e,t){return new al().fromBinary(e,t)}static fromJson(e,t){return new al().fromJson(e,t)}static fromJsonString(e,t){return new al().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(al,e,t)}}class au extends rk{name="";index=0;constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.ModuleProperties";static fields=iO.util.newFieldList(()=>[{no:100,name:"name",kind:"scalar",T:9},{no:110,name:"index",kind:"scalar",T:5}]);static fromBinary(e,t){return new au().fromBinary(e,t)}static fromJson(e,t){return new au().fromJson(e,t)}static fromJsonString(e,t){return new au().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(au,e,t)}}class ac extends rk{campaign="";content="";medium="";source="";constructor(e){super(),iO.util.initPartial(e,this)}static runtime=iO;static typeName="ibotta.tracking.common.v1.UTM";static fields=iO.util.newFieldList(()=>[{no:100,name:"campaign",kind:"scalar",T:9},{no:110,name:"content",kind:"scalar",T:9},{no:120,name:"medium",kind:"scalar",T:9},{no:130,name:"source",kind:"scalar",T:9}]);static fromBinary(e,t){return new ac().fromBinary(e,t)}static fromJson(e,t){return new ac().fromJson(e,t)}static fromJsonString(e,t){return new ac().fromJsonString(e,t)}static equals(e,t){return iO.util.equals(ac,e,t)}}(B=e5||(e5={}))[B.UNSPECIFIED=0]="UNSPECIFIED",B[B.BUTTON=1]="BUTTON",B[B.ROW_CLICK=2]="ROW_CLICK",B[B.SWIPE=3]="SWIPE",B[B.FILTER=4]="FILTER",B[B.SORT=5]="SORT",B[B.WIDGET=6]="WIDGET",iO.util.setEnumType(e5,"ibotta.tracking.common.v1.InteractionType",[{no:0,name:"INTERACTION_TYPE_UNSPECIFIED"},{no:1,name:"INTERACTION_TYPE_BUTTON"},{no:2,name:"INTERACTION_TYPE_ROW_CLICK"},{no:3,name:"INTERACTION_TYPE_SWIPE"},{no:4,name:"INTERACTION_TYPE_FILTER"},{no:5,name:"INTERACTION_TYPE_SORT"},{no:6,name:"INTERACTION_TYPE_WIDGET"}]),(R=te||(te={}))[R.UNSPECIFIED=0]="UNSPECIFIED",R[R.IBOTTA=1]="IBOTTA",R[R.KEVEL=2]="KEVEL",iO.util.setEnumType(te,"ibotta.tracking.common.v1.AdSource",[{no:0,name:"AD_SOURCE_UNSPECIFIED"},{no:1,name:"AD_SOURCE_IBOTTA"},{no:2,name:"AD_SOURCE_KEVEL"}]),(P=tt||(tt={}))[P.UNSPECIFIED=0]="UNSPECIFIED",P[P.AUTHORIZED_WHILE_IN_USE=1]="AUTHORIZED_WHILE_IN_USE",P[P.DENIED=2]="DENIED",P[P.NOT_DETERMINED=3]="NOT_DETERMINED",P[P.ACCEPTED=4]="ACCEPTED",
1iO.util.setEnumType(tt,"ibotta.tracking.common.v1.LocationPermission",[{no:0,name:"LOCATION_PERMISSION_UNSPECIFIED"},{no:1,name:"LOCATION_PERMISSION_AUTHORIZED_WHILE_IN_USE"},{no:2,name:"LOCATION_PERMISSION_DENIED"},{no:3,name:"LOCATION_PERMISSION_NOT_DETERMINED"},{no:4,name:"LOCATION_PERMISSION_ACCEPTED"}]),(U=tn||(tn={}))[U.UNSPECIFIED=0]="UNSPECIFIED",U[U.FULL_ACCURACY=1]="FULL_ACCURACY",U[U.REDUCED_ACCURACY=2]="REDUCED_ACCURACY",iO.util.setEnumType(tn,"ibotta.tracking.common.v1.LocationAccuracyPermission",[{no:0,name:"LOCATION_ACCURACY_PERMISSION_UNSPECIFIED"},{no:1,name:"LOCATION_ACCURACY_PERMISSION_FULL_ACCURACY"},{no:2,name:"LOCATION_ACCURACY_PERMISSION_REDUCED_ACCURACY"}]),(x=tr||(tr={}))[x.UNSPECIFIED=0]="UNSPECIFIED",x[x.AUTHORIZED=1]="AUTHORIZED",x[x.DENIED=2]="DENIED",x[x.NOT_DETERMINED=3]="NOT_DETERMINED",x[x.PROVISIONAL=4]="PROVISIONAL",iO.util.setEnumType(tr,"ibotta.tracking.common.v1.PushPermission",[{no:0,name:"PUSH_PERMISSION_UNSPECIFIED"},{no:1,name:"PUSH_PERMISSION_AUTHORIZED"},{no:2,name:"PUSH_PERMISSION_DENIED"},{no:3,name:"PUSH_PERMISSION_NOT_DETERMINED"},{no:4,name:"PUSH_PERMISSION_PROVISIONAL"}]),(L=ti||(ti={}))[L.UNSPECIFIED=0]="UNSPECIFIED",L[L.AUTHORIZED=1]="AUTHORIZED",L[L.DENIED=2]="DENIED",L[L.NOT_DETERMINED=3]="NOT_DETERMINED",L[L.RESTRICTED=4]="RESTRICTED",iO.util.setEnumType(ti,"ibotta.tracking.common.v1.AppTrackingPermission",[{no:0,name:"APP_TRACKING_PERMISSION_UNSPECIFIED"},{no:1,name:"APP_TRACKING_PERMISSION_AUTHORIZED"},{no:2,name:"APP_TRACKING_PERMISSION_DENIED"},{no:3,name:"APP_TRACKING_PERMISSION_NOT_DETERMINED"},{no:4,name:"APP_TRACKING_PERMISSION_RESTRICTED"}]),(C=ta||(ta={}))[C.UNSPECIFIED=0]="UNSPECIFIED",C[C.IOS=1]="IOS",C[C.ANDROID=2]="ANDROID",C[C.WEB_MOBILE=3]="WEB_MOBILE",C[C.WEB_DESKTOP=4]="WEB_DESKTOP",iO.util.setEnumType(ta,"ibotta.tracking.common.v1.RegistrationContext",[{no:0,name:"REGISTRATION_CONTEXT_UNSPECIFIED"},{no:1,name:"REGISTRATION_CONTEXT_IOS"},{no:2,name:"REGISTRATION_CONTEXT_ANDROID"},{no:3,name:"REGISTRATION_CONTEXT_WEB_MOBILE"},{no:4,name:"REGISTRATION_CONTEXT_WEB_DESKTOP"}]);for(var ad={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},af=new Uint8Array(16),am=[],ap=0;ap<256;++ap)am.push((ap+256).toString(16).slice(1));var ah=function(e,t,n){if(ad.randomUUID&&!t&&!e)return ad.randomUUID();var r=(e=e||{}).random||(e.rng||function(){if(!ts&&!(ts="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ts(af)})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return function(e,t=0){return(am[e[t+0]]+am[e[t+1]]+am[e[t+2]]+am[e[t+3]]+"-"+am[e[t+4]]+am[e[t+5]]+"-"+am[e[t+6]]+am[e[t+7]]+"-"+am[e[t+8]]+am[e[t+9]]+"-"+am[e[t+10]]+am[e[t+11]]+am[e[t+12]]+am[e[t+13]]+am[e[t+14]]+am[e[t+15]]).toLowerCase()}(r)};class ag{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){let n=this.getType().runtime.bin,r=n.makeReadOptions(t);return n.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){let n=this.getType(),r=n.runtime.json,i=r.makeReadOptions(t);return r.readMessage(n,e,i,this),this}fromJsonString(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`cannot decode ${this.getType().typeName} from JSON: ${e instanceof Error?e.message:String(e)}`)}return this.fromJson(n,t)}toBinary(e){let t=this.getType().runtime.bin,n=t.makeWriteOptions(e),r=n.writerFactory();return t.writeMessage(this,r,n),r.finish()}toJson(e){let t=this.getType().runtime.json,n=t.makeWriteOptions(e);return t.writeMessage(this,n)}toJsonString(e){var t;return JSON.stringify(this.toJson(e),null,null!==(t=null==e?void 0:e.prettySpaces)&&void 0!==t?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function aT(e,t){if(!e)throw Error(t)}function ay(e){if("number"!=typeof e)throw Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error("invalid int 32: "+e)}function aI(e){if("number"!=typeof e)throw Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error("invalid uint 32: "+e)}function aN(e){if("number"!=typeof e)throw Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error("invalid float 32: "+e)}let aE=Symbol("@bufbuild/protobuf/enum-type");function ak(e,t,n,r){e[aE]=ab(t,n.map(t=>({no:t.no,name:t.name,localName:e[t.no]})),r)}function ab(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let e of t){let t=a_(e);a.push(t),r[e.name]=t,i[e.no]=t}return{typeName:e,values:a,findName:e=>r[e],findNumber:e=>i[e]}}function a_(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}function aw(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(15&n)<<28,t=(112&n)>>4,(128&n)==0)return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}throw Error("invalid varint")}function av(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(i>>>7==0&&0==t),s=(a?128|i:i)&255;if(n.push(s),!a)return}let r=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(n.push((i?128|r:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=r>>>7!=0,a=(i?128|r:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}function aO(e){let t="-"===e[0];t&&(e=e.slice(1));let n=0,r=0;function i(t,i){let a=Number(e.slice(t,i));r*=1e6,(n=1e6*n+a)>=4294967296&&(r+=n/4294967296|0,n%=4294967296)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?aF(n,r):aA(n,r)}function aS(e,t){if({lo:e,hi:t}={lo:e>>>0,hi:t>>>0},t<=2097151)return String(4294967296*t+e);let n=16777215&e,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+6777216*r+6710656*i,s=r+8147497*i,o=2*i;return a>=1e7&&(s+=Math.floor(a/1e7),a%=1e7),s>=1e7&&(o+=Math.floor(s/1e7),s%=1e7),o.toString()+aD(s)+aD(a)}function aA(e,t){return{lo:0|e,hi:0|t}}function aF(e,t){return t=~t,e?e=~e+1:t+=1,aA(e,t)}let aD=e=>{let t=String(e);return"0000000".slice(t.length)+t};function aB(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(127&e|128),e>>=7;t.push(1)}}function aR(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;
1t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}var aP=n(74859);let aU=function(){let e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&("object"!=typeof aP||"object"!=typeof aP.env||"1"!==aP.env.BUF_BIGINT_DISABLE)){let t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){let r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw Error(`int64 invalid: ${e}`);return r},uParse(e){let t="bigint"==typeof e?e:BigInt(e);if(t>i||t<r)throw Error(`uint64 invalid: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}let t=e=>aT(/^-?[0-9]+$/.test(e),`int64 invalid: ${e}`),n=e=>aT(/^[0-9]+$/.test(e),`uint64 invalid: ${e}`);return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),t(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),n(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),t(e),aO(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),n(e),aO(e)),dec:(e,t)=>(function(e,t){let n=aA(e,t),r=2147483648&n.hi;r&&(n=aF(n.lo,n.hi));let i=aS(n.lo,n.hi);return r?"-"+i:i})(e,t),uDec:(e,t)=>aS(e,t)}}();function ax(e,t,n){if(t===n)return!0;if(e==to.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case to.UINT64:case to.FIXED64:case to.INT64:case to.SFIXED64:case to.SINT64:return t==n}return!1}function aL(e,t){switch(e){case to.BOOL:return!1;case to.UINT64:case to.FIXED64:case to.INT64:case to.SFIXED64:case to.SINT64:return 0==t?aU.zero:"0";case to.DOUBLE:case to.FLOAT:return 0;case to.BYTES:return new Uint8Array(0);case to.STRING:return"";default:return 0}}function aC(e,t){switch(e){case to.BOOL:return!1===t;case to.STRING:return""===t;case to.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return 0==t}}function aJ(e){let t=e.field.localName,n=Object.create(null);return n[t]=function(e){let t=e.field;if(t.repeated)return[];if(void 0!==t.default)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return aL(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}(e),[n,()=>n[t]]}(J=to||(to={}))[J.DOUBLE=1]="DOUBLE",J[J.FLOAT=2]="FLOAT",J[J.INT64=3]="INT64",J[J.UINT64=4]="UINT64",J[J.INT32=5]="INT32",J[J.FIXED64=6]="FIXED64",J[J.FIXED32=7]="FIXED32",J[J.BOOL=8]="BOOL",J[J.STRING=9]="STRING",J[J.BYTES=12]="BYTES",J[J.UINT32=13]="UINT32",J[J.SFIXED32=15]="SFIXED32",J[J.SFIXED64=16]="SFIXED64",J[J.SINT32=17]="SINT32",J[J.SINT64=18]="SINT64",(j=tl||(tl={}))[j.BIGINT=0]="BIGINT",j[j.STRING=1]="STRING";let aj="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),aM=[];for(let e=0;e<aj.length;e++)aM[aj[e].charCodeAt(0)]=e;aM["-".charCodeAt(0)]=aj.indexOf("+"),aM["_".charCodeAt(0)]=aj.indexOf("/");let a$={dec(e){let t=3*e.length/4;"="==e[e.length-2]?t-=2:"="==e[e.length-1]&&(t-=1);let n=new Uint8Array(t),r=0,i=0,a,s=0;for(let t=0;t<e.length;t++){if(void 0===(a=aM[e.charCodeAt(t)]))switch(e[t]){case"=":i=0;case"\n":case"\r":case"	":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:s=a,i=1;break;case 1:n[r++]=s<<2|(48&a)>>4,s=a,i=2;break;case 2:n[r++]=(15&s)<<4|(60&a)>>2,s=a,i=3;break;case 3:n[r++]=(3&s)<<6|a,i=0}}if(1==i)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a<e.length;a++)switch(r=e[a],n){case 0:t+=aj[r>>2],i=(3&r)<<4,n=1;break;case 1:t+=aj[i|r>>4],i=(15&r)<<2,n=2;break;case 2:t+=aj[i|r>>6]+aj[63&r],n=0}return n&&(t+=aj[i]+"=",1==n&&(t+="=")),t}};function aV(e,t){let n=e.getType();return t.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(e).find(e=>e.no==t.field.no)}function aG(e,t){aT(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}function aq(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":if(e.opt||e.req)return void 0!==t[n];if("enum"==e.kind)return t[n]!==e.T.values[0].no;return!aC(e.T,t[n]);case"message":return void 0!==t[n];case"map":return Object.keys(t[n]).length>0}}function aY(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;
1case"scalar":t[n]=r?aL(e.T,e.L):void 0;break;case"message":t[n]=void 0}}function aW(e,t){if(null===e||"object"!=typeof e||!Object.getOwnPropertyNames(ag.prototype).every(t=>t in e&&"function"==typeof e[t]))return!1;let n=e.getType();return null!==n&&"function"==typeof n&&"typeName"in n&&"string"==typeof n.typeName&&(void 0===t||n.typeName==t.typeName)}function aX(e,t){return aW(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}to.DOUBLE,to.FLOAT,to.INT64,to.UINT64,to.INT32,to.UINT32,to.BOOL,to.STRING,to.BYTES;let aK={ignoreUnknownFields:!1},aH={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},aZ=Symbol(),az=Symbol();function aQ(e){if(null===e)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function a0(e,t,n,r,i){let a=n.localName;if(n.repeated){if(aT("map"!=n.kind),null===t)return;if(!Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${aQ(t)}`);let s=e[a];for(let e of t){if(null===e)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${aQ(e)}`);switch(n.kind){case"message":s.push(n.T.fromJson(e,r));break;case"enum":let t=a2(n.T,e,r.ignoreUnknownFields,!0);t!==az&&s.push(t);break;case"scalar":try{s.push(a1(n.T,e,n.L,!0))}catch(r){let t=`cannot decode field ${i.typeName}.${n.name} from JSON: ${aQ(e)}`;throw r instanceof Error&&r.message.length>0&&(t+=`: ${r.message}`),Error(t)}}}}else if("map"==n.kind){if(null===t)return;if("object"!=typeof t||Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${aQ(t)}`);let s=e[a];for(let[e,a]of Object.entries(t)){let o;if(null===a)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);try{o=function(e,t){if(e===to.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1}return a1(e,t,tl.BIGINT,!0).toString()}(n.K,e)}catch(r){let e=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${aQ(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}switch(n.V.kind){case"message":s[o]=n.V.T.fromJson(a,r);break;case"enum":let l=a2(n.V.T,a,r.ignoreUnknownFields,!0);l!==az&&(s[o]=l);break;case"scalar":try{s[o]=a1(n.V.T,a,tl.BIGINT,!0)}catch(r){let e=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${aQ(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let s=n.T;if(null===t&&"google.protobuf.Value"!=s.typeName)return;let o=e[a];aW(o)?o.fromJson(t,r):(e[a]=o=s.fromJson(t,r),s.fieldWrapper&&!n.oneof&&(e[a]=s.fieldWrapper.unwrapField(o)));break;case"enum":let l=a2(n.T,t,r.ignoreUnknownFields,!1);switch(l){case aZ:aY(n,e);break;case az:break;default:e[a]=l}break;case"scalar":try{let r=a1(n.T,t,n.L,!1);r===aZ?aY(n,e):e[a]=r}catch(r){let e=`cannot decode field ${i.typeName}.${n.name} from JSON: ${aQ(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}function a1(e,t,n,r){if(null===t)return r?aL(e,n):aZ;switch(e){case to.DOUBLE:case to.FLOAT:if("NaN"===t)return Number.NaN;if("Infinity"===t)return Number.POSITIVE_INFINITY;if("-Infinity"===t)return Number.NEGATIVE_INFINITY;if(""===t||"string"==typeof t&&t.trim().length!==t.length||"string"!=typeof t&&"number"!=typeof t)break;let i=Number(t);if(Number.isNaN(i)||!Number.isFinite(i))break;return e==to.FLOAT&&aN(i),i;case to.INT32:case to.FIXED32:case to.SFIXED32:case to.SINT32:case to.UINT32:let a;if("number"==typeof t?a=t:"string"==typeof t&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),void 0===a)break;return e==to.UINT32||e==to.FIXED32?aI(a):ay(a),a;case to.INT64:case to.SFIXED64:case to.SINT64:if("number"!=typeof t&&"string"!=typeof t)break;let s=aU.parse(t);return n?s.toString():s;case to.FIXED64:case to.UINT64:if("number"!=typeof t&&"string"!=typeof t)break;let o=aU.uParse(t);return n?o.toString():o;case to.BOOL:if("boolean"!=typeof t)break;return t;case to.STRING:if("string"!=typeof t)break;try{encodeURIComponent(t)}catch(e){throw Error("invalid UTF8")}return t;case to.BYTES:if(""===t)return new Uint8Array(0);if("string"!=typeof t)break;return a$.dec(t)}throw Error()}function a2(e,t,n,r){if(null===t)return"google.protobuf.NullValue"==e.typeName?0:r?e.values[0].no:aZ;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(void 0!==i)return i.no;if(n)return az}throw Error(`cannot decode enum ${e.typeName} from JSON: ${aQ(t)}`)}function a3(e,t,n){if("map"==e.kind){aT("object"==typeof t&&null!=t);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[t,n]of i)r[t.toString()]=a6(e.V.T,n);break;case"message":for(let[e,t]of i)r[e.toString()]=t.toJson(n);break;case"enum":let a=e.V.T;for(let[e,t]of i)r[e.toString()]=a4(a,t,n.enumAsInteger)}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){aT(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let n=0;n<t.length;n++)r.push(a6(e.T,t[n]));break;case"enum":for(let i=0;i<t.length;i++)r.push(a4(e.T,t[i],n.enumAsInteger));break;case"message":for(let e=0;e<t.length;e++)r.push(t[e].toJson(n))}return n.emitDefaultValues||r.length>0?r:void 0}switch(e.kind){case"scalar":return a6(e.T,t);case"enum":return a4(e.T,t,n.enumAsInteger);case"message":return aX(e.T,t).toJson(n)}}function a4(e,t,n){var r;if(aT("number"==typeof t),"google.protobuf.NullValue"==e.typeName)return null;if(n)return t;let i=e.findNumber(t);return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:t}function a6(e,t){switch(e){case to.INT32:case to.SFIXED32:case to.SINT32:case to.FIXED32:case to.UINT32:return aT("number"==typeof t),t;case to.FLOAT:case to.DOUBLE:if(aT("number"==typeof t),Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case to.STRING:return aT("string"==typeof t),t;case to.BOOL:return aT("boolean"==typeof t),t;case to.UINT64:case to.FIXED64:case to.INT64:case to.SFIXED64:case to.SINT64:return aT("bigint"==typeof t||"string"==typeof t||"number"==typeof t),t.toString();case to.BYTES:return aT(t instanceof Uint8Array),a$.enc(t)}}(M=tu||(tu={}))[M.Varint=0]="Varint",M[M.Bit64=1]="Bit64",M[M.LengthDelimited=2]="LengthDelimited",M[M.StartGroup=3]="StartGroup",M[M.EndGroup=4]="EndGroup",M[M.Bit32=5]="Bit32";class a9{constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(aI(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return ay(e),aB(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){aN(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){aI(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){ay(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return ay(e),aB(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=aU.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=aU.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=aU.enc(e);return av(t.lo,t.hi,this.buf),this}sint64(e){let t=aU.enc(e),n=t.hi>>31;return av(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=aU.uEnc(e);return av(t.lo,t.hi,this.buf),this}}class a8{constructor(e,t){this.varint64=aw,this.uint32=aR,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=t?t:new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,n=7&e;
1if(t<=0||n<0||n>5)throw Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e,t){let n=this.pos;switch(e){case tu.Varint:for(;128&this.buf[this.pos++];);break;case tu.Bit64:this.pos+=4;case tu.Bit32:this.pos+=4;break;case tu.LengthDelimited:let r=this.uint32();this.pos+=r;break;case tu.StartGroup:for(;;){let[e,n]=this.tag();if(n===tu.EndGroup){if(void 0!==t&&e!==t)throw Error("invalid end group tag");break}this.skip(n,e)}break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return aU.dec(...this.varint64())}uint64(){return aU.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,aU.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return aU.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return aU.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}let a7=Symbol("@bufbuild/protobuf/unknown-fields"),a5={readUnknownFields:!0,readerFactory:e=>new a8(e)},se={writeUnknownFields:!0,writerFactory:()=>new a9};function st(e,t,n,r,i){let{repeated:a,localName:s}=n;switch(n.oneof&&((e=e[n.oneof.localName]).case!=s&&delete e.value,e.case=s,s="value"),n.kind){case"scalar":case"enum":let o="enum"==n.kind?to.INT32:n.T,l=si;if("scalar"==n.kind&&n.L>0&&(l=sr),a){let n=e[s];if(r==tu.LengthDelimited&&o!=to.STRING&&o!=to.BYTES){let e=t.uint32()+t.pos;for(;t.pos<e;)n.push(l(t,o))}else n.push(l(t,o))}else e[s]=l(t,o);break;case"message":let u=n.T;
1a?e[s].push(sn(t,new u,i,n)):aW(e[s])?sn(t,e[s],i,n):(e[s]=sn(t,new u,i,n),!u.fieldWrapper||n.oneof||n.repeated||(e[s]=u.fieldWrapper.unwrapField(e[s])));break;case"map":let[c,d]=function(e,t,n){let r,i;let a=t.uint32(),s=t.pos+a;for(;t.pos<s;){let[a]=t.tag();switch(a){case 1:r=si(t,e.K);break;case 2:switch(e.V.kind){case"scalar":i=si(t,e.V.T);break;case"enum":i=t.int32();break;case"message":i=sn(t,new e.V.T,n,void 0)}}}if(void 0===r&&(r=aL(e.K,tl.BIGINT)),"string"!=typeof r&&"number"!=typeof r&&(r=r.toString()),void 0===i)switch(e.V.kind){case"scalar":i=aL(e.V.T,tl.BIGINT);break;case"enum":i=e.V.T.values[0].no;break;case"message":i=new e.V.T}return[r,i]}(n,t,i);e[s][c]=d}}function sn(e,t,n,r){let i=t.getType().runtime.bin,a=null==r?void 0:r.delimited;return i.readMessage(t,e,a?r.no:e.uint32(),n,a),t}function sr(e,t){let n=si(e,t);return"bigint"==typeof n?n.toString():n}function si(e,t){switch(t){case to.STRING:return e.string();case to.BOOL:return e.bool();case to.DOUBLE:return e.double();case to.FLOAT:return e.float();case to.INT32:return e.int32();case to.INT64:return e.int64();case to.UINT64:return e.uint64();case to.FIXED64:return e.fixed64();case to.BYTES:return e.bytes();case to.FIXED32:return e.fixed32();case to.SFIXED32:return e.sfixed32();case to.SFIXED64:return e.sfixed64();case to.SINT64:return e.sint64();case to.UINT32:return e.uint32();case to.SINT32:return e.sint32()}}function sa(e,t,n,r){aT(void 0!==t);let i=e.repeated;switch(e.kind){case"scalar":case"enum":let a="enum"==e.kind?to.INT32:e.T;if(i){if(aT(Array.isArray(t)),e.packed)!function(e,t,n,r){if(!r.length)return;e.tag(n,tu.LengthDelimited).fork();let[,i]=sl(t);for(let t=0;t<r.length;t++)e[i](r[t]);e.join()}(n,a,e.no,t);else for(let r of t)so(n,a,e.no,r)}else so(n,a,e.no,t);break;case"message":if(i)for(let i of(aT(Array.isArray(t)),t))ss(n,r,e,i);else ss(n,r,e,t);break;case"map":for(let[i,a]of(aT("object"==typeof t&&null!=t),Object.entries(t)))!function(e,t,n,r,i){e.tag(n.no,tu.LengthDelimited),e.fork();let a=r;switch(n.K){case to.INT32:case to.FIXED32:case to.UINT32:case to.SFIXED32:case to.SINT32:a=Number.parseInt(r);break;case to.BOOL:aT("true"==r||"false"==r),a="true"==r}switch(so(e,n.K,1,a),n.V.kind){case"scalar":so(e,n.V.T,2,i);break;case"enum":so(e,to.INT32,2,i);break;case"message":aT(void 0!==i),e.tag(2,tu.LengthDelimited).bytes(i.toBinary(t))}e.join()}(n,r,e,i,a)}}function ss(e,t,n,r){let i=aX(n.T,r);n.delimited?e.tag(n.no,tu.StartGroup).raw(i.toBinary(t)).tag(n.no,tu.EndGroup):e.tag(n.no,tu.LengthDelimited).bytes(i.toBinary(t))}function so(e,t,n,r){aT(void 0!==r);let[i,a]=sl(t);e.tag(n,i)[a](r)}function sl(e){let t=tu.Varint;switch(e){case to.BYTES:case to.STRING:t=tu.LengthDelimited;break;case to.DOUBLE:case to.FIXED64:case to.SFIXED64:t=tu.Bit64;break;case to.FIXED32:case to.SFIXED32:case to.FLOAT:t=tu.Bit32}return[t,to[e].toLowerCase()]}function su(e){if(void 0===e)return e;if(aW(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function sc(e){return e instanceof Uint8Array?e:new Uint8Array(e)}class sd{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){let e={};for(let t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[e]}find(e){if(!this.numbers){let e={};for(let t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,t)=>e.no-t.no)),this.numbersAsc}byMember(){if(!this.members){let e;this.members=[];let t=this.members;for(let n of this.list())n.oneof?n.oneof!==e&&(e=n.oneof,t.push(e)):t.push(n)}return this.members}}function sf(e,t){let n=sp(e);return t?n:sI(sy(n))}let sm=sp;function sp(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);switch(i){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(i),t=!1;break;default:t&&(t=!1,i=i.toUpperCase()),n.push(i)}}return n.join("")}let sh=new Set(["constructor","toString","toJSON","valueOf"]),sg=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),sT=e=>`${e}$`,sy=e=>sg.has(e)?sT(e):e,sI=e=>sh.has(e)?sT(e):e;class sN{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=sf(e,!1)}addField(e){aT(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let e=0;e<this.fields.length;e++)this._lookup[this.fields[e].localName]=this.fields[e]}return this._lookup[e]}}let sE=($=e=>new sd(e,e=>(function(e,t){var n,r,i,a,s,o;let l;let u=[];for(let c of"function"==typeof e?e():e){if(c.localName=sf(c.name,void 0!==c.oneof),c.jsonName=null!==(n=c.jsonName)&&void 0!==n?n:sm(c.name),c.repeated=null!==(r=c.repeated)&&void 0!==r&&r,"scalar"==c.kind&&(c.L=null!==(i=c.L)&&void 0!==i?i:tl.BIGINT),c.delimited=null!==(a=c.delimited)&&void 0!==a&&a,c.req=null!==(s=c.req)&&void 0!==s&&s,c.opt=null!==(o=c.opt)&&void 0!==o&&o,void 0===c.packed&&(t?c.packed="enum"==c.kind||"scalar"==c.kind&&c.T!=to.BYTES&&c.T!=to.STRING:c.packed=!1),void 0!==c.oneof){let e="string"==typeof c.oneof?c.oneof:c.oneof.name;l&&l.name==e||(l=new sN(e)),c.oneof=l,l.addField(c)}u.push(c)}return u})(e,!0)),V=e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName;if(t.repeated){e[n]=[];continue}switch(t.kind){case"oneof":e[n]={case:void 0};break;case"enum":e[n]=0;break;case"map":e[n]={};break;case"scalar":e[n]=aL(t.T,t.L)}}},{syntax:"proto3",json:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},aK),e):aK},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},aH),e):aH},readMessage(e,t,n,r){if(null==t||Array.isArray(t)||"object"!=typeof t)throw Error(`cannot decode message ${e.typeName} from JSON: ${aQ(t)}`);r=null!=r?r:new e;let i=new Map,a=n.typeRegistry;for(let[s,o]of Object.entries(t)){let t=e.fields.findJsonName(s);if(t){if(t.oneof){if(null===o&&"scalar"==t.kind)continue;let n=i.get(t.oneof);if(void 0!==n)throw Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${t.oneof.name}" present: "${n}", "${s}"`);i.set(t.oneof,s)}a0(r,o,t,n,e)}else{let t=!1;if((null==a?void 0:a.findExtension)&&s.startsWith("[")&&s.endsWith("]")){let i=a.findExtension(s.substring(1,s.length-1));if(i&&i.extendee.typeName==e.typeName){t=!0;let[e,a]=aJ(i);a0(e,o,i.field,n,i),function(e,t,n,r){aG(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(aV(e,t)){let n=e.getType().runtime.bin.listUnknownFields(e).filter(e=>e.no!=t.field.no);for(let t of(e.getType().runtime.bin.discardUnknownFields(e),n))e.getType().runtime.bin.onUnknownField(e,t.no,t.wireType,t.data)}let s=a.writerFactory(),o=t.field;o.opt||o.repeated||"enum"!=o.kind&&"scalar"!=o.kind||(o=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(o,n,s,a);let l=i.readerFactory(s.finish());for(;l.pos<l.len;){let[t,n]=l.tag(),r=l.skip(n,t);e.getType().runtime.bin.onUnknownField(e,t,n,r)}}(r,i,a(),n)}}if(!t&&!n.ignoreUnknownFields)throw Error(`cannot decode message ${e.typeName} from JSON: key "${s}" is unknown`)}}return r},writeMessage(e,t){let n;let r=e.getType(),i={};try{for(n of r.fields.byNumber()){if(!aq(n,e)){var a;if(n.req)throw"required field not set";if(!t.emitDefaultValues||!((a=n).repeated||"map"==a.kind||!a.oneof&&"message"!=a.kind&&!a.opt&&!
1a.req))continue}let r=n.oneof?e[n.oneof.localName].value:e[n.localName],s=a3(n,r,t);void 0!==s&&(i[t.useProtoFieldName?n.name:n.jsonName]=s)}let s=t.typeRegistry;if(null==s?void 0:s.findExtensionFor)for(let n of r.runtime.bin.listUnknownFields(e)){let a=s.findExtensionFor(r.typeName,n.no);if(a&&aV(e,a)){let n=function(e,t,n){aG(t,e);let r=t.runtime.bin.makeReadOptions(n),i=function(e,t){if(!t.repeated&&("enum"==t.kind||"scalar"==t.kind)){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(e=>e.no===t.no)}(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,s]=aJ(t);for(let e of i)t.runtime.bin.readField(a,r.readerFactory(e.data),t.field,e.wireType,r);return s()}(e,a,t),r=a3(a.field,n,t);void 0!==r&&(i[a.field.jsonName]=r)}}}catch(i){let e=n?`cannot encode field ${r.typeName}.${n.name} to JSON`:`cannot encode message ${r.typeName} to JSON`,t=i instanceof Error?i.message:String(i);throw Error(e+(t.length>0?`: ${t}`:""))}return i},readScalar:(e,t,n)=>a1(e,t,null!=n?n:tl.BIGINT,!0),writeScalar(e,t,n){if(void 0!==t&&(n||aC(e,t)))return a6(e,t)}
1,debug:aQ},bin:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},a5),e):a5},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},se),e):se},listUnknownFields(e){var t;return null!==(t=e[a7])&&void 0!==t?t:[]},discardUnknownFields(e){delete e[a7]},writeUnknownFields(e,t){let n=e[a7];if(n)for(let e of n)t.tag(e.no,e.wireType).raw(e.data)},onUnknownField(e,t,n,r){Array.isArray(e[a7])||(e[a7]=[]),e[a7].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a,s;let o=e.getType(),l=i?t.len:t.pos+n;for(;t.pos<l&&([a,s]=t.tag(),!0!==i||s!=tu.EndGroup);){let n=o.fields.find(a);if(!n){let n=t.skip(s,a);r.readUnknownFields&&this.onUnknownField(e,a,s,n);continue}st(e,t,n,s,r)}if(i&&(s!=tu.EndGroup||a!==n))throw Error("invalid end group tag")},readField:st,writeMessage(e,t,n){let r=e.getType();for(let i of r.fields.byNumber()){if(!aq(i,e)){if(i.req)throw Error(`cannot encode field ${r.typeName}.${i.name} to binary: required field not set`);continue}let a=i.oneof?e[i.oneof.localName].value:e[i.localName];sa(i,a,t,n)}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t},writeField(e,t,n,r){void 0!==t&&sa(e,t,n,r)}},util:Object.assign(Object.assign({},{setEnumType:ak,initPartial(e,t){if(void 0!==e)for(let n of t.getType().fields.byMember()){let r=n.localName;if(null!=e[r])switch(n.kind){case"oneof":let i=e[r].case;if(void 0===i)continue;let a=n.findField(i),s=e[r].value;a&&"message"==a.kind&&!aW(s,a.T)?s=new a.T(s):a&&"scalar"===a.kind&&a.T===to.BYTES&&(s=sc(s)),t[r]={case:i,value:s};break;case"scalar":case"enum":let o=e[r];n.T===to.BYTES&&(o=n.repeated?o.map(sc):sc(o)),t[r]=o;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===to.BYTES)for(let[n,i]of Object.entries(e[r]))t[r][n]=sc(i);else Object.assign(t[r],e[r]);break;case"message":let l=n.V.T;for(let n of Object.keys(e[r])){let i=e[r][n];l.fieldWrapper||(i=new l(i)),t[r][n]=i}}break;case"message":let u=n.T;if(n.repeated)t[r]=e[r].map(e=>aW(e,u)?e:new u(e));else{let n=e[r];u.fieldWrapper?"google.protobuf.BytesValue"===u.typeName?t[r]=sc(n):t[r]=n:t[r]=aW(n,u)?n:new u(n)}}}},equals:(e,t,n)=>t===n||!!t&&!!n&&e.fields.byMember().every(e=>{let r=t[e.localName],i=n[e.localName];if(e.repeated){if(r.length!==i.length)return!1;switch(e.kind){case"message":return r.every((t,n)=>e.T.equals(t,i[n]));case"scalar":return r.every((t,n)=>ax(e.T,t,i[n]));case"enum":return r.every((e,t)=>ax(to.INT32,e,i[t]))}throw Error(`repeated cannot contain ${e.kind}`)}switch(e.kind){case"message":let a=r,s=i;return e.T.fieldWrapper&&(void 0===a||aW(a)||(a=e.T.fieldWrapper.wrapField(a)),void 0===s||aW(s)||(s=e.T.fieldWrapper.wrapField(s))),e.T.equals(a,s);case"enum":return ax(to.INT32,r,i);case"scalar":return ax(e.T,r,i);case"oneof":if(r.case!==i.case)return!1;let o=e.findField(r.case);if(void 0===o)return!0;switch(o.kind){case"message":return o.T.equals(r.value,i.value);case"enum":return ax(to.INT32,r.value,i.value);case"scalar":return ax(o.T,r.value,i.value)}throw Error(`oneof cannot contain ${o.kind}`);case"map":let l=Object.keys(r).concat(Object.keys(i));switch(e.V.kind){case"message":let u=e.V.T;return l.every(e=>u.equals(r[e],i[e]));case"enum":return l.every(e=>ax(to.INT32,r[e],i[e]));case"scalar":let c=e.V.T;return l.every(e=>ax(c,r[e],i[e]))}}}),clone(e){let t=e.getType(),n=new t;for(let r of t.fields.byMember()){let t;let i=e[r.localName];if(r.repeated)t=i.map(su);else if("map"==r.kind)for(let[e,a]of(t=n[r.localName],Object.entries(i)))t[e]=su(a);else t="oneof"==r.kind?r.findField(i.case)?{case:i.case,value:su(i.value)}:{case:void 0}:su(i);n[r.localName]=t}for(let r of t.runtime.bin.listUnknownFields(e))t.runtime.bin.onUnknownField(n,r.no,r.wireType,r.data);return n}}),{newFieldList:$,initFields:V}),makeMessageType(e,t,n){return function(e,t,n,r){var i;let a=null!==(i=null==r?void 0:r.localName)&&void 0!==i?i:t.substring(t.lastIndexOf(".")+1),s={[a]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[a];return Object.setPrototypeOf(s.prototype,new ag),Object.assign(s,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary:(e,t)=>new s().fromBinary(e,t),fromJson:(e,t)=>new s().fromJson(e,t),fromJsonString:(e,t)=>
1new s().fromJsonString(e,t),equals:(t,n)=>e.util.equals(s,t,n)}),s}(this,e,t,n)},makeEnum:function(e,t,n){let r={};for(let e of t){let t=a_(e);r[t.localName]=t.no,r[t.no]=t.localName}return ak(r,e,t,n),r},makeEnumType:ab,getEnumType:function(e){let t=e[aE];return aT(t,"missing enum type on enum object"),t},makeExtension(e,t,n){var r;let i;return r=this,{typeName:e,extendee:t,get field(){if(!i){let t="function"==typeof n?n():n;t.name=e.split(".").pop(),t.jsonName=`[${e}]`,i=r.util.newFieldList([t]).list()[0]}return i},runtime:r}}});class sk extends ag{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),sE.util.initPartial(e,this)}toJson(e){var t;if(""===this.typeUrl)return{};let n=this.typeUrlToName(this.typeUrl),r=null===(t=null==e?void 0:e.typeRegistry)||void 0===t?void 0:t.findMessage(n);if(!r)throw Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let i=r.fromBinary(this.value).toJson(e);return(n.startsWith("google.protobuf.")||null===i||Array.isArray(i)||"object"!=typeof i)&&(i={value:i}),i["@type"]=this.typeUrl,i}fromJson(e,t){var n;let r;if(null===e||Array.isArray(e)||"object"!=typeof e)throw Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${null===e?"null":Array.isArray(e)?"array":typeof e}`);if(0==Object.keys(e).length)return this;let i=e["@type"];if("string"!=typeof i||""==i)throw Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');let a=this.typeUrlToName(i),s=null===(n=null==t?void 0:t.typeRegistry)||void 0===n?void 0:n.findMessage(a);if(!s)throw Error(`cannot decode message google.protobuf.Any from JSON: ${i} is not in the type registry`);
1if(a.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))r=s.fromJson(e.value,t);else{let n=Object.assign({},e);delete n["@type"],r=s.fromJson(n,t)}return this.packFrom(r),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return!!this.is(e.getType())&&(e.fromBinary(this.value),!0)}unpack(e){if(""===this.typeUrl)return;let t=e.findMessage(this.typeUrlToName(this.typeUrl));if(t)return t.fromBinary(this.value)}is(e){if(""===this.typeUrl)return!1;let t=this.typeUrlToName(this.typeUrl);return t===("string"==typeof e?e:e.typeName)}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw Error(`invalid type url: ${e}`);let t=e.lastIndexOf("/"),n=t>=0?e.substring(t+1):e;if(!n.length)throw Error(`invalid type url: ${e}`);return n}static pack(e){let t=new sk;return t.packFrom(e),t}static fromBinary(e,t){return new sk().fromBinary(e,t)}static fromJson(e,t){return new sk().fromJson(e,t)}static fromJsonString(e,t){return new sk().fromJsonString(e,t)}static equals(e,t){return sE.util.equals(sk,e,t)}}sk.runtime=sE,sk.typeName="google.protobuf.Any",sk.fields=sE.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);class sb{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){let n=this.getType().runtime.bin,r=n.makeReadOptions(t);return n.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){let n=this.getType(),r=n.runtime.json,i=r.makeReadOptions(t);return r.readMessage(n,e,i,this),this}fromJsonString(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`cannot decode ${this.getType().typeName} from JSON: ${e instanceof Error?e.message:String(e)}`)}return this.fromJson(n,t)}toBinary(e){let t=this.getType().runtime.bin,n=t.makeWriteOptions(e),r=n.writerFactory();return t.writeMessage(this,r,n),r.finish()}toJson(e){let t=this.getType().runtime.json,n=t.makeWriteOptions(e);return t.writeMessage(this,n)}toJsonString(e){var t;return JSON.stringify(this.toJson(e),null,null!==(t=null==e?void 0:e.prettySpaces)&&void 0!==t?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function s_(e,t){if(!e)throw Error(t)}function sw(e){if("number"!=typeof e)throw Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error("invalid int 32: "+e)}function sv(e){if("number"!=typeof e)throw Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error("invalid uint 32: "+e)}function sO(e){if("number"!=typeof e)throw Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error("invalid float 32: "+e)}let sS=Symbol("@bufbuild/protobuf/enum-type");function sA(e,t,n,r){e[sS]=sF(t,n.map(t=>({no:t.no,name:t.name,localName:e[t.no]})),r)}function sF(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let e of t){let t=sD(e);a.push(t),r[e.name]=t,i[e.no]=t}return{typeName:e,values:a,findName:e=>r[e],findNumber:e=>i[e]}}function sD(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}function sB(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(15&n)<<28,t=(112&n)>>4,(128&n)==0)return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}throw Error("invalid varint")}function sR(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(i>>>7==0&&0==t),s=(a?128|i:i)&255;if(n.push(s),!a)return}let r=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(n.push((i?128|r:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=r>>>7!=0,a=(i?128|r:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}function sP(e){let t="-"===e[0];t&&(e=e.slice(1));let n=0,r=0;function i(t,i){let a=Number(e.slice(t,i));r*=1e6,(n=1e6*n+a)>=4294967296&&(r+=n/4294967296|0,n%=4294967296)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?sL(n,r):sx(n,r)}function sU(e,t){if({lo:e,hi:t}={lo:e>>>0,hi:t>>>0},t<=2097151)return String(4294967296*t+e);let n=16777215&e,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+6777216*r+6710656*i,s=r+8147497*i,o=2*i;return a>=1e7&&(s+=Math.floor(a/1e7),a%=1e7),s>=1e7&&(o+=Math.floor(s/1e7),s%=1e7),o.toString()+sC(s)+sC(a)}function sx(e,t){return{lo:0|e,hi:0|t}}function sL(e,t){return t=~t,e?e=~e+1:t+=1,sx(e,t)}
1let sC=e=>{let t=String(e);return"0000000".slice(t.length)+t};function sJ(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(127&e|128),e>>=7;t.push(1)}}function sj(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}var sM=n(74859);let s$=function(){let e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&("object"!=typeof sM||"object"!=typeof sM.env||"1"!==sM.env.BUF_BIGINT_DISABLE)){let t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){let r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw Error(`int64 invalid: ${e}`);return r},uParse(e){let t="bigint"==typeof e?e:BigInt(e);if(t>i||t<r)throw Error(`uint64 invalid: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}let t=e=>s_(/^-?[0-9]+$/.test(e),`int64 invalid: ${e}`),n=e=>s_(/^[0-9]+$/.test(e),`uint64 invalid: ${e}`);return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),t(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),n(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),t(e),sP(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),n(e),sP(e)),dec:(e,t)=>(function(e,t){let n=sx(e,t),r=2147483648&n.hi;r&&(n=sL(n.lo,n.hi));let i=sU(n.lo,n.hi);return r?"-"+i:i})(e,t),uDec:(e,t)=>sU(e,t)}}();function sV(e,t,n){if(t===n)return!0;if(e==tc.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case tc.UINT64:case tc.FIXED64:case tc.INT64:case tc.SFIXED64:case tc.SINT64:return t==n}return!1}function sG(e,t){switch(e){case tc.BOOL:return!1;case tc.UINT64:case tc.FIXED64:case tc.INT64:case tc.SFIXED64:case tc.SINT64:return 0==t?s$.zero:"0";case tc.DOUBLE:case tc.FLOAT:return 0;case tc.BYTES:return new Uint8Array(0);case tc.STRING:return"";default:return 0}}function sq(e,t){switch(e){case tc.BOOL:return!1===t;case tc.STRING:return""===t;case tc.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return 0==t}}function sY(e){let t=e.field.localName,n=Object.create(null);return n[t]=function(e){let t=e.field;if(t.repeated)return[];if(void 0!==t.default)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return sG(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}(e),[n,()=>n[t]]}(G=tc||(tc={}))[G.DOUBLE=1]="DOUBLE",G[G.FLOAT=2]="FLOAT",G[G.INT64=3]="INT64",G[G.UINT64=4]="UINT64",G[G.INT32=5]="INT32",G[G.FIXED64=6]="FIXED64",G[G.FIXED32=7]="FIXED32",G[G.BOOL=8]="BOOL",G[G.STRING=9]="STRING",G[G.BYTES=12]="BYTES",G[G.UINT32=13]="UINT32",G[G.SFIXED32=15]="SFIXED32",G[G.SFIXED64=16]="SFIXED64",G[G.SINT32=17]="SINT32",G[G.SINT64=18]="SINT64",(q=td||(td={}))[q.BIGINT=0]="BIGINT",q[q.STRING=1]="STRING";let sW="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),sX=[];for(let e=0;e<sW.length;e++)sX[sW[e].charCodeAt(0)]=e;sX["-".charCodeAt(0)]=sW.indexOf("+"),sX["_".charCodeAt(0)]=sW.indexOf("/");let sK={dec(e){let t=3*e.length/4;"="==e[e.length-2]?t-=2:"="==e[e.length-1]&&(t-=1);let n=new Uint8Array(t),r=0,i=0,a,s=0;for(let t=0;t<e.length;t++){if(void 0===(a=sX[e.charCodeAt(t)]))switch(e[t]){case"=":i=0;case"\n":case"\r":case"	":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:s=a,i=1;break;case 1:n[r++]=s<<2|(48&a)>>4,s=a,i=2;break;case 2:n[r++]=(15&s)<<4|(60&a)>>2,s=a,i=3;break;case 3:n[r++]=(3&s)<<6|a,i=0}}if(1==i)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a<e.length;a++)switch(r=e[a],n){case 0:t+=sW[r>>2],i=(3&r)<<4,n=1;break;case 1:t+=sW[i|r>>4],i=(15&r)<<2,n=2;break;case 2:t+=sW[i|r>>6]+sW[63&r],n=0}return n&&(t+=sW[i]+"=",1==n&&(t+="=")),t}};function sH(e,t){let n=e.getType();return t.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(e).find(e=>e.no==t.field.no)}function sZ(e,t){s_(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}function sz(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":if(e.opt||e.req)return void 0!==t[n];if("enum"==e.kind)return t[n]!==e.T.values[0].no;return!sq(e.T,t[n]);case"message":return void 0!==t[n];case"map":return Object.keys(t[n]).length>0}}function sQ(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?sG(e.T,e.L):void 0;break;case"message":t[n]=void 0}}function s0(e,t){if(null===e||"object"!=typeof e||!Object.getOwnPropertyNames(sb.prototype).every(t=>t in e&&"function"==typeof e[t]))return!1;let n=e.getType();return null!==n&&"function"==typeof n&&"typeName"in n&&"string"==typeof n.typeName&&(void 0===t||n.typeName==t.typeName)}function s1(e,t){return s0(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}
1tc.DOUBLE,tc.FLOAT,tc.INT64,tc.UINT64,tc.INT32,tc.UINT32,tc.BOOL,tc.STRING,tc.BYTES;let s2={ignoreUnknownFields:!1},s3={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},s4=Symbol(),s6=Symbol();function s9(e){if(null===e)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function s8(e,t,n,r,i){let a=n.localName;if(n.repeated){if(s_("map"!=n.kind),null===t)return;if(!Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${s9(t)}`);let s=e[a];for(let e of t){if(null===e)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${s9(e)}`);switch(n.kind){case"message":s.push(n.T.fromJson(e,r));break;case"enum":let t=s5(n.T,e,r.ignoreUnknownFields,!0);t!==s6&&s.push(t);break;case"scalar":try{s.push(s7(n.T,e,n.L,!0))}catch(r){let t=`cannot decode field ${i.typeName}.${n.name} from JSON: ${s9(e)}`;throw r instanceof Error&&r.message.length>0&&(t+=`: ${r.message}`),Error(t)}}}}else if("map"==n.kind){if(null===t)return;if("object"!=typeof t||Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${s9(t)}`);let s=e[a];for(let[e,a]of Object.entries(t)){let o;if(null===a)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);try{o=function(e,t){if(e===tc.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1}return s7(e,t,td.BIGINT,!0).toString()}(n.K,e)}catch(r){let e=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${s9(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}switch(n.V.kind){case"message":s[o]=n.V.T.fromJson(a,r);break;case"enum":let l=s5(n.V.T,a,r.ignoreUnknownFields,!0);l!==s6&&(s[o]=l);break;case"scalar":try{s[o]=s7(n.V.T,a,td.BIGINT,!0)}catch(r){let e=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${s9(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let s=n.T;if(null===t&&"google.protobuf.Value"!=s.typeName)return;let o=e[a];s0(o)?o.fromJson(t,r):(e[a]=o=s.fromJson(t,r),s.fieldWrapper&&!n.oneof&&(e[a]=s.fieldWrapper.unwrapField(o)));break;case"enum":let l=s5(n.T,t,r.ignoreUnknownFields,!1);switch(l){case s4:sQ(n,e);break;case s6:break;default:e[a]=l}break;case"scalar":try{let r=s7(n.T,t,n.L,!1);r===s4?sQ(n,e):e[a]=r}catch(r){let e=`cannot decode field ${i.typeName}.${n.name} from JSON: ${s9(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}function s7(e,t,n,r){if(null===t)return r?sG(e,n):s4;switch(e){case tc.DOUBLE:case tc.FLOAT:if("NaN"===t)return Number.NaN;if("Infinity"===t)return Number.POSITIVE_INFINITY;if("-Infinity"===t)return Number.NEGATIVE_INFINITY;if(""===t||"string"==typeof t&&t.trim().length!==t.length||"string"!=typeof t&&"number"!=typeof t)break;let i=Number(t);if(Number.isNaN(i)||!Number.isFinite(i))break;return e==tc.FLOAT&&sO(i),i;case tc.INT32:case tc.FIXED32:case tc.SFIXED32:case tc.SINT32:case tc.UINT32:let a;if("number"==typeof t?a=t:"string"==typeof t&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),void 0===a)break;return e==tc.UINT32?sv(a):sw(a),a;case tc.INT64:case tc.SFIXED64:case tc.SINT64:if("number"!=typeof t&&"string"!=typeof t)break;let s=s$.parse(t);return n?s.toString():s;case tc.FIXED64:case tc.UINT64:if("number"!=typeof t&&"string"!=typeof t)break;let o=s$.uParse(t);return n?o.toString():o;case tc.BOOL:if("boolean"!=typeof t)break;return t;case tc.STRING:if("string"!=typeof t)break;try{encodeURIComponent(t)}catch(e){throw Error("invalid UTF8")}return t;case tc.BYTES:if(""===t)return new Uint8Array(0);if("string"!=typeof t)break;return sK.dec(t)}throw Error()}function s5(e,t,n,r){if(null===t)return"google.protobuf.NullValue"==e.typeName?0:r?e.values[0].no:s4;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(void 0!==i)return i.no;if(n)return s6}throw Error(`cannot decode enum ${e.typeName} from JSON: ${s9(t)}`)}function oe(e,t,n){if("map"==e.kind){s_("object"==typeof t&&null!=t);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[t,n]of i)r[t.toString()]=on(e.V.T,n);break;case"message":for(let[e,t]of i)r[e.toString()]=t.toJson(n);break;case"enum":let a=e.V.T;for(let[e,t]of i)r[e.toString()]=ot(a,t,n.enumAsInteger)}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){s_(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let n=0;n<t.length;n++)r.push(on(e.T,t[n]));break;case"enum":for(let i=0;i<t.length;
1i++)r.push(ot(e.T,t[i],n.enumAsInteger));break;case"message":for(let e=0;e<t.length;e++)r.push(t[e].toJson(n))}return n.emitDefaultValues||r.length>0?r:void 0}switch(e.kind){case"scalar":return on(e.T,t);case"enum":return ot(e.T,t,n.enumAsInteger);case"message":return s1(e.T,t).toJson(n)}}function ot(e,t,n){var r;if(s_("number"==typeof t),"google.protobuf.NullValue"==e.typeName)return null;if(n)return t;let i=e.findNumber(t);return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:t}function on(e,t){switch(e){case tc.INT32:case tc.SFIXED32:case tc.SINT32:case tc.FIXED32:case tc.UINT32:return s_("number"==typeof t),t;case tc.FLOAT:case tc.DOUBLE:if(s_("number"==typeof t),Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case tc.STRING:return s_("string"==typeof t),t;case tc.BOOL:return s_("boolean"==typeof t),t;case tc.UINT64:case tc.FIXED64:case tc.INT64:case tc.SFIXED64:case tc.SINT64:return s_("bigint"==typeof t||"string"==typeof t||"number"==typeof t),t.toString();case tc.BYTES:return s_(t instanceof Uint8Array),sK.enc(t)}}(Y=tf||(tf={}))[Y.Varint=0]="Varint",Y[Y.Bit64=1]="Bit64",Y[Y.LengthDelimited=2]="LengthDelimited",Y[Y.StartGroup=3]="StartGroup",Y[Y.EndGroup=4]="EndGroup",Y[Y.Bit32=5]="Bit32";class or{constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(sv(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return sw(e),sJ(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){sO(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){sv(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){sw(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return sw(e),sJ(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=s$.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=s$.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=s$.enc(e);return sR(t.lo,t.hi,this.buf),this}sint64(e){let t=s$.enc(e),n=t.hi>>31;return sR(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=s$.uEnc(e);return sR(t.lo,t.hi,this.buf),this}}class oi{constructor(e,t){this.varint64=sB,this.uint32=sj,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=t?t:new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,n=7&e;if(t<=0||n<0||n>5)throw Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e){let t=this.pos;switch(e){case tf.Varint:for(;128&this.buf[this.pos++];);break;case tf.Bit64:this.pos+=4;case tf.Bit32:this.pos+=4;break;case tf.LengthDelimited:let n=this.uint32();this.pos+=n;break;case tf.StartGroup:let r;for(;(r=this.tag()[1])!==tf.EndGroup;)this.skip(r);break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return s$.dec(...this.varint64())}uint64(){return s$.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,s$.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return s$.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return s$.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}let oa=Symbol("@bufbuild/protobuf/unknown-fields"),os={readUnknownFields:!0,readerFactory:e=>new oi(e)},oo={writeUnknownFields:!0,writerFactory:()=>new or};function ol(e,t,n,r,i){let{repeated:a,localName:s}=n;switch(n.oneof&&((e=e[n.oneof.localName]).case!=s&&delete e.value,e.case=s,s="value"),n.kind){case"scalar":case"enum":let o="enum"==n.kind?tc.INT32:n.T,l=od;if("scalar"==n.kind&&n.L>0&&(l=oc),a){let n=e[s];if(r==tf.LengthDelimited&&o!=tc.STRING&&o!=tc.BYTES){let e=t.uint32()+t.pos;for(;t.pos<e;)n.push(l(t,o))}else n.push(l(t,o))}else e[s]=l(t,o);break;case"message":let u=n.T;a?e[s].push(ou(t,new u,i,n)):s0(e[s])?ou(t,e[s],i,n):(e[s]=ou(t,new u,i,n),!u.fieldWrapper||n.oneof||n.repeated||(e[
1s]=u.fieldWrapper.unwrapField(e[s])));break;case"map":let[c,d]=function(e,t,n){let r,i;let a=t.uint32(),s=t.pos+a;for(;t.pos<s;){let[a]=t.tag();switch(a){case 1:r=od(t,e.K);break;case 2:switch(e.V.kind){case"scalar":i=od(t,e.V.T);break;case"enum":i=t.int32();break;case"message":i=ou(t,new e.V.T,n,void 0)}}}if(void 0===r&&(r=sG(e.K,td.BIGINT)),"string"!=typeof r&&"number"!=typeof r&&(r=r.toString()),void 0===i)switch(e.V.kind){case"scalar":i=sG(e.V.T,td.BIGINT);break;case"enum":i=e.V.T.values[0].no;break;case"message":i=new e.V.T}return[r,i]}(n,t,i);e[s][c]=d}}function ou(e,t,n,r){let i=t.getType().runtime.bin,a=null==r?void 0:r.delimited;return i.readMessage(t,e,a?r.no:e.uint32(),n,a),t}function oc(e,t){let n=od(e,t);return"bigint"==typeof n?n.toString():n}function od(e,t){switch(t){case tc.STRING:return e.string();case tc.BOOL:return e.bool();case tc.DOUBLE:return e.double();case tc.FLOAT:return e.float();case tc.INT32:return e.int32();case tc.INT64:return e.int64();case tc.UINT64:return e.uint64();case tc.FIXED64:return e.fixed64();case tc.BYTES:return e.bytes();case tc.FIXED32:return e.fixed32();case tc.SFIXED32:return e.sfixed32();case tc.SFIXED64:return e.sfixed64();case tc.SINT64:return e.sint64();case tc.UINT32:return e.uint32();case tc.SINT32:return e.sint32()}}function of(e,t,n,r){s_(void 0!==t);let i=e.repeated;switch(e.kind){case"scalar":case"enum":let a="enum"==e.kind?tc.INT32:e.T;if(i){if(s_(Array.isArray(t)),e.packed)!function(e,t,n,r){if(!r.length)return;e.tag(n,tf.LengthDelimited).fork();let[,i]=oh(t);for(let t=0;t<r.length;t++)e[i](r[t]);e.join()}(n,a,e.no,t);else for(let r of t)op(n,a,e.no,r)}else op(n,a,e.no,t);break;case"message":if(i)for(let i of(s_(Array.isArray(t)),t))om(n,r,e,i);else om(n,r,e,t);break;case"map":for(let[i,a]of(s_("object"==typeof t&&null!=t),Object.entries(t)))!function(e,t,n,r,i){e.tag(n.no,tf.LengthDelimited),e.fork();let a=r;switch(n.K){case tc.INT32:case tc.FIXED32:case tc.UINT32:case tc.SFIXED32:case tc.SINT32:a=Number.parseInt(r);break;case tc.BOOL:s_("true"==r||"false"==r),a="true"==r}switch(op(e,n.K,1,a),n.V.kind){case"scalar":op(e,n.V.T,2,i);break;case"enum":op(e,tc.INT32,2,i);break;case"message":s_(void 0!==i),e.tag(2,tf.LengthDelimited).bytes(i.toBinary(t))}e.join()}(n,r,e,i,a)}}function om(e,t,n,r){let i=s1(n.T,r);n.delimited?e.tag(n.no,tf.StartGroup).raw(i.toBinary(t)).tag(n.no,tf.EndGroup):e.tag(n.no,tf.LengthDelimited).bytes(i.toBinary(t))}function op(e,t,n,r){s_(void 0!==r);let[i,a]=oh(t);e.tag(n,i)[a](r)}function oh(e){let t=tf.Varint;switch(e){case tc.BYTES:case tc.STRING:t=tf.LengthDelimited;break;case tc.DOUBLE:case tc.FIXED64:case tc.SFIXED64:t=tf.Bit64;break;case tc.FIXED32:case tc.SFIXED32:case tc.FLOAT:t=tf.Bit32}return[t,tc[e].toLowerCase()]}function og(e){if(void 0===e)return e;if(s0(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function oT(e){return e instanceof Uint8Array?e:new Uint8Array(e)}class oy{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){let e={};for(let t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[e]}find(e){if(!this.numbers){let e={};for(let t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,t)=>e.no-t.no)),this.numbersAsc}byMember(){if(!this.members){let e;this.members=[];let t=this.members;for(let n of this.list())n.oneof?n.oneof!==e&&(e=n.oneof,t.push(e)):t.push(n)}return this.members}}function oI(e,t){let n=oE(e);return t?n:ov(ow(n))}let oN=oE;function oE(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);switch(i){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(i),t=!1;break;default:t&&(t=!1,i=i.toUpperCase()),n.push(i)}}return n.join("")}let ok=new Set(["constructor","toString","toJSON","valueOf"]),ob=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),o_=e=>`${e}$`,ow=e=>ob.has(e)?o_(e):e,ov=e=>ok.has(e)?o_(e):e;class oO{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=oI(e,!1)}addField(e){s_(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let e=0;e<this.fields.length;e++)this._lookup[this.fields[e].localName]=this.fields[e]}return this._lookup[e]}}let oS=(W=e=>new oy(e,e=>(function(e,t){var n,r,i,a,s,o;let l;let u=[];for(let c of"function"==typeof e?e():e){if(c.localName=oI(c.name,void 0!==c.oneof),c.jsonName=null!==(n=c.jsonName)&&void 0!==n?n:oN(c.name),c.repeated=null!==(r=c.repeated)&&void 0!==r&&r,"scalar"==c.kind&&(c.L=null!==(i=c.L)&&void 0!==i?i:td.BIGINT),c.delimited=null!==(a=c.delimited)&&void 0!==a&&a,c.req=null!==(s=c.req)&&void 0!==s&&s,c.opt=null!==(o=c.opt)&&void 0!==o&&o,void 0===c.packed&&(t?c.packed="enum"==c.kind||"scalar"==c.kind&&c.T!=tc.BYTES&&c.T!=tc.STRING:c.packed=!1),void 0!==c.oneof){let e="string"==typeof c.oneof?c.oneof:c.oneof.name;l&&l.name==e||(l=new oO(e)),c.oneof=l,l.addField(c)}u.push(c)}return u})(e,!0)),X=e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName;if(t.repeated){e[n]=[];continue}switch(t.kind){case"oneof":e[n]={case:void 0};break;case"enum":e[n]=0;break;case"map":e[n]={};break;case"scalar":e[n]=sG(t.T,t.L)}}},{syntax:"proto3",json:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},s2),e):s2},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},s3),e):s3},readMessage(e,t,n,r){if(null==t||Array.isArray(t)||"object"!=typeof t)throw Error(`cannot decode message ${e.typeName} from JSON: ${s9(t)}`);r=null!=r?r:new e;let i=new Map,a=n.typeRegistry;for(let[s,o]of Object.entries(t)){let t=e.fields.findJsonName(s);if(t){if(t.oneof){if(null===o&&"scalar"==t.kind)continue;let n=i.get(t.oneof);if(void 0!==n)throw Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${t.oneof.name}" present: "${n}", "${s}"`);i.set(t.oneof,s)}s8(r,o,t,n,e)}else{let t=!1;if((null==a?void 0:a.findExtension)&&s.startsWith("[")&&s.endsWith("]")){let i=a.findExtension(s.substring(1,s.length-1));if(i&&i.extendee.typeName==e.typeName){t=!0;let[e,a]=sY(i);s8(e,o,i.field,n,i),function(e,t,n,r){sZ(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(sH(e,t)){let n=e.getType().runtime.bin.listUnknownFields(e).filter(e=>e.no!=t.field.no);for(let t of(e.getType().runtime.bin.discardUnknownFields(e),n))e.getType().runtime.bin.onUnknownField(e,t.no,t.wireType,t.data)}let s=a.writerFactory(),o=t.field;o.opt||o.repeated||"enum"!=o.kind&&"scalar"!=o.kind||(o=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(o,n,s,a);let l=i.readerFactory(s.finish());for(;l.pos<l.len;){let[t,n]=l.tag(),r=l.skip(n);e.getType().runtime.bin.onUnknownField(e,t,n,r)}}(r,i,a(),n)}}if(!t&&!n.ignoreUnknownFields)throw Error(`cannot decode message ${e.typeName} from JSON: key "${s}" is unknown`)}}return r},writeMessage(e,t){let n;let r=e.getType(),i={};try{for(n of r.fields.byNumber()){if(!sz(n,e)){var a;if(n.req)throw"required field not set";if(!t.emitDefaultValues||!((a=n).repeated||"map"==a.kind||!a.oneof&&"message"!=a.kind&&!a.opt&&!
1a.req))continue}let r=n.oneof?e[n.oneof.localName].value:e[n.localName],s=oe(n,r,t);void 0!==s&&(i[t.useProtoFieldName?n.name:n.jsonName]=s)}let s=t.typeRegistry;if(null==s?void 0:s.findExtensionFor)for(let n of r.runtime.bin.listUnknownFields(e)){let a=s.findExtensionFor(r.typeName,n.no);if(a&&sH(e,a)){let n=function(e,t,n){sZ(t,e);let r=t.runtime.bin.makeReadOptions(n),i=function(e,t){if(!t.repeated&&("enum"==t.kind||"scalar"==t.kind)){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(e=>e.no===t.no)}(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,s]=sY(t);for(let e of i)t.runtime.bin.readField(a,r.readerFactory(e.data),t.field,e.wireType,r);return s()}(e,a,t),r=oe(a.field,n,t);void 0!==r&&(i[a.field.jsonName]=r)}}}catch(i){let e=n?`cannot encode field ${r.typeName}.${n.name} to JSON`:`cannot encode message ${r.typeName} to JSON`,t=i instanceof Error?i.message:String(i);throw Error(e+(t.length>0?`: ${t}`:""))}return i},readScalar:(e,t,n)=>s7(e,t,null!=n?n:td.BIGINT,!0),writeScalar(e,t,n){if(void 0!==t&&(n||sq(e,t)))return on(e,t)},debug:s9},bin:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},os),e):os},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},oo),e):oo},listUnknownFields(e){var t;return null!==(t=e[oa])&&void 0!==t?t:[]},discardUnknownFields(e){delete e[oa]},writeUnknownFields(e,t){let n=e[oa];if(n)for(let e of n)t.tag(e.no,e.wireType).raw(e.data)},onUnknownField(e,t,n,r){Array.isArray(e[oa])||(e[oa]=[]),e[oa].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a,s;let o=e.getType(),l=i?t.len:t.pos+n;for(;t.pos<l&&([a,s]=t.tag(),s!=tf.EndGroup);){let n=o.fields.find(a);if(!n){let n=t.skip(s);r.readUnknownFields&&this.onUnknownField(e,a,s,n);continue}ol(e,t,n,s,r)}if(i&&(s!=tf.EndGroup||a!==n))throw Error("invalid end group tag")},readField:ol,writeMessage(e,t,n){let r=e.getType();for(let i of r.fields.byNumber()){if(!sz(i,e)){if(i.req)throw Error(`cannot encode field ${r.typeName}.${i.name} to binary: required field not set`);continue}let a=i.oneof?e[i.oneof.localName].value:e[i.localName];of(i,a,t,n)}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t},writeField(e,t,n,r){void 0!==t&&of(e,t,n,r)}},util:Object.assign(Object.assign({},{setEnumType:sA,initPartial(e,t){if(void 0!==e)for(let n of t.getType().fields.byMember()){let r=n.localName;if(void 0!==e[r])switch(n.kind){case"oneof":let i=e[r].case;if(void 0===i)continue;let a=n.findField(i),s=e[r].value;a&&"message"==a.kind&&!s0(s,a.T)?s=new a.T(s):a&&"scalar"===a.kind&&a.T===tc.BYTES&&(s=oT(s)),t[r]={case:i,value:s};break;case"scalar":case"enum":let o=e[r];n.T===tc.BYTES&&(o=n.repeated?o.map(oT):oT(o)),t[r]=o;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===tc.BYTES)for(let[n,i]of Object.entries(e[r]))t[r][n]=oT(i);else Object.assign(t[r],e[r]);break;case"message":let l=n.V.T;for(let n of Object.keys(e[r])){let i=e[r][n];l.fieldWrapper||(i=new l(i)),t[r][n]=i}}break;case"message":let u=n.T;if(n.repeated)t[r]=e[r].map(e=>s0(e,u)?e:new u(e));else{let n=e[r];u.fieldWrapper?"google.protobuf.BytesValue"===u.typeName?t[r]=oT(n):t[r]=n:t[r]=s0(n,u)?n:new u(n)}}}},equals:(e,t,n)=>t===n||!!t&&!!n&&e.fields.byMember().every(e=>{let r=t[e.localName],i=n[e.localName];if(e.repeated){if(r.length!==i.length)return!1;switch(e.kind){case"message":return r.every((t,n)=>e.T.equals(t,i[n]));case"scalar":return r.every((t,n)=>sV(e.T,t,i[n]));case"enum":return r.every((e,t)=>sV(tc.INT32,e,i[t]))}throw Error(`repeated cannot contain ${e.kind}`)}switch(e.kind){case"message":return e.T.equals(r,i);case"enum":return sV(tc.INT32,r,i);case"scalar":return sV(e.T,r,i);case"oneof":if(r.case!==i.case)return!1;let a=e.findField(r.case);if(void 0===a)return!0;switch(a.kind){case"message":return a.T.equals(r.value,i.value);case"enum":return sV(tc.INT32,r.value,i.value);case"scalar":return sV(a.T,r.value,i.value)}throw Error(`oneof cannot contain ${a.kind}`);case"map":let s=Object.keys(r).concat(Object.keys(i));switch(e.V.kind){case"message":let o=e.V.T;return s.every(e=>o.equals(r[e],i[e]));case"enum":return s.every(e=>sV(tc.INT32,r[e],i[e]));case"scalar":let l=e.V.T;return s.every(e=>sV(l,r[e],i[e]))}}}),clone(e){let t=e.getType(),n=new t;for(let r of t.fields.byMember()){let t;let i=e[r.localName];if(r.repeated)t=i.map(og);else if("map"==r.kind)for(let[e,a]of(t=n[r.localName],Object.entries(i)))t[e]=og(a);else t="oneof"==r.kind?r.findField(i.case)?{case:i.case,value:og(i.value)}:{case:void 0}:og(i);n[r.localName]=t}return n}}),{newFieldList:W,initFields:X}),makeMessageType(e,t,n){return function(e,t,n,r){var i;let a=null!==(i=null==r?void 0:r.localName)&&void 0!==i?i:t.substring(t.lastIndexOf(".")+1),s={[a]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[a];return Object.setPrototypeOf(s.prototype,new sb),Object.assign(s,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary:(e,t)=>new s().fromBinary(e,t),fromJson:(e,t)=>new s().fromJson(e,t),fromJsonString:(e,t)=>
1new s().fromJsonString(e,t),equals:(t,n)=>e.util.equals(s,t,n)}),s}(this,e,t,n)},makeEnum:function(e,t,n){let r={};for(let e of t){let t=sD(e);r[t.localName]=t.no,r[t.no]=t.localName}return sA(r,e,t,n),r},makeEnumType:sF,getEnumType:function(e){let t=e[sS];return s_(t,"missing enum type on enum object"),t},makeExtension(e,t,n){var r;let i;return r=this,{typeName:e,extendee:t,get field(){if(!i){let t="function"==typeof n?n():n;t.name=e.split(".").pop(),t.jsonName=`[${e}]`,i=r.util.newFieldList([t]).list()[0]}return i},runtime:r}}});class oA extends sb{type="";id="";constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.URI";static fields=oS.util.newFieldList(()=>[{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:9}]);static fromBinary(e,t){return new oA().fromBinary(e,t)}static fromJson(e,t){return new oA().fromJson(e,t)}static fromJsonString(e,t){return new oA().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oA,e,t)}}class oF extends sb{millis=s$.zero;constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.Timestamp";static fields=oS.util.newFieldList(()=>[{no:10,name:"millis",kind:"scalar",T:3}]);static fromBinary(e,t){return new oF().fromBinary(e,t)}static fromJson(e,t){return new oF().fromJson(e,t)}static fromJsonString(e,t){return new oF().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oF,e,t)}}(K=tm||(tm={}))[K.UNSPECIFIED=0]="UNSPECIFIED",K[K.PROD=1]="PROD",K[K.STAGING=2]="STAGING",K[K.DEV=3]="DEV",K[K.TEST=4]="TEST",oS.util.setEnumType(tm,"ibotta.tracking.common.v1.Environment",[{no:0,name:"ENVIRONMENT_UNSPECIFIED"},{no:1,name:"ENVIRONMENT_PROD"},{no:2,name:"ENVIRONMENT_STAGING"},{no:3,name:"ENVIRONMENT_DEV"},{no:4,name:"ENVIRONMENT_TEST"}]);class oD extends sb{eventUri;eventAt;environment=tm.UNSPECIFIED;agent="";revision="";zoneId="";ip="";constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.EventHeader";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_uri",kind:"message",T:oA},{no:2,name:"event_at",kind:"message",T:oF},{no:3,name:"environment",kind:"enum",T:oS.getEnumType(tm)},{no:10,name:"agent",kind:"scalar",T:9},{no:20,name:"revision",kind:"scalar",T:9},{no:30,name:"zone_id",kind:"scalar",T:9},{no:100,name:"ip",kind:"scalar",T:9}]);static fromBinary(e,t){return new oD().fromBinary(e,t)}static fromJson(e,t){return new oD().fromJson(e,t)}static fromJsonString(e,t){return new oD().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oD,e,t)}}(H=tp||(tp={}))[H.UNSPECIFIED=0]="UNSPECIFIED",H[H.IOS=10]="IOS",H[H.ANDROID=20]="ANDROID",H[H.WEBAPP=30]="WEBAPP",H[H.WEB_V2=40]="WEB_V2",H[H.KINDLE=50]="KINDLE",H[H.BROWSER_EXTENSION=60]="BROWSER_EXTENSION",H[H.UNIFIED_ACCOUNT_LINKING=70]="UNIFIED_ACCOUNT_LINKING",H[H.BRAZE=80]="BRAZE",H[H.CONNECTION_CONTENT=90]="CONNECTION_CONTENT",H[H.IPN_PARTNER_PORTAL=100]="IPN_PARTNER_PORTAL",H[H.IPN_CLIENT_PORTAL=110]="IPN_CLIENT_PORTAL",H[H.IPN_PORTAL=120]="IPN_PORTAL",H[H.MARKETING_CONSUMER=130]="MARKETING_CONSUMER",H[H.MARKETING_CORPORATE=140]="MARKETING_CORPORATE",oS.util.setEnumType(tp,"ibotta.tracking.common.v1.IbottaPlatform",[{no:0,name:"IBOTTA_PLATFORM_UNSPECIFIED"},{no:10,name:"IBOTTA_PLATFORM_IOS"},{no:20,name:"IBOTTA_PLATFORM_ANDROID"},{no:30,name:"IBOTTA_PLATFORM_WEBAPP"},{no:40,name:"IBOTTA_PLATFORM_WEB_V2"},{no:50,name:"IBOTTA_PLATFORM_KINDLE"},{no:60,name:"IBOTTA_PLATFORM_BROWSER_EXTENSION"},{no:70,name:"IBOTTA_PLATFORM_UNIFIED_ACCOUNT_LINKING"},{no:80,name:"IBOTTA_PLATFORM_BRAZE"},{no:90,name:"IBOTTA_PLATFORM_CONNECTION_CONTENT"},{no:100,name:"IBOTTA_PLATFORM_IPN_PARTNER_PORTAL"},{no:110,name:"IBOTTA_PLATFORM_IPN_CLIENT_PORTAL"},{no:120,name:"IBOTTA_PLATFORM_IPN_PORTAL"},{no:130,name:"IBOTTA_PLATFORM_MARKETING_CONSUMER"},{no:140,name:"IBOTTA_PLATFORM_MARKETING_CORPORATE"}]);class oB extends sb{lat=0;lng=0;horizontalAccuracyMeters=0;constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.Location";static fields=oS.util.newFieldList(()=>[{no:10,name:"lat",kind:"scalar",T:1},{no:20,name:"lng",kind:"scalar",T:1},{no:30,name:"horizontal_accuracy_meters",kind:"scalar",T:1}]);static fromBinary(e,t){return new oB().fromBinary(e,t)}static fromJson(e,t){return new oB().fromJson(e,t)}static fromJsonString(e,t){return new oB().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oB,e,t)}}class oR extends sb{eventId="";trackedAt;userId="";earlyIdentifier="";appVersion="";platform=tp.UNSPECIFIED;osName="";osVersion="";deviceId="";
1deviceAdvertiserId="";deviceModel="";globalSessionId="";location;constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.TrackingHeader";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:10,name:"tracked_at",kind:"message",T:oF},{no:20,name:"user_id",kind:"scalar",T:9},{no:30,name:"early_identifier",kind:"scalar",T:9},{no:40,name:"app_version",kind:"scalar",T:9},{no:50,name:"platform",kind:"enum",T:oS.getEnumType(tp)},{no:60,name:"os_name",kind:"scalar",T:9},{no:70,name:"os_version",kind:"scalar",T:9},{no:80,name:"device_id",kind:"scalar",T:9},{no:90,name:"device_advertiser_id",kind:"scalar",T:9},{no:100,name:"device_model",kind:"scalar",T:9},{no:120,name:"global_session_id",kind:"scalar",T:9},{no:130,name:"location",kind:"message",T:oB}]);static fromBinary(e,t){return new oR().fromBinary(e,t)}static fromJson(e,t){return new oR().fromJson(e,t)}static fromJsonString(e,t){return new oR().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oR,e,t)}}(Z=th||(th={}))[Z.UNSPECIFIED=0]="UNSPECIFIED",Z[Z.USD=1]="USD",oS.util.setEnumType(th,"ibotta.tracking.common.v1.Currency",[{no:0,name:"CURRENCY_UNSPECIFIED"},{no:1,name:"CURRENCY_USD"}]);class oP extends sb{currency=th.UNSPECIFIED;micros=s$.zero;constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.Money";static fields=oS.util.newFieldList(()=>[{no:1,name:"currency",kind:"enum",T:oS.getEnumType(th)},{no:2,name:"micros",kind:"scalar",T:3}]);static fromBinary(e,t){return new oP().fromBinary(e,t)}static fromJson(e,t){return new oP().fromJson(e,t)}static fromJsonString(e,t){return new oP().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oP,e,t)}}class oU extends sb{reward={case:void 0};constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.RewardProperties";static fields=oS.util.newFieldList(()=>[{no:110,name:"amount",kind:"message",T:oP,oneof:"reward"},{no:120,name:"percent",kind:"scalar",T:2,oneof:"reward"}]);static fromBinary(e,t){return new oU().fromBinary(e,t)}static fromJson(e,t){return new oU().fromJson(e,t)}static fromJsonString(e,t){return new oU().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oU,e,t)}}class ox extends sb{sessionId="";actionId="";constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.SearchProperties";static fields=oS.util.newFieldList(()=>[{no:100,name:"session_id",kind:"scalar",T:9},{no:110,name:"action_id",kind:"scalar",T:9}]);static fromBinary(e,t){return new ox().fromBinary(e,t)}static fromJson(e,t){return new ox().fromJson(e,t)}static fromJsonString(e,t){return new ox().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(ox,e,t)}}class oL extends sb{name="";index=0;constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.ModuleProperties";static fields=oS.util.newFieldList(()=>[{no:100,name:"name",kind:"scalar",T:9},{no:110,name:"index",kind:"scalar",T:5}]);static fromBinary(e,t){return new oL().fromBinary(e,t)}static fromJson(e,t){return new oL().fromJson(e,t)}static fromJsonString(e,t){return new oL().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oL,e,t)}}class oC extends sb{campaign="";content="";medium="";source="";constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.UTM";static fields=oS.util.newFieldList(()=>[{no:100,name:"campaign",kind:"scalar",T:9},{no:110,name:"content",kind:"scalar",T:9},{no:120,name:"medium",kind:"scalar",T:9},{no:130,name:"source",kind:"scalar",T:9}]);static fromBinary(e,t){return new oC().fromBinary(e,t)}static fromJson(e,t){return new oC().fromJson(e,t)}static fromJsonString(e,t){return new oC().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oC,e,t)}}class oJ extends sb{id="";featureFlag="";props={};constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common.v1.Experiment";static fields=oS.util.newFieldList(()=>[{no:10,name:"id",kind:"scalar",T:9},{no:20,name:"feature_flag",kind:"scalar",T:9},{no:30,name:"props",kind:"map",K:9,V:{kind:"scalar",T:9}}]);static fromBinary(e,t){return new oJ().fromBinary(e,t)}static fromJson(e,t){return new oJ().fromJson(e,t)}static fromJsonString(e,t){return new oJ().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oJ,e,t)}}class oj extends sb{eventHeader;trackingHeader;offerId="";retailerId="";screenName="";listIndex=0;module;moduleId="";reward;search;launchId="";url="";context="";isFeatured=!1;isSponsored=!1;categoryId="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;
1static typeName="ibotta.tracking.common_events.v1.AffiliateOfferActivated";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"offer_id",kind:"scalar",T:9},{no:110,name:"retailer_id",kind:"scalar",T:9},{no:120,name:"screen_name",kind:"scalar",T:9},{no:130,name:"list_index",kind:"scalar",T:5},{no:140,name:"module",kind:"message",T:oL},{no:150,name:"module_id",kind:"scalar",T:9},{no:160,name:"reward",kind:"message",T:oU},{no:170,name:"search",kind:"message",T:ox},{no:180,name:"launch_id",kind:"scalar",T:9},{no:190,name:"url",kind:"scalar",T:9},{no:200,name:"context",kind:"scalar",T:9},{no:210,name:"is_featured",kind:"scalar",T:8},{no:220,name:"is_sponsored",kind:"scalar",T:8},{no:230,name:"category_id",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oj().fromBinary(e,t)}static fromJson(e,t){return new oj().fromJson(e,t)}static fromJsonString(e,t){return new oj().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oj,e,t)}}(z=tg||(tg={}))[z.UNSPECIFIED=0]="UNSPECIFIED",z[z.IBOTTA=1]="IBOTTA",z[z.OCTOSHOP=2]="OCTOSHOP",oS.util.setEnumType(tg,"ibotta.tracking.common.v1.ExtensionName",[{no:0,name:"EXTENSION_NAME_UNSPECIFIED"},{no:1,name:"EXTENSION_NAME_IBOTTA"},{no:2,name:"EXTENSION_NAME_OCTOSHOP"}]),(Q=tT||(tT={}))[Q.UNSPECIFIED=0]="UNSPECIFIED",Q[Q.CLAIMED=1]="CLAIMED",Q[Q.UNCLAIMED=2]="UNCLAIMED",Q[Q.ATTRIBUTION_LOST=3]="ATTRIBUTION_LOST",oS.util.setEnumType(tT,"ibotta.tracking.common.v1.AffiliationStatus",[{no:0,name:"AFFILIATION_STATUS_UNSPECIFIED"},{no:1,name:"AFFILIATION_STATUS_CLAIMED"},{no:2,name:"AFFILIATION_STATUS_UNCLAIMED"},{no:3,name:"AFFILIATION_STATUS_ATTRIBUTION_LOST"}]);class oM extends sb{eventHeader;trackingHeader;browserType="";extensionName=tg.UNSPECIFIED;prevAffiliationStatus=tT.UNSPECIFIED;affiliationStatus=tT.UNSPECIFIED;prevAttrClaimedEventId="";retailerId="";claimedAt;offerId="";attrClaimedEventId="";type="";constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.AttributionClaimed";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"browser_type",kind:"scalar",T:9},{no:110,name:"extension_name",kind:"enum",T:oS.getEnumType(tg)},{no:120,name:"prev_affiliation_status",kind:"enum",T:oS.getEnumType(tT)},{no:130,name:"affiliation_status",kind:"enum",T:oS.getEnumType(tT)},{no:140,name:"prev_attr_claimed_event_id",kind:"scalar",T:9},{no:150,name:"retailer_id",kind:"scalar",T:9},{no:160,name:"claimed_at",kind:"message",T:oF},{no:170,name:"offer_id",kind:"scalar",T:9},{no:180,name:"attr_claimed_event_id",kind:"scalar",T:9},{no:190,name:"type",kind:"scalar",T:9}]);static fromBinary(e,t){return new oM().fromBinary(e,t)}static fromJson(e,t){return new oM().fromJson(e,t)}static fromJsonString(e,t){return new oM().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oM,e,t)}}(ee=ty||(ty={}))[ee.UNSPECIFIED=0]="UNSPECIFIED",ee[ee.IBOTTA=1]="IBOTTA",ee[ee.KEVEL=2]="KEVEL",oS.util.setEnumType(ty,"ibotta.tracking.common.v1.AdSource",[{no:0,name:"AD_SOURCE_UNSPECIFIED"},{no:1,name:"AD_SOURCE_IBOTTA"},{no:2,name:"AD_SOURCE_KEVEL"}]);class o$ extends sb{eventHeader;trackingHeader;bannerId="";screenName="";context="";listIndex=0;module;retailerId="";categoryId="";bannerSource=ty.UNSPECIFIED;experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.BannerClicked";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:110,name:"banner_id",kind:"scalar",T:9},{no:120,name:"screen_name",kind:"scalar",T:9},{no:130,name:"context",kind:"scalar",T:9},{no:140,name:"list_index",kind:"scalar",T:5},{no:150,name:"module",kind:"message",T:oL},{no:170,name:"retailer_id",kind:"scalar",T:9},{no:180,name:"category_id",kind:"scalar",T:9},{no:190,name:"banner_source",kind:"enum",T:oS.getEnumType(ty)},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o$().fromBinary(e,t)}static fromJson(e,t){return new o$().fromJson(e,t)}static fromJsonString(e,t){return new o$().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o$,e,t)}}class oV extends sb{eventHeader;trackingHeader;bannerId="";screenName="";context="";listIndex=0;module;retailerId="";categoryId="";bannerSource=ty.UNSPECIFIED;experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.BannerRendered";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:110,name:"banner_id",kind:"scalar",T:9},{no:120,name:"screen_name",kind:"scalar",T:9},{no:130,name:"context",kind:"scalar",T:9},{no:140,name:"list_index",kind:"scalar",T:5},{no:150,name:"module",kind:"message",T:oL},{no:170,name:"retailer_id",kind:"scalar",T:9},{no:180,name:"category_id",kind:"scalar",T:9},{no:190,name:"banner_source",kind:"enum",T:oS.getEnumType(ty)},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oV().fromBinary(e,t)}static fromJson(e,t){return new oV().fromJson(e,t)}static fromJsonString(e,t){return new oV().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oV,e,t)}}class oG extends sb{eventHeader;trackingHeader;bannerId="";screenName="";context="";listIndex=0;module;retailerId="";categoryId="";bannerSource=ty.UNSPECIFIED;experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.BannerViewed";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:110,name:"banner_id",kind:"scalar",T:9},{no:120,name:"screen_name",kind:"scalar",T:9},{no:130,name:"context",kind:"scalar",T:9},{no:140,name:"list_index",kind:"scalar",T:5},{no:150,name:"module",kind:"message",T:oL},{no:170,name:"retailer_id",kind:"scalar",T:9},{no:180,name:"category_id",kind:"scalar",T:9},{no:190,name:"banner_source",kind:"enum",T:oS.getEnumType(ty)},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oG().fromBinary(e,t)}static fromJson(e,t){return new oG().fromJson(e,t)}static fromJsonString(e,t){return new oG().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oG,e,t)}}class oq extends sb{eventHeader;trackingHeader;search;module;bonusId="";listIndex=0;retailerId="";screenName="";context="";progress="";offerId="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.BonusClicked";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"search",kind:"message",T:ox},{no:110,name:"module",kind:"message",T:oL},{no:120,name:"bonus_id",kind:"scalar",T:9},{no:130,name:"list_index",kind:"scalar",T:5},{no:140,name:"retailer_id",kind:"scalar",T:9},{no:150,name:"screen_name",kind:"scalar",T:9},{no:160,name:"context",kind:"scalar",T:9},{no:170,name:"progress",kind:"scalar",T:9},{no:180,name:"offer_id",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oq().fromBinary(e,t)}static fromJson(e,t){return new oq().fromJson(e,t)}static fromJsonString(e,t){return new oq().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oq,e,t)}}class oY extends sb{eventHeader;trackingHeader;search;module;bonusId="";listIndex=0;retailerId="";screenName="";context="";progress="";offerId="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.BonusViewed";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"search",kind:"message",T:ox},{no:110,name:"module",kind:"message",T:oL},{no:120,name:"bonus_id",kind:"scalar",T:9},{no:130,name:"list_index",kind:"scalar",T:5},{no:140,name:"retailer_id",kind:"scalar",T:9},{no:150,name:"screen_name",kind:"scalar",T:9},{no:160,name:"context",kind:"scalar",T:9},{no:170,name:"progress",kind:"scalar",T:9},{no:180,name:"offer_id",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oY().fromBinary(e,t)}static fromJson(e,t){return new oY().fromJson(e,t)}static fromJsonString(e,t){return new oY().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oY,e,t)}}class oW extends sb{eventHeader;trackingHeader;module;listIndex=0;categoryId="";screenName="";context="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.CategoryClicked";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"module",kind:"message",T:oL},{no:110,name:"list_index",kind:"scalar",T:5},{no:120,name:"category_id",kind:"scalar",T:9},{no:130,name:"screen_name",kind:"scalar",T:9},{no:140,name:"context",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oW().fromBinary(e,t)}static fromJson(e,t){return new oW().fromJson(e,t)}static fromJsonString(e,t){return new oW().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oW,e,t)}}class oX extends sb{eventHeader;trackingHeader;module;listIndex=0;categoryId="";screenName="";context="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.CategoryViewed";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"module",kind:"message",T:oL},{no:110,name:"list_index",kind:"scalar",T:5},{no:120,name:"category_id",kind:"scalar",T:9},{no:130,name:"screen_name",kind:"scalar",T:9},{no:140,name:"context",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oX().fromBinary(e,t)}static fromJson(e,t){return new oX().fromJson(e,t)}static fromJsonString(e,t){return new oX().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oX,e,t)}}class oK extends sb{eventHeader;trackingHeader;utm;utmString="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.DeeplinkLaunched";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:10,name:"utm",kind:"message",T:oC},{no:20,name:"utm_string",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oK().fromBinary(e,t)}static fromJson(e,t){return new oK().fromJson(e,t)}static fromJsonString(e,t){return new oK().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oK,e,t)}}(et=tI||(tI={}))[et.UNSPECIFIED=0]="UNSPECIFIED",et[et.BUTTON=1]="BUTTON",et[et.ROW_CLICK=2]="ROW_CLICK",et[et.SWIPE=3]="SWIPE",et[et.FILTER=4]="FILTER",et[et.SORT=5]="SORT",et[et.WIDGET=6]="WIDGET",oS.util.setEnumType(tI,"ibotta.tracking.common.v1.InteractionType",[{no:0,name:"INTERACTION_TYPE_UNSPECIFIED"},{no:1,name:"INTERACTION_TYPE_BUTTON"},{no:2,name:"INTERACTION_TYPE_ROW_CLICK"},{no:3,name:"INTERACTION_TYPE_SWIPE"},{no:4,name:"INTERACTION_TYPE_FILTER"},{no:5,name:"INTERACTION_TYPE_SORT"},{no:6,name:"INTERACTION_TYPE_WIDGET"}]);class oH extends sb{eventHeader;trackingHeader;interactionType=tI.UNSPECIFIED;interactionName="";context="";screenName="";retailerId="";categoryId="";state="";item;bonusId="";listIndex=0;module;experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.InteractionPerformed";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"interaction_type",kind:"enum",T:oS.getEnumType(tI)},{no:110,name:"interaction_name",kind:"scalar",T:9},{no:120,name:"context",kind:"scalar",T:9},{no:130,name:"screen_name",kind:"scalar",T:9},{no:140,name:"retailer_id",kind:"scalar",T:9},{no:150,name:"category_id",kind:"scalar",T:9},{no:160,name:"state",kind:"scalar",T:9},{no:170,name:"item",kind:"message",T:oA},{no:180,name:"bonus_id",kind:"scalar",T:9},{no:190,name:"list_index",kind:"scalar",T:5},{no:200,name:"module",kind:"message",T:oL},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oH().fromBinary(e,t)}static fromJson(e,t){return new oH().fromJson(e,t)}static fromJsonString(e,t){return new oH().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oH,e,t)}}class oZ extends sb{eventHeader;trackingHeader;offerId="";screenName="";context="";moduleId="";module;listIndex=0;categoryId="";retailerId="";bonusId="";offer;search;term="";isFeatured=!1;isSponsored=!1;experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.OfferClicked";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"offer_id",kind:"scalar",T:9},{no:110,name:"screen_name",kind:"scalar",T:9},{no:120,name:"context",kind:"scalar",T:9},{no:130,name:"module_id",kind:"scalar",T:9},{no:140,name:"module",kind:"message",T:oL},{no:150,name:"list_index",kind:"scalar",T:5},{no:160,name:"category_id",kind:"scalar",T:9},{no:170,name:"retailer_id",kind:"scalar",T:9},{no:180,name:"bonus_id",kind:"scalar",T:9},{no:200,name:"offer",kind:"message",T:oU},{no:210,name:"search",kind:"message",T:ox},{no:220,name:"term",kind:"scalar",T:9},{no:230,name:"is_featured",kind:"scalar",T:8},{no:240,name:"is_sponsored",kind:"scalar",T:8},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oZ().fromBinary(e,t)}static fromJson(e,t){return new oZ().fromJson(e,t)}static fromJsonString(e,t){return new oZ().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oZ,e,t)}}class oz extends sb{eventHeader;trackingHeader;offerId="";screenName="";context="";moduleId="";module;listIndex=0;categoryId="";retailerId="";bonusId="";offer;search;term="";isFeatured=!1;isSponsored=!1;experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.OfferUnlocked";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"offer_id",kind:"scalar",T:9},{no:110,name:"screen_name",kind:"scalar",T:9},{no:120,name:"context",kind:"scalar",T:9},{no:130,name:"module_id",kind:"scalar",T:9},{no:140,name:"module",kind:"message",T:oL},{no:150,name:"list_index",kind:"scalar",T:5},{no:160,name:"category_id",kind:"scalar",T:9},{no:170,name:"retailer_id",kind:"scalar",T:9},{no:180,name:"bonus_id",kind:"scalar",T:9},{no:200,name:"offer",kind:"message",T:oU},{no:210,name:"search",kind:"message",T:ox},{no:220,name:"term",kind:"scalar",T:9},{no:230,name:"is_featured",kind:"scalar",T:8},{no:240,name:"is_sponsored",kind:"scalar",T:8},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oz().fromBinary(e,t)}static fromJson(e,t){return new oz().fromJson(e,t)}static fromJsonString(e,t){return new oz().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oz,e,t)}}class oQ extends sb{eventHeader;trackingHeader;offerId="";screenName="";context="";moduleId="";module;listIndex=0;categoryId="";retailerId="";bonusId="";offer;search;term="";isFeatured=!1;isSponsored=!1;experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.OfferViewed";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",ki
1nd:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"offer_id",kind:"scalar",T:9},{no:110,name:"screen_name",kind:"scalar",T:9},{no:120,name:"context",kind:"scalar",T:9},{no:130,name:"module_id",kind:"scalar",T:9},{no:140,name:"module",kind:"message",T:oL},{no:150,name:"list_index",kind:"scalar",T:5},{no:160,name:"category_id",kind:"scalar",T:9},{no:170,name:"retailer_id",kind:"scalar",T:9},{no:180,name:"bonus_id",kind:"scalar",T:9},{no:200,name:"offer",kind:"message",T:oU},{no:210,name:"search",kind:"message",T:ox},{no:220,name:"term",kind:"scalar",T:9},{no:230,name:"is_featured",kind:"scalar",T:8},{no:240,name:"is_sponsored",kind:"scalar",T:8},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new oQ().fromBinary(e,t)}static fromJson(e,t){return new oQ().fromJson(e,t)}static fromJsonString(e,t){return new oQ().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(oQ,e,t)}}class o0 extends sb{eventHeader;trackingHeader;screenName="";context="";item;networkCode="";errorMessage="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.PageViewed";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"screen_name",kind:"scalar",T:9},{no:110,name:"context",kind:"scalar",T:9},{no:120,name:"item",kind:"message",T:oA},{no:130,name:"network_code",kind:"scalar",T:9},{no:140,name:"error_message",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o0().fromBinary(e,t)}static fromJson(e,t){return new o0().fromJson(e,t)}static fromJsonString(e,t){return new o0().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o0,e,t)}}class o1 extends sb{eventHeader;trackingHeader;search;module;listIndex=0;retailerId="";categoryId="";screenName="";context="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.RetailerClicked";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"search",kind:"message",T:ox},{no:110,name:"module",kind:"message",T:oL},{no:120,name:"list_index",kind:"scalar",T:5},{no:130,name:"retailer_id",kind:"scalar",T:9},{no:140,name:"category_id",kind:"scalar",T:9},{no:150,name:"screen_name",kind:"scalar",T:9},{no:160,name:"context",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o1().fromBinary(e,t)}static fromJson(e,t){return new o1().fromJson(e,t)}static fromJsonString(e,t){return new o1().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o1,e,t)}}class o2 extends sb{eventHeader;trackingHeader;search;module;listIndex=0;retailerGroupId="";categoryId="";screenName="";context="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.RetailerGroupClicked";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"search",kind:"message",T:ox},{no:110,name:"module",kind:"message",T:oL},{no:120,name:"list_index",kind:"scalar",T:5},{no:130,name:"retailer_group_id",kind:"scalar",T:9},{no:140,name:"category_id",kind:"scalar",T:9},{no:150,name:"screen_name",kind:"scalar",T:9},{no:160,name:"context",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o2().fromBinary(e,t)}static fromJson(e,t){return new o2().fromJson(e,t)}static fromJsonString(e,t){return new o2().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o2,e,t)}}class o3 extends sb{eventHeader;trackingHeader;search;module;listIndex=0;retailerGroupId="";categoryId="";screenName="";context="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.RetailerGroupViewed";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"search",kind:"message",T:ox},{no:110,name:"module",kind:"message",T:oL},{no:120,name:"list_index",kind:"scalar",T:5},{no:130,name:"retailer_group_id",kind:"scalar",T:9},{no:140,name:"category_id",kind:"scalar",T:9},{no:150,name:"screen_name",kind:"scalar",T:9},{no:160,name:"context",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o3().fromBinary(e,t)}static fromJson(e,t){return new o3().fromJson(e,t)}static fromJsonString(e,t){return new o3().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o3,e,t)}}class o4 extends sb{eventHeader;trackingHeader;search;module;listIndex=0;retailerId="";categoryId="";screenName="";context="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.RetailerViewed";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"search",kind:"message",T:ox},{no:110,name:"module",kind:"message",T:oL},{no:120,name:"list_index",kind:"scalar",T:5},{no:130,name:"retailer_id",kind:"scalar",T:9},{no:140,name:"category_id",kind:"scalar",T:9},{no:150,name:"screen_name",kind:"scalar",T:9},{no:160,name:"context",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o4().fromBinary(e,t)}static fromJson(e,t){return new o4().fromJson(e,t)}static fromJsonString(e,t){return new o4().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o4,e,t)}}class o6 extends sb{eventHeader;trackingHeader;search;module;listIndex=0;offerId="";bonusId="";retailerId="";contextId="";context="";screenName="";term="";filterNames=[];searchOutcome="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.SearchResultReturned";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"search",kind:"message",T:ox},{no:120,name:"module",kind:"message",T:oL},{no:140,name:"list_index",kind:"scalar",T:5},{no:150,name:"offer_id",kind:"scalar",T:9},{no:160,name:"bonus_id",kind:"scalar",T:9},{no:170,name:"retailer_id",kind:"scalar",T:9},{no:180,name:"context_id",kind:"scalar",T:9},{no:190,name:"context",kind:"scalar",T:9},{no:200,name:"screen_name",kind:"scalar",T:9},{no:210,name:"term",kind:"scalar",T:9},{no:220,name:"filter_names",kind:"scalar",T:9,repeated:!0},{no:230,name:"search_outcome",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o6().fromBinary(e,t)}static fromJson(e,t){return new o6().fromJson(e,t)}static fromJsonString(e,t){return new o6().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o6,e,t)}}class o9 extends sb{eventHeader;trackingHeader;search;context="";screenName="";retailerId="";term="";searchText="";searchType="";experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.SearchSubmitted";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:100,name:"search",kind:"message",T:ox},{no:110,name:"context",kind:"scalar",T:9},{no:120,name:"screen_name",kind:"scalar",T:9},{no:130,name:"retailer_id",kind:"scalar",T:9},{no:140,name:"term",kind:"scalar",T:9},{no:150,name:"search_text",kind:"scalar",T:9},{no:160,name:"search_type",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o9().fromBinary(e,t)}static fromJson(e,t){return new o9().fromJson(e,t)}static fromJsonString(e,t){return new o9().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o9,e,t)}}class o8 extends sb{eventHeader;trackingHeader;duration=0;experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.SessionEnded";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:70,name:"duration",kind:"scalar",T:1},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o8().fromBinary(e,t)}static fromJson(e,t){return new o8().fromJson(e,t)}static fromJsonString(e,t){return new o8().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o8,e,t)}}(en=tN||(tN={}))[en.UNSPECIFIED=0]="UNSPECIFIED",en[en.AUTHORIZED_WHILE_IN_USE=1]="AUTHORIZED_WHILE_IN_USE",en[en.DENIED=2]="DENIED",en[en.NOT_DETERMINED=3]="NOT_DETERMINED",en[en.ACCEPTED=4]="ACCEPTED",oS.util.setEnumType(tN,"ibotta.tracking.common.v1.LocationPermission",[{no:0,name:"LOCATION_PERMISSION_UNSPECIFIED"},{no:1,name:"LOCATION_PERMISSION_AUTHORIZED_WHILE_IN_USE"},{no:2,name:"LOCATION_PERMISSION_DENIED"},{no:3,name:"LOCATION_PERMISSION_NOT_DETERMINED"},{no:4,name:"LOCATION_PERMISSION_ACCEPTED"}]),(er=tE||(tE={}))[er.UNSPECIFIED=0]="UNSPECIFIED",er[er.FULL_ACCURACY=1]="FULL_ACCURACY",er[er.REDUCED_ACCURACY=2]="REDUCED_ACCURACY",oS.util.setEnumType(tE,"ibotta.tracking.common.v1.LocationAccuracyPermission",[{no:0,name:"LOCATION_ACCURACY_PERMISSION_UNSPECIFIED"},{no:1,name:"LOCATION_ACCURACY_PERMISSION_FULL_ACCURACY"},{no:2,name:"LOCATION_ACCURACY_PERMISSION_REDUCED_ACCURACY"}]),(ei=tk||(tk={}))[ei.UNSPECIFIED=0]="UNSPECIFIED",ei[ei.AUTHORIZED=1]="AUTHORIZED",ei[ei.DENIED=2]="DENIED",ei[ei.NOT_DETERMINED=3]="NOT_DETERMINED",ei[ei.PROVISIONAL=4]="PROVISIONAL",oS.util.setEnumType(tk,"ibotta.tracking.common.v1.PushPermission",[{no:0,name:"PUSH_PERMISSION_UNSPECIFIED"},{no:1,name:"PUSH_PERMISSION_AUTHORIZED"},{no:2,name:"PUSH_PERMISSION_DENIED"},{no:3,name:"PUSH_PERMISSION_NOT_DETERMINED"},{no:4,name:"PUSH_PERMISSION_PROVISIONAL"}]),(ea=tb||(tb={}))[ea.UNSPECIFIED=0]="UNSPECIFIED",ea[ea.AUTHORIZED=1]="AUTHORIZED",ea[ea.DENIED=2]="DENIED",ea[ea.NOT_DETERMINED=3]="NOT_DETERMINED",ea[ea.RESTRICTED=4]="RESTRICTED",oS.util.setEnumType(tb,"ibotta.tracking.common.v1.AppTrackingPermission",[{no:0,name:"APP_TRACKING_PERMISSION_UNSPECIFIED"},{no:1,name:"APP_TRACKING_PERMISSION_AUTHORIZED"},{no:2,name:"APP_TRACKING_PERMISSION_DENIED"},{no:3,name:"APP_TRACKING_PERMISSION_NOT_DETERMINED"},{no:4,name:"APP_TRACKING_PERMISSION_RESTRICTED"}]);class o7 extends sb{eventHeader;trackingHeader;locationPermissionStatus=tN.UNSPECIFIED;pushPermissionStatus=tk.UNSPECIFIED;locationAccuracyPermissionStatus=tE.UNSPECIFIED;appTrackingPermissionStatus=tb.UNSPECIFIED;experimental=[];constructor(e){super(),oS.util.initPartial(e,this)}static runtime=oS;static typeName="ibotta.tracking.common_events.v1.SessionStarted";static fields=oS.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:oD},{no:2,name:"tracking_header",kind:"message",T:oR},{no:30,name:"location_permission_status",kind:"enum",T:oS.getEnumType(tN)},{no:40,name:"push_permission_status",kind:"enum",T:oS.getEnumType(tk)},{no:50,name:"location_accuracy_permission_status",kind:"enum",T:oS.getEnumType(tE)},{no:60,name:"app_tracking_permission_status",kind:"enum",T:oS.getEnumType(tb)},{no:1e3,name:"experimental",kind:"message",T:oJ,repeated:!0}]);static fromBinary(e,t){return new o7().fromBinary(e,t)}static fromJson(e,t){return new o7().fromJson(e,t)}static fromJsonString(e,t){return new o7().fromJsonString(e,t)}static equals(e,t){return oS.util.equals(o7,e,t)}}class o5{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){let n=this.getType().runtime.bin,r=n.makeReadOptions(t);return n.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){let n=this.getType(),r=n.runtime.json,i=r.makeReadOptions(t);return r.readMessage(n,e,i,this),this}fromJsonString(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`cannot decode ${this.getType().typeName} from JSON: ${e instanceof Error?e.message:String(e)}`)}return this.fromJson(n,t)}toBinary(e){let t=this.getType().runtime.bin,n=t.makeWriteOptions(e),r=n.writerFactory();return t.writeMessage(this,r,n),r.finish()}
1toJson(e){let t=this.getType().runtime.json,n=t.makeWriteOptions(e);return t.writeMessage(this,n)}toJsonString(e){var t;return JSON.stringify(this.toJson(e),null,null!==(t=null==e?void 0:e.prettySpaces)&&void 0!==t?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function le(e,t){if(!e)throw Error(t)}function lt(e){if("number"!=typeof e)throw Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error("invalid int 32: "+e)}function ln(e){if("number"!=typeof e)throw Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error("invalid uint 32: "+e)}function lr(e){if("number"!=typeof e)throw Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error("invalid float 32: "+e)}let li=Symbol("@bufbuild/protobuf/enum-type");function la(e,t,n,r){e[li]=ls(t,n.map(t=>({no:t.no,name:t.name,localName:e[t.no]})),r)}function ls(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let e of t){let t=lo(e);a.push(t),r[e.name]=t,i[e.no]=t}return{typeName:e,values:a,findName:e=>r[e],findNumber:e=>i[e]}}function lo(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}function ll(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(15&n)<<28,t=(112&n)>>4,(128&n)==0)return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}throw Error("invalid varint")}function lu(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(i>>>7==0&&0==t),s=(a?128|i:i)&255;if(n.push(s),!a)return}let r=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(n.push((i?128|r:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=r>>>7!=0,a=(i?128|r:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}function lc(e){let t="-"===e[0];t&&(e=e.slice(1));let n=0,r=0;function i(t,i){let a=Number(e.slice(t,i));r*=1e6,(n=1e6*n+a)>=4294967296&&(r+=n/4294967296|0,n%=4294967296)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?lm(n,r):lf(n,r)}function ld(e,t){if({lo:e,hi:t}={lo:e>>>0,hi:t>>>0},t<=2097151)return String(4294967296*t+e);let n=16777215&e,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+6777216*r+6710656*i,s=r+8147497*i,o=2*i;return a>=1e7&&(s+=Math.floor(a/1e7),a%=1e7),s>=1e7&&(o+=Math.floor(s/1e7),s%=1e7),o.toString()+lp(s)+lp(a)}function lf(e,t){return{lo:0|e,hi:0|t}}function lm(e,t){return t=~t,e?e=~e+1:t+=1,lf(e,t)}let lp=e=>{let t=String(e);return"0000000".slice(t.length)+t};function lh(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(127&e|128),e>>=7;t.push(1)}}function lg(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}var lT=n(74859);let ly=function(){let e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&("object"!=typeof lT||"object"!=typeof lT.env||"1"!==lT.env.BUF_BIGINT_DISABLE)){let t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){let r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw Error(`int64 invalid: ${e}`);return r},uParse(e){let t="bigint"==typeof e?e:BigInt(e);if(t>i||t<r)throw Error(`uint64 invalid: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}let t=e=>le(/^-?[0-9]+$/.test(e),`int64 invalid: ${e}`),n=e=>le(/^[0-9]+$/.test(e),`uint64 invalid: ${e}`);return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),t(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),n(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),t(e),lc(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),n(e),lc(e)),dec:(e,t)=>(function(e,t){let n=lf(e,t),r=2147483648&n.hi;r&&(n=lm(n.lo,n.hi));let i=ld(n.lo,n.hi);return r?"-"+i:i})(e,t),uDec:(e,t)=>ld(e,t)}}();function lI(e,t,n){if(t===n)return!0;
1if(e==t_.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case t_.UINT64:case t_.FIXED64:case t_.INT64:case t_.SFIXED64:case t_.SINT64:return t==n}return!1}function lN(e,t){switch(e){case t_.BOOL:return!1;case t_.UINT64:case t_.FIXED64:case t_.INT64:case t_.SFIXED64:case t_.SINT64:return 0==t?ly.zero:"0";case t_.DOUBLE:case t_.FLOAT:return 0;case t_.BYTES:return new Uint8Array(0);case t_.STRING:return"";default:return 0}}function lE(e,t){switch(e){case t_.BOOL:return!1===t;case t_.STRING:return""===t;case t_.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return 0==t}}function lk(e){let t=e.field.localName,n=Object.create(null);return n[t]=function(e){let t=e.field;if(t.repeated)return[];if(void 0!==t.default)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return lN(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}(e),[n,()=>n[t]]}(es=t_||(t_={}))[es.DOUBLE=1]="DOUBLE",es[es.FLOAT=2]="FLOAT",es[es.INT64=3]="INT64",es[es.UINT64=4]="UINT64",es[es.INT32=5]="INT32",es[es.FIXED64=6]="FIXED64",es[es.FIXED32=7]="FIXED32",es[es.BOOL=8]="BOOL",es[es.STRING=9]="STRING",es[es.BYTES=12]="BYTES",es[es.UINT32=13]="UINT32",es[es.SFIXED32=15]="SFIXED32",es[es.SFIXED64=16]="SFIXED64",es[es.SINT32=17]="SINT32",es[es.SINT64=18]="SINT64",(eo=tw||(tw={}))[eo.BIGINT=0]="BIGINT",eo[eo.STRING=1]="STRING";let lb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),l_=[];for(let e=0;e<lb.length;e++)l_[lb[e].charCodeAt(0)]=e;l_["-".charCodeAt(0)]=lb.indexOf("+"),l_["_".charCodeAt(0)]=lb.indexOf("/");let lw={dec(e){let t=3*e.length/4;"="==e[e.length-2]?t-=2:"="==e[e.length-1]&&(t-=1);let n=new Uint8Array(t),r=0,i=0,a,s=0;for(let t=0;t<e.length;t++){if(void 0===(a=l_[e.charCodeAt(t)]))switch(e[t]){case"=":i=0;case"\n":case"\r":case"	":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:s=a,i=1;break;case 1:n[r++]=s<<2|(48&a)>>4,s=a,i=2;break;case 2:n[r++]=(15&s)<<4|(60&a)>>2,s=a,i=3;break;case 3:n[r++]=(3&s)<<6|a,i=0}}if(1==i)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a<e.length;a++)switch(r=e[a],n){case 0:t+=lb[r>>2],i=(3&r)<<4,n=1;break;case 1:t+=lb[i|r>>4],i=(15&r)<<2,n=2;break;case 2:t+=lb[i|r>>6]+lb[63&r],n=0}return n&&(t+=lb[i]+"=",1==n&&(t+="=")),t}};function lv(e,t){let n=e.getType();return t.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(e).find(e=>e.no==t.field.no)}function lO(e,t){le(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}function lS(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":if(e.opt||e.req)return void 0!==t[n];if("enum"==e.kind)return t[n]!==e.T.values[0].no;return!lE(e.T,t[n]);case"message":return void 0!==t[n];case"map":return Object.keys(t[n]).length>0}}function lA(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?lN(e.T,e.L):void 0;break;case"message":t[n]=void 0}}function lF(e,t){if(null===e||"object"!=typeof e||!Object.getOwnPropertyNames(o5.prototype).every(t=>t in e&&"function"==typeof e[t]))return!1;let n=e.getType();return null!==n&&"function"==typeof n&&"typeName"in n&&"string"==typeof n.typeName&&(void 0===t||n.typeName==t.typeName)}function lD(e,t){return lF(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}t_.DOUBLE,t_.FLOAT,t_.INT64,t_.UINT64,t_.INT32,t_.UINT32,t_.BOOL,t_.STRING,t_.BYTES;let lB={ignoreUnknownFields:!1},lR={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},lP=Symbol(),lU=Symbol();function lx(e){if(null===e)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function lL(e,t,n,r,i){let a=n.localName;if(n.repeated){if(le("map"!=n.kind),null===t)return;if(!Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${lx(t)}`);let s=e[a];for(let e of t){if(null===e)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${lx(e)}`);switch(n.kind){case"message":s.push(n.T.fromJson(e,r));break;case"enum":let t=lJ(n.T,e,r.ignoreUnknownFields,!0);t!==lU&&s.push(t);break;case"scalar":try{s.push(lC(n.T,e,n.L,!0))}catch(r){let t=`cannot decode field ${i.typeName}.${n.name} from JSON: ${lx(e)}`;throw r instanceof Error&&r.message.length>0&&(t+=`: ${r.message}`),Error(t)}}}}else if("map"==n.kind){if(null===t)return;if("object"!=typeof t||Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${lx(t)}`);let s=e[a];for(let[e,a]of Object.entries(t)){let o;if(null===a)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);try{o=function(e,t){if(e===t_.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1}return lC(e,t,tw.BIGINT,!0).toString()}(n.K,e)}catch(r){let e=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${lx(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}switch(n.V.kind){case"message":s[o]=n.V.T.fromJson(a,r);break;case"enum":let l=lJ(n.V.T,a,r.ignoreUnknownFields,!0);l!==lU&&(s[o]=l);break;case"scalar":try{s[o]=lC(n.V.T,a,tw.BIGINT,!0)}catch(r){let e=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${lx(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let s=n.T;if(null===t&&"google.protobuf.Value"!=s.typeName)return;let o=e[a];lF(o)?o.fromJson(t,r):(e[a]=o=s.fromJson(t,r),s.fieldWrapper&&!n.oneof&&(e[a]=s.fieldWrapper.unwrapField(o)));break;case"enum":let l=lJ(n.T,t,r.ignoreUnknownFields,!1);switch(l){case lP:lA(n,e);break;case lU:break;default:e[a]=l}break;case"scalar":try{let r=lC(n.T,t,n.L,!1);r===lP?lA(n,e):e[a]=r}catch(r){let e=`cannot decode field ${i.typeName}.${n.name} from JSON: ${lx(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}function lC(e,t,n,r){if(null===t)return r?lN(e,n):lP;switch(e){case t_.DOUBLE:case t_.FLOAT:if("NaN"===t)return Number.NaN;if("Infinity"===t)return Number.POSITIVE_INFINITY;if("-Infinity"===t)return Number.NEGATIVE_INFINITY;if(""===t||"string"==typeof t&&t.trim().length!==t.length||"string"!=typeof t&&"number"!=typeof t)break;let i=Number(t);
1if(Number.isNaN(i)||!Number.isFinite(i))break;return e==t_.FLOAT&&lr(i),i;case t_.INT32:case t_.FIXED32:case t_.SFIXED32:case t_.SINT32:case t_.UINT32:let a;if("number"==typeof t?a=t:"string"==typeof t&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),void 0===a)break;return e==t_.UINT32?ln(a):lt(a),a;case t_.INT64:case t_.SFIXED64:case t_.SINT64:if("number"!=typeof t&&"string"!=typeof t)break;let s=ly.parse(t);return n?s.toString():s;case t_.FIXED64:case t_.UINT64:if("number"!=typeof t&&"string"!=typeof t)break;let o=ly.uParse(t);return n?o.toString():o;case t_.BOOL:if("boolean"!=typeof t)break;return t;case t_.STRING:if("string"!=typeof t)break;try{encodeURIComponent(t)}catch(e){throw Error("invalid UTF8")}return t;case t_.BYTES:if(""===t)return new Uint8Array(0);if("string"!=typeof t)break;return lw.dec(t)}throw Error()}function lJ(e,t,n,r){if(null===t)return"google.protobuf.NullValue"==e.typeName?0:r?e.values[0].no:lP;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(void 0!==i)return i.no;if(n)return lU}throw Error(`cannot decode enum ${e.typeName} from JSON: ${lx(t)}`)}
1function lj(e,t,n){if("map"==e.kind){le("object"==typeof t&&null!=t);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[t,n]of i)r[t.toString()]=l$(e.V.T,n);break;case"message":for(let[e,t]of i)r[e.toString()]=t.toJson(n);break;case"enum":let a=e.V.T;for(let[e,t]of i)r[e.toString()]=lM(a,t,n.enumAsInteger)}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){le(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let n=0;n<t.length;n++)r.push(l$(e.T,t[n]));break;case"enum":for(let i=0;i<t.length;i++)r.push(lM(e.T,t[i],n.enumAsInteger));break;case"message":for(let e=0;e<t.length;e++)r.push(t[e].toJson(n))}return n.emitDefaultValues||r.length>0?r:void 0}switch(e.kind){case"scalar":return l$(e.T,t);case"enum":return lM(e.T,t,n.enumAsInteger);case"message":return lD(e.T,t).toJson(n)}}function lM(e,t,n){var r;if(le("number"==typeof t),"google.protobuf.NullValue"==e.typeName)return null;if(n)return t;let i=e.findNumber(t);return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:t}function l$(e,t){switch(e){case t_.INT32:case t_.SFIXED32:case t_.SINT32:case t_.FIXED32:case t_.UINT32:return le("number"==typeof t),t;case t_.FLOAT:case t_.DOUBLE:if(le("number"==typeof t),Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case t_.STRING:return le("string"==typeof t),t;case t_.BOOL:return le("boolean"==typeof t),t;case t_.UINT64:case t_.FIXED64:case t_.INT64:case t_.SFIXED64:case t_.SINT64:return le("bigint"==typeof t||"string"==typeof t||"number"==typeof t),t.toString();case t_.BYTES:return le(t instanceof Uint8Array),lw.enc(t)}}(el=tv||(tv={}))[el.Varint=0]="Varint",el[el.Bit64=1]="Bit64",el[el.LengthDelimited=2]="LengthDelimited",el[el.StartGroup=3]="StartGroup",el[el.EndGroup=4]="EndGroup",el[el.Bit32=5]="Bit32";class lV{constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(ln(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return lt(e),lh(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){lr(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){ln(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){lt(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return lt(e),lh(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=ly.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=ly.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=ly.enc(e);return lu(t.lo,t.hi,this.buf),this}sint64(e){let t=ly.enc(e),n=t.hi>>31;return lu(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=ly.uEnc(e);return lu(t.lo,t.hi,this.buf),this}}class lG{constructor(e,t){this.varint64=ll,this.uint32=lg,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=t?t:new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,n=7&e;
1if(t<=0||n<0||n>5)throw Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e){let t=this.pos;switch(e){case tv.Varint:for(;128&this.buf[this.pos++];);break;case tv.Bit64:this.pos+=4;case tv.Bit32:this.pos+=4;break;case tv.LengthDelimited:let n=this.uint32();this.pos+=n;break;case tv.StartGroup:let r;for(;(r=this.tag()[1])!==tv.EndGroup;)this.skip(r);break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return ly.dec(...this.varint64())}uint64(){return ly.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,ly.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return ly.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return ly.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}let lq=Symbol("@bufbuild/protobuf/unknown-fields"),lY={readUnknownFields:!0,readerFactory:e=>new lG(e)},lW={writeUnknownFields:!0,writerFactory:()=>new lV};function lX(e,t,n,r,i){let{repeated:a,localName:s}=n;switch(n.oneof&&((e=e[n.oneof.localName]).case!=s&&delete e.value,e.case=s,s="value"),n.kind){case"scalar":case"enum":let o="enum"==n.kind?t_.INT32:n.T,l=lZ;if("scalar"==n.kind&&n.L>0&&(l=lH),a){let n=e[s];if(r==tv.LengthDelimited&&o!=t_.STRING&&o!=t_.BYTES){let e=t.uint32()+t.pos;for(;t.pos<e;)n.push(l(t,o))}else n.push(l(t,o))}else e[s]=l(t,o);break;case"message":let u=n.T;a?e[s].push(lK(t,new u,i,n)):lF(e[s])?lK(t,e[s],i,n):(e[s]=lK(t,new u,i,n),!u.fieldWrapper||n.oneof||n.repeated||(e[s]=u.fieldWrapper.unwrapField(e[s])));break;case"map":let[c,d]=function(e,t,n){let r,i;let a=t.uint32(),s=t.pos+a;for(;t.pos<s;){let[a]=t.tag();switch(a){case 1:r=lZ(t,e.K);break;case 2:switch(e.V.kind){case"scalar":i=lZ(t,e.V.T);break;case"enum":i=t.int32();break;case"message":i=lK(t,new e.V.T,n,void 0)}}}if(void 0===r&&(r=lN(e.K,tw.BIGINT)),"string"!=typeof r&&"number"!=typeof r&&(r=r.toString()),void 0===i)switch(e.V.kind){case"scalar":i=lN(e.V.T,tw.BIGINT);break;case"enum":i=e.V.T.values[0].no;break;case"message":i=new e.V.T}return[r,i]}(n,t,i);e[s][c]=d}}function lK(e,t,n,r){let i=t.getType().runtime.bin,a=null==r?void 0:r.delimited;return i.readMessage(t,e,a?r.no:e.uint32(),n,a),t}function lH(e,t){let n=lZ(e,t);return"bigint"==typeof n?n.toString():n}function lZ(e,t){switch(t){case t_.STRING:return e.string();case t_.BOOL:return e.bool();case t_.DOUBLE:return e.double();case t_.FLOAT:return e.float();case t_.INT32:return e.int32();case t_.INT64:return e.int64();case t_.UINT64:return e.uint64();case t_.FIXED64:return e.fixed64();case t_.BYTES:return e.bytes();case t_.FIXED32:return e.fixed32();case t_.SFIXED32:return e.sfixed32();case t_.SFIXED64:return e.sfixed64();case t_.SINT64:return e.sint64();case t_.UINT32:return e.uint32();case t_.SINT32:return e.sint32()}}function lz(e,t,n,r){le(void 0!==t);let i=e.repeated;switch(e.kind){case"scalar":case"enum":let a="enum"==e.kind?t_.INT32:e.T;if(i){if(le(Array.isArray(t)),e.packed)!function(e,t,n,r){if(!r.length)return;e.tag(n,tv.LengthDelimited).fork();let[,i]=l1(t);for(let t=0;t<r.length;t++)e[i](r[t]);e.join()}(n,a,e.no,t);else for(let r of t)l0(n,a,e.no,r)}else l0(n,a,e.no,t);break;case"message":if(i)for(let i of(le(Array.isArray(t)),t))lQ(n,r,e,i);else lQ(n,r,e,t);break;case"map":for(let[i,a]of(le("object"==typeof t&&null!=t),Object.entries(t)))!function(e,t,n,r,i){e.tag(n.no,tv.LengthDelimited),e.fork();let a=r;switch(n.K){case t_.INT32:case t_.FIXED32:case t_.UINT32:case t_.SFIXED32:case t_.SINT32:a=Number.parseInt(r);break;case t_.BOOL:le("true"==r||"false"==r),a="true"==r}switch(l0(e,n.K,1,a),n.V.kind){case"scalar":l0(e,n.V.T,2,i);break;case"enum":l0(e,t_.INT32,2,i);break;case"message":le(void 0!==i),e.tag(2,tv.LengthDelimited).bytes(i.toBinary(t))}e.join()}(n,r,e,i,a)}}function lQ(e,t,n,r){let i=lD(n.T,r);n.delimited?e.tag(n.no,tv.StartGroup).raw(i.toBinary(t)).tag(n.no,tv.EndGroup):e.tag(n.no,tv.LengthDelimited).bytes(i.toBinary(t))}function l0(e,t,n,r){le(void 0!==r);let[i,a]=l1(t);e.tag(n,i)[a](r)}function l1(e){let t=tv.Varint;switch(e){case t_.BYTES:case t_.STRING:t=tv.LengthDelimited;break;case t_.DOUBLE:case t_.FIXED64:case t_.SFIXED64:t=tv.Bit64;break;case t_.FIXED32:case t_.SFIXED32:case t_.FLOAT:t=tv.Bit32}return[t,t_[e].toLowerCase()]}function l2(e){if(void 0===e)return e;if(lF(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function l3(e){return e instanceof Uint8Array?e:new Uint8Array(e)}class l4{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){let e={};for(let t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[e]}find(e){if(!this.numbers){let e={};for(let t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,t)=>
1e.no-t.no)),this.numbersAsc}byMember(){if(!this.members){let e;this.members=[];let t=this.members;for(let n of this.list())n.oneof?n.oneof!==e&&(e=n.oneof,t.push(e)):t.push(n)}return this.members}}function l6(e,t){let n=l8(e);return t?n:un(ut(n))}let l9=l8;function l8(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);switch(i){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(i),t=!1;break;default:t&&(t=!1,i=i.toUpperCase()),n.push(i)}}return n.join("")}let l7=new Set(["constructor","toString","toJSON","valueOf"]),l5=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),ue=e=>`${e}$`,ut=e=>l5.has(e)?ue(e):e,un=e=>l7.has(e)?ue(e):e;class ur{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=l6(e,!1)}addField(e){le(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let e=0;e<this.fields.length;e++)this._lookup[this.fields[e].localName]=this.fields[e]}return this._lookup[e]}}let ui=(eu=e=>new l4(e,e=>(function(e,t){var n,r,i,a,s,o;let l;let u=[];for(let c of"function"==typeof e?e():e){if(c.localName=l6(c.name,void 0!==c.oneof),c.jsonName=null!==(n=c.jsonName)&&void 0!==n?n:l9(c.name),c.repeated=null!==(r=c.repeated)&&void 0!==r&&r,"scalar"==c.kind&&(c.L=null!==(i=c.L)&&void 0!==i?i:tw.BIGINT),c.delimited=null!==(a=c.delimited)&&void 0!==a&&a,c.req=null!==(s=c.req)&&void 0!==s&&s,c.opt=null!==(o=c.opt)&&void 0!==o&&o,void 0===c.packed&&(t?c.packed="enum"==c.kind||"scalar"==c.kind&&c.T!=t_.BYTES&&c.T!=t_.STRING:c.packed=!1),void 0!==c.oneof){let e="string"==typeof c.oneof?c.oneof:c.oneof.name;l&&l.name==e||(l=new ur(e)),c.oneof=l,l.addField(c)}u.push(c)}return u})(e,!0)),ec=e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName;if(t.repeated){e[n]=[];continue}switch(t.kind){case"oneof":e[n]={case:void 0};break;case"enum":e[n]=0;break;case"map":e[n]={};break;case"scalar":e[n]=lN(t.T,t.L)}}},{syntax:"proto3",json:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},lB),e):lB},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},lR),e):lR},readMessage(e,t,n,r){if(null==t||Array.isArray(t)||"object"!=typeof t)throw Error(`cannot decode message ${e.typeName} from JSON: ${lx(t)}`);r=null!=r?r:new e;let i=new Map,a=n.typeRegistry;for(let[s,o]of Object.entries(t)){let t=e.fields.findJsonName(s);if(t){if(t.oneof){if(null===o&&"scalar"==t.kind)continue;let n=i.get(t.oneof);if(void 0!==n)throw Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${t.oneof.name}" present: "${n}", "${s}"`);i.set(t.oneof,s)}lL(r,o,t,n,e)}else{let t=!1;if((null==a?void 0:a.findExtension)&&s.startsWith("[")&&s.endsWith("]")){let i=a.findExtension(s.substring(1,s.length-1));if(i&&i.extendee.typeName==e.typeName){t=!0;let[e,a]=lk(i);lL(e,o,i.field,n,i),function(e,t,n,r){lO(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(lv(e,t)){let n=e.getType().runtime.bin.listUnknownFields(e).filter(e=>e.no!=t.field.no);for(let t of(e.getType().runtime.bin.discardUnknownFields(e),n))e.getType().runtime.bin.onUnknownField(e,t.no,t.wireType,t.data)}let s=a.writerFactory(),o=t.field;o.opt||o.repeated||"enum"!=o.kind&&"scalar"!=o.kind||(o=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(o,n,s,a);let l=i.readerFactory(s.finish());for(;l.pos<l.len;){let[t,n]=l.tag(),r=l.skip(n);e.getType().runtime.bin.onUnknownField(e,t,n,r)}}(r,i,a(),n)}}if(!t&&!n.ignoreUnknownFields)throw Error(`cannot decode message ${e.typeName} from JSON: key "${s}" is unknown`)}}return r},writeMessage(e,t){let n;let r=e.getType(),i={};try{for(n of r.fields.byNumber()){if(!lS(n,e)){var a;if(n.req)throw"required field not set";if(!t.emitDefaultValues||!((a=n).repeated||"map"==a.kind||!a.oneof&&"message"!=a.kind&&!a.opt&&!a.req))continue}let r=n.oneof?e[n.oneof.localName].value:e[n.localName],s=lj(n,r,t);void 0!==s&&(i[t.useProtoFieldName?n.name:n.jsonName]=s)}let s=t.typeRegistry;if(null==s?void 0:s.findExtensionFor)for(let n of r.runtime.bin.listUnknownFields(e)){let a=s.findExtensionFor(r.typeName,n.no);if(a&&lv(e,a)){let n=function(e,t,n){lO(t,e);let r=t.runtime.bin.makeReadOptions(n),i=function(e,t){if(!t.repeated&&("enum"==t.kind||"scalar"==t.kind)){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(e=>e.no===t.no)}(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,s]=lk(t);for(let e of i)t.runtime.bin.readField(a,r.readerFactory(e.data),t.field,e.wireType,r);return s()}(e,a,t),r=lj(a.field,n,t);void 0!==r&&(i[a.field.jsonName]=r)}}}catch(i){let e=n?`cannot encode field ${r.typeName}.${n.name} to JSON`:`cannot encode message ${r.typeName} to JSON`,t=i instanceof Error?i.message:String(i);throw Error(e+(t.length>0?`: ${t}`:""))}return i}
1,readScalar:(e,t,n)=>lC(e,t,null!=n?n:tw.BIGINT,!0),writeScalar(e,t,n){if(void 0!==t&&(n||lE(e,t)))return l$(e,t)},debug:lx},bin:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},lY),e):lY},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},lW),e):lW},listUnknownFields(e){var t;return null!==(t=e[lq])&&void 0!==t?t:[]},discardUnknownFields(e){delete e[lq]},writeUnknownFields(e,t){let n=e[lq];if(n)for(let e of n)t.tag(e.no,e.wireType).raw(e.data)},onUnknownField(e,t,n,r){Array.isArray(e[lq])||(e[lq]=[]),e[lq].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a,s;let o=e.getType(),l=i?t.len:t.pos+n;for(;t.pos<l&&([a,s]=t.tag(),s!=tv.EndGroup);){let n=o.fields.find(a);if(!n){let n=t.skip(s);r.readUnknownFields&&this.onUnknownField(e,a,s,n);continue}lX(e,t,n,s,r)}if(i&&(s!=tv.EndGroup||a!==n))throw Error("invalid end group tag")},readField:lX,writeMessage(e,t,n){let r=e.getType();for(let i of r.fields.byNumber()){if(!lS(i,e)){if(i.req)throw Error(`cannot encode field ${r.typeName}.${i.name} to binary: required field not set`);continue}let a=i.oneof?e[i.oneof.localName].value:e[i.localName];lz(i,a,t,n)}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t},writeField(e,t,n,r){void 0!==t&&lz(e,t,n,r)}},util:Object.assign(Object.assign({},{setEnumType:la,initPartial(e,t){if(void 0!==e)for(let n of t.getType().fields.byMember()){let r=n.localName;if(void 0!==e[r])switch(n.kind){case"oneof":let i=e[r].case;if(void 0===i)continue;let a=n.findField(i),s=e[r].value;a&&"message"==a.kind&&!lF(s,a.T)?s=new a.T(s):a&&"scalar"===a.kind&&a.T===t_.BYTES&&(s=l3(s)),t[r]={case:i,value:s};break;case"scalar":case"enum":let o=e[r];n.T===t_.BYTES&&(o=n.repeated?o.map(l3):l3(o)),t[r]=o;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===t_.BYTES)for(let[n,i]of Object.entries(e[r]))t[r][n]=l3(i);else Object.assign(t[r],e[r]);break;case"message":let l=n.V.T;for(let n of Object.keys(e[r])){let i=e[r][n];l.fieldWrapper||(i=new l(i)),t[r][n]=i}}break;case"message":let u=n.T;if(n.repeated)t[r]=e[r].map(e=>lF(e,u)?e:new u(e));else{let n=e[r];u.fieldWrapper?"google.protobuf.BytesValue"===u.typeName?t[r]=l3(n):t[r]=n:t[r]=lF(n,u)?n:new u(n)}}}},equals:(e,t,n)=>t===n||!!t&&!!n&&e.fields.byMember().every(e=>{let r=t[e.localName],i=n[e.localName];if(e.repeated){if(r.length!==i.length)return!1;switch(e.kind){case"message":return r.every((t,n)=>e.T.equals(t,i[n]));case"scalar":return r.every((t,n)=>lI(e.T,t,i[n]));case"enum":return r.every((e,t)=>lI(t_.INT32,e,i[t]))}throw Error(`repeated cannot contain ${e.kind}`)}switch(e.kind){case"message":return e.T.equals(r,i);case"enum":return lI(t_.INT32,r,i);case"scalar":return lI(e.T,r,i);case"oneof":if(r.case!==i.case)return!1;let a=e.findField(r.case);if(void 0===a)return!0;switch(a.kind){case"message":return a.T.equals(r.value,i.value);case"enum":return lI(t_.INT32,r.value,i.value);case"scalar":return lI(a.T,r.value,i.value)}throw Error(`oneof cannot contain ${a.kind}`);case"map":let s=Object.keys(r).concat(Object.keys(i));switch(e.V.kind){case"message":let o=e.V.T;return s.every(e=>o.equals(r[e],i[e]));case"enum":return s.every(e=>lI(t_.INT32,r[e],i[e]));case"scalar":let l=e.V.T;return s.every(e=>lI(l,r[e],i[e]))}}}),clone(e){let t=e.getType(),n=new t;for(let r of t.fields.byMember()){let t;let i=e[r.localName];if(r.repeated)t=i.map(l2);else if("map"==r.kind)for(let[e,a]of(t=n[r.localName],Object.entries(i)))t[e]=l2(a);else t="oneof"==r.kind?r.findField(i.case)?{case:i.case,value:l2(i.value)}:{case:void 0}:l2(i);n[r.localName]=t}return n}}),{newFieldList:eu,initFields:ec}),makeMessageType(e,t,n){return function(e,t,n,r){var i;let a=null!==(i=null==r?void 0:r.localName)&&void 0!==i?i:t.substring(t.lastIndexOf(".")+1),s={[a]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[a];return Object.setPrototypeOf(s.prototype,new o5),Object.assign(s,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary:(e,t)=>new s().fromBinary(e,t),fromJson:(e,t)=>new s().fromJson(e,t),fromJsonString:(e,t)=>new s().fromJsonString(e,t),equals:(t,n)=>e.util.equals(s,t,n)}),s}(this,e,t,n)},makeEnum:function(e,t,n){let r={};for(let e of t){let t=lo(e);r[t.localName]=t.no,r[t.no]=t.localName}return la(r,e,t,n),r},makeEnumType:ls,getEnumType:function(e){let t=e[li];return le(t,"missing enum type on enum object"),t},makeExtension(e,t,n){var r;let i;return r=this,{typeName:e,extendee:t,get field(){if(!i){let t="function"==typeof n?n():n;t.name=e.split(".").pop(),t.jsonName=`[${e}]`,i=r.util.newFieldList([t]).list()[0]}return i},runtime:r}}});class ua extends o5{type="";id="";constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.URI";static fields=ui.util.newFieldList(()=>[{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:9}]);static fromBinary(e,t){return new ua().fromBinary(e,t)}static fromJson(e,t){return new ua().fromJson(e,t)}static fromJsonString(e,t){return new ua().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(ua,e,t)}}class us extends o5{millis=ly.zero;constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.Timestamp";static fields=ui.util.newFieldList(()=>[{no:10,name:"millis",kind:"scalar",T:3}]);static fromBinary(e,t){return new us().fromBinary(e,t)}static fromJson(e,t){return new us().fromJson(e,t)}static fromJsonString(e,t){return new us().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(us,e,t)}}(ed=tO||(tO={}))[ed.UNSPECIFIED=0]="UNSPECIFIED",ed[ed.PROD=1]="PROD",ed[ed.STAGING=2]="STAGING",ed[ed.DEV=3]="DEV",ed[ed.TEST=4]="TEST",ui.util.setEnumType(tO,"ibotta.tracking.common.v1.Environment",[{no:0,name:"ENVIRONMENT_UNSPECIFIED"},{no:1,name:"ENVIRONMENT_PROD"},{no:2,name:"ENVIRONMENT_STAGING"},{no:3,name:"ENVIRONMENT_DEV"},{no:4,name:"ENVIRONMENT_TEST"}]);class uo extends o5{eventUri;eventAt;environment=tO.UNSPECIFIED;agent="";revision="";zoneId="";ip="";constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.EventHeader";static fields=ui.util.newFieldList(()=>[{no:1,name:"event_uri",kind:"message",T:ua},{no:2,name:"event_at",kind:"message",T:us},{no:3,name:"environment",kind:"enum",T:ui.getEnumType(tO)},{no:10,name:"agent",kind:"scalar",T:9},{no:20,name:"revision",kind:"scalar",T:9},{no:30,name:"zone_id",kind:"scalar",T:9},{no:100,name:"ip",kind:"scalar",T:9}]);static fromBinary(e,t){return new uo().fromBinary(e,t)}static fromJson(e,t){return new uo().fromJson(e,t)}static fromJsonString(e,t){return new uo().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(uo,e,t)}}(ef=tS||(tS={}))[ef.UNSPECIFIED=0]="UNSPECIFIED",ef[ef.IOS=10]="IOS",ef[ef.ANDROID=20]="ANDROID",ef[ef.WEBAPP=30]="WEBAPP",ef[ef.WEB_V2=40]="WEB_V2",ef[ef.KINDLE=50]="KINDLE",ef[ef.BROWSER_EXTENSION=60]="BROWSER_EXTENSION",ef[ef.
1UNIFIED_ACCOUNT_LINKING=70]="UNIFIED_ACCOUNT_LINKING",ef[ef.BRAZE=80]="BRAZE",ef[ef.CONNECTION_CONTENT=90]="CONNECTION_CONTENT",ef[ef.IPN_PARTNER_PORTAL=100]="IPN_PARTNER_PORTAL",ef[ef.IPN_CLIENT_PORTAL=110]="IPN_CLIENT_PORTAL",ef[ef.IPN_PORTAL=120]="IPN_PORTAL",ef[ef.MARKETING_CONSUMER=130]="MARKETING_CONSUMER",ef[ef.MARKETING_CORPORATE=140]="MARKETING_CORPORATE",ui.util.setEnumType(tS,"ibotta.tracking.common.v1.IbottaPlatform",[{no:0,name:"IBOTTA_PLATFORM_UNSPECIFIED"},{no:10,name:"IBOTTA_PLATFORM_IOS"},{no:20,name:"IBOTTA_PLATFORM_ANDROID"},{no:30,name:"IBOTTA_PLATFORM_WEBAPP"},{no:40,name:"IBOTTA_PLATFORM_WEB_V2"},{no:50,name:"IBOTTA_PLATFORM_KINDLE"},{no:60,name:"IBOTTA_PLATFORM_BROWSER_EXTENSION"},{no:70,name:"IBOTTA_PLATFORM_UNIFIED_ACCOUNT_LINKING"},{no:80,name:"IBOTTA_PLATFORM_BRAZE"},{no:90,name:"IBOTTA_PLATFORM_CONNECTION_CONTENT"},{no:100,name:"IBOTTA_PLATFORM_IPN_PARTNER_PORTAL"},{no:110,name:"IBOTTA_PLATFORM_IPN_CLIENT_PORTAL"},{no:120,name:"IBOTTA_PLATFORM_IPN_PORTAL"},{no:130,name:"IBOTTA_PLATFORM_MARKETING_CONSUMER"},{no:140,name:"IBOTTA_PLATFORM_MARKETING_CORPORATE"}]);class ul extends o5{lat=0;lng=0;horizontalAccuracyMeters=0;constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.Location";static fields=ui.util.newFieldList(()=>[{no:10,name:"lat",kind:"scalar",T:1},{no:20,name:"lng",kind:"scalar",T:1},{no:30,name:"horizontal_accuracy_meters",kind:"scalar",T:1}]);static fromBinary(e,t){return new ul().fromBinary(e,t)}static fromJson(e,t){return new ul().fromJson(e,t)}static fromJsonString(e,t){return new ul().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(ul,e,t)}}class uu extends o5{eventId="";trackedAt;userId="";earlyIdentifier="";appVersion="";platform=tS.UNSPECIFIED;osName="";osVersion="";deviceId="";deviceAdvertiserId="";deviceModel="";globalSessionId="";location;constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.TrackingHeader";static fields=ui.util.newFieldList(()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:10,name:"tracked_at",kind:"message",T:us},{no:20,name:"user_id",kind:"scalar",T:9},{no:30,name:"early_identifier",kind:"scalar",T:9},{no:40,name:"app_version",kind:"scalar",T:9},{no:50,name:"platform",kind:"enum",T:ui.getEnumType(tS)},{no:60,name:"os_name",kind:"scalar",T:9},{no:70,name:"os_version",kind:"scalar",T:9},{no:80,name:"device_id",kind:"scalar",T:9},{no:90,name:"device_advertiser_id",kind:"scalar",T:9},{no:100,name:"device_model",kind:"scalar",T:9},{no:120,name:"global_session_id",kind:"scalar",T:9},{no:130,name:"location",kind:"message",T:ul}]);static fromBinary(e,t){return new uu().fromBinary(e,t)}static fromJson(e,t){return new uu().fromJson(e,t)}static fromJsonString(e,t){return new uu().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(uu,e,t)}}(em=tA||(tA={}))[em.UNSPECIFIED=0]="UNSPECIFIED",em[em.USD=1]="USD",ui.util.setEnumType(tA,"ibotta.tracking.common.v1.Currency",[{no:0,name:"CURRENCY_UNSPECIFIED"},{no:1,name:"CURRENCY_USD"}]);class uc extends o5{currency=tA.UNSPECIFIED;micros=ly.zero;constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.Money";static fields=ui.util.newFieldList(()=>[{no:1,name:"currency",kind:"enum",T:ui.getEnumType(tA)},{no:2,name:"micros",kind:"scalar",T:3}]);static fromBinary(e,t){return new uc().fromBinary(e,t)}static fromJson(e,t){return new uc().fromJson(e,t)}static fromJsonString(e,t){return new uc().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(uc,e,t)}}class ud extends o5{reward={case:void 0};constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.RewardProperties";static fields=ui.util.newFieldList(()=>[{no:110,name:"amount",kind:"message",T:uc,oneof:"reward"},{no:120,name:"percent",kind:"scalar",T:2,oneof:"reward"}]);static fromBinary(e,t){return new ud().fromBinary(e,t)}static fromJson(e,t){return new ud().fromJson(e,t)}static fromJsonString(e,t){return new ud().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(ud,e,t)}}class uf extends o5{sessionId="";actionId="";constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.SearchProperties";static fields=ui.util.newFieldList(()=>[{no:100,name:"session_id",kind:"scalar",T:9},{no:110,name:"action_id",kind:"scalar",T:9}]);static fromBinary(e,t){return new uf().fromBinary(e,t)}static fromJson(e,t){return new uf().fromJson(e,t)}static fromJsonString(e,t){return new uf().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(uf,e,t)}}class um extends o5{name="";index=0;constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.ModuleProperties";static fields=ui.util.newFieldList(()=>[{no:100,name:"name",kind:"scalar",T:9},{no:110,name:"index",kind:"scalar",T:5}]);static fromBinary(e,t){return new um().fromBinary(e,t)}static fromJson(e,t){return new um().fromJson(e,t)}static fromJsonString(e,t){return new um().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(um,e,t)}}class up extends o5{campaign="";content="";medium="";source="";constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.common.v1.UTM";static fields=ui.util.newFieldList(()=>[{no:100,name:"campaign",kind:"scalar",T:9},{no:110,name:"content",kind:"scalar",T:9},{no:120,name:"medium",kind:"scalar",T:9},{no:130,name:"source",kind:"scalar",T:9}]);static fromBinary(e,t){return new up().fromBinary(e,t)}static fromJson(e,t){return new up().fromJson(e,t)}static fromJsonString(e,t){return new up().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(up,e,t)}}class uh extends o5{eventHeader;trackingHeader;textDisplayed="";offerId="";offer;retailerId="";gmrEnabled=!1;segmentId="";constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.bex.v1.AffiliateBannerShown";static fields=ui.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:uo},{no:2,name:"tracking_header",kind:"message",T:uu},{no:100,name:"text_displayed",kind:"scalar",T:9},{no:110,name:"offer_id",kind:"scalar",T:9},{no:120,name:"offer",kind:"message",T:ud},{no:130,name:"retailer_id",kind:"scalar",T:9},{no:140,name:"gmr_enabled",kind:"scalar",T:8},{no:150,name:"segment_id",kind:"scalar",T:9}]);static fromBinary(e,t){return new uh().fromBinary(e,t)}static fromJson(e,t){return new uh().fromJson(e,t)}static fromJsonString(e,t){return new uh().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(uh,e,t)}}class ug extends o5{eventHeader;trackingHeader;retailerId="";url="";launchId="";isHeuristic=!1;cartValue=0;gmrEnabled=!1;segmentId="";constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.bex.v1.BexCheckoutDetected";static fields=ui.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:uo},{no:2,name:"tracking_header",kind:"message",T:uu},{no:100,name:"retailer_id",kind:"scalar",T:9},{no:110,name:"url",kind:"scalar",T:9},{no:120,name:"launch_id",kind:"scalar",T:9},{no:130,name:"is_heuristic",kind:"scalar",T:8},{no:140,name:"cart_value",kind:"scalar",T:2},{no:150,name:"gmr_enabled",kind:"scalar",T:8},{no:160,name:"segment_id",kind:"scalar",T:9}]);static fromBinary(e,t){return new ug().fromBinary(e,t)}static fromJson(e,t){return new ug().fromJson(e,t)}static fromJsonString(e,t){return new ug().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(ug,e,t)}}class uT extends o5{eventHeader;trackingHeader;constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.bex.v1.BexInstalled";static fields=ui.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:uo},{no:2,name:"tracking_header",kind:"message",T:uu}]);static fromBinary(e,t){return new uT().fromBinary(e,t)}static fromJson(e,t){return new uT().fromJson(e,t)}static fromJsonString(e,t){return new uT().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(uT,e,t)}}(ep=tF||(tF={}))[ep.UNSPECIFIED=0]="UNSPECIFIED",ep[ep.IBOTTA=1]="IBOTTA",ep[ep.OCTOSHOP=2]="OCTOSHOP",ui.util.setEnumType(tF,"ibotta.tracking.common.v1.ExtensionName",[{no:0,name:"EXTENSION_NAME_UNSPECIFIED"},{no:1,name:"EXTENSION_NAME_IBOTTA"},{no:2,name:"EXTENSION_NAME_OCTOSHOP"}]),(eh=tD||(tD={}))[eh.UNSPECIFIED=0]="UNSPECIFIED",eh[eh.CLAIMED=1]="CLAIMED",eh[eh.UNCLAIMED=2]="UNCLAIMED",eh[eh.ATTRIBUTION_LOST=3]="ATTRIBUTION_LOST",ui.util.setEnumType(tD,"ibotta.tracking.common.v1.AffiliationStatus",[{no:0,name:"AFFILIATION_STATUS_UNSPECIFIED"},{no:1,name:"AFFILIATION_STATUS_CLAIMED"},{no:2,name:"AFFILIATION_STATUS_UNCLAIMED"},{no:3,name:"AFFILIATION_STATUS_ATTRIBUTION_LOST"}]);class uy extends o5{eventHeader;trackingHeader;browserType="";extensionName=tF.UNSPECIFIED;constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.bex.v1.BexLoggedIn";static fields=ui.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:uo},{no:2,name:"tracking_header",kind:"message",T:uu},{no:100,name:"browser_type",kind:"scalar",T:9},{no:110,name:"extension_name",kind:"enum",T:ui.getEnumType(tF)}]);static fromBinary(e,t){return new uy().fromBinary(e,t)}static fromJson(e,t){return new uy().fromJson(e,t)}static fromJsonString(e,t){return new uy().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(uy,e,t)}}(eg=tB||(tB={}))[eg.UNSPECIFIED=0]="UNSPECIFIED",eg[eg.WEBSITE_LOGOUT=1]="WEBSITE_LOGOUT",eg[eg.UNAUTH_TRIGGER=2]="UNAUTH_TRIGGER",eg[eg.IFRAME_TIMEOUT=3]="IFRAME_TIMEOUT",ui.util.setEnumType(tB,"ibotta.tracking.bex.v1.LogoutActionTypes",[{no:0,name:"LOGOUT_ACTION_TYPES_UNSPECIFIED"},{no:1,name:"LOGOUT_ACTION_TYPES_WEBSITE_LOGOUT"},{no:2,name:"LOGOUT_ACTION_TYPES_UNAUTH_TRIGGER"},{no:3,name:"LOGOUT_ACTION_TYPES_IFRAME_TIMEOUT"}]);class uI extends o5{eventHeader;trackingHeader;logoutActionType=tB.UNSPECIFIED;constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.bex.v1.BexLoggedOut";static fields=ui.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:uo},{no:2,name:"tracking_header",kind:"message",T:uu},{no:100,name:"logout_action_type",kind:"enum",T:ui.getEnumType(tB)}]);static fromBinary(e,t){return new uI().fromBinary(e,t)}static fromJson(e,t){return new uI().fromJson(e,t)}static fromJsonString(e,t){return new uI().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(uI,e,t)}}class uN extends o5{eventHeader;trackingHeader;productId="";retailerId="";foundProductId="";foundRetailerId="";trackingSupportedRetailer=!1;isRelatedProduct=!1;constructor(e){super(),ui.util.initPartial(e,this)}static runtime=ui;static typeName="ibotta.tracking.bex.v1.PCAnalyzeFoundProduct";static fields=ui.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:uo},{no:2,name:"tracking_header",kind:"message",T:uu},{no:100,name:"product_id",kind:"scalar",T:9},{no:110,name:"retailer_id",kind:"scalar",T:9},{no:120,name:"found_product_id",kind:"scalar",T:9},{no:130,name:"found_retailer_id",kind:"scalar",T:9},{no:140,name:"tracking_supported_retailer",kind:"scalar",T:8},{no:150,name:"is_related_product",kind:"scalar",T:8}]);static fromBinary(e,t){return new uN().fromBinary(e,t)}static fromJson(e,t){return new uN().fromJson(e,t)}static fromJsonString(e,t){return new uN().fromJsonString(e,t)}static equals(e,t){return ui.util.equals(uN,e,t)}}class uE{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){let n=this.getType().runtime.bin,r=n.makeReadOptions(t);return n.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){let n=this.getType(),r=n.runtime.json,i=r.makeReadOptions(t);return r.readMessage(n,e,i,this),this}fromJsonString(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`cannot decode ${this.getType().typeName} from JSON: ${e instanceof Error?e.message:String(e)}`)}return this.fromJson(n,t)}toBinary(e){let t=this.getType().runtime.bin,n=t.makeWriteOptions(e),r=n.writerFactory();return t.writeMessage(this,r,n),r.finish()}
1toJson(e){let t=this.getType().runtime.json,n=t.makeWriteOptions(e);return t.writeMessage(this,n)}toJsonString(e){var t;return JSON.stringify(this.toJson(e),null,null!==(t=null==e?void 0:e.prettySpaces)&&void 0!==t?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function uk(e,t){if(!e)throw Error(t)}function ub(e){if("number"!=typeof e)throw Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error("invalid int 32: "+e)}function u_(e){if("number"!=typeof e)throw Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error("invalid uint 32: "+e)}function uw(e){if("number"!=typeof e)throw Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error("invalid float 32: "+e)}let uv=Symbol("@bufbuild/protobuf/enum-type");function uO(e,t,n,r){e[uv]=uS(t,n.map(t=>({no:t.no,name:t.name,localName:e[t.no]})),r)}function uS(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let e of t){let t=uA(e);a.push(t),r[e.name]=t,i[e.no]=t}return{typeName:e,values:a,findName:e=>r[e],findNumber:e=>i[e]}}function uA(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}function uF(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(15&n)<<28,t=(112&n)>>4,(128&n)==0)return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}throw Error("invalid varint")}function uD(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(i>>>7==0&&0==t),s=(a?128|i:i)&255;if(n.push(s),!a)return}let r=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(n.push((i?128|r:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=r>>>7!=0,a=(i?128|r:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}function uB(e){let t="-"===e[0];t&&(e=e.slice(1));let n=0,r=0;function i(t,i){let a=Number(e.slice(t,i));r*=1e6,(n=1e6*n+a)>=4294967296&&(r+=n/4294967296|0,n%=4294967296)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?uU(n,r):uP(n,r)}function uR(e,t){if({lo:e,hi:t}={lo:e>>>0,hi:t>>>0},t<=2097151)return String(4294967296*t+e);let n=16777215&e,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+6777216*r+6710656*i,s=r+8147497*i,o=2*i;return a>=1e7&&(s+=Math.floor(a/1e7),a%=1e7),s>=1e7&&(o+=Math.floor(s/1e7),s%=1e7),o.toString()+ux(s)+ux(a)}function uP(e,t){return{lo:0|e,hi:0|t}}function uU(e,t){return t=~t,e?e=~e+1:t+=1,uP(e,t)}let ux=e=>{let t=String(e);return"0000000".slice(t.length)+t};function uL(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(127&e|128),e>>=7;t.push(1)}}function uC(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}var uJ=n(74859);let uj=function(){let e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&("object"!=typeof uJ||"object"!=typeof uJ.env||"1"!==uJ.env.BUF_BIGINT_DISABLE)){let t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){let r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw Error(`int64 invalid: ${e}`);return r},uParse(e){let t="bigint"==typeof e?e:BigInt(e);if(t>i||t<r)throw Error(`uint64 invalid: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}let t=e=>uk(/^-?[0-9]+$/.test(e),`int64 invalid: ${e}`),n=e=>uk(/^[0-9]+$/.test(e),`uint64 invalid: ${e}`);return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),t(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),n(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),t(e),uB(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),n(e),uB(e)),dec:(e,t)=>(function(e,t){let n=uP(e,t),r=2147483648&n.hi;r&&(n=uU(n.lo,n.hi));let i=uR(n.lo,n.hi);return r?"-"+i:i})(e,t),uDec:(e,t)=>uR(e,t)}}();function uM(e,t,n){if(t===n)return!0;
1if(e==tR.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case tR.UINT64:case tR.FIXED64:case tR.INT64:case tR.SFIXED64:case tR.SINT64:return t==n}return!1}function u$(e,t){switch(e){case tR.BOOL:return!1;case tR.UINT64:case tR.FIXED64:case tR.INT64:case tR.SFIXED64:case tR.SINT64:return 0==t?uj.zero:"0";case tR.DOUBLE:case tR.FLOAT:return 0;case tR.BYTES:return new Uint8Array(0);case tR.STRING:return"";default:return 0}}function uV(e,t){switch(e){case tR.BOOL:return!1===t;case tR.STRING:return""===t;case tR.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return 0==t}}function uG(e){let t=e.field.localName,n=Object.create(null);return n[t]=function(e){let t=e.field;if(t.repeated)return[];if(void 0!==t.default)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return u$(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}(e),[n,()=>n[t]]}(eT=tR||(tR={}))[eT.DOUBLE=1]="DOUBLE",eT[eT.FLOAT=2]="FLOAT",eT[eT.INT64=3]="INT64",eT[eT.UINT64=4]="UINT64",eT[eT.INT32=5]="INT32",eT[eT.FIXED64=6]="FIXED64",eT[eT.FIXED32=7]="FIXED32",eT[eT.BOOL=8]="BOOL",eT[eT.STRING=9]="STRING",eT[eT.BYTES=12]="BYTES",eT[eT.UINT32=13]="UINT32",eT[eT.SFIXED32=15]="SFIXED32",eT[eT.SFIXED64=16]="SFIXED64",eT[eT.SINT32=17]="SINT32",eT[eT.SINT64=18]="SINT64",(ey=tP||(tP={}))[ey.BIGINT=0]="BIGINT",ey[ey.STRING=1]="STRING";let uq="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),uY=[];for(let e=0;e<uq.length;e++)uY[uq[e].charCodeAt(0)]=e;uY["-".charCodeAt(0)]=uq.indexOf("+"),uY["_".charCodeAt(0)]=uq.indexOf("/");let uW={dec(e){let t=3*e.length/4;"="==e[e.length-2]?t-=2:"="==e[e.length-1]&&(t-=1);let n=new Uint8Array(t),r=0,i=0,a,s=0;for(let t=0;t<e.length;t++){if(void 0===(a=uY[e.charCodeAt(t)]))switch(e[t]){case"=":i=0;case"\n":case"\r":case"	":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:s=a,i=1;break;case 1:n[r++]=s<<2|(48&a)>>4,s=a,i=2;break;case 2:n[r++]=(15&s)<<4|(60&a)>>2,s=a,i=3;break;case 3:n[r++]=(3&s)<<6|a,i=0}}if(1==i)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a<e.length;a++)switch(r=e[a],n){case 0:t+=uq[r>>2],i=(3&r)<<4,n=1;break;case 1:t+=uq[i|r>>4],i=(15&r)<<2,n=2;break;case 2:t+=uq[i|r>>6]+uq[63&r],n=0}return n&&(t+=uq[i]+"=",1==n&&(t+="=")),t}};function uX(e,t){let n=e.getType();return t.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(e).find(e=>e.no==t.field.no)}function uK(e,t){uk(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}function uH(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":if(e.opt||e.req)return void 0!==t[n];if("enum"==e.kind)return t[n]!==e.T.values[0].no;return!uV(e.T,t[n]);case"message":return void 0!==t[n];case"map":return Object.keys(t[n]).length>0}}function uZ(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?u$(e.T,e.L):void 0;break;case"message":t[n]=void 0}}function uz(e,t){if(null===e||"object"!=typeof e||!Object.getOwnPropertyNames(uE.prototype).every(t=>t in e&&"function"==typeof e[t]))return!1;let n=e.getType();return null!==n&&"function"==typeof n&&"typeName"in n&&"string"==typeof n.typeName&&(void 0===t||n.typeName==t.typeName)}function uQ(e,t){return uz(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}tR.DOUBLE,tR.FLOAT,tR.INT64,tR.UINT64,tR.INT32,tR.UINT32,tR.BOOL,tR.STRING,tR.BYTES;let u0={ignoreUnknownFields:!1},u1={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},u2=Symbol(),u3=Symbol();function u4(e){if(null===e)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function u6(e,t,n,r,i){let a=n.localName;if(n.repeated){if(uk("map"!=n.kind),null===t)return;if(!Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${u4(t)}`);let s=e[a];for(let e of t){if(null===e)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${u4(e)}`);switch(n.kind){case"message":s.push(n.T.fromJson(e,r));break;case"enum":let t=u8(n.T,e,r.ignoreUnknownFields,!0);t!==u3&&s.push(t);break;case"scalar":try{s.push(u9(n.T,e,n.L,!0))}catch(r){let t=`cannot decode field ${i.typeName}.${n.name} from JSON: ${u4(e)}`;throw r instanceof Error&&r.message.length>0&&(t+=`: ${r.message}`),Error(t)}}}}else if("map"==n.kind){if(null===t)return;if("object"!=typeof t||Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${u4(t)}`);let s=e[a];for(let[e,a]of Object.entries(t)){let o;if(null===a)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);try{o=function(e,t){if(e===tR.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1}return u9(e,t,tP.BIGINT,!0).toString()}(n.K,e)}catch(r){let e=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${u4(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}switch(n.V.kind){case"message":s[o]=n.V.T.fromJson(a,r);break;case"enum":let l=u8(n.V.T,a,r.ignoreUnknownFields,!0);l!==u3&&(s[o]=l);break;case"scalar":try{s[o]=u9(n.V.T,a,tP.BIGINT,!0)}catch(r){let e=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${u4(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let s=n.T;if(null===t&&"google.protobuf.Value"!=s.typeName)return;let o=e[a];uz(o)?o.fromJson(t,r):(e[a]=o=s.fromJson(t,r),s.fieldWrapper&&!n.oneof&&(e[a]=s.fieldWrapper.unwrapField(o)));break;case"enum":let l=u8(n.T,t,r.ignoreUnknownFields,!1);switch(l){case u2:uZ(n,e);break;case u3:break;default:e[a]=l}break;case"scalar":try{let r=u9(n.T,t,n.L,!1);r===u2?uZ(n,e):e[a]=r}catch(r){let e=`cannot decode field ${i.typeName}.${n.name} from JSON: ${u4(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}function u9(e,t,n,r){if(null===t)return r?u$(e,n):u2;
1switch(e){case tR.DOUBLE:case tR.FLOAT:if("NaN"===t)return Number.NaN;if("Infinity"===t)return Number.POSITIVE_INFINITY;if("-Infinity"===t)return Number.NEGATIVE_INFINITY;if(""===t||"string"==typeof t&&t.trim().length!==t.length||"string"!=typeof t&&"number"!=typeof t)break;let i=Number(t);if(Number.isNaN(i)||!Number.isFinite(i))break;return e==tR.FLOAT&&uw(i),i;case tR.INT32:case tR.FIXED32:case tR.SFIXED32:case tR.SINT32:case tR.UINT32:let a;if("number"==typeof t?a=t:"string"==typeof t&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),void 0===a)break;return e==tR.UINT32?u_(a):ub(a),a;case tR.INT64:case tR.SFIXED64:case tR.SINT64:if("number"!=typeof t&&"string"!=typeof t)break;let s=uj.parse(t);return n?s.toString():s;case tR.FIXED64:case tR.UINT64:if("number"!=typeof t&&"string"!=typeof t)break;let o=uj.uParse(t);return n?o.toString():o;case tR.BOOL:if("boolean"!=typeof t)break;return t;case tR.STRING:if("string"!=typeof t)break;try{encodeURIComponent(t)}catch(e){throw Error("invalid UTF8")}return t;case tR.BYTES:if(""===t)return new Uint8Array(0);if("string"!=typeof t)break;return uW.dec(t)}throw Error()}function u8(e,t,n,r){if(null===t)return"google.protobuf.NullValue"==e.typeName?0:r?e.values[0].no:u2;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(void 0!==i)return i.no;if(n)return u3}throw Error(`cannot decode enum ${e.typeName} from JSON: ${u4(t)}`)}function u7(e,t,n){if("map"==e.kind){uk("object"==typeof t&&null!=t);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[t,n]of i)r[t.toString()]=ce(e.V.T,n);break;case"message":for(let[e,t]of i)r[e.toString()]=t.toJson(n);break;case"enum":let a=e.V.T;for(let[e,t]of i)r[e.toString()]=u5(a,t,n.enumAsInteger)}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){uk(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let n=0;n<t.length;n++)r.push(ce(e.T,t[n]));break;case"enum":for(let i=0;i<t.length;i++)r.push(u5(e.T,t[i],n.enumAsInteger));break;case"message":for(let e=0;e<t.length;e++)r.push(t[e].toJson(n))}return n.emitDefaultValues||r.length>0?r:void 0}switch(e.kind){case"scalar":return ce(e.T,t);case"enum":return u5(e.T,t,n.enumAsInteger);case"message":return uQ(e.T,t).toJson(n)}}function u5(e,t,n){var r;if(uk("number"==typeof t),"google.protobuf.NullValue"==e.typeName)return null;if(n)return t;let i=e.findNumber(t);return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:t}function ce(e,t){switch(e){case tR.INT32:case tR.SFIXED32:case tR.SINT32:case tR.FIXED32:case tR.UINT32:return uk("number"==typeof t),t;case tR.FLOAT:case tR.DOUBLE:if(uk("number"==typeof t),Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case tR.STRING:return uk("string"==typeof t),t;case tR.BOOL:return uk("boolean"==typeof t),t;case tR.UINT64:case tR.FIXED64:case tR.INT64:case tR.SFIXED64:case tR.SINT64:return uk("bigint"==typeof t||"string"==typeof t||"number"==typeof t),t.toString();case tR.BYTES:return uk(t instanceof Uint8Array),uW.enc(t)}}(eI=tU||(tU={}))[eI.Varint=0]="Varint",eI[eI.Bit64=1]="Bit64",eI[eI.LengthDelimited=2]="LengthDelimited",eI[eI.StartGroup=3]="StartGroup",eI[eI.EndGroup=4]="EndGroup",eI[eI.Bit32=5]="Bit32";class ct{constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(u_(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return ub(e),uL(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){uw(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){u_(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){ub(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return ub(e),uL(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=uj.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=uj.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=uj.enc(e);return uD(t.lo,t.hi,this.buf),this}sint64(e){let t=uj.enc(e),n=t.hi>>31;return uD(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=uj.uEnc(e);return uD(t.lo,t.hi,this.buf),this}}class cn{constructor(e,t){this.varint64=uF,this.uint32=uC,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=t?t:new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,n=7&e;
1if(t<=0||n<0||n>5)throw Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e){let t=this.pos;switch(e){case tU.Varint:for(;128&this.buf[this.pos++];);break;case tU.Bit64:this.pos+=4;case tU.Bit32:this.pos+=4;break;case tU.LengthDelimited:let n=this.uint32();this.pos+=n;break;case tU.StartGroup:let r;for(;(r=this.tag()[1])!==tU.EndGroup;)this.skip(r);break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return uj.dec(...this.varint64())}uint64(){return uj.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,uj.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return uj.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return uj.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}let cr=Symbol("@bufbuild/protobuf/unknown-fields"),ci={readUnknownFields:!0,readerFactory:e=>new cn(e)},ca={writeUnknownFields:!0,writerFactory:()=>new ct};function cs(e,t,n,r,i){let{repeated:a,localName:s}=n;switch(n.oneof&&((e=e[n.oneof.localName]).case!=s&&delete e.value,e.case=s,s="value"),n.kind){case"scalar":case"enum":let o="enum"==n.kind?tR.INT32:n.T,l=cu;if("scalar"==n.kind&&n.L>0&&(l=cl),a){let n=e[s];if(r==tU.LengthDelimited&&o!=tR.STRING&&o!=tR.BYTES){let e=t.uint32()+t.pos;for(;t.pos<e;)n.push(l(t,o))}else n.push(l(t,o))}else e[s]=l(t,o);break;case"message":let u=n.T;a?e[s].push(co(t,new u,i,n)):uz(e[s])?co(t,e[s],i,n):(e[s]=co(t,new u,i,n),!u.fieldWrapper||n.oneof||n.repeated||(e[s]=u.fieldWrapper.unwrapField(e[s])));break;case"map":let[c,d]=function(e,t,n){let r,i;let a=t.uint32(),s=t.pos+a;for(;t.pos<s;){let[a]=t.tag();switch(a){case 1:r=cu(t,e.K);break;case 2:switch(e.V.kind){case"scalar":i=cu(t,e.V.T);break;case"enum":i=t.int32();break;case"message":i=co(t,new e.V.T,n,void 0)}}}if(void 0===r&&(r=u$(e.K,tP.BIGINT)),"string"!=typeof r&&"number"!=typeof r&&(r=r.toString()),void 0===i)switch(e.V.kind){case"scalar":i=u$(e.V.T,tP.BIGINT);break;case"enum":i=e.V.T.values[0].no;break;case"message":i=new e.V.T}return[r,i]}(n,t,i);e[s][c]=d}}function co(e,t,n,r){let i=t.getType().runtime.bin,a=null==r?void 0:r.delimited;return i.readMessage(t,e,a?r.no:e.uint32(),n,a),t}function cl(e,t){let n=cu(e,t);return"bigint"==typeof n?n.toString():n}function cu(e,t){switch(t){case tR.STRING:return e.string();case tR.BOOL:return e.bool();case tR.DOUBLE:return e.double();case tR.FLOAT:return e.float();case tR.INT32:return e.int32();case tR.INT64:return e.int64();case tR.UINT64:return e.uint64();case tR.FIXED64:return e.fixed64();case tR.BYTES:return e.bytes();case tR.FIXED32:return e.fixed32();case tR.SFIXED32:return e.sfixed32();case tR.SFIXED64:return e.sfixed64();case tR.SINT64:return e.sint64();case tR.UINT32:return e.uint32();case tR.SINT32:return e.sint32()}}function cc(e,t,n,r){uk(void 0!==t);let i=e.repeated;switch(e.kind){case"scalar":case"enum":let a="enum"==e.kind?tR.INT32:e.T;if(i){if(uk(Array.isArray(t)),e.packed)!function(e,t,n,r){if(!r.length)return;e.tag(n,tU.LengthDelimited).fork();let[,i]=cm(t);for(let t=0;t<r.length;t++)e[i](r[t]);e.join()}(n,a,e.no,t);else for(let r of t)cf(n,a,e.no,r)}else cf(n,a,e.no,t);break;case"message":if(i)for(let i of(uk(Array.isArray(t)),t))cd(n,r,e,i);else cd(n,r,e,t);break;case"map":for(let[i,a]of(uk("object"==typeof t&&null!=t),Object.entries(t)))!function(e,t,n,r,i){e.tag(n.no,tU.LengthDelimited),e.fork();let a=r;switch(n.K){case tR.INT32:case tR.FIXED32:case tR.UINT32:case tR.SFIXED32:case tR.SINT32:a=Number.parseInt(r);break;case tR.BOOL:uk("true"==r||"false"==r),a="true"==r}switch(cf(e,n.K,1,a),n.V.kind){case"scalar":cf(e,n.V.T,2,i);break;case"enum":cf(e,tR.INT32,2,i);break;case"message":uk(void 0!==i),e.tag(2,tU.LengthDelimited).bytes(i.toBinary(t))}e.join()}(n,r,e,i,a)}}function cd(e,t,n,r){let i=uQ(n.T,r);n.delimited?e.tag(n.no,tU.StartGroup).raw(i.toBinary(t)).tag(n.no,tU.EndGroup):e.tag(n.no,tU.LengthDelimited).bytes(i.toBinary(t))}function cf(e,t,n,r){uk(void 0!==r);let[i,a]=cm(t);e.tag(n,i)[a](r)}function cm(e){let t=tU.Varint;switch(e){case tR.BYTES:case tR.STRING:t=tU.LengthDelimited;break;
1case tR.DOUBLE:case tR.FIXED64:case tR.SFIXED64:t=tU.Bit64;break;case tR.FIXED32:case tR.SFIXED32:case tR.FLOAT:t=tU.Bit32}return[t,tR[e].toLowerCase()]}function cp(e){if(void 0===e)return e;if(uz(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function ch(e){return e instanceof Uint8Array?e:new Uint8Array(e)}class cg{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){let e={};for(let t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[e]}find(e){if(!this.numbers){let e={};for(let t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,t)=>e.no-t.no)),this.numbersAsc}byMember(){if(!this.members){let e;this.members=[];let t=this.members;for(let n of this.list())n.oneof?n.oneof!==e&&(e=n.oneof,t.push(e)):t.push(n)}return this.members}}function cT(e,t){let n=cI(e);return t?n:c_(cb(n))}let cy=cI;function cI(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);switch(i){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(i),t=!1;break;default:t&&(t=!1,i=i.toUpperCase()),n.push(i)}}return n.join("")}let cN=new Set(["constructor","toString","toJSON","valueOf"]),cE=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),ck=e=>`${e}$`,cb=e=>cE.has(e)?ck(e):e,c_=e=>cN.has(e)?ck(e):e;class cw{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=cT(e,!1)}addField(e){uk(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let e=0;e<this.fields.length;e++)this._lookup[this.fields[e].localName]=this.fields[e]}return this._lookup[e]}}let cv=(eN=e=>new cg(e,e=>(function(e,t){var n,r,i,a,s,o;let l;let u=[];for(let c of"function"==typeof e?e():e){if(c.localName=cT(c.name,void 0!==c.oneof),c.jsonName=null!==(n=c.jsonName)&&void 0!==n?n:cy(c.name),c.repeated=null!==(r=c.repeated)&&void 0!==r&&r,"scalar"==c.kind&&(c.L=null!==(i=c.L)&&void 0!==i?i:tP.BIGINT),c.delimited=null!==(a=c.delimited)&&void 0!==a&&a,c.req=null!==(s=c.req)&&void 0!==s&&s,c.opt=null!==(o=c.opt)&&void 0!==o&&o,void 0===c.packed&&(t?c.packed="enum"==c.kind||"scalar"==c.kind&&c.T!=tR.BYTES&&c.T!=tR.STRING:c.packed=!1),void 0!==c.oneof){let e="string"==typeof c.oneof?c.oneof:c.oneof.name;l&&l.name==e||(l=new cw(e)),c.oneof=l,l.addField(c)}u.push(c)}return u})(e,!0)),eE=e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName;if(t.repeated){e[n]=[];continue}switch(t.kind){case"oneof":e[n]={case:void 0};break;case"enum":e[n]=0;break;case"map":e[n]={};break;case"scalar":e[n]=u$(t.T,t.L)}}},{syntax:"proto3",json:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},u0),e):u0},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},u1),e):u1},readMessage(e,t,n,r){if(null==t||Array.isArray(t)||"object"!=typeof t)throw Error(`cannot decode message ${e.typeName} from JSON: ${u4(t)}`);r=null!=r?r:new e;let i=new Map,a=n.typeRegistry;for(let[s,o]of Object.entries(t)){let t=e.fields.findJsonName(s);if(t){if(t.oneof){if(null===o&&"scalar"==t.kind)continue;let n=i.get(t.oneof);if(void 0!==n)throw Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${t.oneof.name}" present: "${n}", "${s}"`);i.set(t.oneof,s)}u6(r,o,t,n,e)}else{let t=!1;if((null==a?void 0:a.findExtension)&&s.startsWith("[")&&s.endsWith("]")){let i=a.findExtension(s.substring(1,s.length-1));if(i&&i.extendee.typeName==e.typeName){t=!0;let[e,a]=uG(i);u6(e,o,i.field,n,i),function(e,t,n,r){uK(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(uX(e,t)){let n=e.getType().runtime.bin.listUnknownFields(e).filter(e=>e.no!=t.field.no);for(let t of(e.getType().runtime.bin.discardUnknownFields(e),n))e.getType().runtime.bin.onUnknownField(e,t.no,t.wireType,t.data)}let s=a.writerFactory(),o=t.field;o.opt||o.repeated||"enum"!=o.kind&&"scalar"!=o.kind||(o=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(o,n,s,a);let l=i.readerFactory(s.finish());for(;l.pos<l.len;){let[t,n]=l.tag(),r=l.skip(n);e.getType().runtime.bin.onUnknownField(e,t,n,r)}}(r,i,a(),n)}}if(!t&&!n.ignoreUnknownFields)throw Error(`cannot decode message ${e.typeName} from JSON: key "${s}" is unknown`)}}return r},writeMessage(e,t){let n;let r=e.getType(),i={};try{for(n of r.fields.byNumber()){if(!uH(n,e)){var a;if(n.req)throw"required field not set";if(!t.emitDefaultValues||!((a=n).repeated||"map"==a.kind||!a.oneof&&"message"!=a.kind&&!a.opt&&!
1a.req))continue}let r=n.oneof?e[n.oneof.localName].value:e[n.localName],s=u7(n,r,t);void 0!==s&&(i[t.useProtoFieldName?n.name:n.jsonName]=s)}let s=t.typeRegistry;if(null==s?void 0:s.findExtensionFor)for(let n of r.runtime.bin.listUnknownFields(e)){let a=s.findExtensionFor(r.typeName,n.no);if(a&&uX(e,a)){let n=function(e,t,n){uK(t,e);let r=t.runtime.bin.makeReadOptions(n),i=function(e,t){if(!t.repeated&&("enum"==t.kind||"scalar"==t.kind)){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(e=>e.no===t.no)}(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,s]=uG(t);for(let e of i)t.runtime.bin.readField(a,r.readerFactory(e.data),t.field,e.wireType,r);return s()}(e,a,t),r=u7(a.field,n,t);void 0!==r&&(i[a.field.jsonName]=r)}}}catch(i){let e=n?`cannot encode field ${r.typeName}.${n.name} to JSON`:`cannot encode message ${r.typeName} to JSON`,t=i instanceof Error?i.message:String(i);throw Error(e+(t.length>0?`: ${t}`:""))}return i},readScalar:(e,t,n)=>u9(e,t,null!=n?n:tP.BIGINT,!0),writeScalar(e,t,n){if(void 0!==t&&(n||uV(e,t)))return ce(e,t)},debug:u4},bin:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},ci),e):ci},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},ca),e):ca},listUnknownFields(e){var t;return null!==(t=e[cr])&&void 0!==t?t:[]},discardUnknownFields(e){delete e[cr]},writeUnknownFields(e,t){let n=e[cr];if(n)for(let e of n)t.tag(e.no,e.wireType).raw(e.data)},onUnknownField(e,t,n,r){Array.isArray(e[cr])||(e[cr]=[]),e[cr].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a,s;let o=e.getType(),l=i?t.len:t.pos+n;for(;t.pos<l&&([a,s]=t.tag(),s!=tU.EndGroup);){let n=o.fields.find(a);if(!n){let n=t.skip(s);r.readUnknownFields&&this.onUnknownField(e,a,s,n);continue}cs(e,t,n,s,r)}if(i&&(s!=tU.EndGroup||a!==n))throw Error("invalid end group tag")},readField:cs,writeMessage(e,t,n){let r=e.getType();for(let i of r.fields.byNumber()){if(!uH(i,e)){if(i.req)throw Error(`cannot encode field ${r.typeName}.${i.name} to binary: required field not set`);continue}let a=i.oneof?e[i.oneof.localName].value:e[i.localName];cc(i,a,t,n)}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t},writeField(e,t,n,r){void 0!==t&&cc(e,t,n,r)}},util:Object.assign(Object.assign({},{setEnumType:uO,initPartial(e,t){if(void 0!==e)for(let n of t.getType().fields.byMember()){let r=n.localName;if(void 0!==e[r])switch(n.kind){case"oneof":let i=e[r].case;if(void 0===i)continue;let a=n.findField(i),s=e[r].value;a&&"message"==a.kind&&!uz(s,a.T)?s=new a.T(s):a&&"scalar"===a.kind&&a.T===tR.BYTES&&(s=ch(s)),t[r]={case:i,value:s};break;case"scalar":case"enum":let o=e[r];n.T===tR.BYTES&&(o=n.repeated?o.map(ch):ch(o)),t[r]=o;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===tR.BYTES)for(let[n,i]of Object.entries(e[r]))t[r][n]=ch(i);else Object.assign(t[r],e[r]);break;case"message":let l=n.V.T;for(let n of Object.keys(e[r])){let i=e[r][n];l.fieldWrapper||(i=new l(i)),t[r][n]=i}}break;case"message":let u=n.T;if(n.repeated)t[r]=e[r].map(e=>uz(e,u)?e:new u(e));else{let n=e[r];u.fieldWrapper?"google.protobuf.BytesValue"===u.typeName?t[r]=ch(n):t[r]=n:t[r]=uz(n,u)?n:new u(n)}}}},equals:(e,t,n)=>t===n||!!t&&!!n&&e.fields.byMember().every(e=>{let r=t[e.localName],i=n[e.localName];if(e.repeated){if(r.length!==i.length)return!1;switch(e.kind){case"message":return r.every((t,n)=>e.T.equals(t,i[n]));case"scalar":return r.every((t,n)=>uM(e.T,t,i[n]));case"enum":return r.every((e,t)=>uM(tR.INT32,e,i[t]))}throw Error(`repeated cannot contain ${e.kind}`)}switch(e.kind){case"message":return e.T.equals(r,i);case"enum":return uM(tR.INT32,r,i);case"scalar":return uM(e.T,r,i);case"oneof":if(r.case!==i.case)return!1;let a=e.findField(r.case);if(void 0===a)return!0;switch(a.kind){case"message":return a.T.equals(r.value,i.value);case"enum":return uM(tR.INT32,r.value,i.value);case"scalar":return uM(a.T,r.value,i.value)}throw Error(`oneof cannot contain ${a.kind}`);case"map":let s=Object.keys(r).concat(Object.keys(i));switch(e.V.kind){case"message":let o=e.V.T;return s.every(e=>o.equals(r[e],i[e]));case"enum":return s.every(e=>uM(tR.INT32,r[e],i[e]));case"scalar":let l=e.V.T;return s.every(e=>uM(l,r[e],i[e]))}}}),clone(e){let t=e.getType(),n=new t;for(let r of t.fields.byMember()){let t;let i=e[r.localName];if(r.repeated)t=i.map(cp);else if("map"==r.kind)for(let[e,a]of(t=n[r.localName],Object.entries(i)))t[e]=cp(a);else t="oneof"==r.kind?r.findField(i.case)?{case:i.case,value:cp(i.value)}:{case:void 0}:cp(i);n[r.localName]=t}return n}}),{newFieldList:eN,initFields:eE}),makeMessageType(e,t,n){return function(e,t,n,r){var i;let a=null!==(i=null==r?void 0:r.localName)&&void 0!==i?i:t.substring(t.lastIndexOf(".")+1),s={[a]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[a];return Object.setPrototypeOf(s.prototype,new uE),Object.assign(s,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary:(e,t)=>new s().fromBinary(e,t),fromJson:(e,t)=>new s().fromJson(e,t),fromJsonString:(e,t)=>
1new s().fromJsonString(e,t),equals:(t,n)=>e.util.equals(s,t,n)}),s}(this,e,t,n)},makeEnum:function(e,t,n){let r={};for(let e of t){let t=uA(e);r[t.localName]=t.no,r[t.no]=t.localName}return uO(r,e,t,n),r},makeEnumType:uS,getEnumType:function(e){let t=e[uv];return uk(t,"missing enum type on enum object"),t},makeExtension(e,t,n){var r;let i;return r=this,{typeName:e,extendee:t,get field(){if(!i){let t="function"==typeof n?n():n;t.name=e.split(".").pop(),t.jsonName=`[${e}]`,i=r.util.newFieldList([t]).list()[0]}return i},runtime:r}}});class cO extends uE{type="";id="";constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.URI";static fields=cv.util.newFieldList(()=>[{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:9}]);static fromBinary(e,t){return new cO().fromBinary(e,t)}static fromJson(e,t){return new cO().fromJson(e,t)}static fromJsonString(e,t){return new cO().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cO,e,t)}}class cS extends uE{millis=uj.zero;constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.Timestamp";static fields=cv.util.newFieldList(()=>[{no:10,name:"millis",kind:"scalar",T:3}]);static fromBinary(e,t){return new cS().fromBinary(e,t)}static fromJson(e,t){return new cS().fromJson(e,t)}static fromJsonString(e,t){return new cS().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cS,e,t)}}(ek=tx||(tx={}))[ek.UNSPECIFIED=0]="UNSPECIFIED",ek[ek.PROD=1]="PROD",ek[ek.STAGING=2]="STAGING",ek[ek.DEV=3]="DEV",ek[ek.TEST=4]="TEST",cv.util.setEnumType(tx,"ibotta.tracking.common.v1.Environment",[{no:0,name:"ENVIRONMENT_UNSPECIFIED"},{no:1,name:"ENVIRONMENT_PROD"},{no:2,name:"ENVIRONMENT_STAGING"},{no:3,name:"ENVIRONMENT_DEV"},{no:4,name:"ENVIRONMENT_TEST"}]);class cA extends uE{eventUri;eventAt;environment=tx.UNSPECIFIED;agent="";revision="";zoneId="";ip="";constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.EventHeader";static fields=cv.util.newFieldList(()=>[{no:1,name:"event_uri",kind:"message",T:cO},{no:2,name:"event_at",kind:"message",T:cS},{no:3,name:"environment",kind:"enum",T:cv.getEnumType(tx)},{no:10,name:"agent",kind:"scalar",T:9},{no:20,name:"revision",kind:"scalar",T:9},{no:30,name:"zone_id",kind:"scalar",T:9},{no:100,name:"ip",kind:"scalar",T:9}]);static fromBinary(e,t){return new cA().fromBinary(e,t)}static fromJson(e,t){return new cA().fromJson(e,t)}static fromJsonString(e,t){return new cA().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cA,e,t)}}(eb=tL||(tL={}))[eb.UNSPECIFIED=0]="UNSPECIFIED",eb[eb.IOS=10]="IOS",eb[eb.ANDROID=20]="ANDROID",eb[eb.WEBAPP=30]="WEBAPP",eb[eb.WEB_V2=40]="WEB_V2",eb[eb.KINDLE=50]="KINDLE",eb[eb.BROWSER_EXTENSION=60]="BROWSER_EXTENSION",eb[eb.UNIFIED_ACCOUNT_LINKING=70]="UNIFIED_ACCOUNT_LINKING",eb[eb.BRAZE=80]="BRAZE",eb[eb.CONNECTION_CONTENT=90]="CONNECTION_CONTENT",eb[eb.IPN_PARTNER_PORTAL=100]="IPN_PARTNER_PORTAL",eb[eb.IPN_CLIENT_PORTAL=110]="IPN_CLIENT_PORTAL",eb[eb.IPN_PORTAL=120]="IPN_PORTAL",eb[eb.MARKETING_CONSUMER=130]="MARKETING_CONSUMER",eb[eb.MARKETING_CORPORATE=140]="MARKETING_CORPORATE",cv.util.setEnumType(tL,"ibotta.tracking.common.v1.IbottaPlatform",[{no:0,name:"IBOTTA_PLATFORM_UNSPECIFIED"},{no:10,name:"IBOTTA_PLATFORM_IOS"},{no:20,name:"IBOTTA_PLATFORM_ANDROID"},{no:30,name:"IBOTTA_PLATFORM_WEBAPP"},{no:40,name:"IBOTTA_PLATFORM_WEB_V2"},{no:50,name:"IBOTTA_PLATFORM_KINDLE"},{no:60,name:"IBOTTA_PLATFORM_BROWSER_EXTENSION"},{no:70,name:"IBOTTA_PLATFORM_UNIFIED_ACCOUNT_LINKING"},{no:80,name:"IBOTTA_PLATFORM_BRAZE"},{no:90,name:"IBOTTA_PLATFORM_CONNECTION_CONTENT"},{no:100,name:"IBOTTA_PLATFORM_IPN_PARTNER_PORTAL"},{no:110,name:"IBOTTA_PLATFORM_IPN_CLIENT_PORTAL"},{no:120,name:"IBOTTA_PLATFORM_IPN_PORTAL"},{no:130,name:"IBOTTA_PLATFORM_MARKETING_CONSUMER"},{no:140,name:"IBOTTA_PLATFORM_MARKETING_CORPORATE"}]);class cF extends uE{lat=0;lng=0;horizontalAccuracyMeters=0;constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.Location";static fields=cv.util.newFieldList(()=>[{no:10,name:"lat",kind:"scalar",T:1},{no:20,name:"lng",kind:"scalar",T:1},{no:30,name:"horizontal_accuracy_meters",kind:"scalar",T:1}]);static fromBinary(e,t){return new cF().fromBinary(e,t)}static fromJson(e,t){return new cF().fromJson(e,t)}static fromJsonString(e,t){return new cF().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cF,e,t)}}class cD extends uE{eventId="";trackedAt;userId="";earlyIdentifier="";appVersion="";platform=tL.UNSPECIFIED;osName="";osVersion="";deviceId="";
1deviceAdvertiserId="";deviceModel="";globalSessionId="";location;constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.TrackingHeader";static fields=cv.util.newFieldList(()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:10,name:"tracked_at",kind:"message",T:cS},{no:20,name:"user_id",kind:"scalar",T:9},{no:30,name:"early_identifier",kind:"scalar",T:9},{no:40,name:"app_version",kind:"scalar",T:9},{no:50,name:"platform",kind:"enum",T:cv.getEnumType(tL)},{no:60,name:"os_name",kind:"scalar",T:9},{no:70,name:"os_version",kind:"scalar",T:9},{no:80,name:"device_id",kind:"scalar",T:9},{no:90,name:"device_advertiser_id",kind:"scalar",T:9},{no:100,name:"device_model",kind:"scalar",T:9},{no:120,name:"global_session_id",kind:"scalar",T:9},{no:130,name:"location",kind:"message",T:cF}]);static fromBinary(e,t){return new cD().fromBinary(e,t)}static fromJson(e,t){return new cD().fromJson(e,t)}static fromJsonString(e,t){return new cD().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cD,e,t)}}(e_=tC||(tC={}))[e_.UNSPECIFIED=0]="UNSPECIFIED",e_[e_.IOS=1]="IOS",e_[e_.ANDROID=2]="ANDROID",e_[e_.WEB_MOBILE=3]="WEB_MOBILE",e_[e_.WEB_DESKTOP=4]="WEB_DESKTOP",cv.util.setEnumType(tC,"ibotta.tracking.common.v1.RegistrationContext",[{no:0,name:"REGISTRATION_CONTEXT_UNSPECIFIED"},{no:1,name:"REGISTRATION_CONTEXT_IOS"},{no:2,name:"REGISTRATION_CONTEXT_ANDROID"},{no:3,name:"REGISTRATION_CONTEXT_WEB_MOBILE"},{no:4,name:"REGISTRATION_CONTEXT_WEB_DESKTOP"}]),(ew=tJ||(tJ={}))[ew.UNSPECIFIED=0]="UNSPECIFIED",ew[ew.USD=1]="USD",cv.util.setEnumType(tJ,"ibotta.tracking.common.v1.Currency",[{no:0,name:"CURRENCY_UNSPECIFIED"},{no:1,name:"CURRENCY_USD"}]);
1class cB extends uE{currency=tJ.UNSPECIFIED;micros=uj.zero;constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.Money";static fields=cv.util.newFieldList(()=>[{no:1,name:"currency",kind:"enum",T:cv.getEnumType(tJ)},{no:2,name:"micros",kind:"scalar",T:3}]);static fromBinary(e,t){return new cB().fromBinary(e,t)}static fromJson(e,t){return new cB().fromJson(e,t)}static fromJsonString(e,t){return new cB().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cB,e,t)}}class cR extends uE{reward={case:void 0};constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.RewardProperties";static fields=cv.util.newFieldList(()=>[{no:110,name:"amount",kind:"message",T:cB,oneof:"reward"},{no:120,name:"percent",kind:"scalar",T:2,oneof:"reward"}]);static fromBinary(e,t){return new cR().fromBinary(e,t)}static fromJson(e,t){return new cR().fromJson(e,t)}static fromJsonString(e,t){return new cR().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cR,e,t)}}class cP extends uE{sessionId="";actionId="";constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.SearchProperties";static fields=cv.util.newFieldList(()=>[{no:100,name:"session_id",kind:"scalar",T:9},{no:110,name:"action_id",kind:"scalar",T:9}]);static fromBinary(e,t){return new cP().fromBinary(e,t)}static fromJson(e,t){return new cP().fromJson(e,t)}static fromJsonString(e,t){return new cP().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cP,e,t)}}class cU extends uE{name="";index=0;constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.ModuleProperties";static fields=cv.util.newFieldList(()=>[{no:100,name:"name",kind:"scalar",T:9},{no:110,name:"index",kind:"scalar",T:5}]);static fromBinary(e,t){return new cU().fromBinary(e,t)}static fromJson(e,t){return new cU().fromJson(e,t)}static fromJsonString(e,t){return new cU().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cU,e,t)}}class cx extends uE{campaign="";content="";medium="";source="";constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.UTM";static fields=cv.util.newFieldList(()=>[{no:100,name:"campaign",kind:"scalar",T:9},{no:110,name:"content",kind:"scalar",T:9},{no:120,name:"medium",kind:"scalar",T:9},{no:130,name:"source",kind:"scalar",T:9}]);static fromBinary(e,t){return new cx().fromBinary(e,t)}static fromJson(e,t){return new cx().fromJson(e,t)}static fromJsonString(e,t){return new cx().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cx,e,t)}}class cL extends uE{id="";featureFlag="";props={};constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.common.v1.Experiment";static fields=cv.util.newFieldList(()=>[{no:10,name:"id",kind:"scalar",T:9},{no:20,name:"feature_flag",kind:"scalar",T:9},{no:30,name:"props",kind:"map",K:9,V:{kind:"scalar",T:9}}]);static fromBinary(e,t){return new cL().fromBinary(e,t)}static fromJson(e,t){return new cL().fromJson(e,t)}static fromJsonString(e,t){return new cL().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cL,e,t)}}class cC extends uE{eventHeader;trackingHeader;referralCode="";registrationContext=tC.UNSPECIFIED;utm;experimental=[];constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.web.v1.RegistrationCompleted";static fields=cv.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:cA},{no:2,name:"tracking_header",kind:"message",T:cD},{no:100,name:"referral_code",kind:"scalar",T:9},{no:110,name:"registration_context",kind:"enum",T:cv.getEnumType(tC)},{no:120,name:"utm",kind:"message",T:cx},{no:1e3,name:"experimental",kind:"message",T:cL,repeated:!0}]);static fromBinary(e,t){return new cC().fromBinary(e,t)}static fromJson(e,t){return new cC().fromJson(e,t)}static fromJsonString(e,t){return new cC().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cC,e,t)}}class cJ extends uE{eventHeader;trackingHeader;referralCode="";registrationContext=tC.UNSPECIFIED;utm;errorMessage="";experimental=[];constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.web.v1.RegistrationFailed";static fields=cv.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:cA},{no:2,name:"tracking_header",kind:"message",T:cD},{no:100,name:"referral_code",kind:"scalar",T:9},{no:110,name:"registration_context",kind:"enum",T:cv.getEnumType(tC)},{no:120,name:"utm",kind:"message",T:cx},{no:130,name:"error_message",kind:"scalar",T:9},{no:1e3,name:"experimental",kind:"message",T:cL,repeated:!0}]);static fromBinary(e,t){return new cJ().fromBinary(e,t)}static fromJson(e,t){return new cJ().fromJson(e,t)}static fromJsonString(e,t){return new cJ().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cJ,e,t)}}class cj extends uE{eventHeader;trackingHeader;referralCode="";registrationContext=tC.UNSPECIFIED;utm;experimental=[];constructor(e){super(),cv.util.initPartial(e,this)}static runtime=cv;static typeName="ibotta.tracking.web.v1.RegistrationStarted";static fields=cv.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:cA},{no:2,name:"tracking_header",kind:"message",T:cD},{no:100,name:"referral_code",kind:"scalar",T:9},{no:110,name:"registration_context",kind:"enum",T:cv.getEnumType(tC)},{no:120,name:"utm",kind:"message",T:cx},{no:1e3,name:"experimental",kind:"message",T:cL,repeated:!0}]);static fromBinary(e,t){return new cj().fromBinary(e,t)}static fromJson(e,t){return new cj().fromJson(e,t)}static fromJsonString(e,t){return new cj().fromJsonString(e,t)}static equals(e,t){return cv.util.equals(cj,e,t)}}function cM(e,t){if(!e)throw Error(t)}function c$(e){if("number"!=typeof e)throw Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error("invalid int 32: "+e)}function cV(e){if("number"!=typeof e)throw Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error("invalid uint 32: "+e)}function cG(e){if("number"!=typeof e)throw Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error("invalid float 32: "+e)}let cq=Symbol("@bufbuild/protobuf/enum-type");function cY(e,t,n,r){e[cq]=cW(t,n.map(t=>({no:t.no,name:t.name,localName:e[t.no]})),r)}function cW(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let e of t){let t=cX(e);a.push(t),r[e.name]=t,i[e.no]=t}return{typeName:e,values:a,findName:e=>r[e],findNumber:e=>i[e]}}function cX(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class cK{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){let n=this.getType().runtime.bin,r=n.makeReadOptions(t);return n.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){let n=this.getType(),r=n.runtime.json,i=r.makeReadOptions(t);return r.readMessage(n,e,i,this),this}fromJsonString(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`cannot decode ${this.getType().typeName} from JSON: ${e instanceof Error?e.message:String(e)}`)}return this.fromJson(n,t)}toBinary(e){let t=this.getType().runtime.bin,n=t.makeWriteOptions(e),r=n.writerFactory();return t.writeMessage(this,r,n),r.finish()}
1toJson(e){let t=this.getType().runtime.json,n=t.makeWriteOptions(e);return t.writeMessage(this,n)}toJsonString(e){var t;return JSON.stringify(this.toJson(e),null,null!==(t=null==e?void 0:e.prettySpaces)&&void 0!==t?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function cH(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(15&n)<<28,t=(112&n)>>4,(128&n)==0)return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}throw Error("invalid varint")}function cZ(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(i>>>7==0&&0==t),s=(a?128|i:i)&255;if(n.push(s),!a)return}let r=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(n.push((i?128|r:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=r>>>7!=0,a=(i?128|r:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}function cz(e){let t="-"===e[0];t&&(e=e.slice(1));let n=0,r=0;function i(t,i){let a=Number(e.slice(t,i));r*=1e6,(n=1e6*n+a)>=4294967296&&(r+=n/4294967296|0,n%=4294967296)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?c1(n,r):c0(n,r)}function cQ(e,t){if({lo:e,hi:t}={lo:e>>>0,hi:t>>>0},t<=2097151)return String(4294967296*t+e);let n=16777215&e,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+6777216*r+6710656*i,s=r+8147497*i,o=2*i;return a>=1e7&&(s+=Math.floor(a/1e7),a%=1e7),s>=1e7&&(o+=Math.floor(s/1e7),s%=1e7),o.toString()+c2(s)+c2(a)}function c0(e,t){return{lo:0|e,hi:0|t}}function c1(e,t){return t=~t,e?e=~e+1:t+=1,c0(e,t)}let c2=e=>{let t=String(e);return"0000000".slice(t.length)+t};function c3(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(127&e|128),e>>=7;t.push(1)}}function c4(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}var c6=n(74859);let c9=function(){let e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&("object"!=typeof c6||"object"!=typeof c6.env||"1"!==c6.env.BUF_BIGINT_DISABLE)){let t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){let r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw Error(`int64 invalid: ${e}`);return r},uParse(e){let t="bigint"==typeof e?e:BigInt(e);if(t>i||t<r)throw Error(`uint64 invalid: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}let t=e=>cM(/^-?[0-9]+$/.test(e),`int64 invalid: ${e}`),n=e=>cM(/^[0-9]+$/.test(e),`uint64 invalid: ${e}`);return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),t(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),n(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),t(e),cz(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),n(e),cz(e)),dec:(e,t)=>(function(e,t){let n=c0(e,t),r=2147483648&n.hi;r&&(n=c1(n.lo,n.hi));let i=cQ(n.lo,n.hi);return r?"-"+i:i})(e,t),uDec:(e,t)=>cQ(e,t)}}();function c8(e,t,n){if(t===n)return!0;if(e==tj.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case tj.UINT64:case tj.FIXED64:case tj.INT64:case tj.SFIXED64:case tj.SINT64:return t==n}return!1}function c7(e,t){switch(e){case tj.BOOL:return!1;case tj.UINT64:case tj.FIXED64:case tj.INT64:case tj.SFIXED64:case tj.SINT64:return 0==t?c9.zero:"0";case tj.DOUBLE:case tj.FLOAT:return 0;case tj.BYTES:return new Uint8Array(0);case tj.STRING:return"";default:return 0}}function c5(e,t){switch(e){case tj.BOOL:return!1===t;case tj.STRING:return""===t;case tj.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return 0==t}}function de(e){let t=e.field.localName,n=Object.create(null);return n[t]=function(e){let t=e.field;if(t.repeated)return[];if(void 0!==t.default)return t.default;switch(t.kind){case"enum":return t.T.values[0].no;case"scalar":return c7(t.T,t.L);case"message":let n=t.T,r=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(r):r;case"map":throw"map fields are not allowed to be extensions"}}(e),[n,()=>n[t]]}(ev=tj||(tj={}))[ev.DOUBLE=1]="DOUBLE",ev[ev.FLOAT=2]="FLOAT",ev[ev.INT64=3]="INT64",ev[ev.UINT64=4]="UINT64",ev[ev.INT32=5]="INT32",ev[ev.FIXED64=6]="FIXED64",ev[ev.FIXED32=7]="FIXED32",ev[ev.BOOL=8]="BOOL",ev[ev.STRING=9]="STRING",ev[ev.BYTES=12]="BYTES",ev[ev.UINT32=13]="UINT32",ev[ev.SFIXED32=15]="SFIXED32",ev[ev.SFIXED64=16]="SFIXED64",ev[ev.SINT32=17]="SINT32",ev[ev.SINT64=18]="SINT64",(eO=tM||(tM={}))[eO.BIGINT=0]="BIGINT",eO[eO.STRING=1]="STRING";let dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/".split(""),dn=[];for(let e=0;e<dt.length;e++)dn[dt[e].charCodeAt(0)]=e;dn["-".charCodeAt(0)]=dt.indexOf("+"),dn["_".charCodeAt(0)]=dt.indexOf("/");let dr={dec(e){let t=3*e.length/4;"="==e[e.length-2]?t-=2:"="==e[e.length-1]&&(t-=1);let n=new Uint8Array(t),r=0,i=0,a,s=0;for(let t=0;t<e.length;t++){if(void 0===(a=dn[e.charCodeAt(t)]))switch(e[t]){case"=":i=0;case"\n":case"\r":case"	":case" ":continue;default:throw Error("invalid base64 string.")}switch(i){case 0:s=a,i=1;break;case 1:n[r++]=s<<2|(48&a)>>4,s=a,i=2;break;case 2:n[r++]=(15&s)<<4|(60&a)>>2,s=a,i=3;break;case 3:n[r++]=(3&s)<<6|a,i=0}}if(1==i)throw Error("invalid base64 string.");return n.subarray(0,r)},enc(e){let t="",n=0,r,i=0;for(let a=0;a<e.length;a++)switch(r=e[a],n){case 0:t+=dt[r>>2],i=(3&r)<<4,n=1;break;case 1:t+=dt[i|r>>4],i=(15&r)<<2,n=2;break;case 2:t+=dt[i|r>>6]+dt[63&r],n=0}return n&&(t+=dt[i]+"=",1==n&&(t+="=")),t}};function di(e,t){let n=e.getType();return t.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(e).find(e=>e.no==t.field.no)}function da(e,t){cM(e.extendee.typeName==t.getType().typeName,`extension ${e.typeName} can only be applied to message ${e.extendee.typeName}`)}function ds(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case"enum":case"scalar":if(e.opt||e.req)return void 0!==t[n];if("enum"==e.kind)return t[n]!==e.T.values[0].no;return!c5(e.T,t[n]);case"message":return void 0!==t[n];case"map":return Object.keys(t[n]).length>0}}function dl(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":t[n]={};break;case"enum":t[n]=r?e.T.values[0].no:void 0;break;case"scalar":t[n]=r?c7(e.T,e.L):void 0;break;case"message":t[n]=void 0}}function du(e,t){if(null===e||"object"!=typeof e||!Object.getOwnPropertyNames(cK.prototype).every(t=>t in e&&"function"==typeof e[t]))return!1;let n=e.getType();return null!==n&&"function"==typeof n&&"typeName"in n&&"string"==typeof n.typeName&&(void 0===t||n.typeName==t.typeName)}function dc(e,t){return du(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}tj.DOUBLE,tj.FLOAT,tj.INT64,tj.UINT64,tj.INT32,tj.UINT32,tj.BOOL,tj.STRING,tj.BYTES;let dd={ignoreUnknownFields:!1},df={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},dm=Symbol(),dp=Symbol();function dh(e){if(null===e)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":`"${e.split('"').join('\\"')}"`;default:return String(e)}}function dg(e,t,n,r,i){let a=n.localName;if(n.repeated){if(cM("map"!=n.kind),null===t)return;if(!Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${dh(t)}`);let s=e[a];for(let e of t){if(null===e)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${dh(e)}`);switch(n.kind){case"message":s.push(n.T.fromJson(e,r));break;case"enum":let t=dy(n.T,e,r.ignoreUnknownFields,!0);t!==dp&&s.push(t);break;case"scalar":try{s.push(dT(n.T,e,n.L,!0))}catch(r){let t=`cannot decode field ${i.typeName}.${n.name} from JSON: ${dh(e)}`;throw r instanceof Error&&r.message.length>0&&(t+=`: ${r.message}`),Error(t)}}}}else if("map"==n.kind){if(null===t)return;if("object"!=typeof t||Array.isArray(t))throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: ${dh(t)}`);let s=e[a];for(let[e,a]of Object.entries(t)){let o;if(null===a)throw Error(`cannot decode field ${i.typeName}.${n.name} from JSON: map value null`);try{o=function(e,t){if(e===tj.BOOL)switch(t){case"true":t=!0;break;case"false":t=!1}return dT(e,t,tM.BIGINT,!0).toString()}(n.K,e)}catch(r){let e=`cannot decode map key for field ${i.typeName}.${n.name} from JSON: ${dh(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}switch(n.V.kind){case"message":s[o]=n.V.T.fromJson(a,r);break;case"enum":let l=dy(n.V.T,a,r.ignoreUnknownFields,!0);l!==dp&&(s[o]=l);break;case"scalar":try{s[o]=dT(n.V.T,a,tM.BIGINT,!0)}catch(r){let e=`cannot decode map value for field ${i.typeName}.${n.name} from JSON: ${dh(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}}else switch(n.oneof&&(e=e[n.oneof.localName]={case:a},a="value"),n.kind){case"message":let s=n.T;if(null===t&&"google.protobuf.Value"!=s.typeName)return;let o=e[a];du(o)?o.fromJson(t,r):(e[a]=o=s.fromJson(t,r),s.fieldWrapper&&!n.oneof&&(e[a]=s.fieldWrapper.unwrapField(o)));break;case"enum":let l=dy(n.T,t,r.ignoreUnknownFields,!1);switch(l){case dm:dl(n,e);break;case dp:break;default:e[a]=l}break;case"scalar":try{let r=dT(n.T,t,n.L,!1);r===dm?dl(n,e):e[a]=r}catch(r){let e=`cannot decode field ${i.typeName}.${n.name} from JSON: ${dh(t)}`;throw r instanceof Error&&r.message.length>0&&(e+=`: ${r.message}`),Error(e)}}}function dT(e,t,n,r){if(null===t)return r?c7(e,n):dm;switch(e){case tj.DOUBLE:case tj.FLOAT:if("NaN"===t)return Number.NaN;if("Infinity"===t)return Number.POSITIVE_INFINITY;if("-Infinity"===t)return Number.NEGATIVE_INFINITY;if(""===t||"string"==typeof t&&t.trim().length!==t.length||"string"!=typeof t&&"number"!=typeof t)break;let i=Number(t);
1if(Number.isNaN(i)||!Number.isFinite(i))break;return e==tj.FLOAT&&cG(i),i;case tj.INT32:case tj.FIXED32:case tj.SFIXED32:case tj.SINT32:case tj.UINT32:let a;if("number"==typeof t?a=t:"string"==typeof t&&t.length>0&&t.trim().length===t.length&&(a=Number(t)),void 0===a)break;return e==tj.UINT32?cV(a):c$(a),a;case tj.INT64:case tj.SFIXED64:case tj.SINT64:if("number"!=typeof t&&"string"!=typeof t)break;let s=c9.parse(t);return n?s.toString():s;case tj.FIXED64:case tj.UINT64:if("number"!=typeof t&&"string"!=typeof t)break;let o=c9.uParse(t);return n?o.toString():o;case tj.BOOL:if("boolean"!=typeof t)break;return t;case tj.STRING:if("string"!=typeof t)break;try{encodeURIComponent(t)}catch(e){throw Error("invalid UTF8")}return t;case tj.BYTES:if(""===t)return new Uint8Array(0);if("string"!=typeof t)break;return dr.dec(t)}throw Error()}function dy(e,t,n,r){if(null===t)return"google.protobuf.NullValue"==e.typeName?0:r?e.values[0].no:dm;switch(typeof t){case"number":if(Number.isInteger(t))return t;break;case"string":let i=e.findName(t);if(void 0!==i)return i.no;if(n)return dp}throw Error(`cannot decode enum ${e.typeName} from JSON: ${dh(t)}`)}function dI(e,t,n){if("map"==e.kind){cM("object"==typeof t&&null!=t);let r={},i=Object.entries(t);switch(e.V.kind){case"scalar":for(let[t,n]of i)r[t.toString()]=dE(e.V.T,n);break;case"message":for(let[e,t]of i)r[e.toString()]=t.toJson(n);break;case"enum":let a=e.V.T;for(let[e,t]of i)r[e.toString()]=dN(a,t,n.enumAsInteger)}return n.emitDefaultValues||i.length>0?r:void 0}if(e.repeated){cM(Array.isArray(t));let r=[];switch(e.kind){case"scalar":for(let n=0;n<t.length;n++)r.push(dE(e.T,t[n]));break;case"enum":for(let i=0;i<t.length;i++)r.push(dN(e.T,t[i],n.enumAsInteger));break;case"message":for(let e=0;e<t.length;e++)r.push(t[e].toJson(n))}return n.emitDefaultValues||r.length>0?r:void 0}switch(e.kind){case"scalar":return dE(e.T,t);case"enum":return dN(e.T,t,n.enumAsInteger);case"message":return dc(e.T,t).toJson(n)}}function dN(e,t,n){var r;if(cM("number"==typeof t),"google.protobuf.NullValue"==e.typeName)return null;if(n)return t;let i=e.findNumber(t);return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:t}function dE(e,t){switch(e){case tj.INT32:case tj.SFIXED32:case tj.SINT32:case tj.FIXED32:case tj.UINT32:return cM("number"==typeof t),t;case tj.FLOAT:case tj.DOUBLE:if(cM("number"==typeof t),Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case tj.STRING:return cM("string"==typeof t),t;case tj.BOOL:return cM("boolean"==typeof t),t;case tj.UINT64:case tj.FIXED64:case tj.INT64:case tj.SFIXED64:case tj.SINT64:return cM("bigint"==typeof t||"string"==typeof t||"number"==typeof t),t.toString();case tj.BYTES:return cM(t instanceof Uint8Array),dr.enc(t)}}(eS=t$||(t$={}))[eS.Varint=0]="Varint",eS[eS.Bit64=1]="Bit64",eS[eS.LengthDelimited=2]="LengthDelimited",eS[eS.StartGroup=3]="StartGroup",eS[eS.EndGroup=4]="EndGroup",eS[eS.Bit32=5]="Bit32";class dk{constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(cV(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return c$(e),c3(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){cG(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){cV(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){c$(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return c$(e),c3(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=c9.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=c9.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=c9.enc(e);return cZ(t.lo,t.hi,this.buf),this}sint64(e){let t=c9.enc(e),n=t.hi>>31;return cZ(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=c9.uEnc(e);return cZ(t.lo,t.hi,this.buf),this}}class db{constructor(e,t){this.varint64=cH,this.uint32=c4,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=t?t:new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,n=7&e;
1if(t<=0||n<0||n>5)throw Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e){let t=this.pos;switch(e){case t$.Varint:for(;128&this.buf[this.pos++];);break;case t$.Bit64:this.pos+=4;case t$.Bit32:this.pos+=4;break;case t$.LengthDelimited:let n=this.uint32();this.pos+=n;break;case t$.StartGroup:let r;for(;(r=this.tag()[1])!==t$.EndGroup;)this.skip(r);break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return c9.dec(...this.varint64())}uint64(){return c9.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,c9.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return c9.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return c9.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}let d_=Symbol("@bufbuild/protobuf/unknown-fields"),dw={readUnknownFields:!0,readerFactory:e=>new db(e)},dv={writeUnknownFields:!0,writerFactory:()=>new dk};function dO(e,t,n,r,i){let{repeated:a,localName:s}=n;switch(n.oneof&&((e=e[n.oneof.localName]).case!=s&&delete e.value,e.case=s,s="value"),n.kind){case"scalar":case"enum":let o="enum"==n.kind?tj.INT32:n.T,l=dF;if("scalar"==n.kind&&n.L>0&&(l=dA),a){let n=e[s];if(r==t$.LengthDelimited&&o!=tj.STRING&&o!=tj.BYTES){let e=t.uint32()+t.pos;for(;t.pos<e;)n.push(l(t,o))}else n.push(l(t,o))}else e[s]=l(t,o);break;case"message":let u=n.T;a?e[s].push(dS(t,new u,i,n)):du(e[s])?dS(t,e[s],i,n):(e[s]=dS(t,new u,i,n),!u.fieldWrapper||n.oneof||n.repeated||(e[s]=u.fieldWrapper.unwrapField(e[s])));break;case"map":let[c,d]=function(e,t,n){let r,i;let a=t.uint32(),s=t.pos+a;for(;t.pos<s;){let[a]=t.tag();switch(a){case 1:r=dF(t,e.K);break;case 2:switch(e.V.kind){case"scalar":i=dF(t,e.V.T);break;case"enum":i=t.int32();break;case"message":i=dS(t,new e.V.T,n,void 0)}}}if(void 0===r&&(r=c7(e.K,tM.BIGINT)),"string"!=typeof r&&"number"!=typeof r&&(r=r.toString()),void 0===i)switch(e.V.kind){case"scalar":i=c7(e.V.T,tM.BIGINT);break;case"enum":i=e.V.T.values[0].no;break;case"message":i=new e.V.T}return[r,i]}(n,t,i);e[s][c]=d}}function dS(e,t,n,r){let i=t.getType().runtime.bin,a=null==r?void 0:r.delimited;return i.readMessage(t,e,a?r.no:e.uint32(),n,a),t}function dA(e,t){let n=dF(e,t);return"bigint"==typeof n?n.toString():n}function dF(e,t){switch(t){case tj.STRING:return e.string();case tj.BOOL:return e.bool();case tj.DOUBLE:return e.double();case tj.FLOAT:return e.float();case tj.INT32:return e.int32();case tj.INT64:return e.int64();case tj.UINT64:return e.uint64();case tj.FIXED64:return e.fixed64();case tj.BYTES:return e.bytes();case tj.FIXED32:return e.fixed32();case tj.SFIXED32:return e.sfixed32();case tj.SFIXED64:return e.sfixed64();case tj.SINT64:return e.sint64();case tj.UINT32:return e.uint32();case tj.SINT32:return e.sint32()}}function dD(e,t,n,r){cM(void 0!==t);let i=e.repeated;switch(e.kind){case"scalar":case"enum":let a="enum"==e.kind?tj.INT32:e.T;if(i){if(cM(Array.isArray(t)),e.packed)!function(e,t,n,r){if(!r.length)return;e.tag(n,t$.LengthDelimited).fork();let[,i]=dP(t);for(let t=0;t<r.length;t++)e[i](r[t]);e.join()}(n,a,e.no,t);else for(let r of t)dR(n,a,e.no,r)}else dR(n,a,e.no,t);break;case"message":if(i)for(let i of(cM(Array.isArray(t)),t))dB(n,r,e,i);else dB(n,r,e,t);break;case"map":for(let[i,a]of(cM("object"==typeof t&&null!=t),Object.entries(t)))!function(e,t,n,r,i){e.tag(n.no,t$.LengthDelimited),e.fork();let a=r;switch(n.K){case tj.INT32:case tj.FIXED32:case tj.UINT32:case tj.SFIXED32:case tj.SINT32:a=Number.parseInt(r);break;case tj.BOOL:cM("true"==r||"false"==r),a="true"==r}switch(dR(e,n.K,1,a),n.V.kind){case"scalar":dR(e,n.V.T,2,i);break;case"enum":dR(e,tj.INT32,2,i);break;case"message":cM(void 0!==i),e.tag(2,t$.LengthDelimited).bytes(i.toBinary(t))}e.join()}(n,r,e,i,a)}}function dB(e,t,n,r){let i=dc(n.T,r);n.delimited?e.tag(n.no,t$.StartGroup).raw(i.toBinary(t)).tag(n.no,t$.EndGroup):e.tag(n.no,t$.LengthDelimited).bytes(i.toBinary(t))}function dR(e,t,n,r){cM(void 0!==r);let[i,a]=dP(t);e.tag(n,i)[a](r)}function dP(e){let t=t$.Varint;switch(e){case tj.BYTES:case tj.STRING:t=t$.LengthDelimited;break;case tj.DOUBLE:case tj.FIXED64:case tj.SFIXED64:t=t$.Bit64;break;case tj.FIXED32:case tj.SFIXED32:case tj.FLOAT:t=t$.Bit32}return[t,tj[e].toLowerCase()]}function dU(e){if(void 0===e)return e;if(du(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function dx(e){return e instanceof Uint8Array?e:new Uint8Array(e)}class dL{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){let e={};for(let t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[e]}find(e){if(!this.numbers){let e={};for(let t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,t)=>
1e.no-t.no)),this.numbersAsc}byMember(){if(!this.members){let e;this.members=[];let t=this.members;for(let n of this.list())n.oneof?n.oneof!==e&&(e=n.oneof,t.push(e)):t.push(n)}return this.members}}function dC(e,t){let n=dj(e);return t?n:dq(dG(n))}let dJ=dj;function dj(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);switch(i){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(i),t=!1;break;default:t&&(t=!1,i=i.toUpperCase()),n.push(i)}}return n.join("")}let dM=new Set(["constructor","toString","toJSON","valueOf"]),d$=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),dV=e=>`${e}$`,dG=e=>d$.has(e)?dV(e):e,dq=e=>dM.has(e)?dV(e):e;class dY{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=dC(e,!1)}addField(e){cM(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let e=0;e<this.fields.length;e++)this._lookup[this.fields[e].localName]=this.fields[e]}return this._lookup[e]}}let dW=(eA=e=>new dL(e,e=>(function(e,t){var n,r,i,a,s,o;let l;let u=[];for(let c of"function"==typeof e?e():e){if(c.localName=dC(c.name,void 0!==c.oneof),c.jsonName=null!==(n=c.jsonName)&&void 0!==n?n:dJ(c.name),c.repeated=null!==(r=c.repeated)&&void 0!==r&&r,"scalar"==c.kind&&(c.L=null!==(i=c.L)&&void 0!==i?i:tM.BIGINT),c.delimited=null!==(a=c.delimited)&&void 0!==a&&a,c.req=null!==(s=c.req)&&void 0!==s&&s,c.opt=null!==(o=c.opt)&&void 0!==o&&o,void 0===c.packed&&(t?c.packed="enum"==c.kind||"scalar"==c.kind&&c.T!=tj.BYTES&&c.T!=tj.STRING:c.packed=!1),void 0!==c.oneof){let e="string"==typeof c.oneof?c.oneof:c.oneof.name;l&&l.name==e||(l=new dY(e)),c.oneof=l,l.addField(c)}u.push(c)}return u})(e,!0)),eF=e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName;if(t.repeated){e[n]=[];continue}switch(t.kind){case"oneof":e[n]={case:void 0};break;case"enum":e[n]=0;break;case"map":e[n]={};break;case"scalar":e[n]=c7(t.T,t.L)}}},{syntax:"proto3",json:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},dd),e):dd},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},df),e):df},readMessage(e,t,n,r){if(null==t||Array.isArray(t)||"object"!=typeof t)throw Error(`cannot decode message ${e.typeName} from JSON: ${dh(t)}`);r=null!=r?r:new e;let i=new Map,a=n.typeRegistry;for(let[s,o]of Object.entries(t)){let t=e.fields.findJsonName(s);if(t){if(t.oneof){if(null===o&&"scalar"==t.kind)continue;let n=i.get(t.oneof);if(void 0!==n)throw Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${t.oneof.name}" present: "${n}", "${s}"`);i.set(t.oneof,s)}dg(r,o,t,n,e)}else{let t=!1;if((null==a?void 0:a.findExtension)&&s.startsWith("[")&&s.endsWith("]")){let i=a.findExtension(s.substring(1,s.length-1));if(i&&i.extendee.typeName==e.typeName){t=!0;let[e,a]=de(i);dg(e,o,i.field,n,i),function(e,t,n,r){da(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(di(e,t)){let n=e.getType().runtime.bin.listUnknownFields(e).filter(e=>e.no!=t.field.no);for(let t of(e.getType().runtime.bin.discardUnknownFields(e),n))e.getType().runtime.bin.onUnknownField(e,t.no,t.wireType,t.data)}let s=a.writerFactory(),o=t.field;o.opt||o.repeated||"enum"!=o.kind&&"scalar"!=o.kind||(o=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(o,n,s,a);let l=i.readerFactory(s.finish());for(;l.pos<l.len;){let[t,n]=l.tag(),r=l.skip(n);e.getType().runtime.bin.onUnknownField(e,t,n,r)}}(r,i,a(),n)}}if(!t&&!n.ignoreUnknownFields)throw Error(`cannot decode message ${e.typeName} from JSON: key "${s}" is unknown`)}}return r},writeMessage(e,t){let n;let r=e.getType(),i={};try{for(n of r.fields.byNumber()){if(!ds(n,e)){var a;if(n.req)throw"required field not set";if(!t.emitDefaultValues||!((a=n).repeated||"map"==a.kind||!a.oneof&&"message"!=a.kind&&!a.opt&&!a.req))continue}let r=n.oneof?e[n.oneof.localName].value:e[n.localName],s=dI(n,r,t);void 0!==s&&(i[t.useProtoFieldName?n.name:n.jsonName]=s)}let s=t.typeRegistry;if(null==s?void 0:s.findExtensionFor)for(let n of r.runtime.bin.listUnknownFields(e)){let a=s.findExtensionFor(r.typeName,n.no);if(a&&di(e,a)){let n=function(e,t,n){da(t,e);let r=t.runtime.bin.makeReadOptions(n),i=function(e,t){if(!t.repeated&&("enum"==t.kind||"scalar"==t.kind)){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(e=>e.no===t.no)}(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,s]=de(t);for(let e of i)t.runtime.bin.readField(a,r.readerFactory(e.data),t.field,e.wireType,r);return s()}(e,a,t),r=dI(a.field,n,t);void 0!==r&&(i[a.field.jsonName]=r)}}}catch(i){let e=n?`cannot encode field ${r.typeName}.${n.name} to JSON`:`cannot encode message ${r.typeName} to JSON`,t=i instanceof Error?i.message:String(i);throw Error(e+(t.length>0?`: ${t}`:""))}return i}
1,readScalar:(e,t,n)=>dT(e,t,null!=n?n:tM.BIGINT,!0),writeScalar(e,t,n){if(void 0!==t&&(n||c5(e,t)))return dE(e,t)},debug:dh},bin:{makeReadOptions:function(e){return e?Object.assign(Object.assign({},dw),e):dw},makeWriteOptions:function(e){return e?Object.assign(Object.assign({},dv),e):dv},listUnknownFields(e){var t;return null!==(t=e[d_])&&void 0!==t?t:[]},discardUnknownFields(e){delete e[d_]},writeUnknownFields(e,t){let n=e[d_];if(n)for(let e of n)t.tag(e.no,e.wireType).raw(e.data)},onUnknownField(e,t,n,r){Array.isArray(e[d_])||(e[d_]=[]),e[d_].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a,s;let o=e.getType(),l=i?t.len:t.pos+n;for(;t.pos<l&&([a,s]=t.tag(),s!=t$.EndGroup);){let n=o.fields.find(a);if(!n){let n=t.skip(s);r.readUnknownFields&&this.onUnknownField(e,a,s,n);continue}dO(e,t,n,s,r)}if(i&&(s!=t$.EndGroup||a!==n))throw Error("invalid end group tag")},readField:dO,writeMessage(e,t,n){let r=e.getType();for(let i of r.fields.byNumber()){if(!ds(i,e)){if(i.req)throw Error(`cannot encode field ${r.typeName}.${i.name} to binary: required field not set`);continue}let a=i.oneof?e[i.oneof.localName].value:e[i.localName];dD(i,a,t,n)}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t},writeField(e,t,n,r){void 0!==t&&dD(e,t,n,r)}},util:Object.assign(Object.assign({},{setEnumType:cY,initPartial(e,t){if(void 0!==e)for(let n of t.getType().fields.byMember()){let r=n.localName;if(void 0!==e[r])switch(n.kind){case"oneof":let i=e[r].case;if(void 0===i)continue;let a=n.findField(i),s=e[r].value;a&&"message"==a.kind&&!du(s,a.T)?s=new a.T(s):a&&"scalar"===a.kind&&a.T===tj.BYTES&&(s=dx(s)),t[r]={case:i,value:s};break;case"scalar":case"enum":let o=e[r];n.T===tj.BYTES&&(o=n.repeated?o.map(dx):dx(o)),t[r]=o;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===tj.BYTES)for(let[n,i]of Object.entries(e[r]))t[r][n]=dx(i);else Object.assign(t[r],e[r]);break;case"message":let l=n.V.T;for(let n of Object.keys(e[r])){let i=e[r][n];l.fieldWrapper||(i=new l(i)),t[r][n]=i}}break;case"message":let u=n.T;if(n.repeated)t[r]=e[r].map(e=>du(e,u)?e:new u(e));else{let n=e[r];u.fieldWrapper?"google.protobuf.BytesValue"===u.typeName?t[r]=dx(n):t[r]=n:t[r]=du(n,u)?n:new u(n)}}}},equals:(e,t,n)=>t===n||!!t&&!!n&&e.fields.byMember().every(e=>{let r=t[e.localName],i=n[e.localName];if(e.repeated){if(r.length!==i.length)return!1;switch(e.kind){case"message":return r.every((t,n)=>e.T.equals(t,i[n]));case"scalar":return r.every((t,n)=>c8(e.T,t,i[n]));case"enum":return r.every((e,t)=>c8(tj.INT32,e,i[t]))}throw Error(`repeated cannot contain ${e.kind}`)}switch(e.kind){case"message":return e.T.equals(r,i);case"enum":return c8(tj.INT32,r,i);case"scalar":return c8(e.T,r,i);case"oneof":if(r.case!==i.case)return!1;let a=e.findField(r.case);if(void 0===a)return!0;switch(a.kind){case"message":return a.T.equals(r.value,i.value);case"enum":return c8(tj.INT32,r.value,i.value);case"scalar":return c8(a.T,r.value,i.value)}throw Error(`oneof cannot contain ${a.kind}`);case"map":let s=Object.keys(r).concat(Object.keys(i));switch(e.V.kind){case"message":let o=e.V.T;return s.every(e=>o.equals(r[e],i[e]));case"enum":return s.every(e=>c8(tj.INT32,r[e],i[e]));case"scalar":let l=e.V.T;return s.every(e=>c8(l,r[e],i[e]))}}}),clone(e){let t=e.getType(),n=new t;for(let r of t.fields.byMember()){let t;let i=e[r.localName];if(r.repeated)t=i.map(dU);else if("map"==r.kind)for(let[e,a]of(t=n[r.localName],Object.entries(i)))t[e]=dU(a);else t="oneof"==r.kind?r.findField(i.case)?{case:i.case,value:dU(i.value)}:{case:void 0}:dU(i);n[r.localName]=t}return n}}),{newFieldList:eA,initFields:eF}),makeMessageType(e,t,n){return function(e,t,n,r){var i;let a=null!==(i=null==r?void 0:r.localName)&&void 0!==i?i:t.substring(t.lastIndexOf(".")+1),s={[a]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[a];return Object.setPrototypeOf(s.prototype,new cK),Object.assign(s,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary:(e,t)=>new s().fromBinary(e,t),fromJson:(e,t)=>new s().fromJson(e,t),fromJsonString:(e,t)=>new s().fromJsonString(e,t),equals:(t,n)=>e.util.equals(s,t,n)}),s}(this,e,t,n)},makeEnum:function(e,t,n){let r={};for(let e of t){let t=cX(e);r[t.localName]=t.no,r[t.no]=t.localName}return cY(r,e,t,n),r},makeEnumType:cW,getEnumType:function(e){let t=e[cq];return cM(t,"missing enum type on enum object"),t},makeExtension(e,t,n){var r;let i;return r=this,{typeName:e,extendee:t,get field(){if(!i){let t="function"==typeof n?n():n;t.name=e.split(".").pop(),t.jsonName=`[${e}]`,i=r.util.newFieldList([t]).list()[0]}return i},runtime:r}}});(eD=tV||(tV={}))[eD.UNSPECIFIED=0]="UNSPECIFIED",eD[eD.HOME=1]="HOME",eD[eD.DOCS=2]="DOCS",eD[eD.PERFORMANCE=3]="PERFORMANCE",eD[eD.USERS=4]="USERS",eD[eD.SUPPORT=5]="SUPPORT",eD[eD.CAMPAIGN_MANAGER=6]="CAMPAIGN_MANAGER",eD[eD.LEDGERS=7]="LEDGERS",dW.util.setEnumType(tV,"ibotta.tracking.ipn_portal.v3.PortalApplication",[{no:0,name:"PORTAL_APPLICATION_UNSPECIFIED"},{no:1,name:"PORTAL_APPLICATION_HOME"},{no:2,name:"PORTAL_APPLICATION_DOCS"},{no:3,name:"PORTAL_APPLICATION_PERFORMANCE"},{no:4,name:"PORTAL_APPLICATION_USERS"},{no:5,name:"PORTAL_APPLICATION_SUPPORT"},{no:6,name:"PORTAL_APPLICATION_CAMPAIGN_MANAGER"},{no:7,name:"PORTAL_APPLICATION_LEDGERS"}]);class dX extends cK{userId="";organizationId="";cpgAccountId="";ppAccountId="";isSubBrand=!1;path="";platform=tV.UNSPECIFIED;constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.ipn_portal.v3.PortalHeader";static fields=dW.util.newFieldList(()=>[{no:20,name:"user_id",kind:"scalar",T:9},{no:21,name:"organization_id",kind:"scalar",T:9},{no:22,name:"cpg_account_id",kind:"scalar",T:9},{no:23,name:"pp_account_id",kind:"scalar",T:9},{no:24,name:"is_sub_brand",kind:"scalar",T:8},{no:40,name:"path",kind:"scalar",T:9},{no:50,name:"platform",kind:"enum",T:dW.getEnumType(tV)}]);static fromBinary(e,t){return new dX().fromBinary(e,t)}static fromJson(e,t){return new dX().fromJson(e,t)}static fromJsonString(e,t){return new dX().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(dX,e,t)}}class dK extends cK{type="";id="";constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.common.v1.URI";static fields=dW.util.newFieldList(()=>[{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:9}]);static fromBinary(e,t){return new dK().fromBinary(e,t)}static fromJson(e,t){return new dK().fromJson(e,t)}static fromJsonString(e,t){return new dK().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(dK,e,t)}}class dH extends cK{millis=c9.zero;constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.common.v1.Timestamp";static fields=dW.util.newFieldList(()=>[{no:10,name:"millis",kind:"scalar",T:3}]);static fromBinary(e,t){return new dH().fromBinary(e,t)}static fromJson(e,t){return new dH().fromJson(e,t)}static fromJsonString(e,t){return new dH().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(dH,e,t)}}(eB=tG||(tG={}))[eB.UNSPECIFIED=0]="UNSPECIFIED",eB[eB.PROD=1]="PROD",eB[eB.STAGING=2]="STAGING",eB[eB.DEV=3]="DEV",eB[eB.TEST=4]="TEST",dW.util.setEnumType(tG,"ibotta.tracking.common.v1.Environment",[{no:0,name:"ENVIRONMENT_UNSPECIFIED"},{no:1,name:"ENVIRONMENT_PROD"},{no:2,name:"ENVIRONMENT_STAGING"},{no:3,name:"ENVIRONMENT_DEV"},{no:4,name:"ENVIRONMENT_TEST"}]);class dZ extends cK{eventUri;eventAt;environment=tG.UNSPECIFIED;agent="";revision="";zoneId="";ip="";constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.common.v1.EventHeader";static fields=dW.util.newFieldList(()=>[{no:1,name:"event_uri",kind:"message",T:dK},{no:2,name:"event_at",kind:"message",T:dH},{no:3,name:"environment",kind:"enum",T:dW.getEnumType(tG)},{no:10,name:"agent",kind:"scalar",T:9},{no:20,name:"revision",kind:"scalar",T:9},{no:30,name:"zone_id",kind:"scalar",T:9},{no:100,name:"ip",kind:"scalar",T:9}]);static fromBinary(e,t){return new dZ().fromBinary(e,t)}static fromJson(e,t){return new dZ().fromJson(e,t)}static fromJsonString(e,t){return new dZ().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(dZ,e,t)}}(eR=tq||(tq={}))[eR.UNSPECIFIED=0]="UNSPECIFIED",eR[eR.IOS=10]="IOS",eR[eR.ANDROID=20]="ANDROID",eR[eR.WEBAPP=30]="WEBAPP",eR[eR.WEB_V2=40]="WEB_V2",eR[eR.KINDLE=50]="KINDLE",eR[eR.BROWSER_EXTENSION=60]="BROWSER_EXTENSION",eR[eR.UNIFIED_ACCOUNT_LINKING=70]="UNIFIED_ACCOUNT_LINKING",eR[eR.BRAZE=80]="BRAZE",eR[eR.CONNECTION_CONTENT=90]="CONNECTION_CONTENT",eR[eR.IPN_PARTNER_PORTAL=100]="IPN_PARTNER_PORTAL",eR[eR.IPN_CLIENT_PORTAL=110]="IPN_CLIENT_PORTAL",eR[eR.IPN_PORTAL=120]="IPN_PORTAL",eR[eR.MARKETING_CONSUMER=130]="MARKETING_CONSUMER",eR[eR.MARKETING_CORPORATE=140]="MARKETING_CORPORATE",dW.util.setEnumType(tq,"ibotta.tracking.common.v1.IbottaPlatform",[{no:0,name:"IBOTTA_PLATFORM_UNSPECIFIED"},{no:10,name:"IBOTTA_PLATFORM_IOS"},{no:20,name:"IBOTTA_PLATFORM_ANDROID"},{no:30,name:"IBOTTA_PLATFORM_WEBAPP"},{no:40,name:"IBOTTA_PLATFORM_WEB_V2"},{no:50,name:"IBOTTA_PLATFORM_KINDLE"},{no:60,name:"IBOTTA_PLATFORM_BROWSER_EXTENSION"},{no:70,name:"IBOTTA_PLATFORM_UNIFIED_ACCOUNT_LINKING"},{no:80,name:"IBOTTA_PLATFORM_BRAZE"},{no:90,name:"IBOTTA_PLATFORM_CONNECTION_CONTENT"},{no:100,name:"IBOTTA_PLATFORM_IPN_PARTNER_PORTAL"},{no:110,name:"IBOTTA_PLATFORM_IPN_CLIENT_PORTAL"},{no:120,name:"IBOTTA_PLATFORM_IPN_PORTAL"},{no:130,name:"IBOTTA_PLATFORM_MARKETING_CONSUMER"},{no:140,name:"IBOTTA_PLATFORM_MARKETING_CORPORATE"}]);class dz extends cK{lat=0;lng=0;horizontalAccuracyMeters=0;constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.common.v1.Location";static fields=dW.util.newFieldList(()=>[{no:10,name:"lat",kind:"scalar",T:1},{no:20,name:"lng",kind:"scalar",T:1},{no:30,name:"horizontal_accuracy_meters",kind:"scalar",T:1}]);static fromBinary(e,t){return new dz().fromBinary(e,t)}static fromJson(e,t){return new dz().fromJson(e,t)}static fromJsonString(e,t){return new dz().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(dz,e,t)}}class dQ extends cK{eventId="";trackedAt;userId="";earlyIdentifier="";appVersion="";platform=tq.UNSPECIFIED;osName="";osVersion="";deviceId="";
1deviceAdvertiserId="";deviceModel="";globalSessionId="";location;constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.common.v1.TrackingHeader";static fields=dW.util.newFieldList(()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:10,name:"tracked_at",kind:"message",T:dH},{no:20,name:"user_id",kind:"scalar",T:9},{no:30,name:"early_identifier",kind:"scalar",T:9},{no:40,name:"app_version",kind:"scalar",T:9},{no:50,name:"platform",kind:"enum",T:dW.getEnumType(tq)},{no:60,name:"os_name",kind:"scalar",T:9},{no:70,name:"os_version",kind:"scalar",T:9},{no:80,name:"device_id",kind:"scalar",T:9},{no:90,name:"device_advertiser_id",kind:"scalar",T:9},{no:100,name:"device_model",kind:"scalar",T:9},{no:120,name:"global_session_id",kind:"scalar",T:9},{no:130,name:"location",kind:"message",T:dz}]);static fromBinary(e,t){return new dQ().fromBinary(e,t)}static fromJson(e,t){return new dQ().fromJson(e,t)}static fromJsonString(e,t){return new dQ().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(dQ,e,t)}}class d0 extends cK{eventHeader;trackingHeader;portalHeader;requestType="";requestAmount="";requestComment="";requestItemType="";requestItemId="";constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.ipn_portal.v3.PortalClientRequest";static fields=dW.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:dZ},{no:2,name:"tracking_header",kind:"message",T:dQ},{no:3,name:"portal_header",kind:"message",T:dX},{no:20,name:"request_type",kind:"scalar",T:9},{no:21,name:"request_amount",kind:"scalar",T:9},{no:22,name:"request_comment",kind:"scalar",T:9},{no:23,name:"request_item_type",kind:"scalar",T:9},{no:24,name:"request_item_id",kind:"scalar",T:9}]);static fromBinary(e,t){return new d0().fromBinary(e,t)}static fromJson(e,t){return new d0().fromJson(e,t)}static fromJsonString(e,t){return new d0().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(d0,e,t)}}class d1 extends cK{eventHeader;trackingHeader;portalHeader;pageName="";itemType="";itemTypeId="";subItemType="";subItemTypeId="";constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.ipn_portal.v3.PortalPageViewed";static fields=dW.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:dZ},{no:2,name:"tracking_header",kind:"message",T:dQ},{no:3,name:"portal_header",kind:"message",T:dX},{no:30,name:"page_name",kind:"scalar",T:9},{no:50,name:"item_type",kind:"scalar",T:9},{no:60,name:"item_type_id",kind:"scalar",T:9},{no:70,name:"sub_item_type",kind:"scalar",T:9},{no:80,name:"sub_item_type_id",kind:"scalar",T:9}]);static fromBinary(e,t){return new d1().fromBinary(e,t)}static fromJson(e,t){return new d1().fromJson(e,t)}static fromJsonString(e,t){return new d1().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(d1,e,t)}}class d2 extends cK{eventHeader;trackingHeader;portalHeader;pageName="";constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.ipn_portal.v3.PortalSessionStarted";static fields=dW.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:dZ},{no:2,name:"tracking_header",kind:"message",T:dQ},{no:3,name:"portal_header",kind:"message",T:dX},{no:30,name:"page_name",kind:"scalar",T:9}]);static fromBinary(e,t){return new d2().fromBinary(e,t)}static fromJson(e,t){return new d2().fromJson(e,t)}static fromJsonString(e,t){return new d2().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(d2,e,t)}}class d3 extends cK{eventHeader;trackingHeader;portalHeader;contractId="";parentAuthId="";subbrandAuthId="";status="";constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.ipn_portal.v3.PortalSubbrandMapping";static fields=dW.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:dZ},{no:2,name:"tracking_header",kind:"message",T:dQ},{no:3,name:"portal_header",kind:"message",T:dX},{no:20,name:"contract_id",kind:"scalar",T:9},{no:21,name:"parent_auth_id",kind:"scalar",T:9},{no:22,name:"subbrand_auth_id",kind:"scalar",T:9},{no:23,name:"status",kind:"scalar",T:9}]);static fromBinary(e,t){return new d3().fromBinary(e,t)}static fromJson(e,t){return new d3().fromJson(e,t)}static fromJsonString(e,t){return new d3().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(d3,e,t)}}class d4 extends cK{eventHeader;trackingHeader;portalHeader;pageName="";constructor(e){super(),dW.util.initPartial(e,this)}static runtime=dW;static typeName="ibotta.tracking.ipn_portal.v3.SessionStarted";static fields=dW.util.newFieldList(()=>[{no:1,name:"event_header",kind:"message",T:dZ},{no:2,name:"tracking_header",kind:"message",T:dQ},{no:3,name:"portal_header",kind:"message",T:dX},{no:30,name:"page_name",kind:"scalar",T:9}]);static fromBinary(e,t){return new d4().fromBinary(e,t)}static fromJson(e,t){return new d4().fromJson(e,t)}static fromJsonString(e,t){return new d4().fromJsonString(e,t)}static equals(e,t){return dW.util.equals(d4,e,t)}}let d6=re({}).extend({}),d9=d6.extend({page_name:n4(),item_type:n4().optional(),item_type_id:n4().optional(),sub_item_type:n4().optional(),sub_item_type_id:n4().optional()}),d8=d6.extend({request_type:n4(),request_amount:n4().optional(),request_comment:n4().optional(),request_item_type:n4().optional(),request_item_id:n4().optional()}),d7=re({name:n4(),index:n6()}),d5=re({currency:ra(e7),micros:n9()}),fe=re({reward:rt([re({value:n6(),case:rr("percent")}
1),re({value:d5,case:rr("amount")}),re({case:n7(),value:n7().optional()})])}),ft=re({sessionId:n4(),actionId:n4().optional()}),fn=re({type:n4(),id:n4()}),fr=re({campaign:n4().optional(),content:n4().optional(),medium:n4().optional(),source:n4().optional()}),fi=ri(["ibotta","octoshop"]),fa=ri(["claimed","unclaimed","attribution_lost"]),fs=ri(["unspecified","ios","android","web_mobile","web_desktop"]),fo=ri(["website_logout","unauth_trigger","bex_token_timeout"]),fl=ri(["button","row_click","swipe","filter","sort"]),fu=re({millis:n9()}),fc=re({}),fd=fc.extend({duration:n6()}),ff=fc.extend({bannerId:n4(),screenName:n4(),context:n4(),listIndex:n6(),retailerId:n4().optional(),categoryId:n4().optional(),module:d7.optional()}),fm=fc.extend({offerId:n4(),screenName:n4(),context:n4(),moduleId:n4(),listIndex:n6(),isFeatured:n8(),isSponsored:n8(),categoryId:n4().optional(),retailerId:n4().optional(),bonusId:n4().optional(),term:n4().optional(),module:d7.optional(),offer:fe.optional(),search:ft.optional()}),fp=fc.extend({screenName:n4(),context:n4().optional(),item:fn.optional(),networkCode:n4().optional(),errorMessage:n4().optional()}),fh=fc.extend({browserType:n4(),extensionName:fi.optional(),prevAffiliationStatus:fa.optional(),affiliationStatus:fa.optional(),prevAttrClaimedEventId:n4(),retailerId:n4(),offerId:n4(),attrClaimedEventId:n4(),type:n4(),claimedAt:fu.optional()}),fg=fc.extend({offerId:n4(),retailerId:n4().optional(),screenName:n4(),listIndex:n6(),moduleId:n4().optional(),launchId:n4().optional(),url:n4().optional(),context:n4(),isFeatured:n8(),isSponsored:n8(),module:d7.optional(),reward:fe.optional(),search:ft.optional()}),fT=fc.extend({browserType:n4(),extensionName:fi.optional()}),fy=fc.extend({logoutActionType:fo.optional()}),fI=fc.extend({search:ft,context:n4().optional(),screenName:n4().optional(),retailerId:n4().optional(),term:n4(),searchText:n4(),searchType:n4().optional()}),fN=fc.extend({search:ft,module:d7.optional(),listIndex:n6(),offerId:n4().optional(),bonusId:n4().optional(),retailerId:n4().optional(),context:n4().optional(),screenName:n4().optional(),term:n4(),filterNames:n5(n4()).optional(),searchOutcome:n4().optional()}),fE=fc.extend({referralCode:n4().optional(),registrationContext:fs,utm:fr.optional()}),fk=fE.extend({errorMessage:n4()}),fb=fc.extend({textDisplayed:n4(),offerId:n4(),offer:fe,retailerId:n4(),gmrEnabled:n8().optional(),segmentId:n4().optional()}),f_=fc.extend({retailerId:n4().optional(),url:n4(),launchId:n4().optional(),isHeuristic:n8().optional(),cartValue:n6().optional(),gmrEnabled:n8().optional(),segmentId:n4().optional()}),fw=fc.extend({productId:n4(),retailerId:n4().optional(),foundProductId:n4(),foundRetailerId:n4().optional(),trackingSupportedRetailer:n8(),isRelatedProduct:n8()}),fv=fc.extend({interactionType:fl,interactionName:n4(),context:n4().optional(),screenName:n4(),retailerId:n4().optional(),categoryId:n4().optional(),state:n4().optional(),item:fn.optional(),bonusId:n4().optional(),listIndex:n6().optional(),module:d7.optional()}),fO=rt([re({type:rr("SessionStarted")}),re({type:rr("SessionEnded"),data:fd}),re({type:rr("BannerClicked"),data:ff}),re({type:rr("BannerViewed"),data:ff}),re({type:rr("OfferClicked"),data:fm}),re({type:rr("OfferUnlocked"),data:fm}),re({type:rr("OfferViewed"),data:fm}),re({type:rr("PageViewed"),data:fp}),re({type:rr("AttributionClaimed"),data:fh}),re({type:rr("AffiliateOfferActivated"),data:fg}),re({type:rr("BexLoggedIn"),data:fT}),re({type:rr("BexInstalled")}),re({type:rr("BexLoggedOut"),data:fy}),re({type:rr("SearchSubmitted"),data:fI}),re({type:rr("SearchResultReturned"),data:fN}),re({type:rr("RegistrationStarted"),data:fE}),re({type:rr("RegistrationFailed"),data:fk}),re({type:rr("RegistrationCompleted"),data:fE}),re({type:rr("BexCheckoutDetected"),data:f_}),re({type:rr("PCAnalyzeFoundProduct"),data:fw}),re({type:rr("InteractionPerformed"),data:fv}),re({type:rr("PortalSessionStarted"),data:d6}),re({type:rr("PortalPageViewed"),data:d9}),re({type:rr("PortalClientRequest"),data:d8}),re({type:rr("AffiliateBannerShown"),data:fb})]),fS={SESSION_STARTED:"SessionStarted",SESSION_ENDED:"SessionEnded",BANNER_CLICKED:"BannerClicked",BANNER_VIEWED:"BannerViewed",OFFER_CLICKED:"OfferClicked",OFFER_UNLOCKED:"OfferUnlocked",OFFER_VIEWED:"OfferViewed",PAGE_VIEWED:"PageViewed",ATTRIBUTION_CLAIMED:"AttributionClaimed",AFFILIATE_OFFER_ACTIVATED:"AffiliateOfferActivated",BEX_LOGGED_IN:"BexLoggedIn",BEX_INSTALLED:"BexInstalled",BEX_LOGGED_OUT:"BexLoggedOut",SEARCH_SUBMITTED:"SearchSubmitted",SEARCH_RESULT_RETURNED:"SearchResultReturned",REGISTRATION_STARTED:"RegistrationStarted",REGISTRATION_FAILED:"RegistrationFailed",REGISTRATION_COMPLETED:"RegistrationCompleted",AFFILIATE_BANNER_SHOWN:"AffiliateBannerShown",BEX_CHECKOUT_DETECTED:"BexCheckoutDetected",PC_ANALYZE_FOUND_PRODUCT:"PCAnalyzeFoundProduct",INTERACTION_PERFORMED:"InteractionPerformed"};re({userId:rn().args().returns(rs(n4())),organizationId:rn().args().returns(rs(n4())),cpgAccountId:rn().args().returns(rs(n4())),isSubBrand:rn().args().returns(rs(n8())),portalApplication:rn().args().returns(rs(ra(tV))),path:rn().args().returns(rs(n4()))});
1var fA=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}l((r=r.apply(e,t||[])).next())})};let fF=()=>fA(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the user id for your user. See @ibotta/web-tracking README for more information.")}),fD=()=>fA(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the organization id. See @ibotta/web-tracking README for more information.")}),fB=()=>fA(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the account id. See @ibotta/web-tracking README for more information.")}),fR=()=>fA(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch whether the user is a subbrand user. See @ibotta/web-tracking README for more information")}),fP=()=>fA(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the Portal Application. See @ibotta/web-tracking README for more information.")}),fU=()=>fA(void 0,void 0,void 0,function*(){throw Error("You must provide a method to fetch the path. See @ibotta/web-tracking README for more information.")});function fx(e){switch(e){case"ibotta":return eM.IBOTTA;case"octoshop":return eM.OCTOSHOP;default:return eM.UNSPECIFIED}}function fL(e){switch(e){case"claimed":return e$.CLAIMED;case"unclaimed":return e$.UNCLAIMED;case"attribution_lost":return e$.ATTRIBUTION_LOST;default:return e$.UNSPECIFIED}}function fC(e){switch(e){case"ios":return ta.IOS;case"android":return ta.ANDROID;case"web_mobile":return ta.WEB_MOBILE;case"web_desktop":return ta.WEB_DESKTOP;default:return ta.UNSPECIFIED}}var fJ=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}l((r=r.apply(e,t||[])).next())})};function fj(e){return fJ(this,void 0,void 0,function*(){if(!(yield rc.trackingEnabled()))return;let t=fO.safeParse(e);if(!t.success){console.error(`Event validation failed in the track method: ${t.error}`);return}switch(e.type){case"SessionStarted":return function(){var e,t,n,r;return e=this,t=void 0,n=void 0,r=function*(){try{let e=new o7({trackingHeader:yield fM()});return yield f$(e)}catch(e){console.error(`Failed to build and send SessionStarted event: "${e}"`)}},new(n||(n=Promise))(function(i,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}l((r=r.apply(e,t||[])).next())})}();case"SessionEnded":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new o8({trackingHeader:yield fM(),duration:e.duration});return yield f$(t)}catch(e){console.error(`Failed to build and send SessionEnded event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"BannerClicked":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new o$({trackingHeader:yield fM(),bannerId:e.bannerId,screenName:e.screenName,context:e.context,listIndex:e.listIndex,retailerId:e.retailerId,categoryId:e.categoryId,module:e.module});return yield f$(t)}catch(e){console.error(`Failed to build and send BannerClicked event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"BannerViewed":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new oG({trackingHeader:yield fM(),bannerId:e.bannerId,screenName:e.screenName,context:e.context,listIndex:e.listIndex,retailerId:e.retailerId,categoryId:e.categoryId,module:e.module});return yield f$(t)}catch(e){console.error(`Failed to build and send BannerViewed event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"OfferClicked":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new oZ({trackingHeader:yield fM(),offerId:e.offerId,screenName:e.screenName,context:e.context,moduleId:e.moduleId,listIndex:e.listIndex,isFeatured:e.isFeatured,isSponsored:e.isSponsored,categoryId:e.categoryId,retailerId:e.retailerId,bonusId:e.bonusId,term:e.term,module:e.module,offer:e.offer,search:e.search});return yield f$(t)}catch(e){console.error(`Failed to build and send OfferClicked event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"OfferUnlocked":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new oz({trackingHeader:yield fM(),offerId:e.offerId,screenName:e.screenName,context:e.context,moduleId:e.moduleId,listIndex:e.listIndex,isFeatured:e.isFeatured,isSponsored:e.isSponsored,categoryId:e.categoryId,retailerId:e.retailerId,bonusId:e.bonusId,term:e.term,module:e.module,offer:e.offer,search:e.search});return yield f$(t)}catch(e){console.error(`Failed to build and send OfferUnlocked event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"OfferViewed":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new oQ({trackingHeader:yield fM(),offerId:e.offerId,screenName:e.screenName,context:e.context,moduleId:e.moduleId,listIndex:e.listIndex,isFeatured:e.isFeatured,isSponsored:e.isSponsored,categoryId:e.categoryId,retailerId:e.retailerId,bonusId:e.bonusId,term:e.term,module:e.module,offer:e.offer,search:e.search});return yield f$(t)}catch(e){console.error(`Failed to build and send OfferViewed event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"PageViewed":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new o0({trackingHeader:yield fM(),screenName:e.screenName,context:e.context,item:e.item,networkCode:e.networkCode,errorMessage:e.errorMessage});return yield f$(t)}catch(e){console.error(`Failed to build and send PageViewed event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"AttributionClaimed":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new oM({trackingHeader:yield fM(),browserType:e.browserType,extensionName:fx(e.extensionName),prevAff
1iliationStatus:fL(e.prevAffiliationStatus),affiliationStatus:fL(e.affiliationStatus),prevAttrClaimedEventId:e.prevAttrClaimedEventId,retailerId:e.retailerId,offerId:e.offerId,attrClaimedEventId:e.attrClaimedEventId,type:e.type,claimedAt:e.claimedAt});return yield f$(t)}catch(e){console.error(`Failed to build and send AttributionClaimed event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"AffiliateOfferActivated":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new oj({trackingHeader:yield fM(),offerId:e.offerId,screenName:e.screenName,listIndex:e.listIndex,context:e.context,isFeatured:e.isFeatured,isSponsored:e.isSponsored,retailerId:e.retailerId,moduleId:e.moduleId,launchId:e.launchId,url:e.url,module:e.module,reward:e.reward,search:e.search});return yield f$(t)}catch(e){console.error(`Failed to build and send AffiliateOfferActivated event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"BexLoggedIn":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new uy({trackingHeader:yield fM(),browserType:e.browserType,extensionName:fx(e.extensionName)});return yield f$(t)}catch(e){console.error(`Failed to build and send BexLoggedIn event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"BexInstalled":return function(){var e,t,n,r;return e=this,t=void 0,n=void 0,r=function*(){try{let e=new uT({trackingHeader:yield fM()});return yield f$(e)}catch(e){console.error(`Failed to build and send BexInstalled event: "${e}"`)}},new(n||(n=Promise))(function(i,a){function s(e){try{l(r.next(e))}catch(e){a(e)}}function o(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,o)}l((r=r.apply(e,t||[])).next())})}();case"BexLoggedOut":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new uI({trackingHeader:yield fM(),logoutActionType:function(e){switch(e){case"website_logout":return tB.WEBSITE_LOGOUT;case"unauth_trigger":return tB.UNAUTH_TRIGGER;case"bex_token_timeout":return tB.IFRAME_TIMEOUT;default:return tB.UNSPECIFIED}}(e.logoutActionType)});return yield f$(t)}catch(e){console.error(`Failed to build and send BexLoggedOut event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"SearchSubmitted":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new o9({trackingHeader:yield fM(),search:e.search,context:e.context,screenName:e.screenName,retailerId:e.retailerId,term:e.term,searchText:e.searchText,searchType:e.searchType});return yield f$(t)}catch(e){console.error(`Failed to build and send SearchSubmitted event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"SearchResultReturned":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new o6({trackingHeader:yield fM(),search:e.search,module:e.module,listIndex:e.listIndex,offerId:e.offerId,bonusId:e.bonusId,retailerId:e.retailerId,context:e.context,screenName:e.screenName,term:e.term,filterNames:e.filterNames,searchOutcome:e.searchOutcome});return yield f$(t)}catch(e){console.error(`Failed to build and send SearchResultReturned event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"RegistrationStarted":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new cj({trackingHeader:yield fM(),referralCode:e.referralCode,registrationContext:fC(e.registrationContext),utm:e.utm});return yield f$(t)}catch(e){console.error(`Failed to build and send RegistrationStarted event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"RegistrationFailed":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new cJ({trackingHeader:yield fM(),referralCode:e.referralCode,registrationContext:fC(e.registrationContext),utm:e.utm,errorMessage:e.errorMessage});return yield f$(t)}catch(e){console.error(`Failed to build and send RegistrationFailed event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"RegistrationCompleted":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new cC({trackingHeader:yield fM(),referralCode:e.referralCode,registrationContext:fC(e.registrationContext),utm:e.utm});return yield f$(t)}catch(e){console.error(`Failed to build and send RegistrationCompleted event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"BexCheckoutDetected":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new ug({trackingHeader:yield fM(),retailerId:e.retailerId,url:e.url,launchId:e.launchId,isHeuristic:e.isHeuristic,cartValue:e.cartValue,gmrEnabled:e.gmrEnabled,segmentId:e.segmentId});return yield f$(t)}catch(e){console.error(`Failed to build and send BexCheckoutDetected event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"AffiliateBannerShown":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new uh({trackingHeader:yield fM(),textDisplayed:e.textDisplayed,offerId:e.offerId,offer:e.offer,retailerId:e.retailerId,gmrEnabled:e.gmrEnabled,segmentId:e.segmentId});return yield f$(t)}catch(e){console.error(`Failed to build and send AffiliateBannerShown event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"PCAnalyzeFoundProduct":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new uN({trackingHeader:yield fM(),productId:e.productId,retailerId:e.retailerId,foundProductId:e.foundProductId,foundRetailerId:e.foundRetailerId,trackingSupportedRetailer:e.trackingSupportedRetailer,isRelatedProduct:e.isRelatedProduct});return yield f$(t)}catch(e){console.error(`Failed to build and send PCAnalyzeFoundProduct event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"InteractionPerformed":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new oH({trackingHeader:yield fM(),interactionType:function(e){switch(e){case"button":return e5.BUTTON;case"row_click":return e5.ROW_CLICK;case"swipe":return e5.SWIPE;case"filter":return e5.FILTER;case"sort":return e5.SORT;default:return e5.UNSPECIFIED}}(e.interactionType),interactionName:e.interactionName,context:e.context,screenName:e.screenName,retailerId:e.retailerId,categoryId:e.categoryId,state:e.state,item:e.item,bonusId:e.bonusId,listIndex:e.listIndex,module:e.module});return yield f$(t)}catch(e){console.error(`Failed to build and send InteractionPerformed event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"PortalSessionStarted":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let e=new d2({trackingHeader:yield fM(),portalHeader:yield fV()});return yield f$(e)}catch(e){console.error(`Failed to build and send PortalSessionStarted event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"PortalPageViewed":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new d1({trackingHeader:yield fM(),portalHeader:yield fV(),pageName:e.page_name,itemType:e.item_type,itemTypeId:e.item_type_id,subItemType:e.sub_item_type,subItemTypeId:e.sub_item_type_id});return yield f$(t)}catch(e){console.error(`Failed to build and send PortalSessionStarted event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);case"PortalClientRequest":return function(e){var t,n,r,i;return t=this,n=void 0,r=void 0,i=function*(){try{let t=new d0({trackingHeader:yield fM(),portalHeader:yield fV(),requestType:e.request_type,requestAmount:e.request_amount,requestComment:e.request_comment,requestItemType:e.request_item_type,requestItemId:e.request_item_id});return yield f$(t)}catch(e){console.error(`Failed to build and send PortalClientRequest event: "${e}"`)}},new(r||(r=Promise))(function(e,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function o(e){try{l(i.throw(e))}catch(e){a(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof r?n:new r(function(e){e(n)})).then(s,o)}l((i=i.apply(t,n||[])).next())})}(e.data);default:console.error(`Received unknown event: ${e}
1. Valid events are: ${Object.values(fS)}`)}})}function fM(){return fJ(this,void 0,void 0,function*(){let[e,t,n,r,i,a,s,o,l]=yield Promise.all([rc.appVersion().catch(e=>{throw`Failed to get appVersion tracking header: ${e}`}),rc.deviceId().catch(e=>{throw`Failed to get deviceId for tracking header: ${e}`}),rc.deviceModel().catch(e=>{throw`Failed to get deviceModel for tracking header: ${e}`}),rc.earlyIdentifier().catch(e=>{throw`Failed to get earlyIdentifier for tracking header: ${e}`}),rc.osName().catch(e=>{throw`Failed to get osName for tracking header: ${e}`}),rc.osVersion().catch(e=>{throw`Failed to get osVersion for tracking header: ${e}`}),rc.userId().catch(e=>{throw`Failed to get userId for tracking header: ${e}`}),(function(){return fJ(this,void 0,void 0,function*(){let e=yield rc.platform();switch(e){case"web_v2":return e8.WEB_V2;case"browser_extension":return e8.BROWSER_EXTENSION;case"portal":return e8.IPN_PORTAL;case"marketing_consumer":return e8.MARKETING_CONSUMER;case"marketing_corporate":return e8.MARKETING_CORPORATE;default:console.error(`Found an incorrect platform (${e}) while building tracking header. Double check the platform method in your tracking config.`);return}})})().catch(e=>{throw`Failed to get platform for tracking header: ${e}`}),rc.globalSessionId().catch(e=>{throw`Failed to get globalSessionId for tracking header: ${e}`})]),u=new iF({millis:BigInt(Date.now())});return new ar({globalSessionId:l,appVersion:e,deviceId:t,deviceModel:n,earlyIdentifier:s?"":r,osName:i,osVersion:a,platform:o,eventId:ah(),trackedAt:u,userId:s})})}function f$(e){return fJ(this,void 0,void 0,function*(){let t=new iA({messages:[sk.pack(e)]}).toBinary(),n=a$.enc(t),r=yield rc.gatewayUrl(),i=yield fetch(r,{method:"POST",body:JSON.stringify({message:n})});return yield i.json()})}function fV(){return fJ(this,void 0,void 0,function*(){let[e,t,n,r,i,a]=yield Promise.all([fF().catch(e=>{throw`Failed to get userId for tracking header: ${e}`}),fD().catch(e=>{throw`Failed to get organizationId for tracking header: ${e}`}),fB().catch(e=>{throw`Failed to get cpgAccountId for tracking header: ${e}`}),fR().catch(e=>{throw`Failed to get isSubBrand for tracking header: ${e}`}),fP().catch(e=>{throw`Failed to get portal application for tracking header: ${e}`}),fU().catch(e=>{throw`Failed to get path for tracking header: ${e}`})]);return new dX({userId:e,organizationId:t,cpgAccountId:n,isSubBrand:r,platform:i,path:a})})}},98007:function(e,t,n){e=n.nmd(e);var r,i,a,s,o,l,u,c,d,f,m,p="__lodash_hash_undefined__",h="[object Arguments]",g="[object Function]",T="[object Object]",y=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,N={};N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N[h]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object Boolean]"]=N["[object DataView]"]=N["[object Date]"]=N["[object Error]"]=N[g]=N["[object Map]"]=N["[object Number]"]=N[T]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object WeakMap]"]=!1;var E="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,k="object"==typeof self&&self&&self.Object===Object&&self,b=E||k||Function("return this")(),_=t&&!t.nodeType&&t,w=_&&e&&!e.nodeType&&e,v=w&&w.exports===_,O=v&&E.process,S=function(){try{var e=w&&w.require&&w.require("util").types;if(e)return e;return O&&O.binding&&O.binding("util")}catch(e){}}(),A=S&&S.isTypedArray,F=Array.prototype,D=Function.prototype,B=Object.prototype,R=b["__core-js_shared__"],P=D.toString,U=B.hasOwnProperty,x=(u=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",L=B.toString,C=P.call(Object),J=RegExp("^"+P.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=v?b.Buffer:void 0,M=b.Symbol,$=b.Uint8Array,V=j?j.allocUnsafe:void 0,G=(c=Object.getPrototypeOf,d=Object,function(e){return c(d(e))}),q=Object.create,Y=B.propertyIsEnumerable,W=F.splice,X=M?M.toStringTag:void 0,K=function(){try{var e=em(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),H=j?j.isBuffer:void 0,Z=Math.max,z=Date.now,Q=em(b,"Map"),ee=em(Object,"create"),et=function(){function e(){}return function(t){if(!ew(t))return{};if(q)return q(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function en(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function er(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ei(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ea(e){var t=this.__data__=new er(e);this.size=t.size}
1function es(e,t,n){(void 0===n||ey(e[t],n))&&(void 0!==n||t in e)||el(e,t,n)}function eo(e,t){for(var n=e.length;n--;)if(ey(e[n][0],t))return n;return -1}function el(e,t,n){"__proto__"==t&&K?K(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}en.prototype.clear=function(){this.__data__=ee?ee(null):{},this.size=0},en.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},en.prototype.get=function(e){var t=this.__data__;if(ee){var n=t[e];return n===p?void 0:n}return U.call(t,e)?t[e]:void 0},en.prototype.has=function(e){var t=this.__data__;return ee?void 0!==t[e]:U.call(t,e)},en.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ee&&void 0===t?p:t,this},er.prototype.clear=function(){this.__data__=[],this.size=0},er.prototype.delete=function(e){var t=this.__data__,n=eo(t,e);return!(n<0)&&(n==t.length-1?t.pop():W.call(t,n,1),--this.size,!0)},er.prototype.get=function(e){var t=this.__data__,n=eo(t,e);return n<0?void 0:t[n][1]},er.prototype.has=function(e){return eo(this.__data__,e)>-1},er.prototype.set=function(e,t){var n=this.__data__,r=eo(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ei.prototype.clear=function(){this.size=0,this.__data__={hash:new en,map:new(Q||er),string:new en}},ei.prototype.delete=function(e){var t=ef(this,e).delete(e);return this.size-=t?1:0,t},ei.prototype.get=function(e){return ef(this,e).get(e)},ei.prototype.has=function(e){return ef(this,e).has(e)},ei.prototype.set=function(e,t){var n=ef(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ea.prototype.clear=function(){this.__data__=new er,this.size=0},ea.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ea.prototype.get=function(e){return this.__data__.get(e)},ea.prototype.has=function(e){return this.__data__.has(e)},ea.prototype.set=function(e,t){var n=this.__data__;if(n instanceof er){var r=n.__data__;if(!Q||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ei(r)}return n.set(e,t),this.size=n.size,this};var eu=function(e,t,n){for(var r=-1,i=Object(e),a=n(e),s=a.length;s--;){var o=a[++r];if(!1===t(i[o],o,i))break}return e};function ec(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":X&&X in Object(e)?function(e){var t=U.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var i=L.call(e);return r&&(t?e[X]=n:delete e[X]),i}(e):L.call(e)}function ed(e){return ev(e)&&ec(e)==h}function ef(e,t){var n,r=e.__data__;return("string"==(n=typeof t)||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?r["string"==typeof t?"string":"hash"]:r.map}function em(e,t){var n=null==e?void 0:e[t];return!(!ew(n)||x&&x in n)&&(eb(n)?J:y).test(function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(n))?n:void 0}function ep(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&I.test(e))&&e>-1&&e%1==0&&e<t}function eh(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||B)}function eg(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var eT=(r=K?function(e,t){return K(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:eF,i=0,a=0,function(){var e=z(),t=16-(e-a);if(a=e,t>0){if(++i>=800)return arguments[0]}else i=0;return r.apply(void 0,arguments)});function ey(e,t){return e===t||e!=e&&t!=t}var eI=ed(function(){return arguments}())?ed:function(e){return ev(e)&&U.call(e,"callee")&&!Y.call(e,"callee")},eN=Array.isArray;function eE(e){return null!=e&&e_(e.length)&&!eb(e)}var ek=H||function(){return!1};function eb(e){if(!ew(e))return!1;var t=ec(e);return t==g||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function e_(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function ew(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ev(e){return null!=e&&"object"==typeof e}var eO=A?function(e){return A(e)}:function(e){return ev(e)&&e_(e.length)&&!!N[ec(e)]};function eS(e){return eE(e)?function(e,t){var n=eN(e),r=!n&&eI(e),i=!n&&!r&&ek(e),a=!n&&!r&&!i&&eO(e),s=n||r||i||a,o=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=o.length;for(var u in e)(t||U.call(e,u))&&!(s&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ep(u,l)))&&o.push(u);return o}(e,!0):function(e){if(!ew(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=eh(e),n=[];for(var r in e)"constructor"==r&&(t||!U.call(e,r))||n.push(r);return n}(e)}var eA=(f=function(e,t,n){!function e(t,n,r,i,a){t!==n&&eu(n,function(s,o){if(a||(a=new ea),ew(s))(function(e,t,n,r,i,a,s){var o=eg(e,n),l=eg(t,n),u=s.get(l);if(u){es(e,n,u);return}var c=a?a(o,l,n+"",e,t,s):void 0,d=void 0===c;if(d){var f,m,p,h=eN(l),g=!h&&ek(l),y=!h&&!g&&eO(l);c=l,h||g||y?eN(o)?c=o:ev(o)&&eE(o)?c=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(o):g?(d=!1,c=function(e,t){if(t)return e.slice();var n=e.length,r=V?V(n):new e.constructor(n);return e.copy(r),r}(l,!0)):y?(d=!1,new $(m=new(f=l.buffer).constructor(f.byteLength)).set(new $(f)),p=m,c=new l.constructor(p,l.byteOffset,l.length)):c=[]:function(e){if(!ev(e)||ec(e)!=T)return!1;var t=G(e);
1if(null===t)return!0;var n=U.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&P.call(n)==C}(l)||eI(l)?(c=o,eI(o)?c=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=void 0;void 0===l&&(l=e[o]),i?el(n,o,l):function(e,t,n){var r=e[t];U.call(e,t)&&ey(r,n)&&(void 0!==n||t in e)||el(e,t,n)}(n,o,l)}return n}(o,eS(o)):(!ew(o)||eb(o))&&(c="function"!=typeof l.constructor||eh(l)?{}:et(G(l)))):d=!1}d&&(s.set(l,c),i(c,l,r,a,s),s.delete(l)),es(e,n,c)})(t,n,o,r,e,i,a);else{var l=i?i(eg(t,o),s,o+"",t,n,a):void 0;void 0===l&&(l=s),es(t,o,l)}},eS)}(e,t,n)},eT((s=m=function(e,t){var n=-1,r=t.length,i=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(i=f.length>3&&"function"==typeof i?(r--,i):void 0,a&&function(e,t,n){if(!ew(n))return!1;var r=typeof t;return("number"==r?!!(eE(n)&&ep(t,n.length)):"string"==r&&(t in n))&&ey(n[t],e)}(t[0],t[1],a)&&(i=r<3?void 0:i,r=1),e=Object(e);++n<r;){var s=t[n];s&&f(e,s,n,i)}return e},o=void 0,l=eF,o=Z(void 0===o?s.length-1:o,0),function(){for(var e=arguments,t=-1,n=Z(e.length-o,0),r=Array(n);++t<n;)r[t]=e[o+t];t=-1;for(var i=Array(o+1);++t<o;)i[t]=e[t];return i[o]=l(r),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(s,this,i)}),m+""));function eF(e){return e}e.exports=eA},74859:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(19566)},19566:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function a(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var l=[],u=!1,c=-1;function d(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&f())}function f(){if(!u){var e=o(d);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c<t;)r&&r[c].run();c=-1,t=l.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||u||o(f)},m.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var a=n[e]={exports:{}},s=!0;try{t[e](a,a.exports,r),s=!1}finally{s&&delete n[e]}return a.exports}r.ab="//";var i=r(229);e.exports=i}()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.