@dcl-regenesislabs/mobile-hub 1.0.3 → 1.0.4-26164306526.commit-934c661

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
16
16
  missingProperty: ${m},
17
17
  depsCount: ${p},
18
18
  deps: ${h}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[p,h]=s(f);u(f,p),c(f,h)}};function s({schema:f}){const p={},h={};for(const m in f){if(m==="__proto__")continue;const v=Array.isArray(f[m])?p:h;v[m]=f[m]}return[p,h]}function u(f,p=f.schema){const{gen:h,data:m,it:v}=f;if(Object.keys(p).length===0)return;const T=h.let("missing");for(const C in p){const N=p[C];if(N.length===0)continue;const E=(0,n.propertyInData)(h,m,C,v.opts.ownProperties);f.setParams({property:C,depsCount:N.length,deps:N.join(", ")}),v.allErrors?h.if(E,()=>{for(const R of N)(0,n.checkReportMissingProp)(f,R)}):(h.if((0,a._)`${E} && (${(0,n.checkMissingProp)(f,N,T)})`),(0,n.reportMissingProp)(f,T),h.else())}}e.validatePropertyDeps=u;function c(f,p=f.schema){const{gen:h,data:m,keyword:v,it:T}=f,C=h.name("valid");for(const N in p)(0,t.alwaysValidSchema)(T,p[N])||(h.if((0,n.propertyInData)(h,m,N,T.opts.ownProperties),()=>{const E=f.subschema({keyword:v,schemaProp:N},C);f.mergeValidEvaluated(E,C)},()=>h.var(C,!0)),f.ok(C))}e.validateSchemaDeps=c,e.default=i})(um)),um}var rd={},aS;function Hq(){if(aS)return rd;aS=1,Object.defineProperty(rd,"__esModule",{value:!0});const e=Pt(),a=Wt(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:s,schema:u,data:c,it:f}=i;if((0,a.alwaysValidSchema)(f,u))return;const p=s.name("valid");s.forIn("key",c,h=>{i.setParams({propertyName:h}),i.subschema({keyword:"propertyNames",data:h,dataTypes:["string"],propertyName:h,compositeRule:!0},p),s.if((0,e.not)(p),()=>{i.error(!0),f.allErrors||s.break()})}),i.ok(p)}};return rd.default=n,rd}var nd={},iS;function IM(){if(iS)return nd;iS=1,Object.defineProperty(nd,"__esModule",{value:!0});const e=fa(),a=Pt(),t=ri(),n=Wt(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:u})=>(0,a._)`{additionalProperty: ${u.additionalProperty}}`},code(u){const{gen:c,schema:f,parentSchema:p,data:h,errsCount:m,it:v}=u;if(!m)throw new Error("ajv implementation error");const{allErrors:T,opts:C}=v;if(v.props=!0,C.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(v,f))return;const N=(0,e.allSchemaProperties)(p.properties),E=(0,e.allSchemaProperties)(p.patternProperties);R(),u.ok((0,a._)`${m} === ${t.default.errors}`);function R(){c.forIn("key",h,S=>{!N.length&&!E.length?P(S):c.if(_(S),()=>P(S))})}function _(S){let M;if(N.length>8){const U=(0,n.schemaRefOrVal)(v,p.properties,"properties");M=(0,e.isOwnProperty)(c,U,S)}else N.length?M=(0,a.or)(...N.map(U=>(0,a._)`${S} === ${U}`)):M=a.nil;return E.length&&(M=(0,a.or)(M,...E.map(U=>(0,a._)`${(0,e.usePattern)(u,U)}.test(${S})`))),(0,a.not)(M)}function O(S){c.code((0,a._)`delete ${h}[${S}]`)}function P(S){if(C.removeAdditional==="all"||C.removeAdditional&&f===!1){O(S);return}if(f===!1){u.setParams({additionalProperty:S}),u.error(),T||c.break();return}if(typeof f=="object"&&!(0,n.alwaysValidSchema)(v,f)){const M=c.name("valid");C.removeAdditional==="failing"?(y(S,M,!1),c.if((0,a.not)(M),()=>{u.reset(),O(S)})):(y(S,M),T||c.if((0,a.not)(M),()=>c.break()))}}function y(S,M,U){const V={keyword:"additionalProperties",dataProp:S,dataPropType:n.Type.Str};U===!1&&Object.assign(V,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(V,M)}}};return nd.default=s,nd}var ad={},oS;function zq(){if(oS)return ad;oS=1,Object.defineProperty(ad,"__esModule",{value:!0});const e=Al(),a=fa(),t=Wt(),n=IM(),i={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:u,schema:c,parentSchema:f,data:p,it:h}=s;h.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(h,n.default,"additionalProperties"));const m=(0,a.allSchemaProperties)(c);for(const E of m)h.definedProperties.add(E);h.opts.unevaluated&&m.length&&h.props!==!0&&(h.props=t.mergeEvaluated.props(u,(0,t.toHash)(m),h.props));const v=m.filter(E=>!(0,t.alwaysValidSchema)(h,c[E]));if(v.length===0)return;const T=u.name("valid");for(const E of v)C(E)?N(E):(u.if((0,a.propertyInData)(u,p,E,h.opts.ownProperties)),N(E),h.allErrors||u.else().var(T,!0),u.endIf()),s.it.definedProperties.add(E),s.ok(T);function C(E){return h.opts.useDefaults&&!h.compositeRule&&c[E].default!==void 0}function N(E){s.subschema({keyword:"properties",schemaProp:E,dataProp:E},T)}}};return ad.default=i,ad}var id={},sS;function Wq(){if(sS)return id;sS=1,Object.defineProperty(id,"__esModule",{value:!0});const e=fa(),a=Pt(),t=Wt(),n=Wt(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:u,schema:c,data:f,parentSchema:p,it:h}=s,{opts:m}=h,v=(0,e.allSchemaProperties)(c),T=v.filter(P=>(0,t.alwaysValidSchema)(h,c[P]));if(v.length===0||T.length===v.length&&(!h.opts.unevaluated||h.props===!0))return;const C=m.strictSchema&&!m.allowMatchingProperties&&p.properties,N=u.name("valid");h.props!==!0&&!(h.props instanceof a.Name)&&(h.props=(0,n.evaluatedPropsToName)(u,h.props));const{props:E}=h;R();function R(){for(const P of v)C&&_(P),h.allErrors?O(P):(u.var(N,!0),O(P),u.if(N))}function _(P){for(const y in C)new RegExp(P).test(y)&&(0,t.checkStrictMode)(h,`property ${y} matches pattern ${P} (use allowMatchingProperties)`)}function O(P){u.forIn("key",f,y=>{u.if((0,a._)`${(0,e.usePattern)(s,P)}.test(${y})`,()=>{const S=T.includes(P);S||s.subschema({keyword:"patternProperties",schemaProp:P,dataProp:y,dataPropType:n.Type.Str},N),h.opts.unevaluated&&E!==!0?u.assign((0,a._)`${E}[${y}]`,!0):!S&&!h.allErrors&&u.if((0,a.not)(N),()=>u.break())})})}}};return id.default=i,id}var od={},uS;function Gq(){if(uS)return od;uS=1,Object.defineProperty(od,"__esModule",{value:!0});const e=Wt(),a={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:n,schema:i,it:s}=t;if((0,e.alwaysValidSchema)(s,i)){t.fail();return}const u=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),t.failResult(u,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};return od.default=a,od}var sd={},lS;function Kq(){if(lS)return sd;lS=1,Object.defineProperty(sd,"__esModule",{value:!0});const a={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fa().validateUnion,error:{message:"must match a schema in anyOf"}};return sd.default=a,sd}var ud={},cS;function Yq(){if(cS)return ud;cS=1,Object.defineProperty(ud,"__esModule",{value:!0});const e=Pt(),a=Wt(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:s,schema:u,parentSchema:c,it:f}=i;if(!Array.isArray(u))throw new Error("ajv implementation error");if(f.opts.discriminator&&c.discriminator)return;const p=u,h=s.let("valid",!1),m=s.let("passing",null),v=s.name("_valid");i.setParams({passing:m}),s.block(T),i.result(h,()=>i.reset(),()=>i.error(!0));function T(){p.forEach((C,N)=>{let E;(0,a.alwaysValidSchema)(f,C)?s.var(v,!0):E=i.subschema({keyword:"oneOf",schemaProp:N,compositeRule:!0},v),N>0&&s.if((0,e._)`${v} && ${h}`).assign(h,!1).assign(m,(0,e._)`[${m}, ${N}]`).else(),s.if(v,()=>{s.assign(h,!0),s.assign(m,N),E&&i.mergeEvaluated(E,e.Name)})})}}};return ud.default=n,ud}var ld={},dS;function Xq(){if(dS)return ld;dS=1,Object.defineProperty(ld,"__esModule",{value:!0});const e=Wt(),a={keyword:"allOf",schemaType:"array",code(t){const{gen:n,schema:i,it:s}=t;if(!Array.isArray(i))throw new Error("ajv implementation error");const u=n.name("valid");i.forEach((c,f)=>{if((0,e.alwaysValidSchema)(s,c))return;const p=t.subschema({keyword:"allOf",schemaProp:f},u);t.ok(u),t.mergeEvaluated(p)})}};return ld.default=a,ld}var cd={},fS;function Jq(){if(fS)return cd;fS=1,Object.defineProperty(cd,"__esModule",{value:!0});const e=Pt(),a=Wt(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:u,parentSchema:c,it:f}=s;c.then===void 0&&c.else===void 0&&(0,a.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const p=i(f,"then"),h=i(f,"else");if(!p&&!h)return;const m=u.let("valid",!0),v=u.name("_valid");if(T(),s.reset(),p&&h){const N=u.let("ifClause");s.setParams({ifClause:N}),u.if(v,C("then",N),C("else",N))}else p?u.if(v,C("then")):u.if((0,e.not)(v),C("else"));s.pass(m,()=>s.error(!0));function T(){const N=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},v);s.mergeEvaluated(N)}function C(N,E){return()=>{const R=s.subschema({keyword:N},v);u.assign(m,v),s.mergeValidEvaluated(R,m),E?u.assign(E,(0,e._)`${N}`):s.setParams({ifClause:N})}}}};function i(s,u){const c=s.schema[u];return c!==void 0&&!(0,a.alwaysValidSchema)(s,c)}return cd.default=n,cd}var dd={},pS;function Qq(){if(pS)return dd;pS=1,Object.defineProperty(dd,"__esModule",{value:!0});const e=Wt(),a={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${t}" without "if" is ignored`)}};return dd.default=a,dd}var mS;function xq(){if(mS)return Zc;mS=1,Object.defineProperty(Zc,"__esModule",{value:!0});const e=NM(),a=Bq(),t=OM(),n=Uq(),i=Fq(),s=Vq(),u=Hq(),c=IM(),f=zq(),p=Wq(),h=Gq(),m=Kq(),v=Yq(),T=Xq(),C=Jq(),N=Qq();function E(R=!1){const _=[h.default,m.default,v.default,T.default,C.default,N.default,u.default,c.default,s.default,f.default,p.default];return R?_.push(a.default,n.default):_.push(e.default,t.default),_.push(i.default),_}return Zc.default=E,Zc}var fd={},pd={},hS;function Zq(){if(hS)return pd;hS=1,Object.defineProperty(pd,"__esModule",{value:!0});const e=Pt(),t={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:s,data:u,$data:c,schema:f,schemaCode:p,it:h}=n,{opts:m,errSchemaPath:v,schemaEnv:T,self:C}=h;if(!m.validateFormats)return;c?N():E();function N(){const R=s.scopeValue("formats",{ref:C.formats,code:m.code.formats}),_=s.const("fDef",(0,e._)`${R}[${p}]`),O=s.let("fType"),P=s.let("format");s.if((0,e._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>s.assign(O,(0,e._)`${_}.type || "string"`).assign(P,(0,e._)`${_}.validate`),()=>s.assign(O,(0,e._)`"string"`).assign(P,_)),n.fail$data((0,e.or)(y(),S()));function y(){return m.strictSchema===!1?e.nil:(0,e._)`${p} && !${P}`}function S(){const M=T.$async?(0,e._)`(${_}.async ? await ${P}(${u}) : ${P}(${u}))`:(0,e._)`${P}(${u})`,U=(0,e._)`(typeof ${P} == "function" ? ${M} : ${P}.test(${u}))`;return(0,e._)`${P} && ${P} !== true && ${O} === ${i} && !${U}`}}function E(){const R=C.formats[f];if(!R){y();return}if(R===!0)return;const[_,O,P]=S(R);_===i&&n.pass(M());function y(){if(m.strictSchema===!1){C.logger.warn(U());return}throw new Error(U());function U(){return`unknown format "${f}" ignored in schema at path "${v}"`}}function S(U){const V=U instanceof RegExp?(0,e.regexpCode)(U):m.code.formats?(0,e._)`${m.code.formats}${(0,e.getProperty)(f)}`:void 0,Q=s.scopeValue("formats",{key:f,ref:U,code:V});return typeof U=="object"&&!(U instanceof RegExp)?[U.type||"string",U.validate,(0,e._)`${Q}.validate`]:["string",U,Q]}function M(){if(typeof R=="object"&&!(R instanceof RegExp)&&R.async){if(!T.$async)throw new Error("async format in sync schema");return(0,e._)`await ${P}(${u})`}return typeof O=="function"?(0,e._)`${P}(${u})`:(0,e._)`${P}.test(${u})`}}}};return pd.default=t,pd}var yS;function $q(){if(yS)return fd;yS=1,Object.defineProperty(fd,"__esModule",{value:!0});const a=[Zq().default];return fd.default=a,fd}var so={},gS;function e1(){return gS||(gS=1,Object.defineProperty(so,"__esModule",{value:!0}),so.contentVocabulary=so.metadataVocabulary=void 0,so.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],so.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),so}var vS;function t1(){if(vS)return kc;vS=1,Object.defineProperty(kc,"__esModule",{value:!0});const e=Pq(),a=qq(),t=xq(),n=$q(),i=e1(),s=[e.default,a.default,(0,t.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return kc.default=s,kc}var md={},Iu={},_S;function r1(){if(_S)return Iu;_S=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.DiscrError=void 0;var e;return(function(a){a.Tag="tag",a.Mapping="mapping"})(e||(Iu.DiscrError=e={})),Iu}var ES;function n1(){if(ES)return md;ES=1,Object.defineProperty(md,"__esModule",{value:!0});const e=Pt(),a=r1(),t=aE(),n=cf(),i=Wt(),u={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:f}})=>c===a.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:c,tag:f,tagName:p}})=>(0,e._)`{error: ${c}, tag: ${p}, tagValue: ${f}}`},code(c){const{gen:f,data:p,schema:h,parentSchema:m,it:v}=c,{oneOf:T}=m;if(!v.opts.discriminator)throw new Error("discriminator: requires discriminator option");const C=h.propertyName;if(typeof C!="string")throw new Error("discriminator: requires propertyName");if(h.mapping)throw new Error("discriminator: mapping is not supported");if(!T)throw new Error("discriminator: requires oneOf keyword");const N=f.let("valid",!1),E=f.const("tag",(0,e._)`${p}${(0,e.getProperty)(C)}`);f.if((0,e._)`typeof ${E} == "string"`,()=>R(),()=>c.error(!1,{discrError:a.DiscrError.Tag,tag:E,tagName:C})),c.ok(N);function R(){const P=O();f.if(!1);for(const y in P)f.elseIf((0,e._)`${E} === ${y}`),f.assign(N,_(P[y]));f.else(),c.error(!1,{discrError:a.DiscrError.Mapping,tag:E,tagName:C}),f.endIf()}function _(P){const y=f.name("valid"),S=c.subschema({keyword:"oneOf",schemaProp:P},y);return c.mergeEvaluated(S,e.Name),y}function O(){var P;const y={},S=U(m);let M=!0;for(let te=0;te<T.length;te++){let he=T[te];if(he?.$ref&&!(0,i.schemaHasRulesButRef)(he,v.self.RULES)){const Ie=he.$ref;if(he=t.resolveRef.call(v.self,v.schemaEnv.root,v.baseId,Ie),he instanceof t.SchemaEnv&&(he=he.schema),he===void 0)throw new n.default(v.opts.uriResolver,v.baseId,Ie)}const be=(P=he?.properties)===null||P===void 0?void 0:P[C];if(typeof be!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${C}"`);M=M&&(S||U(he)),V(be,te)}if(!M)throw new Error(`discriminator: "${C}" must be required`);return y;function U({required:te}){return Array.isArray(te)&&te.includes(C)}function V(te,he){if(te.const)Q(te.const,he);else if(te.enum)for(const be of te.enum)Q(be,he);else throw new Error(`discriminator: "properties/${C}" must have "const" or "enum"`)}function Q(te,he){if(typeof te!="string"||te in y)throw new Error(`discriminator: "${C}" values must be unique strings`);y[te]=he}}}};return md.default=u,md}const a1="http://json-schema.org/draft-07/schema#",i1="http://json-schema.org/draft-07/schema#",o1="Core schema meta-schema",s1={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},u1=["object","boolean"],l1={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},c1={$schema:a1,$id:i1,title:o1,definitions:s1,type:u1,properties:l1,default:!0};var bS;function df(){return bS||(bS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.MissingRefError=a.ValidationError=a.CodeGen=a.Name=a.nil=a.stringify=a.str=a._=a.KeywordCxt=a.Ajv=void 0;const t=wq(),n=t1(),i=n1(),s=c1,u=["/properties"],c="http://json-schema.org/draft-07/schema";class f extends t.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(C=>this.addVocabulary(C)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const C=this.opts.$data?this.$dataMetaSchema(s,u):s;this.addMetaSchema(C,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}a.Ajv=f,e.exports=a=f,e.exports.Ajv=f,Object.defineProperty(a,"__esModule",{value:!0}),a.default=f;var p=Al();Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var h=Pt();Object.defineProperty(a,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var m=nE();Object.defineProperty(a,"ValidationError",{enumerable:!0,get:function(){return m.default}});var v=cf();Object.defineProperty(a,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})(Cc,Cc.exports)),Cc.exports}var Gu={exports:{}},Ku={exports:{}},Yu={exports:{}},hd={exports:{}},wS;function d1(){return wS||(wS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),n=["undefined","string","number","object","function","boolean","symbol"];function i(){return{keyword:"typeof",schemaType:["string","array"],code(s){const{data:u,schema:c,schemaValue:f}=s;s.fail(typeof c=="string"?(0,t._)`typeof ${u} != ${c}`:(0,t._)`${f}.indexOf(typeof ${u}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}a.default=i,e.exports=i})(hd,hd.exports)),hd.exports}var SS=Yu.exports,TS;function f1(){return TS||(TS=1,(function(e,a){var t=SS&&SS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(d1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(Yu,Yu.exports)),Yu.exports}var Xu={exports:{}},yd={exports:{}},PS;function p1(){return PS||(PS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer<"u"&&(t.Buffer=Buffer),typeof Promise<"u"&&(t.Promise=Promise);const n=Object.assign(i,{CONSTRUCTORS:t});function i(){return{keyword:"instanceof",schemaType:["string","array"],compile(u){if(typeof u=="string"){const c=s(u);return f=>f instanceof c}if(Array.isArray(u)){const c=u.map(s);return f=>{for(const p of c)if(f instanceof p)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function s(u){const c=t[u];if(c)return c;throw new Error(`invalid "instanceof" keyword value ${u}`)}a.default=n,e.exports=n})(yd,yd.exports)),yd.exports}var AS=Xu.exports,NS;function m1(){return NS||(NS=1,(function(e,a){var t=AS&&AS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(p1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(Xu,Xu.exports)),Xu.exports}var Ju={exports:{}},Qu={exports:{}},gd={},OS;function RM(){if(OS)return gd;OS=1,Object.defineProperty(gd,"__esModule",{value:!0});function e(a){return()=>({keyword:a,type:"number",schemaType:"array",macro:function([n,i]){return t(n,i),a==="range"?{minimum:n,maximum:i}:{exclusiveMinimum:n,exclusiveMaximum:i}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function t(n,i){if(n>i||a==="exclusiveRange"&&n===i)throw new Error("There are no numbers in range")}}return gd.default=e,gd}var IS=Qu.exports,RS;function h1(){return RS||(RS=1,(function(e,a){var t=IS&&IS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const i=(0,t(RM()).default)("range");a.default=i,e.exports=i})(Qu,Qu.exports)),Qu.exports}var CS=Ju.exports,MS;function y1(){return MS||(MS=1,(function(e,a){var t=CS&&CS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(h1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(Ju,Ju.exports)),Ju.exports}var xu={exports:{}},Zu={exports:{}},jS=Zu.exports,LS;function g1(){return LS||(LS=1,(function(e,a){var t=jS&&jS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const i=(0,t(RM()).default)("exclusiveRange");a.default=i,e.exports=i})(Zu,Zu.exports)),Zu.exports}var DS=xu.exports,kS;function v1(){return kS||(kS=1,(function(e,a){var t=DS&&DS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(g1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(xu,xu.exports)),xu.exports}var $u={exports:{}},vd={exports:{}},uo={},qS;function ff(){if(qS)return uo;qS=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.usePattern=uo.metaSchemaRef=void 0;const e=Pt(),a="http://json-schema.org/schema";function t({defaultMeta:i}={}){return i===!1?{}:{$ref:i||a}}uo.metaSchemaRef=t;function n({gen:i,it:{opts:s}},u,c=s.unicodeRegExp?"u":""){const f=new RegExp(u,c);return i.scopeValue("pattern",{key:f.toString(),ref:f,code:(0,e._)`new RegExp(${u}, ${c})`})}return uo.usePattern=n,uo}var BS;function _1(){return BS||(BS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),n=ff(),i={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},s=/^\/(.*)\/([gimuy]*)$/;function u(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(c){const{data:f,schema:p}=c,h=m(p);c.pass((0,t._)`${h}.test(${f})`);function m(v){if(typeof v=="object")return(0,n.usePattern)(c,v.pattern,v.flags);const T=s.exec(v);if(T)return(0,n.usePattern)(c,T[1],T[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},i]}}}a.default=u,e.exports=u})(vd,vd.exports)),vd.exports}var US=$u.exports,FS;function E1(){return FS||(FS=1,(function(e,a){var t=US&&US.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(_1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})($u,$u.exports)),$u.exports}var el={exports:{}},_d={exports:{}},VS;function b1(){return VS||(VS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),n={trimStart:f=>f.trimStart(),trimEnd:f=>f.trimEnd(),trimLeft:f=>f.trimStart(),trimRight:f=>f.trimEnd(),trim:f=>f.trim(),toLowerCase:f=>f.toLowerCase(),toUpperCase:f=>f.toUpperCase(),toEnumCase:(f,p)=>p?.hash[c(f)]||f},i=Object.assign(s,{transform:n});function s(){return{keyword:"transform",schemaType:"array",before:"enum",code(f){const{gen:p,data:h,schema:m,parentSchema:v,it:T}=f,{parentData:C,parentDataProperty:N}=T,E=m;if(!E.length)return;let R;if(E.includes("toEnumCase")){const O=u(v);R=p.scopeValue("obj",{ref:O,code:(0,t.stringify)(O)})}p.if((0,t._)`typeof ${h} == "string" && ${C} !== undefined`,()=>{p.assign(h,_(E.slice())),p.assign((0,t._)`${C}[${N}]`,h)});function _(O){if(!O.length)return h;const P=O.pop();if(!(P in n))throw new Error(`transform: unknown transformation ${P}`);const y=p.scopeValue("func",{ref:n[P],code:(0,t._)`require("ajv-keywords/dist/definitions/transform").transform${(0,t.getProperty)(P)}`}),S=_(O);return R&&P==="toEnumCase"?(0,t._)`${y}(${S}, ${R})`:(0,t._)`${y}(${S})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}function u(f){const p={hash:{}};if(!f.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const h of f.enum){if(typeof h!="string")continue;const m=c(h);if(p.hash[m])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');p.hash[m]=h}return p}function c(f){return f.toLowerCase()}a.default=i,e.exports=i})(_d,_d.exports)),_d.exports}var HS=el.exports,zS;function w1(){return zS||(zS=1,(function(e,a){var t=HS&&HS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(b1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(el,el.exports)),el.exports}var tl={exports:{}},Ed={exports:{}},WS;function S1(){return WS||(WS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=rE(),n=["number","integer","string","boolean","null"];function i(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(u,c){const f=s(u,c);return p=>{if(p.length<=1)return!0;for(let h=0;h<u.length;h++){const m=u[h];if(f[h]){const v={};for(const T of p){if(!T||typeof T!="object")continue;let C=T[m];if(!(C&&typeof C=="object")){if(typeof C=="string"&&(C='"'+C),v[C])return!1;v[C]=!0}}}else for(let v=p.length;v--;){const T=p[v];if(!(!T||typeof T!="object"))for(let C=v;C--;){const N=p[C];if(N&&typeof N=="object"&&t(T[m],N[m]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}a.default=i;function s(u,c){return u.map(f=>{var p,h,m;const v=(m=(h=(p=c.items)===null||p===void 0?void 0:p.properties)===null||h===void 0?void 0:h[f])===null||m===void 0?void 0:m.type;return Array.isArray(v)?!v.includes("object")&&!v.includes("array"):n.includes(v)})}e.exports=i})(Ed,Ed.exports)),Ed.exports}var GS=tl.exports,KS;function T1(){return KS||(KS=1,(function(e,a){var t=GS&&GS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(S1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(tl,tl.exports)),tl.exports}var rl={exports:{}},bd={exports:{}},YS;function P1(){return YS||(YS=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});function t(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(n,i){if(!n)return!0;const s=Object.keys(i.properties);return s.length===0?!0:{required:s}},dependencies:["properties"]}}a.default=t,e.exports=t})(bd,bd.exports)),bd.exports}var XS=rl.exports,JS;function A1(){return JS||(JS=1,(function(e,a){var t=XS&&XS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(P1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(rl,rl.exports)),rl.exports}var nl={exports:{}},al={exports:{}},wd={},QS;function CM(){if(QS)return wd;QS=1,Object.defineProperty(wd,"__esModule",{value:!0});function e(a){return()=>({keyword:a,type:"object",schemaType:"array",macro(t){return t.length===0?!0:t.length===1?{required:t}:{[a==="anyRequired"?"anyOf":"oneOf"]:t.map(i=>({required:[i]}))}},metaSchema:{type:"array",items:{type:"string"}}})}return wd.default=e,wd}var xS=al.exports,ZS;function N1(){return ZS||(ZS=1,(function(e,a){var t=xS&&xS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const i=(0,t(CM()).default)("anyRequired");a.default=i,e.exports=i})(al,al.exports)),al.exports}var $S=nl.exports,eT;function O1(){return eT||(eT=1,(function(e,a){var t=$S&&$S.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(N1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(nl,nl.exports)),nl.exports}var il={exports:{}},ol={exports:{}},tT=ol.exports,rT;function I1(){return rT||(rT=1,(function(e,a){var t=tT&&tT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const i=(0,t(CM()).default)("oneRequired");a.default=i,e.exports=i})(ol,ol.exports)),ol.exports}var nT=il.exports,aT;function R1(){return aT||(aT=1,(function(e,a){var t=nT&&nT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(I1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(il,il.exports)),il.exports}var sl={exports:{}},Sd={exports:{}},iT;function C1(){return iT||(iT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),n=ff(),i={message:({params:{missingPattern:u}})=>(0,t.str)`should have property matching pattern '${u}'`,params:({params:{missingPattern:u}})=>(0,t._)`{missingPattern: ${u}}`};function s(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:i,code(u){const{gen:c,schema:f,data:p}=u;if(f.length===0)return;const h=c.let("valid",!0);for(const v of f)m(v);function m(v){const T=c.let("matched",!1);c.forIn("key",p,C=>{c.assign(T,(0,t._)`${(0,n.usePattern)(u,v)}.test(${C})`),c.if(T,()=>c.break())}),u.setParams({missingPattern:v}),c.assign(h,(0,t.and)(h,T)),u.pass(h)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}a.default=s,e.exports=s})(Sd,Sd.exports)),Sd.exports}var oT=sl.exports,sT;function M1(){return sT||(sT=1,(function(e,a){var t=oT&&oT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(C1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(sl,sl.exports)),sl.exports}var ul={exports:{}},Td={exports:{}},uT;function j1(){return uT||(uT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});function t(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(n){return n.length===0?!0:n.length===1?{not:{required:n}}:{not:{anyOf:n.map(i=>({required:[i]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}a.default=t,e.exports=t})(Td,Td.exports)),Td.exports}var lT=ul.exports,cT;function L1(){return cT||(cT=1,(function(e,a){var t=lT&&lT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(j1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(ul,ul.exports)),ul.exports}var ll={exports:{}},Pd={exports:{}},dT;function D1(){return dT||(dT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=ff();function n(u){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(c){const f=[];for(const p in c)f.push(i(p,c[p]));return{allOf:f}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,t.metaSchemaRef)(u)}}}a.default=n;function i(u,c){const f=u.split("/"),p={};let h=p;for(let m=1;m<f.length;m++){let v=f[m];const T=m===f.length-1;v=s(v);const C=h.properties={};let N;if(/[0-9]+/.test(v)){let E=+v;for(N=h.items=[],h.type=["object","array"];E--;)N.push({})}else h.type="object";h=T?c:{},C[v]=h,N&&N.push(h)}return p}function s(u){return u.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Pd,Pd.exports)),Pd.exports}var fT=ll.exports,pT;function k1(){return pT||(pT=1,(function(e,a){var t=fT&&fT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(D1()),i=(s,u)=>s.addKeyword((0,n.default)(u));a.default=i,e.exports=i})(ll,ll.exports)),ll.exports}var cl={exports:{}},Ad={exports:{}},mT;function q1(){return mT||(mT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt();function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(s){const{schema:u,data:c}=s,f=u.map(h=>(0,t._)`(${p(h)}) === undefined`);s.fail((0,t.or)(...f));function p(h){if(h==="")throw new Error("empty JSON pointer not allowed");const m=h.split("/");let v=c;const T=m.map((C,N)=>N?v=(0,t._)`${v}${(0,t.getProperty)(i(C))}`:v);return(0,t.and)(...T)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}a.default=n;function i(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(Ad,Ad.exports)),Ad.exports}var hT=cl.exports,yT;function B1(){return yT||(yT=1,(function(e,a){var t=hT&&hT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(q1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(cl,cl.exports)),cl.exports}var dl={exports:{}},Nd={exports:{}},gT;function U1(){return gT||(gT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t={},n={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:h=>{var m;const v=(m=h?.max)!==null&&m!==void 0?m:2;return()=>Math.floor(Math.random()*v)},seq:h=>{var m;const v=(m=h?.name)!==null&&m!==void 0?m:"";return t[v]||(t[v]=0),()=>t[v]++}},i=Object.assign(s,{DEFAULTS:n});function s(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(h,m,v){if(!v.opts.useDefaults||v.compositeRule)return()=>!0;const T={};for(const N in h)T[N]=u(h[N]);const C=v.opts.useDefaults==="empty";return N=>{for(const E in h)(N[E]===void 0||C&&(N[E]===null||N[E]===""))&&(N[E]=T[E]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function u(h){return typeof h=="object"?c(h):f(h)}function c({func:h,args:m}){const v=n[h];return p(h,v),v(m)}function f(h=""){const m=n[h];return p(h,m),m()}function p(h,m){if(!m)throw new Error(`invalid "dynamicDefaults" keyword property value: ${h}`)}a.default=i,e.exports=i})(Nd,Nd.exports)),Nd.exports}var vT=dl.exports,_T;function F1(){return _T||(_T=1,(function(e,a){var t=vT&&vT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(U1()),i=s=>s.addKeyword((0,n.default)());a.default=i,e.exports=i})(dl,dl.exports)),dl.exports}var fl={exports:{}},Od={exports:{}},ET;function V1(){return ET||(ET=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=Pt(),n=ff(),i={message:({params:{schemaProp:u}})=>u?(0,t.str)`should match case "${u}" schema`:(0,t.str)`should match default case schema`,params:({params:{schemaProp:u}})=>u?(0,t._)`{failingCase: ${u}}`:(0,t._)`{failingDefault: true}`};function s(u){const c=(0,n.metaSchemaRef)(u);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:i,dependencies:["selectCases"],code(f){const{gen:p,schemaCode:h,parentSchema:m}=f;f.block$data(t.nil,()=>{const v=p.let("valid",!0),T=p.name("_valid"),C=p.const("value",(0,t._)`${h} === null ? "null" : ${h}`);p.if(!1);for(const N in m.selectCases){f.setParams({schemaProp:N}),p.elseIf((0,t._)`"" + ${C} == ${N}`);const E=f.subschema({keyword:"selectCases",schemaProp:N},T);f.mergeEvaluated(E,t.Name),p.assign(v,T)}if(p.else(),m.selectDefault!==void 0){f.setParams({schemaProp:void 0});const N=f.subschema({keyword:"selectDefault"},T);f.mergeEvaluated(N,t.Name),p.assign(v,T)}p.endIf(),f.pass(v)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:c}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:c}]}a.default=s,e.exports=s})(Od,Od.exports)),Od.exports}var bT=fl.exports,wT;function H1(){return wT||(wT=1,(function(e,a){var t=bT&&bT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(V1()),i=(s,u)=>((0,n.default)(u).forEach(c=>s.addKeyword(c)),s);a.default=i,e.exports=i})(fl,fl.exports)),fl.exports}var ST=Ku.exports,TT;function z1(){return TT||(TT=1,(function(e,a){var t=ST&&ST.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(f1()),i=t(m1()),s=t(y1()),u=t(v1()),c=t(E1()),f=t(w1()),p=t(T1()),h=t(A1()),m=t(O1()),v=t(R1()),T=t(M1()),C=t(L1()),N=t(k1()),E=t(B1()),R=t(F1()),_=t(H1()),O={typeof:n.default,instanceof:i.default,range:s.default,exclusiveRange:u.default,regexp:c.default,transform:f.default,uniqueItemProperties:p.default,allRequired:h.default,anyRequired:m.default,oneRequired:v.default,patternRequired:T.default,prohibited:C.default,deepProperties:N.default,deepRequired:E.default,dynamicDefaults:R.default,select:_.default};a.default=O,e.exports=O})(Ku,Ku.exports)),Ku.exports}var PT=Gu.exports,AT;function oE(){return AT||(AT=1,(function(e,a){var t=PT&&PT.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(a,"__esModule",{value:!0});const n=t(z1()),i=(u,c)=>{if(Array.isArray(c)){for(const f of c)s(f)(u);return u}if(c)return s(c)(u),u;for(c in n.default)s(c)(u);return u};i.get=s;function s(u){const c=n.default[u];if(!c)throw new Error("Unknown keyword "+u);return c}a.default=i,e.exports=i,e.exports.default=i})(Gu,Gu.exports)),Gu.exports}var Id={exports:{}},NT;function sE(){return NT||(NT=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0});const t=df(),n=Pt(),i=yl(),s=Al(),u=Pl(),c=ri(),f="errorMessage",p=new t.Name("emUsed"),h={required:"missingProperty",dependencies:"property",dependentRequired:"property"},m=/\$\{[^}]+\}/,v=/\$\{([^}]+)\}/g,T=/^""\s*\+\s*|\s*\+\s*""$/g;function C(E){return{keyword:f,schemaType:["string","object"],post:!0,code(R){const{gen:_,data:O,schema:P,schemaValue:y,it:S}=R;if(S.createErrors===!1)return;const M=P,U=n.strConcat(c.default.instancePath,S.errorPath);_.if(t._`${c.default.errors} > 0`,()=>{if(typeof M=="object"){const[B,D]=Q(M);D&&te(D),B&&he(B),be(V(M))}const F=typeof M=="string"?M:M._;F&&Ie(F),E.keepErrors||we()});function V({properties:F,items:B}){const D={};if(F){D.props={};for(const K in F)D.props[K]=[]}if(B){D.items={};for(let K=0;K<B.length;K++)D.items[K]=[]}return D}function Q(F){let B,D;for(const K in F){if(K==="properties"||K==="items")continue;const ue=F[K];if(typeof ue=="object"){B||(B={});const Re=B[K]={};for(const Pe in ue)Re[Pe]=[]}else D||(D={}),D[K]=[]}return[B,D]}function te(F){const B=_.const("emErrors",t.stringify(F)),D=_.const("templates",le(F,P));_.forOf("err",c.default.vErrors,Pe=>_.if(Ae(Pe,B),()=>_.code(t._`${B}[${Pe}.keyword].push(${Pe})`).assign(t._`${Pe}.${p}`,!0)));const{singleError:K}=E;if(K){const Pe=_.let("message",t._`""`),Be=_.let("paramsErrors",t._`[]`);ue(je=>{_.if(Pe,()=>_.code(t._`${Pe} += ${typeof K=="string"?K:";"}`)),_.code(t._`${Pe} += ${Re(je)}`),_.assign(Be,t._`${Be}.concat(${B}[${je}])`)}),u.reportError(R,{message:Pe,params:t._`{errors: ${Be}}`})}else ue(Pe=>u.reportError(R,{message:Re(Pe),params:t._`{errors: ${B}[${Pe}]}`}));function ue(Pe){_.forIn("key",B,Be=>_.if(t._`${B}[${Be}].length`,()=>Pe(Be)))}function Re(Pe){return t._`${Pe} in ${D} ? ${D}[${Pe}]() : ${y}[${Pe}]`}}function he(F){const B=_.const("emErrors",t.stringify(F)),D=[];for(const Be in F)D.push([Be,le(F[Be],P[Be])]);const K=_.const("templates",_.object(...D)),ue=_.scopeValue("obj",{ref:h,code:t.stringify(h)}),Re=_.let("emPropParams"),Pe=_.let("emParamsErrors");_.forOf("err",c.default.vErrors,Be=>_.if(Ae(Be,B),()=>{_.assign(Re,t._`${ue}[${Be}.keyword]`),_.assign(Pe,t._`${B}[${Be}.keyword][${Be}.params[${Re}]]`),_.if(Pe,()=>_.code(t._`${Pe}.push(${Be})`).assign(t._`${Be}.${p}`,!0))})),_.forIn("key",B,Be=>_.forIn("keyProp",t._`${B}[${Be}]`,je=>{_.assign(Pe,t._`${B}[${Be}][${je}]`),_.if(t._`${Pe}.length`,()=>{const ce=_.const("tmpl",t._`${K}[${Be}] && ${K}[${Be}][${je}]`);u.reportError(R,{message:t._`${ce} ? ${ce}() : ${y}[${Be}][${je}]`,params:t._`{errors: ${Pe}}`})})}))}function be(F){const{props:B,items:D}=F;if(!B&&!D)return;const K=t._`typeof ${O} == "object"`,ue=t._`Array.isArray(${O})`,Re=_.let("emErrors");let Pe,Be;const je=_.let("templates");B&&D?(Pe=_.let("emChildKwd"),_.if(K),_.if(ue,()=>{ce(D,P.items),_.assign(Pe,t.str`items`)},()=>{ce(B,P.properties),_.assign(Pe,t.str`properties`)}),Be=t._`[${Pe}]`):D?(_.if(ue),ce(D,P.items),Be=t._`.items`):B&&(_.if(n.and(K,n.not(ue))),ce(B,P.properties),Be=t._`.properties`),_.forOf("err",c.default.vErrors,fe=>Ne(fe,Re,Oe=>_.code(t._`${Re}[${Oe}].push(${fe})`).assign(t._`${fe}.${p}`,!0))),_.forIn("key",Re,fe=>_.if(t._`${Re}[${fe}].length`,()=>{u.reportError(R,{message:t._`${fe} in ${je} ? ${je}[${fe}]() : ${y}${Be}[${fe}]`,params:t._`{errors: ${Re}[${fe}]}`}),_.assign(t._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,t._`${U} + "/" + ${fe}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),_.endIf();function ce(fe,Oe){_.assign(Re,t.stringify(fe)),_.assign(je,le(fe,Oe))}}function Ie(F){const B=_.const("emErrs",t._`[]`);_.forOf("err",c.default.vErrors,D=>_.if(me(D),()=>_.code(t._`${B}.push(${D})`).assign(t._`${D}.${p}`,!0))),_.if(t._`${B}.length`,()=>u.reportError(R,{message:X(F),params:t._`{errors: ${B}}`}))}function we(){const F=_.const("emErrs",t._`[]`);_.forOf("err",c.default.vErrors,B=>_.if(t._`!${B}.${p}`,()=>_.code(t._`${F}.push(${B})`))),_.assign(c.default.vErrors,F).assign(c.default.errors,t._`${F}.length`)}function Ae(F,B){return n.and(t._`${F}.keyword !== ${f}`,t._`!${F}.${p}`,t._`${F}.instancePath === ${U}`,t._`${F}.keyword in ${B}`,t._`${F}.schemaPath.indexOf(${S.errSchemaPath}) === 0`,t._`/^\\/[^\\/]*$/.test(${F}.schemaPath.slice(${S.errSchemaPath.length}))`)}function Ne(F,B,D){_.if(n.and(t._`${F}.keyword !== ${f}`,t._`!${F}.${p}`,t._`${F}.instancePath.indexOf(${U}) === 0`),()=>{const K=_.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:t._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),ue=_.const("emMatches",t._`${K}.exec(${F}.instancePath.slice(${U}.length))`),Re=_.const("emChild",t._`${ue} && ${ue}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);_.if(t._`${Re} !== undefined && ${Re} in ${B}`,()=>D(Re))})}function me(F){return n.and(t._`${F}.keyword !== ${f}`,t._`!${F}.${p}`,n.or(t._`${F}.instancePath === ${U}`,n.and(t._`${F}.instancePath.indexOf(${U}) === 0`,t._`${F}.instancePath[${U}.length] === "/"`)),t._`${F}.schemaPath.indexOf(${S.errSchemaPath}) === 0`,t._`${F}.schemaPath[${S.errSchemaPath}.length] === "/"`)}function le(F,B){const D=[];for(const K in F){const ue=B[K];m.test(ue)&&D.push([K,L(ue)])}return _.object(...D)}function X(F){return m.test(F)?new i._Code(i.safeStringify(F).replace(v,(B,D)=>`" + JSON.stringify(${s.getData(D,S)}) + "`).replace(T,"")):t.stringify(F)}function L(F){return t._`function(){return ${X(F)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const N=(E,R={})=>{if(!E.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(E.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return E.addKeyword(C(R))};a.default=N,e.exports=N,e.exports.default=N})(Id,Id.exports)),Id.exports}var OT;function We(){if(OT)return $n;OT=1;var e=$n&&$n.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty($n,"__esModule",{value:!0}),$n.validateType=$n.generateLazyValidator=$n.Ajv=void 0;const a=e(df());$n.Ajv=a.default;const t=e(oE()),n=e(sE());function i(u,c){let f=null;const p=(h,m)=>{if(!f){const v=new a.default({$data:!0,allErrors:!0});(0,t.default)(v),(0,n.default)(v,{singleError:!0}),c?.forEach(T=>v.addKeyword(T)),f=v.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(h,m)};return p}$n.generateLazyValidator=i;function s(u,c){return u.validate(c)}return $n.validateType=s,$n}var IT;function W1(){return IT||(IT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=We();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(Zp)),Zp}var lm={},RT;function G1(){return RT||(RT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=We();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(lm)),lm}var CT;function K1(){return CT||(CT=1,(function(e){var a=ao&&ao.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=ao&&ao.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(W1(),e),t(G1(),e)})(ao)),ao}var lo={},cm={},MT;function Y1(){return MT||(MT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=We();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(cm)),cm}var dm={},fm={},jT;function pf(){return jT||(jT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=We();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.EXOTIC="exotic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},i={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function u(h){return n[h]}t.getMaxSupply=u;function c(h){return s[h]}t.getColor=c;function f(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=f;function p(h){return[i[h],s[h]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(fm)),fm}var pm={},LT;function Qo(){return LT||(LT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=We();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(pm)),pm}var mm={},hm={},DT;function uE(){return DT||(DT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=We();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(hm)),hm}var ym={},gm={},kT;function MM(){return kT||(kT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=We();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(gm)),gm}var qT;function lE(){return qT||(qT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=Qo(),t=We(),n=MM();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(ym)),ym}var BT;function cE(){return BT||(BT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=We(),t=uE(),n=lE();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(mm)),mm}var co={},fo={},vm={},_m={},UT;function xo(){return UT||(UT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=We();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(_m)),_m}var FT;function jM(){return FT||(FT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=Qo(),t=xo(),n=We();var i;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(i=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:Object.assign(Object.assign({},i.schema),{nullable:!0})},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=h=>p.test(h)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(vm)),vm}var Em={},VT;function X1(){return VT||(VT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=We(),t=jM();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(Em)),Em}var HT;function J1(){return HT||(HT=1,(function(e){var a=fo&&fo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=fo&&fo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(jM(),e),t(X1(),e)})(fo)),fo}var bm={},wm={},zT;function LM(){return zT||(zT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=We();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(wm)),wm}var Sm={},WT;function DM(){return WT||(WT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=We();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Sm)),Sm}var Tm={},GT;function kM(){return GT||(GT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=We();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(Tm)),Tm}var Pm={},Ru={},KT;function dE(){return KT||(KT=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.displayableProperties=void 0,Ru.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Ru}var Am={},YT;function qM(){return YT||(YT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=We();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(Am)),Am}var Nm={},XT;function BM(){return XT||(XT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=We();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Nm)),Nm}var JT;function Q1(){return JT||(JT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=We(),t=dE(),n=LM(),i=kM(),s=qM(),u=BM(),c=DM();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},creator:{type:"string",nullable:!0,description:"Wallet address of the creator of the scene",pattern:"^(0x[a-fA-F0-9]{40})?$",errorMessage:"Creator must be a valid wallet address"},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:u.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(Pm)),Pm}var QT;function x1(){return QT||(QT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var a=LM();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=DM();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=kM();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=Q1();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=qM();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=BM();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(bm)),bm}var po={},Om={},Im={},xT;function UM(){return xT||(xT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=We();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(Im)),Im}var ZT;function FM(){return ZT||(ZT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=We(),t=UM();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(Om)),Om}var Rm={},$T;function VM(){return $T||($T=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=We();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(Rm)),Rm}var Cm={},eP;function fE(){return eP||(eP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=pf(),t=We();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(Cm)),Cm}var Mm={},mo={},jm={},tP;function Z1(){return tP||(tP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=We();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(jm)),jm}var rP;function HM(){return rP||(rP=1,(function(e){var a=mo&&mo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=mo&&mo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Z1(),e)})(mo)),mo}var Lm={},nP;function pE(){return nP||(nP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const a=We();var t;(function(m){m.SINGLE="single",m.ANY="any",m.MULTIPLE="multiple",m.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(m){m.MAINNET="mainnet",m.BASE_MAINNET="base_mainnet",m.BASE_SEPOLIA="base_sepolia",m.MONAD_MAINNET="monad_mainnet",m.MONAD_TESTNET="monad_testnet",m.APE_MAINNET="ape_mainnet",m.APE_CALDERA="ape_caldera",m.MATIC="matic",m.SEPOLIA="sepolia",m.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},m.validate=(0,a.generateLazyValidator)(m.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var s;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},m.validate=(0,a.generateLazyValidator)(m.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var u;(function(m){m._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(T,C){if(!C||!C.from||!C.to)return!1;let{to:N,from:E}=C;return(typeof E!="bigint"||typeof N!="bigint")&&(E=BigInt(E),N=BigInt(N)),E<=N},errors:!1},m.schema={type:"object",properties:{type:{type:"string",const:t.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},m.validate=(0,a.generateLazyValidator)(m.schema,[m._fromLessThanOrEqualTo])})(u=e.RangeMapping||(e.RangeMapping={}));var c;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},m.validate=(0,a.generateLazyValidator)(m.schema)})(c=e.MultipleMapping||(e.MultipleMapping={}));var f;(function(m){m.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[i.schema,s.schema,u.schema,c.schema]},m.validate=(0,a.generateLazyValidator)(m.schema,[u._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(m){m._isMappingsValid={keyword:"_isMappingsValid",validate:function(T,C){try{h(C)}catch{return!1}return!0},errors:!1},m.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:f.schema}},minProperties:1,required:[],additionalProperties:!1};const v=Object.values(n).reduce((T,C)=>(T[C]=m.innerSchema,T),{});m.schema={type:"object",properties:v,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},m.validate=(0,a.generateLazyValidator)(m.schema,[u._fromLessThanOrEqualTo,m._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(v,T,C){super(v),this.existingMapping=T,this.conflictingMapping=C}}e.AddMappingError=p;function h(m={}){const v={};for(const[y,S]of Object.entries(m)){v[y]={};for(const[M,U]of Object.entries(S))for(const V of U)O(y,M,V)}function T(){return JSON.parse(JSON.stringify(v))}function C(y,S,M){const U=BigInt(y);return U>=BigInt(S)&&U<=BigInt(M)}function N(y,S){switch(S.type){case t.SINGLE:return y.id===S.id;case t.MULTIPLE:return S.ids.includes(y.id);case t.RANGE:return C(y.id,S.from,S.to);default:return!1}}function E(y,S){switch(S.type){case t.SINGLE:return y.ids.includes(S.id);case t.MULTIPLE:return y.ids.some(M=>S.ids.includes(M));case t.RANGE:return y.ids.some(M=>C(M,S.from,S.to));default:return!1}}function R(y,S){switch(S.type){case t.SINGLE:return C(S.id,y.from,y.to);case t.MULTIPLE:return S.ids.some(M=>C(M,y.from,y.to));case t.RANGE:return BigInt(y.from)<=BigInt(S.to)&&BigInt(y.to)>=BigInt(S.from)}}function _(y,S){if(y.type===t.ANY||S.type===t.ANY)return!0;switch(y.type){case t.SINGLE:return N(y,S);case t.MULTIPLE:return E(y,S);case t.RANGE:return R(y,S)}}function O(y,S,M){var U,V;const Q=S.toLowerCase();v[y]=(U=v[y])!==null&&U!==void 0?U:{},v[y][Q]=(V=v[y][Q])!==null&&V!==void 0?V:[];for(const te of v[y][Q])if(_(te,M))throw new p(`Cannot add mapping to contract ${Q} on network ${y} because it overlaps with existing mapping`,te,M);v[y][Q].push(M)}function P(y,S,M){var U;return!((U=v[y])===null||U===void 0)&&U[S]?v[y][S].some(V=>{switch(V.type){case t.SINGLE:return V.id===M;case t.ANY:return!0;case t.MULTIPLE:return V.ids.includes(M);case t.RANGE:return BigInt(M)>=BigInt(V.from)&&BigInt(M)<=BigInt(V.to)}}):!1}return{addMapping:O,getMappings:T,includesNft:P}}e.createMappingsHelper=h})(Lm)),Lm}var aP;function mE(){return aP||(aP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const a=We(),t=HM(),n=pE();e.schema={type:"object",properties:{merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const i={keyword:"_containsHashingKeys",validate:function(c,f){var p;const h=f;return!((p=h?.merkleProof)===null||p===void 0)&&p.hashingKeys?h.merkleProof.hashingKeys.every(m=>h.hasOwnProperty(m)):!1},errors:!1},s=(0,a.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function u(c){return s(c)}e.isThirdParty=u})(Mm)),Mm}var Dm={},km={},ta={},iP;function zM(){if(iP)return ta;iP=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.isBaseEmote=ta.isBaseAvatar=ta.requiredBaseItemProps=ta.baseItemProperties=void 0;const e=FM(),a=VM(),t=dE();ta.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},a.Metrics.schema),{nullable:!0})}),ta.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const u=s.id.split(":"),c=u[1]==="decentraland",f=u[3]==="base-avatars";return u.length===5&&c&&f}ta.isBaseAvatar=n;function i(s){if(!s||!s.id)return!1;const u=s.id.split(":");return u.length===5&&u[1]==="decentraland"&&u[3]==="base-emotes"}return ta.isBaseEmote=i,ta}var oP;function $1(){return oP||(oP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=We(),t=Qo(),n=cE(),i=zM(),s=fE(),u=mE(),c=lE(),f=pE();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const h={keyword:"_isThirdParty",validate:(v,T)=>!v||(0,u.isThirdParty)(T),errors:!1},m={keyword:"_isBaseAvatar",validate:(v,T)=>!v||(0,i.isBaseAvatar)(T),errors:!1};p.validate=(0,a.generateLazyValidator)(p.schema,[h,m,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(km)),km}var sP;function e2(){return sP||(sP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=cE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=$1();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Qo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=MM();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=lE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(Dm)),Dm}var qm={},Bm={},Um={},Fm={},uP;function WM(){return uP||(uP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=We();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Fm)),Fm}var Vm={},lP;function GM(){return lP||(lP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=We(),t=uE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(Vm)),Vm}var Hm={},cP;function KM(){return cP||(cP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const a=We();var t;(function(i){i.Armature="Armature",i.Armature_Prop="Armature_Prop",i.Armature_Other="Armature_Other"})(t=e.ArmatureId||(e.ArmatureId={})),(function(i){i.schema={type:"string",enum:Object.values(i)},i.validate=(0,a.generateLazyValidator)(i.schema)})(t=e.ArmatureId||(e.ArmatureId={}));var n;(function(i){i.schema={type:"object",properties:{animation:{type:"string",minLength:1,errorMessage:"animation must be a non-empty string (GLB clip name)"}},required:["animation"],additionalProperties:!1,errorMessage:{required:{animation:"animation is required (GLB clip name)"}}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.EmoteClip||(e.EmoteClip={})),(function(i){i.schema={type:"object",properties:{loop:{type:"boolean",errorMessage:"startAnimation.loop must be a boolean"},[t.Armature]:Object.assign(Object.assign({},n.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[t.Armature_Prop]:Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:"startAnimation.Armature_Prop must contain valid animation data when provided"}),audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["loop",t.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[t.Armature]:"startAnimation.Armature is required"}}},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.StartAnimation||(e.StartAnimation={})),(function(i){i.schema={type:"object",properties:{title:{type:"string",minLength:1,errorMessage:"outcome.title must be a non-empty string"},loop:{type:"boolean",errorMessage:"outcome.loop must be a boolean"},clips:{type:"object",properties:Object.values(t).reduce((s,u)=>(s[u]=Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:`outcome.clips.${u} must contain valid animation data when provided`}),s),{}),additionalProperties:!0,minProperties:1,errorMessage:"outcome.clips must contain at least one armature animation"},audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["title","loop","clips"],additionalProperties:!1,errorMessage:{required:{title:"outcome.title is required",loop:"outcome.loop is required",clips:"outcome.clips is required"}}},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(Hm)),Hm}var dP;function YM(){return dP||(dP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=WM(),t=We(),n=GM(),i=KM();(function(s){s.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},i.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:i.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:["category","tags","representations","loop"],dependencies:{startAnimation:["randomizeOutcomes","outcomes"],randomizeOutcomes:["startAnimation","outcomes"],outcomes:["startAnimation","randomizeOutcomes"]},additionalProperties:!0},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Um)),Um}var fP;function t2(){return fP||(fP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=XM(),t=We(),n=zM(),i=fE(),s=mE(),u=YM();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.schema.properties),{emoteDataADR74:u.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(h,m)=>!h||(0,a.isThirdParty)(m),errors:!1},p={keyword:"_isBaseEmote",validate:(h,m)=>!h||(0,n.isBaseEmote)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,a.RangeMapping._fromLessThanOrEqualTo,a.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Bm)),Bm}var zm={},pP;function r2(){return pP||(pP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=We();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(zm)),zm}var Wm={},mP;function n2(){return mP||(mP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const a=We();(function(t){t.SIMPLE_OUTCOME="so",t.MULTIPLE_OUTCOME="mo",t.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(Wm)),Wm}var hP;function a2(){return hP||(hP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=t2();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=GM();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=YM();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=KM();Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return i.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return i.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return i.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return i.StartAnimation}});var s=WM();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return s.EmoteCategory}});var u=r2();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return u.EmotePlayMode}});var c=n2();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return c.EmoteOutcomeType}})})(qm)),qm}var yP;function XM(){return yP||(yP=1,(function(e){var a=po&&po.__createBinding||(Object.create?(function(p,h,m,v){v===void 0&&(v=m);var T=Object.getOwnPropertyDescriptor(h,m);(!T||("get"in T?!h.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(p,v,T)}):(function(p,h,m,v){v===void 0&&(v=m),p[v]=h[m]})),t=po&&po.__exportStar||function(p,h){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(h,m)&&a(h,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=FM();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=UM();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=VM();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=uE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=fE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=mE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(pE(),e),t(e2(),e),t(a2(),e)})(po)),po}var Gm={},Km={},gP;function Nl(){return gP||(gP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=We();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(Km)),Km}var vP;function i2(){return vP||(vP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=xo(),t=Nl(),n=We();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Gm)),Gm}var Ym={},Xm={},_P;function JM(){return _P||(_P=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=xo(),t=We();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Xm)),Xm}var EP;function QM(){return EP||(EP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=xo(),t=JM(),n=We();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(Ym)),Ym}var Jm={},bP;function o2(){return bP||(bP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=Nl(),t=We();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Jm)),Jm}var ho={},Qm={},wP;function s2(){return wP||(wP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=Qo(),t=xo(),n=We();var i;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Qm)),Qm}var SP;function u2(){return SP||(SP=1,(function(e){var a=ho&&ho.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=ho&&ho.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(s2(),e)})(ho)),ho}var yo={},xm={},TP;function xM(){return TP||(TP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(a){a.BADGE_GRANTED="badge_granted",a.BID_ACCEPTED="bid_accepted",a.BID_RECEIVED="bid_received",a.EVENTS_STARTED="events_started",a.EVENTS_STARTS_SOON="events_starts_soon",a.EVENT_CREATED="event_created",a.GOVERNANCE_ANNOUNCEMENT="governance_announcement",a.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",a.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",a.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",a.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",a.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",a.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",a.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",a.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",a.GOVERNANCE_TENDER_PASSED="governance_tender_passed",a.GOVERNANCE_WHALE_VOTE="governance_whale_vote",a.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",a.ITEM_SOLD="item_sold",a.ITEM_PUBLISHED="item_published",a.LAND_RENTAL_ENDED="rental_ended",a.LAND_RENTED="rental_started",a.REWARD_ASSIGNED="reward_assignment",a.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",a.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",a.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",a.REWARD_DELAYED="reward_delayed",a.REWARD_IN_PROGRESS="reward_in_progress",a.ROYALTIES_EARNED="royalties_earned",a.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",a.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",a.WORLDS_ACCESS_RESTORED="worlds_access_restored",a.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",a.WORLDS_MISSING_RESOURCES="worlds_missing_resources",a.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",a.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",a.CREDITS_GOAL_COMPLETED="credits_goal_completed",a.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",a.STREAMING_KEY_RESET="streaming_key_reset",a.STREAMING_KEY_REVOKE="streaming_key_revoke",a.STREAMING_KEY_EXPIRED="streaming_key_expired",a.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",a.STREAMING_PLACE_UPDATED="streaming_place_updated",a.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",a.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",a.CREDITS_REMINDER_USAGE="credits_reminder_usage",a.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",a.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",a.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",a.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",a.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",a.COMMUNITY_DELETED="community_deleted",a.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",a.COMMUNITY_RENAMED="community_renamed",a.COMMUNITY_MEMBER_BANNED="community_member_banned",a.COMMUNITY_MEMBER_REMOVED="community_member_removed",a.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",a.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",a.COMMUNITY_INVITE_RECEIVED="community_invite_received",a.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",a.COMMUNITY_POST_ADDED="community_post_added",a.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",a.USER_BANNED_FROM_SCENE="user_banned_from_scene",a.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",a.TRANSFER_RECEIVED="transfer_received"})(e.NotificationType||(e.NotificationType={})),(function(a){a.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(xm)),xm}var Zm={},$m={},PP;function ZM(){return PP||(PP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const a=We(),t=xM(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(t.NotificationType).reduce((s,u)=>(s[u]=n,s),{});(function(s){s.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(t.NotificationType),additionalProperties:!1,properties:i}}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})($m)),$m}var eh={},AP;function $M(){return AP||(AP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(a){a.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(a.schema.pattern);a.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(eh)),eh}var NP;function l2(){return NP||(NP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const a=We(),t=ZM(),n=xo(),i=$M();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(Zm)),Zm}var OP;function c2(){return OP||(OP=1,(function(e){var a=yo&&yo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=yo&&yo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(xM(),e),t(l2(),e),t(ZM(),e)})(yo)),yo}var go={},th={},IP;function mn(){return IP||(IP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(a){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.WEB="web",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service",t.CREDITS_SERVICE="credits-service",t.STREAMING="streaming",t.COMMS="comms",t.REFERRAL="referral",t.COMMUNITY="community",t.CAMERA="camera",t.EVENT="event",t.GOVERNANCE="governance"})(a.Type||(a.Type={})),(function(t){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published",n.TRANSFER_RECEIVED="transfer-received"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment",n.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",n.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",n.WORLDS_ACCESS_RESTORED="worlds_access_restored",n.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",n.WORLDS_MISSING_RESOURCES="worlds_missing_resources"})(t.Worlds||(t.Worlds={})),(function(n){n.LOGGED_IN="logged-in",n.LOGGED_IN_CACHED="logged-in-cached",n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(t.Client||(t.Client={})),(function(n){n.AUTH_IDENTIFY="auth-identify"})(t.Web||(t.Web={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.SocialService={})),(function(n){n.CREDITS_GOAL_COMPLETED="credits-goal-completed",n.COMPLETE_GOALS_REMINDER="complete-goals-reminder",n.CLAIM_CREDITS_REMINDER="claim-credits-reminder",n.DO_NOT_MISS_OUT_REMINDER="do-not-miss-out-reminder",n.USAGE_REMINDER="usage-reminder",n.USAGE_24_HOURS_REMINDER="usage-24-hours-reminder",n.ON_DEMAND_CREDITS_GRANTED="on-demand-credits-granted",n.NEW_SEASON_REMINDER="new-season-reminder"})(t.CreditsService||(t.CreditsService={})),(function(n){n.STREAMING_KEY_RESET="streaming-key-reset",n.STREAMING_KEY_REVOKE="streaming-key-revoke",n.STREAMING_KEY_EXPIRED="streaming-key-expired",n.STREAMING_TIME_EXCEEDED="streaming-time-exceeded",n.STREAMING_PLACE_UPDATED="streaming-place-updated",n.COMMUNITY_STREAMING_ENDED="community-streaming-ended"})(t.Streaming||(t.Streaming={})),(function(n){n.USER_JOINED_ROOM="user-joined-room",n.USER_LEFT_ROOM="user-left-room",n.USER_BANNED_FROM_SCENE="user-banned-from-scene",n.USER_UNBANNED_FROM_SCENE="user-unbanned-from-scene"})(t.Comms||(t.Comms={})),(function(n){n.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",n.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"})(t.Referral||(t.Referral={})),(function(n){n.DELETED="community-deleted",n.DELETED_CONTENT_VIOLATION="community-deleted-content-violation",n.RENAMED="community-renamed",n.MEMBER_BANNED="community-member-banned",n.MEMBER_REMOVED="community-member-removed",n.REQUEST_TO_JOIN_RECEIVED="community-request-to-join-received",n.REQUEST_TO_JOIN_ACCEPTED="community-request-to-join-accepted",n.INVITE_RECEIVED="community-invite-received",n.OWNERSHIP_TRANSFERRED="community-ownership-transferred",n.POST_ADDED="community-post-added",n.VOICE_CHAT_STARTED="community-voice-chat-started"})(t.Community||(t.Community={})),(function(n){n.PHOTO_TAKEN="photo-taken",n.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"})(t.Camera||(t.Camera={})),(function(n){n.EVENT_CREATED="event-created",n.EVENT_STARTS_SOON="event-starts-soon",n.EVENT_STARTED="event-started",n.EVENT_ENDED="event-ended"})(t.Event||(t.Event={})),(function(n){n.PROPOSAL_ENACTED="governance_proposal_enacted",n.COAUTHOR_REQUESTED="governance_coauthor_requested",n.PITCH_PASSED="governance_pitch_passed",n.TENDER_PASSED="governance_tender_passed",n.AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",n.VOTING_ENDED_VOTER="governance_voting_ended_voter",n.NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",n.NEW_COMMENT_ON_PROJECT_UPDATED="governance_new_comment_on_project_update",n.WHALE_VOTE="governance_whale_vote",n.VOTED_ON_BEHALF="governance_voted_on_behalf",n.CLIFF_ENDED="governance_cliff_ended"})(t.Governance||(t.Governance={}))})(a.SubType||(a.SubType={}))})(e.Events||(e.Events={}))})(th)),th}var rh={},RP;function d2(){return RP||(RP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const a=We(),t=mn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},tokenUri:{type:"string",nullable:!0}},required:["senderAddress","receiverAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={}))})(rh)),rh}var nh={},CP;function f2(){return CP||(CP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const a=Nl(),t=We(),n=QM(),i=mn();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:a.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(nh)),nh}var ah={},MP;function p2(){return MP||(MP=1,Object.defineProperty(ah,"__esModule",{value:!0})),ah}var ih={},jP;function m2(){return jP||(jP=1,Object.defineProperty(ih,"__esModule",{value:!0})),ih}var oh={},LP;function h2(){return LP||(LP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const a=We(),t=mn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MARKETPLACE},subType:{type:"string",const:t.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(oh)),oh}var sh={},Cu={},DP;function mf(){if(DP)return Cu;DP=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.createEventSchema=void 0;function e(a,t,n){return{type:"object",properties:{type:{type:"string",const:a},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return Cu.createEventSchema=e,Cu}var kP;function y2(){return kP||(kP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const a=We(),t=mn(),n=mf(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},s={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(sh)),sh}var uh={},qP;function g2(){return qP||(qP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const a=We(),t=mn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BADGE},subType:{type:"string",const:t.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","statusCode","isLods","isWorld","version"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},message:{type:"string",nullable:!0}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creditsGranted:{type:"number",minimum:1},address:{type:"string"},granterAddress:{type:"string"}},required:["creditsGranted","address","granterAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{goalId:{type:"string"},creditsObtained:{type:"number",minimum:0},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},address:{type:"string"}},required:["goalId","creditsObtained","seasonId","weekNumber","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},pendingGoalIds:{type:"array",items:{type:"string"},minItems:1}},required:["address","seasonId","weekNumber","pendingGoalIds"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"},expirationDay:{type:"string"}},required:["address","creditsAmount","expirationDate","expirationDay"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{addresses:{type:"array",items:{type:"string"}},seasonName:{type:"string"},startDate:{type:"string"},endDate:{type:"string"}},required:["addresses","seasonName","startDate","endDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"}},required:["address","creditsAmount","expirationDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1}},required:["address","seasonId","weekNumber"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(uh)),uh}var lh={},BP;function v2(){return BP||(BP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const a=We(),t=mn(),n=mf(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},position:{type:"string"},worldName:{type:"string",nullable:!0},isWorld:{type:"boolean"},url:{type:"string"},address:{type:"string"},image:{type:"string"}},required:["position","isWorld","url","title","description","address","image"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_RESET,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_REVOKE,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(lh)),lh}var ch={},UP;function _2(){return UP||(UP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const a=We(),t=mn();var n;(function(i){i.PRIVATE_MESSAGE="private-message",i.VOICE_CHAT="voice-chat",i.COMMUNITY_VOICE_CHAT="community-voice-chat",i.ISLAND="island",i.SCENE="scene",i.WORLD="world",i.UNKNOWN="unknown"})(n=e.RoomType||(e.RoomType={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{parcel:{type:"string"},sceneId:{type:"string"},userAddress:{type:"string"},realmName:{type:"string"},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)}},required:["parcel","sceneId","userAddress","realmName","isWorld","roomType"]}},required:["type","subType","key","timestamp","metadata"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},realmName:{type:"string"},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)},sceneId:{type:"string",nullable:!0},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0}},required:["isWorld","userAddress","realmName","roomType"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(ch)),ch}var dh={},FP;function E2(){return FP||(FP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const a=We(),t=mn(),n=mf(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},address:{type:"string"},tier:{type:"number",minimum:1},url:{type:"string"},image:{type:"string"},invitedUserAddress:{type:"string"},invitedUsers:{type:"number",minimum:1},rarity:{type:"string",nullable:!0}},required:["address","tier","url","title","description","image","invitedUserAddress"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(dh)),dh}var fh={},VP;function b2(){return VP||(VP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;const a=We(),t=mn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.DELETED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","name","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},ownerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","ownerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.RENAMED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},oldName:{type:"string"},newName:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","oldName","newName","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.MEMBER_BANNED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.MEMBER_REMOVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},memberName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","memberAddress","memberName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.INVITE_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.POST_ADDED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},postId:{type:"string"},authorAddress:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["addressesToNotify","communityId","communityName","thumbnailUrl","postId","authorAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},oldOwnerAddress:{type:"string"},newOwnerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","oldOwnerAddress","newOwnerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.VOICE_CHAT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(fh)),fh}var ph={},HP;function w2(){return HP||(HP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const a=We(),t=mn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"}},required:["userAddress","photoId","isPublic"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.Events.SubType.Camera.PHOTO_TAKEN},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sceneId:{type:"string"},userAddress:{type:"string"},realm:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"},users:{type:"array",items:{type:"object",properties:{address:{type:"string"},isEmoting:{type:"boolean"}},required:["address","isEmoting"],additionalProperties:!1}},placeId:{type:"string",nullable:!0}},required:["userAddress","realm","photoId","isPublic","users"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})(ph)),ph}var mh={},zP;function S2(){return zP||(zP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const a=We(),t=mn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},communityId:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_STARTS_SOON},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},startsAt:{type:"string"},endsAt:{type:"string"},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link","startsAt","endsAt"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},communityId:{type:"string"},communityName:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{communityId:{type:"string",nullable:!0},totalAttendees:{type:"number"}},required:["totalAttendees"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={}))})(mh)),mh}var hh={},WP;function T2(){return WP||(WP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;const a=We(),t=mn(),n=mf(),i={type:"object",properties:{proposalId:{type:"string"},proposalTitle:{type:"string"},title:{type:"string"},description:{type:"string"},link:{type:"string"},address:{type:"string"}},required:["proposalId","proposalTitle","title","description","link","address"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PROPOSAL_ENACTED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.COAUTHOR_REQUESTED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PITCH_PASSED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.TENDER_PASSED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTING_ENDED_VOTER,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.WHALE_VOTE,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTED_ON_BEHALF,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.CLIFF_ENDED,i),s.validate=(0,a.generateLazyValidator)(s.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(hh)),hh}var yh={},GP;function P2(){return GP||(GP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=void 0;const a=Nl(),t=We(),n=mn();(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.DEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},entity:{type:"object",properties:{entityId:{type:"string"},authChain:a.AuthChain.schema},additionalProperties:!0,required:["entityId","authChain"]},contentServerUrls:{type:"array",items:{type:"string"},nullable:!0},force:{type:"boolean",nullable:!0},animation:{type:"string",nullable:!0},lods:{type:"array",items:{type:"string"},nullable:!0}},required:["type","subType","key","timestamp","entity"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},attendee:{type:"string"}},required:["title","description","url","attendee"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),(function(i){i.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","url","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(yh)),yh}var KP;function A2(){return KP||(KP=1,(function(e){var a=go&&go.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=go&&go.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(mn(),e),t(d2(),e),t(f2(),e),t(p2(),e),t(m2(),e),t(h2(),e),t(y2(),e),t(g2(),e),t(v2(),e),t(_2(),e),t(E2(),e),t(b2(),e),t(w2(),e),t(S2(),e),t(T2(),e),t(P2(),e)})(go)),go}var YP;function hE(){return YP||(YP=1,(function(e){var a=co&&co.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=co&&co.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(J1(),e),t(x1(),e),t(XM(),e),t(dE(),e),t(HM(),e),t(i2(),e),t(QM(),e),t(o2(),e),t(u2(),e),t(c2(),e),t(A2(),e)})(co)),co}var XP;function N2(){return XP||(XP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=pf(),t=Qo(),n=cE(),i=We(),s=hE();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(dm)),dm}var JP;function O2(){return JP||(JP=1,(function(e){var a=lo&&lo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=lo&&lo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Y1(),e),t(N2(),e)})(lo)),lo}var QP;function I2(){return QP||(QP=1,(function(e){var a=no&&no.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=no&&no.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(K1(),e),t(O2(),e)})(no)),no}var vo={},gh={},xP;function R2(){return xP||(xP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=We();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(gh)),gh}var vh={},_h={},ZP;function ej(){return ZP||(ZP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=We(),t=ma();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.MATIC_AMOY="Amoy",s.AVALANCHE_MAINNET="Avalanche",s.BINANCE_MAINNET="Binance Smart Chain",s.ARBITRUM_MAINNET="Arbitrum",s.OPTIMISM_MAINNET="Optimism",s.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function i(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(_h)),_h}var Eh={},$P;function pa(){return $P||($P=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=We();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC",t.AVALANCHE="AVALANCHE",t.BSC="BINANCE SMART CHAIN",t.OPTIMISM="OPTIMISM",t.ARBITRUM="ARBITRUM",t.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(Eh)),Eh}var eA;function ma(){return eA||(eA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=We(),t=ej(),n=pa();var i;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI",p[p.MATIC_AMOY=80002]="MATIC_AMOY",p[p.BSC_MAINNET=56]="BSC_MAINNET",p[p.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",p[p.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",p[p.FANTOM_MAINNET=250]="FANTOM_MAINNET",p[p.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=u;function c(p){const h={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(p){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},h);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},h);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},h);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},h);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},h)}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(vh)),vh}var bh={},tA;function C2(){return tA||(tA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=We(),t=ma(),n=pa();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(bh)),bh}var wh={},Sh={},rA;function hf(){return rA||(rA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=We();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Sh)),Sh}var nA;function M2(){return nA||(nA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=We(),t=ma(),n=pa(),i=hf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(wh)),wh}var Th={},Ph={},aA;function tj(){return aA||(aA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=We(),t=ma(),n=hE(),i=pa(),s=hf(),u=pf(),c=Qo();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"},outcomeType:{type:"string",nullable:!0}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:i.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(Ph)),Ph}var iA;function j2(){return iA||(iA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=We(),t=ma(),n=pa(),i=tj(),s=hf();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},tradeContractAddress:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(Th)),Th}var Ah={},oA;function yE(){return oA||(oA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=We();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Ah)),Ah}var Nh={},sA;function L2(){return sA||(sA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=We();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Nh)),Nh}var Oh={},uA;function D2(){return uA||(uA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=We(),t=ma(),n=pa();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(Oh)),Oh}var Ih={},lA;function k2(){return lA||(lA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Ih)),Ih}var Rh={},cA;function q2(){return cA||(cA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=We(),t=ma(),n=yE(),i=pa();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(Rh)),Rh}var Ch={},dA;function B2(){return dA||(dA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=We();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.MAGIC_TEST="magic_test",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(Ch)),Ch}var Mh={},fA;function rj(){return fA||(fA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=We();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(Mh)),Mh}var jh={},pA;function U2(){return pA||(pA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=We(),t=ma(),n=rj(),i=pa();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(jh)),jh}var Lh={},mA;function F2(){return mA||(mA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=We(),t=ma(),n=pa();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Lh)),Lh}var Dh={},hA;function V2(){return hA||(hA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Dh)),Dh}var kh={},yA;function H2(){return yA||(yA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=We();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(kh)),kh}var qh={},gA;function z2(){return gA||(gA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=We();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(qh)),qh}var Bh={},vA;function W2(){return vA||(vA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=We();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Bh)),Bh}var Uh={},_A;function G2(){return _A||(_A=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=We(),t=ma(),n=yE(),i=pa();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const u={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};s.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},u.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...u.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Uh)),Uh}var Fh={},EA;function K2(){return EA||(EA=1,Object.defineProperty(Fh,"__esModule",{value:!0})),Fh}var Vh={},bA;function Y2(){return bA||(bA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(a){a.BID="bid",a.PUBLIC_NFT_ORDER="public_nft_order",a.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(a){a[a.ERC20=1]="ERC20",a[a.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",a[a.ERC721=3]="ERC721",a[a.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(a){a.SENT="sent",a.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Vh)),Vh}var _o={},Hh={},wA;function X2(){return wA||(wA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=We();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Hh)),Hh}var zh={},SA;function J2(){return SA||(SA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(a){a.AUTH="authentication",a.BUILDER="builder",a.MARKETPLACE="marketplace",a.PROFILE="profile",a.CONFIG="configurator"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(zh)),zh}var Wh={},TA;function Q2(){return TA||(TA=1,Object.defineProperty(Wh,"__esModule",{value:!0})),Wh}var Gh={},PA;function x2(){return PA||(PA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=We();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Gh)),Gh}var Kh={},AA;function Z2(){return AA||(AA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=We();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(Kh)),Kh}var Yh={},NA;function $2(){return NA||(NA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const a=We();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.BABYLON="babylon",n.UNITY="unity"})(e.PreviewRenderer||(e.PreviewRenderer={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(Yh)),Yh}var Xh={},OA;function eB(){return OA||(OA=1,Object.defineProperty(Xh,"__esModule",{value:!0})),Xh}var Jh={},IA;function tB(){return IA||(IA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=We();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Jh)),Jh}var Qh={},RA;function rB(){return RA||(RA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=We();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(Qh)),Qh}var xh={},CA;function nB(){return CA||(CA=1,Object.defineProperty(xh,"__esModule",{value:!0})),xh}var Zh={},MA;function aB(){return MA||(MA=1,Object.defineProperty(Zh,"__esModule",{value:!0})),Zh}var $h={},jA;function iB(){return jA||(jA=1,Object.defineProperty($h,"__esModule",{value:!0})),$h}var ey={},LA;function oB(){return LA||(LA=1,Object.defineProperty(ey,"__esModule",{value:!0})),ey}var ty={},DA;function sB(){return DA||(DA=1,Object.defineProperty(ty,"__esModule",{value:!0})),ty}var ry={},kA;function uB(){return kA||(kA=1,Object.defineProperty(ry,"__esModule",{value:!0})),ry}var ny={},qA;function lB(){return qA||(qA=1,Object.defineProperty(ny,"__esModule",{value:!0})),ny}var ay={},BA;function cB(){return BA||(BA=1,Object.defineProperty(ay,"__esModule",{value:!0})),ay}var UA;function dB(){return UA||(UA=1,(function(e){var a=_o&&_o.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=_o&&_o.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(X2(),e),t(J2(),e),t(Q2(),e),t(x2(),e),t(Z2(),e),t($2(),e),t(eB(),e),t(tB(),e),t(rB(),e),t(nB(),e),t(aB(),e),t(iB(),e),t(oB(),e),t(sB(),e),t(uB(),e),t(lB(),e),t(cB(),e)})(_o)),_o}var Eo={},Mu={},FA;function fB(){if(FA)return Mu;FA=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.isSysLink=void 0;const e=a=>a!==null&&typeof a=="object"&&"sys"in a&&"id"in a.sys;return Mu.isSysLink=e,Mu}var ju={},VA;function pB(){if(VA)return ju;VA=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.ContentfulLocale=void 0;var e;return(function(a){a.enUS="en-US",a.es="es",a.zh="zh"})(e||(e={})),ju.ContentfulLocale=e,ju}var iy={},HA;function mB(){return HA||(HA=1,Object.defineProperty(iy,"__esModule",{value:!0})),iy}var zA;function hB(){return zA||(zA=1,(function(e){var a=Eo&&Eo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Eo&&Eo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(fB(),e),t(pB(),e),t(mB(),e)})(Eo)),Eo}var WA;function yB(){return WA||(WA=1,(function(e){var a=vo&&vo.__createBinding||(Object.create?(function(Q,te,he,be){be===void 0&&(be=he);var Ie=Object.getOwnPropertyDescriptor(te,he);(!Ie||("get"in Ie?!te.__esModule:Ie.writable||Ie.configurable))&&(Ie={enumerable:!0,get:function(){return te[he]}}),Object.defineProperty(Q,be,Ie)}):(function(Q,te,he,be){be===void 0&&(be=he),Q[be]=te[he]})),t=vo&&vo.__exportStar||function(Q,te){for(var he in Q)he!=="default"&&!Object.prototype.hasOwnProperty.call(te,he)&&a(te,Q,he)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var n=R2();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=ma();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var s=ej();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var u=C2();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return u.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return u.CollectionSortBy}});var c=M2();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=j2();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=yE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var h=L2();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return h.MetaTransaction}});var m=D2();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return m.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return m.MintSortBy}});var v=pa();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return v.Network}});var T=hf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return T.NFTCategory}});var C=tj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return C.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return C.NFTSortBy}});var N=k2();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return N.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return N.CatalogSortDirection}});var E=q2();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return E.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return E.OrderSortBy}});var R=B2();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return R.ProviderType}});var _=pf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return _.Rarity}});var O=rj();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return O.SaleType}});var P=U2();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return P.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return P.SaleSortBy}});var y=F2();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return y.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return y.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return y.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return y.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return y.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return y.PeriodCreation}});var S=V2();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var M=H2();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return M.Store}});var U=z2();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return U.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return U.GenderFilterOption}});var V=W2();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return V.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return V.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return V.isInsideWorldLimits}}),t(G2(),e),t(K2(),e),t(Y2(),e),t(dB(),e),t(hB(),e)})(vo)),vo}var oy={},GA;function gB(){return GA||(GA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=We();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(oy)),oy}var bo={},sy={},Lu={},KA;function nj(){if(KA)return Lu;KA=1,Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.isInExceptionBlock=void 0;function e(i,s){return i>=62&&i<=150&&s>=151&&s<=158}function a(i,s){return i>=151&&i<=162&&s>=144&&s<=158}function t(i,s){return i>=151&&i<=163&&s>=59&&s<=143}function n(i,s){return e(i,s)||a(i,s)||t(i,s)}return Lu.isInExceptionBlock=n,Lu}var YA;function vB(){return YA||(YA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const a=We(),t=nj();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(T,C){return!C||typeof C.x!="number"||typeof C.y!="number"?!1:c(C)||(0,t.isInExceptionBlock)(C.x,C.y)},errors:!1},n.schema={type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},_isInLimits:!0,additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema,[n._isInLimits]);function i({x:v,y:T}){return`${v},${T}`}n.parcelToString=i;function s(v){const T=v.match(/^(-?\d+),(-?\d+)$/);if(!T)return null;const[,C,N]=T,E=parseInt(C,10),R=parseInt(N,10);return{x:E,y:R}}n.stringToParcel=s;function u(v){const T=s(v);return T?n.validate(T):!1}n.isParcelStringValid=u;function c(v){const{x:T,y:C}=v;return T>=e.PARCEL_LIMITS.minX&&T<=e.PARCEL_LIMITS.maxX&&C>=e.PARCEL_LIMITS.minY&&C<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=c;function f(v){return(0,t.isInExceptionBlock)(v.x,v.y)}n.isExceptionParcel=f;function p(v){return c(v)||f(v)}n.isInBounds=p;function h(v){return n.validate(v)}n.isValid=h;function m(v){const T=s(v);return T?n.validate(T):!1}n.isValidString=m})(e.Parcel||(e.Parcel={}))})(sy)),sy}var wo={},XA;function _B(){if(XA)return wo;XA=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.validateUrlInstance=wo.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function a(T,C=2){let N=T;for(let E=0;E<C;E++)try{N=decodeURIComponent(N)}catch{break}return N.normalize("NFKC")}function t(T){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(T)}function n(T){return!!(T.username||T.password)}function i(T){return/\\/.test(T)}const s=["80","443"];function u(T,C){return!!T.port&&!C.includes(T.port)}function c(T){const C=T.toLowerCase();return!!(C==="localhost"||C.endsWith(".local")||/^(127\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.|169\.254\.)/.test(C)||C==="::1"||C==="[::1]"||C.startsWith("fe80:")||C.startsWith("fc00:"))}function f(T){if(T.startsWith("//"))return null;try{return{url:new URL(T),wasRelative:!1}}catch{try{return{url:new URL(T,"https://example.com"),wasRelative:!0}}catch{return null}}}function p(T){const C=a(String(T).toLowerCase());return!(t(C)||i(C))}function h(T){return!(!T||T.includes("..")||T.includes("//")||t(T)||i(T))}function m(T,C={}){const N=Object.assign(Object.assign({},e),C),E=[...s,...N.allowedPorts];if(!T||T.length===0||T.length>4096||t(T)||i(T))return!1;const R=a(T);if(t(R)||i(R)||T.startsWith("//"))return!1;const _=f(T);if(!_)return!1;const{url:O,wasRelative:P}=_;if(O.protocol!=="http:"&&O.protocol!=="https:"&&O.protocol!==""||n(O)||i(T)||i(O.href)||!P&&(u(O,E)||!N.allowLocalhost&&O.hostname&&c(O.hostname))||!h(O.pathname)||O.pathname.length>2048)return!1;const y=Array.from(O.searchParams.entries());if(y.length>50||(O.search?O.search.startsWith("?")?O.search.length-1:O.search.length:0)>2048)return!1;for(const[M,U]of y)if(M.length===0||!p(M)||!p(U)||M.length>128||U.length>1024)return!1;return!(O.hash&&t(O.hash))}wo.validateUrl=m;function v(T,C={}){return m(T.toString(),C)}return wo.validateUrlInstance=v,wo}var JA;function EB(){return JA||(JA=1,(function(e){var a=bo&&bo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=bo&&bo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(vB(),e),t(nj(),e),t(_B(),e)})(bo)),bo}var QA;function bB(){return QA||(QA=1,(function(e){var a=Zn&&Zn.__createBinding||(Object.create?(function(u,c,f,p){p===void 0&&(p=f);var h=Object.getOwnPropertyDescriptor(c,f);(!h||("get"in h?!c.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(u,p,h)}):(function(u,c,f,p){p===void 0&&(p=f),u[p]=c[f]})),t=Zn&&Zn.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),n=Zn&&Zn.__importStar||function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var f in u)f!=="default"&&Object.prototype.hasOwnProperty.call(u,f)&&a(c,u,f);return t(c,u),c},i=Zn&&Zn.__exportStar||function(u,c){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&a(c,u,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(I2());e.sdk=s,i(We(),e),i(yB(),e),i(hE(),e),i(xo(),e),i(gB(),e),i(Nl(),e),i(JM(),e),i($M(),e),i(EB(),e)})(Zn)),Zn}var Bn=bB(),So={},ra={},Rd={exports:{}},Cd={exports:{}},xA;function gE(){return xA||(xA=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=t;function t(n){if(n==null)throw new TypeError("Expected a string but received a ".concat(n));if(n.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(n.constructor.name))}e.exports=a.default,e.exports.default=a.default})(Cd,Cd.exports)),Cd.exports}var Md={exports:{}},ZA;function wB(){return ZA||(ZA=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=n;function t(i){return Object.prototype.toString.call(i)==="[object RegExp]"}function n(i,s){for(var u=0;u<s.length;u++){var c=s[u];if(i===c||t(c)&&c.test(i))return!0}return!1}e.exports=a.default,e.exports.default=a.default})(Md,Md.exports)),Md.exports}var jd={exports:{}},$A;function SB(){return $A||($A=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var t=function(i,s){return i.indexOf(s)!==-1};a.default=t,e.exports=a.default,e.exports.default=a.default})(jd,jd.exports)),jd.exports}var Ld={exports:{}},Dd={exports:{}},eN;function aj(){return eN||(eN=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=t;function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;for(var s in i)typeof n[s]>"u"&&(n[s]=i[s]);return n}e.exports=a.default,e.exports.default=a.default})(Dd,Dd.exports)),Dd.exports}var tN;function TB(){return tN||(tN=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=u;var t=i(gE()),n=i(aj());function i(c){return c&&c.__esModule?c:{default:c}}var s={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function u(c,f){(0,t.default)(c),f=(0,n.default)(f,s),f.allow_trailing_dot&&c[c.length-1]==="."&&(c=c.substring(0,c.length-1)),f.allow_wildcard===!0&&c.indexOf("*.")===0&&(c=c.substring(2));var p=c.split("."),h=p[p.length-1];return f.require_tld&&(p.length<2||!f.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(h)||/\s/.test(h))||!f.allow_numeric_tld&&/^\d+$/.test(h)?!1:p.every(function(m){return!(m.length>63&&!f.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(m)||/[\uff01-\uff5e]/.test(m)||/^-|-$/.test(m)||!f.allow_underscores&&/_/.test(m))})}e.exports=a.default,e.exports.default=a.default})(Ld,Ld.exports)),Ld.exports}var kd={exports:{}},rN;function PB(){return rN||(rN=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=h;var t=n(gE());function n(m){return m&&m.__esModule?m:{default:m}}function i(m){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},i(m)}var s="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",u="(".concat(s,"[.]){3}").concat(s),c=new RegExp("^".concat(u,"$")),f="(?:[0-9a-fA-F]{1,4})",p=new RegExp("^("+"(?:".concat(f,":){7}(?:").concat(f,"|:)|")+"(?:".concat(f,":){6}(?:").concat(u,"|:").concat(f,"|:)|")+"(?:".concat(f,":){5}(?::").concat(u,"|(:").concat(f,"){1,2}|:)|")+"(?:".concat(f,":){4}(?:(:").concat(f,"){0,1}:").concat(u,"|(:").concat(f,"){1,3}|:)|")+"(?:".concat(f,":){3}(?:(:").concat(f,"){0,2}:").concat(u,"|(:").concat(f,"){1,4}|:)|")+"(?:".concat(f,":){2}(?:(:").concat(f,"){0,3}:").concat(u,"|(:").concat(f,"){1,5}|:)|")+"(?:".concat(f,":){1}(?:(:").concat(f,"){0,4}:").concat(u,"|(:").concat(f,"){1,6}|:)|")+"(?::((?::".concat(f,"){0,5}:").concat(u,"|(?::").concat(f,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function h(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,t.default)(m);var T=(i(v)==="object"?v.version:arguments[1])||"";return T?T.toString()==="4"?c.test(m):T.toString()==="6"?p.test(m):!1:h(m,{version:4})||h(m,{version:6})}e.exports=a.default,e.exports.default=a.default})(kd,kd.exports)),kd.exports}var nN;function AB(){return nN||(nN=1,(function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=R;var t=f(gE()),n=f(wB()),i=f(SB()),s=f(TB()),u=f(PB()),c=f(aj());function f(_){return _&&_.__esModule?_:{default:_}}function p(_,O){return C(_)||T(_,O)||m(_,O)||h()}function h(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(_,O){if(_){if(typeof _=="string")return v(_,O);var P={}.toString.call(_).slice(8,-1);return P==="Object"&&_.constructor&&(P=_.constructor.name),P==="Map"||P==="Set"?Array.from(_):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?v(_,O):void 0}}function v(_,O){(O==null||O>_.length)&&(O=_.length);for(var P=0,y=Array(O);P<O;P++)y[P]=_[P];return y}function T(_,O){var P=_==null?null:typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(P!=null){var y,S,M,U,V=[],Q=!0,te=!1;try{if(M=(P=P.call(_)).next,O!==0)for(;!(Q=(y=M.call(P)).done)&&(V.push(y.value),V.length!==O);Q=!0);}catch(he){te=!0,S=he}finally{try{if(!Q&&P.return!=null&&(U=P.return(),Object(U)!==U))return}finally{if(te)throw S}}return V}}function C(_){if(Array.isArray(_))return _}var N={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},E=/^\[([^\]]+)\](?::([0-9]+))?$/;function R(_,O){if((0,t.default)(_),!_||/[\s<>]/.test(_)||_.indexOf("mailto:")===0||(O=(0,c.default)(O,N),O.validate_length&&_.length>O.max_allowed_length)||!O.allow_fragments&&(0,i.default)(_,"#")||!O.allow_query_components&&((0,i.default)(_,"?")||(0,i.default)(_,"&")))return!1;var P,y,S,M,U,V,Q,te;Q=_.split("#"),_=Q.shift(),Q=_.split("?"),_=Q.shift();var he=_.match(/^([a-z][a-z0-9+\-.]*):/i),be=!1,Ie=function(fe){return be=!0,P=fe.toLowerCase(),O.require_valid_protocol&&O.protocols.indexOf(P)===-1?!1:_.substring(he[0].length)};if(he){var we=he[1],Ae=_.substring(he[0].length),Ne=Ae.slice(0,2)==="//";if(Ne){if(_=Ie(we),_===!1)return!1}else{var me=Ae.indexOf("/"),le=me===-1?Ae:Ae.substring(0,me),X=le.indexOf("@");if(X!==-1){var L=le.substring(0,X),F=/^[a-zA-Z0-9\-_.%:]*$/,B=F.test(L),D=/%[0-9a-fA-F]{2}/.test(L);if(B&&!D){if(O.require_protocol)return!1}else if(_=Ie(we),_===!1)return!1}else{var K=/^[0-9]/.test(Ae);if(K){if(O.require_protocol)return!1}else if(_=Ie(we),_===!1)return!1}}}else if(O.require_protocol)return!1;if(_.slice(0,2)==="//"){if(!be&&!O.allow_protocol_relative_urls)return!1;_=_.slice(2)}if(_==="")return!1;if(Q=_.split("/"),_=Q.shift(),_===""&&!O.require_host)return!0;if(Q=_.split("@"),Q.length>1){if(O.disallow_auth||Q[0]===""||(y=Q.shift(),y.indexOf(":")>=0&&y.split(":").length>2))return!1;var ue=y.split(":"),Re=p(ue,2),Pe=Re[0],Be=Re[1];if(Pe===""&&Be==="")return!1}M=Q.join("@"),V=null,te=null;var je=M.match(E);if(je?(S="",te=je[1],V=je[2]||null):(Q=M.split(":"),S=Q.shift(),Q.length&&(V=Q.join(":"))),V!==null&&V.length>0){if(U=parseInt(V,10),!/^[0-9]+$/.test(V)||U<=0||U>65535)return!1}else if(O.require_port)return!1;return O.host_whitelist?(0,n.default)(S,O.host_whitelist):S===""&&!O.require_host?!0:!(!(0,u.default)(S)&&!(0,s.default)(S,O)&&(!te||!(0,u.default)(te,6))||(S=S||te,O.host_blacklist&&(0,n.default)(S,O.host_blacklist)))}e.exports=a.default,e.exports.default=a.default})(Rd,Rd.exports)),Rd.exports}var uy={},aN;function ij(){return aN||(aN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var a;(function(c){c.GET="get",c.STORE="store",c.CLEAR="clear",c.PING="ping"})(a||(e.Action=a={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function t(c){return{target:e.SINGLE_SIGN_ON_TARGET,...c}}e.createMessage=t;function n(c){const f=localStorage.getItem(u(c));if(!f)return null;let p;try{p=JSON.parse(f)}catch{return s(c),null}return p.expiration=new Date(p.expiration),p.expiration.getTime()<=Date.now()?(s(c),null):p}e.localStorageGetIdentity=n;function i(c,f){new Date(f.expiration).getTime()>Date.now()&&localStorage.setItem(u(c),JSON.stringify(f))}e.localStorageStoreIdentity=i;function s(c){localStorage.removeItem(u(c))}e.localStorageClearIdentity=s;function u(c){if(!/^0x[a-fA-F0-9]{40}$/.test(c))throw new Error("User must be a valid ethereum address");return`single-sign-on-${c.toLowerCase()}`}})(uy)),uy}var iN;function NB(){if(iN)return ra;iN=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.clearIdentity=ra.storeIdentity=ra.getIdentity=ra.init=void 0;const e=AB(),a=ij(),t=a.SINGLE_SIGN_ON_TARGET,n=500,i=5;let s=0,u="";const c={protocols:["https"],require_protocol:!0};function f(E,R={}){if(!(0,e.default)(E,{...c,...R}))throw new Error(`Invalid url: ${E}`);if(u)throw new Error("Already initialized");const _=document.createElement("iframe");_.id=t,_.src=E,_.style.width="0",_.style.height="0",_.style.border="none",_.style.position="absolute",document.body.appendChild(_),u=E}ra.init=f;async function p(E){let R;try{R=(await T(await v(),a.Action.GET,{user:E})).identity??null}catch(_){N(_),R=(0,a.localStorageGetIdentity)(E)}return R}ra.getIdentity=p;async function h(E,R){try{await T(await v(),a.Action.STORE,{user:E,identity:R})}catch(_){N(_),(0,a.localStorageStoreIdentity)(E,R)}}ra.storeIdentity=h;async function m(E){try{await T(await v(),a.Action.CLEAR,{user:E})}catch(R){N(R),(0,a.localStorageClearIdentity)(E)}}ra.clearIdentity=m;async function v(){if(!u)throw new Error("Not initialized");for(let E=0;E<i;E++){const _=document.getElementById(t)?.contentWindow;if(!_){await C(n);continue}try{await T(_,a.Action.PING,{},n)}catch{continue}return _}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function T(E,R,_,O=0){s++;const P=s;let y=null;const S=new Promise((M,U)=>{y=({data:V})=>{!V||V.target!==a.SINGLE_SIGN_ON_TARGET||V.id!==P||(V.error?U(new Error(V.error)):M(V))},window.addEventListener("message",y)});E.postMessage((0,a.createMessage)({id:P,action:R,..._}),u);try{return await(O?Promise.race([S,new Promise((M,U)=>setTimeout(()=>U(new Error("Did not receive a response in time")),O))]):S)}catch(M){throw M}finally{y&&window.removeEventListener("message",y)}}function C(E){return new Promise(R=>setTimeout(R,E))}function N(E){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",E.message)}return ra}var oN;function OB(){return oN||(oN=1,(function(e){var a=So&&So.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=So&&So.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(NB(),e),t(ij(),e)})(So)),So}var V_=OB(),ly={},na={},sN;function xe(){if(sN)return na;sN=1;var e=na&&na.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(na,"__esModule",{value:!0}),na.validateType=na.generateLazyValidator=na.Ajv=void 0;const a=e(df());na.Ajv=a.default;const t=e(oE()),n=e(sE());function i(u,c){let f=null;const p=(h,m)=>{if(!f){const v=new a.default({$data:!0,allErrors:!0});(0,t.default)(v),(0,n.default)(v,{singleError:!0}),c?.forEach(T=>v.addKeyword(T)),f=v.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(h,m)};return p}na.generateLazyValidator=i;function s(u,c){return u.validate(c)}return na.validateType=s,na}var cy={},uN;function oj(){return uN||(uN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=xe(),t=Fn();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.MATIC_AMOY="Amoy",s.AVALANCHE_MAINNET="Avalanche",s.BINANCE_MAINNET="Binance Smart Chain",s.ARBITRUM_MAINNET="Arbitrum",s.OPTIMISM_MAINNET="Optimism",s.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function i(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(cy)),cy}var dy={},lN;function ha(){return lN||(lN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=xe();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC",t.AVALANCHE="AVALANCHE",t.BSC="BINANCE SMART CHAIN",t.OPTIMISM="OPTIMISM",t.ARBITRUM="ARBITRUM",t.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(dy)),dy}var cN;function Fn(){return cN||(cN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=xe(),t=oj(),n=ha();var i;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI",p[p.MATIC_AMOY=80002]="MATIC_AMOY",p[p.BSC_MAINNET=56]="BSC_MAINNET",p[p.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",p[p.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",p[p.FANTOM_MAINNET=250]="FANTOM_MAINNET",p[p.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=u;function c(p){const h={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(p){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},h);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},h);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},h);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},h);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},h)}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(ly)),ly}var At=Fn(),fy={},dN;function sj(){return dN||(dN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=xe();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.MAGIC_TEST="magic_test",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(fy)),fy}var Ft=sj(),xa;(function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"})(xa||(xa={}));var qd={exports:{}},fN;function IB(){if(fN)return qd.exports;fN=1;var e=typeof Reflect=="object"?Reflect:null,a=e&&typeof e.apply=="function"?e.apply:function(y,S,M){return Function.prototype.apply.call(y,S,M)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(y){return Object.getOwnPropertyNames(y).concat(Object.getOwnPropertySymbols(y))}:t=function(y){return Object.getOwnPropertyNames(y)};function n(P){console&&console.warn&&console.warn(P)}var i=Number.isNaN||function(y){return y!==y};function s(){s.init.call(this)}qd.exports=s,qd.exports.once=R,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(P){if(typeof P!="number"||P<0||i(P))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+P+".");u=P}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(y){if(typeof y!="number"||y<0||i(y))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+y+".");return this._maxListeners=y,this};function f(P){return P._maxListeners===void 0?s.defaultMaxListeners:P._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(y){for(var S=[],M=1;M<arguments.length;M++)S.push(arguments[M]);var U=y==="error",V=this._events;if(V!==void 0)U=U&&V.error===void 0;else if(!U)return!1;if(U){var Q;if(S.length>0&&(Q=S[0]),Q instanceof Error)throw Q;var te=new Error("Unhandled error."+(Q?" ("+Q.message+")":""));throw te.context=Q,te}var he=V[y];if(he===void 0)return!1;if(typeof he=="function")a(he,this,S);else for(var be=he.length,Ie=C(he,be),M=0;M<be;++M)a(Ie[M],this,S);return!0};function p(P,y,S,M){var U,V,Q;if(c(S),V=P._events,V===void 0?(V=P._events=Object.create(null),P._eventsCount=0):(V.newListener!==void 0&&(P.emit("newListener",y,S.listener?S.listener:S),V=P._events),Q=V[y]),Q===void 0)Q=V[y]=S,++P._eventsCount;else if(typeof Q=="function"?Q=V[y]=M?[S,Q]:[Q,S]:M?Q.unshift(S):Q.push(S),U=f(P),U>0&&Q.length>U&&!Q.warned){Q.warned=!0;var te=new Error("Possible EventEmitter memory leak detected. "+Q.length+" "+String(y)+" listeners added. Use emitter.setMaxListeners() to increase limit");te.name="MaxListenersExceededWarning",te.emitter=P,te.type=y,te.count=Q.length,n(te)}return P}s.prototype.addListener=function(y,S){return p(this,y,S,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(y,S){return p(this,y,S,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(P,y,S){var M={fired:!1,wrapFn:void 0,target:P,type:y,listener:S},U=h.bind(M);return U.listener=S,M.wrapFn=U,U}s.prototype.once=function(y,S){return c(S),this.on(y,m(this,y,S)),this},s.prototype.prependOnceListener=function(y,S){return c(S),this.prependListener(y,m(this,y,S)),this},s.prototype.removeListener=function(y,S){var M,U,V,Q,te;if(c(S),U=this._events,U===void 0)return this;if(M=U[y],M===void 0)return this;if(M===S||M.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete U[y],U.removeListener&&this.emit("removeListener",y,M.listener||S));else if(typeof M!="function"){for(V=-1,Q=M.length-1;Q>=0;Q--)if(M[Q]===S||M[Q].listener===S){te=M[Q].listener,V=Q;break}if(V<0)return this;V===0?M.shift():N(M,V),M.length===1&&(U[y]=M[0]),U.removeListener!==void 0&&this.emit("removeListener",y,te||S)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(y){var S,M,U;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[y]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[y]),this;if(arguments.length===0){var V=Object.keys(M),Q;for(U=0;U<V.length;++U)Q=V[U],Q!=="removeListener"&&this.removeAllListeners(Q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(S=M[y],typeof S=="function")this.removeListener(y,S);else if(S!==void 0)for(U=S.length-1;U>=0;U--)this.removeListener(y,S[U]);return this};function v(P,y,S){var M=P._events;if(M===void 0)return[];var U=M[y];return U===void 0?[]:typeof U=="function"?S?[U.listener||U]:[U]:S?E(U):C(U,U.length)}s.prototype.listeners=function(y){return v(this,y,!0)},s.prototype.rawListeners=function(y){return v(this,y,!1)},s.listenerCount=function(P,y){return typeof P.listenerCount=="function"?P.listenerCount(y):T.call(P,y)},s.prototype.listenerCount=T;function T(P){var y=this._events;if(y!==void 0){var S=y[P];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function C(P,y){for(var S=new Array(y),M=0;M<y;++M)S[M]=P[M];return S}function N(P,y){for(;y+1<P.length;y++)P[y]=P[y+1];P.pop()}function E(P){for(var y=new Array(P.length),S=0;S<y.length;++S)y[S]=P[S].listener||P[S];return y}function R(P,y){return new Promise(function(S,M){function U(Q){P.removeListener(y,V),M(Q)}function V(){typeof P.removeListener=="function"&&P.removeListener("error",U),S([].slice.call(arguments))}O(P,y,V,{once:!0}),y!=="error"&&_(P,U,{once:!0})})}function _(P,y,S){typeof P.on=="function"&&O(P,"error",y,S)}function O(P,y,S,M){if(typeof P.on=="function")M.once?P.once(y,S):P.on(y,S);else if(typeof P.addEventListener=="function")P.addEventListener(y,function U(V){M.once&&P.removeEventListener(y,U),S(V)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof P)}return qd.exports}var uj=IB();const zW=bD(uj);function RB(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,e.__proto__=a}var Qs=(function(e){RB(a,e);function a(n){var i,s=n===void 0?{}:n,u=s.supportedChainIds;return i=e.call(this)||this,i.supportedChainIds=u,i}var t=a.prototype;return t.emitUpdate=function(i){this.emit(xa.Update,i)},t.emitError=function(i){this.emit(xa.Error,i)},t.emitDeactivate=function(){this.emit(xa.Deactivate)},a})(uj.EventEmitter);const CB="modulepreload",MB=function(e){return"https://cdn.decentraland.org/@dcl-regenesislabs/mobile-hub/1.0.3/"+e},pN={},gl=function(a,t,n){let i=Promise.resolve();if(t&&t.length>0){let f=function(p){return Promise.all(p.map(h=>Promise.resolve(h).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=u?.nonce||u?.getAttribute("nonce");i=f(t.map(p=>{if(p=MB(p),p in pN)return;pN[p]=!0;const h=p.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":CB,h||(v.as="script"),v.crossOrigin="",v.href=p,c&&v.setAttribute("nonce",c),document.head.appendChild(v),h)return new Promise((T,C)=>{v.addEventListener("load",T),v.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return i.then(u=>{for(const c of u||[])c.status==="rejected"&&s(c.reason);return a().catch(s)})};var aa={},To={},Po={},py={},mN;function jB(){return mN||(mN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=xe();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(py)),py}var my={},hN;function LB(){return hN||(hN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=xe();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(my)),my}var yN;function DB(){return yN||(yN=1,(function(e){var a=Po&&Po.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Po&&Po.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(jB(),e),t(LB(),e)})(Po)),Po}var Ao={},hy={},gN;function kB(){return gN||(gN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=xe();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(hy)),hy}var yy={},gy={},vN;function yf(){return vN||(vN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=xe();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.EXOTIC="exotic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},i={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function u(h){return n[h]}t.getMaxSupply=u;function c(h){return s[h]}t.getColor=c;function f(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=f;function p(h){return[i[h],s[h]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(gy)),gy}var vy={},_N;function Zo(){return _N||(_N=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=xe();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(vy)),vy}var _y={},Ey={},EN;function vE(){return EN||(EN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=xe();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(Ey)),Ey}var by={},wy={},bN;function lj(){return bN||(bN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=xe();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(wy)),wy}var wN;function _E(){return wN||(wN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=Zo(),t=xe(),n=lj();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(by)),by}var SN;function EE(){return SN||(SN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=xe(),t=vE(),n=_E();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(_y)),_y}var No={},Oo={},Sy={},Ty={},TN;function $o(){return TN||(TN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=xe();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(Ty)),Ty}var PN;function cj(){return PN||(PN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=Zo(),t=$o(),n=xe();var i;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(i=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=h=>p.test(h)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(Sy)),Sy}var Py={},AN;function qB(){return AN||(AN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=xe(),t=cj();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(Py)),Py}var NN;function BB(){return NN||(NN=1,(function(e){var a=Oo&&Oo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Oo&&Oo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(cj(),e),t(qB(),e)})(Oo)),Oo}var Ay={},Ny={},ON;function dj(){return ON||(ON=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=xe();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(Ny)),Ny}var Oy={},IN;function fj(){return IN||(IN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Oy)),Oy}var Iy={},RN;function pj(){return RN||(RN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=xe();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(Iy)),Iy}var Ry={},Du={},CN;function bE(){return CN||(CN=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.displayableProperties=void 0,Du.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Du}var Cy={},MN;function mj(){return MN||(MN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(Cy)),Cy}var My={},jN;function hj(){return jN||(jN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(My)),My}var LN;function UB(){return LN||(LN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=xe(),t=bE(),n=dj(),i=pj(),s=mj(),u=hj(),c=fj();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:u.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(Ry)),Ry}var DN;function FB(){return DN||(DN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var a=dj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=fj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=pj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=UB();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=mj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=hj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(Ay)),Ay}var Io={},jy={},Ly={},kN;function yj(){return kN||(kN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=xe();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(Ly)),Ly}var qN;function gj(){return qN||(qN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=xe(),t=yj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(jy)),jy}var Dy={},BN;function vj(){return BN||(BN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(Dy)),Dy}var ky={},UN;function wE(){return UN||(UN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=yf(),t=xe();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(ky)),ky}var qy={},Ro={},By={},FN;function VB(){return FN||(FN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(By)),By}var VN;function _j(){return VN||(VN=1,(function(e){var a=Ro&&Ro.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ro&&Ro.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(VB(),e)})(Ro)),Ro}var Uy={},HN;function SE(){return HN||(HN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const a=xe();var t;(function(m){m.SINGLE="single",m.ANY="any",m.MULTIPLE="multiple",m.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(m){m.MAINNET="mainnet",m.MATIC="matic",m.SEPOLIA="sepolia",m.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},m.validate=(0,a.generateLazyValidator)(m.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var s;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},m.validate=(0,a.generateLazyValidator)(m.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var u;(function(m){m._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(T,C){if(!C||!C.from||!C.to)return!1;let{to:N,from:E}=C;return(typeof E!="bigint"||typeof N!="bigint")&&(E=BigInt(E),N=BigInt(N)),E<=N},errors:!1},m.schema={type:"object",properties:{type:{type:"string",const:t.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},m.validate=(0,a.generateLazyValidator)(m.schema,[m._fromLessThanOrEqualTo])})(u=e.RangeMapping||(e.RangeMapping={}));var c;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},m.validate=(0,a.generateLazyValidator)(m.schema)})(c=e.MultipleMapping||(e.MultipleMapping={}));var f;(function(m){m.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[i.schema,s.schema,u.schema,c.schema]},m.validate=(0,a.generateLazyValidator)(m.schema,[u._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(m){m._isMappingsValid={keyword:"_isMappingsValid",validate:function(T,C){try{h(C)}catch{return!1}return!0},errors:!1},m.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:f.schema}},minProperties:1,required:[],additionalProperties:!1};const v=Object.values(n).reduce((T,C)=>(T[C]=m.innerSchema,T),{});m.schema={type:"object",properties:v,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},m.validate=(0,a.generateLazyValidator)(m.schema,[u._fromLessThanOrEqualTo,m._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(v,T,C){super(v),this.existingMapping=T,this.conflictingMapping=C}}e.AddMappingError=p;function h(m={}){const v={};for(const[y,S]of Object.entries(m)){v[y]={};for(const[M,U]of Object.entries(S))for(const V of U)O(y,M,V)}function T(){return JSON.parse(JSON.stringify(v))}function C(y,S,M){const U=BigInt(y);return U>=BigInt(S)&&U<=BigInt(M)}function N(y,S){switch(S.type){case t.SINGLE:return y.id===S.id;case t.MULTIPLE:return S.ids.includes(y.id);case t.RANGE:return C(y.id,S.from,S.to);default:return!1}}function E(y,S){switch(S.type){case t.SINGLE:return y.ids.includes(S.id);case t.MULTIPLE:return y.ids.some(M=>S.ids.includes(M));case t.RANGE:return y.ids.some(M=>C(M,S.from,S.to));default:return!1}}function R(y,S){switch(S.type){case t.SINGLE:return C(S.id,y.from,y.to);case t.MULTIPLE:return S.ids.some(M=>C(M,y.from,y.to));case t.RANGE:return BigInt(y.from)<=BigInt(S.to)&&BigInt(y.to)>=BigInt(S.from)}}function _(y,S){if(y.type===t.ANY||S.type===t.ANY)return!0;switch(y.type){case t.SINGLE:return N(y,S);case t.MULTIPLE:return E(y,S);case t.RANGE:return R(y,S)}}function O(y,S,M){var U,V;const Q=S.toLowerCase();v[y]=(U=v[y])!==null&&U!==void 0?U:{},v[y][Q]=(V=v[y][Q])!==null&&V!==void 0?V:[];for(const te of v[y][Q])if(_(te,M))throw new p(`Cannot add mapping to contract ${Q} on network ${y} because it overlaps with existing mapping`,te,M);v[y][Q].push(M)}function P(y,S,M){var U;return!((U=v[y])===null||U===void 0)&&U[S]?v[y][S].some(V=>{switch(V.type){case t.SINGLE:return V.id===M;case t.ANY:return!0;case t.MULTIPLE:return V.ids.includes(M);case t.RANGE:return BigInt(M)>=BigInt(V.from)&&BigInt(M)<=BigInt(V.to)}}):!1}return{addMapping:O,getMappings:T,includesNft:P}}e.createMappingsHelper=h})(Uy)),Uy}var zN;function TE(){return zN||(zN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const a=xe(),t=_j(),n=SE();e.schema={type:"object",properties:{merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const i={keyword:"_containsHashingKeys",validate:function(c,f){var p;const h=f;return!((p=h?.merkleProof)===null||p===void 0)&&p.hashingKeys?h.merkleProof.hashingKeys.every(m=>h.hasOwnProperty(m)):!1},errors:!1},s=(0,a.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function u(c){return s(c)}e.isThirdParty=u})(qy)),qy}var Fy={},Vy={},ia={},WN;function Ej(){if(WN)return ia;WN=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.isBaseEmote=ia.isBaseAvatar=ia.requiredBaseItemProps=ia.baseItemProperties=void 0;const e=gj(),a=vj(),t=bE();ia.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},a.Metrics.schema),{nullable:!0})}),ia.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const u=s.id.split(":"),c=u[1]==="decentraland",f=u[3]==="base-avatars";return u.length===5&&c&&f}ia.isBaseAvatar=n;function i(s){if(!s||!s.id)return!1;const u=s.id.split(":");return u.length===5&&u[1]==="decentraland"&&u[3]==="base-emotes"}return ia.isBaseEmote=i,ia}var GN;function HB(){return GN||(GN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=xe(),t=Zo(),n=EE(),i=Ej(),s=wE(),u=TE(),c=_E(),f=SE();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const h={keyword:"_isThirdParty",validate:(v,T)=>!v||(0,u.isThirdParty)(T),errors:!1},m={keyword:"_isBaseAvatar",validate:(v,T)=>!v||(0,i.isBaseAvatar)(T),errors:!1};p.validate=(0,a.generateLazyValidator)(p.schema,[h,m,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Vy)),Vy}var KN;function zB(){return KN||(KN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=EE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=HB();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Zo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=lj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=_E();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(Fy)),Fy}var Hy={},zy={},Wy={},Gy={},YN;function bj(){return YN||(YN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=xe();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Gy)),Gy}var Ky={},XN;function wj(){return XN||(XN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=xe(),t=vE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(Ky)),Ky}var JN;function Sj(){return JN||(JN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=bj(),t=xe(),n=wj();(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Wy)),Wy}var QN;function WB(){return QN||(QN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=Tj(),t=xe(),n=Ej(),i=wE(),s=TE(),u=Sj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.schema.properties),{emoteDataADR74:u.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(h,m)=>!h||(0,a.isThirdParty)(m),errors:!1},p={keyword:"_isBaseEmote",validate:(h,m)=>!h||(0,n.isBaseEmote)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,a.RangeMapping._fromLessThanOrEqualTo,a.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(zy)),zy}var Yy={},xN;function GB(){return xN||(xN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=xe();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Yy)),Yy}var ZN;function KB(){return ZN||(ZN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=WB();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=wj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=Sj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=bj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var s=GB();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(Hy)),Hy}var $N;function Tj(){return $N||($N=1,(function(e){var a=Io&&Io.__createBinding||(Object.create?(function(p,h,m,v){v===void 0&&(v=m);var T=Object.getOwnPropertyDescriptor(h,m);(!T||("get"in T?!h.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(p,v,T)}):(function(p,h,m,v){v===void 0&&(v=m),p[v]=h[m]})),t=Io&&Io.__exportStar||function(p,h){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(h,m)&&a(h,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=gj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=yj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=vj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=vE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=wE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=TE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(SE(),e),t(zB(),e),t(KB(),e)})(Io)),Io}var Xy={},Jy={},eO;function gf(){return eO||(eO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=xe();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(Jy)),Jy}var tO;function YB(){return tO||(tO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=$o(),t=gf(),n=xe();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Xy)),Xy}var Qy={},xy={},rO;function Pj(){return rO||(rO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=$o(),t=xe();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(xy)),xy}var nO;function Aj(){return nO||(nO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=$o(),t=Pj(),n=xe();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(Qy)),Qy}var Zy={},aO;function XB(){return aO||(aO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=gf(),t=xe();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Zy)),Zy}var Co={},$y={},iO;function JB(){return iO||(iO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=Zo(),t=$o(),n=xe();var i;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})($y)),$y}var oO;function QB(){return oO||(oO=1,(function(e){var a=Co&&Co.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Co&&Co.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(JB(),e)})(Co)),Co}var Mo={},eg={},sO;function Nj(){return sO||(sO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationType=void 0,(function(a){a.BADGE_GRANTED="badge_granted",a.BID_ACCEPTED="bid_accepted",a.BID_RECEIVED="bid_received",a.EVENTS_STARTED="events_started",a.EVENTS_STARTS_SOON="events_starts_soon",a.GOVERNANCE_ANNOUNCEMENT="governance_announcement",a.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",a.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",a.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",a.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",a.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",a.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",a.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",a.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",a.GOVERNANCE_TENDER_PASSED="governance_tender_passed",a.GOVERNANCE_WHALE_VOTE="governance_whale_vote",a.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",a.ITEM_SOLD="item_sold",a.ITEM_PUBLISHED="item_published",a.LAND_RENTAL_ENDED="rental_ended",a.LAND_RENTED="rental_started",a.REWARD_ASSIGNED="reward_assignment",a.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",a.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",a.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",a.REWARD_DELAYED="reward_delayed",a.REWARD_IN_PROGRESS="reward_in_progress",a.ROYALTIES_EARNED="royalties_earned",a.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",a.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",a.WORLDS_ACCESS_RESTORED="worlds_access_restored",a.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",a.WORLDS_MISSING_RESOURCES="worlds_missing_resources",a.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",a.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked"})(e.NotificationType||(e.NotificationType={}))})(eg)),eg}var tg={},rg={},uO;function Oj(){return uO||(uO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const a=xe(),t=Nj(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(t.NotificationType).reduce((s,u)=>(s[u]=n,s),{});(function(s){s.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(t.NotificationType),additionalProperties:!1,properties:i}}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(rg)),rg}var ng={},lO;function Ij(){return lO||(lO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(a){a.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(a.schema.pattern);a.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(ng)),ng}var cO;function xB(){return cO||(cO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const a=xe(),t=Oj(),n=$o(),i=Ij();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(tg)),tg}var dO;function ZB(){return dO||(dO=1,(function(e){var a=Mo&&Mo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Mo&&Mo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Nj(),e),t(xB(),e),t(Oj(),e)})(Mo)),Mo}var jo={},ag={},fO;function xs(){return fO||(fO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(a){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service"})(a.Type||(a.Type={})),(function(t){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment"})(t.Worlds||(t.Worlds={})),(function(n){n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(t.Client||(t.Client={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.SocialService={}))})(a.SubType||(a.SubType={}))})(e.Events||(e.Events={}))})(ag)),ag}var ig={},pO;function $B(){return pO||(pO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const a=xe(),t=xs();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={}))})(ig)),ig}var og={},mO;function eU(){return mO||(mO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const a=gf(),t=xe(),n=Aj(),i=xs();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:a.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(og)),og}var sg={},hO;function tU(){return hO||(hO=1,Object.defineProperty(sg,"__esModule",{value:!0})),sg}var ug={},yO;function rU(){return yO||(yO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const a=xe(),t=xs();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MARKETPLACE},subType:{type:"string",const:t.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(ug)),ug}var lg={},ku={},gO;function nU(){if(gO)return ku;gO=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.createEventSchema=void 0;function e(a,t,n){return{type:"object",properties:{type:{type:"string",const:a},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return ku.createEventSchema=e,ku}var vO;function aU(){return vO||(vO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const a=xe(),t=xs(),n=nU(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},s={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(lg)),lg}var cg={},_O;function iU(){return _O||(_O=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const a=xe(),t=xs();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BADGE},subType:{type:"string",const:t.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"}},required:["entityId","platform","statusCode","isLods","isWorld"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]},message:{type:"string",nullable:!0}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={}))})(cg)),cg}var EO;function oU(){return EO||(EO=1,(function(e){var a=jo&&jo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=jo&&jo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(xs(),e),t($B(),e),t(eU(),e),t(tU(),e),t(rU(),e),t(aU(),e),t(iU(),e)})(jo)),jo}var bO;function PE(){return bO||(bO=1,(function(e){var a=No&&No.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=No&&No.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(BB(),e),t(FB(),e),t(Tj(),e),t(bE(),e),t(_j(),e),t(YB(),e),t(Aj(),e),t(XB(),e),t(QB(),e),t(ZB(),e),t(oU(),e)})(No)),No}var wO;function sU(){return wO||(wO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=yf(),t=Zo(),n=EE(),i=xe(),s=PE();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(yy)),yy}var SO;function uU(){return SO||(SO=1,(function(e){var a=Ao&&Ao.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ao&&Ao.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(kB(),e),t(sU(),e)})(Ao)),Ao}var TO;function lU(){return TO||(TO=1,(function(e){var a=To&&To.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=To&&To.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(DB(),e),t(uU(),e)})(To)),To}var Lo={},dg={},PO;function cU(){return PO||(PO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=xe();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(dg)),dg}var fg={},AO;function dU(){return AO||(AO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=xe(),t=Fn(),n=ha();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(fg)),fg}var pg={},mg={},NO;function vf(){return NO||(NO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=xe();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(mg)),mg}var OO;function fU(){return OO||(OO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=xe(),t=Fn(),n=ha(),i=vf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(pg)),pg}var hg={},yg={},IO;function Rj(){return IO||(IO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=xe(),t=Fn(),n=PE(),i=ha(),s=vf(),u=yf(),c=Zo();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:i.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(yg)),yg}var RO;function pU(){return RO||(RO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=xe(),t=Fn(),n=ha(),i=Rj(),s=vf();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(hg)),hg}var gg={},CO;function AE(){return CO||(CO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=xe();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(gg)),gg}var vg={},MO;function mU(){return MO||(MO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(vg)),vg}var _g={},jO;function hU(){return jO||(jO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=xe(),t=Fn(),n=ha();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(_g)),_g}var Eg={},LO;function yU(){return LO||(LO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Eg)),Eg}var bg={},DO;function gU(){return DO||(DO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=xe(),t=Fn(),n=AE(),i=ha();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(bg)),bg}var wg={},kO;function Cj(){return kO||(kO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=xe();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(wg)),wg}var Sg={},qO;function vU(){return qO||(qO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=xe(),t=Fn(),n=Cj(),i=ha();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(Sg)),Sg}var Tg={},BO;function _U(){return BO||(BO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=xe(),t=Fn(),n=ha();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Tg)),Tg}var Pg={},UO;function EU(){return UO||(UO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Pg)),Pg}var Ag={},FO;function bU(){return FO||(FO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Ag)),Ag}var Ng={},VO;function wU(){return VO||(VO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=xe();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Ng)),Ng}var Og={},HO;function SU(){return HO||(HO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=xe();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Og)),Og}var Ig={},zO;function TU(){return zO||(zO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=xe(),t=Fn(),n=AE(),i=ha();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const u={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};s.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},u.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...u.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Ig)),Ig}var Rg={},WO;function PU(){return WO||(WO=1,Object.defineProperty(Rg,"__esModule",{value:!0})),Rg}var Cg={},GO;function AU(){return GO||(GO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(a){a.BID="bid",a.PUBLIC_NFT_ORDER="public_nft_order",a.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(a){a[a.ERC20=1]="ERC20",a[a.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",a[a.ERC721=3]="ERC721",a[a.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(a){a.SENT="sent",a.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Cg)),Cg}var Do={},Mg={},KO;function NU(){return KO||(KO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=xe();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Mg)),Mg}var jg={},YO;function OU(){return YO||(YO=1,Object.defineProperty(jg,"__esModule",{value:!0})),jg}var Lg={},XO;function IU(){return XO||(XO=1,Object.defineProperty(Lg,"__esModule",{value:!0})),Lg}var Dg={},JO;function RU(){return JO||(JO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=xe();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Dg)),Dg}var kg={},QO;function CU(){return QO||(QO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=xe();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(kg)),kg}var qg={},xO;function MU(){return xO||(xO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const a=xe();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(qg)),qg}var Bg={},ZO;function jU(){return ZO||(ZO=1,Object.defineProperty(Bg,"__esModule",{value:!0})),Bg}var Ug={},$O;function LU(){return $O||($O=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=xe();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Ug)),Ug}var Fg={},eI;function DU(){return eI||(eI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=xe();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(Fg)),Fg}var Vg={},tI;function kU(){return tI||(tI=1,Object.defineProperty(Vg,"__esModule",{value:!0})),Vg}var Hg={},rI;function qU(){return rI||(rI=1,Object.defineProperty(Hg,"__esModule",{value:!0})),Hg}var zg={},nI;function BU(){return nI||(nI=1,Object.defineProperty(zg,"__esModule",{value:!0})),zg}var Wg={},aI;function UU(){return aI||(aI=1,Object.defineProperty(Wg,"__esModule",{value:!0})),Wg}var Gg={},iI;function FU(){return iI||(iI=1,Object.defineProperty(Gg,"__esModule",{value:!0})),Gg}var Kg={},oI;function VU(){return oI||(oI=1,Object.defineProperty(Kg,"__esModule",{value:!0})),Kg}var Yg={},sI;function HU(){return sI||(sI=1,Object.defineProperty(Yg,"__esModule",{value:!0})),Yg}var Xg={},uI;function zU(){return uI||(uI=1,Object.defineProperty(Xg,"__esModule",{value:!0})),Xg}var lI;function WU(){return lI||(lI=1,(function(e){var a=Do&&Do.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Do&&Do.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(NU(),e),t(OU(),e),t(IU(),e),t(RU(),e),t(CU(),e),t(MU(),e),t(jU(),e),t(LU(),e),t(DU(),e),t(kU(),e),t(qU(),e),t(BU(),e),t(UU(),e),t(FU(),e),t(VU(),e),t(HU(),e),t(zU(),e)})(Do)),Do}var ko={},qu={},cI;function GU(){if(cI)return qu;cI=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.isSysLink=void 0;const e=a=>a!==null&&typeof a=="object"&&"sys"in a&&"id"in a.sys;return qu.isSysLink=e,qu}var Bu={},dI;function KU(){if(dI)return Bu;dI=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.ContentfulLocale=void 0;var e;return(function(a){a.enUS="en-US",a.es="es",a.zh="zh"})(e||(e={})),Bu.ContentfulLocale=e,Bu}var Jg={},fI;function YU(){return fI||(fI=1,Object.defineProperty(Jg,"__esModule",{value:!0})),Jg}var pI;function XU(){return pI||(pI=1,(function(e){var a=ko&&ko.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=ko&&ko.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(GU(),e),t(KU(),e),t(YU(),e)})(ko)),ko}var mI;function JU(){return mI||(mI=1,(function(e){var a=Lo&&Lo.__createBinding||(Object.create?(function(Q,te,he,be){be===void 0&&(be=he);var Ie=Object.getOwnPropertyDescriptor(te,he);(!Ie||("get"in Ie?!te.__esModule:Ie.writable||Ie.configurable))&&(Ie={enumerable:!0,get:function(){return te[he]}}),Object.defineProperty(Q,be,Ie)}):(function(Q,te,he,be){be===void 0&&(be=he),Q[be]=te[he]})),t=Lo&&Lo.__exportStar||function(Q,te){for(var he in Q)he!=="default"&&!Object.prototype.hasOwnProperty.call(te,he)&&a(te,Q,he)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var n=cU();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=Fn();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var s=oj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var u=dU();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return u.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return u.CollectionSortBy}});var c=fU();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=pU();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=AE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var h=mU();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return h.MetaTransaction}});var m=hU();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return m.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return m.MintSortBy}});var v=ha();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return v.Network}});var T=vf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return T.NFTCategory}});var C=Rj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return C.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return C.NFTSortBy}});var N=yU();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return N.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return N.CatalogSortDirection}});var E=gU();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return E.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return E.OrderSortBy}});var R=sj();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return R.ProviderType}});var _=yf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return _.Rarity}});var O=Cj();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return O.SaleType}});var P=vU();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return P.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return P.SaleSortBy}});var y=_U();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return y.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return y.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return y.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return y.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return y.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return y.PeriodCreation}});var S=EU();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var M=bU();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return M.Store}});var U=wU();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return U.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return U.GenderFilterOption}});var V=SU();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return V.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return V.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return V.isInsideWorldLimits}}),t(TU(),e),t(PU(),e),t(AU(),e),t(WU(),e),t(XU(),e)})(Lo)),Lo}var Qg={},hI;function QU(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Qg)),Qg}var yI;function xU(){return yI||(yI=1,(function(e){var a=aa&&aa.__createBinding||(Object.create?(function(u,c,f,p){p===void 0&&(p=f);var h=Object.getOwnPropertyDescriptor(c,f);(!h||("get"in h?!c.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(u,p,h)}):(function(u,c,f,p){p===void 0&&(p=f),u[p]=c[f]})),t=aa&&aa.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),n=aa&&aa.__importStar||function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var f in u)f!=="default"&&Object.prototype.hasOwnProperty.call(u,f)&&a(c,u,f);return t(c,u),c},i=aa&&aa.__exportStar||function(u,c){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&a(c,u,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(lU());e.sdk=s,i(xe(),e),i(JU(),e),i(PE(),e),i($o(),e),i(QU(),e),i(gf(),e),i(Pj(),e),i(Ij(),e)})(aa)),aa}var Xs=xU();const ZU=Object.freeze({storageKey:"decentraland-connect-storage-key",[Ft.ProviderType.INJECTED]:{},[Ft.ProviderType.FORTMATIC]:{apiKeys:{[At.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[At.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:Ws(Ft.ProviderType.FORTMATIC)},[Ft.ProviderType.NETWORK]:{urls:Ws(Ft.ProviderType.NETWORK)},[Ft.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:Ws(Ft.ProviderType.WALLET_LINK)},[Ft.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:Ws(Ft.ProviderType.WALLET_CONNECT_V2),chains:{[At.ChainId.ETHEREUM_MAINNET]:{chains:[At.ChainId.ETHEREUM_MAINNET],optionalChains:[At.ChainId.MATIC_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.OPTIMISM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]},[At.ChainId.ETHEREUM_SEPOLIA]:{chains:[At.ChainId.ETHEREUM_SEPOLIA],optionalChains:[At.ChainId.MATIC_AMOY]}}},[Ft.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:Ws(Ft.ProviderType.MAGIC),chains:[At.ChainId.ETHEREUM_MAINNET,At.ChainId.ETHEREUM_SEPOLIA,At.ChainId.MATIC_MAINNET,At.ChainId.MATIC_AMOY,At.ChainId.OPTIMISM_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]},[Ft.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:Ws(Ft.ProviderType.MAGIC),chains:[At.ChainId.ETHEREUM_MAINNET,At.ChainId.ETHEREUM_SEPOLIA,At.ChainId.MATIC_MAINNET,At.ChainId.MATIC_AMOY,At.ChainId.OPTIMISM_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]}});function $a(){return ZU}function Ws(e){const a={[At.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[At.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[At.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[At.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[At.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[At.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[At.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[At.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[At.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let t="";switch(e){case Ft.ProviderType.WALLET_LINK:t="walletlink";break;case Ft.ProviderType.FORTMATIC:t="fortmatic";break;case Ft.ProviderType.MAGIC:t="magic";break;case Ft.ProviderType.MAGIC_TEST:t="magic";break;case Ft.ProviderType.WALLET_CONNECT_V2:t="walletconnect-v2";break;case Ft.ProviderType.AUTH_SERVER:t="auth-server";break}if(t)for(const n in a)a[n]+=`?project=${t}`;return a}class $U extends Qs{constructor(a){const t=$a()[Xs.ProviderType.FORTMATIC],n=Object.keys(t.apiKeys).map(i=>Number(i));if(!n.includes(a))throw new Error(`Invariant error: Unsupported chainId ${a}`);super({supportedChainIds:n}),this.apiKey=t.apiKeys[a],this.chainId=a,this.rpcUrl=t.urls[a]}async activate(){if(!this.fortmatic){const{default:t}=await gl(async()=>{const{default:n}=await import("./fortmatic-C1v37g-g.js").then(i=>i.f);return{default:n}},[]);this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const a=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:a}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(a=>a[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function H_(){return H_=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},H_.apply(this,arguments)}function NE(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,e.__proto__=a}function z_(e){return z_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},z_(e)}function ef(e,a){return ef=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ef(e,a)}function eF(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Qd(e,a,t){return eF()?Qd=Reflect.construct:Qd=function(i,s,u){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(i,c),p=new f;return u&&ef(p,u.prototype),p},Qd.apply(null,arguments)}function tF(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function tf(e){var a=typeof Map=="function"?new Map:void 0;return tf=function(n){if(n===null||!tF(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(n))return a.get(n);a.set(n,i)}function i(){return Qd(n,arguments,z_(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ef(i,n)},tf(e)}function Bd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function Gs(e,a){try{var t=e()}catch(n){return a(n)}return t&&t.then?t.then(void 0,a):t}function Ra(e){return e.hasOwnProperty("result")?e.result:e}var xg=(function(e){NE(a,e);function a(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="No Ethereum provider was found on window.ethereum.",t}return a})(tf(Error)),rF=(function(e){NE(a,e);function a(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="The user rejected the request.",t}return a})(tf(Error)),nF=(function(e){NE(a,e);function a(n){var i;return i=e.call(this,n)||this,i.handleNetworkChanged=i.handleNetworkChanged.bind(Bd(i)),i.handleChainChanged=i.handleChainChanged.bind(Bd(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(Bd(i)),i.handleClose=i.handleClose.bind(Bd(i)),i}var t=a.prototype;return t.handleChainChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},t.handleAccountsChanged=function(i){i.length===0?this.emitDeactivate():this.emitUpdate({account:i[0]})},t.handleClose=function(i,s){this.emitDeactivate()},t.handleNetworkChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},t.activate=function(){try{var i=function(h){if(s)return h;function m(){return H_({provider:window.ethereum},c?{account:c}:{})}var v=(function(){if(!c)return Promise.resolve(window.ethereum.enable().then(function(T){return T&&Ra(T)[0]})).then(function(T){c=T})})();return v&&v.then?v.then(m):m(v)},s=!1,u=this;if(!window.ethereum)throw new xg;window.ethereum.on&&(window.ethereum.on("chainChanged",u.handleChainChanged),window.ethereum.on("accountsChanged",u.handleAccountsChanged),window.ethereum.on("close",u.handleClose),window.ethereum.on("networkChanged",u.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var c,f=Gs(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(p){return Ra(p)[0]})).then(function(p){c=p})},function(p){if(p.code===4001)throw new rF});return Promise.resolve(f&&f.then?f.then(i):i(f))}catch(p){return Promise.reject(p)}},t.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(i){return Promise.reject(i)}},t.getChainId=function(){try{var i=function(){function f(){if(!s)try{s=Ra(window.ethereum.send({method:"net_version"}))}catch{}return s||(window.ethereum.isDapper?s=Ra(window.ethereum.cachedResults.net_version):s=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),s}var p=(function(){if(!s){var h=Gs(function(){return Promise.resolve(window.ethereum.send("net_version").then(Ra)).then(function(m){s=m})},function(){});if(h&&h.then)return h.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new xg;var s,u=Gs(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(Ra)).then(function(c){s=c})},function(){});return Promise.resolve(u&&u.then?u.then(i):i(u))}catch(c){return Promise.reject(c)}},t.getAccount=function(){try{var i=function(){function f(){return s||(s=Ra(window.ethereum.send({method:"eth_accounts"}))[0]),s}var p=(function(){if(!s){var h=Gs(function(){return Promise.resolve(window.ethereum.enable().then(function(m){return Ra(m)[0]})).then(function(m){s=m})},function(){});if(h&&h.then)return h.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new xg;var s,u=Gs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(c){return Ra(c)[0]})).then(function(c){s=c})},function(){});return Promise.resolve(u&&u.then?u.then(i):i(u))}catch(c){return Promise.reject(c)}},t.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},t.isAuthorized=function(){try{return window.ethereum?Promise.resolve(Gs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(i){return Ra(i).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(i){return Promise.reject(i)}},a})(Qs);class aF extends Error{constructor(){super("There was an error unlocking your wallet. Please be sure your wallet is unlocked and try again."),this.name="ErrorUnlockingWallet"}}const iF=60*1e3;class oF extends nF{constructor(a){super({supportedChainIds:[a]})}async activate(){const a=new Promise((n,i)=>{setTimeout(()=>{i(new aF)},iF)}),t=super.activate();return Promise.race([t,a])}}var sF="Invariant failed";function gI(e,a){throw new Error(sF)}function Mj(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,vl(e,a)}function W_(e){return W_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},W_(e)}function vl(e,a){return vl=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},vl(e,a)}function uF(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function xd(e,a,t){return uF()?xd=Reflect.construct:xd=function(i,s,u){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(i,c),p=new f;return u&&vl(p,u.prototype),p},xd.apply(null,arguments)}function lF(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function G_(e){var a=typeof Map=="function"?new Map:void 0;return G_=function(n){if(n===null||!lF(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(n))return a.get(n);a.set(n,i)}function i(){return xd(n,arguments,W_(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),vl(i,n)},G_(e)}var Zg=(function(e){Mj(a,e);function a(t,n,i){var s;return s=e.call(this)||this,s.code=n,s.data=i,s.name=s.constructor.name,s.message=t,s}return a})(G_(Error)),cF=function(a,t){var n=this,i=this;this.isMetaMask=!1,this.sendAsync=function(u,c){console.log("sendAsync",u.method,u.params),i.request(u.method,u.params).then(function(f){return c(null,{jsonrpc:"2.0",id:u.id,result:f})}).catch(function(f){return c(f,null)})},this.request=function(u,c){try{return typeof u!="string"&&(c=u.params,u=u.method),Promise.resolve(fetch(n.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:u,params:c}),headers:{"Content-Type":"application/json"}})).then(function(f){if(!f.ok)throw new Zg(f.status+": "+f.statusText,-32e3);return Promise.resolve(f.json()).then(function(p){if("error"in p){var h,m,v;throw new Zg(p==null||(h=p.error)==null?void 0:h.message,p==null||(m=p.error)==null?void 0:m.code,p==null||(v=p.error)==null?void 0:v.data)}else{if("result"in p)return p.result;throw new Zg("Received unexpected JSON-RPC response to "+u+" request.",-32e3,p)}})})}catch(f){return Promise.reject(f)}},this.chainId=a,this.url=t;var s=new URL(t);this.host=s.host,this.path=s.pathname},dF=(function(e){Mj(a,e);function a(n){var i,s=n.urls,u=n.defaultChainId;return u||Object.keys(s).length===1||gI(),i=e.call(this,{supportedChainIds:Object.keys(s).map(function(c){return Number(c)})})||this,i.currentChainId=u||Number(Object.keys(s)[0]),i.providers=Object.keys(s).reduce(function(c,f){return c[Number(f)]=new cF(Number(f),s[Number(f)]),c},{}),i}var t=a.prototype;return t.activate=function(){try{var i=this;return Promise.resolve({provider:i.providers[i.currentChainId],chainId:i.currentChainId,account:null})}catch(s){return Promise.reject(s)}},t.getProvider=function(){try{var i=this;return Promise.resolve(i.providers[i.currentChainId])}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var i=this;return Promise.resolve(i.currentChainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){return Promise.resolve(null)},t.deactivate=function(){},t.changeChainId=function(i){Object.keys(this.providers).includes(i.toString())||gI(),this.currentChainId=i,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:i})},a})(Qs);class fF extends dF{constructor(a){super({urls:$a()[Ft.ProviderType.NETWORK].urls,defaultChainId:a})}}function K_(){return K_=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},K_.apply(this,arguments)}function pF(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,Y_(e,a)}function Y_(e,a){return Y_=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Y_(e,a)}function vI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var mF=1,hF=(function(e){pF(a,e);function a(n){var i,s=n.url,u=n.appName,c=n.appLogoUrl,f=n.darkMode,p=n.supportedChainIds;return i=e.call(this,{supportedChainIds:p})||this,i.url=s,i.appName=u,i.appLogoUrl=c,i.darkMode=f||!1,i.handleChainChanged=i.handleChainChanged.bind(vI(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(vI(i)),i}var t=a.prototype;return t.activate=function(){try{var i=this,s=function(){return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(f){var p=f[0];return i.provider.on("chainChanged",i.handleChainChanged),i.provider.on("accountsChanged",i.handleAccountsChanged),{provider:i.provider,account:p}})},u=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)i.provider=window.ethereum;else{var c=(function(){if(!i.walletLink)return Promise.resolve(gl(()=>import("./index-C7nnvuPN.js").then(f=>f.i),[]).then(function(f){var p;return(p=f?.default)!=null?p:f})).then(function(f){i.walletLink=new f(K_({appName:i.appName,darkMode:i.darkMode},i.appLogoUrl?{appLogoUrl:i.appLogoUrl}:{})),i.provider=i.walletLink.makeWeb3Provider(i.url,mF)})})();if(c&&c.then)return c.then(function(){})}})();return Promise.resolve(u&&u.then?u.then(s):s(u))}catch(c){return Promise.reject(c)}},t.getProvider=function(){try{var i=this;return Promise.resolve(i.provider)}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var i=this;return Promise.resolve(i.provider.chainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){try{var i=this;return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(s){return s[0]})}catch(s){return Promise.reject(s)}},t.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},t.close=function(){try{var i=this;return i.provider.close(),i.emitDeactivate(),Promise.resolve()}catch(s){return Promise.reject(s)}},t.handleChainChanged=function(i){this.emitUpdate({chainId:i})},t.handleAccountsChanged=function(i){this.emitUpdate({account:i[0]})},a})(Qs);class yF extends hF{constructor(a){const t=$a()[Xs.ProviderType.WALLET_LINK];super({url:t.urls[a],appName:t.appName,supportedChainIds:[a]})}}class Ma extends Qs{constructor(a){super({supportedChainIds:(()=>{const{chains:t,optionalChains:n}=Ma.configuration.chains[a];return[...t,...n]})()}),this.desiredChainId=a,this.activate=async()=>{const t=await gl(()=>import("./index-CoHVvg9C.js").then(i=>i.R),[]).then(i=>{const{chains:s,optionalChains:u}=Ma.configuration.chains[this.desiredChainId];return i.default.init({projectId:Ma.configuration.projectId,rpcMap:Ma.configuration.urls,chains:s,optionalChains:u,showQrModal:!0,disableProviderPing:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"3000"}},methods:["eth_sendTransaction","personal_sign"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sign","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],events:["chainChanged","accountsChanged"],optionalEvents:["disconnect"]})}),n=await t.enable();return t.on("accountsChanged",this.handleAccountsChanged),t.on("chainChanged",this.handleChainChanged),t.on("disconnect",this.handleDisconnect),this.provider=t,{chainId:t.chainId,account:n[0],provider:t}},this.getProvider=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider},this.getChainId=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.chainId},this.getAccount=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.accounts[0]},this.getWalletName=()=>this.provider?.session?.peer.metadata.name,this.deactivate=()=>{},this.close=async()=>{if(this.provider)return this.provider.removeListener("accountsChanged",this.handleAccountsChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("disconnect",this.handleDisconnect).disconnect()},this.handleAccountsChanged=t=>{this.emitUpdate({account:t[0]})},this.handleChainChanged=t=>{this.emitUpdate({chainId:t})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");return this.emitDeactivate()}}}Ma.configuration=$a()[Xs.ProviderType.WALLET_CONNECT_V2];Ma.clearStorage=e=>{e.removeRegExp(new RegExp("^wc@2:"))};class jj extends Qs{constructor(a,t=!1){super({supportedChainIds:$a()[Xs.ProviderType.MAGIC].chains}),this.isTest=t,this.activate=async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const i=await this.getProvider(),s=await i.request({method:"eth_accounts"});return this.account=s[0]??null,{provider:i,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const n=await this.magic.wallet.getProvider();return{...n,isMagic:!0,request:new Proxy(n.request,{apply:async(i,s,u)=>{if(u[0]?.method==="wallet_switchEthereumChain")try{const c=parseInt(u[0]?.params[0]?.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(c)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(c),this.emitUpdate({chainId:c}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return i.bind(n)(...u)}}),sendAsync:new Proxy(n.send,{apply:async(i,s,u)=>i.bind(n)(...u)})}},this.getChainId=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId},this.getAccount=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account},this.deactivate=()=>{},this.buildMagicInstance=async n=>{const{Magic:i}=await gl(async()=>{const{Magic:c}=await import("./index-8e4wv-tH.js");return{Magic:c}},__vite__mapDeps([0,1])),{OAuthExtension:s}=await gl(async()=>{const{OAuthExtension:c}=await import("./index-QHMvomuf.js");return{OAuthExtension:c}},__vite__mapDeps([2,1])),u=$a()[this.isTest?Xs.ProviderType.MAGIC_TEST:Xs.ProviderType.MAGIC];return new i(u.apiKey,{extensions:[new s],network:{rpcUrl:u.urls[n],chainId:n}})},this.chainId=a,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class gF extends jj{constructor(a){super(a,!0)}}class vF{}class _F extends vF{get(a){const t=window.localStorage.getItem(a);return t===null?void 0:t}set(a,t){window.localStorage.setItem(a,t)}remove(a){window.localStorage.removeItem(a)}removeRegExp(a){for(let t=localStorage.length-1;t>=0;t--){const n=localStorage.key(t);n&&a.test(n)&&localStorage.removeItem(n)}}}class rf{constructor(a){this.provider=a,this.id=0,this.on=(t,n)=>this.provider.on(t,n),this.emit=(t,...n)=>this.provider.emit(t,n),this.removeListener=(t,n)=>this.provider.removeListener(t,n),this.request=async({method:t,params:n})=>this.isModernProvider()?this.provider.request({method:t,params:n}):this.send(t,n),this.sendAsync=async(t,n)=>this.hasSendAsync()?this.provider.sendAsync(t,(i,s)=>{s&&!s.hasOwnProperty("result")?n(i,{id:0,jsonrpc:"2.0",result:s}):n(i,s)}):this.send(t,n)}static adapt(a){const t=new rf(a);return{...a,on:t.on,emit:t.emit,removeListener:t.removeListener,request:t.request,sendAsync:t.sendAsync,send:t.send.bind(t)}}async send(a,t){let n,i,s;const u=typeof t=="function";if(u){const c=a;i=c.params||[],n=c.method,s=t}else n=a,i=t||[],s=(c,f)=>{if(c)throw c;return f};if(this.isModernProvider()){const[c,f]=await this.provider.request({method:n,params:i}).then(h=>[null,h]).catch(h=>[h,void 0]);return s(c,u?{id:"",jsonrpc:"2.0",result:f}:f)}else{this.patchOldMobile();const[c,f]=u?await new Promise(p=>this.provider.send(a,(h,m)=>{p([h,m])})):await new Promise(p=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:n,params:i},(h,m)=>{p([m&&m.hasOwnProperty("error")?m.error:h,m&&m.hasOwnProperty("result")?m.result:m])}));return s(c,f)}}isModernProvider(){return typeof this.provider.request=="function"}hasSendAsync(){return typeof this.provider.sendAsync=="function"}patchOldMobile(){this.provider&&!this.provider.isDapper&&!this.provider.isFortmatic&&!this.provider.isMetamask&&this.hasSendAsync()&&this.provider.send!==this.provider.sendAsync&&(this.provider.send=this.provider.sendAsync)}}class EF{constructor(a){this.storage=a,this.getWalletName=()=>{if(this.connector instanceof Ma)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:t}=$a();this.storage.remove(t),Ma.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=async()=>{try{await this.disconnect()}catch(t){console.error(t)}}}async connect(a,t=At.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(c){console.error("Error disconnecting previous connection",c)}const n=this.buildConnector(a,t);n.on(xa.Deactivate,this.handleWeb3ReactDeactivate);let{provider:i,account:s}={};try{const c=await n.activate();i=c.provider,s=c.account}catch(c){throw console.error("Error activating the connector",c),c}(a===Ft.ProviderType.MAGIC||a===Ft.ProviderType.MAGIC_TEST)&&n.on(xa.Update,({chainId:c})=>{c&&this.setConnectionData(a,c)});let u=t;if(a===Ft.ProviderType.INJECTED){const c=await i.request({method:"eth_chainId"});u=c?parseInt(c,16):u}return this.connector=n,this.setConnectionData(a,u),{provider:rf.adapt(i),providerType:a,account:s||"",chainId:u}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const a=this.getConnectionData();if(!a)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");if(this.connector)return{provider:await this.connector.getProvider(),providerType:a.providerType,chainId:a.chainId,account:await this.connector.getAccount()};const t=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(a.providerType,a.chainId));return this.promiseOfConnection=void 0,{...t,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const a=[Ft.ProviderType.FORTMATIC,Ft.ProviderType.WALLET_CONNECT,Ft.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?a.unshift(Ft.ProviderType.INJECTED):a.unshift(Ft.ProviderType.METAMASK_MOBILE),a}async disconnect(){this.connector&&(this.connector.removeAllListeners(xa.Deactivate),this.connector.removeAllListeners(xa.Update),this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async createProvider(a,t=At.ChainId.ETHEREUM_MAINNET){const i=await this.buildConnector(a,t).getProvider();return rf.adapt(i)}buildConnector(a,t){switch(a){case Ft.ProviderType.INJECTED:return new oF(t);case Ft.ProviderType.FORTMATIC:return new $U(t);case Ft.ProviderType.MAGIC:return new jj(t);case Ft.ProviderType.MAGIC_TEST:return new gF(t);case Ft.ProviderType.WALLET_LINK:return new yF(t);case Ft.ProviderType.NETWORK:return new fF(t);case Ft.ProviderType.WALLET_CONNECT_V2:return new Ma(t);default:throw new Error(`Invalid provider ${a}`)}}getConnectionData(){const{storageKey:a}=$a(),t=this.storage.get(a);return t?JSON.parse(t):void 0}setConnectionData(a,t){const{storageKey:n}=$a(),i=JSON.stringify({providerType:a,chainId:t});this.storage.set(n,i)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}const $g=new EF(new _F),bF=e=>/^decentraland.(zone|org|today)$/.test(e),wF=async(e,a="https://peer.decentraland.org")=>{try{const n=await(await fetch(`${a}/lambdas/profiles`,{method:"POST",body:JSON.stringify({ids:[e]})})).json();return n.length>0&&n[0]?.avatars?.length>0?n[0].avatars[0]:void 0}catch(t){console.error("Error fetching avatar:",t);return}},SF=e=>({shouldUseBasePath:bF,fetchAvatar:a=>wF(a),...e,debug:e.debug??!1}),TF=e=>({[Bn.ChainId.ETHEREUM_MAINNET]:"Ethereum Mainnet",[Bn.ChainId.ETHEREUM_SEPOLIA]:"Ethereum Sepolia",[Bn.ChainId.MATIC_MAINNET]:"Polygon Mainnet",[Bn.ChainId.MATIC_AMOY]:"Polygon Amoy"})[e]||`Chain ID ${e}`,PF=e=>{const a="0x"+e.toString(16),t=TF(e);switch(e){case Bn.ChainId.MATIC_MAINNET:return{chainId:a,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-mainnet.maticvigil.com/"],blockExplorerUrls:["https://polygonscan.com/"]};case Bn.ChainId.MATIC_AMOY:return{chainId:a,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-amoy.polygon.technology/"],blockExplorerUrls:["https://www.oklink.com/amoy"]};case Bn.ChainId.ETHEREUM_SEPOLIA:return{chainId:a,chainName:t,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.infura.io/v3/"],blockExplorerUrls:["https://sepolia.etherscan.io"]};default:return{chainId:"0x1",chainName:"Ethereum Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.infura.io/v3/"],blockExplorerUrls:["https://etherscan.io"]}}},_I=async e=>{const a=await e.request({method:"eth_chainId"});return parseInt(a,16)},Xr=(e,a,t=!1)=>{t&&typeof console<"u"&&console.log(`[Auth] ${e}`,a||"")},AF=(e,a,t)=>{const i=new URLSearchParams(t).get("redirectTo"),s=e.shouldUseBasePath?.(window.location.host)?e.basePath:"",u=i?`${s}${i}`:`${s}${a}${t}`;return`${e.authUrl}/login?redirectTo=${encodeURIComponent(window.location.origin+u)}`},Lj=H.createContext(void 0),NF=({children:e,config:a})=>{const{pathname:t,search:n}=Ii(),i=H.useMemo(()=>SF(a),[a]),[s,u]=H.useState(),[c,f]=H.useState(),[p,h]=H.useState(!1),[m,v]=H.useState(!1),[T,C]=H.useState(i.defaultChainId),N=H.useCallback(()=>{Xr("Initiating sign in",{pathname:t,search:n},i.debug);const O=AF(i,t,n);Xr("Redirecting to auth",{redirectUrl:O},i.debug),window.location.replace(O)},[t,n,i]),E=H.useCallback(()=>{try{Xr("Signing out",{wallet:s},i.debug),$g.disconnect(),s&&V_.localStorageClearIdentity(s),u(void 0),f(void 0),h(!1),Xr("Sign out completed",void 0,i.debug)}catch(O){console.error("Error during sign-out:",O)}},[s,i.debug]),R=H.useCallback(async(O=Bn.ChainId.ETHEREUM_MAINNET)=>{try{Xr("Changing network",{from:T,to:O},i.debug);const P=await $g.getProvider();if(!P){console.error("No provider available to switch network"),C(Bn.ChainId.ETHEREUM_MAINNET);return}C(O);try{await P.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+O.toString(16)}]});const y=await _I(P);y!==O&&console.warn("Chain ID did not change as expected"),Xr("Network changed successfully",{chainId:y},i.debug)}catch(y){const S=y;S.code===4902?(Xr("Adding new chain to wallet",{chainId:O},i.debug),await P.request({method:"wallet_addEthereumChain",params:[PF(O)]}),await _I(P)!==O&&(console.warn("Chain ID not set after adding network"),C(Bn.ChainId.ETHEREUM_MAINNET))):(console.error("Error switching network:",S),C(Bn.ChainId.ETHEREUM_MAINNET))}}catch(P){console.error("Error during network change:",P),C(Bn.ChainId.ETHEREUM_MAINNET)}},[T,i.debug]);H.useEffect(()=>{(async()=>{try{v(!0),Xr("Checking auth status",void 0,i.debug);try{const{account:P,chainId:y}=await $g.tryPreviousConnection();if(P){Xr("Previous connection found",{address:P,chainId:y},i.debug),u(P),C(y);let S=!1;try{const M=V_.localStorageGetIdentity(P);if(M&&M.expiration){const U=new Date(M.expiration),V=new Date;V.getTime()<=U.getTime()?(Xr("Identity valid",{expiration:U},i.debug),S=!0):Xr("Identity expired",{expiration:U,now:V},i.debug)}else Xr("No identity found",void 0,i.debug)}catch(M){console.error("Error checking identity:",M)}if(h(S),S&&i.fetchAvatar)try{Xr("Fetching avatar",{address:P},i.debug);const M=await i.fetchAvatar(P);M&&(f(M),Xr("Avatar fetched successfully",M,i.debug))}catch(M){console.error("Error fetching avatar:",M)}}else Xr("No previous connection found",void 0,i.debug)}catch(P){Xr("Previous connection failed",P,i.debug)}}catch(P){console.error("Error checking auth status:",P)}finally{v(!1)}})()},[i.debug,i.fetchAvatar]);const _={wallet:s,avatar:c,chainId:T,isSignedIn:p,isConnecting:m,signIn:N,signOut:E,changeNetwork:R};return j.jsx(Lj.Provider,{value:_,children:e})},Ol=e=>{const a=H.useContext(Lj);if(a===void 0)throw new Error("useAuth must be used within an AuthProvider");return a};var qo={},oa={},pl={exports:{}};var OF=pl.exports,EI;function _f(){return EI||(EI=1,(function(e,a){(function(t,n){n(a)})(OF,(function(t){function n(b){if(b.jsonrpc="2.0",!b.id||typeof b.id!="number"||Math.floor(b.id)!==b.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(b)}`);if(!b.method||typeof b.method!="string"||b.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(b)}`);if(!b.params||typeof b.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(b)}`);return b}var i={};function s(){let b,I;const q=new Promise(((J,re)=>{b=oe=>{J(oe),q.isPending=!1},I=oe=>{re(oe),q.isPending=!1}})).catch((J=>Promise.reject(J)));return q.resolve=b,q.reject=I,"finally"in q||(q.finally=J=>{q.then(J),q.catch(J)}),q.isPending=!0,q}Object.defineProperty(i,"__esModule",{value:!0});var u=i.future=s;i.default=s;var c={exports:{}};(function(b){(function(){var I="input is invalid type",q=typeof window=="object",J=q?window:{};J.JS_SHA3_NO_WINDOW&&(q=!1);var re=!q&&typeof self=="object";!J.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?J=ED:re&&(J=self);var oe=!J.JS_SHA3_NO_COMMON_JS&&b.exports,Ce=!J.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ze="0123456789abcdef".split(""),st=[4,1024,262144,67108864],ct=[0,8,16,24],gr=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],Xt=[224,256,384,512],Ke=[128,256],Tr=["hex","buffer","arrayBuffer","array","digest"],Jt={128:168,256:136};!J.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(w){return Object.prototype.toString.call(w)==="[object Array]"}),!Ce||!J.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(w){return typeof w=="object"&&w.buffer&&w.buffer.constructor===ArrayBuffer});for(var Ht=function(w,W,Z){return function(Y){return new Bt(w,W,w).update(Y)[Z]()}},Ir=function(w,W,Z){return function(Y,ne){return new Bt(w,W,ne).update(Y)[Z]()}},On=function(w,W,Z){return function(Y,ne,ee,ie){return lr["cshake"+w].update(Y,ne,ee,ie)[Z]()}},Zr=function(w,W,Z){return function(Y,ne,ee,ie){return lr["kmac"+w].update(Y,ne,ee,ie)[Z]()}},Pr=function(w,W,Z,Y){for(var ne=0;ne<Tr.length;++ne){var ee=Tr[ne];w[ee]=W(Z,Y,ee)}return w},In=function(w,W){var Z=Ht(w,W,"hex");return Z.create=function(){return new Bt(w,W,w)},Z.update=function(Y){return Z.create().update(Y)},Pr(Z,Ht,w,W)},on=[{name:"keccak",padding:[1,256,65536,16777216],bits:Xt,createMethod:In},{name:"sha3",padding:[6,1536,393216,100663296],bits:Xt,createMethod:In},{name:"shake",padding:[31,7936,2031616,520093696],bits:Ke,createMethod:function(w,W){var Z=Ir(w,W,"hex");return Z.create=function(Y){return new Bt(w,W,Y)},Z.update=function(Y,ne){return Z.create(ne).update(Y)},Pr(Z,Ir,w,W)}},{name:"cshake",padding:st,bits:Ke,createMethod:function(w,W){var Z=Jt[w],Y=On(w,0,"hex");return Y.create=function(ne,ee,ie){return ee||ie?new Bt(w,W,ne).bytepad([ee,ie],Z):lr["shake"+w].create(ne)},Y.update=function(ne,ee,ie,ye){return Y.create(ee,ie,ye).update(ne)},Pr(Y,On,w,W)}},{name:"kmac",padding:st,bits:Ke,createMethod:function(w,W){var Z=Jt[w],Y=Zr(w,0,"hex");return Y.create=function(ne,ee,ie){return new pr(w,W,ee).bytepad(["KMAC",ie],Z).bytepad([ne],Z)},Y.update=function(ne,ee,ie,ye){return Y.create(ne,ie,ye).update(ee)},Pr(Y,Zr,w,W)}}],lr={},zr=[],vr=0;vr<on.length;++vr)for(var Rn=on[vr],Ve=Rn.bits,yn=0;yn<Ve.length;++yn){var zn=Rn.name+"_"+Ve[yn];if(zr.push(zn),lr[zn]=Rn.createMethod(Ve[yn],Rn.padding),Rn.name!=="sha3"){var Ea=Rn.name+Ve[yn];zr.push(Ea),lr[Ea]=lr[zn]}}function Bt(w,W,Z){this.blocks=[],this.s=[],this.padding=W,this.outputBits=Z,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(w<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Z>>5,this.extraBytes=(31&Z)>>3;for(var Y=0;Y<50;++Y)this.s[Y]=0}function pr(w,W,Z){Bt.call(this,w,W,Z)}Bt.prototype.update=function(w){if(this.finalized)throw new Error("finalize already called");var W,Z=typeof w;if(Z!=="string"){if(Z!=="object")throw new Error(I);if(w===null)throw new Error(I);if(Ce&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||Ce&&ArrayBuffer.isView(w)))throw new Error(I);W=!0}for(var Y,ne,ee=this.blocks,ie=this.byteCount,ye=w.length,_e=this.blockCount,ve=0,Ye=this.s;ve<ye;){if(this.reset)for(this.reset=!1,ee[0]=this.block,Y=1;Y<_e+1;++Y)ee[Y]=0;if(W)for(Y=this.start;ve<ye&&Y<ie;++ve)ee[Y>>2]|=w[ve]<<ct[3&Y++];else for(Y=this.start;ve<ye&&Y<ie;++ve)(ne=w.charCodeAt(ve))<128?ee[Y>>2]|=ne<<ct[3&Y++]:ne<2048?(ee[Y>>2]|=(192|ne>>6)<<ct[3&Y++],ee[Y>>2]|=(128|63&ne)<<ct[3&Y++]):ne<55296||ne>=57344?(ee[Y>>2]|=(224|ne>>12)<<ct[3&Y++],ee[Y>>2]|=(128|ne>>6&63)<<ct[3&Y++],ee[Y>>2]|=(128|63&ne)<<ct[3&Y++]):(ne=65536+((1023&ne)<<10|1023&w.charCodeAt(++ve)),ee[Y>>2]|=(240|ne>>18)<<ct[3&Y++],ee[Y>>2]|=(128|ne>>12&63)<<ct[3&Y++],ee[Y>>2]|=(128|ne>>6&63)<<ct[3&Y++],ee[Y>>2]|=(128|63&ne)<<ct[3&Y++]);if(this.lastByteIndex=Y,Y>=ie){for(this.start=Y-ie,this.block=ee[_e],Y=0;Y<_e;++Y)Ye[Y]^=ee[Y];G(Ye),this.reset=!0}else this.start=Y}return this},Bt.prototype.encode=function(w,W){var Z=255&w,Y=1,ne=[Z];for(Z=255&(w>>=8);Z>0;)ne.unshift(Z),Z=255&(w>>=8),++Y;return W?ne.push(Y):ne.unshift(Y),this.update(ne),ne.length},Bt.prototype.encodeString=function(w){var W,Z=typeof w;if(Z!=="string"){if(Z!=="object")throw new Error(I);if(w===null)throw new Error(I);if(Ce&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||Ce&&ArrayBuffer.isView(w)))throw new Error(I);W=!0}var Y=0,ne=w.length;if(W)Y=ne;else for(var ee=0;ee<w.length;++ee){var ie=w.charCodeAt(ee);ie<128?Y+=1:ie<2048?Y+=2:ie<55296||ie>=57344?Y+=3:(ie=65536+((1023&ie)<<10|1023&w.charCodeAt(++ee)),Y+=4)}return Y+=this.encode(8*Y),this.update(w),Y},Bt.prototype.bytepad=function(w,W){for(var Z=this.encode(W),Y=0;Y<w.length;++Y)Z+=this.encodeString(w[Y]);var ne=W-Z%W,ee=[];return ee.length=ne,this.update(ee),this},Bt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var w=this.blocks,W=this.lastByteIndex,Z=this.blockCount,Y=this.s;if(w[W>>2]|=this.padding[3&W],this.lastByteIndex===this.byteCount)for(w[0]=w[Z],W=1;W<Z+1;++W)w[W]=0;for(w[Z-1]|=2147483648,W=0;W<Z;++W)Y[W]^=w[W];G(Y)}},Bt.prototype.toString=Bt.prototype.hex=function(){this.finalize();for(var w,W=this.blockCount,Z=this.s,Y=this.outputBlocks,ne=this.extraBytes,ee=0,ie=0,ye="";ie<Y;){for(ee=0;ee<W&&ie<Y;++ee,++ie)w=Z[ee],ye+=ze[w>>4&15]+ze[15&w]+ze[w>>12&15]+ze[w>>8&15]+ze[w>>20&15]+ze[w>>16&15]+ze[w>>28&15]+ze[w>>24&15];ie%W==0&&(G(Z),ee=0)}return ne&&(w=Z[ee],ye+=ze[w>>4&15]+ze[15&w],ne>1&&(ye+=ze[w>>12&15]+ze[w>>8&15]),ne>2&&(ye+=ze[w>>20&15]+ze[w>>16&15])),ye},Bt.prototype.arrayBuffer=function(){this.finalize();var w,W=this.blockCount,Z=this.s,Y=this.outputBlocks,ne=this.extraBytes,ee=0,ie=0,ye=this.outputBits>>3;w=ne?new ArrayBuffer(Y+1<<2):new ArrayBuffer(ye);for(var _e=new Uint32Array(w);ie<Y;){for(ee=0;ee<W&&ie<Y;++ee,++ie)_e[ie]=Z[ee];ie%W==0&&G(Z)}return ne&&(_e[ee]=Z[ee],w=w.slice(0,ye)),w},Bt.prototype.buffer=Bt.prototype.arrayBuffer,Bt.prototype.digest=Bt.prototype.array=function(){this.finalize();for(var w,W,Z=this.blockCount,Y=this.s,ne=this.outputBlocks,ee=this.extraBytes,ie=0,ye=0,_e=[];ye<ne;){for(ie=0;ie<Z&&ye<ne;++ie,++ye)w=ye<<2,W=Y[ie],_e[w]=255&W,_e[w+1]=W>>8&255,_e[w+2]=W>>16&255,_e[w+3]=W>>24&255;ye%Z==0&&G(Y)}return ee&&(w=ye<<2,W=Y[ie],_e[w]=255&W,ee>1&&(_e[w+1]=W>>8&255),ee>2&&(_e[w+2]=W>>16&255)),_e},pr.prototype=new Bt,pr.prototype.finalize=function(){return this.encode(this.outputBits,!0),Bt.prototype.finalize.call(this)};var G=function(w){var W,Z,Y,ne,ee,ie,ye,_e,ve,Ye,ht,gt,It,Qt,$t,jt,Ut,nr,Wn,ba,wa,qr,Cn,Er,mr,xt,is,os,oi,ss,us,ls,Di,cs,ds,fs,ps,ms,hs,ys,si,Sa,gs,ki,qi,Bi,Ui,Fi,Gn,vs,_s,Es,Vi,Hi,Ta,Pa,bs,qa,ws,zi,ui,li,Wi;for(Y=0;Y<48;Y+=2)ne=w[0]^w[10]^w[20]^w[30]^w[40],ee=w[1]^w[11]^w[21]^w[31]^w[41],ie=w[2]^w[12]^w[22]^w[32]^w[42],ye=w[3]^w[13]^w[23]^w[33]^w[43],_e=w[4]^w[14]^w[24]^w[34]^w[44],ve=w[5]^w[15]^w[25]^w[35]^w[45],Ye=w[6]^w[16]^w[26]^w[36]^w[46],ht=w[7]^w[17]^w[27]^w[37]^w[47],W=(gt=w[8]^w[18]^w[28]^w[38]^w[48])^(ie<<1|ye>>>31),Z=(It=w[9]^w[19]^w[29]^w[39]^w[49])^(ye<<1|ie>>>31),w[0]^=W,w[1]^=Z,w[10]^=W,w[11]^=Z,w[20]^=W,w[21]^=Z,w[30]^=W,w[31]^=Z,w[40]^=W,w[41]^=Z,W=ne^(_e<<1|ve>>>31),Z=ee^(ve<<1|_e>>>31),w[2]^=W,w[3]^=Z,w[12]^=W,w[13]^=Z,w[22]^=W,w[23]^=Z,w[32]^=W,w[33]^=Z,w[42]^=W,w[43]^=Z,W=ie^(Ye<<1|ht>>>31),Z=ye^(ht<<1|Ye>>>31),w[4]^=W,w[5]^=Z,w[14]^=W,w[15]^=Z,w[24]^=W,w[25]^=Z,w[34]^=W,w[35]^=Z,w[44]^=W,w[45]^=Z,W=_e^(gt<<1|It>>>31),Z=ve^(It<<1|gt>>>31),w[6]^=W,w[7]^=Z,w[16]^=W,w[17]^=Z,w[26]^=W,w[27]^=Z,w[36]^=W,w[37]^=Z,w[46]^=W,w[47]^=Z,W=Ye^(ne<<1|ee>>>31),Z=ht^(ee<<1|ne>>>31),w[8]^=W,w[9]^=Z,w[18]^=W,w[19]^=Z,w[28]^=W,w[29]^=Z,w[38]^=W,w[39]^=Z,w[48]^=W,w[49]^=Z,Qt=w[0],$t=w[1],Bi=w[11]<<4|w[10]>>>28,Ui=w[10]<<4|w[11]>>>28,os=w[20]<<3|w[21]>>>29,oi=w[21]<<3|w[20]>>>29,zi=w[31]<<9|w[30]>>>23,ui=w[30]<<9|w[31]>>>23,Sa=w[40]<<18|w[41]>>>14,gs=w[41]<<18|w[40]>>>14,cs=w[2]<<1|w[3]>>>31,ds=w[3]<<1|w[2]>>>31,jt=w[13]<<12|w[12]>>>20,Ut=w[12]<<12|w[13]>>>20,Fi=w[22]<<10|w[23]>>>22,Gn=w[23]<<10|w[22]>>>22,ss=w[33]<<13|w[32]>>>19,us=w[32]<<13|w[33]>>>19,li=w[42]<<2|w[43]>>>30,Wi=w[43]<<2|w[42]>>>30,Hi=w[5]<<30|w[4]>>>2,Ta=w[4]<<30|w[5]>>>2,fs=w[14]<<6|w[15]>>>26,ps=w[15]<<6|w[14]>>>26,nr=w[25]<<11|w[24]>>>21,Wn=w[24]<<11|w[25]>>>21,vs=w[34]<<15|w[35]>>>17,_s=w[35]<<15|w[34]>>>17,ls=w[45]<<29|w[44]>>>3,Di=w[44]<<29|w[45]>>>3,Er=w[6]<<28|w[7]>>>4,mr=w[7]<<28|w[6]>>>4,Pa=w[17]<<23|w[16]>>>9,bs=w[16]<<23|w[17]>>>9,ms=w[26]<<25|w[27]>>>7,hs=w[27]<<25|w[26]>>>7,ba=w[36]<<21|w[37]>>>11,wa=w[37]<<21|w[36]>>>11,Es=w[47]<<24|w[46]>>>8,Vi=w[46]<<24|w[47]>>>8,ki=w[8]<<27|w[9]>>>5,qi=w[9]<<27|w[8]>>>5,xt=w[18]<<20|w[19]>>>12,is=w[19]<<20|w[18]>>>12,qa=w[29]<<7|w[28]>>>25,ws=w[28]<<7|w[29]>>>25,ys=w[38]<<8|w[39]>>>24,si=w[39]<<8|w[38]>>>24,qr=w[48]<<14|w[49]>>>18,Cn=w[49]<<14|w[48]>>>18,w[0]=Qt^~jt&nr,w[1]=$t^~Ut&Wn,w[10]=Er^~xt&os,w[11]=mr^~is&oi,w[20]=cs^~fs&ms,w[21]=ds^~ps&hs,w[30]=ki^~Bi&Fi,w[31]=qi^~Ui&Gn,w[40]=Hi^~Pa&qa,w[41]=Ta^~bs&ws,w[2]=jt^~nr&ba,w[3]=Ut^~Wn&wa,w[12]=xt^~os&ss,w[13]=is^~oi&us,w[22]=fs^~ms&ys,w[23]=ps^~hs&si,w[32]=Bi^~Fi&vs,w[33]=Ui^~Gn&_s,w[42]=Pa^~qa&zi,w[43]=bs^~ws&ui,w[4]=nr^~ba&qr,w[5]=Wn^~wa&Cn,w[14]=os^~ss&ls,w[15]=oi^~us&Di,w[24]=ms^~ys&Sa,w[25]=hs^~si&gs,w[34]=Fi^~vs&Es,w[35]=Gn^~_s&Vi,w[44]=qa^~zi&li,w[45]=ws^~ui&Wi,w[6]=ba^~qr&Qt,w[7]=wa^~Cn&$t,w[16]=ss^~ls&Er,w[17]=us^~Di&mr,w[26]=ys^~Sa&cs,w[27]=si^~gs&ds,w[36]=vs^~Es&ki,w[37]=_s^~Vi&qi,w[46]=zi^~li&Hi,w[47]=ui^~Wi&Ta,w[8]=qr^~Qt&jt,w[9]=Cn^~$t&Ut,w[18]=ls^~Er&xt,w[19]=Di^~mr&is,w[28]=Sa^~cs&fs,w[29]=gs^~ds&ps,w[38]=Es^~ki&Bi,w[39]=Vi^~qi&Ui,w[48]=li^~Hi&Pa,w[49]=Wi^~Ta&bs,w[0]^=gr[Y],w[1]^=gr[Y+1]};if(oe)b.exports=lr;else for(vr=0;vr<zr.length;++vr)J[zr[vr]]=lr[zr[vr]]})()})(c);var f=c.exports,p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,h=Math.ceil,m=Math.floor,v="[BigNumber Error] ",T=v+"Number primitive has more than 15 significant digits: ",C=1e14,N=14,E=9007199254740991,R=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],_=1e7,O=1e9;function P(b){var I=0|b;return b>0||b===I?I:I-1}function y(b){for(var I,q,J=1,re=b.length,oe=b[0]+"";J<re;){for(I=b[J++]+"",q=N-I.length;q--;I="0"+I);oe+=I}for(re=oe.length;oe.charCodeAt(--re)===48;);return oe.slice(0,re+1||1)}function S(b,I){var q,J,re=b.c,oe=I.c,Ce=b.s,ze=I.s,st=b.e,ct=I.e;if(!Ce||!ze)return null;if(q=re&&!re[0],J=oe&&!oe[0],q||J)return q?J?0:-ze:Ce;if(Ce!=ze)return Ce;if(q=Ce<0,J=st==ct,!re||!oe)return J?0:!re^q?1:-1;if(!J)return st>ct^q?1:-1;for(ze=(st=re.length)<(ct=oe.length)?st:ct,Ce=0;Ce<ze;Ce++)if(re[Ce]!=oe[Ce])return re[Ce]>oe[Ce]^q?1:-1;return st==ct?0:st>ct^q?1:-1}function M(b,I,q,J){if(b<I||b>q||b!==m(b))throw Error(v+(J||"Argument")+(typeof b=="number"?b<I||b>q?" out of range: ":" not an integer: ":" not a primitive number: ")+String(b))}function U(b){var I=b.c.length-1;return P(b.e/N)==I&&b.c[I]%2!=0}function V(b,I){return(b.length>1?b.charAt(0)+"."+b.slice(1):b)+(I<0?"e":"e+")+I}function Q(b,I,q){var J,re;if(I<0){for(re=q+".";++I;re+=q);b=re+b}else if(++I>(J=b.length)){for(re=q,I-=J;--I;re+=q);b+=re}else I<J&&(b=b.slice(0,I)+"."+b.slice(I));return b}var te=(function b(I){var q,J,re,oe,Ce,ze,st,ct,gr,Xt,Ke=Ve.prototype={constructor:Ve,toString:null,valueOf:null},Tr=new Ve(1),Jt=20,Ht=4,Ir=-7,On=21,Zr=-1e7,Pr=1e7,In=!1,on=1,lr=0,zr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},vr="0123456789abcdefghijklmnopqrstuvwxyz",Rn=!0;function Ve(G,w){var W,Z,Y,ne,ee,ie,ye,_e,ve=this;if(!(ve instanceof Ve))return new Ve(G,w);if(w==null){if(G&&G._isBigNumber===!0)return ve.s=G.s,void(!G.c||G.e>Pr?ve.c=ve.e=null:G.e<Zr?ve.c=[ve.e=0]:(ve.e=G.e,ve.c=G.c.slice()));if((ie=typeof G=="number")&&0*G==0){if(ve.s=1/G<0?(G=-G,-1):1,G===~~G){for(ne=0,ee=G;ee>=10;ee/=10,ne++);return void(ne>Pr?ve.c=ve.e=null:(ve.e=ne,ve.c=[G]))}_e=String(G)}else{if(!p.test(_e=String(G)))return re(ve,_e,ie);ve.s=_e.charCodeAt(0)==45?(_e=_e.slice(1),-1):1}(ne=_e.indexOf("."))>-1&&(_e=_e.replace(".","")),(ee=_e.search(/e/i))>0?(ne<0&&(ne=ee),ne+=+_e.slice(ee+1),_e=_e.substring(0,ee)):ne<0&&(ne=_e.length)}else{if(M(w,2,vr.length,"Base"),w==10&&Rn)return Bt(ve=new Ve(G),Jt+ve.e+1,Ht);if(_e=String(G),ie=typeof G=="number"){if(0*G!=0)return re(ve,_e,ie,w);if(ve.s=1/G<0?(_e=_e.slice(1),-1):1,Ve.DEBUG&&_e.replace(/^0\.0*|\./,"").length>15)throw Error(T+G)}else ve.s=_e.charCodeAt(0)===45?(_e=_e.slice(1),-1):1;for(W=vr.slice(0,w),ne=ee=0,ye=_e.length;ee<ye;ee++)if(W.indexOf(Z=_e.charAt(ee))<0){if(Z=="."){if(ee>ne){ne=ye;continue}}else if(!Y&&(_e==_e.toUpperCase()&&(_e=_e.toLowerCase())||_e==_e.toLowerCase()&&(_e=_e.toUpperCase()))){Y=!0,ee=-1,ne=0;continue}return re(ve,String(G),ie,w)}ie=!1,(ne=(_e=J(_e,w,10,ve.s)).indexOf("."))>-1?_e=_e.replace(".",""):ne=_e.length}for(ee=0;_e.charCodeAt(ee)===48;ee++);for(ye=_e.length;_e.charCodeAt(--ye)===48;);if(_e=_e.slice(ee,++ye)){if(ye-=ee,ie&&Ve.DEBUG&&ye>15&&(G>E||G!==m(G)))throw Error(T+ve.s*G);if((ne=ne-ee-1)>Pr)ve.c=ve.e=null;else if(ne<Zr)ve.c=[ve.e=0];else{if(ve.e=ne,ve.c=[],ee=(ne+1)%N,ne<0&&(ee+=N),ee<ye){for(ee&&ve.c.push(+_e.slice(0,ee)),ye-=N;ee<ye;)ve.c.push(+_e.slice(ee,ee+=N));ee=N-(_e=_e.slice(ee)).length}else ee-=ye;for(;ee--;_e+="0");ve.c.push(+_e)}}else ve.c=[ve.e=0]}function yn(G,w,W,Z){var Y,ne,ee,ie,ye;if(W==null?W=Ht:M(W,0,8),!G.c)return G.toString();if(Y=G.c[0],ee=G.e,w==null)ye=y(G.c),ye=Z==1||Z==2&&(ee<=Ir||ee>=On)?V(ye,ee):Q(ye,ee,"0");else if(ne=(G=Bt(new Ve(G),w,W)).e,ie=(ye=y(G.c)).length,Z==1||Z==2&&(w<=ne||ne<=Ir)){for(;ie<w;ye+="0",ie++);ye=V(ye,ne)}else if(w-=ee,ye=Q(ye,ne,"0"),ne+1>ie){if(--w>0)for(ye+=".";w--;ye+="0");}else if((w+=ne-ie)>0)for(ne+1==ie&&(ye+=".");w--;ye+="0");return G.s<0&&Y?"-"+ye:ye}function zn(G,w){for(var W,Z=1,Y=new Ve(G[0]);Z<G.length;Z++){if(!(W=new Ve(G[Z])).s){Y=W;break}w.call(Y,W)&&(Y=W)}return Y}function Ea(G,w,W){for(var Z=1,Y=w.length;!w[--Y];w.pop());for(Y=w[0];Y>=10;Y/=10,Z++);return(W=Z+W*N-1)>Pr?G.c=G.e=null:W<Zr?G.c=[G.e=0]:(G.e=W,G.c=w),G}function Bt(G,w,W,Z){var Y,ne,ee,ie,ye,_e,ve,Ye=G.c,ht=R;if(Ye){e:{for(Y=1,ie=Ye[0];ie>=10;ie/=10,Y++);if((ne=w-Y)<0)ne+=N,ee=w,ve=(ye=Ye[_e=0])/ht[Y-ee-1]%10|0;else if((_e=h((ne+1)/N))>=Ye.length){if(!Z)break e;for(;Ye.length<=_e;Ye.push(0));ye=ve=0,Y=1,ee=(ne%=N)-N+1}else{for(ye=ie=Ye[_e],Y=1;ie>=10;ie/=10,Y++);ve=(ee=(ne%=N)-N+Y)<0?0:ye/ht[Y-ee-1]%10|0}if(Z=Z||w<0||Ye[_e+1]!=null||(ee<0?ye:ye%ht[Y-ee-1]),Z=W<4?(ve||Z)&&(W==0||W==(G.s<0?3:2)):ve>5||ve==5&&(W==4||Z||W==6&&(ne>0?ee>0?ye/ht[Y-ee]:0:Ye[_e-1])%10&1||W==(G.s<0?8:7)),w<1||!Ye[0])return Ye.length=0,Z?(w-=G.e+1,Ye[0]=ht[(N-w%N)%N],G.e=-w||0):Ye[0]=G.e=0,G;if(ne==0?(Ye.length=_e,ie=1,_e--):(Ye.length=_e+1,ie=ht[N-ne],Ye[_e]=ee>0?m(ye/ht[Y-ee]%ht[ee])*ie:0),Z)for(;;){if(_e==0){for(ne=1,ee=Ye[0];ee>=10;ee/=10,ne++);for(ee=Ye[0]+=ie,ie=1;ee>=10;ee/=10,ie++);ne!=ie&&(G.e++,Ye[0]==C&&(Ye[0]=1));break}if(Ye[_e]+=ie,Ye[_e]!=C)break;Ye[_e--]=0,ie=1}for(ne=Ye.length;Ye[--ne]===0;Ye.pop());}G.e>Pr?G.c=G.e=null:G.e<Zr&&(G.c=[G.e=0])}return G}function pr(G){var w,W=G.e;return W===null?G.toString():(w=y(G.c),w=W<=Ir||W>=On?V(w,W):Q(w,W,"0"),G.s<0?"-"+w:w)}return Ve.clone=b,Ve.ROUND_UP=0,Ve.ROUND_DOWN=1,Ve.ROUND_CEIL=2,Ve.ROUND_FLOOR=3,Ve.ROUND_HALF_UP=4,Ve.ROUND_HALF_DOWN=5,Ve.ROUND_HALF_EVEN=6,Ve.ROUND_HALF_CEIL=7,Ve.ROUND_HALF_FLOOR=8,Ve.EUCLID=9,Ve.config=Ve.set=function(G){var w,W;if(G!=null){if(typeof G!="object")throw Error(v+"Object expected: "+G);if(G.hasOwnProperty(w="DECIMAL_PLACES")&&(M(W=G[w],0,O,w),Jt=W),G.hasOwnProperty(w="ROUNDING_MODE")&&(M(W=G[w],0,8,w),Ht=W),G.hasOwnProperty(w="EXPONENTIAL_AT")&&((W=G[w])&&W.pop?(M(W[0],-O,0,w),M(W[1],0,O,w),Ir=W[0],On=W[1]):(M(W,-O,O,w),Ir=-(On=W<0?-W:W))),G.hasOwnProperty(w="RANGE"))if((W=G[w])&&W.pop)M(W[0],-O,-1,w),M(W[1],1,O,w),Zr=W[0],Pr=W[1];else{if(M(W,-O,O,w),!W)throw Error(v+w+" cannot be zero: "+W);Zr=-(Pr=W<0?-W:W)}if(G.hasOwnProperty(w="CRYPTO")){if((W=G[w])!==!!W)throw Error(v+w+" not true or false: "+W);if(W){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw In=!W,Error(v+"crypto unavailable");In=W}else In=W}if(G.hasOwnProperty(w="MODULO_MODE")&&(M(W=G[w],0,9,w),on=W),G.hasOwnProperty(w="POW_PRECISION")&&(M(W=G[w],0,O,w),lr=W),G.hasOwnProperty(w="FORMAT")){if(typeof(W=G[w])!="object")throw Error(v+w+" not an object: "+W);zr=W}if(G.hasOwnProperty(w="ALPHABET")){if(typeof(W=G[w])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(W))throw Error(v+w+" invalid: "+W);Rn=W.slice(0,10)=="0123456789",vr=W}}return{DECIMAL_PLACES:Jt,ROUNDING_MODE:Ht,EXPONENTIAL_AT:[Ir,On],RANGE:[Zr,Pr],CRYPTO:In,MODULO_MODE:on,POW_PRECISION:lr,FORMAT:zr,ALPHABET:vr}},Ve.isBigNumber=function(G){if(!G||G._isBigNumber!==!0)return!1;if(!Ve.DEBUG)return!0;var w,W,Z=G.c,Y=G.e,ne=G.s;e:if({}.toString.call(Z)=="[object Array]"){if((ne===1||ne===-1)&&Y>=-O&&Y<=O&&Y===m(Y)){if(Z[0]===0){if(Y===0&&Z.length===1)return!0;break e}if((w=(Y+1)%N)<1&&(w+=N),String(Z[0]).length==w){for(w=0;w<Z.length;w++)if((W=Z[w])<0||W>=C||W!==m(W))break e;if(W!==0)return!0}}}else if(Z===null&&Y===null&&(ne===null||ne===1||ne===-1))return!0;throw Error(v+"Invalid BigNumber: "+G)},Ve.maximum=Ve.max=function(){return zn(arguments,Ke.lt)},Ve.minimum=Ve.min=function(){return zn(arguments,Ke.gt)},Ve.random=(oe=9007199254740992,Ce=Math.random()*oe&2097151?function(){return m(Math.random()*oe)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(G){var w,W,Z,Y,ne,ee=0,ie=[],ye=new Ve(Tr);if(G==null?G=Jt:M(G,0,O),Y=h(G/N),In)if(crypto.getRandomValues){for(w=crypto.getRandomValues(new Uint32Array(Y*=2));ee<Y;)(ne=131072*w[ee]+(w[ee+1]>>>11))>=9e15?(W=crypto.getRandomValues(new Uint32Array(2)),w[ee]=W[0],w[ee+1]=W[1]):(ie.push(ne%1e14),ee+=2);ee=Y/2}else{if(!crypto.randomBytes)throw In=!1,Error(v+"crypto unavailable");for(w=crypto.randomBytes(Y*=7);ee<Y;)(ne=281474976710656*(31&w[ee])+1099511627776*w[ee+1]+4294967296*w[ee+2]+16777216*w[ee+3]+(w[ee+4]<<16)+(w[ee+5]<<8)+w[ee+6])>=9e15?crypto.randomBytes(7).copy(w,ee):(ie.push(ne%1e14),ee+=7);ee=Y/7}if(!In)for(;ee<Y;)(ne=Ce())<9e15&&(ie[ee++]=ne%1e14);for(Y=ie[--ee],G%=N,Y&&G&&(ne=R[N-G],ie[ee]=m(Y/ne)*ne);ie[ee]===0;ie.pop(),ee--);if(ee<0)ie=[Z=0];else{for(Z=-1;ie[0]===0;ie.splice(0,1),Z-=N);for(ee=1,ne=ie[0];ne>=10;ne/=10,ee++);ee<N&&(Z-=N-ee)}return ye.e=Z,ye.c=ie,ye}),Ve.sum=function(){for(var G=1,w=arguments,W=new Ve(w[0]);G<w.length;)W=W.plus(w[G++]);return W},J=(function(){var G="0123456789";function w(W,Z,Y,ne){for(var ee,ie,ye=[0],_e=0,ve=W.length;_e<ve;){for(ie=ye.length;ie--;ye[ie]*=Z);for(ye[0]+=ne.indexOf(W.charAt(_e++)),ee=0;ee<ye.length;ee++)ye[ee]>Y-1&&(ye[ee+1]==null&&(ye[ee+1]=0),ye[ee+1]+=ye[ee]/Y|0,ye[ee]%=Y)}return ye.reverse()}return function(W,Z,Y,ne,ee){var ie,ye,_e,ve,Ye,ht,gt,It,Qt=W.indexOf("."),$t=Jt,jt=Ht;for(Qt>=0&&(ve=lr,lr=0,W=W.replace(".",""),ht=(It=new Ve(Z)).pow(W.length-Qt),lr=ve,It.c=w(Q(y(ht.c),ht.e,"0"),10,Y,G),It.e=It.c.length),_e=ve=(gt=w(W,Z,Y,ee?(ie=vr,G):(ie=G,vr))).length;gt[--ve]==0;gt.pop());if(!gt[0])return ie.charAt(0);if(Qt<0?--_e:(ht.c=gt,ht.e=_e,ht.s=ne,gt=(ht=q(ht,It,$t,jt,Y)).c,Ye=ht.r,_e=ht.e),Qt=gt[ye=_e+$t+1],ve=Y/2,Ye=Ye||ye<0||gt[ye+1]!=null,Ye=jt<4?(Qt!=null||Ye)&&(jt==0||jt==(ht.s<0?3:2)):Qt>ve||Qt==ve&&(jt==4||Ye||jt==6&&1&gt[ye-1]||jt==(ht.s<0?8:7)),ye<1||!gt[0])W=Ye?Q(ie.charAt(1),-$t,ie.charAt(0)):ie.charAt(0);else{if(gt.length=ye,Ye)for(--Y;++gt[--ye]>Y;)gt[ye]=0,ye||(++_e,gt=[1].concat(gt));for(ve=gt.length;!gt[--ve];);for(Qt=0,W="";Qt<=ve;W+=ie.charAt(gt[Qt++]));W=Q(W,_e,ie.charAt(0))}return W}})(),q=(function(){function G(Z,Y,ne){var ee,ie,ye,_e,ve=0,Ye=Z.length,ht=Y%_,gt=Y/_|0;for(Z=Z.slice();Ye--;)ve=((ie=ht*(ye=Z[Ye]%_)+(ee=gt*ye+(_e=Z[Ye]/_|0)*ht)%_*_+ve)/ne|0)+(ee/_|0)+gt*_e,Z[Ye]=ie%ne;return ve&&(Z=[ve].concat(Z)),Z}function w(Z,Y,ne,ee){var ie,ye;if(ne!=ee)ye=ne>ee?1:-1;else for(ie=ye=0;ie<ne;ie++)if(Z[ie]!=Y[ie]){ye=Z[ie]>Y[ie]?1:-1;break}return ye}function W(Z,Y,ne,ee){for(var ie=0;ne--;)Z[ne]-=ie,ie=Z[ne]<Y[ne]?1:0,Z[ne]=ie*ee+Z[ne]-Y[ne];for(;!Z[0]&&Z.length>1;Z.splice(0,1));}return function(Z,Y,ne,ee,ie){var ye,_e,ve,Ye,ht,gt,It,Qt,$t,jt,Ut,nr,Wn,ba,wa,qr,Cn,Er=Z.s==Y.s?1:-1,mr=Z.c,xt=Y.c;if(!(mr&&mr[0]&&xt&&xt[0]))return new Ve(Z.s&&Y.s&&(mr?!xt||mr[0]!=xt[0]:xt)?mr&&mr[0]==0||!xt?0*Er:Er/0:NaN);for($t=(Qt=new Ve(Er)).c=[],Er=ne+(_e=Z.e-Y.e)+1,ie||(ie=C,_e=P(Z.e/N)-P(Y.e/N),Er=Er/N|0),ve=0;xt[ve]==(mr[ve]||0);ve++);if(xt[ve]>(mr[ve]||0)&&_e--,Er<0)$t.push(1),Ye=!0;else{for(ba=mr.length,qr=xt.length,ve=0,Er+=2,(ht=m(ie/(xt[0]+1)))>1&&(xt=G(xt,ht,ie),mr=G(mr,ht,ie),qr=xt.length,ba=mr.length),Wn=qr,Ut=(jt=mr.slice(0,qr)).length;Ut<qr;jt[Ut++]=0);Cn=xt.slice(),Cn=[0].concat(Cn),wa=xt[0],xt[1]>=ie/2&&wa++;do{if(ht=0,(ye=w(xt,jt,qr,Ut))<0){if(nr=jt[0],qr!=Ut&&(nr=nr*ie+(jt[1]||0)),(ht=m(nr/wa))>1)for(ht>=ie&&(ht=ie-1),It=(gt=G(xt,ht,ie)).length,Ut=jt.length;w(gt,jt,It,Ut)==1;)ht--,W(gt,qr<It?Cn:xt,It,ie),It=gt.length,ye=1;else ht==0&&(ye=ht=1),It=(gt=xt.slice()).length;if(It<Ut&&(gt=[0].concat(gt)),W(jt,gt,Ut,ie),Ut=jt.length,ye==-1)for(;w(xt,jt,qr,Ut)<1;)ht++,W(jt,qr<Ut?Cn:xt,Ut,ie),Ut=jt.length}else ye===0&&(ht++,jt=[0]);$t[ve++]=ht,jt[0]?jt[Ut++]=mr[Wn]||0:(jt=[mr[Wn]],Ut=1)}while((Wn++<ba||jt[0]!=null)&&Er--);Ye=jt[0]!=null,$t[0]||$t.splice(0,1)}if(ie==C){for(ve=1,Er=$t[0];Er>=10;Er/=10,ve++);Bt(Qt,ne+(Qt.e=ve+_e*N-1)+1,ee,Ye)}else Qt.e=_e,Qt.r=+Ye;return Qt}})(),ze=/^(-?)0([xbo])(?=\w[\w.]*$)/i,st=/^([^.]+)\.$/,ct=/^\.([^.]+)$/,gr=/^-?(Infinity|NaN)$/,Xt=/^\s*\+(?=[\w.])|^\s+|\s+$/g,re=function(G,w,W,Z){var Y,ne=W?w:w.replace(Xt,"");if(gr.test(ne))G.s=isNaN(ne)?null:ne<0?-1:1;else{if(!W&&(ne=ne.replace(ze,(function(ee,ie,ye){return Y=(ye=ye.toLowerCase())=="x"?16:ye=="b"?2:8,Z&&Z!=Y?ee:ie})),Z&&(Y=Z,ne=ne.replace(st,"$1").replace(ct,"0.$1")),w!=ne))return new Ve(ne,Y);if(Ve.DEBUG)throw Error(v+"Not a"+(Z?" base "+Z:"")+" number: "+w);G.s=null}G.c=G.e=null},Ke.absoluteValue=Ke.abs=function(){var G=new Ve(this);return G.s<0&&(G.s=1),G},Ke.comparedTo=function(G,w){return S(this,new Ve(G,w))},Ke.decimalPlaces=Ke.dp=function(G,w){var W,Z,Y,ne=this;if(G!=null)return M(G,0,O),w==null?w=Ht:M(w,0,8),Bt(new Ve(ne),G+ne.e+1,w);if(!(W=ne.c))return null;if(Z=((Y=W.length-1)-P(this.e/N))*N,Y=W[Y])for(;Y%10==0;Y/=10,Z--);return Z<0&&(Z=0),Z},Ke.dividedBy=Ke.div=function(G,w){return q(this,new Ve(G,w),Jt,Ht)},Ke.dividedToIntegerBy=Ke.idiv=function(G,w){return q(this,new Ve(G,w),0,1)},Ke.exponentiatedBy=Ke.pow=function(G,w){var W,Z,Y,ne,ee,ie,ye,_e,ve=this;if((G=new Ve(G)).c&&!G.isInteger())throw Error(v+"Exponent not an integer: "+pr(G));if(w!=null&&(w=new Ve(w)),ee=G.e>14,!ve.c||!ve.c[0]||ve.c[0]==1&&!ve.e&&ve.c.length==1||!G.c||!G.c[0])return _e=new Ve(Math.pow(+pr(ve),ee?G.s*(2-U(G)):+pr(G))),w?_e.mod(w):_e;if(ie=G.s<0,w){if(w.c?!w.c[0]:!w.s)return new Ve(NaN);(Z=!ie&&ve.isInteger()&&w.isInteger())&&(ve=ve.mod(w))}else{if(G.e>9&&(ve.e>0||ve.e<-1||(ve.e==0?ve.c[0]>1||ee&&ve.c[1]>=24e7:ve.c[0]<8e13||ee&&ve.c[0]<=9999975e7)))return ne=ve.s<0&&U(G)?-0:0,ve.e>-1&&(ne=1/ne),new Ve(ie?1/ne:ne);lr&&(ne=h(lr/N+2))}for(ee?(W=new Ve(.5),ie&&(G.s=1),ye=U(G)):ye=(Y=Math.abs(+pr(G)))%2,_e=new Ve(Tr);;){if(ye){if(!(_e=_e.times(ve)).c)break;ne?_e.c.length>ne&&(_e.c.length=ne):Z&&(_e=_e.mod(w))}if(Y){if((Y=m(Y/2))===0)break;ye=Y%2}else if(Bt(G=G.times(W),G.e+1,1),G.e>14)ye=U(G);else{if((Y=+pr(G))==0)break;ye=Y%2}ve=ve.times(ve),ne?ve.c&&ve.c.length>ne&&(ve.c.length=ne):Z&&(ve=ve.mod(w))}return Z?_e:(ie&&(_e=Tr.div(_e)),w?_e.mod(w):ne?Bt(_e,lr,Ht,void 0):_e)},Ke.integerValue=function(G){var w=new Ve(this);return G==null?G=Ht:M(G,0,8),Bt(w,w.e+1,G)},Ke.isEqualTo=Ke.eq=function(G,w){return S(this,new Ve(G,w))===0},Ke.isFinite=function(){return!!this.c},Ke.isGreaterThan=Ke.gt=function(G,w){return S(this,new Ve(G,w))>0},Ke.isGreaterThanOrEqualTo=Ke.gte=function(G,w){return(w=S(this,new Ve(G,w)))===1||w===0},Ke.isInteger=function(){return!!this.c&&P(this.e/N)>this.c.length-2},Ke.isLessThan=Ke.lt=function(G,w){return S(this,new Ve(G,w))<0},Ke.isLessThanOrEqualTo=Ke.lte=function(G,w){return(w=S(this,new Ve(G,w)))===-1||w===0},Ke.isNaN=function(){return!this.s},Ke.isNegative=function(){return this.s<0},Ke.isPositive=function(){return this.s>0},Ke.isZero=function(){return!!this.c&&this.c[0]==0},Ke.minus=function(G,w){var W,Z,Y,ne,ee=this,ie=ee.s;if(w=(G=new Ve(G,w)).s,!ie||!w)return new Ve(NaN);if(ie!=w)return G.s=-w,ee.plus(G);var ye=ee.e/N,_e=G.e/N,ve=ee.c,Ye=G.c;if(!ye||!_e){if(!ve||!Ye)return ve?(G.s=-w,G):new Ve(Ye?ee:NaN);if(!ve[0]||!Ye[0])return Ye[0]?(G.s=-w,G):new Ve(ve[0]?ee:Ht==3?-0:0)}if(ye=P(ye),_e=P(_e),ve=ve.slice(),ie=ye-_e){for((ne=ie<0)?(ie=-ie,Y=ve):(_e=ye,Y=Ye),Y.reverse(),w=ie;w--;Y.push(0));Y.reverse()}else for(Z=(ne=(ie=ve.length)<(w=Ye.length))?ie:w,ie=w=0;w<Z;w++)if(ve[w]!=Ye[w]){ne=ve[w]<Ye[w];break}if(ne&&(Y=ve,ve=Ye,Ye=Y,G.s=-G.s),(w=(Z=Ye.length)-(W=ve.length))>0)for(;w--;ve[W++]=0);for(w=C-1;Z>ie;){if(ve[--Z]<Ye[Z]){for(W=Z;W&&!ve[--W];ve[W]=w);--ve[W],ve[Z]+=C}ve[Z]-=Ye[Z]}for(;ve[0]==0;ve.splice(0,1),--_e);return ve[0]?Ea(G,ve,_e):(G.s=Ht==3?-1:1,G.c=[G.e=0],G)},Ke.modulo=Ke.mod=function(G,w){var W,Z,Y=this;return G=new Ve(G,w),!Y.c||!G.s||G.c&&!G.c[0]?new Ve(NaN):!G.c||Y.c&&!Y.c[0]?new Ve(Y):(on==9?(Z=G.s,G.s=1,W=q(Y,G,0,3),G.s=Z,W.s*=Z):W=q(Y,G,0,on),(G=Y.minus(W.times(G))).c[0]||on!=1||(G.s=Y.s),G)},Ke.multipliedBy=Ke.times=function(G,w){var W,Z,Y,ne,ee,ie,ye,_e,ve,Ye,ht,gt,It,Qt,$t,jt=this,Ut=jt.c,nr=(G=new Ve(G,w)).c;if(!(Ut&&nr&&Ut[0]&&nr[0]))return!jt.s||!G.s||Ut&&!Ut[0]&&!nr||nr&&!nr[0]&&!Ut?G.c=G.e=G.s=null:(G.s*=jt.s,Ut&&nr?(G.c=[0],G.e=0):G.c=G.e=null),G;for(Z=P(jt.e/N)+P(G.e/N),G.s*=jt.s,(ye=Ut.length)<(Ye=nr.length)&&(It=Ut,Ut=nr,nr=It,Y=ye,ye=Ye,Ye=Y),Y=ye+Ye,It=[];Y--;It.push(0));for(Qt=C,$t=_,Y=Ye;--Y>=0;){for(W=0,ht=nr[Y]%$t,gt=nr[Y]/$t|0,ne=Y+(ee=ye);ne>Y;)W=((_e=ht*(_e=Ut[--ee]%$t)+(ie=gt*_e+(ve=Ut[ee]/$t|0)*ht)%$t*$t+It[ne]+W)/Qt|0)+(ie/$t|0)+gt*ve,It[ne--]=_e%Qt;It[ne]=W}return W?++Z:It.splice(0,1),Ea(G,It,Z)},Ke.negated=function(){var G=new Ve(this);return G.s=-G.s||null,G},Ke.plus=function(G,w){var W,Z=this,Y=Z.s;if(w=(G=new Ve(G,w)).s,!Y||!w)return new Ve(NaN);if(Y!=w)return G.s=-w,Z.minus(G);var ne=Z.e/N,ee=G.e/N,ie=Z.c,ye=G.c;if(!ne||!ee){if(!ie||!ye)return new Ve(Y/0);if(!ie[0]||!ye[0])return ye[0]?G:new Ve(ie[0]?Z:0*Y)}if(ne=P(ne),ee=P(ee),ie=ie.slice(),Y=ne-ee){for(Y>0?(ee=ne,W=ye):(Y=-Y,W=ie),W.reverse();Y--;W.push(0));W.reverse()}for((Y=ie.length)-(w=ye.length)<0&&(W=ye,ye=ie,ie=W,w=Y),Y=0;w;)Y=(ie[--w]=ie[w]+ye[w]+Y)/C|0,ie[w]=C===ie[w]?0:ie[w]%C;return Y&&(ie=[Y].concat(ie),++ee),Ea(G,ie,ee)},Ke.precision=Ke.sd=function(G,w){var W,Z,Y,ne=this;if(G!=null&&G!==!!G)return M(G,1,O),w==null?w=Ht:M(w,0,8),Bt(new Ve(ne),G,w);if(!(W=ne.c))return null;if(Z=(Y=W.length-1)*N+1,Y=W[Y]){for(;Y%10==0;Y/=10,Z--);for(Y=W[0];Y>=10;Y/=10,Z++);}return G&&ne.e+1>Z&&(Z=ne.e+1),Z},Ke.shiftedBy=function(G){return M(G,-9007199254740991,E),this.times("1e"+G)},Ke.squareRoot=Ke.sqrt=function(){var G,w,W,Z,Y,ne=this,ee=ne.c,ie=ne.s,ye=ne.e,_e=Jt+4,ve=new Ve("0.5");if(ie!==1||!ee||!ee[0])return new Ve(!ie||ie<0&&(!ee||ee[0])?NaN:ee?ne:1/0);if((ie=Math.sqrt(+pr(ne)))==0||ie==1/0?(((w=y(ee)).length+ye)%2==0&&(w+="0"),ie=Math.sqrt(+w),ye=P((ye+1)/2)-(ye<0||ye%2),W=new Ve(w=ie==1/0?"5e"+ye:(w=ie.toExponential()).slice(0,w.indexOf("e")+1)+ye)):W=new Ve(ie+""),W.c[0]){for((ie=(ye=W.e)+_e)<3&&(ie=0);;)if(Y=W,W=ve.times(Y.plus(q(ne,Y,_e,1))),y(Y.c).slice(0,ie)===(w=y(W.c)).slice(0,ie)){if(W.e<ye&&--ie,(w=w.slice(ie-3,ie+1))!="9999"&&(Z||w!="4999")){+w&&(+w.slice(1)||w.charAt(0)!="5")||(Bt(W,W.e+Jt+2,1),G=!W.times(W).eq(ne));break}if(!Z&&(Bt(Y,Y.e+Jt+2,0),Y.times(Y).eq(ne))){W=Y;break}_e+=4,ie+=4,Z=1}}return Bt(W,W.e+Jt+1,Ht,G)},Ke.toExponential=function(G,w){return G!=null&&(M(G,0,O),G++),yn(this,G,w,1)},Ke.toFixed=function(G,w){return G!=null&&(M(G,0,O),G=G+this.e+1),yn(this,G,w)},Ke.toFormat=function(G,w,W){var Z,Y=this;if(W==null)G!=null&&w&&typeof w=="object"?(W=w,w=null):G&&typeof G=="object"?(W=G,G=w=null):W=zr;else if(typeof W!="object")throw Error(v+"Argument not an object: "+W);if(Z=Y.toFixed(G,w),Y.c){var ne,ee=Z.split("."),ie=+W.groupSize,ye=+W.secondaryGroupSize,_e=W.groupSeparator||"",ve=ee[0],Ye=ee[1],ht=Y.s<0,gt=ht?ve.slice(1):ve,It=gt.length;if(ye&&(ne=ie,ie=ye,ye=ne,It-=ne),ie>0&&It>0){for(ne=It%ie||ie,ve=gt.substr(0,ne);ne<It;ne+=ie)ve+=_e+gt.substr(ne,ie);ye>0&&(ve+=_e+gt.slice(ne)),ht&&(ve="-"+ve)}Z=Ye?ve+(W.decimalSeparator||"")+((ye=+W.fractionGroupSize)?Ye.replace(new RegExp("\\d{"+ye+"}\\B","g"),"$&"+(W.fractionGroupSeparator||"")):Ye):ve}return(W.prefix||"")+Z+(W.suffix||"")},Ke.toFraction=function(G){var w,W,Z,Y,ne,ee,ie,ye,_e,ve,Ye,ht,gt=this,It=gt.c;if(G!=null&&(!(ie=new Ve(G)).isInteger()&&(ie.c||ie.s!==1)||ie.lt(Tr)))throw Error(v+"Argument "+(ie.isInteger()?"out of range: ":"not an integer: ")+pr(ie));if(!It)return new Ve(gt);for(w=new Ve(Tr),_e=W=new Ve(Tr),Z=ye=new Ve(Tr),ht=y(It),ne=w.e=ht.length-gt.e-1,w.c[0]=R[(ee=ne%N)<0?N+ee:ee],G=!G||ie.comparedTo(w)>0?ne>0?w:_e:ie,ee=Pr,Pr=1/0,ie=new Ve(ht),ye.c[0]=0;ve=q(ie,w,0,1),(Y=W.plus(ve.times(Z))).comparedTo(G)!=1;)W=Z,Z=Y,_e=ye.plus(ve.times(Y=_e)),ye=Y,w=ie.minus(ve.times(Y=w)),ie=Y;return Y=q(G.minus(W),Z,0,1),ye=ye.plus(Y.times(_e)),W=W.plus(Y.times(Z)),ye.s=_e.s=gt.s,Ye=q(_e,Z,ne*=2,Ht).minus(gt).abs().comparedTo(q(ye,W,ne,Ht).minus(gt).abs())<1?[_e,Z]:[ye,W],Pr=ee,Ye},Ke.toNumber=function(){return+pr(this)},Ke.toPrecision=function(G,w){return G!=null&&M(G,1,O),yn(this,G,w,2)},Ke.toString=function(G){var w,W=this,Z=W.s,Y=W.e;return Y===null?Z?(w="Infinity",Z<0&&(w="-"+w)):w="NaN":(G==null?w=Y<=Ir||Y>=On?V(y(W.c),Y):Q(y(W.c),Y,"0"):G===10&&Rn?w=Q(y((W=Bt(new Ve(W),Jt+Y+1,Ht)).c),W.e,"0"):(M(G,2,vr.length,"Base"),w=J(Q(y(W.c),Y,"0"),10,G,Z,!0)),Z<0&&W.c[0]&&(w="-"+w)),w},Ke.valueOf=Ke.toJSON=function(){return pr(this)},Ke._isBigNumber=!0,Ke[Symbol.toStringTag]="BigNumber",Ke[Symbol.for("nodejs.util.inspect.custom")]=Ke.valueOf,I!=null&&Ve.set(I),Ve})();const he={ROUNDING_MODE:te.ROUND_DOWN};function be(b){return new TextEncoder().encode(b)}function Ie(b){return typeof b=="string"?Ie(me(b)):new TextDecoder().decode(b)}te.config(he);const we="UNKNOWN_ERROR",Ae="INVALID_ARGUMENT";function Ne(b,I=we,q={}){const J=[];Object.keys(q).forEach((Ce=>{try{J.push(Ce+"="+JSON.stringify(q[Ce]))}catch{J.push(Ce+"="+JSON.stringify(q[Ce].toString()))}}));const re=b;J.length&&(b+=" ("+J.join(", ")+")");const oe=new Error(b);return oe.reason=re,oe.code=I,Object.keys(q).forEach((function(Ce){oe[Ce]=q[Ce]})),oe}function me(b){if(typeof b!="string")throw new Error("hexToBytes only accept strings, got: "+typeof b);if(b.substr(0,2)==="0x")return me(b.substr(2));const I=new Uint8Array(Math.ceil(b.length/2));let q=0;for(let J=0;J<b.length;J+=2){const re=parseInt(b.substr(J,2),16);if(isNaN(re))throw new Error("Cannot read hex string:"+JSON.stringify(b));I[q]=re,q++}return I}function le(b){return Array.from(b).map((I=>I.toString(16).padStart(2,"0"))).join("")}function X(b,I){if(typeof b=="string"){if(I&&I.encoding==="hex"&&typeof b=="string"){let q=b;q.length>2&&q.substr(0,2)==="0x"&&(q=q.substr(2));const J=me(q);return f.keccak256(J)}return f.keccak256(be(b))}return f.keccak256(b)}const L={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function F(b,I,q){return new Array(I-b.length+1).join(q||"0")+b}function B(b){let I="",q=0;const J=b.length;for(b.substring(0,2)==="0x"&&(q=2);q<J;q+=2){const re=parseInt(b.substr(q,2),16);I+=String.fromCharCode(re)}return I}function D(b){return rn(b)&&b.name&&b.name.indexOf("(")!==-1?b.name:b.name+"("+ue(!1,b.inputs||[]).join(",")+")"}function K(...b){const I=b.reduce(((re,oe)=>re+oe.length),0),q=new Uint8Array(I);let J=0;for(const re of b)q.set(re,J),J+=re.length;return q}function ue(b,I){const q=[];return I.forEach((function(J){if(typeof J.components=="object"){if(J.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let re="";const oe=J.type.indexOf("[");oe>=0&&(re=J.type.substring(oe));const Ce=ue(b,J.components);q.push("("+Ce.join(",")+")"+re)}else q.push(J.type)})),q}function Re(b){const I=b.indexOf("("),q=b.indexOf(")");return I!==-1&&q!==-1?b.substr(0,I):b}function Pe(b){const I=b.indexOf("("),q=b.indexOf(")");return I!==-1&&q!==-1?b.substr(I+1,q-I-1).replace(" ",""):""}function Be(b){return b==null?b:Dt(b).toNumber()}function je(b){return Dt(b).toNumber()}function ce(b){return Lr(b)?b.toString(10):""+b}function fe(b){return typeof b=="string"&&!b.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b)?"0x"+b:Le(b)}function Oe(b){if(typeof b=="string")return b.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b)?Le(b):"0x"+le(be(b));if(b instanceof Uint8Array)return"0x"+le(b);throw new Error(`toStringData: Error trying to convert ${b} (${typeof b}) to a hex string.`)}function De(b){return typeof b=="boolean"?b:Dt(b).toNumber()!==0}function Ge(b){const I=Dt(b),q=I.toString(16);return I.isLessThan(0)?"-0x"+q.substr(1):"0x"+q}function Le(b){if(Tn(b))return Ge(+b);if(Lr(b))return Ge(b);if(Sn(b)){const I=b;if(I.indexOf("-0x")===0)return Ge(I);if(I.indexOf("0x")===0)return I;if(!isFinite(I))return le(be(I))}if(b instanceof Uint8Array)return"0x"+le(b);if(nn(b)||rn(b))throw new Error("toHex can only be called with scalar values, not objects or arrays");return Ge(b)}function Rt(b){const I=b?b.toLowerCase():"ether",q=L[I];if(q===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(L,null,2));return new te(q,10)}function Dt(b){let I=b||0;return Lr(I)?I:(typeof I=="string"&&(I=I.trim()),typeof I!="string"||I.indexOf("0x")!==0&&I.indexOf("-0x")!==0?I instanceof Uint8Array?new te(le(I),16):new te(I,10):new te(I.replace("0x","").toLowerCase(),16))}function Gt(b){return new te(new Array(b).fill("1").join(""),2)}function Ot(b,I=256){const q=Dt(b).integerValue();return q.isLessThan(0)?Gt(I).plus(q).plus(1):q}function Fe(b,I){return F(b.toString(2),I,"0")[0]==="1"}function pt(b){if(typeof b!="string")throw Ne("invalid address",Ae,{arg:"address",value:b});if(b.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return b.trim().substring(0,2)!=="0x"&&(b="0x"+b),jr(b);throw Ne("invalid address",Ae,{arg:"address",value:b})}function Qe(b,I=256){if(Fe(b,I)){const q=Gt(I);return b.minus(q).minus(1)}return b}function qt(b){return/^0x[0-9a-f]{40}$/i.test(b)}function Kt(b){return!!/^(0x)?[0-9a-f]{40}$/i.test(b)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(b)&&!/^(0x)?[0-9A-F]{40}$/.test(b))||tr(b))}function tr(b){const I=b.replace("0x",""),q=X(I.toLowerCase());for(let J=0;J<40;J++)if(parseInt(q[J],16)>7&&I[J].toUpperCase()!==I[J]||parseInt(q[J],16)<=7&&I[J].toLowerCase()!==I[J])return!1;return!0}function jr(b){if(b===void 0)return"";const I=b.toLowerCase().replace("0x",""),q=X(I);let J="0x";for(let re=0;re<I.length;re++)parseInt(q[re],16)>7?J+=I[re].toUpperCase():J+=I[re];return J}function fr(b){if(!Array.isArray(b))throw new Error(`Value was not an array: ${JSON.stringify(b)}`);return b}function hn(b){return qt(b)?b:/^[0-9a-f]{40}$/.test(b)?"0x"+b:"0x"+F(Le(b).substr(2),40)}function Lr(b){return b instanceof te}function Sn(b){return typeof b=="string"||b&&b.constructor&&b.constructor.name==="String"}function rn(b){return b!==null&&!Array.isArray(b)&&typeof b=="object"}function Tn(b){return typeof b=="boolean"}function nn(b){return Array.isArray(b)}var ni,Pn;function ja(b,I){if(!b)throw new Error("jsonrpc method should be specified!");if(typeof b!="string")throw new Error(`jsonrpc must be a string, got ${typeof b}!`);return t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:b,params:I||[]}}function La(b){return Array.isArray(b)?b.every(I):I(b);function I(q){return!!q&&(q.error===void 0||q.error===null)&&q.jsonrpc==="2.0"&&q.id!==null&&"result"in q&&q.result!==void 0}}t.TransactionStatus=void 0,(ni=t.TransactionStatus||(t.TransactionStatus={})).pending="pending",ni.confirmed="confirmed",ni.failed="failed",t.TransactionType=void 0,(Pn=t.TransactionType||(t.TransactionType={})).queued="queued",Pn.dropped="dropped",Pn.replaced="replaced",Pn.pending="pending",Pn.reverted="reverted",Pn.confirmed="confirmed",t.messageId=0;function va(b){return Dt(b)}function Da(b){return b==="latest"||b==="pending"||b==="earliest"}function Dr(b){return b===void 0?"latest":Ct(b)}function Ct(b){return b==null?null:Da(b)?b:Le(b)}function Qr(b){return b.from&&(b.from=Me(b.from)),b.to&&(b.to=Me(b.to)),b.gasPrice!==void 0&&(b.gasPrice=Ge(b.gasPrice)),b.gas!==void 0&&(b.gas=Ge(b.gas)),b.value!==void 0&&(b.value=Ge(b.value)),b.nonce!==void 0&&(b.nonce=Ge(b.nonce)),b.data&&!b.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b.data)&&(b.data="0x"+b.data),b}function an(b){if(typeof b!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(b));if(b.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(b));if(b.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(b));return b}function ae(b){if(typeof b!="object")throw new Error("Did not provide transaction options");if(!b.from)throw new Error('Missing "from" in transaction options');return b.from=Me(b.from),b.to&&(b.to=Me(b.to)),b.gasPrice!==void 0&&(b.gasPrice=Ge(b.gasPrice)),b.gas!==void 0&&(b.gas=Ge(b.gas)),b.value!==void 0&&(b.value=Ge(b.value)),b.nonce!==void 0&&(b.nonce=Ge(b.nonce)),b.data&&!b.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b.data)&&(b.data="0x"+b.data),b}function z(b){return b?(b.blockNumber!==null&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex!==null&&(b.transactionIndex=je(b.transactionIndex)),b.nonce=je(b.nonce),b.gas=je(b.gas),b.gasPrice=Dt(b.gasPrice),b.value=Dt(b.value),b):null}function $(b){return b?(b.blockNumber!==null&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex!==null&&(b.transactionIndex=je(b.transactionIndex)),b.cumulativeGasUsed=je(b.cumulativeGasUsed),b.gasUsed=je(b.gasUsed),b.logs&&nn(b.logs)&&(b.logs=b.logs.map((function(I){return Te(I)}))),b.status=je(b.status||""),b):null}function pe(b){return b?(b.gasLimit=je(b.gasLimit),b.gasUsed=je(b.gasUsed),b.size=je(b.size),b.timestamp=je(b.timestamp),b.number!==null&&(b.number=je(b.number)),b.difficulty=Dt(b.difficulty),b.totalDifficulty=Dt(b.totalDifficulty),nn(b.transactions)&&b.transactions.forEach((function(I,q){Sn(I)||(b.transactions[q]=z(I)||b.transactions[q])})),b):null}function Te(b){return b&&(b.blockNumber&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex&&(b.transactionIndex=je(b.transactionIndex)),b.logIndex&&(b.logIndex=je(b.logIndex)),b)}function Me(b){if(qt(b))return b;if(Kt(b))return"0x"+b;throw new Error(`Invalid address: ${JSON.stringify(b)}`)}function Xe(b){return b}function Je(b){return b&&(b.startingBlock=je(b.startingBlock),b.currentBlock=je(b.currentBlock),b.highestBlock=je(b.highestBlock),b.knownStates&&(b.knownStates=je(b.knownStates),b.pulledStates=je(b.pulledStates)),b)}function vt(b){if(b===null)throw Ne("cannot convert null value to array",Ae,{arg:"value",value:b});if(b instanceof Uint8Array)return new Uint8Array(b);if(typeof b=="string"){const I=b.match(/^(0x)?[0-9a-fA-F]*$/);if(!I)throw Ne("invalid hexidecimal string",Ae,{arg:"value",value:b});if(I[1]!=="0x")throw Ne("hex string must have 0x prefix",Ae,{arg:"value",value:b});(b=b.substring(2)).length%2&&(b="0"+b);const q=[];for(let J=0;J<b.length;J+=2)q.push(parseInt(b.substr(J,2),16));return new Uint8Array(q)}if((function(I){if(!I||parseInt(String(I.length))!==I.length||typeof I=="string")return!1;for(let q=0;q<I.length;q++){const J=I[q];if(J<0||J>=256||parseInt(String(J))!==J)return!1}return!0})(b))return new Uint8Array(b);throw Ne("invalid arrayify value",void 0,{arg:"value",value:b,type:typeof b})}function dt(b,I,q){Object.defineProperty(b,I,{enumerable:!0,value:q,writable:!1})}const St=new te(-1),Nt=new te(0),Mt=new te(1),or=new te("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function rr(b){return(function(I,q){function J(Ce){return new Error('unexpected character "'+I[Ce]+'" at position '+Ce+' in "'+I+'"')}const re={type:"",name:"",state:{allowType:!0}};let oe=re;for(let Ce=0;Ce<I.length;Ce++){const ze=I[Ce];switch(ze){case"(":if(!oe.state.allowParams)throw J(Ce);oe.state.allowType=!1,oe.type=wr(oe.type),oe.components=[{type:"",name:"",parent:oe,state:{allowType:!0}}],oe=oe.components[0];break;case")":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=wr(oe.type);const st=oe;if(oe=oe.parent,!oe)throw J(Ce);delete st.parent,oe.state.allowParams=!1,oe.state.allowName=!0,oe.state.allowArray=!0;break;case",":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=wr(oe.type);const ct={type:"",name:"",parent:oe.parent,state:{allowType:!0}};oe.parent.components.push(ct),delete oe.parent,oe=ct;break;case" ":oe.state.allowType&&oe.type!==""&&(oe.type=wr(oe.type),delete oe.state.allowType,oe.state.allowName=!0,oe.state.allowParams=!0),oe.state.allowName&&oe.name!==""&&(oe.name==="indexed"?(oe.indexed=!0,oe.name=""):oe.state.allowName=!1);break;case"[":if(!oe.state.allowArray)throw J(Ce);oe.type+=ze,oe.state.allowArray=!1,oe.state.allowName=!1,oe.state.readArray=!0;break;case"]":if(!oe.state.readArray)throw J(Ce);oe.type+=ze,oe.state.readArray=!1,oe.state.allowArray=!0,oe.state.allowName=!0;break;default:if(oe.state.allowType)oe.type+=ze,oe.state.allowParams=!0,oe.state.allowArray=!0;else if(oe.state.allowName)oe.name+=ze,delete oe.state.allowArray;else{if(!oe.state.readArray)throw J(Ce);oe.type+=ze}}}if(oe.parent)throw new Error("unexpected eof");return delete re.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),re.type=wr(re.type),re})(b)}function wr(b){return b.match(/^uint($|[^1-9])/)?b="uint256"+b.substring(4):b.match(/^int($|[^1-9])/)&&(b="int256"+b.substring(3)),b}const Hr=new RegExp(/^bytes([0-9]*)$/),An=new RegExp(/^(u?int)([0-9]*)$/),Vn=new RegExp(/^(.*)\[([0-9]*)\]$/),ai=function(b,I){const q=b.match(An);return q&&parseInt(q[2])<=48?I.toNumber():I};class kr{constructor(I,q,J,re="",oe){this.coerceFunc=I,this.name=q,this.type=J,this.localName=re,this.dynamic=oe}}class _a extends kr{constructor(I){super(I.coerceFunc,I.name,I.type,void 0,I.dynamic),dt(this,"coder",I)}encode(I){return this.coder.encode(I)}decode(I,q){return this.coder.decode(I,q)}}class tu extends kr{constructor(I,q){super(I,"null","",q,!1)}encode(I){return vt([])}decode(I,q){if(q>I.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Ri(b,I){return new te(b.toString(2).substr(-I),2)}class Ml extends kr{constructor(I,q,J,re){const oe=(J?"int":"uint")+8*q;super(I,oe,oe,re,!1),this.size=q,this.signed=J}encode(I){try{let q=Dt(I);if(this.signed){let re=Ri(or,8*this.size-1);if(q.gt(re))throw new Error("out-of-bounds");if(re=re.plus(Mt).multipliedBy(St),q.lt(re))throw new Error("out-of-bounds")}else if(q.lt(Nt)||q.gt(Ri(or,8*this.size)))throw new Error("out-of-bounds");q=Ri(Ot(q,8*this.size),8*this.size),this.signed&&(q=Ot(Qe(q,8*this.size),256));const J=F(Ot(q).toString(16),64);if(J.indexOf("NaN")!==-1)throw Ne("invalid number value, NaN",Ae,{arg:this.localName,coderType:this.name,value:I,v:q,twosComplement:Ot(q),twosComplement16:Ot(q).toString(16),pad:F(Ot(q).toString(16),64),size:this.size});return me(J)}catch(q){throw Ne("invalid number value",Ae,{arg:this.localName,coderType:this.name,value:I,message:q.toString()})}}decode(I,q){if(I.length<q+32)throw Ne("insufficient data for "+this.name+" type",Ae,{arg:this.localName,coderType:this.name,value:Le(I.slice(q,q+32))});const J=32-this.size;let re=new te(le(I.slice(q+J,q+32)),16);return re=this.signed?Qe(re,8*this.size):Ri(re,8*this.size),{consumed:32,value:this.coerceFunc(this.name,re)}}}const Hn=new Ml((function(b,I){return I}),32,!1,"none");class sr extends kr{constructor(I,q,J){const re="bytes"+q;super(I,re,re,J,!1),this.length=q}encode(I){const q=new Uint8Array(32);try{if(typeof I=="string"&&I.length%2!=0)throw new Error("hex string cannot be odd-length");const J=vt(I);if(J.length>this.length)throw new Error("incorrect data length");q.set(J)}catch(J){throw Ne("invalid "+this.name+" value. Use hex strings or Uint8Array",Ae,{arg:this.localName,coderType:this.name,value:J.value||I,details:J.message})}return q}decode(I,q){if(I.length<q+32)throw Ne("insufficient data for "+this.name+" type",Ae,{arg:this.localName,coderType:this.name,value:Le(I.slice(q,q+32))});return{consumed:32,value:this.coerceFunc(this.name,I.slice(q,q+this.length))}}}function jl(b){const I=32*Math.ceil(b.length/32),q=new Uint8Array(I-b.length);return K(Hn.encode(b.length),b,q)}function rs(b,I,q){if(b.length<I+32)throw Ne("insufficient data for dynamicBytes length",Ae,{arg:q,coderType:"dynamicBytes",value:Le(b.slice(I,I+32))});let J=Hn.decode(b,I).value;try{J=J.toNumber()}catch(re){throw re("dynamic bytes count too large",Ae,{arg:q,coderType:"dynamicBytes",value:J.toString()})}if(b.length<I+32+J)throw Ne("insufficient data for dynamicBytes type",Ae,{arg:q,coderType:"dynamicBytes",value:Le(b.slice(I,I+32+J))});return{consumed:32+32*Math.ceil(J/32),value:b.slice(I+32,I+32+J)}}function Ci(b){return 32*Math.ceil(b/32)}function Mi(b,I){if(!Array.isArray(I)){if(!I||typeof I!="object")throw Ne("invalid tuple value",Ae,{coderType:"tuple",value:I});{const st=[];b.forEach((function(ct){st.push(I[ct.localName])})),I=st}}if(b.length!==I.length)throw Ne("types/value length mismatch",Ae,{coderType:"tuple",value:I});const q=[];b.forEach((function(st,ct){q.push({dynamic:st.dynamic,value:st.encode(I[ct])})}));let J=0,re=0;q.forEach((function(st){st.dynamic?(J+=32,re+=Ci(st.value.length)):J+=Ci(st.value.length)}));let oe=0,Ce=J;const ze=new Uint8Array(J+re);return q.forEach((function(st){st.dynamic?(ze.set(Hn.encode(Ce),oe),oe+=32,ze.set(st.value,Ce),Ce+=Ci(st.value.length)):(ze.set(st.value,oe),oe+=Ci(st.value.length))})),ze}class Af extends Array{}class Ll extends kr{constructor(I,q,J,re){super(I,"array",q.type+"["+(J>=0?J:"")+"]",re,J===-1||q.dynamic),this.coder=q,this.length=J}encode(I){if(!Array.isArray(I))throw Ne("expected array value",Ae,{arg:this.localName,coderType:"array",value:I});let q=this.length,J=new Uint8Array(0);q===-1&&(q=I.length,J=Hn.encode(q)),(function(oe,Ce,ze){if(ze||(ze=""),oe<Ce)throw Ne("missing argument"+ze,"MISSING_ARGUMENT",{count:oe,expectedCount:Ce});if(oe>Ce)throw Ne("too many arguments"+ze,"UNEXPECTED_ARGUMENT",{count:oe,expectedCount:Ce})})(q,I.length,"in coder array"+(this.localName?" "+this.localName:""));const re=[];for(let oe=0;oe<I.length;oe++)re.push(this.coder);return K(J,Mi(re,I))}decode(I,q){let J=0,re=this.length;if(re===-1){let ze;try{ze=Hn.decode(I,q)}catch(st){throw Ne("insufficient data for dynamic array length",Ae,{arg:this.localName,coderType:"array",value:st.value})}try{re=ze.value.toNumber()}catch{throw Ne("array count too large",Ae,{arg:this.localName,coderType:"array",value:ze.value.toString()})}J+=ze.consumed,q+=ze.consumed}const oe=[];for(let ze=0;ze<re;ze++)oe.push(new _a(this.coder));const Ce=(function(ze,st,ct){const gr=ct;let Xt=0;const Ke=[];return ze.forEach((function(Tr){let Jt;if(Tr.dynamic){const Ht=Hn.decode(st,ct);Jt=Tr.decode(st,gr+Ht.value.toNumber()),Jt.consumed=Ht.consumed}else Jt=Tr.decode(st,ct);Jt.value!==void 0&&Ke.push(Jt.value),ct+=Jt.consumed,Xt+=Jt.consumed})),{value:Ke,consumed:Xt}})(oe,I,q);return Ce.consumed+=J,Ce.value=this.coerceFunc(this.type,Ce.value),Ce}}class ii extends kr{constructor(I,q,J){let re=!1;const oe=[];q.forEach((function(Ce){Ce.dynamic&&(re=!0),oe.push(Ce.type)})),super(I,"tuple","tuple("+oe.join(",")+")",J,re),this.coders=q}encode(I){return Mi(this.coders,I)}decode(I,q){const J=(function(re,oe,Ce){const ze=Ce;let st=0;const ct=new Af;return re.forEach((function(gr){let Xt;if(gr.dynamic){const Ke=Hn.decode(oe,Ce);Xt=gr.decode(oe,ze+Ke.value.toNumber()),Xt.consumed=Ke.consumed}else Xt=gr.decode(oe,Ce);Xt.value!==void 0&&ct.push(Xt.value),Ce+=Xt.consumed,st+=Xt.consumed})),re.forEach((function(gr,Xt){let Ke=gr.localName;Ke&&(Ke==="length"&&(Ke="_length"),ct[Ke]!==null&&ct[Ke]!==void 0||(ct[Ke]=ct[Xt]))})),{value:ct,consumed:st}})(this.coders,I,q);return J.value=this.coerceFunc(this.type,J.value),J}}const Nn={address:class extends kr{constructor(b,I){super(b,"address","address",I,!1)}encode(b){const I=new Uint8Array(32),q=b.trim();if(!Kt(q))throw Ne("invalid address format",Ae,{arg:this.localName,coderType:"address",value:b});try{I.set(me(Me(q)),12)}catch(J){throw Ne(`invalid address (${J.message})`,Ae,{arg:this.localName,coderType:"address",value:b})}return I}decode(b,I){if(b.length<I+32)throw Ne("insufficuent data for address type",Ae,{arg:this.localName,coderType:"address",value:Le(b.slice(I,I+32)),missingBytes:I+32-b.length});return{consumed:32,value:this.coerceFunc("address",pt(Le(b.slice(I+12,I+32))))}}},bool:class extends kr{constructor(b,I){super(b,"bool","bool",I,!1)}encode(b){return Hn.encode(b?1:0)}decode(b,I){try{const q=Hn.decode(b,I);return{consumed:q.consumed,value:this.coerceFunc("bool",!q.value.isZero())}}catch(q){throw q.reason==="insufficient data for uint256 type"?Ne("insufficient data for boolean type",Ae,{arg:this.localName,coderType:"boolean",value:q.value}):q}}},string:class extends kr{constructor(b,I){super(b,"string","string",I,!0)}encode(b){if(typeof b!="string")throw Ne("invalid string value",Ae,{arg:this.localName,coderType:"string",value:b});return jl(be(b))}decode(b,I){const q=rs(b,I,this.localName);return q.value=this.coerceFunc("string",Ie(q.value)),q}},bytes:class extends kr{constructor(b,I){super(b,"bytes","bytes",I,!0)}encode(b){try{return jl(vt(b))}catch(I){throw I("invalid bytes value",Ae,{arg:this.localName,coderType:"bytes",value:I.value})}}decode(b,I){const q=rs(b,I,this.localName);return q.value=this.coerceFunc("bytes",q.value),q}},function:class extends sr{constructor(b,I){super(b,24,I)}}};function ns(b,I){const q=Nn[I.type];if(q)return new q(b,I.name);let J=I.type.match(An);if(J){const re=parseInt(J[2]||"256");if(re===0||re>256||re%8!=0)throw Ne("invalid "+J[1]+" bit length",Ae,{arg:"param",value:I});return new Ml(b,re/8,J[1]==="int",I.name)}if(J=I.type.match(Hr),J){const re=parseInt(J[1]);if(re===0||re>32)throw Ne("invalid bytes length",Ae,{arg:"param",value:I});return new sr(b,re,I.name)}if(J=I.type.match(Vn),J){const re=Object.assign({},I),oe=parseInt(J[2]||"-1");return re.type=J[1],new Ll(b,ns(b,re),oe,I.name)}if(I.type.substring(0,5)==="tuple")return(function(re,oe,Ce){oe||(oe=[]);const ze=oe.map((st=>ns(re,st)));return new ii(re,ze,Ce)})(b,I.components,I.name);if(I.type==="")return new tu(b,I.name);throw Ne("invalid type",Ae,{arg:"type",value:I.type,fullType:I})}class xr{constructor(I){(function(q,J){if(!(q instanceof J))throw Ne("missing new","MISSING_NEW",{name:J.name})})(this,xr),I||(I=ai),dt(this,"coerceFunc",I)}encode(I,q){if(I.length!==q.length)throw Ne("types/values length mismatch",Ae,{count:{types:I.length,values:q.length},value:{types:I,values:q}});const J=I.map((re=>typeof re=="string"?rr(re):re)).map((re=>ns(this.coerceFunc,re)));return new ii(this.coerceFunc,J,"_").encode(q)}decode(I,q){const J=I.map((re=>typeof re=="string"?rr(re):re)).map((re=>ns(this.coerceFunc,re)));return new ii(this.coerceFunc,J,"_").decode(q,0).value}}const Dl=new xr;var kl,nt;function tt(b,I,q,J){var re,oe=arguments.length,Ce=oe<3?I:J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ce=Reflect.decorate(b,I,q,J);else for(var ze=b.length-1;ze>=0;ze--)(re=b[ze])&&(Ce=(oe<3?re(Ce):oe>3?re(I,q,Ce):re(I,q))||Ce);return oe>3&&Ce&&Object.defineProperty(I,q,Ce),Ce}function rt(b,I){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(b,I)}t.coder=void 0,(kl=t.coder||(t.coder={})).encodeParams=function(b,I){return le(Dl.encode(b,I))},kl.decodeParams=function(b,I){if(b.length>0&&(!I||I==="0x"||I==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return Dl.decode(b,me("0x"+I.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class yt{constructor(I){this.callName=I.callName,this.params=I.params||0,this.inputFormatter=I.inputFormatter||null,this.outputFormatter=I.outputFormatter}validateArgs(I){if(I.length!==this.params)throw q=this.callName,J=I.length,re=this.params,new Error(`Invalid number of input parameters to RPC method "${q}" given: ${J}, expected: ${re}`);var q,J,re}formatInput(I){return this.inputFormatter?this.inputFormatter.map((function(q,J){return q?q(I[J]):I[J]})):I}formatOutput(I){return I!==null?this.outputFormatter(I):null}toPayload(I){const q=this.formatInput(I);return this.validateArgs(q),{method:this.callName,params:q}}async execute(I,...q){const J=this.toPayload(q);if(!I)throw new Error("Missing RequestManager in method#exec");const re=await I.sendAsync(J);return this.formatOutput(re)}}class Sr{constructor(I){this.getter=I.getter,this.outputFormatter=I.outputFormatter}formatOutput(I){return this.outputFormatter(I)}async execute(I,...q){const J=await I.sendAsync({method:this.getter,params:[]});return this.formatOutput(J)}}function ql(b){return new Promise((I=>setTimeout(I,b)))}t.eth=void 0,(nt=t.eth||(t.eth={})).eth_getBalance=new yt({callName:"eth_getBalance",params:2,inputFormatter:[Me,Dr],outputFormatter:va}),nt.eth_getStorageAt=new yt({callName:"eth_getStorageAt",params:3,inputFormatter:[Me,Le,Dr],outputFormatter:fe}),nt.eth_getCode=new yt({callName:"eth_getCode",params:2,inputFormatter:[Me,Dr],outputFormatter:fe}),nt.eth_getBlockByHash=new yt({callName:"eth_getBlockByHash",params:2,inputFormatter:[Ct,function(b){return!!b}],outputFormatter:pe}),nt.eth_getBlockByNumber=new yt({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Ct,function(b){return!!b}],outputFormatter:pe}),nt.eth_getUncleByBlockHashAndIndex=new yt({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:pe}),nt.eth_getUncleByBlockNumberAndIndex=new yt({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:pe}),nt.eth_getBlockTransactionCountByHash=new yt({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getBlockTransactionCountByNumber=new yt({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getUncleCountByBlockHash=new yt({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getUncleCountByBlockNumber=new yt({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getTransactionByHash=new yt({callName:"eth_getTransactionByHash",params:1,inputFormatter:[an],outputFormatter:z}),nt.eth_getTransactionByBlockHashAndIndex=new yt({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:z}),nt.eth_getTransactionByBlockNumberAndIndex=new yt({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:z}),nt.eth_getTransactionReceipt=new yt({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[an],outputFormatter:$}),nt.eth_getTransactionCount=new yt({callName:"eth_getTransactionCount",params:2,inputFormatter:[Me,Dr],outputFormatter:je}),nt.eth_sendRawTransaction=new yt({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:fe}),nt.web3_sha3=new yt({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:fe}),nt.eth_sendTransaction=new yt({callName:"eth_sendTransaction",params:1,inputFormatter:[ae],outputFormatter:fe}),nt.eth_sign=new yt({callName:"eth_sign",params:2,inputFormatter:[Me,null],outputFormatter:fe}),nt.eth_call=new yt({callName:"eth_call",params:2,inputFormatter:[Qr,Dr],outputFormatter:fe}),nt.eth_estimateGas=new yt({callName:"eth_estimateGas",params:1,inputFormatter:[Qr],outputFormatter:je}),nt.eth_submitWork=new yt({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:De}),nt.eth_getWork=new yt({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:fr}),nt.eth_coinbase=new Sr({getter:"eth_coinbase",outputFormatter:hn}),nt.eth_mining=new Sr({getter:"eth_mining",outputFormatter:De}),nt.eth_hashrate=new Sr({getter:"eth_hashrate",outputFormatter:je}),nt.eth_syncing=new Sr({getter:"eth_syncing",outputFormatter:Je}),nt.eth_gasPrice=new Sr({getter:"eth_gasPrice",outputFormatter:va}),nt.eth_accounts=new Sr({getter:"eth_accounts",outputFormatter:fr}),nt.eth_blockNumber=new Sr({getter:"eth_blockNumber",outputFormatter:je}),nt.eth_protocolVersion=new Sr({getter:"eth_protocolVersion",outputFormatter:je}),nt.web3_clientVersion=new Sr({getter:"web3_clientVersion",outputFormatter:ce}),nt.net_version=new Sr({getter:"net_version",outputFormatter:ce}),nt.shh_version=new yt({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:je}),nt.shh_post=new yt({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:De}),nt.personal_newAccount=new yt({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:hn}),nt.personal_importRawKey=new yt({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:hn}),nt.personal_sign=new yt({callName:"personal_sign",params:3,inputFormatter:[Oe,Me,null],outputFormatter:fe}),nt.personal_ecRecover=new yt({callName:"personal_ecRecover",params:2,inputFormatter:[Oe,null],outputFormatter:hn}),nt.personal_unlockAccount=new yt({callName:"personal_unlockAccount",params:3,inputFormatter:[Me,null,Be],outputFormatter:De}),nt.personal_sendTransaction=new yt({callName:"personal_sendTransaction",params:2,inputFormatter:[ae,null],outputFormatter:fe}),nt.personal_lockAccount=new yt({callName:"personal_lockAccount",params:1,inputFormatter:[Me],outputFormatter:De}),nt.personal_listAccounts=new Sr({getter:"personal_listAccounts",outputFormatter:fr}),nt.net_listening=new Sr({getter:"net_listening",outputFormatter:De}),nt.net_peerCount=new Sr({getter:"net_peerCount",outputFormatter:je}),nt.eth_newFilter=new yt({callName:"eth_newFilter",params:1,inputFormatter:[Xe],outputFormatter:Le}),nt.eth_getLogs=new yt({callName:"eth_getLogs",params:1,inputFormatter:[fr],outputFormatter:fr}),nt.eth_newBlockFilter=new yt({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Le}),nt.eth_newPendingTransactionFilter=new yt({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Le}),nt.eth_uninstallFilter=new yt({callName:"eth_uninstallFilter",params:1,inputFormatter:[Le],outputFormatter:De}),nt.eth_getFilterLogs=new yt({callName:"eth_getFilterLogs",params:1,inputFormatter:[Le],outputFormatter:fr}),nt.eth_getFilterChanges=new yt({callName:"eth_getFilterChanges",params:1,inputFormatter:[Le],outputFormatter:fr}),nt.eth_submitHashrate=new yt({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:De}),nt.shh_newIdentity=new yt({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:fe}),nt.shh_hasIdentity=new yt({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_newGroup=new yt({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:fe}),nt.shh_addToGroup=new yt({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_newFilter=new yt({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Le}),nt.shh_uninstallFilter=new yt({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_getLogs=new yt({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getFilterMessages=new yt({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getFilterChanges=new yt({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getMessages=new yt({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:fr});function ut(b,I){const q=t.eth[I];if(!q)throw new Error(`Could not find the method/property named ${I.toString()}`);Object.defineProperty(b,I,{value:function(...J){return q.execute(this,...J)}})}class et{constructor(I){this.provider=I,this.requests=new Map}async sendAsync(I){const q=await this.provider;if(!q)throw new Error("Provider not set or invalid");const J=ja(I.method,I.params),re=u();return this.requests.set(J.id,re),q.sendAsync(J,((oe,Ce)=>{this.requests.delete(J.id),oe?re.reject(oe):La(Ce)?re.resolve(Ce.result):re.reject((function(ze){const st=ze&&ze.error&&ze.error.message?ze.error.message:"Invalid JSON RPC response: "+JSON.stringify(ze);return new Error(st)})(Ce))})),re}setProvider(I){this.provider=I}async getConfirmedTransaction(I){const q=await this.waitForCompletion(I);if(this.isFailure(q))throw new Error(`Transaction "${I}" failed`);return q}async waitForCompletion(I,q){const J=an(I);if(await this.isTxDropped(J,q)){const re=await this.getTransactionAndReceipt(J);return Object.assign(Object.assign({},re),{status:t.TransactionStatus.failed})}for(;;){const re=await this.getTransactionAndReceipt(J);if(!this.isPending(re)&&re.receipt)return Object.assign(Object.assign({},re),{status:this.isFailure(re)?t.TransactionStatus.failed:t.TransactionStatus.confirmed});await ql(2e3)}}async getTransaction(I){let q,J=null;const re=an(I);try{const Ce=(await this.eth_accounts())[0];Ce&&(J=await this.eth_getTransactionCount(Ce,"latest"))}catch{J=null}try{if(q=await this.eth_getTransactionByHash(re),q===null)return null}catch{return null}if(q.blockNumber===null){if(J!==null){if(q.nonce<J)return{hash:re,type:t.TransactionType.replaced,nonce:q.nonce};if(q.nonce>J)return{hash:re,type:t.TransactionType.queued,nonce:q.nonce}}return Object.assign({type:t.TransactionType.pending},q)}let oe;try{if(oe=await this.eth_getTransactionReceipt(re),oe===null||oe.status===0)return Object.assign({type:t.TransactionType.reverted},q)}catch{return null}return Object.assign(Object.assign({type:t.TransactionType.confirmed},q),{receipt:oe})}async isTxDropped(I,q=15){let J=q;for(;J>0;){if(await this.getTransactionAndReceipt(I)!==null)return!1;J-=1,await ql(2e3)}return!0}async getTransactionAndReceipt(I){I=an(I);const[q,J]=await Promise.all([this.eth_getTransactionByHash(I),this.eth_getTransactionReceipt(I)]);return Object.assign(Object.assign({},q),{receipt:J})}isPending(I){return I&&I.blockNumber===null}isFailure(I){return I&&(!I.receipt||I.receipt.status===0)}}tt([ut,rt("design:type",Function)],et.prototype,"web3_clientVersion",void 0),tt([ut,rt("design:type",Function)],et.prototype,"web3_sha3",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_version",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_peerCount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_listening",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_protocolVersion",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_syncing",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_coinbase",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_mining",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_hashrate",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_gasPrice",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_accounts",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_blockNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBalance",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getStorageAt",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionCount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockTransactionCountByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockTransactionCountByNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleCountByBlockHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleCountByBlockNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getCode",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sign",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sendTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sendRawTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_call",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_estimateGas",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockByNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionReceipt",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleByBlockHashAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newBlockFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newPendingTransactionFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_uninstallFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getFilterChanges",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getFilterLogs",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getLogs",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getWork",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_submitWork",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_submitHashrate",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_post",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_version",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newIdentity",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_hasIdentity",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newGroup",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_addToGroup",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_uninstallFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_getFilterChanges",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_getMessages",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_unlockAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_newAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_listAccounts",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_lockAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_importRawKey",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_sendTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_sign",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_ecRecover",void 0);class ru{constructor(I){this.json=I,this._inputTypes=I.inputs||[],this._outputTypes=I.outputs||[],this._constant=!!I.constant,this._payable=!!I.payable||I.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in I&&!I.constant||I.stateMutability==="nonpayable",this._name=D(I)}extractDefaultBlock(I){return I.length>this._inputTypes.length&&!rn(I[I.length-1])&&Dr(I.pop())||"latest"}validateArgs(I){if(I.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const q=I.filter((function(oe){return!(rn(oe)===!0&&nn(oe)===!1&&Lr(oe)===!1&&!(oe instanceof Uint8Array))}));if(q.length!==this._inputTypes.length)throw J=q.length,re=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${J}, expected: ${re}`);var J,re}toPayload(I){let q={to:void 0,data:void 0,value:void 0,from:void 0};I.length>this._inputTypes.length&&rn(I[I.length-1])&&(q=I.pop()),this.validateArgs(I);const J=this.signature();let re=t.coder.encodeParams(this._inputTypes,I);return re.indexOf("0x")===0&&(re=re.substr(2)),q.data="0x"+J+re,q}signature(){return X(this._name).slice(0,8)}unpackOutput(I){if(!I)return;const q=I.length>=2?I.slice(2):I,J=t.coder.decodeParams(this._outputTypes,q);return J.length===1?J[0]:J}async execute(I,q,...J){if(!I)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const re=this.toPayload(J);if(re.to=q,re.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!re.from)throw new Error('Missing "from" in transaction options');return await I.eth_sendTransaction(re)}{const re=this.extractDefaultBlock(J),oe=this.toPayload(J);oe.to=q;const Ce=await I.eth_call(oe,re);return this.unpackOutput(Ce)}}estimateGas(I,q,...J){if(!(I instanceof et))throw new Error("estimateGas needs to receive a RequestManager as first argument");const re=this.toPayload(J);return re.to=q,I.eth_estimateGas(re)}displayName(){return Re(this._name)}typeName(){return Pe(this._name)||"void"}attachToContract(I){const q=this.displayName(),J=Object.assign(((...re)=>this.execute(I.requestManager,I.address,...re)),{estimateGas:this.estimateGas.bind(this,I.requestManager,I.address),toPayload:(...re)=>this.toPayload(re),toRPCMessage:(...re)=>{const oe=this.extractDefaultBlock(re),Ce=this.toPayload(re);return Ce.to=I.address,{method:"eth_call",params:[Ce,oe]}},unpackOutput:re=>this.unpackOutput(re)});I[q]||(I[q]=J),I[q][this.typeName()]=J}}function as(b){if(b==null)return null;const I=String(b).toString();return I.indexOf("0x")===0?I:le(be(I))}class ka{constructor(I){this.requestManager=I,this.isStarted=!1,this.isDisposed=!1,this.formatter=q=>q,this.filterId=u(),this.callbacks=[],this.stopSemaphore=u()}async watch(I){if(this.isDisposed)throw new Error("The filter was disposed");I&&(this.callbacks.push(I),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const I=await this.getNewFilter();if(!I)throw new Error("Could not create a filter, response: "+JSON.stringify(I));this.filterId.resolve(I)}catch(I){throw I}this.stopSemaphore=u(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const I=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${I}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const q=await this.getChanges();q&&this.callbacks.forEach((J=>{this.formatter?q.forEach((re=>{J(this.formatter(re))})):q.forEach((re=>J(re)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=u(),setTimeout((I=()=>this.poll(),function(){I().catch((q=>console.error(q)))}),500))}else this.stopSemaphore.resolve(1);var I}}class ji extends ka{constructor(I,q,J=(re=>re)){super(I),this.requestManager=I,this.options=q,this.formatter=J,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(re){return as(re)})),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?Ct(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Ct(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const I=await this.filterId;return this.requestManager.eth_getFilterLogs(I)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const I=await this.filterId;return this.requestManager.eth_getFilterChanges(I)}async uninstall(){const I=await this.filterId;return this.requestManager.eth_uninstallFilter(I)}}class Li{constructor(I,q,J){this.requestManager=I,this.address=J,this._anonymous=!1,this._params=q.inputs||[],this._name=D(q),this._anonymous=q.anonymous||!1}types(I){return this._params.filter((function(q){return q.indexed===I}))}displayName(){return Re(this._name)}typeName(){return Pe(this._name)||"void"}signature(){return X(this._name)}encode(I={},q={}){const J={topics:[],address:this.address};q.fromBlock!==void 0&&(J.fromBlock=Ct(q.fromBlock)||void 0),q.toBlock!==void 0&&(J.toBlock=Ct(q.toBlock)||void 0),J.topics=J.topics||[],this._anonymous||J.topics.push("0x"+this.signature());const re=this._params.filter((function(oe){return oe.indexed===!0})).map((function(oe){const Ce=I[oe.name];return Ce==null?null:nn(Ce)?Ce.map((function(ze){return"0x"+t.coder.encodeParams([oe],[ze])})):"0x"+t.coder.encodeParams([oe],[Ce])}));return J.topics=J.topics.concat(re),J}decode(I){I.data=I.data||"",I.topics=I.topics||[];const q=(this._anonymous?I.topics:I.topics.slice(1)).map((function(ze){return ze.slice(2)})).join(""),J=t.coder.decodeParams(this.types(!0),q),re=I.data.slice(2),oe=t.coder.decodeParams(this.types(!1),re),Ce=this._params.reduce((function(ze,st){return ze[st.name]=st.indexed?J.shift():oe.shift(),ze}),{});return Object.assign(Object.assign({},Te(I)),{event:this.displayName(),address:I.address,args:Ce})}async execute(I,q){const J=this.encode(I,q),re=this.decode.bind(this);return new ji(this.requestManager,J,re)}attachToContract(I){const q=this.execute.bind(this),J=this.displayName();I.events[J]||(I.events[J]=q),I.events[J][this.typeName()]=this.execute.bind(this,I)}}class Yt{constructor(I,q,J){this._requestManager=I,this._json=q,this._address=J}encode(I={}){const q={address:this._address};return I.fromBlock!==void 0&&(q.fromBlock=Ct(I.fromBlock)||void 0),I.toBlock!==void 0&&(q.toBlock=Ct(I.toBlock)||void 0),q}decode(I){I.data=I.data||"";const q=nn(I.topics)&&Sn(I.topics[0])?I.topics[0].slice(2):"",J=this._json.filter((function(re){return q===X(D(re))}))[0];return J?new Li(this._requestManager,J,this._address).decode(I):Te(I)}async execute(I){const q=this.encode(I),J=this.decode.bind(this);return new ji(this._requestManager,q,J)}getAllEventsFunction(){return this.execute.bind(this)}}class nu{constructor(I,q,J){var re;this.requestManager=I,this.abi=q,this.address=J,this.events={},this.transactionHash=null,this.address=J,this.abi=q,(re=this).abi.filter((function(oe){return oe.type==="function"})).map((function(oe){return new ru(oe)})).forEach((function(oe){oe.attachToContract(re)})),this.allEvents=(function(oe){const Ce=oe.abi.filter((function(st){return st.type==="event"})),ze=new Yt(oe.requestManager,Ce,oe.address);return Ce.map((function(st){return new Li(oe.requestManager,st,oe.address)})).forEach((function(st){st.attachToContract(oe)})),ze.getAllEventsFunction()})(this)}}t.AbstractFilter=ka,t.BigNumber=te,t.Contract=nu,t.ContractFactory=class{constructor(b,I){this.requestManager=b,this.abi=I}async deploy(...b){let I;const q=b[b.length-1];if(rn(q)&&!nn(q)&&(I=b.pop()),!I)throw new Error("Missing options object");if(!I.data||typeof I.data!="string")throw new Error("Invalid options.data");if(je(I.value)>0&&!(this.abi.filter((function(ct){return ct.type==="constructor"&&ct.inputs.length===b.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const J=(re=this.abi,oe=b,re.filter((function(ct){return ct.type==="constructor"&&ct.inputs&&ct.inputs.length===oe.length})).map((function(ct){return ct.inputs||[]})).map((function(ct){return t.coder.encodeParams(ct,oe)}))[0]||"");var re,oe;I.data+=J,I.gas||(I.gas=await this.requestManager.eth_estimateGas(I));const Ce=await this.requestManager.eth_sendTransaction(I);if(!Ce)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const ze=await(async function(ct,gr){const Xt=u();let Ke=0;const Tr=()=>{Ke++,Ke>50?Xt.reject(new Error("Contract transaction couldn't be found after 50 blocks")):ct.eth_getTransactionReceipt(gr).then((Ir=>{Ir&&Ir.blockHash?Xt.resolve(Ir):setTimeout(Tr,1e3)}),(Ir=>Xt.reject(Ir)))};Tr();const Jt=await Xt,Ht=await ct.eth_getCode(Jt.contractAddress,"latest");if(Ht&&Ht.length>3)return Jt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Ht,receipt:Jt})})(this.requestManager,Ce),st=await this.at(ze);return st.transactionHash=Ce,st}async at(b){if(!Kt(b))throw new TypeError(`Invalid address ${JSON.stringify(b)}`);return new nu(this.requestManager,this.abi,b)}},t.EthBlockFilter=class extends ji{constructor(b){super(b,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},t.EthFilter=ji,t.EthPendingTransactionFilter=class extends ji{constructor(b){super(b,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},t.HTTPProvider=class{constructor(b,I={}){this.host=b,this.options=I,this.debug=!1,this.host=b||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(b,I){try{let q=null;q=b instanceof Array?b.map((oe=>n(oe))):n(b);const J=this.options.fetch||globalThis.fetch;if(J===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const re={body:JSON.stringify(q),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+re.body),J(this.host,re).then((async oe=>{if(oe.ok){const Ce=await oe.json();this.debug&&console.log("RECV << "+JSON.stringify(Ce)),Ce.error?I(Object.assign(new Error(Ce.error.json||Ce.error),Ce.error)):I(null,Ce)}else this.debug&&console.log("ERR << "+JSON.stringify(oe)),I(new Error("External error. response code: "+oe.status))}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),I(oe)}))}catch(q){this.debug&&console.log("ERR << "+JSON.stringify(q)),I(q)}}},t.Method=yt,t.Property=Sr,t.RequestManager=et,t.SHHFilter=class extends ka{constructor(b,I){super(b),this.requestManager=b,this.options=I,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(q){return as(q)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const b=await this.filterId;return this.requestManager.shh_getMessages(b)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const b=await this.filterId;return this.requestManager.shh_getFilterChanges(b)}async uninstall(){const b=await this.filterId;return this.requestManager.shh_uninstallFilter(b)}},t.SolidityEvent=Li,t.SolidityFunction=ru,t.WebSocketProvider=class{constructor(b,I={}){this.url=b,this.options=I,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const b=this.connection;this.timeout(new Error("Provider disposed.")),b.then((I=>I.close())).catch((I=>{this.debug&&console.error(I)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(b,I){const q=[];let J;if(b instanceof Array)J=Promise.all(b.map((re=>{const oe=u();try{const Ce=n(re);q.push(Ce),this.responseCallbacks.set(Ce.id,oe)}catch(Ce){oe.reject(Ce)}return oe})));else{const re=u();try{const oe=n(b);q.push(oe),this.responseCallbacks.set(oe.id,re)}catch(oe){re.reject(oe)}J=re}J.then((re=>I(null,re)),(re=>I(re))),this.connection.then((re=>{q.forEach((oe=>{const Ce=JSON.stringify(oe);this.debug&&console.log("SEND >> "+Ce),re.send(Ce)}))}),(re=>{I(re)}))}parseResponse(b){const I=[];return b.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((q=>{let J=q;this.lastChunk&&(J=this.lastChunk+J);let re=null;try{re=JSON.parse(J)}catch{return this.lastChunk=J,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",re&&I.push(re)})),I}processMessage(b){if("id"in b){const I=b.id,q=this.responseCallbacks.get(I);if(!q)return void console.error("Error: Received a response for an unknown request",b);this.responseCallbacks.delete(I),b.error!==void 0&&b.error!==null?q.reject(Object.assign(new Error(b.error.message||b.error),b.error)):"result"in b&&q.resolve(b)}else this.notificationCallbacks.forEach((I=>I(null,b)))}timeout(b){this.connection&&this.connection.isPending||(this.connection=u());const I=b||new Error("Connection timeout");this.responseCallbacks.forEach((q=>q.reject(I))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((q=>q.close())).catch((q=>{this.debug&&console.error(q)})),this.connection&&this.connection.isPending||(this.connection=u()),this.lastChunk="";const b=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!b)throw new Error("Please provide a WebSocketConstructor");const I=new b(this.url,this.options.protocol);I.onopen=()=>{this.connection.resolve(I)},I.onerror=q=>{const J=new Error("Error in web socket");J.data=q,this.timeout(J)},I.onclose=q=>{this.timeout(new Error(`Connection closed (${q&&q.reason||"Unknown reason"})`))},I.onmessage=q=>{const J=typeof q.data=="string"?q.data:"";this.debug&&console.log("RECV << "+q.data),this.parseResponse(J).forEach((re=>{re instanceof Array?re.forEach((oe=>this.processMessage(oe))):this.processMessage(re)}))}}},t.bytesToHex=le,t.bytesToUtf8String=Ie,t.concatBytes=K,t.default=et,t.extractDisplayName=Re,t.extractTypeName=Pe,t.fromAscii=function(b,I=0){let q="";for(let J=0;J<b.length;J++){const re=b.charCodeAt(J).toString(16);q+=re.length<2?"0"+re:re}return"0x"+q.padEnd(I,"0")},t.fromDecimal=Ge,t.fromTwosComplement=Qe,t.fromWei=function(b,I){const q=Dt(b).dividedBy(Rt(I));return Lr(b)?q:q.toString(10)},t.getAddress=pt,t.getValueOfUnit=Rt,t.hexToBytes=me,t.inputAddressFormatter=Me,t.inputBlockNumberFormatter=Ct,t.inputCallFormatter=Qr,t.inputDefaultBlockNumberFormatter=Dr,t.inputFilterOptions=Xe,t.inputPostFormatter=function(b){return b?(b.ttl=Ge(b.ttl),b.workToProve=Ge(b.workToProve),b.priority=Ge(b.priority),nn(b.topics)||(b.topics=b.topics?[b.topics]:[]),b.topics=b.topics.map((function(I){return I.indexOf("0x")===0?I:"0x"+le(be(I))})),b):null},t.inputTransactionFormatter=ae,t.inputTransactionId=an,t.isAddress=Kt,t.isArray=nn,t.isBigNumber=Lr,t.isBloom=function(b){return!!/^(0x)?[0-9a-f]{512}$/i.test(b)&&!!/^(0x)?[0-9a-f]{512}$/i.test(b)},t.isBoolean=Tn,t.isChecksumAddress=tr,t.isFunction=function(b){return typeof b=="function"},t.isHex=function(b){return typeof b=="string"&&/^0x[0-9a-fA-F]+$/.test(b)},t.isJson=function(b){try{return!!JSON.parse(b)}catch{return!1}},t.isObject=rn,t.isPredefinedBlockNumber=Da,t.isStrictAddress=qt,t.isString=Sn,t.isTopic=function(b){return!!/^(0x)?[0-9a-f]{64}$/i.test(b)&&!!/^(0x)?[0-9a-f]{64}$/i.test(b)},t.isValidResponse=La,t.outputBigNumberFormatter=va,t.outputBlockFormatter=pe,t.outputLogFormatter=Te,t.outputPostFormatter=function(b){return b?(b.expiry=je(b.expiry),b.sent=je(b.sent),b.ttl=je(b.ttl),b.workProved=je(b.workProved),b.topics||(b.topics=[]),b.topics=b.topics.map((function(I){return B(I)})),b):null},t.outputSyncingFormatter=Je,t.outputTransactionFormatter=z,t.outputTransactionReceiptFormatter=$,t.padLeft=F,t.padRight=function(b,I,q){return b+new Array(I-b.length+1).join(q||"0")},t.sha3=X,t.signedIsNegative=Fe,t.stringToUtf8Bytes=be,t.toAddress=hn,t.toArray=fr,t.toAscii=B,t.toBatchPayload=function(b){return b.map((function(I){return ja(I.method,I.params)}))},t.toBigNumber=Dt,t.toBoolean=De,t.toChecksumAddress=jr,t.toData=fe,t.toDecimal=je,t.toHex=Le,t.toJsonRpcRequest=ja,t.toNullDecimal=Be,t.toString=ce,t.toStringData=Oe,t.toTwosComplement=Ot,t.toWei=function(b,I){const q=Dt(b).times(Rt(I));return Lr(b)?q:q.toString(10)},t.transformToFullName=D,Object.defineProperty(t,"__esModule",{value:!0})}))})(pl,pl.exports)),pl.exports}var Uu={},bI;function IF(){if(bI)return Uu;bI=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.SignatureValidator=void 0;const e=_f();async function a(t,n){const i=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new e.ContractFactory(t,i).at(n)}return Uu.SignatureValidator=a,Uu}var ev={},sa={},Bo={},Uo={},tv={},ua={},wI;function ot(){if(wI)return ua;wI=1;var e=ua&&ua.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ua,"__esModule",{value:!0}),ua.validateType=ua.generateLazyValidator=ua.Ajv=void 0;const a=e(df());ua.Ajv=a.default;const t=e(oE()),n=e(sE());function i(u,c){let f=null;const p=(h,m)=>{if(!f){const v=new a.default({$data:!0,allErrors:!0});(0,t.default)(v),(0,n.default)(v,{singleError:!0}),c?.forEach(T=>v.addKeyword(T)),f=v.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(h,m)};return p}ua.generateLazyValidator=i;function s(u,c){return u.validate(c)}return ua.validateType=s,ua}var SI;function RF(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=ot();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(tv)),tv}var rv={},TI;function CF(){return TI||(TI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=ot();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(rv)),rv}var PI;function MF(){return PI||(PI=1,(function(e){var a=Uo&&Uo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Uo&&Uo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(RF(),e),t(CF(),e)})(Uo)),Uo}var Fo={},nv={},AI;function jF(){return AI||(AI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=ot();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(nv)),nv}var av={},iv={},NI;function Ef(){return NI||(NI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=ot();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},i={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function u(p){return n[p]}t.getMaxSupply=u;function c(p){return s[p]}t.getColor=c;function f(p){return[i[p],s[p]]}t.getGradient=f})(e.Rarity||(e.Rarity={}))})(iv)),iv}var ov={},OI;function es(){return OI||(OI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=ot();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(ov)),ov}var sv={},uv={},II;function OE(){return II||(II=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=ot();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(uv)),uv}var lv={},cv={},RI;function Dj(){return RI||(RI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=ot();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(cv)),cv}var CI;function IE(){return CI||(CI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=es(),t=ot(),n=Dj();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(lv)),lv}var MI;function RE(){return MI||(MI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=ot(),t=OE(),n=IE();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(sv)),sv}var Vo={},Ho={},dv={},fv={},jI;function Zs(){return jI||(jI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=ot();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(fv)),fv}var LI;function kj(){return LI||(LI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=es(),t=Zs(),n=ot();var i;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(i=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(function(f){f.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const p=new RegExp(f.schema.pattern,"i");f.validate=h=>p.test(h)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(dv)),dv}var pv={},DI;function LF(){return DI||(DI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=ot(),t=kj();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(pv)),pv}var kI;function DF(){return kI||(kI=1,(function(e){var a=Ho&&Ho.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ho&&Ho.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(kj(),e),t(LF(),e)})(Ho)),Ho}var mv={},hv={},qI;function qj(){return qI||(qI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=ot();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(hv)),hv}var yv={},BI;function Bj(){return BI||(BI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(yv)),yv}var gv={},UI;function Uj(){return UI||(UI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=ot();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(gv)),gv}var vv={},Fu={},FI;function CE(){return FI||(FI=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.displayableProperties=void 0,Fu.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Fu}var _v={},VI;function Fj(){return VI||(VI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(_v)),_v}var Ev={},HI;function Vj(){return HI||(HI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Ev)),Ev}var zI;function kF(){return zI||(zI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=ot(),t=CE(),n=qj(),i=Uj(),s=Fj(),u=Vj(),c=Bj();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:u.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(vv)),vv}var WI;function qF(){return WI||(WI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var a=qj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=Bj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=Uj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=kF();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=Fj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=Vj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(mv)),mv}var zo={},bv={},wv={},GI;function Hj(){return GI||(GI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=ot();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(wv)),wv}var KI;function zj(){return KI||(KI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=ot(),t=Hj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(bv)),bv}var Sv={},YI;function Wj(){return YI||(YI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(Sv)),Sv}var Tv={},XI;function ME(){return XI||(XI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=Ef(),t=ot();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(Tv)),Tv}var Pv={},Av={},JI;function Gj(){return JI||(JI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Av)),Av}var QI;function jE(){return QI||(QI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const a=ot(),t=Gj();e.thirdPartyProps={merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const n={type:"object",properties:Object.assign({},e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},i={keyword:"_containsHashingKeys",validate:(c,f)=>{var p;const h=f;return!((p=h?.merkleProof)===null||p===void 0)&&p.hashingKeys?h.merkleProof.hashingKeys.every(m=>h.hasOwnProperty(m)):!1},errors:!1},s=(0,a.generateLazyValidator)(n,[i]);function u(c){return s(c)}e.isThirdParty=u})(Pv)),Pv}var Nv={},Ov={},Ja={},xI;function Kj(){if(xI)return Ja;xI=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.isBaseAvatar=Ja.requiredBaseItemProps=Ja.baseItemProperties=void 0;const e=zj(),a=Wj(),t=CE();Ja.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},a.Metrics.schema),{nullable:!0})}),Ja.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(i){if(!i||!i.id)return!1;const s=i.id.split(":"),u=s[1]==="decentraland",c=s[3]==="base-avatars";return s.length===5&&u&&c}return Ja.isBaseAvatar=n,Ja}var ZI;function BF(){return ZI||(ZI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=ot(),t=es(),n=RE(),i=Kj(),s=ME(),u=jE(),c=IE();(function(f){f.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const p={keyword:"_isThirdParty",validate:(m,v)=>!m||(0,u.isThirdParty)(v),errors:!1},h={keyword:"_isBaseAvatar",validate:(m,v)=>!m||(0,i.isBaseAvatar)(v),errors:!1};f.validate=(0,a.generateLazyValidator)(f.schema,[p,h])})(e.Wearable||(e.Wearable={}))})(Ov)),Ov}var $I;function UF(){return $I||($I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=RE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=BF();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=es();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=Dj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=IE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(Nv)),Nv}var Iv={},Rv={},Cv={},Mv={},eR;function Yj(){return eR||(eR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=ot();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Mv)),Mv}var jv={},tR;function Xj(){return tR||(tR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=ot(),t=OE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(jv)),jv}var rR;function Jj(){return rR||(rR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=Yj(),t=ot(),n=Xj();(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Cv)),Cv}var nR;function FF(){return nR||(nR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=Qj(),t=ot(),n=Kj(),i=ME(),s=jE(),u=Jj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.thirdPartyProps),{emoteDataADR74:u.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(p,h)=>!p||(0,a.isThirdParty)(h),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f])})(e.Emote||(e.Emote={}))})(Rv)),Rv}var Lv={},aR;function VF(){return aR||(aR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=ot();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Lv)),Lv}var iR;function HF(){return iR||(iR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=FF();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=Xj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=Jj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=Yj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var s=VF();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(Iv)),Iv}var oR;function Qj(){return oR||(oR=1,(function(e){var a=zo&&zo.__createBinding||(Object.create?(function(p,h,m,v){v===void 0&&(v=m);var T=Object.getOwnPropertyDescriptor(h,m);(!T||("get"in T?!h.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(p,v,T)}):(function(p,h,m,v){v===void 0&&(v=m),p[v]=h[m]})),t=zo&&zo.__exportStar||function(p,h){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(h,m)&&a(h,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=zj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=Hj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=Wj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=OE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=ME();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=jE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(UF(),e),t(HF(),e)})(zo)),zo}var Wo={},sR;function zF(){return sR||(sR=1,(function(e){var a=Wo&&Wo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Wo&&Wo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Gj(),e)})(Wo)),Wo}var Dv={},kv={},uR;function LE(){return uR||(uR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=ot();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(kv)),kv}var lR;function WF(){return lR||(lR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=Zs(),t=LE(),n=ot();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Dv)),Dv}var qv={},Bv={},cR;function xj(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=Zs(),t=ot();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Bv)),Bv}var dR;function GF(){return dR||(dR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=Zs(),t=xj(),n=ot();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(qv)),qv}var Uv={},fR;function KF(){return fR||(fR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=LE(),t=ot();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Uv)),Uv}var Go={},Fv={},pR;function YF(){return pR||(pR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=es(),t=Zs(),n=ot();var i;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Fv)),Fv}var mR;function XF(){return mR||(mR=1,(function(e){var a=Go&&Go.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Go&&Go.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(YF(),e)})(Go)),Go}var hR;function DE(){return hR||(hR=1,(function(e){var a=Vo&&Vo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Vo&&Vo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(DF(),e),t(qF(),e),t(Qj(),e),t(CE(),e),t(zF(),e),t(WF(),e),t(GF(),e),t(KF(),e),t(XF(),e)})(Vo)),Vo}var yR;function JF(){return yR||(yR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=Ef(),t=es(),n=RE(),i=ot(),s=DE();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(av)),av}var gR;function QF(){return gR||(gR=1,(function(e){var a=Fo&&Fo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Fo&&Fo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(jF(),e),t(JF(),e)})(Fo)),Fo}var vR;function xF(){return vR||(vR=1,(function(e){var a=Bo&&Bo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Bo&&Bo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(MF(),e),t(QF(),e)})(Bo)),Bo}var Vv={},Hv={},zv={},_R;function Zj(){return _R||(_R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=ot(),t=ga();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.AVALANCHE_MAINNET="Avalanche Mainnet",s.BINANCE_MAINNET="Binance Smart Chain Mainnet",s.ARBITRUM_MAINNET="Arbitrum One",s.OPTIMISM_MAINNET="Optimism Mainnet",s.FANTOM_MAINNET="Fantom Mainnet"})(n=e.ChainName||(e.ChainName={}));function i(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;default:return null}}e.getChainId=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(zv)),zv}var Wv={},ER;function ya(){return ER||(ER=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=ot();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(Wv)),Wv}var bR;function ga(){return bR||(bR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=ot(),t=Zj(),n=ya();var i;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=u;function c(p){switch(p){case i.ETHEREUM_MAINNET:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.ETHEREUM_ROPSTEN:return{[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_RINKEBY:return{[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_GOERLI:return{[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_KOVAN:return{[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_SEPOLIA:return{[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.MATIC_MAINNET:return{[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.MATIC_MUMBAI:return{[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI};default:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET}}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:return n.Network.MATIC}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(Hv)),Hv}var Gv={},wR;function kE(){return wR||(wR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=ot();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Gv)),Gv}var SR;function ZF(){return SR||(SR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=ot(),t=ga(),n=kE(),i=ya();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Vv)),Vv}var Kv={},TR;function $F(){return TR||(TR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=ot();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(Kv)),Kv}var Yv={},PR;function eV(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=ot(),t=ga(),n=ya();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(Yv)),Yv}var Xv={},Jv={},AR;function bf(){return AR||(AR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=ot();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Jv)),Jv}var NR;function tV(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=ot(),t=ga(),n=ya(),i=bf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(Xv)),Xv}var Qv={},xv={},OR;function $j(){return OR||(OR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=ot(),t=ga(),n=DE(),i=ya(),s=bf(),u=Ef(),c=es();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:i.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(xv)),xv}var IR;function rV(){return IR||(IR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=ot(),t=ga(),n=ya(),i=$j(),s=bf();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(Qv)),Qv}var Zv={},RR;function nV(){return RR||(RR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Zv)),Zv}var $v={},CR;function aV(){return CR||(CR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=ot(),t=ga(),n=ya();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})($v)),$v}var e_={},MR;function iV(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(e_)),e_}var t_={},jR;function oV(){return jR||(jR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=ot(),t=ga(),n=kE(),i=ya();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(t_)),t_}var r_={},LR;function sV(){return LR||(LR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=ot();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(r_)),r_}var n_={},DR;function eL(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=ot();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(n_)),n_}var a_={},kR;function uV(){return kR||(kR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=ot(),t=ga(),n=eL(),i=ya();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(a_)),a_}var i_={},qR;function lV(){return qR||(qR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=ot(),t=ga(),n=ya();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(i_)),i_}var o_={},BR;function cV(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(o_)),o_}var s_={},UR;function dV(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(s_)),s_}var u_={},FR;function fV(){return FR||(FR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=ot();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(u_)),u_}var l_={},VR;function pV(){return VR||(VR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=ot();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(l_)),l_}var Ko={},c_={},HR;function mV(){return HR||(HR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=ot();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(c_)),c_}var d_={},zR;function hV(){return zR||(zR=1,Object.defineProperty(d_,"__esModule",{value:!0})),d_}var f_={},WR;function yV(){return WR||(WR=1,Object.defineProperty(f_,"__esModule",{value:!0})),f_}var p_={},GR;function gV(){return GR||(GR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=ot();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(p_)),p_}var m_={},KR;function vV(){return KR||(KR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=ot();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(m_)),m_}var h_={},YR;function _V(){return YR||(YR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const a=ot();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(h_)),h_}var y_={},XR;function EV(){return XR||(XR=1,Object.defineProperty(y_,"__esModule",{value:!0})),y_}var g_={},JR;function bV(){return JR||(JR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=ot();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(g_)),g_}var v_={},QR;function wV(){return QR||(QR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=ot();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(v_)),v_}var __={},xR;function SV(){return xR||(xR=1,Object.defineProperty(__,"__esModule",{value:!0})),__}var E_={},ZR;function TV(){return ZR||(ZR=1,Object.defineProperty(E_,"__esModule",{value:!0})),E_}var b_={},$R;function PV(){return $R||($R=1,Object.defineProperty(b_,"__esModule",{value:!0})),b_}var w_={},eC;function AV(){return eC||(eC=1,Object.defineProperty(w_,"__esModule",{value:!0})),w_}var S_={},tC;function NV(){return tC||(tC=1,Object.defineProperty(S_,"__esModule",{value:!0})),S_}var T_={},rC;function OV(){return rC||(rC=1,Object.defineProperty(T_,"__esModule",{value:!0})),T_}var P_={},nC;function IV(){return nC||(nC=1,Object.defineProperty(P_,"__esModule",{value:!0})),P_}var A_={},aC;function RV(){return aC||(aC=1,Object.defineProperty(A_,"__esModule",{value:!0})),A_}var iC;function CV(){return iC||(iC=1,(function(e){var a=Ko&&Ko.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ko&&Ko.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(mV(),e),t(hV(),e),t(yV(),e),t(gV(),e),t(vV(),e),t(_V(),e),t(EV(),e),t(bV(),e),t(wV(),e),t(SV(),e),t(TV(),e),t(PV(),e),t(AV(),e),t(NV(),e),t(OV(),e),t(IV(),e),t(RV(),e)})(Ko)),Ko}var N_={},oC;function MV(){return oC||(oC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(N_)),N_}var sC;function jV(){return sC||(sC=1,(function(e){var a=sa&&sa.__createBinding||(Object.create?(function(Ie,we,Ae,Ne){Ne===void 0&&(Ne=Ae);var me=Object.getOwnPropertyDescriptor(we,Ae);(!me||("get"in me?!we.__esModule:me.writable||me.configurable))&&(me={enumerable:!0,get:function(){return we[Ae]}}),Object.defineProperty(Ie,Ne,me)}):(function(Ie,we,Ae,Ne){Ne===void 0&&(Ne=Ae),Ie[Ne]=we[Ae]})),t=sa&&sa.__setModuleDefault||(Object.create?(function(Ie,we){Object.defineProperty(Ie,"default",{enumerable:!0,value:we})}):function(Ie,we){Ie.default=we}),n=sa&&sa.__importStar||function(Ie){if(Ie&&Ie.__esModule)return Ie;var we={};if(Ie!=null)for(var Ae in Ie)Ae!=="default"&&Object.prototype.hasOwnProperty.call(Ie,Ae)&&a(we,Ie,Ae);return t(we,Ie),we},i=sa&&sa.__exportStar||function(Ie,we){for(var Ae in Ie)Ae!=="default"&&!Object.prototype.hasOwnProperty.call(we,Ae)&&a(we,Ie,Ae)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=e.BidSortBy=e.Bid=void 0;const s=n(xF());e.sdk=s,i(ot(),e);var u=ZF();Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return u.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return u.BidSortBy}});var c=$F();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return c.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return c.AccountSortBy}});var f=ga();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return f.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return f.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return f.getURNProtocol}});var p=Zj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return p.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return p.getChainId}});var h=eV();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return h.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return h.CollectionSortBy}});var m=tV();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return m.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return m.ContractSortBy}});var v=rV();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return v.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return v.ItemSortBy}});var T=kE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return T.ListingStatus}});var C=nV();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return C.MetaTransaction}});var N=aV();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return N.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return N.MintSortBy}});var E=ya();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return E.Network}});var R=bf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return R.NFTCategory}});var _=$j();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return _.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return _.NFTSortBy}});var O=iV();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return O.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return O.CatalogSortDirection}});var P=oV();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return P.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return P.OrderSortBy}});var y=sV();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return y.ProviderType}});var S=Ef();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return S.Rarity}});var M=eL();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return M.SaleType}});var U=uV();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return U.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return U.SaleSortBy}});var V=lV();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return V.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return V.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return V.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return V.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return V.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return V.PeriodCreation}});var Q=cV();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return Q.AnalyticsDayDataSortBy}});var te=dV();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return te.Store}});var he=fV();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return he.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return he.GenderFilterOption}});var be=pV();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return be.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return be.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return be.isInsideWorldLimits}}),i(CV(),e),i(DE(),e),i(Zs(),e),i(MV(),e),i(LE(),e),i(xj(),e)})(sa)),sa}var uC;function tL(){return uC||(uC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const a=jV();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return a.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return a.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return a.AuthLink}})})(ev)),ev}var Vu={},lC;function LV(){if(lC)return Vu;lC=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.moveMinutes=void 0;function e(a){const t=new Date;return t.setMinutes(t.getMinutes()+a),t}return Vu.moveMinutes=e,Vu}var Ud={},cC;function DV(){if(cC)return Ud;cC=1,Object.defineProperty(Ud,"__esModule",{value:!0});const e=_f();class a{constructor(n,i=!0){this.requestManager=n,this.checkedBlocks={},this.saveBlocks=i,i&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),i=await this.getBlockWrapper(1);this.blockTime=(n.timestamp-i.timestamp)/Number(n.number)-1,this.firstTimestamp=i.timestamp}async getDate(n,i=!0){const s=n/1e3,u=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),s<this.firstTimestamp)return{block:1,timestamp:s};if(s>=u||s>this.savedBlocks.latest.timestamp)return{block:(0,e.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:s};this.checkedBlocks[s]=[];const c=await this.getBlockWrapper(Math.ceil((s-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(s,c,i),timestamp:s}}async findBetter(n,i,s,u=this.blockTime){if(await this.isBetterBlock(n,i,s))return i.number;const c=n-i.timestamp;let f=Math.ceil(c/u);f===0&&(f=c<0?-1:1);const p=await this.getBlockWrapper(this.getNextBlock(n,i.number,f));return u=Math.abs((i.timestamp-p.timestamp)/(i.number-p.number)),this.findBetter(n,p,s,u)}async isBetterBlock(n,i,s){const u=i.timestamp;if(s){if(u<n)return!1;const c=await this.getBlockWrapper(i.number-1);if(u>=n&&c.timestamp<n)return!0}else{if(u>=n)return!1;const c=await this.getBlockWrapper(i.number+1);if(u<n&&c.timestamp>=n)return!0}return!1}getNextBlock(n,i,s){const u=i+s;return this.checkedBlocks[n].includes(u)?this.getNextBlock(n,i,s<0?++s:--s):(this.checkedBlocks[n].push(u),u)}async getBlockWrapper(n){if(!this.saveBlocks){const s=await this.requestManager.eth_getBlockByNumber(n,!1);return{number:(0,e.toBigNumber)(s.number).toNumber(),timestamp:(0,e.toBigNumber)(s.timestamp).toNumber()}}if(this.savedBlocks[n.toString()])return this.savedBlocks[n];if(typeof n=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=n)return this.savedBlocks.latest;const{timestamp:i}=await this.requestManager.eth_getBlockByNumber(n,!1);return this.savedBlocks[n.toString()]={number:(0,e.toBigNumber)(n==="latest"?await this.requestManager.eth_blockNumber():n).toNumber(),timestamp:(0,e.toBigNumber)(i).toNumber()},this.requests++,this.savedBlocks[n.toString()]}}return Ud.default=a,Ud}var Vr={},O_={},I_={},Jr={},dC;function qE(){if(dC)return Jr;dC=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.output=Jr.exists=Jr.hash=Jr.bytes=Jr.bool=Jr.number=void 0;function e(c){if(!Number.isSafeInteger(c)||c<0)throw new Error(`Wrong positive integer: ${c}`)}Jr.number=e;function a(c){if(typeof c!="boolean")throw new Error(`Expected boolean, not ${c}`)}Jr.bool=a;function t(c,...f){if(!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length>0&&!f.includes(c.length))throw new TypeError(`Expected Uint8Array of length ${f}, not of length=${c.length}`)}Jr.bytes=t;function n(c){if(typeof c!="function"||typeof c.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");e(c.outputLen),e(c.blockLen)}Jr.hash=n;function i(c,f=!0){if(c.destroyed)throw new Error("Hash instance has been destroyed");if(f&&c.finished)throw new Error("Hash#digest() has already been called")}Jr.exists=i;function s(c,f){t(c);const p=f.outputLen;if(c.length<p)throw new Error(`digestInto() expects output buffer of length at least ${p}`)}Jr.output=s;const u={number:e,bool:a,bytes:t,hash:n,exists:i,output:s};return Jr.default=u,Jr}var R_={},Hu={},fC;function kV(){return fC||(fC=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.crypto=void 0,Hu.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0}),Hu}var pC;function _l(){return pC||(pC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const a=kV(),t=P=>new Uint8Array(P.buffer,P.byteOffset,P.byteLength);e.u8=t;const n=P=>new Uint32Array(P.buffer,P.byteOffset,Math.floor(P.byteLength/4));e.u32=n;const i=P=>new DataView(P.buffer,P.byteOffset,P.byteLength);e.createView=i;const s=(P,y)=>P<<32-y|P>>>y;if(e.rotr=s,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const u=Array.from({length:256},(P,y)=>y.toString(16).padStart(2,"0"));function c(P){if(!(P instanceof Uint8Array))throw new Error("Uint8Array expected");let y="";for(let S=0;S<P.length;S++)y+=u[P[S]];return y}e.bytesToHex=c;function f(P){if(typeof P!="string")throw new TypeError("hexToBytes: expected string, got "+typeof P);if(P.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const y=new Uint8Array(P.length/2);for(let S=0;S<y.length;S++){const M=S*2,U=P.slice(M,M+2),V=Number.parseInt(U,16);if(Number.isNaN(V)||V<0)throw new Error("Invalid byte sequence");y[S]=V}return y}e.hexToBytes=f;const p=async()=>{};e.nextTick=p;async function h(P,y,S){let M=Date.now();for(let U=0;U<P;U++){S(U);const V=Date.now()-M;V>=0&&V<y||(await(0,e.nextTick)(),M+=V)}}e.asyncLoop=h;function m(P){if(typeof P!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof P}`);return new TextEncoder().encode(P)}e.utf8ToBytes=m;function v(P){if(typeof P=="string"&&(P=m(P)),!(P instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof P})`);return P}e.toBytes=v;function T(...P){if(!P.every(M=>M instanceof Uint8Array))throw new Error("Uint8Array list expected");if(P.length===1)return P[0];const y=P.reduce((M,U)=>M+U.length,0),S=new Uint8Array(y);for(let M=0,U=0;M<P.length;M++){const V=P[M];S.set(V,U),U+=V.length}return S}e.concatBytes=T;class C{clone(){return this._cloneInto()}}e.Hash=C;const N=P=>Object.prototype.toString.call(P)==="[object Object]"&&P.constructor===Object;function E(P,y){if(y!==void 0&&(typeof y!="object"||!N(y)))throw new TypeError("Options should be object or undefined");return Object.assign(P,y)}e.checkOpts=E;function R(P){const y=M=>P().update(v(M)).digest(),S=P();return y.outputLen=S.outputLen,y.blockLen=S.blockLen,y.create=()=>P(),y}e.wrapConstructor=R;function _(P){const y=(M,U)=>P(U).update(v(M)).digest(),S=P({});return y.outputLen=S.outputLen,y.blockLen=S.blockLen,y.create=M=>P(M),y}e.wrapConstructorWithOpts=_;function O(P=32){if(a.crypto.web)return a.crypto.web.getRandomValues(new Uint8Array(P));if(a.crypto.node)return new Uint8Array(a.crypto.node.randomBytes(P).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=O})(R_)),R_}var mC;function qV(){return mC||(mC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const a=qE(),t=_l();class n extends t.Hash{constructor(u,c){super(),this.finished=!1,this.destroyed=!1,a.default.hash(u);const f=(0,t.toBytes)(c);if(this.iHash=u.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const p=this.blockLen,h=new Uint8Array(p);h.set(f.length>p?u.create().update(f).digest():f);for(let m=0;m<h.length;m++)h[m]^=54;this.iHash.update(h),this.oHash=u.create();for(let m=0;m<h.length;m++)h[m]^=106;this.oHash.update(h),h.fill(0)}update(u){return a.default.exists(this),this.iHash.update(u),this}digestInto(u){a.default.exists(this),a.default.bytes(u,this.outputLen),this.finished=!0,this.iHash.digestInto(u),this.oHash.update(u),this.oHash.digestInto(u),this.destroy()}digest(){const u=new Uint8Array(this.oHash.outputLen);return this.digestInto(u),u}_cloneInto(u){u||(u=Object.create(Object.getPrototypeOf(this),{}));const{oHash:c,iHash:f,finished:p,destroyed:h,blockLen:m,outputLen:v}=this;return u=u,u.finished=p,u.destroyed=h,u.blockLen=m,u.outputLen=v,u.oHash=c._cloneInto(u.oHash),u.iHash=f._cloneInto(u.iHash),u}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(s,u,c)=>new n(s,u).update(c).digest();e.hmac=i,e.hmac.create=(s,u)=>new n(s,u)})(I_)),I_}var Yo={},zu={},hC;function BV(){if(hC)return zu;hC=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.SHA2=void 0;const e=qE(),a=_l();function t(i,s,u,c){if(typeof i.setBigUint64=="function")return i.setBigUint64(s,u,c);const f=BigInt(32),p=BigInt(4294967295),h=Number(u>>f&p),m=Number(u&p),v=c?4:0,T=c?0:4;i.setUint32(s+v,h,c),i.setUint32(s+T,m,c)}class n extends a.Hash{constructor(s,u,c,f){super(),this.blockLen=s,this.outputLen=u,this.padOffset=c,this.isLE=f,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(s),this.view=(0,a.createView)(this.buffer)}update(s){e.default.exists(this);const{view:u,buffer:c,blockLen:f}=this;s=(0,a.toBytes)(s);const p=s.length;for(let h=0;h<p;){const m=Math.min(f-this.pos,p-h);if(m===f){const v=(0,a.createView)(s);for(;f<=p-h;h+=f)this.process(v,h);continue}c.set(s.subarray(h,h+m),this.pos),this.pos+=m,h+=m,this.pos===f&&(this.process(u,0),this.pos=0)}return this.length+=s.length,this.roundClean(),this}digestInto(s){e.default.exists(this),e.default.output(s,this),this.finished=!0;const{buffer:u,view:c,blockLen:f,isLE:p}=this;let{pos:h}=this;u[h++]=128,this.buffer.subarray(h).fill(0),this.padOffset>f-h&&(this.process(c,0),h=0);for(let N=h;N<f;N++)u[N]=0;t(c,f-8,BigInt(this.length*8),p),this.process(c,0);const m=(0,a.createView)(s),v=this.outputLen;if(v%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const T=v/4,C=this.get();if(T>C.length)throw new Error("_sha2: outputLen bigger than state");for(let N=0;N<T;N++)m.setUint32(4*N,C[N],p)}digest(){const{buffer:s,outputLen:u}=this;this.digestInto(s);const c=s.slice(0,u);return this.destroy(),c}_cloneInto(s){s||(s=new this.constructor),s.set(...this.get());const{blockLen:u,buffer:c,length:f,finished:p,destroyed:h,pos:m}=this;return s.length=f,s.pos=m,s.finished=p,s.destroyed=h,f%u&&s.buffer.set(c),s}}return zu.SHA2=n,zu}var yC;function rL(){if(yC)return Yo;yC=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.sha224=Yo.sha256=void 0;const e=BV(),a=_l(),t=(p,h,m)=>p&h^~p&m,n=(p,h,m)=>p&h^p&m^h&m,i=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends e.SHA2{constructor(){super(64,32,8,!1),this.A=s[0]|0,this.B=s[1]|0,this.C=s[2]|0,this.D=s[3]|0,this.E=s[4]|0,this.F=s[5]|0,this.G=s[6]|0,this.H=s[7]|0}get(){const{A:h,B:m,C:v,D:T,E:C,F:N,G:E,H:R}=this;return[h,m,v,T,C,N,E,R]}set(h,m,v,T,C,N,E,R){this.A=h|0,this.B=m|0,this.C=v|0,this.D=T|0,this.E=C|0,this.F=N|0,this.G=E|0,this.H=R|0}process(h,m){for(let P=0;P<16;P++,m+=4)u[P]=h.getUint32(m,!1);for(let P=16;P<64;P++){const y=u[P-15],S=u[P-2],M=(0,a.rotr)(y,7)^(0,a.rotr)(y,18)^y>>>3,U=(0,a.rotr)(S,17)^(0,a.rotr)(S,19)^S>>>10;u[P]=U+u[P-7]+M+u[P-16]|0}let{A:v,B:T,C,D:N,E,F:R,G:_,H:O}=this;for(let P=0;P<64;P++){const y=(0,a.rotr)(E,6)^(0,a.rotr)(E,11)^(0,a.rotr)(E,25),S=O+y+t(E,R,_)+i[P]+u[P]|0,U=((0,a.rotr)(v,2)^(0,a.rotr)(v,13)^(0,a.rotr)(v,22))+n(v,T,C)|0;O=_,_=R,R=E,E=N+S|0,N=C,C=T,T=v,v=S+U|0}v=v+this.A|0,T=T+this.B|0,C=C+this.C|0,N=N+this.D|0,E=E+this.E|0,R=R+this.F|0,_=_+this.G|0,O=O+this.H|0,this.set(v,T,C,N,E,R,_,O)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class f extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return Yo.sha256=(0,a.wrapConstructor)(()=>new c),Yo.sha224=(0,a.wrapConstructor)(()=>new f),Yo}var C_={};const UV={},FV=Object.freeze(Object.defineProperty({__proto__:null,default:UV},Symbol.toStringTag,{value:"Module"})),VV=wD(FV);var gC;function vC(){return gC||(gC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const a=VV,t=BigInt(0),n=BigInt(1),i=BigInt(2),s=BigInt(3),u=BigInt(8),c=Object.freeze({a:t,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=c;const f=(ae,z)=>(ae+z/i)/z,p={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(ae){const{n:z}=c,$=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),pe=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Te=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Me=$,Xe=BigInt("0x100000000000000000000000000000000"),Je=f(Me*ae,z),vt=f(-pe*ae,z);let dt=B(ae-Je*$-vt*Te,z),St=B(-Je*pe-vt*Me,z);const Nt=dt>Xe,Mt=St>Xe;if(Nt&&(dt=z-dt),Mt&&(St=z-St),dt>Xe||St>Xe)throw new Error("splitScalarEndo: Endomorphism failed, k="+ae);return{k1neg:Nt,k1:dt,k2neg:Mt,k2:St}}},h=32,m=32,v=32,T=h+1,C=2*h+1;function N(ae){const{a:z,b:$}=c,pe=B(ae*ae),Te=B(pe*ae);return B(Te+z*ae+$)}const E=c.a===t;class R extends Error{constructor(z){super(z)}}function _(ae){if(!(ae instanceof O))throw new TypeError("JacobianPoint expected")}class O{constructor(z,$,pe){this.x=z,this.y=$,this.z=pe}static fromAffine(z){if(!(z instanceof S))throw new TypeError("JacobianPoint#fromAffine: expected Point");return z.equals(S.ZERO)?O.ZERO:new O(z.x,z.y,n)}static toAffineBatch(z){const $=Re(z.map(pe=>pe.z));return z.map((pe,Te)=>pe.toAffine($[Te]))}static normalizeZ(z){return O.toAffineBatch(z).map(O.fromAffine)}equals(z){_(z);const{x:$,y:pe,z:Te}=this,{x:Me,y:Xe,z:Je}=z,vt=B(Te*Te),dt=B(Je*Je),St=B($*dt),Nt=B(Me*vt),Mt=B(B(pe*Je)*dt),or=B(B(Xe*Te)*vt);return St===Nt&&Mt===or}negate(){return new O(this.x,B(-this.y),this.z)}double(){const{x:z,y:$,z:pe}=this,Te=B(z*z),Me=B($*$),Xe=B(Me*Me),Je=z+Me,vt=B(i*(B(Je*Je)-Te-Xe)),dt=B(s*Te),St=B(dt*dt),Nt=B(St-i*vt),Mt=B(dt*(vt-Nt)-u*Xe),or=B(i*$*pe);return new O(Nt,Mt,or)}add(z){_(z);const{x:$,y:pe,z:Te}=this,{x:Me,y:Xe,z:Je}=z;if(Me===t||Xe===t)return this;if($===t||pe===t)return z;const vt=B(Te*Te),dt=B(Je*Je),St=B($*dt),Nt=B(Me*vt),Mt=B(B(pe*Je)*dt),or=B(B(Xe*Te)*vt),rr=B(Nt-St),wr=B(or-Mt);if(rr===t)return wr===t?this.double():O.ZERO;const Hr=B(rr*rr),An=B(rr*Hr),Vn=B(St*Hr),ai=B(wr*wr-An-i*Vn),kr=B(wr*(Vn-ai)-Mt*An),_a=B(Te*Je*rr);return new O(ai,kr,_a)}subtract(z){return this.add(z.negate())}multiplyUnsafe(z){const $=O.ZERO;if(typeof z=="bigint"&&z===t)return $;let pe=F(z);if(pe===n)return this;if(!E){let Nt=$,Mt=this;for(;pe>t;)pe&n&&(Nt=Nt.add(Mt)),Mt=Mt.double(),pe>>=n;return Nt}let{k1neg:Te,k1:Me,k2neg:Xe,k2:Je}=p.splitScalar(pe),vt=$,dt=$,St=this;for(;Me>t||Je>t;)Me&n&&(vt=vt.add(St)),Je&n&&(dt=dt.add(St)),St=St.double(),Me>>=n,Je>>=n;return Te&&(vt=vt.negate()),Xe&&(dt=dt.negate()),dt=new O(B(dt.x*p.beta),dt.y,dt.z),vt.add(dt)}precomputeWindow(z){const $=E?128/z+1:256/z+1,pe=[];let Te=this,Me=Te;for(let Xe=0;Xe<$;Xe++){Me=Te,pe.push(Me);for(let Je=1;Je<2**(z-1);Je++)Me=Me.add(Te),pe.push(Me);Te=Me.double()}return pe}wNAF(z,$){!$&&this.equals(O.BASE)&&($=S.BASE);const pe=$&&$._WINDOW_SIZE||1;if(256%pe)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let Te=$&&y.get($);Te||(Te=this.precomputeWindow(pe),$&&pe!==1&&(Te=O.normalizeZ(Te),y.set($,Te)));let Me=O.ZERO,Xe=O.BASE;const Je=1+(E?128/pe:256/pe),vt=2**(pe-1),dt=BigInt(2**pe-1),St=2**pe,Nt=BigInt(pe);for(let Mt=0;Mt<Je;Mt++){const or=Mt*vt;let rr=Number(z&dt);z>>=Nt,rr>vt&&(rr-=St,z+=n);const wr=or,Hr=or+Math.abs(rr)-1,An=Mt%2!==0,Vn=rr<0;rr===0?Xe=Xe.add(P(An,Te[wr])):Me=Me.add(P(Vn,Te[Hr]))}return{p:Me,f:Xe}}multiply(z,$){let pe=F(z),Te,Me;if(E){const{k1neg:Xe,k1:Je,k2neg:vt,k2:dt}=p.splitScalar(pe);let{p:St,f:Nt}=this.wNAF(Je,$),{p:Mt,f:or}=this.wNAF(dt,$);St=P(Xe,St),Mt=P(vt,Mt),Mt=new O(B(Mt.x*p.beta),Mt.y,Mt.z),Te=St.add(Mt),Me=Nt.add(or)}else{const{p:Xe,f:Je}=this.wNAF(pe,$);Te=Xe,Me=Je}return O.normalizeZ([Te,Me])[0]}toAffine(z){const{x:$,y:pe,z:Te}=this,Me=this.equals(O.ZERO);z==null&&(z=Me?u:ue(Te));const Xe=z,Je=B(Xe*Xe),vt=B(Je*Xe),dt=B($*Je),St=B(pe*vt),Nt=B(Te*Xe);if(Me)return S.ZERO;if(Nt!==n)throw new Error("invZ was invalid");return new S(dt,St)}}O.BASE=new O(c.Gx,c.Gy,n),O.ZERO=new O(t,n,t);function P(ae,z){const $=z.negate();return ae?$:z}const y=new WeakMap;class S{constructor(z,$){this.x=z,this.y=$}_setWindowSize(z){this._WINDOW_SIZE=z,y.delete(this)}hasEvenY(){return this.y%i===t}static fromCompressedHex(z){const $=z.length===32,pe=X($?z:z.subarray(1));if(!De(pe))throw new Error("Point is not on curve");const Te=N(pe);let Me=K(Te);const Xe=(Me&n)===n;$?Xe&&(Me=B(-Me)):(z[0]&1)===1!==Xe&&(Me=B(-Me));const Je=new S(pe,Me);return Je.assertValidity(),Je}static fromUncompressedHex(z){const $=X(z.subarray(1,h+1)),pe=X(z.subarray(h+1,h*2+1)),Te=new S($,pe);return Te.assertValidity(),Te}static fromHex(z){const $=L(z),pe=$.length,Te=$[0];if(pe===h)return this.fromCompressedHex($);if(pe===T&&(Te===2||Te===3))return this.fromCompressedHex($);if(pe===C&&Te===4)return this.fromUncompressedHex($);throw new Error(`Point.fromHex: received invalid point. Expected 32-${T} compressed bytes or ${C} uncompressed bytes, not ${pe}`)}static fromPrivateKey(z){return S.BASE.multiply(Le(z))}static fromSignature(z,$,pe){const{r:Te,s:Me}=Dt($);if(![0,1,2,3].includes(pe))throw new Error("Cannot recover: invalid recovery bit");const Xe=Be(L(z)),{n:Je}=c,vt=pe===2||pe===3?Te+Je:Te,dt=ue(vt,Je),St=B(-Xe*dt,Je),Nt=B(Me*dt,Je),Mt=pe&1?"03":"02",or=S.fromHex(Mt+we(vt)),rr=S.BASE.multiplyAndAddUnsafe(or,St,Nt);if(!rr)throw new Error("Cannot recover signature: point at infinify");return rr.assertValidity(),rr}toRawBytes(z=!1){return le(this.toHex(z))}toHex(z=!1){const $=we(this.x);return z?`${this.hasEvenY()?"02":"03"}${$}`:`04${$}${we(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const z="Point is not on elliptic curve",{x:$,y:pe}=this;if(!De($)||!De(pe))throw new Error(z);const Te=B(pe*pe),Me=N($);if(B(Te-Me)!==t)throw new Error(z)}equals(z){return this.x===z.x&&this.y===z.y}negate(){return new S(this.x,B(-this.y))}double(){return O.fromAffine(this).double().toAffine()}add(z){return O.fromAffine(this).add(O.fromAffine(z)).toAffine()}subtract(z){return this.add(z.negate())}multiply(z){return O.fromAffine(this).multiply(z,this).toAffine()}multiplyAndAddUnsafe(z,$,pe){const Te=O.fromAffine(this),Me=$===t||$===n||this!==S.BASE?Te.multiplyUnsafe($):Te.multiply($),Xe=O.fromAffine(z).multiplyUnsafe(pe),Je=Me.add(Xe);return Je.equals(O.ZERO)?void 0:Je.toAffine()}}e.Point=S,S.BASE=new S(c.Gx,c.Gy),S.ZERO=new S(t,t);function M(ae){return Number.parseInt(ae[0],16)>=8?"00"+ae:ae}function U(ae){if(ae.length<2||ae[0]!==2)throw new Error(`Invalid signature integer tag: ${be(ae)}`);const z=ae[1],$=ae.subarray(2,z+2);if(!z||$.length!==z)throw new Error("Invalid signature integer: wrong length");if($[0]===0&&$[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:X($),left:ae.subarray(z+2)}}function V(ae){if(ae.length<2||ae[0]!=48)throw new Error(`Invalid signature tag: ${be(ae)}`);if(ae[1]!==ae.length-2)throw new Error("Invalid signature: incorrect length");const{data:z,left:$}=U(ae.subarray(2)),{data:pe,left:Te}=U($);if(Te.length)throw new Error(`Invalid signature: left bytes after parsing: ${be(Te)}`);return{r:z,s:pe}}class Q{constructor(z,$){this.r=z,this.s=$,this.assertValidity()}static fromCompact(z){const $=z instanceof Uint8Array,pe="Signature.fromCompact";if(typeof z!="string"&&!$)throw new TypeError(`${pe}: Expected string or Uint8Array`);const Te=$?be(z):z;if(Te.length!==128)throw new Error(`${pe}: Expected 64-byte hex`);return new Q(me(Te.slice(0,64)),me(Te.slice(64,128)))}static fromDER(z){const $=z instanceof Uint8Array;if(typeof z!="string"&&!$)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:pe,s:Te}=V($?z:le(z));return new Q(pe,Te)}static fromHex(z){return this.fromDER(z)}assertValidity(){const{r:z,s:$}=this;if(!Oe(z))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Oe($))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const z=c.n>>n;return this.s>z}normalizeS(){return this.hasHighS()?new Q(this.r,B(-this.s,c.n)):this}toDERRawBytes(){return le(this.toDERHex())}toDERHex(){const z=M(Ne(this.s)),$=M(Ne(this.r)),pe=z.length/2,Te=$.length/2,Me=Ne(pe),Xe=Ne(Te);return`30${Ne(Te+pe+4)}02${Xe}${$}02${Me}${z}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return le(this.toCompactHex())}toCompactHex(){return we(this.r)+we(this.s)}}e.Signature=Q;function te(...ae){if(!ae.every(pe=>pe instanceof Uint8Array))throw new Error("Uint8Array list expected");if(ae.length===1)return ae[0];const z=ae.reduce((pe,Te)=>pe+Te.length,0),$=new Uint8Array(z);for(let pe=0,Te=0;pe<ae.length;pe++){const Me=ae[pe];$.set(Me,Te),Te+=Me.length}return $}const he=Array.from({length:256},(ae,z)=>z.toString(16).padStart(2,"0"));function be(ae){if(!(ae instanceof Uint8Array))throw new Error("Expected Uint8Array");let z="";for(let $=0;$<ae.length;$++)z+=he[ae[$]];return z}const Ie=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function we(ae){if(typeof ae!="bigint")throw new Error("Expected bigint");if(!(t<=ae&&ae<Ie))throw new Error("Expected number 0 <= n < 2^256");return ae.toString(16).padStart(64,"0")}function Ae(ae){const z=le(we(ae));if(z.length!==32)throw new Error("Error: expected 32 bytes");return z}function Ne(ae){const z=ae.toString(16);return z.length&1?`0${z}`:z}function me(ae){if(typeof ae!="string")throw new TypeError("hexToNumber: expected string, got "+typeof ae);return BigInt(`0x${ae}`)}function le(ae){if(typeof ae!="string")throw new TypeError("hexToBytes: expected string, got "+typeof ae);if(ae.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+ae.length);const z=new Uint8Array(ae.length/2);for(let $=0;$<z.length;$++){const pe=$*2,Te=ae.slice(pe,pe+2),Me=Number.parseInt(Te,16);if(Number.isNaN(Me)||Me<0)throw new Error("Invalid byte sequence");z[$]=Me}return z}function X(ae){return me(be(ae))}function L(ae){return ae instanceof Uint8Array?Uint8Array.from(ae):le(ae)}function F(ae){if(typeof ae=="number"&&Number.isSafeInteger(ae)&&ae>0)return BigInt(ae);if(typeof ae=="bigint"&&Oe(ae))return ae;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function B(ae,z=c.P){const $=ae%z;return $>=t?$:z+$}function D(ae,z){const{P:$}=c;let pe=ae;for(;z-- >t;)pe*=pe,pe%=$;return pe}function K(ae){const{P:z}=c,$=BigInt(6),pe=BigInt(11),Te=BigInt(22),Me=BigInt(23),Xe=BigInt(44),Je=BigInt(88),vt=ae*ae*ae%z,dt=vt*vt*ae%z,St=D(dt,s)*dt%z,Nt=D(St,s)*dt%z,Mt=D(Nt,i)*vt%z,or=D(Mt,pe)*Mt%z,rr=D(or,Te)*or%z,wr=D(rr,Xe)*rr%z,Hr=D(wr,Je)*wr%z,An=D(Hr,Xe)*rr%z,Vn=D(An,s)*dt%z,ai=D(Vn,Me)*or%z,kr=D(ai,$)*vt%z,_a=D(kr,i);if(_a*_a%z!==ae)throw new Error("Cannot find square root");return _a}function ue(ae,z=c.P){if(ae===t||z<=t)throw new Error(`invert: expected positive integers, got n=${ae} mod=${z}`);let $=B(ae,z),pe=z,Te=t,Me=n;for(;$!==t;){const Je=pe/$,vt=pe%$,dt=Te-Me*Je;pe=$,$=vt,Te=Me,Me=dt}if(pe!==n)throw new Error("invert: does not exist");return B(Te,z)}function Re(ae,z=c.P){const $=new Array(ae.length),pe=ae.reduce((Me,Xe,Je)=>Xe===t?Me:($[Je]=Me,B(Me*Xe,z)),n),Te=ue(pe,z);return ae.reduceRight((Me,Xe,Je)=>Xe===t?Me:($[Je]=B(Me*$[Je],z),B(Me*Xe,z)),Te),$}function Pe(ae){const z=ae.length*8-m*8,$=X(ae);return z>0?$>>BigInt(z):$}function Be(ae,z=!1){const $=Pe(ae);if(z)return $;const{n:pe}=c;return $>=pe?$-pe:$}let je,ce;class fe{constructor(z,$){if(this.hashLen=z,this.qByteLen=$,typeof z!="number"||z<2)throw new Error("hashLen must be a number");if(typeof $!="number"||$<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(z).fill(1),this.k=new Uint8Array(z).fill(0),this.counter=0}hmac(...z){return e.utils.hmacSha256(this.k,...z)}hmacSync(...z){return ce(this.k,...z)}checkSync(){if(typeof ce!="function")throw new R("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(z=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),z),this.v=await this.hmac(this.v),z.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),z),this.v=await this.hmac(this.v))}reseedSync(z=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),z),this.v=this.hmacSync(this.v),z.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),z),this.v=this.hmacSync(this.v))}async generate(){this.incr();let z=0;const $=[];for(;z<this.qByteLen;){this.v=await this.hmac(this.v);const pe=this.v.slice();$.push(pe),z+=this.v.length}return te(...$)}generateSync(){this.checkSync(),this.incr();let z=0;const $=[];for(;z<this.qByteLen;){this.v=this.hmacSync(this.v);const pe=this.v.slice();$.push(pe),z+=this.v.length}return te(...$)}}function Oe(ae){return t<ae&&ae<c.n}function De(ae){return t<ae&&ae<c.P}function Ge(ae,z,$,pe=!0){const{n:Te}=c,Me=Be(ae,!0);if(!Oe(Me))return;const Xe=ue(Me,Te),Je=S.BASE.multiply(Me),vt=B(Je.x,Te);if(vt===t)return;const dt=B(Xe*B(z+$*vt,Te),Te);if(dt===t)return;let St=new Q(vt,dt),Nt=(Je.x===St.r?0:2)|Number(Je.y&n);return pe&&St.hasHighS()&&(St=St.normalizeS(),Nt^=1),{sig:St,recovery:Nt}}function Le(ae){let z;if(typeof ae=="bigint")z=ae;else if(typeof ae=="number"&&Number.isSafeInteger(ae)&&ae>0)z=BigInt(ae);else if(typeof ae=="string"){if(ae.length!==2*m)throw new Error("Expected 32 bytes of private key");z=me(ae)}else if(ae instanceof Uint8Array){if(ae.length!==m)throw new Error("Expected 32 bytes of private key");z=X(ae)}else throw new TypeError("Expected valid private key");if(!Oe(z))throw new Error("Expected private key: 0 < key < n");return z}function Rt(ae){return ae instanceof S?(ae.assertValidity(),ae):S.fromHex(ae)}function Dt(ae){if(ae instanceof Q)return ae.assertValidity(),ae;try{return Q.fromDER(ae)}catch{return Q.fromCompact(ae)}}function Gt(ae,z=!1){return S.fromPrivateKey(ae).toRawBytes(z)}e.getPublicKey=Gt;function Ot(ae,z,$,pe=!1){return S.fromSignature(ae,z,$).toRawBytes(pe)}e.recoverPublicKey=Ot;function Fe(ae){const z=ae instanceof Uint8Array,$=typeof ae=="string",pe=(z||$)&&ae.length;return z?pe===T||pe===C:$?pe===T*2||pe===C*2:ae instanceof S}function pt(ae,z,$=!1){if(Fe(ae))throw new TypeError("getSharedSecret: first arg must be private key");if(!Fe(z))throw new TypeError("getSharedSecret: second arg must be public key");const pe=Rt(z);return pe.assertValidity(),pe.multiply(Le(ae)).toRawBytes($)}e.getSharedSecret=pt;function Qe(ae){const z=ae.length>h?ae.slice(0,h):ae;return X(z)}function qt(ae){const z=Qe(ae),$=B(z,c.n);return Kt($<t?z:$)}function Kt(ae){return Ae(ae)}function tr(ae,z,$){if(ae==null)throw new Error(`sign: expected valid message hash, not "${ae}"`);const pe=L(ae),Te=Le(z),Me=[Kt(Te),qt(pe)];if($!=null){$===!0&&($=e.utils.randomBytes(h));const vt=L($);if(vt.length!==h)throw new Error(`sign: Expected ${h} bytes of extra data`);Me.push(vt)}const Xe=te(...Me),Je=Qe(pe);return{seed:Xe,m:Je,d:Te}}function jr(ae,z){const{sig:$,recovery:pe}=ae,{der:Te,recovered:Me}=Object.assign({canonical:!0,der:!0},z),Xe=Te?$.toDERRawBytes():$.toCompactRawBytes();return Me?[Xe,pe]:Xe}async function fr(ae,z,$={}){const{seed:pe,m:Te,d:Me}=tr(ae,z,$.extraEntropy),Xe=new fe(v,m);await Xe.reseed(pe);let Je;for(;!(Je=Ge(await Xe.generate(),Te,Me,$.canonical));)await Xe.reseed();return jr(Je,$)}e.sign=fr;function hn(ae,z,$={}){const{seed:pe,m:Te,d:Me}=tr(ae,z,$.extraEntropy),Xe=new fe(v,m);Xe.reseedSync(pe);let Je;for(;!(Je=Ge(Xe.generateSync(),Te,Me,$.canonical));)Xe.reseedSync();return jr(Je,$)}e.signSync=hn;const Lr={strict:!0};function Sn(ae,z,$,pe=Lr){let Te;try{Te=Dt(ae),z=L(z)}catch{return!1}const{r:Me,s:Xe}=Te;if(pe.strict&&Te.hasHighS())return!1;const Je=Be(z);let vt;try{vt=Rt($)}catch{return!1}const{n:dt}=c,St=ue(Xe,dt),Nt=B(Je*St,dt),Mt=B(Me*St,dt),or=S.BASE.multiplyAndAddUnsafe(vt,Nt,Mt);return or?B(or.x,dt)===Me:!1}e.verify=Sn;function rn(ae){return B(X(ae),c.n)}class Tn{constructor(z,$){this.r=z,this.s=$,this.assertValidity()}static fromHex(z){const $=L(z);if($.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${$.length}`);const pe=X($.subarray(0,32)),Te=X($.subarray(32,64));return new Tn(pe,Te)}assertValidity(){const{r:z,s:$}=this;if(!De(z)||!Oe($))throw new Error("Invalid signature")}toHex(){return we(this.r)+we(this.s)}toRawBytes(){return le(this.toHex())}}function nn(ae){return S.fromPrivateKey(ae).toRawX()}class ni{constructor(z,$,pe=e.utils.randomBytes()){if(z==null)throw new TypeError(`sign: Expected valid message, not "${z}"`);this.m=L(z);const{x:Te,scalar:Me}=this.getScalar(Le($));if(this.px=Te,this.d=Me,this.rand=L(pe),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(z){const $=S.fromPrivateKey(z),pe=$.hasEvenY()?z:c.n-z;return{point:$,scalar:pe,x:$.toRawX()}}initNonce(z,$){return Ae(z^X($))}finalizeNonce(z){const $=B(X(z),c.n);if($===t)throw new Error("sign: Creation of signature failed. k is zero");const{point:pe,x:Te,scalar:Me}=this.getScalar($);return{R:pe,rx:Te,k:Me}}finalizeSig(z,$,pe,Te){return new Tn(z.x,B($+pe*Te,c.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:z,d:$,px:pe,rand:Te}=this,Me=e.utils.taggedHash,Xe=this.initNonce($,await Me(Qr.aux,Te)),{R:Je,rx:vt,k:dt}=this.finalizeNonce(await Me(Qr.nonce,Xe,pe,z)),St=rn(await Me(Qr.challenge,vt,pe,z)),Nt=this.finalizeSig(Je,dt,St,$);return await Da(Nt,z,pe)||this.error(),Nt}calcSync(){const{m:z,d:$,px:pe,rand:Te}=this,Me=e.utils.taggedHashSync,Xe=this.initNonce($,Me(Qr.aux,Te)),{R:Je,rx:vt,k:dt}=this.finalizeNonce(Me(Qr.nonce,Xe,pe,z)),St=rn(Me(Qr.challenge,vt,pe,z)),Nt=this.finalizeSig(Je,dt,St,$);return Dr(Nt,z,pe)||this.error(),Nt}}async function Pn(ae,z,$){return new ni(ae,z,$).calc()}function ja(ae,z,$){return new ni(ae,z,$).calcSync()}function La(ae,z,$){const pe=ae instanceof Tn,Te=pe?ae:Tn.fromHex(ae);return pe&&Te.assertValidity(),{...Te,m:L(z),P:Rt($)}}function va(ae,z,$,pe){const Te=S.BASE.multiplyAndAddUnsafe(z,Le($),B(-pe,c.n));return!(!Te||!Te.hasEvenY()||Te.x!==ae)}async function Da(ae,z,$){try{const{r:pe,s:Te,m:Me,P:Xe}=La(ae,z,$),Je=rn(await e.utils.taggedHash(Qr.challenge,Ae(pe),Xe.toRawX(),Me));return va(pe,Xe,Te,Je)}catch{return!1}}function Dr(ae,z,$){try{const{r:pe,s:Te,m:Me,P:Xe}=La(ae,z,$),Je=rn(e.utils.taggedHashSync(Qr.challenge,Ae(pe),Xe.toRawX(),Me));return va(pe,Xe,Te,Je)}catch(pe){if(pe instanceof R)throw pe;return!1}}e.schnorr={Signature:Tn,getPublicKey:nn,sign:Pn,verify:Da,signSync:ja,verifySync:Dr},S.BASE._setWindowSize(8);const Ct={node:a,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Qr={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},an={};e.utils={bytesToHex:be,hexToBytes:le,concatBytes:te,mod:B,invert:ue,isValidPrivateKey(ae){try{return Le(ae),!0}catch{return!1}},_bigintTo32Bytes:Ae,_normalizePrivateKey:Le,hashToPrivateKey:ae=>{ae=L(ae);const z=m+8;if(ae.length<z||ae.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const $=B(X(ae),c.n-n)+n;return Ae($)},randomBytes:(ae=32)=>{if(Ct.web)return Ct.web.getRandomValues(new Uint8Array(ae));if(Ct.node){const{randomBytes:z}=Ct.node;return Uint8Array.from(z(ae))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(m+8)),precompute(ae=8,z=S.BASE){const $=z===S.BASE?z:new S(z.x,z.y);return $._setWindowSize(ae),$.multiply(s),$},sha256:async(...ae)=>{if(Ct.web){const z=await Ct.web.subtle.digest("SHA-256",te(...ae));return new Uint8Array(z)}else if(Ct.node){const{createHash:z}=Ct.node,$=z("sha256");return ae.forEach(pe=>$.update(pe)),Uint8Array.from($.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(ae,...z)=>{if(Ct.web){const $=await Ct.web.subtle.importKey("raw",ae,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),pe=te(...z),Te=await Ct.web.subtle.sign("HMAC",$,pe);return new Uint8Array(Te)}else if(Ct.node){const{createHmac:$}=Ct.node,pe=$("sha256",ae);return z.forEach(Te=>pe.update(Te)),Uint8Array.from(pe.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(ae,...z)=>{let $=an[ae];if($===void 0){const pe=await e.utils.sha256(Uint8Array.from(ae,Te=>Te.charCodeAt(0)));$=te(pe,pe),an[ae]=$}return e.utils.sha256($,...z)},taggedHashSync:(ae,...z)=>{if(typeof je!="function")throw new R("sha256Sync is undefined, you need to set it");let $=an[ae];if($===void 0){const pe=je(Uint8Array.from(ae,Te=>Te.charCodeAt(0)));$=te(pe,pe),an[ae]=$}return je($,...z)},_JacobianPoint:O},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return je},set(ae){je||(je=ae)}},hmacSha256Sync:{configurable:!1,get(){return ce},set(ae){ce||(ce=ae)}}})})(C_)),C_}var _C;function BE(){return _C||(_C=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const a=qV(),t=rL(),n=vC();var i=vC();Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),n.utils.hmacSha256Sync=(s,...u)=>{const c=a.hmac.create(t.sha256,s);return u.forEach(f=>c.update(f)),c.digest()}})(O_)),O_}var wt={};function EC(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ml={exports:{}},bC=ml.exports,wC;function nL(){return wC||(wC=1,(function(e,a){var t=bC&&bC.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(a,"__esModule",{value:!0}),a.crypto=a.wrapHash=a.equalsBytes=a.hexToBytes=a.bytesToUtf8=a.utf8ToBytes=a.createView=a.concatBytes=a.toHex=a.bytesToHex=a.assertBytes=a.assertBool=void 0;const n=t(qE()),i=_l(),s=n.default.bool;a.assertBool=s;const u=n.default.bytes;a.assertBytes=u;var c=_l();Object.defineProperty(a,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(a,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(a,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(a,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(a,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}});function f(v){if(!(v instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof v}`);return new TextDecoder().decode(v)}a.bytesToUtf8=f;function p(v){const T=v.startsWith("0x")?v.substring(2):v;return(0,i.hexToBytes)(T)}a.hexToBytes=p;function h(v,T){if(v.length!==T.length)return!1;for(let C=0;C<v.length;C++)if(v[C]!==T[C])return!1;return!0}a.equalsBytes=h;function m(v){return T=>(n.default.bytes(T),v(T))}a.wrapHash=m,a.crypto=(()=>{const v=typeof self=="object"&&"crypto"in self?self.crypto:void 0,T=typeof EC=="function"&&EC.bind(e);return{node:T&&!v?T("crypto"):void 0,web:v}})()})(ml,ml.exports)),ml.exports}var SC;function HV(){if(SC)return wt;SC=1;var e=wt&&wt.__createBinding||(Object.create?(function(le,X,L,F){F===void 0&&(F=L);var B=Object.getOwnPropertyDescriptor(X,L);(!B||("get"in B?!X.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return X[L]}}),Object.defineProperty(le,F,B)}):(function(le,X,L,F){F===void 0&&(F=L),le[F]=X[L]})),a=wt&&wt.__setModuleDefault||(Object.create?(function(le,X){Object.defineProperty(le,"default",{enumerable:!0,value:X})}):function(le,X){le.default=X}),t=wt&&wt.__importStar||function(le){if(le&&le.__esModule)return le;var X={};if(le!=null)for(var L in le)L!=="default"&&Object.prototype.hasOwnProperty.call(le,L)&&e(X,le,L);return a(X,le),X};Object.defineProperty(wt,"__esModule",{value:!0}),wt.contextRandomize=wt.ecdh=wt.signatureNormalize=wt.signatureImport=wt.signatureExport=wt.privateKeyTweakMul=wt.publicKeyTweakMul=wt.publicKeyTweakAdd=wt.publicKeyCombine=wt.publicKeyNegate=wt.privateKeyNegate=wt.privateKeyTweakAdd=wt.ecdsaVerify=wt.ecdsaRecover=wt.ecdsaSign=wt.publicKeyConvert=wt.publicKeyVerify=wt.publicKeyCreate=wt.privateKeyVerify=wt.createPrivateKey=wt.createPrivateKeySync=void 0;const n=rL(),i=t(BE()),s=nL();function u(le){if(typeof le!="string")throw new TypeError("hexToNumber: expected string, got "+typeof le);return BigInt(`0x${le}`)}const c=le=>u((0,s.toHex)(le)),f=le=>le.toString(16).padStart(64,"0"),p=le=>(0,s.hexToBytes)(f(le)),{mod:h}=i.utils,m=i.CURVE.n;function v(le=F=>new Uint8Array(F),X,L){return typeof le=="function"&&(le=le(X)),(0,s.assertBytes)(le,X),L&&le.set(L),le}function T(le){return(0,s.assertBytes)(le,64),i.Signature.fromCompact(le)}function C(){return i.utils.randomPrivateKey()}wt.createPrivateKeySync=C;async function N(){return C()}wt.createPrivateKey=N;function E(le){return(0,s.assertBytes)(le,32),i.utils.isValidPrivateKey(le)}wt.privateKeyVerify=E;function R(le,X=!0,L){(0,s.assertBytes)(le,32),(0,s.assertBool)(X);const F=i.getPublicKey(le,X);return v(L,X?33:65,F)}wt.publicKeyCreate=R;function _(le){(0,s.assertBytes)(le,33,65);try{return i.Point.fromHex(le),!0}catch{return!1}}wt.publicKeyVerify=_;function O(le,X=!0,L){(0,s.assertBytes)(le,33,65),(0,s.assertBool)(X);const F=i.Point.fromHex(le).toRawBytes(X);return v(L,X?33:65,F)}wt.publicKeyConvert=O;function P(le,X,L={noncefn:void 0,data:void 0},F){if((0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32),typeof L!="object"||L===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(L&&(L.noncefn!==void 0||L.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[B,D]=i.signSync(le,X,{recovered:!0,der:!1});return{signature:v(F,64,B),recid:D}}wt.ecdsaSign=P;function y(le,X,L,F=!0,B){(0,s.assertBytes)(L,32),(0,s.assertBool)(F);const D=T(le).toHex(),K=i.Point.fromSignature(L,D,X);return v(B,F?33:65,K.toRawBytes(F))}wt.ecdsaRecover=y;function S(le,X,L){(0,s.assertBytes)(le,64),(0,s.assertBytes)(X,32),(0,s.assertBytes)(L,33,65),(0,s.assertBytes)(le,64);const F=c(le.slice(0,32)),B=c(le.slice(32,64));if(F>=m||B>=m)throw new Error("Cannot parse signature");const D=i.Point.fromHex(L);let K;try{K=T(le)}catch{return!1}return i.verify(K,X,D)}wt.ecdsaVerify=S;function M(le,X){(0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32);let L=c(X);if(L===0n)throw new Error("Tweak must not be zero");if(L>=m)throw new Error("Tweak bigger than curve order");if(L+=c(le),L>=m&&(L-=m),L===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return le.set((0,s.hexToBytes)(f(L))),le}wt.privateKeyTweakAdd=M;function U(le){(0,s.assertBytes)(le,32);const X=h(-c(le),m);return le.set((0,s.hexToBytes)(f(X))),le}wt.privateKeyNegate=U;function V(le,X=!0,L){(0,s.assertBytes)(le,33,65),(0,s.assertBool)(X);const F=i.Point.fromHex(le).negate();return v(L,X?33:65,F.toRawBytes(X))}wt.publicKeyNegate=V;function Q(le,X=!0,L){if(!Array.isArray(le)||!le.length)throw new TypeError(`Expected array with one or more items, not ${le}`);for(const B of le)(0,s.assertBytes)(B,33,65);(0,s.assertBool)(X);const F=le.map(B=>i.Point.fromHex(B)).reduce((B,D)=>B.add(D),i.Point.ZERO);if(F.equals(i.Point.ZERO))throw new Error("Combined result must not be zero");return v(L,X?33:65,F.toRawBytes(X))}wt.publicKeyCombine=Q;function te(le,X,L=!0,F){(0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),(0,s.assertBool)(L);const B=i.Point.fromHex(le),D=i.Point.fromPrivateKey(X),K=B.add(D);if(D.equals(i.Point.ZERO)||K.equals(i.Point.ZERO))throw new Error("Tweak must not be zero");return v(F,L?33:65,K.toRawBytes(L))}wt.publicKeyTweakAdd=te;function he(le,X,L=!0,F){(0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),(0,s.assertBool)(L);const B=c(X);if(B===0n)throw new Error("Tweak must not be zero");if(B<=1||B>=m)throw new Error("Tweak is zero or bigger than curve order");const D=i.Point.fromHex(le).multiply(B);return v(F,L?33:65,D.toRawBytes(L))}wt.publicKeyTweakMul=he;function be(le,X){(0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32);const L=c(X);if(L<=1||L>=m)throw new Error("Tweak is zero or bigger than curve order");const F=h(L*c(le),m);if(F===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return le.set((0,s.hexToBytes)(f(F))),le}wt.privateKeyTweakMul=be;function Ie(le,X){const L=T(le).toRawBytes();return v(X,72,T(le).toRawBytes()).slice(0,L.length)}wt.signatureExport=Ie;function we(le,X){(0,s.assertBytes)(le);const L=i.Signature.fromDER(le);return v(X,64,(0,s.hexToBytes)(L.toCompactHex()))}wt.signatureImport=we;function Ae(le){const X=T(le);return X.s>m/2n&&le.set(p(m-X.s),32),le}wt.signatureNormalize=Ae;function Ne(le,X,L={},F){if((0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),typeof L!="object"||L===null)throw new TypeError("secp256k1.ecdh: options should be object");L.data!==void 0&&(0,s.assertBytes)(L.data);const B=i.Point.fromHex(i.getSharedSecret(X,le));if(L.hashfn===void 0)return v(F,32,(0,n.sha256)(B.toRawBytes(!0)));if(typeof L.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");L.xbuf!==void 0&&(0,s.assertBytes)(L.xbuf,32),L.ybuf!==void 0&&(0,s.assertBytes)(L.ybuf,32),(0,s.assertBytes)(F,32);const D=L.xbuf||new Uint8Array(32);D.set(p(B.x));const K=L.ybuf||new Uint8Array(32);K.set(p(B.y));const ue=L.hashfn(D,K,L.data);if(!(ue instanceof Uint8Array)||ue.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return v(F,32,ue)}wt.ecdh=Ne;function me(le){le!==null&&(0,s.assertBytes)(le,32)}return wt.contextRandomize=me,wt}var TC;function aL(){if(TC)return Vr;TC=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.createUnsafeIdentity=Vr.computeAddress=Vr.ethSign=Vr.createEthereumMessageHash=Vr.sign=Vr.recoverAddressFromEthSignature=Vr.recoverPublicKey=void 0;const e=_f(),a=BE(),t=HV();function n(m,v){if(m.length!==65)throw new Error("Invalid signature length"+m.length);const T=m.slice(0,m.length-1),C=m[64]===28?1:0;return(0,t.ecdsaRecover)(T,C,v,!1).slice(1)}Vr.recoverPublicKey=n;function i(m){if(m.length!==65)throw new Error("Invalid ethereum signature");const v=m[64];if(v===0||v===1){const T=new Uint8Array(m);return T[64]=v+27,T}return m}function s(m,v){if(typeof m=="string"){if((0,e.isHex)(m))return s((0,e.hexToBytes)(m),v);throw new Error("String signatures must be encoded in hex")}return p(n(i(m),c(v)))}Vr.recoverAddressFromEthSignature=s;function u(m,v){const T=(0,t.ecdsaSign)(v,m),C=T.recid===1?"1c":"1b";return(0,e.toHex)(T.signature)+C}Vr.sign=u;function c(m){const v=typeof m=="string"?(0,e.stringToUtf8Bytes)(m):m,T=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(_,O){if(_){if(typeof _=="string")return v(_,O);var P={}.toString.call(_).slice(8,-1);return P==="Object"&&_.constructor&&(P=_.constructor.name),P==="Map"||P==="Set"?Array.from(_):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?v(_,O):void 0}}function v(_,O){(O==null||O>_.length)&&(O=_.length);for(var P=0,y=Array(O);P<O;P++)y[P]=_[P];return y}function T(_,O){var P=_==null?null:typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(P!=null){var y,S,M,U,V=[],Q=!0,te=!1;try{if(M=(P=P.call(_)).next,O!==0)for(;!(Q=(y=M.call(P)).done)&&(V.push(y.value),V.length!==O);Q=!0);}catch(he){te=!0,S=he}finally{try{if(!Q&&P.return!=null&&(U=P.return(),Object(U)!==U))return}finally{if(te)throw S}}return V}}function C(_){if(Array.isArray(_))return _}var N={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},E=/^\[([^\]]+)\](?::([0-9]+))?$/;function R(_,O){if((0,t.default)(_),!_||/[\s<>]/.test(_)||_.indexOf("mailto:")===0||(O=(0,c.default)(O,N),O.validate_length&&_.length>O.max_allowed_length)||!O.allow_fragments&&(0,i.default)(_,"#")||!O.allow_query_components&&((0,i.default)(_,"?")||(0,i.default)(_,"&")))return!1;var P,y,S,M,U,V,Q,te;Q=_.split("#"),_=Q.shift(),Q=_.split("?"),_=Q.shift();var he=_.match(/^([a-z][a-z0-9+\-.]*):/i),be=!1,Ie=function(fe){return be=!0,P=fe.toLowerCase(),O.require_valid_protocol&&O.protocols.indexOf(P)===-1?!1:_.substring(he[0].length)};if(he){var we=he[1],Ae=_.substring(he[0].length),Ne=Ae.slice(0,2)==="//";if(Ne){if(_=Ie(we),_===!1)return!1}else{var me=Ae.indexOf("/"),le=me===-1?Ae:Ae.substring(0,me),X=le.indexOf("@");if(X!==-1){var L=le.substring(0,X),F=/^[a-zA-Z0-9\-_.%:]*$/,B=F.test(L),D=/%[0-9a-fA-F]{2}/.test(L);if(B&&!D){if(O.require_protocol)return!1}else if(_=Ie(we),_===!1)return!1}else{var K=/^[0-9]/.test(Ae);if(K){if(O.require_protocol)return!1}else if(_=Ie(we),_===!1)return!1}}}else if(O.require_protocol)return!1;if(_.slice(0,2)==="//"){if(!be&&!O.allow_protocol_relative_urls)return!1;_=_.slice(2)}if(_==="")return!1;if(Q=_.split("/"),_=Q.shift(),_===""&&!O.require_host)return!0;if(Q=_.split("@"),Q.length>1){if(O.disallow_auth||Q[0]===""||(y=Q.shift(),y.indexOf(":")>=0&&y.split(":").length>2))return!1;var ue=y.split(":"),Re=p(ue,2),Pe=Re[0],Be=Re[1];if(Pe===""&&Be==="")return!1}M=Q.join("@"),V=null,te=null;var je=M.match(E);if(je?(S="",te=je[1],V=je[2]||null):(Q=M.split(":"),S=Q.shift(),Q.length&&(V=Q.join(":"))),V!==null&&V.length>0){if(U=parseInt(V,10),!/^[0-9]+$/.test(V)||U<=0||U>65535)return!1}else if(O.require_port)return!1;return O.host_whitelist?(0,n.default)(S,O.host_whitelist):S===""&&!O.require_host?!0:!(!(0,u.default)(S)&&!(0,s.default)(S,O)&&(!te||!(0,u.default)(te,6))||(S=S||te,O.host_blacklist&&(0,n.default)(S,O.host_blacklist)))}e.exports=a.default,e.exports.default=a.default})(Rd,Rd.exports)),Rd.exports}var uy={},aN;function ij(){return aN||(aN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var a;(function(c){c.GET="get",c.STORE="store",c.CLEAR="clear",c.PING="ping"})(a||(e.Action=a={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function t(c){return{target:e.SINGLE_SIGN_ON_TARGET,...c}}e.createMessage=t;function n(c){const f=localStorage.getItem(u(c));if(!f)return null;let p;try{p=JSON.parse(f)}catch{return s(c),null}return p.expiration=new Date(p.expiration),p.expiration.getTime()<=Date.now()?(s(c),null):p}e.localStorageGetIdentity=n;function i(c,f){new Date(f.expiration).getTime()>Date.now()&&localStorage.setItem(u(c),JSON.stringify(f))}e.localStorageStoreIdentity=i;function s(c){localStorage.removeItem(u(c))}e.localStorageClearIdentity=s;function u(c){if(!/^0x[a-fA-F0-9]{40}$/.test(c))throw new Error("User must be a valid ethereum address");return`single-sign-on-${c.toLowerCase()}`}})(uy)),uy}var iN;function NB(){if(iN)return ra;iN=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.clearIdentity=ra.storeIdentity=ra.getIdentity=ra.init=void 0;const e=AB(),a=ij(),t=a.SINGLE_SIGN_ON_TARGET,n=500,i=5;let s=0,u="";const c={protocols:["https"],require_protocol:!0};function f(E,R={}){if(!(0,e.default)(E,{...c,...R}))throw new Error(`Invalid url: ${E}`);if(u)throw new Error("Already initialized");const _=document.createElement("iframe");_.id=t,_.src=E,_.style.width="0",_.style.height="0",_.style.border="none",_.style.position="absolute",document.body.appendChild(_),u=E}ra.init=f;async function p(E){let R;try{R=(await T(await v(),a.Action.GET,{user:E})).identity??null}catch(_){N(_),R=(0,a.localStorageGetIdentity)(E)}return R}ra.getIdentity=p;async function h(E,R){try{await T(await v(),a.Action.STORE,{user:E,identity:R})}catch(_){N(_),(0,a.localStorageStoreIdentity)(E,R)}}ra.storeIdentity=h;async function m(E){try{await T(await v(),a.Action.CLEAR,{user:E})}catch(R){N(R),(0,a.localStorageClearIdentity)(E)}}ra.clearIdentity=m;async function v(){if(!u)throw new Error("Not initialized");for(let E=0;E<i;E++){const _=document.getElementById(t)?.contentWindow;if(!_){await C(n);continue}try{await T(_,a.Action.PING,{},n)}catch{continue}return _}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function T(E,R,_,O=0){s++;const P=s;let y=null;const S=new Promise((M,U)=>{y=({data:V})=>{!V||V.target!==a.SINGLE_SIGN_ON_TARGET||V.id!==P||(V.error?U(new Error(V.error)):M(V))},window.addEventListener("message",y)});E.postMessage((0,a.createMessage)({id:P,action:R,..._}),u);try{return await(O?Promise.race([S,new Promise((M,U)=>setTimeout(()=>U(new Error("Did not receive a response in time")),O))]):S)}catch(M){throw M}finally{y&&window.removeEventListener("message",y)}}function C(E){return new Promise(R=>setTimeout(R,E))}function N(E){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",E.message)}return ra}var oN;function OB(){return oN||(oN=1,(function(e){var a=So&&So.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=So&&So.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(NB(),e),t(ij(),e)})(So)),So}var V_=OB(),ly={},na={},sN;function xe(){if(sN)return na;sN=1;var e=na&&na.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(na,"__esModule",{value:!0}),na.validateType=na.generateLazyValidator=na.Ajv=void 0;const a=e(df());na.Ajv=a.default;const t=e(oE()),n=e(sE());function i(u,c){let f=null;const p=(h,m)=>{if(!f){const v=new a.default({$data:!0,allErrors:!0});(0,t.default)(v),(0,n.default)(v,{singleError:!0}),c?.forEach(T=>v.addKeyword(T)),f=v.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(h,m)};return p}na.generateLazyValidator=i;function s(u,c){return u.validate(c)}return na.validateType=s,na}var cy={},uN;function oj(){return uN||(uN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=xe(),t=Fn();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.MATIC_AMOY="Amoy",s.AVALANCHE_MAINNET="Avalanche",s.BINANCE_MAINNET="Binance Smart Chain",s.ARBITRUM_MAINNET="Arbitrum",s.OPTIMISM_MAINNET="Optimism",s.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function i(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(cy)),cy}var dy={},lN;function ha(){return lN||(lN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=xe();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC",t.AVALANCHE="AVALANCHE",t.BSC="BINANCE SMART CHAIN",t.OPTIMISM="OPTIMISM",t.ARBITRUM="ARBITRUM",t.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(dy)),dy}var cN;function Fn(){return cN||(cN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=xe(),t=oj(),n=ha();var i;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI",p[p.MATIC_AMOY=80002]="MATIC_AMOY",p[p.BSC_MAINNET=56]="BSC_MAINNET",p[p.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",p[p.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",p[p.FANTOM_MAINNET=250]="FANTOM_MAINNET",p[p.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case i.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case i.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case i.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case i.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case i.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case i.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";case i.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=u;function c(p){const h={[n.Network.BSC]:i.BSC_MAINNET,[n.Network.OPTIMISM]:i.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:i.ARBITRUM_MAINNET,[n.Network.FANTOM]:i.FANTOM_MAINNET,[n.Network.AVALANCHE]:i.AVALANCHE_MAINNET};switch(p){case i.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},h);case i.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_AMOY},h);case i.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},h);case i.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI},h);case i.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:i.MATIC_AMOY,[n.Network.MATIC]:i.MATIC_AMOY},h);default:return Object.assign({[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET},h)}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:case i.MATIC_AMOY:return n.Network.MATIC;case i.BSC_MAINNET:return n.Network.BSC;case i.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case i.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case i.FANTOM_MAINNET:return n.Network.FANTOM;case i.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(ly)),ly}var At=Fn(),fy={},dN;function sj(){return dN||(dN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=xe();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.MAGIC_TEST="magic_test",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(fy)),fy}var Ft=sj(),xa;(function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"})(xa||(xa={}));var qd={exports:{}},fN;function IB(){if(fN)return qd.exports;fN=1;var e=typeof Reflect=="object"?Reflect:null,a=e&&typeof e.apply=="function"?e.apply:function(y,S,M){return Function.prototype.apply.call(y,S,M)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(y){return Object.getOwnPropertyNames(y).concat(Object.getOwnPropertySymbols(y))}:t=function(y){return Object.getOwnPropertyNames(y)};function n(P){console&&console.warn&&console.warn(P)}var i=Number.isNaN||function(y){return y!==y};function s(){s.init.call(this)}qd.exports=s,qd.exports.once=R,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(P){if(typeof P!="number"||P<0||i(P))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+P+".");u=P}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(y){if(typeof y!="number"||y<0||i(y))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+y+".");return this._maxListeners=y,this};function f(P){return P._maxListeners===void 0?s.defaultMaxListeners:P._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(y){for(var S=[],M=1;M<arguments.length;M++)S.push(arguments[M]);var U=y==="error",V=this._events;if(V!==void 0)U=U&&V.error===void 0;else if(!U)return!1;if(U){var Q;if(S.length>0&&(Q=S[0]),Q instanceof Error)throw Q;var te=new Error("Unhandled error."+(Q?" ("+Q.message+")":""));throw te.context=Q,te}var he=V[y];if(he===void 0)return!1;if(typeof he=="function")a(he,this,S);else for(var be=he.length,Ie=C(he,be),M=0;M<be;++M)a(Ie[M],this,S);return!0};function p(P,y,S,M){var U,V,Q;if(c(S),V=P._events,V===void 0?(V=P._events=Object.create(null),P._eventsCount=0):(V.newListener!==void 0&&(P.emit("newListener",y,S.listener?S.listener:S),V=P._events),Q=V[y]),Q===void 0)Q=V[y]=S,++P._eventsCount;else if(typeof Q=="function"?Q=V[y]=M?[S,Q]:[Q,S]:M?Q.unshift(S):Q.push(S),U=f(P),U>0&&Q.length>U&&!Q.warned){Q.warned=!0;var te=new Error("Possible EventEmitter memory leak detected. "+Q.length+" "+String(y)+" listeners added. Use emitter.setMaxListeners() to increase limit");te.name="MaxListenersExceededWarning",te.emitter=P,te.type=y,te.count=Q.length,n(te)}return P}s.prototype.addListener=function(y,S){return p(this,y,S,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(y,S){return p(this,y,S,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(P,y,S){var M={fired:!1,wrapFn:void 0,target:P,type:y,listener:S},U=h.bind(M);return U.listener=S,M.wrapFn=U,U}s.prototype.once=function(y,S){return c(S),this.on(y,m(this,y,S)),this},s.prototype.prependOnceListener=function(y,S){return c(S),this.prependListener(y,m(this,y,S)),this},s.prototype.removeListener=function(y,S){var M,U,V,Q,te;if(c(S),U=this._events,U===void 0)return this;if(M=U[y],M===void 0)return this;if(M===S||M.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete U[y],U.removeListener&&this.emit("removeListener",y,M.listener||S));else if(typeof M!="function"){for(V=-1,Q=M.length-1;Q>=0;Q--)if(M[Q]===S||M[Q].listener===S){te=M[Q].listener,V=Q;break}if(V<0)return this;V===0?M.shift():N(M,V),M.length===1&&(U[y]=M[0]),U.removeListener!==void 0&&this.emit("removeListener",y,te||S)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(y){var S,M,U;if(M=this._events,M===void 0)return this;if(M.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):M[y]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[y]),this;if(arguments.length===0){var V=Object.keys(M),Q;for(U=0;U<V.length;++U)Q=V[U],Q!=="removeListener"&&this.removeAllListeners(Q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(S=M[y],typeof S=="function")this.removeListener(y,S);else if(S!==void 0)for(U=S.length-1;U>=0;U--)this.removeListener(y,S[U]);return this};function v(P,y,S){var M=P._events;if(M===void 0)return[];var U=M[y];return U===void 0?[]:typeof U=="function"?S?[U.listener||U]:[U]:S?E(U):C(U,U.length)}s.prototype.listeners=function(y){return v(this,y,!0)},s.prototype.rawListeners=function(y){return v(this,y,!1)},s.listenerCount=function(P,y){return typeof P.listenerCount=="function"?P.listenerCount(y):T.call(P,y)},s.prototype.listenerCount=T;function T(P){var y=this._events;if(y!==void 0){var S=y[P];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function C(P,y){for(var S=new Array(y),M=0;M<y;++M)S[M]=P[M];return S}function N(P,y){for(;y+1<P.length;y++)P[y]=P[y+1];P.pop()}function E(P){for(var y=new Array(P.length),S=0;S<y.length;++S)y[S]=P[S].listener||P[S];return y}function R(P,y){return new Promise(function(S,M){function U(Q){P.removeListener(y,V),M(Q)}function V(){typeof P.removeListener=="function"&&P.removeListener("error",U),S([].slice.call(arguments))}O(P,y,V,{once:!0}),y!=="error"&&_(P,U,{once:!0})})}function _(P,y,S){typeof P.on=="function"&&O(P,"error",y,S)}function O(P,y,S,M){if(typeof P.on=="function")M.once?P.once(y,S):P.on(y,S);else if(typeof P.addEventListener=="function")P.addEventListener(y,function U(V){M.once&&P.removeEventListener(y,U),S(V)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof P)}return qd.exports}var uj=IB();const zW=bD(uj);function RB(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,e.__proto__=a}var Qs=(function(e){RB(a,e);function a(n){var i,s=n===void 0?{}:n,u=s.supportedChainIds;return i=e.call(this)||this,i.supportedChainIds=u,i}var t=a.prototype;return t.emitUpdate=function(i){this.emit(xa.Update,i)},t.emitError=function(i){this.emit(xa.Error,i)},t.emitDeactivate=function(){this.emit(xa.Deactivate)},a})(uj.EventEmitter);const CB="modulepreload",MB=function(e){return"https://cdn.decentraland.org/@dcl-regenesislabs/mobile-hub/1.0.4-26164306526.commit-934c661/"+e},pN={},gl=function(a,t,n){let i=Promise.resolve();if(t&&t.length>0){let f=function(p){return Promise.all(p.map(h=>Promise.resolve(h).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=u?.nonce||u?.getAttribute("nonce");i=f(t.map(p=>{if(p=MB(p),p in pN)return;pN[p]=!0;const h=p.endsWith(".css"),m=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":CB,h||(v.as="script"),v.crossOrigin="",v.href=p,c&&v.setAttribute("nonce",c),document.head.appendChild(v),h)return new Promise((T,C)=>{v.addEventListener("load",T),v.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return i.then(u=>{for(const c of u||[])c.status==="rejected"&&s(c.reason);return a().catch(s)})};var aa={},To={},Po={},py={},mN;function jB(){return mN||(mN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=xe();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(py)),py}var my={},hN;function LB(){return hN||(hN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=xe();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(my)),my}var yN;function DB(){return yN||(yN=1,(function(e){var a=Po&&Po.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Po&&Po.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(jB(),e),t(LB(),e)})(Po)),Po}var Ao={},hy={},gN;function kB(){return gN||(gN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=xe();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(hy)),hy}var yy={},gy={},vN;function yf(){return vN||(vN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=xe();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.EXOTIC="exotic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},i={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function u(h){return n[h]}t.getMaxSupply=u;function c(h){return s[h]}t.getColor=c;function f(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=f;function p(h){return[i[h],s[h]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(gy)),gy}var vy={},_N;function Zo(){return _N||(_N=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=xe();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(vy)),vy}var _y={},Ey={},EN;function vE(){return EN||(EN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=xe();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(Ey)),Ey}var by={},wy={},bN;function lj(){return bN||(bN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=xe();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(wy)),wy}var wN;function _E(){return wN||(wN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=Zo(),t=xe(),n=lj();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(by)),by}var SN;function EE(){return SN||(SN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=xe(),t=vE(),n=_E();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(_y)),_y}var No={},Oo={},Sy={},Ty={},TN;function $o(){return TN||(TN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=xe();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(Ty)),Ty}var PN;function cj(){return PN||(PN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=Zo(),t=$o(),n=xe();var i;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(i=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=h=>p.test(h)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(Sy)),Sy}var Py={},AN;function qB(){return AN||(AN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=xe(),t=cj();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(Py)),Py}var NN;function BB(){return NN||(NN=1,(function(e){var a=Oo&&Oo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Oo&&Oo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(cj(),e),t(qB(),e)})(Oo)),Oo}var Ay={},Ny={},ON;function dj(){return ON||(ON=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=xe();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(Ny)),Ny}var Oy={},IN;function fj(){return IN||(IN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(Oy)),Oy}var Iy={},RN;function pj(){return RN||(RN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=xe();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(Iy)),Iy}var Ry={},Du={},CN;function bE(){return CN||(CN=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.displayableProperties=void 0,Du.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Du}var Cy={},MN;function mj(){return MN||(MN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(Cy)),Cy}var My={},jN;function hj(){return jN||(jN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(My)),My}var LN;function UB(){return LN||(LN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=xe(),t=bE(),n=dj(),i=pj(),s=mj(),u=hj(),c=fj();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:u.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(Ry)),Ry}var DN;function FB(){return DN||(DN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var a=dj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=fj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=pj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=UB();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=mj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=hj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(Ay)),Ay}var Io={},jy={},Ly={},kN;function yj(){return kN||(kN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=xe();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(Ly)),Ly}var qN;function gj(){return qN||(qN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=xe(),t=yj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(jy)),jy}var Dy={},BN;function vj(){return BN||(BN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(Dy)),Dy}var ky={},UN;function wE(){return UN||(UN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=yf(),t=xe();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(ky)),ky}var qy={},Ro={},By={},FN;function VB(){return FN||(FN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(By)),By}var VN;function _j(){return VN||(VN=1,(function(e){var a=Ro&&Ro.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ro&&Ro.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(VB(),e)})(Ro)),Ro}var Uy={},HN;function SE(){return HN||(HN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const a=xe();var t;(function(m){m.SINGLE="single",m.ANY="any",m.MULTIPLE="multiple",m.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(m){m.MAINNET="mainnet",m.MATIC="matic",m.SEPOLIA="sepolia",m.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var i;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},m.validate=(0,a.generateLazyValidator)(m.schema)})(i=e.SingleMapping||(e.SingleMapping={}));var s;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},m.validate=(0,a.generateLazyValidator)(m.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var u;(function(m){m._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(T,C){if(!C||!C.from||!C.to)return!1;let{to:N,from:E}=C;return(typeof E!="bigint"||typeof N!="bigint")&&(E=BigInt(E),N=BigInt(N)),E<=N},errors:!1},m.schema={type:"object",properties:{type:{type:"string",const:t.RANGE},from:{type:"string",pattern:"^[0-9]+$"},to:{type:"string",pattern:"^[0-9]+$"}},required:["type","from","to"],additionalProperties:!1,_fromLessThanOrEqualTo:!0},m.validate=(0,a.generateLazyValidator)(m.schema,[m._fromLessThanOrEqualTo])})(u=e.RangeMapping||(e.RangeMapping={}));var c;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.MULTIPLE},ids:{type:"array",items:{type:"string",pattern:"^[0-9]+$"},minItems:1,uniqueItems:!0}},required:["type","ids"],additionalProperties:!1},m.validate=(0,a.generateLazyValidator)(m.schema)})(c=e.MultipleMapping||(e.MultipleMapping={}));var f;(function(m){m.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[i.schema,s.schema,u.schema,c.schema]},m.validate=(0,a.generateLazyValidator)(m.schema,[u._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(m){m._isMappingsValid={keyword:"_isMappingsValid",validate:function(T,C){try{h(C)}catch{return!1}return!0},errors:!1},m.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:f.schema}},minProperties:1,required:[],additionalProperties:!1};const v=Object.values(n).reduce((T,C)=>(T[C]=m.innerSchema,T),{});m.schema={type:"object",properties:v,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},m.validate=(0,a.generateLazyValidator)(m.schema,[u._fromLessThanOrEqualTo,m._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(v,T,C){super(v),this.existingMapping=T,this.conflictingMapping=C}}e.AddMappingError=p;function h(m={}){const v={};for(const[y,S]of Object.entries(m)){v[y]={};for(const[M,U]of Object.entries(S))for(const V of U)O(y,M,V)}function T(){return JSON.parse(JSON.stringify(v))}function C(y,S,M){const U=BigInt(y);return U>=BigInt(S)&&U<=BigInt(M)}function N(y,S){switch(S.type){case t.SINGLE:return y.id===S.id;case t.MULTIPLE:return S.ids.includes(y.id);case t.RANGE:return C(y.id,S.from,S.to);default:return!1}}function E(y,S){switch(S.type){case t.SINGLE:return y.ids.includes(S.id);case t.MULTIPLE:return y.ids.some(M=>S.ids.includes(M));case t.RANGE:return y.ids.some(M=>C(M,S.from,S.to));default:return!1}}function R(y,S){switch(S.type){case t.SINGLE:return C(S.id,y.from,y.to);case t.MULTIPLE:return S.ids.some(M=>C(M,y.from,y.to));case t.RANGE:return BigInt(y.from)<=BigInt(S.to)&&BigInt(y.to)>=BigInt(S.from)}}function _(y,S){if(y.type===t.ANY||S.type===t.ANY)return!0;switch(y.type){case t.SINGLE:return N(y,S);case t.MULTIPLE:return E(y,S);case t.RANGE:return R(y,S)}}function O(y,S,M){var U,V;const Q=S.toLowerCase();v[y]=(U=v[y])!==null&&U!==void 0?U:{},v[y][Q]=(V=v[y][Q])!==null&&V!==void 0?V:[];for(const te of v[y][Q])if(_(te,M))throw new p(`Cannot add mapping to contract ${Q} on network ${y} because it overlaps with existing mapping`,te,M);v[y][Q].push(M)}function P(y,S,M){var U;return!((U=v[y])===null||U===void 0)&&U[S]?v[y][S].some(V=>{switch(V.type){case t.SINGLE:return V.id===M;case t.ANY:return!0;case t.MULTIPLE:return V.ids.includes(M);case t.RANGE:return BigInt(M)>=BigInt(V.from)&&BigInt(M)<=BigInt(V.to)}}):!1}return{addMapping:O,getMappings:T,includesNft:P}}e.createMappingsHelper=h})(Uy)),Uy}var zN;function TE(){return zN||(zN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const a=xe(),t=_j(),n=SE();e.schema={type:"object",properties:{merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const i={keyword:"_containsHashingKeys",validate:function(c,f){var p;const h=f;return!((p=h?.merkleProof)===null||p===void 0)&&p.hashingKeys?h.merkleProof.hashingKeys.every(m=>h.hasOwnProperty(m)):!1},errors:!1},s=(0,a.generateLazyValidator)(e.schema,[i,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function u(c){return s(c)}e.isThirdParty=u})(qy)),qy}var Fy={},Vy={},ia={},WN;function Ej(){if(WN)return ia;WN=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.isBaseEmote=ia.isBaseAvatar=ia.requiredBaseItemProps=ia.baseItemProperties=void 0;const e=gj(),a=vj(),t=bE();ia.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},a.Metrics.schema),{nullable:!0})}),ia.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const u=s.id.split(":"),c=u[1]==="decentraland",f=u[3]==="base-avatars";return u.length===5&&c&&f}ia.isBaseAvatar=n;function i(s){if(!s||!s.id)return!1;const u=s.id.split(":");return u.length===5&&u[1]==="decentraland"&&u[3]==="base-emotes"}return ia.isBaseEmote=i,ia}var GN;function HB(){return GN||(GN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=xe(),t=Zo(),n=EE(),i=Ej(),s=wE(),u=TE(),c=_E(),f=SE();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const h={keyword:"_isThirdParty",validate:(v,T)=>!v||(0,u.isThirdParty)(T),errors:!1},m={keyword:"_isBaseAvatar",validate:(v,T)=>!v||(0,i.isBaseAvatar)(T),errors:!1};p.validate=(0,a.generateLazyValidator)(p.schema,[h,m,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Vy)),Vy}var KN;function zB(){return KN||(KN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=EE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=HB();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Zo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=lj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=_E();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(Fy)),Fy}var Hy={},zy={},Wy={},Gy={},YN;function bj(){return YN||(YN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=xe();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Gy)),Gy}var Ky={},XN;function wj(){return XN||(XN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=xe(),t=vE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(Ky)),Ky}var JN;function Sj(){return JN||(JN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=bj(),t=xe(),n=wj();(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Wy)),Wy}var QN;function WB(){return QN||(QN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=Tj(),t=xe(),n=Ej(),i=wE(),s=TE(),u=Sj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.schema.properties),{emoteDataADR74:u.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(h,m)=>!h||(0,a.isThirdParty)(m),errors:!1},p={keyword:"_isBaseEmote",validate:(h,m)=>!h||(0,n.isBaseEmote)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,a.RangeMapping._fromLessThanOrEqualTo,a.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(zy)),zy}var Yy={},xN;function GB(){return xN||(xN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=xe();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Yy)),Yy}var ZN;function KB(){return ZN||(ZN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=WB();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=wj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=Sj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=bj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var s=GB();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(Hy)),Hy}var $N;function Tj(){return $N||($N=1,(function(e){var a=Io&&Io.__createBinding||(Object.create?(function(p,h,m,v){v===void 0&&(v=m);var T=Object.getOwnPropertyDescriptor(h,m);(!T||("get"in T?!h.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(p,v,T)}):(function(p,h,m,v){v===void 0&&(v=m),p[v]=h[m]})),t=Io&&Io.__exportStar||function(p,h){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(h,m)&&a(h,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=gj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=yj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=vj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=vE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=wE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=TE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(SE(),e),t(zB(),e),t(KB(),e)})(Io)),Io}var Xy={},Jy={},eO;function gf(){return eO||(eO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=xe();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(Jy)),Jy}var tO;function YB(){return tO||(tO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=$o(),t=gf(),n=xe();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Xy)),Xy}var Qy={},xy={},rO;function Pj(){return rO||(rO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=$o(),t=xe();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(xy)),xy}var nO;function Aj(){return nO||(nO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=$o(),t=Pj(),n=xe();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(Qy)),Qy}var Zy={},aO;function XB(){return aO||(aO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=gf(),t=xe();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Zy)),Zy}var Co={},$y={},iO;function JB(){return iO||(iO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=Zo(),t=$o(),n=xe();var i;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})($y)),$y}var oO;function QB(){return oO||(oO=1,(function(e){var a=Co&&Co.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Co&&Co.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(JB(),e)})(Co)),Co}var Mo={},eg={},sO;function Nj(){return sO||(sO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationType=void 0,(function(a){a.BADGE_GRANTED="badge_granted",a.BID_ACCEPTED="bid_accepted",a.BID_RECEIVED="bid_received",a.EVENTS_STARTED="events_started",a.EVENTS_STARTS_SOON="events_starts_soon",a.GOVERNANCE_ANNOUNCEMENT="governance_announcement",a.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",a.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",a.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",a.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",a.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",a.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",a.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",a.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",a.GOVERNANCE_TENDER_PASSED="governance_tender_passed",a.GOVERNANCE_WHALE_VOTE="governance_whale_vote",a.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",a.ITEM_SOLD="item_sold",a.ITEM_PUBLISHED="item_published",a.LAND_RENTAL_ENDED="rental_ended",a.LAND_RENTED="rental_started",a.REWARD_ASSIGNED="reward_assignment",a.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",a.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",a.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",a.REWARD_DELAYED="reward_delayed",a.REWARD_IN_PROGRESS="reward_in_progress",a.ROYALTIES_EARNED="royalties_earned",a.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",a.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",a.WORLDS_ACCESS_RESTORED="worlds_access_restored",a.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",a.WORLDS_MISSING_RESOURCES="worlds_missing_resources",a.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",a.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked"})(e.NotificationType||(e.NotificationType={}))})(eg)),eg}var tg={},rg={},uO;function Oj(){return uO||(uO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const a=xe(),t=Nj(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},i=Object.values(t.NotificationType).reduce((s,u)=>(s[u]=n,s),{});(function(s){s.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(t.NotificationType),additionalProperties:!1,properties:i}}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(rg)),rg}var ng={},lO;function Ij(){return lO||(lO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(a){a.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(a.schema.pattern);a.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(ng)),ng}var cO;function xB(){return cO||(cO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const a=xe(),t=Oj(),n=$o(),i=Ij();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},i.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(tg)),tg}var dO;function ZB(){return dO||(dO=1,(function(e){var a=Mo&&Mo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Mo&&Mo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Nj(),e),t(xB(),e),t(Oj(),e)})(Mo)),Mo}var jo={},ag={},fO;function xs(){return fO||(fO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(a){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service"})(a.Type||(a.Type={})),(function(t){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment"})(t.Worlds||(t.Worlds={})),(function(n){n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(t.Client||(t.Client={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.SocialService={}))})(a.SubType||(a.SubType={}))})(e.Events||(e.Events={}))})(ag)),ag}var ig={},pO;function $B(){return pO||(pO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const a=xe(),t=xs();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={}))})(ig)),ig}var og={},mO;function eU(){return mO||(mO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const a=gf(),t=xe(),n=Aj(),i=xs();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:i.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(i.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:a.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(og)),og}var sg={},hO;function tU(){return hO||(hO=1,Object.defineProperty(sg,"__esModule",{value:!0})),sg}var ug={},yO;function rU(){return yO||(yO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const a=xe(),t=xs();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MARKETPLACE},subType:{type:"string",const:t.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(ug)),ug}var lg={},ku={},gO;function nU(){if(gO)return ku;gO=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.createEventSchema=void 0;function e(a,t,n){return{type:"object",properties:{type:{type:"string",const:a},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return ku.createEventSchema=e,ku}var vO;function aU(){return vO||(vO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const a=xe(),t=xs(),n=nU(),i={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},s={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(u){u.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,i),u.validate=(0,a.generateLazyValidator)(u.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(lg)),lg}var cg={},_O;function iU(){return _O||(_O=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const a=xe(),t=xs();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BADGE},subType:{type:"string",const:t.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"}},required:["entityId","platform","statusCode","isLods","isWorld"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]},message:{type:"string",nullable:!0}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={}))})(cg)),cg}var EO;function oU(){return EO||(EO=1,(function(e){var a=jo&&jo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=jo&&jo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(xs(),e),t($B(),e),t(eU(),e),t(tU(),e),t(rU(),e),t(aU(),e),t(iU(),e)})(jo)),jo}var bO;function PE(){return bO||(bO=1,(function(e){var a=No&&No.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=No&&No.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(BB(),e),t(FB(),e),t(Tj(),e),t(bE(),e),t(_j(),e),t(YB(),e),t(Aj(),e),t(XB(),e),t(QB(),e),t(ZB(),e),t(oU(),e)})(No)),No}var wO;function sU(){return wO||(wO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=yf(),t=Zo(),n=EE(),i=xe(),s=PE();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(yy)),yy}var SO;function uU(){return SO||(SO=1,(function(e){var a=Ao&&Ao.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ao&&Ao.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(kB(),e),t(sU(),e)})(Ao)),Ao}var TO;function lU(){return TO||(TO=1,(function(e){var a=To&&To.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=To&&To.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(DB(),e),t(uU(),e)})(To)),To}var Lo={},dg={},PO;function cU(){return PO||(PO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=xe();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(dg)),dg}var fg={},AO;function dU(){return AO||(AO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=xe(),t=Fn(),n=ha();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(fg)),fg}var pg={},mg={},NO;function vf(){return NO||(NO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=xe();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(mg)),mg}var OO;function fU(){return OO||(OO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=xe(),t=Fn(),n=ha(),i=vf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(pg)),pg}var hg={},yg={},IO;function Rj(){return IO||(IO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=xe(),t=Fn(),n=PE(),i=ha(),s=vf(),u=yf(),c=Zo();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:i.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(yg)),yg}var RO;function pU(){return RO||(RO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=xe(),t=Fn(),n=ha(),i=Rj(),s=vf();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(hg)),hg}var gg={},CO;function AE(){return CO||(CO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=xe();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(gg)),gg}var vg={},MO;function mU(){return MO||(MO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(vg)),vg}var _g={},jO;function hU(){return jO||(jO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=xe(),t=Fn(),n=ha();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})(_g)),_g}var Eg={},LO;function yU(){return LO||(LO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Eg)),Eg}var bg={},DO;function gU(){return DO||(DO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=xe(),t=Fn(),n=AE(),i=ha();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(bg)),bg}var wg={},kO;function Cj(){return kO||(kO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=xe();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(wg)),wg}var Sg={},qO;function vU(){return qO||(qO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=xe(),t=Fn(),n=Cj(),i=ha();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(Sg)),Sg}var Tg={},BO;function _U(){return BO||(BO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=xe(),t=Fn(),n=ha();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Tg)),Tg}var Pg={},UO;function EU(){return UO||(UO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Pg)),Pg}var Ag={},FO;function bU(){return FO||(FO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Ag)),Ag}var Ng={},VO;function wU(){return VO||(VO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=xe();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Ng)),Ng}var Og={},HO;function SU(){return HO||(HO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=xe();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(Og)),Og}var Ig={},zO;function TU(){return zO||(zO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=xe(),t=Fn(),n=AE(),i=ha();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const u={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};s.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},u.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...u.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},u.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...u.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Ig)),Ig}var Rg={},WO;function PU(){return WO||(WO=1,Object.defineProperty(Rg,"__esModule",{value:!0})),Rg}var Cg={},GO;function AU(){return GO||(GO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(a){a.BID="bid",a.PUBLIC_NFT_ORDER="public_nft_order",a.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(a){a[a.ERC20=1]="ERC20",a[a.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",a[a.ERC721=3]="ERC721",a[a.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(a){a.SENT="sent",a.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Cg)),Cg}var Do={},Mg={},KO;function NU(){return KO||(KO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=xe();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Mg)),Mg}var jg={},YO;function OU(){return YO||(YO=1,Object.defineProperty(jg,"__esModule",{value:!0})),jg}var Lg={},XO;function IU(){return XO||(XO=1,Object.defineProperty(Lg,"__esModule",{value:!0})),Lg}var Dg={},JO;function RU(){return JO||(JO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=xe();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Dg)),Dg}var kg={},QO;function CU(){return QO||(QO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=xe();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(kg)),kg}var qg={},xO;function MU(){return xO||(xO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const a=xe();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(qg)),qg}var Bg={},ZO;function jU(){return ZO||(ZO=1,Object.defineProperty(Bg,"__esModule",{value:!0})),Bg}var Ug={},$O;function LU(){return $O||($O=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=xe();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Ug)),Ug}var Fg={},eI;function DU(){return eI||(eI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=xe();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(Fg)),Fg}var Vg={},tI;function kU(){return tI||(tI=1,Object.defineProperty(Vg,"__esModule",{value:!0})),Vg}var Hg={},rI;function qU(){return rI||(rI=1,Object.defineProperty(Hg,"__esModule",{value:!0})),Hg}var zg={},nI;function BU(){return nI||(nI=1,Object.defineProperty(zg,"__esModule",{value:!0})),zg}var Wg={},aI;function UU(){return aI||(aI=1,Object.defineProperty(Wg,"__esModule",{value:!0})),Wg}var Gg={},iI;function FU(){return iI||(iI=1,Object.defineProperty(Gg,"__esModule",{value:!0})),Gg}var Kg={},oI;function VU(){return oI||(oI=1,Object.defineProperty(Kg,"__esModule",{value:!0})),Kg}var Yg={},sI;function HU(){return sI||(sI=1,Object.defineProperty(Yg,"__esModule",{value:!0})),Yg}var Xg={},uI;function zU(){return uI||(uI=1,Object.defineProperty(Xg,"__esModule",{value:!0})),Xg}var lI;function WU(){return lI||(lI=1,(function(e){var a=Do&&Do.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Do&&Do.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(NU(),e),t(OU(),e),t(IU(),e),t(RU(),e),t(CU(),e),t(MU(),e),t(jU(),e),t(LU(),e),t(DU(),e),t(kU(),e),t(qU(),e),t(BU(),e),t(UU(),e),t(FU(),e),t(VU(),e),t(HU(),e),t(zU(),e)})(Do)),Do}var ko={},qu={},cI;function GU(){if(cI)return qu;cI=1,Object.defineProperty(qu,"__esModule",{value:!0}),qu.isSysLink=void 0;const e=a=>a!==null&&typeof a=="object"&&"sys"in a&&"id"in a.sys;return qu.isSysLink=e,qu}var Bu={},dI;function KU(){if(dI)return Bu;dI=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.ContentfulLocale=void 0;var e;return(function(a){a.enUS="en-US",a.es="es",a.zh="zh"})(e||(e={})),Bu.ContentfulLocale=e,Bu}var Jg={},fI;function YU(){return fI||(fI=1,Object.defineProperty(Jg,"__esModule",{value:!0})),Jg}var pI;function XU(){return pI||(pI=1,(function(e){var a=ko&&ko.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=ko&&ko.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(GU(),e),t(KU(),e),t(YU(),e)})(ko)),ko}var mI;function JU(){return mI||(mI=1,(function(e){var a=Lo&&Lo.__createBinding||(Object.create?(function(Q,te,he,be){be===void 0&&(be=he);var Ie=Object.getOwnPropertyDescriptor(te,he);(!Ie||("get"in Ie?!te.__esModule:Ie.writable||Ie.configurable))&&(Ie={enumerable:!0,get:function(){return te[he]}}),Object.defineProperty(Q,be,Ie)}):(function(Q,te,he,be){be===void 0&&(be=he),Q[be]=te[he]})),t=Lo&&Lo.__exportStar||function(Q,te){for(var he in Q)he!=="default"&&!Object.prototype.hasOwnProperty.call(te,he)&&a(te,Q,he)};Object.defineProperty(e,"__esModule",{value:!0}),e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=void 0;var n=cU();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var i=Fn();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return i.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return i.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return i.getURNProtocol}});var s=oj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var u=dU();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return u.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return u.CollectionSortBy}});var c=fU();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=pU();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=AE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var h=mU();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return h.MetaTransaction}});var m=hU();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return m.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return m.MintSortBy}});var v=ha();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return v.Network}});var T=vf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return T.NFTCategory}});var C=Rj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return C.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return C.NFTSortBy}});var N=yU();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return N.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return N.CatalogSortDirection}});var E=gU();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return E.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return E.OrderSortBy}});var R=sj();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return R.ProviderType}});var _=yf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return _.Rarity}});var O=Cj();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return O.SaleType}});var P=vU();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return P.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return P.SaleSortBy}});var y=_U();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return y.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return y.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return y.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return y.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return y.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return y.PeriodCreation}});var S=EU();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var M=bU();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return M.Store}});var U=wU();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return U.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return U.GenderFilterOption}});var V=SU();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return V.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return V.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return V.isInsideWorldLimits}}),t(TU(),e),t(PU(),e),t(AU(),e),t(WU(),e),t(XU(),e)})(Lo)),Lo}var Qg={},hI;function QU(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=xe();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Qg)),Qg}var yI;function xU(){return yI||(yI=1,(function(e){var a=aa&&aa.__createBinding||(Object.create?(function(u,c,f,p){p===void 0&&(p=f);var h=Object.getOwnPropertyDescriptor(c,f);(!h||("get"in h?!c.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(u,p,h)}):(function(u,c,f,p){p===void 0&&(p=f),u[p]=c[f]})),t=aa&&aa.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),n=aa&&aa.__importStar||function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var f in u)f!=="default"&&Object.prototype.hasOwnProperty.call(u,f)&&a(c,u,f);return t(c,u),c},i=aa&&aa.__exportStar||function(u,c){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&a(c,u,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(lU());e.sdk=s,i(xe(),e),i(JU(),e),i(PE(),e),i($o(),e),i(QU(),e),i(gf(),e),i(Pj(),e),i(Ij(),e)})(aa)),aa}var Xs=xU();const ZU=Object.freeze({storageKey:"decentraland-connect-storage-key",[Ft.ProviderType.INJECTED]:{},[Ft.ProviderType.FORTMATIC]:{apiKeys:{[At.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[At.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:Ws(Ft.ProviderType.FORTMATIC)},[Ft.ProviderType.NETWORK]:{urls:Ws(Ft.ProviderType.NETWORK)},[Ft.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:Ws(Ft.ProviderType.WALLET_LINK)},[Ft.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:Ws(Ft.ProviderType.WALLET_CONNECT_V2),chains:{[At.ChainId.ETHEREUM_MAINNET]:{chains:[At.ChainId.ETHEREUM_MAINNET],optionalChains:[At.ChainId.MATIC_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.OPTIMISM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]},[At.ChainId.ETHEREUM_SEPOLIA]:{chains:[At.ChainId.ETHEREUM_SEPOLIA],optionalChains:[At.ChainId.MATIC_AMOY]}}},[Ft.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:Ws(Ft.ProviderType.MAGIC),chains:[At.ChainId.ETHEREUM_MAINNET,At.ChainId.ETHEREUM_SEPOLIA,At.ChainId.MATIC_MAINNET,At.ChainId.MATIC_AMOY,At.ChainId.OPTIMISM_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]},[Ft.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:Ws(Ft.ProviderType.MAGIC),chains:[At.ChainId.ETHEREUM_MAINNET,At.ChainId.ETHEREUM_SEPOLIA,At.ChainId.MATIC_MAINNET,At.ChainId.MATIC_AMOY,At.ChainId.OPTIMISM_MAINNET,At.ChainId.ARBITRUM_MAINNET,At.ChainId.AVALANCHE_MAINNET,At.ChainId.BSC_MAINNET,At.ChainId.FANTOM_MAINNET]}});function $a(){return ZU}function Ws(e){const a={[At.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[At.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[At.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[At.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[At.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[At.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[At.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[At.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[At.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let t="";switch(e){case Ft.ProviderType.WALLET_LINK:t="walletlink";break;case Ft.ProviderType.FORTMATIC:t="fortmatic";break;case Ft.ProviderType.MAGIC:t="magic";break;case Ft.ProviderType.MAGIC_TEST:t="magic";break;case Ft.ProviderType.WALLET_CONNECT_V2:t="walletconnect-v2";break;case Ft.ProviderType.AUTH_SERVER:t="auth-server";break}if(t)for(const n in a)a[n]+=`?project=${t}`;return a}class $U extends Qs{constructor(a){const t=$a()[Xs.ProviderType.FORTMATIC],n=Object.keys(t.apiKeys).map(i=>Number(i));if(!n.includes(a))throw new Error(`Invariant error: Unsupported chainId ${a}`);super({supportedChainIds:n}),this.apiKey=t.apiKeys[a],this.chainId=a,this.rpcUrl=t.urls[a]}async activate(){if(!this.fortmatic){const{default:t}=await gl(async()=>{const{default:n}=await import("./fortmatic-Bs0w6FGo.js").then(i=>i.f);return{default:n}},[]);this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const a=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:a}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(a=>a[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function H_(){return H_=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},H_.apply(this,arguments)}function NE(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,e.__proto__=a}function z_(e){return z_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},z_(e)}function ef(e,a){return ef=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ef(e,a)}function eF(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Qd(e,a,t){return eF()?Qd=Reflect.construct:Qd=function(i,s,u){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(i,c),p=new f;return u&&ef(p,u.prototype),p},Qd.apply(null,arguments)}function tF(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function tf(e){var a=typeof Map=="function"?new Map:void 0;return tf=function(n){if(n===null||!tF(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(n))return a.get(n);a.set(n,i)}function i(){return Qd(n,arguments,z_(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ef(i,n)},tf(e)}function Bd(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));function Gs(e,a){try{var t=e()}catch(n){return a(n)}return t&&t.then?t.then(void 0,a):t}function Ra(e){return e.hasOwnProperty("result")?e.result:e}var xg=(function(e){NE(a,e);function a(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="No Ethereum provider was found on window.ethereum.",t}return a})(tf(Error)),rF=(function(e){NE(a,e);function a(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="The user rejected the request.",t}return a})(tf(Error)),nF=(function(e){NE(a,e);function a(n){var i;return i=e.call(this,n)||this,i.handleNetworkChanged=i.handleNetworkChanged.bind(Bd(i)),i.handleChainChanged=i.handleChainChanged.bind(Bd(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(Bd(i)),i.handleClose=i.handleClose.bind(Bd(i)),i}var t=a.prototype;return t.handleChainChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},t.handleAccountsChanged=function(i){i.length===0?this.emitDeactivate():this.emitUpdate({account:i[0]})},t.handleClose=function(i,s){this.emitDeactivate()},t.handleNetworkChanged=function(i){this.emitUpdate({chainId:i,provider:window.ethereum})},t.activate=function(){try{var i=function(h){if(s)return h;function m(){return H_({provider:window.ethereum},c?{account:c}:{})}var v=(function(){if(!c)return Promise.resolve(window.ethereum.enable().then(function(T){return T&&Ra(T)[0]})).then(function(T){c=T})})();return v&&v.then?v.then(m):m(v)},s=!1,u=this;if(!window.ethereum)throw new xg;window.ethereum.on&&(window.ethereum.on("chainChanged",u.handleChainChanged),window.ethereum.on("accountsChanged",u.handleAccountsChanged),window.ethereum.on("close",u.handleClose),window.ethereum.on("networkChanged",u.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var c,f=Gs(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(p){return Ra(p)[0]})).then(function(p){c=p})},function(p){if(p.code===4001)throw new rF});return Promise.resolve(f&&f.then?f.then(i):i(f))}catch(p){return Promise.reject(p)}},t.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(i){return Promise.reject(i)}},t.getChainId=function(){try{var i=function(){function f(){if(!s)try{s=Ra(window.ethereum.send({method:"net_version"}))}catch{}return s||(window.ethereum.isDapper?s=Ra(window.ethereum.cachedResults.net_version):s=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),s}var p=(function(){if(!s){var h=Gs(function(){return Promise.resolve(window.ethereum.send("net_version").then(Ra)).then(function(m){s=m})},function(){});if(h&&h.then)return h.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new xg;var s,u=Gs(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(Ra)).then(function(c){s=c})},function(){});return Promise.resolve(u&&u.then?u.then(i):i(u))}catch(c){return Promise.reject(c)}},t.getAccount=function(){try{var i=function(){function f(){return s||(s=Ra(window.ethereum.send({method:"eth_accounts"}))[0]),s}var p=(function(){if(!s){var h=Gs(function(){return Promise.resolve(window.ethereum.enable().then(function(m){return Ra(m)[0]})).then(function(m){s=m})},function(){});if(h&&h.then)return h.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new xg;var s,u=Gs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(c){return Ra(c)[0]})).then(function(c){s=c})},function(){});return Promise.resolve(u&&u.then?u.then(i):i(u))}catch(c){return Promise.reject(c)}},t.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},t.isAuthorized=function(){try{return window.ethereum?Promise.resolve(Gs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(i){return Ra(i).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(i){return Promise.reject(i)}},a})(Qs);class aF extends Error{constructor(){super("There was an error unlocking your wallet. Please be sure your wallet is unlocked and try again."),this.name="ErrorUnlockingWallet"}}const iF=60*1e3;class oF extends nF{constructor(a){super({supportedChainIds:[a]})}async activate(){const a=new Promise((n,i)=>{setTimeout(()=>{i(new aF)},iF)}),t=super.activate();return Promise.race([t,a])}}var sF="Invariant failed";function gI(e,a){throw new Error(sF)}function Mj(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,vl(e,a)}function W_(e){return W_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},W_(e)}function vl(e,a){return vl=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},vl(e,a)}function uF(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function xd(e,a,t){return uF()?xd=Reflect.construct:xd=function(i,s,u){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(i,c),p=new f;return u&&vl(p,u.prototype),p},xd.apply(null,arguments)}function lF(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function G_(e){var a=typeof Map=="function"?new Map:void 0;return G_=function(n){if(n===null||!lF(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a<"u"){if(a.has(n))return a.get(n);a.set(n,i)}function i(){return xd(n,arguments,W_(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),vl(i,n)},G_(e)}var Zg=(function(e){Mj(a,e);function a(t,n,i){var s;return s=e.call(this)||this,s.code=n,s.data=i,s.name=s.constructor.name,s.message=t,s}return a})(G_(Error)),cF=function(a,t){var n=this,i=this;this.isMetaMask=!1,this.sendAsync=function(u,c){console.log("sendAsync",u.method,u.params),i.request(u.method,u.params).then(function(f){return c(null,{jsonrpc:"2.0",id:u.id,result:f})}).catch(function(f){return c(f,null)})},this.request=function(u,c){try{return typeof u!="string"&&(c=u.params,u=u.method),Promise.resolve(fetch(n.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:u,params:c}),headers:{"Content-Type":"application/json"}})).then(function(f){if(!f.ok)throw new Zg(f.status+": "+f.statusText,-32e3);return Promise.resolve(f.json()).then(function(p){if("error"in p){var h,m,v;throw new Zg(p==null||(h=p.error)==null?void 0:h.message,p==null||(m=p.error)==null?void 0:m.code,p==null||(v=p.error)==null?void 0:v.data)}else{if("result"in p)return p.result;throw new Zg("Received unexpected JSON-RPC response to "+u+" request.",-32e3,p)}})})}catch(f){return Promise.reject(f)}},this.chainId=a,this.url=t;var s=new URL(t);this.host=s.host,this.path=s.pathname},dF=(function(e){Mj(a,e);function a(n){var i,s=n.urls,u=n.defaultChainId;return u||Object.keys(s).length===1||gI(),i=e.call(this,{supportedChainIds:Object.keys(s).map(function(c){return Number(c)})})||this,i.currentChainId=u||Number(Object.keys(s)[0]),i.providers=Object.keys(s).reduce(function(c,f){return c[Number(f)]=new cF(Number(f),s[Number(f)]),c},{}),i}var t=a.prototype;return t.activate=function(){try{var i=this;return Promise.resolve({provider:i.providers[i.currentChainId],chainId:i.currentChainId,account:null})}catch(s){return Promise.reject(s)}},t.getProvider=function(){try{var i=this;return Promise.resolve(i.providers[i.currentChainId])}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var i=this;return Promise.resolve(i.currentChainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){return Promise.resolve(null)},t.deactivate=function(){},t.changeChainId=function(i){Object.keys(this.providers).includes(i.toString())||gI(),this.currentChainId=i,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:i})},a})(Qs);class fF extends dF{constructor(a){super({urls:$a()[Ft.ProviderType.NETWORK].urls,defaultChainId:a})}}function K_(){return K_=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},K_.apply(this,arguments)}function pF(e,a){e.prototype=Object.create(a.prototype),e.prototype.constructor=e,Y_(e,a)}function Y_(e,a){return Y_=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Y_(e,a)}function vI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var mF=1,hF=(function(e){pF(a,e);function a(n){var i,s=n.url,u=n.appName,c=n.appLogoUrl,f=n.darkMode,p=n.supportedChainIds;return i=e.call(this,{supportedChainIds:p})||this,i.url=s,i.appName=u,i.appLogoUrl=c,i.darkMode=f||!1,i.handleChainChanged=i.handleChainChanged.bind(vI(i)),i.handleAccountsChanged=i.handleAccountsChanged.bind(vI(i)),i}var t=a.prototype;return t.activate=function(){try{var i=this,s=function(){return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(f){var p=f[0];return i.provider.on("chainChanged",i.handleChainChanged),i.provider.on("accountsChanged",i.handleAccountsChanged),{provider:i.provider,account:p}})},u=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)i.provider=window.ethereum;else{var c=(function(){if(!i.walletLink)return Promise.resolve(gl(()=>import("./index-C5LJd8Kw.js").then(f=>f.i),[]).then(function(f){var p;return(p=f?.default)!=null?p:f})).then(function(f){i.walletLink=new f(K_({appName:i.appName,darkMode:i.darkMode},i.appLogoUrl?{appLogoUrl:i.appLogoUrl}:{})),i.provider=i.walletLink.makeWeb3Provider(i.url,mF)})})();if(c&&c.then)return c.then(function(){})}})();return Promise.resolve(u&&u.then?u.then(s):s(u))}catch(c){return Promise.reject(c)}},t.getProvider=function(){try{var i=this;return Promise.resolve(i.provider)}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var i=this;return Promise.resolve(i.provider.chainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){try{var i=this;return Promise.resolve(i.provider.request({method:"eth_requestAccounts"})).then(function(s){return s[0]})}catch(s){return Promise.reject(s)}},t.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},t.close=function(){try{var i=this;return i.provider.close(),i.emitDeactivate(),Promise.resolve()}catch(s){return Promise.reject(s)}},t.handleChainChanged=function(i){this.emitUpdate({chainId:i})},t.handleAccountsChanged=function(i){this.emitUpdate({account:i[0]})},a})(Qs);class yF extends hF{constructor(a){const t=$a()[Xs.ProviderType.WALLET_LINK];super({url:t.urls[a],appName:t.appName,supportedChainIds:[a]})}}class Ma extends Qs{constructor(a){super({supportedChainIds:(()=>{const{chains:t,optionalChains:n}=Ma.configuration.chains[a];return[...t,...n]})()}),this.desiredChainId=a,this.activate=async()=>{const t=await gl(()=>import("./index-BcaBGkFu.js").then(i=>i.R),[]).then(i=>{const{chains:s,optionalChains:u}=Ma.configuration.chains[this.desiredChainId];return i.default.init({projectId:Ma.configuration.projectId,rpcMap:Ma.configuration.urls,chains:s,optionalChains:u,showQrModal:!0,disableProviderPing:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"3000"}},methods:["eth_sendTransaction","personal_sign"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sign","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],events:["chainChanged","accountsChanged"],optionalEvents:["disconnect"]})}),n=await t.enable();return t.on("accountsChanged",this.handleAccountsChanged),t.on("chainChanged",this.handleChainChanged),t.on("disconnect",this.handleDisconnect),this.provider=t,{chainId:t.chainId,account:n[0],provider:t}},this.getProvider=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider},this.getChainId=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.chainId},this.getAccount=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.accounts[0]},this.getWalletName=()=>this.provider?.session?.peer.metadata.name,this.deactivate=()=>{},this.close=async()=>{if(this.provider)return this.provider.removeListener("accountsChanged",this.handleAccountsChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("disconnect",this.handleDisconnect).disconnect()},this.handleAccountsChanged=t=>{this.emitUpdate({account:t[0]})},this.handleChainChanged=t=>{this.emitUpdate({chainId:t})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");return this.emitDeactivate()}}}Ma.configuration=$a()[Xs.ProviderType.WALLET_CONNECT_V2];Ma.clearStorage=e=>{e.removeRegExp(new RegExp("^wc@2:"))};class jj extends Qs{constructor(a,t=!1){super({supportedChainIds:$a()[Xs.ProviderType.MAGIC].chains}),this.isTest=t,this.activate=async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const i=await this.getProvider(),s=await i.request({method:"eth_accounts"});return this.account=s[0]??null,{provider:i,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const n=await this.magic.wallet.getProvider();return{...n,isMagic:!0,request:new Proxy(n.request,{apply:async(i,s,u)=>{if(u[0]?.method==="wallet_switchEthereumChain")try{const c=parseInt(u[0]?.params[0]?.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(c)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(c),this.emitUpdate({chainId:c}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return i.bind(n)(...u)}}),sendAsync:new Proxy(n.send,{apply:async(i,s,u)=>i.bind(n)(...u)})}},this.getChainId=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId},this.getAccount=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account},this.deactivate=()=>{},this.buildMagicInstance=async n=>{const{Magic:i}=await gl(async()=>{const{Magic:c}=await import("./index-8e4wv-tH.js");return{Magic:c}},__vite__mapDeps([0,1])),{OAuthExtension:s}=await gl(async()=>{const{OAuthExtension:c}=await import("./index-QHMvomuf.js");return{OAuthExtension:c}},__vite__mapDeps([2,1])),u=$a()[this.isTest?Xs.ProviderType.MAGIC_TEST:Xs.ProviderType.MAGIC];return new i(u.apiKey,{extensions:[new s],network:{rpcUrl:u.urls[n],chainId:n}})},this.chainId=a,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class gF extends jj{constructor(a){super(a,!0)}}class vF{}class _F extends vF{get(a){const t=window.localStorage.getItem(a);return t===null?void 0:t}set(a,t){window.localStorage.setItem(a,t)}remove(a){window.localStorage.removeItem(a)}removeRegExp(a){for(let t=localStorage.length-1;t>=0;t--){const n=localStorage.key(t);n&&a.test(n)&&localStorage.removeItem(n)}}}class rf{constructor(a){this.provider=a,this.id=0,this.on=(t,n)=>this.provider.on(t,n),this.emit=(t,...n)=>this.provider.emit(t,n),this.removeListener=(t,n)=>this.provider.removeListener(t,n),this.request=async({method:t,params:n})=>this.isModernProvider()?this.provider.request({method:t,params:n}):this.send(t,n),this.sendAsync=async(t,n)=>this.hasSendAsync()?this.provider.sendAsync(t,(i,s)=>{s&&!s.hasOwnProperty("result")?n(i,{id:0,jsonrpc:"2.0",result:s}):n(i,s)}):this.send(t,n)}static adapt(a){const t=new rf(a);return{...a,on:t.on,emit:t.emit,removeListener:t.removeListener,request:t.request,sendAsync:t.sendAsync,send:t.send.bind(t)}}async send(a,t){let n,i,s;const u=typeof t=="function";if(u){const c=a;i=c.params||[],n=c.method,s=t}else n=a,i=t||[],s=(c,f)=>{if(c)throw c;return f};if(this.isModernProvider()){const[c,f]=await this.provider.request({method:n,params:i}).then(h=>[null,h]).catch(h=>[h,void 0]);return s(c,u?{id:"",jsonrpc:"2.0",result:f}:f)}else{this.patchOldMobile();const[c,f]=u?await new Promise(p=>this.provider.send(a,(h,m)=>{p([h,m])})):await new Promise(p=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:n,params:i},(h,m)=>{p([m&&m.hasOwnProperty("error")?m.error:h,m&&m.hasOwnProperty("result")?m.result:m])}));return s(c,f)}}isModernProvider(){return typeof this.provider.request=="function"}hasSendAsync(){return typeof this.provider.sendAsync=="function"}patchOldMobile(){this.provider&&!this.provider.isDapper&&!this.provider.isFortmatic&&!this.provider.isMetamask&&this.hasSendAsync()&&this.provider.send!==this.provider.sendAsync&&(this.provider.send=this.provider.sendAsync)}}class EF{constructor(a){this.storage=a,this.getWalletName=()=>{if(this.connector instanceof Ma)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:t}=$a();this.storage.remove(t),Ma.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=async()=>{try{await this.disconnect()}catch(t){console.error(t)}}}async connect(a,t=At.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(c){console.error("Error disconnecting previous connection",c)}const n=this.buildConnector(a,t);n.on(xa.Deactivate,this.handleWeb3ReactDeactivate);let{provider:i,account:s}={};try{const c=await n.activate();i=c.provider,s=c.account}catch(c){throw console.error("Error activating the connector",c),c}(a===Ft.ProviderType.MAGIC||a===Ft.ProviderType.MAGIC_TEST)&&n.on(xa.Update,({chainId:c})=>{c&&this.setConnectionData(a,c)});let u=t;if(a===Ft.ProviderType.INJECTED){const c=await i.request({method:"eth_chainId"});u=c?parseInt(c,16):u}return this.connector=n,this.setConnectionData(a,u),{provider:rf.adapt(i),providerType:a,account:s||"",chainId:u}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const a=this.getConnectionData();if(!a)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");if(this.connector)return{provider:await this.connector.getProvider(),providerType:a.providerType,chainId:a.chainId,account:await this.connector.getAccount()};const t=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(a.providerType,a.chainId));return this.promiseOfConnection=void 0,{...t,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const a=[Ft.ProviderType.FORTMATIC,Ft.ProviderType.WALLET_CONNECT,Ft.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?a.unshift(Ft.ProviderType.INJECTED):a.unshift(Ft.ProviderType.METAMASK_MOBILE),a}async disconnect(){this.connector&&(this.connector.removeAllListeners(xa.Deactivate),this.connector.removeAllListeners(xa.Update),this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async createProvider(a,t=At.ChainId.ETHEREUM_MAINNET){const i=await this.buildConnector(a,t).getProvider();return rf.adapt(i)}buildConnector(a,t){switch(a){case Ft.ProviderType.INJECTED:return new oF(t);case Ft.ProviderType.FORTMATIC:return new $U(t);case Ft.ProviderType.MAGIC:return new jj(t);case Ft.ProviderType.MAGIC_TEST:return new gF(t);case Ft.ProviderType.WALLET_LINK:return new yF(t);case Ft.ProviderType.NETWORK:return new fF(t);case Ft.ProviderType.WALLET_CONNECT_V2:return new Ma(t);default:throw new Error(`Invalid provider ${a}`)}}getConnectionData(){const{storageKey:a}=$a(),t=this.storage.get(a);return t?JSON.parse(t):void 0}setConnectionData(a,t){const{storageKey:n}=$a(),i=JSON.stringify({providerType:a,chainId:t});this.storage.set(n,i)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}const $g=new EF(new _F),bF=e=>/^decentraland.(zone|org|today)$/.test(e),wF=async(e,a="https://peer.decentraland.org")=>{try{const n=await(await fetch(`${a}/lambdas/profiles`,{method:"POST",body:JSON.stringify({ids:[e]})})).json();return n.length>0&&n[0]?.avatars?.length>0?n[0].avatars[0]:void 0}catch(t){console.error("Error fetching avatar:",t);return}},SF=e=>({shouldUseBasePath:bF,fetchAvatar:a=>wF(a),...e,debug:e.debug??!1}),TF=e=>({[Bn.ChainId.ETHEREUM_MAINNET]:"Ethereum Mainnet",[Bn.ChainId.ETHEREUM_SEPOLIA]:"Ethereum Sepolia",[Bn.ChainId.MATIC_MAINNET]:"Polygon Mainnet",[Bn.ChainId.MATIC_AMOY]:"Polygon Amoy"})[e]||`Chain ID ${e}`,PF=e=>{const a="0x"+e.toString(16),t=TF(e);switch(e){case Bn.ChainId.MATIC_MAINNET:return{chainId:a,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-mainnet.maticvigil.com/"],blockExplorerUrls:["https://polygonscan.com/"]};case Bn.ChainId.MATIC_AMOY:return{chainId:a,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-amoy.polygon.technology/"],blockExplorerUrls:["https://www.oklink.com/amoy"]};case Bn.ChainId.ETHEREUM_SEPOLIA:return{chainId:a,chainName:t,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.infura.io/v3/"],blockExplorerUrls:["https://sepolia.etherscan.io"]};default:return{chainId:"0x1",chainName:"Ethereum Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.infura.io/v3/"],blockExplorerUrls:["https://etherscan.io"]}}},_I=async e=>{const a=await e.request({method:"eth_chainId"});return parseInt(a,16)},Xr=(e,a,t=!1)=>{t&&typeof console<"u"&&console.log(`[Auth] ${e}`,a||"")},AF=(e,a,t)=>{const i=new URLSearchParams(t).get("redirectTo"),s=e.shouldUseBasePath?.(window.location.host)?e.basePath:"",u=i?`${s}${i}`:`${s}${a}${t}`;return`${e.authUrl}/login?redirectTo=${encodeURIComponent(window.location.origin+u)}`},Lj=H.createContext(void 0),NF=({children:e,config:a})=>{const{pathname:t,search:n}=Ii(),i=H.useMemo(()=>SF(a),[a]),[s,u]=H.useState(),[c,f]=H.useState(),[p,h]=H.useState(!1),[m,v]=H.useState(!1),[T,C]=H.useState(i.defaultChainId),N=H.useCallback(()=>{Xr("Initiating sign in",{pathname:t,search:n},i.debug);const O=AF(i,t,n);Xr("Redirecting to auth",{redirectUrl:O},i.debug),window.location.replace(O)},[t,n,i]),E=H.useCallback(()=>{try{Xr("Signing out",{wallet:s},i.debug),$g.disconnect(),s&&V_.localStorageClearIdentity(s),u(void 0),f(void 0),h(!1),Xr("Sign out completed",void 0,i.debug)}catch(O){console.error("Error during sign-out:",O)}},[s,i.debug]),R=H.useCallback(async(O=Bn.ChainId.ETHEREUM_MAINNET)=>{try{Xr("Changing network",{from:T,to:O},i.debug);const P=await $g.getProvider();if(!P){console.error("No provider available to switch network"),C(Bn.ChainId.ETHEREUM_MAINNET);return}C(O);try{await P.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+O.toString(16)}]});const y=await _I(P);y!==O&&console.warn("Chain ID did not change as expected"),Xr("Network changed successfully",{chainId:y},i.debug)}catch(y){const S=y;S.code===4902?(Xr("Adding new chain to wallet",{chainId:O},i.debug),await P.request({method:"wallet_addEthereumChain",params:[PF(O)]}),await _I(P)!==O&&(console.warn("Chain ID not set after adding network"),C(Bn.ChainId.ETHEREUM_MAINNET))):(console.error("Error switching network:",S),C(Bn.ChainId.ETHEREUM_MAINNET))}}catch(P){console.error("Error during network change:",P),C(Bn.ChainId.ETHEREUM_MAINNET)}},[T,i.debug]);H.useEffect(()=>{(async()=>{try{v(!0),Xr("Checking auth status",void 0,i.debug);try{const{account:P,chainId:y}=await $g.tryPreviousConnection();if(P){Xr("Previous connection found",{address:P,chainId:y},i.debug),u(P),C(y);let S=!1;try{const M=V_.localStorageGetIdentity(P);if(M&&M.expiration){const U=new Date(M.expiration),V=new Date;V.getTime()<=U.getTime()?(Xr("Identity valid",{expiration:U},i.debug),S=!0):Xr("Identity expired",{expiration:U,now:V},i.debug)}else Xr("No identity found",void 0,i.debug)}catch(M){console.error("Error checking identity:",M)}if(h(S),S&&i.fetchAvatar)try{Xr("Fetching avatar",{address:P},i.debug);const M=await i.fetchAvatar(P);M&&(f(M),Xr("Avatar fetched successfully",M,i.debug))}catch(M){console.error("Error fetching avatar:",M)}}else Xr("No previous connection found",void 0,i.debug)}catch(P){Xr("Previous connection failed",P,i.debug)}}catch(P){console.error("Error checking auth status:",P)}finally{v(!1)}})()},[i.debug,i.fetchAvatar]);const _={wallet:s,avatar:c,chainId:T,isSignedIn:p,isConnecting:m,signIn:N,signOut:E,changeNetwork:R};return j.jsx(Lj.Provider,{value:_,children:e})},Ol=e=>{const a=H.useContext(Lj);if(a===void 0)throw new Error("useAuth must be used within an AuthProvider");return a};var qo={},oa={},pl={exports:{}};var OF=pl.exports,EI;function _f(){return EI||(EI=1,(function(e,a){(function(t,n){n(a)})(OF,(function(t){function n(b){if(b.jsonrpc="2.0",!b.id||typeof b.id!="number"||Math.floor(b.id)!==b.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(b)}`);if(!b.method||typeof b.method!="string"||b.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(b)}`);if(!b.params||typeof b.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(b)}`);return b}var i={};function s(){let b,I;const q=new Promise(((J,re)=>{b=oe=>{J(oe),q.isPending=!1},I=oe=>{re(oe),q.isPending=!1}})).catch((J=>Promise.reject(J)));return q.resolve=b,q.reject=I,"finally"in q||(q.finally=J=>{q.then(J),q.catch(J)}),q.isPending=!0,q}Object.defineProperty(i,"__esModule",{value:!0});var u=i.future=s;i.default=s;var c={exports:{}};(function(b){(function(){var I="input is invalid type",q=typeof window=="object",J=q?window:{};J.JS_SHA3_NO_WINDOW&&(q=!1);var re=!q&&typeof self=="object";!J.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?J=ED:re&&(J=self);var oe=!J.JS_SHA3_NO_COMMON_JS&&b.exports,Ce=!J.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ze="0123456789abcdef".split(""),st=[4,1024,262144,67108864],ct=[0,8,16,24],gr=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],Xt=[224,256,384,512],Ke=[128,256],Tr=["hex","buffer","arrayBuffer","array","digest"],Jt={128:168,256:136};!J.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(w){return Object.prototype.toString.call(w)==="[object Array]"}),!Ce||!J.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(w){return typeof w=="object"&&w.buffer&&w.buffer.constructor===ArrayBuffer});for(var Ht=function(w,W,Z){return function(Y){return new Bt(w,W,w).update(Y)[Z]()}},Ir=function(w,W,Z){return function(Y,ne){return new Bt(w,W,ne).update(Y)[Z]()}},On=function(w,W,Z){return function(Y,ne,ee,ie){return lr["cshake"+w].update(Y,ne,ee,ie)[Z]()}},Zr=function(w,W,Z){return function(Y,ne,ee,ie){return lr["kmac"+w].update(Y,ne,ee,ie)[Z]()}},Pr=function(w,W,Z,Y){for(var ne=0;ne<Tr.length;++ne){var ee=Tr[ne];w[ee]=W(Z,Y,ee)}return w},In=function(w,W){var Z=Ht(w,W,"hex");return Z.create=function(){return new Bt(w,W,w)},Z.update=function(Y){return Z.create().update(Y)},Pr(Z,Ht,w,W)},on=[{name:"keccak",padding:[1,256,65536,16777216],bits:Xt,createMethod:In},{name:"sha3",padding:[6,1536,393216,100663296],bits:Xt,createMethod:In},{name:"shake",padding:[31,7936,2031616,520093696],bits:Ke,createMethod:function(w,W){var Z=Ir(w,W,"hex");return Z.create=function(Y){return new Bt(w,W,Y)},Z.update=function(Y,ne){return Z.create(ne).update(Y)},Pr(Z,Ir,w,W)}},{name:"cshake",padding:st,bits:Ke,createMethod:function(w,W){var Z=Jt[w],Y=On(w,0,"hex");return Y.create=function(ne,ee,ie){return ee||ie?new Bt(w,W,ne).bytepad([ee,ie],Z):lr["shake"+w].create(ne)},Y.update=function(ne,ee,ie,ye){return Y.create(ee,ie,ye).update(ne)},Pr(Y,On,w,W)}},{name:"kmac",padding:st,bits:Ke,createMethod:function(w,W){var Z=Jt[w],Y=Zr(w,0,"hex");return Y.create=function(ne,ee,ie){return new pr(w,W,ee).bytepad(["KMAC",ie],Z).bytepad([ne],Z)},Y.update=function(ne,ee,ie,ye){return Y.create(ne,ie,ye).update(ee)},Pr(Y,Zr,w,W)}}],lr={},zr=[],vr=0;vr<on.length;++vr)for(var Rn=on[vr],Ve=Rn.bits,yn=0;yn<Ve.length;++yn){var zn=Rn.name+"_"+Ve[yn];if(zr.push(zn),lr[zn]=Rn.createMethod(Ve[yn],Rn.padding),Rn.name!=="sha3"){var Ea=Rn.name+Ve[yn];zr.push(Ea),lr[Ea]=lr[zn]}}function Bt(w,W,Z){this.blocks=[],this.s=[],this.padding=W,this.outputBits=Z,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(w<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Z>>5,this.extraBytes=(31&Z)>>3;for(var Y=0;Y<50;++Y)this.s[Y]=0}function pr(w,W,Z){Bt.call(this,w,W,Z)}Bt.prototype.update=function(w){if(this.finalized)throw new Error("finalize already called");var W,Z=typeof w;if(Z!=="string"){if(Z!=="object")throw new Error(I);if(w===null)throw new Error(I);if(Ce&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||Ce&&ArrayBuffer.isView(w)))throw new Error(I);W=!0}for(var Y,ne,ee=this.blocks,ie=this.byteCount,ye=w.length,_e=this.blockCount,ve=0,Ye=this.s;ve<ye;){if(this.reset)for(this.reset=!1,ee[0]=this.block,Y=1;Y<_e+1;++Y)ee[Y]=0;if(W)for(Y=this.start;ve<ye&&Y<ie;++ve)ee[Y>>2]|=w[ve]<<ct[3&Y++];else for(Y=this.start;ve<ye&&Y<ie;++ve)(ne=w.charCodeAt(ve))<128?ee[Y>>2]|=ne<<ct[3&Y++]:ne<2048?(ee[Y>>2]|=(192|ne>>6)<<ct[3&Y++],ee[Y>>2]|=(128|63&ne)<<ct[3&Y++]):ne<55296||ne>=57344?(ee[Y>>2]|=(224|ne>>12)<<ct[3&Y++],ee[Y>>2]|=(128|ne>>6&63)<<ct[3&Y++],ee[Y>>2]|=(128|63&ne)<<ct[3&Y++]):(ne=65536+((1023&ne)<<10|1023&w.charCodeAt(++ve)),ee[Y>>2]|=(240|ne>>18)<<ct[3&Y++],ee[Y>>2]|=(128|ne>>12&63)<<ct[3&Y++],ee[Y>>2]|=(128|ne>>6&63)<<ct[3&Y++],ee[Y>>2]|=(128|63&ne)<<ct[3&Y++]);if(this.lastByteIndex=Y,Y>=ie){for(this.start=Y-ie,this.block=ee[_e],Y=0;Y<_e;++Y)Ye[Y]^=ee[Y];G(Ye),this.reset=!0}else this.start=Y}return this},Bt.prototype.encode=function(w,W){var Z=255&w,Y=1,ne=[Z];for(Z=255&(w>>=8);Z>0;)ne.unshift(Z),Z=255&(w>>=8),++Y;return W?ne.push(Y):ne.unshift(Y),this.update(ne),ne.length},Bt.prototype.encodeString=function(w){var W,Z=typeof w;if(Z!=="string"){if(Z!=="object")throw new Error(I);if(w===null)throw new Error(I);if(Ce&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!(Array.isArray(w)||Ce&&ArrayBuffer.isView(w)))throw new Error(I);W=!0}var Y=0,ne=w.length;if(W)Y=ne;else for(var ee=0;ee<w.length;++ee){var ie=w.charCodeAt(ee);ie<128?Y+=1:ie<2048?Y+=2:ie<55296||ie>=57344?Y+=3:(ie=65536+((1023&ie)<<10|1023&w.charCodeAt(++ee)),Y+=4)}return Y+=this.encode(8*Y),this.update(w),Y},Bt.prototype.bytepad=function(w,W){for(var Z=this.encode(W),Y=0;Y<w.length;++Y)Z+=this.encodeString(w[Y]);var ne=W-Z%W,ee=[];return ee.length=ne,this.update(ee),this},Bt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var w=this.blocks,W=this.lastByteIndex,Z=this.blockCount,Y=this.s;if(w[W>>2]|=this.padding[3&W],this.lastByteIndex===this.byteCount)for(w[0]=w[Z],W=1;W<Z+1;++W)w[W]=0;for(w[Z-1]|=2147483648,W=0;W<Z;++W)Y[W]^=w[W];G(Y)}},Bt.prototype.toString=Bt.prototype.hex=function(){this.finalize();for(var w,W=this.blockCount,Z=this.s,Y=this.outputBlocks,ne=this.extraBytes,ee=0,ie=0,ye="";ie<Y;){for(ee=0;ee<W&&ie<Y;++ee,++ie)w=Z[ee],ye+=ze[w>>4&15]+ze[15&w]+ze[w>>12&15]+ze[w>>8&15]+ze[w>>20&15]+ze[w>>16&15]+ze[w>>28&15]+ze[w>>24&15];ie%W==0&&(G(Z),ee=0)}return ne&&(w=Z[ee],ye+=ze[w>>4&15]+ze[15&w],ne>1&&(ye+=ze[w>>12&15]+ze[w>>8&15]),ne>2&&(ye+=ze[w>>20&15]+ze[w>>16&15])),ye},Bt.prototype.arrayBuffer=function(){this.finalize();var w,W=this.blockCount,Z=this.s,Y=this.outputBlocks,ne=this.extraBytes,ee=0,ie=0,ye=this.outputBits>>3;w=ne?new ArrayBuffer(Y+1<<2):new ArrayBuffer(ye);for(var _e=new Uint32Array(w);ie<Y;){for(ee=0;ee<W&&ie<Y;++ee,++ie)_e[ie]=Z[ee];ie%W==0&&G(Z)}return ne&&(_e[ee]=Z[ee],w=w.slice(0,ye)),w},Bt.prototype.buffer=Bt.prototype.arrayBuffer,Bt.prototype.digest=Bt.prototype.array=function(){this.finalize();for(var w,W,Z=this.blockCount,Y=this.s,ne=this.outputBlocks,ee=this.extraBytes,ie=0,ye=0,_e=[];ye<ne;){for(ie=0;ie<Z&&ye<ne;++ie,++ye)w=ye<<2,W=Y[ie],_e[w]=255&W,_e[w+1]=W>>8&255,_e[w+2]=W>>16&255,_e[w+3]=W>>24&255;ye%Z==0&&G(Y)}return ee&&(w=ye<<2,W=Y[ie],_e[w]=255&W,ee>1&&(_e[w+1]=W>>8&255),ee>2&&(_e[w+2]=W>>16&255)),_e},pr.prototype=new Bt,pr.prototype.finalize=function(){return this.encode(this.outputBits,!0),Bt.prototype.finalize.call(this)};var G=function(w){var W,Z,Y,ne,ee,ie,ye,_e,ve,Ye,ht,gt,It,Qt,$t,jt,Ut,nr,Wn,ba,wa,qr,Cn,Er,mr,xt,is,os,oi,ss,us,ls,Di,cs,ds,fs,ps,ms,hs,ys,si,Sa,gs,ki,qi,Bi,Ui,Fi,Gn,vs,_s,Es,Vi,Hi,Ta,Pa,bs,qa,ws,zi,ui,li,Wi;for(Y=0;Y<48;Y+=2)ne=w[0]^w[10]^w[20]^w[30]^w[40],ee=w[1]^w[11]^w[21]^w[31]^w[41],ie=w[2]^w[12]^w[22]^w[32]^w[42],ye=w[3]^w[13]^w[23]^w[33]^w[43],_e=w[4]^w[14]^w[24]^w[34]^w[44],ve=w[5]^w[15]^w[25]^w[35]^w[45],Ye=w[6]^w[16]^w[26]^w[36]^w[46],ht=w[7]^w[17]^w[27]^w[37]^w[47],W=(gt=w[8]^w[18]^w[28]^w[38]^w[48])^(ie<<1|ye>>>31),Z=(It=w[9]^w[19]^w[29]^w[39]^w[49])^(ye<<1|ie>>>31),w[0]^=W,w[1]^=Z,w[10]^=W,w[11]^=Z,w[20]^=W,w[21]^=Z,w[30]^=W,w[31]^=Z,w[40]^=W,w[41]^=Z,W=ne^(_e<<1|ve>>>31),Z=ee^(ve<<1|_e>>>31),w[2]^=W,w[3]^=Z,w[12]^=W,w[13]^=Z,w[22]^=W,w[23]^=Z,w[32]^=W,w[33]^=Z,w[42]^=W,w[43]^=Z,W=ie^(Ye<<1|ht>>>31),Z=ye^(ht<<1|Ye>>>31),w[4]^=W,w[5]^=Z,w[14]^=W,w[15]^=Z,w[24]^=W,w[25]^=Z,w[34]^=W,w[35]^=Z,w[44]^=W,w[45]^=Z,W=_e^(gt<<1|It>>>31),Z=ve^(It<<1|gt>>>31),w[6]^=W,w[7]^=Z,w[16]^=W,w[17]^=Z,w[26]^=W,w[27]^=Z,w[36]^=W,w[37]^=Z,w[46]^=W,w[47]^=Z,W=Ye^(ne<<1|ee>>>31),Z=ht^(ee<<1|ne>>>31),w[8]^=W,w[9]^=Z,w[18]^=W,w[19]^=Z,w[28]^=W,w[29]^=Z,w[38]^=W,w[39]^=Z,w[48]^=W,w[49]^=Z,Qt=w[0],$t=w[1],Bi=w[11]<<4|w[10]>>>28,Ui=w[10]<<4|w[11]>>>28,os=w[20]<<3|w[21]>>>29,oi=w[21]<<3|w[20]>>>29,zi=w[31]<<9|w[30]>>>23,ui=w[30]<<9|w[31]>>>23,Sa=w[40]<<18|w[41]>>>14,gs=w[41]<<18|w[40]>>>14,cs=w[2]<<1|w[3]>>>31,ds=w[3]<<1|w[2]>>>31,jt=w[13]<<12|w[12]>>>20,Ut=w[12]<<12|w[13]>>>20,Fi=w[22]<<10|w[23]>>>22,Gn=w[23]<<10|w[22]>>>22,ss=w[33]<<13|w[32]>>>19,us=w[32]<<13|w[33]>>>19,li=w[42]<<2|w[43]>>>30,Wi=w[43]<<2|w[42]>>>30,Hi=w[5]<<30|w[4]>>>2,Ta=w[4]<<30|w[5]>>>2,fs=w[14]<<6|w[15]>>>26,ps=w[15]<<6|w[14]>>>26,nr=w[25]<<11|w[24]>>>21,Wn=w[24]<<11|w[25]>>>21,vs=w[34]<<15|w[35]>>>17,_s=w[35]<<15|w[34]>>>17,ls=w[45]<<29|w[44]>>>3,Di=w[44]<<29|w[45]>>>3,Er=w[6]<<28|w[7]>>>4,mr=w[7]<<28|w[6]>>>4,Pa=w[17]<<23|w[16]>>>9,bs=w[16]<<23|w[17]>>>9,ms=w[26]<<25|w[27]>>>7,hs=w[27]<<25|w[26]>>>7,ba=w[36]<<21|w[37]>>>11,wa=w[37]<<21|w[36]>>>11,Es=w[47]<<24|w[46]>>>8,Vi=w[46]<<24|w[47]>>>8,ki=w[8]<<27|w[9]>>>5,qi=w[9]<<27|w[8]>>>5,xt=w[18]<<20|w[19]>>>12,is=w[19]<<20|w[18]>>>12,qa=w[29]<<7|w[28]>>>25,ws=w[28]<<7|w[29]>>>25,ys=w[38]<<8|w[39]>>>24,si=w[39]<<8|w[38]>>>24,qr=w[48]<<14|w[49]>>>18,Cn=w[49]<<14|w[48]>>>18,w[0]=Qt^~jt&nr,w[1]=$t^~Ut&Wn,w[10]=Er^~xt&os,w[11]=mr^~is&oi,w[20]=cs^~fs&ms,w[21]=ds^~ps&hs,w[30]=ki^~Bi&Fi,w[31]=qi^~Ui&Gn,w[40]=Hi^~Pa&qa,w[41]=Ta^~bs&ws,w[2]=jt^~nr&ba,w[3]=Ut^~Wn&wa,w[12]=xt^~os&ss,w[13]=is^~oi&us,w[22]=fs^~ms&ys,w[23]=ps^~hs&si,w[32]=Bi^~Fi&vs,w[33]=Ui^~Gn&_s,w[42]=Pa^~qa&zi,w[43]=bs^~ws&ui,w[4]=nr^~ba&qr,w[5]=Wn^~wa&Cn,w[14]=os^~ss&ls,w[15]=oi^~us&Di,w[24]=ms^~ys&Sa,w[25]=hs^~si&gs,w[34]=Fi^~vs&Es,w[35]=Gn^~_s&Vi,w[44]=qa^~zi&li,w[45]=ws^~ui&Wi,w[6]=ba^~qr&Qt,w[7]=wa^~Cn&$t,w[16]=ss^~ls&Er,w[17]=us^~Di&mr,w[26]=ys^~Sa&cs,w[27]=si^~gs&ds,w[36]=vs^~Es&ki,w[37]=_s^~Vi&qi,w[46]=zi^~li&Hi,w[47]=ui^~Wi&Ta,w[8]=qr^~Qt&jt,w[9]=Cn^~$t&Ut,w[18]=ls^~Er&xt,w[19]=Di^~mr&is,w[28]=Sa^~cs&fs,w[29]=gs^~ds&ps,w[38]=Es^~ki&Bi,w[39]=Vi^~qi&Ui,w[48]=li^~Hi&Pa,w[49]=Wi^~Ta&bs,w[0]^=gr[Y],w[1]^=gr[Y+1]};if(oe)b.exports=lr;else for(vr=0;vr<zr.length;++vr)J[zr[vr]]=lr[zr[vr]]})()})(c);var f=c.exports,p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,h=Math.ceil,m=Math.floor,v="[BigNumber Error] ",T=v+"Number primitive has more than 15 significant digits: ",C=1e14,N=14,E=9007199254740991,R=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],_=1e7,O=1e9;function P(b){var I=0|b;return b>0||b===I?I:I-1}function y(b){for(var I,q,J=1,re=b.length,oe=b[0]+"";J<re;){for(I=b[J++]+"",q=N-I.length;q--;I="0"+I);oe+=I}for(re=oe.length;oe.charCodeAt(--re)===48;);return oe.slice(0,re+1||1)}function S(b,I){var q,J,re=b.c,oe=I.c,Ce=b.s,ze=I.s,st=b.e,ct=I.e;if(!Ce||!ze)return null;if(q=re&&!re[0],J=oe&&!oe[0],q||J)return q?J?0:-ze:Ce;if(Ce!=ze)return Ce;if(q=Ce<0,J=st==ct,!re||!oe)return J?0:!re^q?1:-1;if(!J)return st>ct^q?1:-1;for(ze=(st=re.length)<(ct=oe.length)?st:ct,Ce=0;Ce<ze;Ce++)if(re[Ce]!=oe[Ce])return re[Ce]>oe[Ce]^q?1:-1;return st==ct?0:st>ct^q?1:-1}function M(b,I,q,J){if(b<I||b>q||b!==m(b))throw Error(v+(J||"Argument")+(typeof b=="number"?b<I||b>q?" out of range: ":" not an integer: ":" not a primitive number: ")+String(b))}function U(b){var I=b.c.length-1;return P(b.e/N)==I&&b.c[I]%2!=0}function V(b,I){return(b.length>1?b.charAt(0)+"."+b.slice(1):b)+(I<0?"e":"e+")+I}function Q(b,I,q){var J,re;if(I<0){for(re=q+".";++I;re+=q);b=re+b}else if(++I>(J=b.length)){for(re=q,I-=J;--I;re+=q);b+=re}else I<J&&(b=b.slice(0,I)+"."+b.slice(I));return b}var te=(function b(I){var q,J,re,oe,Ce,ze,st,ct,gr,Xt,Ke=Ve.prototype={constructor:Ve,toString:null,valueOf:null},Tr=new Ve(1),Jt=20,Ht=4,Ir=-7,On=21,Zr=-1e7,Pr=1e7,In=!1,on=1,lr=0,zr={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},vr="0123456789abcdefghijklmnopqrstuvwxyz",Rn=!0;function Ve(G,w){var W,Z,Y,ne,ee,ie,ye,_e,ve=this;if(!(ve instanceof Ve))return new Ve(G,w);if(w==null){if(G&&G._isBigNumber===!0)return ve.s=G.s,void(!G.c||G.e>Pr?ve.c=ve.e=null:G.e<Zr?ve.c=[ve.e=0]:(ve.e=G.e,ve.c=G.c.slice()));if((ie=typeof G=="number")&&0*G==0){if(ve.s=1/G<0?(G=-G,-1):1,G===~~G){for(ne=0,ee=G;ee>=10;ee/=10,ne++);return void(ne>Pr?ve.c=ve.e=null:(ve.e=ne,ve.c=[G]))}_e=String(G)}else{if(!p.test(_e=String(G)))return re(ve,_e,ie);ve.s=_e.charCodeAt(0)==45?(_e=_e.slice(1),-1):1}(ne=_e.indexOf("."))>-1&&(_e=_e.replace(".","")),(ee=_e.search(/e/i))>0?(ne<0&&(ne=ee),ne+=+_e.slice(ee+1),_e=_e.substring(0,ee)):ne<0&&(ne=_e.length)}else{if(M(w,2,vr.length,"Base"),w==10&&Rn)return Bt(ve=new Ve(G),Jt+ve.e+1,Ht);if(_e=String(G),ie=typeof G=="number"){if(0*G!=0)return re(ve,_e,ie,w);if(ve.s=1/G<0?(_e=_e.slice(1),-1):1,Ve.DEBUG&&_e.replace(/^0\.0*|\./,"").length>15)throw Error(T+G)}else ve.s=_e.charCodeAt(0)===45?(_e=_e.slice(1),-1):1;for(W=vr.slice(0,w),ne=ee=0,ye=_e.length;ee<ye;ee++)if(W.indexOf(Z=_e.charAt(ee))<0){if(Z=="."){if(ee>ne){ne=ye;continue}}else if(!Y&&(_e==_e.toUpperCase()&&(_e=_e.toLowerCase())||_e==_e.toLowerCase()&&(_e=_e.toUpperCase()))){Y=!0,ee=-1,ne=0;continue}return re(ve,String(G),ie,w)}ie=!1,(ne=(_e=J(_e,w,10,ve.s)).indexOf("."))>-1?_e=_e.replace(".",""):ne=_e.length}for(ee=0;_e.charCodeAt(ee)===48;ee++);for(ye=_e.length;_e.charCodeAt(--ye)===48;);if(_e=_e.slice(ee,++ye)){if(ye-=ee,ie&&Ve.DEBUG&&ye>15&&(G>E||G!==m(G)))throw Error(T+ve.s*G);if((ne=ne-ee-1)>Pr)ve.c=ve.e=null;else if(ne<Zr)ve.c=[ve.e=0];else{if(ve.e=ne,ve.c=[],ee=(ne+1)%N,ne<0&&(ee+=N),ee<ye){for(ee&&ve.c.push(+_e.slice(0,ee)),ye-=N;ee<ye;)ve.c.push(+_e.slice(ee,ee+=N));ee=N-(_e=_e.slice(ee)).length}else ee-=ye;for(;ee--;_e+="0");ve.c.push(+_e)}}else ve.c=[ve.e=0]}function yn(G,w,W,Z){var Y,ne,ee,ie,ye;if(W==null?W=Ht:M(W,0,8),!G.c)return G.toString();if(Y=G.c[0],ee=G.e,w==null)ye=y(G.c),ye=Z==1||Z==2&&(ee<=Ir||ee>=On)?V(ye,ee):Q(ye,ee,"0");else if(ne=(G=Bt(new Ve(G),w,W)).e,ie=(ye=y(G.c)).length,Z==1||Z==2&&(w<=ne||ne<=Ir)){for(;ie<w;ye+="0",ie++);ye=V(ye,ne)}else if(w-=ee,ye=Q(ye,ne,"0"),ne+1>ie){if(--w>0)for(ye+=".";w--;ye+="0");}else if((w+=ne-ie)>0)for(ne+1==ie&&(ye+=".");w--;ye+="0");return G.s<0&&Y?"-"+ye:ye}function zn(G,w){for(var W,Z=1,Y=new Ve(G[0]);Z<G.length;Z++){if(!(W=new Ve(G[Z])).s){Y=W;break}w.call(Y,W)&&(Y=W)}return Y}function Ea(G,w,W){for(var Z=1,Y=w.length;!w[--Y];w.pop());for(Y=w[0];Y>=10;Y/=10,Z++);return(W=Z+W*N-1)>Pr?G.c=G.e=null:W<Zr?G.c=[G.e=0]:(G.e=W,G.c=w),G}function Bt(G,w,W,Z){var Y,ne,ee,ie,ye,_e,ve,Ye=G.c,ht=R;if(Ye){e:{for(Y=1,ie=Ye[0];ie>=10;ie/=10,Y++);if((ne=w-Y)<0)ne+=N,ee=w,ve=(ye=Ye[_e=0])/ht[Y-ee-1]%10|0;else if((_e=h((ne+1)/N))>=Ye.length){if(!Z)break e;for(;Ye.length<=_e;Ye.push(0));ye=ve=0,Y=1,ee=(ne%=N)-N+1}else{for(ye=ie=Ye[_e],Y=1;ie>=10;ie/=10,Y++);ve=(ee=(ne%=N)-N+Y)<0?0:ye/ht[Y-ee-1]%10|0}if(Z=Z||w<0||Ye[_e+1]!=null||(ee<0?ye:ye%ht[Y-ee-1]),Z=W<4?(ve||Z)&&(W==0||W==(G.s<0?3:2)):ve>5||ve==5&&(W==4||Z||W==6&&(ne>0?ee>0?ye/ht[Y-ee]:0:Ye[_e-1])%10&1||W==(G.s<0?8:7)),w<1||!Ye[0])return Ye.length=0,Z?(w-=G.e+1,Ye[0]=ht[(N-w%N)%N],G.e=-w||0):Ye[0]=G.e=0,G;if(ne==0?(Ye.length=_e,ie=1,_e--):(Ye.length=_e+1,ie=ht[N-ne],Ye[_e]=ee>0?m(ye/ht[Y-ee]%ht[ee])*ie:0),Z)for(;;){if(_e==0){for(ne=1,ee=Ye[0];ee>=10;ee/=10,ne++);for(ee=Ye[0]+=ie,ie=1;ee>=10;ee/=10,ie++);ne!=ie&&(G.e++,Ye[0]==C&&(Ye[0]=1));break}if(Ye[_e]+=ie,Ye[_e]!=C)break;Ye[_e--]=0,ie=1}for(ne=Ye.length;Ye[--ne]===0;Ye.pop());}G.e>Pr?G.c=G.e=null:G.e<Zr&&(G.c=[G.e=0])}return G}function pr(G){var w,W=G.e;return W===null?G.toString():(w=y(G.c),w=W<=Ir||W>=On?V(w,W):Q(w,W,"0"),G.s<0?"-"+w:w)}return Ve.clone=b,Ve.ROUND_UP=0,Ve.ROUND_DOWN=1,Ve.ROUND_CEIL=2,Ve.ROUND_FLOOR=3,Ve.ROUND_HALF_UP=4,Ve.ROUND_HALF_DOWN=5,Ve.ROUND_HALF_EVEN=6,Ve.ROUND_HALF_CEIL=7,Ve.ROUND_HALF_FLOOR=8,Ve.EUCLID=9,Ve.config=Ve.set=function(G){var w,W;if(G!=null){if(typeof G!="object")throw Error(v+"Object expected: "+G);if(G.hasOwnProperty(w="DECIMAL_PLACES")&&(M(W=G[w],0,O,w),Jt=W),G.hasOwnProperty(w="ROUNDING_MODE")&&(M(W=G[w],0,8,w),Ht=W),G.hasOwnProperty(w="EXPONENTIAL_AT")&&((W=G[w])&&W.pop?(M(W[0],-O,0,w),M(W[1],0,O,w),Ir=W[0],On=W[1]):(M(W,-O,O,w),Ir=-(On=W<0?-W:W))),G.hasOwnProperty(w="RANGE"))if((W=G[w])&&W.pop)M(W[0],-O,-1,w),M(W[1],1,O,w),Zr=W[0],Pr=W[1];else{if(M(W,-O,O,w),!W)throw Error(v+w+" cannot be zero: "+W);Zr=-(Pr=W<0?-W:W)}if(G.hasOwnProperty(w="CRYPTO")){if((W=G[w])!==!!W)throw Error(v+w+" not true or false: "+W);if(W){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw In=!W,Error(v+"crypto unavailable");In=W}else In=W}if(G.hasOwnProperty(w="MODULO_MODE")&&(M(W=G[w],0,9,w),on=W),G.hasOwnProperty(w="POW_PRECISION")&&(M(W=G[w],0,O,w),lr=W),G.hasOwnProperty(w="FORMAT")){if(typeof(W=G[w])!="object")throw Error(v+w+" not an object: "+W);zr=W}if(G.hasOwnProperty(w="ALPHABET")){if(typeof(W=G[w])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(W))throw Error(v+w+" invalid: "+W);Rn=W.slice(0,10)=="0123456789",vr=W}}return{DECIMAL_PLACES:Jt,ROUNDING_MODE:Ht,EXPONENTIAL_AT:[Ir,On],RANGE:[Zr,Pr],CRYPTO:In,MODULO_MODE:on,POW_PRECISION:lr,FORMAT:zr,ALPHABET:vr}},Ve.isBigNumber=function(G){if(!G||G._isBigNumber!==!0)return!1;if(!Ve.DEBUG)return!0;var w,W,Z=G.c,Y=G.e,ne=G.s;e:if({}.toString.call(Z)=="[object Array]"){if((ne===1||ne===-1)&&Y>=-O&&Y<=O&&Y===m(Y)){if(Z[0]===0){if(Y===0&&Z.length===1)return!0;break e}if((w=(Y+1)%N)<1&&(w+=N),String(Z[0]).length==w){for(w=0;w<Z.length;w++)if((W=Z[w])<0||W>=C||W!==m(W))break e;if(W!==0)return!0}}}else if(Z===null&&Y===null&&(ne===null||ne===1||ne===-1))return!0;throw Error(v+"Invalid BigNumber: "+G)},Ve.maximum=Ve.max=function(){return zn(arguments,Ke.lt)},Ve.minimum=Ve.min=function(){return zn(arguments,Ke.gt)},Ve.random=(oe=9007199254740992,Ce=Math.random()*oe&2097151?function(){return m(Math.random()*oe)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(G){var w,W,Z,Y,ne,ee=0,ie=[],ye=new Ve(Tr);if(G==null?G=Jt:M(G,0,O),Y=h(G/N),In)if(crypto.getRandomValues){for(w=crypto.getRandomValues(new Uint32Array(Y*=2));ee<Y;)(ne=131072*w[ee]+(w[ee+1]>>>11))>=9e15?(W=crypto.getRandomValues(new Uint32Array(2)),w[ee]=W[0],w[ee+1]=W[1]):(ie.push(ne%1e14),ee+=2);ee=Y/2}else{if(!crypto.randomBytes)throw In=!1,Error(v+"crypto unavailable");for(w=crypto.randomBytes(Y*=7);ee<Y;)(ne=281474976710656*(31&w[ee])+1099511627776*w[ee+1]+4294967296*w[ee+2]+16777216*w[ee+3]+(w[ee+4]<<16)+(w[ee+5]<<8)+w[ee+6])>=9e15?crypto.randomBytes(7).copy(w,ee):(ie.push(ne%1e14),ee+=7);ee=Y/7}if(!In)for(;ee<Y;)(ne=Ce())<9e15&&(ie[ee++]=ne%1e14);for(Y=ie[--ee],G%=N,Y&&G&&(ne=R[N-G],ie[ee]=m(Y/ne)*ne);ie[ee]===0;ie.pop(),ee--);if(ee<0)ie=[Z=0];else{for(Z=-1;ie[0]===0;ie.splice(0,1),Z-=N);for(ee=1,ne=ie[0];ne>=10;ne/=10,ee++);ee<N&&(Z-=N-ee)}return ye.e=Z,ye.c=ie,ye}),Ve.sum=function(){for(var G=1,w=arguments,W=new Ve(w[0]);G<w.length;)W=W.plus(w[G++]);return W},J=(function(){var G="0123456789";function w(W,Z,Y,ne){for(var ee,ie,ye=[0],_e=0,ve=W.length;_e<ve;){for(ie=ye.length;ie--;ye[ie]*=Z);for(ye[0]+=ne.indexOf(W.charAt(_e++)),ee=0;ee<ye.length;ee++)ye[ee]>Y-1&&(ye[ee+1]==null&&(ye[ee+1]=0),ye[ee+1]+=ye[ee]/Y|0,ye[ee]%=Y)}return ye.reverse()}return function(W,Z,Y,ne,ee){var ie,ye,_e,ve,Ye,ht,gt,It,Qt=W.indexOf("."),$t=Jt,jt=Ht;for(Qt>=0&&(ve=lr,lr=0,W=W.replace(".",""),ht=(It=new Ve(Z)).pow(W.length-Qt),lr=ve,It.c=w(Q(y(ht.c),ht.e,"0"),10,Y,G),It.e=It.c.length),_e=ve=(gt=w(W,Z,Y,ee?(ie=vr,G):(ie=G,vr))).length;gt[--ve]==0;gt.pop());if(!gt[0])return ie.charAt(0);if(Qt<0?--_e:(ht.c=gt,ht.e=_e,ht.s=ne,gt=(ht=q(ht,It,$t,jt,Y)).c,Ye=ht.r,_e=ht.e),Qt=gt[ye=_e+$t+1],ve=Y/2,Ye=Ye||ye<0||gt[ye+1]!=null,Ye=jt<4?(Qt!=null||Ye)&&(jt==0||jt==(ht.s<0?3:2)):Qt>ve||Qt==ve&&(jt==4||Ye||jt==6&&1&gt[ye-1]||jt==(ht.s<0?8:7)),ye<1||!gt[0])W=Ye?Q(ie.charAt(1),-$t,ie.charAt(0)):ie.charAt(0);else{if(gt.length=ye,Ye)for(--Y;++gt[--ye]>Y;)gt[ye]=0,ye||(++_e,gt=[1].concat(gt));for(ve=gt.length;!gt[--ve];);for(Qt=0,W="";Qt<=ve;W+=ie.charAt(gt[Qt++]));W=Q(W,_e,ie.charAt(0))}return W}})(),q=(function(){function G(Z,Y,ne){var ee,ie,ye,_e,ve=0,Ye=Z.length,ht=Y%_,gt=Y/_|0;for(Z=Z.slice();Ye--;)ve=((ie=ht*(ye=Z[Ye]%_)+(ee=gt*ye+(_e=Z[Ye]/_|0)*ht)%_*_+ve)/ne|0)+(ee/_|0)+gt*_e,Z[Ye]=ie%ne;return ve&&(Z=[ve].concat(Z)),Z}function w(Z,Y,ne,ee){var ie,ye;if(ne!=ee)ye=ne>ee?1:-1;else for(ie=ye=0;ie<ne;ie++)if(Z[ie]!=Y[ie]){ye=Z[ie]>Y[ie]?1:-1;break}return ye}function W(Z,Y,ne,ee){for(var ie=0;ne--;)Z[ne]-=ie,ie=Z[ne]<Y[ne]?1:0,Z[ne]=ie*ee+Z[ne]-Y[ne];for(;!Z[0]&&Z.length>1;Z.splice(0,1));}return function(Z,Y,ne,ee,ie){var ye,_e,ve,Ye,ht,gt,It,Qt,$t,jt,Ut,nr,Wn,ba,wa,qr,Cn,Er=Z.s==Y.s?1:-1,mr=Z.c,xt=Y.c;if(!(mr&&mr[0]&&xt&&xt[0]))return new Ve(Z.s&&Y.s&&(mr?!xt||mr[0]!=xt[0]:xt)?mr&&mr[0]==0||!xt?0*Er:Er/0:NaN);for($t=(Qt=new Ve(Er)).c=[],Er=ne+(_e=Z.e-Y.e)+1,ie||(ie=C,_e=P(Z.e/N)-P(Y.e/N),Er=Er/N|0),ve=0;xt[ve]==(mr[ve]||0);ve++);if(xt[ve]>(mr[ve]||0)&&_e--,Er<0)$t.push(1),Ye=!0;else{for(ba=mr.length,qr=xt.length,ve=0,Er+=2,(ht=m(ie/(xt[0]+1)))>1&&(xt=G(xt,ht,ie),mr=G(mr,ht,ie),qr=xt.length,ba=mr.length),Wn=qr,Ut=(jt=mr.slice(0,qr)).length;Ut<qr;jt[Ut++]=0);Cn=xt.slice(),Cn=[0].concat(Cn),wa=xt[0],xt[1]>=ie/2&&wa++;do{if(ht=0,(ye=w(xt,jt,qr,Ut))<0){if(nr=jt[0],qr!=Ut&&(nr=nr*ie+(jt[1]||0)),(ht=m(nr/wa))>1)for(ht>=ie&&(ht=ie-1),It=(gt=G(xt,ht,ie)).length,Ut=jt.length;w(gt,jt,It,Ut)==1;)ht--,W(gt,qr<It?Cn:xt,It,ie),It=gt.length,ye=1;else ht==0&&(ye=ht=1),It=(gt=xt.slice()).length;if(It<Ut&&(gt=[0].concat(gt)),W(jt,gt,Ut,ie),Ut=jt.length,ye==-1)for(;w(xt,jt,qr,Ut)<1;)ht++,W(jt,qr<Ut?Cn:xt,Ut,ie),Ut=jt.length}else ye===0&&(ht++,jt=[0]);$t[ve++]=ht,jt[0]?jt[Ut++]=mr[Wn]||0:(jt=[mr[Wn]],Ut=1)}while((Wn++<ba||jt[0]!=null)&&Er--);Ye=jt[0]!=null,$t[0]||$t.splice(0,1)}if(ie==C){for(ve=1,Er=$t[0];Er>=10;Er/=10,ve++);Bt(Qt,ne+(Qt.e=ve+_e*N-1)+1,ee,Ye)}else Qt.e=_e,Qt.r=+Ye;return Qt}})(),ze=/^(-?)0([xbo])(?=\w[\w.]*$)/i,st=/^([^.]+)\.$/,ct=/^\.([^.]+)$/,gr=/^-?(Infinity|NaN)$/,Xt=/^\s*\+(?=[\w.])|^\s+|\s+$/g,re=function(G,w,W,Z){var Y,ne=W?w:w.replace(Xt,"");if(gr.test(ne))G.s=isNaN(ne)?null:ne<0?-1:1;else{if(!W&&(ne=ne.replace(ze,(function(ee,ie,ye){return Y=(ye=ye.toLowerCase())=="x"?16:ye=="b"?2:8,Z&&Z!=Y?ee:ie})),Z&&(Y=Z,ne=ne.replace(st,"$1").replace(ct,"0.$1")),w!=ne))return new Ve(ne,Y);if(Ve.DEBUG)throw Error(v+"Not a"+(Z?" base "+Z:"")+" number: "+w);G.s=null}G.c=G.e=null},Ke.absoluteValue=Ke.abs=function(){var G=new Ve(this);return G.s<0&&(G.s=1),G},Ke.comparedTo=function(G,w){return S(this,new Ve(G,w))},Ke.decimalPlaces=Ke.dp=function(G,w){var W,Z,Y,ne=this;if(G!=null)return M(G,0,O),w==null?w=Ht:M(w,0,8),Bt(new Ve(ne),G+ne.e+1,w);if(!(W=ne.c))return null;if(Z=((Y=W.length-1)-P(this.e/N))*N,Y=W[Y])for(;Y%10==0;Y/=10,Z--);return Z<0&&(Z=0),Z},Ke.dividedBy=Ke.div=function(G,w){return q(this,new Ve(G,w),Jt,Ht)},Ke.dividedToIntegerBy=Ke.idiv=function(G,w){return q(this,new Ve(G,w),0,1)},Ke.exponentiatedBy=Ke.pow=function(G,w){var W,Z,Y,ne,ee,ie,ye,_e,ve=this;if((G=new Ve(G)).c&&!G.isInteger())throw Error(v+"Exponent not an integer: "+pr(G));if(w!=null&&(w=new Ve(w)),ee=G.e>14,!ve.c||!ve.c[0]||ve.c[0]==1&&!ve.e&&ve.c.length==1||!G.c||!G.c[0])return _e=new Ve(Math.pow(+pr(ve),ee?G.s*(2-U(G)):+pr(G))),w?_e.mod(w):_e;if(ie=G.s<0,w){if(w.c?!w.c[0]:!w.s)return new Ve(NaN);(Z=!ie&&ve.isInteger()&&w.isInteger())&&(ve=ve.mod(w))}else{if(G.e>9&&(ve.e>0||ve.e<-1||(ve.e==0?ve.c[0]>1||ee&&ve.c[1]>=24e7:ve.c[0]<8e13||ee&&ve.c[0]<=9999975e7)))return ne=ve.s<0&&U(G)?-0:0,ve.e>-1&&(ne=1/ne),new Ve(ie?1/ne:ne);lr&&(ne=h(lr/N+2))}for(ee?(W=new Ve(.5),ie&&(G.s=1),ye=U(G)):ye=(Y=Math.abs(+pr(G)))%2,_e=new Ve(Tr);;){if(ye){if(!(_e=_e.times(ve)).c)break;ne?_e.c.length>ne&&(_e.c.length=ne):Z&&(_e=_e.mod(w))}if(Y){if((Y=m(Y/2))===0)break;ye=Y%2}else if(Bt(G=G.times(W),G.e+1,1),G.e>14)ye=U(G);else{if((Y=+pr(G))==0)break;ye=Y%2}ve=ve.times(ve),ne?ve.c&&ve.c.length>ne&&(ve.c.length=ne):Z&&(ve=ve.mod(w))}return Z?_e:(ie&&(_e=Tr.div(_e)),w?_e.mod(w):ne?Bt(_e,lr,Ht,void 0):_e)},Ke.integerValue=function(G){var w=new Ve(this);return G==null?G=Ht:M(G,0,8),Bt(w,w.e+1,G)},Ke.isEqualTo=Ke.eq=function(G,w){return S(this,new Ve(G,w))===0},Ke.isFinite=function(){return!!this.c},Ke.isGreaterThan=Ke.gt=function(G,w){return S(this,new Ve(G,w))>0},Ke.isGreaterThanOrEqualTo=Ke.gte=function(G,w){return(w=S(this,new Ve(G,w)))===1||w===0},Ke.isInteger=function(){return!!this.c&&P(this.e/N)>this.c.length-2},Ke.isLessThan=Ke.lt=function(G,w){return S(this,new Ve(G,w))<0},Ke.isLessThanOrEqualTo=Ke.lte=function(G,w){return(w=S(this,new Ve(G,w)))===-1||w===0},Ke.isNaN=function(){return!this.s},Ke.isNegative=function(){return this.s<0},Ke.isPositive=function(){return this.s>0},Ke.isZero=function(){return!!this.c&&this.c[0]==0},Ke.minus=function(G,w){var W,Z,Y,ne,ee=this,ie=ee.s;if(w=(G=new Ve(G,w)).s,!ie||!w)return new Ve(NaN);if(ie!=w)return G.s=-w,ee.plus(G);var ye=ee.e/N,_e=G.e/N,ve=ee.c,Ye=G.c;if(!ye||!_e){if(!ve||!Ye)return ve?(G.s=-w,G):new Ve(Ye?ee:NaN);if(!ve[0]||!Ye[0])return Ye[0]?(G.s=-w,G):new Ve(ve[0]?ee:Ht==3?-0:0)}if(ye=P(ye),_e=P(_e),ve=ve.slice(),ie=ye-_e){for((ne=ie<0)?(ie=-ie,Y=ve):(_e=ye,Y=Ye),Y.reverse(),w=ie;w--;Y.push(0));Y.reverse()}else for(Z=(ne=(ie=ve.length)<(w=Ye.length))?ie:w,ie=w=0;w<Z;w++)if(ve[w]!=Ye[w]){ne=ve[w]<Ye[w];break}if(ne&&(Y=ve,ve=Ye,Ye=Y,G.s=-G.s),(w=(Z=Ye.length)-(W=ve.length))>0)for(;w--;ve[W++]=0);for(w=C-1;Z>ie;){if(ve[--Z]<Ye[Z]){for(W=Z;W&&!ve[--W];ve[W]=w);--ve[W],ve[Z]+=C}ve[Z]-=Ye[Z]}for(;ve[0]==0;ve.splice(0,1),--_e);return ve[0]?Ea(G,ve,_e):(G.s=Ht==3?-1:1,G.c=[G.e=0],G)},Ke.modulo=Ke.mod=function(G,w){var W,Z,Y=this;return G=new Ve(G,w),!Y.c||!G.s||G.c&&!G.c[0]?new Ve(NaN):!G.c||Y.c&&!Y.c[0]?new Ve(Y):(on==9?(Z=G.s,G.s=1,W=q(Y,G,0,3),G.s=Z,W.s*=Z):W=q(Y,G,0,on),(G=Y.minus(W.times(G))).c[0]||on!=1||(G.s=Y.s),G)},Ke.multipliedBy=Ke.times=function(G,w){var W,Z,Y,ne,ee,ie,ye,_e,ve,Ye,ht,gt,It,Qt,$t,jt=this,Ut=jt.c,nr=(G=new Ve(G,w)).c;if(!(Ut&&nr&&Ut[0]&&nr[0]))return!jt.s||!G.s||Ut&&!Ut[0]&&!nr||nr&&!nr[0]&&!Ut?G.c=G.e=G.s=null:(G.s*=jt.s,Ut&&nr?(G.c=[0],G.e=0):G.c=G.e=null),G;for(Z=P(jt.e/N)+P(G.e/N),G.s*=jt.s,(ye=Ut.length)<(Ye=nr.length)&&(It=Ut,Ut=nr,nr=It,Y=ye,ye=Ye,Ye=Y),Y=ye+Ye,It=[];Y--;It.push(0));for(Qt=C,$t=_,Y=Ye;--Y>=0;){for(W=0,ht=nr[Y]%$t,gt=nr[Y]/$t|0,ne=Y+(ee=ye);ne>Y;)W=((_e=ht*(_e=Ut[--ee]%$t)+(ie=gt*_e+(ve=Ut[ee]/$t|0)*ht)%$t*$t+It[ne]+W)/Qt|0)+(ie/$t|0)+gt*ve,It[ne--]=_e%Qt;It[ne]=W}return W?++Z:It.splice(0,1),Ea(G,It,Z)},Ke.negated=function(){var G=new Ve(this);return G.s=-G.s||null,G},Ke.plus=function(G,w){var W,Z=this,Y=Z.s;if(w=(G=new Ve(G,w)).s,!Y||!w)return new Ve(NaN);if(Y!=w)return G.s=-w,Z.minus(G);var ne=Z.e/N,ee=G.e/N,ie=Z.c,ye=G.c;if(!ne||!ee){if(!ie||!ye)return new Ve(Y/0);if(!ie[0]||!ye[0])return ye[0]?G:new Ve(ie[0]?Z:0*Y)}if(ne=P(ne),ee=P(ee),ie=ie.slice(),Y=ne-ee){for(Y>0?(ee=ne,W=ye):(Y=-Y,W=ie),W.reverse();Y--;W.push(0));W.reverse()}for((Y=ie.length)-(w=ye.length)<0&&(W=ye,ye=ie,ie=W,w=Y),Y=0;w;)Y=(ie[--w]=ie[w]+ye[w]+Y)/C|0,ie[w]=C===ie[w]?0:ie[w]%C;return Y&&(ie=[Y].concat(ie),++ee),Ea(G,ie,ee)},Ke.precision=Ke.sd=function(G,w){var W,Z,Y,ne=this;if(G!=null&&G!==!!G)return M(G,1,O),w==null?w=Ht:M(w,0,8),Bt(new Ve(ne),G,w);if(!(W=ne.c))return null;if(Z=(Y=W.length-1)*N+1,Y=W[Y]){for(;Y%10==0;Y/=10,Z--);for(Y=W[0];Y>=10;Y/=10,Z++);}return G&&ne.e+1>Z&&(Z=ne.e+1),Z},Ke.shiftedBy=function(G){return M(G,-9007199254740991,E),this.times("1e"+G)},Ke.squareRoot=Ke.sqrt=function(){var G,w,W,Z,Y,ne=this,ee=ne.c,ie=ne.s,ye=ne.e,_e=Jt+4,ve=new Ve("0.5");if(ie!==1||!ee||!ee[0])return new Ve(!ie||ie<0&&(!ee||ee[0])?NaN:ee?ne:1/0);if((ie=Math.sqrt(+pr(ne)))==0||ie==1/0?(((w=y(ee)).length+ye)%2==0&&(w+="0"),ie=Math.sqrt(+w),ye=P((ye+1)/2)-(ye<0||ye%2),W=new Ve(w=ie==1/0?"5e"+ye:(w=ie.toExponential()).slice(0,w.indexOf("e")+1)+ye)):W=new Ve(ie+""),W.c[0]){for((ie=(ye=W.e)+_e)<3&&(ie=0);;)if(Y=W,W=ve.times(Y.plus(q(ne,Y,_e,1))),y(Y.c).slice(0,ie)===(w=y(W.c)).slice(0,ie)){if(W.e<ye&&--ie,(w=w.slice(ie-3,ie+1))!="9999"&&(Z||w!="4999")){+w&&(+w.slice(1)||w.charAt(0)!="5")||(Bt(W,W.e+Jt+2,1),G=!W.times(W).eq(ne));break}if(!Z&&(Bt(Y,Y.e+Jt+2,0),Y.times(Y).eq(ne))){W=Y;break}_e+=4,ie+=4,Z=1}}return Bt(W,W.e+Jt+1,Ht,G)},Ke.toExponential=function(G,w){return G!=null&&(M(G,0,O),G++),yn(this,G,w,1)},Ke.toFixed=function(G,w){return G!=null&&(M(G,0,O),G=G+this.e+1),yn(this,G,w)},Ke.toFormat=function(G,w,W){var Z,Y=this;if(W==null)G!=null&&w&&typeof w=="object"?(W=w,w=null):G&&typeof G=="object"?(W=G,G=w=null):W=zr;else if(typeof W!="object")throw Error(v+"Argument not an object: "+W);if(Z=Y.toFixed(G,w),Y.c){var ne,ee=Z.split("."),ie=+W.groupSize,ye=+W.secondaryGroupSize,_e=W.groupSeparator||"",ve=ee[0],Ye=ee[1],ht=Y.s<0,gt=ht?ve.slice(1):ve,It=gt.length;if(ye&&(ne=ie,ie=ye,ye=ne,It-=ne),ie>0&&It>0){for(ne=It%ie||ie,ve=gt.substr(0,ne);ne<It;ne+=ie)ve+=_e+gt.substr(ne,ie);ye>0&&(ve+=_e+gt.slice(ne)),ht&&(ve="-"+ve)}Z=Ye?ve+(W.decimalSeparator||"")+((ye=+W.fractionGroupSize)?Ye.replace(new RegExp("\\d{"+ye+"}\\B","g"),"$&"+(W.fractionGroupSeparator||"")):Ye):ve}return(W.prefix||"")+Z+(W.suffix||"")},Ke.toFraction=function(G){var w,W,Z,Y,ne,ee,ie,ye,_e,ve,Ye,ht,gt=this,It=gt.c;if(G!=null&&(!(ie=new Ve(G)).isInteger()&&(ie.c||ie.s!==1)||ie.lt(Tr)))throw Error(v+"Argument "+(ie.isInteger()?"out of range: ":"not an integer: ")+pr(ie));if(!It)return new Ve(gt);for(w=new Ve(Tr),_e=W=new Ve(Tr),Z=ye=new Ve(Tr),ht=y(It),ne=w.e=ht.length-gt.e-1,w.c[0]=R[(ee=ne%N)<0?N+ee:ee],G=!G||ie.comparedTo(w)>0?ne>0?w:_e:ie,ee=Pr,Pr=1/0,ie=new Ve(ht),ye.c[0]=0;ve=q(ie,w,0,1),(Y=W.plus(ve.times(Z))).comparedTo(G)!=1;)W=Z,Z=Y,_e=ye.plus(ve.times(Y=_e)),ye=Y,w=ie.minus(ve.times(Y=w)),ie=Y;return Y=q(G.minus(W),Z,0,1),ye=ye.plus(Y.times(_e)),W=W.plus(Y.times(Z)),ye.s=_e.s=gt.s,Ye=q(_e,Z,ne*=2,Ht).minus(gt).abs().comparedTo(q(ye,W,ne,Ht).minus(gt).abs())<1?[_e,Z]:[ye,W],Pr=ee,Ye},Ke.toNumber=function(){return+pr(this)},Ke.toPrecision=function(G,w){return G!=null&&M(G,1,O),yn(this,G,w,2)},Ke.toString=function(G){var w,W=this,Z=W.s,Y=W.e;return Y===null?Z?(w="Infinity",Z<0&&(w="-"+w)):w="NaN":(G==null?w=Y<=Ir||Y>=On?V(y(W.c),Y):Q(y(W.c),Y,"0"):G===10&&Rn?w=Q(y((W=Bt(new Ve(W),Jt+Y+1,Ht)).c),W.e,"0"):(M(G,2,vr.length,"Base"),w=J(Q(y(W.c),Y,"0"),10,G,Z,!0)),Z<0&&W.c[0]&&(w="-"+w)),w},Ke.valueOf=Ke.toJSON=function(){return pr(this)},Ke._isBigNumber=!0,Ke[Symbol.toStringTag]="BigNumber",Ke[Symbol.for("nodejs.util.inspect.custom")]=Ke.valueOf,I!=null&&Ve.set(I),Ve})();const he={ROUNDING_MODE:te.ROUND_DOWN};function be(b){return new TextEncoder().encode(b)}function Ie(b){return typeof b=="string"?Ie(me(b)):new TextDecoder().decode(b)}te.config(he);const we="UNKNOWN_ERROR",Ae="INVALID_ARGUMENT";function Ne(b,I=we,q={}){const J=[];Object.keys(q).forEach((Ce=>{try{J.push(Ce+"="+JSON.stringify(q[Ce]))}catch{J.push(Ce+"="+JSON.stringify(q[Ce].toString()))}}));const re=b;J.length&&(b+=" ("+J.join(", ")+")");const oe=new Error(b);return oe.reason=re,oe.code=I,Object.keys(q).forEach((function(Ce){oe[Ce]=q[Ce]})),oe}function me(b){if(typeof b!="string")throw new Error("hexToBytes only accept strings, got: "+typeof b);if(b.substr(0,2)==="0x")return me(b.substr(2));const I=new Uint8Array(Math.ceil(b.length/2));let q=0;for(let J=0;J<b.length;J+=2){const re=parseInt(b.substr(J,2),16);if(isNaN(re))throw new Error("Cannot read hex string:"+JSON.stringify(b));I[q]=re,q++}return I}function le(b){return Array.from(b).map((I=>I.toString(16).padStart(2,"0"))).join("")}function X(b,I){if(typeof b=="string"){if(I&&I.encoding==="hex"&&typeof b=="string"){let q=b;q.length>2&&q.substr(0,2)==="0x"&&(q=q.substr(2));const J=me(q);return f.keccak256(J)}return f.keccak256(be(b))}return f.keccak256(b)}const L={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function F(b,I,q){return new Array(I-b.length+1).join(q||"0")+b}function B(b){let I="",q=0;const J=b.length;for(b.substring(0,2)==="0x"&&(q=2);q<J;q+=2){const re=parseInt(b.substr(q,2),16);I+=String.fromCharCode(re)}return I}function D(b){return rn(b)&&b.name&&b.name.indexOf("(")!==-1?b.name:b.name+"("+ue(!1,b.inputs||[]).join(",")+")"}function K(...b){const I=b.reduce(((re,oe)=>re+oe.length),0),q=new Uint8Array(I);let J=0;for(const re of b)q.set(re,J),J+=re.length;return q}function ue(b,I){const q=[];return I.forEach((function(J){if(typeof J.components=="object"){if(J.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let re="";const oe=J.type.indexOf("[");oe>=0&&(re=J.type.substring(oe));const Ce=ue(b,J.components);q.push("("+Ce.join(",")+")"+re)}else q.push(J.type)})),q}function Re(b){const I=b.indexOf("("),q=b.indexOf(")");return I!==-1&&q!==-1?b.substr(0,I):b}function Pe(b){const I=b.indexOf("("),q=b.indexOf(")");return I!==-1&&q!==-1?b.substr(I+1,q-I-1).replace(" ",""):""}function Be(b){return b==null?b:Dt(b).toNumber()}function je(b){return Dt(b).toNumber()}function ce(b){return Lr(b)?b.toString(10):""+b}function fe(b){return typeof b=="string"&&!b.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b)?"0x"+b:Le(b)}function Oe(b){if(typeof b=="string")return b.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b)?Le(b):"0x"+le(be(b));if(b instanceof Uint8Array)return"0x"+le(b);throw new Error(`toStringData: Error trying to convert ${b} (${typeof b}) to a hex string.`)}function De(b){return typeof b=="boolean"?b:Dt(b).toNumber()!==0}function Ge(b){const I=Dt(b),q=I.toString(16);return I.isLessThan(0)?"-0x"+q.substr(1):"0x"+q}function Le(b){if(Tn(b))return Ge(+b);if(Lr(b))return Ge(b);if(Sn(b)){const I=b;if(I.indexOf("-0x")===0)return Ge(I);if(I.indexOf("0x")===0)return I;if(!isFinite(I))return le(be(I))}if(b instanceof Uint8Array)return"0x"+le(b);if(nn(b)||rn(b))throw new Error("toHex can only be called with scalar values, not objects or arrays");return Ge(b)}function Rt(b){const I=b?b.toLowerCase():"ether",q=L[I];if(q===void 0)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(L,null,2));return new te(q,10)}function Dt(b){let I=b||0;return Lr(I)?I:(typeof I=="string"&&(I=I.trim()),typeof I!="string"||I.indexOf("0x")!==0&&I.indexOf("-0x")!==0?I instanceof Uint8Array?new te(le(I),16):new te(I,10):new te(I.replace("0x","").toLowerCase(),16))}function Gt(b){return new te(new Array(b).fill("1").join(""),2)}function Ot(b,I=256){const q=Dt(b).integerValue();return q.isLessThan(0)?Gt(I).plus(q).plus(1):q}function Fe(b,I){return F(b.toString(2),I,"0")[0]==="1"}function pt(b){if(typeof b!="string")throw Ne("invalid address",Ae,{arg:"address",value:b});if(b.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return b.trim().substring(0,2)!=="0x"&&(b="0x"+b),jr(b);throw Ne("invalid address",Ae,{arg:"address",value:b})}function Qe(b,I=256){if(Fe(b,I)){const q=Gt(I);return b.minus(q).minus(1)}return b}function qt(b){return/^0x[0-9a-f]{40}$/i.test(b)}function Kt(b){return!!/^(0x)?[0-9a-f]{40}$/i.test(b)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(b)&&!/^(0x)?[0-9A-F]{40}$/.test(b))||tr(b))}function tr(b){const I=b.replace("0x",""),q=X(I.toLowerCase());for(let J=0;J<40;J++)if(parseInt(q[J],16)>7&&I[J].toUpperCase()!==I[J]||parseInt(q[J],16)<=7&&I[J].toLowerCase()!==I[J])return!1;return!0}function jr(b){if(b===void 0)return"";const I=b.toLowerCase().replace("0x",""),q=X(I);let J="0x";for(let re=0;re<I.length;re++)parseInt(q[re],16)>7?J+=I[re].toUpperCase():J+=I[re];return J}function fr(b){if(!Array.isArray(b))throw new Error(`Value was not an array: ${JSON.stringify(b)}`);return b}function hn(b){return qt(b)?b:/^[0-9a-f]{40}$/.test(b)?"0x"+b:"0x"+F(Le(b).substr(2),40)}function Lr(b){return b instanceof te}function Sn(b){return typeof b=="string"||b&&b.constructor&&b.constructor.name==="String"}function rn(b){return b!==null&&!Array.isArray(b)&&typeof b=="object"}function Tn(b){return typeof b=="boolean"}function nn(b){return Array.isArray(b)}var ni,Pn;function ja(b,I){if(!b)throw new Error("jsonrpc method should be specified!");if(typeof b!="string")throw new Error(`jsonrpc must be a string, got ${typeof b}!`);return t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:b,params:I||[]}}function La(b){return Array.isArray(b)?b.every(I):I(b);function I(q){return!!q&&(q.error===void 0||q.error===null)&&q.jsonrpc==="2.0"&&q.id!==null&&"result"in q&&q.result!==void 0}}t.TransactionStatus=void 0,(ni=t.TransactionStatus||(t.TransactionStatus={})).pending="pending",ni.confirmed="confirmed",ni.failed="failed",t.TransactionType=void 0,(Pn=t.TransactionType||(t.TransactionType={})).queued="queued",Pn.dropped="dropped",Pn.replaced="replaced",Pn.pending="pending",Pn.reverted="reverted",Pn.confirmed="confirmed",t.messageId=0;function va(b){return Dt(b)}function Da(b){return b==="latest"||b==="pending"||b==="earliest"}function Dr(b){return b===void 0?"latest":Ct(b)}function Ct(b){return b==null?null:Da(b)?b:Le(b)}function Qr(b){return b.from&&(b.from=Me(b.from)),b.to&&(b.to=Me(b.to)),b.gasPrice!==void 0&&(b.gasPrice=Ge(b.gasPrice)),b.gas!==void 0&&(b.gas=Ge(b.gas)),b.value!==void 0&&(b.value=Ge(b.value)),b.nonce!==void 0&&(b.nonce=Ge(b.nonce)),b.data&&!b.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b.data)&&(b.data="0x"+b.data),b}function an(b){if(typeof b!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(b));if(b.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(b));if(b.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(b));return b}function ae(b){if(typeof b!="object")throw new Error("Did not provide transaction options");if(!b.from)throw new Error('Missing "from" in transaction options');return b.from=Me(b.from),b.to&&(b.to=Me(b.to)),b.gasPrice!==void 0&&(b.gasPrice=Ge(b.gasPrice)),b.gas!==void 0&&(b.gas=Ge(b.gas)),b.value!==void 0&&(b.value=Ge(b.value)),b.nonce!==void 0&&(b.nonce=Ge(b.nonce)),b.data&&!b.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(b.data)&&(b.data="0x"+b.data),b}function z(b){return b?(b.blockNumber!==null&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex!==null&&(b.transactionIndex=je(b.transactionIndex)),b.nonce=je(b.nonce),b.gas=je(b.gas),b.gasPrice=Dt(b.gasPrice),b.value=Dt(b.value),b):null}function $(b){return b?(b.blockNumber!==null&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex!==null&&(b.transactionIndex=je(b.transactionIndex)),b.cumulativeGasUsed=je(b.cumulativeGasUsed),b.gasUsed=je(b.gasUsed),b.logs&&nn(b.logs)&&(b.logs=b.logs.map((function(I){return Te(I)}))),b.status=je(b.status||""),b):null}function pe(b){return b?(b.gasLimit=je(b.gasLimit),b.gasUsed=je(b.gasUsed),b.size=je(b.size),b.timestamp=je(b.timestamp),b.number!==null&&(b.number=je(b.number)),b.difficulty=Dt(b.difficulty),b.totalDifficulty=Dt(b.totalDifficulty),nn(b.transactions)&&b.transactions.forEach((function(I,q){Sn(I)||(b.transactions[q]=z(I)||b.transactions[q])})),b):null}function Te(b){return b&&(b.blockNumber&&(b.blockNumber=je(b.blockNumber)),b.transactionIndex&&(b.transactionIndex=je(b.transactionIndex)),b.logIndex&&(b.logIndex=je(b.logIndex)),b)}function Me(b){if(qt(b))return b;if(Kt(b))return"0x"+b;throw new Error(`Invalid address: ${JSON.stringify(b)}`)}function Xe(b){return b}function Je(b){return b&&(b.startingBlock=je(b.startingBlock),b.currentBlock=je(b.currentBlock),b.highestBlock=je(b.highestBlock),b.knownStates&&(b.knownStates=je(b.knownStates),b.pulledStates=je(b.pulledStates)),b)}function vt(b){if(b===null)throw Ne("cannot convert null value to array",Ae,{arg:"value",value:b});if(b instanceof Uint8Array)return new Uint8Array(b);if(typeof b=="string"){const I=b.match(/^(0x)?[0-9a-fA-F]*$/);if(!I)throw Ne("invalid hexidecimal string",Ae,{arg:"value",value:b});if(I[1]!=="0x")throw Ne("hex string must have 0x prefix",Ae,{arg:"value",value:b});(b=b.substring(2)).length%2&&(b="0"+b);const q=[];for(let J=0;J<b.length;J+=2)q.push(parseInt(b.substr(J,2),16));return new Uint8Array(q)}if((function(I){if(!I||parseInt(String(I.length))!==I.length||typeof I=="string")return!1;for(let q=0;q<I.length;q++){const J=I[q];if(J<0||J>=256||parseInt(String(J))!==J)return!1}return!0})(b))return new Uint8Array(b);throw Ne("invalid arrayify value",void 0,{arg:"value",value:b,type:typeof b})}function dt(b,I,q){Object.defineProperty(b,I,{enumerable:!0,value:q,writable:!1})}const St=new te(-1),Nt=new te(0),Mt=new te(1),or=new te("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function rr(b){return(function(I,q){function J(Ce){return new Error('unexpected character "'+I[Ce]+'" at position '+Ce+' in "'+I+'"')}const re={type:"",name:"",state:{allowType:!0}};let oe=re;for(let Ce=0;Ce<I.length;Ce++){const ze=I[Ce];switch(ze){case"(":if(!oe.state.allowParams)throw J(Ce);oe.state.allowType=!1,oe.type=wr(oe.type),oe.components=[{type:"",name:"",parent:oe,state:{allowType:!0}}],oe=oe.components[0];break;case")":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=wr(oe.type);const st=oe;if(oe=oe.parent,!oe)throw J(Ce);delete st.parent,oe.state.allowParams=!1,oe.state.allowName=!0,oe.state.allowArray=!0;break;case",":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=wr(oe.type);const ct={type:"",name:"",parent:oe.parent,state:{allowType:!0}};oe.parent.components.push(ct),delete oe.parent,oe=ct;break;case" ":oe.state.allowType&&oe.type!==""&&(oe.type=wr(oe.type),delete oe.state.allowType,oe.state.allowName=!0,oe.state.allowParams=!0),oe.state.allowName&&oe.name!==""&&(oe.name==="indexed"?(oe.indexed=!0,oe.name=""):oe.state.allowName=!1);break;case"[":if(!oe.state.allowArray)throw J(Ce);oe.type+=ze,oe.state.allowArray=!1,oe.state.allowName=!1,oe.state.readArray=!0;break;case"]":if(!oe.state.readArray)throw J(Ce);oe.type+=ze,oe.state.readArray=!1,oe.state.allowArray=!0,oe.state.allowName=!0;break;default:if(oe.state.allowType)oe.type+=ze,oe.state.allowParams=!0,oe.state.allowArray=!0;else if(oe.state.allowName)oe.name+=ze,delete oe.state.allowArray;else{if(!oe.state.readArray)throw J(Ce);oe.type+=ze}}}if(oe.parent)throw new Error("unexpected eof");return delete re.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),re.type=wr(re.type),re})(b)}function wr(b){return b.match(/^uint($|[^1-9])/)?b="uint256"+b.substring(4):b.match(/^int($|[^1-9])/)&&(b="int256"+b.substring(3)),b}const Hr=new RegExp(/^bytes([0-9]*)$/),An=new RegExp(/^(u?int)([0-9]*)$/),Vn=new RegExp(/^(.*)\[([0-9]*)\]$/),ai=function(b,I){const q=b.match(An);return q&&parseInt(q[2])<=48?I.toNumber():I};class kr{constructor(I,q,J,re="",oe){this.coerceFunc=I,this.name=q,this.type=J,this.localName=re,this.dynamic=oe}}class _a extends kr{constructor(I){super(I.coerceFunc,I.name,I.type,void 0,I.dynamic),dt(this,"coder",I)}encode(I){return this.coder.encode(I)}decode(I,q){return this.coder.decode(I,q)}}class tu extends kr{constructor(I,q){super(I,"null","",q,!1)}encode(I){return vt([])}decode(I,q){if(q>I.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function Ri(b,I){return new te(b.toString(2).substr(-I),2)}class Ml extends kr{constructor(I,q,J,re){const oe=(J?"int":"uint")+8*q;super(I,oe,oe,re,!1),this.size=q,this.signed=J}encode(I){try{let q=Dt(I);if(this.signed){let re=Ri(or,8*this.size-1);if(q.gt(re))throw new Error("out-of-bounds");if(re=re.plus(Mt).multipliedBy(St),q.lt(re))throw new Error("out-of-bounds")}else if(q.lt(Nt)||q.gt(Ri(or,8*this.size)))throw new Error("out-of-bounds");q=Ri(Ot(q,8*this.size),8*this.size),this.signed&&(q=Ot(Qe(q,8*this.size),256));const J=F(Ot(q).toString(16),64);if(J.indexOf("NaN")!==-1)throw Ne("invalid number value, NaN",Ae,{arg:this.localName,coderType:this.name,value:I,v:q,twosComplement:Ot(q),twosComplement16:Ot(q).toString(16),pad:F(Ot(q).toString(16),64),size:this.size});return me(J)}catch(q){throw Ne("invalid number value",Ae,{arg:this.localName,coderType:this.name,value:I,message:q.toString()})}}decode(I,q){if(I.length<q+32)throw Ne("insufficient data for "+this.name+" type",Ae,{arg:this.localName,coderType:this.name,value:Le(I.slice(q,q+32))});const J=32-this.size;let re=new te(le(I.slice(q+J,q+32)),16);return re=this.signed?Qe(re,8*this.size):Ri(re,8*this.size),{consumed:32,value:this.coerceFunc(this.name,re)}}}const Hn=new Ml((function(b,I){return I}),32,!1,"none");class sr extends kr{constructor(I,q,J){const re="bytes"+q;super(I,re,re,J,!1),this.length=q}encode(I){const q=new Uint8Array(32);try{if(typeof I=="string"&&I.length%2!=0)throw new Error("hex string cannot be odd-length");const J=vt(I);if(J.length>this.length)throw new Error("incorrect data length");q.set(J)}catch(J){throw Ne("invalid "+this.name+" value. Use hex strings or Uint8Array",Ae,{arg:this.localName,coderType:this.name,value:J.value||I,details:J.message})}return q}decode(I,q){if(I.length<q+32)throw Ne("insufficient data for "+this.name+" type",Ae,{arg:this.localName,coderType:this.name,value:Le(I.slice(q,q+32))});return{consumed:32,value:this.coerceFunc(this.name,I.slice(q,q+this.length))}}}function jl(b){const I=32*Math.ceil(b.length/32),q=new Uint8Array(I-b.length);return K(Hn.encode(b.length),b,q)}function rs(b,I,q){if(b.length<I+32)throw Ne("insufficient data for dynamicBytes length",Ae,{arg:q,coderType:"dynamicBytes",value:Le(b.slice(I,I+32))});let J=Hn.decode(b,I).value;try{J=J.toNumber()}catch(re){throw re("dynamic bytes count too large",Ae,{arg:q,coderType:"dynamicBytes",value:J.toString()})}if(b.length<I+32+J)throw Ne("insufficient data for dynamicBytes type",Ae,{arg:q,coderType:"dynamicBytes",value:Le(b.slice(I,I+32+J))});return{consumed:32+32*Math.ceil(J/32),value:b.slice(I+32,I+32+J)}}function Ci(b){return 32*Math.ceil(b/32)}function Mi(b,I){if(!Array.isArray(I)){if(!I||typeof I!="object")throw Ne("invalid tuple value",Ae,{coderType:"tuple",value:I});{const st=[];b.forEach((function(ct){st.push(I[ct.localName])})),I=st}}if(b.length!==I.length)throw Ne("types/value length mismatch",Ae,{coderType:"tuple",value:I});const q=[];b.forEach((function(st,ct){q.push({dynamic:st.dynamic,value:st.encode(I[ct])})}));let J=0,re=0;q.forEach((function(st){st.dynamic?(J+=32,re+=Ci(st.value.length)):J+=Ci(st.value.length)}));let oe=0,Ce=J;const ze=new Uint8Array(J+re);return q.forEach((function(st){st.dynamic?(ze.set(Hn.encode(Ce),oe),oe+=32,ze.set(st.value,Ce),Ce+=Ci(st.value.length)):(ze.set(st.value,oe),oe+=Ci(st.value.length))})),ze}class Af extends Array{}class Ll extends kr{constructor(I,q,J,re){super(I,"array",q.type+"["+(J>=0?J:"")+"]",re,J===-1||q.dynamic),this.coder=q,this.length=J}encode(I){if(!Array.isArray(I))throw Ne("expected array value",Ae,{arg:this.localName,coderType:"array",value:I});let q=this.length,J=new Uint8Array(0);q===-1&&(q=I.length,J=Hn.encode(q)),(function(oe,Ce,ze){if(ze||(ze=""),oe<Ce)throw Ne("missing argument"+ze,"MISSING_ARGUMENT",{count:oe,expectedCount:Ce});if(oe>Ce)throw Ne("too many arguments"+ze,"UNEXPECTED_ARGUMENT",{count:oe,expectedCount:Ce})})(q,I.length,"in coder array"+(this.localName?" "+this.localName:""));const re=[];for(let oe=0;oe<I.length;oe++)re.push(this.coder);return K(J,Mi(re,I))}decode(I,q){let J=0,re=this.length;if(re===-1){let ze;try{ze=Hn.decode(I,q)}catch(st){throw Ne("insufficient data for dynamic array length",Ae,{arg:this.localName,coderType:"array",value:st.value})}try{re=ze.value.toNumber()}catch{throw Ne("array count too large",Ae,{arg:this.localName,coderType:"array",value:ze.value.toString()})}J+=ze.consumed,q+=ze.consumed}const oe=[];for(let ze=0;ze<re;ze++)oe.push(new _a(this.coder));const Ce=(function(ze,st,ct){const gr=ct;let Xt=0;const Ke=[];return ze.forEach((function(Tr){let Jt;if(Tr.dynamic){const Ht=Hn.decode(st,ct);Jt=Tr.decode(st,gr+Ht.value.toNumber()),Jt.consumed=Ht.consumed}else Jt=Tr.decode(st,ct);Jt.value!==void 0&&Ke.push(Jt.value),ct+=Jt.consumed,Xt+=Jt.consumed})),{value:Ke,consumed:Xt}})(oe,I,q);return Ce.consumed+=J,Ce.value=this.coerceFunc(this.type,Ce.value),Ce}}class ii extends kr{constructor(I,q,J){let re=!1;const oe=[];q.forEach((function(Ce){Ce.dynamic&&(re=!0),oe.push(Ce.type)})),super(I,"tuple","tuple("+oe.join(",")+")",J,re),this.coders=q}encode(I){return Mi(this.coders,I)}decode(I,q){const J=(function(re,oe,Ce){const ze=Ce;let st=0;const ct=new Af;return re.forEach((function(gr){let Xt;if(gr.dynamic){const Ke=Hn.decode(oe,Ce);Xt=gr.decode(oe,ze+Ke.value.toNumber()),Xt.consumed=Ke.consumed}else Xt=gr.decode(oe,Ce);Xt.value!==void 0&&ct.push(Xt.value),Ce+=Xt.consumed,st+=Xt.consumed})),re.forEach((function(gr,Xt){let Ke=gr.localName;Ke&&(Ke==="length"&&(Ke="_length"),ct[Ke]!==null&&ct[Ke]!==void 0||(ct[Ke]=ct[Xt]))})),{value:ct,consumed:st}})(this.coders,I,q);return J.value=this.coerceFunc(this.type,J.value),J}}const Nn={address:class extends kr{constructor(b,I){super(b,"address","address",I,!1)}encode(b){const I=new Uint8Array(32),q=b.trim();if(!Kt(q))throw Ne("invalid address format",Ae,{arg:this.localName,coderType:"address",value:b});try{I.set(me(Me(q)),12)}catch(J){throw Ne(`invalid address (${J.message})`,Ae,{arg:this.localName,coderType:"address",value:b})}return I}decode(b,I){if(b.length<I+32)throw Ne("insufficuent data for address type",Ae,{arg:this.localName,coderType:"address",value:Le(b.slice(I,I+32)),missingBytes:I+32-b.length});return{consumed:32,value:this.coerceFunc("address",pt(Le(b.slice(I+12,I+32))))}}},bool:class extends kr{constructor(b,I){super(b,"bool","bool",I,!1)}encode(b){return Hn.encode(b?1:0)}decode(b,I){try{const q=Hn.decode(b,I);return{consumed:q.consumed,value:this.coerceFunc("bool",!q.value.isZero())}}catch(q){throw q.reason==="insufficient data for uint256 type"?Ne("insufficient data for boolean type",Ae,{arg:this.localName,coderType:"boolean",value:q.value}):q}}},string:class extends kr{constructor(b,I){super(b,"string","string",I,!0)}encode(b){if(typeof b!="string")throw Ne("invalid string value",Ae,{arg:this.localName,coderType:"string",value:b});return jl(be(b))}decode(b,I){const q=rs(b,I,this.localName);return q.value=this.coerceFunc("string",Ie(q.value)),q}},bytes:class extends kr{constructor(b,I){super(b,"bytes","bytes",I,!0)}encode(b){try{return jl(vt(b))}catch(I){throw I("invalid bytes value",Ae,{arg:this.localName,coderType:"bytes",value:I.value})}}decode(b,I){const q=rs(b,I,this.localName);return q.value=this.coerceFunc("bytes",q.value),q}},function:class extends sr{constructor(b,I){super(b,24,I)}}};function ns(b,I){const q=Nn[I.type];if(q)return new q(b,I.name);let J=I.type.match(An);if(J){const re=parseInt(J[2]||"256");if(re===0||re>256||re%8!=0)throw Ne("invalid "+J[1]+" bit length",Ae,{arg:"param",value:I});return new Ml(b,re/8,J[1]==="int",I.name)}if(J=I.type.match(Hr),J){const re=parseInt(J[1]);if(re===0||re>32)throw Ne("invalid bytes length",Ae,{arg:"param",value:I});return new sr(b,re,I.name)}if(J=I.type.match(Vn),J){const re=Object.assign({},I),oe=parseInt(J[2]||"-1");return re.type=J[1],new Ll(b,ns(b,re),oe,I.name)}if(I.type.substring(0,5)==="tuple")return(function(re,oe,Ce){oe||(oe=[]);const ze=oe.map((st=>ns(re,st)));return new ii(re,ze,Ce)})(b,I.components,I.name);if(I.type==="")return new tu(b,I.name);throw Ne("invalid type",Ae,{arg:"type",value:I.type,fullType:I})}class xr{constructor(I){(function(q,J){if(!(q instanceof J))throw Ne("missing new","MISSING_NEW",{name:J.name})})(this,xr),I||(I=ai),dt(this,"coerceFunc",I)}encode(I,q){if(I.length!==q.length)throw Ne("types/values length mismatch",Ae,{count:{types:I.length,values:q.length},value:{types:I,values:q}});const J=I.map((re=>typeof re=="string"?rr(re):re)).map((re=>ns(this.coerceFunc,re)));return new ii(this.coerceFunc,J,"_").encode(q)}decode(I,q){const J=I.map((re=>typeof re=="string"?rr(re):re)).map((re=>ns(this.coerceFunc,re)));return new ii(this.coerceFunc,J,"_").decode(q,0).value}}const Dl=new xr;var kl,nt;function tt(b,I,q,J){var re,oe=arguments.length,Ce=oe<3?I:J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ce=Reflect.decorate(b,I,q,J);else for(var ze=b.length-1;ze>=0;ze--)(re=b[ze])&&(Ce=(oe<3?re(Ce):oe>3?re(I,q,Ce):re(I,q))||Ce);return oe>3&&Ce&&Object.defineProperty(I,q,Ce),Ce}function rt(b,I){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(b,I)}t.coder=void 0,(kl=t.coder||(t.coder={})).encodeParams=function(b,I){return le(Dl.encode(b,I))},kl.decodeParams=function(b,I){if(b.length>0&&(!I||I==="0x"||I==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return Dl.decode(b,me("0x"+I.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class yt{constructor(I){this.callName=I.callName,this.params=I.params||0,this.inputFormatter=I.inputFormatter||null,this.outputFormatter=I.outputFormatter}validateArgs(I){if(I.length!==this.params)throw q=this.callName,J=I.length,re=this.params,new Error(`Invalid number of input parameters to RPC method "${q}" given: ${J}, expected: ${re}`);var q,J,re}formatInput(I){return this.inputFormatter?this.inputFormatter.map((function(q,J){return q?q(I[J]):I[J]})):I}formatOutput(I){return I!==null?this.outputFormatter(I):null}toPayload(I){const q=this.formatInput(I);return this.validateArgs(q),{method:this.callName,params:q}}async execute(I,...q){const J=this.toPayload(q);if(!I)throw new Error("Missing RequestManager in method#exec");const re=await I.sendAsync(J);return this.formatOutput(re)}}class Sr{constructor(I){this.getter=I.getter,this.outputFormatter=I.outputFormatter}formatOutput(I){return this.outputFormatter(I)}async execute(I,...q){const J=await I.sendAsync({method:this.getter,params:[]});return this.formatOutput(J)}}function ql(b){return new Promise((I=>setTimeout(I,b)))}t.eth=void 0,(nt=t.eth||(t.eth={})).eth_getBalance=new yt({callName:"eth_getBalance",params:2,inputFormatter:[Me,Dr],outputFormatter:va}),nt.eth_getStorageAt=new yt({callName:"eth_getStorageAt",params:3,inputFormatter:[Me,Le,Dr],outputFormatter:fe}),nt.eth_getCode=new yt({callName:"eth_getCode",params:2,inputFormatter:[Me,Dr],outputFormatter:fe}),nt.eth_getBlockByHash=new yt({callName:"eth_getBlockByHash",params:2,inputFormatter:[Ct,function(b){return!!b}],outputFormatter:pe}),nt.eth_getBlockByNumber=new yt({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Ct,function(b){return!!b}],outputFormatter:pe}),nt.eth_getUncleByBlockHashAndIndex=new yt({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:pe}),nt.eth_getUncleByBlockNumberAndIndex=new yt({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:pe}),nt.eth_getBlockTransactionCountByHash=new yt({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getBlockTransactionCountByNumber=new yt({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getUncleCountByBlockHash=new yt({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getUncleCountByBlockNumber=new yt({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Ct],outputFormatter:je}),nt.eth_getTransactionByHash=new yt({callName:"eth_getTransactionByHash",params:1,inputFormatter:[an],outputFormatter:z}),nt.eth_getTransactionByBlockHashAndIndex=new yt({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:z}),nt.eth_getTransactionByBlockNumberAndIndex=new yt({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Ct,Le],outputFormatter:z}),nt.eth_getTransactionReceipt=new yt({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[an],outputFormatter:$}),nt.eth_getTransactionCount=new yt({callName:"eth_getTransactionCount",params:2,inputFormatter:[Me,Dr],outputFormatter:je}),nt.eth_sendRawTransaction=new yt({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:fe}),nt.web3_sha3=new yt({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:fe}),nt.eth_sendTransaction=new yt({callName:"eth_sendTransaction",params:1,inputFormatter:[ae],outputFormatter:fe}),nt.eth_sign=new yt({callName:"eth_sign",params:2,inputFormatter:[Me,null],outputFormatter:fe}),nt.eth_call=new yt({callName:"eth_call",params:2,inputFormatter:[Qr,Dr],outputFormatter:fe}),nt.eth_estimateGas=new yt({callName:"eth_estimateGas",params:1,inputFormatter:[Qr],outputFormatter:je}),nt.eth_submitWork=new yt({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:De}),nt.eth_getWork=new yt({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:fr}),nt.eth_coinbase=new Sr({getter:"eth_coinbase",outputFormatter:hn}),nt.eth_mining=new Sr({getter:"eth_mining",outputFormatter:De}),nt.eth_hashrate=new Sr({getter:"eth_hashrate",outputFormatter:je}),nt.eth_syncing=new Sr({getter:"eth_syncing",outputFormatter:Je}),nt.eth_gasPrice=new Sr({getter:"eth_gasPrice",outputFormatter:va}),nt.eth_accounts=new Sr({getter:"eth_accounts",outputFormatter:fr}),nt.eth_blockNumber=new Sr({getter:"eth_blockNumber",outputFormatter:je}),nt.eth_protocolVersion=new Sr({getter:"eth_protocolVersion",outputFormatter:je}),nt.web3_clientVersion=new Sr({getter:"web3_clientVersion",outputFormatter:ce}),nt.net_version=new Sr({getter:"net_version",outputFormatter:ce}),nt.shh_version=new yt({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:je}),nt.shh_post=new yt({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:De}),nt.personal_newAccount=new yt({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:hn}),nt.personal_importRawKey=new yt({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:hn}),nt.personal_sign=new yt({callName:"personal_sign",params:3,inputFormatter:[Oe,Me,null],outputFormatter:fe}),nt.personal_ecRecover=new yt({callName:"personal_ecRecover",params:2,inputFormatter:[Oe,null],outputFormatter:hn}),nt.personal_unlockAccount=new yt({callName:"personal_unlockAccount",params:3,inputFormatter:[Me,null,Be],outputFormatter:De}),nt.personal_sendTransaction=new yt({callName:"personal_sendTransaction",params:2,inputFormatter:[ae,null],outputFormatter:fe}),nt.personal_lockAccount=new yt({callName:"personal_lockAccount",params:1,inputFormatter:[Me],outputFormatter:De}),nt.personal_listAccounts=new Sr({getter:"personal_listAccounts",outputFormatter:fr}),nt.net_listening=new Sr({getter:"net_listening",outputFormatter:De}),nt.net_peerCount=new Sr({getter:"net_peerCount",outputFormatter:je}),nt.eth_newFilter=new yt({callName:"eth_newFilter",params:1,inputFormatter:[Xe],outputFormatter:Le}),nt.eth_getLogs=new yt({callName:"eth_getLogs",params:1,inputFormatter:[fr],outputFormatter:fr}),nt.eth_newBlockFilter=new yt({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Le}),nt.eth_newPendingTransactionFilter=new yt({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Le}),nt.eth_uninstallFilter=new yt({callName:"eth_uninstallFilter",params:1,inputFormatter:[Le],outputFormatter:De}),nt.eth_getFilterLogs=new yt({callName:"eth_getFilterLogs",params:1,inputFormatter:[Le],outputFormatter:fr}),nt.eth_getFilterChanges=new yt({callName:"eth_getFilterChanges",params:1,inputFormatter:[Le],outputFormatter:fr}),nt.eth_submitHashrate=new yt({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:De}),nt.shh_newIdentity=new yt({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:fe}),nt.shh_hasIdentity=new yt({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_newGroup=new yt({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:fe}),nt.shh_addToGroup=new yt({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_newFilter=new yt({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Le}),nt.shh_uninstallFilter=new yt({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:De}),nt.shh_getLogs=new yt({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getFilterMessages=new yt({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getFilterChanges=new yt({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:fr}),nt.shh_getMessages=new yt({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:fr});function ut(b,I){const q=t.eth[I];if(!q)throw new Error(`Could not find the method/property named ${I.toString()}`);Object.defineProperty(b,I,{value:function(...J){return q.execute(this,...J)}})}class et{constructor(I){this.provider=I,this.requests=new Map}async sendAsync(I){const q=await this.provider;if(!q)throw new Error("Provider not set or invalid");const J=ja(I.method,I.params),re=u();return this.requests.set(J.id,re),q.sendAsync(J,((oe,Ce)=>{this.requests.delete(J.id),oe?re.reject(oe):La(Ce)?re.resolve(Ce.result):re.reject((function(ze){const st=ze&&ze.error&&ze.error.message?ze.error.message:"Invalid JSON RPC response: "+JSON.stringify(ze);return new Error(st)})(Ce))})),re}setProvider(I){this.provider=I}async getConfirmedTransaction(I){const q=await this.waitForCompletion(I);if(this.isFailure(q))throw new Error(`Transaction "${I}" failed`);return q}async waitForCompletion(I,q){const J=an(I);if(await this.isTxDropped(J,q)){const re=await this.getTransactionAndReceipt(J);return Object.assign(Object.assign({},re),{status:t.TransactionStatus.failed})}for(;;){const re=await this.getTransactionAndReceipt(J);if(!this.isPending(re)&&re.receipt)return Object.assign(Object.assign({},re),{status:this.isFailure(re)?t.TransactionStatus.failed:t.TransactionStatus.confirmed});await ql(2e3)}}async getTransaction(I){let q,J=null;const re=an(I);try{const Ce=(await this.eth_accounts())[0];Ce&&(J=await this.eth_getTransactionCount(Ce,"latest"))}catch{J=null}try{if(q=await this.eth_getTransactionByHash(re),q===null)return null}catch{return null}if(q.blockNumber===null){if(J!==null){if(q.nonce<J)return{hash:re,type:t.TransactionType.replaced,nonce:q.nonce};if(q.nonce>J)return{hash:re,type:t.TransactionType.queued,nonce:q.nonce}}return Object.assign({type:t.TransactionType.pending},q)}let oe;try{if(oe=await this.eth_getTransactionReceipt(re),oe===null||oe.status===0)return Object.assign({type:t.TransactionType.reverted},q)}catch{return null}return Object.assign(Object.assign({type:t.TransactionType.confirmed},q),{receipt:oe})}async isTxDropped(I,q=15){let J=q;for(;J>0;){if(await this.getTransactionAndReceipt(I)!==null)return!1;J-=1,await ql(2e3)}return!0}async getTransactionAndReceipt(I){I=an(I);const[q,J]=await Promise.all([this.eth_getTransactionByHash(I),this.eth_getTransactionReceipt(I)]);return Object.assign(Object.assign({},q),{receipt:J})}isPending(I){return I&&I.blockNumber===null}isFailure(I){return I&&(!I.receipt||I.receipt.status===0)}}tt([ut,rt("design:type",Function)],et.prototype,"web3_clientVersion",void 0),tt([ut,rt("design:type",Function)],et.prototype,"web3_sha3",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_version",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_peerCount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"net_listening",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_protocolVersion",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_syncing",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_coinbase",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_mining",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_hashrate",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_gasPrice",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_accounts",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_blockNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBalance",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getStorageAt",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionCount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockTransactionCountByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockTransactionCountByNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleCountByBlockHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleCountByBlockNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getCode",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sign",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sendTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_sendRawTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_call",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_estimateGas",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getBlockByNumber",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByHash",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getTransactionReceipt",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleByBlockHashAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newBlockFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_newPendingTransactionFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_uninstallFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getFilterChanges",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getFilterLogs",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getLogs",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_getWork",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_submitWork",void 0),tt([ut,rt("design:type",Function)],et.prototype,"eth_submitHashrate",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_post",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_version",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newIdentity",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_hasIdentity",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newGroup",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_addToGroup",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_newFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_uninstallFilter",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_getFilterChanges",void 0),tt([ut,rt("design:type",Function)],et.prototype,"shh_getMessages",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_unlockAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_newAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_listAccounts",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_lockAccount",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_importRawKey",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_sendTransaction",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_sign",void 0),tt([ut,rt("design:type",Function)],et.prototype,"personal_ecRecover",void 0);class ru{constructor(I){this.json=I,this._inputTypes=I.inputs||[],this._outputTypes=I.outputs||[],this._constant=!!I.constant,this._payable=!!I.payable||I.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in I&&!I.constant||I.stateMutability==="nonpayable",this._name=D(I)}extractDefaultBlock(I){return I.length>this._inputTypes.length&&!rn(I[I.length-1])&&Dr(I.pop())||"latest"}validateArgs(I){if(I.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const q=I.filter((function(oe){return!(rn(oe)===!0&&nn(oe)===!1&&Lr(oe)===!1&&!(oe instanceof Uint8Array))}));if(q.length!==this._inputTypes.length)throw J=q.length,re=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${J}, expected: ${re}`);var J,re}toPayload(I){let q={to:void 0,data:void 0,value:void 0,from:void 0};I.length>this._inputTypes.length&&rn(I[I.length-1])&&(q=I.pop()),this.validateArgs(I);const J=this.signature();let re=t.coder.encodeParams(this._inputTypes,I);return re.indexOf("0x")===0&&(re=re.substr(2)),q.data="0x"+J+re,q}signature(){return X(this._name).slice(0,8)}unpackOutput(I){if(!I)return;const q=I.length>=2?I.slice(2):I,J=t.coder.decodeParams(this._outputTypes,q);return J.length===1?J[0]:J}async execute(I,q,...J){if(!I)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const re=this.toPayload(J);if(re.to=q,re.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");if(!re.from)throw new Error('Missing "from" in transaction options');return await I.eth_sendTransaction(re)}{const re=this.extractDefaultBlock(J),oe=this.toPayload(J);oe.to=q;const Ce=await I.eth_call(oe,re);return this.unpackOutput(Ce)}}estimateGas(I,q,...J){if(!(I instanceof et))throw new Error("estimateGas needs to receive a RequestManager as first argument");const re=this.toPayload(J);return re.to=q,I.eth_estimateGas(re)}displayName(){return Re(this._name)}typeName(){return Pe(this._name)||"void"}attachToContract(I){const q=this.displayName(),J=Object.assign(((...re)=>this.execute(I.requestManager,I.address,...re)),{estimateGas:this.estimateGas.bind(this,I.requestManager,I.address),toPayload:(...re)=>this.toPayload(re),toRPCMessage:(...re)=>{const oe=this.extractDefaultBlock(re),Ce=this.toPayload(re);return Ce.to=I.address,{method:"eth_call",params:[Ce,oe]}},unpackOutput:re=>this.unpackOutput(re)});I[q]||(I[q]=J),I[q][this.typeName()]=J}}function as(b){if(b==null)return null;const I=String(b).toString();return I.indexOf("0x")===0?I:le(be(I))}class ka{constructor(I){this.requestManager=I,this.isStarted=!1,this.isDisposed=!1,this.formatter=q=>q,this.filterId=u(),this.callbacks=[],this.stopSemaphore=u()}async watch(I){if(this.isDisposed)throw new Error("The filter was disposed");I&&(this.callbacks.push(I),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const I=await this.getNewFilter();if(!I)throw new Error("Could not create a filter, response: "+JSON.stringify(I));this.filterId.resolve(I)}catch(I){throw I}this.stopSemaphore=u(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const I=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${I}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const q=await this.getChanges();q&&this.callbacks.forEach((J=>{this.formatter?q.forEach((re=>{J(this.formatter(re))})):q.forEach((re=>J(re)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=u(),setTimeout((I=()=>this.poll(),function(){I().catch((q=>console.error(q)))}),500))}else this.stopSemaphore.resolve(1);var I}}class ji extends ka{constructor(I,q,J=(re=>re)){super(I),this.requestManager=I,this.options=q,this.formatter=J,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(re){return as(re)})),this.options={topics:this.options.topics,address:this.options.address?this.options.address:void 0,fromBlock:typeof this.options.fromBlock=="number"||typeof this.options.fromBlock=="string"?Ct(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Ct(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const I=await this.filterId;return this.requestManager.eth_getFilterLogs(I)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const I=await this.filterId;return this.requestManager.eth_getFilterChanges(I)}async uninstall(){const I=await this.filterId;return this.requestManager.eth_uninstallFilter(I)}}class Li{constructor(I,q,J){this.requestManager=I,this.address=J,this._anonymous=!1,this._params=q.inputs||[],this._name=D(q),this._anonymous=q.anonymous||!1}types(I){return this._params.filter((function(q){return q.indexed===I}))}displayName(){return Re(this._name)}typeName(){return Pe(this._name)||"void"}signature(){return X(this._name)}encode(I={},q={}){const J={topics:[],address:this.address};q.fromBlock!==void 0&&(J.fromBlock=Ct(q.fromBlock)||void 0),q.toBlock!==void 0&&(J.toBlock=Ct(q.toBlock)||void 0),J.topics=J.topics||[],this._anonymous||J.topics.push("0x"+this.signature());const re=this._params.filter((function(oe){return oe.indexed===!0})).map((function(oe){const Ce=I[oe.name];return Ce==null?null:nn(Ce)?Ce.map((function(ze){return"0x"+t.coder.encodeParams([oe],[ze])})):"0x"+t.coder.encodeParams([oe],[Ce])}));return J.topics=J.topics.concat(re),J}decode(I){I.data=I.data||"",I.topics=I.topics||[];const q=(this._anonymous?I.topics:I.topics.slice(1)).map((function(ze){return ze.slice(2)})).join(""),J=t.coder.decodeParams(this.types(!0),q),re=I.data.slice(2),oe=t.coder.decodeParams(this.types(!1),re),Ce=this._params.reduce((function(ze,st){return ze[st.name]=st.indexed?J.shift():oe.shift(),ze}),{});return Object.assign(Object.assign({},Te(I)),{event:this.displayName(),address:I.address,args:Ce})}async execute(I,q){const J=this.encode(I,q),re=this.decode.bind(this);return new ji(this.requestManager,J,re)}attachToContract(I){const q=this.execute.bind(this),J=this.displayName();I.events[J]||(I.events[J]=q),I.events[J][this.typeName()]=this.execute.bind(this,I)}}class Yt{constructor(I,q,J){this._requestManager=I,this._json=q,this._address=J}encode(I={}){const q={address:this._address};return I.fromBlock!==void 0&&(q.fromBlock=Ct(I.fromBlock)||void 0),I.toBlock!==void 0&&(q.toBlock=Ct(I.toBlock)||void 0),q}decode(I){I.data=I.data||"";const q=nn(I.topics)&&Sn(I.topics[0])?I.topics[0].slice(2):"",J=this._json.filter((function(re){return q===X(D(re))}))[0];return J?new Li(this._requestManager,J,this._address).decode(I):Te(I)}async execute(I){const q=this.encode(I),J=this.decode.bind(this);return new ji(this._requestManager,q,J)}getAllEventsFunction(){return this.execute.bind(this)}}class nu{constructor(I,q,J){var re;this.requestManager=I,this.abi=q,this.address=J,this.events={},this.transactionHash=null,this.address=J,this.abi=q,(re=this).abi.filter((function(oe){return oe.type==="function"})).map((function(oe){return new ru(oe)})).forEach((function(oe){oe.attachToContract(re)})),this.allEvents=(function(oe){const Ce=oe.abi.filter((function(st){return st.type==="event"})),ze=new Yt(oe.requestManager,Ce,oe.address);return Ce.map((function(st){return new Li(oe.requestManager,st,oe.address)})).forEach((function(st){st.attachToContract(oe)})),ze.getAllEventsFunction()})(this)}}t.AbstractFilter=ka,t.BigNumber=te,t.Contract=nu,t.ContractFactory=class{constructor(b,I){this.requestManager=b,this.abi=I}async deploy(...b){let I;const q=b[b.length-1];if(rn(q)&&!nn(q)&&(I=b.pop()),!I)throw new Error("Missing options object");if(!I.data||typeof I.data!="string")throw new Error("Invalid options.data");if(je(I.value)>0&&!(this.abi.filter((function(ct){return ct.type==="constructor"&&ct.inputs.length===b.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const J=(re=this.abi,oe=b,re.filter((function(ct){return ct.type==="constructor"&&ct.inputs&&ct.inputs.length===oe.length})).map((function(ct){return ct.inputs||[]})).map((function(ct){return t.coder.encodeParams(ct,oe)}))[0]||"");var re,oe;I.data+=J,I.gas||(I.gas=await this.requestManager.eth_estimateGas(I));const Ce=await this.requestManager.eth_sendTransaction(I);if(!Ce)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const ze=await(async function(ct,gr){const Xt=u();let Ke=0;const Tr=()=>{Ke++,Ke>50?Xt.reject(new Error("Contract transaction couldn't be found after 50 blocks")):ct.eth_getTransactionReceipt(gr).then((Ir=>{Ir&&Ir.blockHash?Xt.resolve(Ir):setTimeout(Tr,1e3)}),(Ir=>Xt.reject(Ir)))};Tr();const Jt=await Xt,Ht=await ct.eth_getCode(Jt.contractAddress,"latest");if(Ht&&Ht.length>3)return Jt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:Ht,receipt:Jt})})(this.requestManager,Ce),st=await this.at(ze);return st.transactionHash=Ce,st}async at(b){if(!Kt(b))throw new TypeError(`Invalid address ${JSON.stringify(b)}`);return new nu(this.requestManager,this.abi,b)}},t.EthBlockFilter=class extends ji{constructor(b){super(b,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},t.EthFilter=ji,t.EthPendingTransactionFilter=class extends ji{constructor(b){super(b,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},t.HTTPProvider=class{constructor(b,I={}){this.host=b,this.options=I,this.debug=!1,this.host=b||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(b,I){try{let q=null;q=b instanceof Array?b.map((oe=>n(oe))):n(b);const J=this.options.fetch||globalThis.fetch;if(J===void 0)throw new Error("There is no global fetch object nor it was provided. Please install and import isomorphic-fetch");const re={body:JSON.stringify(q),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+re.body),J(this.host,re).then((async oe=>{if(oe.ok){const Ce=await oe.json();this.debug&&console.log("RECV << "+JSON.stringify(Ce)),Ce.error?I(Object.assign(new Error(Ce.error.json||Ce.error),Ce.error)):I(null,Ce)}else this.debug&&console.log("ERR << "+JSON.stringify(oe)),I(new Error("External error. response code: "+oe.status))}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),I(oe)}))}catch(q){this.debug&&console.log("ERR << "+JSON.stringify(q)),I(q)}}},t.Method=yt,t.Property=Sr,t.RequestManager=et,t.SHHFilter=class extends ka{constructor(b,I){super(b),this.requestManager=b,this.options=I,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(q){return as(q)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const b=await this.filterId;return this.requestManager.shh_getMessages(b)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const b=await this.filterId;return this.requestManager.shh_getFilterChanges(b)}async uninstall(){const b=await this.filterId;return this.requestManager.shh_uninstallFilter(b)}},t.SolidityEvent=Li,t.SolidityFunction=ru,t.WebSocketProvider=class{constructor(b,I={}){this.url=b,this.options=I,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const b=this.connection;this.timeout(new Error("Provider disposed.")),b.then((I=>I.close())).catch((I=>{this.debug&&console.error(I)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(b,I){const q=[];let J;if(b instanceof Array)J=Promise.all(b.map((re=>{const oe=u();try{const Ce=n(re);q.push(Ce),this.responseCallbacks.set(Ce.id,oe)}catch(Ce){oe.reject(Ce)}return oe})));else{const re=u();try{const oe=n(b);q.push(oe),this.responseCallbacks.set(oe.id,re)}catch(oe){re.reject(oe)}J=re}J.then((re=>I(null,re)),(re=>I(re))),this.connection.then((re=>{q.forEach((oe=>{const Ce=JSON.stringify(oe);this.debug&&console.log("SEND >> "+Ce),re.send(Ce)}))}),(re=>{I(re)}))}parseResponse(b){const I=[];return b.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((q=>{let J=q;this.lastChunk&&(J=this.lastChunk+J);let re=null;try{re=JSON.parse(J)}catch{return this.lastChunk=J,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",re&&I.push(re)})),I}processMessage(b){if("id"in b){const I=b.id,q=this.responseCallbacks.get(I);if(!q)return void console.error("Error: Received a response for an unknown request",b);this.responseCallbacks.delete(I),b.error!==void 0&&b.error!==null?q.reject(Object.assign(new Error(b.error.message||b.error),b.error)):"result"in b&&q.resolve(b)}else this.notificationCallbacks.forEach((I=>I(null,b)))}timeout(b){this.connection&&this.connection.isPending||(this.connection=u());const I=b||new Error("Connection timeout");this.responseCallbacks.forEach((q=>q.reject(I))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((q=>q.close())).catch((q=>{this.debug&&console.error(q)})),this.connection&&this.connection.isPending||(this.connection=u()),this.lastChunk="";const b=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!b)throw new Error("Please provide a WebSocketConstructor");const I=new b(this.url,this.options.protocol);I.onopen=()=>{this.connection.resolve(I)},I.onerror=q=>{const J=new Error("Error in web socket");J.data=q,this.timeout(J)},I.onclose=q=>{this.timeout(new Error(`Connection closed (${q&&q.reason||"Unknown reason"})`))},I.onmessage=q=>{const J=typeof q.data=="string"?q.data:"";this.debug&&console.log("RECV << "+q.data),this.parseResponse(J).forEach((re=>{re instanceof Array?re.forEach((oe=>this.processMessage(oe))):this.processMessage(re)}))}}},t.bytesToHex=le,t.bytesToUtf8String=Ie,t.concatBytes=K,t.default=et,t.extractDisplayName=Re,t.extractTypeName=Pe,t.fromAscii=function(b,I=0){let q="";for(let J=0;J<b.length;J++){const re=b.charCodeAt(J).toString(16);q+=re.length<2?"0"+re:re}return"0x"+q.padEnd(I,"0")},t.fromDecimal=Ge,t.fromTwosComplement=Qe,t.fromWei=function(b,I){const q=Dt(b).dividedBy(Rt(I));return Lr(b)?q:q.toString(10)},t.getAddress=pt,t.getValueOfUnit=Rt,t.hexToBytes=me,t.inputAddressFormatter=Me,t.inputBlockNumberFormatter=Ct,t.inputCallFormatter=Qr,t.inputDefaultBlockNumberFormatter=Dr,t.inputFilterOptions=Xe,t.inputPostFormatter=function(b){return b?(b.ttl=Ge(b.ttl),b.workToProve=Ge(b.workToProve),b.priority=Ge(b.priority),nn(b.topics)||(b.topics=b.topics?[b.topics]:[]),b.topics=b.topics.map((function(I){return I.indexOf("0x")===0?I:"0x"+le(be(I))})),b):null},t.inputTransactionFormatter=ae,t.inputTransactionId=an,t.isAddress=Kt,t.isArray=nn,t.isBigNumber=Lr,t.isBloom=function(b){return!!/^(0x)?[0-9a-f]{512}$/i.test(b)&&!!/^(0x)?[0-9a-f]{512}$/i.test(b)},t.isBoolean=Tn,t.isChecksumAddress=tr,t.isFunction=function(b){return typeof b=="function"},t.isHex=function(b){return typeof b=="string"&&/^0x[0-9a-fA-F]+$/.test(b)},t.isJson=function(b){try{return!!JSON.parse(b)}catch{return!1}},t.isObject=rn,t.isPredefinedBlockNumber=Da,t.isStrictAddress=qt,t.isString=Sn,t.isTopic=function(b){return!!/^(0x)?[0-9a-f]{64}$/i.test(b)&&!!/^(0x)?[0-9a-f]{64}$/i.test(b)},t.isValidResponse=La,t.outputBigNumberFormatter=va,t.outputBlockFormatter=pe,t.outputLogFormatter=Te,t.outputPostFormatter=function(b){return b?(b.expiry=je(b.expiry),b.sent=je(b.sent),b.ttl=je(b.ttl),b.workProved=je(b.workProved),b.topics||(b.topics=[]),b.topics=b.topics.map((function(I){return B(I)})),b):null},t.outputSyncingFormatter=Je,t.outputTransactionFormatter=z,t.outputTransactionReceiptFormatter=$,t.padLeft=F,t.padRight=function(b,I,q){return b+new Array(I-b.length+1).join(q||"0")},t.sha3=X,t.signedIsNegative=Fe,t.stringToUtf8Bytes=be,t.toAddress=hn,t.toArray=fr,t.toAscii=B,t.toBatchPayload=function(b){return b.map((function(I){return ja(I.method,I.params)}))},t.toBigNumber=Dt,t.toBoolean=De,t.toChecksumAddress=jr,t.toData=fe,t.toDecimal=je,t.toHex=Le,t.toJsonRpcRequest=ja,t.toNullDecimal=Be,t.toString=ce,t.toStringData=Oe,t.toTwosComplement=Ot,t.toWei=function(b,I){const q=Dt(b).times(Rt(I));return Lr(b)?q:q.toString(10)},t.transformToFullName=D,Object.defineProperty(t,"__esModule",{value:!0})}))})(pl,pl.exports)),pl.exports}var Uu={},bI;function IF(){if(bI)return Uu;bI=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.SignatureValidator=void 0;const e=_f();async function a(t,n){const i=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new e.ContractFactory(t,i).at(n)}return Uu.SignatureValidator=a,Uu}var ev={},sa={},Bo={},Uo={},tv={},ua={},wI;function ot(){if(wI)return ua;wI=1;var e=ua&&ua.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ua,"__esModule",{value:!0}),ua.validateType=ua.generateLazyValidator=ua.Ajv=void 0;const a=e(df());ua.Ajv=a.default;const t=e(oE()),n=e(sE());function i(u,c){let f=null;const p=(h,m)=>{if(!f){const v=new a.default({$data:!0,allErrors:!0});(0,t.default)(v),(0,n.default)(v,{singleError:!0}),c?.forEach(T=>v.addKeyword(T)),f=v.compile(u),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(h,m)};return p}ua.generateLazyValidator=i;function s(u,c){return u.validate(c)}return ua.validateType=s,ua}var SI;function RF(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const a=ot();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(tv)),tv}var rv={},TI;function CF(){return TI||(TI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const a=ot();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(rv)),rv}var PI;function MF(){return PI||(PI=1,(function(e){var a=Uo&&Uo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Uo&&Uo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(RF(),e),t(CF(),e)})(Uo)),Uo}var Fo={},nv={},AI;function jF(){return AI||(AI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const a=ot();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(nv)),nv}var av={},iv={},NI;function Ef(){return NI||(NI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const a=ot();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},i={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function u(p){return n[p]}t.getMaxSupply=u;function c(p){return s[p]}t.getColor=c;function f(p){return[i[p],s[p]]}t.getGradient=f})(e.Rarity||(e.Rarity={}))})(iv)),iv}var ov={},OI;function es(){return OI||(OI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const a=ot();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(ov)),ov}var sv={},uv={},II;function OE(){return II||(II=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const a=ot();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(uv)),uv}var lv={},cv={},RI;function Dj(){return RI||(RI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const a=ot();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(cv)),cv}var CI;function IE(){return CI||(CI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const a=es(),t=ot(),n=Dj();(function(i){i.schema={oneOf:[Object.assign({},a.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(lv)),lv}var MI;function RE(){return MI||(MI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const a=ot(),t=OE(),n=IE();(function(i){i.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(sv)),sv}var Vo={},Ho={},dv={},fv={},jI;function Zs(){return jI||(jI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const a=ot();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,a.generateLazyValidator)(t.schema);t.validate=i=>n(i)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=i=>n.test(i)})(e.IPFSv1||(e.IPFSv1={}))})(fv)),fv}var LI;function kj(){return LI||(LI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const a=es(),t=Zs(),n=ot();var i;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(i=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:i.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var u;(function(f){f.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const p=new RegExp(f.schema.pattern,"i");f.validate=h=>p.test(h)})(u=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:u.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(dv)),dv}var pv={},DI;function LF(){return DI||(DI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const a=ot(),t=kj();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(pv)),pv}var kI;function DF(){return kI||(kI=1,(function(e){var a=Ho&&Ho.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ho&&Ho.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(kj(),e),t(LF(),e)})(Ho)),Ho}var mv={},hv={},qI;function qj(){return qI||(qI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const a=ot();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(hv)),hv}var yv={},BI;function Bj(){return BI||(BI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(yv)),yv}var gv={},UI;function Uj(){return UI||(UI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const a=ot();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,a.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(gv)),gv}var vv={},Fu={},FI;function CE(){return FI||(FI=1,Object.defineProperty(Fu,"__esModule",{value:!0}),Fu.displayableProperties=void 0,Fu.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Fu}var _v={},VI;function Fj(){return VI||(VI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(_v)),_v}var Ev={},HI;function Vj(){return HI||(HI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(Ev)),Ev}var zI;function kF(){return zI||(zI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const a=ot(),t=CE(),n=qj(),i=Uj(),s=Fj(),u=Vj(),c=Bj();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:i.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:u.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,a.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(vv)),vv}var WI;function qF(){return WI||(WI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var a=qj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return a.FeatureToggles}});var t=Bj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=Uj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var i=kF();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return i.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return i.RequiredPermission}});var s=Fj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var u=Vj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return u.SpawnPoint}})})(mv)),mv}var zo={},bv={},wv={},GI;function Hj(){return GI||(GI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const a=ot();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(wv)),wv}var KI;function zj(){return KI||(KI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const a=ot(),t=Hj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(bv)),bv}var Sv={},YI;function Wj(){return YI||(YI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(Sv)),Sv}var Tv={},XI;function ME(){return XI||(XI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const a=Ef(),t=ot();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:a.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},i=(0,t.generateLazyValidator)(n);function s(u){return i(u)}e.isStandard=s})(Tv)),Tv}var Pv={},Av={},JI;function Gj(){return JI||(JI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Av)),Av}var QI;function jE(){return QI||(QI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const a=ot(),t=Gj();e.thirdPartyProps={merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const n={type:"object",properties:Object.assign({},e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},i={keyword:"_containsHashingKeys",validate:(c,f)=>{var p;const h=f;return!((p=h?.merkleProof)===null||p===void 0)&&p.hashingKeys?h.merkleProof.hashingKeys.every(m=>h.hasOwnProperty(m)):!1},errors:!1},s=(0,a.generateLazyValidator)(n,[i]);function u(c){return s(c)}e.isThirdParty=u})(Pv)),Pv}var Nv={},Ov={},Ja={},xI;function Kj(){if(xI)return Ja;xI=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.isBaseAvatar=Ja.requiredBaseItemProps=Ja.baseItemProperties=void 0;const e=zj(),a=Wj(),t=CE();Ja.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},a.Metrics.schema),{nullable:!0})}),Ja.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(i){if(!i||!i.id)return!1;const s=i.id.split(":"),u=s[1]==="decentraland",c=s[3]==="base-avatars";return s.length===5&&u&&c}return Ja.isBaseAvatar=n,Ja}var ZI;function BF(){return ZI||(ZI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const a=ot(),t=es(),n=RE(),i=Kj(),s=ME(),u=jE(),c=IE();(function(f){f.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},i.baseItemProperties),s.standardProperties),u.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...i.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...i.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const p={keyword:"_isThirdParty",validate:(m,v)=>!m||(0,u.isThirdParty)(v),errors:!1},h={keyword:"_isBaseAvatar",validate:(m,v)=>!m||(0,i.isBaseAvatar)(v),errors:!1};f.validate=(0,a.generateLazyValidator)(f.schema,[p,h])})(e.Wearable||(e.Wearable={}))})(Ov)),Ov}var $I;function UF(){return $I||($I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var a=RE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return a.WearableRepresentation}});var t=BF();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=es();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var i=Dj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return i.BodyPartCategory}});var s=IE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(Nv)),Nv}var Iv={},Rv={},Cv={},Mv={},eR;function Yj(){return eR||(eR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const a=ot();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Mv)),Mv}var jv={},tR;function Xj(){return tR||(tR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const a=ot(),t=OE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(jv)),jv}var rR;function Jj(){return rR||(rR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const a=Yj(),t=ot(),n=Xj();(function(i){i.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:a.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},i.validate=(0,t.generateLazyValidator)(i.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Cv)),Cv}var nR;function FF(){return nR||(nR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const a=Qj(),t=ot(),n=Kj(),i=ME(),s=jE(),u=Jj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),i.standardProperties),s.thirdPartyProps),{emoteDataADR74:u.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(p,h)=>!p||(0,a.isThirdParty)(h),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f])})(e.Emote||(e.Emote={}))})(Rv)),Rv}var Lv={},aR;function VF(){return aR||(aR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const a=ot();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Lv)),Lv}var iR;function HF(){return iR||(iR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var a=FF();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return a.Emote}});var t=Xj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=Jj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var i=Yj();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return i.EmoteCategory}});var s=VF();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(Iv)),Iv}var oR;function Qj(){return oR||(oR=1,(function(e){var a=zo&&zo.__createBinding||(Object.create?(function(p,h,m,v){v===void 0&&(v=m);var T=Object.getOwnPropertyDescriptor(h,m);(!T||("get"in T?!h.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(p,v,T)}):(function(p,h,m,v){v===void 0&&(v=m),p[v]=h[m]})),t=zo&&zo.__exportStar||function(p,h){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(h,m)&&a(h,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=zj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var i=Hj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return i.Locale}});var s=Wj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var u=OE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return u.BodyShape}});var c=ME();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=jE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(UF(),e),t(HF(),e)})(zo)),zo}var Wo={},sR;function zF(){return sR||(sR=1,(function(e){var a=Wo&&Wo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Wo&&Wo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(Gj(),e)})(Wo)),Wo}var Dv={},kv={},uR;function LE(){return uR||(uR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const a=ot();var t;(function(i){i.SIGNER="SIGNER",i.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",i.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",i.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",i.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(i){i.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},i.validate=(0,a.generateLazyValidator)(i.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(i){i.schema={type:"array",items:n.schema,minItems:1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.AuthChain||(e.AuthChain={}))})(kv)),kv}var lR;function WF(){return lR||(lR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const a=Zs(),t=LE(),n=ot();(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(i){i.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:a.IPFSv1.schema}},{properties:{entityId:a.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Dv)),Dv}var qv={},Bv={},cR;function xj(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const a=Zs(),t=ot();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Bv)),Bv}var dR;function GF(){return dR||(dR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const a=Zs(),t=xj(),n=ot();(function(i){i.SCENE="scene",i.PROFILE="profile",i.WEARABLE="wearable",i.STORE="store",i.EMOTE="emote",i.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(i){i.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[a.IPFSv1.schema,a.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},i.validate=(0,n.generateLazyValidator)(i.schema)})(e.Entity||(e.Entity={}))})(qv)),qv}var Uv={},fR;function KF(){return fR||(fR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const a=LE(),t=ot();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:a.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Uv)),Uv}var Go={},Fv={},pR;function YF(){return pR||(pR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const a=es(),t=Zs(),n=ot();var i;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:a.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(i=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:i.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Fv)),Fv}var mR;function XF(){return mR||(mR=1,(function(e){var a=Go&&Go.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Go&&Go.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(YF(),e)})(Go)),Go}var hR;function DE(){return hR||(hR=1,(function(e){var a=Vo&&Vo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Vo&&Vo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(DF(),e),t(qF(),e),t(Qj(),e),t(CE(),e),t(zF(),e),t(WF(),e),t(GF(),e),t(KF(),e),t(XF(),e)})(Vo)),Vo}var yR;function JF(){return yR||(yR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const a=Ef(),t=es(),n=RE(),i=ot(),s=DE();(function(u){u.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},a.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},u.validate=(0,i.generateLazyValidator)(u.schema)})(e.WearableJson||(e.WearableJson={}))})(av)),av}var gR;function QF(){return gR||(gR=1,(function(e){var a=Fo&&Fo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Fo&&Fo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(jF(),e),t(JF(),e)})(Fo)),Fo}var vR;function xF(){return vR||(vR=1,(function(e){var a=Bo&&Bo.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Bo&&Bo.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(MF(),e),t(QF(),e)})(Bo)),Bo}var Vv={},Hv={},zv={},_R;function Zj(){return _R||(_R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const a=ot(),t=ga();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.AVALANCHE_MAINNET="Avalanche Mainnet",s.BINANCE_MAINNET="Binance Smart Chain Mainnet",s.ARBITRUM_MAINNET="Arbitrum One",s.OPTIMISM_MAINNET="Optimism Mainnet",s.FANTOM_MAINNET="Fantom Mainnet"})(n=e.ChainName||(e.ChainName={}));function i(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;default:return null}}e.getChainId=i,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,a.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(zv)),zv}var Wv={},ER;function ya(){return ER||(ER=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const a=ot();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(Wv)),Wv}var bR;function ga(){return bR||(bR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const a=ot(),t=Zj(),n=ya();var i;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(i=e.ChainId||(e.ChainId={}));function s(p){switch(p){case i.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case i.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case i.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case i.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case i.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case i.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case i.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case i.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=s;function u(p){switch(p){case i.ETHEREUM_MAINNET:return"ethereum";case i.ETHEREUM_ROPSTEN:return"ropsten";case i.ETHEREUM_RINKEBY:return"rinkeby";case i.ETHEREUM_GOERLI:return"goerli";case i.ETHEREUM_KOVAN:return"kovan";case i.ETHEREUM_SEPOLIA:return"sepolia";case i.MATIC_MAINNET:return"matic";case i.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=u;function c(p){switch(p){case i.ETHEREUM_MAINNET:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.ETHEREUM_ROPSTEN:return{[n.Network.ETHEREUM]:i.ETHEREUM_ROPSTEN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_RINKEBY:return{[n.Network.ETHEREUM]:i.ETHEREUM_RINKEBY,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_GOERLI:return{[n.Network.ETHEREUM]:i.ETHEREUM_GOERLI,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_KOVAN:return{[n.Network.ETHEREUM]:i.ETHEREUM_KOVAN,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.ETHEREUM_SEPOLIA:return{[n.Network.ETHEREUM]:i.ETHEREUM_SEPOLIA,[n.Network.MATIC]:i.MATIC_MUMBAI};case i.MATIC_MAINNET:return{[n.Network.ETHEREUM]:i.MATIC_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET};case i.MATIC_MUMBAI:return{[n.Network.ETHEREUM]:i.MATIC_MUMBAI,[n.Network.MATIC]:i.MATIC_MUMBAI};default:return{[n.Network.ETHEREUM]:i.ETHEREUM_MAINNET,[n.Network.MATIC]:i.MATIC_MAINNET}}}e.getNetworkMapping=c;function f(p){switch(p){case i.ETHEREUM_MAINNET:case i.ETHEREUM_ROPSTEN:case i.ETHEREUM_GOERLI:case i.ETHEREUM_KOVAN:case i.ETHEREUM_RINKEBY:case i.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case i.MATIC_MAINNET:case i.MATIC_MUMBAI:return n.Network.MATIC}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,a.generateLazyValidator)(p.schema)})(i=e.ChainId||(e.ChainId={}))})(Hv)),Hv}var Gv={},wR;function kE(){return wR||(wR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const a=ot();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Gv)),Gv}var SR;function ZF(){return SR||(SR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const a=ot(),t=ga(),n=kE(),i=ya();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Vv)),Vv}var Kv={},TR;function $F(){return TR||(TR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const a=ot();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(Kv)),Kv}var Yv={},PR;function eV(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const a=ot(),t=ga(),n=ya();(function(i){i.NEWEST="newest",i.NAME="name",i.RECENTLY_REVIEWED="recently_reviewed",i.RECENTLY_LISTED="recently_listed",i.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(i){i.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Collection||(e.Collection={}))})(Yv)),Yv}var Xv={},Jv={},AR;function bf(){return AR||(AR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const a=ot();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Jv)),Jv}var NR;function tV(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const a=ot(),t=ga(),n=ya(),i=bf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:i.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(Xv)),Xv}var Qv={},xv={},OR;function $j(){return OR||(OR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const a=ot(),t=ga(),n=DE(),i=ya(),s=bf(),u=Ef(),c=es();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:u.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:i.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,a.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(xv)),xv}var IR;function rV(){return IR||(IR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const a=ot(),t=ga(),n=ya(),i=$j(),s=bf();(function(u){u.NAME="name",u.NEWEST="newest",u.RECENTLY_REVIEWED="recently_reviewed",u.RECENTLY_SOLD="recently_sold",u.RECENTLY_LISTED="recently_listed",u.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(u){u.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:i.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},u.validate=(0,a.generateLazyValidator)(u.schema)})(e.Item||(e.Item={}))})(Qv)),Qv}var Zv={},RR;function nV(){return RR||(RR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Zv)),Zv}var $v={},CR;function aV(){return CR||(CR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const a=ot(),t=ga(),n=ya();(function(i){i.RECENTLY_MINTED="recently_minted",i.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(i){i.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.Mint||(e.Mint={}))})($v)),$v}var e_={},MR;function iV(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(a){a.NEWEST="newest",a.RECENTLY_SOLD="recently_sold",a.CHEAPEST="cheapest",a.MOST_EXPENSIVE="most_expensive",a.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(a){a.ASC="asc",a.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(e_)),e_}var t_={},jR;function oV(){return jR||(jR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const a=ot(),t=ga(),n=kE(),i=ya();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:i.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(t_)),t_}var r_={},LR;function sV(){return LR||(LR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const a=ot();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(r_)),r_}var n_={},DR;function eL(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const a=ot();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(n_)),n_}var a_={},kR;function uV(){return kR||(kR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const a=ot(),t=ga(),n=eL(),i=ya();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:i.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(a_)),a_}var i_={},qR;function lV(){return qR||(qR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const a=ot(),t=ga(),n=ya();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var i;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(i=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:i.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,a.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(i_)),i_}var o_={},BR;function cV(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(a){a.DATE="date",a.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(o_)),o_}var s_={},UR;function dV(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(s_)),s_}var u_={},FR;function fV(){return FR||(FR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const a=ot();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(u_)),u_}var l_={},VR;function pV(){return VR||(VR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const a=ot();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(i,s){const u=t().validWorldRanges;for(const c of u)if(i>=c.xMin&&i<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(i){i.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},i.validate=(0,a.generateLazyValidator)(i.schema)})(e.World||(e.World={}))})(l_)),l_}var Ko={},c_={},HR;function mV(){return HR||(HR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const a=ot();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(c_)),c_}var d_={},zR;function hV(){return zR||(zR=1,Object.defineProperty(d_,"__esModule",{value:!0})),d_}var f_={},WR;function yV(){return WR||(WR=1,Object.defineProperty(f_,"__esModule",{value:!0})),f_}var p_={},GR;function gV(){return GR||(GR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const a=ot();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(p_)),p_}var m_={},KR;function vV(){return KR||(KR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const a=ot();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(m_)),m_}var h_={},YR;function _V(){return YR||(YR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const a=ot();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,a.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,i,s,u="*")=>{const c={type:i,payload:s};n.postMessage(c,u)};e.sendMessage=t})(h_)),h_}var y_={},XR;function EV(){return XR||(XR=1,Object.defineProperty(y_,"__esModule",{value:!0})),y_}var g_={},JR;function bV(){return JR||(JR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const a=ot();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(g_)),g_}var v_={},QR;function wV(){return QR||(QR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const a=ot();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(v_)),v_}var __={},xR;function SV(){return xR||(xR=1,Object.defineProperty(__,"__esModule",{value:!0})),__}var E_={},ZR;function TV(){return ZR||(ZR=1,Object.defineProperty(E_,"__esModule",{value:!0})),E_}var b_={},$R;function PV(){return $R||($R=1,Object.defineProperty(b_,"__esModule",{value:!0})),b_}var w_={},eC;function AV(){return eC||(eC=1,Object.defineProperty(w_,"__esModule",{value:!0})),w_}var S_={},tC;function NV(){return tC||(tC=1,Object.defineProperty(S_,"__esModule",{value:!0})),S_}var T_={},rC;function OV(){return rC||(rC=1,Object.defineProperty(T_,"__esModule",{value:!0})),T_}var P_={},nC;function IV(){return nC||(nC=1,Object.defineProperty(P_,"__esModule",{value:!0})),P_}var A_={},aC;function RV(){return aC||(aC=1,Object.defineProperty(A_,"__esModule",{value:!0})),A_}var iC;function CV(){return iC||(iC=1,(function(e){var a=Ko&&Ko.__createBinding||(Object.create?(function(n,i,s,u){u===void 0&&(u=s);var c=Object.getOwnPropertyDescriptor(i,s);(!c||("get"in c?!i.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(n,u,c)}):(function(n,i,s,u){u===void 0&&(u=s),n[u]=i[s]})),t=Ko&&Ko.__exportStar||function(n,i){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&a(i,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(mV(),e),t(hV(),e),t(yV(),e),t(gV(),e),t(vV(),e),t(_V(),e),t(EV(),e),t(bV(),e),t(wV(),e),t(SV(),e),t(TV(),e),t(PV(),e),t(AV(),e),t(NV(),e),t(OV(),e),t(IV(),e),t(RV(),e)})(Ko)),Ko}var N_={},oC;function MV(){return oC||(oC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const a=ot();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,a.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(N_)),N_}var sC;function jV(){return sC||(sC=1,(function(e){var a=sa&&sa.__createBinding||(Object.create?(function(Ie,we,Ae,Ne){Ne===void 0&&(Ne=Ae);var me=Object.getOwnPropertyDescriptor(we,Ae);(!me||("get"in me?!we.__esModule:me.writable||me.configurable))&&(me={enumerable:!0,get:function(){return we[Ae]}}),Object.defineProperty(Ie,Ne,me)}):(function(Ie,we,Ae,Ne){Ne===void 0&&(Ne=Ae),Ie[Ne]=we[Ae]})),t=sa&&sa.__setModuleDefault||(Object.create?(function(Ie,we){Object.defineProperty(Ie,"default",{enumerable:!0,value:we})}):function(Ie,we){Ie.default=we}),n=sa&&sa.__importStar||function(Ie){if(Ie&&Ie.__esModule)return Ie;var we={};if(Ie!=null)for(var Ae in Ie)Ae!=="default"&&Object.prototype.hasOwnProperty.call(Ie,Ae)&&a(we,Ie,Ae);return t(we,Ie),we},i=sa&&sa.__exportStar||function(Ie,we){for(var Ae in Ie)Ae!=="default"&&!Object.prototype.hasOwnProperty.call(we,Ae)&&a(we,Ie,Ae)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=e.isInsideWorldLimits=e.getWorld=e.World=e.GenderFilterOption=e.WearableGender=e.Store=e.AnalyticsDayDataSortBy=e.PeriodCreation=e.RentalListingCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=e.SaleSortBy=e.Sale=e.SaleType=e.Rarity=e.ProviderType=e.OrderSortBy=e.Order=e.CatalogSortDirection=e.CatalogSortBy=e.NFTSortBy=e.NFT=e.NFTCategory=e.Network=e.MintSortBy=e.Mint=e.MetaTransaction=e.ListingStatus=e.ItemSortBy=e.Item=e.ContractSortBy=e.Contract=e.CollectionSortBy=e.Collection=e.getChainId=e.ChainName=e.getURNProtocol=e.getChainName=e.ChainId=e.AccountSortBy=e.Account=e.BidSortBy=e.Bid=void 0;const s=n(xF());e.sdk=s,i(ot(),e);var u=ZF();Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return u.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return u.BidSortBy}});var c=$F();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return c.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return c.AccountSortBy}});var f=ga();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return f.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return f.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return f.getURNProtocol}});var p=Zj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return p.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return p.getChainId}});var h=eV();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return h.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return h.CollectionSortBy}});var m=tV();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return m.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return m.ContractSortBy}});var v=rV();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return v.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return v.ItemSortBy}});var T=kE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return T.ListingStatus}});var C=nV();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return C.MetaTransaction}});var N=aV();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return N.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return N.MintSortBy}});var E=ya();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return E.Network}});var R=bf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return R.NFTCategory}});var _=$j();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return _.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return _.NFTSortBy}});var O=iV();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return O.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return O.CatalogSortDirection}});var P=oV();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return P.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return P.OrderSortBy}});var y=sV();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return y.ProviderType}});var S=Ef();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return S.Rarity}});var M=eL();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return M.SaleType}});var U=uV();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return U.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return U.SaleSortBy}});var V=lV();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return V.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return V.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return V.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return V.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return V.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return V.PeriodCreation}});var Q=cV();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return Q.AnalyticsDayDataSortBy}});var te=dV();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return te.Store}});var he=fV();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return he.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return he.GenderFilterOption}});var be=pV();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return be.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return be.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return be.isInsideWorldLimits}}),i(CV(),e),i(DE(),e),i(Zs(),e),i(MV(),e),i(LE(),e),i(xj(),e)})(sa)),sa}var uC;function tL(){return uC||(uC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const a=jV();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return a.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return a.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return a.AuthLink}})})(ev)),ev}var Vu={},lC;function LV(){if(lC)return Vu;lC=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.moveMinutes=void 0;function e(a){const t=new Date;return t.setMinutes(t.getMinutes()+a),t}return Vu.moveMinutes=e,Vu}var Ud={},cC;function DV(){if(cC)return Ud;cC=1,Object.defineProperty(Ud,"__esModule",{value:!0});const e=_f();class a{constructor(n,i=!0){this.requestManager=n,this.checkedBlocks={},this.saveBlocks=i,i&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),i=await this.getBlockWrapper(1);this.blockTime=(n.timestamp-i.timestamp)/Number(n.number)-1,this.firstTimestamp=i.timestamp}async getDate(n,i=!0){const s=n/1e3,u=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),s<this.firstTimestamp)return{block:1,timestamp:s};if(s>=u||s>this.savedBlocks.latest.timestamp)return{block:(0,e.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:s};this.checkedBlocks[s]=[];const c=await this.getBlockWrapper(Math.ceil((s-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(s,c,i),timestamp:s}}async findBetter(n,i,s,u=this.blockTime){if(await this.isBetterBlock(n,i,s))return i.number;const c=n-i.timestamp;let f=Math.ceil(c/u);f===0&&(f=c<0?-1:1);const p=await this.getBlockWrapper(this.getNextBlock(n,i.number,f));return u=Math.abs((i.timestamp-p.timestamp)/(i.number-p.number)),this.findBetter(n,p,s,u)}async isBetterBlock(n,i,s){const u=i.timestamp;if(s){if(u<n)return!1;const c=await this.getBlockWrapper(i.number-1);if(u>=n&&c.timestamp<n)return!0}else{if(u>=n)return!1;const c=await this.getBlockWrapper(i.number+1);if(u<n&&c.timestamp>=n)return!0}return!1}getNextBlock(n,i,s){const u=i+s;return this.checkedBlocks[n].includes(u)?this.getNextBlock(n,i,s<0?++s:--s):(this.checkedBlocks[n].push(u),u)}async getBlockWrapper(n){if(!this.saveBlocks){const s=await this.requestManager.eth_getBlockByNumber(n,!1);return{number:(0,e.toBigNumber)(s.number).toNumber(),timestamp:(0,e.toBigNumber)(s.timestamp).toNumber()}}if(this.savedBlocks[n.toString()])return this.savedBlocks[n];if(typeof n=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=n)return this.savedBlocks.latest;const{timestamp:i}=await this.requestManager.eth_getBlockByNumber(n,!1);return this.savedBlocks[n.toString()]={number:(0,e.toBigNumber)(n==="latest"?await this.requestManager.eth_blockNumber():n).toNumber(),timestamp:(0,e.toBigNumber)(i).toNumber()},this.requests++,this.savedBlocks[n.toString()]}}return Ud.default=a,Ud}var Vr={},O_={},I_={},Jr={},dC;function qE(){if(dC)return Jr;dC=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.output=Jr.exists=Jr.hash=Jr.bytes=Jr.bool=Jr.number=void 0;function e(c){if(!Number.isSafeInteger(c)||c<0)throw new Error(`Wrong positive integer: ${c}`)}Jr.number=e;function a(c){if(typeof c!="boolean")throw new Error(`Expected boolean, not ${c}`)}Jr.bool=a;function t(c,...f){if(!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length>0&&!f.includes(c.length))throw new TypeError(`Expected Uint8Array of length ${f}, not of length=${c.length}`)}Jr.bytes=t;function n(c){if(typeof c!="function"||typeof c.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");e(c.outputLen),e(c.blockLen)}Jr.hash=n;function i(c,f=!0){if(c.destroyed)throw new Error("Hash instance has been destroyed");if(f&&c.finished)throw new Error("Hash#digest() has already been called")}Jr.exists=i;function s(c,f){t(c);const p=f.outputLen;if(c.length<p)throw new Error(`digestInto() expects output buffer of length at least ${p}`)}Jr.output=s;const u={number:e,bool:a,bytes:t,hash:n,exists:i,output:s};return Jr.default=u,Jr}var R_={},Hu={},fC;function kV(){return fC||(fC=1,Object.defineProperty(Hu,"__esModule",{value:!0}),Hu.crypto=void 0,Hu.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0}),Hu}var pC;function _l(){return pC||(pC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const a=kV(),t=P=>new Uint8Array(P.buffer,P.byteOffset,P.byteLength);e.u8=t;const n=P=>new Uint32Array(P.buffer,P.byteOffset,Math.floor(P.byteLength/4));e.u32=n;const i=P=>new DataView(P.buffer,P.byteOffset,P.byteLength);e.createView=i;const s=(P,y)=>P<<32-y|P>>>y;if(e.rotr=s,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const u=Array.from({length:256},(P,y)=>y.toString(16).padStart(2,"0"));function c(P){if(!(P instanceof Uint8Array))throw new Error("Uint8Array expected");let y="";for(let S=0;S<P.length;S++)y+=u[P[S]];return y}e.bytesToHex=c;function f(P){if(typeof P!="string")throw new TypeError("hexToBytes: expected string, got "+typeof P);if(P.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const y=new Uint8Array(P.length/2);for(let S=0;S<y.length;S++){const M=S*2,U=P.slice(M,M+2),V=Number.parseInt(U,16);if(Number.isNaN(V)||V<0)throw new Error("Invalid byte sequence");y[S]=V}return y}e.hexToBytes=f;const p=async()=>{};e.nextTick=p;async function h(P,y,S){let M=Date.now();for(let U=0;U<P;U++){S(U);const V=Date.now()-M;V>=0&&V<y||(await(0,e.nextTick)(),M+=V)}}e.asyncLoop=h;function m(P){if(typeof P!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof P}`);return new TextEncoder().encode(P)}e.utf8ToBytes=m;function v(P){if(typeof P=="string"&&(P=m(P)),!(P instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof P})`);return P}e.toBytes=v;function T(...P){if(!P.every(M=>M instanceof Uint8Array))throw new Error("Uint8Array list expected");if(P.length===1)return P[0];const y=P.reduce((M,U)=>M+U.length,0),S=new Uint8Array(y);for(let M=0,U=0;M<P.length;M++){const V=P[M];S.set(V,U),U+=V.length}return S}e.concatBytes=T;class C{clone(){return this._cloneInto()}}e.Hash=C;const N=P=>Object.prototype.toString.call(P)==="[object Object]"&&P.constructor===Object;function E(P,y){if(y!==void 0&&(typeof y!="object"||!N(y)))throw new TypeError("Options should be object or undefined");return Object.assign(P,y)}e.checkOpts=E;function R(P){const y=M=>P().update(v(M)).digest(),S=P();return y.outputLen=S.outputLen,y.blockLen=S.blockLen,y.create=()=>P(),y}e.wrapConstructor=R;function _(P){const y=(M,U)=>P(U).update(v(M)).digest(),S=P({});return y.outputLen=S.outputLen,y.blockLen=S.blockLen,y.create=M=>P(M),y}e.wrapConstructorWithOpts=_;function O(P=32){if(a.crypto.web)return a.crypto.web.getRandomValues(new Uint8Array(P));if(a.crypto.node)return new Uint8Array(a.crypto.node.randomBytes(P).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=O})(R_)),R_}var mC;function qV(){return mC||(mC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const a=qE(),t=_l();class n extends t.Hash{constructor(u,c){super(),this.finished=!1,this.destroyed=!1,a.default.hash(u);const f=(0,t.toBytes)(c);if(this.iHash=u.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const p=this.blockLen,h=new Uint8Array(p);h.set(f.length>p?u.create().update(f).digest():f);for(let m=0;m<h.length;m++)h[m]^=54;this.iHash.update(h),this.oHash=u.create();for(let m=0;m<h.length;m++)h[m]^=106;this.oHash.update(h),h.fill(0)}update(u){return a.default.exists(this),this.iHash.update(u),this}digestInto(u){a.default.exists(this),a.default.bytes(u,this.outputLen),this.finished=!0,this.iHash.digestInto(u),this.oHash.update(u),this.oHash.digestInto(u),this.destroy()}digest(){const u=new Uint8Array(this.oHash.outputLen);return this.digestInto(u),u}_cloneInto(u){u||(u=Object.create(Object.getPrototypeOf(this),{}));const{oHash:c,iHash:f,finished:p,destroyed:h,blockLen:m,outputLen:v}=this;return u=u,u.finished=p,u.destroyed=h,u.blockLen=m,u.outputLen=v,u.oHash=c._cloneInto(u.oHash),u.iHash=f._cloneInto(u.iHash),u}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const i=(s,u,c)=>new n(s,u).update(c).digest();e.hmac=i,e.hmac.create=(s,u)=>new n(s,u)})(I_)),I_}var Yo={},zu={},hC;function BV(){if(hC)return zu;hC=1,Object.defineProperty(zu,"__esModule",{value:!0}),zu.SHA2=void 0;const e=qE(),a=_l();function t(i,s,u,c){if(typeof i.setBigUint64=="function")return i.setBigUint64(s,u,c);const f=BigInt(32),p=BigInt(4294967295),h=Number(u>>f&p),m=Number(u&p),v=c?4:0,T=c?0:4;i.setUint32(s+v,h,c),i.setUint32(s+T,m,c)}class n extends a.Hash{constructor(s,u,c,f){super(),this.blockLen=s,this.outputLen=u,this.padOffset=c,this.isLE=f,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(s),this.view=(0,a.createView)(this.buffer)}update(s){e.default.exists(this);const{view:u,buffer:c,blockLen:f}=this;s=(0,a.toBytes)(s);const p=s.length;for(let h=0;h<p;){const m=Math.min(f-this.pos,p-h);if(m===f){const v=(0,a.createView)(s);for(;f<=p-h;h+=f)this.process(v,h);continue}c.set(s.subarray(h,h+m),this.pos),this.pos+=m,h+=m,this.pos===f&&(this.process(u,0),this.pos=0)}return this.length+=s.length,this.roundClean(),this}digestInto(s){e.default.exists(this),e.default.output(s,this),this.finished=!0;const{buffer:u,view:c,blockLen:f,isLE:p}=this;let{pos:h}=this;u[h++]=128,this.buffer.subarray(h).fill(0),this.padOffset>f-h&&(this.process(c,0),h=0);for(let N=h;N<f;N++)u[N]=0;t(c,f-8,BigInt(this.length*8),p),this.process(c,0);const m=(0,a.createView)(s),v=this.outputLen;if(v%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const T=v/4,C=this.get();if(T>C.length)throw new Error("_sha2: outputLen bigger than state");for(let N=0;N<T;N++)m.setUint32(4*N,C[N],p)}digest(){const{buffer:s,outputLen:u}=this;this.digestInto(s);const c=s.slice(0,u);return this.destroy(),c}_cloneInto(s){s||(s=new this.constructor),s.set(...this.get());const{blockLen:u,buffer:c,length:f,finished:p,destroyed:h,pos:m}=this;return s.length=f,s.pos=m,s.finished=p,s.destroyed=h,f%u&&s.buffer.set(c),s}}return zu.SHA2=n,zu}var yC;function rL(){if(yC)return Yo;yC=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.sha224=Yo.sha256=void 0;const e=BV(),a=_l(),t=(p,h,m)=>p&h^~p&m,n=(p,h,m)=>p&h^p&m^h&m,i=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends e.SHA2{constructor(){super(64,32,8,!1),this.A=s[0]|0,this.B=s[1]|0,this.C=s[2]|0,this.D=s[3]|0,this.E=s[4]|0,this.F=s[5]|0,this.G=s[6]|0,this.H=s[7]|0}get(){const{A:h,B:m,C:v,D:T,E:C,F:N,G:E,H:R}=this;return[h,m,v,T,C,N,E,R]}set(h,m,v,T,C,N,E,R){this.A=h|0,this.B=m|0,this.C=v|0,this.D=T|0,this.E=C|0,this.F=N|0,this.G=E|0,this.H=R|0}process(h,m){for(let P=0;P<16;P++,m+=4)u[P]=h.getUint32(m,!1);for(let P=16;P<64;P++){const y=u[P-15],S=u[P-2],M=(0,a.rotr)(y,7)^(0,a.rotr)(y,18)^y>>>3,U=(0,a.rotr)(S,17)^(0,a.rotr)(S,19)^S>>>10;u[P]=U+u[P-7]+M+u[P-16]|0}let{A:v,B:T,C,D:N,E,F:R,G:_,H:O}=this;for(let P=0;P<64;P++){const y=(0,a.rotr)(E,6)^(0,a.rotr)(E,11)^(0,a.rotr)(E,25),S=O+y+t(E,R,_)+i[P]+u[P]|0,U=((0,a.rotr)(v,2)^(0,a.rotr)(v,13)^(0,a.rotr)(v,22))+n(v,T,C)|0;O=_,_=R,R=E,E=N+S|0,N=C,C=T,T=v,v=S+U|0}v=v+this.A|0,T=T+this.B|0,C=C+this.C|0,N=N+this.D|0,E=E+this.E|0,R=R+this.F|0,_=_+this.G|0,O=O+this.H|0,this.set(v,T,C,N,E,R,_,O)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class f extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return Yo.sha256=(0,a.wrapConstructor)(()=>new c),Yo.sha224=(0,a.wrapConstructor)(()=>new f),Yo}var C_={};const UV={},FV=Object.freeze(Object.defineProperty({__proto__:null,default:UV},Symbol.toStringTag,{value:"Module"})),VV=wD(FV);var gC;function vC(){return gC||(gC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const a=VV,t=BigInt(0),n=BigInt(1),i=BigInt(2),s=BigInt(3),u=BigInt(8),c=Object.freeze({a:t,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=c;const f=(ae,z)=>(ae+z/i)/z,p={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(ae){const{n:z}=c,$=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),pe=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Te=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Me=$,Xe=BigInt("0x100000000000000000000000000000000"),Je=f(Me*ae,z),vt=f(-pe*ae,z);let dt=B(ae-Je*$-vt*Te,z),St=B(-Je*pe-vt*Me,z);const Nt=dt>Xe,Mt=St>Xe;if(Nt&&(dt=z-dt),Mt&&(St=z-St),dt>Xe||St>Xe)throw new Error("splitScalarEndo: Endomorphism failed, k="+ae);return{k1neg:Nt,k1:dt,k2neg:Mt,k2:St}}},h=32,m=32,v=32,T=h+1,C=2*h+1;function N(ae){const{a:z,b:$}=c,pe=B(ae*ae),Te=B(pe*ae);return B(Te+z*ae+$)}const E=c.a===t;class R extends Error{constructor(z){super(z)}}function _(ae){if(!(ae instanceof O))throw new TypeError("JacobianPoint expected")}class O{constructor(z,$,pe){this.x=z,this.y=$,this.z=pe}static fromAffine(z){if(!(z instanceof S))throw new TypeError("JacobianPoint#fromAffine: expected Point");return z.equals(S.ZERO)?O.ZERO:new O(z.x,z.y,n)}static toAffineBatch(z){const $=Re(z.map(pe=>pe.z));return z.map((pe,Te)=>pe.toAffine($[Te]))}static normalizeZ(z){return O.toAffineBatch(z).map(O.fromAffine)}equals(z){_(z);const{x:$,y:pe,z:Te}=this,{x:Me,y:Xe,z:Je}=z,vt=B(Te*Te),dt=B(Je*Je),St=B($*dt),Nt=B(Me*vt),Mt=B(B(pe*Je)*dt),or=B(B(Xe*Te)*vt);return St===Nt&&Mt===or}negate(){return new O(this.x,B(-this.y),this.z)}double(){const{x:z,y:$,z:pe}=this,Te=B(z*z),Me=B($*$),Xe=B(Me*Me),Je=z+Me,vt=B(i*(B(Je*Je)-Te-Xe)),dt=B(s*Te),St=B(dt*dt),Nt=B(St-i*vt),Mt=B(dt*(vt-Nt)-u*Xe),or=B(i*$*pe);return new O(Nt,Mt,or)}add(z){_(z);const{x:$,y:pe,z:Te}=this,{x:Me,y:Xe,z:Je}=z;if(Me===t||Xe===t)return this;if($===t||pe===t)return z;const vt=B(Te*Te),dt=B(Je*Je),St=B($*dt),Nt=B(Me*vt),Mt=B(B(pe*Je)*dt),or=B(B(Xe*Te)*vt),rr=B(Nt-St),wr=B(or-Mt);if(rr===t)return wr===t?this.double():O.ZERO;const Hr=B(rr*rr),An=B(rr*Hr),Vn=B(St*Hr),ai=B(wr*wr-An-i*Vn),kr=B(wr*(Vn-ai)-Mt*An),_a=B(Te*Je*rr);return new O(ai,kr,_a)}subtract(z){return this.add(z.negate())}multiplyUnsafe(z){const $=O.ZERO;if(typeof z=="bigint"&&z===t)return $;let pe=F(z);if(pe===n)return this;if(!E){let Nt=$,Mt=this;for(;pe>t;)pe&n&&(Nt=Nt.add(Mt)),Mt=Mt.double(),pe>>=n;return Nt}let{k1neg:Te,k1:Me,k2neg:Xe,k2:Je}=p.splitScalar(pe),vt=$,dt=$,St=this;for(;Me>t||Je>t;)Me&n&&(vt=vt.add(St)),Je&n&&(dt=dt.add(St)),St=St.double(),Me>>=n,Je>>=n;return Te&&(vt=vt.negate()),Xe&&(dt=dt.negate()),dt=new O(B(dt.x*p.beta),dt.y,dt.z),vt.add(dt)}precomputeWindow(z){const $=E?128/z+1:256/z+1,pe=[];let Te=this,Me=Te;for(let Xe=0;Xe<$;Xe++){Me=Te,pe.push(Me);for(let Je=1;Je<2**(z-1);Je++)Me=Me.add(Te),pe.push(Me);Te=Me.double()}return pe}wNAF(z,$){!$&&this.equals(O.BASE)&&($=S.BASE);const pe=$&&$._WINDOW_SIZE||1;if(256%pe)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let Te=$&&y.get($);Te||(Te=this.precomputeWindow(pe),$&&pe!==1&&(Te=O.normalizeZ(Te),y.set($,Te)));let Me=O.ZERO,Xe=O.BASE;const Je=1+(E?128/pe:256/pe),vt=2**(pe-1),dt=BigInt(2**pe-1),St=2**pe,Nt=BigInt(pe);for(let Mt=0;Mt<Je;Mt++){const or=Mt*vt;let rr=Number(z&dt);z>>=Nt,rr>vt&&(rr-=St,z+=n);const wr=or,Hr=or+Math.abs(rr)-1,An=Mt%2!==0,Vn=rr<0;rr===0?Xe=Xe.add(P(An,Te[wr])):Me=Me.add(P(Vn,Te[Hr]))}return{p:Me,f:Xe}}multiply(z,$){let pe=F(z),Te,Me;if(E){const{k1neg:Xe,k1:Je,k2neg:vt,k2:dt}=p.splitScalar(pe);let{p:St,f:Nt}=this.wNAF(Je,$),{p:Mt,f:or}=this.wNAF(dt,$);St=P(Xe,St),Mt=P(vt,Mt),Mt=new O(B(Mt.x*p.beta),Mt.y,Mt.z),Te=St.add(Mt),Me=Nt.add(or)}else{const{p:Xe,f:Je}=this.wNAF(pe,$);Te=Xe,Me=Je}return O.normalizeZ([Te,Me])[0]}toAffine(z){const{x:$,y:pe,z:Te}=this,Me=this.equals(O.ZERO);z==null&&(z=Me?u:ue(Te));const Xe=z,Je=B(Xe*Xe),vt=B(Je*Xe),dt=B($*Je),St=B(pe*vt),Nt=B(Te*Xe);if(Me)return S.ZERO;if(Nt!==n)throw new Error("invZ was invalid");return new S(dt,St)}}O.BASE=new O(c.Gx,c.Gy,n),O.ZERO=new O(t,n,t);function P(ae,z){const $=z.negate();return ae?$:z}const y=new WeakMap;class S{constructor(z,$){this.x=z,this.y=$}_setWindowSize(z){this._WINDOW_SIZE=z,y.delete(this)}hasEvenY(){return this.y%i===t}static fromCompressedHex(z){const $=z.length===32,pe=X($?z:z.subarray(1));if(!De(pe))throw new Error("Point is not on curve");const Te=N(pe);let Me=K(Te);const Xe=(Me&n)===n;$?Xe&&(Me=B(-Me)):(z[0]&1)===1!==Xe&&(Me=B(-Me));const Je=new S(pe,Me);return Je.assertValidity(),Je}static fromUncompressedHex(z){const $=X(z.subarray(1,h+1)),pe=X(z.subarray(h+1,h*2+1)),Te=new S($,pe);return Te.assertValidity(),Te}static fromHex(z){const $=L(z),pe=$.length,Te=$[0];if(pe===h)return this.fromCompressedHex($);if(pe===T&&(Te===2||Te===3))return this.fromCompressedHex($);if(pe===C&&Te===4)return this.fromUncompressedHex($);throw new Error(`Point.fromHex: received invalid point. Expected 32-${T} compressed bytes or ${C} uncompressed bytes, not ${pe}`)}static fromPrivateKey(z){return S.BASE.multiply(Le(z))}static fromSignature(z,$,pe){const{r:Te,s:Me}=Dt($);if(![0,1,2,3].includes(pe))throw new Error("Cannot recover: invalid recovery bit");const Xe=Be(L(z)),{n:Je}=c,vt=pe===2||pe===3?Te+Je:Te,dt=ue(vt,Je),St=B(-Xe*dt,Je),Nt=B(Me*dt,Je),Mt=pe&1?"03":"02",or=S.fromHex(Mt+we(vt)),rr=S.BASE.multiplyAndAddUnsafe(or,St,Nt);if(!rr)throw new Error("Cannot recover signature: point at infinify");return rr.assertValidity(),rr}toRawBytes(z=!1){return le(this.toHex(z))}toHex(z=!1){const $=we(this.x);return z?`${this.hasEvenY()?"02":"03"}${$}`:`04${$}${we(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const z="Point is not on elliptic curve",{x:$,y:pe}=this;if(!De($)||!De(pe))throw new Error(z);const Te=B(pe*pe),Me=N($);if(B(Te-Me)!==t)throw new Error(z)}equals(z){return this.x===z.x&&this.y===z.y}negate(){return new S(this.x,B(-this.y))}double(){return O.fromAffine(this).double().toAffine()}add(z){return O.fromAffine(this).add(O.fromAffine(z)).toAffine()}subtract(z){return this.add(z.negate())}multiply(z){return O.fromAffine(this).multiply(z,this).toAffine()}multiplyAndAddUnsafe(z,$,pe){const Te=O.fromAffine(this),Me=$===t||$===n||this!==S.BASE?Te.multiplyUnsafe($):Te.multiply($),Xe=O.fromAffine(z).multiplyUnsafe(pe),Je=Me.add(Xe);return Je.equals(O.ZERO)?void 0:Je.toAffine()}}e.Point=S,S.BASE=new S(c.Gx,c.Gy),S.ZERO=new S(t,t);function M(ae){return Number.parseInt(ae[0],16)>=8?"00"+ae:ae}function U(ae){if(ae.length<2||ae[0]!==2)throw new Error(`Invalid signature integer tag: ${be(ae)}`);const z=ae[1],$=ae.subarray(2,z+2);if(!z||$.length!==z)throw new Error("Invalid signature integer: wrong length");if($[0]===0&&$[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:X($),left:ae.subarray(z+2)}}function V(ae){if(ae.length<2||ae[0]!=48)throw new Error(`Invalid signature tag: ${be(ae)}`);if(ae[1]!==ae.length-2)throw new Error("Invalid signature: incorrect length");const{data:z,left:$}=U(ae.subarray(2)),{data:pe,left:Te}=U($);if(Te.length)throw new Error(`Invalid signature: left bytes after parsing: ${be(Te)}`);return{r:z,s:pe}}class Q{constructor(z,$){this.r=z,this.s=$,this.assertValidity()}static fromCompact(z){const $=z instanceof Uint8Array,pe="Signature.fromCompact";if(typeof z!="string"&&!$)throw new TypeError(`${pe}: Expected string or Uint8Array`);const Te=$?be(z):z;if(Te.length!==128)throw new Error(`${pe}: Expected 64-byte hex`);return new Q(me(Te.slice(0,64)),me(Te.slice(64,128)))}static fromDER(z){const $=z instanceof Uint8Array;if(typeof z!="string"&&!$)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:pe,s:Te}=V($?z:le(z));return new Q(pe,Te)}static fromHex(z){return this.fromDER(z)}assertValidity(){const{r:z,s:$}=this;if(!Oe(z))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Oe($))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const z=c.n>>n;return this.s>z}normalizeS(){return this.hasHighS()?new Q(this.r,B(-this.s,c.n)):this}toDERRawBytes(){return le(this.toDERHex())}toDERHex(){const z=M(Ne(this.s)),$=M(Ne(this.r)),pe=z.length/2,Te=$.length/2,Me=Ne(pe),Xe=Ne(Te);return`30${Ne(Te+pe+4)}02${Xe}${$}02${Me}${z}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return le(this.toCompactHex())}toCompactHex(){return we(this.r)+we(this.s)}}e.Signature=Q;function te(...ae){if(!ae.every(pe=>pe instanceof Uint8Array))throw new Error("Uint8Array list expected");if(ae.length===1)return ae[0];const z=ae.reduce((pe,Te)=>pe+Te.length,0),$=new Uint8Array(z);for(let pe=0,Te=0;pe<ae.length;pe++){const Me=ae[pe];$.set(Me,Te),Te+=Me.length}return $}const he=Array.from({length:256},(ae,z)=>z.toString(16).padStart(2,"0"));function be(ae){if(!(ae instanceof Uint8Array))throw new Error("Expected Uint8Array");let z="";for(let $=0;$<ae.length;$++)z+=he[ae[$]];return z}const Ie=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function we(ae){if(typeof ae!="bigint")throw new Error("Expected bigint");if(!(t<=ae&&ae<Ie))throw new Error("Expected number 0 <= n < 2^256");return ae.toString(16).padStart(64,"0")}function Ae(ae){const z=le(we(ae));if(z.length!==32)throw new Error("Error: expected 32 bytes");return z}function Ne(ae){const z=ae.toString(16);return z.length&1?`0${z}`:z}function me(ae){if(typeof ae!="string")throw new TypeError("hexToNumber: expected string, got "+typeof ae);return BigInt(`0x${ae}`)}function le(ae){if(typeof ae!="string")throw new TypeError("hexToBytes: expected string, got "+typeof ae);if(ae.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+ae.length);const z=new Uint8Array(ae.length/2);for(let $=0;$<z.length;$++){const pe=$*2,Te=ae.slice(pe,pe+2),Me=Number.parseInt(Te,16);if(Number.isNaN(Me)||Me<0)throw new Error("Invalid byte sequence");z[$]=Me}return z}function X(ae){return me(be(ae))}function L(ae){return ae instanceof Uint8Array?Uint8Array.from(ae):le(ae)}function F(ae){if(typeof ae=="number"&&Number.isSafeInteger(ae)&&ae>0)return BigInt(ae);if(typeof ae=="bigint"&&Oe(ae))return ae;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function B(ae,z=c.P){const $=ae%z;return $>=t?$:z+$}function D(ae,z){const{P:$}=c;let pe=ae;for(;z-- >t;)pe*=pe,pe%=$;return pe}function K(ae){const{P:z}=c,$=BigInt(6),pe=BigInt(11),Te=BigInt(22),Me=BigInt(23),Xe=BigInt(44),Je=BigInt(88),vt=ae*ae*ae%z,dt=vt*vt*ae%z,St=D(dt,s)*dt%z,Nt=D(St,s)*dt%z,Mt=D(Nt,i)*vt%z,or=D(Mt,pe)*Mt%z,rr=D(or,Te)*or%z,wr=D(rr,Xe)*rr%z,Hr=D(wr,Je)*wr%z,An=D(Hr,Xe)*rr%z,Vn=D(An,s)*dt%z,ai=D(Vn,Me)*or%z,kr=D(ai,$)*vt%z,_a=D(kr,i);if(_a*_a%z!==ae)throw new Error("Cannot find square root");return _a}function ue(ae,z=c.P){if(ae===t||z<=t)throw new Error(`invert: expected positive integers, got n=${ae} mod=${z}`);let $=B(ae,z),pe=z,Te=t,Me=n;for(;$!==t;){const Je=pe/$,vt=pe%$,dt=Te-Me*Je;pe=$,$=vt,Te=Me,Me=dt}if(pe!==n)throw new Error("invert: does not exist");return B(Te,z)}function Re(ae,z=c.P){const $=new Array(ae.length),pe=ae.reduce((Me,Xe,Je)=>Xe===t?Me:($[Je]=Me,B(Me*Xe,z)),n),Te=ue(pe,z);return ae.reduceRight((Me,Xe,Je)=>Xe===t?Me:($[Je]=B(Me*$[Je],z),B(Me*Xe,z)),Te),$}function Pe(ae){const z=ae.length*8-m*8,$=X(ae);return z>0?$>>BigInt(z):$}function Be(ae,z=!1){const $=Pe(ae);if(z)return $;const{n:pe}=c;return $>=pe?$-pe:$}let je,ce;class fe{constructor(z,$){if(this.hashLen=z,this.qByteLen=$,typeof z!="number"||z<2)throw new Error("hashLen must be a number");if(typeof $!="number"||$<2)throw new Error("qByteLen must be a number");this.v=new Uint8Array(z).fill(1),this.k=new Uint8Array(z).fill(0),this.counter=0}hmac(...z){return e.utils.hmacSha256(this.k,...z)}hmacSync(...z){return ce(this.k,...z)}checkSync(){if(typeof ce!="function")throw new R("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw new Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(z=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),z),this.v=await this.hmac(this.v),z.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),z),this.v=await this.hmac(this.v))}reseedSync(z=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),z),this.v=this.hmacSync(this.v),z.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),z),this.v=this.hmacSync(this.v))}async generate(){this.incr();let z=0;const $=[];for(;z<this.qByteLen;){this.v=await this.hmac(this.v);const pe=this.v.slice();$.push(pe),z+=this.v.length}return te(...$)}generateSync(){this.checkSync(),this.incr();let z=0;const $=[];for(;z<this.qByteLen;){this.v=this.hmacSync(this.v);const pe=this.v.slice();$.push(pe),z+=this.v.length}return te(...$)}}function Oe(ae){return t<ae&&ae<c.n}function De(ae){return t<ae&&ae<c.P}function Ge(ae,z,$,pe=!0){const{n:Te}=c,Me=Be(ae,!0);if(!Oe(Me))return;const Xe=ue(Me,Te),Je=S.BASE.multiply(Me),vt=B(Je.x,Te);if(vt===t)return;const dt=B(Xe*B(z+$*vt,Te),Te);if(dt===t)return;let St=new Q(vt,dt),Nt=(Je.x===St.r?0:2)|Number(Je.y&n);return pe&&St.hasHighS()&&(St=St.normalizeS(),Nt^=1),{sig:St,recovery:Nt}}function Le(ae){let z;if(typeof ae=="bigint")z=ae;else if(typeof ae=="number"&&Number.isSafeInteger(ae)&&ae>0)z=BigInt(ae);else if(typeof ae=="string"){if(ae.length!==2*m)throw new Error("Expected 32 bytes of private key");z=me(ae)}else if(ae instanceof Uint8Array){if(ae.length!==m)throw new Error("Expected 32 bytes of private key");z=X(ae)}else throw new TypeError("Expected valid private key");if(!Oe(z))throw new Error("Expected private key: 0 < key < n");return z}function Rt(ae){return ae instanceof S?(ae.assertValidity(),ae):S.fromHex(ae)}function Dt(ae){if(ae instanceof Q)return ae.assertValidity(),ae;try{return Q.fromDER(ae)}catch{return Q.fromCompact(ae)}}function Gt(ae,z=!1){return S.fromPrivateKey(ae).toRawBytes(z)}e.getPublicKey=Gt;function Ot(ae,z,$,pe=!1){return S.fromSignature(ae,z,$).toRawBytes(pe)}e.recoverPublicKey=Ot;function Fe(ae){const z=ae instanceof Uint8Array,$=typeof ae=="string",pe=(z||$)&&ae.length;return z?pe===T||pe===C:$?pe===T*2||pe===C*2:ae instanceof S}function pt(ae,z,$=!1){if(Fe(ae))throw new TypeError("getSharedSecret: first arg must be private key");if(!Fe(z))throw new TypeError("getSharedSecret: second arg must be public key");const pe=Rt(z);return pe.assertValidity(),pe.multiply(Le(ae)).toRawBytes($)}e.getSharedSecret=pt;function Qe(ae){const z=ae.length>h?ae.slice(0,h):ae;return X(z)}function qt(ae){const z=Qe(ae),$=B(z,c.n);return Kt($<t?z:$)}function Kt(ae){return Ae(ae)}function tr(ae,z,$){if(ae==null)throw new Error(`sign: expected valid message hash, not "${ae}"`);const pe=L(ae),Te=Le(z),Me=[Kt(Te),qt(pe)];if($!=null){$===!0&&($=e.utils.randomBytes(h));const vt=L($);if(vt.length!==h)throw new Error(`sign: Expected ${h} bytes of extra data`);Me.push(vt)}const Xe=te(...Me),Je=Qe(pe);return{seed:Xe,m:Je,d:Te}}function jr(ae,z){const{sig:$,recovery:pe}=ae,{der:Te,recovered:Me}=Object.assign({canonical:!0,der:!0},z),Xe=Te?$.toDERRawBytes():$.toCompactRawBytes();return Me?[Xe,pe]:Xe}async function fr(ae,z,$={}){const{seed:pe,m:Te,d:Me}=tr(ae,z,$.extraEntropy),Xe=new fe(v,m);await Xe.reseed(pe);let Je;for(;!(Je=Ge(await Xe.generate(),Te,Me,$.canonical));)await Xe.reseed();return jr(Je,$)}e.sign=fr;function hn(ae,z,$={}){const{seed:pe,m:Te,d:Me}=tr(ae,z,$.extraEntropy),Xe=new fe(v,m);Xe.reseedSync(pe);let Je;for(;!(Je=Ge(Xe.generateSync(),Te,Me,$.canonical));)Xe.reseedSync();return jr(Je,$)}e.signSync=hn;const Lr={strict:!0};function Sn(ae,z,$,pe=Lr){let Te;try{Te=Dt(ae),z=L(z)}catch{return!1}const{r:Me,s:Xe}=Te;if(pe.strict&&Te.hasHighS())return!1;const Je=Be(z);let vt;try{vt=Rt($)}catch{return!1}const{n:dt}=c,St=ue(Xe,dt),Nt=B(Je*St,dt),Mt=B(Me*St,dt),or=S.BASE.multiplyAndAddUnsafe(vt,Nt,Mt);return or?B(or.x,dt)===Me:!1}e.verify=Sn;function rn(ae){return B(X(ae),c.n)}class Tn{constructor(z,$){this.r=z,this.s=$,this.assertValidity()}static fromHex(z){const $=L(z);if($.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${$.length}`);const pe=X($.subarray(0,32)),Te=X($.subarray(32,64));return new Tn(pe,Te)}assertValidity(){const{r:z,s:$}=this;if(!De(z)||!Oe($))throw new Error("Invalid signature")}toHex(){return we(this.r)+we(this.s)}toRawBytes(){return le(this.toHex())}}function nn(ae){return S.fromPrivateKey(ae).toRawX()}class ni{constructor(z,$,pe=e.utils.randomBytes()){if(z==null)throw new TypeError(`sign: Expected valid message, not "${z}"`);this.m=L(z);const{x:Te,scalar:Me}=this.getScalar(Le($));if(this.px=Te,this.d=Me,this.rand=L(pe),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(z){const $=S.fromPrivateKey(z),pe=$.hasEvenY()?z:c.n-z;return{point:$,scalar:pe,x:$.toRawX()}}initNonce(z,$){return Ae(z^X($))}finalizeNonce(z){const $=B(X(z),c.n);if($===t)throw new Error("sign: Creation of signature failed. k is zero");const{point:pe,x:Te,scalar:Me}=this.getScalar($);return{R:pe,rx:Te,k:Me}}finalizeSig(z,$,pe,Te){return new Tn(z.x,B($+pe*Te,c.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:z,d:$,px:pe,rand:Te}=this,Me=e.utils.taggedHash,Xe=this.initNonce($,await Me(Qr.aux,Te)),{R:Je,rx:vt,k:dt}=this.finalizeNonce(await Me(Qr.nonce,Xe,pe,z)),St=rn(await Me(Qr.challenge,vt,pe,z)),Nt=this.finalizeSig(Je,dt,St,$);return await Da(Nt,z,pe)||this.error(),Nt}calcSync(){const{m:z,d:$,px:pe,rand:Te}=this,Me=e.utils.taggedHashSync,Xe=this.initNonce($,Me(Qr.aux,Te)),{R:Je,rx:vt,k:dt}=this.finalizeNonce(Me(Qr.nonce,Xe,pe,z)),St=rn(Me(Qr.challenge,vt,pe,z)),Nt=this.finalizeSig(Je,dt,St,$);return Dr(Nt,z,pe)||this.error(),Nt}}async function Pn(ae,z,$){return new ni(ae,z,$).calc()}function ja(ae,z,$){return new ni(ae,z,$).calcSync()}function La(ae,z,$){const pe=ae instanceof Tn,Te=pe?ae:Tn.fromHex(ae);return pe&&Te.assertValidity(),{...Te,m:L(z),P:Rt($)}}function va(ae,z,$,pe){const Te=S.BASE.multiplyAndAddUnsafe(z,Le($),B(-pe,c.n));return!(!Te||!Te.hasEvenY()||Te.x!==ae)}async function Da(ae,z,$){try{const{r:pe,s:Te,m:Me,P:Xe}=La(ae,z,$),Je=rn(await e.utils.taggedHash(Qr.challenge,Ae(pe),Xe.toRawX(),Me));return va(pe,Xe,Te,Je)}catch{return!1}}function Dr(ae,z,$){try{const{r:pe,s:Te,m:Me,P:Xe}=La(ae,z,$),Je=rn(e.utils.taggedHashSync(Qr.challenge,Ae(pe),Xe.toRawX(),Me));return va(pe,Xe,Te,Je)}catch(pe){if(pe instanceof R)throw pe;return!1}}e.schnorr={Signature:Tn,getPublicKey:nn,sign:Pn,verify:Da,signSync:ja,verifySync:Dr},S.BASE._setWindowSize(8);const Ct={node:a,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Qr={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},an={};e.utils={bytesToHex:be,hexToBytes:le,concatBytes:te,mod:B,invert:ue,isValidPrivateKey(ae){try{return Le(ae),!0}catch{return!1}},_bigintTo32Bytes:Ae,_normalizePrivateKey:Le,hashToPrivateKey:ae=>{ae=L(ae);const z=m+8;if(ae.length<z||ae.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const $=B(X(ae),c.n-n)+n;return Ae($)},randomBytes:(ae=32)=>{if(Ct.web)return Ct.web.getRandomValues(new Uint8Array(ae));if(Ct.node){const{randomBytes:z}=Ct.node;return Uint8Array.from(z(ae))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(m+8)),precompute(ae=8,z=S.BASE){const $=z===S.BASE?z:new S(z.x,z.y);return $._setWindowSize(ae),$.multiply(s),$},sha256:async(...ae)=>{if(Ct.web){const z=await Ct.web.subtle.digest("SHA-256",te(...ae));return new Uint8Array(z)}else if(Ct.node){const{createHash:z}=Ct.node,$=z("sha256");return ae.forEach(pe=>$.update(pe)),Uint8Array.from($.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(ae,...z)=>{if(Ct.web){const $=await Ct.web.subtle.importKey("raw",ae,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),pe=te(...z),Te=await Ct.web.subtle.sign("HMAC",$,pe);return new Uint8Array(Te)}else if(Ct.node){const{createHmac:$}=Ct.node,pe=$("sha256",ae);return z.forEach(Te=>pe.update(Te)),Uint8Array.from(pe.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(ae,...z)=>{let $=an[ae];if($===void 0){const pe=await e.utils.sha256(Uint8Array.from(ae,Te=>Te.charCodeAt(0)));$=te(pe,pe),an[ae]=$}return e.utils.sha256($,...z)},taggedHashSync:(ae,...z)=>{if(typeof je!="function")throw new R("sha256Sync is undefined, you need to set it");let $=an[ae];if($===void 0){const pe=je(Uint8Array.from(ae,Te=>Te.charCodeAt(0)));$=te(pe,pe),an[ae]=$}return je($,...z)},_JacobianPoint:O},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return je},set(ae){je||(je=ae)}},hmacSha256Sync:{configurable:!1,get(){return ce},set(ae){ce||(ce=ae)}}})})(C_)),C_}var _C;function BE(){return _C||(_C=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const a=qV(),t=rL(),n=vC();var i=vC();Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return i.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return i.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return i.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return i.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return i.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return i.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return i.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return i.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return i.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return i.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return i.schnorr}}),n.utils.hmacSha256Sync=(s,...u)=>{const c=a.hmac.create(t.sha256,s);return u.forEach(f=>c.update(f)),c.digest()}})(O_)),O_}var wt={};function EC(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ml={exports:{}},bC=ml.exports,wC;function nL(){return wC||(wC=1,(function(e,a){var t=bC&&bC.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(a,"__esModule",{value:!0}),a.crypto=a.wrapHash=a.equalsBytes=a.hexToBytes=a.bytesToUtf8=a.utf8ToBytes=a.createView=a.concatBytes=a.toHex=a.bytesToHex=a.assertBytes=a.assertBool=void 0;const n=t(qE()),i=_l(),s=n.default.bool;a.assertBool=s;const u=n.default.bytes;a.assertBytes=u;var c=_l();Object.defineProperty(a,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(a,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(a,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(a,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(a,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}});function f(v){if(!(v instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof v}`);return new TextDecoder().decode(v)}a.bytesToUtf8=f;function p(v){const T=v.startsWith("0x")?v.substring(2):v;return(0,i.hexToBytes)(T)}a.hexToBytes=p;function h(v,T){if(v.length!==T.length)return!1;for(let C=0;C<v.length;C++)if(v[C]!==T[C])return!1;return!0}a.equalsBytes=h;function m(v){return T=>(n.default.bytes(T),v(T))}a.wrapHash=m,a.crypto=(()=>{const v=typeof self=="object"&&"crypto"in self?self.crypto:void 0,T=typeof EC=="function"&&EC.bind(e);return{node:T&&!v?T("crypto"):void 0,web:v}})()})(ml,ml.exports)),ml.exports}var SC;function HV(){if(SC)return wt;SC=1;var e=wt&&wt.__createBinding||(Object.create?(function(le,X,L,F){F===void 0&&(F=L);var B=Object.getOwnPropertyDescriptor(X,L);(!B||("get"in B?!X.__esModule:B.writable||B.configurable))&&(B={enumerable:!0,get:function(){return X[L]}}),Object.defineProperty(le,F,B)}):(function(le,X,L,F){F===void 0&&(F=L),le[F]=X[L]})),a=wt&&wt.__setModuleDefault||(Object.create?(function(le,X){Object.defineProperty(le,"default",{enumerable:!0,value:X})}):function(le,X){le.default=X}),t=wt&&wt.__importStar||function(le){if(le&&le.__esModule)return le;var X={};if(le!=null)for(var L in le)L!=="default"&&Object.prototype.hasOwnProperty.call(le,L)&&e(X,le,L);return a(X,le),X};Object.defineProperty(wt,"__esModule",{value:!0}),wt.contextRandomize=wt.ecdh=wt.signatureNormalize=wt.signatureImport=wt.signatureExport=wt.privateKeyTweakMul=wt.publicKeyTweakMul=wt.publicKeyTweakAdd=wt.publicKeyCombine=wt.publicKeyNegate=wt.privateKeyNegate=wt.privateKeyTweakAdd=wt.ecdsaVerify=wt.ecdsaRecover=wt.ecdsaSign=wt.publicKeyConvert=wt.publicKeyVerify=wt.publicKeyCreate=wt.privateKeyVerify=wt.createPrivateKey=wt.createPrivateKeySync=void 0;const n=rL(),i=t(BE()),s=nL();function u(le){if(typeof le!="string")throw new TypeError("hexToNumber: expected string, got "+typeof le);return BigInt(`0x${le}`)}const c=le=>u((0,s.toHex)(le)),f=le=>le.toString(16).padStart(64,"0"),p=le=>(0,s.hexToBytes)(f(le)),{mod:h}=i.utils,m=i.CURVE.n;function v(le=F=>new Uint8Array(F),X,L){return typeof le=="function"&&(le=le(X)),(0,s.assertBytes)(le,X),L&&le.set(L),le}function T(le){return(0,s.assertBytes)(le,64),i.Signature.fromCompact(le)}function C(){return i.utils.randomPrivateKey()}wt.createPrivateKeySync=C;async function N(){return C()}wt.createPrivateKey=N;function E(le){return(0,s.assertBytes)(le,32),i.utils.isValidPrivateKey(le)}wt.privateKeyVerify=E;function R(le,X=!0,L){(0,s.assertBytes)(le,32),(0,s.assertBool)(X);const F=i.getPublicKey(le,X);return v(L,X?33:65,F)}wt.publicKeyCreate=R;function _(le){(0,s.assertBytes)(le,33,65);try{return i.Point.fromHex(le),!0}catch{return!1}}wt.publicKeyVerify=_;function O(le,X=!0,L){(0,s.assertBytes)(le,33,65),(0,s.assertBool)(X);const F=i.Point.fromHex(le).toRawBytes(X);return v(L,X?33:65,F)}wt.publicKeyConvert=O;function P(le,X,L={noncefn:void 0,data:void 0},F){if((0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32),typeof L!="object"||L===null)throw new TypeError("secp256k1.ecdsaSign: options should be object");if(L&&(L.noncefn!==void 0||L.data!==void 0))throw new Error("Secp256k1: noncefn && data is unsupported");const[B,D]=i.signSync(le,X,{recovered:!0,der:!1});return{signature:v(F,64,B),recid:D}}wt.ecdsaSign=P;function y(le,X,L,F=!0,B){(0,s.assertBytes)(L,32),(0,s.assertBool)(F);const D=T(le).toHex(),K=i.Point.fromSignature(L,D,X);return v(B,F?33:65,K.toRawBytes(F))}wt.ecdsaRecover=y;function S(le,X,L){(0,s.assertBytes)(le,64),(0,s.assertBytes)(X,32),(0,s.assertBytes)(L,33,65),(0,s.assertBytes)(le,64);const F=c(le.slice(0,32)),B=c(le.slice(32,64));if(F>=m||B>=m)throw new Error("Cannot parse signature");const D=i.Point.fromHex(L);let K;try{K=T(le)}catch{return!1}return i.verify(K,X,D)}wt.ecdsaVerify=S;function M(le,X){(0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32);let L=c(X);if(L===0n)throw new Error("Tweak must not be zero");if(L>=m)throw new Error("Tweak bigger than curve order");if(L+=c(le),L>=m&&(L-=m),L===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return le.set((0,s.hexToBytes)(f(L))),le}wt.privateKeyTweakAdd=M;function U(le){(0,s.assertBytes)(le,32);const X=h(-c(le),m);return le.set((0,s.hexToBytes)(f(X))),le}wt.privateKeyNegate=U;function V(le,X=!0,L){(0,s.assertBytes)(le,33,65),(0,s.assertBool)(X);const F=i.Point.fromHex(le).negate();return v(L,X?33:65,F.toRawBytes(X))}wt.publicKeyNegate=V;function Q(le,X=!0,L){if(!Array.isArray(le)||!le.length)throw new TypeError(`Expected array with one or more items, not ${le}`);for(const B of le)(0,s.assertBytes)(B,33,65);(0,s.assertBool)(X);const F=le.map(B=>i.Point.fromHex(B)).reduce((B,D)=>B.add(D),i.Point.ZERO);if(F.equals(i.Point.ZERO))throw new Error("Combined result must not be zero");return v(L,X?33:65,F.toRawBytes(X))}wt.publicKeyCombine=Q;function te(le,X,L=!0,F){(0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),(0,s.assertBool)(L);const B=i.Point.fromHex(le),D=i.Point.fromPrivateKey(X),K=B.add(D);if(D.equals(i.Point.ZERO)||K.equals(i.Point.ZERO))throw new Error("Tweak must not be zero");return v(F,L?33:65,K.toRawBytes(L))}wt.publicKeyTweakAdd=te;function he(le,X,L=!0,F){(0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),(0,s.assertBool)(L);const B=c(X);if(B===0n)throw new Error("Tweak must not be zero");if(B<=1||B>=m)throw new Error("Tweak is zero or bigger than curve order");const D=i.Point.fromHex(le).multiply(B);return v(F,L?33:65,D.toRawBytes(L))}wt.publicKeyTweakMul=he;function be(le,X){(0,s.assertBytes)(le,32),(0,s.assertBytes)(X,32);const L=c(X);if(L<=1||L>=m)throw new Error("Tweak is zero or bigger than curve order");const F=h(L*c(le),m);if(F===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return le.set((0,s.hexToBytes)(f(F))),le}wt.privateKeyTweakMul=be;function Ie(le,X){const L=T(le).toRawBytes();return v(X,72,T(le).toRawBytes()).slice(0,L.length)}wt.signatureExport=Ie;function we(le,X){(0,s.assertBytes)(le);const L=i.Signature.fromDER(le);return v(X,64,(0,s.hexToBytes)(L.toCompactHex()))}wt.signatureImport=we;function Ae(le){const X=T(le);return X.s>m/2n&&le.set(p(m-X.s),32),le}wt.signatureNormalize=Ae;function Ne(le,X,L={},F){if((0,s.assertBytes)(le,33,65),(0,s.assertBytes)(X,32),typeof L!="object"||L===null)throw new TypeError("secp256k1.ecdh: options should be object");L.data!==void 0&&(0,s.assertBytes)(L.data);const B=i.Point.fromHex(i.getSharedSecret(X,le));if(L.hashfn===void 0)return v(F,32,(0,n.sha256)(B.toRawBytes(!0)));if(typeof L.hashfn!="function")throw new TypeError("secp256k1.ecdh: options.hashfn should be function");L.xbuf!==void 0&&(0,s.assertBytes)(L.xbuf,32),L.ybuf!==void 0&&(0,s.assertBytes)(L.ybuf,32),(0,s.assertBytes)(F,32);const D=L.xbuf||new Uint8Array(32);D.set(p(B.x));const K=L.ybuf||new Uint8Array(32);K.set(p(B.y));const ue=L.hashfn(D,K,L.data);if(!(ue instanceof Uint8Array)||ue.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return v(F,32,ue)}wt.ecdh=Ne;function me(le){le!==null&&(0,s.assertBytes)(le,32)}return wt.contextRandomize=me,wt}var TC;function aL(){if(TC)return Vr;TC=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.createUnsafeIdentity=Vr.computeAddress=Vr.ethSign=Vr.createEthereumMessageHash=Vr.sign=Vr.recoverAddressFromEthSignature=Vr.recoverPublicKey=void 0;const e=_f(),a=BE(),t=HV();function n(m,v){if(m.length!==65)throw new Error("Invalid signature length"+m.length);const T=m.slice(0,m.length-1),C=m[64]===28?1:0;return(0,t.ecdsaRecover)(T,C,v,!1).slice(1)}Vr.recoverPublicKey=n;function i(m){if(m.length!==65)throw new Error("Invalid ethereum signature");const v=m[64];if(v===0||v===1){const T=new Uint8Array(m);return T[64]=v+27,T}return m}function s(m,v){if(typeof m=="string"){if((0,e.isHex)(m))return s((0,e.hexToBytes)(m),v);throw new Error("String signatures must be encoded in hex")}return p(n(i(m),c(v)))}Vr.recoverAddressFromEthSignature=s;function u(m,v){const T=(0,t.ecdsaSign)(v,m),C=T.recid===1?"1c":"1b";return(0,e.toHex)(T.signature)+C}Vr.sign=u;function c(m){const v=typeof m=="string"?(0,e.stringToUtf8Bytes)(m):m,T=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
20
20
  `),(0,e.stringToUtf8Bytes)(String(v.length)),v);return(0,e.hexToBytes)((0,e.sha3)(T))}Vr.createEthereumMessageHash=c;function f(m,v){return u(m,c(v))}Vr.ethSign=f;function p(m){const v=m.length===65&&m[0]===4?m.slice(1):m;return(0,e.getAddress)((0,e.sha3)(v).substring(24))}Vr.computeAddress=p;function h(){const m=a.utils.randomPrivateKey(),v=(0,a.getPublicKey)(m).slice(1),T=p(v);return{privateKey:(0,e.bytesToHex)(m),publicKey:(0,e.bytesToHex)(v),address:T}}return Vr.createUnsafeIdentity=h,Vr}var PC;function zV(){return PC||(PC=1,(function(e){var a=oa&&oa.__createBinding||(Object.create?(function(V,Q,te,he){he===void 0&&(he=te);var be=Object.getOwnPropertyDescriptor(Q,te);(!be||("get"in be?!Q.__esModule:be.writable||be.configurable))&&(be={enumerable:!0,get:function(){return Q[te]}}),Object.defineProperty(V,he,be)}):(function(V,Q,te,he){he===void 0&&(he=te),V[he]=Q[te]})),t=oa&&oa.__setModuleDefault||(Object.create?(function(V,Q){Object.defineProperty(V,"default",{enumerable:!0,value:Q})}):function(V,Q){V.default=Q}),n=oa&&oa.__importStar||function(V){if(V&&V.__esModule)return V;var Q={};if(V!=null)for(var te in V)te!=="default"&&Object.prototype.hasOwnProperty.call(V,te)&&a(Q,V,te);return t(Q,V),Q},i=oa&&oa.__importDefault||function(V){return V&&V.__esModule?V:{default:V}};Object.defineProperty(e,"__esModule",{value:!0}),e.isValidEIP1271Signature=e.parseEmphemeralPayload=e.getSignedIdentitySignatureType=e.getEphemeralSignatureType=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0;const s=n(_f()),u=IF(),c=tL(),f=LV(),p=i(DV()),h=aL();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const m=132;var v;(function(V){async function Q(X,L,F,B=Date.now()){let D="";if(!V.isValidAuthChain(L))return{ok:!1,message:"ERROR: Malformed authChain"};for(const ue of L){const Re=U(ue.type);try{const{nextAuthority:Pe}=await Re(D,ue,{provider:F,dateToValidateExpirationInMillis:B});D=Pe||""}catch(Pe){return{ok:!1,message:`ERROR. Link type: ${ue.type}. ${Pe.message}.`}}}const K=D===X;return{ok:K,message:K?void 0:`ERROR: Invalid final authority. Expected: ${X}. Current ${D}.`}}V.validateSignature=Q;function te(X){for(const[L,F]of X.entries())if(L===0&&F.type!==c.AuthLinkType.SIGNER||F.type===c.AuthLinkType.SIGNER&&L!==0)return!1;return!0}V.isValidAuthChain=te;function he(X){return(0,s.hexToBytes)((0,s.sha3)((0,s.stringToUtf8Bytes)(X)))}V.createEIP1271MessageHash=he;function be(X,L,F){return[{type:c.AuthLinkType.SIGNER,payload:L,signature:""},{type:P(F),payload:X,signature:F}]}V.createSimpleAuthChain=be;function Ie(X,L,F,B){const D=(0,f.moveMinutes)(F),K=V.getEphemeralMessage(L.address,D),ue=V.createSignature(X,K),Re=V.createSignature(L,B);return[{type:c.AuthLinkType.SIGNER,payload:X.address,signature:""},{type:c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:K,signature:ue},{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:B,signature:Re}]}V.createAuthChain=Ie;async function we(X,L,F,B){const D=new Date;D.setMinutes(D.getMinutes()+F);const K=V.getEphemeralMessage(L.address,D),ue=await B(K),Re=[{type:c.AuthLinkType.SIGNER,payload:X,signature:""},{type:O(ue),payload:K,signature:ue}];return{ephemeralIdentity:L,expiration:D,authChain:Re}}V.initializeAuthChain=we;function Ae(X,L){const F=V.createSignature(X.ephemeralIdentity,L);return[...X.authChain,{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:L,signature:F}]}V.signPayload=Ae,V.createEthereumMessageHash=h.createEthereumMessageHash;function Ne(X,L){return(0,h.ethSign)((0,s.hexToBytes)(X.privateKey),L)}V.createSignature=Ne;function me(X){return X.length>0&&X[0].type===c.AuthLinkType.SIGNER?X[0].payload:"Invalid-Owner-Address"}V.ownerAddress=me;function le(X,L){return`Decentraland Login
21
21
  Ephemeral address: ${X}
22
22
  Expiration: ${L.toISOString()}`}V.getEphemeralMessage=le})(v=e.Authenticator||(e.Authenticator={}));const T=async(V,Q)=>({nextAuthority:Q.payload});e.SIGNER_VALIDATOR=T;const C=async(V,Q)=>{if(!Q.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const te=(0,h.recoverAddressFromEthSignature)(Q.signature,Q.payload),he=V.toLocaleLowerCase(),be=te.toLocaleLowerCase();if(he===be)return{nextAuthority:Q.payload};throw new Error(`Invalid signer address. Expected: ${he}. Actual: ${be}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=C;const N=async(V,Q,te)=>{if(!Q.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:he,ephemeralAddress:be,expiration:Ie}=y(Q.payload),we=te.dateToValidateExpirationInMillis?te.dateToValidateExpirationInMillis:Date.now();if(Ie>we){const Ae=(0,h.recoverAddressFromEthSignature)(Q.signature,he),Ne=V.toLocaleLowerCase(),me=Ae.toLocaleLowerCase();if(Ne===me)return{nextAuthority:be};throw new Error(`Invalid signer address. Expected: ${Ne}. Actual: ${me}`)}throw new Error(`Ephemeral key expired. Expiration: ${Ie}. Test: ${we}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=N;const E=async(V,Q,te)=>{if(!Q.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:he,ephemeralAddress:be,expiration:Ie}=y(Q.payload),we=te?.dateToValidateExpirationInMillis?te?.dateToValidateExpirationInMillis:Date.now();if(Ie>we&&await M(te.provider,V,he,Q.signature,we))return{nextAuthority:be};throw new Error(`Ephemeral key expired. Expiration: ${Ie}. Test: ${we}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=E;const R=async(V,Q,te)=>{if(!Q.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await M(te.provider,V,Q.payload,Q.signature,te.dateToValidateExpirationInMillis))return{nextAuthority:Q.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=R;const _=async(V,Q)=>({error:"Error Validator."});function O(V){return V.length===m?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}e.getEphemeralSignatureType=O;function P(V){return V.length===m?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}e.getSignedIdentitySignatureType=P;function y(V){const Q=V.replace(/\r/g,""),te=Q.split(`